ixheaacd_huff_code_reorder.c:ixheaac_extu:
   54|   725k|static PLATFORM_INLINE UWORD32 ixheaac_extu(UWORD32 a, WORD32 shift_left, WORD32 shift_right) {
   55|   725k|  UWORD32 x;
   56|   725k|  x = (UWORD32)a << shift_left;
   57|   725k|  x = (UWORD32)x >> shift_right;
   58|       |
   59|   725k|  return x;
   60|   725k|}
ixheaacd_mps_res_tns.c:ixheaac_deposit16h_in32:
   40|  27.8k|static PLATFORM_INLINE WORD32 ixheaac_deposit16h_in32(WORD16 var) {
   41|  27.8k|  WORD32 var_out;
   42|       |
   43|  27.8k|  var_out = (WORD32)var << 16;
   44|  27.8k|  return (var_out);
   45|  27.8k|}
ixheaacd_mps_res_tns.c:ixheaac_shl32_dir_sat_limit:
  114|  24.0k|static PLATFORM_INLINE WORD32 ixheaac_shl32_dir_sat_limit(WORD32 a, WORD b) {
  115|  24.0k|  WORD32 out_val;
  116|       |
  117|  24.0k|  if (b < 0) {
  ------------------
  |  Branch (117:7): [True: 0, False: 24.0k]
  ------------------
  118|      0|    b = -b;
  119|      0|    b = ixheaac_min32(b, 31);
  120|      0|    out_val = ixheaac_shr32(a, b);
  121|  24.0k|  } else {
  122|  24.0k|    out_val = ixheaac_shl32_sat(a, b);
  123|  24.0k|  }
  124|       |
  125|  24.0k|  return out_val;
  126|  24.0k|}
ixheaacd_pns_js_thumb.c:ixheaac_div32_pos_normb:
   74|   544k|static PLATFORM_INLINE WORD32 ixheaac_div32_pos_normb(WORD32 a, WORD32 b) {
   75|   544k|  WORD32 quotient;
   76|   544k|  UWORD32 mantissa_nr = a;
   77|   544k|  UWORD32 mantissa_dr = b;
   78|       |
   79|   544k|  LOOPINDEX i;
   80|       |
   81|   544k|  if (a == b) {
  ------------------
  |  Branch (81:7): [True: 0, False: 544k]
  ------------------
   82|      0|    quotient = MAX_32;
  ------------------
  |  |   60|      0|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
   83|   544k|  } else {
   84|   544k|    quotient = 0;
   85|       |
   86|  17.9M|    for (i = 0; i < 32; i++) {
  ------------------
  |  Branch (86:17): [True: 17.4M, False: 544k]
  ------------------
   87|  17.4M|      quotient = quotient << 1;
   88|       |
   89|  17.4M|      if (mantissa_nr >= mantissa_dr) {
  ------------------
  |  Branch (89:11): [True: 7.87M, False: 9.54M]
  ------------------
   90|  7.87M|        mantissa_nr = mantissa_nr - mantissa_dr;
   91|  7.87M|        quotient += 1;
   92|  7.87M|      }
   93|       |
   94|  17.4M|      mantissa_nr = (UWORD32)mantissa_nr << 1;
   95|  17.4M|    }
   96|   544k|  }
   97|       |
   98|   544k|  return quotient;
   99|   544k|}
ixheaacd_pns_js_thumb.c:ixheaac_shr32_dir_sat_limit:
  101|  6.27M|static PLATFORM_INLINE WORD32 ixheaac_shr32_dir_sat_limit(WORD32 a, WORD b) {
  102|  6.27M|  WORD32 out_val;
  103|       |
  104|  6.27M|  if (b < 0) {
  ------------------
  |  Branch (104:7): [True: 1.20M, False: 5.07M]
  ------------------
  105|  1.20M|    out_val = ixheaac_shl32_sat(a, -b);
  106|  5.07M|  } else {
  107|  5.07M|    b = ixheaac_min32(b, 31);
  108|  5.07M|    out_val = ixheaac_shr32(a, b);
  109|  5.07M|  }
  110|       |
  111|  6.27M|  return out_val;
  112|  6.27M|}
ixheaacd_sbrdec_initfuncs.c:ixheaac_extract16l:
   33|  18.8k|static PLATFORM_INLINE WORD16 ixheaac_extract16l(WORD32 var) {
   34|  18.8k|  WORD16 var_out;
   35|       |
   36|  18.8k|  var_out = (WORD16)var;
   37|  18.8k|  return (var_out);
   38|  18.8k|}
ixheaacd_aac_tns.c:ixheaac_deposit16h_in32:
   40|  2.61M|static PLATFORM_INLINE WORD32 ixheaac_deposit16h_in32(WORD16 var) {
   41|  2.61M|  WORD32 var_out;
   42|       |
   43|  2.61M|  var_out = (WORD32)var << 16;
   44|  2.61M|  return (var_out);
   45|  2.61M|}
ixheaacd_basic_funcs.c:ixheaac_shl32_dir_sat_limit:
  114|  2.72M|static PLATFORM_INLINE WORD32 ixheaac_shl32_dir_sat_limit(WORD32 a, WORD b) {
  115|  2.72M|  WORD32 out_val;
  116|       |
  117|  2.72M|  if (b < 0) {
  ------------------
  |  Branch (117:7): [True: 0, False: 2.72M]
  ------------------
  118|      0|    b = -b;
  119|      0|    b = ixheaac_min32(b, 31);
  120|      0|    out_val = ixheaac_shr32(a, b);
  121|  2.72M|  } else {
  122|  2.72M|    out_val = ixheaac_shl32_sat(a, b);
  123|  2.72M|  }
  124|       |
  125|  2.72M|  return out_val;
  126|  2.72M|}
ixheaacd_basic_funcs.c:ixheaac_shr32_dir_sat_limit:
  101|  1.08M|static PLATFORM_INLINE WORD32 ixheaac_shr32_dir_sat_limit(WORD32 a, WORD b) {
  102|  1.08M|  WORD32 out_val;
  103|       |
  104|  1.08M|  if (b < 0) {
  ------------------
  |  Branch (104:7): [True: 544k, False: 544k]
  ------------------
  105|   544k|    out_val = ixheaac_shl32_sat(a, -b);
  106|   544k|  } else {
  107|   544k|    b = ixheaac_min32(b, 31);
  108|   544k|    out_val = ixheaac_shr32(a, b);
  109|   544k|  }
  110|       |
  111|  1.08M|  return out_val;
  112|  1.08M|}
ixheaacd_basic_funcs.c:ixheaac_mult32x16h_in32_shl_sat:
   62|   544k|static PLATFORM_INLINE WORD32 ixheaac_mult32x16h_in32_shl_sat(WORD32 a, WORD32 b) {
   63|   544k|  WORD32 result;
   64|       |
   65|   544k|  if (a == (WORD32)0x80000000 && b == (WORD16)0x8000) {
  ------------------
  |  Branch (65:7): [True: 0, False: 544k]
  |  Branch (65:34): [True: 0, False: 0]
  ------------------
   66|      0|    result = (WORD32)0x7fffffff;
   67|   544k|  } else {
   68|   544k|    result = ixheaac_mult32x16in32_shl(a, ixheaac_extract16h(b));
   69|   544k|  }
   70|       |
   71|   544k|  return (result);
   72|   544k|}
ixheaacd_basic_funcs.c:ixheaac_extract16h:
   26|   544k|static PLATFORM_INLINE WORD16 ixheaac_extract16h(WORD32 var) {
   27|   544k|  WORD16 var_out;
   28|       |
   29|   544k|  var_out = (WORD16)(var >> 16);
   30|   544k|  return (var_out);
   31|   544k|}
ixheaacd_block.c:ixheaac_extu:
   54|   345k|static PLATFORM_INLINE UWORD32 ixheaac_extu(UWORD32 a, WORD32 shift_left, WORD32 shift_right) {
   55|   345k|  UWORD32 x;
   56|   345k|  x = (UWORD32)a << shift_left;
   57|   345k|  x = (UWORD32)x >> shift_right;
   58|       |
   59|   345k|  return x;
   60|   345k|}
ixheaacd_block.c:ixheaac_shl32_dir_sat_limit:
  114|  54.3M|static PLATFORM_INLINE WORD32 ixheaac_shl32_dir_sat_limit(WORD32 a, WORD b) {
  115|  54.3M|  WORD32 out_val;
  116|       |
  117|  54.3M|  if (b < 0) {
  ------------------
  |  Branch (117:7): [True: 43.0M, False: 11.3M]
  ------------------
  118|  43.0M|    b = -b;
  119|  43.0M|    b = ixheaac_min32(b, 31);
  120|  43.0M|    out_val = ixheaac_shr32(a, b);
  121|  43.0M|  } else {
  122|  11.3M|    out_val = ixheaac_shl32_sat(a, b);
  123|  11.3M|  }
  124|       |
  125|  54.3M|  return out_val;
  126|  54.3M|}
ixheaacd_env_calc.c:ixheaac_extract16h:
   26|  14.6M|static PLATFORM_INLINE WORD16 ixheaac_extract16h(WORD32 var) {
   27|  14.6M|  WORD16 var_out;
   28|       |
   29|  14.6M|  var_out = (WORD16)(var >> 16);
   30|  14.6M|  return (var_out);
   31|  14.6M|}
ixheaacd_env_calc.c:ixheaac_shl32_dir_sat_limit:
  114|   217k|static PLATFORM_INLINE WORD32 ixheaac_shl32_dir_sat_limit(WORD32 a, WORD b) {
  115|   217k|  WORD32 out_val;
  116|       |
  117|   217k|  if (b < 0) {
  ------------------
  |  Branch (117:7): [True: 130k, False: 87.6k]
  ------------------
  118|   130k|    b = -b;
  119|   130k|    b = ixheaac_min32(b, 31);
  120|   130k|    out_val = ixheaac_shr32(a, b);
  121|   130k|  } else {
  122|  87.6k|    out_val = ixheaac_shl32_sat(a, b);
  123|  87.6k|  }
  124|       |
  125|   217k|  return out_val;
  126|   217k|}
ixheaacd_env_calc.c:ixheaac_shr32_dir_sat_limit:
  101|   847k|static PLATFORM_INLINE WORD32 ixheaac_shr32_dir_sat_limit(WORD32 a, WORD b) {
  102|   847k|  WORD32 out_val;
  103|       |
  104|   847k|  if (b < 0) {
  ------------------
  |  Branch (104:7): [True: 256k, False: 591k]
  ------------------
  105|   256k|    out_val = ixheaac_shl32_sat(a, -b);
  106|   591k|  } else {
  107|   591k|    b = ixheaac_min32(b, 31);
  108|   591k|    out_val = ixheaac_shr32(a, b);
  109|   591k|  }
  110|       |
  111|   847k|  return out_val;
  112|   847k|}
ixheaacd_env_calc.c:ixheaac_extract16l:
   33|  24.5M|static PLATFORM_INLINE WORD16 ixheaac_extract16l(WORD32 var) {
   34|  24.5M|  WORD16 var_out;
   35|       |
   36|  24.5M|  var_out = (WORD16)var;
   37|  24.5M|  return (var_out);
   38|  24.5M|}
ixheaacd_freq_sca.c:ixheaac_deposit16l_in32:
   47|   199k|static PLATFORM_INLINE WORD32 ixheaac_deposit16l_in32(WORD16 var) {
   48|   199k|  WORD32 var_out;
   49|       |
   50|   199k|  var_out = (WORD32)var;
   51|   199k|  return (var_out);
   52|   199k|}
ixheaacd_freq_sca.c:ixheaac_extract16h:
   26|  48.3M|static PLATFORM_INLINE WORD16 ixheaac_extract16h(WORD32 var) {
   27|  48.3M|  WORD16 var_out;
   28|       |
   29|  48.3M|  var_out = (WORD16)(var >> 16);
   30|  48.3M|  return (var_out);
   31|  48.3M|}
ixheaacd_freq_sca.c:ixheaac_extract16l:
   33|   522k|static PLATFORM_INLINE WORD16 ixheaac_extract16l(WORD32 var) {
   34|   522k|  WORD16 var_out;
   35|       |
   36|   522k|  var_out = (WORD16)var;
   37|   522k|  return (var_out);
   38|   522k|}
ixheaacd_lpfuncs.c:ixheaac_shl32_dir_sat_limit:
  114|  35.5M|static PLATFORM_INLINE WORD32 ixheaac_shl32_dir_sat_limit(WORD32 a, WORD b) {
  115|  35.5M|  WORD32 out_val;
  116|       |
  117|  35.5M|  if (b < 0) {
  ------------------
  |  Branch (117:7): [True: 18.4M, False: 17.0M]
  ------------------
  118|  18.4M|    b = -b;
  119|  18.4M|    b = ixheaac_min32(b, 31);
  120|  18.4M|    out_val = ixheaac_shr32(a, b);
  121|  18.4M|  } else {
  122|  17.0M|    out_val = ixheaac_shl32_sat(a, b);
  123|  17.0M|  }
  124|       |
  125|  35.5M|  return out_val;
  126|  35.5M|}
ixheaacd_lpp_tran.c:ixheaac_extract16h:
   26|   914k|static PLATFORM_INLINE WORD16 ixheaac_extract16h(WORD32 var) {
   27|   914k|  WORD16 var_out;
   28|       |
   29|   914k|  var_out = (WORD16)(var >> 16);
   30|   914k|  return (var_out);
   31|   914k|}
ixheaacd_mps_res_block.c:ixheaac_extu:
   54|   107k|static PLATFORM_INLINE UWORD32 ixheaac_extu(UWORD32 a, WORD32 shift_left, WORD32 shift_right) {
   55|   107k|  UWORD32 x;
   56|   107k|  x = (UWORD32)a << shift_left;
   57|   107k|  x = (UWORD32)x >> shift_right;
   58|       |
   59|   107k|  return x;
   60|   107k|}

ixheaacd_api.c:ixheaac_round16:
  231|   237M|static PLATFORM_INLINE WORD16 ixheaac_round16(WORD32 op1) {
  232|   237M|  WORD16 var_out;
  233|       |
  234|   237M|  var_out = (WORD16)(ixheaac_add32_sat(op1, 0x8000) >> 16);
  235|   237M|  return (var_out);
  236|   237M|}
ixheaacd_longblock.c:ixheaac_add16_sat:
   43|  77.1k|static PLATFORM_INLINE WORD16 ixheaac_add16_sat(WORD16 op1, WORD16 op2) {
   44|  77.1k|  WORD16 var_out;
   45|  77.1k|  WORD32 sum;
   46|       |
   47|  77.1k|  sum = (WORD32)op1 + (WORD32)op2;
   48|  77.1k|  var_out = ixheaac_sat16(sum);
   49|  77.1k|  return (var_out);
   50|  77.1k|}
ixheaacd_longblock.c:ixheaac_sat16:
   23|  77.1k|static PLATFORM_INLINE WORD16 ixheaac_sat16(WORD32 op1) {
   24|  77.1k|  WORD16 var_out;
   25|       |
   26|  77.1k|  if (op1 > 0X00007fffL) {
  ------------------
  |  Branch (26:7): [True: 0, False: 77.1k]
  ------------------
   27|      0|    var_out = MAX_16;
  ------------------
  |  |   63|      0|#define MAX_16 (WORD16)0x7fff
  ------------------
   28|  77.1k|  } else if (op1 < (WORD32)0xffff8000L) {
  ------------------
  |  Branch (28:14): [True: 0, False: 77.1k]
  ------------------
   29|      0|    var_out = (WORD16)(-32768);
   30|  77.1k|  } else {
   31|  77.1k|    var_out = (WORD16)(op1);
   32|  77.1k|  }
   33|  77.1k|  return (var_out);
   34|  77.1k|}
ixheaacd_lt_predict.c:ixheaac_round16:
  231|  77.1M|static PLATFORM_INLINE WORD16 ixheaac_round16(WORD32 op1) {
  232|  77.1M|  WORD16 var_out;
  233|       |
  234|  77.1M|  var_out = (WORD16)(ixheaac_add32_sat(op1, 0x8000) >> 16);
  235|  77.1M|  return (var_out);
  236|  77.1M|}
ixheaacd_lt_predict.c:ixheaac_shl16:
   91|  36.9M|static PLATFORM_INLINE WORD16 ixheaac_shl16(WORD16 op1, WORD16 shift) {
   92|  36.9M|  WORD16 var_out;
   93|       |
   94|  36.9M|  var_out = (WORD16)(op1 << shift);
   95|  36.9M|  return (var_out);
   96|  36.9M|}
ixheaacd_lt_predict.c:ixheaac_sat16:
   23|  63.0M|static PLATFORM_INLINE WORD16 ixheaac_sat16(WORD32 op1) {
   24|  63.0M|  WORD16 var_out;
   25|       |
   26|  63.0M|  if (op1 > 0X00007fffL) {
  ------------------
  |  Branch (26:7): [True: 4.21M, False: 58.7M]
  ------------------
   27|  4.21M|    var_out = MAX_16;
  ------------------
  |  |   63|  4.21M|#define MAX_16 (WORD16)0x7fff
  ------------------
   28|  58.7M|  } else if (op1 < (WORD32)0xffff8000L) {
  ------------------
  |  Branch (28:14): [True: 4.46M, False: 54.3M]
  ------------------
   29|  4.46M|    var_out = (WORD16)(-32768);
   30|  54.3M|  } else {
   31|  54.3M|    var_out = (WORD16)(op1);
   32|  54.3M|  }
   33|  63.0M|  return (var_out);
   34|  63.0M|}
ixheaacd_mps_res_channel.c:ixheaac_shr16_dir_sat:
  148|  1.03k|static PLATFORM_INLINE WORD16 ixheaac_shr16_dir_sat(WORD16 op1, WORD16 shift) {
  149|  1.03k|  WORD16 var_out;
  150|       |
  151|  1.03k|  if (shift < 0) {
  ------------------
  |  Branch (151:7): [True: 0, False: 1.03k]
  ------------------
  152|      0|    var_out = ixheaac_shl16_sat(op1, (WORD16)(-shift));
  153|  1.03k|  } else {
  154|  1.03k|    var_out = ixheaac_shr16(op1, shift);
  155|  1.03k|  }
  156|  1.03k|  return (var_out);
  157|  1.03k|}
ixheaacd_mps_res_channel.c:ixheaac_shr16:
  110|  1.03k|static PLATFORM_INLINE WORD16 ixheaac_shr16(WORD16 op1, WORD16 shift) {
  111|  1.03k|  WORD16 var_out;
  112|       |
  113|  1.03k|  var_out = ((WORD16)(op1 >> shift));
  114|  1.03k|  return (var_out);
  115|  1.03k|}
ixheaacd_mps_res_longblock.c:ixheaac_add16_sat:
   43|    143|static PLATFORM_INLINE WORD16 ixheaac_add16_sat(WORD16 op1, WORD16 op2) {
   44|    143|  WORD16 var_out;
   45|    143|  WORD32 sum;
   46|       |
   47|    143|  sum = (WORD32)op1 + (WORD32)op2;
   48|    143|  var_out = ixheaac_sat16(sum);
   49|    143|  return (var_out);
   50|    143|}
ixheaacd_mps_res_longblock.c:ixheaac_sat16:
   23|    143|static PLATFORM_INLINE WORD16 ixheaac_sat16(WORD32 op1) {
   24|    143|  WORD16 var_out;
   25|       |
   26|    143|  if (op1 > 0X00007fffL) {
  ------------------
  |  Branch (26:7): [True: 0, False: 143]
  ------------------
   27|      0|    var_out = MAX_16;
  ------------------
  |  |   63|      0|#define MAX_16 (WORD16)0x7fff
  ------------------
   28|    143|  } else if (op1 < (WORD32)0xffff8000L) {
  ------------------
  |  Branch (28:14): [True: 0, False: 143]
  ------------------
   29|      0|    var_out = (WORD16)(-32768);
   30|    143|  } else {
   31|    143|    var_out = (WORD16)(op1);
   32|    143|  }
   33|    143|  return (var_out);
   34|    143|}
ixheaacd_mps_res_pns_js_thumb.c:ixheaac_shr16_dir_sat:
  148|    215|static PLATFORM_INLINE WORD16 ixheaac_shr16_dir_sat(WORD16 op1, WORD16 shift) {
  149|    215|  WORD16 var_out;
  150|       |
  151|    215|  if (shift < 0) {
  ------------------
  |  Branch (151:7): [True: 0, False: 215]
  ------------------
  152|      0|    var_out = ixheaac_shl16_sat(op1, (WORD16)(-shift));
  153|    215|  } else {
  154|    215|    var_out = ixheaac_shr16(op1, shift);
  155|    215|  }
  156|    215|  return (var_out);
  157|    215|}
ixheaacd_mps_res_pns_js_thumb.c:ixheaac_shr16:
  110|    215|static PLATFORM_INLINE WORD16 ixheaac_shr16(WORD16 op1, WORD16 shift) {
  111|    215|  WORD16 var_out;
  112|       |
  113|    215|  var_out = ((WORD16)(op1 >> shift));
  114|    215|  return (var_out);
  115|    215|}
ixheaacd_mps_res_tns.c:ixheaac_round16:
  231|  64.2k|static PLATFORM_INLINE WORD16 ixheaac_round16(WORD32 op1) {
  232|  64.2k|  WORD16 var_out;
  233|       |
  234|  64.2k|  var_out = (WORD16)(ixheaac_add32_sat(op1, 0x8000) >> 16);
  235|  64.2k|  return (var_out);
  236|  64.2k|}
ixheaacd_multichannel.c:ixheaac_round16:
  231|    281|static PLATFORM_INLINE WORD16 ixheaac_round16(WORD32 op1) {
  232|    281|  WORD16 var_out;
  233|       |
  234|    281|  var_out = (WORD16)(ixheaac_add32_sat(op1, 0x8000) >> 16);
  235|    281|  return (var_out);
  236|    281|}
ixheaacd_sbrdec_lpfuncs.c:ixheaac_abs16_sat:
  191|  44.7k|static PLATFORM_INLINE WORD16 ixheaac_abs16_sat(WORD16 op1) {
  192|  44.7k|  WORD16 var_out;
  193|       |
  194|  44.7k|  if (-32768 == op1) {
  ------------------
  |  Branch (194:7): [True: 0, False: 44.7k]
  ------------------
  195|      0|    var_out = MAX_16;
  ------------------
  |  |   63|      0|#define MAX_16 (WORD16)0x7fff
  ------------------
  196|  44.7k|  } else {
  197|  44.7k|    if (op1 < 0) {
  ------------------
  |  Branch (197:9): [True: 28.5k, False: 16.2k]
  ------------------
  198|  28.5k|      var_out = (WORD16)(-op1);
  199|  28.5k|    } else {
  200|  16.2k|      var_out = op1;
  201|  16.2k|    }
  202|  44.7k|  }
  203|  44.7k|  return (var_out);
  204|  44.7k|}
ixheaacd_sbr_dec.c:ixheaac_sub16_sat:
   59|  46.3k|static PLATFORM_INLINE WORD16 ixheaac_sub16_sat(WORD16 op1, WORD16 op2) {
   60|  46.3k|  WORD16 var_out;
   61|  46.3k|  WORD32 diff;
   62|       |
   63|  46.3k|  diff = (WORD32)op1 - op2;
   64|  46.3k|  var_out = ixheaac_sat16(diff);
   65|  46.3k|  return (var_out);
   66|  46.3k|}
ixheaacd_sbr_dec.c:ixheaac_sat16:
   23|  46.3k|static PLATFORM_INLINE WORD16 ixheaac_sat16(WORD32 op1) {
   24|  46.3k|  WORD16 var_out;
   25|       |
   26|  46.3k|  if (op1 > 0X00007fffL) {
  ------------------
  |  Branch (26:7): [True: 0, False: 46.3k]
  ------------------
   27|      0|    var_out = MAX_16;
  ------------------
  |  |   63|      0|#define MAX_16 (WORD16)0x7fff
  ------------------
   28|  46.3k|  } else if (op1 < (WORD32)0xffff8000L) {
  ------------------
  |  Branch (28:14): [True: 0, False: 46.3k]
  ------------------
   29|      0|    var_out = (WORD16)(-32768);
   30|  46.3k|  } else {
   31|  46.3k|    var_out = (WORD16)(op1);
   32|  46.3k|  }
   33|  46.3k|  return (var_out);
   34|  46.3k|}
ixheaacd_qmf_dec_generic.c:ixheaac_round16:
  231|  69.7M|static PLATFORM_INLINE WORD16 ixheaac_round16(WORD32 op1) {
  232|  69.7M|  WORD16 var_out;
  233|       |
  234|  69.7M|  var_out = (WORD16)(ixheaac_add32_sat(op1, 0x8000) >> 16);
  235|  69.7M|  return (var_out);
  236|  69.7M|}
ixheaacd_aac_tns.c:ixheaac_round16:
  231|  5.99M|static PLATFORM_INLINE WORD16 ixheaac_round16(WORD32 op1) {
  232|  5.99M|  WORD16 var_out;
  233|       |
  234|  5.99M|  var_out = (WORD16)(ixheaac_add32_sat(op1, 0x8000) >> 16);
  235|  5.99M|  return (var_out);
  236|  5.99M|}
ixheaacd_basic_funcs.c:ixheaac_sat16:
   23|   544k|static PLATFORM_INLINE WORD16 ixheaac_sat16(WORD32 op1) {
   24|   544k|  WORD16 var_out;
   25|       |
   26|   544k|  if (op1 > 0X00007fffL) {
  ------------------
  |  Branch (26:7): [True: 0, False: 544k]
  ------------------
   27|      0|    var_out = MAX_16;
  ------------------
  |  |   63|      0|#define MAX_16 (WORD16)0x7fff
  ------------------
   28|   544k|  } else if (op1 < (WORD32)0xffff8000L) {
  ------------------
  |  Branch (28:14): [True: 0, False: 544k]
  ------------------
   29|      0|    var_out = (WORD16)(-32768);
   30|   544k|  } else {
   31|   544k|    var_out = (WORD16)(op1);
   32|   544k|  }
   33|   544k|  return (var_out);
   34|   544k|}
ixheaacd_block.c:ixheaac_shl16_sat:
   98|  1.01M|static PLATFORM_INLINE WORD16 ixheaac_shl16_sat(WORD16 op1, WORD16 shift) {
   99|  1.01M|  WORD16 var_out;
  100|  1.01M|  WORD32 temp;
  101|       |
  102|  1.01M|  if (shift > 15) {
  ------------------
  |  Branch (102:7): [True: 0, False: 1.01M]
  ------------------
  103|      0|    shift = 15;
  104|      0|  }
  105|  1.01M|  temp = (WORD32)(op1 << shift);
  106|  1.01M|  var_out = ixheaac_sat16(temp);
  107|  1.01M|  return (var_out);
  108|  1.01M|}
ixheaacd_block.c:ixheaac_sat16:
   23|  1.01M|static PLATFORM_INLINE WORD16 ixheaac_sat16(WORD32 op1) {
   24|  1.01M|  WORD16 var_out;
   25|       |
   26|  1.01M|  if (op1 > 0X00007fffL) {
  ------------------
  |  Branch (26:7): [True: 30.0k, False: 989k]
  ------------------
   27|  30.0k|    var_out = MAX_16;
  ------------------
  |  |   63|  30.0k|#define MAX_16 (WORD16)0x7fff
  ------------------
   28|   989k|  } else if (op1 < (WORD32)0xffff8000L) {
  ------------------
  |  Branch (28:14): [True: 33.8k, False: 955k]
  ------------------
   29|  33.8k|    var_out = (WORD16)(-32768);
   30|   955k|  } else {
   31|   955k|    var_out = (WORD16)(op1);
   32|   955k|  }
   33|  1.01M|  return (var_out);
   34|  1.01M|}
ixheaacd_env_calc.c:ixheaac_mult16_shl:
   75|  4.04M|static PLATFORM_INLINE WORD16 ixheaac_mult16_shl(WORD16 op1, WORD16 op2) {
   76|  4.04M|  WORD16 var_out;
   77|       |
   78|  4.04M|  var_out = ((WORD16)(((WORD32)op1 * (WORD32)op2) >> 15));
   79|  4.04M|  return (var_out);
   80|  4.04M|}
ixheaacd_env_calc.c:ixheaac_sat16:
   23|  3.51M|static PLATFORM_INLINE WORD16 ixheaac_sat16(WORD32 op1) {
   24|  3.51M|  WORD16 var_out;
   25|       |
   26|  3.51M|  if (op1 > 0X00007fffL) {
  ------------------
  |  Branch (26:7): [True: 0, False: 3.51M]
  ------------------
   27|      0|    var_out = MAX_16;
  ------------------
  |  |   63|      0|#define MAX_16 (WORD16)0x7fff
  ------------------
   28|  3.51M|  } else if (op1 < (WORD32)0xffff8000L) {
  ------------------
  |  Branch (28:14): [True: 0, False: 3.51M]
  ------------------
   29|      0|    var_out = (WORD16)(-32768);
   30|  3.51M|  } else {
   31|  3.51M|    var_out = (WORD16)(op1);
   32|  3.51M|  }
   33|  3.51M|  return (var_out);
   34|  3.51M|}
ixheaacd_env_calc.c:ixheaac_sub16:
   52|  15.4M|static PLATFORM_INLINE WORD16 ixheaac_sub16(WORD16 op1, WORD16 op2) {
   53|  15.4M|  WORD16 var_out;
   54|       |
   55|  15.4M|  var_out = ((WORD16)(op1 - op2));
   56|  15.4M|  return (var_out);
   57|  15.4M|}
ixheaacd_env_calc.c:ixheaac_mult16_shl_sat:
   82|  3.51M|static PLATFORM_INLINE WORD16 ixheaac_mult16_shl_sat(WORD16 op1, WORD16 op2) {
   83|  3.51M|  WORD16 var_out;
   84|  3.51M|  WORD32 temp;
   85|       |
   86|  3.51M|  temp = ((WORD32)(((WORD32)op1 * (WORD32)op2) >> 15));
   87|  3.51M|  var_out = ixheaac_sat16(temp);
   88|  3.51M|  return (var_out);
   89|  3.51M|}
ixheaacd_env_dec.c:ixheaac_mult16_shl:
   75|   646k|static PLATFORM_INLINE WORD16 ixheaac_mult16_shl(WORD16 op1, WORD16 op2) {
   76|   646k|  WORD16 var_out;
   77|       |
   78|   646k|  var_out = ((WORD16)(((WORD32)op1 * (WORD32)op2) >> 15));
   79|   646k|  return (var_out);
   80|   646k|}
ixheaacd_env_dec.c:ixheaac_add16:
   36|  88.0k|static PLATFORM_INLINE WORD16 ixheaac_add16(WORD16 op1, WORD16 op2) {
   37|  88.0k|  WORD16 var_out;
   38|       |
   39|  88.0k|  var_out = ((WORD16)(op1 + op2));
   40|  88.0k|  return (var_out);
   41|  88.0k|}
ixheaacd_env_dec.c:ixheaac_shr16:
  110|  9.19k|static PLATFORM_INLINE WORD16 ixheaac_shr16(WORD16 op1, WORD16 shift) {
  111|  9.19k|  WORD16 var_out;
  112|       |
  113|  9.19k|  var_out = ((WORD16)(op1 >> shift));
  114|  9.19k|  return (var_out);
  115|  9.19k|}
ixheaacd_env_dec.c:ixheaac_sub16_sat:
   59|   723k|static PLATFORM_INLINE WORD16 ixheaac_sub16_sat(WORD16 op1, WORD16 op2) {
   60|   723k|  WORD16 var_out;
   61|   723k|  WORD32 diff;
   62|       |
   63|   723k|  diff = (WORD32)op1 - op2;
   64|   723k|  var_out = ixheaac_sat16(diff);
   65|   723k|  return (var_out);
   66|   723k|}
ixheaacd_env_dec.c:ixheaac_sat16:
   23|   723k|static PLATFORM_INLINE WORD16 ixheaac_sat16(WORD32 op1) {
   24|   723k|  WORD16 var_out;
   25|       |
   26|   723k|  if (op1 > 0X00007fffL) {
  ------------------
  |  Branch (26:7): [True: 0, False: 723k]
  ------------------
   27|      0|    var_out = MAX_16;
  ------------------
  |  |   63|      0|#define MAX_16 (WORD16)0x7fff
  ------------------
   28|   723k|  } else if (op1 < (WORD32)0xffff8000L) {
  ------------------
  |  Branch (28:14): [True: 0, False: 723k]
  ------------------
   29|      0|    var_out = (WORD16)(-32768);
   30|   723k|  } else {
   31|   723k|    var_out = (WORD16)(op1);
   32|   723k|  }
   33|   723k|  return (var_out);
   34|   723k|}
ixheaacd_env_dec.c:ixheaac_mult16:
   68|  7.36M|static PLATFORM_INLINE WORD16 ixheaac_mult16(WORD16 op1, WORD16 op2) {
   69|  7.36M|  WORD16 var_out;
   70|       |
   71|  7.36M|  var_out = ((WORD16)(((WORD32)op1 * (WORD32)op2) >> 16));
   72|  7.36M|  return (var_out);
   73|  7.36M|}
ixheaacd_env_extr.c:ixheaac_add16:
   36|   405k|static PLATFORM_INLINE WORD16 ixheaac_add16(WORD16 op1, WORD16 op2) {
   37|   405k|  WORD16 var_out;
   38|       |
   39|   405k|  var_out = ((WORD16)(op1 + op2));
   40|   405k|  return (var_out);
   41|   405k|}
ixheaacd_freq_sca.c:ixheaac_shr16:
  110|  43.2k|static PLATFORM_INLINE WORD16 ixheaac_shr16(WORD16 op1, WORD16 shift) {
  111|  43.2k|  WORD16 var_out;
  112|       |
  113|  43.2k|  var_out = ((WORD16)(op1 >> shift));
  114|  43.2k|  return (var_out);
  115|  43.2k|}
ixheaacd_lpfuncs.c:ixheaac_negate16:
  206|  11.1M|static PLATFORM_INLINE WORD16 ixheaac_negate16(WORD16 op1) {
  207|  11.1M|  WORD16 var_out;
  208|       |
  209|  11.1M|  if (-32768 == op1) {
  ------------------
  |  Branch (209:7): [True: 0, False: 11.1M]
  ------------------
  210|      0|    var_out = MAX_16;
  ------------------
  |  |   63|      0|#define MAX_16 (WORD16)0x7fff
  ------------------
  211|  11.1M|  } else {
  212|  11.1M|    var_out = (WORD16)(-op1);
  213|  11.1M|  }
  214|  11.1M|  return (var_out);
  215|  11.1M|}
ixheaacd_lpfuncs.c:ixheaac_round16:
  231|  15.5M|static PLATFORM_INLINE WORD16 ixheaac_round16(WORD32 op1) {
  232|  15.5M|  WORD16 var_out;
  233|       |
  234|  15.5M|  var_out = (WORD16)(ixheaac_add32_sat(op1, 0x8000) >> 16);
  235|  15.5M|  return (var_out);
  236|  15.5M|}
ixheaacd_lpp_tran.c:ixheaac_shl16:
   91|   469k|static PLATFORM_INLINE WORD16 ixheaac_shl16(WORD16 op1, WORD16 shift) {
   92|   469k|  WORD16 var_out;
   93|       |
   94|   469k|  var_out = (WORD16)(op1 << shift);
   95|   469k|  return (var_out);
   96|   469k|}
ixheaacd_lpp_tran.c:ixheaac_sat16:
   23|  4.57M|static PLATFORM_INLINE WORD16 ixheaac_sat16(WORD32 op1) {
   24|  4.57M|  WORD16 var_out;
   25|       |
   26|  4.57M|  if (op1 > 0X00007fffL) {
  ------------------
  |  Branch (26:7): [True: 0, False: 4.57M]
  ------------------
   27|      0|    var_out = MAX_16;
  ------------------
  |  |   63|      0|#define MAX_16 (WORD16)0x7fff
  ------------------
   28|  4.57M|  } else if (op1 < (WORD32)0xffff8000L) {
  ------------------
  |  Branch (28:14): [True: 0, False: 4.57M]
  ------------------
   29|      0|    var_out = (WORD16)(-32768);
   30|  4.57M|  } else {
   31|  4.57M|    var_out = (WORD16)(op1);
   32|  4.57M|  }
   33|  4.57M|  return (var_out);
   34|  4.57M|}
ixheaacd_lpp_tran.c:ixheaac_mult16_shl_sat:
   82|  4.57M|static PLATFORM_INLINE WORD16 ixheaac_mult16_shl_sat(WORD16 op1, WORD16 op2) {
   83|  4.57M|  WORD16 var_out;
   84|  4.57M|  WORD32 temp;
   85|       |
   86|  4.57M|  temp = ((WORD32)(((WORD32)op1 * (WORD32)op2) >> 15));
   87|  4.57M|  var_out = ixheaac_sat16(temp);
   88|  4.57M|  return (var_out);
   89|  4.57M|}
ixheaacd_lpp_tran.c:ixheaac_add16:
   36|  46.3k|static PLATFORM_INLINE WORD16 ixheaac_add16(WORD16 op1, WORD16 op2) {
   37|  46.3k|  WORD16 var_out;
   38|       |
   39|  46.3k|  var_out = ((WORD16)(op1 + op2));
   40|  46.3k|  return (var_out);
   41|  46.3k|}
ixheaacd_mps_calc_m1m2_tree_515x.c:ixheaac_mult16_shl:
   75|  40.9k|static PLATFORM_INLINE WORD16 ixheaac_mult16_shl(WORD16 op1, WORD16 op2) {
   76|  40.9k|  WORD16 var_out;
   77|       |
   78|  40.9k|  var_out = ((WORD16)(((WORD32)op1 * (WORD32)op2) >> 15));
   79|  40.9k|  return (var_out);
   80|  40.9k|}
ixheaacd_ps_bitdec.c:ixheaac_mult16_shl:
   75|  6.30k|static PLATFORM_INLINE WORD16 ixheaac_mult16_shl(WORD16 op1, WORD16 op2) {
   76|  6.30k|  WORD16 var_out;
   77|       |
   78|  6.30k|  var_out = ((WORD16)(((WORD32)op1 * (WORD32)op2) >> 15));
   79|  6.30k|  return (var_out);
   80|  6.30k|}
ixheaacd_ps_bitdec.c:ixheaac_add16:
   36|  3.47k|static PLATFORM_INLINE WORD16 ixheaac_add16(WORD16 op1, WORD16 op2) {
   37|  3.47k|  WORD16 var_out;
   38|       |
   39|  3.47k|  var_out = ((WORD16)(op1 + op2));
   40|  3.47k|  return (var_out);
   41|  3.47k|}
ixheaacd_ps_bitdec.c:ixheaac_negate16:
  206|  2.28k|static PLATFORM_INLINE WORD16 ixheaac_negate16(WORD16 op1) {
  207|  2.28k|  WORD16 var_out;
  208|       |
  209|  2.28k|  if (-32768 == op1) {
  ------------------
  |  Branch (209:7): [True: 0, False: 2.28k]
  ------------------
  210|      0|    var_out = MAX_16;
  ------------------
  |  |   63|      0|#define MAX_16 (WORD16)0x7fff
  ------------------
  211|  2.28k|  } else {
  212|  2.28k|    var_out = (WORD16)(-op1);
  213|  2.28k|  }
  214|  2.28k|  return (var_out);
  215|  2.28k|}

ixheaacd_api.c:ixheaac_add32_sat:
  197|   237M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|   237M|  WORD64 sum;
  199|       |
  200|   237M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|   237M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   237M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  8.07M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 8.07M, False: 228M]
  ------------------
  203|   228M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   228M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|      0|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 0, False: 228M]
  ------------------
  204|       |
  205|   228M|  return (WORD32)sum;
  206|   228M|}
ixheaacd_api.c:ixheaac_shl32_sat:
   67|  52.1M|static PLATFORM_INLINE WORD32 ixheaac_shl32_sat(WORD32 a, WORD b) {
   68|  52.1M|  WORD32 out_val;
   69|  52.1M|  if (a > (MAX_32 >> b))
  ------------------
  |  |   60|  52.1M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (69:7): [True: 157k, False: 52.0M]
  ------------------
   70|   157k|    out_val = MAX_32;
  ------------------
  |  |   60|   157k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
   71|  52.0M|  else if (a < (MIN_32 >> b))
  ------------------
  |  |   61|  52.0M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (71:12): [True: 203k, False: 51.8M]
  ------------------
   72|   203k|    out_val = MIN_32;
  ------------------
  |  |   61|   203k|#define MIN_32 (WORD32)0x80000000L
  ------------------
   73|  51.8M|  else
   74|  51.8M|    out_val = a << b;
   75|  52.1M|  return (out_val);
   76|  52.1M|}
ixheaacd_huff_code_reorder.c:ixheaac_norm32:
  236|   362k|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|   362k|  WORD norm_val;
  238|       |
  239|   362k|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 0, False: 362k]
  ------------------
  240|      0|    norm_val = 31;
  241|   362k|  } else {
  242|   362k|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 20.5k, False: 342k]
  ------------------
  243|  20.5k|      norm_val = 31;
  244|   342k|    } else {
  245|   342k|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 342k, False: 0]
  ------------------
  246|   342k|        a = ~a;
  247|   342k|      }
  248|  8.11M|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 7.77M, False: 342k]
  ------------------
  249|  7.77M|        a <<= 1;
  250|  7.77M|      }
  251|   342k|    }
  252|   362k|  }
  253|       |
  254|   362k|  return norm_val;
  255|   362k|}
ixheaacd_huff_code_reorder.c:ixheaac_abs32:
  271|  15.3M|static PLATFORM_INLINE WORD32 ixheaac_abs32(WORD32 a) {
  272|  15.3M|  WORD32 abs_val;
  273|       |
  274|  15.3M|  abs_val = a;
  275|       |
  276|  15.3M|  if (a < 0) {
  ------------------
  |  Branch (276:7): [True: 5.49M, False: 9.84M]
  ------------------
  277|  5.49M|    abs_val = -a;
  278|  5.49M|  }
  279|       |
  280|  15.3M|  return abs_val;
  281|  15.3M|}
ixheaacd_latmdemux.c:ixheaac_add32_sat:
  197|     49|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|     49|  WORD64 sum;
  199|       |
  200|     49|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|     49|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|     49|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|     38|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 38, False: 11]
  ------------------
  203|     11|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|     11|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|      0|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 0, False: 11]
  ------------------
  204|       |
  205|     11|  return (WORD32)sum;
  206|     11|}
ixheaacd_latmdemux.c:ixheaac_shl32_sat:
   67|     49|static PLATFORM_INLINE WORD32 ixheaac_shl32_sat(WORD32 a, WORD b) {
   68|     49|  WORD32 out_val;
   69|     49|  if (a > (MAX_32 >> b))
  ------------------
  |  |   60|     49|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (69:7): [True: 38, False: 11]
  ------------------
   70|     38|    out_val = MAX_32;
  ------------------
  |  |   60|     38|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
   71|     11|  else if (a < (MIN_32 >> b))
  ------------------
  |  |   61|     11|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (71:12): [True: 0, False: 11]
  ------------------
   72|      0|    out_val = MIN_32;
  ------------------
  |  |   61|      0|#define MIN_32 (WORD32)0x80000000L
  ------------------
   73|     11|  else
   74|     11|    out_val = a << b;
   75|     49|  return (out_val);
   76|     49|}
ixheaacd_lt_predict.c:ixheaac_shr32:
   51|  82.7M|static PLATFORM_INLINE WORD32 ixheaac_shr32(WORD32 a, WORD b) {
   52|  82.7M|  WORD32 out_val;
   53|       |
   54|  82.7M|  b = ((UWORD32)(b << 24) >> 24);
   55|  82.7M|  if (b >= 31) {
  ------------------
  |  Branch (55:7): [True: 0, False: 82.7M]
  ------------------
   56|      0|    if (a < 0)
  ------------------
  |  Branch (56:9): [True: 0, False: 0]
  ------------------
   57|      0|      out_val = -1;
   58|      0|    else
   59|      0|      out_val = 0;
   60|  82.7M|  } else {
   61|  82.7M|    out_val = (WORD32)a >> b;
   62|  82.7M|  }
   63|       |
   64|  82.7M|  return out_val;
   65|  82.7M|}
ixheaacd_lt_predict.c:ixheaac_add32_sat:
  197|  80.3M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|  80.3M|  WORD64 sum;
  199|       |
  200|  80.3M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|  80.3M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  80.3M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   658k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 658k, False: 79.7M]
  ------------------
  203|  79.7M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  79.7M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  4.02k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 4.02k, False: 79.6M]
  ------------------
  204|       |
  205|  79.6M|  return (WORD32)sum;
  206|  79.7M|}
ixheaacd_lt_predict.c:ixheaac_sub32:
  189|  12.7M|static PLATFORM_INLINE WORD32 ixheaac_sub32(WORD32 a, WORD32 b) {
  190|  12.7M|  WORD32 diff;
  191|       |
  192|  12.7M|  diff = (WORD32)a - (WORD32)b;
  193|       |
  194|  12.7M|  return diff;
  195|  12.7M|}
ixheaacd_lt_predict.c:ixheaac_add32:
  181|  12.7M|static PLATFORM_INLINE WORD32 ixheaac_add32(WORD32 a, WORD32 b) {
  182|  12.7M|  WORD32 sum;
  183|       |
  184|  12.7M|  sum = (WORD32)a + (WORD32)b;
  185|       |
  186|  12.7M|  return sum;
  187|  12.7M|}
ixheaacd_lt_predict.c:ixheaac_shl32:
   39|  63.3M|static PLATFORM_INLINE WORD32 ixheaac_shl32(WORD32 a, WORD b) {
   40|  63.3M|  WORD32 out_val;
   41|       |
   42|  63.3M|  b = ((UWORD32)(b << 24) >> 24);
   43|  63.3M|  if (b > 31)
  ------------------
  |  Branch (43:7): [True: 0, False: 63.3M]
  ------------------
   44|      0|    out_val = 0;
   45|  63.3M|  else
   46|  63.3M|    out_val = (WORD32)a << b;
   47|       |
   48|  63.3M|  return out_val;
   49|  63.3M|}
ixheaacd_lt_predict.c:ixheaac_shl32_dir:
   78|  12.5M|static PLATFORM_INLINE WORD32 ixheaac_shl32_dir(WORD32 a, WORD b) {
   79|  12.5M|  WORD32 out_val;
   80|       |
   81|  12.5M|  if (b < 0) {
  ------------------
  |  Branch (81:7): [True: 2.94M, False: 9.60M]
  ------------------
   82|  2.94M|    out_val = ixheaac_shr32(a, -b);
   83|  9.60M|  } else {
   84|  9.60M|    out_val = ixheaac_shl32(a, b);
   85|  9.60M|  }
   86|       |
   87|  12.5M|  return out_val;
   88|  12.5M|}
ixheaacd_lt_predict.c:ixheaac_shl32_sat:
   67|  54.3M|static PLATFORM_INLINE WORD32 ixheaac_shl32_sat(WORD32 a, WORD b) {
   68|  54.3M|  WORD32 out_val;
   69|  54.3M|  if (a > (MAX_32 >> b))
  ------------------
  |  |   60|  54.3M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (69:7): [True: 654k, False: 53.6M]
  ------------------
   70|   654k|    out_val = MAX_32;
  ------------------
  |  |   60|   654k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
   71|  53.6M|  else if (a < (MIN_32 >> b))
  ------------------
  |  |   61|  53.6M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (71:12): [True: 1.10M, False: 52.5M]
  ------------------
   72|  1.10M|    out_val = MIN_32;
  ------------------
  |  |   61|  1.10M|#define MIN_32 (WORD32)0x80000000L
  ------------------
   73|  52.5M|  else
   74|  52.5M|    out_val = a << b;
   75|  54.3M|  return (out_val);
   76|  54.3M|}
ixheaacd_lt_predict.c:ixheaac_mult16x16in32_shl:
  162|  48.9M|static PLATFORM_INLINE WORD32 ixheaac_mult16x16in32_shl(WORD16 a, WORD16 b) {
  163|  48.9M|  WORD32 product;
  164|       |
  165|  48.9M|  product = ixheaac_shl32(ixheaac_mult16x16in32(a, b), 1);
  166|       |
  167|  48.9M|  return product;
  168|  48.9M|}
ixheaacd_lt_predict.c:ixheaac_mult16x16in32:
  126|  48.9M|static PLATFORM_INLINE WORD32 ixheaac_mult16x16in32(WORD16 a, WORD16 b) {
  127|  48.9M|  WORD32 product;
  128|       |
  129|  48.9M|  product = (WORD32)a * (WORD32)b;
  130|       |
  131|  48.9M|  return product;
  132|  48.9M|}
ixheaacd_mps_bitdec.c:ixheaac_negate32_sat:
  317|  67.0k|static PLATFORM_INLINE WORD32 ixheaac_negate32_sat(WORD32 a) {
  318|  67.0k|  WORD32 neg_val;
  319|       |
  320|  67.0k|  if (a == MIN_32) {
  ------------------
  |  |   61|  67.0k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (320:7): [True: 62, False: 67.0k]
  ------------------
  321|     62|    neg_val = MAX_32;
  ------------------
  |  |   60|     62|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  322|  67.0k|  } else {
  323|  67.0k|    neg_val = -a;
  324|  67.0k|  }
  325|  67.0k|  return neg_val;
  326|  67.0k|}
ixheaacd_mps_bitdec.c:ixheaac_sub32_sat:
  225|  12.4k|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|  12.4k|  WORD64 diff;
  227|       |
  228|  12.4k|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|  12.4k|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  12.4k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|      0|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (230:7): [True: 0, False: 12.4k]
  ------------------
  231|  12.4k|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  12.4k|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|      0|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (231:7): [True: 0, False: 12.4k]
  ------------------
  232|       |
  233|  12.4k|  return (WORD32)diff;
  234|  12.4k|}
ixheaacd_mps_bitdec.c:ixheaac_shr32:
   51|  67.4k|static PLATFORM_INLINE WORD32 ixheaac_shr32(WORD32 a, WORD b) {
   52|  67.4k|  WORD32 out_val;
   53|       |
   54|  67.4k|  b = ((UWORD32)(b << 24) >> 24);
   55|  67.4k|  if (b >= 31) {
  ------------------
  |  Branch (55:7): [True: 0, False: 67.4k]
  ------------------
   56|      0|    if (a < 0)
  ------------------
  |  Branch (56:9): [True: 0, False: 0]
  ------------------
   57|      0|      out_val = -1;
   58|      0|    else
   59|      0|      out_val = 0;
   60|  67.4k|  } else {
   61|  67.4k|    out_val = (WORD32)a >> b;
   62|  67.4k|  }
   63|       |
   64|  67.4k|  return out_val;
   65|  67.4k|}
ixheaacd_mps_bitdec.c:ixheaac_add32:
  181|  67.4k|static PLATFORM_INLINE WORD32 ixheaac_add32(WORD32 a, WORD32 b) {
  182|  67.4k|  WORD32 sum;
  183|       |
  184|  67.4k|  sum = (WORD32)a + (WORD32)b;
  185|       |
  186|  67.4k|  return sum;
  187|  67.4k|}
ixheaacd_mps_bitdec.c:ixheaac_add32_sat:
  197|   147k|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|   147k|  WORD64 sum;
  199|       |
  200|   147k|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|   147k|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   147k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|     88|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 88, False: 147k]
  ------------------
  203|   147k|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   147k|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|    124|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 124, False: 147k]
  ------------------
  204|       |
  205|   147k|  return (WORD32)sum;
  206|   147k|}
ixheaacd_mps_decorr.c:ixheaac_norm32:
  236|  76.4M|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|  76.4M|  WORD norm_val;
  238|       |
  239|  76.4M|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 11.3M, False: 65.1M]
  ------------------
  240|  11.3M|    norm_val = 31;
  241|  65.1M|  } else {
  242|  65.1M|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 0, False: 65.1M]
  ------------------
  243|      0|      norm_val = 31;
  244|  65.1M|    } else {
  245|  65.1M|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 0, False: 65.1M]
  ------------------
  246|      0|        a = ~a;
  247|      0|      }
  248|   352M|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 287M, False: 65.1M]
  ------------------
  249|   287M|        a <<= 1;
  250|   287M|      }
  251|  65.1M|    }
  252|  65.1M|  }
  253|       |
  254|  76.4M|  return norm_val;
  255|  76.4M|}
ixheaacd_mps_decorr.c:ixheaac_shr32:
   51|  9.48M|static PLATFORM_INLINE WORD32 ixheaac_shr32(WORD32 a, WORD b) {
   52|  9.48M|  WORD32 out_val;
   53|       |
   54|  9.48M|  b = ((UWORD32)(b << 24) >> 24);
   55|  9.48M|  if (b >= 31) {
  ------------------
  |  Branch (55:7): [True: 0, False: 9.48M]
  ------------------
   56|      0|    if (a < 0)
  ------------------
  |  Branch (56:9): [True: 0, False: 0]
  ------------------
   57|      0|      out_val = -1;
   58|      0|    else
   59|      0|      out_val = 0;
   60|  9.48M|  } else {
   61|  9.48M|    out_val = (WORD32)a >> b;
   62|  9.48M|  }
   63|       |
   64|  9.48M|  return out_val;
   65|  9.48M|}
ixheaacd_mps_decorr.c:ixheaac_shl32:
   39|  9.48M|static PLATFORM_INLINE WORD32 ixheaac_shl32(WORD32 a, WORD b) {
   40|  9.48M|  WORD32 out_val;
   41|       |
   42|  9.48M|  b = ((UWORD32)(b << 24) >> 24);
   43|  9.48M|  if (b > 31)
  ------------------
  |  Branch (43:7): [True: 0, False: 9.48M]
  ------------------
   44|      0|    out_val = 0;
   45|  9.48M|  else
   46|  9.48M|    out_val = (WORD32)a << b;
   47|       |
   48|  9.48M|  return out_val;
   49|  9.48M|}
ixheaacd_mps_decorr.c:ixheaac_add32_sat:
  197|   993M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|   993M|  WORD64 sum;
  199|       |
  200|   993M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|   993M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   993M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  25.5M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 25.5M, False: 968M]
  ------------------
  203|   968M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   968M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  25.5M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 25.5M, False: 942M]
  ------------------
  204|       |
  205|   942M|  return (WORD32)sum;
  206|   968M|}
ixheaacd_mps_hybrid_filt.c:ixheaac_shl32:
   39|  48.9M|static PLATFORM_INLINE WORD32 ixheaac_shl32(WORD32 a, WORD b) {
   40|  48.9M|  WORD32 out_val;
   41|       |
   42|  48.9M|  b = ((UWORD32)(b << 24) >> 24);
   43|  48.9M|  if (b > 31)
  ------------------
  |  Branch (43:7): [True: 0, False: 48.9M]
  ------------------
   44|      0|    out_val = 0;
   45|  48.9M|  else
   46|  48.9M|    out_val = (WORD32)a << b;
   47|       |
   48|  48.9M|  return out_val;
   49|  48.9M|}
ixheaacd_mps_hybrid_filt.c:ixheaac_sub32_sat:
  225|  45.1M|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|  45.1M|  WORD64 diff;
  227|       |
  228|  45.1M|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|  45.1M|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  45.1M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  1.83k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (230:7): [True: 1.83k, False: 45.1M]
  ------------------
  231|  45.1M|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  45.1M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  2.01k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (231:7): [True: 2.01k, False: 45.1M]
  ------------------
  232|       |
  233|  45.1M|  return (WORD32)diff;
  234|  45.1M|}
ixheaacd_mps_hybrid_filt.c:ixheaac_add32_sat:
  197|  52.6M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|  52.6M|  WORD64 sum;
  199|       |
  200|  52.6M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|  52.6M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  52.6M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  2.34k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 2.34k, False: 52.6M]
  ------------------
  203|  52.6M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  52.6M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  2.06k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 2.06k, False: 52.6M]
  ------------------
  204|       |
  205|  52.6M|  return (WORD32)sum;
  206|  52.6M|}
ixheaacd_mps_mdct_2_qmf.c:ixheaac_add32_sat:
  197|  81.4M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|  81.4M|  WORD64 sum;
  199|       |
  200|  81.4M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|  81.4M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  81.4M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  82.5k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 82.5k, False: 81.3M]
  ------------------
  203|  81.3M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  81.3M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  87.8k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 87.8k, False: 81.2M]
  ------------------
  204|       |
  205|  81.2M|  return (WORD32)sum;
  206|  81.3M|}
ixheaacd_mps_mdct_2_qmf.c:ixheaac_sub32_sat:
  225|  1.11M|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|  1.11M|  WORD64 diff;
  227|       |
  228|  1.11M|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|  1.11M|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  1.11M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|    687|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (230:7): [True: 687, False: 1.11M]
  ------------------
  231|  1.11M|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  1.11M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|    863|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (231:7): [True: 863, False: 1.11M]
  ------------------
  232|       |
  233|  1.11M|  return (WORD32)diff;
  234|  1.11M|}
ixheaacd_mps_polyphase.c:ixheaac_sub32_sat:
  225|  2.76G|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|  2.76G|  WORD64 diff;
  227|       |
  228|  2.76G|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|  2.76G|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  2.76G|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   133M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (230:7): [True: 133M, False: 2.63G]
  ------------------
  231|  2.63G|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  2.63G|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   129M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (231:7): [True: 129M, False: 2.50G]
  ------------------
  232|       |
  233|  2.50G|  return (WORD32)diff;
  234|  2.63G|}
ixheaacd_mps_polyphase.c:ixheaac_negate32_sat:
  317|   156M|static PLATFORM_INLINE WORD32 ixheaac_negate32_sat(WORD32 a) {
  318|   156M|  WORD32 neg_val;
  319|       |
  320|   156M|  if (a == MIN_32) {
  ------------------
  |  |   61|   156M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (320:7): [True: 1.34M, False: 155M]
  ------------------
  321|  1.34M|    neg_val = MAX_32;
  ------------------
  |  |   60|  1.34M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  322|   155M|  } else {
  323|   155M|    neg_val = -a;
  324|   155M|  }
  325|   156M|  return neg_val;
  326|   156M|}
ixheaacd_mps_polyphase.c:ixheaac_shl32:
   39|  74.2M|static PLATFORM_INLINE WORD32 ixheaac_shl32(WORD32 a, WORD b) {
   40|  74.2M|  WORD32 out_val;
   41|       |
   42|  74.2M|  b = ((UWORD32)(b << 24) >> 24);
   43|  74.2M|  if (b > 31)
  ------------------
  |  Branch (43:7): [True: 0, False: 74.2M]
  ------------------
   44|      0|    out_val = 0;
   45|  74.2M|  else
   46|  74.2M|    out_val = (WORD32)a << b;
   47|       |
   48|  74.2M|  return out_val;
   49|  74.2M|}
ixheaacd_mps_polyphase.c:ixheaac_add32_sat:
  197|  3.96G|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|  3.96G|  WORD64 sum;
  199|       |
  200|  3.96G|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|  3.96G|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  3.96G|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   154M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 154M, False: 3.81G]
  ------------------
  203|  3.81G|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  3.81G|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   156M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 156M, False: 3.65G]
  ------------------
  204|       |
  205|  3.65G|  return (WORD32)sum;
  206|  3.81G|}
ixheaacd_mps_reshape_bb_env.c:ixheaac_add32_sat:
  197|  45.8M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|  45.8M|  WORD64 sum;
  199|       |
  200|  45.8M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|  45.8M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  45.8M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  7.48k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 7.48k, False: 45.8M]
  ------------------
  203|  45.8M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  45.8M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  5.50k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 5.50k, False: 45.8M]
  ------------------
  204|       |
  205|  45.8M|  return (WORD32)sum;
  206|  45.8M|}
ixheaacd_mps_reshape_bb_env.c:ixheaac_norm32:
  236|  27.4M|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|  27.4M|  WORD norm_val;
  238|       |
  239|  27.4M|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 3.43M, False: 24.0M]
  ------------------
  240|  3.43M|    norm_val = 31;
  241|  24.0M|  } else {
  242|  24.0M|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 6, False: 24.0M]
  ------------------
  243|      6|      norm_val = 31;
  244|  24.0M|    } else {
  245|  24.0M|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 287k, False: 23.7M]
  ------------------
  246|   287k|        a = ~a;
  247|   287k|      }
  248|  98.0M|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 74.0M, False: 24.0M]
  ------------------
  249|  74.0M|        a <<= 1;
  250|  74.0M|      }
  251|  24.0M|    }
  252|  24.0M|  }
  253|       |
  254|  27.4M|  return norm_val;
  255|  27.4M|}
ixheaacd_mps_reshape_bb_env.c:ixheaac_shr32:
   51|   357k|static PLATFORM_INLINE WORD32 ixheaac_shr32(WORD32 a, WORD b) {
   52|   357k|  WORD32 out_val;
   53|       |
   54|   357k|  b = ((UWORD32)(b << 24) >> 24);
   55|   357k|  if (b >= 31) {
  ------------------
  |  Branch (55:7): [True: 0, False: 357k]
  ------------------
   56|      0|    if (a < 0)
  ------------------
  |  Branch (56:9): [True: 0, False: 0]
  ------------------
   57|      0|      out_val = -1;
   58|      0|    else
   59|      0|      out_val = 0;
   60|   357k|  } else {
   61|   357k|    out_val = (WORD32)a >> b;
   62|   357k|  }
   63|       |
   64|   357k|  return out_val;
   65|   357k|}
ixheaacd_mps_reshape_bb_env.c:ixheaac_shl32:
   39|   357k|static PLATFORM_INLINE WORD32 ixheaac_shl32(WORD32 a, WORD b) {
   40|   357k|  WORD32 out_val;
   41|       |
   42|   357k|  b = ((UWORD32)(b << 24) >> 24);
   43|   357k|  if (b > 31)
  ------------------
  |  Branch (43:7): [True: 0, False: 357k]
  ------------------
   44|      0|    out_val = 0;
   45|   357k|  else
   46|   357k|    out_val = (WORD32)a << b;
   47|       |
   48|   357k|  return out_val;
   49|   357k|}
ixheaacd_mps_res_pns_js_thumb.c:ixheaac_min32:
   23|  1.84k|static PLATFORM_INLINE WORD32 ixheaac_min32(WORD32 a, WORD32 b) {
   24|  1.84k|  WORD32 min_val;
   25|       |
   26|  1.84k|  min_val = (a < b) ? a : b;
  ------------------
  |  Branch (26:13): [True: 1.06k, False: 789]
  ------------------
   27|       |
   28|  1.84k|  return min_val;
   29|  1.84k|}
ixheaacd_mps_res_tns.c:ixheaac_add32_sat:
  197|   120k|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|   120k|  WORD64 sum;
  199|       |
  200|   120k|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|   120k|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   120k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  7.85k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 7.85k, False: 112k]
  ------------------
  203|   112k|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   112k|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  1.05k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 1.05k, False: 111k]
  ------------------
  204|       |
  205|   111k|  return (WORD32)sum;
  206|   112k|}
ixheaacd_mps_res_tns.c:ixheaac_mac16x16in32_shl_sat:
  416|  55.7k|static PLATFORM_INLINE WORD32 ixheaac_mac16x16in32_shl_sat(WORD32 a, WORD16 b, WORD16 c) {
  417|  55.7k|  WORD32 acc;
  418|       |
  419|  55.7k|  acc = ixheaac_mult16x16in32_shl_sat(b, c);
  420|       |
  421|  55.7k|  acc = ixheaac_add32_sat(a, acc);
  422|       |
  423|  55.7k|  return acc;
  424|  55.7k|}
ixheaacd_mps_res_tns.c:ixheaac_mult16x16in32_shl_sat:
  170|  55.7k|static PLATFORM_INLINE WORD32 ixheaac_mult16x16in32_shl_sat(WORD16 a, WORD16 b) {
  171|  55.7k|  WORD32 product;
  172|  55.7k|  product = (WORD32)a * (WORD32)b;
  173|  55.7k|  if (product != (WORD32)0x40000000L) {
  ------------------
  |  Branch (173:7): [True: 55.7k, False: 0]
  ------------------
  174|  55.7k|    product = ixheaac_shl32(product, 1);
  175|  55.7k|  } else {
  176|      0|    product = MAX_32;
  ------------------
  |  |   60|      0|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  177|      0|  }
  178|  55.7k|  return product;
  179|  55.7k|}
ixheaacd_mps_res_tns.c:ixheaac_shl32:
   39|  55.7k|static PLATFORM_INLINE WORD32 ixheaac_shl32(WORD32 a, WORD b) {
   40|  55.7k|  WORD32 out_val;
   41|       |
   42|  55.7k|  b = ((UWORD32)(b << 24) >> 24);
   43|  55.7k|  if (b > 31)
  ------------------
  |  Branch (43:7): [True: 0, False: 55.7k]
  ------------------
   44|      0|    out_val = 0;
   45|  55.7k|  else
   46|  55.7k|    out_val = (WORD32)a << b;
   47|       |
   48|  55.7k|  return out_val;
   49|  55.7k|}
ixheaacd_mps_res_tns.c:ixheaac_abs32_sat:
  295|  55.7k|static PLATFORM_INLINE WORD32 ixheaac_abs32_sat(WORD32 a) {
  296|  55.7k|  WORD32 abs_val;
  297|       |
  298|  55.7k|  abs_val = a;
  299|       |
  300|  55.7k|  if (a == MIN_32) {
  ------------------
  |  |   61|  55.7k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (300:7): [True: 1.05k, False: 54.7k]
  ------------------
  301|  1.05k|    abs_val = MAX_32;
  ------------------
  |  |   60|  1.05k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  302|  54.7k|  } else if (a < 0) {
  ------------------
  |  Branch (302:14): [True: 10.9k, False: 43.8k]
  ------------------
  303|  10.9k|    abs_val = -a;
  304|  10.9k|  }
  305|       |
  306|  55.7k|  return abs_val;
  307|  55.7k|}
ixheaacd_mps_res_tns.c:ixheaac_sub32_sat:
  225|   163k|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|   163k|  WORD64 diff;
  227|       |
  228|   163k|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|   163k|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   163k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  6.40k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (230:7): [True: 6.40k, False: 156k]
  ------------------
  231|   156k|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   156k|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  6.08k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (231:7): [True: 6.08k, False: 150k]
  ------------------
  232|       |
  233|   150k|  return (WORD32)diff;
  234|   156k|}
ixheaacd_mps_res_tns.c:ixheaac_shl32_sat:
   67|  24.0k|static PLATFORM_INLINE WORD32 ixheaac_shl32_sat(WORD32 a, WORD b) {
   68|  24.0k|  WORD32 out_val;
   69|  24.0k|  if (a > (MAX_32 >> b))
  ------------------
  |  |   60|  24.0k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (69:7): [True: 2.10k, False: 21.9k]
  ------------------
   70|  2.10k|    out_val = MAX_32;
  ------------------
  |  |   60|  2.10k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
   71|  21.9k|  else if (a < (MIN_32 >> b))
  ------------------
  |  |   61|  21.9k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (71:12): [True: 2.29k, False: 19.6k]
  ------------------
   72|  2.29k|    out_val = MIN_32;
  ------------------
  |  |   61|  2.29k|#define MIN_32 (WORD32)0x80000000L
  ------------------
   73|  19.6k|  else
   74|  19.6k|    out_val = a << b;
   75|  24.0k|  return (out_val);
   76|  24.0k|}
ixheaacd_mps_res_tns.c:ixheaac_abs32_nrm:
  283|  24.0k|static PLATFORM_INLINE WORD32 ixheaac_abs32_nrm(WORD32 a) {
  284|  24.0k|  WORD32 abs_val;
  285|       |
  286|  24.0k|  abs_val = a;
  287|       |
  288|  24.0k|  if (a < 0) {
  ------------------
  |  Branch (288:7): [True: 4.21k, False: 19.8k]
  ------------------
  289|  4.21k|    abs_val = ~a;
  290|  4.21k|  }
  291|       |
  292|  24.0k|  return abs_val;
  293|  24.0k|}
ixheaacd_mps_res_tns.c:ixheaac_norm32:
  236|    297|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|    297|  WORD norm_val;
  238|       |
  239|    297|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 72, False: 225]
  ------------------
  240|     72|    norm_val = 31;
  241|    225|  } else {
  242|    225|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 0, False: 225]
  ------------------
  243|      0|      norm_val = 31;
  244|    225|    } else {
  245|    225|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 0, False: 225]
  ------------------
  246|      0|        a = ~a;
  247|      0|      }
  248|  1.09k|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 868, False: 225]
  ------------------
  249|    868|        a <<= 1;
  250|    868|      }
  251|    225|    }
  252|    225|  }
  253|       |
  254|    297|  return norm_val;
  255|    297|}
ixheaacd_mps_smoothing.c:ixheaac_abs32:
  271|  72.7k|static PLATFORM_INLINE WORD32 ixheaac_abs32(WORD32 a) {
  272|  72.7k|  WORD32 abs_val;
  273|       |
  274|  72.7k|  abs_val = a;
  275|       |
  276|  72.7k|  if (a < 0) {
  ------------------
  |  Branch (276:7): [True: 5.39k, False: 67.3k]
  ------------------
  277|  5.39k|    abs_val = -a;
  278|  5.39k|  }
  279|       |
  280|  72.7k|  return abs_val;
  281|  72.7k|}
ixheaacd_mps_temp_process.c:ixheaac_add32_sat:
  197|   381M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|   381M|  WORD64 sum;
  199|       |
  200|   381M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|   381M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   381M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  16.8M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 16.8M, False: 365M]
  ------------------
  203|   365M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   365M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  17.1M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 17.1M, False: 347M]
  ------------------
  204|       |
  205|   347M|  return (WORD32)sum;
  206|   365M|}
ixheaacd_mps_temp_process.c:ixheaac_norm32:
  236|  14.1M|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|  14.1M|  WORD norm_val;
  238|       |
  239|  14.1M|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 9.01M, False: 5.14M]
  ------------------
  240|  9.01M|    norm_val = 31;
  241|  9.01M|  } else {
  242|  5.14M|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 0, False: 5.14M]
  ------------------
  243|      0|      norm_val = 31;
  244|  5.14M|    } else {
  245|  5.14M|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 0, False: 5.14M]
  ------------------
  246|      0|        a = ~a;
  247|      0|      }
  248|  70.1M|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 64.9M, False: 5.14M]
  ------------------
  249|  64.9M|        a <<= 1;
  250|  64.9M|      }
  251|  5.14M|    }
  252|  5.14M|  }
  253|       |
  254|  14.1M|  return norm_val;
  255|  14.1M|}
ixheaacd_mps_temp_process.c:ixheaac_shr32:
   51|   549k|static PLATFORM_INLINE WORD32 ixheaac_shr32(WORD32 a, WORD b) {
   52|   549k|  WORD32 out_val;
   53|       |
   54|   549k|  b = ((UWORD32)(b << 24) >> 24);
   55|   549k|  if (b >= 31) {
  ------------------
  |  Branch (55:7): [True: 0, False: 549k]
  ------------------
   56|      0|    if (a < 0)
  ------------------
  |  Branch (56:9): [True: 0, False: 0]
  ------------------
   57|      0|      out_val = -1;
   58|      0|    else
   59|      0|      out_val = 0;
   60|   549k|  } else {
   61|   549k|    out_val = (WORD32)a >> b;
   62|   549k|  }
   63|       |
   64|   549k|  return out_val;
   65|   549k|}
ixheaacd_mps_temp_process.c:ixheaac_shl32:
   39|   549k|static PLATFORM_INLINE WORD32 ixheaac_shl32(WORD32 a, WORD b) {
   40|   549k|  WORD32 out_val;
   41|       |
   42|   549k|  b = ((UWORD32)(b << 24) >> 24);
   43|   549k|  if (b > 31)
  ------------------
  |  Branch (43:7): [True: 0, False: 549k]
  ------------------
   44|      0|    out_val = 0;
   45|   549k|  else
   46|   549k|    out_val = (WORD32)a << b;
   47|       |
   48|   549k|  return out_val;
   49|   549k|}
ixheaacd_multichannel.c:ixheaac_shl32_sat:
   67|   251k|static PLATFORM_INLINE WORD32 ixheaac_shl32_sat(WORD32 a, WORD b) {
   68|   251k|  WORD32 out_val;
   69|   251k|  if (a > (MAX_32 >> b))
  ------------------
  |  |   60|   251k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (69:7): [True: 22.1k, False: 229k]
  ------------------
   70|  22.1k|    out_val = MAX_32;
  ------------------
  |  |   60|  22.1k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
   71|   229k|  else if (a < (MIN_32 >> b))
  ------------------
  |  |   61|   229k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (71:12): [True: 22.2k, False: 207k]
  ------------------
   72|  22.2k|    out_val = MIN_32;
  ------------------
  |  |   61|  22.2k|#define MIN_32 (WORD32)0x80000000L
  ------------------
   73|   207k|  else
   74|   207k|    out_val = a << b;
   75|   251k|  return (out_val);
   76|   251k|}
ixheaacd_multichannel.c:ixheaac_add32_sat:
  197|   251k|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|   251k|  WORD64 sum;
  199|       |
  200|   251k|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|   251k|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   251k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  23.8k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 23.8k, False: 228k]
  ------------------
  203|   228k|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   228k|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  31.1k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 31.1k, False: 197k]
  ------------------
  204|       |
  205|   197k|  return (WORD32)sum;
  206|   228k|}
ixheaacd_pns_js_thumb.c:ixheaac_add32_sat:
  197|  6.27M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|  6.27M|  WORD64 sum;
  199|       |
  200|  6.27M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|  6.27M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  6.27M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|      0|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 0, False: 6.27M]
  ------------------
  203|  6.27M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  6.27M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|      0|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 0, False: 6.27M]
  ------------------
  204|       |
  205|  6.27M|  return (WORD32)sum;
  206|  6.27M|}
ixheaacd_pns_js_thumb.c:ixheaac_norm32:
  236|   544k|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|   544k|  WORD norm_val;
  238|       |
  239|   544k|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 0, False: 544k]
  ------------------
  240|      0|    norm_val = 31;
  241|   544k|  } else {
  242|   544k|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 0, False: 544k]
  ------------------
  243|      0|      norm_val = 31;
  244|   544k|    } else {
  245|   544k|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 0, False: 544k]
  ------------------
  246|      0|        a = ~a;
  247|      0|      }
  248|  2.68M|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 2.13M, False: 544k]
  ------------------
  249|  2.13M|        a <<= 1;
  250|  2.13M|      }
  251|   544k|    }
  252|   544k|  }
  253|       |
  254|   544k|  return norm_val;
  255|   544k|}
ixheaacd_pns_js_thumb.c:ixheaac_shl32_sat:
   67|  1.74M|static PLATFORM_INLINE WORD32 ixheaac_shl32_sat(WORD32 a, WORD b) {
   68|  1.74M|  WORD32 out_val;
   69|  1.74M|  if (a > (MAX_32 >> b))
  ------------------
  |  |   60|  1.74M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (69:7): [True: 585k, False: 1.16M]
  ------------------
   70|   585k|    out_val = MAX_32;
  ------------------
  |  |   60|   585k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
   71|  1.16M|  else if (a < (MIN_32 >> b))
  ------------------
  |  |   61|  1.16M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (71:12): [True: 588k, False: 573k]
  ------------------
   72|   588k|    out_val = MIN_32;
  ------------------
  |  |   61|   588k|#define MIN_32 (WORD32)0x80000000L
  ------------------
   73|   573k|  else
   74|   573k|    out_val = a << b;
   75|  1.74M|  return (out_val);
   76|  1.74M|}
ixheaacd_pns_js_thumb.c:ixheaac_shr32:
   51|  5.07M|static PLATFORM_INLINE WORD32 ixheaac_shr32(WORD32 a, WORD b) {
   52|  5.07M|  WORD32 out_val;
   53|       |
   54|  5.07M|  b = ((UWORD32)(b << 24) >> 24);
   55|  5.07M|  if (b >= 31) {
  ------------------
  |  Branch (55:7): [True: 2.47M, False: 2.60M]
  ------------------
   56|  2.47M|    if (a < 0)
  ------------------
  |  Branch (56:9): [True: 1.24M, False: 1.22M]
  ------------------
   57|  1.24M|      out_val = -1;
   58|  1.22M|    else
   59|  1.22M|      out_val = 0;
   60|  2.60M|  } else {
   61|  2.60M|    out_val = (WORD32)a >> b;
   62|  2.60M|  }
   63|       |
   64|  5.07M|  return out_val;
   65|  5.07M|}
ixheaacd_pns_js_thumb.c:ixheaac_min32:
   23|  5.34M|static PLATFORM_INLINE WORD32 ixheaac_min32(WORD32 a, WORD32 b) {
   24|  5.34M|  WORD32 min_val;
   25|       |
   26|  5.34M|  min_val = (a < b) ? a : b;
  ------------------
  |  Branch (26:13): [True: 2.78M, False: 2.56M]
  ------------------
   27|       |
   28|  5.34M|  return min_val;
   29|  5.34M|}
ixheaacd_rev_vlc.c:ixheaac_min32:
   23|    972|static PLATFORM_INLINE WORD32 ixheaac_min32(WORD32 a, WORD32 b) {
   24|    972|  WORD32 min_val;
   25|       |
   26|    972|  min_val = (a < b) ? a : b;
  ------------------
  |  Branch (26:13): [True: 972, False: 0]
  ------------------
   27|       |
   28|    972|  return min_val;
   29|    972|}
ixheaacd_rev_vlc.c:ixheaac_max32:
   31|  23.6k|static PLATFORM_INLINE WORD32 ixheaac_max32(WORD32 a, WORD32 b) {
   32|  23.6k|  WORD32 max_val;
   33|       |
   34|  23.6k|  max_val = (a > b) ? a : b;
  ------------------
  |  Branch (34:13): [True: 3.74k, False: 19.9k]
  ------------------
   35|       |
   36|  23.6k|  return max_val;
   37|  23.6k|}
ixheaacd_sbrdec_lpfuncs.c:ixheaac_min32:
   23|  92.9k|static PLATFORM_INLINE WORD32 ixheaac_min32(WORD32 a, WORD32 b) {
   24|  92.9k|  WORD32 min_val;
   25|       |
   26|  92.9k|  min_val = (a < b) ? a : b;
  ------------------
  |  Branch (26:13): [True: 20.3k, False: 72.5k]
  ------------------
   27|       |
   28|  92.9k|  return min_val;
   29|  92.9k|}
ixheaacd_sbrdec_lpfuncs.c:ixheaac_max32:
   31|  92.9k|static PLATFORM_INLINE WORD32 ixheaac_max32(WORD32 a, WORD32 b) {
   32|  92.9k|  WORD32 max_val;
   33|       |
   34|  92.9k|  max_val = (a > b) ? a : b;
  ------------------
  |  Branch (34:13): [True: 11.6k, False: 81.2k]
  ------------------
   35|       |
   36|  92.9k|  return max_val;
   37|  92.9k|}
ixheaacd_sbrdec_lpfuncs.c:ixheaac_add32:
  181|   102k|static PLATFORM_INLINE WORD32 ixheaac_add32(WORD32 a, WORD32 b) {
  182|   102k|  WORD32 sum;
  183|       |
  184|   102k|  sum = (WORD32)a + (WORD32)b;
  185|       |
  186|   102k|  return sum;
  187|   102k|}
ixheaacd_sbr_dec.c:ixheaac_min32:
   23|   151k|static PLATFORM_INLINE WORD32 ixheaac_min32(WORD32 a, WORD32 b) {
   24|   151k|  WORD32 min_val;
   25|       |
   26|   151k|  min_val = (a < b) ? a : b;
  ------------------
  |  Branch (26:13): [True: 61.7k, False: 89.6k]
  ------------------
   27|       |
   28|   151k|  return min_val;
   29|   151k|}
ixheaacd_stereo.c:ixheaac_add32_sat:
  197|   408k|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|   408k|  WORD64 sum;
  199|       |
  200|   408k|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|   408k|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   408k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|    182|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 182, False: 408k]
  ------------------
  203|   408k|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   408k|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|    549|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 549, False: 407k]
  ------------------
  204|       |
  205|   407k|  return (WORD32)sum;
  206|   408k|}
ixheaacd_stereo.c:ixheaac_sub32_sat:
  225|   408k|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|   408k|  WORD64 diff;
  227|       |
  228|   408k|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|   408k|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   408k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|    176|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (230:7): [True: 176, False: 408k]
  ------------------
  231|   408k|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   408k|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|    582|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (231:7): [True: 582, False: 407k]
  ------------------
  232|       |
  233|   407k|  return (WORD32)diff;
  234|   408k|}
ixheaacd_stereo.c:ixheaac_negate32:
  309|  1.57k|static PLATFORM_INLINE WORD32 ixheaac_negate32(WORD32 a) {
  310|  1.57k|  WORD32 neg_val;
  311|       |
  312|  1.57k|  neg_val = -a;
  313|       |
  314|  1.57k|  return neg_val;
  315|  1.57k|}
ixheaacd_stereo.c:ixheaac_norm32:
  236|   159k|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|   159k|  WORD norm_val;
  238|       |
  239|   159k|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 157k, False: 2.57k]
  ------------------
  240|   157k|    norm_val = 31;
  241|   157k|  } else {
  242|  2.57k|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 315, False: 2.26k]
  ------------------
  243|    315|      norm_val = 31;
  244|  2.26k|    } else {
  245|  2.26k|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 856, False: 1.40k]
  ------------------
  246|    856|        a = ~a;
  247|    856|      }
  248|  42.4k|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 40.1k, False: 2.26k]
  ------------------
  249|  40.1k|        a <<= 1;
  250|  40.1k|      }
  251|  2.26k|    }
  252|  2.57k|  }
  253|       |
  254|   159k|  return norm_val;
  255|   159k|}
ixheaacd_stereo.c:ixheaac_shl32:
   39|   159k|static PLATFORM_INLINE WORD32 ixheaac_shl32(WORD32 a, WORD b) {
   40|   159k|  WORD32 out_val;
   41|       |
   42|   159k|  b = ((UWORD32)(b << 24) >> 24);
   43|   159k|  if (b > 31)
  ------------------
  |  Branch (43:7): [True: 0, False: 159k]
  ------------------
   44|      0|    out_val = 0;
   45|   159k|  else
   46|   159k|    out_val = (WORD32)a << b;
   47|       |
   48|   159k|  return out_val;
   49|   159k|}
ixheaacd_stereo.c:ixheaac_shl32_sat:
   67|  2.19k|static PLATFORM_INLINE WORD32 ixheaac_shl32_sat(WORD32 a, WORD b) {
   68|  2.19k|  WORD32 out_val;
   69|  2.19k|  if (a > (MAX_32 >> b))
  ------------------
  |  |   60|  2.19k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (69:7): [True: 118, False: 2.07k]
  ------------------
   70|    118|    out_val = MAX_32;
  ------------------
  |  |   60|    118|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
   71|  2.07k|  else if (a < (MIN_32 >> b))
  ------------------
  |  |   61|  2.07k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (71:12): [True: 225, False: 1.85k]
  ------------------
   72|    225|    out_val = MIN_32;
  ------------------
  |  |   61|    225|#define MIN_32 (WORD32)0x80000000L
  ------------------
   73|  1.85k|  else
   74|  1.85k|    out_val = a << b;
   75|  2.19k|  return (out_val);
   76|  2.19k|}
ixheaacd_stereo.c:ixheaac_shr32:
   51|   157k|static PLATFORM_INLINE WORD32 ixheaac_shr32(WORD32 a, WORD b) {
   52|   157k|  WORD32 out_val;
   53|       |
   54|   157k|  b = ((UWORD32)(b << 24) >> 24);
   55|   157k|  if (b >= 31) {
  ------------------
  |  Branch (55:7): [True: 15.6k, False: 141k]
  ------------------
   56|  15.6k|    if (a < 0)
  ------------------
  |  Branch (56:9): [True: 403, False: 15.2k]
  ------------------
   57|    403|      out_val = -1;
   58|  15.2k|    else
   59|  15.2k|      out_val = 0;
   60|   141k|  } else {
   61|   141k|    out_val = (WORD32)a >> b;
   62|   141k|  }
   63|       |
   64|   157k|  return out_val;
   65|   157k|}
ixheaacd_qmf_dec_generic.c:ixheaac_add32_sat:
  197|  3.24G|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|  3.24G|  WORD64 sum;
  199|       |
  200|  3.24G|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|  3.24G|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  3.24G|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  10.8M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 10.8M, False: 3.23G]
  ------------------
  203|  3.23G|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  3.23G|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  14.4M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 14.4M, False: 3.22G]
  ------------------
  204|       |
  205|  3.22G|  return (WORD32)sum;
  206|  3.23G|}
ixheaacd_qmf_dec_generic.c:ixheaac_shr32:
   51|   585M|static PLATFORM_INLINE WORD32 ixheaac_shr32(WORD32 a, WORD b) {
   52|   585M|  WORD32 out_val;
   53|       |
   54|   585M|  b = ((UWORD32)(b << 24) >> 24);
   55|   585M|  if (b >= 31) {
  ------------------
  |  Branch (55:7): [True: 0, False: 585M]
  ------------------
   56|      0|    if (a < 0)
  ------------------
  |  Branch (56:9): [True: 0, False: 0]
  ------------------
   57|      0|      out_val = -1;
   58|      0|    else
   59|      0|      out_val = 0;
   60|   585M|  } else {
   61|   585M|    out_val = (WORD32)a >> b;
   62|   585M|  }
   63|       |
   64|   585M|  return out_val;
   65|   585M|}
ixheaacd_qmf_dec_generic.c:ixheaac_sub32_sat:
  225|  2.98G|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|  2.98G|  WORD64 diff;
  227|       |
  228|  2.98G|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|  2.98G|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  2.98G|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  6.17M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (230:7): [True: 6.17M, False: 2.98G]
  ------------------
  231|  2.98G|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  2.98G|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  5.85M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (231:7): [True: 5.85M, False: 2.97G]
  ------------------
  232|       |
  233|  2.97G|  return (WORD32)diff;
  234|  2.98G|}
ixheaacd_qmf_dec_generic.c:ixheaac_negate32_sat:
  317|   324M|static PLATFORM_INLINE WORD32 ixheaac_negate32_sat(WORD32 a) {
  318|   324M|  WORD32 neg_val;
  319|       |
  320|   324M|  if (a == MIN_32) {
  ------------------
  |  |   61|   324M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (320:7): [True: 1.77k, False: 324M]
  ------------------
  321|  1.77k|    neg_val = MAX_32;
  ------------------
  |  |   60|  1.77k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  322|   324M|  } else {
  323|   324M|    neg_val = -a;
  324|   324M|  }
  325|   324M|  return neg_val;
  326|   324M|}
ixheaacd_qmf_dec_generic.c:ixheaac_mult16x16in32:
  126|   192M|static PLATFORM_INLINE WORD32 ixheaac_mult16x16in32(WORD16 a, WORD16 b) {
  127|   192M|  WORD32 product;
  128|       |
  129|   192M|  product = (WORD32)a * (WORD32)b;
  130|       |
  131|   192M|  return product;
  132|   192M|}
ixheaacd_qmf_dec_generic.c:ixheaac_shl32_sat:
   67|   564M|static PLATFORM_INLINE WORD32 ixheaac_shl32_sat(WORD32 a, WORD b) {
   68|   564M|  WORD32 out_val;
   69|   564M|  if (a > (MAX_32 >> b))
  ------------------
  |  |   60|   564M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (69:7): [True: 52.7M, False: 511M]
  ------------------
   70|  52.7M|    out_val = MAX_32;
  ------------------
  |  |   60|  52.7M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
   71|   511M|  else if (a < (MIN_32 >> b))
  ------------------
  |  |   61|   511M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (71:12): [True: 67.1M, False: 444M]
  ------------------
   72|  67.1M|    out_val = MIN_32;
  ------------------
  |  |   61|  67.1M|#define MIN_32 (WORD32)0x80000000L
  ------------------
   73|   444M|  else
   74|   444M|    out_val = a << b;
   75|   564M|  return (out_val);
   76|   564M|}
ixheaacd_aacdecoder.c:ixheaac_add32:
  181|   193k|static PLATFORM_INLINE WORD32 ixheaac_add32(WORD32 a, WORD32 b) {
  182|   193k|  WORD32 sum;
  183|       |
  184|   193k|  sum = (WORD32)a + (WORD32)b;
  185|       |
  186|   193k|  return sum;
  187|   193k|}
ixheaacd_aac_imdct.c:ixheaac_shl32:
   39|  70.6M|static PLATFORM_INLINE WORD32 ixheaac_shl32(WORD32 a, WORD b) {
   40|  70.6M|  WORD32 out_val;
   41|       |
   42|  70.6M|  b = ((UWORD32)(b << 24) >> 24);
   43|  70.6M|  if (b > 31)
  ------------------
  |  Branch (43:7): [True: 0, False: 70.6M]
  ------------------
   44|      0|    out_val = 0;
   45|  70.6M|  else
   46|  70.6M|    out_val = (WORD32)a << b;
   47|       |
   48|  70.6M|  return out_val;
   49|  70.6M|}
ixheaacd_aac_imdct.c:ixheaac_sub32:
  189|   166M|static PLATFORM_INLINE WORD32 ixheaac_sub32(WORD32 a, WORD32 b) {
  190|   166M|  WORD32 diff;
  191|       |
  192|   166M|  diff = (WORD32)a - (WORD32)b;
  193|       |
  194|   166M|  return diff;
  195|   166M|}
ixheaacd_aac_imdct.c:ixheaac_shr32:
   51|  93.2M|static PLATFORM_INLINE WORD32 ixheaac_shr32(WORD32 a, WORD b) {
   52|  93.2M|  WORD32 out_val;
   53|       |
   54|  93.2M|  b = ((UWORD32)(b << 24) >> 24);
   55|  93.2M|  if (b >= 31) {
  ------------------
  |  Branch (55:7): [True: 0, False: 93.2M]
  ------------------
   56|      0|    if (a < 0)
  ------------------
  |  Branch (56:9): [True: 0, False: 0]
  ------------------
   57|      0|      out_val = -1;
   58|      0|    else
   59|      0|      out_val = 0;
   60|  93.2M|  } else {
   61|  93.2M|    out_val = (WORD32)a >> b;
   62|  93.2M|  }
   63|       |
   64|  93.2M|  return out_val;
   65|  93.2M|}
ixheaacd_aac_imdct.c:ixheaac_add32:
  181|   103M|static PLATFORM_INLINE WORD32 ixheaac_add32(WORD32 a, WORD32 b) {
  182|   103M|  WORD32 sum;
  183|       |
  184|   103M|  sum = (WORD32)a + (WORD32)b;
  185|       |
  186|   103M|  return sum;
  187|   103M|}
ixheaacd_aac_imdct.c:ixheaac_shr32_sat:
  377|  20.3M|static PLATFORM_INLINE WORD32 ixheaac_shr32_sat(WORD32 a, WORD32 b) {
  378|  20.3M|  WORD32 out_val;
  379|       |
  380|  20.3M|  b = ((UWORD32)(b << 24) >> 24);
  381|  20.3M|  if (b >= 31) {
  ------------------
  |  Branch (381:7): [True: 9.22M, False: 11.1M]
  ------------------
  382|  9.22M|    if (a < 0)
  ------------------
  |  Branch (382:9): [True: 0, False: 9.22M]
  ------------------
  383|      0|      out_val = -1;
  384|  9.22M|    else
  385|  9.22M|      out_val = 0;
  386|  11.1M|  } else if (b <= 0) {
  ------------------
  |  Branch (386:14): [True: 9.09M, False: 2.01M]
  ------------------
  387|  9.09M|    return a;
  388|  9.09M|  } else {
  389|  2.01M|    a = ixheaac_add32_sat(a, (1 << (b - 1)));
  390|  2.01M|    out_val = (WORD32)a >> b;
  391|  2.01M|  }
  392|       |
  393|  11.2M|  return out_val;
  394|  20.3M|}
ixheaacd_aac_imdct.c:ixheaac_sub32_sat:
  225|   582M|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|   582M|  WORD64 diff;
  227|       |
  228|   582M|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|   582M|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   582M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  5.73M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (230:7): [True: 5.73M, False: 576M]
  ------------------
  231|   576M|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   576M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  6.14M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (231:7): [True: 6.14M, False: 570M]
  ------------------
  232|       |
  233|   570M|  return (WORD32)diff;
  234|   576M|}
ixheaacd_aac_imdct.c:ixheaac_shl32_sat:
   67|  89.5M|static PLATFORM_INLINE WORD32 ixheaac_shl32_sat(WORD32 a, WORD b) {
   68|  89.5M|  WORD32 out_val;
   69|  89.5M|  if (a > (MAX_32 >> b))
  ------------------
  |  |   60|  89.5M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (69:7): [True: 8.18M, False: 81.3M]
  ------------------
   70|  8.18M|    out_val = MAX_32;
  ------------------
  |  |   60|  8.18M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
   71|  81.3M|  else if (a < (MIN_32 >> b))
  ------------------
  |  |   61|  81.3M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (71:12): [True: 8.25M, False: 73.0M]
  ------------------
   72|  8.25M|    out_val = MIN_32;
  ------------------
  |  |   61|  8.25M|#define MIN_32 (WORD32)0x80000000L
  ------------------
   73|  73.0M|  else
   74|  73.0M|    out_val = a << b;
   75|  89.5M|  return (out_val);
   76|  89.5M|}
ixheaacd_aac_imdct.c:ixheaac_mult32x16hin32:
  134|   147M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16hin32(WORD32 a, WORD32 b) {
  135|   147M|  WORD32 result;
  136|   147M|  WORD64 temp_result;
  137|       |
  138|   147M|  temp_result = (WORD64)(a) * (WORD64)(b >> 16);
  139|   147M|  result = (WORD32)(temp_result >> 16);
  140|       |
  141|   147M|  return (result);
  142|   147M|}
ixheaacd_aac_imdct.c:ixheaac_negate32_sat:
  317|  20.3M|static PLATFORM_INLINE WORD32 ixheaac_negate32_sat(WORD32 a) {
  318|  20.3M|  WORD32 neg_val;
  319|       |
  320|  20.3M|  if (a == MIN_32) {
  ------------------
  |  |   61|  20.3M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (320:7): [True: 0, False: 20.3M]
  ------------------
  321|      0|    neg_val = MAX_32;
  ------------------
  |  |   60|      0|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  322|  20.3M|  } else {
  323|  20.3M|    neg_val = -a;
  324|  20.3M|  }
  325|  20.3M|  return neg_val;
  326|  20.3M|}
ixheaacd_aac_imdct.c:ixheaac_norm32:
  236|   153k|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|   153k|  WORD norm_val;
  238|       |
  239|   153k|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 0, False: 153k]
  ------------------
  240|      0|    norm_val = 31;
  241|   153k|  } else {
  242|   153k|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 0, False: 153k]
  ------------------
  243|      0|      norm_val = 31;
  244|   153k|    } else {
  245|   153k|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 0, False: 153k]
  ------------------
  246|      0|        a = ~a;
  247|      0|      }
  248|  3.63M|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 3.48M, False: 153k]
  ------------------
  249|  3.48M|        a <<= 1;
  250|  3.48M|      }
  251|   153k|    }
  252|   153k|  }
  253|       |
  254|   153k|  return norm_val;
  255|   153k|}
ixheaacd_aac_imdct.c:ixheaac_add32_sat:
  197|   635M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|   635M|  WORD64 sum;
  199|       |
  200|   635M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|   635M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   635M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   584k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 584k, False: 634M]
  ------------------
  203|   634M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   634M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   665k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 665k, False: 634M]
  ------------------
  204|       |
  205|   634M|  return (WORD32)sum;
  206|   634M|}
ixheaacd_aac_imdct.c:ixheaac_shr32_dir_sat:
  114|  61.4M|static PLATFORM_INLINE WORD32 ixheaac_shr32_dir_sat(WORD32 a, WORD b) {
  115|  61.4M|  WORD32 out_val;
  116|       |
  117|  61.4M|  if (b < 0) {
  ------------------
  |  Branch (117:7): [True: 53.7M, False: 7.68M]
  ------------------
  118|  53.7M|    out_val = ixheaac_shl32_sat(a, -b);
  119|  53.7M|  } else {
  120|  7.68M|    out_val = ixheaac_shr32(a, b);
  121|  7.68M|  }
  122|       |
  123|  61.4M|  return out_val;
  124|  61.4M|}
ixheaacd_aac_tns.c:ixheaac_add32_sat:
  197|  54.1M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|  54.1M|  WORD64 sum;
  199|       |
  200|  54.1M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|  54.1M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  54.1M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   798k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 798k, False: 53.3M]
  ------------------
  203|  53.3M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  53.3M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   370k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 370k, False: 52.9M]
  ------------------
  204|       |
  205|  52.9M|  return (WORD32)sum;
  206|  53.3M|}
ixheaacd_aac_tns.c:ixheaac_abs32_sat:
  295|  16.2M|static PLATFORM_INLINE WORD32 ixheaac_abs32_sat(WORD32 a) {
  296|  16.2M|  WORD32 abs_val;
  297|       |
  298|  16.2M|  abs_val = a;
  299|       |
  300|  16.2M|  if (a == MIN_32) {
  ------------------
  |  |   61|  16.2M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (300:7): [True: 297k, False: 15.9M]
  ------------------
  301|   297k|    abs_val = MAX_32;
  ------------------
  |  |   60|   297k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  302|  15.9M|  } else if (a < 0) {
  ------------------
  |  Branch (302:14): [True: 4.06M, False: 11.9M]
  ------------------
  303|  4.06M|    abs_val = -a;
  304|  4.06M|  }
  305|       |
  306|  16.2M|  return abs_val;
  307|  16.2M|}
ixheaacd_aac_tns.c:ixheaac_mac16x16in32_shl_sat:
  416|  5.23M|static PLATFORM_INLINE WORD32 ixheaac_mac16x16in32_shl_sat(WORD32 a, WORD16 b, WORD16 c) {
  417|  5.23M|  WORD32 acc;
  418|       |
  419|  5.23M|  acc = ixheaac_mult16x16in32_shl_sat(b, c);
  420|       |
  421|  5.23M|  acc = ixheaac_add32_sat(a, acc);
  422|       |
  423|  5.23M|  return acc;
  424|  5.23M|}
ixheaacd_aac_tns.c:ixheaac_mult16x16in32_shl_sat:
  170|  5.23M|static PLATFORM_INLINE WORD32 ixheaac_mult16x16in32_shl_sat(WORD16 a, WORD16 b) {
  171|  5.23M|  WORD32 product;
  172|  5.23M|  product = (WORD32)a * (WORD32)b;
  173|  5.23M|  if (product != (WORD32)0x40000000L) {
  ------------------
  |  Branch (173:7): [True: 5.23M, False: 0]
  ------------------
  174|  5.23M|    product = ixheaac_shl32(product, 1);
  175|  5.23M|  } else {
  176|      0|    product = MAX_32;
  ------------------
  |  |   60|      0|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  177|      0|  }
  178|  5.23M|  return product;
  179|  5.23M|}
ixheaacd_aac_tns.c:ixheaac_shl32:
   39|  5.23M|static PLATFORM_INLINE WORD32 ixheaac_shl32(WORD32 a, WORD b) {
   40|  5.23M|  WORD32 out_val;
   41|       |
   42|  5.23M|  b = ((UWORD32)(b << 24) >> 24);
   43|  5.23M|  if (b > 31)
  ------------------
  |  Branch (43:7): [True: 0, False: 5.23M]
  ------------------
   44|      0|    out_val = 0;
   45|  5.23M|  else
   46|  5.23M|    out_val = (WORD32)a << b;
   47|       |
   48|  5.23M|  return out_val;
   49|  5.23M|}
ixheaacd_aac_tns.c:ixheaac_shl32_sat:
   67|  12.8M|static PLATFORM_INLINE WORD32 ixheaac_shl32_sat(WORD32 a, WORD b) {
   68|  12.8M|  WORD32 out_val;
   69|  12.8M|  if (a > (MAX_32 >> b))
  ------------------
  |  |   60|  12.8M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (69:7): [True: 907k, False: 11.9M]
  ------------------
   70|   907k|    out_val = MAX_32;
  ------------------
  |  |   60|   907k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
   71|  11.9M|  else if (a < (MIN_32 >> b))
  ------------------
  |  |   61|  11.9M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (71:12): [True: 901k, False: 11.0M]
  ------------------
   72|   901k|    out_val = MIN_32;
  ------------------
  |  |   61|   901k|#define MIN_32 (WORD32)0x80000000L
  ------------------
   73|  11.0M|  else
   74|  11.0M|    out_val = a << b;
   75|  12.8M|  return (out_val);
   76|  12.8M|}
ixheaacd_aac_tns.c:ixheaac_sub32_sat:
  225|  3.56M|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|  3.56M|  WORD64 diff;
  227|       |
  228|  3.56M|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|  3.56M|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  3.56M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   197k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (230:7): [True: 197k, False: 3.36M]
  ------------------
  231|  3.36M|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  3.36M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   141k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (231:7): [True: 141k, False: 3.22M]
  ------------------
  232|       |
  233|  3.22M|  return (WORD32)diff;
  234|  3.36M|}
ixheaacd_aac_tns.c:ixheaac_shl32_dir_sat:
   90|  2.18M|static PLATFORM_INLINE WORD32 ixheaac_shl32_dir_sat(WORD32 a, WORD b) {
   91|  2.18M|  WORD32 out_val;
   92|       |
   93|  2.18M|  if (b < 0) {
  ------------------
  |  Branch (93:7): [True: 0, False: 2.18M]
  ------------------
   94|      0|    out_val = ixheaac_shr32(a, -b);
   95|  2.18M|  } else {
   96|  2.18M|    out_val = ixheaac_shl32_sat(a, b);
   97|  2.18M|  }
   98|       |
   99|  2.18M|  return out_val;
  100|  2.18M|}
ixheaacd_aac_tns.c:ixheaac_abs32_nrm:
  283|   206M|static PLATFORM_INLINE WORD32 ixheaac_abs32_nrm(WORD32 a) {
  284|   206M|  WORD32 abs_val;
  285|       |
  286|   206M|  abs_val = a;
  287|       |
  288|   206M|  if (a < 0) {
  ------------------
  |  Branch (288:7): [True: 23.5M, False: 182M]
  ------------------
  289|  23.5M|    abs_val = ~a;
  290|  23.5M|  }
  291|       |
  292|   206M|  return abs_val;
  293|   206M|}
ixheaacd_aac_tns.c:ixheaac_norm32:
  236|   335k|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|   335k|  WORD norm_val;
  238|       |
  239|   335k|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 152k, False: 182k]
  ------------------
  240|   152k|    norm_val = 31;
  241|   182k|  } else {
  242|   182k|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 0, False: 182k]
  ------------------
  243|      0|      norm_val = 31;
  244|   182k|    } else {
  245|   182k|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 0, False: 182k]
  ------------------
  246|      0|        a = ~a;
  247|      0|      }
  248|  1.12M|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 947k, False: 182k]
  ------------------
  249|   947k|        a <<= 1;
  250|   947k|      }
  251|   182k|    }
  252|   182k|  }
  253|       |
  254|   335k|  return norm_val;
  255|   335k|}
ixheaacd_basic_funcs.c:ixheaac_abs32:
  271|  2.23M|static PLATFORM_INLINE WORD32 ixheaac_abs32(WORD32 a) {
  272|  2.23M|  WORD32 abs_val;
  273|       |
  274|  2.23M|  abs_val = a;
  275|       |
  276|  2.23M|  if (a < 0) {
  ------------------
  |  Branch (276:7): [True: 11.0k, False: 2.22M]
  ------------------
  277|  11.0k|    abs_val = -a;
  278|  11.0k|  }
  279|       |
  280|  2.23M|  return abs_val;
  281|  2.23M|}
ixheaacd_basic_funcs.c:ixheaac_norm32:
  236|  11.5M|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|  11.5M|  WORD norm_val;
  238|       |
  239|  11.5M|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 555k, False: 11.0M]
  ------------------
  240|   555k|    norm_val = 31;
  241|  11.0M|  } else {
  242|  11.0M|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 0, False: 11.0M]
  ------------------
  243|      0|      norm_val = 31;
  244|  11.0M|    } else {
  245|  11.0M|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 67.7k, False: 10.9M]
  ------------------
  246|  67.7k|        a = ~a;
  247|  67.7k|      }
  248|   151M|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 140M, False: 11.0M]
  ------------------
  249|   140M|        a <<= 1;
  250|   140M|      }
  251|  11.0M|    }
  252|  11.0M|  }
  253|       |
  254|  11.5M|  return norm_val;
  255|  11.5M|}
ixheaacd_basic_funcs.c:ixheaac_mult16x16in32:
  126|  2.74M|static PLATFORM_INLINE WORD32 ixheaac_mult16x16in32(WORD16 a, WORD16 b) {
  127|  2.74M|  WORD32 product;
  128|       |
  129|  2.74M|  product = (WORD32)a * (WORD32)b;
  130|       |
  131|  2.74M|  return product;
  132|  2.74M|}
ixheaacd_basic_funcs.c:ixheaac_min32:
   23|   544k|static PLATFORM_INLINE WORD32 ixheaac_min32(WORD32 a, WORD32 b) {
   24|   544k|  WORD32 min_val;
   25|       |
   26|   544k|  min_val = (a < b) ? a : b;
  ------------------
  |  Branch (26:13): [True: 544k, False: 0]
  ------------------
   27|       |
   28|   544k|  return min_val;
   29|   544k|}
ixheaacd_basic_funcs.c:ixheaac_shr32:
   51|   544k|static PLATFORM_INLINE WORD32 ixheaac_shr32(WORD32 a, WORD b) {
   52|   544k|  WORD32 out_val;
   53|       |
   54|   544k|  b = ((UWORD32)(b << 24) >> 24);
   55|   544k|  if (b >= 31) {
  ------------------
  |  Branch (55:7): [True: 0, False: 544k]
  ------------------
   56|      0|    if (a < 0)
  ------------------
  |  Branch (56:9): [True: 0, False: 0]
  ------------------
   57|      0|      out_val = -1;
   58|      0|    else
   59|      0|      out_val = 0;
   60|   544k|  } else {
   61|   544k|    out_val = (WORD32)a >> b;
   62|   544k|  }
   63|       |
   64|   544k|  return out_val;
   65|   544k|}
ixheaacd_basic_funcs.c:ixheaac_shl32_sat:
   67|  3.26M|static PLATFORM_INLINE WORD32 ixheaac_shl32_sat(WORD32 a, WORD b) {
   68|  3.26M|  WORD32 out_val;
   69|  3.26M|  if (a > (MAX_32 >> b))
  ------------------
  |  |   60|  3.26M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (69:7): [True: 0, False: 3.26M]
  ------------------
   70|      0|    out_val = MAX_32;
  ------------------
  |  |   60|      0|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
   71|  3.26M|  else if (a < (MIN_32 >> b))
  ------------------
  |  |   61|  3.26M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (71:12): [True: 0, False: 3.26M]
  ------------------
   72|      0|    out_val = MIN_32;
  ------------------
  |  |   61|      0|#define MIN_32 (WORD32)0x80000000L
  ------------------
   73|  3.26M|  else
   74|  3.26M|    out_val = a << b;
   75|  3.26M|  return (out_val);
   76|  3.26M|}
ixheaacd_basic_funcs.c:ixheaac_add32_sat:
  197|  2.72M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|  2.72M|  WORD64 sum;
  199|       |
  200|  2.72M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|  2.72M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  2.72M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|      0|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 0, False: 2.72M]
  ------------------
  203|  2.72M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  2.72M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|      0|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 0, False: 2.72M]
  ------------------
  204|       |
  205|  2.72M|  return (WORD32)sum;
  206|  2.72M|}
ixheaacd_basic_funcs.c:ixheaac_sub32_sat:
  225|  1.63M|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|  1.63M|  WORD64 diff;
  227|       |
  228|  1.63M|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|  1.63M|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  1.63M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|      0|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (230:7): [True: 0, False: 1.63M]
  ------------------
  231|  1.63M|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  1.63M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|      0|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (231:7): [True: 0, False: 1.63M]
  ------------------
  232|       |
  233|  1.63M|  return (WORD32)diff;
  234|  1.63M|}
ixheaacd_block.c:ixheaac_norm32:
  236|   172k|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|   172k|  WORD norm_val;
  238|       |
  239|   172k|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 0, False: 172k]
  ------------------
  240|      0|    norm_val = 31;
  241|   172k|  } else {
  242|   172k|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 564, False: 172k]
  ------------------
  243|    564|      norm_val = 31;
  244|   172k|    } else {
  245|   172k|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 172k, False: 0]
  ------------------
  246|   172k|        a = ~a;
  247|   172k|      }
  248|  4.08M|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 3.91M, False: 172k]
  ------------------
  249|  3.91M|        a <<= 1;
  250|  3.91M|      }
  251|   172k|    }
  252|   172k|  }
  253|       |
  254|   172k|  return norm_val;
  255|   172k|}
ixheaacd_block.c:ixheaac_sub32_sat:
  225|  69.8M|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|  69.8M|  WORD64 diff;
  227|       |
  228|  69.8M|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|  69.8M|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  69.8M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  2.11M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (230:7): [True: 2.11M, False: 67.6M]
  ------------------
  231|  67.6M|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  67.6M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  1.60M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (231:7): [True: 1.60M, False: 66.0M]
  ------------------
  232|       |
  233|  66.0M|  return (WORD32)diff;
  234|  67.6M|}
ixheaacd_block.c:ixheaac_min32:
   23|  43.0M|static PLATFORM_INLINE WORD32 ixheaac_min32(WORD32 a, WORD32 b) {
   24|  43.0M|  WORD32 min_val;
   25|       |
   26|  43.0M|  min_val = (a < b) ? a : b;
  ------------------
  |  Branch (26:13): [True: 43.0M, False: 0]
  ------------------
   27|       |
   28|  43.0M|  return min_val;
   29|  43.0M|}
ixheaacd_block.c:ixheaac_shl32_sat:
   67|  11.3M|static PLATFORM_INLINE WORD32 ixheaac_shl32_sat(WORD32 a, WORD b) {
   68|  11.3M|  WORD32 out_val;
   69|  11.3M|  if (a > (MAX_32 >> b))
  ------------------
  |  |   60|  11.3M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (69:7): [True: 2.19M, False: 9.19M]
  ------------------
   70|  2.19M|    out_val = MAX_32;
  ------------------
  |  |   60|  2.19M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
   71|  9.19M|  else if (a < (MIN_32 >> b))
  ------------------
  |  |   61|  9.19M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (71:12): [True: 2.21M, False: 6.97M]
  ------------------
   72|  2.21M|    out_val = MIN_32;
  ------------------
  |  |   61|  2.21M|#define MIN_32 (WORD32)0x80000000L
  ------------------
   73|  6.97M|  else
   74|  6.97M|    out_val = a << b;
   75|  11.3M|  return (out_val);
   76|  11.3M|}
ixheaacd_block.c:ixheaac_add32_sat:
  197|  78.2M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|  78.2M|  WORD64 sum;
  199|       |
  200|  78.2M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|  78.2M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  78.2M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  3.47M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 3.47M, False: 74.8M]
  ------------------
  203|  74.8M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  74.8M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  3.52M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 3.52M, False: 71.2M]
  ------------------
  204|       |
  205|  71.2M|  return (WORD32)sum;
  206|  74.8M|}
ixheaacd_block.c:ixheaac_shr32:
   51|  67.3M|static PLATFORM_INLINE WORD32 ixheaac_shr32(WORD32 a, WORD b) {
   52|  67.3M|  WORD32 out_val;
   53|       |
   54|  67.3M|  b = ((UWORD32)(b << 24) >> 24);
   55|  67.3M|  if (b >= 31) {
  ------------------
  |  Branch (55:7): [True: 265k, False: 67.0M]
  ------------------
   56|   265k|    if (a < 0)
  ------------------
  |  Branch (56:9): [True: 129k, False: 135k]
  ------------------
   57|   129k|      out_val = -1;
   58|   135k|    else
   59|   135k|      out_val = 0;
   60|  67.0M|  } else {
   61|  67.0M|    out_val = (WORD32)a >> b;
   62|  67.0M|  }
   63|       |
   64|  67.3M|  return out_val;
   65|  67.3M|}
ixheaacd_block.c:ixheaac_negate32_sat:
  317|  34.9M|static PLATFORM_INLINE WORD32 ixheaac_negate32_sat(WORD32 a) {
  318|  34.9M|  WORD32 neg_val;
  319|       |
  320|  34.9M|  if (a == MIN_32) {
  ------------------
  |  |   61|  34.9M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (320:7): [True: 5.49k, False: 34.9M]
  ------------------
  321|  5.49k|    neg_val = MAX_32;
  ------------------
  |  |   60|  5.49k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  322|  34.9M|  } else {
  323|  34.9M|    neg_val = -a;
  324|  34.9M|  }
  325|  34.9M|  return neg_val;
  326|  34.9M|}
ixheaacd_block.c:ixheaac_mult32x16in32_sat:
  144|  41.9M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32_sat(WORD32 a, WORD16 b) {
  145|  41.9M|  WORD32 result;
  146|  41.9M|  WORD64 temp_result;
  147|       |
  148|  41.9M|  temp_result = (WORD64)a * (WORD64)b;
  149|       |
  150|  41.9M|  if (temp_result < (WORD64)MIN_32)
  ------------------
  |  |   61|  41.9M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (150:7): [True: 2.18M, False: 39.7M]
  ------------------
  151|  2.18M|    result = MIN_32;
  ------------------
  |  |   61|  2.18M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  152|       |
  153|  39.7M|  else if (temp_result > (WORD64)MAX_32)
  ------------------
  |  |   60|  39.7M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (153:12): [True: 2.11M, False: 37.6M]
  ------------------
  154|  2.11M|    result = MAX_32;
  ------------------
  |  |   60|  2.11M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  155|       |
  156|  37.6M|  else
  157|  37.6M|    result = (WORD32)(temp_result);
  158|       |
  159|  41.9M|  return (result);
  160|  41.9M|}
ixheaacd_block.c:ixheaac_shr32_sat:
  377|  15.4M|static PLATFORM_INLINE WORD32 ixheaac_shr32_sat(WORD32 a, WORD32 b) {
  378|  15.4M|  WORD32 out_val;
  379|       |
  380|  15.4M|  b = ((UWORD32)(b << 24) >> 24);
  381|  15.4M|  if (b >= 31) {
  ------------------
  |  Branch (381:7): [True: 3.63M, False: 11.7M]
  ------------------
  382|  3.63M|    if (a < 0)
  ------------------
  |  Branch (382:9): [True: 1.64M, False: 1.99M]
  ------------------
  383|  1.64M|      out_val = -1;
  384|  1.99M|    else
  385|  1.99M|      out_val = 0;
  386|  11.7M|  } else if (b <= 0) {
  ------------------
  |  Branch (386:14): [True: 314k, False: 11.4M]
  ------------------
  387|   314k|    return a;
  388|  11.4M|  } else {
  389|  11.4M|    a = ixheaac_add32_sat(a, (1 << (b - 1)));
  390|  11.4M|    out_val = (WORD32)a >> b;
  391|  11.4M|  }
  392|       |
  393|  15.1M|  return out_val;
  394|  15.4M|}
ixheaacd_block.c:ixheaac_shl32:
   39|  23.3M|static PLATFORM_INLINE WORD32 ixheaac_shl32(WORD32 a, WORD b) {
   40|  23.3M|  WORD32 out_val;
   41|       |
   42|  23.3M|  b = ((UWORD32)(b << 24) >> 24);
   43|  23.3M|  if (b > 31)
  ------------------
  |  Branch (43:7): [True: 933k, False: 22.3M]
  ------------------
   44|   933k|    out_val = 0;
   45|  22.3M|  else
   46|  22.3M|    out_val = (WORD32)a << b;
   47|       |
   48|  23.3M|  return out_val;
   49|  23.3M|}
ixheaacd_env_calc.c:ixheaac_mult16x16in32_shl:
  162|   429k|static PLATFORM_INLINE WORD32 ixheaac_mult16x16in32_shl(WORD16 a, WORD16 b) {
  163|   429k|  WORD32 product;
  164|       |
  165|   429k|  product = ixheaac_shl32(ixheaac_mult16x16in32(a, b), 1);
  166|       |
  167|   429k|  return product;
  168|   429k|}
ixheaacd_env_calc.c:ixheaac_mult16x16in32:
  126|  10.2M|static PLATFORM_INLINE WORD32 ixheaac_mult16x16in32(WORD16 a, WORD16 b) {
  127|  10.2M|  WORD32 product;
  128|       |
  129|  10.2M|  product = (WORD32)a * (WORD32)b;
  130|       |
  131|  10.2M|  return product;
  132|  10.2M|}
ixheaacd_env_calc.c:ixheaac_norm32:
  236|  1.00M|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|  1.00M|  WORD norm_val;
  238|       |
  239|  1.00M|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 61.0k, False: 940k]
  ------------------
  240|  61.0k|    norm_val = 31;
  241|   940k|  } else {
  242|   940k|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 0, False: 940k]
  ------------------
  243|      0|      norm_val = 31;
  244|   940k|    } else {
  245|   940k|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 0, False: 940k]
  ------------------
  246|      0|        a = ~a;
  247|      0|      }
  248|  14.1M|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 13.2M, False: 940k]
  ------------------
  249|  13.2M|        a <<= 1;
  250|  13.2M|      }
  251|   940k|    }
  252|   940k|  }
  253|       |
  254|  1.00M|  return norm_val;
  255|  1.00M|}
ixheaacd_env_calc.c:ixheaac_shl32_sat:
   67|   343k|static PLATFORM_INLINE WORD32 ixheaac_shl32_sat(WORD32 a, WORD b) {
   68|   343k|  WORD32 out_val;
   69|   343k|  if (a > (MAX_32 >> b))
  ------------------
  |  |   60|   343k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (69:7): [True: 0, False: 343k]
  ------------------
   70|      0|    out_val = MAX_32;
  ------------------
  |  |   60|      0|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
   71|   343k|  else if (a < (MIN_32 >> b))
  ------------------
  |  |   61|   343k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (71:12): [True: 0, False: 343k]
  ------------------
   72|      0|    out_val = MIN_32;
  ------------------
  |  |   61|      0|#define MIN_32 (WORD32)0x80000000L
  ------------------
   73|   343k|  else
   74|   343k|    out_val = a << b;
   75|   343k|  return (out_val);
   76|   343k|}
ixheaacd_env_calc.c:ixheaac_shr32:
   51|  38.1M|static PLATFORM_INLINE WORD32 ixheaac_shr32(WORD32 a, WORD b) {
   52|  38.1M|  WORD32 out_val;
   53|       |
   54|  38.1M|  b = ((UWORD32)(b << 24) >> 24);
   55|  38.1M|  if (b >= 31) {
  ------------------
  |  Branch (55:7): [True: 358k, False: 37.8M]
  ------------------
   56|   358k|    if (a < 0)
  ------------------
  |  Branch (56:9): [True: 4.15k, False: 354k]
  ------------------
   57|  4.15k|      out_val = -1;
   58|   354k|    else
   59|   354k|      out_val = 0;
   60|  37.8M|  } else {
   61|  37.8M|    out_val = (WORD32)a >> b;
   62|  37.8M|  }
   63|       |
   64|  38.1M|  return out_val;
   65|  38.1M|}
ixheaacd_env_calc.c:ixheaac_min32:
   23|   987k|static PLATFORM_INLINE WORD32 ixheaac_min32(WORD32 a, WORD32 b) {
   24|   987k|  WORD32 min_val;
   25|       |
   26|   987k|  min_val = (a < b) ? a : b;
  ------------------
  |  Branch (26:13): [True: 985k, False: 1.42k]
  ------------------
   27|       |
   28|   987k|  return min_val;
   29|   987k|}
ixheaacd_env_calc.c:ixheaac_max32:
   31|  20.5M|static PLATFORM_INLINE WORD32 ixheaac_max32(WORD32 a, WORD32 b) {
   32|  20.5M|  WORD32 max_val;
   33|       |
   34|  20.5M|  max_val = (a > b) ? a : b;
  ------------------
  |  Branch (34:13): [True: 2.24M, False: 18.3M]
  ------------------
   35|       |
   36|  20.5M|  return max_val;
   37|  20.5M|}
ixheaacd_env_calc.c:ixheaac_abs32_nrm:
  283|  61.4M|static PLATFORM_INLINE WORD32 ixheaac_abs32_nrm(WORD32 a) {
  284|  61.4M|  WORD32 abs_val;
  285|       |
  286|  61.4M|  abs_val = a;
  287|       |
  288|  61.4M|  if (a < 0) {
  ------------------
  |  Branch (288:7): [True: 20.0M, False: 41.3M]
  ------------------
  289|  20.0M|    abs_val = ~a;
  290|  20.0M|  }
  291|       |
  292|  61.4M|  return abs_val;
  293|  61.4M|}
ixheaacd_env_calc.c:ixheaac_pnorm32:
  257|  2.52M|static PLATFORM_INLINE WORD ixheaac_pnorm32(WORD32 a) {
  258|  2.52M|  WORD norm_val;
  259|       |
  260|  2.52M|  if (a == 0) {
  ------------------
  |  Branch (260:7): [True: 212k, False: 2.31M]
  ------------------
  261|   212k|    norm_val = 31;
  262|  2.31M|  } else {
  263|  33.4M|    for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (263:24): [True: 31.1M, False: 2.31M]
  ------------------
  264|  31.1M|      a <<= 1;
  265|  31.1M|    }
  266|  2.31M|  }
  267|       |
  268|  2.52M|  return norm_val;
  269|  2.52M|}
ixheaacd_env_calc.c:ixheaac_shr32_dir:
  102|  9.85M|static PLATFORM_INLINE WORD32 ixheaac_shr32_dir(WORD32 a, WORD b) {
  103|  9.85M|  WORD32 out_val;
  104|       |
  105|  9.85M|  if (b < 0) {
  ------------------
  |  Branch (105:7): [True: 2.36M, False: 7.49M]
  ------------------
  106|  2.36M|    out_val = ixheaac_shl32(a, -b);
  107|  7.49M|  } else {
  108|  7.49M|    out_val = ixheaac_shr32(a, b);
  109|  7.49M|  }
  110|       |
  111|  9.85M|  return out_val;
  112|  9.85M|}
ixheaacd_env_calc.c:ixheaac_mac16x16in32_sat:
  396|  9.85M|static PLATFORM_INLINE WORD32 ixheaac_mac16x16in32_sat(WORD32 a, WORD16 b, WORD16 c) {
  397|  9.85M|  WORD32 acc;
  398|       |
  399|  9.85M|  acc = ixheaac_mult16x16in32(b, c);
  400|       |
  401|  9.85M|  acc = ixheaac_add32_sat(a, acc);
  402|       |
  403|  9.85M|  return acc;
  404|  9.85M|}
ixheaacd_env_calc.c:ixheaac_add32_sat:
  197|  39.3M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|  39.3M|  WORD64 sum;
  199|       |
  200|  39.3M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|  39.3M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  39.3M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|    147|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 147, False: 39.3M]
  ------------------
  203|  39.3M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  39.3M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  2.37k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 2.37k, False: 39.3M]
  ------------------
  204|       |
  205|  39.3M|  return (WORD32)sum;
  206|  39.3M|}
ixheaacd_env_calc.c:ixheaac_abs32:
  271|  1.35M|static PLATFORM_INLINE WORD32 ixheaac_abs32(WORD32 a) {
  272|  1.35M|  WORD32 abs_val;
  273|       |
  274|  1.35M|  abs_val = a;
  275|       |
  276|  1.35M|  if (a < 0) {
  ------------------
  |  Branch (276:7): [True: 0, False: 1.35M]
  ------------------
  277|      0|    abs_val = -a;
  278|      0|  }
  279|       |
  280|  1.35M|  return abs_val;
  281|  1.35M|}
ixheaacd_env_calc.c:ixheaac_mac16x16in32_shl_sat:
  416|  28.7M|static PLATFORM_INLINE WORD32 ixheaac_mac16x16in32_shl_sat(WORD32 a, WORD16 b, WORD16 c) {
  417|  28.7M|  WORD32 acc;
  418|       |
  419|  28.7M|  acc = ixheaac_mult16x16in32_shl_sat(b, c);
  420|       |
  421|  28.7M|  acc = ixheaac_add32_sat(a, acc);
  422|       |
  423|  28.7M|  return acc;
  424|  28.7M|}
ixheaacd_env_calc.c:ixheaac_mult16x16in32_shl_sat:
  170|  28.7M|static PLATFORM_INLINE WORD32 ixheaac_mult16x16in32_shl_sat(WORD16 a, WORD16 b) {
  171|  28.7M|  WORD32 product;
  172|  28.7M|  product = (WORD32)a * (WORD32)b;
  173|  28.7M|  if (product != (WORD32)0x40000000L) {
  ------------------
  |  Branch (173:7): [True: 28.7M, False: 0]
  ------------------
  174|  28.7M|    product = ixheaac_shl32(product, 1);
  175|  28.7M|  } else {
  176|      0|    product = MAX_32;
  ------------------
  |  |   60|      0|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  177|      0|  }
  178|  28.7M|  return product;
  179|  28.7M|}
ixheaacd_env_calc.c:ixheaac_sub32_sat:
  225|   141k|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|   141k|  WORD64 diff;
  227|       |
  228|   141k|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|   141k|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   141k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|      0|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (230:7): [True: 0, False: 141k]
  ------------------
  231|   141k|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   141k|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|     75|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (231:7): [True: 75, False: 141k]
  ------------------
  232|       |
  233|   141k|  return (WORD32)diff;
  234|   141k|}
ixheaacd_env_calc.c:ixheaac_shl32:
   39|  39.2M|static PLATFORM_INLINE WORD32 ixheaac_shl32(WORD32 a, WORD b) {
   40|  39.2M|  WORD32 out_val;
   41|       |
   42|  39.2M|  b = ((UWORD32)(b << 24) >> 24);
   43|  39.2M|  if (b > 31)
  ------------------
  |  Branch (43:7): [True: 11.7k, False: 39.2M]
  ------------------
   44|  11.7k|    out_val = 0;
   45|  39.2M|  else
   46|  39.2M|    out_val = (WORD32)a << b;
   47|       |
   48|  39.2M|  return out_val;
   49|  39.2M|}
ixheaacd_env_dec.c:ixheaac_min32:
   23|  47.5k|static PLATFORM_INLINE WORD32 ixheaac_min32(WORD32 a, WORD32 b) {
   24|  47.5k|  WORD32 min_val;
   25|       |
   26|  47.5k|  min_val = (a < b) ? a : b;
  ------------------
  |  Branch (26:13): [True: 46.7k, False: 795]
  ------------------
   27|       |
   28|  47.5k|  return min_val;
   29|  47.5k|}
ixheaacd_ext_ch_ele.c:ixheaac_add32_sat:
  197|  18.2M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|  18.2M|  WORD64 sum;
  199|       |
  200|  18.2M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|  18.2M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  18.2M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   345k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 345k, False: 17.8M]
  ------------------
  203|  17.8M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  17.8M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   363k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 363k, False: 17.4M]
  ------------------
  204|       |
  205|  17.4M|  return (WORD32)sum;
  206|  17.8M|}
ixheaacd_ext_ch_ele.c:ixheaac_sub32_sat:
  225|  14.3M|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|  14.3M|  WORD64 diff;
  227|       |
  228|  14.3M|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|  14.3M|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  14.3M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   671k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (230:7): [True: 671k, False: 13.6M]
  ------------------
  231|  13.6M|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  13.6M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   655k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (231:7): [True: 655k, False: 13.0M]
  ------------------
  232|       |
  233|  13.0M|  return (WORD32)diff;
  234|  13.6M|}
ixheaacd_fft.c:ixheaac_norm32:
  236|  17.9M|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|  17.9M|  WORD norm_val;
  238|       |
  239|  17.9M|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 0, False: 17.9M]
  ------------------
  240|      0|    norm_val = 31;
  241|  17.9M|  } else {
  242|  17.9M|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 0, False: 17.9M]
  ------------------
  243|      0|      norm_val = 31;
  244|  17.9M|    } else {
  245|  17.9M|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 0, False: 17.9M]
  ------------------
  246|      0|        a = ~a;
  247|      0|      }
  248|   499M|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 481M, False: 17.9M]
  ------------------
  249|   481M|        a <<= 1;
  250|   481M|      }
  251|  17.9M|    }
  252|  17.9M|  }
  253|       |
  254|  17.9M|  return norm_val;
  255|  17.9M|}
ixheaacd_fft.c:ixheaac_add32_sat:
  197|  1.92G|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|  1.92G|  WORD64 sum;
  199|       |
  200|  1.92G|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|  1.92G|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  1.92G|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|    459|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 459, False: 1.92G]
  ------------------
  203|  1.92G|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  1.92G|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|    445|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 445, False: 1.92G]
  ------------------
  204|       |
  205|  1.92G|  return (WORD32)sum;
  206|  1.92G|}
ixheaacd_fft.c:ixheaac_sub32_sat:
  225|  1.54G|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|  1.54G|  WORD64 diff;
  227|       |
  228|  1.54G|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|  1.54G|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  1.54G|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|    166|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (230:7): [True: 166, False: 1.54G]
  ------------------
  231|  1.54G|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  1.54G|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|    182|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (231:7): [True: 182, False: 1.54G]
  ------------------
  232|       |
  233|  1.54G|  return (WORD32)diff;
  234|  1.54G|}
ixheaacd_fft.c:ixheaac_shl32_sat:
   67|  1.28G|static PLATFORM_INLINE WORD32 ixheaac_shl32_sat(WORD32 a, WORD b) {
   68|  1.28G|  WORD32 out_val;
   69|  1.28G|  if (a > (MAX_32 >> b))
  ------------------
  |  |   60|  1.28G|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (69:7): [True: 646, False: 1.28G]
  ------------------
   70|    646|    out_val = MAX_32;
  ------------------
  |  |   60|    646|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
   71|  1.28G|  else if (a < (MIN_32 >> b))
  ------------------
  |  |   61|  1.28G|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (71:12): [True: 573, False: 1.28G]
  ------------------
   72|    573|    out_val = MIN_32;
  ------------------
  |  |   61|    573|#define MIN_32 (WORD32)0x80000000L
  ------------------
   73|  1.28G|  else
   74|  1.28G|    out_val = a << b;
   75|  1.28G|  return (out_val);
   76|  1.28G|}
ixheaacd_fft.c:ixheaac_sub32:
  189|  11.4M|static PLATFORM_INLINE WORD32 ixheaac_sub32(WORD32 a, WORD32 b) {
  190|  11.4M|  WORD32 diff;
  191|       |
  192|  11.4M|  diff = (WORD32)a - (WORD32)b;
  193|       |
  194|  11.4M|  return diff;
  195|  11.4M|}
ixheaacd_freq_sca.c:ixheaac_add32_sat:
  197|  2.48M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|  2.48M|  WORD64 sum;
  199|       |
  200|  2.48M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|  2.48M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  2.48M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|      0|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 0, False: 2.48M]
  ------------------
  203|  2.48M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  2.48M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|      0|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 0, False: 2.48M]
  ------------------
  204|       |
  205|  2.48M|  return (WORD32)sum;
  206|  2.48M|}
ixheaacd_freq_sca.c:ixheaac_shl32:
   39|  23.9M|static PLATFORM_INLINE WORD32 ixheaac_shl32(WORD32 a, WORD b) {
   40|  23.9M|  WORD32 out_val;
   41|       |
   42|  23.9M|  b = ((UWORD32)(b << 24) >> 24);
   43|  23.9M|  if (b > 31)
  ------------------
  |  Branch (43:7): [True: 0, False: 23.9M]
  ------------------
   44|      0|    out_val = 0;
   45|  23.9M|  else
   46|  23.9M|    out_val = (WORD32)a << b;
   47|       |
   48|  23.9M|  return out_val;
   49|  23.9M|}
ixheaacd_freq_sca.c:ixheaac_mult16x16in32_shl:
  162|  23.8M|static PLATFORM_INLINE WORD32 ixheaac_mult16x16in32_shl(WORD16 a, WORD16 b) {
  163|  23.8M|  WORD32 product;
  164|       |
  165|  23.8M|  product = ixheaac_shl32(ixheaac_mult16x16in32(a, b), 1);
  166|       |
  167|  23.8M|  return product;
  168|  23.8M|}
ixheaacd_freq_sca.c:ixheaac_sub32_sat:
  225|  1.20M|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|  1.20M|  WORD64 diff;
  227|       |
  228|  1.20M|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|  1.20M|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  1.20M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|      0|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (230:7): [True: 0, False: 1.20M]
  ------------------
  231|  1.20M|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  1.20M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|      0|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (231:7): [True: 0, False: 1.20M]
  ------------------
  232|       |
  233|  1.20M|  return (WORD32)diff;
  234|  1.20M|}
ixheaacd_freq_sca.c:ixheaac_shl32_sat:
   67|  66.5k|static PLATFORM_INLINE WORD32 ixheaac_shl32_sat(WORD32 a, WORD b) {
   68|  66.5k|  WORD32 out_val;
   69|  66.5k|  if (a > (MAX_32 >> b))
  ------------------
  |  |   60|  66.5k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (69:7): [True: 0, False: 66.5k]
  ------------------
   70|      0|    out_val = MAX_32;
  ------------------
  |  |   60|      0|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
   71|  66.5k|  else if (a < (MIN_32 >> b))
  ------------------
  |  |   61|  66.5k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (71:12): [True: 0, False: 66.5k]
  ------------------
   72|      0|    out_val = MIN_32;
  ------------------
  |  |   61|      0|#define MIN_32 (WORD32)0x80000000L
  ------------------
   73|  66.5k|  else
   74|  66.5k|    out_val = a << b;
   75|  66.5k|  return (out_val);
   76|  66.5k|}
ixheaacd_freq_sca.c:ixheaac_mult16x16in32:
  126|  24.3M|static PLATFORM_INLINE WORD32 ixheaac_mult16x16in32(WORD16 a, WORD16 b) {
  127|  24.3M|  WORD32 product;
  128|       |
  129|  24.3M|  product = (WORD32)a * (WORD32)b;
  130|       |
  131|  24.3M|  return product;
  132|  24.3M|}
ixheaacd_freq_sca.c:ixheaac_shr32:
   51|  2.51M|static PLATFORM_INLINE WORD32 ixheaac_shr32(WORD32 a, WORD b) {
   52|  2.51M|  WORD32 out_val;
   53|       |
   54|  2.51M|  b = ((UWORD32)(b << 24) >> 24);
   55|  2.51M|  if (b >= 31) {
  ------------------
  |  Branch (55:7): [True: 0, False: 2.51M]
  ------------------
   56|      0|    if (a < 0)
  ------------------
  |  Branch (56:9): [True: 0, False: 0]
  ------------------
   57|      0|      out_val = -1;
   58|      0|    else
   59|      0|      out_val = 0;
   60|  2.51M|  } else {
   61|  2.51M|    out_val = (WORD32)a >> b;
   62|  2.51M|  }
   63|       |
   64|  2.51M|  return out_val;
   65|  2.51M|}
ixheaacd_imdct.c:ixheaac_negate32_sat:
  317|   283M|static PLATFORM_INLINE WORD32 ixheaac_negate32_sat(WORD32 a) {
  318|   283M|  WORD32 neg_val;
  319|       |
  320|   283M|  if (a == MIN_32) {
  ------------------
  |  |   61|   283M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (320:7): [True: 455k, False: 283M]
  ------------------
  321|   455k|    neg_val = MAX_32;
  ------------------
  |  |   60|   455k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  322|   283M|  } else {
  323|   283M|    neg_val = -a;
  324|   283M|  }
  325|   283M|  return neg_val;
  326|   283M|}
ixheaacd_imdct.c:ixheaac_norm32:
  236|   811k|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|   811k|  WORD norm_val;
  238|       |
  239|   811k|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 396k, False: 415k]
  ------------------
  240|   396k|    norm_val = 31;
  241|   415k|  } else {
  242|   415k|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 0, False: 415k]
  ------------------
  243|      0|      norm_val = 31;
  244|   415k|    } else {
  245|   415k|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 2.72k, False: 412k]
  ------------------
  246|  2.72k|        a = ~a;
  247|  2.72k|      }
  248|  6.96M|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 6.54M, False: 415k]
  ------------------
  249|  6.54M|        a <<= 1;
  250|  6.54M|      }
  251|   415k|    }
  252|   415k|  }
  253|       |
  254|   811k|  return norm_val;
  255|   811k|}
ixheaacd_imdct.c:ixheaac_abs32_sat:
  295|   510M|static PLATFORM_INLINE WORD32 ixheaac_abs32_sat(WORD32 a) {
  296|   510M|  WORD32 abs_val;
  297|       |
  298|   510M|  abs_val = a;
  299|       |
  300|   510M|  if (a == MIN_32) {
  ------------------
  |  |   61|   510M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (300:7): [True: 660k, False: 509M]
  ------------------
  301|   660k|    abs_val = MAX_32;
  ------------------
  |  |   60|   660k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  302|   509M|  } else if (a < 0) {
  ------------------
  |  Branch (302:14): [True: 58.3M, False: 451M]
  ------------------
  303|  58.3M|    abs_val = -a;
  304|  58.3M|  }
  305|       |
  306|   510M|  return abs_val;
  307|   510M|}
ixheaacd_lpfuncs.c:ixheaac_min32:
   23|  18.4M|static PLATFORM_INLINE WORD32 ixheaac_min32(WORD32 a, WORD32 b) {
   24|  18.4M|  WORD32 min_val;
   25|       |
   26|  18.4M|  min_val = (a < b) ? a : b;
  ------------------
  |  Branch (26:13): [True: 18.4M, False: 0]
  ------------------
   27|       |
   28|  18.4M|  return min_val;
   29|  18.4M|}
ixheaacd_lpfuncs.c:ixheaac_add32_sat:
  197|  97.4M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|  97.4M|  WORD64 sum;
  199|       |
  200|  97.4M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|  97.4M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  97.4M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  1.76M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 1.76M, False: 95.6M]
  ------------------
  203|  95.6M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  95.6M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   872k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 872k, False: 94.8M]
  ------------------
  204|       |
  205|  94.8M|  return (WORD32)sum;
  206|  95.6M|}
ixheaacd_lpfuncs.c:ixheaac_mult32x16in32_sat:
  144|  27.6M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32_sat(WORD32 a, WORD16 b) {
  145|  27.6M|  WORD32 result;
  146|  27.6M|  WORD64 temp_result;
  147|       |
  148|  27.6M|  temp_result = (WORD64)a * (WORD64)b;
  149|       |
  150|  27.6M|  if (temp_result < (WORD64)MIN_32)
  ------------------
  |  |   61|  27.6M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (150:7): [True: 1.99M, False: 25.6M]
  ------------------
  151|  1.99M|    result = MIN_32;
  ------------------
  |  |   61|  1.99M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  152|       |
  153|  25.6M|  else if (temp_result > (WORD64)MAX_32)
  ------------------
  |  |   60|  25.6M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (153:12): [True: 1.98M, False: 23.6M]
  ------------------
  154|  1.98M|    result = MAX_32;
  ------------------
  |  |   60|  1.98M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  155|       |
  156|  23.6M|  else
  157|  23.6M|    result = (WORD32)(temp_result);
  158|       |
  159|  27.6M|  return (result);
  160|  27.6M|}
ixheaacd_lpfuncs.c:ixheaac_sub32_sat:
  225|  16.5M|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|  16.5M|  WORD64 diff;
  227|       |
  228|  16.5M|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|  16.5M|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  16.5M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  1.90M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (230:7): [True: 1.90M, False: 14.6M]
  ------------------
  231|  14.6M|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  14.6M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  1.12M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (231:7): [True: 1.12M, False: 13.4M]
  ------------------
  232|       |
  233|  13.4M|  return (WORD32)diff;
  234|  14.6M|}
ixheaacd_lpfuncs.c:ixheaac_negate32_sat:
  317|  16.3M|static PLATFORM_INLINE WORD32 ixheaac_negate32_sat(WORD32 a) {
  318|  16.3M|  WORD32 neg_val;
  319|       |
  320|  16.3M|  if (a == MIN_32) {
  ------------------
  |  |   61|  16.3M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (320:7): [True: 6.60k, False: 16.3M]
  ------------------
  321|  6.60k|    neg_val = MAX_32;
  ------------------
  |  |   60|  6.60k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  322|  16.3M|  } else {
  323|  16.3M|    neg_val = -a;
  324|  16.3M|  }
  325|  16.3M|  return neg_val;
  326|  16.3M|}
ixheaacd_lpfuncs.c:ixheaac_shr32_sat:
  377|  46.6M|static PLATFORM_INLINE WORD32 ixheaac_shr32_sat(WORD32 a, WORD32 b) {
  378|  46.6M|  WORD32 out_val;
  379|       |
  380|  46.6M|  b = ((UWORD32)(b << 24) >> 24);
  381|  46.6M|  if (b >= 31) {
  ------------------
  |  Branch (381:7): [True: 28.0M, False: 18.5M]
  ------------------
  382|  28.0M|    if (a < 0)
  ------------------
  |  Branch (382:9): [True: 4.88M, False: 23.1M]
  ------------------
  383|  4.88M|      out_val = -1;
  384|  23.1M|    else
  385|  23.1M|      out_val = 0;
  386|  28.0M|  } else if (b <= 0) {
  ------------------
  |  Branch (386:14): [True: 6.32M, False: 12.2M]
  ------------------
  387|  6.32M|    return a;
  388|  12.2M|  } else {
  389|  12.2M|    a = ixheaac_add32_sat(a, (1 << (b - 1)));
  390|  12.2M|    out_val = (WORD32)a >> b;
  391|  12.2M|  }
  392|       |
  393|  40.3M|  return out_val;
  394|  46.6M|}
ixheaacd_lpfuncs.c:ixheaac_shl32_sat:
   67|  32.6M|static PLATFORM_INLINE WORD32 ixheaac_shl32_sat(WORD32 a, WORD b) {
   68|  32.6M|  WORD32 out_val;
   69|  32.6M|  if (a > (MAX_32 >> b))
  ------------------
  |  |   60|  32.6M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (69:7): [True: 2.90M, False: 29.7M]
  ------------------
   70|  2.90M|    out_val = MAX_32;
  ------------------
  |  |   60|  2.90M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
   71|  29.7M|  else if (a < (MIN_32 >> b))
  ------------------
  |  |   61|  29.7M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (71:12): [True: 2.93M, False: 26.8M]
  ------------------
   72|  2.93M|    out_val = MIN_32;
  ------------------
  |  |   61|  2.93M|#define MIN_32 (WORD32)0x80000000L
  ------------------
   73|  26.8M|  else
   74|  26.8M|    out_val = a << b;
   75|  32.6M|  return (out_val);
   76|  32.6M|}
ixheaacd_lpfuncs.c:ixheaac_shl32:
   39|  31.6M|static PLATFORM_INLINE WORD32 ixheaac_shl32(WORD32 a, WORD b) {
   40|  31.6M|  WORD32 out_val;
   41|       |
   42|  31.6M|  b = ((UWORD32)(b << 24) >> 24);
   43|  31.6M|  if (b > 31)
  ------------------
  |  Branch (43:7): [True: 0, False: 31.6M]
  ------------------
   44|      0|    out_val = 0;
   45|  31.6M|  else
   46|  31.6M|    out_val = (WORD32)a << b;
   47|       |
   48|  31.6M|  return out_val;
   49|  31.6M|}
ixheaacd_lpfuncs.c:ixheaac_shr32:
   51|  75.6M|static PLATFORM_INLINE WORD32 ixheaac_shr32(WORD32 a, WORD b) {
   52|  75.6M|  WORD32 out_val;
   53|       |
   54|  75.6M|  b = ((UWORD32)(b << 24) >> 24);
   55|  75.6M|  if (b >= 31) {
  ------------------
  |  Branch (55:7): [True: 0, False: 75.6M]
  ------------------
   56|      0|    if (a < 0)
  ------------------
  |  Branch (56:9): [True: 0, False: 0]
  ------------------
   57|      0|      out_val = -1;
   58|      0|    else
   59|      0|      out_val = 0;
   60|  75.6M|  } else {
   61|  75.6M|    out_val = (WORD32)a >> b;
   62|  75.6M|  }
   63|       |
   64|  75.6M|  return out_val;
   65|  75.6M|}
ixheaacd_lpp_tran.c:ixheaac_sub32:
  189|  9.67M|static PLATFORM_INLINE WORD32 ixheaac_sub32(WORD32 a, WORD32 b) {
  190|  9.67M|  WORD32 diff;
  191|       |
  192|  9.67M|  diff = (WORD32)a - (WORD32)b;
  193|       |
  194|  9.67M|  return diff;
  195|  9.67M|}
ixheaacd_lpp_tran.c:ixheaac_add32:
  181|  20.0M|static PLATFORM_INLINE WORD32 ixheaac_add32(WORD32 a, WORD32 b) {
  182|  20.0M|  WORD32 sum;
  183|       |
  184|  20.0M|  sum = (WORD32)a + (WORD32)b;
  185|       |
  186|  20.0M|  return sum;
  187|  20.0M|}
ixheaacd_lpp_tran.c:ixheaac_add32_sat:
  197|  11.8M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|  11.8M|  WORD64 sum;
  199|       |
  200|  11.8M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|  11.8M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  11.8M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|    161|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 161, False: 11.8M]
  ------------------
  203|  11.8M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  11.8M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|      0|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 0, False: 11.8M]
  ------------------
  204|       |
  205|  11.8M|  return (WORD32)sum;
  206|  11.8M|}
ixheaacd_lpp_tran.c:ixheaac_mult32x16hin32:
  134|  75.8M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16hin32(WORD32 a, WORD32 b) {
  135|  75.8M|  WORD32 result;
  136|  75.8M|  WORD64 temp_result;
  137|       |
  138|  75.8M|  temp_result = (WORD64)(a) * (WORD64)(b >> 16);
  139|  75.8M|  result = (WORD32)(temp_result >> 16);
  140|       |
  141|  75.8M|  return (result);
  142|  75.8M|}
ixheaacd_lpp_tran.c:ixheaac_abs32_nrm:
  283|  2.81M|static PLATFORM_INLINE WORD32 ixheaac_abs32_nrm(WORD32 a) {
  284|  2.81M|  WORD32 abs_val;
  285|       |
  286|  2.81M|  abs_val = a;
  287|       |
  288|  2.81M|  if (a < 0) {
  ------------------
  |  Branch (288:7): [True: 1.03M, False: 1.78M]
  ------------------
  289|  1.03M|    abs_val = ~a;
  290|  1.03M|  }
  291|       |
  292|  2.81M|  return abs_val;
  293|  2.81M|}
ixheaacd_lpp_tran.c:ixheaac_pnorm32:
  257|   469k|static PLATFORM_INLINE WORD ixheaac_pnorm32(WORD32 a) {
  258|   469k|  WORD norm_val;
  259|       |
  260|   469k|  if (a == 0) {
  ------------------
  |  Branch (260:7): [True: 91.0k, False: 378k]
  ------------------
  261|  91.0k|    norm_val = 31;
  262|   378k|  } else {
  263|  3.91M|    for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (263:24): [True: 3.53M, False: 378k]
  ------------------
  264|  3.53M|      a <<= 1;
  265|  3.53M|    }
  266|   378k|  }
  267|       |
  268|   469k|  return norm_val;
  269|   469k|}
ixheaacd_lpp_tran.c:ixheaac_sub32_sat:
  225|  2.72M|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|  2.72M|  WORD64 diff;
  227|       |
  228|  2.72M|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|  2.72M|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  2.72M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|     86|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (230:7): [True: 86, False: 2.72M]
  ------------------
  231|  2.72M|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  2.72M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|      6|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (231:7): [True: 6, False: 2.72M]
  ------------------
  232|       |
  233|  2.72M|  return (WORD32)diff;
  234|  2.72M|}
ixheaacd_lpp_tran.c:ixheaac_shr32:
   51|  45.6M|static PLATFORM_INLINE WORD32 ixheaac_shr32(WORD32 a, WORD b) {
   52|  45.6M|  WORD32 out_val;
   53|       |
   54|  45.6M|  b = ((UWORD32)(b << 24) >> 24);
   55|  45.6M|  if (b >= 31) {
  ------------------
  |  Branch (55:7): [True: 0, False: 45.6M]
  ------------------
   56|      0|    if (a < 0)
  ------------------
  |  Branch (56:9): [True: 0, False: 0]
  ------------------
   57|      0|      out_val = -1;
   58|      0|    else
   59|      0|      out_val = 0;
   60|  45.6M|  } else {
   61|  45.6M|    out_val = (WORD32)a >> b;
   62|  45.6M|  }
   63|       |
   64|  45.6M|  return out_val;
   65|  45.6M|}
ixheaacd_lpp_tran.c:ixheaac_norm32:
  236|   750k|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|   750k|  WORD norm_val;
  238|       |
  239|   750k|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 0, False: 750k]
  ------------------
  240|      0|    norm_val = 31;
  241|   750k|  } else {
  242|   750k|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 0, False: 750k]
  ------------------
  243|      0|      norm_val = 31;
  244|   750k|    } else {
  245|   750k|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 7.63k, False: 743k]
  ------------------
  246|  7.63k|        a = ~a;
  247|  7.63k|      }
  248|  1.19M|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 445k, False: 750k]
  ------------------
  249|   445k|        a <<= 1;
  250|   445k|      }
  251|   750k|    }
  252|   750k|  }
  253|       |
  254|   750k|  return norm_val;
  255|   750k|}
ixheaacd_lpp_tran.c:ixheaac_abs32_sat:
  295|  1.87M|static PLATFORM_INLINE WORD32 ixheaac_abs32_sat(WORD32 a) {
  296|  1.87M|  WORD32 abs_val;
  297|       |
  298|  1.87M|  abs_val = a;
  299|       |
  300|  1.87M|  if (a == MIN_32) {
  ------------------
  |  |   61|  1.87M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (300:7): [True: 436, False: 1.87M]
  ------------------
  301|    436|    abs_val = MAX_32;
  ------------------
  |  |   60|    436|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  302|  1.87M|  } else if (a < 0) {
  ------------------
  |  Branch (302:14): [True: 843k, False: 1.03M]
  ------------------
  303|   843k|    abs_val = -a;
  304|   843k|  }
  305|       |
  306|  1.87M|  return abs_val;
  307|  1.87M|}
ixheaacd_lpp_tran.c:ixheaac_min32:
   23|  46.3k|static PLATFORM_INLINE WORD32 ixheaac_min32(WORD32 a, WORD32 b) {
   24|  46.3k|  WORD32 min_val;
   25|       |
   26|  46.3k|  min_val = (a < b) ? a : b;
  ------------------
  |  Branch (26:13): [True: 0, False: 46.3k]
  ------------------
   27|       |
   28|  46.3k|  return min_val;
   29|  46.3k|}
ixheaacd_mps_apply_m1.c:ixheaac_add32_sat:
  197|   477M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|   477M|  WORD64 sum;
  199|       |
  200|   477M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|   477M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   477M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  35.0M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 35.0M, False: 442M]
  ------------------
  203|   442M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   442M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  35.2M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 35.2M, False: 407M]
  ------------------
  204|       |
  205|   407M|  return (WORD32)sum;
  206|   442M|}
ixheaacd_mps_apply_m1.c:ixheaac_sub32_sat:
  225|   134M|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|   134M|  WORD64 diff;
  227|       |
  228|   134M|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|   134M|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   134M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  11.5M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (230:7): [True: 11.5M, False: 122M]
  ------------------
  231|   122M|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   122M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  11.5M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (231:7): [True: 11.5M, False: 111M]
  ------------------
  232|       |
  233|   111M|  return (WORD32)diff;
  234|   122M|}
ixheaacd_mps_apply_m2.c:ixheaac_add32_sat:
  197|   521M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|   521M|  WORD64 sum;
  199|       |
  200|   521M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|   521M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   521M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  13.7M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 13.7M, False: 507M]
  ------------------
  203|   507M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   507M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  13.8M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 13.8M, False: 493M]
  ------------------
  204|       |
  205|   493M|  return (WORD32)sum;
  206|   507M|}
ixheaacd_mps_res_block.c:ixheaac_norm32:
  236|  1.19k|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|  1.19k|  WORD norm_val;
  238|       |
  239|  1.19k|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 0, False: 1.19k]
  ------------------
  240|      0|    norm_val = 31;
  241|  1.19k|  } else {
  242|  1.19k|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 104, False: 1.09k]
  ------------------
  243|    104|      norm_val = 31;
  244|  1.09k|    } else {
  245|  1.09k|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 1.09k, False: 0]
  ------------------
  246|  1.09k|        a = ~a;
  247|  1.09k|      }
  248|  26.4k|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 25.3k, False: 1.09k]
  ------------------
  249|  25.3k|        a <<= 1;
  250|  25.3k|      }
  251|  1.09k|    }
  252|  1.19k|  }
  253|       |
  254|  1.19k|  return norm_val;
  255|  1.19k|}
ixheaacd_mps_res_block.c:ixheaac_shr32:
   51|  27.1k|static PLATFORM_INLINE WORD32 ixheaac_shr32(WORD32 a, WORD b) {
   52|  27.1k|  WORD32 out_val;
   53|       |
   54|  27.1k|  b = ((UWORD32)(b << 24) >> 24);
   55|  27.1k|  if (b >= 31) {
  ------------------
  |  Branch (55:7): [True: 2.04k, False: 25.0k]
  ------------------
   56|  2.04k|    if (a < 0)
  ------------------
  |  Branch (56:9): [True: 511, False: 1.53k]
  ------------------
   57|    511|      out_val = -1;
   58|  1.53k|    else
   59|  1.53k|      out_val = 0;
   60|  25.0k|  } else {
   61|  25.0k|    out_val = (WORD32)a >> b;
   62|  25.0k|  }
   63|       |
   64|  27.1k|  return out_val;
   65|  27.1k|}
ixheaacd_mps_res_block.c:ixheaac_shl32:
   39|   303k|static PLATFORM_INLINE WORD32 ixheaac_shl32(WORD32 a, WORD b) {
   40|   303k|  WORD32 out_val;
   41|       |
   42|   303k|  b = ((UWORD32)(b << 24) >> 24);
   43|   303k|  if (b > 31)
  ------------------
  |  Branch (43:7): [True: 844, False: 303k]
  ------------------
   44|    844|    out_val = 0;
   45|   303k|  else
   46|   303k|    out_val = (WORD32)a << b;
   47|       |
   48|   303k|  return out_val;
   49|   303k|}
ixheaacd_ps_bitdec.c:ixheaac_shr32:
   51|  51.1k|static PLATFORM_INLINE WORD32 ixheaac_shr32(WORD32 a, WORD b) {
   52|  51.1k|  WORD32 out_val;
   53|       |
   54|  51.1k|  b = ((UWORD32)(b << 24) >> 24);
   55|  51.1k|  if (b >= 31) {
  ------------------
  |  Branch (55:7): [True: 0, False: 51.1k]
  ------------------
   56|      0|    if (a < 0)
  ------------------
  |  Branch (56:9): [True: 0, False: 0]
  ------------------
   57|      0|      out_val = -1;
   58|      0|    else
   59|      0|      out_val = 0;
   60|  51.1k|  } else {
   61|  51.1k|    out_val = (WORD32)a >> b;
   62|  51.1k|  }
   63|       |
   64|  51.1k|  return out_val;
   65|  51.1k|}
ixheaacd_qmf_dec.c:ixheaac_sub32_sat:
  225|  49.6M|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|  49.6M|  WORD64 diff;
  227|       |
  228|  49.6M|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|  49.6M|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  49.6M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  3.04k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (230:7): [True: 3.04k, False: 49.6M]
  ------------------
  231|  49.6M|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  49.6M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  2.98k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (231:7): [True: 2.98k, False: 49.6M]
  ------------------
  232|       |
  233|  49.6M|  return (WORD32)diff;
  234|  49.6M|}
ixheaacd_qmf_dec.c:ixheaac_add32_sat:
  197|   283M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|   283M|  WORD64 sum;
  199|       |
  200|   283M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|   283M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   283M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   118k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 118k, False: 283M]
  ------------------
  203|   283M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   283M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   118k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 118k, False: 283M]
  ------------------
  204|       |
  205|   283M|  return (WORD32)sum;
  206|   283M|}
ixheaacd_qmf_dec.c:ixheaac_mult16x16in32:
  126|   387M|static PLATFORM_INLINE WORD32 ixheaac_mult16x16in32(WORD16 a, WORD16 b) {
  127|   387M|  WORD32 product;
  128|       |
  129|   387M|  product = (WORD32)a * (WORD32)b;
  130|       |
  131|   387M|  return product;
  132|   387M|}
ixheaacd_qmf_dec.c:ixheaac_add32:
  181|   155M|static PLATFORM_INLINE WORD32 ixheaac_add32(WORD32 a, WORD32 b) {
  182|   155M|  WORD32 sum;
  183|       |
  184|   155M|  sum = (WORD32)a + (WORD32)b;
  185|       |
  186|   155M|  return sum;
  187|   155M|}
ixheaacd_qmf_dec.c:ixheaac_min32:
   23|  50.4k|static PLATFORM_INLINE WORD32 ixheaac_min32(WORD32 a, WORD32 b) {
   24|  50.4k|  WORD32 min_val;
   25|       |
   26|  50.4k|  min_val = (a < b) ? a : b;
  ------------------
  |  Branch (26:13): [True: 0, False: 50.4k]
  ------------------
   27|       |
   28|  50.4k|  return min_val;
   29|  50.4k|}
ixheaacd_tcx_fwd_alcnx.c:ixheaac_norm32:
  236|   223k|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|   223k|  WORD norm_val;
  238|       |
  239|   223k|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 37.7k, False: 185k]
  ------------------
  240|  37.7k|    norm_val = 31;
  241|   185k|  } else {
  242|   185k|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 0, False: 185k]
  ------------------
  243|      0|      norm_val = 31;
  244|   185k|    } else {
  245|   185k|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 124, False: 185k]
  ------------------
  246|    124|        a = ~a;
  247|    124|      }
  248|  4.66M|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 4.47M, False: 185k]
  ------------------
  249|  4.47M|        a <<= 1;
  250|  4.47M|      }
  251|   185k|    }
  252|   185k|  }
  253|       |
  254|   223k|  return norm_val;
  255|   223k|}
ixheaacd_tcx_fwd_mdct.c:ixheaac_norm32:
  236|   211k|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|   211k|  WORD norm_val;
  238|       |
  239|   211k|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 0, False: 211k]
  ------------------
  240|      0|    norm_val = 31;
  241|   211k|  } else {
  242|   211k|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 0, False: 211k]
  ------------------
  243|      0|      norm_val = 31;
  244|   211k|    } else {
  245|   211k|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 0, False: 211k]
  ------------------
  246|      0|        a = ~a;
  247|      0|      }
  248|  6.48M|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 6.27M, False: 211k]
  ------------------
  249|  6.27M|        a <<= 1;
  250|  6.27M|      }
  251|   211k|    }
  252|   211k|  }
  253|       |
  254|   211k|  return norm_val;
  255|   211k|}
ixheaacd_tns.c:ixheaac_add32_sat:
  197|  10.2M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|  10.2M|  WORD64 sum;
  199|       |
  200|  10.2M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|  10.2M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  10.2M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   591k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 591k, False: 9.69M]
  ------------------
  203|  9.69M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  9.69M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   121k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 121k, False: 9.57M]
  ------------------
  204|       |
  205|  9.57M|  return (WORD32)sum;
  206|  9.69M|}
ixheaacd_tns.c:ixheaac_abs32_sat:
  295|  10.2M|static PLATFORM_INLINE WORD32 ixheaac_abs32_sat(WORD32 a) {
  296|  10.2M|  WORD32 abs_val;
  297|       |
  298|  10.2M|  abs_val = a;
  299|       |
  300|  10.2M|  if (a == MIN_32) {
  ------------------
  |  |   61|  10.2M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (300:7): [True: 121k, False: 10.1M]
  ------------------
  301|   121k|    abs_val = MAX_32;
  ------------------
  |  |   60|   121k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  302|  10.1M|  } else if (a < 0) {
  ------------------
  |  Branch (302:14): [True: 1.69M, False: 8.47M]
  ------------------
  303|  1.69M|    abs_val = -a;
  304|  1.69M|  }
  305|       |
  306|  10.2M|  return abs_val;
  307|  10.2M|}
ixheaacd_tns.c:ixheaac_min32:
   23|   428k|static PLATFORM_INLINE WORD32 ixheaac_min32(WORD32 a, WORD32 b) {
   24|   428k|  WORD32 min_val;
   25|       |
   26|   428k|  min_val = (a < b) ? a : b;
  ------------------
  |  Branch (26:13): [True: 172k, False: 256k]
  ------------------
   27|       |
   28|   428k|  return min_val;
   29|   428k|}
ixheaacd_tns.c:ixheaac_norm32:
  236|   102k|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|   102k|  WORD norm_val;
  238|       |
  239|   102k|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 0, False: 102k]
  ------------------
  240|      0|    norm_val = 31;
  241|   102k|  } else {
  242|   102k|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 0, False: 102k]
  ------------------
  243|      0|      norm_val = 31;
  244|   102k|    } else {
  245|   102k|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 0, False: 102k]
  ------------------
  246|      0|        a = ~a;
  247|      0|      }
  248|  3.05M|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 2.94M, False: 102k]
  ------------------
  249|  2.94M|        a <<= 1;
  250|  2.94M|      }
  251|   102k|    }
  252|   102k|  }
  253|       |
  254|   102k|  return norm_val;
  255|   102k|}
ixheaacd_tns.c:ixheaac_sub32_sat:
  225|  3.68M|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|  3.68M|  WORD64 diff;
  227|       |
  228|  3.68M|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|  3.68M|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  3.68M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|    215|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (230:7): [True: 215, False: 3.67M]
  ------------------
  231|  3.67M|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  3.67M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|    463|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (231:7): [True: 463, False: 3.67M]
  ------------------
  232|       |
  233|  3.67M|  return (WORD32)diff;
  234|  3.67M|}
ixheaacd_tns.c:ixheaac_shl32:
   39|  3.68M|static PLATFORM_INLINE WORD32 ixheaac_shl32(WORD32 a, WORD b) {
   40|  3.68M|  WORD32 out_val;
   41|       |
   42|  3.68M|  b = ((UWORD32)(b << 24) >> 24);
   43|  3.68M|  if (b > 31)
  ------------------
  |  Branch (43:7): [True: 0, False: 3.68M]
  ------------------
   44|      0|    out_val = 0;
   45|  3.68M|  else
   46|  3.68M|    out_val = (WORD32)a << b;
   47|       |
   48|  3.68M|  return out_val;
   49|  3.68M|}
ixheaac_esbr_fft.c:ixheaac_norm32:
  236|  39.5M|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|  39.5M|  WORD norm_val;
  238|       |
  239|  39.5M|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 0, False: 39.5M]
  ------------------
  240|      0|    norm_val = 31;
  241|  39.5M|  } else {
  242|  39.5M|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 0, False: 39.5M]
  ------------------
  243|      0|      norm_val = 31;
  244|  39.5M|    } else {
  245|  39.5M|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 0, False: 39.5M]
  ------------------
  246|      0|        a = ~a;
  247|      0|      }
  248|  1.07G|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 1.03G, False: 39.5M]
  ------------------
  249|  1.03G|        a <<= 1;
  250|  1.03G|      }
  251|  39.5M|    }
  252|  39.5M|  }
  253|       |
  254|  39.5M|  return norm_val;
  255|  39.5M|}
ixheaacd_acelp_bitparse.c:ixheaac_add32_sat:
  197|  69.1M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|  69.1M|  WORD64 sum;
  199|       |
  200|  69.1M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|  69.1M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  69.1M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  24.1k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 24.1k, False: 69.1M]
  ------------------
  203|  69.1M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  69.1M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  1.99M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 1.99M, False: 67.1M]
  ------------------
  204|       |
  205|  67.1M|  return (WORD32)sum;
  206|  69.1M|}
ixheaacd_avq_dec.c:ixheaac_negate32_sat:
  317|   361k|static PLATFORM_INLINE WORD32 ixheaac_negate32_sat(WORD32 a) {
  318|   361k|  WORD32 neg_val;
  319|       |
  320|   361k|  if (a == MIN_32) {
  ------------------
  |  |   61|   361k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (320:7): [True: 0, False: 361k]
  ------------------
  321|      0|    neg_val = MAX_32;
  ------------------
  |  |   60|      0|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  322|   361k|  } else {
  323|   361k|    neg_val = -a;
  324|   361k|  }
  325|   361k|  return neg_val;
  326|   361k|}
ixheaacd_avq_dec.c:ixheaac_sub32_sat:
  225|  2.49M|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|  2.49M|  WORD64 diff;
  227|       |
  228|  2.49M|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|  2.49M|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  2.49M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|      0|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (230:7): [True: 0, False: 2.49M]
  ------------------
  231|  2.49M|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  2.49M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|      0|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (231:7): [True: 0, False: 2.49M]
  ------------------
  232|       |
  233|  2.49M|  return (WORD32)diff;
  234|  2.49M|}
ixheaacd_avq_dec.c:ixheaac_add32_sat:
  197|  8.03M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|  8.03M|  WORD64 sum;
  199|       |
  200|  8.03M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|  8.03M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  8.03M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  11.0k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 11.0k, False: 8.02M]
  ------------------
  203|  8.02M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  8.02M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|      0|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 0, False: 8.02M]
  ------------------
  204|       |
  205|  8.02M|  return (WORD32)sum;
  206|  8.02M|}
ixheaacd_avq_dec.c:ixheaac_shl32_sat:
   67|  2.29M|static PLATFORM_INLINE WORD32 ixheaac_shl32_sat(WORD32 a, WORD b) {
   68|  2.29M|  WORD32 out_val;
   69|  2.29M|  if (a > (MAX_32 >> b))
  ------------------
  |  |   60|  2.29M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (69:7): [True: 0, False: 2.29M]
  ------------------
   70|      0|    out_val = MAX_32;
  ------------------
  |  |   60|      0|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
   71|  2.29M|  else if (a < (MIN_32 >> b))
  ------------------
  |  |   61|  2.29M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (71:12): [True: 0, False: 2.29M]
  ------------------
   72|      0|    out_val = MIN_32;
  ------------------
  |  |   61|      0|#define MIN_32 (WORD32)0x80000000L
  ------------------
   73|  2.29M|  else
   74|  2.29M|    out_val = a << b;
   75|  2.29M|  return (out_val);
   76|  2.29M|}
ixheaacd_basic_ops.c:ixheaac_add32_sat:
  197|   458M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|   458M|  WORD64 sum;
  199|       |
  200|   458M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|   458M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   458M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  4.00M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 4.00M, False: 454M]
  ------------------
  203|   454M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   454M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   967k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 967k, False: 454M]
  ------------------
  204|       |
  205|   454M|  return (WORD32)sum;
  206|   454M|}
ixheaacd_basic_ops.c:ixheaac_shl32_sat:
   67|   370M|static PLATFORM_INLINE WORD32 ixheaac_shl32_sat(WORD32 a, WORD b) {
   68|   370M|  WORD32 out_val;
   69|   370M|  if (a > (MAX_32 >> b))
  ------------------
  |  |   60|   370M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (69:7): [True: 20.1M, False: 350M]
  ------------------
   70|  20.1M|    out_val = MAX_32;
  ------------------
  |  |   60|  20.1M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
   71|   350M|  else if (a < (MIN_32 >> b))
  ------------------
  |  |   61|   350M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (71:12): [True: 19.9M, False: 330M]
  ------------------
   72|  19.9M|    out_val = MIN_32;
  ------------------
  |  |   61|  19.9M|#define MIN_32 (WORD32)0x80000000L
  ------------------
   73|   330M|  else
   74|   330M|    out_val = a << b;
   75|   370M|  return (out_val);
   76|   370M|}
ixheaacd_basic_ops.c:ixheaac_negate32_sat:
  317|   211M|static PLATFORM_INLINE WORD32 ixheaac_negate32_sat(WORD32 a) {
  318|   211M|  WORD32 neg_val;
  319|       |
  320|   211M|  if (a == MIN_32) {
  ------------------
  |  |   61|   211M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (320:7): [True: 78.5k, False: 211M]
  ------------------
  321|  78.5k|    neg_val = MAX_32;
  ------------------
  |  |   60|  78.5k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  322|   211M|  } else {
  323|   211M|    neg_val = -a;
  324|   211M|  }
  325|   211M|  return neg_val;
  326|   211M|}
ixheaacd_fwd_alias_cnx.c:ixheaac_add32_sat:
  197|  1.74M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|  1.74M|  WORD64 sum;
  199|       |
  200|  1.74M|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|  1.74M|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  1.74M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  1.13k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 1.13k, False: 1.74M]
  ------------------
  203|  1.74M|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  1.74M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  1.03k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 1.03k, False: 1.73M]
  ------------------
  204|       |
  205|  1.73M|  return (WORD32)sum;
  206|  1.74M|}
ixheaacd_fwd_alias_cnx.c:ixheaac_sub32_sat:
  225|   314M|static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
  226|   314M|  WORD64 diff;
  227|       |
  228|   314M|  diff = (WORD64)a - (WORD64)b;
  229|       |
  230|   314M|  if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   314M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (diff >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  4.05M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (230:7): [True: 4.05M, False: 310M]
  ------------------
  231|   310M|  if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   310M|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (diff <= MIN_32) return MIN_32;
  ------------------
  |  |   61|  4.16M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (231:7): [True: 4.16M, False: 306M]
  ------------------
  232|       |
  233|   306M|  return (WORD32)diff;
  234|   310M|}
ixheaacd_fwd_alias_cnx.c:ixheaac_add32_sat3:
  208|  9.83M|static PLATFORM_INLINE WORD32 ixheaac_add32_sat3(WORD32 a, WORD32 b, WORD32 c) {
  209|  9.83M|  WORD64 sum;
  210|       |
  211|  9.83M|  sum = (WORD64)a + (WORD64)b;
  212|       |
  213|  9.83M|  sum = (WORD64)sum + (WORD64)c;
  214|       |
  215|  9.83M|  if (sum > MAX_32) {
  ------------------
  |  |   60|  9.83M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (215:7): [True: 170k, False: 9.66M]
  ------------------
  216|   170k|    sum = MAX_32;
  ------------------
  |  |   60|   170k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  217|   170k|  }
  218|  9.83M|  if (sum < MIN_32) {
  ------------------
  |  |   61|  9.83M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (218:7): [True: 181k, False: 9.65M]
  ------------------
  219|   181k|    sum = MIN_32;
  ------------------
  |  |   61|   181k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  220|   181k|  }
  221|       |
  222|  9.83M|  return (WORD32)sum;
  223|  9.83M|}
ixheaacd_mps_calc_m1m2_common.c:ixheaac_shr32:
   51|   423k|static PLATFORM_INLINE WORD32 ixheaac_shr32(WORD32 a, WORD b) {
   52|   423k|  WORD32 out_val;
   53|       |
   54|   423k|  b = ((UWORD32)(b << 24) >> 24);
   55|   423k|  if (b >= 31) {
  ------------------
  |  Branch (55:7): [True: 0, False: 423k]
  ------------------
   56|      0|    if (a < 0)
  ------------------
  |  Branch (56:9): [True: 0, False: 0]
  ------------------
   57|      0|      out_val = -1;
   58|      0|    else
   59|      0|      out_val = 0;
   60|   423k|  } else {
   61|   423k|    out_val = (WORD32)a >> b;
   62|   423k|  }
   63|       |
   64|   423k|  return out_val;
   65|   423k|}
ixheaacd_mps_calc_m1m2_common.c:ixheaac_shl32:
   39|   423k|static PLATFORM_INLINE WORD32 ixheaac_shl32(WORD32 a, WORD b) {
   40|   423k|  WORD32 out_val;
   41|       |
   42|   423k|  b = ((UWORD32)(b << 24) >> 24);
   43|   423k|  if (b > 31)
  ------------------
  |  Branch (43:7): [True: 0, False: 423k]
  ------------------
   44|      0|    out_val = 0;
   45|   423k|  else
   46|   423k|    out_val = (WORD32)a << b;
   47|       |
   48|   423k|  return out_val;
   49|   423k|}
ixheaacd_mps_calc_m1m2_common.c:ixheaac_add32_sat:
  197|   496k|static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
  198|   496k|  WORD64 sum;
  199|       |
  200|   496k|  sum = (WORD64)a + (WORD64)b;
  201|       |
  202|   496k|  if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|   496k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
                if (sum >= MAX_32) return MAX_32;
  ------------------
  |  |   60|  23.7k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (202:7): [True: 23.7k, False: 472k]
  ------------------
  203|   472k|  if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|   472k|#define MIN_32 (WORD32)0x80000000L
  ------------------
                if (sum <= MIN_32) return MIN_32;
  ------------------
  |  |   61|      0|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (203:7): [True: 0, False: 472k]
  ------------------
  204|       |
  205|   472k|  return (WORD32)sum;
  206|   472k|}
ixheaacd_mps_calc_m1m2_common.c:ixheaac_norm32:
  236|  1.89M|static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
  237|  1.89M|  WORD norm_val;
  238|       |
  239|  1.89M|  if (a == 0) {
  ------------------
  |  Branch (239:7): [True: 92.5k, False: 1.80M]
  ------------------
  240|  92.5k|    norm_val = 31;
  241|  1.80M|  } else {
  242|  1.80M|    if (a == (WORD32)0xffffffffL) {
  ------------------
  |  Branch (242:9): [True: 0, False: 1.80M]
  ------------------
  243|      0|      norm_val = 31;
  244|  1.80M|    } else {
  245|  1.80M|      if (a < 0) {
  ------------------
  |  Branch (245:11): [True: 4.30k, False: 1.80M]
  ------------------
  246|  4.30k|        a = ~a;
  247|  4.30k|      }
  248|  15.0M|      for (norm_val = 0; a < (WORD32)0x40000000L; norm_val++) {
  ------------------
  |  Branch (248:26): [True: 13.2M, False: 1.80M]
  ------------------
  249|  13.2M|        a <<= 1;
  250|  13.2M|      }
  251|  1.80M|    }
  252|  1.80M|  }
  253|       |
  254|  1.89M|  return norm_val;
  255|  1.89M|}
ixheaacd_mps_calc_m1m2_common.c:ixheaac_negate32_sat:
  317|  88.4k|static PLATFORM_INLINE WORD32 ixheaac_negate32_sat(WORD32 a) {
  318|  88.4k|  WORD32 neg_val;
  319|       |
  320|  88.4k|  if (a == MIN_32) {
  ------------------
  |  |   61|  88.4k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (320:7): [True: 0, False: 88.4k]
  ------------------
  321|      0|    neg_val = MAX_32;
  ------------------
  |  |   60|      0|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  322|  88.4k|  } else {
  323|  88.4k|    neg_val = -a;
  324|  88.4k|  }
  325|  88.4k|  return neg_val;
  326|  88.4k|}
ixheaacd_mps_calc_m1m2_common.c:ixheaac_add32_sat3:
  208|   224k|static PLATFORM_INLINE WORD32 ixheaac_add32_sat3(WORD32 a, WORD32 b, WORD32 c) {
  209|   224k|  WORD64 sum;
  210|       |
  211|   224k|  sum = (WORD64)a + (WORD64)b;
  212|       |
  213|   224k|  sum = (WORD64)sum + (WORD64)c;
  214|       |
  215|   224k|  if (sum > MAX_32) {
  ------------------
  |  |   60|   224k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (215:7): [True: 102k, False: 122k]
  ------------------
  216|   102k|    sum = MAX_32;
  ------------------
  |  |   60|   102k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  217|   102k|  }
  218|   224k|  if (sum < MIN_32) {
  ------------------
  |  |   61|   224k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (218:7): [True: 0, False: 224k]
  ------------------
  219|      0|    sum = MIN_32;
  ------------------
  |  |   61|      0|#define MIN_32 (WORD32)0x80000000L
  ------------------
  220|      0|  }
  221|       |
  222|   224k|  return (WORD32)sum;
  223|   224k|}
ixheaacd_mps_calc_m1m2_common.c:ixheaac_div32:
  328|   123k|static PLATFORM_INLINE WORD32 ixheaac_div32(WORD32 a, WORD32 b, WORD *q_format) {
  329|   123k|  WORD32 quotient;
  330|   123k|  UWORD32 mantissa_nr, mantissa_dr;
  331|   123k|  WORD16 sign = 0;
  332|       |
  333|   123k|  LOOPINDEX i;
  334|   123k|  WORD q_nr, q_dr;
  335|       |
  336|   123k|  if ((a < 0) && (0 != b)) {
  ------------------
  |  Branch (336:7): [True: 0, False: 123k]
  |  Branch (336:18): [True: 0, False: 0]
  ------------------
  337|      0|    a = -a;
  338|      0|    sign = (WORD16)(sign ^ -1);
  339|      0|  }
  340|       |
  341|   123k|  if (b < 0) {
  ------------------
  |  Branch (341:7): [True: 3.38k, False: 120k]
  ------------------
  342|  3.38k|    b = -b;
  343|  3.38k|    sign = (WORD16)(sign ^ -1);
  344|  3.38k|  }
  345|       |
  346|   123k|  if (0 == b) {
  ------------------
  |  Branch (346:7): [True: 15.6k, False: 108k]
  ------------------
  347|  15.6k|    *q_format = 0;
  348|  15.6k|    return (a);
  349|  15.6k|  }
  350|       |
  351|   108k|  quotient = 0;
  352|       |
  353|   108k|  q_nr = ixheaac_norm32(a);
  354|   108k|  mantissa_nr = (UWORD32)a << (q_nr);
  355|   108k|  q_dr = ixheaac_norm32(b);
  356|   108k|  mantissa_dr = (UWORD32)b << (q_dr);
  357|   108k|  *q_format = (WORD)(30 + q_nr - q_dr);
  358|       |
  359|  3.46M|  for (i = 0; i < 31; i++) {
  ------------------
  |  Branch (359:15): [True: 3.35M, False: 108k]
  ------------------
  360|  3.35M|    quotient = quotient << 1;
  361|       |
  362|  3.35M|    if (mantissa_nr >= mantissa_dr) {
  ------------------
  |  Branch (362:9): [True: 1.29M, False: 2.05M]
  ------------------
  363|  1.29M|      mantissa_nr = mantissa_nr - mantissa_dr;
  364|  1.29M|      quotient += 1;
  365|  1.29M|    }
  366|       |
  367|  3.35M|    mantissa_nr = (UWORD32)mantissa_nr << 1;
  368|  3.35M|  }
  369|       |
  370|   108k|  if (sign < 0) {
  ------------------
  |  Branch (370:7): [True: 3.38k, False: 104k]
  ------------------
  371|  3.38k|    quotient = -quotient;
  372|  3.38k|  }
  373|       |
  374|   108k|  return quotient;
  375|   123k|}

ixheaacd_headerdecode.c:ixheaac_mult32:
   78|   169k|static PLATFORM_INLINE WORD32 ixheaac_mult32(WORD32 a, WORD32 b) {
   79|   169k|  WORD32 result;
   80|   169k|  WORD64 temp_result;
   81|       |
   82|   169k|  temp_result = (WORD64)a * (WORD64)b;
   83|   169k|  result = (WORD32)(temp_result >> 32);
   84|       |
   85|   169k|  return (result);
   86|   169k|}
ixheaacd_lt_predict.c:ixheaac_mult32x16in32_shl_sat:
   56|  51.1M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32_shl_sat(WORD32 a, WORD16 b) {
   57|  51.1M|  WORD32 result;
   58|       |
   59|  51.1M|  if (a == (WORD32)0x80000000 && b == (WORD16)0x8000) {
  ------------------
  |  Branch (59:7): [True: 0, False: 51.1M]
  |  Branch (59:34): [True: 0, False: 0]
  ------------------
   60|      0|    result = (WORD32)0x7fffffff;
   61|  51.1M|  } else {
   62|  51.1M|    result = ixheaac_mult32x16in32_shl(a, b);
   63|  51.1M|  }
   64|       |
   65|  51.1M|  return (result);
   66|  51.1M|}
ixheaacd_lt_predict.c:ixheaac_mult32x16in32_shl:
   23|  75.8M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32_shl(WORD32 a, WORD16 b) {
   24|  75.8M|  WORD32 result;
   25|  75.8M|  WORD64 temp_result;
   26|       |
   27|  75.8M|  temp_result = (WORD64)a * (WORD64)b;
   28|       |
   29|  75.8M|  result = (WORD32)(temp_result >> 16);
   30|       |
   31|  75.8M|  return (result << 1);
   32|  75.8M|}
ixheaacd_lt_predict.c:ixheaac_mult32_shl:
   68|  14.8M|static PLATFORM_INLINE WORD32 ixheaac_mult32_shl(WORD32 a, WORD32 b) {
   69|  14.8M|  WORD32 result;
   70|  14.8M|  WORD64 temp_result;
   71|       |
   72|  14.8M|  temp_result = (WORD64)a * (WORD64)b;
   73|  14.8M|  result = (WORD32)(temp_result >> 32);
   74|       |
   75|  14.8M|  return (result << 1);
   76|  14.8M|}
ixheaacd_mps_bitdec.c:ixheaac_sat64_32:
  195|  12.4k|static PLATFORM_INLINE WORD32 ixheaac_sat64_32(WORD64 a) {
  196|  12.4k|  WORD32 result;
  197|  12.4k|  if (a >= MAX_32) {
  ------------------
  |  |   60|  12.4k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (197:7): [True: 88, False: 12.3k]
  ------------------
  198|     88|    result = MAX_32;
  ------------------
  |  |   60|     88|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  199|  12.3k|  } else if (a <= MIN_32) {
  ------------------
  |  |   61|  12.3k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (199:14): [True: 0, False: 12.3k]
  ------------------
  200|      0|    result = MIN_32;
  ------------------
  |  |   61|      0|#define MIN_32 (WORD32)0x80000000L
  ------------------
  201|  12.3k|  } else {
  202|  12.3k|    result = (WORD32)a;
  203|  12.3k|  }
  204|  12.4k|  return (result);
  205|  12.4k|}
ixheaacd_mps_bitdec.c:ixheaac_mult64:
  168|  12.4k|static PLATFORM_INLINE WORD64 ixheaac_mult64(WORD32 a, WORD32 b) {
  169|  12.4k|  WORD64 result;
  170|  12.4k|  result = (WORD64)a * (WORD64)b;
  171|  12.4k|  return (result);
  172|  12.4k|}
ixheaacd_mps_bitdec.c:ixheaac_mul32_sh:
  235|  67.4k|static PLATFORM_INLINE WORD32 ixheaac_mul32_sh(WORD32 a, WORD32 b, WORD8 shift) {
  236|  67.4k|  WORD32 result;
  237|  67.4k|  WORD64 temp_result;
  238|       |
  239|  67.4k|  temp_result = (WORD64)a * (WORD64)b;
  240|  67.4k|  result = (WORD32)(temp_result >> shift);
  241|       |
  242|  67.4k|  return (result);
  243|  67.4k|}
ixheaacd_mps_dec.c:ixheaac_sat64_32:
  195|  89.5M|static PLATFORM_INLINE WORD32 ixheaac_sat64_32(WORD64 a) {
  196|  89.5M|  WORD32 result;
  197|  89.5M|  if (a >= MAX_32) {
  ------------------
  |  |   60|  89.5M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (197:7): [True: 12.3M, False: 77.2M]
  ------------------
  198|  12.3M|    result = MAX_32;
  ------------------
  |  |   60|  12.3M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  199|  77.2M|  } else if (a <= MIN_32) {
  ------------------
  |  |   61|  77.2M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (199:14): [True: 12.5M, False: 64.6M]
  ------------------
  200|  12.5M|    result = MIN_32;
  ------------------
  |  |   61|  12.5M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  201|  64.6M|  } else {
  202|  64.6M|    result = (WORD32)a;
  203|  64.6M|  }
  204|  89.5M|  return (result);
  205|  89.5M|}
ixheaacd_mps_decorr.c:ixheaac_add64_sat:
  186|   181M|static PLATFORM_INLINE WORD64 ixheaac_add64_sat(WORD64 a, WORD64 b) {
  187|   181M|  WORD64 result, comp;
  188|   181M|  result = (a < 0) ? MIN_64 : MAX_64;
  ------------------
  |  |   58|      0|#define MIN_64 (WORD64)0x8000000000000000
  ------------------
                result = (a < 0) ? MIN_64 : MAX_64;
  ------------------
  |  |   57|   362M|#define MAX_64 (WORD64)0x7fffffffffffffff
  ------------------
  |  Branch (188:12): [True: 0, False: 181M]
  ------------------
  189|   181M|  comp = result - a;
  190|   181M|  if ((a < 0) == (b > comp)) result = a + b;
  ------------------
  |  Branch (190:7): [True: 160M, False: 21.0M]
  ------------------
  191|       |
  192|   181M|  return (result);
  193|   181M|}
ixheaacd_mps_decorr.c:ixheaac_mult32x32in64:
  132|   181M|static PLATFORM_INLINE WORD64 ixheaac_mult32x32in64(WORD32 a, WORD32 b) {
  133|   181M|  WORD64 result;
  134|       |
  135|   181M|  result = (WORD64)a * (WORD64)b;
  136|       |
  137|   181M|  return (result);
  138|   181M|}
ixheaacd_mps_decorr.c:ixheaac_mult32_shl:
   68|  3.88M|static PLATFORM_INLINE WORD32 ixheaac_mult32_shl(WORD32 a, WORD32 b) {
   69|  3.88M|  WORD32 result;
   70|  3.88M|  WORD64 temp_result;
   71|       |
   72|  3.88M|  temp_result = (WORD64)a * (WORD64)b;
   73|  3.88M|  result = (WORD32)(temp_result >> 32);
   74|       |
   75|  3.88M|  return (result << 1);
   76|  3.88M|}
ixheaacd_mps_hybrid_filt.c:ixheaac_mult32x16in32:
   34|  71.5M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32(WORD32 a, WORD16 b) {
   35|  71.5M|  WORD32 result;
   36|  71.5M|  WORD64 temp_result;
   37|       |
   38|  71.5M|  temp_result = (WORD64)a * (WORD64)b;
   39|       |
   40|  71.5M|  result = (WORD32)(temp_result >> 16);
   41|       |
   42|  71.5M|  return (result);
   43|  71.5M|}
ixheaacd_mps_mdct_2_qmf.c:ixheaac_mac32x32in64:
  140|  8.94M|static PLATFORM_INLINE WORD64 ixheaac_mac32x32in64(WORD64 sum, WORD32 a, WORD32 b) {
  141|  8.94M|  sum += (WORD64)a * (WORD64)b;
  142|       |
  143|  8.94M|  return (sum);
  144|  8.94M|}
ixheaacd_mps_mdct_2_qmf.c:ixheaac_sat64_32:
  195|  93.7M|static PLATFORM_INLINE WORD32 ixheaac_sat64_32(WORD64 a) {
  196|  93.7M|  WORD32 result;
  197|  93.7M|  if (a >= MAX_32) {
  ------------------
  |  |   60|  93.7M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (197:7): [True: 160k, False: 93.5M]
  ------------------
  198|   160k|    result = MAX_32;
  ------------------
  |  |   60|   160k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  199|  93.5M|  } else if (a <= MIN_32) {
  ------------------
  |  |   61|  93.5M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (199:14): [True: 162k, False: 93.4M]
  ------------------
  200|   162k|    result = MIN_32;
  ------------------
  |  |   61|   162k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  201|  93.4M|  } else {
  202|  93.4M|    result = (WORD32)a;
  203|  93.4M|  }
  204|  93.7M|  return (result);
  205|  93.7M|}
ixheaacd_mps_polyphase.c:ixheaac_mult32x16in32_shl:
   23|  3.30G|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32_shl(WORD32 a, WORD16 b) {
   24|  3.30G|  WORD32 result;
   25|  3.30G|  WORD64 temp_result;
   26|       |
   27|  3.30G|  temp_result = (WORD64)a * (WORD64)b;
   28|       |
   29|  3.30G|  result = (WORD32)(temp_result >> 16);
   30|       |
   31|  3.30G|  return (result << 1);
   32|  3.30G|}
ixheaacd_mps_polyphase.c:ixheaac_sat64_32:
  195|   101M|static PLATFORM_INLINE WORD32 ixheaac_sat64_32(WORD64 a) {
  196|   101M|  WORD32 result;
  197|   101M|  if (a >= MAX_32) {
  ------------------
  |  |   60|   101M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (197:7): [True: 0, False: 101M]
  ------------------
  198|      0|    result = MAX_32;
  ------------------
  |  |   60|      0|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  199|   101M|  } else if (a <= MIN_32) {
  ------------------
  |  |   61|   101M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (199:14): [True: 0, False: 101M]
  ------------------
  200|      0|    result = MIN_32;
  ------------------
  |  |   61|      0|#define MIN_32 (WORD32)0x80000000L
  ------------------
  201|   101M|  } else {
  202|   101M|    result = (WORD32)a;
  203|   101M|  }
  204|   101M|  return (result);
  205|   101M|}
ixheaacd_mps_polyphase.c:ixheaac_mult32x16in32:
   34|   480M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32(WORD32 a, WORD16 b) {
   35|   480M|  WORD32 result;
   36|   480M|  WORD64 temp_result;
   37|       |
   38|   480M|  temp_result = (WORD64)a * (WORD64)b;
   39|       |
   40|   480M|  result = (WORD32)(temp_result >> 16);
   41|       |
   42|   480M|  return (result);
   43|   480M|}
ixheaacd_mps_reshape_bb_env.c:ixheaac_mult32x16in32:
   34|  26.3M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32(WORD32 a, WORD16 b) {
   35|  26.3M|  WORD32 result;
   36|  26.3M|  WORD64 temp_result;
   37|       |
   38|  26.3M|  temp_result = (WORD64)a * (WORD64)b;
   39|       |
   40|  26.3M|  result = (WORD32)(temp_result >> 16);
   41|       |
   42|  26.3M|  return (result);
   43|  26.3M|}
ixheaacd_mps_reshape_bb_env.c:ixheaac_add64_sat:
  186|  68.7M|static PLATFORM_INLINE WORD64 ixheaac_add64_sat(WORD64 a, WORD64 b) {
  187|  68.7M|  WORD64 result, comp;
  188|  68.7M|  result = (a < 0) ? MIN_64 : MAX_64;
  ------------------
  |  |   58|      0|#define MIN_64 (WORD64)0x8000000000000000
  ------------------
                result = (a < 0) ? MIN_64 : MAX_64;
  ------------------
  |  |   57|   137M|#define MAX_64 (WORD64)0x7fffffffffffffff
  ------------------
  |  Branch (188:12): [True: 0, False: 68.7M]
  ------------------
  189|  68.7M|  comp = result - a;
  190|  68.7M|  if ((a < 0) == (b > comp)) result = a + b;
  ------------------
  |  Branch (190:7): [True: 63.6M, False: 5.11M]
  ------------------
  191|       |
  192|  68.7M|  return (result);
  193|  68.7M|}
ixheaacd_mps_reshape_bb_env.c:ixheaac_mult32x32in64:
  132|  73.3M|static PLATFORM_INLINE WORD64 ixheaac_mult32x32in64(WORD32 a, WORD32 b) {
  133|  73.3M|  WORD64 result;
  134|       |
  135|  73.3M|  result = (WORD64)a * (WORD64)b;
  136|       |
  137|  73.3M|  return (result);
  138|  73.3M|}
ixheaacd_mps_reshape_bb_env.c:ixheaac_mult32_shl:
   68|   185k|static PLATFORM_INLINE WORD32 ixheaac_mult32_shl(WORD32 a, WORD32 b) {
   69|   185k|  WORD32 result;
   70|   185k|  WORD64 temp_result;
   71|       |
   72|   185k|  temp_result = (WORD64)a * (WORD64)b;
   73|   185k|  result = (WORD32)(temp_result >> 32);
   74|       |
   75|   185k|  return (result << 1);
   76|   185k|}
ixheaacd_mps_reshape_bb_env.c:ixheaac_sat64_32:
  195|  2.59M|static PLATFORM_INLINE WORD32 ixheaac_sat64_32(WORD64 a) {
  196|  2.59M|  WORD32 result;
  197|  2.59M|  if (a >= MAX_32) {
  ------------------
  |  |   60|  2.59M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (197:7): [True: 78.6k, False: 2.51M]
  ------------------
  198|  78.6k|    result = MAX_32;
  ------------------
  |  |   60|  78.6k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  199|  2.51M|  } else if (a <= MIN_32) {
  ------------------
  |  |   61|  2.51M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (199:14): [True: 79.0k, False: 2.43M]
  ------------------
  200|  79.0k|    result = MIN_32;
  ------------------
  |  |   61|  79.0k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  201|  2.43M|  } else {
  202|  2.43M|    result = (WORD32)a;
  203|  2.43M|  }
  204|  2.59M|  return (result);
  205|  2.59M|}
ixheaacd_mps_res_tns.c:ixheaac_mult32x16in32_shl_sat:
   56|   163k|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32_shl_sat(WORD32 a, WORD16 b) {
   57|   163k|  WORD32 result;
   58|       |
   59|   163k|  if (a == (WORD32)0x80000000 && b == (WORD16)0x8000) {
  ------------------
  |  Branch (59:7): [True: 25.0k, False: 138k]
  |  Branch (59:34): [True: 0, False: 25.0k]
  ------------------
   60|      0|    result = (WORD32)0x7fffffff;
   61|   163k|  } else {
   62|   163k|    result = ixheaac_mult32x16in32_shl(a, b);
   63|   163k|  }
   64|       |
   65|   163k|  return (result);
   66|   163k|}
ixheaacd_mps_res_tns.c:ixheaac_mult32x16in32_shl:
   23|   163k|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32_shl(WORD32 a, WORD16 b) {
   24|   163k|  WORD32 result;
   25|   163k|  WORD64 temp_result;
   26|       |
   27|   163k|  temp_result = (WORD64)a * (WORD64)b;
   28|       |
   29|   163k|  result = (WORD32)(temp_result >> 16);
   30|       |
   31|   163k|  return (result << 1);
   32|   163k|}
ixheaacd_mps_smoothing.c:ixheaac_mult32_shl:
   68|   291k|static PLATFORM_INLINE WORD32 ixheaac_mult32_shl(WORD32 a, WORD32 b) {
   69|   291k|  WORD32 result;
   70|   291k|  WORD64 temp_result;
   71|       |
   72|   291k|  temp_result = (WORD64)a * (WORD64)b;
   73|   291k|  result = (WORD32)(temp_result >> 32);
   74|       |
   75|   291k|  return (result << 1);
   76|   291k|}
ixheaacd_mps_temp_process.c:ixheaac_mult32x32in64:
  132|  14.5M|static PLATFORM_INLINE WORD64 ixheaac_mult32x32in64(WORD32 a, WORD32 b) {
  133|  14.5M|  WORD64 result;
  134|       |
  135|  14.5M|  result = (WORD64)a * (WORD64)b;
  136|       |
  137|  14.5M|  return (result);
  138|  14.5M|}
ixheaacd_mps_temp_process.c:ixheaac_mac32x32in64:
  140|  18.4M|static PLATFORM_INLINE WORD64 ixheaac_mac32x32in64(WORD64 sum, WORD32 a, WORD32 b) {
  141|  18.4M|  sum += (WORD64)a * (WORD64)b;
  142|       |
  143|  18.4M|  return (sum);
  144|  18.4M|}
ixheaacd_mps_temp_process.c:ixheaac_sat64_32:
  195|  7.81M|static PLATFORM_INLINE WORD32 ixheaac_sat64_32(WORD64 a) {
  196|  7.81M|  WORD32 result;
  197|  7.81M|  if (a >= MAX_32) {
  ------------------
  |  |   60|  7.81M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (197:7): [True: 13.6k, False: 7.80M]
  ------------------
  198|  13.6k|    result = MAX_32;
  ------------------
  |  |   60|  13.6k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  199|  7.80M|  } else if (a <= MIN_32) {
  ------------------
  |  |   61|  7.80M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (199:14): [True: 13.5k, False: 7.79M]
  ------------------
  200|  13.5k|    result = MIN_32;
  ------------------
  |  |   61|  13.5k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  201|  7.79M|  } else {
  202|  7.79M|    result = (WORD32)a;
  203|  7.79M|  }
  204|  7.81M|  return (result);
  205|  7.81M|}
ixheaacd_mps_temp_process.c:ixheaac_mult32_shl:
   68|   270k|static PLATFORM_INLINE WORD32 ixheaac_mult32_shl(WORD32 a, WORD32 b) {
   69|   270k|  WORD32 result;
   70|   270k|  WORD64 temp_result;
   71|       |
   72|   270k|  temp_result = (WORD64)a * (WORD64)b;
   73|   270k|  result = (WORD32)(temp_result >> 32);
   74|       |
   75|   270k|  return (result << 1);
   76|   270k|}
ixheaacd_multichannel.c:ixheaac_mul32_sh:
  235|  3.35k|static PLATFORM_INLINE WORD32 ixheaac_mul32_sh(WORD32 a, WORD32 b, WORD8 shift) {
  236|  3.35k|  WORD32 result;
  237|  3.35k|  WORD64 temp_result;
  238|       |
  239|  3.35k|  temp_result = (WORD64)a * (WORD64)b;
  240|  3.35k|  result = (WORD32)(temp_result >> shift);
  241|       |
  242|  3.35k|  return (result);
  243|  3.35k|}
ixheaacd_multichannel.c:ixheaac_mult32x16in32:
   34|   251k|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32(WORD32 a, WORD16 b) {
   35|   251k|  WORD32 result;
   36|   251k|  WORD64 temp_result;
   37|       |
   38|   251k|  temp_result = (WORD64)a * (WORD64)b;
   39|       |
   40|   251k|  result = (WORD32)(temp_result >> 16);
   41|       |
   42|   251k|  return (result);
   43|   251k|}
ixheaacd_pns_js_thumb.c:ixheaac_mult32_shl_sat:
   88|  12.5M|static PLATFORM_INLINE WORD32 ixheaac_mult32_shl_sat(WORD32 a, WORD32 b) {
   89|  12.5M|  WORD32 result;
   90|       |
   91|  12.5M|  if (a == (WORD32)0x80000000 && b == (WORD32)0x80000000) {
  ------------------
  |  Branch (91:7): [True: 0, False: 12.5M]
  |  Branch (91:34): [True: 0, False: 0]
  ------------------
   92|      0|    result = 0x7fffffff;
   93|  12.5M|  } else {
   94|  12.5M|    result = ixheaac_mult32_shl(a, b);
   95|  12.5M|  }
   96|       |
   97|  12.5M|  return (result);
   98|  12.5M|}
ixheaacd_pns_js_thumb.c:ixheaac_mult32_shl:
   68|  12.5M|static PLATFORM_INLINE WORD32 ixheaac_mult32_shl(WORD32 a, WORD32 b) {
   69|  12.5M|  WORD32 result;
   70|  12.5M|  WORD64 temp_result;
   71|       |
   72|  12.5M|  temp_result = (WORD64)a * (WORD64)b;
   73|  12.5M|  result = (WORD32)(temp_result >> 32);
   74|       |
   75|  12.5M|  return (result << 1);
   76|  12.5M|}
ixheaacd_sbrdec_lpfuncs.c:ixheaac_mult32x16in32_shl:
   23|   204k|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32_shl(WORD32 a, WORD16 b) {
   24|   204k|  WORD32 result;
   25|   204k|  WORD64 temp_result;
   26|       |
   27|   204k|  temp_result = (WORD64)a * (WORD64)b;
   28|       |
   29|   204k|  result = (WORD32)(temp_result >> 16);
   30|       |
   31|   204k|  return (result << 1);
   32|   204k|}
ixheaacd_qmf_dec_generic.c:ixheaac_mult32x16in32:
   34|   787M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32(WORD32 a, WORD16 b) {
   35|   787M|  WORD32 result;
   36|   787M|  WORD64 temp_result;
   37|       |
   38|   787M|  temp_result = (WORD64)a * (WORD64)b;
   39|       |
   40|   787M|  result = (WORD32)(temp_result >> 16);
   41|       |
   42|   787M|  return (result);
   43|   787M|}
ixheaacd_qmf_dec_generic.c:ixheaac_mult32x16in32_shl:
   23|  49.1M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32_shl(WORD32 a, WORD16 b) {
   24|  49.1M|  WORD32 result;
   25|  49.1M|  WORD64 temp_result;
   26|       |
   27|  49.1M|  temp_result = (WORD64)a * (WORD64)b;
   28|       |
   29|  49.1M|  result = (WORD32)(temp_result >> 16);
   30|       |
   31|  49.1M|  return (result << 1);
   32|  49.1M|}
ixheaacd_qmf_dec_generic.c:ixheaac_mult64:
  168|  9.20G|static PLATFORM_INLINE WORD64 ixheaac_mult64(WORD32 a, WORD32 b) {
  169|  9.20G|  WORD64 result;
  170|  9.20G|  result = (WORD64)a * (WORD64)b;
  171|  9.20G|  return (result);
  172|  9.20G|}
ixheaacd_qmf_dec_generic.c:ixheaac_add64:
  207|  3.57G|static PLATFORM_INLINE WORD64 ixheaac_add64(WORD64 a, WORD64 b) {
  208|  3.57G|  WORD64 result;
  209|  3.57G|  result = a + b;
  210|  3.57G|  return (result);
  211|  3.57G|}
ixheaacd_qmf_dec_generic.c:ixheaac_sub64_sat:
  221|  1.19G|static PLATFORM_INLINE WORD64 ixheaac_sub64_sat(WORD64 a, WORD64 b) {
  222|  1.19G|  WORD64 diff;
  223|       |
  224|  1.19G|  diff = ixheaac_sub64(a, b);
  225|       |
  226|  1.19G|  if ((((WORD64)a ^ (WORD64)b) & (WORD64)MIN_64) != 0) {
  ------------------
  |  |   58|  1.19G|#define MIN_64 (WORD64)0x8000000000000000
  ------------------
  |  Branch (226:7): [True: 361M, False: 834M]
  ------------------
  227|   361M|    if (((WORD64)diff ^ (WORD64)a) & (WORD64)MIN_64) {
  ------------------
  |  |   58|   361M|#define MIN_64 (WORD64)0x8000000000000000
  ------------------
  |  Branch (227:9): [True: 0, False: 361M]
  ------------------
  228|      0|      diff = (a < 0L) ? MIN_64 : MAX_64;
  ------------------
  |  |   58|      0|#define MIN_64 (WORD64)0x8000000000000000
  ------------------
                    diff = (a < 0L) ? MIN_64 : MAX_64;
  ------------------
  |  |   57|      0|#define MAX_64 (WORD64)0x7fffffffffffffff
  ------------------
  |  Branch (228:14): [True: 0, False: 0]
  ------------------
  229|      0|    }
  230|   361M|  }
  231|       |
  232|  1.19G|  return (diff);
  233|  1.19G|}
ixheaacd_qmf_dec_generic.c:ixheaac_sub64:
  213|  1.19G|static PLATFORM_INLINE WORD64 ixheaac_sub64(WORD64 a, WORD64 b) {
  214|  1.19G|  WORD64 diff;
  215|       |
  216|  1.19G|  diff = (WORD64)a - (WORD64)b;
  217|       |
  218|  1.19G|  return diff;
  219|  1.19G|}
ixheaacd_aac_imdct.c:ixheaac_mac32x16in32:
  100|  62.3M|static PLATFORM_INLINE WORD32 ixheaac_mac32x16in32(WORD32 a, WORD32 b, WORD16 c) {
  101|  62.3M|  WORD32 result;
  102|       |
  103|  62.3M|  result = a + ixheaac_mult32x16in32(b, c);
  104|       |
  105|  62.3M|  return (result);
  106|  62.3M|}
ixheaacd_aac_imdct.c:ixheaac_mult32x16in32:
   34|   504M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32(WORD32 a, WORD16 b) {
   35|   504M|  WORD32 result;
   36|   504M|  WORD64 temp_result;
   37|       |
   38|   504M|  temp_result = (WORD64)a * (WORD64)b;
   39|       |
   40|   504M|  result = (WORD32)(temp_result >> 16);
   41|       |
   42|   504M|  return (result);
   43|   504M|}
ixheaacd_aac_imdct.c:ixheaac_mult32x16in32_shl:
   23|  61.4M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32_shl(WORD32 a, WORD16 b) {
   24|  61.4M|  WORD32 result;
   25|  61.4M|  WORD64 temp_result;
   26|       |
   27|  61.4M|  temp_result = (WORD64)a * (WORD64)b;
   28|       |
   29|  61.4M|  result = (WORD32)(temp_result >> 16);
   30|       |
   31|  61.4M|  return (result << 1);
   32|  61.4M|}
ixheaacd_aac_imdct.c:ixheaac_mult32_shl:
   68|   130M|static PLATFORM_INLINE WORD32 ixheaac_mult32_shl(WORD32 a, WORD32 b) {
   69|   130M|  WORD32 result;
   70|   130M|  WORD64 temp_result;
   71|       |
   72|   130M|  temp_result = (WORD64)a * (WORD64)b;
   73|   130M|  result = (WORD32)(temp_result >> 32);
   74|       |
   75|   130M|  return (result << 1);
   76|   130M|}
ixheaacd_aac_imdct.c:ixheaac_mult32x32in32:
   45|   154M|static PLATFORM_INLINE WORD32 ixheaac_mult32x32in32(WORD32 a, WORD32 b) {
   46|   154M|  WORD32 result;
   47|   154M|  WORD64 temp_result;
   48|       |
   49|   154M|  temp_result = (WORD64)a * (WORD64)b;
   50|       |
   51|   154M|  result = (WORD32)(temp_result >> 16);
   52|       |
   53|   154M|  return (result);
   54|   154M|}
ixheaacd_aac_imdct.c:ixheaac_mult32:
   78|   210M|static PLATFORM_INLINE WORD32 ixheaac_mult32(WORD32 a, WORD32 b) {
   79|   210M|  WORD32 result;
   80|   210M|  WORD64 temp_result;
   81|       |
   82|   210M|  temp_result = (WORD64)a * (WORD64)b;
   83|   210M|  result = (WORD32)(temp_result >> 32);
   84|       |
   85|   210M|  return (result);
   86|   210M|}
ixheaacd_aac_tns.c:ixheaac_mult32_shl_sat:
   88|  11.0M|static PLATFORM_INLINE WORD32 ixheaac_mult32_shl_sat(WORD32 a, WORD32 b) {
   89|  11.0M|  WORD32 result;
   90|       |
   91|  11.0M|  if (a == (WORD32)0x80000000 && b == (WORD32)0x80000000) {
  ------------------
  |  Branch (91:7): [True: 0, False: 11.0M]
  |  Branch (91:34): [True: 0, False: 0]
  ------------------
   92|      0|    result = 0x7fffffff;
   93|  11.0M|  } else {
   94|  11.0M|    result = ixheaac_mult32_shl(a, b);
   95|  11.0M|  }
   96|       |
   97|  11.0M|  return (result);
   98|  11.0M|}
ixheaacd_aac_tns.c:ixheaac_mult32_shl:
   68|  33.9M|static PLATFORM_INLINE WORD32 ixheaac_mult32_shl(WORD32 a, WORD32 b) {
   69|  33.9M|  WORD32 result;
   70|  33.9M|  WORD64 temp_result;
   71|       |
   72|  33.9M|  temp_result = (WORD64)a * (WORD64)b;
   73|  33.9M|  result = (WORD32)(temp_result >> 32);
   74|       |
   75|  33.9M|  return (result << 1);
   76|  33.9M|}
ixheaacd_aac_tns.c:ixheaac_mult32x16in32:
   34|  8.02M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32(WORD32 a, WORD16 b) {
   35|  8.02M|  WORD32 result;
   36|  8.02M|  WORD64 temp_result;
   37|       |
   38|  8.02M|  temp_result = (WORD64)a * (WORD64)b;
   39|       |
   40|  8.02M|  result = (WORD32)(temp_result >> 16);
   41|       |
   42|  8.02M|  return (result);
   43|  8.02M|}
ixheaacd_basic_funcs.c:ixheaac_mult32_shl_sat:
   88|  5.44M|static PLATFORM_INLINE WORD32 ixheaac_mult32_shl_sat(WORD32 a, WORD32 b) {
   89|  5.44M|  WORD32 result;
   90|       |
   91|  5.44M|  if (a == (WORD32)0x80000000 && b == (WORD32)0x80000000) {
  ------------------
  |  Branch (91:7): [True: 0, False: 5.44M]
  |  Branch (91:34): [True: 0, False: 0]
  ------------------
   92|      0|    result = 0x7fffffff;
   93|  5.44M|  } else {
   94|  5.44M|    result = ixheaac_mult32_shl(a, b);
   95|  5.44M|  }
   96|       |
   97|  5.44M|  return (result);
   98|  5.44M|}
ixheaacd_basic_funcs.c:ixheaac_mult32_shl:
   68|  5.44M|static PLATFORM_INLINE WORD32 ixheaac_mult32_shl(WORD32 a, WORD32 b) {
   69|  5.44M|  WORD32 result;
   70|  5.44M|  WORD64 temp_result;
   71|       |
   72|  5.44M|  temp_result = (WORD64)a * (WORD64)b;
   73|  5.44M|  result = (WORD32)(temp_result >> 32);
   74|       |
   75|  5.44M|  return (result << 1);
   76|  5.44M|}
ixheaacd_basic_funcs.c:ixheaac_mult32x16in32_shl_sat:
   56|   544k|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32_shl_sat(WORD32 a, WORD16 b) {
   57|   544k|  WORD32 result;
   58|       |
   59|   544k|  if (a == (WORD32)0x80000000 && b == (WORD16)0x8000) {
  ------------------
  |  Branch (59:7): [True: 0, False: 544k]
  |  Branch (59:34): [True: 0, False: 0]
  ------------------
   60|      0|    result = (WORD32)0x7fffffff;
   61|   544k|  } else {
   62|   544k|    result = ixheaac_mult32x16in32_shl(a, b);
   63|   544k|  }
   64|       |
   65|   544k|  return (result);
   66|   544k|}
ixheaacd_basic_funcs.c:ixheaac_mult32x16in32_shl:
   23|  1.08M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32_shl(WORD32 a, WORD16 b) {
   24|  1.08M|  WORD32 result;
   25|  1.08M|  WORD64 temp_result;
   26|       |
   27|  1.08M|  temp_result = (WORD64)a * (WORD64)b;
   28|       |
   29|  1.08M|  result = (WORD32)(temp_result >> 16);
   30|       |
   31|  1.08M|  return (result << 1);
   32|  1.08M|}
ixheaacd_block.c:ixheaac_mult32_shl:
   68|  12.4M|static PLATFORM_INLINE WORD32 ixheaac_mult32_shl(WORD32 a, WORD32 b) {
   69|  12.4M|  WORD32 result;
   70|  12.4M|  WORD64 temp_result;
   71|       |
   72|  12.4M|  temp_result = (WORD64)a * (WORD64)b;
   73|  12.4M|  result = (WORD32)(temp_result >> 32);
   74|       |
   75|  12.4M|  return (result << 1);
   76|  12.4M|}
ixheaacd_block.c:ixheaac_mac32x16in32_shl:
  108|  12.4M|static PLATFORM_INLINE WORD32 ixheaac_mac32x16in32_shl(WORD32 a, WORD32 b, WORD16 c) {
  109|  12.4M|  WORD32 result;
  110|       |
  111|  12.4M|  result = a + ixheaac_mult32x16in32_shl(b, c);
  112|       |
  113|  12.4M|  return (result);
  114|  12.4M|}
ixheaacd_block.c:ixheaac_mult32x16in32:
   34|  72.8M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32(WORD32 a, WORD16 b) {
   35|  72.8M|  WORD32 result;
   36|  72.8M|  WORD64 temp_result;
   37|       |
   38|  72.8M|  temp_result = (WORD64)a * (WORD64)b;
   39|       |
   40|  72.8M|  result = (WORD32)(temp_result >> 16);
   41|       |
   42|  72.8M|  return (result);
   43|  72.8M|}
ixheaacd_block.c:ixheaac_mult32x16in32_shl:
   23|  36.0M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32_shl(WORD32 a, WORD16 b) {
   24|  36.0M|  WORD32 result;
   25|  36.0M|  WORD64 temp_result;
   26|       |
   27|  36.0M|  temp_result = (WORD64)a * (WORD64)b;
   28|       |
   29|  36.0M|  result = (WORD32)(temp_result >> 16);
   30|       |
   31|  36.0M|  return (result << 1);
   32|  36.0M|}
ixheaacd_env_calc.c:ixheaac_mult32x16in32:
   34|  30.1M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32(WORD32 a, WORD16 b) {
   35|  30.1M|  WORD32 result;
   36|  30.1M|  WORD64 temp_result;
   37|       |
   38|  30.1M|  temp_result = (WORD64)a * (WORD64)b;
   39|       |
   40|  30.1M|  result = (WORD32)(temp_result >> 16);
   41|       |
   42|  30.1M|  return (result);
   43|  30.1M|}
ixheaacd_ext_ch_ele.c:ixheaac_mac32x32in64:
  140|   891k|static PLATFORM_INLINE WORD64 ixheaac_mac32x32in64(WORD64 sum, WORD32 a, WORD32 b) {
  141|   891k|  sum += (WORD64)a * (WORD64)b;
  142|       |
  143|   891k|  return (sum);
  144|   891k|}
ixheaacd_ext_ch_ele.c:ixheaac_mac32x32in64_n:
  160|   594k|                                                     WORD32 n) {
  161|   594k|  WORD32 k;
  162|       |
  163|   594k|  sum += (WORD64)a[0] * (WORD64)b[0];
  164|  2.97M|  for (k = 1; k < n; k++) sum += (WORD64)a[k] * (WORD64)b[k];
  ------------------
  |  Branch (164:15): [True: 2.37M, False: 594k]
  ------------------
  165|   594k|  return (sum);
  166|   594k|}
ixheaacd_ext_ch_ele.c:ixheaac_mac32x32in64_7:
  146|  12.2M|static PLATFORM_INLINE WORD64 ixheaac_mac32x32in64_7(const WORD32 *a, const WORD16 *b) {
  147|  12.2M|  WORD64 sum;
  148|  12.2M|  sum = (WORD64)a[0] * (WORD64)b[0];
  149|  12.2M|  sum += (WORD64)a[1] * (WORD64)b[1];
  150|  12.2M|  sum += (WORD64)a[2] * (WORD64)b[2];
  151|  12.2M|  sum += (WORD64)a[3] * (WORD64)b[3];
  152|  12.2M|  sum += (WORD64)a[4] * (WORD64)b[4];
  153|  12.2M|  sum += (WORD64)a[5] * (WORD64)b[5];
  154|  12.2M|  sum += (WORD64)a[6] * (WORD64)b[6];
  155|       |
  156|  12.2M|  return (sum);
  157|  12.2M|}
ixheaacd_ext_ch_ele.c:ixheaac_sat64_32:
  195|  20.0M|static PLATFORM_INLINE WORD32 ixheaac_sat64_32(WORD64 a) {
  196|  20.0M|  WORD32 result;
  197|  20.0M|  if (a >= MAX_32) {
  ------------------
  |  |   60|  20.0M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (197:7): [True: 112k, False: 19.8M]
  ------------------
  198|   112k|    result = MAX_32;
  ------------------
  |  |   60|   112k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  199|  19.8M|  } else if (a <= MIN_32) {
  ------------------
  |  |   61|  19.8M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (199:14): [True: 112k, False: 19.7M]
  ------------------
  200|   112k|    result = MIN_32;
  ------------------
  |  |   61|   112k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  201|  19.7M|  } else {
  202|  19.7M|    result = (WORD32)a;
  203|  19.7M|  }
  204|  20.0M|  return (result);
  205|  20.0M|}
ixheaacd_ext_ch_ele.c:ixheaac_mult32x32in64:
  132|  11.7M|static PLATFORM_INLINE WORD64 ixheaac_mult32x32in64(WORD32 a, WORD32 b) {
  133|  11.7M|  WORD64 result;
  134|       |
  135|  11.7M|  result = (WORD64)a * (WORD64)b;
  136|       |
  137|  11.7M|  return (result);
  138|  11.7M|}
ixheaacd_fft.c:ixheaac_sat64_32:
  195|  1.47G|static PLATFORM_INLINE WORD32 ixheaac_sat64_32(WORD64 a) {
  196|  1.47G|  WORD32 result;
  197|  1.47G|  if (a >= MAX_32) {
  ------------------
  |  |   60|  1.47G|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (197:7): [True: 0, False: 1.47G]
  ------------------
  198|      0|    result = MAX_32;
  ------------------
  |  |   60|      0|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  199|  1.47G|  } else if (a <= MIN_32) {
  ------------------
  |  |   61|  1.47G|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (199:14): [True: 0, False: 1.47G]
  ------------------
  200|      0|    result = MIN_32;
  ------------------
  |  |   61|      0|#define MIN_32 (WORD32)0x80000000L
  ------------------
  201|  1.47G|  } else {
  202|  1.47G|    result = (WORD32)a;
  203|  1.47G|  }
  204|  1.47G|  return (result);
  205|  1.47G|}
ixheaacd_fft.c:ixheaac_mult32_shl:
   68|  22.8M|static PLATFORM_INLINE WORD32 ixheaac_mult32_shl(WORD32 a, WORD32 b) {
   69|  22.8M|  WORD32 result;
   70|  22.8M|  WORD64 temp_result;
   71|       |
   72|  22.8M|  temp_result = (WORD64)a * (WORD64)b;
   73|  22.8M|  result = (WORD32)(temp_result >> 32);
   74|       |
   75|  22.8M|  return (result << 1);
   76|  22.8M|}
ixheaacd_imdct.c:ixheaac_mult32:
   78|   996M|static PLATFORM_INLINE WORD32 ixheaac_mult32(WORD32 a, WORD32 b) {
   79|   996M|  WORD32 result;
   80|   996M|  WORD64 temp_result;
   81|       |
   82|   996M|  temp_result = (WORD64)a * (WORD64)b;
   83|   996M|  result = (WORD32)(temp_result >> 32);
   84|       |
   85|   996M|  return (result);
   86|   996M|}
ixheaacd_imdct.c:ixheaac_mul32_sh:
  235|  19.6M|static PLATFORM_INLINE WORD32 ixheaac_mul32_sh(WORD32 a, WORD32 b, WORD8 shift) {
  236|  19.6M|  WORD32 result;
  237|  19.6M|  WORD64 temp_result;
  238|       |
  239|  19.6M|  temp_result = (WORD64)a * (WORD64)b;
  240|  19.6M|  result = (WORD32)(temp_result >> shift);
  241|       |
  242|  19.6M|  return (result);
  243|  19.6M|}
ixheaacd_lpfuncs.c:ixheaac_mult32x16in32:
   34|   111M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32(WORD32 a, WORD16 b) {
   35|   111M|  WORD32 result;
   36|   111M|  WORD64 temp_result;
   37|       |
   38|   111M|  temp_result = (WORD64)a * (WORD64)b;
   39|       |
   40|   111M|  result = (WORD32)(temp_result >> 16);
   41|       |
   42|   111M|  return (result);
   43|   111M|}
ixheaacd_lpp_tran.c:ixheaac_mult32x16in32:
   34|  41.6M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32(WORD32 a, WORD16 b) {
   35|  41.6M|  WORD32 result;
   36|  41.6M|  WORD64 temp_result;
   37|       |
   38|  41.6M|  temp_result = (WORD64)a * (WORD64)b;
   39|       |
   40|  41.6M|  result = (WORD32)(temp_result >> 16);
   41|       |
   42|  41.6M|  return (result);
   43|  41.6M|}
ixheaacd_lpp_tran.c:ixheaac_mult32:
   78|  3.66M|static PLATFORM_INLINE WORD32 ixheaac_mult32(WORD32 a, WORD32 b) {
   79|  3.66M|  WORD32 result;
   80|  3.66M|  WORD64 temp_result;
   81|       |
   82|  3.66M|  temp_result = (WORD64)a * (WORD64)b;
   83|  3.66M|  result = (WORD32)(temp_result >> 32);
   84|       |
   85|  3.66M|  return (result);
   86|  3.66M|}
ixheaacd_mps_apply_m1.c:ixheaac_sat64_32:
  195|   612M|static PLATFORM_INLINE WORD32 ixheaac_sat64_32(WORD64 a) {
  196|   612M|  WORD32 result;
  197|   612M|  if (a >= MAX_32) {
  ------------------
  |  |   60|   612M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (197:7): [True: 46.3M, False: 565M]
  ------------------
  198|  46.3M|    result = MAX_32;
  ------------------
  |  |   60|  46.3M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  199|   565M|  } else if (a <= MIN_32) {
  ------------------
  |  |   61|   565M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (199:14): [True: 46.3M, False: 519M]
  ------------------
  200|  46.3M|    result = MIN_32;
  ------------------
  |  |   61|  46.3M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  201|   519M|  } else {
  202|   519M|    result = (WORD32)a;
  203|   519M|  }
  204|   612M|  return (result);
  205|   612M|}
ixheaacd_mps_apply_m2.c:ixheaac_sat64_32:
  195|   521M|static PLATFORM_INLINE WORD32 ixheaac_sat64_32(WORD64 a) {
  196|   521M|  WORD32 result;
  197|   521M|  if (a >= MAX_32) {
  ------------------
  |  |   60|   521M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (197:7): [True: 13.7M, False: 507M]
  ------------------
  198|  13.7M|    result = MAX_32;
  ------------------
  |  |   60|  13.7M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  199|   507M|  } else if (a <= MIN_32) {
  ------------------
  |  |   61|   507M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (199:14): [True: 13.8M, False: 493M]
  ------------------
  200|  13.8M|    result = MIN_32;
  ------------------
  |  |   61|  13.8M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  201|   493M|  } else {
  202|   493M|    result = (WORD32)a;
  203|   493M|  }
  204|   521M|  return (result);
  205|   521M|}
ixheaacd_mps_calc_m1m2_tree_515x.c:ixheaac_sat64_32:
  195|   682k|static PLATFORM_INLINE WORD32 ixheaac_sat64_32(WORD64 a) {
  196|   682k|  WORD32 result;
  197|   682k|  if (a >= MAX_32) {
  ------------------
  |  |   60|   682k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (197:7): [True: 4.04k, False: 678k]
  ------------------
  198|  4.04k|    result = MAX_32;
  ------------------
  |  |   60|  4.04k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  199|   678k|  } else if (a <= MIN_32) {
  ------------------
  |  |   61|   678k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (199:14): [True: 0, False: 678k]
  ------------------
  200|      0|    result = MIN_32;
  ------------------
  |  |   61|      0|#define MIN_32 (WORD32)0x80000000L
  ------------------
  201|   678k|  } else {
  202|   678k|    result = (WORD32)a;
  203|   678k|  }
  204|   682k|  return (result);
  205|   682k|}
ixheaacd_mps_calc_m1m2_tree_52xx.c:ixheaac_sat64_32:
  195|   129k|static PLATFORM_INLINE WORD32 ixheaac_sat64_32(WORD64 a) {
  196|   129k|  WORD32 result;
  197|   129k|  if (a >= MAX_32) {
  ------------------
  |  |   60|   129k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (197:7): [True: 1.95k, False: 127k]
  ------------------
  198|  1.95k|    result = MAX_32;
  ------------------
  |  |   60|  1.95k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  199|   127k|  } else if (a <= MIN_32) {
  ------------------
  |  |   61|   127k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (199:14): [True: 1.36k, False: 126k]
  ------------------
  200|  1.36k|    result = MIN_32;
  ------------------
  |  |   61|  1.36k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  201|   126k|  } else {
  202|   126k|    result = (WORD32)a;
  203|   126k|  }
  204|   129k|  return (result);
  205|   129k|}
ixheaacd_mps_calc_m1m2_tree_727x.c:ixheaac_sat64_32:
  195|   795k|static PLATFORM_INLINE WORD32 ixheaac_sat64_32(WORD64 a) {
  196|   795k|  WORD32 result;
  197|   795k|  if (a >= MAX_32) {
  ------------------
  |  |   60|   795k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (197:7): [True: 860, False: 794k]
  ------------------
  198|    860|    result = MAX_32;
  ------------------
  |  |   60|    860|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  199|   794k|  } else if (a <= MIN_32) {
  ------------------
  |  |   61|   794k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (199:14): [True: 1.96k, False: 792k]
  ------------------
  200|  1.96k|    result = MIN_32;
  ------------------
  |  |   61|  1.96k|#define MIN_32 (WORD32)0x80000000L
  ------------------
  201|   792k|  } else {
  202|   792k|    result = (WORD32)a;
  203|   792k|  }
  204|   795k|  return (result);
  205|   795k|}
ixheaacd_mps_res_block.c:ixheaac_mult32x16in32_shl:
   23|   180k|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32_shl(WORD32 a, WORD16 b) {
   24|   180k|  WORD32 result;
   25|   180k|  WORD64 temp_result;
   26|       |
   27|   180k|  temp_result = (WORD64)a * (WORD64)b;
   28|       |
   29|   180k|  result = (WORD32)(temp_result >> 16);
   30|       |
   31|   180k|  return (result << 1);
   32|   180k|}
ixheaacd_qmf_dec.c:ixheaac_add64:
  207|  1.98G|static PLATFORM_INLINE WORD64 ixheaac_add64(WORD64 a, WORD64 b) {
  208|  1.98G|  WORD64 result;
  209|  1.98G|  result = a + b;
  210|  1.98G|  return (result);
  211|  1.98G|}
ixheaacd_qmf_dec.c:ixheaac_mul32_sh:
  235|  21.9M|static PLATFORM_INLINE WORD32 ixheaac_mul32_sh(WORD32 a, WORD32 b, WORD8 shift) {
  236|  21.9M|  WORD32 result;
  237|  21.9M|  WORD64 temp_result;
  238|       |
  239|  21.9M|  temp_result = (WORD64)a * (WORD64)b;
  240|  21.9M|  result = (WORD32)(temp_result >> shift);
  241|       |
  242|  21.9M|  return (result);
  243|  21.9M|}
ixheaacd_qmf_dec.c:ixheaac_mult64:
  168|  2.48G|static PLATFORM_INLINE WORD64 ixheaac_mult64(WORD32 a, WORD32 b) {
  169|  2.48G|  WORD64 result;
  170|  2.48G|  result = (WORD64)a * (WORD64)b;
  171|  2.48G|  return (result);
  172|  2.48G|}
ixheaacd_qmf_dec.c:ixheaac_mac32x16in32_shl_sat:
  116|  49.6M|static PLATFORM_INLINE WORD32 ixheaac_mac32x16in32_shl_sat(WORD32 a, WORD32 b, WORD16 c) {
  117|  49.6M|  WORD32 result;
  118|       |
  119|  49.6M|  result = ixheaac_add32_sat(a, ixheaac_mult32x16in32_shl_sat(b, c));
  120|       |
  121|  49.6M|  return (result);
  122|  49.6M|}
ixheaacd_qmf_dec.c:ixheaac_mult32x16in32_shl_sat:
   56|  49.6M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32_shl_sat(WORD32 a, WORD16 b) {
   57|  49.6M|  WORD32 result;
   58|       |
   59|  49.6M|  if (a == (WORD32)0x80000000 && b == (WORD16)0x8000) {
  ------------------
  |  Branch (59:7): [True: 22, False: 49.6M]
  |  Branch (59:34): [True: 0, False: 22]
  ------------------
   60|      0|    result = (WORD32)0x7fffffff;
   61|  49.6M|  } else {
   62|  49.6M|    result = ixheaac_mult32x16in32_shl(a, b);
   63|  49.6M|  }
   64|       |
   65|  49.6M|  return (result);
   66|  49.6M|}
ixheaacd_qmf_dec.c:ixheaac_mult32x16in32_shl:
   23|   198M|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32_shl(WORD32 a, WORD16 b) {
   24|   198M|  WORD32 result;
   25|   198M|  WORD64 temp_result;
   26|       |
   27|   198M|  temp_result = (WORD64)a * (WORD64)b;
   28|       |
   29|   198M|  result = (WORD32)(temp_result >> 16);
   30|       |
   31|   198M|  return (result << 1);
   32|   198M|}
ixheaacd_tns.c:ixheaac_mult32_shl_sat:
   88|  10.2M|static PLATFORM_INLINE WORD32 ixheaac_mult32_shl_sat(WORD32 a, WORD32 b) {
   89|  10.2M|  WORD32 result;
   90|       |
   91|  10.2M|  if (a == (WORD32)0x80000000 && b == (WORD32)0x80000000) {
  ------------------
  |  Branch (91:7): [True: 0, False: 10.2M]
  |  Branch (91:34): [True: 0, False: 0]
  ------------------
   92|      0|    result = 0x7fffffff;
   93|  10.2M|  } else {
   94|  10.2M|    result = ixheaac_mult32_shl(a, b);
   95|  10.2M|  }
   96|       |
   97|  10.2M|  return (result);
   98|  10.2M|}
ixheaacd_tns.c:ixheaac_mult32_shl:
   68|  10.2M|static PLATFORM_INLINE WORD32 ixheaac_mult32_shl(WORD32 a, WORD32 b) {
   69|  10.2M|  WORD32 result;
   70|  10.2M|  WORD64 temp_result;
   71|       |
   72|  10.2M|  temp_result = (WORD64)a * (WORD64)b;
   73|  10.2M|  result = (WORD32)(temp_result >> 32);
   74|       |
   75|  10.2M|  return (result << 1);
   76|  10.2M|}
ixheaacd_tns.c:ixheaac_add64_sat:
  186|  24.8M|static PLATFORM_INLINE WORD64 ixheaac_add64_sat(WORD64 a, WORD64 b) {
  187|  24.8M|  WORD64 result, comp;
  188|  24.8M|  result = (a < 0) ? MIN_64 : MAX_64;
  ------------------
  |  |   58|  4.11M|#define MIN_64 (WORD64)0x8000000000000000
  ------------------
                result = (a < 0) ? MIN_64 : MAX_64;
  ------------------
  |  |   57|  45.5M|#define MAX_64 (WORD64)0x7fffffffffffffff
  ------------------
  |  Branch (188:12): [True: 4.11M, False: 20.7M]
  ------------------
  189|  24.8M|  comp = result - a;
  190|  24.8M|  if ((a < 0) == (b > comp)) result = a + b;
  ------------------
  |  Branch (190:7): [True: 24.8M, False: 2.53k]
  ------------------
  191|       |
  192|  24.8M|  return (result);
  193|  24.8M|}
ixheaacd_tns.c:ixheaac_mult64:
  168|  24.8M|static PLATFORM_INLINE WORD64 ixheaac_mult64(WORD32 a, WORD32 b) {
  169|  24.8M|  WORD64 result;
  170|  24.8M|  result = (WORD64)a * (WORD64)b;
  171|  24.8M|  return (result);
  172|  24.8M|}
ixheaacd_arith_dec.c:ixheaac_mult64_sat:
  174|  22.8M|static PLATFORM_INLINE WORD64 ixheaac_mult64_sat(WORD64 a, WORD64 b) {
  175|  22.8M|  WORD64 result;
  176|       |
  177|  22.8M|  if (a > 0 && b > 0 && a > MAX_64 / b) return MAX_64;
  ------------------
  |  |   57|  2.91M|#define MAX_64 (WORD64)0x7fffffffffffffff
  ------------------
                if (a > 0 && b > 0 && a > MAX_64 / b) return MAX_64;
  ------------------
  |  |   57|  41.0k|#define MAX_64 (WORD64)0x7fffffffffffffff
  ------------------
  |  Branch (177:7): [True: 13.4M, False: 9.44M]
  |  Branch (177:16): [True: 2.91M, False: 10.5M]
  |  Branch (177:25): [True: 41.0k, False: 2.87M]
  ------------------
  178|  22.8M|  if (a < 0 && b > 0 && a < MIN_64 / b) return MIN_64;
  ------------------
  |  |   58|      0|#define MIN_64 (WORD64)0x8000000000000000
  ------------------
                if (a < 0 && b > 0 && a < MIN_64 / b) return MIN_64;
  ------------------
  |  |   58|      0|#define MIN_64 (WORD64)0x8000000000000000
  ------------------
  |  Branch (178:7): [True: 0, False: 22.8M]
  |  Branch (178:16): [True: 0, False: 0]
  |  Branch (178:25): [True: 0, False: 0]
  ------------------
  179|  22.8M|  if (a > 0 && b < 0 && b < MIN_64 / a) return MIN_64;
  ------------------
  |  |   58|  4.39M|#define MIN_64 (WORD64)0x8000000000000000
  ------------------
                if (a > 0 && b < 0 && b < MIN_64 / a) return MIN_64;
  ------------------
  |  |   58|  23.3k|#define MIN_64 (WORD64)0x8000000000000000
  ------------------
  |  Branch (179:7): [True: 13.3M, False: 9.44M]
  |  Branch (179:16): [True: 4.39M, False: 9.00M]
  |  Branch (179:25): [True: 23.3k, False: 4.37M]
  ------------------
  180|  22.8M|  if (a < 0 && b < 0 && a < MAX_64 / b) return MAX_64;
  ------------------
  |  |   57|      0|#define MAX_64 (WORD64)0x7fffffffffffffff
  ------------------
                if (a < 0 && b < 0 && a < MAX_64 / b) return MAX_64;
  ------------------
  |  |   57|      0|#define MAX_64 (WORD64)0x7fffffffffffffff
  ------------------
  |  Branch (180:7): [True: 0, False: 22.8M]
  |  Branch (180:16): [True: 0, False: 0]
  |  Branch (180:25): [True: 0, False: 0]
  ------------------
  181|       |
  182|  22.8M|  result = a * b;
  183|  22.8M|  return (result);
  184|  22.8M|}
ixheaacd_avq_dec.c:ixheaac_sat64_32:
  195|  3.43M|static PLATFORM_INLINE WORD32 ixheaac_sat64_32(WORD64 a) {
  196|  3.43M|  WORD32 result;
  197|  3.43M|  if (a >= MAX_32) {
  ------------------
  |  |   60|  3.43M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (197:7): [True: 6.32k, False: 3.42M]
  ------------------
  198|  6.32k|    result = MAX_32;
  ------------------
  |  |   60|  6.32k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  199|  3.42M|  } else if (a <= MIN_32) {
  ------------------
  |  |   61|  3.42M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (199:14): [True: 0, False: 3.42M]
  ------------------
  200|      0|    result = MIN_32;
  ------------------
  |  |   61|      0|#define MIN_32 (WORD32)0x80000000L
  ------------------
  201|  3.42M|  } else {
  202|  3.42M|    result = (WORD32)a;
  203|  3.42M|  }
  204|  3.43M|  return (result);
  205|  3.43M|}
ixheaacd_fwd_alias_cnx.c:ixheaac_mul32_sh:
  235|   336M|static PLATFORM_INLINE WORD32 ixheaac_mul32_sh(WORD32 a, WORD32 b, WORD8 shift) {
  236|   336M|  WORD32 result;
  237|   336M|  WORD64 temp_result;
  238|       |
  239|   336M|  temp_result = (WORD64)a * (WORD64)b;
  240|   336M|  result = (WORD32)(temp_result >> shift);
  241|       |
  242|   336M|  return (result);
  243|   336M|}
ixheaacd_mps_calc_m1m2_common.c:ixheaac_mult32_shl:
   68|   168k|static PLATFORM_INLINE WORD32 ixheaac_mult32_shl(WORD32 a, WORD32 b) {
   69|   168k|  WORD32 result;
   70|   168k|  WORD64 temp_result;
   71|       |
   72|   168k|  temp_result = (WORD64)a * (WORD64)b;
   73|   168k|  result = (WORD32)(temp_result >> 32);
   74|       |
   75|   168k|  return (result << 1);
   76|   168k|}
ixheaacd_mps_calc_m1m2_common.c:ixheaac_sat64_32:
  195|  4.54M|static PLATFORM_INLINE WORD32 ixheaac_sat64_32(WORD64 a) {
  196|  4.54M|  WORD32 result;
  197|  4.54M|  if (a >= MAX_32) {
  ------------------
  |  |   60|  4.54M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (197:7): [True: 2.09k, False: 4.53M]
  ------------------
  198|  2.09k|    result = MAX_32;
  ------------------
  |  |   60|  2.09k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  199|  4.53M|  } else if (a <= MIN_32) {
  ------------------
  |  |   61|  4.53M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (199:14): [True: 0, False: 4.53M]
  ------------------
  200|      0|    result = MIN_32;
  ------------------
  |  |   61|      0|#define MIN_32 (WORD32)0x80000000L
  ------------------
  201|  4.53M|  } else {
  202|  4.53M|    result = (WORD32)a;
  203|  4.53M|  }
  204|  4.54M|  return (result);
  205|  4.54M|}
ixheaacd_mps_calc_m1m2_common.c:ixheaac_mult32x16in32:
   34|   181k|static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32(WORD32 a, WORD16 b) {
   35|   181k|  WORD32 result;
   36|   181k|  WORD64 temp_result;
   37|       |
   38|   181k|  temp_result = (WORD64)a * (WORD64)b;
   39|       |
   40|   181k|  result = (WORD32)(temp_result >> 16);
   41|       |
   42|   181k|  return (result);
   43|   181k|}

ixheaac_real_synth_fft_p2:
   42|  13.1M|void ixheaac_real_synth_fft_p2(FLOAT32 *ptr_x, FLOAT32 *ptr_y, WORD32 npoints) {
   43|  13.1M|  WORD32 i, j, k, n_stages, h2;
   44|  13.1M|  FLOAT32 x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;
   45|  13.1M|  WORD32 del, nodespacing, in_loop_cnt;
   46|  13.1M|  WORD32 not_power_4;
   47|  13.1M|  WORD32 dig_rev_shift;
   48|  13.1M|  const FLOAT32 *ptr_w;
   49|       |
   50|  13.1M|  dig_rev_shift = ixheaac_norm32(npoints) + 1 - 16;
   51|  13.1M|  n_stages = 30 - ixheaac_norm32(npoints);
   52|  13.1M|  not_power_4 = n_stages & 1;
   53|       |
   54|  13.1M|  n_stages = n_stages >> 1;
   55|       |
   56|  13.1M|  ptr_w = ixheaac_twiddle_table_fft_float;
   57|       |
   58|  53.6M|  for (i = 0; i < npoints; i += 4) {
  ------------------
  |  Branch (58:15): [True: 40.4M, False: 13.1M]
  ------------------
   59|  40.4M|    FLOAT32 *inp = ptr_x;
   60|       |
   61|  40.4M|    DIG_REV(i, dig_rev_shift, h2);
  ------------------
  |  |   30|  40.4M|  do {                                                      \
  |  |   31|  40.4M|    unsigned _ = (i);                                       \
  |  |   32|  40.4M|    _ = ((_ & 0x33333333) << 2) | ((_ & ~0x33333333) >> 2); \
  |  |   33|  40.4M|    _ = ((_ & 0x0F0F0F0F) << 4) | ((_ & ~0x0F0F0F0F) >> 4); \
  |  |   34|  40.4M|    _ = ((_ & 0x00FF00FF) << 8) | ((_ & ~0x00FF00FF) >> 8); \
  |  |   35|  40.4M|    (j) = _ >> (m);                                         \
  |  |   36|  40.4M|  } while (0)
  |  |  ------------------
  |  |  |  Branch (36:12): [Folded, False: 40.4M]
  |  |  ------------------
  ------------------
   62|  40.4M|    if (not_power_4) {
  ------------------
  |  Branch (62:9): [True: 25.1M, False: 15.3M]
  ------------------
   63|  25.1M|      h2 += 1;
   64|  25.1M|      h2 &= ~1;
   65|  25.1M|    }
   66|  40.4M|    inp += (h2 >> 1);
   67|       |
   68|  40.4M|    x0r = *inp;
   69|  40.4M|    inp += (npoints >> 2);
   70|       |
   71|  40.4M|    x1r = *inp;
   72|  40.4M|    inp += (npoints >> 2);
   73|       |
   74|  40.4M|    x2r = *inp;
   75|  40.4M|    inp += (npoints >> 2);
   76|       |
   77|  40.4M|    x3r = *inp;
   78|       |
   79|  40.4M|    x0r = x0r + x2r;
   80|  40.4M|    x2r = x0r - (x2r * 2);
   81|  40.4M|    x1r = x1r + x3r;
   82|  40.4M|    x3r = x1r - (x3r * 2);
   83|  40.4M|    x0r = x0r + x1r;
   84|  40.4M|    x1r = x0r - (x1r * 2);
   85|       |
   86|  40.4M|    *ptr_y++ = x0r;
   87|  40.4M|    *ptr_y++ = 0;
   88|  40.4M|    *ptr_y++ = x2r;
   89|  40.4M|    *ptr_y++ = x3r;
   90|  40.4M|    *ptr_y++ = x1r;
   91|  40.4M|    *ptr_y++ = 0;
   92|  40.4M|    *ptr_y++ = x2r;
   93|  40.4M|    *ptr_y++ = -x3r;
   94|  40.4M|  }
   95|  13.1M|  ptr_y -= 2 * npoints;
   96|  13.1M|  del = 4;
   97|  13.1M|  nodespacing = 64;
   98|  13.1M|  in_loop_cnt = npoints >> 4;
   99|  18.0M|  for (i = n_stages - 1; i > 0; i--) {
  ------------------
  |  Branch (99:26): [True: 4.90M, False: 13.1M]
  ------------------
  100|  4.90M|    const FLOAT32 *twiddles = ptr_w;
  101|  4.90M|    FLOAT32 *data = ptr_y;
  102|  4.90M|    FLOAT32 W1, W2, W3, W4, W5, W6;
  103|  4.90M|    WORD32 sec_loop_cnt;
  104|       |
  105|  10.8M|    for (k = in_loop_cnt; k != 0; k--) {
  ------------------
  |  Branch (105:27): [True: 5.97M, False: 4.90M]
  ------------------
  106|  5.97M|      x0r = (*data);
  107|  5.97M|      x0i = (*(data + 1));
  108|  5.97M|      data += ((SIZE_T)del << 1);
  109|       |
  110|  5.97M|      x1r = (*data);
  111|  5.97M|      x1i = (*(data + 1));
  112|  5.97M|      data += ((SIZE_T)del << 1);
  113|       |
  114|  5.97M|      x2r = (*data);
  115|  5.97M|      x2i = (*(data + 1));
  116|  5.97M|      data += ((SIZE_T)del << 1);
  117|       |
  118|  5.97M|      x3r = (*data);
  119|  5.97M|      x3i = (*(data + 1));
  120|  5.97M|      data -= 3 * ((SIZE_T)del << 1);
  121|       |
  122|  5.97M|      x0r = x0r + x2r;
  123|  5.97M|      x0i = x0i + x2i;
  124|  5.97M|      x2r = x0r - (x2r * 2);
  125|  5.97M|      x2i = x0i - (x2i * 2);
  126|  5.97M|      x1r = x1r + x3r;
  127|  5.97M|      x1i = x1i + x3i;
  128|  5.97M|      x3r = x1r - (x3r * 2);
  129|  5.97M|      x3i = x1i - (x3i * 2);
  130|       |
  131|  5.97M|      x0r = x0r + x1r;
  132|  5.97M|      x0i = x0i + x1i;
  133|  5.97M|      x1r = x0r - (x1r * 2);
  134|  5.97M|      x1i = x0i - (x1i * 2);
  135|  5.97M|      x2r = x2r - x3i;
  136|  5.97M|      x2i = x2i + x3r;
  137|  5.97M|      x3i = x2r + (x3i * 2);
  138|  5.97M|      x3r = x2i - (x3r * 2);
  139|       |
  140|  5.97M|      *data = x0r;
  141|  5.97M|      *(data + 1) = x0i;
  142|  5.97M|      data += ((SIZE_T)del << 1);
  143|       |
  144|  5.97M|      *data = x2r;
  145|  5.97M|      *(data + 1) = x2i;
  146|  5.97M|      data += ((SIZE_T)del << 1);
  147|       |
  148|  5.97M|      *data = x1r;
  149|  5.97M|      *(data + 1) = x1i;
  150|  5.97M|      data += ((SIZE_T)del << 1);
  151|       |
  152|  5.97M|      *data = x3i;
  153|  5.97M|      *(data + 1) = x3r;
  154|  5.97M|      data += ((SIZE_T)del << 1);
  155|  5.97M|    }
  156|  4.90M|    data = ptr_y + 2;
  157|       |
  158|  4.90M|    sec_loop_cnt = (nodespacing * del);
  159|  4.90M|    sec_loop_cnt = (sec_loop_cnt / 4) + (sec_loop_cnt / 8) - (sec_loop_cnt / 16) +
  160|  4.90M|                   (sec_loop_cnt / 32) - (sec_loop_cnt / 64) + (sec_loop_cnt / 128) -
  161|  4.90M|                   (sec_loop_cnt / 256);
  162|       |
  163|  9.81M|    for (j = nodespacing; j <= sec_loop_cnt; j += nodespacing) {
  ------------------
  |  Branch (163:27): [True: 4.90M, False: 4.90M]
  ------------------
  164|  4.90M|      W1 = *(twiddles + j);
  165|  4.90M|      W4 = *(twiddles + j + 257);
  166|  4.90M|      W2 = *(twiddles + ((SIZE_T)j << 1));
  167|  4.90M|      W5 = *(twiddles + ((SIZE_T)j << 1) + 257);
  168|  4.90M|      W3 = *(twiddles + j + ((SIZE_T)j << 1));
  169|  4.90M|      W6 = *(twiddles + j + ((SIZE_T)j << 1) + 257);
  170|       |
  171|  10.8M|      for (k = in_loop_cnt; k != 0; k--) {
  ------------------
  |  Branch (171:29): [True: 5.97M, False: 4.90M]
  ------------------
  172|  5.97M|        FLOAT32 tmp;
  173|  5.97M|        FLOAT32 x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;
  174|       |
  175|  5.97M|        data += ((SIZE_T)del << 1);
  176|       |
  177|  5.97M|        x1r = *data;
  178|  5.97M|        x1i = *(data + 1);
  179|  5.97M|        data += ((SIZE_T)del << 1);
  180|       |
  181|  5.97M|        x2r = *data;
  182|  5.97M|        x2i = *(data + 1);
  183|  5.97M|        data += ((SIZE_T)del << 1);
  184|       |
  185|  5.97M|        x3r = *data;
  186|  5.97M|        x3i = *(data + 1);
  187|  5.97M|        data -= 3 * ((SIZE_T)del << 1);
  188|       |
  189|  5.97M|        tmp = (FLOAT32)(((FLOAT32)x1r * W1) + ((FLOAT32)x1i * W4));
  190|  5.97M|        x1i = (FLOAT32)(-((FLOAT32)x1r * W4) + (FLOAT32)x1i * W1);
  191|  5.97M|        x1r = tmp;
  192|       |
  193|  5.97M|        tmp = (FLOAT32)(((FLOAT32)x2r * W2) + ((FLOAT32)x2i * W5));
  194|  5.97M|        x2i = (FLOAT32)(-((FLOAT32)x2r * W5) + (FLOAT32)x2i * W2);
  195|  5.97M|        x2r = tmp;
  196|       |
  197|  5.97M|        tmp = (FLOAT32)(((FLOAT32)x3r * W3) + ((FLOAT32)x3i * W6));
  198|  5.97M|        x3i = (FLOAT32)(-((FLOAT32)x3r * W6) + (FLOAT32)x3i * W3);
  199|  5.97M|        x3r = tmp;
  200|       |
  201|  5.97M|        x0r = (*data);
  202|  5.97M|        x0i = (*(data + 1));
  203|       |
  204|  5.97M|        x0r = x0r + (x2r);
  205|  5.97M|        x0i = x0i + (x2i);
  206|  5.97M|        x2r = x0r - (x2r * 2);
  207|  5.97M|        x2i = x0i - (x2i * 2);
  208|  5.97M|        x1r = x1r + x3r;
  209|  5.97M|        x1i = x1i + x3i;
  210|  5.97M|        x3r = x1r - (x3r * 2);
  211|  5.97M|        x3i = x1i - (x3i * 2);
  212|       |
  213|  5.97M|        x0r = x0r + (x1r);
  214|  5.97M|        x0i = x0i + (x1i);
  215|  5.97M|        x1r = x0r - (x1r * 2);
  216|  5.97M|        x1i = x0i - (x1i * 2);
  217|  5.97M|        x2r = x2r - (x3i);
  218|  5.97M|        x2i = x2i + (x3r);
  219|  5.97M|        x3i = x2r + (x3i * 2);
  220|  5.97M|        x3r = x2i - (x3r * 2);
  221|       |
  222|  5.97M|        *data = x0r;
  223|  5.97M|        *(data + 1) = x0i;
  224|  5.97M|        data += ((SIZE_T)del << 1);
  225|       |
  226|  5.97M|        *data = x2r;
  227|  5.97M|        *(data + 1) = x2i;
  228|  5.97M|        data += ((SIZE_T)del << 1);
  229|       |
  230|  5.97M|        *data = x1r;
  231|  5.97M|        *(data + 1) = x1i;
  232|  5.97M|        data += ((SIZE_T)del << 1);
  233|       |
  234|  5.97M|        *data = x3i;
  235|  5.97M|        *(data + 1) = x3r;
  236|  5.97M|        data += ((SIZE_T)del << 1);
  237|  5.97M|      }
  238|  4.90M|      data -= 2 * npoints;
  239|  4.90M|      data += 2;
  240|  4.90M|    }
  241|  9.81M|    for (; j <= (nodespacing * del) >> 1; j += nodespacing) {
  ------------------
  |  Branch (241:12): [True: 4.90M, False: 4.90M]
  ------------------
  242|  4.90M|      W1 = *(twiddles + j);
  243|  4.90M|      W4 = *(twiddles + j + 257);
  244|  4.90M|      W2 = *(twiddles + ((SIZE_T)j << 1));
  245|  4.90M|      W5 = *(twiddles + ((SIZE_T)j << 1) + 257);
  246|  4.90M|      W3 = *(twiddles + j + ((SIZE_T)j << 1) - 256);
  247|  4.90M|      W6 = *(twiddles + j + ((SIZE_T)j << 1) + 1);
  248|       |
  249|  10.8M|      for (k = in_loop_cnt; k != 0; k--) {
  ------------------
  |  Branch (249:29): [True: 5.97M, False: 4.90M]
  ------------------
  250|  5.97M|        FLOAT32 tmp;
  251|  5.97M|        FLOAT32 x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;
  252|       |
  253|  5.97M|        data += ((SIZE_T)del << 1);
  254|       |
  255|  5.97M|        x1r = *data;
  256|  5.97M|        x1i = *(data + 1);
  257|  5.97M|        data += ((SIZE_T)del << 1);
  258|       |
  259|  5.97M|        x2r = *data;
  260|  5.97M|        x2i = *(data + 1);
  261|  5.97M|        data += ((SIZE_T)del << 1);
  262|       |
  263|  5.97M|        x3r = *data;
  264|  5.97M|        x3i = *(data + 1);
  265|  5.97M|        data -= 3 * ((SIZE_T)del << 1);
  266|       |
  267|  5.97M|        tmp = (FLOAT32)(((FLOAT32)x1r * W1) + ((FLOAT32)x1i * W4));
  268|  5.97M|        x1i = (FLOAT32)(-((FLOAT32)x1r * W4) + (FLOAT32)x1i * W1);
  269|  5.97M|        x1r = tmp;
  270|       |
  271|  5.97M|        tmp = (FLOAT32)(((FLOAT32)x2r * W2) + ((FLOAT32)x2i * W5));
  272|  5.97M|        x2i = (FLOAT32)(-((FLOAT32)x2r * W5) + (FLOAT32)x2i * W2);
  273|  5.97M|        x2r = tmp;
  274|       |
  275|  5.97M|        tmp = (FLOAT32)(((FLOAT32)x3r * W6) - ((FLOAT32)x3i * W3));
  276|  5.97M|        x3i = (FLOAT32)(((FLOAT32)x3r * W3) + ((FLOAT32)x3i * W6));
  277|  5.97M|        x3r = tmp;
  278|       |
  279|  5.97M|        x0r = (*data);
  280|  5.97M|        x0i = (*(data + 1));
  281|       |
  282|  5.97M|        x0r = x0r + (x2r);
  283|  5.97M|        x0i = x0i + (x2i);
  284|  5.97M|        x2r = x0r - (x2r * 2);
  285|  5.97M|        x2i = x0i - (x2i * 2);
  286|  5.97M|        x1r = x1r + x3r;
  287|  5.97M|        x1i = x1i + x3i;
  288|  5.97M|        x3r = x1r - (x3r * 2);
  289|  5.97M|        x3i = x1i - (x3i * 2);
  290|       |
  291|  5.97M|        x0r = x0r + (x1r);
  292|  5.97M|        x0i = x0i + (x1i);
  293|  5.97M|        x1r = x0r - (x1r * 2);
  294|  5.97M|        x1i = x0i - (x1i * 2);
  295|  5.97M|        x2r = x2r - (x3i);
  296|  5.97M|        x2i = x2i + (x3r);
  297|  5.97M|        x3i = x2r + (x3i * 2);
  298|  5.97M|        x3r = x2i - (x3r * 2);
  299|       |
  300|  5.97M|        *data = x0r;
  301|  5.97M|        *(data + 1) = x0i;
  302|  5.97M|        data += ((SIZE_T)del << 1);
  303|       |
  304|  5.97M|        *data = x2r;
  305|  5.97M|        *(data + 1) = x2i;
  306|  5.97M|        data += ((SIZE_T)del << 1);
  307|       |
  308|  5.97M|        *data = x1r;
  309|  5.97M|        *(data + 1) = x1i;
  310|  5.97M|        data += ((SIZE_T)del << 1);
  311|       |
  312|  5.97M|        *data = x3i;
  313|  5.97M|        *(data + 1) = x3r;
  314|  5.97M|        data += ((SIZE_T)del << 1);
  315|  5.97M|      }
  316|  4.90M|      data -= 2 * npoints;
  317|  4.90M|      data += 2;
  318|  4.90M|    }
  319|  4.90M|    for (; j <= sec_loop_cnt * 2; j += nodespacing) {
  ------------------
  |  Branch (319:12): [True: 0, False: 4.90M]
  ------------------
  320|      0|      W1 = *(twiddles + j);
  321|      0|      W4 = *(twiddles + j + 257);
  322|      0|      W2 = *(twiddles + ((SIZE_T)j << 1) - 256);
  323|      0|      W5 = *(twiddles + ((SIZE_T)j << 1) + 1);
  324|      0|      W3 = *(twiddles + j + ((SIZE_T)j << 1) - 256);
  325|      0|      W6 = *(twiddles + j + ((SIZE_T)j << 1) + 1);
  326|       |
  327|      0|      for (k = in_loop_cnt; k != 0; k--) {
  ------------------
  |  Branch (327:29): [True: 0, False: 0]
  ------------------
  328|      0|        FLOAT32 tmp;
  329|      0|        FLOAT32 x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;
  330|       |
  331|      0|        data += ((SIZE_T)del << 1);
  332|       |
  333|      0|        x1r = *data;
  334|      0|        x1i = *(data + 1);
  335|      0|        data += ((SIZE_T)del << 1);
  336|       |
  337|      0|        x2r = *data;
  338|      0|        x2i = *(data + 1);
  339|      0|        data += ((SIZE_T)del << 1);
  340|       |
  341|      0|        x3r = *data;
  342|      0|        x3i = *(data + 1);
  343|      0|        data -= 3 * ((SIZE_T)del << 1);
  344|       |
  345|      0|        tmp = (FLOAT32)(((FLOAT32)x1r * W1) + ((FLOAT32)x1i * W4));
  346|      0|        x1i = (FLOAT32)(-((FLOAT32)x1r * W4) + (FLOAT32)x1i * W1);
  347|      0|        x1r = tmp;
  348|       |
  349|      0|        tmp = (FLOAT32)(((FLOAT32)x2r * W5) - ((FLOAT32)x2i * W2));
  350|      0|        x2i = (FLOAT32)(((FLOAT32)x2r * W2) + ((FLOAT32)x2i * W5));
  351|      0|        x2r = tmp;
  352|       |
  353|      0|        tmp = (FLOAT32)(((FLOAT32)x3r * W6) - ((FLOAT32)x3i * W3));
  354|      0|        x3i = (FLOAT32)(((FLOAT32)x3r * W3) + ((FLOAT32)x3i * W6));
  355|      0|        x3r = tmp;
  356|       |
  357|      0|        x0r = (*data);
  358|      0|        x0i = (*(data + 1));
  359|       |
  360|      0|        x0r = x0r + (x2r);
  361|      0|        x0i = x0i + (x2i);
  362|      0|        x2r = x0r - (x2r * 2);
  363|      0|        x2i = x0i - (x2i * 2);
  364|      0|        x1r = x1r + x3r;
  365|      0|        x1i = x1i + x3i;
  366|      0|        x3r = x1r - (x3r * 2);
  367|      0|        x3i = x1i - (x3i * 2);
  368|       |
  369|      0|        x0r = x0r + (x1r);
  370|      0|        x0i = x0i + (x1i);
  371|      0|        x1r = x0r - (x1r * 2);
  372|      0|        x1i = x0i - (x1i * 2);
  373|      0|        x2r = x2r - (x3i);
  374|      0|        x2i = x2i + (x3r);
  375|      0|        x3i = x2r + (x3i * 2);
  376|      0|        x3r = x2i - (x3r * 2);
  377|       |
  378|      0|        *data = x0r;
  379|      0|        *(data + 1) = x0i;
  380|      0|        data += ((SIZE_T)del << 1);
  381|       |
  382|      0|        *data = x2r;
  383|      0|        *(data + 1) = x2i;
  384|      0|        data += ((SIZE_T)del << 1);
  385|       |
  386|      0|        *data = x1r;
  387|      0|        *(data + 1) = x1i;
  388|      0|        data += ((SIZE_T)del << 1);
  389|       |
  390|      0|        *data = x3i;
  391|      0|        *(data + 1) = x3r;
  392|      0|        data += ((SIZE_T)del << 1);
  393|      0|      }
  394|      0|      data -= 2 * npoints;
  395|      0|      data += 2;
  396|      0|    }
  397|  9.81M|    for (; j < nodespacing * del; j += nodespacing) {
  ------------------
  |  Branch (397:12): [True: 4.90M, False: 4.90M]
  ------------------
  398|  4.90M|      W1 = *(twiddles + j);
  399|  4.90M|      W4 = *(twiddles + j + 257);
  400|  4.90M|      W2 = *(twiddles + ((SIZE_T)j << 1) - 256);
  401|  4.90M|      W5 = *(twiddles + ((SIZE_T)j << 1) + 1);
  402|  4.90M|      W3 = *(twiddles + j + ((SIZE_T)j << 1) - 512);
  403|  4.90M|      W6 = *(twiddles + j + ((SIZE_T)j << 1) - 512 + 257);
  404|       |
  405|  10.8M|      for (k = in_loop_cnt; k != 0; k--) {
  ------------------
  |  Branch (405:29): [True: 5.97M, False: 4.90M]
  ------------------
  406|  5.97M|        FLOAT32 tmp;
  407|  5.97M|        FLOAT32 x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;
  408|       |
  409|  5.97M|        data += ((SIZE_T)del << 1);
  410|       |
  411|  5.97M|        x1r = *data;
  412|  5.97M|        x1i = *(data + 1);
  413|  5.97M|        data += ((SIZE_T)del << 1);
  414|       |
  415|  5.97M|        x2r = *data;
  416|  5.97M|        x2i = *(data + 1);
  417|  5.97M|        data += ((SIZE_T)del << 1);
  418|       |
  419|  5.97M|        x3r = *data;
  420|  5.97M|        x3i = *(data + 1);
  421|  5.97M|        data -= 3 * ((SIZE_T)del << 1);
  422|       |
  423|  5.97M|        tmp = (FLOAT32)(((FLOAT32)x1r * W1) + ((FLOAT32)x1i * W4));
  424|  5.97M|        x1i = (FLOAT32)(-((FLOAT32)x1r * W4) + (FLOAT32)x1i * W1);
  425|  5.97M|        x1r = tmp;
  426|       |
  427|  5.97M|        tmp = (FLOAT32)(((FLOAT32)x2r * W5) - ((FLOAT32)x2i * W2));
  428|  5.97M|        x2i = (FLOAT32)(((FLOAT32)x2r * W2) + ((FLOAT32)x2i * W5));
  429|  5.97M|        x2r = tmp;
  430|       |
  431|  5.97M|        tmp = (FLOAT32)(-((FLOAT32)x3r * W3) - ((FLOAT32)x3i * W6));
  432|  5.97M|        x3i = (FLOAT32)(-((FLOAT32)x3r * W6) + (FLOAT32)x3i * W3);
  433|  5.97M|        x3r = tmp;
  434|       |
  435|  5.97M|        x0r = (*data);
  436|  5.97M|        x0i = (*(data + 1));
  437|       |
  438|  5.97M|        x0r = x0r + (x2r);
  439|  5.97M|        x0i = x0i + (x2i);
  440|  5.97M|        x2r = x0r - (x2r * 2);
  441|  5.97M|        x2i = x0i - (x2i * 2);
  442|  5.97M|        x1r = x1r + x3r;
  443|  5.97M|        x1i = x1i - x3i;
  444|  5.97M|        x3r = x1r - (x3r * 2);
  445|  5.97M|        x3i = x1i + (x3i * 2);
  446|       |
  447|  5.97M|        x0r = x0r + (x1r);
  448|  5.97M|        x0i = x0i + (x1i);
  449|  5.97M|        x1r = x0r - (x1r * 2);
  450|  5.97M|        x1i = x0i - (x1i * 2);
  451|  5.97M|        x2r = x2r - (x3i);
  452|  5.97M|        x2i = x2i + (x3r);
  453|  5.97M|        x3i = x2r + (x3i * 2);
  454|  5.97M|        x3r = x2i - (x3r * 2);
  455|       |
  456|  5.97M|        *data = x0r;
  457|  5.97M|        *(data + 1) = x0i;
  458|  5.97M|        data += ((SIZE_T)del << 1);
  459|       |
  460|  5.97M|        *data = x2r;
  461|  5.97M|        *(data + 1) = x2i;
  462|  5.97M|        data += ((SIZE_T)del << 1);
  463|       |
  464|  5.97M|        *data = x1r;
  465|  5.97M|        *(data + 1) = x1i;
  466|  5.97M|        data += ((SIZE_T)del << 1);
  467|       |
  468|  5.97M|        *data = x3i;
  469|  5.97M|        *(data + 1) = x3r;
  470|  5.97M|        data += ((SIZE_T)del << 1);
  471|  5.97M|      }
  472|  4.90M|      data -= 2 * npoints;
  473|  4.90M|      data += 2;
  474|  4.90M|    }
  475|  4.90M|    nodespacing >>= 2;
  476|  4.90M|    del <<= 2;
  477|  4.90M|    in_loop_cnt >>= 2;
  478|  4.90M|  }
  479|       |
  480|  13.1M|  if (not_power_4) {
  ------------------
  |  Branch (480:7): [True: 9.35M, False: 3.83M]
  ------------------
  481|  9.35M|    const FLOAT32 *twiddles = ptr_w;
  482|  9.35M|    nodespacing <<= 1;
  483|       |
  484|  34.4M|    for (j = del / 2; j != 0; j--) {
  ------------------
  |  Branch (484:23): [True: 25.1M, False: 9.35M]
  ------------------
  485|  25.1M|      FLOAT32 W1 = *twiddles;
  486|  25.1M|      FLOAT32 W4 = *(twiddles + 257);
  487|  25.1M|      FLOAT32 tmp;
  488|  25.1M|      twiddles += nodespacing;
  489|       |
  490|  25.1M|      x0r = *ptr_y;
  491|  25.1M|      x0i = *(ptr_y + 1);
  492|  25.1M|      ptr_y += ((SIZE_T)del << 1);
  493|       |
  494|  25.1M|      x1r = *ptr_y;
  495|  25.1M|      x1i = *(ptr_y + 1);
  496|       |
  497|  25.1M|      tmp = (FLOAT32)(((FLOAT32)x1r * W1) + ((FLOAT32)x1i * W4));
  498|  25.1M|      x1i = (FLOAT32)(-((FLOAT32)x1r * W4) + (FLOAT32)x1i * W1);
  499|  25.1M|      x1r = tmp;
  500|       |
  501|  25.1M|      *ptr_y = (x0r) - (x1r);
  502|  25.1M|      *(ptr_y + 1) = (x0i) - (x1i);
  503|  25.1M|      ptr_y -= ((SIZE_T)del << 1);
  504|       |
  505|  25.1M|      *ptr_y = (x0r) + (x1r);
  506|  25.1M|      *(ptr_y + 1) = (x0i) + (x1i);
  507|  25.1M|      ptr_y += 2;
  508|  25.1M|    }
  509|  9.35M|    twiddles = ptr_w;
  510|  34.4M|    for (j = del / 2; j != 0; j--) {
  ------------------
  |  Branch (510:23): [True: 25.1M, False: 9.35M]
  ------------------
  511|  25.1M|      FLOAT32 W1 = *twiddles;
  512|  25.1M|      FLOAT32 W4 = *(twiddles + 257);
  513|  25.1M|      FLOAT32 tmp;
  514|  25.1M|      twiddles += nodespacing;
  515|       |
  516|  25.1M|      x0r = *ptr_y;
  517|  25.1M|      x0i = *(ptr_y + 1);
  518|  25.1M|      ptr_y += ((SIZE_T)del << 1);
  519|       |
  520|  25.1M|      x1r = *ptr_y;
  521|  25.1M|      x1i = *(ptr_y + 1);
  522|  25.1M|      tmp = (FLOAT32)(((FLOAT32)x1r * W4) - ((FLOAT32)x1i * W1));
  523|  25.1M|      x1i = (FLOAT32)(((FLOAT32)x1r * W1) + ((FLOAT32)x1i * W4));
  524|  25.1M|      x1r = tmp;
  525|       |
  526|  25.1M|      *ptr_y = (x0r) - (x1r);
  527|  25.1M|      *(ptr_y + 1) = (x0i) - (x1i);
  528|  25.1M|      ptr_y -= ((SIZE_T)del << 1);
  529|       |
  530|  25.1M|      *ptr_y = (x0r) + (x1r);
  531|  25.1M|      *(ptr_y + 1) = (x0i) + (x1i);
  532|  25.1M|      ptr_y += 2;
  533|  25.1M|    }
  534|  9.35M|  }
  535|  13.1M|}
ixheaac_cmplx_anal_fft_p2:
  537|  6.59M|void ixheaac_cmplx_anal_fft_p2(FLOAT32 *ptr_x, FLOAT32 *ptr_y, WORD32 npoints) {
  538|  6.59M|  WORD32 i, j, k, n_stages, h2;
  539|  6.59M|  FLOAT32 x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;
  540|  6.59M|  WORD32 del, nodespacing, in_loop_cnt;
  541|  6.59M|  WORD32 not_power_4;
  542|  6.59M|  WORD32 dig_rev_shift;
  543|  6.59M|  const FLOAT32 *ptr_w;
  544|       |
  545|  6.59M|  dig_rev_shift = ixheaac_norm32(npoints) + 1 - 16;
  546|  6.59M|  n_stages = 30 - ixheaac_norm32(npoints);
  547|  6.59M|  not_power_4 = n_stages & 1;
  548|       |
  549|  6.59M|  n_stages = n_stages >> 1;
  550|       |
  551|  6.59M|  ptr_w = ixheaac_twiddle_table_fft_float;
  552|       |
  553|  47.0M|  for (i = 0; i < npoints; i += 4) {
  ------------------
  |  Branch (553:15): [True: 40.4M, False: 6.59M]
  ------------------
  554|  40.4M|    FLOAT32 *inp = ptr_x;
  555|       |
  556|  40.4M|    DIG_REV(i, dig_rev_shift, h2);
  ------------------
  |  |   30|  40.4M|  do {                                                      \
  |  |   31|  40.4M|    unsigned _ = (i);                                       \
  |  |   32|  40.4M|    _ = ((_ & 0x33333333) << 2) | ((_ & ~0x33333333) >> 2); \
  |  |   33|  40.4M|    _ = ((_ & 0x0F0F0F0F) << 4) | ((_ & ~0x0F0F0F0F) >> 4); \
  |  |   34|  40.4M|    _ = ((_ & 0x00FF00FF) << 8) | ((_ & ~0x00FF00FF) >> 8); \
  |  |   35|  40.4M|    (j) = _ >> (m);                                         \
  |  |   36|  40.4M|  } while (0)
  |  |  ------------------
  |  |  |  Branch (36:12): [Folded, False: 40.4M]
  |  |  ------------------
  ------------------
  557|  40.4M|    if (not_power_4) {
  ------------------
  |  Branch (557:9): [True: 15.3M, False: 25.1M]
  ------------------
  558|  15.3M|      h2 += 1;
  559|  15.3M|      h2 &= ~1;
  560|  15.3M|    }
  561|  40.4M|    inp += (h2);
  562|       |
  563|  40.4M|    x0r = *inp;
  564|  40.4M|    x0i = *(inp + 1);
  565|  40.4M|    inp += (npoints >> 1);
  566|       |
  567|  40.4M|    x1r = *inp;
  568|  40.4M|    x1i = *(inp + 1);
  569|  40.4M|    inp += (npoints >> 1);
  570|       |
  571|  40.4M|    x2r = *inp;
  572|  40.4M|    x2i = *(inp + 1);
  573|  40.4M|    inp += (npoints >> 1);
  574|       |
  575|  40.4M|    x3r = *inp;
  576|  40.4M|    x3i = *(inp + 1);
  577|       |
  578|  40.4M|    x0r = x0r + x2r;
  579|  40.4M|    x0i = x0i + x2i;
  580|  40.4M|    x2r = x0r - (x2r * 2);
  581|  40.4M|    x2i = x0i - (x2i * 2);
  582|  40.4M|    x1r = x1r + x3r;
  583|  40.4M|    x1i = x1i + x3i;
  584|  40.4M|    x3r = x1r - (x3r * 2);
  585|  40.4M|    x3i = x1i - (x3i * 2);
  586|       |
  587|  40.4M|    x0r = x0r + x1r;
  588|  40.4M|    x0i = x0i + x1i;
  589|  40.4M|    x1r = x0r - (x1r * 2);
  590|  40.4M|    x1i = x0i - (x1i * 2);
  591|  40.4M|    x2r = x2r - x3i;
  592|  40.4M|    x2i = x2i + x3r;
  593|  40.4M|    x3i = x2r + (x3i * 2);
  594|  40.4M|    x3r = x2i - (x3r * 2);
  595|       |
  596|  40.4M|    *ptr_y++ = x0r;
  597|  40.4M|    *ptr_y++ = x0i;
  598|  40.4M|    *ptr_y++ = x2r;
  599|  40.4M|    *ptr_y++ = x2i;
  600|  40.4M|    *ptr_y++ = x1r;
  601|  40.4M|    *ptr_y++ = x1i;
  602|  40.4M|    *ptr_y++ = x3i;
  603|  40.4M|    *ptr_y++ = x3r;
  604|  40.4M|  }
  605|  6.59M|  ptr_y -= 2 * npoints;
  606|  6.59M|  del = 4;
  607|  6.59M|  nodespacing = 64;
  608|  6.59M|  in_loop_cnt = npoints >> 4;
  609|  13.7M|  for (i = n_stages - 1; i > 0; i--) {
  ------------------
  |  Branch (609:26): [True: 7.12M, False: 6.59M]
  ------------------
  610|  7.12M|    const FLOAT32 *twiddles = ptr_w;
  611|  7.12M|    FLOAT32 *data = ptr_y;
  612|  7.12M|    FLOAT32 W1, W2, W3, W4, W5, W6;
  613|  7.12M|    WORD32 sec_loop_cnt;
  614|       |
  615|  17.7M|    for (k = in_loop_cnt; k != 0; k--) {
  ------------------
  |  Branch (615:27): [True: 10.6M, False: 7.12M]
  ------------------
  616|  10.6M|      x0r = (*data);
  617|  10.6M|      x0i = (*(data + 1));
  618|  10.6M|      data += ((SIZE_T)del << 1);
  619|       |
  620|  10.6M|      x1r = (*data);
  621|  10.6M|      x1i = (*(data + 1));
  622|  10.6M|      data += ((SIZE_T)del << 1);
  623|       |
  624|  10.6M|      x2r = (*data);
  625|  10.6M|      x2i = (*(data + 1));
  626|  10.6M|      data += ((SIZE_T)del << 1);
  627|       |
  628|  10.6M|      x3r = (*data);
  629|  10.6M|      x3i = (*(data + 1));
  630|  10.6M|      data -= 3 * ((SIZE_T)del << 1);
  631|       |
  632|  10.6M|      x0r = x0r + x2r;
  633|  10.6M|      x0i = x0i + x2i;
  634|  10.6M|      x2r = x0r - (x2r * 2);
  635|  10.6M|      x2i = x0i - (x2i * 2);
  636|  10.6M|      x1r = x1r + x3r;
  637|  10.6M|      x1i = x1i + x3i;
  638|  10.6M|      x3r = x1r - (x3r * 2);
  639|  10.6M|      x3i = x1i - (x3i * 2);
  640|       |
  641|  10.6M|      x0r = x0r + x1r;
  642|  10.6M|      x0i = x0i + x1i;
  643|  10.6M|      x1r = x0r - (x1r * 2);
  644|  10.6M|      x1i = x0i - (x1i * 2);
  645|  10.6M|      x2r = x2r - x3i;
  646|  10.6M|      x2i = x2i + x3r;
  647|  10.6M|      x3i = x2r + (x3i * 2);
  648|  10.6M|      x3r = x2i - (x3r * 2);
  649|       |
  650|  10.6M|      *data = x0r;
  651|  10.6M|      *(data + 1) = x0i;
  652|  10.6M|      data += ((SIZE_T)del << 1);
  653|       |
  654|  10.6M|      *data = x2r;
  655|  10.6M|      *(data + 1) = x2i;
  656|  10.6M|      data += ((SIZE_T)del << 1);
  657|       |
  658|  10.6M|      *data = x1r;
  659|  10.6M|      *(data + 1) = x1i;
  660|  10.6M|      data += ((SIZE_T)del << 1);
  661|       |
  662|  10.6M|      *data = x3i;
  663|  10.6M|      *(data + 1) = x3r;
  664|  10.6M|      data += ((SIZE_T)del << 1);
  665|  10.6M|    }
  666|  7.12M|    data = ptr_y + 2;
  667|       |
  668|  7.12M|    sec_loop_cnt = (nodespacing * del);
  669|  7.12M|    sec_loop_cnt = (sec_loop_cnt / 4) + (sec_loop_cnt / 8) - (sec_loop_cnt / 16) +
  670|  7.12M|                   (sec_loop_cnt / 32) - (sec_loop_cnt / 64) + (sec_loop_cnt / 128) -
  671|  7.12M|                   (sec_loop_cnt / 256);
  672|       |
  673|  16.3M|    for (j = nodespacing; j <= sec_loop_cnt; j += nodespacing) {
  ------------------
  |  Branch (673:27): [True: 9.26M, False: 7.12M]
  ------------------
  674|  9.26M|      W1 = *(twiddles + j);
  675|  9.26M|      W4 = *(twiddles + j + 257);
  676|  9.26M|      W2 = *(twiddles + ((SIZE_T)j << 1));
  677|  9.26M|      W5 = *(twiddles + ((SIZE_T)j << 1) + 257);
  678|  9.26M|      W3 = *(twiddles + j + ((SIZE_T)j << 1));
  679|  9.26M|      W6 = *(twiddles + j + ((SIZE_T)j << 1) + 257);
  680|       |
  681|  22.0M|      for (k = in_loop_cnt; k != 0; k--) {
  ------------------
  |  Branch (681:29): [True: 12.7M, False: 9.26M]
  ------------------
  682|  12.7M|        FLOAT32 tmp;
  683|  12.7M|        FLOAT32 x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;
  684|       |
  685|  12.7M|        data += ((SIZE_T)del << 1);
  686|       |
  687|  12.7M|        x1r = *data;
  688|  12.7M|        x1i = *(data + 1);
  689|  12.7M|        data += ((SIZE_T)del << 1);
  690|       |
  691|  12.7M|        x2r = *data;
  692|  12.7M|        x2i = *(data + 1);
  693|  12.7M|        data += ((SIZE_T)del << 1);
  694|       |
  695|  12.7M|        x3r = *data;
  696|  12.7M|        x3i = *(data + 1);
  697|  12.7M|        data -= 3 * ((SIZE_T)del << 1);
  698|       |
  699|  12.7M|        tmp = (FLOAT32)(((FLOAT32)x1r * W1) + ((FLOAT32)x1i * W4));
  700|  12.7M|        x1i = (FLOAT32)(-((FLOAT32)x1r * W4) + (FLOAT32)x1i * W1);
  701|  12.7M|        x1r = tmp;
  702|       |
  703|  12.7M|        tmp = (FLOAT32)(((FLOAT32)x2r * W2) + ((FLOAT32)x2i * W5));
  704|  12.7M|        x2i = (FLOAT32)(-((FLOAT32)x2r * W5) + (FLOAT32)x2i * W2);
  705|  12.7M|        x2r = tmp;
  706|       |
  707|  12.7M|        tmp = (FLOAT32)(((FLOAT32)x3r * W3) + ((FLOAT32)x3i * W6));
  708|  12.7M|        x3i = (FLOAT32)(-((FLOAT32)x3r * W6) + (FLOAT32)x3i * W3);
  709|  12.7M|        x3r = tmp;
  710|       |
  711|  12.7M|        x0r = (*data);
  712|  12.7M|        x0i = (*(data + 1));
  713|       |
  714|  12.7M|        x0r = x0r + (x2r);
  715|  12.7M|        x0i = x0i + (x2i);
  716|  12.7M|        x2r = x0r - (x2r * 2);
  717|  12.7M|        x2i = x0i - (x2i * 2);
  718|  12.7M|        x1r = x1r + x3r;
  719|  12.7M|        x1i = x1i + x3i;
  720|  12.7M|        x3r = x1r - (x3r * 2);
  721|  12.7M|        x3i = x1i - (x3i * 2);
  722|       |
  723|  12.7M|        x0r = x0r + (x1r);
  724|  12.7M|        x0i = x0i + (x1i);
  725|  12.7M|        x1r = x0r - (x1r * 2);
  726|  12.7M|        x1i = x0i - (x1i * 2);
  727|  12.7M|        x2r = x2r - (x3i);
  728|  12.7M|        x2i = x2i + (x3r);
  729|  12.7M|        x3i = x2r + (x3i * 2);
  730|  12.7M|        x3r = x2i - (x3r * 2);
  731|       |
  732|  12.7M|        *data = x0r;
  733|  12.7M|        *(data + 1) = x0i;
  734|  12.7M|        data += ((SIZE_T)del << 1);
  735|       |
  736|  12.7M|        *data = x2r;
  737|  12.7M|        *(data + 1) = x2i;
  738|  12.7M|        data += ((SIZE_T)del << 1);
  739|       |
  740|  12.7M|        *data = x1r;
  741|  12.7M|        *(data + 1) = x1i;
  742|  12.7M|        data += ((SIZE_T)del << 1);
  743|       |
  744|  12.7M|        *data = x3i;
  745|  12.7M|        *(data + 1) = x3r;
  746|  12.7M|        data += ((SIZE_T)del << 1);
  747|  12.7M|      }
  748|  9.26M|      data -= 2 * npoints;
  749|  9.26M|      data += 2;
  750|  9.26M|    }
  751|  15.3M|    for (; j <= (nodespacing * del) >> 1; j += nodespacing) {
  ------------------
  |  Branch (751:12): [True: 8.19M, False: 7.12M]
  ------------------
  752|  8.19M|      W1 = *(twiddles + j);
  753|  8.19M|      W4 = *(twiddles + j + 257);
  754|  8.19M|      W2 = *(twiddles + ((SIZE_T)j << 1));
  755|  8.19M|      W5 = *(twiddles + ((SIZE_T)j << 1) + 257);
  756|  8.19M|      W3 = *(twiddles + j + ((SIZE_T)j << 1) - 256);
  757|  8.19M|      W6 = *(twiddles + j + ((SIZE_T)j << 1) + 1);
  758|       |
  759|  19.9M|      for (k = in_loop_cnt; k != 0; k--) {
  ------------------
  |  Branch (759:29): [True: 11.7M, False: 8.19M]
  ------------------
  760|  11.7M|        FLOAT32 tmp;
  761|  11.7M|        FLOAT32 x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;
  762|       |
  763|  11.7M|        data += ((SIZE_T)del << 1);
  764|       |
  765|  11.7M|        x1r = *data;
  766|  11.7M|        x1i = *(data + 1);
  767|  11.7M|        data += ((SIZE_T)del << 1);
  768|       |
  769|  11.7M|        x2r = *data;
  770|  11.7M|        x2i = *(data + 1);
  771|  11.7M|        data += ((SIZE_T)del << 1);
  772|       |
  773|  11.7M|        x3r = *data;
  774|  11.7M|        x3i = *(data + 1);
  775|  11.7M|        data -= 3 * ((SIZE_T)del << 1);
  776|       |
  777|  11.7M|        tmp = (FLOAT32)(((FLOAT32)x1r * W1) + ((FLOAT32)x1i * W4));
  778|  11.7M|        x1i = (FLOAT32)(-((FLOAT32)x1r * W4) + (FLOAT32)x1i * W1);
  779|  11.7M|        x1r = tmp;
  780|       |
  781|  11.7M|        tmp = (FLOAT32)(((FLOAT32)x2r * W2) + ((FLOAT32)x2i * W5));
  782|  11.7M|        x2i = (FLOAT32)(-((FLOAT32)x2r * W5) + (FLOAT32)x2i * W2);
  783|  11.7M|        x2r = tmp;
  784|       |
  785|  11.7M|        tmp = (FLOAT32)(((FLOAT32)x3r * W6) - ((FLOAT32)x3i * W3));
  786|  11.7M|        x3i = (FLOAT32)(((FLOAT32)x3r * W3) + ((FLOAT32)x3i * W6));
  787|  11.7M|        x3r = tmp;
  788|       |
  789|  11.7M|        x0r = (*data);
  790|  11.7M|        x0i = (*(data + 1));
  791|       |
  792|  11.7M|        x0r = x0r + (x2r);
  793|  11.7M|        x0i = x0i + (x2i);
  794|  11.7M|        x2r = x0r - (x2r * 2);
  795|  11.7M|        x2i = x0i - (x2i * 2);
  796|  11.7M|        x1r = x1r + x3r;
  797|  11.7M|        x1i = x1i + x3i;
  798|  11.7M|        x3r = x1r - (x3r * 2);
  799|  11.7M|        x3i = x1i - (x3i * 2);
  800|       |
  801|  11.7M|        x0r = x0r + (x1r);
  802|  11.7M|        x0i = x0i + (x1i);
  803|  11.7M|        x1r = x0r - (x1r * 2);
  804|  11.7M|        x1i = x0i - (x1i * 2);
  805|  11.7M|        x2r = x2r - (x3i);
  806|  11.7M|        x2i = x2i + (x3r);
  807|  11.7M|        x3i = x2r + (x3i * 2);
  808|  11.7M|        x3r = x2i - (x3r * 2);
  809|       |
  810|  11.7M|        *data = x0r;
  811|  11.7M|        *(data + 1) = x0i;
  812|  11.7M|        data += ((SIZE_T)del << 1);
  813|       |
  814|  11.7M|        *data = x2r;
  815|  11.7M|        *(data + 1) = x2i;
  816|  11.7M|        data += ((SIZE_T)del << 1);
  817|       |
  818|  11.7M|        *data = x1r;
  819|  11.7M|        *(data + 1) = x1i;
  820|  11.7M|        data += ((SIZE_T)del << 1);
  821|       |
  822|  11.7M|        *data = x3i;
  823|  11.7M|        *(data + 1) = x3r;
  824|  11.7M|        data += ((SIZE_T)del << 1);
  825|  11.7M|      }
  826|  8.19M|      data -= 2 * npoints;
  827|  8.19M|      data += 2;
  828|  8.19M|    }
  829|  8.19M|    for (; j <= sec_loop_cnt * 2; j += nodespacing) {
  ------------------
  |  Branch (829:12): [True: 1.06M, False: 7.12M]
  ------------------
  830|  1.06M|      W1 = *(twiddles + j);
  831|  1.06M|      W4 = *(twiddles + j + 257);
  832|  1.06M|      W2 = *(twiddles + ((SIZE_T)j << 1) - 256);
  833|  1.06M|      W5 = *(twiddles + ((SIZE_T)j << 1) + 1);
  834|  1.06M|      W3 = *(twiddles + j + ((SIZE_T)j << 1) - 256);
  835|  1.06M|      W6 = *(twiddles + j + ((SIZE_T)j << 1) + 1);
  836|       |
  837|  2.13M|      for (k = in_loop_cnt; k != 0; k--) {
  ------------------
  |  Branch (837:29): [True: 1.06M, False: 1.06M]
  ------------------
  838|  1.06M|        FLOAT32 tmp;
  839|  1.06M|        FLOAT32 x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;
  840|       |
  841|  1.06M|        data += ((SIZE_T)del << 1);
  842|       |
  843|  1.06M|        x1r = *data;
  844|  1.06M|        x1i = *(data + 1);
  845|  1.06M|        data += ((SIZE_T)del << 1);
  846|       |
  847|  1.06M|        x2r = *data;
  848|  1.06M|        x2i = *(data + 1);
  849|  1.06M|        data += ((SIZE_T)del << 1);
  850|       |
  851|  1.06M|        x3r = *data;
  852|  1.06M|        x3i = *(data + 1);
  853|  1.06M|        data -= 3 * ((SIZE_T)del << 1);
  854|       |
  855|  1.06M|        tmp = (FLOAT32)(((FLOAT32)x1r * W1) + ((FLOAT32)x1i * W4));
  856|  1.06M|        x1i = (FLOAT32)(-((FLOAT32)x1r * W4) + (FLOAT32)x1i * W1);
  857|  1.06M|        x1r = tmp;
  858|       |
  859|  1.06M|        tmp = (FLOAT32)(((FLOAT32)x2r * W5) - ((FLOAT32)x2i * W2));
  860|  1.06M|        x2i = (FLOAT32)(((FLOAT32)x2r * W2) + ((FLOAT32)x2i * W5));
  861|  1.06M|        x2r = tmp;
  862|       |
  863|  1.06M|        tmp = (FLOAT32)(((FLOAT32)x3r * W6) - ((FLOAT32)x3i * W3));
  864|  1.06M|        x3i = (FLOAT32)(((FLOAT32)x3r * W3) + ((FLOAT32)x3i * W6));
  865|  1.06M|        x3r = tmp;
  866|       |
  867|  1.06M|        x0r = (*data);
  868|  1.06M|        x0i = (*(data + 1));
  869|       |
  870|  1.06M|        x0r = x0r + (x2r);
  871|  1.06M|        x0i = x0i + (x2i);
  872|  1.06M|        x2r = x0r - (x2r * 2);
  873|  1.06M|        x2i = x0i - (x2i * 2);
  874|  1.06M|        x1r = x1r + x3r;
  875|  1.06M|        x1i = x1i + x3i;
  876|  1.06M|        x3r = x1r - (x3r * 2);
  877|  1.06M|        x3i = x1i - (x3i * 2);
  878|       |
  879|  1.06M|        x0r = x0r + (x1r);
  880|  1.06M|        x0i = x0i + (x1i);
  881|  1.06M|        x1r = x0r - (x1r * 2);
  882|  1.06M|        x1i = x0i - (x1i * 2);
  883|  1.06M|        x2r = x2r - (x3i);
  884|  1.06M|        x2i = x2i + (x3r);
  885|  1.06M|        x3i = x2r + (x3i * 2);
  886|  1.06M|        x3r = x2i - (x3r * 2);
  887|       |
  888|  1.06M|        *data = x0r;
  889|  1.06M|        *(data + 1) = x0i;
  890|  1.06M|        data += ((SIZE_T)del << 1);
  891|       |
  892|  1.06M|        *data = x2r;
  893|  1.06M|        *(data + 1) = x2i;
  894|  1.06M|        data += ((SIZE_T)del << 1);
  895|       |
  896|  1.06M|        *data = x1r;
  897|  1.06M|        *(data + 1) = x1i;
  898|  1.06M|        data += ((SIZE_T)del << 1);
  899|       |
  900|  1.06M|        *data = x3i;
  901|  1.06M|        *(data + 1) = x3r;
  902|  1.06M|        data += ((SIZE_T)del << 1);
  903|  1.06M|      }
  904|  1.06M|      data -= 2 * npoints;
  905|  1.06M|      data += 2;
  906|  1.06M|    }
  907|  16.3M|    for (; j < nodespacing * del; j += nodespacing) {
  ------------------
  |  Branch (907:12): [True: 9.26M, False: 7.12M]
  ------------------
  908|  9.26M|      W1 = *(twiddles + j);
  909|  9.26M|      W4 = *(twiddles + j + 257);
  910|  9.26M|      W2 = *(twiddles + ((SIZE_T)j << 1) - 256);
  911|  9.26M|      W5 = *(twiddles + ((SIZE_T)j << 1) + 1);
  912|  9.26M|      W3 = *(twiddles + j + ((SIZE_T)j << 1) - 512);
  913|  9.26M|      W6 = *(twiddles + j + ((SIZE_T)j << 1) - 512 + 257);
  914|       |
  915|  22.0M|      for (k = in_loop_cnt; k != 0; k--) {
  ------------------
  |  Branch (915:29): [True: 12.7M, False: 9.26M]
  ------------------
  916|  12.7M|        FLOAT32 tmp;
  917|  12.7M|        FLOAT32 x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;
  918|       |
  919|  12.7M|        data += ((SIZE_T)del << 1);
  920|       |
  921|  12.7M|        x1r = *data;
  922|  12.7M|        x1i = *(data + 1);
  923|  12.7M|        data += ((SIZE_T)del << 1);
  924|       |
  925|  12.7M|        x2r = *data;
  926|  12.7M|        x2i = *(data + 1);
  927|  12.7M|        data += ((SIZE_T)del << 1);
  928|       |
  929|  12.7M|        x3r = *data;
  930|  12.7M|        x3i = *(data + 1);
  931|  12.7M|        data -= 3 * ((SIZE_T)del << 1);
  932|       |
  933|  12.7M|        tmp = (FLOAT32)(((FLOAT32)x1r * W1) + ((FLOAT32)x1i * W4));
  934|  12.7M|        x1i = (FLOAT32)(-((FLOAT32)x1r * W4) + (FLOAT32)x1i * W1);
  935|  12.7M|        x1r = tmp;
  936|       |
  937|  12.7M|        tmp = (FLOAT32)(((FLOAT32)x2r * W5) - ((FLOAT32)x2i * W2));
  938|  12.7M|        x2i = (FLOAT32)(((FLOAT32)x2r * W2) + ((FLOAT32)x2i * W5));
  939|  12.7M|        x2r = tmp;
  940|       |
  941|  12.7M|        tmp = (FLOAT32)(-((FLOAT32)x3r * W3) - ((FLOAT32)x3i * W6));
  942|  12.7M|        x3i = (FLOAT32)(-((FLOAT32)x3r * W6) + (FLOAT32)x3i * W3);
  943|  12.7M|        x3r = tmp;
  944|       |
  945|  12.7M|        x0r = (*data);
  946|  12.7M|        x0i = (*(data + 1));
  947|       |
  948|  12.7M|        x0r = x0r + (x2r);
  949|  12.7M|        x0i = x0i + (x2i);
  950|  12.7M|        x2r = x0r - (x2r * 2);
  951|  12.7M|        x2i = x0i - (x2i * 2);
  952|  12.7M|        x1r = x1r + x3r;
  953|  12.7M|        x1i = x1i - x3i;
  954|  12.7M|        x3r = x1r - (x3r * 2);
  955|  12.7M|        x3i = x1i + (x3i * 2);
  956|       |
  957|  12.7M|        x0r = x0r + (x1r);
  958|  12.7M|        x0i = x0i + (x1i);
  959|  12.7M|        x1r = x0r - (x1r * 2);
  960|  12.7M|        x1i = x0i - (x1i * 2);
  961|  12.7M|        x2r = x2r - (x3i);
  962|  12.7M|        x2i = x2i + (x3r);
  963|  12.7M|        x3i = x2r + (x3i * 2);
  964|  12.7M|        x3r = x2i - (x3r * 2);
  965|       |
  966|  12.7M|        *data = x0r;
  967|  12.7M|        *(data + 1) = x0i;
  968|  12.7M|        data += ((SIZE_T)del << 1);
  969|       |
  970|  12.7M|        *data = x2r;
  971|  12.7M|        *(data + 1) = x2i;
  972|  12.7M|        data += ((SIZE_T)del << 1);
  973|       |
  974|  12.7M|        *data = x1r;
  975|  12.7M|        *(data + 1) = x1i;
  976|  12.7M|        data += ((SIZE_T)del << 1);
  977|       |
  978|  12.7M|        *data = x3i;
  979|  12.7M|        *(data + 1) = x3r;
  980|  12.7M|        data += ((SIZE_T)del << 1);
  981|  12.7M|      }
  982|  9.26M|      data -= 2 * npoints;
  983|  9.26M|      data += 2;
  984|  9.26M|    }
  985|  7.12M|    nodespacing >>= 2;
  986|  7.12M|    del <<= 2;
  987|  7.12M|    in_loop_cnt >>= 2;
  988|  7.12M|  }
  989|       |
  990|  6.59M|  if (not_power_4) {
  ------------------
  |  Branch (990:7): [True: 1.91M, False: 4.67M]
  ------------------
  991|  1.91M|    const FLOAT32 *twiddles = ptr_w;
  992|  1.91M|    nodespacing <<= 1;
  993|       |
  994|  17.2M|    for (j = del / 2; j != 0; j--) {
  ------------------
  |  Branch (994:23): [True: 15.3M, False: 1.91M]
  ------------------
  995|  15.3M|      FLOAT32 W1 = *twiddles;
  996|  15.3M|      FLOAT32 W4 = *(twiddles + 257);
  997|  15.3M|      FLOAT32 tmp;
  998|  15.3M|      twiddles += nodespacing;
  999|       |
 1000|  15.3M|      x0r = *ptr_y;
 1001|  15.3M|      x0i = *(ptr_y + 1);
 1002|  15.3M|      ptr_y += ((SIZE_T)del << 1);
 1003|       |
 1004|  15.3M|      x1r = *ptr_y;
 1005|  15.3M|      x1i = *(ptr_y + 1);
 1006|       |
 1007|  15.3M|      tmp = (FLOAT32)(((FLOAT32)x1r * W1) + ((FLOAT32)x1i * W4));
 1008|  15.3M|      x1i = (FLOAT32)(-((FLOAT32)x1r * W4) + (FLOAT32)x1i * W1);
 1009|  15.3M|      x1r = tmp;
 1010|       |
 1011|  15.3M|      *ptr_y = (x0r) - (x1r);
 1012|  15.3M|      *(ptr_y + 1) = (x0i) - (x1i);
 1013|  15.3M|      ptr_y -= ((SIZE_T)del << 1);
 1014|       |
 1015|  15.3M|      *ptr_y = (x0r) + (x1r);
 1016|  15.3M|      *(ptr_y + 1) = (x0i) + (x1i);
 1017|  15.3M|      ptr_y += 2;
 1018|  15.3M|    }
 1019|  1.91M|    twiddles = ptr_w;
 1020|  17.2M|    for (j = del / 2; j != 0; j--) {
  ------------------
  |  Branch (1020:23): [True: 15.3M, False: 1.91M]
  ------------------
 1021|  15.3M|      FLOAT32 W1 = *twiddles;
 1022|  15.3M|      FLOAT32 W4 = *(twiddles + 257);
 1023|  15.3M|      FLOAT32 tmp;
 1024|  15.3M|      twiddles += nodespacing;
 1025|       |
 1026|  15.3M|      x0r = *ptr_y;
 1027|  15.3M|      x0i = *(ptr_y + 1);
 1028|  15.3M|      ptr_y += ((SIZE_T)del << 1);
 1029|       |
 1030|  15.3M|      x1r = *ptr_y;
 1031|  15.3M|      x1i = *(ptr_y + 1);
 1032|       |
 1033|  15.3M|      tmp = (FLOAT32)(((FLOAT32)x1r * W4) - ((FLOAT32)x1i * W1));
 1034|  15.3M|      x1i = (FLOAT32)(((FLOAT32)x1r * W1) + ((FLOAT32)x1i * W4));
 1035|  15.3M|      x1r = tmp;
 1036|       |
 1037|  15.3M|      *ptr_y = (x0r) - (x1r);
 1038|  15.3M|      *(ptr_y + 1) = (x0i) - (x1i);
 1039|  15.3M|      ptr_y -= ((SIZE_T)del << 1);
 1040|       |
 1041|  15.3M|      *ptr_y = (x0r) + (x1r);
 1042|  15.3M|      *(ptr_y + 1) = (x0i) + (x1i);
 1043|  15.3M|      ptr_y += 2;
 1044|  15.3M|    }
 1045|  1.91M|  }
 1046|  6.59M|}
ixheaac_real_synth_fft_p3:
 1084|  2.72M|void ixheaac_real_synth_fft_p3(FLOAT32 *x_in, FLOAT32 *x_out, WORD32 npoints) {
 1085|  2.72M|  WORD32 i, j;
 1086|  2.72M|  FLOAT32 x_3[8];
 1087|  2.72M|  FLOAT32 y_3[16];
 1088|  2.72M|  FLOAT32 y[48];
 1089|  2.72M|  FLOAT32 x[48];
 1090|  2.72M|  FLOAT32 *ptr_y = y;
 1091|  2.72M|  FLOAT32 *y_p3 = y;
 1092|  2.72M|  FLOAT32 *x_p3 = x;
 1093|       |
 1094|  10.9M|  for (i = 0; i < 3; i += 1) {
  ------------------
  |  Branch (1094:15): [True: 8.17M, False: 2.72M]
  ------------------
 1095|  73.6M|    for (j = 0; j < (npoints / 3); j++) {
  ------------------
  |  Branch (1095:17): [True: 65.4M, False: 8.17M]
  ------------------
 1096|  65.4M|      x_3[j] = x_in[3 * j + i];
 1097|  65.4M|    }
 1098|       |
 1099|  8.17M|    ixheaac_real_synth_fft_p2(x_3, y_3, 8);
 1100|       |
 1101|  73.6M|    for (j = 0; j < 16; j += 2) {
  ------------------
  |  Branch (1101:17): [True: 65.4M, False: 8.17M]
  ------------------
 1102|  65.4M|      x[3 * j + 2 * i] = y_3[j];
 1103|  65.4M|      x[3 * j + 2 * i + 1] = y_3[j + 1];
 1104|  65.4M|    }
 1105|  8.17M|  }
 1106|       |
 1107|  2.72M|  {
 1108|  2.72M|    FLOAT32 *wr;
 1109|  2.72M|    FLOAT32 tmp;
 1110|  2.72M|    FLOAT32 *x_tw = x;
 1111|  2.72M|    wr = (FLOAT32 *)ixheaac_twidle_tbl_24;
 1112|  2.72M|    x_tw += 2;
 1113|       |
 1114|  24.5M|    for (i = 0; i < (npoints / 3); i++) {
  ------------------
  |  Branch (1114:17): [True: 21.8M, False: 2.72M]
  ------------------
 1115|  21.8M|      tmp = ((*x_tw) * (*wr) + (*(x_tw + 1)) * (*(wr + 1)));
 1116|  21.8M|      *(x_tw + 1) = (-(*x_tw) * (*(wr + 1)) + (*(x_tw + 1)) * (*wr));
 1117|  21.8M|      *x_tw = tmp;
 1118|       |
 1119|  21.8M|      wr += 2;
 1120|  21.8M|      x_tw += 2;
 1121|       |
 1122|  21.8M|      tmp = ((*x_tw) * (*wr) + (*(x_tw + 1)) * (*(wr + 1)));
 1123|  21.8M|      *(x_tw + 1) = (-(*x_tw) * (*(wr + 1)) + (*(x_tw + 1)) * (*wr));
 1124|  21.8M|      *x_tw = tmp;
 1125|       |
 1126|  21.8M|      wr += 2;
 1127|  21.8M|      x_tw += 4;
 1128|  21.8M|    }
 1129|  2.72M|  }
 1130|       |
 1131|  24.5M|  for (i = 0; i < (npoints / 3); i++) {
  ------------------
  |  Branch (1131:15): [True: 21.8M, False: 2.72M]
  ------------------
 1132|  21.8M|    ixheaac_aac_ld_dec_fft_3_float(x_p3, y_p3);
 1133|       |
 1134|  21.8M|    x_p3 = x_p3 + 6;
 1135|  21.8M|    y_p3 = y_p3 + 6;
 1136|  21.8M|  }
 1137|       |
 1138|  24.5M|  for (i = 0; i < 16; i += 2) {
  ------------------
  |  Branch (1138:15): [True: 21.8M, False: 2.72M]
  ------------------
 1139|  21.8M|    x_out[i] = *ptr_y++;
 1140|  21.8M|    x_out[i + 1] = *ptr_y++;
 1141|  21.8M|    x_out[16 + i] = *ptr_y++;
 1142|  21.8M|    x_out[16 + i + 1] = *ptr_y++;
 1143|  21.8M|    x_out[32 + i] = *ptr_y++;
 1144|  21.8M|    x_out[32 + i + 1] = *ptr_y++;
 1145|  21.8M|  }
 1146|  2.72M|}
ixheaac_cmplx_anal_fft_p3:
 1148|  1.36M|void ixheaac_cmplx_anal_fft_p3(FLOAT32 *x_in, FLOAT32 *x_out, WORD32 npoints) {
 1149|  1.36M|  WORD32 i, j;
 1150|  1.36M|  FLOAT32 x_3[32];
 1151|  1.36M|  FLOAT32 y_3[32];
 1152|  1.36M|  FLOAT32 y[96];
 1153|  1.36M|  FLOAT32 *ptr_x = x_in;
 1154|  1.36M|  FLOAT32 *ptr_y = y;
 1155|  1.36M|  FLOAT32 *y_p3 = y;
 1156|       |
 1157|  5.45M|  for (i = 0; i < 6; i += 2) {
  ------------------
  |  Branch (1157:15): [True: 4.08M, False: 1.36M]
  ------------------
 1158|  69.5M|    for (j = 0; j < 32; j += 2) {
  ------------------
  |  Branch (1158:17): [True: 65.4M, False: 4.08M]
  ------------------
 1159|  65.4M|      x_3[j] = x_in[3 * j + i];
 1160|  65.4M|      x_3[j + 1] = x_in[3 * j + i + 1];
 1161|  65.4M|    }
 1162|       |
 1163|  4.08M|    ixheaac_cmplx_anal_fft_p2(x_3, y_3, 16);
 1164|       |
 1165|  69.5M|    for (j = 0; j < 32; j += 2) {
  ------------------
  |  Branch (1165:17): [True: 65.4M, False: 4.08M]
  ------------------
 1166|  65.4M|      x_in[3 * j + i] = y_3[j];
 1167|  65.4M|      x_in[3 * j + i + 1] = y_3[j + 1];
 1168|  65.4M|    }
 1169|  4.08M|  }
 1170|       |
 1171|  1.36M|  {
 1172|  1.36M|    FLOAT32 *wr;
 1173|  1.36M|    FLOAT32 tmp;
 1174|  1.36M|    wr = (FLOAT32 *)ixheaac_twidle_tbl_48;
 1175|  1.36M|    x_in += 2;
 1176|       |
 1177|  23.1M|    for (i = 0; i < (npoints / 3); i++) {
  ------------------
  |  Branch (1177:17): [True: 21.8M, False: 1.36M]
  ------------------
 1178|  21.8M|      tmp = ((*x_in) * (*wr) + (*(x_in + 1)) * (*(wr + 1)));
 1179|  21.8M|      *(x_in + 1) = (-(*x_in) * (*(wr + 1)) + (*(x_in + 1)) * (*wr));
 1180|  21.8M|      *x_in = tmp;
 1181|       |
 1182|  21.8M|      wr += 2;
 1183|  21.8M|      x_in += 2;
 1184|       |
 1185|  21.8M|      tmp = ((*x_in) * (*wr) + (*(x_in + 1)) * (*(wr + 1)));
 1186|  21.8M|      *(x_in + 1) = (-(*x_in) * (*(wr + 1)) + (*(x_in + 1)) * (*wr));
 1187|  21.8M|      *x_in = tmp;
 1188|       |
 1189|  21.8M|      wr += 2;
 1190|  21.8M|      x_in += 4;
 1191|  21.8M|    }
 1192|  1.36M|  }
 1193|       |
 1194|  23.1M|  for (i = 0; i < (npoints / 3); i++) {
  ------------------
  |  Branch (1194:15): [True: 21.8M, False: 1.36M]
  ------------------
 1195|  21.8M|    ixheaac_aac_ld_dec_fft_3_float(ptr_x, ptr_y);
 1196|       |
 1197|  21.8M|    ptr_x = ptr_x + 6;
 1198|  21.8M|    ptr_y = ptr_y + 6;
 1199|  21.8M|  }
 1200|       |
 1201|  23.1M|  for (i = 0; i < 32; i += 2) {
  ------------------
  |  Branch (1201:15): [True: 21.8M, False: 1.36M]
  ------------------
 1202|  21.8M|    x_out[i] = *y_p3++;
 1203|  21.8M|    x_out[i + 1] = *y_p3++;
 1204|  21.8M|    x_out[32 + i] = *y_p3++;
 1205|  21.8M|    x_out[32 + i + 1] = *y_p3++;
 1206|  21.8M|    x_out[64 + i] = *y_p3++;
 1207|  21.8M|    x_out[64 + i + 1] = *y_p3++;
 1208|  21.8M|  }
 1209|  1.36M|}
ixheaac_esbr_fft.c:ixheaac_aac_ld_dec_fft_3_float:
 1048|  43.6M|static PLATFORM_INLINE void ixheaac_aac_ld_dec_fft_3_float(FLOAT32 *inp, FLOAT32 *op) {
 1049|  43.6M|  FLOAT32 add_r, sub_r;
 1050|  43.6M|  FLOAT32 add_i, sub_i;
 1051|  43.6M|  FLOAT32 temp_real, temp_imag, temp;
 1052|       |
 1053|  43.6M|  FLOAT32 p1, p2, p3, p4;
 1054|       |
 1055|  43.6M|  FLOAT32 sinmu;
 1056|  43.6M|  sinmu = -0.866025403784439f;
 1057|       |
 1058|  43.6M|  temp_real = inp[0] + inp[2];
 1059|  43.6M|  temp_imag = inp[1] + inp[3];
 1060|       |
 1061|  43.6M|  add_r = inp[2] + inp[4];
 1062|  43.6M|  add_i = inp[3] + inp[5];
 1063|       |
 1064|  43.6M|  sub_r = inp[2] - inp[4];
 1065|  43.6M|  sub_i = inp[3] - inp[5];
 1066|       |
 1067|  43.6M|  p1 = add_r / 2.0f;
 1068|  43.6M|  p4 = add_i / 2.0f;
 1069|  43.6M|  p2 = sub_i * sinmu;
 1070|  43.6M|  p3 = sub_r * sinmu;
 1071|       |
 1072|  43.6M|  temp = inp[0] - p1;
 1073|       |
 1074|  43.6M|  op[0] = temp_real + inp[4];
 1075|  43.6M|  op[1] = temp_imag + inp[5];
 1076|  43.6M|  op[2] = temp + p2;
 1077|  43.6M|  op[3] = (inp[1] - p3) - p4;
 1078|  43.6M|  op[4] = temp - p2;
 1079|  43.6M|  op[5] = (inp[1] + p3) - p4;
 1080|       |
 1081|  43.6M|  return;
 1082|  43.6M|}

ia_drc_dec_api:
   68|   358k|                            pVOID pv_value) {
   69|   358k|  ia_drc_api_struct *p_obj_drc = p_ia_drc_dec_obj;
   70|   358k|  IA_ERRORCODE error_code = IA_NO_ERROR;
  ------------------
  |  |   25|   358k|#define IA_NO_ERROR 0x00000000
  ------------------
   71|   358k|  LOOPIDX i;
   72|       |
   73|   358k|  pUWORD32 pui_value = pv_value;
   74|   358k|  pUWORD32 pus_value = pv_value;
   75|   358k|  pWORD8 pb_value = pv_value;
   76|   358k|  SIZE_T *ps_value = pv_value;
  ------------------
  |  |  108|   358k|#define SIZE_T size_t
  ------------------
   77|   358k|  pWORD32 pi_value = pv_value;
   78|   358k|  FLOAT32 *pf_value = pv_value;
   79|       |
   80|   358k|  switch (i_cmd) {
  ------------------
  |  Branch (80:11): [True: 124k, False: 234k]
  ------------------
   81|  24.8k|    case IA_API_CMD_GET_MEM_INFO_SIZE:
  ------------------
  |  |   49|  24.8k|#define IA_API_CMD_GET_MEM_INFO_SIZE 0x0011
  ------------------
  |  Branch (81:5): [True: 24.8k, False: 333k]
  ------------------
   82|  49.6k|    case IA_API_CMD_GET_MEM_INFO_ALIGNMENT:
  ------------------
  |  |   50|  49.6k|#define IA_API_CMD_GET_MEM_INFO_ALIGNMENT 0x0012
  ------------------
  |  Branch (82:5): [True: 24.8k, False: 333k]
  ------------------
   83|  74.4k|    case IA_API_CMD_GET_MEM_INFO_TYPE:
  ------------------
  |  |   51|  74.4k|#define IA_API_CMD_GET_MEM_INFO_TYPE 0x0013
  ------------------
  |  Branch (83:5): [True: 24.8k, False: 333k]
  ------------------
   84|  74.4k|    case IA_API_CMD_GET_MEM_INFO_PLACEMENT:
  ------------------
  |  |   52|  74.4k|#define IA_API_CMD_GET_MEM_INFO_PLACEMENT 0x0014
  ------------------
  |  Branch (84:5): [True: 0, False: 358k]
  ------------------
   85|  74.4k|    case IA_API_CMD_GET_MEM_INFO_PRIORITY:
  ------------------
  |  |   53|  74.4k|#define IA_API_CMD_GET_MEM_INFO_PRIORITY 0x0015
  ------------------
  |  Branch (85:5): [True: 0, False: 358k]
  ------------------
   86|   124k|    case IA_API_CMD_SET_MEM_PTR:
  ------------------
  |  |   54|   124k|#define IA_API_CMD_SET_MEM_PTR 0x0016
  ------------------
  |  Branch (86:5): [True: 49.6k, False: 309k]
  ------------------
   87|   124k|    case IA_API_CMD_SET_MEM_PLACEMENT: {
  ------------------
  |  |   56|   124k|#define IA_API_CMD_SET_MEM_PLACEMENT 0x0018
  ------------------
  |  Branch (87:5): [True: 0, False: 358k]
  ------------------
   88|   124k|      return impd_drc_mem_api(p_ia_drc_dec_obj, i_cmd, i_idx, pv_value);
   89|   124k|    }
   90|   358k|  };
   91|       |
   92|   234k|  switch (i_cmd) {
   93|      0|    case IA_API_CMD_GET_LIB_ID_STRINGS: {
  ------------------
  |  |   27|      0|#define IA_API_CMD_GET_LIB_ID_STRINGS 0x0001
  ------------------
  |  Branch (93:5): [True: 0, False: 234k]
  ------------------
   94|      0|      switch (i_idx) {
   95|      0|        case IA_CMD_TYPE_LIB_NAME: {
  ------------------
  |  |   80|      0|#define IA_CMD_TYPE_LIB_NAME 0x0100
  ------------------
  |  Branch (95:9): [True: 0, False: 0]
  ------------------
   96|      0|          WORD8 lib_name[] = LIBNAME;
  ------------------
  |  |   24|      0|#define LIBNAME "IA_DRC"
  ------------------
   97|      0|          for (i = 0; i < IA_API_STR_LEN && lib_name[i - 1] != 0; i++) {
  ------------------
  |  |   28|      0|#define IA_API_STR_LEN 30
  ------------------
  |  Branch (97:23): [True: 0, False: 0]
  |  Branch (97:45): [True: 0, False: 0]
  ------------------
   98|      0|            pb_value[i] = lib_name[i];
   99|      0|          }
  100|      0|          break;
  101|      0|        }
  102|      0|        case IA_CMD_TYPE_LIB_VERSION: {
  ------------------
  |  |   81|      0|#define IA_CMD_TYPE_LIB_VERSION 0x0200
  ------------------
  |  Branch (102:9): [True: 0, False: 0]
  ------------------
  103|      0|          break;
  104|      0|        }
  105|       |
  106|      0|        case IA_CMD_TYPE_API_VERSION: {
  ------------------
  |  |   82|      0|#define IA_CMD_TYPE_API_VERSION 0x0300
  ------------------
  |  Branch (106:9): [True: 0, False: 0]
  ------------------
  107|      0|        }
  108|      0|        default: { return -1; }
  ------------------
  |  Branch (108:9): [True: 0, False: 0]
  ------------------
  109|      0|      };
  110|      0|      break;
  111|      0|    }
  112|  14.2k|    case IA_API_CMD_GET_API_SIZE: {
  ------------------
  |  |   29|  14.2k|#define IA_API_CMD_GET_API_SIZE 0x0002
  ------------------
  |  Branch (112:5): [True: 14.2k, False: 220k]
  ------------------
  113|  14.2k|      *pui_value = sizeof(ia_drc_api_struct);
  114|       |
  115|  14.2k|      break;
  116|      0|    }
  117|  45.7k|    case IA_API_CMD_INIT: {
  ------------------
  |  |   30|  45.7k|#define IA_API_CMD_INIT 0x0003
  ------------------
  |  Branch (117:5): [True: 45.7k, False: 188k]
  ------------------
  118|  45.7k|      switch (i_idx) {
  119|  12.4k|        case IA_CMD_TYPE_INIT_SET_BUFF_PTR: {
  ------------------
  |  |  101|  12.4k|#define IA_CMD_TYPE_INIT_SET_BUFF_PTR 0x020B
  ------------------
  |  Branch (119:9): [True: 12.4k, False: 33.3k]
  ------------------
  120|  12.4k|          p_obj_drc->p_state->persistent_ptr =
  121|  12.4k|              (UWORD8 *)p_obj_drc->pp_mem[IA_DRC_PERSIST_IDX] +
  ------------------
  |  |   27|  12.4k|#define IA_DRC_PERSIST_IDX (0)
  ------------------
  122|  12.4k|              IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_drc_state_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  123|  12.4k|          error_code = impd_drc_set_struct_pointer(p_obj_drc);
  124|  12.4k|          if (error_code) return error_code;
  ------------------
  |  Branch (124:15): [True: 0, False: 12.4k]
  ------------------
  125|       |
  126|  12.4k|          break;
  127|  12.4k|        }
  128|  14.2k|        case IA_CMD_TYPE_INIT_API_PRE_CONFIG_PARAMS: {
  ------------------
  |  |   85|  14.2k|#define IA_CMD_TYPE_INIT_API_PRE_CONFIG_PARAMS 0x0100
  ------------------
  |  Branch (128:9): [True: 14.2k, False: 31.5k]
  ------------------
  129|  14.2k|          error_code = impd_drc_set_default_config(p_obj_drc);
  130|  14.2k|          if (error_code) return error_code;
  ------------------
  |  Branch (130:15): [True: 0, False: 14.2k]
  ------------------
  131|  14.2k|          break;
  132|  14.2k|        }
  133|  14.2k|        case IA_CMD_TYPE_INIT_API_POST_CONFIG_PARAMS: {
  ------------------
  |  |   86|  12.4k|#define IA_CMD_TYPE_INIT_API_POST_CONFIG_PARAMS 0x0200
  ------------------
  |  Branch (133:9): [True: 12.4k, False: 33.3k]
  ------------------
  134|  12.4k|          error_code = impd_drc_fill_mem_tables(p_obj_drc);
  135|  12.4k|          if (error_code) return error_code;
  ------------------
  |  Branch (135:15): [True: 0, False: 12.4k]
  ------------------
  136|  12.4k|          break;
  137|  12.4k|        }
  138|  12.4k|        case IA_CMD_TYPE_INIT_PROCESS: {
  ------------------
  |  |   87|  1.54k|#define IA_CMD_TYPE_INIT_PROCESS 0x0300
  ------------------
  |  Branch (138:9): [True: 1.54k, False: 44.1k]
  ------------------
  139|  1.54k|          IA_ERRORCODE Error = 0;
  140|       |
  141|  1.54k|          if (p_obj_drc->pp_mem[IA_DRC_PERSIST_IDX] == 0) {
  ------------------
  |  |   27|  1.54k|#define IA_DRC_PERSIST_IDX (0)
  ------------------
  |  Branch (141:15): [True: 0, False: 1.54k]
  ------------------
  142|      0|            return (-1);
  143|      0|          }
  144|       |
  145|  1.54k|          Error = impd_drc_init(p_obj_drc);
  146|  1.54k|          if (Error) return Error;
  ------------------
  |  Branch (146:15): [True: 962, False: 582]
  ------------------
  147|    582|          p_obj_drc->p_state->ui_init_done = 1;
  148|    582|          return Error;
  149|      0|          break;
  150|  1.54k|        }
  151|      0|        case IA_CMD_TYPE_INIT_DONE_QUERY: {
  ------------------
  |  |   88|      0|#define IA_CMD_TYPE_INIT_DONE_QUERY 0x0400
  ------------------
  |  Branch (151:9): [True: 0, False: 45.7k]
  ------------------
  152|      0|          if (p_obj_drc->p_state->ui_init_done == 1) {
  ------------------
  |  Branch (152:15): [True: 0, False: 0]
  ------------------
  153|      0|            *pui_value = 1;
  154|      0|          } else {
  155|      0|            *pui_value = 0;
  156|      0|          }
  157|      0|          break;
  158|  1.54k|        }
  159|       |
  160|      0|        case IA_CMD_TYPE_INIT_CPY_BSF_BUFF_OVER_QUERY: {
  ------------------
  |  |   96|      0|#define IA_CMD_TYPE_INIT_CPY_BSF_BUFF_OVER_QUERY 0x0206
  ------------------
  |  Branch (160:9): [True: 0, False: 45.7k]
  ------------------
  161|      0|          *pui_value = p_obj_drc->str_bit_handler.cpy_over;
  162|      0|          break;
  163|  1.54k|        }
  164|      0|        case IA_CMD_TYPE_INIT_CPY_IC_BSF_BUFF_OVER_QUERY: {
  ------------------
  |  |   97|      0|#define IA_CMD_TYPE_INIT_CPY_IC_BSF_BUFF_OVER_QUERY 0x0207
  ------------------
  |  Branch (164:9): [True: 0, False: 45.7k]
  ------------------
  165|      0|          *pui_value = p_obj_drc->str_bit_handler.cpy_over_ic;
  166|      0|          break;
  167|  1.54k|        }
  168|       |
  169|      0|        case IA_CMD_TYPE_INIT_CPY_IL_BSF_BUFF_OVER_QUERY: {
  ------------------
  |  |   98|      0|#define IA_CMD_TYPE_INIT_CPY_IL_BSF_BUFF_OVER_QUERY 0x0208
  ------------------
  |  Branch (169:9): [True: 0, False: 45.7k]
  ------------------
  170|      0|          *pui_value = p_obj_drc->str_bit_handler.cpy_over_il;
  171|      0|          break;
  172|  1.54k|        }
  173|      0|        case IA_CMD_TYPE_INIT_CPY_IN_BSF_BUFF_OVER_QUERY: {
  ------------------
  |  |  100|      0|#define IA_CMD_TYPE_INIT_CPY_IN_BSF_BUFF_OVER_QUERY 0x020A
  ------------------
  |  Branch (173:9): [True: 0, False: 45.7k]
  ------------------
  174|      0|          *pui_value = p_obj_drc->str_bit_handler.cpy_over_in;
  175|      0|          break;
  176|  1.54k|        }
  177|  1.53k|        case IA_CMD_TYPE_INIT_CPY_BSF_BUFF: {
  ------------------
  |  |   90|  1.53k|#define IA_CMD_TYPE_INIT_CPY_BSF_BUFF 0x0201
  ------------------
  |  Branch (177:9): [True: 1.53k, False: 44.2k]
  ------------------
  178|  1.53k|          memcpy(p_obj_drc->str_bit_handler.it_bit_buf +
  179|  1.53k|                     p_obj_drc->str_bit_handler.num_bytes_offset_bs,
  180|  1.53k|                 p_obj_drc->pp_mem[2], p_obj_drc->str_bit_handler.num_byts_cur);
  181|  1.53k|          p_obj_drc->str_bit_handler.num_bytes_bs =
  182|  1.53k|              p_obj_drc->str_bit_handler.num_bytes_bs +
  183|  1.53k|              p_obj_drc->str_bit_handler.num_byts_cur;
  184|  1.53k|          p_obj_drc->str_bit_handler.num_bytes_offset_bs =
  185|  1.53k|              p_obj_drc->str_bit_handler.num_bytes_bs;
  186|  1.53k|          p_obj_drc->str_bit_handler.num_total_bytes =
  187|  1.53k|              p_obj_drc->str_bit_handler.num_bytes_bs;
  188|       |
  189|  1.53k|          break;
  190|  1.54k|        }
  191|  1.24k|        case IA_CMD_TYPE_INIT_CPY_IC_BSF_BUFF: {
  ------------------
  |  |   91|  1.24k|#define IA_CMD_TYPE_INIT_CPY_IC_BSF_BUFF 0x0202
  ------------------
  |  Branch (191:9): [True: 1.24k, False: 44.4k]
  ------------------
  192|  1.24k|          memcpy(p_obj_drc->str_bit_handler.bitstream_drc_config,
  193|  1.24k|                 p_obj_drc->pp_mem[2],
  194|  1.24k|                 p_obj_drc->str_bit_handler.num_byts_cur_ic);
  195|  1.24k|          p_obj_drc->str_bit_handler.num_bytes_bs_drc_config =
  196|  1.24k|              p_obj_drc->str_bit_handler.num_byts_cur_ic;
  197|  1.24k|          break;
  198|  1.54k|        }
  199|    821|        case IA_CMD_TYPE_INIT_CPY_IL_BSF_BUFF: {
  ------------------
  |  |   92|    821|#define IA_CMD_TYPE_INIT_CPY_IL_BSF_BUFF 0x0203
  ------------------
  |  Branch (199:9): [True: 821, False: 44.9k]
  ------------------
  200|    821|          memcpy(p_obj_drc->str_bit_handler.bitstream_loudness_info,
  201|    821|                 p_obj_drc->pp_mem[2],
  202|    821|                 p_obj_drc->str_bit_handler.num_byts_cur_il);
  203|    821|          p_obj_drc->str_bit_handler.num_bytes_bs_loudness_info =
  204|    821|              p_obj_drc->str_bit_handler.num_byts_cur_il;
  205|    821|          break;
  206|  1.54k|        }
  207|  1.54k|        case IA_CMD_TYPE_INIT_CPY_IN_BSF_BUFF: {
  ------------------
  |  |   94|  1.54k|#define IA_CMD_TYPE_INIT_CPY_IN_BSF_BUFF 0x0205
  ------------------
  |  Branch (207:9): [True: 1.54k, False: 44.1k]
  ------------------
  208|  1.54k|          memcpy(p_obj_drc->str_bit_handler.bitstream_unidrc_interface,
  209|  1.54k|                 p_obj_drc->pp_mem[2],
  210|  1.54k|                 p_obj_drc->str_bit_handler.num_byts_cur_in);
  211|  1.54k|          p_obj_drc->str_bit_handler.num_bytes_bs_unidrc_interface =
  212|  1.54k|              p_obj_drc->str_bit_handler.num_byts_cur_in;
  213|  1.54k|          break;
  214|  1.54k|        }
  215|      0|        default: { return -1; }
  ------------------
  |  Branch (215:9): [True: 0, False: 45.7k]
  ------------------
  216|  45.7k|      };
  217|  44.1k|      break;
  218|  45.7k|    }
  219|  1.54k|    case IA_API_CMD_GET_CONFIG_PARAM: {
  ------------------
  |  |   33|  1.54k|#define IA_API_CMD_GET_CONFIG_PARAM 0x0005
  ------------------
  |  Branch (219:5): [True: 1.54k, False: 233k]
  ------------------
  220|  1.54k|      switch (i_idx) {
  ------------------
  |  Branch (220:15): [True: 1.54k, False: 0]
  ------------------
  221|      0|        case IA_DRC_DEC_CONFIG_PARAM_SAMP_FREQ: {
  ------------------
  |  |   25|      0|#define IA_DRC_DEC_CONFIG_PARAM_SAMP_FREQ 0x0001
  ------------------
  |  Branch (221:9): [True: 0, False: 1.54k]
  ------------------
  222|      0|          *pus_value = p_obj_drc->str_config.sampling_rate;
  223|      0|          break;
  224|      0|        }
  225|       |
  226|  1.54k|        case IA_DRC_DEC_CONFIG_PARAM_NUM_CHANNELS: {
  ------------------
  |  |   26|  1.54k|#define IA_DRC_DEC_CONFIG_PARAM_NUM_CHANNELS 0x0002
  ------------------
  |  Branch (226:9): [True: 1.54k, False: 0]
  ------------------
  227|  1.54k|          *pus_value = p_obj_drc->str_config.num_ch_out;
  228|  1.54k|          break;
  229|      0|        }
  230|      0|        case IA_DRC_DEC_CONFIG_PROC_OUT_PTR: {
  ------------------
  |  |   39|      0|#define IA_DRC_DEC_CONFIG_PROC_OUT_PTR 0x000F
  ------------------
  |  Branch (230:9): [True: 0, False: 1.54k]
  ------------------
  231|      0|          *ps_value = (SIZE_T)p_obj_drc->str_payload.pstr_drc_sel_proc_output;
  232|      0|          break;
  233|      0|        }
  234|      0|        case IA_DRC_DEC_CONFIG_DRC_TARGET_LOUDNESS: {
  ------------------
  |  |   42|      0|#define IA_DRC_DEC_CONFIG_DRC_TARGET_LOUDNESS 0x0012
  ------------------
  |  Branch (234:9): [True: 0, False: 1.54k]
  ------------------
  235|      0|          *pi_value = (WORD32)p_obj_drc->str_payload.pstr_loudness_info->loudness_info
  236|      0|                          ->loudness_measure->method_val;
  237|      0|          if (*pi_value < -1)
  ------------------
  |  Branch (237:15): [True: 0, False: 0]
  ------------------
  238|      0|            *pi_value = *pi_value * -4;
  239|      0|          else
  240|      0|            *pi_value = -1;
  241|      0|          break;
  242|      0|        }
  243|  1.54k|      }
  244|  1.54k|      break;
  245|  1.54k|    }
  246|  82.6k|    case IA_API_CMD_SET_CONFIG_PARAM: {
  ------------------
  |  |   32|  82.6k|#define IA_API_CMD_SET_CONFIG_PARAM 0x0004
  ------------------
  |  Branch (246:5): [True: 82.6k, False: 151k]
  ------------------
  247|  82.6k|      switch (i_idx) {
  248|  12.4k|        case IA_DRC_DEC_CONFIG_PARAM_SAMP_FREQ: {
  ------------------
  |  |   25|  12.4k|#define IA_DRC_DEC_CONFIG_PARAM_SAMP_FREQ 0x0001
  ------------------
  |  Branch (248:9): [True: 12.4k, False: 70.2k]
  ------------------
  249|  12.4k|          if (*pus_value == 0 || *pus_value > 96000) {
  ------------------
  |  Branch (249:15): [True: 0, False: 12.4k]
  |  Branch (249:34): [True: 3, False: 12.4k]
  ------------------
  250|      3|            return IA_DRC_DEC_CONFIG_NON_FATAL_INVALID_SAMP_FREQ;
  ------------------
  |  |   46|      3|#define IA_DRC_DEC_CONFIG_NON_FATAL_INVALID_SAMP_FREQ 0x00000801
  ------------------
  251|      3|          }
  252|  12.4k|          p_obj_drc->str_config.sampling_rate = *pus_value;
  253|  12.4k|          break;
  254|  12.4k|        }
  255|      0|        case IA_DRC_DEC_CONFIG_PARAM_APPLY_CROSSFADE: {
  ------------------
  |  |   47|      0|#define IA_DRC_DEC_CONFIG_PARAM_APPLY_CROSSFADE 0x0017
  ------------------
  |  Branch (255:9): [True: 0, False: 82.6k]
  ------------------
  256|      0|          p_obj_drc->str_config.apply_crossfade = *pus_value;
  257|      0|          break;
  258|  12.4k|        }
  259|      0|        case IA_DRC_DEC_CONFIG_PARAM_CONFIG_CHANGED: {
  ------------------
  |  |   48|      0|#define IA_DRC_DEC_CONFIG_PARAM_CONFIG_CHANGED 0x0018
  ------------------
  |  Branch (259:9): [True: 0, False: 82.6k]
  ------------------
  260|      0|          p_obj_drc->str_config.is_config_changed = *pus_value;
  261|      0|          break;
  262|  12.4k|        }
  263|  12.4k|        case IA_DRC_DEC_CONFIG_PARAM_NUM_CHANNELS: {
  ------------------
  |  |   26|  12.4k|#define IA_DRC_DEC_CONFIG_PARAM_NUM_CHANNELS 0x0002
  ------------------
  |  Branch (263:9): [True: 12.4k, False: 70.2k]
  ------------------
  264|  12.4k|          p_obj_drc->str_config.num_ch_in = *pus_value;
  265|  12.4k|          if (*pus_value < 1 || *pus_value > MAX_CHANNEL_COUNT) {
  ------------------
  |  |   35|  12.3k|#define MAX_CHANNEL_COUNT (8)  // 128
  ------------------
  |  Branch (265:15): [True: 17, False: 12.3k]
  |  Branch (265:33): [True: 0, False: 12.3k]
  ------------------
  266|     17|            return IA_DRC_DEC_CONFIG_NON_FATAL_INVALID_NUM_OF_CHANNELS;
  ------------------
  |  |   45|     17|#define IA_DRC_DEC_CONFIG_NON_FATAL_INVALID_NUM_OF_CHANNELS 0x00000800
  ------------------
  267|     17|          }
  268|  12.3k|          break;
  269|  12.4k|        }
  270|       |
  271|  12.4k|        case IA_DRC_DEC_CONFIG_PARAM_PCM_WDSZ: {
  ------------------
  |  |   24|  12.4k|#define IA_DRC_DEC_CONFIG_PARAM_PCM_WDSZ 0x0000
  ------------------
  |  Branch (271:9): [True: 12.4k, False: 70.2k]
  ------------------
  272|  12.4k|          switch (*pus_value) {
  273|  12.4k|            case 16:
  ------------------
  |  Branch (273:13): [True: 12.4k, False: 0]
  ------------------
  274|  12.4k|            case 24:
  ------------------
  |  Branch (274:13): [True: 0, False: 12.4k]
  ------------------
  275|  12.4k|            case 32:
  ------------------
  |  Branch (275:13): [True: 0, False: 12.4k]
  ------------------
  276|  12.4k|              break;
  277|      0|            default:
  ------------------
  |  Branch (277:13): [True: 0, False: 12.4k]
  ------------------
  278|      0|              return IA_DRC_DEC_CONFIG_NON_FATAL_INVALID_PCM_SIZE;
  ------------------
  |  |   47|      0|#define IA_DRC_DEC_CONFIG_NON_FATAL_INVALID_PCM_SIZE 0x00000802
  ------------------
  279|  12.4k|          }
  280|       |
  281|  12.4k|          p_obj_drc->str_config.pcm_size = *pus_value;
  282|       |
  283|  12.4k|          break;
  284|  12.4k|        }
  285|       |
  286|  3.59k|        case IA_DRC_DEC_CONFIG_PARAM_BITS_FORMAT: {
  ------------------
  |  |   31|  3.59k|#define IA_DRC_DEC_CONFIG_PARAM_BITS_FORMAT 0x0007
  ------------------
  |  Branch (286:9): [True: 3.59k, False: 79.0k]
  ------------------
  287|  3.59k|          break;
  288|  12.4k|        }
  289|  1.54k|        case IA_DRC_DEC_CONFIG_PARAM_INT_PRESENT: {
  ------------------
  |  |   32|  1.54k|#define IA_DRC_DEC_CONFIG_PARAM_INT_PRESENT 0x0008
  ------------------
  |  Branch (289:9): [True: 1.54k, False: 81.1k]
  ------------------
  290|  1.54k|          break;
  291|  12.4k|        }
  292|  1.54k|        case IA_DRC_DEC_CONFIG_PARAM_FRAME_SIZE: {
  ------------------
  |  |   38|  1.54k|#define IA_DRC_DEC_CONFIG_PARAM_FRAME_SIZE 0x000E
  ------------------
  |  Branch (292:9): [True: 1.54k, False: 81.1k]
  ------------------
  293|  1.54k|          if (*pus_value < 1 || *pus_value > 4096) {
  ------------------
  |  Branch (293:15): [True: 0, False: 1.54k]
  |  Branch (293:33): [True: 0, False: 1.54k]
  ------------------
  294|      0|            return IA_DRC_DEC_CONFIG_NON_FATAL_INVALID_FRAME_SIZE;
  ------------------
  |  |   48|      0|#define IA_DRC_DEC_CONFIG_NON_FATAL_INVALID_FRAME_SIZE 0x00000803
  ------------------
  295|      0|          }
  296|       |
  297|  1.54k|          p_obj_drc->str_config.frame_size = *pus_value;
  298|       |
  299|  1.54k|          break;
  300|  1.54k|        }
  301|  1.53k|        case IA_DRC_DEC_CONFIG_GAIN_STREAM_FLAG: {
  ------------------
  |  |   40|  1.53k|#define IA_DRC_DEC_CONFIG_GAIN_STREAM_FLAG 0x0010
  ------------------
  |  Branch (301:9): [True: 1.53k, False: 81.1k]
  ------------------
  302|  1.53k|          break;
  303|  1.54k|        }
  304|       |
  305|  12.4k|        case IA_DRC_DEC_CONFIG_DRC_EFFECT_TYPE: {
  ------------------
  |  |   41|  12.4k|#define IA_DRC_DEC_CONFIG_DRC_EFFECT_TYPE 0x0011
  ------------------
  |  Branch (305:9): [True: 12.4k, False: 70.2k]
  ------------------
  306|  12.4k|          p_obj_drc->str_config.effect_type = *pus_value;
  307|  12.4k|          break;
  308|  1.54k|        }
  309|  12.4k|        case IA_DRC_DEC_CONFIG_DRC_TARGET_LOUDNESS: {
  ------------------
  |  |   42|  12.4k|#define IA_DRC_DEC_CONFIG_DRC_TARGET_LOUDNESS 0x0012
  ------------------
  |  Branch (309:9): [True: 12.4k, False: 70.2k]
  ------------------
  310|  12.4k|          p_obj_drc->str_config.target_loudness = *pus_value;
  311|  12.4k|          break;
  312|  1.54k|        }
  313|  12.4k|        case IA_DRC_DEC_CONFIG_DRC_LOUD_NORM: {
  ------------------
  |  |   43|  12.4k|#define IA_DRC_DEC_CONFIG_DRC_LOUD_NORM 0x0013
  ------------------
  |  Branch (313:9): [True: 12.4k, False: 70.2k]
  ------------------
  314|  12.4k|          p_obj_drc->str_config.loud_norm_flag = *pus_value;
  315|  12.4k|          break;
  316|  1.54k|        }
  317|      0|        case IA_DRC_DEC_CONFIG_DRC_ALBUM_MODE: {
  ------------------
  |  |   44|      0|#define IA_DRC_DEC_CONFIG_DRC_ALBUM_MODE 0x0014
  ------------------
  |  Branch (317:9): [True: 0, False: 82.6k]
  ------------------
  318|      0|          p_obj_drc->str_config.album_mode = *pus_value;
  319|      0|          break;
  320|  1.54k|        }
  321|      0|        case IA_DRC_DEC_CONFIG_DRC_BOOST: {
  ------------------
  |  |   45|      0|#define IA_DRC_DEC_CONFIG_DRC_BOOST 0x0015
  ------------------
  |  Branch (321:9): [True: 0, False: 82.6k]
  ------------------
  322|      0|          p_obj_drc->str_config.boost = *pf_value;
  323|      0|          p_obj_drc->str_config.boost_set = 1;
  324|      0|          break;
  325|  1.54k|        }
  326|      0|        case IA_DRC_DEC_CONFIG_DRC_COMPRESS: {
  ------------------
  |  |   46|      0|#define IA_DRC_DEC_CONFIG_DRC_COMPRESS 0x0016
  ------------------
  |  Branch (326:9): [True: 0, False: 82.6k]
  ------------------
  327|      0|          p_obj_drc->str_config.compress = *pf_value;
  328|      0|          p_obj_drc->str_config.compress_set = 1;
  329|      0|          break;
  330|  1.54k|        }
  331|      0|#ifdef LOUDNESS_LEVELING_SUPPORT
  332|      0|        case IA_DRC_DEC_CONFIG_DRC_LOUDNESS_LEVELING: {
  ------------------
  |  |   50|      0|#define IA_DRC_DEC_CONFIG_DRC_LOUDNESS_LEVELING 0x0019
  ------------------
  |  Branch (332:9): [True: 0, False: 82.6k]
  ------------------
  333|      0|          p_obj_drc->str_config.loudness_leveling_flag = *pus_value;
  334|      0|          break;
  335|  1.54k|        }
  336|      0|#endif
  337|      0|        default: { return -1; }
  ------------------
  |  Branch (337:9): [True: 0, False: 82.6k]
  ------------------
  338|  82.6k|      }
  339|  82.6k|      break;
  340|  82.6k|    }
  341|  82.6k|    case IA_API_CMD_GET_MEMTABS_SIZE: {
  ------------------
  |  |   35|  12.4k|#define IA_API_CMD_GET_MEMTABS_SIZE 0x0006
  ------------------
  |  Branch (341:5): [True: 12.4k, False: 222k]
  ------------------
  342|  12.4k|      *pui_value =
  343|  12.4k|          (sizeof(ia_mem_info_struct) + sizeof(pVOID *)) * (NUM_DRC_TABLES);
  ------------------
  |  |   65|  12.4k|#define NUM_DRC_TABLES 4
  ------------------
  344|  12.4k|      break;
  345|  82.6k|    }
  346|  12.4k|    case IA_API_CMD_SET_MEMTABS_PTR: {
  ------------------
  |  |   36|  12.4k|#define IA_API_CMD_SET_MEMTABS_PTR 0x0007
  ------------------
  |  Branch (346:5): [True: 12.4k, False: 222k]
  ------------------
  347|  12.4k|      if (ps_value == NULL) return IA_DRC_DEC_API_FATAL_MEM_ALLOC;
  ------------------
  |  |   35|      0|#define IA_DRC_DEC_API_FATAL_MEM_ALLOC 0xFFFF8002
  ------------------
  |  Branch (347:11): [True: 0, False: 12.4k]
  ------------------
  348|  12.4k|      memset(ps_value, 0,
  349|  12.4k|             (sizeof(ia_mem_info_struct) + sizeof(pVOID *)) * (NUM_DRC_TABLES));
  ------------------
  |  |   65|  12.4k|#define NUM_DRC_TABLES 4
  ------------------
  350|  12.4k|      p_obj_drc->p_mem_info = (ia_mem_info_struct *)(ps_value);
  351|  12.4k|      p_obj_drc->pp_mem =
  352|  12.4k|          (pVOID)((SIZE_T)p_obj_drc->p_mem_info +
  353|  12.4k|                  (NUM_DRC_TABLES * sizeof(*(p_obj_drc->p_mem_info))));
  ------------------
  |  |   65|  12.4k|#define NUM_DRC_TABLES 4
  ------------------
  354|  12.4k|      break;
  355|  12.4k|    }
  356|      0|    case IA_API_CMD_GET_N_MEMTABS: {
  ------------------
  |  |   37|      0|#define IA_API_CMD_GET_N_MEMTABS 0x0008
  ------------------
  |  Branch (356:5): [True: 0, False: 234k]
  ------------------
  357|      0|      *pui_value = NUM_DRC_TABLES;
  ------------------
  |  |   65|      0|#define NUM_DRC_TABLES 4
  ------------------
  358|      0|      break;
  359|  12.4k|    }
  360|      0|    case IA_API_CMD_GET_N_TABLES: {
  ------------------
  |  |   58|      0|#define IA_API_CMD_GET_N_TABLES 0x0019
  ------------------
  |  Branch (360:5): [True: 0, False: 234k]
  ------------------
  361|      0|      break;
  362|  12.4k|    }
  363|       |
  364|  31.0k|    case IA_API_CMD_EXECUTE: {
  ------------------
  |  |   39|  31.0k|#define IA_API_CMD_EXECUTE 0x0009
  ------------------
  |  Branch (364:5): [True: 31.0k, False: 203k]
  ------------------
  365|  31.0k|      switch (i_idx) {
  366|  31.0k|        case IA_CMD_TYPE_DO_EXECUTE: {
  ------------------
  |  |  104|  31.0k|#define IA_CMD_TYPE_DO_EXECUTE 0x0100
  ------------------
  |  Branch (366:9): [True: 31.0k, False: 0]
  ------------------
  367|  31.0k|          if (!p_obj_drc->p_state->ui_init_done) {
  ------------------
  |  Branch (367:15): [True: 11.6k, False: 19.4k]
  ------------------
  368|  11.6k|            error_code = IA_FATAL_ERROR;
  ------------------
  |  |   38|  11.6k|#define IA_FATAL_ERROR 0x80000000
  ------------------
  369|  19.4k|          } else if (p_obj_drc->str_config.dec_type == DEC_TYPE_TD) {
  ------------------
  |  |   23|  19.4k|#define DEC_TYPE_TD 0
  ------------------
  |  Branch (369:22): [True: 19.4k, False: 0]
  ------------------
  370|  19.4k|            error_code = impd_process_time_domain(p_obj_drc);
  371|  19.4k|          } else if (p_obj_drc->str_config.dec_type == DEC_TYPE_QMF64) {
  ------------------
  |  |   25|      0|#define DEC_TYPE_QMF64 2
  ------------------
  |  Branch (371:22): [True: 0, False: 0]
  ------------------
  372|      0|            error_code = IA_FATAL_ERROR;
  ------------------
  |  |   38|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
  373|      0|          } else if (p_obj_drc->str_config.dec_type == DEC_TYPE_STFT256) {
  ------------------
  |  |   26|      0|#define DEC_TYPE_STFT256 3
  ------------------
  |  Branch (373:22): [True: 0, False: 0]
  ------------------
  374|      0|            error_code = IA_FATAL_ERROR;
  ------------------
  |  |   38|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
  375|      0|          } else if (p_obj_drc->str_config.dec_type == DEC_TYPE_TD_QMF64) {
  ------------------
  |  |   24|      0|#define DEC_TYPE_TD_QMF64 1
  ------------------
  |  Branch (375:22): [True: 0, False: 0]
  ------------------
  376|      0|            error_code = IA_FATAL_ERROR;
  ------------------
  |  |   38|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
  377|      0|          }
  378|  31.0k|          p_obj_drc->str_bit_handler.byte_index_bs =
  379|  31.0k|              p_obj_drc->str_bit_handler.num_total_bytes -
  380|  31.0k|              p_obj_drc->str_bit_handler.num_bytes_bs;
  381|  31.0k|          p_obj_drc->str_bit_handler.num_bytes_offset_bs = 0;
  382|       |
  383|  31.0k|          break;
  384|      0|        }
  385|      0|        case IA_CMD_TYPE_DONE_QUERY: {
  ------------------
  |  |  105|      0|#define IA_CMD_TYPE_DONE_QUERY 0x0200
  ------------------
  |  Branch (385:9): [True: 0, False: 31.0k]
  ------------------
  386|      0|          *pui_value = p_obj_drc->p_state->ui_exe_done;
  387|      0|          break;
  388|      0|        }
  389|      0|        default: { return -1; }
  ------------------
  |  Branch (389:9): [True: 0, False: 31.0k]
  ------------------
  390|  31.0k|      };
  391|  31.0k|      break;
  392|  31.0k|    }
  393|      0|    case IA_API_CMD_PUT_INPUT_QUERY: {
  ------------------
  |  |   41|      0|#define IA_API_CMD_PUT_INPUT_QUERY 0x000A
  ------------------
  |  Branch (393:5): [True: 0, False: 234k]
  ------------------
  394|      0|      *pui_value = 1;
  395|      0|      break;
  396|  31.0k|    }
  397|      0|    case IA_API_CMD_GET_CURIDX_INPUT_BUF: {
  ------------------
  |  |   42|      0|#define IA_API_CMD_GET_CURIDX_INPUT_BUF 0x000B
  ------------------
  |  Branch (397:5): [True: 0, False: 234k]
  ------------------
  398|      0|      UWORD32 ui_in_buf_size = p_obj_drc->p_mem_info[IA_DRC_INPUT_IDX].ui_size;
  ------------------
  |  |   29|      0|#define IA_DRC_INPUT_IDX (2)
  ------------------
  399|      0|      UWORD32 ui_in_bytes = p_obj_drc->p_state->ui_in_bytes;
  400|      0|      *pui_value = ui_in_buf_size > ui_in_bytes ? ui_in_bytes : ui_in_buf_size;
  ------------------
  |  Branch (400:20): [True: 0, False: 0]
  ------------------
  401|      0|      break;
  402|  31.0k|    }
  403|  31.0k|    case IA_API_CMD_SET_INPUT_BYTES: {
  ------------------
  |  |   43|  31.0k|#define IA_API_CMD_SET_INPUT_BYTES 0x000C
  ------------------
  |  Branch (403:5): [True: 31.0k, False: 203k]
  ------------------
  404|  31.0k|      p_obj_drc->p_state->ui_in_bytes = *pui_value;
  405|  31.0k|      break;
  406|  31.0k|    }
  407|       |
  408|      0|    case IA_API_CMD_GET_OUTPUT_BYTES: {
  ------------------
  |  |   44|      0|#define IA_API_CMD_GET_OUTPUT_BYTES 0x000D
  ------------------
  |  Branch (408:5): [True: 0, False: 234k]
  ------------------
  409|      0|      *pui_value = p_obj_drc->p_state->ui_out_bytes;
  410|      0|      break;
  411|  31.0k|    }
  412|      0|    case IA_API_CMD_INPUT_OVER: {
  ------------------
  |  |   45|      0|#define IA_API_CMD_INPUT_OVER 0x000E
  ------------------
  |  Branch (412:5): [True: 0, False: 234k]
  ------------------
  413|      0|      p_obj_drc->p_state->ui_exe_done = 1;
  414|      0|      break;
  415|  31.0k|    }
  416|  1.53k|    case IA_API_CMD_SET_INPUT_BYTES_BS: {
  ------------------
  |  |   71|  1.53k|#define IA_API_CMD_SET_INPUT_BYTES_BS 0x0026
  ------------------
  |  Branch (416:5): [True: 1.53k, False: 233k]
  ------------------
  417|  1.53k|      p_obj_drc->str_bit_handler.num_byts_cur = *pus_value;
  418|  1.53k|      break;
  419|  31.0k|    }
  420|  1.24k|    case IA_API_CMD_SET_INPUT_BYTES_IC_BS: {
  ------------------
  |  |   72|  1.24k|#define IA_API_CMD_SET_INPUT_BYTES_IC_BS 0x0027
  ------------------
  |  Branch (420:5): [True: 1.24k, False: 233k]
  ------------------
  421|  1.24k|      p_obj_drc->str_bit_handler.num_byts_cur_ic = *pus_value;
  422|  1.24k|      break;
  423|  31.0k|    }
  424|    821|    case IA_API_CMD_SET_INPUT_BYTES_IL_BS: {
  ------------------
  |  |   74|    821|#define IA_API_CMD_SET_INPUT_BYTES_IL_BS 0x0029
  ------------------
  |  Branch (424:5): [True: 821, False: 233k]
  ------------------
  425|    821|      p_obj_drc->str_bit_handler.num_byts_cur_il = *pus_value;
  426|    821|      break;
  427|  31.0k|    }
  428|      0|    case IA_API_CMD_SET_INPUT_BYTES_IN_BS: {
  ------------------
  |  |   75|      0|#define IA_API_CMD_SET_INPUT_BYTES_IN_BS 0x002A
  ------------------
  |  Branch (428:5): [True: 0, False: 234k]
  ------------------
  429|      0|      p_obj_drc->str_bit_handler.num_byts_cur_in = *pus_value;
  430|      0|      break;
  431|  31.0k|    }
  432|      0|    default: { return -1; }
  ------------------
  |  Branch (432:5): [True: 0, False: 234k]
  ------------------
  433|   234k|  };
  434|   233k|  return error_code;
  435|   234k|}
impd_drc_mem_api:
  438|   124k|                              WORD32 i_idx, pVOID pv_value) {
  439|   124k|  pUWORD32 pui_value = pv_value;
  440|       |
  441|   124k|  switch (i_cmd) {
  ------------------
  |  Branch (441:11): [True: 124k, False: 0]
  ------------------
  442|  24.8k|    case IA_API_CMD_GET_MEM_INFO_SIZE: {
  ------------------
  |  |   49|  24.8k|#define IA_API_CMD_GET_MEM_INFO_SIZE 0x0011
  ------------------
  |  Branch (442:5): [True: 24.8k, False: 99.2k]
  ------------------
  443|  24.8k|      *pui_value = p_obj_drc->p_mem_info[i_idx].ui_size;
  444|  24.8k|      break;
  445|      0|    }
  446|  24.8k|    case IA_API_CMD_GET_MEM_INFO_ALIGNMENT: {
  ------------------
  |  |   50|  24.8k|#define IA_API_CMD_GET_MEM_INFO_ALIGNMENT 0x0012
  ------------------
  |  Branch (446:5): [True: 24.8k, False: 99.2k]
  ------------------
  447|  24.8k|      *pui_value = p_obj_drc->p_mem_info[i_idx].ui_alignment;
  448|  24.8k|      break;
  449|      0|    }
  450|  24.8k|    case IA_API_CMD_GET_MEM_INFO_TYPE: {
  ------------------
  |  |   51|  24.8k|#define IA_API_CMD_GET_MEM_INFO_TYPE 0x0013
  ------------------
  |  Branch (450:5): [True: 24.8k, False: 99.2k]
  ------------------
  451|  24.8k|      *pui_value = p_obj_drc->p_mem_info[i_idx].ui_type;
  452|  24.8k|      break;
  453|      0|    }
  454|      0|    case IA_API_CMD_GET_MEM_INFO_PLACEMENT: {
  ------------------
  |  |   52|      0|#define IA_API_CMD_GET_MEM_INFO_PLACEMENT 0x0014
  ------------------
  |  Branch (454:5): [True: 0, False: 124k]
  ------------------
  455|      0|      *pui_value = p_obj_drc->p_mem_info[i_idx].ui_placement[0];
  456|      0|      *(pui_value + 1) = p_obj_drc->p_mem_info[i_idx].ui_placement[1];
  457|      0|      break;
  458|      0|    }
  459|      0|    case IA_API_CMD_GET_MEM_INFO_PRIORITY: {
  ------------------
  |  |   53|      0|#define IA_API_CMD_GET_MEM_INFO_PRIORITY 0x0015
  ------------------
  |  Branch (459:5): [True: 0, False: 124k]
  ------------------
  460|      0|      *pui_value = p_obj_drc->p_mem_info[i_idx].ui_priority;
  461|      0|      break;
  462|      0|    }
  463|  49.6k|    case IA_API_CMD_SET_MEM_PTR: {
  ------------------
  |  |   54|  49.6k|#define IA_API_CMD_SET_MEM_PTR 0x0016
  ------------------
  |  Branch (463:5): [True: 49.6k, False: 74.4k]
  ------------------
  464|  49.6k|      if (pv_value == 0) {
  ------------------
  |  Branch (464:11): [True: 0, False: 49.6k]
  ------------------
  465|      0|        return (-1);
  466|      0|      }
  467|  49.6k|      if (((SIZE_T)pv_value % p_obj_drc->p_mem_info[i_idx].ui_alignment) != 0) {
  ------------------
  |  Branch (467:11): [True: 0, False: 49.6k]
  ------------------
  468|      0|        return (-1);
  469|      0|      }
  470|  49.6k|      p_obj_drc->pp_mem[i_idx] = pv_value;
  471|  49.6k|      memset(p_obj_drc->pp_mem[i_idx], 0, p_obj_drc->p_mem_info[i_idx].ui_size);
  472|  49.6k|      if (IA_MEMTYPE_PERSIST == i_idx) {
  ------------------
  |  |   45|  49.6k|#define IA_MEMTYPE_PERSIST 0x00
  ------------------
  |  Branch (472:11): [True: 12.4k, False: 37.2k]
  ------------------
  473|  12.4k|        p_obj_drc->p_state = pv_value;
  474|  12.4k|      }
  475|  49.6k|      break;
  476|  49.6k|    }
  477|      0|    case IA_API_CMD_SET_MEM_PLACEMENT: {
  ------------------
  |  |   56|      0|#define IA_API_CMD_SET_MEM_PLACEMENT 0x0018
  ------------------
  |  Branch (477:5): [True: 0, False: 124k]
  ------------------
  478|      0|    }
  479|   124k|  };
  480|   124k|  return IA_NO_ERROR;
  ------------------
  |  |   25|   124k|#define IA_NO_ERROR 0x00000000
  ------------------
  481|   124k|}
impd_drc_fill_mem_tables:
  563|  12.4k|IA_ERRORCODE impd_drc_fill_mem_tables(ia_drc_api_struct *p_obj_drc) {
  564|  12.4k|  ia_mem_info_struct *p_mem_info;
  565|  12.4k|  {
  566|  12.4k|    p_mem_info = &p_obj_drc->p_mem_info[IA_DRC_PERSIST_IDX];
  ------------------
  |  |   27|  12.4k|#define IA_DRC_PERSIST_IDX (0)
  ------------------
  567|  12.4k|    memset(p_mem_info, 0, sizeof(*p_mem_info));
  568|  12.4k|    p_mem_info->ui_size = impd_calc_pers_size();
  569|  12.4k|    p_mem_info->ui_alignment = 8;
  570|  12.4k|    p_mem_info->ui_type = IA_MEMTYPE_PERSIST;
  ------------------
  |  |   45|  12.4k|#define IA_MEMTYPE_PERSIST 0x00
  ------------------
  571|  12.4k|    p_mem_info->ui_placement[0] = 0;
  572|  12.4k|    p_mem_info->ui_placement[1] = 0;
  573|  12.4k|    p_mem_info->ui_priority = IA_MEMPRIORITY_ANYWHERE;
  ------------------
  |  |   62|  12.4k|#define IA_MEMPRIORITY_ANYWHERE 0x00
  ------------------
  574|  12.4k|    p_mem_info->ui_placed[0] = 0;
  575|  12.4k|    p_mem_info->ui_placed[1] = 0;
  576|  12.4k|  }
  577|  12.4k|  {
  578|  12.4k|    p_mem_info = &p_obj_drc->p_mem_info[IA_DRC_INPUT_IDX];
  ------------------
  |  |   29|  12.4k|#define IA_DRC_INPUT_IDX (2)
  ------------------
  579|  12.4k|    memset(p_mem_info, 0, sizeof(*p_mem_info));
  580|  12.4k|    p_mem_info->ui_size = p_obj_drc->str_config.frame_size *
  581|  12.4k|                          (p_obj_drc->str_config.pcm_size >> 3) *
  582|  12.4k|                          p_obj_drc->str_config.num_ch_in;
  583|  12.4k|    p_mem_info->ui_alignment = 4;
  584|  12.4k|    p_mem_info->ui_type = IA_MEMTYPE_INPUT;
  ------------------
  |  |   49|  12.4k|#define IA_MEMTYPE_INPUT 0x02
  ------------------
  585|  12.4k|    p_mem_info->ui_placement[0] = 0;
  586|  12.4k|    p_mem_info->ui_placement[1] = 0;
  587|  12.4k|    p_mem_info->ui_priority = IA_MEMPRIORITY_ANYWHERE;
  ------------------
  |  |   62|  12.4k|#define IA_MEMPRIORITY_ANYWHERE 0x00
  ------------------
  588|  12.4k|    p_mem_info->ui_placed[0] = 0;
  589|  12.4k|    p_mem_info->ui_placed[1] = 0;
  590|  12.4k|  }
  591|  12.4k|  {
  592|  12.4k|    p_mem_info = &p_obj_drc->p_mem_info[IA_DRC_OUTPUT_IDX];
  ------------------
  |  |   30|  12.4k|#define IA_DRC_OUTPUT_IDX (3)
  ------------------
  593|  12.4k|    memset(p_mem_info, 0, sizeof(*p_mem_info));
  594|  12.4k|    p_mem_info->ui_size = p_obj_drc->str_config.frame_size *
  595|  12.4k|                          (p_obj_drc->str_config.pcm_size >> 3) *
  596|  12.4k|                          p_obj_drc->str_config.num_ch_in;
  597|  12.4k|    p_mem_info->ui_alignment = 4;
  598|  12.4k|    p_mem_info->ui_type = IA_MEMTYPE_OUTPUT;
  ------------------
  |  |   51|  12.4k|#define IA_MEMTYPE_OUTPUT 0x03
  ------------------
  599|  12.4k|    p_mem_info->ui_placement[0] = 0;
  600|  12.4k|    p_mem_info->ui_placement[1] = 0;
  601|  12.4k|    p_mem_info->ui_priority = IA_MEMPRIORITY_ANYWHERE;
  ------------------
  |  |   62|  12.4k|#define IA_MEMPRIORITY_ANYWHERE 0x00
  ------------------
  602|  12.4k|    p_mem_info->ui_placed[0] = 0;
  603|  12.4k|    p_mem_info->ui_placed[1] = 0;
  604|  12.4k|  }
  605|  12.4k|  {
  606|  12.4k|    p_mem_info = &p_obj_drc->p_mem_info[IA_DRC_SCRATCH_IDX];
  ------------------
  |  |   28|  12.4k|#define IA_DRC_SCRATCH_IDX (1)
  ------------------
  607|  12.4k|    memset(p_mem_info, 0, sizeof(*p_mem_info));
  608|  12.4k|    p_mem_info->ui_size = impd_calc_scratch_size();
  609|  12.4k|    p_mem_info->ui_alignment = 8;
  610|  12.4k|    p_mem_info->ui_type = IA_MEMTYPE_SCRATCH;
  ------------------
  |  |   47|  12.4k|#define IA_MEMTYPE_SCRATCH 0x01
  ------------------
  611|  12.4k|    p_mem_info->ui_placement[0] = 0;
  612|  12.4k|    p_mem_info->ui_placement[1] = 0;
  613|  12.4k|    p_mem_info->ui_priority = IA_MEMPRIORITY_ANYWHERE;
  ------------------
  |  |   62|  12.4k|#define IA_MEMPRIORITY_ANYWHERE 0x00
  ------------------
  614|  12.4k|    p_mem_info->ui_placed[0] = 0;
  615|  12.4k|    p_mem_info->ui_placed[1] = 0;
  616|  12.4k|  }
  617|  12.4k|  return IA_NO_ERROR;
  ------------------
  |  |   25|  12.4k|#define IA_NO_ERROR 0x00000000
  ------------------
  618|  12.4k|}
impd_drc_api.c:impd_calc_pers_size:
  489|  12.4k|static WORD32 impd_calc_pers_size() {
  490|  12.4k|  WORD32 size = 0;
  491|       |
  492|  12.4k|  WORD32 analysis_buf_size = IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|  12.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  493|  12.4k|      AUDIO_CODEC_FRAME_SIZE_MAX * MAX_CHANNEL_COUNT * sizeof(FLOAT32) * NUM_ELE_IN_CPLX_NUM,
  494|  12.4k|      BYTE_ALIGN_8);
  495|  12.4k|  WORD32 synth_buf_size = IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|  12.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  496|  12.4k|      AUDIO_CODEC_FRAME_SIZE_MAX * MAX_CHANNEL_COUNT * sizeof(FLOAT32) * NUM_ELE_IN_CPLX_NUM,
  497|  12.4k|      BYTE_ALIGN_8);
  498|  12.4k|  WORD32 peak_lim_buf_size = IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|  12.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  499|  12.4k|      AUDIO_CODEC_FRAME_SIZE_MAX * MAX_CHANNEL_COUNT * sizeof(FLOAT32) * NUM_ELE_IN_CPLX_NUM,
  500|  12.4k|      BYTE_ALIGN_8);
  501|  12.4k|  WORD32 subband_buf_size =
  502|  12.4k|      NUM_ELE_IN_CPLX_NUM *
  ------------------
  |  |   54|  12.4k|#define NUM_ELE_IN_CPLX_NUM 2
  ------------------
  503|  12.4k|          IXHEAAC_GET_SIZE_ALIGNED(MAX_CHANNEL_COUNT * sizeof(FLOAT32 *), BYTE_ALIGN_8) +
  ------------------
  |  |   87|  12.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  504|  12.4k|      NUM_ELE_IN_CPLX_NUM * MAX_CHANNEL_COUNT *
  ------------------
  |  |   54|  12.4k|#define NUM_ELE_IN_CPLX_NUM 2
  ------------------
                    NUM_ELE_IN_CPLX_NUM * MAX_CHANNEL_COUNT *
  ------------------
  |  |   35|  12.4k|#define MAX_CHANNEL_COUNT (8)  // 128
  ------------------
  505|  12.4k|          IXHEAAC_GET_SIZE_ALIGNED((MAX_SUBBAND_DELAY + MAX_DRC_FRAME_SIZE) * sizeof(FLOAT32),
  ------------------
  |  |   87|  12.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  506|  12.4k|                                   BYTE_ALIGN_8);
  507|       |
  508|  12.4k|  size += IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_drc_state_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  509|  12.4k|  size += IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_drc_bits_dec_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  510|  12.4k|  size += 2 * IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_drc_gain_dec_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  511|  12.4k|  size += IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_drc_loudness_info_set_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  512|  12.4k|  size += IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_drc_gain_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  513|  12.4k|  size += IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_drc_interface_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  514|  12.4k|  size += IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_drc_config), BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  515|  12.4k|  size += IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_drc_sel_pro_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  516|  12.4k|  size += IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_drc_sel_proc_params_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  517|  12.4k|  size += IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_drc_sel_proc_output_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  518|  12.4k|  size += IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_drc_peak_limiter_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  519|  12.4k|  size += IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_drc_qmf_filt_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  520|  12.4k|  size += analysis_buf_size;
  521|  12.4k|  size += synth_buf_size;
  522|  12.4k|  size += peak_lim_buf_size;
  523|       |
  524|  12.4k|  size += IXHEAAC_GET_SIZE_ALIGNED(MAX_DRC_BS_BUF_SIZE, BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  525|  12.4k|  size += IXHEAAC_GET_SIZE_ALIGNED(MAX_DRC_CONFG_BUF_SIZE, BYTE_ALIGN_8); /*DRC Config Bitstream*/
  ------------------
  |  |   87|  12.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  526|  12.4k|  size += IXHEAAC_GET_SIZE_ALIGNED(MAX_LOUD_INFO_BUF_SIZE,
  ------------------
  |  |   87|  12.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  527|  12.4k|                                   BYTE_ALIGN_8); /*DRC loudness info Bitstream*/
  528|  12.4k|  size +=
  529|  12.4k|      IXHEAAC_GET_SIZE_ALIGNED(MAX_INTERFACE_BUF_SIZE, BYTE_ALIGN_8); /*DRC interface Bitstream*/
  ------------------
  |  |   87|  12.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  530|       |
  531|  12.4k|  size += NUM_GAIN_DEC_INSTANCES * SEL_DRC_COUNT *
  ------------------
  |  |   63|  12.4k|#define NUM_GAIN_DEC_INSTANCES 2
  ------------------
                size += NUM_GAIN_DEC_INSTANCES * SEL_DRC_COUNT *
  ------------------
  |  |   50|  12.4k|#define SEL_DRC_COUNT 3
  ------------------
  532|  12.4k|          IXHEAAC_GET_SIZE_ALIGNED((sizeof(ia_interp_buf_struct) * MAX_GAIN_ELE_COUNT),
  ------------------
  |  |   87|  12.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  533|  12.4k|                                   BYTE_ALIGN_8); /*ia_interp_buf_struct*/
  534|  12.4k|  size += NUM_GAIN_DEC_INSTANCES *
  ------------------
  |  |   63|  12.4k|#define NUM_GAIN_DEC_INSTANCES 2
  ------------------
  535|  12.4k|          IXHEAAC_GET_SIZE_ALIGNED((sizeof(ia_eq_set_struct)), BYTE_ALIGN_8); /*ia_eq_set_struct*/
  ------------------
  |  |   87|  12.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  536|       |
  537|       |  /*non_interleaved_audio*/
  538|  12.4k|  size += NUM_GAIN_DEC_INSTANCES *
  ------------------
  |  |   63|  12.4k|#define NUM_GAIN_DEC_INSTANCES 2
  ------------------
  539|  12.4k|          IXHEAAC_GET_SIZE_ALIGNED((MAX_CHANNEL_COUNT * sizeof(FLOAT32 *)), BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  540|  12.4k|  size += NUM_GAIN_DEC_INSTANCES * MAX_CHANNEL_COUNT *
  ------------------
  |  |   63|  12.4k|#define NUM_GAIN_DEC_INSTANCES 2
  ------------------
                size += NUM_GAIN_DEC_INSTANCES * MAX_CHANNEL_COUNT *
  ------------------
  |  |   35|  12.4k|#define MAX_CHANNEL_COUNT (8)  // 128
  ------------------
  541|  12.4k|          IXHEAAC_GET_SIZE_ALIGNED((MAX_DRC_FRAME_SIZE * sizeof(FLOAT32)), BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  542|       |
  543|       |  /*audio_in_out_buf ptr*/
  544|  12.4k|  size += NUM_GAIN_DEC_INSTANCES *
  ------------------
  |  |   63|  12.4k|#define NUM_GAIN_DEC_INSTANCES 2
  ------------------
  545|  12.4k|          IXHEAAC_GET_SIZE_ALIGNED((MAX_CHANNEL_COUNT * sizeof(FLOAT32 *)), BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  546|       |  /*audio_io_buffer_delayed*/
  547|  12.4k|  size += NUM_GAIN_DEC_INSTANCES *
  ------------------
  |  |   63|  12.4k|#define NUM_GAIN_DEC_INSTANCES 2
  ------------------
  548|  12.4k|          IXHEAAC_GET_SIZE_ALIGNED((MAX_CHANNEL_COUNT * sizeof(FLOAT32 *)), BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  549|  12.4k|  size += NUM_GAIN_DEC_INSTANCES * MAX_CHANNEL_COUNT *
  ------------------
  |  |   63|  12.4k|#define NUM_GAIN_DEC_INSTANCES 2
  ------------------
                size += NUM_GAIN_DEC_INSTANCES * MAX_CHANNEL_COUNT *
  ------------------
  |  |   35|  12.4k|#define MAX_CHANNEL_COUNT (8)  // 128
  ------------------
  550|  12.4k|          IXHEAAC_GET_SIZE_ALIGNED((MAX_DRC_FRAME_SIZE * sizeof(FLOAT32)), BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  551|       |
  552|       |  /*subband band buffer ptr*/
  553|  12.4k|  size += NUM_GAIN_DEC_INSTANCES * NUM_ELE_IN_CPLX_NUM *
  ------------------
  |  |   63|  12.4k|#define NUM_GAIN_DEC_INSTANCES 2
  ------------------
                size += NUM_GAIN_DEC_INSTANCES * NUM_ELE_IN_CPLX_NUM *
  ------------------
  |  |   54|  12.4k|#define NUM_ELE_IN_CPLX_NUM 2
  ------------------
  554|  12.4k|          IXHEAAC_GET_SIZE_ALIGNED(MAX_CHANNEL_COUNT * sizeof(FLOAT32 *), BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  555|  12.4k|  size += NUM_GAIN_DEC_INSTANCES * subband_buf_size;
  ------------------
  |  |   63|  12.4k|#define NUM_GAIN_DEC_INSTANCES 2
  ------------------
  556|       |
  557|  12.4k|  size += NUM_GAIN_DEC_INSTANCES * MAX_CHANNEL_COUNT *
  ------------------
  |  |   63|  12.4k|#define NUM_GAIN_DEC_INSTANCES 2
  ------------------
                size += NUM_GAIN_DEC_INSTANCES * MAX_CHANNEL_COUNT *
  ------------------
  |  |   35|  12.4k|#define MAX_CHANNEL_COUNT (8)  // 128
  ------------------
  558|  12.4k|          IXHEAAC_GET_SIZE_ALIGNED((PARAM_DRC_MAX_BUF_SZ * sizeof(FLOAT32)), BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  559|       |
  560|  12.4k|  return size;
  561|  12.4k|}
impd_drc_api.c:impd_calc_scratch_size:
  483|  12.4k|static WORD32 impd_calc_scratch_size() {
  484|  12.4k|  return IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|  12.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  485|  12.4k|      AUDIO_CODEC_FRAME_SIZE_MAX * MAX_CHANNEL_COUNT * NUM_ELE_IN_CPLX_NUM * sizeof(FLOAT32),
  486|  12.4k|      BYTE_ALIGN_8);
  487|  12.4k|}

impd_read_bits_buf:
   33|   794k|WORD32 impd_read_bits_buf(ia_bit_buf_struct* it_bit_buff, WORD no_of_bits) {
   34|   794k|  UWORD32 ret_val;
   35|   794k|  UWORD8* ptr_read_next = it_bit_buff->ptr_read_next;
   36|   794k|  WORD bit_pos = it_bit_buff->bit_pos;
   37|       |
   38|   794k|  if (it_bit_buff->cnt_bits <= 0) {
  ------------------
  |  Branch (38:7): [True: 10.0k, False: 784k]
  ------------------
   39|  10.0k|    it_bit_buff->error = 1;
   40|  10.0k|    return -1;
   41|  10.0k|  }
   42|       |
   43|   784k|  if (no_of_bits == 0) {
  ------------------
  |  Branch (43:7): [True: 18.1k, False: 766k]
  ------------------
   44|  18.1k|    return 0;
   45|  18.1k|  }
   46|       |
   47|   766k|  it_bit_buff->cnt_bits -= no_of_bits;
   48|   766k|  ret_val = (UWORD32)*ptr_read_next;
   49|       |
   50|   766k|  bit_pos -= no_of_bits;
   51|   982k|  while (bit_pos < 0) {
  ------------------
  |  Branch (51:10): [True: 215k, False: 766k]
  ------------------
   52|   215k|    bit_pos += 8;
   53|   215k|    ptr_read_next++;
   54|       |
   55|   215k|    if (ptr_read_next > it_bit_buff->ptr_bit_buf_end) {
  ------------------
  |  Branch (55:9): [True: 6.95k, False: 208k]
  ------------------
   56|  6.95k|      ptr_read_next = it_bit_buff->ptr_bit_buf_base;
   57|  6.95k|    }
   58|       |
   59|   215k|    ret_val <<= 8;
   60|       |
   61|   215k|    ret_val |= (UWORD32)*ptr_read_next;
   62|   215k|  }
   63|       |
   64|   766k|  ret_val = ret_val << ((31 - no_of_bits) - bit_pos) >> (32 - no_of_bits);
   65|   766k|  it_bit_buff->ptr_read_next = ptr_read_next;
   66|   766k|  it_bit_buff->bit_pos = (WORD16)bit_pos;
   67|   766k|  return ret_val;
   68|   784k|}
impd_skip_bits_buf:
   70|  19.5k|WORD32 impd_skip_bits_buf(ia_bit_buf_struct* it_bit_buff, WORD no_of_bits) {
   71|  19.5k|  UWORD8* ptr_read_next = it_bit_buff->ptr_read_next;
   72|  19.5k|  WORD bit_pos = it_bit_buff->bit_pos;
   73|       |
   74|  19.5k|  if (it_bit_buff->cnt_bits < no_of_bits) {
  ------------------
  |  Branch (74:7): [True: 1.41k, False: 18.0k]
  ------------------
   75|  1.41k|    it_bit_buff->error = 1;
   76|  1.41k|    return -1;
   77|  1.41k|  }
   78|       |
   79|  18.0k|  it_bit_buff->cnt_bits -= no_of_bits;
   80|       |
   81|  18.0k|  bit_pos -= no_of_bits;
   82|   109k|  while (bit_pos < 0) {
  ------------------
  |  Branch (82:10): [True: 91.8k, False: 18.0k]
  ------------------
   83|  91.8k|    bit_pos += 8;
   84|  91.8k|    ptr_read_next++;
   85|  91.8k|  }
   86|  18.0k|  it_bit_buff->ptr_read_next = ptr_read_next;
   87|  18.0k|  it_bit_buff->bit_pos = (WORD16)bit_pos;
   88|  18.0k|  return no_of_bits;
   89|  19.5k|}
impd_create_bit_buf:
   91|  23.4k|                         UWORD8* ptr_bit_buf_base, WORD32 bit_buf_size) {
   92|  23.4k|  it_bit_buff->ptr_bit_buf_base = ptr_bit_buf_base;
   93|  23.4k|  it_bit_buff->ptr_bit_buf_end = ptr_bit_buf_base + bit_buf_size - 1;
   94|       |
   95|  23.4k|  it_bit_buff->ptr_read_next = ptr_bit_buf_base;
   96|  23.4k|  it_bit_buff->bit_pos = 7;
   97|       |
   98|  23.4k|  it_bit_buff->cnt_bits = 0;
   99|  23.4k|  it_bit_buff->size = bit_buf_size << 3;
  100|  23.4k|  it_bit_buff->error = 0;
  101|       |
  102|  23.4k|  return;
  103|  23.4k|}
impd_create_init_bit_buf:
  106|  23.4k|                              UWORD8* ptr_bit_buf_base, WORD32 bit_buf_size) {
  107|  23.4k|  impd_create_bit_buf(it_bit_buff, ptr_bit_buf_base, bit_buf_size);
  108|  23.4k|  it_bit_buff->cnt_bits = (bit_buf_size << 3);
  109|  23.4k|  return;
  110|  23.4k|}
impd_init_drc_bitstream_dec:
  116|  1.54k|                                   WORD32* lfe_channel_map) {
  117|  1.54k|  WORD32 i, err_code = 0;
  118|       |
  119|  1.54k|  ia_drc_params_bs_dec_struct* ia_drc_params_struct =
  120|  1.54k|      &p_drc_bs_dec_struct->ia_drc_params_struct;
  121|  1.54k|  ia_drc_params_struct->drc_frame_size = frame_size;
  122|  1.54k|  if (sample_rate < MIN_DRC_SAMP_FREQ) {
  ------------------
  |  |  218|  1.54k|#define MIN_DRC_SAMP_FREQ 1000
  ------------------
  |  Branch (122:7): [True: 1, False: 1.54k]
  ------------------
  123|      1|    return -1;
  124|      1|  }
  125|  1.54k|  ia_drc_params_struct->delta_tmin_default = impd_get_delta_tmin(sample_rate);
  126|  1.54k|  ia_drc_params_struct->num_gain_values_max_default =
  127|  1.54k|      ia_drc_params_struct->drc_frame_size /
  128|  1.54k|      ia_drc_params_struct->delta_tmin_default;
  129|  1.54k|  ia_drc_params_struct->delay_mode = delay_mode;
  130|       |
  131|  1.54k|  if ((frame_size < 1) || (frame_size > AUDIO_CODEC_FRAME_SIZE_MAX) ||
  ------------------
  |  |   45|  1.54k|#define AUDIO_CODEC_FRAME_SIZE_MAX 4096
  ------------------
  |  Branch (131:7): [True: 0, False: 1.54k]
  |  Branch (131:27): [True: 0, False: 1.54k]
  ------------------
  132|  1.54k|      (ia_drc_params_struct->drc_frame_size < 0.001f * sample_rate)) {
  ------------------
  |  Branch (132:7): [True: 0, False: 1.54k]
  ------------------
  133|      0|    return -1;
  134|      0|  }
  135|       |
  136|  1.54k|  if (ia_drc_params_struct->delta_tmin_default >
  ------------------
  |  Branch (136:7): [True: 0, False: 1.54k]
  ------------------
  137|  1.54k|      ia_drc_params_struct->drc_frame_size) {
  138|      0|    return -1;
  139|      0|  }
  140|       |
  141|  1.54k|  if (lfe_channel_map_count >= 0) {
  ------------------
  |  Branch (141:7): [True: 0, False: 1.54k]
  ------------------
  142|      0|    if ((lfe_channel_map == NULL) ||
  ------------------
  |  Branch (142:9): [True: 0, False: 0]
  ------------------
  143|      0|        (lfe_channel_map_count > MAX_CHANNEL_COUNT)) {
  ------------------
  |  |   35|      0|#define MAX_CHANNEL_COUNT (8)  // 128
  ------------------
  |  Branch (143:9): [True: 0, False: 0]
  ------------------
  144|      0|      return (-1);
  145|      0|    }
  146|       |
  147|      0|    ia_drc_params_struct->lfe_channel_map_count = lfe_channel_map_count;
  148|       |
  149|      0|    for (i = 0; i < lfe_channel_map_count; i++) {
  ------------------
  |  Branch (149:17): [True: 0, False: 0]
  ------------------
  150|      0|      ia_drc_params_struct->lfe_channel_map[i] = lfe_channel_map[i];
  151|      0|    }
  152|  1.54k|  } else {
  153|  1.54k|    ia_drc_params_struct->lfe_channel_map_count = -1;
  154|       |
  155|  13.8k|    for (i = 0; i < MAX_CHANNEL_COUNT; i++) {
  ------------------
  |  |   35|  13.8k|#define MAX_CHANNEL_COUNT (8)  // 128
  ------------------
  |  Branch (155:17): [True: 12.3k, False: 1.54k]
  ------------------
  156|  12.3k|      ia_drc_params_struct->lfe_channel_map[i] = 0;
  157|  12.3k|    }
  158|  1.54k|  }
  159|       |
  160|  1.54k|  impd_init_tbls(ia_drc_params_struct->num_gain_values_max_default,
  161|  1.54k|                 &p_drc_bs_dec_struct->tables_default);
  162|       |
  163|  1.54k|  return err_code;
  164|  1.54k|}
impd_process_drc_bitstream_dec_config:
  169|  1.54k|    WORD32 num_bytes) {
  170|  1.54k|  WORD32 err_code = 0;
  171|       |
  172|  1.54k|  impd_create_init_bit_buf(it_bit_buff, bitstream_config, num_bytes);
  173|       |
  174|  1.54k|  err_code = impd_parse_drc_config(
  175|  1.54k|      it_bit_buff, &p_drc_bs_dec_struct->ia_drc_params_struct, pstr_drc_config);
  176|  1.54k|  if (err_code) return (err_code);
  ------------------
  |  Branch (176:7): [True: 1.47k, False: 65]
  ------------------
  177|       |
  178|     65|  return err_code;
  179|  1.54k|}
impd_process_drc_bitstream_dec_gain:
  185|  19.0k|    WORD32* num_bits_read) {
  186|  19.0k|  WORD32 err_code = 0;
  187|       |
  188|  19.0k|  impd_create_init_bit_buf(it_bit_buff, bitstream_gain, num_bytes);
  189|       |
  190|  19.0k|  impd_read_bits_buf(it_bit_buff, num_bits_offset);
  191|  19.0k|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (191:7): [True: 1.06k, False: 18.0k]
  ------------------
  192|       |
  193|  18.0k|  err_code = impd_drc_uni_gain_read(it_bit_buff, p_drc_bs_dec_struct,
  194|  18.0k|                                    pstr_drc_config, pstr_drc_gain);
  195|       |
  196|  18.0k|  if (err_code > PROC_COMPLETE) return (err_code);
  ------------------
  |  |  127|  18.0k|#define PROC_COMPLETE 1
  ------------------
  |  Branch (196:7): [True: 2.13k, False: 15.8k]
  ------------------
  197|       |
  198|  15.8k|  *num_bits_read = (it_bit_buff->size) - it_bit_buff->cnt_bits;
  199|       |
  200|  15.8k|  if (err_code == PROC_COMPLETE) {
  ------------------
  |  |  127|  15.8k|#define PROC_COMPLETE 1
  ------------------
  |  Branch (200:7): [True: 7.95k, False: 7.94k]
  ------------------
  201|  7.95k|    return err_code;
  202|  7.95k|  }
  203|       |
  204|  7.94k|  return 0;
  205|  15.8k|}
impd_process_drc_bitstream_dec_loudness_info_set:
  210|  1.29k|    UWORD8* bit_stream_loudness, WORD32 num_bytes_loudness) {
  211|  1.29k|  WORD32 err_code = 0;
  212|       |
  213|  1.29k|  impd_create_init_bit_buf(it_bit_buff, bit_stream_loudness,
  214|  1.29k|                           num_bytes_loudness);
  215|       |
  216|  1.29k|  err_code = impd_parse_loudness_info_set(it_bit_buff, pstr_loudness_info);
  217|  1.29k|  return err_code;
  218|  1.29k|}

impd_init_drc_params:
   33|  3.08k|                            ia_drc_params_struct* ia_drc_params_struct) {
   34|  3.08k|  WORD32 k;
   35|  3.08k|  if (frame_size < 1 || frame_size > AUDIO_CODEC_FRAME_SIZE_MAX) {
  ------------------
  |  |   45|  3.08k|#define AUDIO_CODEC_FRAME_SIZE_MAX 4096
  ------------------
  |  Branch (35:7): [True: 0, False: 3.08k]
  |  Branch (35:25): [True: 0, False: 3.08k]
  ------------------
   36|      0|    return -1;
   37|      0|  }
   38|       |
   39|  3.08k|  if (sample_rate < 1000) {
  ------------------
  |  Branch (39:7): [True: 0, False: 3.08k]
  ------------------
   40|      0|    return -1;
   41|      0|  }
   42|       |
   43|  3.08k|  ia_drc_params_struct->drc_frame_size = frame_size;
   44|       |
   45|  3.08k|  if (ia_drc_params_struct->drc_frame_size < 0.001f * sample_rate) {
  ------------------
  |  Branch (45:7): [True: 0, False: 3.08k]
  ------------------
   46|      0|    return -1;
   47|      0|  }
   48|       |
   49|  3.08k|  ia_drc_params_struct->sample_rate = sample_rate;
   50|       |
   51|  3.08k|  ia_drc_params_struct->delta_tmin_default = impd_get_delta_tmin(sample_rate);
   52|       |
   53|  3.08k|  if (ia_drc_params_struct->delta_tmin_default >
  ------------------
  |  Branch (53:7): [True: 0, False: 3.08k]
  ------------------
   54|  3.08k|      ia_drc_params_struct->drc_frame_size) {
   55|      0|    return -1;
   56|      0|  }
   57|       |
   58|  3.08k|  if ((delay_mode != DELAY_MODE_REGULAR_DELAY) &&
  ------------------
  |  |  116|  3.08k|#define DELAY_MODE_REGULAR_DELAY 0
  ------------------
  |  Branch (58:7): [True: 0, False: 3.08k]
  ------------------
   59|      0|      (delay_mode != DELAY_MODE_LOW_DELAY)) {
  ------------------
  |  |  117|      0|#define DELAY_MODE_LOW_DELAY 1
  ------------------
  |  Branch (59:7): [True: 0, False: 0]
  ------------------
   60|      0|    return -1;
   61|      0|  }
   62|       |
   63|  3.08k|  ia_drc_params_struct->delay_mode = delay_mode;
   64|       |
   65|  3.08k|  ia_drc_params_struct->drc_set_counter = 0;
   66|  3.08k|  ia_drc_params_struct->multiband_sel_drc_idx = -1;
   67|       |
   68|  12.3k|  for (k = 0; k < SEL_DRC_COUNT; k++) {
  ------------------
  |  |   50|  12.3k|#define SEL_DRC_COUNT 3
  ------------------
  |  Branch (68:15): [True: 9.25k, False: 3.08k]
  ------------------
   69|  9.25k|    ia_drc_params_struct->sel_drc_array[k].drc_instructions_index = -1;
   70|  9.25k|    ia_drc_params_struct->sel_drc_array[k].dwnmix_instructions_index = -1;
   71|  9.25k|    ia_drc_params_struct->sel_drc_array[k].drc_coeff_idx = -1;
   72|  9.25k|  }
   73|       |
   74|  3.08k|  if ((gain_delay_samples > MAX_SIGNAL_DELAY) || (gain_delay_samples < 0)) {
  ------------------
  |  |   52|  3.08k|#define MAX_SIGNAL_DELAY 4500
  ------------------
  |  Branch (74:7): [True: 0, False: 3.08k]
  |  Branch (74:50): [True: 0, False: 3.08k]
  ------------------
   75|      0|    return -1;
   76|  3.08k|  } else {
   77|  3.08k|    ia_drc_params_struct->gain_delay_samples = gain_delay_samples;
   78|  3.08k|  }
   79|       |
   80|  3.08k|  switch (sub_band_domain_mode) {
   81|  3.08k|    case SUBBAND_DOMAIN_MODE_OFF:
  ------------------
  |  |  148|  3.08k|#define SUBBAND_DOMAIN_MODE_OFF 0
  ------------------
  |  Branch (81:5): [True: 3.08k, False: 0]
  ------------------
   82|  3.08k|    case SUBBAND_DOMAIN_MODE_QMF64:
  ------------------
  |  |  149|  3.08k|#define SUBBAND_DOMAIN_MODE_QMF64 1
  ------------------
  |  Branch (82:5): [True: 0, False: 3.08k]
  ------------------
   83|  3.08k|    case SUBBAND_DOMAIN_MODE_QMF71:
  ------------------
  |  |  150|  3.08k|#define SUBBAND_DOMAIN_MODE_QMF71 2
  ------------------
  |  Branch (83:5): [True: 0, False: 3.08k]
  ------------------
   84|  3.08k|    case SUBBAND_DOMAIN_MODE_STFT256:
  ------------------
  |  |  151|  3.08k|#define SUBBAND_DOMAIN_MODE_STFT256 3
  ------------------
  |  Branch (84:5): [True: 0, False: 3.08k]
  ------------------
   85|  3.08k|      ia_drc_params_struct->sub_band_domain_mode = sub_band_domain_mode;
   86|  3.08k|      break;
   87|      0|    default:
  ------------------
  |  Branch (87:5): [True: 0, False: 3.08k]
  ------------------
   88|      0|      return -1;
   89|      0|      break;
   90|  3.08k|  }
   91|       |
   92|  3.08k|  ia_drc_params_struct->parametric_drc_delay = 0;
   93|  3.08k|  ia_drc_params_struct->eq_delay = 0;
   94|       |
   95|  3.08k|  return 0;
   96|  3.08k|}
impd_select_drc_coefficients:
  100|    208|    WORD32* drc_coefficients_selected) {
  101|    208|  WORD32 i;
  102|    208|  WORD32 cof1 = -1;
  103|    208|  WORD32 cof0 = -1;
  104|    416|  for (i = 0; i < drc_config->drc_coefficients_drc_count; i++) {
  ------------------
  |  Branch (104:15): [True: 208, False: 208]
  ------------------
  105|    208|    if (drc_config->str_p_loc_drc_coefficients_uni_drc[i].drc_location == 1) {
  ------------------
  |  Branch (105:9): [True: 208, False: 0]
  ------------------
  106|    208|      if (drc_config->str_p_loc_drc_coefficients_uni_drc[i].version == 0) {
  ------------------
  |  Branch (106:11): [True: 0, False: 208]
  ------------------
  107|      0|        cof0 = i;
  108|      0|        *drc_coefficients_selected = cof0;
  109|    208|      } else {
  110|    208|        cof1 = i;
  111|    208|        *drc_coefficients_selected = cof1;
  112|    208|      }
  113|    208|    }
  114|    208|  }
  115|       |
  116|    208|  if (cof1 >= 0) {
  ------------------
  |  Branch (116:7): [True: 208, False: 0]
  ------------------
  117|    208|    *drc_coefficients_drc =
  118|    208|        &(drc_config->str_p_loc_drc_coefficients_uni_drc[cof1]);
  119|    208|  } else if (cof0 >= 0) {
  ------------------
  |  Branch (119:14): [True: 0, False: 0]
  ------------------
  120|      0|    *drc_coefficients_drc =
  121|      0|        &(drc_config->str_p_loc_drc_coefficients_uni_drc[cof0]);
  122|      0|  } else {
  123|      0|    *drc_coefficients_drc = NULL;
  124|      0|  }
  125|       |
  126|    208|  return 0;
  127|    208|}
impd_init_selected_drc_set:
  137|    208|    shape_filter_block* shape_filter_block) {
  138|    208|  WORD32 g, n, c, err = 0;
  139|    208|  WORD32 channel_count = 0;
  140|    208|  WORD32 i;
  141|       |
  142|    208|  ia_drc_instructions_struct* drc_instructions_uni_drc = NULL;
  143|    208|  ia_uni_drc_coeffs_struct* drc_coefficients_uni_drc = NULL;
  144|    208|  WORD32 selected_drc_is_multiband = 0;
  145|    208|  WORD32 drc_instructions_selected = -1;
  146|    208|  WORD32 downmix_instructions_selected = -1;
  147|    208|  WORD32 drc_coefficients_selected = -1;
  148|    208|  p_parametric_drc_params->parametric_drc_instance_count = 0;
  149|       |
  150|    208|  if (drc_config->drc_coefficients_drc_count &&
  ------------------
  |  Branch (150:7): [True: 208, False: 0]
  ------------------
  151|    208|      drc_config->str_p_loc_drc_coefficients_uni_drc->drc_frame_size_present) {
  ------------------
  |  Branch (151:7): [True: 0, False: 208]
  ------------------
  152|      0|    if (drc_config->str_p_loc_drc_coefficients_uni_drc->drc_frame_size !=
  ------------------
  |  Branch (152:9): [True: 0, False: 0]
  ------------------
  153|      0|        ia_drc_params_struct->drc_frame_size) {
  154|      0|      return -1;
  155|      0|    }
  156|      0|  }
  157|       |
  158|    488|  for (n = 0; n < drc_config->drc_instructions_count_plus; n++) {
  ------------------
  |  Branch (158:15): [True: 488, False: 0]
  ------------------
  159|    488|    if (drc_config->str_drc_instruction_str[n].drc_set_id ==
  ------------------
  |  Branch (159:9): [True: 208, False: 280]
  ------------------
  160|    488|        drc_set_id_selected)
  161|    208|      break;
  162|    488|  }
  163|    208|  if (n == drc_config->drc_instructions_count_plus) {
  ------------------
  |  Branch (163:7): [True: 0, False: 208]
  ------------------
  164|      0|    return -1;
  165|      0|  }
  166|    208|  drc_instructions_selected = n;
  167|    208|  drc_instructions_uni_drc =
  168|    208|      &(drc_config->str_drc_instruction_str[drc_instructions_selected]);
  169|       |
  170|    208|  if (downmix_id_selected == ID_FOR_BASE_LAYOUT) {
  ------------------
  |  |  135|    208|#define ID_FOR_BASE_LAYOUT 0x0
  ------------------
  |  Branch (170:7): [True: 208, False: 0]
  ------------------
  171|    208|    channel_count = drc_config->channel_layout.base_channel_count;
  172|    208|  } else if (downmix_id_selected == ID_FOR_ANY_DOWNMIX) {
  ------------------
  |  |  136|      0|#define ID_FOR_ANY_DOWNMIX 0x7F
  ------------------
  |  Branch (172:14): [True: 0, False: 0]
  ------------------
  173|      0|    channel_count = audio_num_chan;
  174|      0|  } else {
  175|      0|    for (n = 0; n < drc_config->dwnmix_instructions_count; n++) {
  ------------------
  |  Branch (175:17): [True: 0, False: 0]
  ------------------
  176|      0|      if (drc_config->dwnmix_instructions[n].downmix_id == downmix_id_selected)
  ------------------
  |  Branch (176:11): [True: 0, False: 0]
  ------------------
  177|      0|        break;
  178|      0|    }
  179|      0|    if (n == drc_config->dwnmix_instructions_count) {
  ------------------
  |  Branch (179:9): [True: 0, False: 0]
  ------------------
  180|      0|      return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  181|      0|    }
  182|      0|    channel_count = drc_config->dwnmix_instructions[n].target_channel_count;
  183|       |
  184|      0|    downmix_instructions_selected = n;
  185|      0|  }
  186|    208|  drc_instructions_uni_drc->audio_num_chan = channel_count;
  187|       |
  188|    208|  if (drc_instructions_uni_drc->drc_set_id <= 0) {
  ------------------
  |  Branch (188:7): [True: 0, False: 208]
  ------------------
  189|      0|    drc_coefficients_selected = 0;
  190|    208|  } else {
  191|    208|    err = impd_select_drc_coefficients(drc_config, &drc_coefficients_uni_drc,
  192|    208|                                       &drc_coefficients_selected);
  193|    208|    if (err) return err;
  ------------------
  |  Branch (193:9): [True: 0, False: 208]
  ------------------
  194|    208|  }
  195|       |
  196|    208|  ia_drc_params_struct->sel_drc_array[ia_drc_params_struct->drc_set_counter]
  197|    208|      .drc_instructions_index = drc_instructions_selected;
  198|    208|  ia_drc_params_struct->sel_drc_array[ia_drc_params_struct->drc_set_counter]
  199|    208|      .dwnmix_instructions_index = downmix_instructions_selected;
  200|    208|  ia_drc_params_struct->sel_drc_array[ia_drc_params_struct->drc_set_counter]
  201|    208|      .drc_coeff_idx = drc_coefficients_selected;
  202|       |
  203|    208|  if ((drc_instructions_uni_drc->downmix_id[0] == ID_FOR_ANY_DOWNMIX) ||
  ------------------
  |  |  136|    208|#define ID_FOR_ANY_DOWNMIX 0x7F
  ------------------
  |  Branch (203:7): [True: 0, False: 208]
  ------------------
  204|    208|      (drc_instructions_uni_drc->dwnmix_id_count > 1)) {
  ------------------
  |  Branch (204:7): [True: 0, False: 208]
  ------------------
  205|      0|    WORD32 idx = drc_instructions_uni_drc->gain_set_index[0];
  206|      0|    for (c = 0; c < drc_instructions_uni_drc->audio_num_chan; c++) {
  ------------------
  |  Branch (206:17): [True: 0, False: 0]
  ------------------
  207|      0|      drc_instructions_uni_drc->channel_group_of_ch[c] = (idx >= 0) ? 0 : -1;
  ------------------
  |  Branch (207:58): [True: 0, False: 0]
  ------------------
  208|      0|    }
  209|      0|  }
  210|       |
  211|    624|  for (g = 0; g < drc_instructions_uni_drc->num_drc_ch_groups; g++) {
  ------------------
  |  Branch (211:15): [True: 416, False: 208]
  ------------------
  212|    416|    drc_instructions_uni_drc->num_chan_per_ch_group[g] = 0;
  213|  1.03k|    for (c = 0; c < drc_instructions_uni_drc->audio_num_chan; c++) {
  ------------------
  |  Branch (213:17): [True: 620, False: 416]
  ------------------
  214|    620|      if (drc_instructions_uni_drc->channel_group_of_ch[c] == g) {
  ------------------
  |  Branch (214:11): [True: 310, False: 310]
  ------------------
  215|    310|        drc_instructions_uni_drc->num_chan_per_ch_group[g]++;
  216|    310|      }
  217|    620|    }
  218|    416|  }
  219|       |
  220|    208|  if (drc_instructions_uni_drc->drc_set_effect &
  ------------------
  |  Branch (220:7): [True: 0, False: 208]
  ------------------
  221|    208|      (EFFECT_BIT_DUCK_OTHER | EFFECT_BIT_DUCK_SELF)) {
  ------------------
  |  |   72|    208|#define EFFECT_BIT_DUCK_OTHER 0x0400
  ------------------
                    (EFFECT_BIT_DUCK_OTHER | EFFECT_BIT_DUCK_SELF)) {
  ------------------
  |  |   73|    208|#define EFFECT_BIT_DUCK_SELF 0x0800
  ------------------
  222|      0|    drc_instructions_uni_drc->multiband_audio_sig_count =
  223|      0|        drc_instructions_uni_drc->audio_num_chan;
  224|    208|  } else {
  225|    208|    drc_instructions_uni_drc->multiband_audio_sig_count = 0;
  226|    518|    for (c = 0; c < drc_instructions_uni_drc->audio_num_chan; c++) {
  ------------------
  |  Branch (226:17): [True: 310, False: 208]
  ------------------
  227|    310|      g = drc_instructions_uni_drc->channel_group_of_ch[c];
  228|    310|      if (g < 0) {
  ------------------
  |  Branch (228:11): [True: 0, False: 310]
  ------------------
  229|      0|        drc_instructions_uni_drc->multiband_audio_sig_count++;
  230|    310|      } else {
  231|    310|        drc_instructions_uni_drc->multiband_audio_sig_count +=
  232|    310|            drc_instructions_uni_drc->band_count_of_ch_group[g];
  233|    310|      }
  234|    310|    }
  235|    208|  }
  236|       |
  237|    624|  for (g = 0; g < drc_instructions_uni_drc->num_drc_ch_groups; g++) {
  ------------------
  |  Branch (237:15): [True: 416, False: 208]
  ------------------
  238|    416|    if (g == 0) {
  ------------------
  |  Branch (238:9): [True: 208, False: 208]
  ------------------
  239|    208|      drc_instructions_uni_drc->parametric_drc_look_ahead_samples_max = 0;
  240|    208|    }
  241|    416|    if (drc_instructions_uni_drc->ch_group_parametric_drc_flag[g] == 0) {
  ------------------
  |  Branch (241:9): [True: 416, False: 0]
  ------------------
  242|    416|      if (drc_instructions_uni_drc->band_count_of_ch_group[g] > 1) {
  ------------------
  |  Branch (242:11): [True: 0, False: 416]
  ------------------
  243|      0|        if (ia_drc_params_struct->multiband_sel_drc_idx != -1) {
  ------------------
  |  Branch (243:13): [True: 0, False: 0]
  ------------------
  244|      0|          return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  245|      0|        }
  246|      0|        selected_drc_is_multiband = 1;
  247|      0|      }
  248|    416|    } else {
  249|      0|      WORD32 gain_set_index =
  250|      0|          drc_instructions_uni_drc->gain_set_idx_of_ch_group_parametric_drc[g];
  251|      0|      WORD32 parametric_drc_id =
  252|      0|          drc_config->str_drc_config_ext.str_drc_coeff_param_drc
  253|      0|              .str_parametric_drc_gain_set_params[gain_set_index]
  254|      0|              .parametric_drc_id;
  255|      0|      WORD32 parametric_drc_look_ahead_samples = 0;
  256|      0|      ia_parametric_drc_instructions_struct* str_parametric_drc_instructions;
  257|       |
  258|      0|      for (i = 0;
  259|      0|           i < drc_config->str_drc_config_ext.parametric_drc_instructions_count;
  ------------------
  |  Branch (259:12): [True: 0, False: 0]
  ------------------
  260|      0|           i++) {
  261|      0|        if (parametric_drc_id ==
  ------------------
  |  Branch (261:13): [True: 0, False: 0]
  ------------------
  262|      0|            drc_config->str_drc_config_ext.str_parametric_drc_instructions[i]
  263|      0|                .parametric_drc_id)
  264|      0|          break;
  265|      0|      }
  266|      0|      if (i ==
  ------------------
  |  Branch (266:11): [True: 0, False: 0]
  ------------------
  267|      0|          drc_config->str_drc_config_ext.parametric_drc_instructions_count) {
  268|      0|        return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  269|      0|      }
  270|      0|      str_parametric_drc_instructions =
  271|      0|          &drc_config->str_drc_config_ext.str_parametric_drc_instructions[i];
  272|       |
  273|      0|      p_parametric_drc_params->parametric_drc_idx
  274|      0|          [p_parametric_drc_params->parametric_drc_instance_count] = i;
  275|      0|      p_parametric_drc_params->gain_set_index
  276|      0|          [p_parametric_drc_params->parametric_drc_instance_count] =
  277|      0|          gain_set_index;
  278|      0|      if (drc_instructions_uni_drc->drc_apply_to_dwnmix == 0) {
  ------------------
  |  Branch (278:11): [True: 0, False: 0]
  ------------------
  279|      0|        p_parametric_drc_params->dwnmix_id_from_drc_instructions
  280|      0|            [p_parametric_drc_params->parametric_drc_instance_count] =
  281|      0|            ID_FOR_BASE_LAYOUT;
  ------------------
  |  |  135|      0|#define ID_FOR_BASE_LAYOUT 0x0
  ------------------
  282|      0|      } else {
  283|      0|        if (drc_instructions_uni_drc->dwnmix_id_count > 1) {
  ------------------
  |  Branch (283:13): [True: 0, False: 0]
  ------------------
  284|      0|          p_parametric_drc_params->dwnmix_id_from_drc_instructions
  285|      0|              [p_parametric_drc_params->parametric_drc_instance_count] =
  286|      0|              ID_FOR_ANY_DOWNMIX;
  ------------------
  |  |  136|      0|#define ID_FOR_ANY_DOWNMIX 0x7F
  ------------------
  287|      0|        } else {
  288|      0|          p_parametric_drc_params->dwnmix_id_from_drc_instructions
  289|      0|              [p_parametric_drc_params->parametric_drc_instance_count] =
  290|      0|              drc_instructions_uni_drc->downmix_id[0];
  291|      0|        }
  292|      0|      }
  293|      0|      p_parametric_drc_params->audio_num_chan = channel_count;
  294|      0|      for (i = 0; i < p_parametric_drc_params->audio_num_chan; i++) {
  ------------------
  |  Branch (294:19): [True: 0, False: 0]
  ------------------
  295|      0|        if (drc_instructions_uni_drc->channel_group_of_ch[i] == g) {
  ------------------
  |  Branch (295:13): [True: 0, False: 0]
  ------------------
  296|      0|          p_parametric_drc_params->channel_map
  297|      0|              [p_parametric_drc_params->parametric_drc_instance_count][i] = 1;
  298|      0|        } else {
  299|      0|          p_parametric_drc_params->channel_map
  300|      0|              [p_parametric_drc_params->parametric_drc_instance_count][i] = 0;
  301|      0|        }
  302|      0|      }
  303|      0|      drc_instructions_uni_drc->parametric_drc_look_ahead_samples[g] = 0;
  304|      0|      if (str_parametric_drc_instructions->parametric_drc_look_ahead_flag) {
  ------------------
  |  Branch (304:11): [True: 0, False: 0]
  ------------------
  305|      0|        parametric_drc_look_ahead_samples = (WORD32)(
  306|      0|            (FLOAT32)
  307|      0|                str_parametric_drc_instructions->parametric_drc_look_ahead *
  308|      0|            (FLOAT32)p_parametric_drc_params->sampling_rate * 0.001f);
  309|      0|      } else {
  310|      0|        if (str_parametric_drc_instructions->parametric_drc_type ==
  ------------------
  |  Branch (310:13): [True: 0, False: 0]
  ------------------
  311|      0|            PARAM_DRC_TYPE_FF) {
  ------------------
  |  |  181|      0|#define PARAM_DRC_TYPE_FF 0x0
  ------------------
  312|      0|          parametric_drc_look_ahead_samples = (WORD32)(
  313|      0|              10.0f * (FLOAT32)p_parametric_drc_params->sampling_rate * 0.001f);
  314|      0|        } else if (str_parametric_drc_instructions->parametric_drc_type ==
  ------------------
  |  Branch (314:20): [True: 0, False: 0]
  ------------------
  315|      0|                   PARAM_DRC_TYPE_LIM) {
  ------------------
  |  |  185|      0|#define PARAM_DRC_TYPE_LIM 0x1
  ------------------
  316|      0|          parametric_drc_look_ahead_samples = (WORD32)(
  317|      0|              5.0f * (FLOAT32)p_parametric_drc_params->sampling_rate * 0.001f);
  318|      0|        } else {
  319|      0|          return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  320|      0|        }
  321|      0|      }
  322|      0|      drc_instructions_uni_drc->parametric_drc_look_ahead_samples[g] =
  323|      0|          parametric_drc_look_ahead_samples;
  324|      0|      if (drc_instructions_uni_drc->parametric_drc_look_ahead_samples_max <
  ------------------
  |  Branch (324:11): [True: 0, False: 0]
  ------------------
  325|      0|          drc_instructions_uni_drc->parametric_drc_look_ahead_samples[g]) {
  326|      0|        drc_instructions_uni_drc->parametric_drc_look_ahead_samples_max =
  327|      0|            drc_instructions_uni_drc->parametric_drc_look_ahead_samples[g];
  328|      0|      }
  329|      0|      p_parametric_drc_params->parametric_drc_instance_count += 1;
  330|      0|      selected_drc_is_multiband = 0;
  331|      0|    }
  332|    416|  }
  333|    208|  ia_drc_params_struct->parametric_drc_delay +=
  334|    208|      drc_instructions_uni_drc->parametric_drc_look_ahead_samples_max;
  335|       |
  336|    208|  if (selected_drc_is_multiband == 1) {
  ------------------
  |  Branch (336:7): [True: 0, False: 208]
  ------------------
  337|      0|    ia_drc_params_struct->multiband_sel_drc_idx =
  338|      0|        ia_drc_params_struct->drc_set_counter;
  339|      0|    err = impd_init_all_filter_banks(
  340|      0|        drc_coefficients_uni_drc,
  341|      0|        &(drc_config->str_drc_instruction_str[drc_instructions_selected]),
  342|      0|        ia_filter_banks_struct);
  343|      0|    if (err) return (err);
  ------------------
  |  Branch (343:9): [True: 0, False: 0]
  ------------------
  344|       |
  345|      0|    impd_init_overlap_weight(
  346|      0|        drc_coefficients_uni_drc,
  347|      0|        &(drc_config->str_drc_instruction_str[drc_instructions_selected]),
  348|      0|        ia_drc_params_struct->sub_band_domain_mode, pstr_overlap_params);
  349|       |
  350|    208|  } else {
  351|    208|    ia_gain_modifiers_struct* gain_modifiers =
  352|    208|        drc_config->str_drc_instruction_str->str_gain_modifiers_of_ch_group;
  353|    624|    for (g = 0; g < drc_instructions_uni_drc->num_drc_ch_groups; g++) {
  ------------------
  |  Branch (353:17): [True: 416, False: 208]
  ------------------
  354|    416|      if (gain_modifiers[g].shape_filter_flag == 1) {
  ------------------
  |  Branch (354:11): [True: 0, False: 416]
  ------------------
  355|      0|        impd_shape_filt_block_init(
  356|      0|            &drc_coefficients_uni_drc->str_shape_filter_block_params
  357|      0|                 [gain_modifiers[g].shape_filter_idx],
  358|      0|            &shape_filter_block[g]);
  359|    416|      } else {
  360|    416|        shape_filter_block[g].shape_flter_block_flag = 0;
  361|    416|      }
  362|    416|    }
  363|    208|  }
  364|       |
  365|    208|  ia_drc_params_struct->drc_set_counter++;
  366|       |
  367|    208|  return (0);
  368|    208|}

impd_dec_initial_gain:
   47|  60.5k|                             FLOAT32* initial_gain) {
   48|  60.5k|  WORD32 sign, magn, bit_2_extract;
   49|  60.5k|  switch (gain_coding_profile) {
   50|  60.5k|    case GAIN_CODING_PROFILE_REGULAR:
  ------------------
  |  |   75|  60.5k|#define GAIN_CODING_PROFILE_REGULAR 0
  ------------------
  |  Branch (50:5): [True: 60.5k, False: 0]
  ------------------
   51|  60.5k|      sign = impd_read_bits_buf(it_bit_buff, 1);
   52|  60.5k|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (52:11): [True: 369, False: 60.1k]
  ------------------
   53|  60.1k|      magn = impd_read_bits_buf(it_bit_buff, 8);
   54|  60.1k|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (54:11): [True: 1.30k, False: 58.8k]
  ------------------
   55|  58.8k|      *initial_gain = magn * 0.125f;
   56|  58.8k|      if (sign) *initial_gain = -*initial_gain;
  ------------------
  |  Branch (56:11): [True: 19.5k, False: 39.3k]
  ------------------
   57|  58.8k|      break;
   58|      0|    case GAIN_CODING_PROFILE_FADING:
  ------------------
  |  |   76|      0|#define GAIN_CODING_PROFILE_FADING 1
  ------------------
  |  Branch (58:5): [True: 0, False: 60.5k]
  ------------------
   59|      0|    case GAIN_CODING_PROFILE_CLIPPING:
  ------------------
  |  |   77|      0|#define GAIN_CODING_PROFILE_CLIPPING 2
  ------------------
  |  Branch (59:5): [True: 0, False: 60.5k]
  ------------------
   60|      0|      bit_2_extract =
   61|      0|          (gain_coding_profile == GAIN_CODING_PROFILE_FADING) ? 10 : 8;
  ------------------
  |  |   76|      0|#define GAIN_CODING_PROFILE_FADING 1
  ------------------
  |  Branch (61:11): [True: 0, False: 0]
  ------------------
   62|      0|      sign = impd_read_bits_buf(it_bit_buff, 1);
   63|      0|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (63:11): [True: 0, False: 0]
  ------------------
   64|      0|      if (sign == 0)
  ------------------
  |  Branch (64:11): [True: 0, False: 0]
  ------------------
   65|      0|        *initial_gain = 0.0f;
   66|      0|      else {
   67|      0|        magn = impd_read_bits_buf(it_bit_buff, bit_2_extract);
   68|      0|        if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (68:13): [True: 0, False: 0]
  ------------------
   69|      0|        *initial_gain = -(magn + 1) * 0.125f;
   70|      0|      }
   71|      0|      break;
   72|       |
   73|      0|    case GAIN_CODING_PROFILE_CONSTANT:
  ------------------
  |  |   78|      0|#define GAIN_CODING_PROFILE_CONSTANT 3
  ------------------
  |  Branch (73:5): [True: 0, False: 60.5k]
  ------------------
   74|      0|      break;
   75|      0|    default:
  ------------------
  |  Branch (75:5): [True: 0, False: 60.5k]
  ------------------
   76|      0|      return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
   77|  60.5k|  }
   78|  58.8k|  return (0);
   79|  60.5k|}
impd_dec_gains:
   82|  20.9k|                      WORD32 gain_coding_profile, ia_node_struct* str_node) {
   83|  20.9k|  WORD32 err = 0, k, e, m;
   84|  20.9k|  WORD32 bit;
   85|  20.9k|  WORD32 num_bits_read;
   86|  20.9k|  WORD32 code;
   87|  20.9k|  WORD32 code_found;
   88|  20.9k|  FLOAT32 drc_gain_delta = 0;
   89|  20.9k|  const ia_delta_gain_code_table_struct* ptr_delta_gain_code_table;
   90|  20.9k|  WORD32 no_delta_gain_entries;
   91|       |
   92|  20.9k|  err = impd_dec_initial_gain(it_bit_buff, gain_coding_profile,
   93|  20.9k|                              &(str_node[0].loc_db_gain));
   94|  20.9k|  if (err) return (err);
  ------------------
  |  Branch (94:7): [True: 304, False: 20.6k]
  ------------------
   95|       |
   96|  20.6k|  impd_get_delta_gain_code_tbl(gain_coding_profile, &ptr_delta_gain_code_table,
   97|  20.6k|                               &no_delta_gain_entries);
   98|  39.4k|  for (k = 1; k < no_nodes; k++) {
  ------------------
  |  Branch (98:15): [True: 19.0k, False: 20.3k]
  ------------------
   99|  19.0k|    num_bits_read = 0;
  100|  19.0k|    code = 0;
  101|  19.0k|    code_found = 0;
  102|  19.0k|    e = 0;
  103|  82.8k|    while ((e < no_delta_gain_entries) && (!code_found)) {
  ------------------
  |  Branch (103:12): [True: 82.8k, False: 0]
  |  Branch (103:43): [True: 64.0k, False: 18.8k]
  ------------------
  104|   127k|      for (m = 0; m < ptr_delta_gain_code_table[e].size - num_bits_read; m++) {
  ------------------
  |  Branch (104:19): [True: 64.0k, False: 63.7k]
  ------------------
  105|  64.0k|        bit = impd_read_bits_buf(it_bit_buff, 1);
  106|  64.0k|        if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (106:13): [True: 238, False: 63.7k]
  ------------------
  107|  63.7k|        code = (code << 1) + bit;
  108|  63.7k|        num_bits_read++;
  109|  63.7k|      }
  110|   124k|      while (num_bits_read == ptr_delta_gain_code_table[e].size) {
  ------------------
  |  Branch (110:14): [True: 79.8k, False: 44.9k]
  ------------------
  111|  79.8k|        if (code == ptr_delta_gain_code_table[e].code) {
  ------------------
  |  Branch (111:13): [True: 18.8k, False: 61.0k]
  ------------------
  112|  18.8k|          drc_gain_delta = ptr_delta_gain_code_table[e].value;
  113|  18.8k|          code_found = 1;
  114|  18.8k|          break;
  115|  18.8k|        }
  116|  61.0k|        e++;
  117|  61.0k|      }
  118|  63.7k|    }
  119|  18.8k|    if (code_found == 0) {
  ------------------
  |  Branch (119:9): [True: 0, False: 18.8k]
  ------------------
  120|      0|      return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  121|      0|    }
  122|  18.8k|    str_node[k].loc_db_gain = str_node[k - 1].loc_db_gain + drc_gain_delta;
  123|  18.8k|  }
  124|  20.3k|  return (0);
  125|  20.6k|}
impd_dec_slopes:
  129|  24.3k|                       ia_node_struct* str_node) {
  130|  24.3k|  WORD32 k, e, bit;
  131|  24.3k|  WORD32 code;
  132|  24.3k|  WORD32 code_found;
  133|  24.3k|  FLOAT32 slope_value = 0;
  134|  24.3k|  bool end_marker = 0;
  ------------------
  |  |  228|  24.3k|#define bool WORD32
  ------------------
  135|  24.3k|  WORD32 num_bits_read;
  136|  24.3k|  const ia_slope_code_table_struct* ptr_slope_code_table;
  137|  24.3k|  WORD32 no_slope_code_entries;
  138|       |
  139|  24.3k|  ptr_slope_code_table = &(slope_code_tbl_entries_by_size[0]);
  140|  24.3k|  no_slope_code_entries = NUM_SLOPE_TBL_ENTRIES;
  ------------------
  |  |   26|  24.3k|#define NUM_SLOPE_TBL_ENTRIES 15
  ------------------
  141|       |
  142|  24.3k|  k = 0;
  143|   186k|  while (end_marker != 1) {
  ------------------
  |  Branch (143:10): [True: 162k, False: 24.2k]
  ------------------
  144|   162k|    k++;
  145|   162k|    end_marker = impd_read_bits_buf(it_bit_buff, 1);
  146|   162k|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (146:9): [True: 148, False: 161k]
  ------------------
  147|   162k|  }
  148|  24.2k|  if (k > NODE_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |   47|  24.2k|#define NODE_COUNT_MAX DRC_CODEC_FRAME_SIZE_MAX
  |  |  ------------------
  |  |  |  |   46|  24.2k|#define DRC_CODEC_FRAME_SIZE_MAX (AUDIO_CODEC_FRAME_SIZE_MAX / 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  24.2k|#define AUDIO_CODEC_FRAME_SIZE_MAX 4096
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                if (k > NODE_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |  128|    106|#define UNEXPECTED_ERROR 2
  ------------------
  |  Branch (148:7): [True: 106, False: 24.1k]
  ------------------
  149|  24.1k|  *no_nodes = k;
  150|       |
  151|  24.1k|  if (gain_interpolation_type == GAIN_INTERPOLATION_TYPE_SPLINE) {
  ------------------
  |  |   81|  24.1k|#define GAIN_INTERPOLATION_TYPE_SPLINE 0
  ------------------
  |  Branch (151:7): [True: 0, False: 24.1k]
  ------------------
  152|      0|    for (k = 0; k < *no_nodes; k++) {
  ------------------
  |  Branch (152:17): [True: 0, False: 0]
  ------------------
  153|      0|      num_bits_read = 0;
  154|      0|      code = 0;
  155|      0|      code_found = 0;
  156|      0|      e = 0;
  157|      0|      while ((e < no_slope_code_entries) && (!code_found)) {
  ------------------
  |  Branch (157:14): [True: 0, False: 0]
  |  Branch (157:45): [True: 0, False: 0]
  ------------------
  158|      0|        while (num_bits_read < ptr_slope_code_table[e].size) {
  ------------------
  |  Branch (158:16): [True: 0, False: 0]
  ------------------
  159|      0|          bit = impd_read_bits_buf(it_bit_buff, 1);
  160|      0|          if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (160:15): [True: 0, False: 0]
  ------------------
  161|      0|          code = (code << 1) + bit;
  162|      0|          num_bits_read++;
  163|      0|        }
  164|      0|        while (num_bits_read == ptr_slope_code_table[e].size) {
  ------------------
  |  Branch (164:16): [True: 0, False: 0]
  ------------------
  165|      0|          if (code == ptr_slope_code_table[e].code) {
  ------------------
  |  Branch (165:15): [True: 0, False: 0]
  ------------------
  166|      0|            slope_value = ptr_slope_code_table[e].value;
  167|      0|            code_found = 1;
  168|      0|            break;
  169|      0|          }
  170|      0|          e++;
  171|      0|          if (e >= no_slope_code_entries) return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  |  Branch (171:15): [True: 0, False: 0]
  ------------------
  172|      0|        }
  173|      0|      }
  174|      0|      str_node[k].slope = slope_value;
  175|      0|    }
  176|  24.1k|  } else {
  177|  89.9k|    for (k = 0; k < *no_nodes; k++) {
  ------------------
  |  Branch (177:17): [True: 65.8k, False: 24.1k]
  ------------------
  178|  65.8k|      str_node[k].slope = 0.0f;
  179|  65.8k|    }
  180|  24.1k|  }
  181|  24.1k|  return (0);
  182|  24.1k|}
impd_dec_times:
  188|  24.1k|                      ia_node_struct* str_node) {
  189|  24.1k|  WORD32 k, e, m;
  190|  24.1k|  WORD32 bit;
  191|  24.1k|  WORD32 num_bits_read;
  192|  24.1k|  WORD32 code;
  193|  24.1k|  WORD32 code_found = 0;
  194|  24.1k|  WORD32 time_delta = 0;
  195|  24.1k|  WORD32 time_offs = time_offset;
  196|  24.1k|  ia_delta_time_code_table_entry_struct* delta_time_code_table =
  197|  24.1k|      str_tables->delta_time_code_table;
  198|  24.1k|  bool frame_end_flag;
  ------------------
  |  |  228|  24.1k|#define bool WORD32
  ------------------
  199|  24.1k|  WORD32 node_time_tmp;
  200|  24.1k|  bool node_res_flag;
  ------------------
  |  |  228|  24.1k|#define bool WORD32
  ------------------
  201|  24.1k|  WORD32 exit_cnt;
  202|  24.1k|  if (full_frame == 0) {
  ------------------
  |  Branch (202:7): [True: 24.1k, False: 0]
  ------------------
  203|  24.1k|    frame_end_flag = impd_read_bits_buf(it_bit_buff, 1);
  204|  24.1k|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (204:9): [True: 333, False: 23.7k]
  ------------------
  205|  24.1k|  } else {
  206|      0|    frame_end_flag = 1;
  207|      0|  }
  208|       |
  209|  23.7k|  if (frame_end_flag == 1) {
  ------------------
  |  Branch (209:7): [True: 14.5k, False: 9.19k]
  ------------------
  210|  14.5k|    node_res_flag = 0;
  211|  29.1k|    for (k = 0; k < num_nodes - 1; k++) {
  ------------------
  |  Branch (211:17): [True: 16.2k, False: 12.9k]
  ------------------
  212|  16.2k|      num_bits_read = 0;
  213|  16.2k|      code = 0;
  214|  16.2k|      code_found = 0;
  215|  16.2k|      exit_cnt = 0;
  216|  16.2k|      e = 1;
  217|   104M|      while ((e < N_DELTA_TIME_CODE_TABLE_ENTRIES_MAX) && (!code_found)) {
  ------------------
  |  |   27|   104M|#define N_DELTA_TIME_CODE_TABLE_ENTRIES_MAX (512 + 14)
  ------------------
  |  Branch (217:14): [True: 104M, False: 0]
  |  Branch (217:59): [True: 104M, False: 14.8k]
  ------------------
  218|   104M|        exit_cnt++;
  219|   104M|        if (exit_cnt > 100000) {
  ------------------
  |  Branch (219:13): [True: 1.04k, False: 104M]
  ------------------
  220|  1.04k|          return -1;
  221|  1.04k|        }
  222|   104M|        for (m = 0; m < delta_time_code_table[e].size - num_bits_read; m++) {
  ------------------
  |  Branch (222:21): [True: 75.6k, False: 104M]
  ------------------
  223|  75.6k|          bit = impd_read_bits_buf(it_bit_buff, 1);
  224|  75.6k|          if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (224:15): [True: 315, False: 75.3k]
  ------------------
  225|  75.3k|          code = (code << 1) + bit;
  226|  75.3k|          num_bits_read++;
  227|  75.3k|        }
  228|   104M|        while (num_bits_read == delta_time_code_table[e].size) {
  ------------------
  |  Branch (228:16): [True: 258k, False: 104M]
  ------------------
  229|   258k|          if (code == delta_time_code_table[e].code) {
  ------------------
  |  Branch (229:15): [True: 14.8k, False: 243k]
  ------------------
  230|  14.8k|            time_delta = delta_time_code_table[e].value;
  231|  14.8k|            code_found = 1;
  232|  14.8k|            break;
  233|  14.8k|          }
  234|   243k|          e++;
  235|   243k|        }
  236|   104M|      }
  237|  14.8k|      node_time_tmp = time_offs + time_delta * delta_tmin;
  238|  14.8k|      if (node_time_tmp >= (2 * AUDIO_CODEC_FRAME_SIZE_MAX - drc_frame_size))
  ------------------
  |  |   45|  14.8k|#define AUDIO_CODEC_FRAME_SIZE_MAX 4096
  ------------------
  |  Branch (238:11): [True: 274, False: 14.5k]
  ------------------
  239|    274|        return UNEXPECTED_ERROR;
  ------------------
  |  |  128|    274|#define UNEXPECTED_ERROR 2
  ------------------
  240|  14.5k|      if (node_time_tmp > drc_frame_size + time_offset) {
  ------------------
  |  Branch (240:11): [True: 5.20k, False: 9.36k]
  ------------------
  241|  5.20k|        if (node_res_flag == 0) {
  ------------------
  |  Branch (241:13): [True: 2.46k, False: 2.74k]
  ------------------
  242|  2.46k|          str_node[k].time = drc_frame_size + time_offset;
  243|  2.46k|          node_res_flag = 1;
  244|  2.46k|        }
  245|  5.20k|        str_node[k + 1].time = node_time_tmp;
  246|  9.36k|      } else {
  247|  9.36k|        str_node[k].time = node_time_tmp;
  248|  9.36k|      }
  249|  14.5k|      time_offs = node_time_tmp;
  250|  14.5k|    }
  251|  12.9k|    if (node_res_flag == 0) {
  ------------------
  |  Branch (251:9): [True: 10.9k, False: 2.01k]
  ------------------
  252|  10.9k|      str_node[k].time = drc_frame_size + time_offset;
  253|  10.9k|    }
  254|  12.9k|  } else {
  255|  28.8k|    for (k = 0; k < num_nodes; k++) {
  ------------------
  |  Branch (255:17): [True: 20.8k, False: 7.95k]
  ------------------
  256|  20.8k|      num_bits_read = 0;
  257|  20.8k|      code = 0;
  258|  20.8k|      code_found = 0;
  259|  20.8k|      e = 1;
  260|  20.8k|      exit_cnt = 0;
  261|  65.1M|      while ((e < N_DELTA_TIME_CODE_TABLE_ENTRIES_MAX) && (!code_found)) {
  ------------------
  |  |   27|  65.1M|#define N_DELTA_TIME_CODE_TABLE_ENTRIES_MAX (512 + 14)
  ------------------
  |  Branch (261:14): [True: 65.1M, False: 0]
  |  Branch (261:59): [True: 65.1M, False: 19.8k]
  ------------------
  262|  65.1M|        exit_cnt++;
  263|  65.1M|        if (exit_cnt > 100000) {
  ------------------
  |  Branch (263:13): [True: 651, False: 65.1M]
  ------------------
  264|    651|          return (BITSTREAM_ERROR);
  ------------------
  |  |  132|    651|#define BITSTREAM_ERROR 6
  ------------------
  265|    651|        }
  266|  65.2M|        for (m = 0; m < delta_time_code_table[e].size - num_bits_read; m++) {
  ------------------
  |  Branch (266:21): [True: 83.8k, False: 65.1M]
  ------------------
  267|  83.8k|          bit = impd_read_bits_buf(it_bit_buff, 1);
  268|  83.8k|          if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (268:15): [True: 336, False: 83.4k]
  ------------------
  269|  83.4k|          code = (code << 1) + bit;
  270|  83.4k|          num_bits_read++;
  271|  83.4k|        }
  272|  65.3M|        while (num_bits_read == delta_time_code_table[e].size) {
  ------------------
  |  Branch (272:16): [True: 194k, False: 65.1M]
  ------------------
  273|   194k|          if (code == delta_time_code_table[e].code) {
  ------------------
  |  Branch (273:15): [True: 19.8k, False: 174k]
  ------------------
  274|  19.8k|            time_delta = delta_time_code_table[e].value;
  275|  19.8k|            code_found = 1;
  276|  19.8k|            break;
  277|  19.8k|          }
  278|   174k|          e++;
  279|   174k|        }
  280|  65.1M|      }
  281|  19.8k|      time_offs += time_delta * delta_tmin;
  282|  19.8k|      if (time_offs >= (2 * AUDIO_CODEC_FRAME_SIZE_MAX - drc_frame_size))
  ------------------
  |  |   45|  19.8k|#define AUDIO_CODEC_FRAME_SIZE_MAX 4096
  ------------------
  |  Branch (282:11): [True: 251, False: 19.6k]
  ------------------
  283|    251|        return UNEXPECTED_ERROR;
  ------------------
  |  |  128|    251|#define UNEXPECTED_ERROR 2
  ------------------
  284|  19.6k|      str_node[k].time = time_offs;
  285|  19.6k|    }
  286|  9.19k|  }
  287|  20.9k|  return (0);
  288|  23.7k|}
impd_drc_uni_gain_read:
  293|  18.0k|                              ia_drc_gain_struct* pstr_uni_drc_gain) {
  294|  18.0k|  WORD32 err = 0;
  295|  18.0k|  WORD32 seq;
  296|  18.0k|  static WORD32 pkt_loss_frame_cnt = 0;
  297|  18.0k|  ia_spline_nodes_struct* str_spline_nodes = {0};
  298|       |
  299|  18.0k|  {
  300|  18.0k|    WORD32 gain_sequence_count =
  301|  18.0k|        drc_config->str_p_loc_drc_coefficients_uni_drc[0].gain_sequence_count;
  302|       |
  303|  76.6k|    for (seq = 0; seq < gain_sequence_count; seq++) {
  ------------------
  |  Branch (303:19): [True: 64.5k, False: 12.0k]
  ------------------
  304|  64.5k|      WORD32 index = drc_config->str_p_loc_drc_coefficients_uni_drc[0]
  305|  64.5k|                         .gain_set_params_index_for_gain_sequence[seq];
  306|  64.5k|      ia_gain_set_params_struct str_gain_set_params = {0};
  307|  64.5k|      ia_gain_set_params_struct* gain_set_params = &str_gain_set_params;
  308|       |
  309|  64.5k|      if (index != -1) {
  ------------------
  |  Branch (309:11): [True: 64.5k, False: 0]
  ------------------
  310|  64.5k|        gain_set_params = &(drc_config->str_p_loc_drc_coefficients_uni_drc
  311|  64.5k|                                ->gain_set_params[index]);
  312|  64.5k|      }
  313|  64.5k|      if (gain_set_params->gain_coding_profile ==
  ------------------
  |  Branch (313:11): [True: 0, False: 64.5k]
  ------------------
  314|  64.5k|          GAIN_CODING_PROFILE_CONSTANT) {
  ------------------
  |  |   78|  64.5k|#define GAIN_CODING_PROFILE_CONSTANT 3
  ------------------
  315|      0|        str_spline_nodes =
  316|      0|            &(pstr_uni_drc_gain->drc_gain_sequence[seq].str_spline_nodes[0]);
  317|      0|        str_spline_nodes->num_nodes = 1;
  318|      0|        str_spline_nodes->str_node[0].slope = 0.0;
  319|      0|        str_spline_nodes->str_node[0].time =
  320|      0|            (pstr_drc_uni_bs_dec->ia_drc_params_struct).drc_frame_size - 1;
  321|      0|        str_spline_nodes->str_node[0].loc_db_gain = 0.0f;
  322|  64.5k|      } else {
  323|  64.5k|        err = impd_parse_drc_gain_sequence(
  324|  64.5k|            it_bit_buff, pstr_drc_uni_bs_dec, gain_set_params,
  325|  64.5k|            &(pstr_uni_drc_gain->drc_gain_sequence[seq]));
  326|  64.5k|        if (err) return (err);
  ------------------
  |  Branch (326:13): [True: 5.95k, False: 58.6k]
  ------------------
  327|  64.5k|      }
  328|  64.5k|    }
  329|  18.0k|  }
  330|       |
  331|  12.0k|  if (it_bit_buff->ptr_bit_buf_base == NULL) {
  ------------------
  |  Branch (331:7): [True: 0, False: 12.0k]
  ------------------
  332|      0|    pkt_loss_frame_cnt++;
  333|       |
  334|      0|    if (pkt_loss_frame_cnt *
  ------------------
  |  Branch (334:9): [True: 0, False: 0]
  ------------------
  335|      0|            (FLOAT32)pstr_drc_uni_bs_dec->ia_drc_params_struct.drc_frame_size /
  336|      0|            drc_config->sampling_rate >
  337|      0|        MAXPACKETLOSSTIME) {
  ------------------
  |  |  214|      0|#define MAXPACKETLOSSTIME 2.5f
  ------------------
  338|      0|      drc_config->apply_drc = 0;
  339|      0|    }
  340|  12.0k|  } else {
  341|  12.0k|    pstr_uni_drc_gain->uni_drc_gain_ext_flag =
  342|  12.0k|        impd_read_bits_buf(it_bit_buff, 1);
  343|  12.0k|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (343:9): [True: 166, False: 11.9k]
  ------------------
  344|  11.9k|    if (pstr_uni_drc_gain->uni_drc_gain_ext_flag == 1) {
  ------------------
  |  Branch (344:9): [True: 7.23k, False: 4.67k]
  ------------------
  345|  7.23k|      err = impd_parse_uni_drc_gain_ext(it_bit_buff,
  346|  7.23k|                                        &(pstr_uni_drc_gain->uni_drc_gain_ext));
  347|  7.23k|      if (err) return (err);
  ------------------
  |  Branch (347:11): [True: 5.00k, False: 2.23k]
  ------------------
  348|  7.23k|    }
  349|  6.90k|    pkt_loss_frame_cnt = 0;
  350|  6.90k|    drc_config->apply_drc = 1;
  351|  6.90k|  }
  352|       |
  353|  6.90k|  return (0);
  354|  12.0k|}
impd_parse_uni_drc_gain_ext:
  358|  7.23k|    ia_uni_drc_gain_ext_struct* uni_drc_gain_ext) {
  359|  7.23k|  WORD32 k;
  360|  7.23k|  WORD32 bit_size_len, ext_size_bits, bit_size;
  361|       |
  362|  7.23k|  k = 0;
  363|  7.23k|  uni_drc_gain_ext->uni_drc_gain_ext_type[k] =
  364|  7.23k|      impd_read_bits_buf(it_bit_buff, 4);
  365|  7.23k|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (365:7): [True: 74, False: 7.16k]
  ------------------
  366|  23.5k|  while (uni_drc_gain_ext->uni_drc_gain_ext_type[k] != UNIDRCGAINEXT_TERM) {
  ------------------
  |  |  171|  23.5k|#define UNIDRCGAINEXT_TERM 0x0
  ------------------
  |  Branch (366:10): [True: 21.3k, False: 2.23k]
  ------------------
  367|  21.3k|    if (k >= (EXT_COUNT_MAX - 1)) return UNEXPECTED_ERROR;
  ------------------
  |  |  170|  21.3k|#define EXT_COUNT_MAX 8
  ------------------
                  if (k >= (EXT_COUNT_MAX - 1)) return UNEXPECTED_ERROR;
  ------------------
  |  |  128|    257|#define UNEXPECTED_ERROR 2
  ------------------
  |  Branch (367:9): [True: 257, False: 21.1k]
  ------------------
  368|  21.1k|    bit_size_len = impd_read_bits_buf(it_bit_buff, 3);
  369|  21.1k|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (369:9): [True: 860, False: 20.2k]
  ------------------
  370|  20.2k|    ext_size_bits = bit_size_len + 4;
  371|       |
  372|  20.2k|    bit_size = impd_read_bits_buf(it_bit_buff, ext_size_bits);
  373|  20.2k|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (373:9): [True: 735, False: 19.5k]
  ------------------
  374|  19.5k|    uni_drc_gain_ext->ext_bit_size[k] = bit_size + 1;
  375|       |
  376|  19.5k|        impd_skip_bits_buf(it_bit_buff, uni_drc_gain_ext->ext_bit_size[k]);
  377|  19.5k|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (377:9): [True: 1.41k, False: 18.0k]
  ------------------
  378|  18.0k|    k++;
  379|  18.0k|    uni_drc_gain_ext->uni_drc_gain_ext_type[k] =
  380|  18.0k|        impd_read_bits_buf(it_bit_buff, 4);
  381|  18.0k|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (381:9): [True: 1.66k, False: 16.4k]
  ------------------
  382|  18.0k|  }
  383|       |
  384|  2.23k|  return (0);
  385|  7.16k|}
impd_parse_spline_nodes:
  390|  64.5k|                               ia_spline_nodes_struct* str_spline_nodes) {
  391|  64.5k|  WORD32 err = 0;
  392|  64.5k|  WORD32 time_offset;
  393|  64.5k|  if (gain_set_params->time_alignment == 0) {
  ------------------
  |  Branch (393:7): [True: 64.5k, False: 0]
  ------------------
  394|  64.5k|    time_offset = -1;
  395|  64.5k|  } else {
  396|      0|    if (gain_set_params->time_delt_min_flag) {
  ------------------
  |  Branch (396:9): [True: 0, False: 0]
  ------------------
  397|      0|      time_offset = -gain_set_params->time_delt_min_val +
  398|      0|                    (gain_set_params->time_delt_min_val - 1) / 2;
  399|      0|    } else {
  400|      0|      time_offset =
  401|      0|          -pstr_drc_uni_bs_dec->ia_drc_params_struct.delta_tmin_default +
  402|      0|          (pstr_drc_uni_bs_dec->ia_drc_params_struct.delta_tmin_default - 1) /
  403|      0|              2;
  404|      0|    }
  405|      0|  }
  406|       |
  407|  64.5k|  if (it_bit_buff->ptr_bit_buf_base == NULL) {
  ------------------
  |  Branch (407:7): [True: 0, False: 64.5k]
  ------------------
  408|      0|    if ((str_spline_nodes->num_nodes < 1) ||
  ------------------
  |  Branch (408:9): [True: 0, False: 0]
  ------------------
  409|      0|        (str_spline_nodes->num_nodes > NODE_COUNT_MAX))
  ------------------
  |  |   47|      0|#define NODE_COUNT_MAX DRC_CODEC_FRAME_SIZE_MAX
  |  |  ------------------
  |  |  |  |   46|      0|#define DRC_CODEC_FRAME_SIZE_MAX (AUDIO_CODEC_FRAME_SIZE_MAX / 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#define AUDIO_CODEC_FRAME_SIZE_MAX 4096
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (409:9): [True: 0, False: 0]
  ------------------
  410|      0|      return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  411|      0|    FLOAT32 prev_db_gain =
  412|      0|        str_spline_nodes->str_node[str_spline_nodes->num_nodes - 1].loc_db_gain;
  413|      0|    str_spline_nodes->drc_gain_coding_mode = 0;
  414|       |
  415|      0|    str_spline_nodes->num_nodes = 1;
  416|       |
  417|      0|    if (prev_db_gain < 0) {
  ------------------
  |  Branch (417:9): [True: 0, False: 0]
  ------------------
  418|      0|      str_spline_nodes->str_node[0].loc_db_gain = prev_db_gain;
  419|      0|    } else {
  420|      0|      str_spline_nodes->str_node[0].loc_db_gain = 0.f;
  421|      0|    }
  422|       |
  423|      0|    str_spline_nodes->str_node[0].slope = 0.0;
  424|      0|    str_spline_nodes->str_node[0].time =
  425|      0|        (pstr_drc_uni_bs_dec->ia_drc_params_struct).drc_frame_size +
  426|      0|        time_offset;
  427|  64.5k|  } else {
  428|  64.5k|    str_spline_nodes->drc_gain_coding_mode = impd_read_bits_buf(it_bit_buff, 1);
  429|  64.5k|    if (it_bit_buff->error == PROC_COMPLETE) {
  ------------------
  |  |  127|  64.5k|#define PROC_COMPLETE 1
  ------------------
  |  Branch (429:9): [True: 675, False: 63.9k]
  ------------------
  430|    675|      if ((str_spline_nodes->num_nodes < 1) ||
  ------------------
  |  Branch (430:11): [True: 596, False: 79]
  ------------------
  431|     79|          (str_spline_nodes->num_nodes > NODE_COUNT_MAX))
  ------------------
  |  |   47|     79|#define NODE_COUNT_MAX DRC_CODEC_FRAME_SIZE_MAX
  |  |  ------------------
  |  |  |  |   46|     79|#define DRC_CODEC_FRAME_SIZE_MAX (AUDIO_CODEC_FRAME_SIZE_MAX / 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     79|#define AUDIO_CODEC_FRAME_SIZE_MAX 4096
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (431:11): [True: 0, False: 79]
  ------------------
  432|    596|        return UNEXPECTED_ERROR;
  ------------------
  |  |  128|    596|#define UNEXPECTED_ERROR 2
  ------------------
  433|     79|      str_spline_nodes->drc_gain_coding_mode = 0;
  434|     79|      str_spline_nodes->str_node[0].slope = 0.0;
  435|     79|      str_spline_nodes->str_node[0].time =
  436|     79|          (pstr_drc_uni_bs_dec->ia_drc_params_struct).drc_frame_size +
  437|     79|          time_offset;
  438|     79|      str_spline_nodes->str_node[0].loc_db_gain =
  439|     79|          str_spline_nodes->str_node[str_spline_nodes->num_nodes - 1]
  440|     79|              .loc_db_gain;
  441|     79|      str_spline_nodes->num_nodes = 1;
  442|  63.9k|    } else {
  443|  63.9k|      if (it_bit_buff->error) return (it_bit_buff->error);
  ------------------
  |  Branch (443:11): [True: 0, False: 63.9k]
  ------------------
  444|  63.9k|    }
  445|  64.0k|    if (str_spline_nodes->drc_gain_coding_mode == 0) {
  ------------------
  |  Branch (445:9): [True: 39.6k, False: 24.3k]
  ------------------
  446|  39.6k|      str_spline_nodes->num_nodes = 1;
  447|       |
  448|  39.6k|      err = impd_dec_initial_gain(it_bit_buff,
  449|  39.6k|                                  gain_set_params->gain_coding_profile,
  450|  39.6k|                                  &(str_spline_nodes->str_node[0].loc_db_gain));
  451|  39.6k|      if (err) return (err);
  ------------------
  |  Branch (451:11): [True: 1.36k, False: 38.2k]
  ------------------
  452|       |
  453|  38.2k|      str_spline_nodes->str_node[0].slope = 0.0;
  454|  38.2k|      str_spline_nodes->str_node[0].time =
  455|  38.2k|          (pstr_drc_uni_bs_dec->ia_drc_params_struct).drc_frame_size +
  456|  38.2k|          time_offset;
  457|  38.2k|    } else {
  458|  24.3k|      err = impd_dec_slopes(it_bit_buff, &str_spline_nodes->num_nodes,
  459|  24.3k|                            gain_set_params->gain_interpolation_type,
  460|  24.3k|                            str_spline_nodes->str_node);
  461|  24.3k|      if (err) return (err);
  ------------------
  |  Branch (461:11): [True: 254, False: 24.1k]
  ------------------
  462|  24.1k|      if (gain_set_params->time_delt_min_flag) {
  ------------------
  |  Branch (462:11): [True: 0, False: 24.1k]
  ------------------
  463|      0|        err = impd_dec_times(
  464|      0|            it_bit_buff, &gain_set_params->str_tables,
  465|      0|            str_spline_nodes->num_nodes, gain_set_params->time_delt_min_val,
  466|      0|            (pstr_drc_uni_bs_dec->ia_drc_params_struct).drc_frame_size,
  467|      0|            gain_set_params->full_frame, time_offset,
  468|      0|            str_spline_nodes->str_node);
  469|      0|        if (err) return (err);
  ------------------
  |  Branch (469:13): [True: 0, False: 0]
  ------------------
  470|      0|        err = impd_dec_gains(it_bit_buff, str_spline_nodes->num_nodes,
  471|      0|                             gain_set_params->gain_coding_profile,
  472|      0|                             str_spline_nodes->str_node);
  473|      0|        if (err) return (err);
  ------------------
  |  Branch (473:13): [True: 0, False: 0]
  ------------------
  474|  24.1k|      } else {
  475|  24.1k|        err = impd_dec_times(
  476|  24.1k|            it_bit_buff, &pstr_drc_uni_bs_dec->tables_default,
  477|  24.1k|            str_spline_nodes->num_nodes,
  478|  24.1k|            (pstr_drc_uni_bs_dec->ia_drc_params_struct).delta_tmin_default,
  479|  24.1k|            (pstr_drc_uni_bs_dec->ia_drc_params_struct).drc_frame_size,
  480|  24.1k|            gain_set_params->full_frame, time_offset,
  481|  24.1k|            str_spline_nodes->str_node);
  482|  24.1k|        if (err) return (err);
  ------------------
  |  Branch (482:13): [True: 3.20k, False: 20.9k]
  ------------------
  483|  20.9k|        err = impd_dec_gains(it_bit_buff, str_spline_nodes->num_nodes,
  484|  20.9k|                             gain_set_params->gain_coding_profile,
  485|  20.9k|                             str_spline_nodes->str_node);
  486|  20.9k|        if (err) return (err);
  ------------------
  |  Branch (486:13): [True: 542, False: 20.3k]
  ------------------
  487|  20.9k|      }
  488|  24.1k|    }
  489|  64.0k|  }
  490|  58.6k|  return (0);
  491|  64.5k|}
impd_parse_drc_gain_sequence:
  496|  64.5k|    ia_drc_gain_sequence_struct* drc_gain_sequence) {
  497|  64.5k|  WORD32 err = 0, i;
  498|  64.5k|  WORD32 prev_frame_time_buf[NODE_COUNT_MAX],
  499|  64.5k|      cur_frame_time_buf[NODE_COUNT_MAX];
  500|  64.5k|  WORD32 num_nodes_node_reservoir, num_nodes_cur, k, m;
  501|       |
  502|  64.5k|  if (((pstr_drc_uni_bs_dec->ia_drc_params_struct).delay_mode ==
  ------------------
  |  Branch (502:7): [True: 0, False: 64.5k]
  ------------------
  503|  64.5k|       DELAY_MODE_LOW_DELAY) &&
  ------------------
  |  |  117|  64.5k|#define DELAY_MODE_LOW_DELAY 1
  ------------------
  504|      0|      (gain_set_params->full_frame == 0)) {
  ------------------
  |  Branch (504:7): [True: 0, False: 0]
  ------------------
  505|      0|    return (PARAM_ERROR);
  ------------------
  |  |  129|      0|#define PARAM_ERROR 3
  ------------------
  506|      0|  }
  507|  64.5k|  i = 0;
  508|  64.5k|  {
  509|  64.5k|    err = impd_parse_spline_nodes(it_bit_buff, pstr_drc_uni_bs_dec,
  510|  64.5k|                                  gain_set_params,
  511|  64.5k|                                  &(drc_gain_sequence->str_spline_nodes[i]));
  512|  64.5k|    if (err) return (err);
  ------------------
  |  Branch (512:9): [True: 5.95k, False: 58.6k]
  ------------------
  513|       |
  514|  58.6k|    num_nodes_node_reservoir = 0;
  515|  58.6k|    num_nodes_cur = 0;
  516|   136k|    for (k = 0; k < drc_gain_sequence->str_spline_nodes[i].num_nodes; k++) {
  ------------------
  |  Branch (516:17): [True: 77.4k, False: 58.6k]
  ------------------
  517|  77.4k|      if (drc_gain_sequence->str_spline_nodes[i].str_node[k].time >=
  ------------------
  |  Branch (517:11): [True: 6.93k, False: 70.5k]
  ------------------
  518|  77.4k|          pstr_drc_uni_bs_dec->ia_drc_params_struct.drc_frame_size) {
  519|  6.93k|        prev_frame_time_buf[num_nodes_node_reservoir] =
  520|  6.93k|            drc_gain_sequence->str_spline_nodes[i].str_node[k].time;
  521|  6.93k|        num_nodes_node_reservoir++;
  522|  70.5k|      } else {
  523|  70.5k|        cur_frame_time_buf[num_nodes_cur] =
  524|  70.5k|            drc_gain_sequence->str_spline_nodes[i].str_node[k].time;
  525|  70.5k|        num_nodes_cur++;
  526|  70.5k|      }
  527|  77.4k|    }
  528|  65.5k|    for (k = 0; k < num_nodes_node_reservoir; k++) {
  ------------------
  |  Branch (528:17): [True: 6.93k, False: 58.6k]
  ------------------
  529|  6.93k|      WORD32 tmp = prev_frame_time_buf[k] -
  530|  6.93k|                   2 * pstr_drc_uni_bs_dec->ia_drc_params_struct.drc_frame_size;
  531|  6.93k|      if (tmp >= (2 * AUDIO_CODEC_FRAME_SIZE_MAX -
  ------------------
  |  |   45|  6.93k|#define AUDIO_CODEC_FRAME_SIZE_MAX 4096
  ------------------
  |  Branch (531:11): [True: 0, False: 6.93k]
  ------------------
  532|  6.93k|                  pstr_drc_uni_bs_dec->ia_drc_params_struct.drc_frame_size))
  533|      0|        return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  534|  6.93k|      drc_gain_sequence->str_spline_nodes[i].str_node[k].time = tmp;
  535|  6.93k|    }
  536|   129k|    for (m = 0; m < num_nodes_cur; m++, k++) {
  ------------------
  |  Branch (536:17): [True: 70.5k, False: 58.6k]
  ------------------
  537|  70.5k|      drc_gain_sequence->str_spline_nodes[i].str_node[k].time =
  538|  70.5k|          cur_frame_time_buf[m];
  539|  70.5k|    }
  540|  58.6k|  }
  541|      0|  return (0);
  542|  58.6k|}
impd_parse_drc_ext_v1:
  546|    490|                             ia_drc_config_ext* str_drc_config_ext) {
  547|    490|  WORD32 dwnmix_instructions_v1_flag;
  548|    490|  WORD32 dwnmix_instructions_v1_count;
  549|    490|  WORD32 drc_coeffs_and_instructions_uni_drc_v1_flag;
  550|    490|  WORD32 drc_coefficients_uni_drc_v1_count;
  551|    490|  WORD32 drc_instructions_uni_drc_v1_count;
  552|       |
  553|    490|  WORD32 i = 0, err = 0;
  554|    490|  const WORD32 version = 1;
  555|       |
  556|    490|  dwnmix_instructions_v1_flag = impd_read_bits_buf(it_bit_buff, 1);
  557|    490|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (557:7): [True: 2, False: 488]
  ------------------
  558|    488|  if (dwnmix_instructions_v1_flag == 1) {
  ------------------
  |  Branch (558:7): [True: 77, False: 411]
  ------------------
  559|     77|    dwnmix_instructions_v1_count = impd_read_bits_buf(it_bit_buff, 7);
  560|     77|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (560:9): [True: 1, False: 76]
  ------------------
  561|     76|    if ((dwnmix_instructions_v1_count + drc_config->dwnmix_instructions_count) >
  ------------------
  |  Branch (561:9): [True: 1, False: 75]
  ------------------
  562|     76|        DOWNMIX_INSTRUCTION_COUNT_MAX)
  ------------------
  |  |   41|     76|#define DOWNMIX_INSTRUCTION_COUNT_MAX 16
  ------------------
  563|      1|      return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      1|#define UNEXPECTED_ERROR 2
  ------------------
  564|    178|    for (i = 0; i < dwnmix_instructions_v1_count; i++) {
  ------------------
  |  Branch (564:17): [True: 115, False: 63]
  ------------------
  565|    115|      err = impd_parse_dwnmix_instructions(
  566|    115|          it_bit_buff, version, ia_drc_params_struct,
  567|    115|          &drc_config->channel_layout,
  568|    115|          &drc_config
  569|    115|               ->dwnmix_instructions[i +
  570|    115|                                     drc_config->dwnmix_instructions_count]);
  571|    115|      if (err) return (err);
  ------------------
  |  Branch (571:11): [True: 12, False: 103]
  ------------------
  572|    115|    }
  573|     63|    drc_config->dwnmix_instructions_count += dwnmix_instructions_v1_count;
  574|     63|  }
  575|       |
  576|    474|  drc_coeffs_and_instructions_uni_drc_v1_flag =
  577|    474|      impd_read_bits_buf(it_bit_buff, 1);
  578|    474|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (578:7): [True: 3, False: 471]
  ------------------
  579|    471|  if (drc_coeffs_and_instructions_uni_drc_v1_flag == 1) {
  ------------------
  |  Branch (579:7): [True: 211, False: 260]
  ------------------
  580|    211|    drc_coefficients_uni_drc_v1_count = impd_read_bits_buf(it_bit_buff, 3);
  581|    211|    if ((drc_coefficients_uni_drc_v1_count +
  ------------------
  |  Branch (581:9): [True: 1, False: 210]
  ------------------
  582|    211|         drc_config->drc_coefficients_drc_count) > DRC_COEFF_COUNT_MAX) {
  ------------------
  |  |   42|    211|#define DRC_COEFF_COUNT_MAX 8
  ------------------
  583|      1|      return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      1|#define UNEXPECTED_ERROR 2
  ------------------
  584|      1|    }
  585|    210|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (585:9): [True: 1, False: 209]
  ------------------
  586|    586|    for (i = 0; i < drc_coefficients_uni_drc_v1_count; i++) {
  ------------------
  |  Branch (586:17): [True: 466, False: 120]
  ------------------
  587|    466|      err = impd_drc_parse_coeff(
  588|    466|          it_bit_buff, version, ia_drc_params_struct,
  589|    466|          &drc_config->str_p_loc_drc_coefficients_uni_drc
  590|    466|               [i + drc_config->drc_coefficients_drc_count]);
  591|    466|      if (err) return (err);
  ------------------
  |  Branch (591:11): [True: 89, False: 377]
  ------------------
  592|    466|    }
  593|    120|    drc_config->drc_coefficients_drc_count += drc_coefficients_uni_drc_v1_count;
  594|       |
  595|    120|    drc_instructions_uni_drc_v1_count = impd_read_bits_buf(it_bit_buff, 6);
  596|    120|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (596:9): [True: 1, False: 119]
  ------------------
  597|    119|    if (drc_config->drc_instructions_uni_drc_count +
  ------------------
  |  Branch (597:9): [True: 1, False: 118]
  ------------------
  598|    119|            drc_instructions_uni_drc_v1_count >
  599|    119|        DRC_INSTRUCTIONS_COUNT_MAX)
  ------------------
  |  |   43|    119|#define DRC_INSTRUCTIONS_COUNT_MAX (DOWNMIX_INSTRUCTION_COUNT_MAX + 20)
  |  |  ------------------
  |  |  |  |   41|    119|#define DOWNMIX_INSTRUCTION_COUNT_MAX 16
  |  |  ------------------
  ------------------
  600|      1|      return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      1|#define UNEXPECTED_ERROR 2
  ------------------
  601|       |
  602|    305|    for (i = 0; i < drc_instructions_uni_drc_v1_count; i++) {
  ------------------
  |  Branch (602:17): [True: 242, False: 63]
  ------------------
  603|    242|      err = impd_parse_drc_instructions_uni_drc(
  604|    242|          it_bit_buff, version, drc_config,
  605|    242|          &drc_config->str_drc_instruction_str
  606|    242|               [i + drc_config->drc_instructions_uni_drc_count]);
  607|    242|      if (err) return (err);
  ------------------
  |  Branch (607:11): [True: 55, False: 187]
  ------------------
  608|    242|    }
  609|     63|    drc_config->drc_instructions_uni_drc_count +=
  610|     63|        drc_instructions_uni_drc_v1_count;
  611|     63|  }
  612|       |
  613|    323|  str_drc_config_ext->loud_eq_instructions_flag =
  614|    323|      impd_read_bits_buf(it_bit_buff, 1);
  615|    323|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (615:7): [True: 1, False: 322]
  ------------------
  616|    322|  if (str_drc_config_ext->loud_eq_instructions_flag == 1) {
  ------------------
  |  Branch (616:7): [True: 73, False: 249]
  ------------------
  617|     73|    str_drc_config_ext->loud_eq_instructions_count =
  618|     73|        impd_read_bits_buf(it_bit_buff, 4);
  619|       |
  620|     73|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (620:9): [True: 1, False: 72]
  ------------------
  621|     72|    if (str_drc_config_ext->loud_eq_instructions_count >
  ------------------
  |  Branch (621:9): [True: 1, False: 71]
  ------------------
  622|     72|        LOUD_EQ_INSTRUCTIONS_COUNT_MAX)
  ------------------
  |  |  111|     72|#define LOUD_EQ_INSTRUCTIONS_COUNT_MAX 8
  ------------------
  623|      1|      return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      1|#define UNEXPECTED_ERROR 2
  ------------------
  624|    218|    for (i = 0; i < str_drc_config_ext->loud_eq_instructions_count; i++) {
  ------------------
  |  Branch (624:17): [True: 186, False: 32]
  ------------------
  625|    186|      err = impd_parse_loud_eq_instructions(
  626|    186|          it_bit_buff, &str_drc_config_ext->loud_eq_instructions[i]);
  627|    186|      if (err) return (err);
  ------------------
  |  Branch (627:11): [True: 39, False: 147]
  ------------------
  628|    186|    }
  629|    249|  } else {
  630|    249|    str_drc_config_ext->loud_eq_instructions_count = 0;
  631|    249|  }
  632|       |
  633|    281|  str_drc_config_ext->eq_flag = impd_read_bits_buf(it_bit_buff, 1);
  634|    281|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (634:7): [True: 3, False: 278]
  ------------------
  635|    278|  if (str_drc_config_ext->eq_flag == 1) {
  ------------------
  |  Branch (635:7): [True: 160, False: 118]
  ------------------
  636|    160|    err = impd_parse_eq_coefficients(it_bit_buff,
  637|    160|                                     &str_drc_config_ext->str_eq_coeff);
  638|    160|    if (err) return (err);
  ------------------
  |  Branch (638:9): [True: 87, False: 73]
  ------------------
  639|     73|    str_drc_config_ext->eq_instructions_count =
  640|     73|        impd_read_bits_buf(it_bit_buff, 4);
  641|     73|    if (str_drc_config_ext->eq_instructions_count > EQ_INSTRUCTIONS_COUNT_MAX)
  ------------------
  |  |  112|     73|#define EQ_INSTRUCTIONS_COUNT_MAX 8
  ------------------
  |  Branch (641:9): [True: 1, False: 72]
  ------------------
  642|      1|      return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      1|#define UNEXPECTED_ERROR 2
  ------------------
  643|     72|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (643:9): [True: 2, False: 70]
  ------------------
  644|    103|    for (i = 0; i < str_drc_config_ext->eq_instructions_count; i++) {
  ------------------
  |  Branch (644:17): [True: 87, False: 16]
  ------------------
  645|     87|      err = impd_parse_eq_instructions(
  646|     87|          it_bit_buff, drc_config, &str_drc_config_ext->str_eq_instructions[i]);
  647|     87|      if (err) return (err);
  ------------------
  |  Branch (647:11): [True: 54, False: 33]
  ------------------
  648|     87|    }
  649|     70|  }
  650|    134|  return 0;
  651|    278|}
impd_leveling_instructions:
  655|     54|                                         ia_drc_config* pstr_drc_config) {
  656|     54|  WORD32 i;
  657|     54|  IA_ERROR_CODE err = IA_NO_ERROR;
  ------------------
  |  |   24|     54|#define IA_ERROR_CODE WORD32
  ------------------
                IA_ERROR_CODE err = IA_NO_ERROR;
  ------------------
  |  |   25|     54|#define IA_NO_ERROR 0x00000000
  ------------------
  658|     54|  WORD32 drc_instruction_uni_drc_count = pstr_drc_config->drc_instructions_uni_drc_count;
  659|       |
  660|    267|  for (i = 0; i < drc_instruction_uni_drc_count; ++i) {
  ------------------
  |  Branch (660:15): [True: 214, False: 53]
  ------------------
  661|    214|    if ((pstr_drc_config->str_drc_instruction_str[i].drc_set_effect & (1 << 11)) != 0) {
  ------------------
  |  Branch (661:9): [True: 14, False: 200]
  ------------------
  662|     14|      pstr_drc_config->str_drc_instruction_str[i].leveling_present =
  663|     14|          impd_read_bits_buf(it_bit_buff, 1);
  664|       |
  665|     14|      if (pstr_drc_config->str_drc_instruction_str[i].leveling_present) {
  ------------------
  |  Branch (665:11): [True: 6, False: 8]
  ------------------
  666|      6|        WORD32 ducking_only_drc_set_present = impd_read_bits_buf(it_bit_buff, 1);
  667|       |
  668|      6|        if (ducking_only_drc_set_present) {
  ------------------
  |  Branch (668:13): [True: 1, False: 5]
  ------------------
  669|      1|          pstr_drc_config->drc_instructions_uni_drc_count++;
  670|       |
  671|      1|          if (pstr_drc_config->drc_instructions_uni_drc_count > DRC_INSTRUCTIONS_COUNT_MAX) {
  ------------------
  |  |   43|      1|#define DRC_INSTRUCTIONS_COUNT_MAX (DOWNMIX_INSTRUCTION_COUNT_MAX + 20)
  |  |  ------------------
  |  |  |  |   41|      1|#define DOWNMIX_INSTRUCTION_COUNT_MAX 16
  |  |  ------------------
  ------------------
  |  Branch (671:15): [True: 0, False: 1]
  ------------------
  672|      0|            return IA_XHEAAC_DEC_INIT_NONFATAL_MAX_INSTRUCTIONS_ERROR;
  ------------------
  |  |   81|      0|#define IA_XHEAAC_DEC_INIT_NONFATAL_MAX_INSTRUCTIONS_ERROR 0x00001005
  ------------------
  673|      0|          }
  674|       |
  675|      1|          err = impd_parse_drc_instructions_uni_drc(
  676|      1|              it_bit_buff, 1, pstr_drc_config,
  677|      1|              &pstr_drc_config
  678|      1|                   ->str_drc_instruction_str[pstr_drc_config->drc_instructions_uni_drc_count -
  679|      1|                                             1]);
  680|      1|          if (err) return err;
  ------------------
  |  Branch (680:15): [True: 1, False: 0]
  ------------------
  681|      1|        }
  682|      6|      }
  683|     14|    }
  684|    214|  }
  685|     53|  return err;
  686|     54|}
impd_parse_filt_block:
  691|    155|                             WORD32 block_count) {
  692|       |  //    WORD32 err = 0;
  693|    155|  WORD32 k, j, temp;
  694|    155|  ia_filt_ele_struct* str_filter_element;
  695|       |
  696|    294|  for (j = 0; j < block_count; j++) {
  ------------------
  |  Branch (696:15): [True: 149, False: 145]
  ------------------
  697|    149|    str_filter_block->filter_element_count = impd_read_bits_buf(it_bit_buff, 6);
  698|    149|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (698:9): [True: 2, False: 147]
  ------------------
  699|    147|    if (str_filter_block->filter_element_count > FILTER_ELEMENT_COUNT_MAX)
  ------------------
  |  |  107|    147|#define FILTER_ELEMENT_COUNT_MAX 16
  ------------------
  |  Branch (699:9): [True: 1, False: 146]
  ------------------
  700|      1|      return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      1|#define UNEXPECTED_ERROR 2
  ------------------
  701|    146|    str_filter_element = &str_filter_block->str_filter_element[0];
  702|    255|    for (k = 0; k < str_filter_block->filter_element_count; k++) {
  ------------------
  |  Branch (702:17): [True: 116, False: 139]
  ------------------
  703|    116|      temp = impd_read_bits_buf(it_bit_buff, 7);
  704|    116|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (704:11): [True: 2, False: 114]
  ------------------
  705|       |
  706|    114|      str_filter_element->filt_ele_idx = (temp & 0x7E) >> 1;
  707|    114|      if (str_filter_element->filt_ele_idx >= FILTER_ELEMENT_COUNT_MAX)
  ------------------
  |  |  107|    114|#define FILTER_ELEMENT_COUNT_MAX 16
  ------------------
  |  Branch (707:11): [True: 4, False: 110]
  ------------------
  708|      4|        return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      4|#define UNEXPECTED_ERROR 2
  ------------------
  709|    110|      str_filter_element->filt_ele_gain_flag = temp & 1;
  710|    110|      ;
  711|       |
  712|    110|      if (str_filter_element->filt_ele_gain_flag) {
  ------------------
  |  Branch (712:11): [True: 19, False: 91]
  ------------------
  713|     19|        WORD32 bs_filter_element_gain;
  714|     19|        bs_filter_element_gain = impd_read_bits_buf(it_bit_buff, 10);
  715|     19|        if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (715:13): [True: 1, False: 18]
  ------------------
  716|     18|        str_filter_element->filt_ele_gain =
  717|     18|            bs_filter_element_gain * 0.125f - 96.0f;
  718|     18|      }
  719|       |
  720|    109|      str_filter_element++;
  721|    109|    }
  722|    139|    str_filter_block++;
  723|    139|  }
  724|    145|  return (0);
  725|    155|}
impd_parse_unique_td_filt_ele:
  730|    142|    WORD32 td_filter_element_count) {
  731|    142|  WORD32 m, sign, j, temp;
  732|    142|  FLOAT32 tmp;
  733|       |
  734|    352|  for (j = 0; j < td_filter_element_count; j++) {
  ------------------
  |  Branch (734:15): [True: 240, False: 112]
  ------------------
  735|    240|    unique_td_filt_ele->eq_filter_format = impd_read_bits_buf(it_bit_buff, 1);
  736|    240|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (736:9): [True: 1, False: 239]
  ------------------
  737|       |
  738|    239|    if (unique_td_filt_ele->eq_filter_format == 0) {
  ------------------
  |  Branch (738:9): [True: 206, False: 33]
  ------------------
  739|    206|      WORD32 bs_real_zero_radius, bs_generic_zero_radius, bs_generic_zero_angle;
  740|    206|      WORD32 bs_real_pole_radius, bs_cmplx_pole_radius, bs_cmplx_pole_angle;
  741|    206|      WORD32 bs_real_zero_radius_one_count;
  742|       |
  743|    206|      temp = impd_read_bits_buf(it_bit_buff, 23);
  744|    206|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (744:11): [True: 2, False: 204]
  ------------------
  745|       |
  746|    204|      bs_real_zero_radius_one_count = (temp >> 20) & 7;
  747|       |
  748|    204|      unique_td_filt_ele->bs_real_zero_radius_one_count =
  749|    204|          2 * bs_real_zero_radius_one_count;
  750|    204|      unique_td_filt_ele->real_zero_count = (temp & 0xFC000) >> 14;
  751|       |
  752|    204|      unique_td_filt_ele->generic_zero_count = (temp & 0x3F00) >> 8;
  753|       |
  754|    204|      unique_td_filt_ele->real_pole_count = (temp & 0xF0) >> 4;
  755|       |
  756|    204|      unique_td_filt_ele->cmplx_pole_count = temp & 0xF;
  757|       |
  758|    204|      temp = impd_read_bits_buf(
  759|    204|          it_bit_buff, unique_td_filt_ele->bs_real_zero_radius_one_count);
  760|    204|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (760:11): [True: 4, False: 200]
  ------------------
  761|       |
  762|    452|      for (m = unique_td_filt_ele->bs_real_zero_radius_one_count - 1; m >= 0;
  ------------------
  |  Branch (762:71): [True: 252, False: 200]
  ------------------
  763|    252|           m--) {
  764|    252|        unique_td_filt_ele->zero_sign[m] = (temp & 1);
  765|    252|        temp = temp >> 1;
  766|    252|      }
  767|       |
  768|    594|      for (m = 0; m < unique_td_filt_ele->real_zero_count; m++) {
  ------------------
  |  Branch (768:19): [True: 398, False: 196]
  ------------------
  769|    398|        temp = impd_read_bits_buf(it_bit_buff, 8);
  770|    398|        if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (770:13): [True: 4, False: 394]
  ------------------
  771|       |
  772|    394|        bs_real_zero_radius = (temp & 0xFE) >> 1;
  773|       |
  774|    394|        sign = temp & 0x01;
  775|       |
  776|    394|        tmp = 1.0f - zero_pole_radius_tbl[bs_real_zero_radius];
  777|       |
  778|    394|        sign = sign << 1;
  779|       |
  780|    394|        unique_td_filt_ele->real_zero_radius[m] = (1 - sign) * tmp;
  781|    394|      }
  782|    445|      for (m = 0; m < unique_td_filt_ele->generic_zero_count; m++) {
  ------------------
  |  Branch (782:19): [True: 255, False: 190]
  ------------------
  783|    255|        temp = impd_read_bits_buf(it_bit_buff, 14);
  784|    255|        if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (784:13): [True: 6, False: 249]
  ------------------
  785|       |
  786|    249|        bs_generic_zero_radius = (temp & 0x3F80) >> 7;
  787|       |
  788|    249|        unique_td_filt_ele->generic_zero_radius[m] =
  789|    249|            1.0f - zero_pole_radius_tbl[bs_generic_zero_radius];
  790|       |
  791|    249|        bs_generic_zero_angle = (temp & 0x7F);
  792|       |
  793|    249|        unique_td_filt_ele->generic_zero_angle[m] =
  794|    249|            zero_pole_angle_tbl[bs_generic_zero_angle];
  795|    249|      }
  796|    519|      for (m = 0; m < unique_td_filt_ele->real_pole_count; m++) {
  ------------------
  |  Branch (796:19): [True: 332, False: 187]
  ------------------
  797|    332|        temp = impd_read_bits_buf(it_bit_buff, 8);
  798|    332|        if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (798:13): [True: 3, False: 329]
  ------------------
  799|       |
  800|    329|        bs_real_pole_radius = (temp & 0xFE) >> 1;
  801|       |
  802|    329|        sign = temp & 0x01;
  803|       |
  804|    329|        tmp = 1.0f - zero_pole_radius_tbl[bs_real_pole_radius];
  805|       |
  806|    329|        sign = sign << 1;
  807|       |
  808|    329|        unique_td_filt_ele->real_pole_radius[m] = (1 - sign) * tmp;
  809|    329|      }
  810|    373|      for (m = 0; m < unique_td_filt_ele->cmplx_pole_count; m++) {
  ------------------
  |  Branch (810:19): [True: 191, False: 182]
  ------------------
  811|    191|        temp = impd_read_bits_buf(it_bit_buff, 14);
  812|       |
  813|    191|        if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (813:13): [True: 5, False: 186]
  ------------------
  814|       |
  815|    186|        bs_cmplx_pole_radius = (temp & 0x3F80) >> 7;
  816|       |
  817|    186|        unique_td_filt_ele->complex_pole_radius[m] =
  818|    186|            1.0f - zero_pole_radius_tbl[bs_cmplx_pole_radius];
  819|       |
  820|    186|        bs_cmplx_pole_angle = (temp & 0x7F);
  821|       |
  822|    186|        unique_td_filt_ele->complex_pole_angle[m] =
  823|    186|            zero_pole_angle_tbl[bs_cmplx_pole_angle];
  824|    186|      }
  825|    187|    } else {
  826|     33|      temp = impd_read_bits_buf(it_bit_buff, 8);
  827|     33|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (827:11): [True: 1, False: 32]
  ------------------
  828|       |
  829|     32|      unique_td_filt_ele->fir_filt_order = (temp & 0xFE) >> 1;
  830|       |
  831|     32|      unique_td_filt_ele->fir_symmetry = temp & 0x01;
  832|       |
  833|    231|      for (m = 0; m < unique_td_filt_ele->fir_filt_order / 2 + 1; m++) {
  ------------------
  |  Branch (833:19): [True: 203, False: 28]
  ------------------
  834|    203|        WORD32 sign, bs_fir_coeff;
  835|    203|        FLOAT32 tmp;
  836|       |
  837|    203|        temp = impd_read_bits_buf(it_bit_buff, 11);
  838|    203|        if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (838:13): [True: 4, False: 199]
  ------------------
  839|    199|        sign = (temp >> 10) & 0x01;
  840|       |
  841|    199|        bs_fir_coeff = temp & 0x03FF;
  842|       |
  843|    199|        tmp = (FLOAT32)pow(10.0f, -0.05f * bs_fir_coeff * 0.0625f);
  844|       |
  845|    199|        sign = sign << 1;
  846|       |
  847|    199|        unique_td_filt_ele->fir_coeff[m] = (1 - sign) * tmp;
  848|    199|      }
  849|     32|    }
  850|    210|    unique_td_filt_ele++;
  851|    210|  }
  852|    112|  return (0);
  853|    142|}
impd_decode_eq_slope_code:
  856|    136|                                 FLOAT32* eq_slope, WORD32 num_eq_nodes) {
  857|    136|  WORD32 bits = 0;
  858|    136|  WORD32 k;
  859|       |
  860|    970|  for (k = 0; k < num_eq_nodes; k++) {
  ------------------
  |  Branch (860:15): [True: 841, False: 129]
  ------------------
  861|    841|    bits = impd_read_bits_buf(it_bit_buff, 1);
  862|    841|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (862:9): [True: 3, False: 838]
  ------------------
  863|    838|    if (bits == 0x1) {
  ------------------
  |  Branch (863:9): [True: 341, False: 497]
  ------------------
  864|    341|      *eq_slope = 0.0f;
  865|    497|    } else {
  866|    497|      bits = impd_read_bits_buf(it_bit_buff, 4);
  867|    497|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (867:11): [True: 4, False: 493]
  ------------------
  868|    493|      *eq_slope = eq_slope_tbl[bits];
  869|    493|    }
  870|    834|    eq_slope++;
  871|    834|  }
  872|    129|  return (0);
  873|    136|}
impd_decode_gain_initial_code:
  877|    126|                              FLOAT32* eq_gain_initial) {
  878|    126|  WORD32 bits, bits1;
  879|       |
  880|    126|  bits1 = impd_read_bits_buf(it_bit_buff, 2);
  881|    126|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (881:7): [True: 2, False: 124]
  ------------------
  882|       |
  883|    124|  switch (bits1) {
  884|     56|    case 0x0:
  ------------------
  |  Branch (884:5): [True: 56, False: 68]
  ------------------
  885|     56|      bits = impd_read_bits_buf(it_bit_buff, 5);
  886|     56|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (886:11): [True: 1, False: 55]
  ------------------
  887|     55|      *eq_gain_initial = 0.5f * bits - 8.0f;
  888|     55|      break;
  889|     17|    case 0x1:
  ------------------
  |  Branch (889:5): [True: 17, False: 107]
  ------------------
  890|     48|    case 0x2:
  ------------------
  |  Branch (890:5): [True: 31, False: 93]
  ------------------
  891|       |
  892|     48|      bits = impd_read_bits_buf(it_bit_buff, 4);
  893|     48|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (893:11): [True: 2, False: 46]
  ------------------
  894|     46|      if (bits < 8) {
  ------------------
  |  Branch (894:11): [True: 32, False: 14]
  ------------------
  895|     32|        *eq_gain_initial = bits1 * bits - bits1 * 16.0f;
  896|     32|      } else {
  897|     14|        *eq_gain_initial = (FLOAT32)bits1 * bits;
  898|     14|      }
  899|     46|      break;
  900|       |
  901|     20|    case 0x3:
  ------------------
  |  Branch (901:5): [True: 20, False: 104]
  ------------------
  902|     20|      bits = impd_read_bits_buf(it_bit_buff, 3);
  903|     20|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (903:11): [True: 1, False: 19]
  ------------------
  904|     19|      *eq_gain_initial = 4.0f * bits - 64.0f;
  905|     19|      break;
  906|       |
  907|      0|    default:
  ------------------
  |  Branch (907:5): [True: 0, False: 124]
  ------------------
  908|      0|      break;
  909|    124|  }
  910|    120|  return (0);
  911|    124|}
impd_parse_eq_subband_gain_spline:
  916|     26|    WORD32 eq_subband_gains_count) {
  917|     26|  WORD32 err = 0, eq_nodes_cnt, j, k, bits, *eq_freq_delta;
  918|     26|  FLOAT32* peq_gain_delta;
  919|       |
  920|    141|  for (j = 0; j < eq_subband_gains_count; j++) {
  ------------------
  |  Branch (920:15): [True: 139, False: 2]
  ------------------
  921|    139|    eq_nodes_cnt = impd_read_bits_buf(it_bit_buff, 5);
  922|    139|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (922:9): [True: 3, False: 136]
  ------------------
  923|       |
  924|    136|    str_eq_subband_gain_spline->num_eq_nodes = eq_nodes_cnt + 2;
  925|       |
  926|    136|    err = impd_decode_eq_slope_code(it_bit_buff,
  927|    136|                                    &(str_eq_subband_gain_spline->eq_slope[0]),
  928|    136|                                    str_eq_subband_gain_spline->num_eq_nodes);
  929|    136|    if (err) return (err);
  ------------------
  |  Branch (929:9): [True: 7, False: 129]
  ------------------
  930|       |
  931|    129|    eq_freq_delta = &(str_eq_subband_gain_spline->eq_freq_delta[1]);
  932|    710|    for (k = 1; k < str_eq_subband_gain_spline->num_eq_nodes; k++) {
  ------------------
  |  Branch (932:17): [True: 584, False: 126]
  ------------------
  933|    584|      bits = impd_read_bits_buf(it_bit_buff, 4);
  934|    584|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (934:11): [True: 3, False: 581]
  ------------------
  935|    581|      *eq_freq_delta = bits + 1;
  936|    581|      eq_freq_delta++;
  937|    581|    }
  938|       |
  939|    126|    err = impd_decode_gain_initial_code(
  940|    126|        it_bit_buff, &(str_eq_subband_gain_spline->eq_gain_initial));
  941|    126|    if (err) return (err);
  ------------------
  |  Branch (941:9): [True: 6, False: 120]
  ------------------
  942|       |
  943|    120|    peq_gain_delta = &(str_eq_subband_gain_spline->eq_gain_delta[1]);
  944|    630|    for (k = 1; k < str_eq_subband_gain_spline->num_eq_nodes; k++) {
  ------------------
  |  Branch (944:17): [True: 515, False: 115]
  ------------------
  945|    515|      bits = impd_read_bits_buf(it_bit_buff, 5);
  946|    515|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (946:11): [True: 5, False: 510]
  ------------------
  947|       |
  948|    510|      *peq_gain_delta = eq_gain_delta_tbl[bits];
  949|    510|      peq_gain_delta++;
  950|    510|    }
  951|    115|    str_eq_subband_gain_spline++;
  952|    115|  }
  953|      2|  return (0);
  954|     26|}
impd_parse_eq_subband_gain_vector:
  959|     15|    WORD32 eq_subband_gains_count) {
  960|     15|  WORD32 m, k, temp;
  961|       |
  962|     58|  for (k = 0; k < eq_subband_gains_count; k++) {
  ------------------
  |  Branch (962:15): [True: 52, False: 6]
  ------------------
  963|    169|    for (m = 0; m < eq_subband_gain_count; m++) {
  ------------------
  |  Branch (963:17): [True: 126, False: 43]
  ------------------
  964|    126|      WORD32 sign, bs_eq_subband_gain;
  965|    126|      temp = impd_read_bits_buf(it_bit_buff, 9);
  966|    126|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (966:11): [True: 9, False: 117]
  ------------------
  967|       |
  968|    117|      sign = (temp >> 8) & 1;
  969|    117|      bs_eq_subband_gain = temp & 0x7F;
  970|       |
  971|    117|      sign = sign << 1;
  972|    117|      str_eq_subband_gain_vector->eq_subband_gain[m] =
  973|    117|          ((1 - sign) * bs_eq_subband_gain) * 0.125f;
  974|    117|    }
  975|     43|    str_eq_subband_gain_vector++;
  976|     43|  }
  977|      6|  return (0);
  978|     15|}
impd_parse_eq_coefficients:
  981|    160|                                  ia_eq_coeff_struct* str_eq_coeff) {
  982|    160|  WORD32 err = 0;
  983|    160|  WORD32 eq_gain_cnt, mu, nu, temp;
  984|    160|  static const WORD32 subband_gain_len_tbl[7] = {0, 32, 39, 64, 71, 128, 135};
  985|       |
  986|    160|  str_eq_coeff->eq_delay_max_present = impd_read_bits_buf(it_bit_buff, 1);
  987|    160|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (987:7): [True: 1, False: 159]
  ------------------
  988|       |
  989|    159|  if (str_eq_coeff->eq_delay_max_present) {
  ------------------
  |  Branch (989:7): [True: 138, False: 21]
  ------------------
  990|    138|    mu = impd_read_bits_buf(it_bit_buff, 5);
  991|    138|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (991:9): [True: 1, False: 137]
  ------------------
  992|    137|    nu = impd_read_bits_buf(it_bit_buff, 3);
  993|    137|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (993:9): [True: 1, False: 136]
  ------------------
  994|    136|    str_eq_coeff->eq_delay_max = 16 * mu * (1 << nu);
  995|    136|  }
  996|       |
  997|    157|  str_eq_coeff->unique_filter_block_count = impd_read_bits_buf(it_bit_buff, 6);
  998|    157|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (998:7): [True: 1, False: 156]
  ------------------
  999|       |
 1000|    156|  if (str_eq_coeff->unique_filter_block_count > FILTER_BLOCK_COUNT_MAX) {
  ------------------
  |  |  106|    156|#define FILTER_BLOCK_COUNT_MAX 16
  ------------------
  |  Branch (1000:7): [True: 1, False: 155]
  ------------------
 1001|      1|    return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      1|#define UNEXPECTED_ERROR 2
  ------------------
 1002|      1|  }
 1003|       |
 1004|    155|  err = impd_parse_filt_block(it_bit_buff, &(str_eq_coeff->str_filter_block[0]),
 1005|    155|                              str_eq_coeff->unique_filter_block_count);
 1006|    155|  if (err) return (err);
  ------------------
  |  Branch (1006:7): [True: 10, False: 145]
  ------------------
 1007|       |
 1008|    145|  str_eq_coeff->unique_td_filter_element_count =
 1009|    145|      impd_read_bits_buf(it_bit_buff, 6);
 1010|    145|  if (str_eq_coeff->unique_td_filter_element_count > FILTER_ELEMENT_COUNT_MAX)
  ------------------
  |  |  107|    145|#define FILTER_ELEMENT_COUNT_MAX 16
  ------------------
  |  Branch (1010:7): [True: 1, False: 144]
  ------------------
 1011|      1|    return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      1|#define UNEXPECTED_ERROR 2
  ------------------
 1012|    144|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1012:7): [True: 2, False: 142]
  ------------------
 1013|       |
 1014|    142|  err = impd_parse_unique_td_filt_ele(
 1015|    142|      it_bit_buff, &(str_eq_coeff->unique_td_filt_ele[0]),
 1016|    142|      str_eq_coeff->unique_td_filter_element_count);
 1017|    142|  if (err) return (err);
  ------------------
  |  Branch (1017:7): [True: 30, False: 112]
  ------------------
 1018|       |
 1019|    112|  str_eq_coeff->unique_eq_subband_gains_count =
 1020|    112|      impd_read_bits_buf(it_bit_buff, 6);
 1021|    112|  if (str_eq_coeff->unique_eq_subband_gains_count >
  ------------------
  |  Branch (1021:7): [True: 2, False: 110]
  ------------------
 1022|    112|      UNIQUE_SUBBAND_GAIN_COUNT_MAX)
  ------------------
  |  |  105|    112|#define UNIQUE_SUBBAND_GAIN_COUNT_MAX 16
  ------------------
 1023|      2|    return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      2|#define UNEXPECTED_ERROR 2
  ------------------
 1024|    110|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1024:7): [True: 1, False: 109]
  ------------------
 1025|       |
 1026|    109|  if (str_eq_coeff->unique_eq_subband_gains_count > 0) {
  ------------------
  |  Branch (1026:7): [True: 44, False: 65]
  ------------------
 1027|     44|    temp = impd_read_bits_buf(it_bit_buff, 5);
 1028|     44|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1028:9): [True: 1, False: 43]
  ------------------
 1029|     43|    str_eq_coeff->eq_subband_gain_representation = (temp >> 4) & 0x01;
 1030|       |
 1031|     43|    str_eq_coeff->eq_subband_gain_format = temp & 0x0F;
 1032|     43|    if ((str_eq_coeff->eq_subband_gain_format > 0) &&
  ------------------
  |  Branch (1032:9): [True: 37, False: 6]
  ------------------
 1033|     37|        (str_eq_coeff->eq_subband_gain_format < GAINFORMAT_UNIFORM)) {
  ------------------
  |  |  141|     37|#define GAINFORMAT_UNIFORM 0x7
  ------------------
  |  Branch (1033:9): [True: 19, False: 18]
  ------------------
 1034|     19|      str_eq_coeff->eq_subband_gain_count =
 1035|     19|          subband_gain_len_tbl[str_eq_coeff->eq_subband_gain_format];
 1036|     24|    } else {
 1037|       |      /* Gain format 0 or any value between 7 to 15 is considered as default
 1038|       |       * case */
 1039|     24|      eq_gain_cnt = impd_read_bits_buf(it_bit_buff, 8);
 1040|       |
 1041|     24|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1041:11): [True: 1, False: 23]
  ------------------
 1042|     23|      str_eq_coeff->eq_subband_gain_count = eq_gain_cnt + 1;
 1043|       |
 1044|     23|      if (str_eq_coeff->eq_subband_gain_count > EQ_SUBBAND_GAIN_COUNT_MAX)
  ------------------
  |  |  104|     23|#define EQ_SUBBAND_GAIN_COUNT_MAX 135
  ------------------
  |  Branch (1044:11): [True: 1, False: 22]
  ------------------
 1045|      1|        return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      1|#define UNEXPECTED_ERROR 2
  ------------------
 1046|       |
 1047|     23|    }
 1048|       |
 1049|     41|    if (str_eq_coeff->eq_subband_gain_representation == 1) {
  ------------------
  |  Branch (1049:9): [True: 26, False: 15]
  ------------------
 1050|     26|      err = impd_parse_eq_subband_gain_spline(
 1051|     26|          it_bit_buff, &(str_eq_coeff->str_eq_subband_gain_spline[0]),
 1052|     26|          str_eq_coeff->unique_eq_subband_gains_count);
 1053|     26|      if (err) return (err);
  ------------------
  |  Branch (1053:11): [True: 24, False: 2]
  ------------------
 1054|     26|    } else {
 1055|     15|      err = impd_parse_eq_subband_gain_vector(
 1056|     15|          it_bit_buff, str_eq_coeff->eq_subband_gain_count,
 1057|     15|          &(str_eq_coeff->str_eq_subband_gain_vector[0]),
 1058|     15|          str_eq_coeff->unique_eq_subband_gains_count);
 1059|     15|      if (err) return (err);
  ------------------
  |  Branch (1059:11): [True: 9, False: 6]
  ------------------
 1060|     15|    }
 1061|     41|  }
 1062|       |
 1063|     73|  return (0);
 1064|    109|}
impd_parser_td_filter_cascade:
 1069|     25|    ia_td_filter_cascade_struct* str_td_filter_cascade) {
 1070|       |  // WORD32 err=0,
 1071|     25|  WORD32 i, ii, k;
 1072|     25|  WORD32 eq_cascade_gain;
 1073|     25|  ia_filter_block_refs_struct* str_filter_block_refs =
 1074|     25|      &(str_td_filter_cascade->str_filter_block_refs[0]);
 1075|       |
 1076|     77|  for (i = 0; i < str_eq_instructions->eq_ch_group_count; i++) {
  ------------------
  |  Branch (1076:15): [True: 57, False: 20]
  ------------------
 1077|     57|    str_td_filter_cascade->eq_cascade_gain_present[i] =
 1078|     57|        impd_read_bits_buf(it_bit_buff, 1);
 1079|     57|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1079:9): [True: 1, False: 56]
  ------------------
 1080|     56|    if (str_td_filter_cascade->eq_cascade_gain_present[i]) {
  ------------------
  |  Branch (1080:9): [True: 36, False: 20]
  ------------------
 1081|     36|      eq_cascade_gain = impd_read_bits_buf(it_bit_buff, 10);
 1082|     36|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1082:11): [True: 1, False: 35]
  ------------------
 1083|     35|      str_td_filter_cascade->eq_cascade_gain[i] =
 1084|     35|          0.125f * eq_cascade_gain - 96.0f;
 1085|     35|    } else {
 1086|     20|      str_td_filter_cascade->eq_cascade_gain[i] = 0.0f;
 1087|     20|    }
 1088|       |
 1089|     55|    str_filter_block_refs->filter_block_count =
 1090|     55|        impd_read_bits_buf(it_bit_buff, 4);
 1091|     55|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1091:9): [True: 0, False: 55]
  ------------------
 1092|     55|    if (str_filter_block_refs->filter_block_count > EQ_FILTER_BLOCK_COUNT_MAX) {
  ------------------
  |  |  110|     55|#define EQ_FILTER_BLOCK_COUNT_MAX 4
  ------------------
  |  Branch (1092:9): [True: 1, False: 54]
  ------------------
 1093|      1|      return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      1|#define UNEXPECTED_ERROR 2
  ------------------
 1094|      1|    }
 1095|       |
 1096|    118|    for (ii = 0; ii < str_filter_block_refs->filter_block_count; ii++) {
  ------------------
  |  Branch (1096:18): [True: 66, False: 52]
  ------------------
 1097|     66|      str_filter_block_refs->filter_block_index[ii] =
 1098|     66|          impd_read_bits_buf(it_bit_buff, 7);
 1099|     66|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1099:11): [True: 1, False: 65]
  ------------------
 1100|     65|      if (str_filter_block_refs->filter_block_index[ii] >=
  ------------------
  |  Branch (1100:11): [True: 1, False: 64]
  ------------------
 1101|     65|          FILTER_BLOCK_COUNT_MAX)
  ------------------
  |  |  106|     65|#define FILTER_BLOCK_COUNT_MAX 16
  ------------------
 1102|      1|        return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      1|#define UNEXPECTED_ERROR 2
  ------------------
 1103|     65|    }
 1104|     52|    str_filter_block_refs++;
 1105|     52|  }
 1106|       |
 1107|     20|  str_td_filter_cascade->eq_phase_alignment_present =
 1108|     20|      impd_read_bits_buf(it_bit_buff, 1);
 1109|     20|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1109:7): [True: 2, False: 18]
  ------------------
 1110|       |
 1111|     18|  if (str_td_filter_cascade->eq_phase_alignment_present) {
  ------------------
  |  Branch (1111:7): [True: 3, False: 15]
  ------------------
 1112|     10|    for (i = 0; i < str_eq_instructions->eq_ch_group_count; i++) {
  ------------------
  |  Branch (1112:17): [True: 8, False: 2]
  ------------------
 1113|     18|      for (k = i + 1; k < str_eq_instructions->eq_ch_group_count; k++) {
  ------------------
  |  Branch (1113:23): [True: 11, False: 7]
  ------------------
 1114|     11|        str_td_filter_cascade->eq_phase_alignment[i][k] =
 1115|     11|            impd_read_bits_buf(it_bit_buff, 1);
 1116|     11|        if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1116:13): [True: 1, False: 10]
  ------------------
 1117|     11|      }
 1118|      8|    }
 1119|       |
 1120|     15|  } else {
 1121|     51|    for (i = 0; i < str_eq_instructions->eq_ch_group_count; i++) {
  ------------------
  |  Branch (1121:17): [True: 36, False: 15]
  ------------------
 1122|     67|      for (k = i + 1; k < str_eq_instructions->eq_ch_group_count; k++)
  ------------------
  |  Branch (1122:23): [True: 31, False: 36]
  ------------------
 1123|     31|        str_td_filter_cascade->eq_phase_alignment[i][k] = 1;
 1124|     36|    }
 1125|     15|  }
 1126|       |
 1127|     17|  return (0);
 1128|     18|}
impd_parse_eq_instructions:
 1132|     87|    ia_eq_instructions_struct* str_eq_instructions) {
 1133|     87|  WORD32 i, channel_count, temp;
 1134|     87|  WORD32 dmix_id_present, additional_dmix_id_present,
 1135|     87|      additional_dmix_id_cnt = 0;
 1136|     87|  WORD32 additional_drc_set_id_present, additional_drc_set_id_cnt;
 1137|       |
 1138|     87|  temp = impd_read_bits_buf(it_bit_buff, 11);
 1139|     87|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1139:7): [True: 1, False: 86]
  ------------------
 1140|       |
 1141|     86|  str_eq_instructions->eq_set_id = (temp >> 5) & 0x3F;
 1142|       |
 1143|     86|  if (str_eq_instructions->eq_set_id >= EQ_INSTRUCTIONS_COUNT_MAX)
  ------------------
  |  |  112|     86|#define EQ_INSTRUCTIONS_COUNT_MAX 8
  ------------------
  |  Branch (1143:7): [True: 2, False: 84]
  ------------------
 1144|      2|    return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      2|#define UNEXPECTED_ERROR 2
  ------------------
 1145|       |
 1146|     84|  str_eq_instructions->eq_set_complexity_level = (temp >> 1) & 0x0F;
 1147|       |
 1148|     84|  dmix_id_present = temp & 0x01;
 1149|       |
 1150|     84|  if (dmix_id_present) {
  ------------------
  |  Branch (1150:7): [True: 28, False: 56]
  ------------------
 1151|     28|    temp = impd_read_bits_buf(it_bit_buff, 9);
 1152|     28|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1152:9): [True: 1, False: 27]
  ------------------
 1153|       |
 1154|     27|    str_eq_instructions->downmix_id[0] = (temp >> 2) & 0x7F;
 1155|       |
 1156|     27|    str_eq_instructions->eq_apply_to_downmix = (temp >> 1) & 0x01;
 1157|       |
 1158|     27|    additional_dmix_id_present = temp & 0x01;
 1159|       |
 1160|     27|    if (additional_dmix_id_present) {
  ------------------
  |  Branch (1160:9): [True: 10, False: 17]
  ------------------
 1161|     10|      additional_dmix_id_cnt = impd_read_bits_buf(it_bit_buff, 7);
 1162|     10|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1162:11): [True: 0, False: 10]
  ------------------
 1163|       |
 1164|     10|      if (additional_dmix_id_cnt >= DOWNMIX_ID_COUNT_MAX)
  ------------------
  |  |   51|     10|#define DOWNMIX_ID_COUNT_MAX 8
  ------------------
  |  Branch (1164:11): [True: 1, False: 9]
  ------------------
 1165|      1|        return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      1|#define UNEXPECTED_ERROR 2
  ------------------
 1166|       |
 1167|     43|      for (i = 1; i < additional_dmix_id_cnt + 1; i++) {
  ------------------
  |  Branch (1167:19): [True: 36, False: 7]
  ------------------
 1168|     36|        str_eq_instructions->downmix_id[i] = impd_read_bits_buf(it_bit_buff, 7);
 1169|     36|        if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1169:13): [True: 2, False: 34]
  ------------------
 1170|     36|      }
 1171|      9|    }
 1172|     56|  } else {
 1173|     56|    str_eq_instructions->downmix_id[0] = 0;
 1174|     56|  }
 1175|       |
 1176|     80|  str_eq_instructions->dwnmix_id_count = 1 + additional_dmix_id_cnt;
 1177|       |
 1178|     80|  temp = impd_read_bits_buf(it_bit_buff, 7);
 1179|     80|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1179:7): [True: 3, False: 77]
  ------------------
 1180|       |
 1181|     77|  str_eq_instructions->drc_set_id[0] = (temp >> 1) & 0x3F;
 1182|       |
 1183|     77|  additional_drc_set_id_present = temp & 0x01;
 1184|       |
 1185|     77|  if (additional_drc_set_id_present) {
  ------------------
  |  Branch (1185:7): [True: 18, False: 59]
  ------------------
 1186|     18|    additional_drc_set_id_cnt = impd_read_bits_buf(it_bit_buff, 6);
 1187|     18|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1187:9): [True: 1, False: 17]
  ------------------
 1188|     17|    if (additional_drc_set_id_cnt >= DRC_SET_ID_COUNT_MAX)
  ------------------
  |  |   93|     17|#define DRC_SET_ID_COUNT_MAX 16
  ------------------
  |  Branch (1188:9): [True: 1, False: 16]
  ------------------
 1189|      1|      return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      1|#define UNEXPECTED_ERROR 2
  ------------------
 1190|       |
 1191|     53|    for (i = 1; i < additional_drc_set_id_cnt + 1; i++) {
  ------------------
  |  Branch (1191:17): [True: 39, False: 14]
  ------------------
 1192|     39|      str_eq_instructions->drc_set_id[i] = impd_read_bits_buf(it_bit_buff, 6);
 1193|     39|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1193:11): [True: 2, False: 37]
  ------------------
 1194|     39|    }
 1195|     59|  } else {
 1196|     59|    additional_drc_set_id_cnt = 0;
 1197|     59|  }
 1198|     73|  str_eq_instructions->drc_set_id_count = 1 + additional_drc_set_id_cnt;
 1199|       |
 1200|     73|  temp = impd_read_bits_buf(it_bit_buff, 17);
 1201|     73|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1201:7): [True: 2, False: 71]
  ------------------
 1202|       |
 1203|     71|  str_eq_instructions->eq_set_purpose = (temp >> 1) & 0xFFFF;
 1204|       |
 1205|     71|  str_eq_instructions->depends_on_eq_set_present = temp & 0x01;
 1206|       |
 1207|     71|  if (str_eq_instructions->depends_on_eq_set_present) {
  ------------------
  |  Branch (1207:7): [True: 27, False: 44]
  ------------------
 1208|     27|    str_eq_instructions->depends_on_eq_set = impd_read_bits_buf(it_bit_buff, 6);
 1209|     27|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1209:9): [True: 1, False: 26]
  ------------------
 1210|     44|  } else {
 1211|     44|    str_eq_instructions->no_independent_eq_use =
 1212|     44|        impd_read_bits_buf(it_bit_buff, 1);
 1213|     44|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1213:9): [True: 6, False: 38]
  ------------------
 1214|     44|  }
 1215|       |
 1216|     64|  str_eq_instructions->eq_channel_count = channel_count =
 1217|     64|      drc_config->channel_layout.base_channel_count;
 1218|       |
 1219|     64|  if ((dmix_id_present == 1) &&
  ------------------
  |  Branch (1219:7): [True: 17, False: 47]
  ------------------
 1220|     17|      (str_eq_instructions->eq_apply_to_downmix == 1) &&
  ------------------
  |  Branch (1220:7): [True: 5, False: 12]
  ------------------
 1221|      5|      (str_eq_instructions->downmix_id[0] != 0) &&
  ------------------
  |  Branch (1221:7): [True: 4, False: 1]
  ------------------
 1222|      4|      (str_eq_instructions->downmix_id[0] != ID_FOR_ANY_DOWNMIX) &&
  ------------------
  |  |  136|      4|#define ID_FOR_ANY_DOWNMIX 0x7F
  ------------------
  |  Branch (1222:7): [True: 4, False: 0]
  ------------------
 1223|      4|      (str_eq_instructions->dwnmix_id_count == 1)) {
  ------------------
  |  Branch (1223:7): [True: 1, False: 3]
  ------------------
 1224|      1|    for (i = 0; i < drc_config->dwnmix_instructions_count; i++) {
  ------------------
  |  Branch (1224:17): [True: 0, False: 1]
  ------------------
 1225|      0|      if (str_eq_instructions->downmix_id[0] ==
  ------------------
  |  Branch (1225:11): [True: 0, False: 0]
  ------------------
 1226|      0|          drc_config->dwnmix_instructions[i].downmix_id)
 1227|      0|        break;
 1228|      0|    }
 1229|      1|    if (i == drc_config->dwnmix_instructions_count) {
  ------------------
  |  Branch (1229:9): [True: 1, False: 0]
  ------------------
 1230|      1|      return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      1|#define UNEXPECTED_ERROR 2
  ------------------
 1231|      1|    }
 1232|       |
 1233|      0|    str_eq_instructions->eq_channel_count = channel_count =
 1234|      0|        drc_config->dwnmix_instructions[i].target_channel_count;
 1235|     63|  } else if ((str_eq_instructions->downmix_id[0] == ID_FOR_ANY_DOWNMIX) ||
  ------------------
  |  |  136|     63|#define ID_FOR_ANY_DOWNMIX 0x7F
  ------------------
  |  Branch (1235:14): [True: 2, False: 61]
  ------------------
 1236|     61|             (str_eq_instructions->dwnmix_id_count > 1)) {
  ------------------
  |  Branch (1236:14): [True: 3, False: 58]
  ------------------
 1237|      5|    channel_count = 1;
 1238|      5|  }
 1239|       |
 1240|     63|  str_eq_instructions->eq_ch_group_count = 0;
 1241|       |
 1242|    307|  for (i = 0; i < channel_count; i++) {
  ------------------
  |  Branch (1242:15): [True: 256, False: 51]
  ------------------
 1243|    256|    WORD32 tmp = impd_read_bits_buf(it_bit_buff, 7);
 1244|    256|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1244:9): [True: 4, False: 252]
  ------------------
 1245|    252|    if (tmp >= EQ_CHANNEL_GROUP_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |  109|    252|#define EQ_CHANNEL_GROUP_COUNT_MAX 4
  ------------------
                  if (tmp >= EQ_CHANNEL_GROUP_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      8|#define UNEXPECTED_ERROR 2
  ------------------
  |  Branch (1245:9): [True: 8, False: 244]
  ------------------
 1246|    244|    str_eq_instructions->eq_ch_group_of_channel[i] = tmp;
 1247|    244|  }
 1248|     51|  {
 1249|     51|    WORD32 total;
 1250|     51|    WORD32 groups_used[EQ_CHANNEL_GROUP_COUNT_MAX] = {0};
 1251|    271|    for (i = 0; i < channel_count; i++)
  ------------------
  |  Branch (1251:17): [True: 220, False: 51]
  ------------------
 1252|    220|      groups_used[str_eq_instructions->eq_ch_group_of_channel[i]] = 1;
 1253|     51|    total = 0;
 1254|    255|    for (i = 0; i < EQ_CHANNEL_GROUP_COUNT_MAX; i++)
  ------------------
  |  |  109|    255|#define EQ_CHANNEL_GROUP_COUNT_MAX 4
  ------------------
  |  Branch (1254:17): [True: 204, False: 51]
  ------------------
 1255|    204|      if (groups_used[i]) total++;
  ------------------
  |  Branch (1255:11): [True: 95, False: 109]
  ------------------
 1256|     51|    str_eq_instructions->eq_ch_group_count = total;
 1257|     51|  }
 1258|       |
 1259|     51|  if (str_eq_instructions->eq_ch_group_count > EQ_CHANNEL_GROUP_COUNT_MAX)
  ------------------
  |  |  109|     51|#define EQ_CHANNEL_GROUP_COUNT_MAX 4
  ------------------
  |  Branch (1259:7): [True: 0, False: 51]
  ------------------
 1260|      0|    return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
 1261|       |
 1262|     51|  str_eq_instructions->td_filter_cascade_present =
 1263|     51|      impd_read_bits_buf(it_bit_buff, 1);
 1264|     51|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1264:7): [True: 3, False: 48]
  ------------------
 1265|       |
 1266|     48|  if (str_eq_instructions->td_filter_cascade_present) {
  ------------------
  |  Branch (1266:7): [True: 25, False: 23]
  ------------------
 1267|     25|    WORD32 err = impd_parser_td_filter_cascade(
 1268|     25|        it_bit_buff, str_eq_instructions,
 1269|     25|        &(str_eq_instructions->str_td_filter_cascade));
 1270|     25|    if (err) return err;
  ------------------
  |  Branch (1270:9): [True: 8, False: 17]
  ------------------
 1271|     25|  }
 1272|       |
 1273|     40|  str_eq_instructions->subband_gains_present =
 1274|     40|      impd_read_bits_buf(it_bit_buff, 1);
 1275|     40|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1275:7): [True: 0, False: 40]
  ------------------
 1276|       |
 1277|     40|  if (str_eq_instructions->subband_gains_present) {
  ------------------
  |  Branch (1277:7): [True: 7, False: 33]
  ------------------
 1278|     14|    for (i = 0; i < str_eq_instructions->eq_ch_group_count; i++) {
  ------------------
  |  Branch (1278:17): [True: 12, False: 2]
  ------------------
 1279|     12|      WORD32 tmp = impd_read_bits_buf(it_bit_buff, 6);
 1280|     12|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1280:11): [True: 1, False: 11]
  ------------------
 1281|     11|      if (tmp >= UNIQUE_SUBBAND_GAIN_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |  105|     11|#define UNIQUE_SUBBAND_GAIN_COUNT_MAX 16
  ------------------
                    if (tmp >= UNIQUE_SUBBAND_GAIN_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      4|#define UNEXPECTED_ERROR 2
  ------------------
  |  Branch (1281:11): [True: 4, False: 7]
  ------------------
 1282|      7|      str_eq_instructions->subband_gains_index[i] = tmp;
 1283|      7|    }
 1284|      7|  }
 1285|       |
 1286|     35|  str_eq_instructions->eq_transition_duration_present =
 1287|     35|      impd_read_bits_buf(it_bit_buff, 1);
 1288|     35|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1288:7): [True: 1, False: 34]
  ------------------
 1289|       |
 1290|     34|  if (str_eq_instructions->eq_transition_duration_present) {
  ------------------
  |  Branch (1290:7): [True: 5, False: 29]
  ------------------
 1291|      5|    WORD32 bs_eq_transition_duration;
 1292|      5|    bs_eq_transition_duration = impd_read_bits_buf(it_bit_buff, 5);
 1293|      5|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1293:9): [True: 1, False: 4]
  ------------------
 1294|       |
 1295|      4|    str_eq_instructions->eq_transition_duration = (WORD32)(
 1296|      4|        0.001f *
 1297|      4|        (FLOAT32)pow(2.0f, 2.0f + bs_eq_transition_duration * 0.0625f));
 1298|      4|  }
 1299|     33|  return (0);
 1300|     34|}
impd_parse_loud_eq_instructions:
 1304|    186|    ia_loud_eq_instructions_struct* loud_eq_instructions) {
 1305|    186|  WORD32 i, bs_loud_eq_scaling, bs_loud_eq_offset, temp;
 1306|    186|  WORD32 dmix_id_present, additional_dmix_id_present,
 1307|    186|      additional_dmix_id_cnt = 0;
 1308|    186|  WORD32 drc_set_id_present, additional_drc_set_id_present,
 1309|    186|      additional_drc_set_id_cnt = 0;
 1310|    186|  WORD32 eq_set_id_present, additional_eq_set_id_present,
 1311|    186|      additional_eq_set_id_cnt = 0;
 1312|       |
 1313|    186|  temp = impd_read_bits_buf(it_bit_buff, 9);
 1314|    186|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1314:7): [True: 4, False: 182]
  ------------------
 1315|    182|  loud_eq_instructions->loud_eq_set_id = (temp >> 5) & 0x0F;
 1316|       |
 1317|    182|  loud_eq_instructions->drc_location = (temp >> 1) & 0x0F;
 1318|       |
 1319|    182|  dmix_id_present = temp & 0x01;
 1320|       |
 1321|    182|  if (dmix_id_present) {
  ------------------
  |  Branch (1321:7): [True: 81, False: 101]
  ------------------
 1322|     81|    temp = impd_read_bits_buf(it_bit_buff, 8);
 1323|     81|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1323:9): [True: 1, False: 80]
  ------------------
 1324|       |
 1325|     80|    loud_eq_instructions->downmix_id[0] = (temp >> 1) & 0x7F;
 1326|       |
 1327|     80|    additional_dmix_id_present = temp & 0x01;
 1328|       |
 1329|     80|    if (additional_dmix_id_present) {
  ------------------
  |  Branch (1329:9): [True: 33, False: 47]
  ------------------
 1330|     33|      additional_dmix_id_cnt = impd_read_bits_buf(it_bit_buff, 7);
 1331|     33|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1331:11): [True: 1, False: 32]
  ------------------
 1332|     32|      if (additional_dmix_id_cnt >= DOWNMIX_ID_COUNT_MAX)
  ------------------
  |  |   51|     32|#define DOWNMIX_ID_COUNT_MAX 8
  ------------------
  |  Branch (1332:11): [True: 1, False: 31]
  ------------------
 1333|      1|        return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      1|#define UNEXPECTED_ERROR 2
  ------------------
 1334|     47|      for (i = 1; i < additional_dmix_id_cnt + 1; i++) {
  ------------------
  |  Branch (1334:19): [True: 18, False: 29]
  ------------------
 1335|     18|        loud_eq_instructions->downmix_id[i] =
 1336|     18|            impd_read_bits_buf(it_bit_buff, 7);
 1337|     18|        if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1337:13): [True: 2, False: 16]
  ------------------
 1338|     18|      }
 1339|     31|    }
 1340|    101|  } else {
 1341|    101|    loud_eq_instructions->downmix_id[0] = 0;
 1342|    101|  }
 1343|       |
 1344|    177|  loud_eq_instructions->dwnmix_id_count = 1 + additional_dmix_id_cnt;
 1345|       |
 1346|    177|  drc_set_id_present = impd_read_bits_buf(it_bit_buff, 1);
 1347|    177|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1347:7): [True: 1, False: 176]
  ------------------
 1348|       |
 1349|    176|  if (drc_set_id_present) {
  ------------------
  |  Branch (1349:7): [True: 73, False: 103]
  ------------------
 1350|     73|    temp = impd_read_bits_buf(it_bit_buff, 7);
 1351|     73|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1351:9): [True: 1, False: 72]
  ------------------
 1352|       |
 1353|     72|    loud_eq_instructions->drc_set_id[0] = (temp >> 1) & 0x3F;
 1354|       |
 1355|     72|    additional_drc_set_id_present = temp & 0x01;
 1356|       |
 1357|     72|    if (additional_drc_set_id_present) {
  ------------------
  |  Branch (1357:9): [True: 28, False: 44]
  ------------------
 1358|     28|      additional_drc_set_id_cnt = impd_read_bits_buf(it_bit_buff, 6);
 1359|     28|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1359:11): [True: 1, False: 27]
  ------------------
 1360|     27|      if ((additional_drc_set_id_cnt >= DRC_SET_ID_COUNT_MAX))
  ------------------
  |  |   93|     27|#define DRC_SET_ID_COUNT_MAX 16
  ------------------
  |  Branch (1360:11): [True: 1, False: 26]
  ------------------
 1361|      1|        return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      1|#define UNEXPECTED_ERROR 2
  ------------------
 1362|       |
 1363|    118|      for (i = 1; i < additional_drc_set_id_cnt + 1; i++) {
  ------------------
  |  Branch (1363:19): [True: 94, False: 24]
  ------------------
 1364|     94|        loud_eq_instructions->drc_set_id[i] =
 1365|     94|            impd_read_bits_buf(it_bit_buff, 6);
 1366|     94|        if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1366:13): [True: 2, False: 92]
  ------------------
 1367|     94|      }
 1368|     26|    }
 1369|    103|  } else {
 1370|    103|    loud_eq_instructions->drc_set_id[0] = 0;
 1371|    103|  }
 1372|       |
 1373|    171|  loud_eq_instructions->drc_set_id_count = 1 + additional_drc_set_id_cnt;
 1374|       |
 1375|    171|  eq_set_id_present = impd_read_bits_buf(it_bit_buff, 1);
 1376|       |
 1377|    171|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1377:7): [True: 2, False: 169]
  ------------------
 1378|       |
 1379|    169|  if (eq_set_id_present) {
  ------------------
  |  Branch (1379:7): [True: 58, False: 111]
  ------------------
 1380|     58|    temp = impd_read_bits_buf(it_bit_buff, 7);
 1381|     58|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1381:9): [True: 1, False: 57]
  ------------------
 1382|       |
 1383|     57|    loud_eq_instructions->eq_set_id[0] = (temp >> 1) & 0x3F;
 1384|       |
 1385|     57|    additional_eq_set_id_present = temp & 0x01;
 1386|       |
 1387|     57|    if (additional_eq_set_id_present) {
  ------------------
  |  Branch (1387:9): [True: 12, False: 45]
  ------------------
 1388|     12|      additional_eq_set_id_cnt = impd_read_bits_buf(it_bit_buff, 6);
 1389|     12|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1389:11): [True: 1, False: 11]
  ------------------
 1390|     11|      if (additional_eq_set_id_cnt >= EQ_SET_ID_COUNT_MAX)
  ------------------
  |  |   94|     11|#define EQ_SET_ID_COUNT_MAX 8
  ------------------
  |  Branch (1390:11): [True: 1, False: 10]
  ------------------
 1391|      1|        return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      1|#define UNEXPECTED_ERROR 2
  ------------------
 1392|     27|      for (i = 0; i < additional_eq_set_id_cnt; i++) {
  ------------------
  |  Branch (1392:19): [True: 19, False: 8]
  ------------------
 1393|     19|        loud_eq_instructions->eq_set_id[i + 1] =
 1394|     19|            impd_read_bits_buf(it_bit_buff, 6);
 1395|     19|        if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1395:13): [True: 2, False: 17]
  ------------------
 1396|     19|      }
 1397|     10|    }
 1398|    111|  } else {
 1399|    111|    loud_eq_instructions->eq_set_id[0] = 0;
 1400|    111|  }
 1401|    164|  loud_eq_instructions->eq_set_id_count = 1 + additional_eq_set_id_cnt;
 1402|       |
 1403|    164|  temp = impd_read_bits_buf(it_bit_buff, 8);
 1404|    164|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1404:7): [True: 2, False: 162]
  ------------------
 1405|       |
 1406|       |  /* Parsed but unused */
 1407|    162|  loud_eq_instructions->loudness_after_drc = (temp >> 7) & 0x01;
 1408|       |
 1409|       |  /* Parsed but unused */
 1410|    162|  loud_eq_instructions->loudness_after_eq = (temp >> 6) & 0x01;
 1411|       |
 1412|       |  /* Parsed but unused */
 1413|    162|  loud_eq_instructions->loud_eq_gain_sequence_count = temp & 0x3F;
 1414|       |
 1415|    162|  if (loud_eq_instructions->loud_eq_gain_sequence_count >
  ------------------
  |  Branch (1415:7): [True: 9, False: 153]
  ------------------
 1416|    162|      LOUD_EQ_GAIN_SEQUENCE_COUNT_MAX)
  ------------------
  |  |   95|    162|#define LOUD_EQ_GAIN_SEQUENCE_COUNT_MAX 4
  ------------------
 1417|      9|    return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      9|#define UNEXPECTED_ERROR 2
  ------------------
 1418|       |
 1419|       |  /* Section under for loop, Parsed but unused */
 1420|    218|  for (i = 0; i < loud_eq_instructions->loud_eq_gain_sequence_count; i++) {
  ------------------
  |  Branch (1420:15): [True: 71, False: 147]
  ------------------
 1421|     71|    temp = impd_read_bits_buf(it_bit_buff, 7);
 1422|     71|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1422:9): [True: 1, False: 70]
  ------------------
 1423|       |
 1424|     70|    loud_eq_instructions->gain_seq_idx[i] = (temp >> 1) & 0x3F;
 1425|       |
 1426|     70|    loud_eq_instructions->drc_characteristic_format_is_cicp[i] = temp & 0x01;
 1427|       |
 1428|     70|    if (loud_eq_instructions->drc_characteristic_format_is_cicp[i]) {
  ------------------
  |  Branch (1428:9): [True: 24, False: 46]
  ------------------
 1429|     24|      loud_eq_instructions->drc_characteristic[i] =
 1430|     24|          impd_read_bits_buf(it_bit_buff, 7);
 1431|     24|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1431:11): [True: 1, False: 23]
  ------------------
 1432|     46|    } else {
 1433|     46|      temp = impd_read_bits_buf(it_bit_buff, 8);
 1434|     46|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1434:11): [True: 1, False: 45]
  ------------------
 1435|       |
 1436|     45|      loud_eq_instructions->drc_characteristic_left_index[i] =
 1437|     45|          (temp >> 4) & 0x0F;
 1438|       |
 1439|     45|      loud_eq_instructions->drc_characteristic_right_index[i] = temp & 0x0F;
 1440|     45|    }
 1441|       |
 1442|     68|    temp = impd_read_bits_buf(it_bit_buff, 9);
 1443|     68|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1443:9): [True: 2, False: 66]
  ------------------
 1444|       |
 1445|     66|    loud_eq_instructions->frequency_range_index[i] = (temp >> 3) & 0x3F;
 1446|       |
 1447|     66|    bs_loud_eq_scaling = temp & 0x07;
 1448|       |
 1449|     66|    loud_eq_instructions->loud_eq_scaling[i] =
 1450|     66|        (FLOAT32)pow(2.0f, -0.5f * bs_loud_eq_scaling);
 1451|       |
 1452|     66|    bs_loud_eq_offset = impd_read_bits_buf(it_bit_buff, 5);
 1453|     66|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1453:9): [True: 1, False: 65]
  ------------------
 1454|       |
 1455|     65|    loud_eq_instructions->loud_eq_offset[i] = 1.5f * bs_loud_eq_offset - 16.0f;
 1456|     65|  }
 1457|    147|  return (0);
 1458|    153|}

impd_init_tbls:
   31|  1.84k|                    ia_tables_struct* str_tables) {
   32|  1.84k|  impd_gen_delta_time_code_tbl(num_gain_max_values,
   33|  1.84k|                               str_tables->delta_time_code_table);
   34|  1.84k|  return;
   35|  1.84k|}
impd_get_delta_gain_code_tbl:
   40|  20.6k|    WORD32* num_entries) {
   41|  20.6k|  if (gain_coding_profile == GAIN_CODING_PROFILE_CLIPPING) {
  ------------------
  |  |   77|  20.6k|#define GAIN_CODING_PROFILE_CLIPPING 2
  ------------------
  |  Branch (41:7): [True: 0, False: 20.6k]
  ------------------
   42|      0|    *delta_time_code_tbl = ia_drc_gain_tbls_prof_2;
   43|      0|    *num_entries = NUM_GAIN_TBL_PROF_2_ENTRIES;
  ------------------
  |  |   25|      0|#define NUM_GAIN_TBL_PROF_2_ENTRIES 49
  ------------------
   44|  20.6k|  } else {
   45|  20.6k|    *delta_time_code_tbl = ia_drc_gain_tbls_prof_0_1;
   46|  20.6k|    *num_entries = NUM_GAIN_TBL_PROF_0_1_ENTRIES;
  ------------------
  |  |   24|  20.6k|#define NUM_GAIN_TBL_PROF_0_1_ENTRIES 25
  ------------------
   47|  20.6k|  }
   48|  20.6k|}
impd_gen_delta_time_code_tbl:
   52|  1.84k|    ia_delta_time_code_table_entry_struct* delta_time_code_tbl_item) {
   53|  1.84k|  WORD32 n, k;
   54|       |
   55|  1.84k|  WORD32 Z = 1;
   56|  12.5k|  while ((1 << Z) < 2 * num_gain_max_values) {
  ------------------
  |  Branch (56:10): [True: 10.7k, False: 1.84k]
  ------------------
   57|  10.7k|    Z++;
   58|  10.7k|  }
   59|       |
   60|  1.84k|  delta_time_code_tbl_item[0].size = -1;
   61|  1.84k|  delta_time_code_tbl_item[0].code = -1;
   62|  1.84k|  delta_time_code_tbl_item[0].value = -1;
   63|       |
   64|  1.84k|  delta_time_code_tbl_item[1].size = 2;
   65|  1.84k|  delta_time_code_tbl_item[1].code = 0x0;
   66|  1.84k|  delta_time_code_tbl_item[1].value = 1;
   67|  9.23k|  for (n = 0; n < 4; n++) {
  ------------------
  |  Branch (67:15): [True: 7.38k, False: 1.84k]
  ------------------
   68|  7.38k|    delta_time_code_tbl_item[n + 2].size = 4;
   69|  7.38k|    delta_time_code_tbl_item[n + 2].code = 0x4 + n;
   70|  7.38k|    delta_time_code_tbl_item[n + 2].value = n + 2;
   71|  7.38k|  }
   72|  16.6k|  for (n = 0; n < 8; n++) {
  ------------------
  |  Branch (72:15): [True: 14.7k, False: 1.84k]
  ------------------
   73|  14.7k|    delta_time_code_tbl_item[n + 6].size = 5;
   74|  14.7k|    delta_time_code_tbl_item[n + 6].code = 0x10 + n;
   75|  14.7k|    delta_time_code_tbl_item[n + 6].value = n + 6;
   76|  14.7k|  }
   77|       |
   78|  1.84k|  k = 2 * num_gain_max_values - 14 + 1;
   79|   314k|  for (n = 0; n < k; n++) {
  ------------------
  |  Branch (79:15): [True: 312k, False: 1.84k]
  ------------------
   80|   312k|    delta_time_code_tbl_item[n + 14].size = 2 + Z;
   81|   312k|    delta_time_code_tbl_item[n + 14].code = (0x3 << Z) + n;
   82|   312k|    delta_time_code_tbl_item[n + 14].value = n + 14;
   83|   312k|  }
   84|  1.84k|}
impd_get_delta_tmin:
   87|  4.62k|impd_get_delta_tmin(const WORD32 sampling_rate) {
   88|  4.62k|  WORD32 lowerBound = (WORD32)(0.5f + 0.0005f * sampling_rate);
   89|  4.62k|  WORD32 result = 1;
   90|  28.8k|  while (result <= lowerBound) result = result << 1;
  ------------------
  |  Branch (90:10): [True: 24.2k, False: 4.62k]
  ------------------
   91|  4.62k|  return result;
   92|  4.62k|}

impd_conv_to_linear_domain:
  299|  24.3k|                           FLOAT32* out_param_lin_slope) {
  300|  24.3k|  WORD32 err = 0;
  301|  24.3k|  FLOAT32 loc_db_gain = in_param_db_gain;
  302|  24.3k|  FLOAT32 gain_ratio = 1.0;
  303|  24.3k|  FLOAT32 mapped_db_gain;
  304|  24.3k|  ia_gain_modifiers_struct* pstr_gain_modifiers =
  305|  24.3k|      interp_params_str->pstr_gain_modifiers;
  306|  24.3k|  if (interp_params_str->gain_modification_flag) {
  ------------------
  |  Branch (306:7): [True: 24.3k, False: 0]
  ------------------
  307|  24.3k|    ia_split_drc_characteristic_struct* split_drc_characteristic_source;
  308|       |
  309|  24.3k|    WORD32 slopeIsNegative;
  310|       |
  311|  24.3k|    if (interp_params_str->drc_characteristic_present) {
  ------------------
  |  Branch (311:9): [True: 0, False: 24.3k]
  ------------------
  312|      0|      if (interp_params_str->drc_source_characteristic_cicp_format) {
  ------------------
  |  Branch (312:11): [True: 0, False: 0]
  ------------------
  313|      0|      } else {
  314|      0|        slopeIsNegative = 0;
  315|      0|        split_drc_characteristic_source =
  316|      0|            interp_params_str->split_source_characteristic_left;
  317|      0|        if (split_drc_characteristic_source->characteristic_format == 0) {
  ------------------
  |  Branch (317:13): [True: 0, False: 0]
  ------------------
  318|      0|          slopeIsNegative = 1;
  319|      0|        } else {
  320|      0|          if (split_drc_characteristic_source->node_gain[1] > 0.0f) {
  ------------------
  |  Branch (320:15): [True: 0, False: 0]
  ------------------
  321|      0|            slopeIsNegative = 1;
  322|      0|          }
  323|      0|        }
  324|      0|        if (loc_db_gain == 0.0f) {
  ------------------
  |  Branch (324:13): [True: 0, False: 0]
  ------------------
  325|      0|          if (((pstr_gain_modifiers
  ------------------
  |  Branch (325:16): [True: 0, False: 0]
  ------------------
  326|      0|                    ->target_characteristic_left_present[drc_band] == 1) &&
  327|      0|               (interp_params_str->split_target_characteristic_left
  ------------------
  |  Branch (327:16): [True: 0, False: 0]
  ------------------
  328|      0|                    ->characteristic_format == CHARACTERISTIC_PASS_THRU)) ||
  ------------------
  |  |  133|      0|#define CHARACTERISTIC_PASS_THRU 2
  ------------------
  329|      0|              ((pstr_gain_modifiers
  ------------------
  |  Branch (329:16): [True: 0, False: 0]
  ------------------
  330|      0|                    ->target_characteristic_right_present[drc_band] == 1) &&
  331|      0|               (interp_params_str->split_target_characteristic_right
  ------------------
  |  Branch (331:16): [True: 0, False: 0]
  ------------------
  332|      0|                    ->characteristic_format == CHARACTERISTIC_PASS_THRU))) {
  ------------------
  |  |  133|      0|#define CHARACTERISTIC_PASS_THRU 2
  ------------------
  333|      0|            mapped_db_gain = DRC_INPUT_LOUDNESS_TARGET;
  ------------------
  |  |  143|      0|#define DRC_INPUT_LOUDNESS_TARGET (-31.0f)
  ------------------
  334|      0|            loc_db_gain = DRC_INPUT_LOUDNESS_TARGET;
  ------------------
  |  |  143|      0|#define DRC_INPUT_LOUDNESS_TARGET (-31.0f)
  ------------------
  335|      0|          }
  336|      0|        } else {
  337|      0|          if (((loc_db_gain > 0.0f) && (slopeIsNegative == 1)) ||
  ------------------
  |  Branch (337:16): [True: 0, False: 0]
  |  Branch (337:40): [True: 0, False: 0]
  ------------------
  338|      0|              ((loc_db_gain < 0.0f) && (slopeIsNegative == 0))) {
  ------------------
  |  Branch (338:16): [True: 0, False: 0]
  |  Branch (338:40): [True: 0, False: 0]
  ------------------
  339|      0|            if (pstr_gain_modifiers
  ------------------
  |  Branch (339:17): [True: 0, False: 0]
  ------------------
  340|      0|                    ->target_characteristic_left_present[drc_band] == 1) {
  341|      0|              err = impd_map_gain(
  342|      0|                  split_drc_characteristic_source,
  343|      0|                  interp_params_str->split_target_characteristic_left,
  344|      0|                  loc_db_gain, &mapped_db_gain);
  345|      0|              if (err) return (err);
  ------------------
  |  Branch (345:19): [True: 0, False: 0]
  ------------------
  346|      0|              gain_ratio = mapped_db_gain / loc_db_gain;
  347|      0|            }
  348|       |
  349|      0|          } else if (((loc_db_gain < 0.0f) && (slopeIsNegative == 1)) ||
  ------------------
  |  Branch (349:23): [True: 0, False: 0]
  |  Branch (349:47): [True: 0, False: 0]
  ------------------
  350|      0|                     ((loc_db_gain > 0.0f) && (slopeIsNegative == 0))) {
  ------------------
  |  Branch (350:23): [True: 0, False: 0]
  |  Branch (350:47): [True: 0, False: 0]
  ------------------
  351|      0|            if (pstr_gain_modifiers
  ------------------
  |  Branch (351:17): [True: 0, False: 0]
  ------------------
  352|      0|                    ->target_characteristic_right_present[drc_band] == 1) {
  353|      0|              split_drc_characteristic_source =
  354|      0|                  interp_params_str->split_source_characteristic_right;
  355|      0|              err = impd_map_gain(
  356|      0|                  split_drc_characteristic_source,
  357|      0|                  interp_params_str->split_target_characteristic_right,
  358|      0|                  loc_db_gain, &mapped_db_gain);
  359|      0|              if (err) return (err);
  ------------------
  |  Branch (359:19): [True: 0, False: 0]
  ------------------
  360|      0|              gain_ratio = mapped_db_gain / loc_db_gain;
  361|      0|            }
  362|      0|          }
  363|      0|        }
  364|      0|      }
  365|      0|    }
  366|       |
  367|  24.3k|    if (loc_db_gain < 0.0f) {
  ------------------
  |  Branch (367:9): [True: 5.16k, False: 19.1k]
  ------------------
  368|  5.16k|      gain_ratio *= interp_params_str->compress;
  369|  19.1k|    } else {
  370|  19.1k|      gain_ratio *= interp_params_str->boost;
  371|  19.1k|    }
  372|  24.3k|  }
  373|  24.3k|  if (pstr_gain_modifiers->gain_scaling_flag[drc_band] == 1) {
  ------------------
  |  Branch (373:7): [True: 0, False: 24.3k]
  ------------------
  374|      0|    if (loc_db_gain < 0.0) {
  ------------------
  |  Branch (374:9): [True: 0, False: 0]
  ------------------
  375|      0|      gain_ratio *= pstr_gain_modifiers->attn_scaling[drc_band];
  376|      0|    } else {
  377|      0|      gain_ratio *= pstr_gain_modifiers->ampl_scaling[drc_band];
  378|      0|    }
  379|      0|  }
  380|  24.3k|  if ((interp_params_str->pstr_ducking_modifiers->ducking_scaling_flag == 1) &&
  ------------------
  |  Branch (380:7): [True: 0, False: 24.3k]
  ------------------
  381|      0|      (interp_params_str->ducking_flag == 1)) {
  ------------------
  |  Branch (381:7): [True: 0, False: 0]
  ------------------
  382|      0|    gain_ratio *= interp_params_str->pstr_ducking_modifiers->ducking_scaling;
  383|      0|  }
  384|       |
  385|  24.3k|  if (interp_params_str->interpolation_loud_eq == 1) {
  ------------------
  |  Branch (385:7): [True: 0, False: 24.3k]
  ------------------
  386|      0|    *out_param_lin_gain =
  387|      0|        gain_ratio * loc_db_gain + pstr_gain_modifiers->gain_offset[drc_band];
  388|      0|    *out_param_lin_slope = 0.0f;
  389|  24.3k|  } else {
  390|  24.3k|    *out_param_lin_gain =
  391|  24.3k|        (FLOAT32)pow(2.0, (FLOAT64)(gain_ratio * loc_db_gain / 6.0f));
  392|  24.3k|    *out_param_lin_slope = SLOPE_FACTOR_DB_TO_LINEAR * gain_ratio *
  ------------------
  |  |  216|  24.3k|#define SLOPE_FACTOR_DB_TO_LINEAR 0.1151f
  ------------------
  393|  24.3k|                           *out_param_lin_gain * in_param_db_slope;
  394|       |
  395|  24.3k|    if (pstr_gain_modifiers->gain_offset_flag[drc_band] == 1) {
  ------------------
  |  Branch (395:9): [True: 0, False: 24.3k]
  ------------------
  396|      0|      *out_param_lin_gain *= (FLOAT32)pow(
  397|      0|          2.0, (FLOAT64)(pstr_gain_modifiers->gain_offset[drc_band] / 6.0f));
  398|      0|    }
  399|  24.3k|    if ((interp_params_str->limiter_peak_target_present == 1) &&
  ------------------
  |  Branch (399:9): [True: 0, False: 24.3k]
  ------------------
  400|      0|        (interp_params_str->clipping_flag == 1)) {
  ------------------
  |  Branch (400:9): [True: 0, False: 0]
  ------------------
  401|      0|      *out_param_lin_gain *= (FLOAT32)pow(
  402|      0|          2.0, max(0.0, -interp_params_str->limiter_peak_target -
  ------------------
  |  |  224|      0|#define max(a, b) ((a) > (b) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (224:20): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  403|      0|                            interp_params_str->loudness_normalization_gain_db) /
  404|      0|                   6.0);
  405|      0|      if (*out_param_lin_gain >= 1.0) {
  ------------------
  |  Branch (405:11): [True: 0, False: 0]
  ------------------
  406|      0|        *out_param_lin_gain = 1.0;
  407|      0|        *out_param_lin_slope = 0.0;
  408|      0|      }
  409|      0|    }
  410|  24.3k|  }
  411|  24.3k|  return (0);
  412|  24.3k|}
impd_interpolate_drc_gain:
  417|  12.8k|                                 FLOAT32 slope1, FLOAT32* result) {
  418|  12.8k|  WORD32 err = 0;
  419|  12.8k|  WORD32 n;
  420|  12.8k|  FLOAT32 k1, k2, a, b, c, d;
  421|  12.8k|  FLOAT32 slope_t1;
  422|  12.8k|  FLOAT32 slope_t2;
  423|  12.8k|  FLOAT32 gain_t1;
  424|  12.8k|  FLOAT32 gain_t2;
  425|       |
  426|  12.8k|  WORD32 cubic_interpolation = 1;
  427|  12.8k|  WORD32 node_inser;
  428|  12.8k|  FLOAT32 node_inser_float;
  429|       |
  430|  12.8k|  if (gain_step_tdomain <= 0) {
  ------------------
  |  Branch (430:7): [True: 630, False: 12.1k]
  ------------------
  431|    630|    return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|    630|#define UNEXPECTED_ERROR 2
  ------------------
  432|    630|  }
  433|       |
  434|  12.1k|  err = impd_conv_to_linear_domain(interp_params_str, drc_band, gain0, slope0,
  435|  12.1k|                                   &gain_t1, &slope_t1);
  436|  12.1k|  if (err) return (err);
  ------------------
  |  Branch (436:7): [True: 0, False: 12.1k]
  ------------------
  437|  12.1k|  err = impd_conv_to_linear_domain(interp_params_str, drc_band, gain1, slope1,
  438|  12.1k|                                   &gain_t2, &slope_t2);
  439|  12.1k|  if (err) return (err);
  ------------------
  |  Branch (439:7): [True: 0, False: 12.1k]
  ------------------
  440|       |
  441|  12.1k|  if (interp_params_str->gain_interpolation_type ==
  ------------------
  |  Branch (441:7): [True: 0, False: 12.1k]
  ------------------
  442|  12.1k|      GAIN_INTERPOLATION_TYPE_SPLINE) {
  ------------------
  |  |   81|  12.1k|#define GAIN_INTERPOLATION_TYPE_SPLINE 0
  ------------------
  443|      0|    slope_t1 = slope_t1 / (FLOAT32)interp_params_str->delta_tmin;
  444|      0|    slope_t2 = slope_t2 / (FLOAT32)interp_params_str->delta_tmin;
  445|      0|    if ((FLOAT32)fabs((FLOAT64)slope_t1) > (FLOAT32)fabs((FLOAT64)slope_t2)) {
  ------------------
  |  Branch (445:9): [True: 0, False: 0]
  ------------------
  446|      0|      node_inser_float = 2.0f *
  447|      0|                         (gain_t2 - gain_t1 - slope_t2 * gain_step_tdomain) /
  448|      0|                         (slope_t1 - slope_t2);
  449|      0|      node_inser = (WORD32)(0.5f + node_inser_float);
  450|      0|      if ((node_inser >= 0) && (node_inser < gain_step_tdomain)) {
  ------------------
  |  Branch (450:11): [True: 0, False: 0]
  |  Branch (450:32): [True: 0, False: 0]
  ------------------
  451|      0|        cubic_interpolation = 0;
  452|       |
  453|      0|        result[0] = gain_t1;
  454|      0|        result[gain_step_tdomain] = gain_t2;
  455|       |
  456|      0|        a = 0.5f * (slope_t2 - slope_t1) / node_inser_float;
  457|      0|        b = slope_t1;
  458|      0|        c = gain_t1;
  459|      0|        for (n = 1; n < node_inser; n++) {
  ------------------
  |  Branch (459:21): [True: 0, False: 0]
  ------------------
  460|      0|          FLOAT32 t = (FLOAT32)n;
  461|      0|          result[n] = (a * t + b) * t + c;
  462|      0|          result[n] = max(0.0f, result[n]);
  ------------------
  |  |  224|      0|#define max(a, b) ((a) > (b) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (224:20): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  463|      0|        }
  464|      0|        a = slope_t2;
  465|      0|        b = gain_t2;
  466|      0|        for (; n < gain_step_tdomain; n++) {
  ------------------
  |  Branch (466:16): [True: 0, False: 0]
  ------------------
  467|      0|          FLOAT32 t = (FLOAT32)(n - gain_step_tdomain);
  468|      0|          result[n] = a * t + b;
  469|      0|        }
  470|      0|      }
  471|      0|    } else if ((FLOAT32)fabs((FLOAT64)slope_t1) <
  ------------------
  |  Branch (471:16): [True: 0, False: 0]
  ------------------
  472|      0|               (FLOAT32)fabs((FLOAT64)slope_t2)) {
  473|      0|      node_inser_float = 2.0f *
  474|      0|                         (gain_t1 - gain_t2 + slope_t1 * gain_step_tdomain) /
  475|      0|                         (slope_t1 - slope_t2);
  476|      0|      node_inser_float = gain_step_tdomain - node_inser_float;
  477|      0|      node_inser = (WORD32)(0.5f + node_inser_float);
  478|      0|      if ((node_inser >= 0) && (node_inser < gain_step_tdomain)) {
  ------------------
  |  Branch (478:11): [True: 0, False: 0]
  |  Branch (478:32): [True: 0, False: 0]
  ------------------
  479|      0|        cubic_interpolation = 0;
  480|       |
  481|      0|        result[0] = gain_t1;
  482|      0|        result[gain_step_tdomain] = gain_t2;
  483|       |
  484|      0|        a = slope_t1;
  485|      0|        b = gain_t1;
  486|      0|        for (n = 1; n < node_inser; n++) {
  ------------------
  |  Branch (486:21): [True: 0, False: 0]
  ------------------
  487|      0|          FLOAT32 t = (FLOAT32)n;
  488|      0|          result[n] = a * t + b;
  489|      0|        }
  490|      0|        a = (slope_t2 - slope_t1) /
  491|      0|            (2.0f * (gain_step_tdomain - node_inser_float));
  492|      0|        b = -slope_t2;
  493|      0|        c = gain_t2;
  494|      0|        for (; n < gain_step_tdomain; n++) {
  ------------------
  |  Branch (494:16): [True: 0, False: 0]
  ------------------
  495|      0|          FLOAT32 t = (FLOAT32)(gain_step_tdomain - n);
  496|      0|          result[n] = (a * t + b) * t + c;
  497|      0|          result[n] = max(0.0f, result[n]);
  ------------------
  |  |  224|      0|#define max(a, b) ((a) > (b) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (224:20): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  498|      0|        }
  499|      0|      }
  500|      0|    }
  501|       |
  502|      0|    if (cubic_interpolation == 1) {
  ------------------
  |  Branch (502:9): [True: 0, False: 0]
  ------------------
  503|      0|      FLOAT32 gain_step_inv = 1.0f / (FLOAT32)gain_step_tdomain;
  504|      0|      FLOAT32 gain_step_inv2 = gain_step_inv * gain_step_inv;
  505|       |
  506|      0|      k1 = (gain_t2 - gain_t1) * gain_step_inv2;
  507|      0|      k2 = slope_t2 + slope_t1;
  508|       |
  509|      0|      a = gain_step_inv * (gain_step_inv * k2 - 2.0f * k1);
  510|      0|      b = 3.0f * k1 - gain_step_inv * (k2 + slope_t1);
  511|      0|      c = slope_t1;
  512|      0|      d = gain_t1;
  513|       |
  514|      0|      result[0] = gain_t1;
  515|      0|      result[gain_step_tdomain] = gain_t2;
  516|      0|      for (n = 1; n < gain_step_tdomain; n++) {
  ------------------
  |  Branch (516:19): [True: 0, False: 0]
  ------------------
  517|      0|        FLOAT32 t = (FLOAT32)n;
  518|      0|        result[n] = (((a * t + b) * t + c) * t) + d;
  519|      0|        result[n] = max(0.0f, result[n]);
  ------------------
  |  |  224|      0|#define max(a, b) ((a) > (b) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (224:20): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  520|      0|      }
  521|      0|    }
  522|  12.1k|  } else {
  523|  12.1k|    a = (gain_t2 - gain_t1) / (FLOAT32)gain_step_tdomain;
  524|  12.1k|    b = gain_t1;
  525|  12.1k|    result[0] = gain_t1;
  526|  12.1k|    result[gain_step_tdomain] = gain_t2;
  527|  21.4M|    for (n = 1; n < gain_step_tdomain; n++) {
  ------------------
  |  Branch (527:17): [True: 21.4M, False: 12.1k]
  ------------------
  528|  21.4M|      FLOAT32 t = (FLOAT32)n;
  529|  21.4M|      result[n] = a * t + b;
  530|  21.4M|    }
  531|  12.1k|  }
  532|  12.1k|  return 0;
  533|  12.1k|}
impd_advance_buf:
  536|  5.12k|                      ia_gain_buffer_struct* pstr_gain_buf) {
  537|  5.12k|  WORD32 n;
  538|  5.12k|  ia_interp_buf_struct* buf_interpolation;
  539|       |
  540|  15.3k|  for (n = 0; n < pstr_gain_buf->buf_interpolation_count; n++) {
  ------------------
  |  Branch (540:15): [True: 10.2k, False: 5.12k]
  ------------------
  541|  10.2k|    buf_interpolation = &(pstr_gain_buf->buf_interpolation[n]);
  542|  10.2k|    buf_interpolation->prev_node = buf_interpolation->str_node;
  543|  10.2k|    buf_interpolation->prev_node.time -= drc_frame_size;
  544|  10.2k|    memmove(buf_interpolation->lpcm_gains,
  545|  10.2k|            buf_interpolation->lpcm_gains + drc_frame_size,
  546|  10.2k|            sizeof(FLOAT32) * (drc_frame_size + MAX_SIGNAL_DELAY));
  ------------------
  |  |   52|  10.2k|#define MAX_SIGNAL_DELAY 4500
  ------------------
  547|  10.2k|  }
  548|  5.12k|  return;
  549|  5.12k|}
impd_concatenate_segments:
  556|  9.62k|                          WORD32 loudness_changed) {
  557|  9.62k|  WORD32 time_prev, duration, n, err = 0;
  558|  9.62k|  FLOAT32 loc_db_gain = 0.0f, prev_db_gain, slope = 0.0f, slope_prev;
  559|       |
  560|  9.62k|  time_prev = buf_interpolation->prev_node.time;
  561|  9.62k|  prev_db_gain = buf_interpolation->prev_node.loc_db_gain;
  562|  9.62k|  slope_prev = buf_interpolation->prev_node.slope;
  563|  21.8k|  for (n = 0; n < str_spline_nodes->num_nodes; n++) {
  ------------------
  |  Branch (563:15): [True: 12.8k, False: 8.99k]
  ------------------
  564|  12.8k|    duration = str_spline_nodes->str_node[n].time - time_prev;
  565|  12.8k|    loc_db_gain = str_spline_nodes->str_node[n].loc_db_gain;
  566|  12.8k|    if (loudness_changed) {
  ------------------
  |  Branch (566:9): [True: 1.77k, False: 11.0k]
  ------------------
  567|  1.77k|      if (sel_drc_index == 0 && is_config_changed == 1) {
  ------------------
  |  Branch (567:11): [True: 1.77k, False: 0]
  |  Branch (567:33): [True: 0, False: 1.77k]
  ------------------
  568|      0|        loc_db_gain = str_spline_nodes->str_node[n].loc_db_gain +
  569|      0|                      interp_params_str->loudness_normalization_gain_db;
  570|      0|        if (prev_db_gain == 0) {
  ------------------
  |  Branch (570:13): [True: 0, False: 0]
  ------------------
  571|      0|          prev_db_gain = buf_interpolation->prev_node.loc_db_gain +
  572|      0|                         interp_params_str->loudness_normalization_gain_db;
  573|      0|        }
  574|      0|      }
  575|  1.77k|    }
  576|  12.8k|    slope = str_spline_nodes->str_node[n].slope;
  577|       |
  578|  12.8k|    err = impd_interpolate_drc_gain(
  579|  12.8k|        interp_params_str, drc_band, duration, prev_db_gain, loc_db_gain,
  580|  12.8k|        slope_prev, slope, buf_interpolation->lpcm_gains + MAX_SIGNAL_DELAY +
  ------------------
  |  |   52|  12.8k|#define MAX_SIGNAL_DELAY 4500
  ------------------
  581|  12.8k|                              drc_frame_size + time_prev);
  582|  12.8k|    if (err) return (err);
  ------------------
  |  Branch (582:9): [True: 630, False: 12.1k]
  ------------------
  583|       |
  584|  12.1k|    time_prev = str_spline_nodes->str_node[n].time;
  585|  12.1k|    prev_db_gain = loc_db_gain;
  586|  12.1k|    slope_prev = slope;
  587|  12.1k|  }
  588|       |
  589|  8.99k|  buf_interpolation->str_node.loc_db_gain = loc_db_gain;
  590|  8.99k|  buf_interpolation->str_node.slope = slope;
  591|  8.99k|  buf_interpolation->str_node.time = time_prev;
  592|       |
  593|  8.99k|  return (0);
  594|  9.62k|}
impd_get_drc_gain:
  602|  5.12k|                  ia_drc_gain_buffers_struct* drc_gain_buffers) {
  603|  5.12k|  ia_drc_params_struct* ia_drc_params_struct =
  604|  5.12k|      &(p_drc_gain_dec_structs->ia_drc_params_struct);
  605|  5.12k|  WORD32 drc_instructions_index =
  606|  5.12k|      ia_drc_params_struct->sel_drc_array[sel_drc_index].drc_instructions_index;
  607|  5.12k|  if (drc_instructions_index >= 0) {
  ------------------
  |  Branch (607:7): [True: 5.12k, False: 0]
  ------------------
  608|  5.12k|    WORD32 b, g, gain_element_index, err = 0;
  609|  5.12k|    WORD32 parametric_drc_instance_index = 0;
  610|  5.12k|    ia_interp_params_struct interp_params_str = {0};
  611|       |
  612|  5.12k|    ia_drc_instructions_struct* str_drc_instruction_str =
  613|  5.12k|        &(pstr_drc_config->str_drc_instruction_str[drc_instructions_index]);
  614|  5.12k|    WORD32 drc_set_effect = str_drc_instruction_str->drc_set_effect;
  615|  5.12k|    WORD32 num_drc_ch_groups = str_drc_instruction_str->num_drc_ch_groups;
  616|  5.12k|    ia_uni_drc_coeffs_struct* str_p_loc_drc_coefficients_uni_drc = NULL;
  617|  5.12k|    WORD32 drc_coeff_idx =
  618|  5.12k|        ia_drc_params_struct->sel_drc_array[sel_drc_index].drc_coeff_idx;
  619|  5.12k|    if (drc_coeff_idx >= 0) {
  ------------------
  |  Branch (619:9): [True: 5.12k, False: 0]
  ------------------
  620|  5.12k|      str_p_loc_drc_coefficients_uni_drc =
  621|  5.12k|          &(pstr_drc_config->str_p_loc_drc_coefficients_uni_drc[drc_coeff_idx]);
  622|  5.12k|      interp_params_str.interpolation_loud_eq = 0;
  623|  5.12k|    } else {
  624|      0|      return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  625|      0|    }
  626|       |
  627|  5.12k|    interp_params_str.loudness_normalization_gain_db =
  628|  5.12k|        loudness_normalization_gain_db;
  629|  5.12k|    interp_params_str.characteristic_index = characteristic_index;
  630|  5.12k|    interp_params_str.compress = compress;
  631|  5.12k|    interp_params_str.boost = boost;
  632|  5.12k|    interp_params_str.limiter_peak_target_present =
  633|  5.12k|        str_drc_instruction_str->limiter_peak_target_present;
  634|  5.12k|    interp_params_str.limiter_peak_target =
  635|  5.12k|        str_drc_instruction_str->limiter_peak_target;
  636|       |
  637|  5.12k|    if (((drc_set_effect & (EFFECT_BIT_DUCK_OTHER | EFFECT_BIT_DUCK_SELF)) ==
  ------------------
  |  |   72|  5.12k|#define EFFECT_BIT_DUCK_OTHER 0x0400
  ------------------
                  if (((drc_set_effect & (EFFECT_BIT_DUCK_OTHER | EFFECT_BIT_DUCK_SELF)) ==
  ------------------
  |  |   73|  5.12k|#define EFFECT_BIT_DUCK_SELF 0x0800
  ------------------
  |  Branch (637:9): [True: 5.12k, False: 0]
  ------------------
  638|  5.12k|         0) &&
  639|  5.12k|        (drc_set_effect != EFFECT_BIT_FADE) &&
  ------------------
  |  |   71|  5.12k|#define EFFECT_BIT_FADE 0x0200
  ------------------
  |  Branch (639:9): [True: 5.12k, False: 0]
  ------------------
  640|  5.12k|        (drc_set_effect != EFFECT_BIT_CLIPPING)) {
  ------------------
  |  |   70|  5.12k|#define EFFECT_BIT_CLIPPING 0x0100
  ------------------
  |  Branch (640:9): [True: 5.12k, False: 0]
  ------------------
  641|  5.12k|      interp_params_str.gain_modification_flag = 1;
  642|  5.12k|    } else {
  643|      0|      interp_params_str.gain_modification_flag = 0;
  644|      0|    }
  645|  5.12k|    if (drc_set_effect & (EFFECT_BIT_DUCK_OTHER | EFFECT_BIT_DUCK_SELF)) {
  ------------------
  |  |   72|  5.12k|#define EFFECT_BIT_DUCK_OTHER 0x0400
  ------------------
                  if (drc_set_effect & (EFFECT_BIT_DUCK_OTHER | EFFECT_BIT_DUCK_SELF)) {
  ------------------
  |  |   73|  5.12k|#define EFFECT_BIT_DUCK_SELF 0x0800
  ------------------
  |  Branch (645:9): [True: 0, False: 5.12k]
  ------------------
  646|      0|      interp_params_str.ducking_flag = 1;
  647|  5.12k|    } else {
  648|  5.12k|      interp_params_str.ducking_flag = 0;
  649|  5.12k|    }
  650|  5.12k|    if (drc_set_effect == EFFECT_BIT_CLIPPING) {
  ------------------
  |  |   70|  5.12k|#define EFFECT_BIT_CLIPPING 0x0100
  ------------------
  |  Branch (650:9): [True: 0, False: 5.12k]
  ------------------
  651|      0|      interp_params_str.clipping_flag = 1;
  652|  5.12k|    } else {
  653|  5.12k|      interp_params_str.clipping_flag = 0;
  654|  5.12k|    }
  655|       |
  656|  5.12k|    impd_advance_buf(ia_drc_params_struct->drc_frame_size,
  657|  5.12k|                     &(drc_gain_buffers->pstr_gain_buf[sel_drc_index]));
  658|       |
  659|  5.12k|    gain_element_index = 0;
  660|  14.1k|    for (g = 0; g < num_drc_ch_groups; g++) {
  ------------------
  |  Branch (660:17): [True: 9.62k, False: 4.49k]
  ------------------
  661|  9.62k|      WORD32 gainSet = 0;
  662|  9.62k|      WORD32 num_drc_bands = 0;
  663|  9.62k|      interp_params_str.gain_interpolation_type =
  664|  9.62k|          str_drc_instruction_str->gain_interpolation_type_for_channel_group[g];
  665|  9.62k|      interp_params_str.delta_tmin =
  666|  9.62k|          str_drc_instruction_str->time_delta_min_for_channel_group[g];
  667|  9.62k|      interp_params_str.pstr_ducking_modifiers = &(
  668|  9.62k|          str_drc_instruction_str->str_ducking_modifiers_for_channel_group[g]);
  669|  9.62k|      interp_params_str.pstr_gain_modifiers =
  670|  9.62k|          &(str_drc_instruction_str->str_gain_modifiers_of_ch_group[g]);
  671|  9.62k|      if (str_drc_instruction_str->ch_group_parametric_drc_flag[g] == 0) {
  ------------------
  |  Branch (671:11): [True: 9.62k, False: 0]
  ------------------
  672|  9.62k|        gainSet = str_drc_instruction_str->gain_set_index_for_channel_group[g];
  673|  9.62k|        num_drc_bands = str_drc_instruction_str->band_count_of_ch_group[g];
  674|  18.6k|        for (b = 0; b < num_drc_bands; b++) {
  ------------------
  |  Branch (674:21): [True: 9.62k, False: 8.99k]
  ------------------
  675|  9.62k|          ia_gain_params_struct* gain_params =
  676|  9.62k|              &(str_p_loc_drc_coefficients_uni_drc->gain_set_params[gainSet]
  677|  9.62k|                    .gain_params[b]);
  678|  9.62k|          WORD32 seq = gain_params->gain_seq_idx;
  679|  9.62k|          interp_params_str.drc_characteristic_present =
  680|  9.62k|              gain_params->drc_characteristic_present;
  681|  9.62k|          interp_params_str.drc_source_characteristic_cicp_format =
  682|  9.62k|              gain_params->drc_characteristic_format_is_cicp;
  683|  9.62k|          interp_params_str.source_drc_characteristic =
  684|  9.62k|              gain_params->drc_characteristic;
  685|  9.62k|          interp_params_str.split_source_characteristic_left = &(
  686|  9.62k|              str_p_loc_drc_coefficients_uni_drc->str_split_characteristic_left
  687|  9.62k|                  [gain_params->drc_characteristic_left_index]);
  688|  9.62k|          interp_params_str.split_source_characteristic_right = &(
  689|  9.62k|              str_p_loc_drc_coefficients_uni_drc->str_split_characteristic_right
  690|  9.62k|                  [gain_params->drc_characteristic_right_index]);
  691|  9.62k|          interp_params_str.split_target_characteristic_left = &(
  692|  9.62k|              str_p_loc_drc_coefficients_uni_drc->str_split_characteristic_left
  693|  9.62k|                  [interp_params_str.pstr_gain_modifiers
  694|  9.62k|                       ->target_characteristic_left_index[b]]);
  695|  9.62k|          interp_params_str.split_target_characteristic_right = &(
  696|  9.62k|              str_p_loc_drc_coefficients_uni_drc->str_split_characteristic_right
  697|  9.62k|                  [interp_params_str.pstr_gain_modifiers
  698|  9.62k|                       ->target_characteristic_right_index[b]]);
  699|  9.62k|          err = impd_concatenate_segments(
  700|  9.62k|              ia_drc_params_struct->drc_frame_size, b, &interp_params_str,
  701|  9.62k|              &(pstr_drc_gain->drc_gain_sequence[seq].str_spline_nodes[0]),
  702|  9.62k|              &(drc_gain_buffers->pstr_gain_buf[sel_drc_index]
  703|  9.62k|                    .buf_interpolation[gain_element_index]),
  704|  9.62k|              sel_drc_index, pstr_drc_config->is_config_changed,
  705|  9.62k|              pstr_drc_config->ln_gain_changed);
  706|  9.62k|          if (err) return (err);
  ------------------
  |  Branch (706:15): [True: 630, False: 8.99k]
  ------------------
  707|  8.99k|          gain_element_index++;
  708|  8.99k|        }
  709|  9.62k|      } else {
  710|      0|        if (ia_drc_params_struct->sub_band_domain_mode ==
  ------------------
  |  Branch (710:13): [True: 0, False: 0]
  ------------------
  711|      0|                SUBBAND_DOMAIN_MODE_OFF &&
  ------------------
  |  |  148|      0|#define SUBBAND_DOMAIN_MODE_OFF 0
  ------------------
  712|      0|            !(p_drc_gain_dec_structs->parametricdrc_params
  ------------------
  |  Branch (712:13): [True: 0, False: 0]
  ------------------
  713|      0|                  .str_parametric_drc_instance_params
  714|      0|                      [parametric_drc_instance_index]
  715|      0|                  .parametric_drc_type == PARAM_DRC_TYPE_LIM)) {
  ------------------
  |  |  185|      0|#define PARAM_DRC_TYPE_LIM 0x1
  ------------------
  716|      0|          err = impd_parametric_drc_instance_process(
  717|      0|              p_drc_gain_dec_structs->audio_in_out_buf.audio_in_out_buf, NULL,
  718|      0|              NULL, &p_drc_gain_dec_structs->parametricdrc_params,
  719|      0|              &p_drc_gain_dec_structs->parametricdrc_params
  720|      0|                   .str_parametric_drc_instance_params
  721|      0|                       [parametric_drc_instance_index]);
  722|      0|          if (err) return (err);
  ------------------
  |  Branch (722:15): [True: 0, False: 0]
  ------------------
  723|       |
  724|      0|          err = impd_concatenate_segments(
  725|      0|              ia_drc_params_struct->drc_frame_size, 0, &interp_params_str,
  726|      0|              &p_drc_gain_dec_structs->parametricdrc_params
  727|      0|                   .str_parametric_drc_instance_params
  728|      0|                       [parametric_drc_instance_index]
  729|      0|                   .str_spline_nodes,
  730|      0|              &(drc_gain_buffers->pstr_gain_buf[sel_drc_index]
  731|      0|                    .buf_interpolation[gain_element_index]),
  732|      0|              sel_drc_index, pstr_drc_config->is_config_changed,
  733|      0|              pstr_drc_config->ln_gain_changed);
  734|      0|          if (err) return (err);
  ------------------
  |  Branch (734:15): [True: 0, False: 0]
  ------------------
  735|      0|        } else if (ia_drc_params_struct->sub_band_domain_mode ==
  ------------------
  |  Branch (735:20): [True: 0, False: 0]
  ------------------
  736|      0|                       SUBBAND_DOMAIN_MODE_OFF &&
  ------------------
  |  |  148|      0|#define SUBBAND_DOMAIN_MODE_OFF 0
  ------------------
  737|      0|                   p_drc_gain_dec_structs->parametricdrc_params
  ------------------
  |  Branch (737:20): [True: 0, False: 0]
  ------------------
  738|      0|                           .str_parametric_drc_instance_params
  739|      0|                               [parametric_drc_instance_index]
  740|      0|                           .parametric_drc_type == PARAM_DRC_TYPE_LIM) {
  ------------------
  |  |  185|      0|#define PARAM_DRC_TYPE_LIM 0x1
  ------------------
  741|      0|          FLOAT32* lpcm_gains = (drc_gain_buffers->pstr_gain_buf[sel_drc_index]
  742|      0|                                     .buf_interpolation[gain_element_index])
  743|      0|                                    .lpcm_gains +
  744|      0|                                MAX_SIGNAL_DELAY;
  ------------------
  |  |   52|      0|#define MAX_SIGNAL_DELAY 4500
  ------------------
  745|      0|          impd_parametric_lim_type_drc_process(
  746|      0|              p_drc_gain_dec_structs->audio_in_out_buf.audio_in_out_buf,
  747|      0|              loudness_normalization_gain_db,
  748|      0|              &p_drc_gain_dec_structs->parametricdrc_params
  749|      0|                   .str_parametric_drc_instance_params
  750|      0|                       [parametric_drc_instance_index]
  751|      0|                   .str_parametric_drc_type_lim_params,
  752|      0|              lpcm_gains);
  753|       |
  754|      0|        } else if (ia_drc_params_struct->sub_band_domain_mode !=
  ------------------
  |  Branch (754:20): [True: 0, False: 0]
  ------------------
  755|      0|                       SUBBAND_DOMAIN_MODE_OFF &&
  ------------------
  |  |  148|      0|#define SUBBAND_DOMAIN_MODE_OFF 0
  ------------------
  756|      0|                   !(p_drc_gain_dec_structs->parametricdrc_params
  ------------------
  |  Branch (756:20): [True: 0, False: 0]
  ------------------
  757|      0|                         .str_parametric_drc_instance_params
  758|      0|                             [parametric_drc_instance_index]
  759|      0|                         .parametric_drc_type == PARAM_DRC_TYPE_LIM)) {
  ------------------
  |  |  185|      0|#define PARAM_DRC_TYPE_LIM 0x1
  ------------------
  760|      0|          err = impd_parametric_drc_instance_process(
  761|      0|              NULL, p_drc_gain_dec_structs->audio_in_out_buf.audio_real_buff,
  762|      0|              p_drc_gain_dec_structs->audio_in_out_buf.audio_imag_buff,
  763|      0|              &p_drc_gain_dec_structs->parametricdrc_params,
  764|      0|              &p_drc_gain_dec_structs->parametricdrc_params
  765|      0|                   .str_parametric_drc_instance_params
  766|      0|                       [parametric_drc_instance_index]);
  767|      0|          if (err) return (err);
  ------------------
  |  Branch (767:15): [True: 0, False: 0]
  ------------------
  768|       |
  769|      0|          err = impd_concatenate_segments(
  770|      0|              ia_drc_params_struct->drc_frame_size, 0, &interp_params_str,
  771|      0|              &p_drc_gain_dec_structs->parametricdrc_params
  772|      0|                   .str_parametric_drc_instance_params
  773|      0|                       [parametric_drc_instance_index]
  774|      0|                   .str_spline_nodes,
  775|      0|              &(drc_gain_buffers->pstr_gain_buf[sel_drc_index]
  776|      0|                    .buf_interpolation[gain_element_index]),
  777|      0|                    sel_drc_index, pstr_drc_config->is_config_changed,
  778|      0|                    pstr_drc_config->ln_gain_changed);
  779|      0|          if (err) return (err);
  ------------------
  |  Branch (779:15): [True: 0, False: 0]
  ------------------
  780|       |
  781|      0|        } else {
  782|      0|          return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  783|      0|        }
  784|      0|        gain_element_index++;
  785|      0|        parametric_drc_instance_index++;
  786|      0|      }
  787|  9.62k|    }
  788|  5.12k|  }
  789|  4.49k|  return (0);
  790|  5.12k|}

impd_init_drc_decode:
   45|  3.08k|    ia_drc_gain_dec_struct* p_drc_gain_dec_structs) {
   46|  3.08k|  IA_ERRORCODE err_code = IA_NO_ERROR;
  ------------------
  |  |   36|  3.08k|#define IA_NO_ERROR 0x00000000
  ------------------
   47|       |
   48|  3.08k|  err_code = impd_init_drc_params(
   49|  3.08k|      frame_size, sample_rate, gain_delay_samples, delay_mode,
   50|  3.08k|      sub_band_domain_mode, &p_drc_gain_dec_structs->ia_drc_params_struct);
   51|       |
   52|  3.08k|  if (err_code != IA_NO_ERROR) return (err_code);
  ------------------
  |  |   36|  3.08k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (52:7): [True: 0, False: 3.08k]
  ------------------
   53|       |
   54|  3.08k|  err_code = impd_init_parametric_drc(
   55|  3.08k|      p_drc_gain_dec_structs->ia_drc_params_struct.drc_frame_size, sample_rate,
   56|  3.08k|      sub_band_domain_mode, &p_drc_gain_dec_structs->parametricdrc_params);
   57|       |
   58|  3.08k|  if (err_code != IA_NO_ERROR) return (err_code);
  ------------------
  |  |   36|  3.08k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (58:7): [True: 0, False: 3.08k]
  ------------------
   59|       |
   60|  3.08k|  return err_code;
   61|  3.08k|}
impd_init_drc_decode_post_config:
   70|  1.16k|    ia_drc_loudness_info_set_struct* pstr_loudness_info, pVOID* mem_ptr) {
   71|  1.16k|  IA_ERRORCODE err_code = 0;
   72|  1.16k|  WORD32 i, j, k, maxMultibandAudioSignalCount = 0;
   73|  1.16k|  ia_drc_params_struct* p_drc_params_struct =
   74|  1.16k|      &p_drc_gain_dec_structs->ia_drc_params_struct;
   75|  1.16k|  ia_audio_in_out_buf* p_audio_in_out_buf =
   76|  1.16k|      &p_drc_gain_dec_structs->audio_in_out_buf;
   77|       |
   78|  1.37k|  for (i = 0; i < num_sets_processed; i++) {
  ------------------
  |  Branch (78:15): [True: 208, False: 1.16k]
  ------------------
   79|    208|    err_code = impd_init_selected_drc_set(
   80|    208|        pstr_drc_config, p_drc_params_struct,
   81|    208|        &p_drc_gain_dec_structs->parametricdrc_params, audio_num_chan,
   82|    208|        drc_set_id_processed[i], downmix_id_processed[i],
   83|    208|        &p_drc_gain_dec_structs->ia_filter_banks_struct,
   84|    208|        &p_drc_gain_dec_structs->str_overlap_params,
   85|    208|        p_drc_gain_dec_structs->shape_filter_block);
   86|    208|    if (err_code) return (err_code);
  ------------------
  |  Branch (86:9): [True: 0, False: 208]
  ------------------
   87|    208|  }
   88|       |
   89|  1.16k|  p_drc_gain_dec_structs->audio_num_chan = audio_num_chan;
   90|  1.16k|  p_drc_gain_dec_structs->ia_drc_params_struct.audio_delay_samples =
   91|  1.16k|      p_drc_gain_dec_structs->ia_drc_params_struct.parametric_drc_delay;
   92|  1.16k|  if (pstr_drc_config->str_drc_config_ext.parametric_drc_present) {
  ------------------
  |  Branch (92:7): [True: 0, False: 1.16k]
  ------------------
   93|      0|    err_code = impd_init_parametric_drc_after_config(
   94|      0|        pstr_drc_config, pstr_loudness_info,
   95|      0|        &p_drc_gain_dec_structs->parametricdrc_params, mem_ptr);
   96|      0|    if (err_code) return (err_code);
  ------------------
  |  Branch (96:9): [True: 0, False: 0]
  ------------------
   97|      0|  }
   98|       |
   99|  1.16k|  p_audio_in_out_buf->audio_num_chan = audio_num_chan;
  100|  1.16k|  p_audio_in_out_buf->audio_delay_samples =
  101|  1.16k|      p_drc_params_struct->audio_delay_samples;
  102|  1.16k|  p_audio_in_out_buf->frame_size = p_drc_params_struct->drc_frame_size;
  103|       |
  104|  1.16k|  if (p_drc_params_struct->sub_band_domain_mode == SUBBAND_DOMAIN_MODE_QMF64) {
  ------------------
  |  |  149|  1.16k|#define SUBBAND_DOMAIN_MODE_QMF64 1
  ------------------
  |  Branch (104:7): [True: 0, False: 1.16k]
  ------------------
  105|      0|    p_audio_in_out_buf->audio_delay_sub_band_samples =
  106|      0|        p_drc_params_struct->audio_delay_samples /
  107|      0|        AUDIO_CODEC_SUBBAND_DOWNSAMPLING_FACTOR_QMF64;
  ------------------
  |  |  154|      0|#define AUDIO_CODEC_SUBBAND_DOWNSAMPLING_FACTOR_QMF64 64
  ------------------
  108|      0|    p_audio_in_out_buf->audio_sub_band_frame_size =
  109|      0|        p_drc_params_struct->drc_frame_size /
  110|      0|        AUDIO_CODEC_SUBBAND_DOWNSAMPLING_FACTOR_QMF64;
  ------------------
  |  |  154|      0|#define AUDIO_CODEC_SUBBAND_DOWNSAMPLING_FACTOR_QMF64 64
  ------------------
  111|      0|    p_audio_in_out_buf->audio_sub_band_count = AUDIO_CODEC_SUBBAND_COUNT_QMF64;
  ------------------
  |  |  153|      0|#define AUDIO_CODEC_SUBBAND_COUNT_QMF64 64
  ------------------
  112|  1.16k|  } else if (p_drc_params_struct->sub_band_domain_mode ==
  ------------------
  |  Branch (112:14): [True: 0, False: 1.16k]
  ------------------
  113|  1.16k|             SUBBAND_DOMAIN_MODE_QMF71) {
  ------------------
  |  |  150|  1.16k|#define SUBBAND_DOMAIN_MODE_QMF71 2
  ------------------
  114|      0|    p_audio_in_out_buf->audio_delay_sub_band_samples =
  115|      0|        p_drc_params_struct->audio_delay_samples /
  116|      0|        AUDIO_CODEC_SUBBAND_DOWNSAMPLING_FACTOR_QMF71;
  ------------------
  |  |  158|      0|#define AUDIO_CODEC_SUBBAND_DOWNSAMPLING_FACTOR_QMF71 64
  ------------------
  117|      0|    p_audio_in_out_buf->audio_sub_band_frame_size =
  118|      0|        p_drc_params_struct->drc_frame_size /
  119|      0|        AUDIO_CODEC_SUBBAND_DOWNSAMPLING_FACTOR_QMF71;
  ------------------
  |  |  158|      0|#define AUDIO_CODEC_SUBBAND_DOWNSAMPLING_FACTOR_QMF71 64
  ------------------
  120|      0|    p_audio_in_out_buf->audio_sub_band_count = AUDIO_CODEC_SUBBAND_COUNT_QMF71;
  ------------------
  |  |  157|      0|#define AUDIO_CODEC_SUBBAND_COUNT_QMF71 71
  ------------------
  121|  1.16k|  } else if (p_drc_params_struct->sub_band_domain_mode ==
  ------------------
  |  Branch (121:14): [True: 0, False: 1.16k]
  ------------------
  122|  1.16k|             SUBBAND_DOMAIN_MODE_STFT256) {
  ------------------
  |  |  151|  1.16k|#define SUBBAND_DOMAIN_MODE_STFT256 3
  ------------------
  123|      0|    p_audio_in_out_buf->audio_delay_sub_band_samples =
  124|      0|        p_drc_params_struct->audio_delay_samples /
  125|      0|        AUDIO_CODEC_SUBBAND_DOWNSAMPLING_FACTOR_STFT256;
  ------------------
  |  |  162|      0|#define AUDIO_CODEC_SUBBAND_DOWNSAMPLING_FACTOR_STFT256 256
  ------------------
  126|      0|    p_audio_in_out_buf->audio_sub_band_frame_size =
  127|      0|        p_drc_params_struct->drc_frame_size /
  128|      0|        AUDIO_CODEC_SUBBAND_DOWNSAMPLING_FACTOR_STFT256;
  ------------------
  |  |  162|      0|#define AUDIO_CODEC_SUBBAND_DOWNSAMPLING_FACTOR_STFT256 256
  ------------------
  129|      0|    p_audio_in_out_buf->audio_sub_band_count =
  130|      0|        AUDIO_CODEC_SUBBAND_COUNT_STFT256;
  ------------------
  |  |  161|      0|#define AUDIO_CODEC_SUBBAND_COUNT_STFT256 256
  ------------------
  131|  1.16k|  } else {
  132|  1.16k|    p_audio_in_out_buf->audio_delay_sub_band_samples = 0;
  133|  1.16k|    p_audio_in_out_buf->audio_sub_band_frame_size = 0;
  134|  1.16k|    p_audio_in_out_buf->audio_sub_band_count = 0;
  135|  1.16k|  }
  136|       |
  137|  4.65k|  for (k = 0; k < SEL_DRC_COUNT; k++) {
  ------------------
  |  |   50|  4.65k|#define SEL_DRC_COUNT 3
  ------------------
  |  Branch (137:15): [True: 3.49k, False: 1.16k]
  ------------------
  138|  3.49k|    if (p_drc_params_struct->sel_drc_array[k].drc_instructions_index >= 0) {
  ------------------
  |  Branch (138:9): [True: 208, False: 3.28k]
  ------------------
  139|    208|      ia_drc_instructions_struct* drc_instruction_str =
  140|    208|          &(pstr_drc_config->str_drc_instruction_str
  141|    208|                [p_drc_params_struct->sel_drc_array[k].drc_instructions_index]);
  142|    208|      if (drc_instruction_str->gain_element_count > 0) {
  ------------------
  |  Branch (142:11): [True: 208, False: 0]
  ------------------
  143|    208|        p_drc_gain_dec_structs->drc_gain_buffers.pstr_gain_buf[k]
  144|    208|            .buf_interpolation = (ia_interp_buf_struct*)*mem_ptr;
  145|    208|        *mem_ptr = (pVOID)((SIZE_T)*mem_ptr +
  146|    208|                           IXHEAAC_GET_SIZE_ALIGNED(drc_instruction_str->gain_element_count *
  ------------------
  |  |   87|    208|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  147|    208|                                                        sizeof(ia_interp_buf_struct),
  148|    208|                                                    BYTE_ALIGN_8));
  149|    208|        p_drc_gain_dec_structs->drc_gain_buffers.pstr_gain_buf[k]
  150|    208|            .buf_interpolation_count = drc_instruction_str->gain_element_count;
  151|    208|        for (i = 0;
  152|    624|             i < p_drc_gain_dec_structs->drc_gain_buffers.pstr_gain_buf[k]
  ------------------
  |  Branch (152:14): [True: 416, False: 208]
  ------------------
  153|    624|                     .buf_interpolation_count;
  154|    416|             i++) {
  155|    416|          p_drc_gain_dec_structs->drc_gain_buffers.pstr_gain_buf[k]
  156|    416|              .buf_interpolation[i]
  157|    416|              .str_node.time = 0;
  158|    416|          p_drc_gain_dec_structs->drc_gain_buffers.pstr_gain_buf[k]
  159|    416|              .buf_interpolation[i]
  160|    416|              .prev_node.time = -1;
  161|    416|          p_drc_gain_dec_structs->drc_gain_buffers.pstr_gain_buf[k]
  162|    416|              .buf_interpolation[i]
  163|    416|              .str_node.loc_db_gain = 0.0f;
  164|    416|          p_drc_gain_dec_structs->drc_gain_buffers.pstr_gain_buf[k]
  165|    416|              .buf_interpolation[i]
  166|    416|              .str_node.slope = 0.0f;
  167|       |
  168|  5.28M|          for (j = 0; j < 2 * AUDIO_CODEC_FRAME_SIZE_MAX + MAX_SIGNAL_DELAY;
  ------------------
  |  |   45|  5.28M|#define AUDIO_CODEC_FRAME_SIZE_MAX 4096
  ------------------
                        for (j = 0; j < 2 * AUDIO_CODEC_FRAME_SIZE_MAX + MAX_SIGNAL_DELAY;
  ------------------
  |  |   52|  5.28M|#define MAX_SIGNAL_DELAY 4500
  ------------------
  |  Branch (168:23): [True: 5.27M, False: 416]
  ------------------
  169|  5.27M|               j++) {
  170|  5.27M|            p_drc_gain_dec_structs->drc_gain_buffers.pstr_gain_buf[k]
  171|  5.27M|                .buf_interpolation[i]
  172|  5.27M|                .lpcm_gains[j] = 1.f;
  173|  5.27M|          }
  174|    416|        }
  175|    208|      }
  176|    208|    }
  177|  3.49k|  }
  178|       |
  179|  1.16k|  if (eq_set_id_processed > 0) {
  ------------------
  |  Branch (179:7): [True: 0, False: 1.16k]
  ------------------
  180|      0|    for (i = 0; i < pstr_drc_config->str_drc_config_ext.eq_instructions_count;
  ------------------
  |  Branch (180:17): [True: 0, False: 0]
  ------------------
  181|      0|         i++) {
  182|      0|      if (pstr_drc_config->str_drc_config_ext.str_eq_instructions[i]
  ------------------
  |  Branch (182:11): [True: 0, False: 0]
  ------------------
  183|      0|              .eq_set_id == eq_set_id_processed)
  184|      0|        break;
  185|      0|    }
  186|      0|    if (i == pstr_drc_config->str_drc_config_ext.eq_instructions_count) {
  ------------------
  |  Branch (186:9): [True: 0, False: 0]
  ------------------
  187|      0|      return -1;
  188|      0|    }
  189|       |
  190|      0|    p_drc_gain_dec_structs->eq_set = (ia_eq_set_struct*)*mem_ptr;
  191|      0|    *mem_ptr = (pVOID)((SIZE_T)*mem_ptr +
  192|      0|                       IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_eq_set_struct), BYTE_ALIGN_8));
  ------------------
  |  |   87|      0|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  193|       |
  194|      0|    if (err_code) return (err_code);
  ------------------
  |  Branch (194:9): [True: 0, False: 0]
  ------------------
  195|       |
  196|      0|    err_code = impd_derive_eq_set(
  197|      0|        &pstr_drc_config->str_drc_config_ext.str_eq_coeff,
  198|      0|        &(pstr_drc_config->str_drc_config_ext.str_eq_instructions[i]),
  199|      0|        (FLOAT32)p_drc_gain_dec_structs->ia_drc_params_struct.sample_rate,
  200|      0|        p_drc_gain_dec_structs->ia_drc_params_struct.drc_frame_size,
  201|      0|        p_drc_gain_dec_structs->ia_drc_params_struct.sub_band_domain_mode,
  202|      0|        p_drc_gain_dec_structs->eq_set);
  203|      0|    if (err_code) return (err_code);
  ------------------
  |  Branch (203:9): [True: 0, False: 0]
  ------------------
  204|       |
  205|      0|    impd_get_eq_set_delay(
  206|      0|        p_drc_gain_dec_structs->eq_set,
  207|      0|        &p_drc_gain_dec_structs->ia_drc_params_struct.eq_delay);
  208|      0|  }
  209|       |
  210|  1.37k|  for (i = 0; i < p_drc_params_struct->drc_set_counter; i++) {
  ------------------
  |  Branch (210:15): [True: 208, False: 1.16k]
  ------------------
  211|    208|    ia_drc_instructions_struct* drc_instruction_str;
  212|    208|    drc_instruction_str =
  213|    208|        &(pstr_drc_config->str_drc_instruction_str
  214|    208|              [p_drc_params_struct->sel_drc_array[i].drc_instructions_index]);
  215|    208|    maxMultibandAudioSignalCount =
  216|    208|        max(maxMultibandAudioSignalCount,
  ------------------
  |  |   74|    208|#define max(a, b) (((a) > (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (74:20): [True: 0, False: 208]
  |  |  ------------------
  ------------------
  217|    208|            drc_instruction_str->multiband_audio_sig_count);
  218|    208|  }
  219|       |
  220|  1.16k|  p_drc_gain_dec_structs->audio_band_buffer.non_interleaved_audio = *mem_ptr;
  221|  1.16k|  *mem_ptr =
  222|  1.16k|      (pVOID)((SIZE_T)*mem_ptr +
  223|  1.16k|              IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|  1.16k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  224|  1.16k|                  (maxMultibandAudioSignalCount *
  225|  1.16k|                   sizeof(p_drc_gain_dec_structs->audio_band_buffer.non_interleaved_audio[0])),
  226|  1.16k|                  BYTE_ALIGN_8));
  227|       |
  228|  1.47k|  for (i = 0; i < maxMultibandAudioSignalCount; i++) {
  ------------------
  |  Branch (228:15): [True: 310, False: 1.16k]
  ------------------
  229|    310|    p_drc_gain_dec_structs->audio_band_buffer.non_interleaved_audio[i] =
  230|    310|        *mem_ptr;
  231|    310|    *mem_ptr =
  232|    310|        (pVOID)((SIZE_T)*mem_ptr +
  233|    310|                IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|    310|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  234|    310|                    (p_drc_params_struct->drc_frame_size *
  235|    310|                     sizeof(
  236|    310|                         p_drc_gain_dec_structs->audio_band_buffer.non_interleaved_audio[i][0])),
  237|    310|                    BYTE_ALIGN_8));
  238|    310|  }
  239|  1.16k|  p_drc_gain_dec_structs->audio_band_buffer.multiband_audio_sig_count =
  240|  1.16k|      maxMultibandAudioSignalCount;
  241|  1.16k|  p_drc_gain_dec_structs->audio_band_buffer.frame_size =
  242|  1.16k|      p_drc_params_struct->drc_frame_size;
  243|  1.16k|  ;
  244|       |
  245|  1.16k|  if (p_drc_params_struct->sub_band_domain_mode == SUBBAND_DOMAIN_MODE_OFF &&
  ------------------
  |  |  148|  2.32k|#define SUBBAND_DOMAIN_MODE_OFF 0
  ------------------
  |  Branch (245:7): [True: 1.16k, False: 0]
  ------------------
  246|  1.16k|      p_audio_in_out_buf->audio_delay_samples) {
  ------------------
  |  Branch (246:7): [True: 0, False: 1.16k]
  ------------------
  247|      0|    p_audio_in_out_buf->audio_io_buffer_delayed = *mem_ptr;
  248|      0|    *mem_ptr =
  249|      0|        (pVOID)((SIZE_T)*mem_ptr +
  250|      0|                IXHEAAC_GET_SIZE_ALIGNED((p_audio_in_out_buf->audio_num_chan *
  ------------------
  |  |   87|      0|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  251|      0|                                          sizeof(p_audio_in_out_buf->audio_io_buffer_delayed[0])),
  252|      0|                                         BYTE_ALIGN_8));
  253|      0|    p_audio_in_out_buf->audio_in_out_buf = *mem_ptr;
  254|      0|    *mem_ptr = (pVOID)((SIZE_T)*mem_ptr +
  255|      0|                       IXHEAAC_GET_SIZE_ALIGNED((p_audio_in_out_buf->audio_num_chan *
  ------------------
  |  |   87|      0|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  256|      0|                                                 sizeof(p_audio_in_out_buf->audio_in_out_buf[0])),
  257|      0|                                                BYTE_ALIGN_8));
  258|       |
  259|      0|    for (i = 0; i < p_audio_in_out_buf->audio_num_chan; i++) {
  ------------------
  |  Branch (259:17): [True: 0, False: 0]
  ------------------
  260|      0|      p_audio_in_out_buf->audio_io_buffer_delayed[i] = *mem_ptr;
  261|      0|      *mem_ptr = (pVOID)((SIZE_T)*mem_ptr +
  262|      0|                         IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|      0|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  263|      0|                             ((p_audio_in_out_buf->frame_size +
  264|      0|                               p_audio_in_out_buf->audio_delay_samples) *
  265|      0|                              sizeof(p_audio_in_out_buf->audio_io_buffer_delayed[i][0])),
  266|      0|                             BYTE_ALIGN_8));
  267|      0|      p_audio_in_out_buf->audio_in_out_buf[i] =
  268|      0|          &p_audio_in_out_buf->audio_io_buffer_delayed
  269|      0|               [i][p_audio_in_out_buf->audio_delay_samples];
  270|      0|    }
  271|      0|  }
  272|  1.16k|  if (p_drc_params_struct->sub_band_domain_mode != SUBBAND_DOMAIN_MODE_OFF &&
  ------------------
  |  |  148|  2.32k|#define SUBBAND_DOMAIN_MODE_OFF 0
  ------------------
  |  Branch (272:7): [True: 0, False: 1.16k]
  ------------------
  273|      0|      p_audio_in_out_buf->audio_delay_sub_band_samples) {
  ------------------
  |  Branch (273:7): [True: 0, False: 0]
  ------------------
  274|      0|    p_audio_in_out_buf->audio_buffer_delayed_real = *mem_ptr;
  275|      0|    *mem_ptr =
  276|      0|        (pVOID)((SIZE_T)*mem_ptr + IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|      0|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  277|      0|                                       (p_audio_in_out_buf->audio_num_chan *
  278|      0|                                        sizeof(p_audio_in_out_buf->audio_buffer_delayed_real[0])),
  279|      0|                                       BYTE_ALIGN_8));
  280|      0|    p_audio_in_out_buf->audio_buffer_delayed_imag = *mem_ptr;
  281|      0|    *mem_ptr =
  282|      0|        (pVOID)((SIZE_T)*mem_ptr + IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|      0|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  283|      0|                                       (p_audio_in_out_buf->audio_num_chan *
  284|      0|                                        sizeof(p_audio_in_out_buf->audio_buffer_delayed_imag[0])),
  285|      0|                                       BYTE_ALIGN_8));
  286|      0|    p_audio_in_out_buf->audio_real_buff = *mem_ptr;
  287|      0|    *mem_ptr = (pVOID)((SIZE_T)*mem_ptr +
  288|      0|                       IXHEAAC_GET_SIZE_ALIGNED((p_audio_in_out_buf->audio_num_chan *
  ------------------
  |  |   87|      0|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  289|      0|                                                 sizeof(p_audio_in_out_buf->audio_real_buff[0])),
  290|      0|                                                BYTE_ALIGN_8));
  291|      0|    p_audio_in_out_buf->audio_imag_buff = *mem_ptr;
  292|      0|    *mem_ptr = (pVOID)((SIZE_T)*mem_ptr +
  293|      0|                       IXHEAAC_GET_SIZE_ALIGNED((p_audio_in_out_buf->audio_num_chan *
  ------------------
  |  |   87|      0|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  294|      0|                                                 sizeof(p_audio_in_out_buf->audio_imag_buff[0])),
  295|      0|                                                BYTE_ALIGN_8));
  296|       |
  297|      0|    for (i = 0; i < p_audio_in_out_buf->audio_num_chan; i++) {
  ------------------
  |  Branch (297:17): [True: 0, False: 0]
  ------------------
  298|      0|      p_audio_in_out_buf->audio_buffer_delayed_real[i] = *mem_ptr;
  299|      0|      *mem_ptr = (pVOID)((SIZE_T)*mem_ptr +
  300|      0|                         IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|      0|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  301|      0|                             ((p_audio_in_out_buf->audio_sub_band_frame_size +
  302|      0|                               p_audio_in_out_buf->audio_delay_sub_band_samples) *
  303|      0|                              sizeof(p_audio_in_out_buf->audio_buffer_delayed_real[i][0])),
  304|      0|                             BYTE_ALIGN_8));
  305|      0|      p_audio_in_out_buf->audio_buffer_delayed_imag[i] = *mem_ptr;
  306|      0|      *mem_ptr = (pVOID)((SIZE_T)*mem_ptr +
  307|      0|                         IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|      0|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  308|      0|                             ((p_audio_in_out_buf->audio_sub_band_frame_size +
  309|      0|                               p_audio_in_out_buf->audio_delay_sub_band_samples) *
  310|      0|                              sizeof(p_audio_in_out_buf->audio_buffer_delayed_imag[i][0])),
  311|      0|                             BYTE_ALIGN_8));
  312|       |
  313|      0|      p_audio_in_out_buf->audio_real_buff[i] =
  314|      0|          &p_audio_in_out_buf->audio_buffer_delayed_real
  315|      0|               [i][p_audio_in_out_buf->audio_delay_sub_band_samples *
  316|      0|                   p_audio_in_out_buf->audio_sub_band_count];
  317|      0|      p_audio_in_out_buf->audio_imag_buff[i] =
  318|      0|          &p_audio_in_out_buf->audio_buffer_delayed_imag
  319|      0|               [i][p_audio_in_out_buf->audio_delay_sub_band_samples *
  320|      0|                   p_audio_in_out_buf->audio_sub_band_count];
  321|      0|    }
  322|      0|  }
  323|       |
  324|  1.16k|  return err_code;
  325|  1.16k|}
impd_drc_process_time_domain:
  331|  33.2k|    FLOAT32 boost, FLOAT32 compress, WORD32 drc_characteristic_target) {
  332|  33.2k|  WORD32 sel_drc_index;
  333|  33.2k|  IA_ERRORCODE err_code = 0;
  334|  33.2k|  WORD32 passThru;
  335|  33.2k|  ia_drc_instructions_struct* str_drc_instruction_str =
  336|  33.2k|      pstr_drc_config->str_drc_instruction_str;
  337|       |
  338|  33.2k|  if (p_drc_gain_dec_structs->eq_set) {
  ------------------
  |  Branch (338:7): [True: 0, False: 33.2k]
  ------------------
  339|      0|    WORD32 ch;
  340|      0|    FLOAT32* audio_channel;
  341|      0|    for (ch = 0; ch < p_drc_gain_dec_structs->eq_set->audio_num_chan; ch++) {
  ------------------
  |  Branch (341:18): [True: 0, False: 0]
  ------------------
  342|      0|      audio_channel = audio_in_out_buf[ch];
  343|       |
  344|      0|      err_code = impd_process_eq_set_time_domain(
  345|      0|          p_drc_gain_dec_structs->eq_set, ch, audio_channel, audio_channel,
  346|      0|          p_drc_gain_dec_structs->ia_drc_params_struct.drc_frame_size);
  347|      0|      if (err_code) return (err_code);
  ------------------
  |  Branch (347:11): [True: 0, False: 0]
  ------------------
  348|      0|    }
  349|      0|  }
  350|       |
  351|  33.2k|  impd_store_audio_io_buffer_time(audio_in_out_buf,
  352|  33.2k|                                  &p_drc_gain_dec_structs->audio_in_out_buf);
  353|       |
  354|  33.2k|  if (pstr_drc_config->apply_drc) {
  ------------------
  |  Branch (354:7): [True: 16.5k, False: 16.7k]
  ------------------
  355|  16.5k|    for (sel_drc_index = 0;
  356|  20.9k|         sel_drc_index <
  ------------------
  |  Branch (356:10): [True: 5.12k, False: 15.8k]
  ------------------
  357|  20.9k|         p_drc_gain_dec_structs->ia_drc_params_struct.drc_set_counter;
  358|  16.5k|         sel_drc_index++) {
  359|  5.12k|      err_code = impd_get_drc_gain(
  360|  5.12k|          p_drc_gain_dec_structs, pstr_drc_config, pstr_drc_gain, compress,
  361|  5.12k|          boost, drc_characteristic_target, loudness_normalization_gain_db,
  362|  5.12k|          sel_drc_index, &p_drc_gain_dec_structs->drc_gain_buffers);
  363|  5.12k|      if (err_code != IA_NO_ERROR) return (err_code);
  ------------------
  |  |   36|  5.12k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (363:11): [True: 630, False: 4.49k]
  ------------------
  364|  5.12k|    }
  365|       |
  366|  15.8k|    if (p_drc_gain_dec_structs->ia_drc_params_struct.drc_set_counter == 0) {
  ------------------
  |  Branch (366:9): [True: 11.3k, False: 4.49k]
  ------------------
  367|  11.3k|      impd_retrieve_audio_io_buffer_time(
  368|  11.3k|          audio_in_out_buf, &p_drc_gain_dec_structs->audio_in_out_buf);
  369|       |
  370|  11.3k|    } else {
  371|  4.49k|      for (sel_drc_index = 0;
  372|  8.99k|           sel_drc_index <
  ------------------
  |  Branch (372:12): [True: 4.49k, False: 4.49k]
  ------------------
  373|  8.99k|           p_drc_gain_dec_structs->ia_drc_params_struct.drc_set_counter;
  374|  4.49k|           sel_drc_index++) {
  375|  4.49k|        if (p_drc_gain_dec_structs->ia_drc_params_struct
  ------------------
  |  Branch (375:13): [True: 0, False: 4.49k]
  ------------------
  376|  4.49k|                .multiband_sel_drc_idx == sel_drc_index) {
  377|      0|          passThru = 0;
  378|  4.49k|        } else {
  379|  4.49k|          passThru = 1;
  380|  4.49k|        }
  381|  4.49k|        err_code = impd_filter_banks_process(
  382|  4.49k|            str_drc_instruction_str,
  383|  4.49k|            p_drc_gain_dec_structs->ia_drc_params_struct
  384|  4.49k|                .sel_drc_array[sel_drc_index]
  385|  4.49k|                .drc_instructions_index,
  386|  4.49k|            &p_drc_gain_dec_structs->ia_drc_params_struct,
  387|  4.49k|            p_drc_gain_dec_structs->audio_in_out_buf.audio_io_buffer_delayed,
  388|  4.49k|            &p_drc_gain_dec_structs->audio_band_buffer,
  389|  4.49k|            &p_drc_gain_dec_structs->ia_filter_banks_struct, passThru);
  390|  4.49k|        if (err_code != IA_NO_ERROR) return (err_code);
  ------------------
  |  |   36|  4.49k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (390:13): [True: 0, False: 4.49k]
  ------------------
  391|       |
  392|  4.49k|        impd_apply_gains_and_add(
  393|  4.49k|            str_drc_instruction_str,
  394|  4.49k|            p_drc_gain_dec_structs->ia_drc_params_struct
  395|  4.49k|                .sel_drc_array[sel_drc_index]
  396|  4.49k|                .drc_instructions_index,
  397|  4.49k|            &p_drc_gain_dec_structs->ia_drc_params_struct,
  398|  4.49k|            &(p_drc_gain_dec_structs->drc_gain_buffers
  399|  4.49k|                  .pstr_gain_buf[sel_drc_index]),
  400|  4.49k|            p_drc_gain_dec_structs->shape_filter_block,
  401|  4.49k|            p_drc_gain_dec_structs->audio_band_buffer.non_interleaved_audio,
  402|  4.49k|            audio_in_out_buf, 1);
  403|  4.49k|      }
  404|  4.49k|    }
  405|  15.8k|  }
  406|       |
  407|  32.6k|  impd_advance_audio_io_buffer_time(&p_drc_gain_dec_structs->audio_in_out_buf);
  408|       |
  409|  32.6k|  return err_code;
  410|  33.2k|}
impd_get_parametric_drc_delay:
  415|  1.16k|    WORD32* parametric_drc_delay_max) {
  416|  1.16k|  *parametric_drc_delay =
  417|  1.16k|      p_drc_gain_dec_structs->ia_drc_params_struct.parametric_drc_delay;
  418|       |
  419|  1.16k|  if (pstr_drc_config->str_drc_config_ext.parametric_drc_present &&
  ------------------
  |  Branch (419:7): [True: 0, False: 1.16k]
  ------------------
  420|      0|      pstr_drc_config->str_drc_config_ext.str_drc_coeff_param_drc
  ------------------
  |  Branch (420:7): [True: 0, False: 0]
  ------------------
  421|      0|          .parametric_drc_delay_max_present) {
  422|      0|    *parametric_drc_delay_max =
  423|      0|        pstr_drc_config->str_drc_config_ext.str_drc_coeff_param_drc
  424|      0|            .parametric_drc_delay_max;
  425|  1.16k|  } else if (pstr_drc_config->str_drc_config_ext.parametric_drc_present == 0) {
  ------------------
  |  Branch (425:14): [True: 1.16k, False: 0]
  ------------------
  426|  1.16k|    *parametric_drc_delay_max = 0;
  427|  1.16k|  } else {
  428|      0|    *parametric_drc_delay_max = -1;
  429|      0|  }
  430|       |
  431|  1.16k|  return;
  432|  1.16k|}
impd_get_eq_delay:
  436|  1.16k|                       WORD32* eq_delay_max) {
  437|  1.16k|  *eq_delay = p_drc_gain_dec_structs->ia_drc_params_struct.eq_delay;
  438|       |
  439|  1.16k|  if (pstr_drc_config->str_drc_config_ext.eq_flag &&
  ------------------
  |  Branch (439:7): [True: 0, False: 1.16k]
  ------------------
  440|      0|      pstr_drc_config->str_drc_config_ext.str_eq_coeff.eq_delay_max_present) {
  ------------------
  |  Branch (440:7): [True: 0, False: 0]
  ------------------
  441|      0|    *eq_delay_max =
  442|      0|        pstr_drc_config->str_drc_config_ext.str_eq_coeff.eq_delay_max;
  443|  1.16k|  } else if (pstr_drc_config->str_drc_config_ext.eq_flag == 0) {
  ------------------
  |  Branch (443:14): [True: 1.16k, False: 0]
  ------------------
  444|  1.16k|    *eq_delay_max = 0;
  445|  1.16k|  } else {
  446|      0|    *eq_delay_max = -1;
  447|      0|  }
  448|       |
  449|  1.16k|  return;
  450|  1.16k|}

impd_drc_set_default_config:
   97|  14.2k|IA_ERRORCODE impd_drc_set_default_config(ia_drc_api_struct *p_obj_drc) {
   98|  14.2k|  memset(p_obj_drc, 0, sizeof(*p_obj_drc));
   99|  14.2k|  p_obj_drc->str_config.bitstream_file_format = 1;
  100|  14.2k|  p_obj_drc->str_config.dec_type = 0;
  101|  14.2k|  p_obj_drc->str_config.sub_band_domain_mode = 0;
  102|  14.2k|  p_obj_drc->str_config.sub_band_count = 0;
  103|  14.2k|  p_obj_drc->str_config.sub_band_down_sampling_factor = 0;
  104|  14.2k|  p_obj_drc->str_config.sampling_rate = 0;
  105|  14.2k|  p_obj_drc->str_config.frame_size = 1024;
  106|  14.2k|  p_obj_drc->str_config.num_ch_in = -1;
  107|  14.2k|  p_obj_drc->str_config.num_ch_out = -1;
  108|  14.2k|  p_obj_drc->str_config.control_parameter_index = -1;
  109|  14.2k|  p_obj_drc->str_config.peak_limiter = 0;
  110|  14.2k|  p_obj_drc->str_config.delay_mode = 0;
  111|  14.2k|  p_obj_drc->str_config.interface_bitstream_present = 1;
  112|  14.2k|  p_obj_drc->str_config.gain_delay_samples = 0;
  113|  14.2k|  p_obj_drc->str_config.absorb_delay_on = 1;
  114|  14.2k|  p_obj_drc->str_config.subband_domain_io_flag = 0;
  115|  14.2k|  p_obj_drc->str_bit_handler.gain_stream_flag = 1;
  116|  14.2k|  p_obj_drc->str_config.constant_delay_on = 0;
  117|  14.2k|  p_obj_drc->str_config.audio_delay_samples = 0;
  118|  14.2k|  p_obj_drc->str_config.effect_type = 0;
  119|  14.2k|  p_obj_drc->str_config.target_loudness = -24;
  120|  14.2k|  p_obj_drc->str_config.loud_norm_flag = 0;
  121|  14.2k|  p_obj_drc->str_config.album_mode = 0;
  122|  14.2k|  p_obj_drc->str_config.boost = 1.0f;
  123|  14.2k|  p_obj_drc->str_config.compress = 1.0f;
  124|  14.2k|  p_obj_drc->str_config.boost_set = 0;
  125|  14.2k|  p_obj_drc->str_config.compress_set = 0;
  126|  14.2k|  memset(&p_obj_drc->str_bit_handler, 0, sizeof(p_obj_drc->str_bit_handler));
  127|       |
  128|  14.2k|  return IA_NO_ERROR;
  ------------------
  |  |   36|  14.2k|#define IA_NO_ERROR 0x00000000
  ------------------
  129|  14.2k|}
impd_drc_set_default_bitstream_config:
  132|  1.22k|    ia_drc_config *pstr_drc_config) {
  133|  1.22k|  WORD32 i;
  134|       |
  135|  1.22k|  pstr_drc_config->sample_rate_present = 0;
  136|  1.22k|  pstr_drc_config->sampling_rate = 0;
  137|  1.22k|  pstr_drc_config->dwnmix_instructions_count = 0;
  138|  1.22k|  pstr_drc_config->drc_coefficients_drc_count = 1;
  139|  1.22k|  pstr_drc_config->drc_instructions_uni_drc_count = 4;
  140|  1.22k|  pstr_drc_config->drc_instructions_count_plus = 5;
  141|  1.22k|  pstr_drc_config->drc_description_basic_present = 0;
  142|  1.22k|  pstr_drc_config->drc_coefficients_basic_count = 0;
  143|  1.22k|  pstr_drc_config->drc_instructions_basic_count = 0;
  144|  1.22k|  pstr_drc_config->drc_config_ext_present = 1;
  145|  1.22k|  pstr_drc_config->apply_drc = 0;
  146|  1.22k|  pstr_drc_config->str_drc_config_ext.drc_config_ext_type[0] = 2;
  147|  1.22k|  pstr_drc_config->str_drc_config_ext.ext_bit_size[0] = 345;
  148|  1.22k|  pstr_drc_config->str_drc_config_ext.parametric_drc_present = 0;
  149|  1.22k|  pstr_drc_config->str_drc_config_ext.drc_extension_v1_present = 1;
  150|  1.22k|  pstr_drc_config->str_p_loc_drc_coefficients_uni_drc[0].version = 1;
  151|  1.22k|  pstr_drc_config->str_p_loc_drc_coefficients_uni_drc[0].drc_location = 1;
  152|  1.22k|  pstr_drc_config->str_p_loc_drc_coefficients_uni_drc[0].gain_set_count = 4;
  153|  1.22k|  for (i = 0;
  154|  6.13k|       i <
  ------------------
  |  Branch (154:8): [True: 4.90k, False: 1.22k]
  ------------------
  155|  6.13k|       pstr_drc_config->str_p_loc_drc_coefficients_uni_drc[0].gain_set_count;
  156|  4.90k|       i++) {
  157|  4.90k|    pstr_drc_config->str_p_loc_drc_coefficients_uni_drc[0]
  158|  4.90k|        .gain_set_params[i]
  159|  4.90k|        .gain_interpolation_type = 1;
  160|  4.90k|    pstr_drc_config->str_p_loc_drc_coefficients_uni_drc[0]
  161|  4.90k|        .gain_set_params[i]
  162|  4.90k|        .band_count = 1;
  163|  4.90k|  }
  164|  1.22k|  pstr_drc_config->str_p_loc_drc_coefficients_uni_drc[0].gain_sequence_count =
  165|  1.22k|      4;
  166|  1.22k|  pstr_drc_config->str_p_loc_drc_coefficients_uni_drc[0]
  167|  1.22k|      .gain_set_params_index_for_gain_sequence[0] = 0;
  168|  1.22k|  pstr_drc_config->str_p_loc_drc_coefficients_uni_drc[0]
  169|  1.22k|      .gain_set_params_index_for_gain_sequence[1] = 1;
  170|  1.22k|  pstr_drc_config->str_p_loc_drc_coefficients_uni_drc[0]
  171|  1.22k|      .gain_set_params_index_for_gain_sequence[2] = 2;
  172|  1.22k|  pstr_drc_config->str_p_loc_drc_coefficients_uni_drc[0]
  173|  1.22k|      .gain_set_params_index_for_gain_sequence[3] = 3;
  174|  1.22k|  pstr_drc_config->str_p_loc_drc_coefficients_uni_drc[0].gain_set_count_plus =
  175|  1.22k|      4;
  176|  1.22k|  pstr_drc_config->str_drc_instruction_str[0].drc_set_id = 1;
  177|  1.22k|  pstr_drc_config->str_drc_instruction_str[0].drc_set_complexity_level = 2;
  178|  1.22k|  pstr_drc_config->str_drc_instruction_str[0].drc_location = 1;
  179|  1.22k|  pstr_drc_config->str_drc_instruction_str[0].dwnmix_id_count = 1;
  180|  1.22k|  pstr_drc_config->str_drc_instruction_str[0].drc_set_effect = 1;
  181|  1.22k|  pstr_drc_config->str_drc_instruction_str[0].gain_set_index[1] = 1;
  182|  1.22k|  pstr_drc_config->str_drc_instruction_str[0]
  183|  1.22k|      .drc_set_target_loudness_value_lower = -63;
  184|  1.22k|  pstr_drc_config->str_drc_instruction_str[0].num_drc_ch_groups = 2;
  185|  1.22k|  pstr_drc_config->str_drc_instruction_str[0]
  186|  1.22k|      .gain_set_index_for_channel_group[1] = 1;
  187|  1.22k|  pstr_drc_config->str_drc_instruction_str[0].band_count_of_ch_group[0] = 1;
  188|  1.22k|  pstr_drc_config->str_drc_instruction_str[0].band_count_of_ch_group[1] = 1;
  189|  1.22k|  pstr_drc_config->str_drc_instruction_str[0]
  190|  1.22k|      .gain_interpolation_type_for_channel_group[0] = 1;
  191|  1.22k|  pstr_drc_config->str_drc_instruction_str[0]
  192|  1.22k|      .gain_interpolation_type_for_channel_group[1] = 1;
  193|  1.22k|  pstr_drc_config->str_drc_instruction_str[0]
  194|  1.22k|      .time_delta_min_for_channel_group[0] = 32;
  195|  1.22k|  pstr_drc_config->str_drc_instruction_str[0]
  196|  1.22k|      .time_delta_min_for_channel_group[1] = 32;
  197|  1.22k|  pstr_drc_config->str_drc_instruction_str[0].channel_group_of_ch[1] = 1;
  198|  1.22k|  pstr_drc_config->str_drc_instruction_str[0].gain_element_count = 2;
  199|       |
  200|  1.22k|  pstr_drc_config->str_drc_instruction_str[1].drc_set_id = 2;
  201|  1.22k|  pstr_drc_config->str_drc_instruction_str[1].drc_set_complexity_level = 2;
  202|  1.22k|  pstr_drc_config->str_drc_instruction_str[1].drc_location = 1;
  203|  1.22k|  pstr_drc_config->str_drc_instruction_str[1].dwnmix_id_count = 1;
  204|  1.22k|  pstr_drc_config->str_drc_instruction_str[1].drc_set_effect = 2;
  205|  1.22k|  pstr_drc_config->str_drc_instruction_str[1].gain_set_index[0] = 1;
  206|  1.22k|  pstr_drc_config->str_drc_instruction_str[1].gain_set_index[1] = 2;
  207|  1.22k|  pstr_drc_config->str_drc_instruction_str[1]
  208|  1.22k|      .drc_set_target_loudness_value_lower = -63;
  209|  1.22k|  pstr_drc_config->str_drc_instruction_str[1].num_drc_ch_groups = 2;
  210|  1.22k|  pstr_drc_config->str_drc_instruction_str[1]
  211|  1.22k|      .gain_set_index_for_channel_group[0] = 1;
  212|  1.22k|  pstr_drc_config->str_drc_instruction_str[1]
  213|  1.22k|      .gain_set_index_for_channel_group[1] = 2;
  214|  1.22k|  pstr_drc_config->str_drc_instruction_str[1].band_count_of_ch_group[0] = 1;
  215|  1.22k|  pstr_drc_config->str_drc_instruction_str[1].band_count_of_ch_group[1] = 1;
  216|  1.22k|  pstr_drc_config->str_drc_instruction_str[1]
  217|  1.22k|      .gain_interpolation_type_for_channel_group[0] = 1;
  218|  1.22k|  pstr_drc_config->str_drc_instruction_str[1]
  219|  1.22k|      .gain_interpolation_type_for_channel_group[1] = 1;
  220|  1.22k|  pstr_drc_config->str_drc_instruction_str[1]
  221|  1.22k|      .time_delta_min_for_channel_group[0] = 32;
  222|  1.22k|  pstr_drc_config->str_drc_instruction_str[1]
  223|  1.22k|      .time_delta_min_for_channel_group[1] = 32;
  224|  1.22k|  pstr_drc_config->str_drc_instruction_str[1].channel_group_of_ch[1] = 1;
  225|  1.22k|  pstr_drc_config->str_drc_instruction_str[1].gain_element_count = 2;
  226|       |
  227|  1.22k|  pstr_drc_config->str_drc_instruction_str[2].drc_set_id = 3;
  228|  1.22k|  pstr_drc_config->str_drc_instruction_str[2].drc_set_complexity_level = 2;
  229|  1.22k|  pstr_drc_config->str_drc_instruction_str[2].drc_location = 1;
  230|  1.22k|  pstr_drc_config->str_drc_instruction_str[2].dwnmix_id_count = 1;
  231|  1.22k|  pstr_drc_config->str_drc_instruction_str[2].drc_set_effect = 4;
  232|  1.22k|  pstr_drc_config->str_drc_instruction_str[2].gain_set_index[0] = 2;
  233|  1.22k|  pstr_drc_config->str_drc_instruction_str[2].gain_set_index[1] = 3;
  234|  1.22k|  pstr_drc_config->str_drc_instruction_str[2]
  235|  1.22k|      .drc_set_target_loudness_value_lower = -63;
  236|  1.22k|  pstr_drc_config->str_drc_instruction_str[2].num_drc_ch_groups = 2;
  237|  1.22k|  pstr_drc_config->str_drc_instruction_str[2]
  238|  1.22k|      .gain_set_index_for_channel_group[0] = 2;
  239|  1.22k|  pstr_drc_config->str_drc_instruction_str[2]
  240|  1.22k|      .gain_set_index_for_channel_group[1] = 3;
  241|  1.22k|  pstr_drc_config->str_drc_instruction_str[2].band_count_of_ch_group[0] = 1;
  242|  1.22k|  pstr_drc_config->str_drc_instruction_str[2].band_count_of_ch_group[1] = 1;
  243|  1.22k|  pstr_drc_config->str_drc_instruction_str[2]
  244|  1.22k|      .gain_interpolation_type_for_channel_group[0] = 1;
  245|  1.22k|  pstr_drc_config->str_drc_instruction_str[2]
  246|  1.22k|      .gain_interpolation_type_for_channel_group[1] = 1;
  247|  1.22k|  pstr_drc_config->str_drc_instruction_str[2]
  248|  1.22k|      .time_delta_min_for_channel_group[0] = 32;
  249|  1.22k|  pstr_drc_config->str_drc_instruction_str[2]
  250|  1.22k|      .time_delta_min_for_channel_group[1] = 32;
  251|  1.22k|  pstr_drc_config->str_drc_instruction_str[2].channel_group_of_ch[1] = 1;
  252|  1.22k|  pstr_drc_config->str_drc_instruction_str[2].gain_element_count = 2;
  253|       |
  254|  1.22k|  pstr_drc_config->str_drc_instruction_str[3].drc_set_id = 4;
  255|  1.22k|  pstr_drc_config->str_drc_instruction_str[3].drc_set_complexity_level = 2;
  256|  1.22k|  pstr_drc_config->str_drc_instruction_str[3].drc_location = 1;
  257|  1.22k|  pstr_drc_config->str_drc_instruction_str[3].dwnmix_id_count = 1;
  258|  1.22k|  pstr_drc_config->str_drc_instruction_str[3].drc_set_effect = 32;
  259|  1.22k|  pstr_drc_config->str_drc_instruction_str[3].gain_set_index[0] = 3;
  260|  1.22k|  pstr_drc_config->str_drc_instruction_str[3].gain_set_index[1] = 0;
  261|  1.22k|  pstr_drc_config->str_drc_instruction_str[3]
  262|  1.22k|      .drc_set_target_loudness_value_lower = -63;
  263|  1.22k|  pstr_drc_config->str_drc_instruction_str[3].num_drc_ch_groups = 2;
  264|  1.22k|  pstr_drc_config->str_drc_instruction_str[3]
  265|  1.22k|      .gain_set_index_for_channel_group[0] = 3;
  266|  1.22k|  pstr_drc_config->str_drc_instruction_str[3]
  267|  1.22k|      .gain_set_index_for_channel_group[1] = 0;
  268|  1.22k|  pstr_drc_config->str_drc_instruction_str[3].band_count_of_ch_group[0] = 1;
  269|  1.22k|  pstr_drc_config->str_drc_instruction_str[3].band_count_of_ch_group[1] = 1;
  270|  1.22k|  pstr_drc_config->str_drc_instruction_str[3]
  271|  1.22k|      .gain_interpolation_type_for_channel_group[0] = 1;
  272|  1.22k|  pstr_drc_config->str_drc_instruction_str[3]
  273|  1.22k|      .gain_interpolation_type_for_channel_group[1] = 1;
  274|  1.22k|  pstr_drc_config->str_drc_instruction_str[3]
  275|  1.22k|      .time_delta_min_for_channel_group[0] = 32;
  276|  1.22k|  pstr_drc_config->str_drc_instruction_str[3]
  277|  1.22k|      .time_delta_min_for_channel_group[1] = 32;
  278|  1.22k|  pstr_drc_config->str_drc_instruction_str[3].channel_group_of_ch[1] = 1;
  279|  1.22k|  pstr_drc_config->str_drc_instruction_str[3].gain_element_count = 2;
  280|       |
  281|  1.22k|  pstr_drc_config->str_drc_instruction_str[4].drc_set_id = -1;
  282|  1.22k|  pstr_drc_config->str_drc_instruction_str[4].dwnmix_id_count = 1;
  283|  1.22k|  pstr_drc_config->channel_layout.base_channel_count = 2;
  284|       |
  285|  1.22k|  return IA_NO_ERROR;
  ------------------
  |  |   36|  1.22k|#define IA_NO_ERROR 0x00000000
  ------------------
  286|  1.22k|}
impd_drc_set_struct_pointer:
  288|  12.4k|IA_ERRORCODE impd_drc_set_struct_pointer(ia_drc_api_struct *p_obj_drc) {
  289|  12.4k|  pUWORD8 persistent_ptr = (pUWORD8)p_obj_drc->p_state->persistent_ptr;
  290|       |
  291|  12.4k|  UWORD64 persistent_size_consumed = 0;
  292|  12.4k|  p_obj_drc->str_payload.pstr_bitstream_dec = (ia_drc_bits_dec_struct *)persistent_ptr;
  293|  12.4k|  persistent_ptr += IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_drc_bits_dec_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  294|       |
  295|  12.4k|  p_obj_drc->str_payload.pstr_gain_dec[0] = (ia_drc_gain_dec_struct *)persistent_ptr;
  296|  12.4k|  persistent_ptr += IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_drc_gain_dec_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  297|       |
  298|  12.4k|  p_obj_drc->str_payload.pstr_gain_dec[1] = (ia_drc_gain_dec_struct *)persistent_ptr;
  299|  12.4k|  persistent_ptr += IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_drc_gain_dec_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  300|       |
  301|  12.4k|  p_obj_drc->str_payload.pstr_loudness_info = (ia_drc_loudness_info_set_struct *)persistent_ptr;
  302|  12.4k|  persistent_ptr +=
  303|  12.4k|      IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_drc_loudness_info_set_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  304|       |
  305|  12.4k|  p_obj_drc->str_payload.pstr_drc_gain = (ia_drc_gain_struct *)persistent_ptr;
  306|  12.4k|  persistent_ptr += IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_drc_gain_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  307|       |
  308|  12.4k|  p_obj_drc->str_payload.pstr_drc_interface = (ia_drc_interface_struct *)persistent_ptr;
  309|  12.4k|  persistent_ptr += IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_drc_interface_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  310|       |
  311|  12.4k|  p_obj_drc->str_payload.pstr_drc_config = (ia_drc_config *)persistent_ptr;
  312|  12.4k|  persistent_ptr += IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_drc_config), BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  313|       |
  314|  12.4k|  p_obj_drc->str_payload.pstr_selection_proc = (ia_drc_sel_pro_struct *)persistent_ptr;
  315|  12.4k|  persistent_ptr += IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_drc_sel_pro_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  316|       |
  317|  12.4k|  p_obj_drc->str_bit_handler.it_bit_buf = (UWORD8 *)persistent_ptr;
  318|  12.4k|  persistent_ptr += IXHEAAC_GET_SIZE_ALIGNED(MAX_DRC_BS_BUF_SIZE, BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  319|       |
  320|  12.4k|  p_obj_drc->str_payload.pstr_drc_sel_proc_params =
  321|  12.4k|      (ia_drc_sel_proc_params_struct *)persistent_ptr;
  322|  12.4k|  persistent_ptr += IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_drc_sel_proc_params_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  323|       |
  324|  12.4k|  p_obj_drc->str_payload.pstr_drc_sel_proc_output =
  325|  12.4k|      (ia_drc_sel_proc_output_struct *)persistent_ptr;
  326|  12.4k|  persistent_ptr += IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_drc_sel_proc_output_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  327|       |
  328|  12.4k|  p_obj_drc->str_bit_handler.bitstream_drc_config = (UWORD8 *)persistent_ptr;
  329|  12.4k|  persistent_ptr += IXHEAAC_GET_SIZE_ALIGNED(MAX_BS_BUF_SIZE, BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  330|       |
  331|  12.4k|  p_obj_drc->str_bit_handler.bitstream_loudness_info = (UWORD8 *)persistent_ptr;
  332|  12.4k|  persistent_ptr += IXHEAAC_GET_SIZE_ALIGNED(MAX_BS_BUF_SIZE, BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  333|       |
  334|  12.4k|  p_obj_drc->str_bit_handler.bitstream_unidrc_interface = (UWORD8 *)persistent_ptr;
  335|  12.4k|  persistent_ptr += IXHEAAC_GET_SIZE_ALIGNED(MAX_BS_BUF_SIZE, BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  336|       |
  337|  12.4k|  p_obj_drc->str_payload.pstr_peak_limiter = (ia_drc_peak_limiter_struct *)persistent_ptr;
  338|  12.4k|  persistent_ptr += IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_drc_peak_limiter_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  339|       |
  340|  12.4k|  p_obj_drc->str_payload.pstr_peak_limiter->buffer = (FLOAT32 *)persistent_ptr;
  341|  12.4k|  persistent_ptr += IXHEAAC_GET_SIZE_ALIGNED(PEAK_LIM_BUF_SIZE, BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  342|       |
  343|  12.4k|  p_obj_drc->str_payload.pstr_qmf_filter = (ia_drc_qmf_filt_struct *)persistent_ptr;
  344|  12.4k|  persistent_ptr += IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_drc_qmf_filt_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  345|       |
  346|  12.4k|  p_obj_drc->str_payload.pstr_qmf_filter->ana_buff = (FLOAT64 *)persistent_ptr;
  347|  12.4k|  persistent_ptr += IXHEAAC_GET_SIZE_ALIGNED(ANALY_BUF_SIZE, BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  348|       |
  349|  12.4k|  p_obj_drc->str_payload.pstr_qmf_filter->syn_buff = (FLOAT64 *)persistent_ptr;
  350|  12.4k|  persistent_ptr += IXHEAAC_GET_SIZE_ALIGNED(SYNTH_BUF_SIZE, BYTE_ALIGN_8);
  ------------------
  |  |   87|  12.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  351|       |
  352|  12.4k|  persistent_size_consumed =
  353|  12.4k|      (UWORD64)(persistent_ptr - (pUWORD8)p_obj_drc->p_state->persistent_ptr);
  354|       |
  355|  12.4k|  if ((UWORD64)p_obj_drc->p_mem_info[IA_MEMTYPE_PERSIST].ui_size <
  ------------------
  |  |   45|  12.4k|#define IA_MEMTYPE_PERSIST 0x00
  ------------------
  |  Branch (355:7): [True: 0, False: 12.4k]
  ------------------
  356|  12.4k|      persistent_size_consumed)
  357|      0|    return IA_FATAL_ERROR;
  ------------------
  |  |   38|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
  358|       |
  359|  12.4k|  p_obj_drc->p_state->persistent_ptr = (pVOID)persistent_ptr;
  360|  12.4k|  return IA_NO_ERROR;
  ------------------
  |  |   36|  12.4k|#define IA_NO_ERROR 0x00000000
  ------------------
  361|  12.4k|}
impd_drc_init:
  382|  1.54k|IA_ERRORCODE impd_drc_init(ia_drc_api_struct *p_obj_drc) {
  383|  1.54k|  IA_ERRORCODE err_code = IA_NO_ERROR;
  ------------------
  |  |   36|  1.54k|#define IA_NO_ERROR 0x00000000
  ------------------
  384|  1.54k|  WORD32 i, j;
  385|       |
  386|  1.54k|  pVOID persistent_ptr = p_obj_drc->p_state->persistent_ptr;
  387|       |
  388|  1.54k|  WORD32 decDownmixIdList[NUM_GAIN_DEC_INSTANCES] = {0, 4};
  389|       |
  390|  1.54k|  p_obj_drc->p_state->delay_in_output = 0;
  391|  1.54k|  p_obj_drc->str_payload.pstr_selection_proc->first_frame = 1;
  392|       |
  393|  1.54k|  impd_create_init_bit_buf(&p_obj_drc->str_bit_buf,
  394|  1.54k|                           p_obj_drc->str_bit_handler.it_bit_buf,
  395|  1.54k|                           p_obj_drc->str_bit_handler.num_bytes_bs / 8);
  396|       |
  397|  1.54k|  p_obj_drc->pstr_bit_buf = &p_obj_drc->str_bit_buf;
  398|       |
  399|  1.54k|  err_code = impd_init_drc_bitstream_dec(
  400|  1.54k|      p_obj_drc->str_payload.pstr_bitstream_dec,
  401|  1.54k|      p_obj_drc->str_config.sampling_rate, p_obj_drc->str_config.frame_size,
  402|  1.54k|      p_obj_drc->str_config.delay_mode, -1, 0);
  403|  1.54k|  if (err_code != IA_NO_ERROR) return err_code;
  ------------------
  |  |   36|  1.54k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (403:7): [True: 1, False: 1.54k]
  ------------------
  404|       |
  405|  4.62k|  for (i = 0; i < NUM_GAIN_DEC_INSTANCES; i++) {
  ------------------
  |  |   63|  4.62k|#define NUM_GAIN_DEC_INSTANCES 2
  ------------------
  |  Branch (405:15): [True: 3.08k, False: 1.54k]
  ------------------
  406|  3.08k|    err_code = impd_init_drc_decode(p_obj_drc->str_config.frame_size,
  407|  3.08k|                                    p_obj_drc->str_config.sampling_rate,
  408|  3.08k|                                    p_obj_drc->str_config.gain_delay_samples,
  409|  3.08k|                                    p_obj_drc->str_config.delay_mode,
  410|  3.08k|                                    p_obj_drc->str_config.sub_band_domain_mode,
  411|  3.08k|                                    p_obj_drc->str_payload.pstr_gain_dec[i]);
  412|  3.08k|    if (err_code != IA_NO_ERROR) return err_code;
  ------------------
  |  |   36|  3.08k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (412:9): [True: 0, False: 3.08k]
  ------------------
  413|  3.08k|  }
  414|       |
  415|  1.54k|  err_code = impd_drc_dec_interface_add_effect_type(
  416|  1.54k|      p_obj_drc->str_payload.pstr_drc_interface, p_obj_drc->str_config.effect_type,
  417|  1.54k|      p_obj_drc->str_config.target_loudness, p_obj_drc->str_config.loud_norm_flag,
  418|  1.54k|      p_obj_drc->str_config.album_mode, p_obj_drc->str_config.boost,
  419|  1.54k|      p_obj_drc->str_config.compress
  420|  1.54k|#ifdef LOUDNESS_LEVELING_SUPPORT
  421|  1.54k|      ,
  422|  1.54k|      p_obj_drc->str_config.loudness_leveling_flag
  423|  1.54k|#endif
  424|  1.54k|  );
  425|       |
  426|  1.54k|  if (err_code != IA_NO_ERROR) return err_code;
  ------------------
  |  |   36|  1.54k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (426:7): [True: 0, False: 1.54k]
  ------------------
  427|       |
  428|  1.54k|  err_code = impd_drc_uni_selction_proc_init(
  429|  1.54k|      p_obj_drc->str_payload.pstr_selection_proc, 0,
  430|  1.54k|      p_obj_drc->str_payload.pstr_drc_interface,
  431|  1.54k|      p_obj_drc->str_config.sub_band_domain_mode);
  432|  1.54k|  if (err_code != IA_NO_ERROR) return err_code;
  ------------------
  |  |   36|  1.54k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (432:7): [True: 0, False: 1.54k]
  ------------------
  433|       |
  434|  1.54k|  if (p_obj_drc->str_payload.pstr_drc_interface
  ------------------
  |  Branch (434:7): [True: 1.54k, False: 0]
  ------------------
  435|  1.54k|          ->loudness_norm_parameter_interface_flag &&
  436|  1.54k|      p_obj_drc->str_payload.pstr_drc_interface->loudness_norm_param_interface
  ------------------
  |  Branch (436:7): [True: 0, False: 1.54k]
  ------------------
  437|  1.54k|          .peak_limiter) {
  438|      0|    p_obj_drc->str_config.peak_limiter = 1;
  439|      0|  }
  440|       |
  441|  1.54k|  p_obj_drc->str_payload.pstr_loudness_info->loudness_info_album_count = 0;
  442|  1.54k|  p_obj_drc->str_payload.pstr_loudness_info->loudness_info_count = 0;
  443|  1.54k|  p_obj_drc->str_payload.pstr_loudness_info->loudness_info_set_ext_present = 0;
  444|  1.54k|  p_obj_drc->p_state->ui_exe_done = 0;
  445|       |
  446|  1.54k|  err_code = impd_process_drc_bitstream_dec_config(
  447|  1.54k|      p_obj_drc->str_payload.pstr_bitstream_dec, p_obj_drc->pstr_bit_buf,
  448|  1.54k|      p_obj_drc->str_payload.pstr_drc_config,
  449|  1.54k|      &p_obj_drc->str_bit_handler.bitstream_drc_config[0],
  450|  1.54k|      p_obj_drc->str_bit_handler.num_bytes_bs_drc_config);
  451|       |
  452|  1.54k|  if (err_code == 1) {
  ------------------
  |  Branch (452:7): [True: 1.22k, False: 317]
  ------------------
  453|  1.22k|    memset(p_obj_drc->str_payload.pstr_drc_config, 0, sizeof(ia_drc_config));
  454|  1.22k|    err_code = impd_drc_set_default_bitstream_config(
  455|  1.22k|        p_obj_drc->str_payload.pstr_drc_config);
  456|  1.22k|    p_obj_drc->str_payload.pstr_drc_config->channel_layout.base_channel_count =
  457|  1.22k|        p_obj_drc->str_config.num_ch_in;
  458|  1.22k|  }
  459|       |
  460|  1.54k|  if (err_code != IA_NO_ERROR) return err_code;
  ------------------
  |  |   36|  1.54k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (460:7): [True: 252, False: 1.29k]
  ------------------
  461|  1.29k|  err_code = impd_process_drc_bitstream_dec_loudness_info_set(
  462|  1.29k|      p_obj_drc->pstr_bit_buf, p_obj_drc->str_payload.pstr_loudness_info,
  463|  1.29k|      &p_obj_drc->str_bit_handler.bitstream_loudness_info[0],
  464|  1.29k|      p_obj_drc->str_bit_handler.num_bytes_bs_loudness_info);
  465|  1.29k|  if (err_code != IA_NO_ERROR) return err_code;
  ------------------
  |  |   36|  1.29k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (465:7): [True: 690, False: 601]
  ------------------
  466|       |
  467|    601|  if (p_obj_drc->str_payload.pstr_loudness_info->loudness_info
  ------------------
  |  Branch (467:7): [True: 32, False: 569]
  ------------------
  468|    601|          ->anchor_loudness_present)
  469|     32|    p_obj_drc->str_payload.pstr_selection_proc->uni_drc_sel_proc_params
  470|     32|        .loudness_measurement_method = METHOD_DEFINITION_ANCHOR_LOUDNESS;
  ------------------
  |  |   29|     32|#define METHOD_DEFINITION_ANCHOR_LOUDNESS 2
  ------------------
  471|       |
  472|    601|  if (p_obj_drc->str_payload.pstr_loudness_info->loudness_info
  ------------------
  |  Branch (472:7): [True: 2, False: 599]
  ------------------
  473|    601|          ->expert_loudness_present)
  474|      2|    p_obj_drc->str_payload.pstr_selection_proc->uni_drc_sel_proc_params
  475|      2|        .loudness_measurement_system = USER_MEASUREMENT_SYSTEM_EXPERT_PANEL;
  ------------------
  |  |   92|      2|#define USER_MEASUREMENT_SYSTEM_EXPERT_PANEL 3
  ------------------
  476|       |
  477|    601|  err_code = impd_drc_uni_sel_proc_process(
  478|    601|      p_obj_drc->str_payload.pstr_selection_proc,
  479|    601|      p_obj_drc->str_payload.pstr_drc_config,
  480|    601|      p_obj_drc->str_payload.pstr_loudness_info,
  481|    601|      p_obj_drc->str_payload.pstr_drc_sel_proc_output);
  482|    601|  if (err_code != IA_NO_ERROR) return err_code;
  ------------------
  |  |   36|    601|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (482:7): [True: 11, False: 590]
  ------------------
  483|       |
  484|  1.75k|  for (i = 0; i < NUM_GAIN_DEC_INSTANCES; i++) {
  ------------------
  |  |   63|  1.75k|#define NUM_GAIN_DEC_INSTANCES 2
  ------------------
  |  Branch (484:15): [True: 1.17k, False: 582]
  ------------------
  485|  1.17k|    WORD32 audio_num_chan = 0;
  486|  1.17k|    WORD32 numMatchingDrcSets = 0;
  487|  1.17k|    WORD32 matchingDrcSetIds[3], matchingDownmixIds[3];
  488|  1.17k|    for (j = 0;
  489|  1.58k|         j < p_obj_drc->str_payload.pstr_drc_sel_proc_output->num_sel_drc_sets;
  ------------------
  |  Branch (489:10): [True: 416, False: 1.17k]
  ------------------
  490|  1.17k|         j++) {
  491|    416|      if (impd_match_downmix(p_obj_drc->str_payload.pstr_drc_sel_proc_output
  ------------------
  |  Branch (491:11): [True: 208, False: 208]
  ------------------
  492|    416|                                 ->sel_downmix_ids[j],
  493|    416|                             decDownmixIdList[i])) {
  494|    208|        matchingDrcSetIds[numMatchingDrcSets] =
  495|    208|            p_obj_drc->str_payload.pstr_drc_sel_proc_output->sel_drc_set_ids[j];
  496|    208|        matchingDownmixIds[numMatchingDrcSets] =
  497|    208|            p_obj_drc->str_payload.pstr_drc_sel_proc_output->sel_downmix_ids[j];
  498|    208|        numMatchingDrcSets++;
  499|    208|      }
  500|    416|    }
  501|  1.17k|    if (i == 0) {
  ------------------
  |  Branch (501:9): [True: 590, False: 582]
  ------------------
  502|    590|      if (p_obj_drc->str_config.num_ch_in !=
  ------------------
  |  Branch (502:11): [True: 8, False: 582]
  ------------------
  503|    590|          p_obj_drc->str_payload.pstr_drc_sel_proc_output->base_channel_count)
  504|       |
  505|      8|        return -1;
  506|    582|      audio_num_chan = p_obj_drc->str_config.num_ch_in;
  507|    582|    } else if (i == 1) {
  ------------------
  |  Branch (507:16): [True: 582, False: 0]
  ------------------
  508|    582|      p_obj_drc->str_config.num_ch_out =
  509|    582|          p_obj_drc->str_payload.pstr_drc_sel_proc_output->target_channel_count;
  510|    582|      audio_num_chan = p_obj_drc->str_config.num_ch_out;
  511|    582|    }
  512|       |
  513|  1.16k|    err_code = impd_init_drc_decode_post_config(
  514|  1.16k|        audio_num_chan, matchingDrcSetIds, matchingDownmixIds,
  515|  1.16k|        numMatchingDrcSets,
  516|  1.16k|        p_obj_drc->str_payload.pstr_drc_sel_proc_output->sel_eq_set_ids[i]
  517|       |
  518|  1.16k|        ,
  519|  1.16k|        p_obj_drc->str_payload.pstr_gain_dec[i],
  520|  1.16k|        p_obj_drc->str_payload.pstr_drc_config,
  521|  1.16k|        p_obj_drc->str_payload.pstr_loudness_info, &persistent_ptr);
  522|  1.16k|    if (err_code) return err_code;
  ------------------
  |  Branch (522:9): [True: 0, False: 1.16k]
  ------------------
  523|       |
  524|  1.16k|    impd_get_parametric_drc_delay(
  525|  1.16k|        p_obj_drc->str_payload.pstr_gain_dec[i],
  526|  1.16k|        p_obj_drc->str_payload.pstr_drc_config,
  527|  1.16k|        &p_obj_drc->str_config.parametric_drc_delay_gain_dec_instance,
  528|  1.16k|        &p_obj_drc->str_config.parametric_drc_delay_max);
  529|  1.16k|    impd_get_eq_delay(p_obj_drc->str_payload.pstr_gain_dec[i],
  530|  1.16k|                      p_obj_drc->str_payload.pstr_drc_config,
  531|  1.16k|                      &p_obj_drc->str_config.eq_delay_gain_dec_instance,
  532|  1.16k|                      &p_obj_drc->str_config.eq_delay_max);
  533|  1.16k|    p_obj_drc->str_config.parametric_drc_delay +=
  534|  1.16k|        p_obj_drc->str_config.parametric_drc_delay_gain_dec_instance;
  535|  1.16k|    p_obj_drc->str_config.eq_delay +=
  536|  1.16k|        p_obj_drc->str_config.eq_delay_gain_dec_instance;
  537|  1.16k|  }
  538|       |
  539|    582|  {
  540|    582|    if (p_obj_drc->str_config.parametric_drc_delay_max == -1) {
  ------------------
  |  Branch (540:9): [True: 0, False: 582]
  ------------------
  541|      0|      p_obj_drc->str_config.parametric_drc_delay_max =
  542|      0|          PARAMETRIC_DRC_DELAY_MAX_DEFAULT;
  ------------------
  |  |   46|      0|#define PARAMETRIC_DRC_DELAY_MAX_DEFAULT 4096
  ------------------
  543|      0|    }
  544|    582|    if (p_obj_drc->str_config.eq_delay_max == -1) {
  ------------------
  |  Branch (544:9): [True: 0, False: 582]
  ------------------
  545|      0|      p_obj_drc->str_config.eq_delay_max = EQ_DELAY_MAX_DEFAULT;
  ------------------
  |  |   47|      0|#define EQ_DELAY_MAX_DEFAULT 256
  ------------------
  546|      0|    }
  547|       |
  548|    582|    if (!p_obj_drc->str_config.constant_delay_on) {
  ------------------
  |  Branch (548:9): [True: 582, False: 0]
  ------------------
  549|    582|      p_obj_drc->p_state->delay_in_output +=
  550|    582|          p_obj_drc->str_config.parametric_drc_delay +
  551|    582|          p_obj_drc->str_config.eq_delay +
  552|    582|          p_obj_drc->str_config.audio_delay_samples;
  553|    582|      p_obj_drc->str_config.delay_line_samples =
  554|    582|          p_obj_drc->str_config.audio_delay_samples;
  555|       |
  556|    582|      if (!p_obj_drc->str_config.absorb_delay_on) {
  ------------------
  |  Branch (556:11): [True: 0, False: 582]
  ------------------
  557|      0|        p_obj_drc->p_state->delay_in_output = 0;
  558|      0|      }
  559|    582|    } else {
  560|      0|      p_obj_drc->p_state->delay_in_output +=
  561|      0|          p_obj_drc->str_config.parametric_drc_delay_max +
  562|      0|          p_obj_drc->str_config.eq_delay_max +
  563|      0|          p_obj_drc->str_config.audio_delay_samples;
  564|      0|      p_obj_drc->str_config.delay_line_samples =
  565|      0|          p_obj_drc->p_state->delay_in_output -
  566|      0|          p_obj_drc->str_config.parametric_drc_delay +
  567|      0|          p_obj_drc->str_config.eq_delay;
  568|       |
  569|      0|      if (!p_obj_drc->str_config.absorb_delay_on) {
  ------------------
  |  Branch (569:11): [True: 0, False: 0]
  ------------------
  570|      0|        p_obj_drc->p_state->delay_in_output = 0;
  571|      0|      }
  572|      0|    }
  573|    582|  }
  574|    582|  if (p_obj_drc->str_config.dec_type == 1) {
  ------------------
  |  Branch (574:7): [True: 0, False: 582]
  ------------------
  575|      0|    init_qmf_filt_bank(p_obj_drc->str_payload.pstr_qmf_filter);
  576|      0|  }
  577|       |
  578|    582|  if (p_obj_drc->str_config.peak_limiter) {
  ------------------
  |  Branch (578:7): [True: 0, False: 582]
  ------------------
  579|      0|    err_code = impd_peak_limiter_init(
  580|      0|        p_obj_drc->str_payload.pstr_peak_limiter, DEFAULT_ATTACK_TIME_MS,
  ------------------
  |  |   23|      0|#define DEFAULT_ATTACK_TIME_MS (5.0f)   /* default attack  time in ms */
  ------------------
  581|      0|        DEFAULT_RELEASE_TIME_MS, LIM_DEFAULT_THRESHOLD,
  ------------------
  |  |   24|      0|#define DEFAULT_RELEASE_TIME_MS (50.0f) /* default release time in ms */
  ------------------
                      DEFAULT_RELEASE_TIME_MS, LIM_DEFAULT_THRESHOLD,
  ------------------
  |  |   72|      0|#define LIM_DEFAULT_THRESHOLD (0.89125094f)
  ------------------
  582|      0|        p_obj_drc->str_config.num_ch_out, p_obj_drc->str_config.sampling_rate,
  583|      0|        p_obj_drc->str_payload.pstr_peak_limiter->buffer);
  584|      0|    if (err_code) return (err_code);
  ------------------
  |  Branch (584:9): [True: 0, False: 0]
  ------------------
  585|      0|  }
  586|       |
  587|    582|  return IA_NO_ERROR;
  ------------------
  |  |   36|    582|#define IA_NO_ERROR 0x00000000
  ------------------
  588|    582|}
impd_drc_init.c:impd_match_downmix:
   74|    416|static WORD32 impd_match_downmix(WORD32 downmix_id, WORD32 dec_downmix_id) {
   75|    416|  WORD32 id_match = 0;
   76|       |
   77|    416|  switch (dec_downmix_id) {
  ------------------
  |  Branch (77:11): [True: 416, False: 0]
  ------------------
   78|    208|    case 0:
  ------------------
  |  Branch (78:5): [True: 208, False: 208]
  ------------------
   79|    208|      id_match = (downmix_id == 0);
   80|    208|      break;
   81|      0|    case 1:
  ------------------
  |  Branch (81:5): [True: 0, False: 416]
  ------------------
   82|      0|      id_match = ((downmix_id == 0) || (downmix_id == 0x7F));
  ------------------
  |  Branch (82:19): [True: 0, False: 0]
  |  Branch (82:40): [True: 0, False: 0]
  ------------------
   83|      0|      break;
   84|      0|    case 2:
  ------------------
  |  Branch (84:5): [True: 0, False: 416]
  ------------------
   85|      0|      id_match = (downmix_id == 0x7F);
   86|      0|      break;
   87|      0|    case 3:
  ------------------
  |  Branch (87:5): [True: 0, False: 416]
  ------------------
   88|      0|      id_match = ((downmix_id != 0) && (downmix_id != 0x7F));
  ------------------
  |  Branch (88:19): [True: 0, False: 0]
  |  Branch (88:40): [True: 0, False: 0]
  ------------------
   89|      0|      break;
   90|    208|    case 4:
  ------------------
  |  Branch (90:5): [True: 208, False: 208]
  ------------------
   91|    208|      id_match = (downmix_id != 0);
   92|    208|      break;
   93|    416|  }
   94|    416|  return id_match;
   95|    416|}

impd_drc_dec_interface_add_effect_type:
   40|  1.54k|) {
   41|  1.54k|  WORD32 err = 0;
   42|  1.54k|  WORD32 i = 0;
   43|       |
   44|  1.54k|  if (pstr_drc_interface != NULL) {
  ------------------
  |  Branch (44:7): [True: 1.54k, False: 0]
  ------------------
   45|  1.54k|    pstr_drc_interface->interface_signat_flag = 0;
   46|  3.16M|    for (i = 0; i < MAX_SIGNATURE_DATA_LENGTH_PLUS_ONE * 8; i++)
  ------------------
  |  |  168|  3.16M|#define MAX_SIGNATURE_DATA_LENGTH_PLUS_ONE 256
  ------------------
  |  Branch (46:17): [True: 3.16M, False: 1.54k]
  ------------------
   47|  3.16M|      pstr_drc_interface->drc_uni_interface_signature.interface_signat_data[i] =
   48|  3.16M|          0;
   49|       |
   50|  1.54k|    pstr_drc_interface->drc_uni_interface_signature.interface_signat_data_len =
   51|  1.54k|        0;
   52|       |
   53|  1.54k|    pstr_drc_interface->system_interface_flag = 1;
   54|       |
   55|  1.54k|    pstr_drc_interface->system_interface.target_config_request_type = 0;
   56|  1.54k|    pstr_drc_interface->system_interface.num_downmix_id_requests = 0;
   57|  24.6k|    for (i = 0; i < MAX_NUM_DOWNMIX_ID_REQUESTS; i++) {
  ------------------
  |  |  165|  24.6k|#define MAX_NUM_DOWNMIX_ID_REQUESTS 15
  ------------------
  |  Branch (57:17): [True: 23.1k, False: 1.54k]
  ------------------
   58|  23.1k|      pstr_drc_interface->system_interface.requested_dwnmix_id[i] = 0;
   59|  23.1k|    }
   60|  1.54k|    pstr_drc_interface->system_interface.requested_target_layout = 0;
   61|  1.54k|    pstr_drc_interface->system_interface.requested_target_ch_count = 0;
   62|       |
   63|  1.54k|    pstr_drc_interface->loudness_norm_ctrl_interface_flag = 1;
   64|  1.54k|    if (loud_norm == 1) {
  ------------------
  |  Branch (64:9): [True: 1.54k, False: 0]
  ------------------
   65|  1.54k|      pstr_drc_interface->loudness_norm_ctrl_interface
   66|  1.54k|          .loudness_normalization_on = 1;
   67|  1.54k|    } else {
   68|      0|      pstr_drc_interface->loudness_norm_ctrl_interface
   69|      0|          .loudness_normalization_on = 0;
   70|      0|    }
   71|  1.54k|    pstr_drc_interface->loudness_norm_ctrl_interface.target_loudness =
   72|  1.54k|        (FLOAT32)target_loudness;
   73|  1.54k|#ifdef LOUDNESS_LEVELING_SUPPORT
   74|  1.54k|    pstr_drc_interface->drc_uni_interface_ext.loudness_leveling_on = loudness_leveling_flag;
   75|  1.54k|#endif
   76|  1.54k|    pstr_drc_interface->loudness_norm_parameter_interface_flag = 1;
   77|  1.54k|    pstr_drc_interface->loudness_norm_param_interface.album_mode = album_mode;
   78|  1.54k|    pstr_drc_interface->loudness_norm_param_interface.peak_limiter = 0;
   79|  1.54k|    pstr_drc_interface->loudness_norm_param_interface
   80|  1.54k|        .change_loudness_deviation_max = 1;
   81|  1.54k|    pstr_drc_interface->loudness_norm_param_interface.loudness_deviation_max =
   82|  1.54k|        63;
   83|  1.54k|    pstr_drc_interface->loudness_norm_param_interface
   84|  1.54k|        .change_loudness_measur_method = 1;
   85|  1.54k|    pstr_drc_interface->loudness_norm_param_interface
   86|  1.54k|        .loudness_measurement_method = 1;
   87|  1.54k|    pstr_drc_interface->loudness_norm_param_interface
   88|  1.54k|        .change_loudness_measur_system = 1;
   89|  1.54k|    pstr_drc_interface->loudness_norm_param_interface
   90|  1.54k|        .loudness_measurement_system = 1;
   91|  1.54k|    pstr_drc_interface->loudness_norm_param_interface
   92|  1.54k|        .change_loudness_measur_pre_proc = 0;
   93|  1.54k|    pstr_drc_interface->loudness_norm_param_interface
   94|  1.54k|        .loudness_measurement_pre_proc = 0;
   95|  1.54k|    pstr_drc_interface->loudness_norm_param_interface
   96|  1.54k|        .change_device_cut_off_freq = 1;
   97|  1.54k|    pstr_drc_interface->loudness_norm_param_interface.device_cut_off_frequency =
   98|  1.54k|        20;
   99|  1.54k|    pstr_drc_interface->loudness_norm_param_interface
  100|  1.54k|        .change_loudness_norm_gain_db_max = 1;
  101|  1.54k|    pstr_drc_interface->loudness_norm_param_interface
  102|  1.54k|        .loudness_norm_gain_db_max = 1000.0;
  103|  1.54k|    pstr_drc_interface->loudness_norm_param_interface
  104|  1.54k|        .change_loudness_norm_gain_modification_db = 1;
  105|  1.54k|    pstr_drc_interface->loudness_norm_param_interface
  106|  1.54k|        .loudness_norm_gain_modification_db = 0.0;
  107|  1.54k|    pstr_drc_interface->loudness_norm_param_interface
  108|  1.54k|        .change_output_peak_level_max = 1;
  109|  1.54k|    pstr_drc_interface->loudness_norm_param_interface.output_peak_level_max =
  110|  1.54k|        0.0;
  111|       |
  112|  1.54k|    pstr_drc_interface->drc_interface_flag = 1;
  113|  1.54k|    if (drc_effect_type == -1) {
  ------------------
  |  Branch (113:9): [True: 1.06k, False: 474]
  ------------------
  114|  1.06k|      pstr_drc_interface->drc_ctrl_interface.dynamic_range_control_on = 0;
  115|  1.06k|      pstr_drc_interface->drc_ctrl_interface.requested_drc_effect_type[0][0] =
  116|  1.06k|          0;
  117|  1.06k|    } else if (drc_effect_type == 0) {
  ------------------
  |  Branch (117:16): [True: 174, False: 300]
  ------------------
  118|    174|      pstr_drc_interface->drc_ctrl_interface.dynamic_range_control_on = 1;
  119|    174|      pstr_drc_interface->drc_ctrl_interface.num_drc_feature_requests = 0;
  120|    300|    } else {
  121|    300|      pstr_drc_interface->drc_ctrl_interface.dynamic_range_control_on = 1;
  122|    300|      pstr_drc_interface->drc_ctrl_interface.requested_drc_effect_type[0][0] =
  123|    300|          drc_effect_type;
  124|    300|      pstr_drc_interface->drc_ctrl_interface.num_drc_feature_requests = 3;
  125|    300|      pstr_drc_interface->drc_ctrl_interface.drc_feature_req_type[0] = 0;
  126|    300|      pstr_drc_interface->drc_ctrl_interface.drc_feature_req_type[1] = 1;
  127|    300|      pstr_drc_interface->drc_ctrl_interface.drc_feature_req_type[2] = 2;
  128|    300|      pstr_drc_interface->drc_ctrl_interface.requested_num_drc_effects[0] = 1;
  129|    300|      pstr_drc_interface->drc_ctrl_interface
  130|    300|          .desired_num_drc_effects_of_requested[0] = 1;
  131|    300|    }
  132|       |
  133|  1.54k|    pstr_drc_interface->drc_ctrl_interface
  134|  1.54k|        .requested_dyn_rng_measurement_type[0] = 0;
  135|  1.54k|    pstr_drc_interface->drc_ctrl_interface
  136|  1.54k|        .requested_dyn_range_is_single_val_flag[0] = 0;
  137|  1.54k|    pstr_drc_interface->drc_ctrl_interface
  138|  1.54k|        .requested_dyn_range_is_single_val_flag[1] = 0;
  139|  1.54k|    pstr_drc_interface->drc_ctrl_interface.requested_dyn_range_min_val[1] =
  140|  1.54k|        3.0f;
  141|  1.54k|    pstr_drc_interface->drc_ctrl_interface.requested_dyn_range_max_val[1] =
  142|  1.54k|        10.0f;
  143|  1.54k|    pstr_drc_interface->drc_ctrl_interface.requested_drc_characteristic[2] = 3;
  144|       |
  145|  1.54k|    pstr_drc_interface->drc_parameter_interface_flag = 1;
  146|  1.54k|    pstr_drc_interface->drc_parameter_interface.change_compress = 1;
  147|  1.54k|    pstr_drc_interface->drc_parameter_interface.change_boost = 1;
  148|  1.54k|    pstr_drc_interface->drc_parameter_interface.compress = compress;
  149|  1.54k|    pstr_drc_interface->drc_parameter_interface.boost = boost;
  150|  1.54k|    pstr_drc_interface->drc_parameter_interface
  151|  1.54k|        .change_drc_characteristic_target = 1;
  152|  1.54k|    pstr_drc_interface->drc_parameter_interface.drc_characteristic_target = 0;
  153|       |
  154|  1.54k|    pstr_drc_interface->drc_uni_interface_ext_flag = 0;
  155|       |
  156|  1.54k|  } else {
  157|      0|    return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  158|      0|  }
  159|       |
  160|  1.54k|  return err;
  161|  1.54k|}

impd_signal_peak_level_info:
   38|  1.83k|    WORD32 explicit_peak_information_present[]) {
   39|  1.83k|  WORD32 c, d, i, k, n, base_channel_count, mode;
   40|  1.83k|  WORD32 pre_lim_count;
   41|  1.83k|  WORD32 peak_count = 0;
   42|  1.83k|  WORD32 loudness_info_count = 0;
   43|  1.83k|  ia_loudness_info_struct* loudness_info;
   44|  1.83k|  FLOAT32 sum, max_sum;
   45|  1.83k|  WORD32 drc_set_id_requested = str_drc_instruction_str->drc_set_id;
   46|  1.83k|  WORD32 loudness_drc_set_id_requested;
   47|  1.83k|  WORD32 match_found_flag = 0;
   48|       |
   49|  1.83k|  FLOAT32 signal_peak_level_tmp;
   50|  1.83k|  eq_set_id[0] = 0;
   51|  1.83k|  signal_peak_level[0] = 0.0f;
   52|  1.83k|  explicit_peak_information_present[0] = 0;
   53|       |
   54|  1.83k|  k = 0;
   55|  1.83k|  if (drc_set_id_requested < 0) {
  ------------------
  |  Branch (55:7): [True: 596, False: 1.24k]
  ------------------
   56|    596|    for (k = 0; k < num_compression_eq_count; k++) {
  ------------------
  |  Branch (56:17): [True: 0, False: 596]
  ------------------
   57|      0|      eq_set_id[k] = num_compression_eq_id[k];
   58|      0|      signal_peak_level[k] = 0.0f;
   59|      0|      explicit_peak_information_present[k] = 0;
   60|      0|    }
   61|    596|  }
   62|  1.83k|  eq_set_id[k] = 0;
   63|  1.83k|  signal_peak_level[k] = 0.0f;
   64|  1.83k|  explicit_peak_information_present[k] = 0;
   65|  1.83k|  k++;
   66|       |
   67|  1.83k|  pre_lim_count = k;
   68|       |
   69|  1.83k|  if (drc_set_id_requested < 0) {
  ------------------
  |  Branch (69:7): [True: 596, False: 1.24k]
  ------------------
   70|    596|    loudness_drc_set_id_requested = 0;
   71|  1.24k|  } else {
   72|  1.24k|    loudness_drc_set_id_requested = drc_set_id_requested;
   73|  1.24k|  }
   74|       |
   75|  1.83k|  if (album_mode == 1) {
  ------------------
  |  Branch (75:7): [True: 0, False: 1.83k]
  ------------------
   76|      0|    mode = 1;
   77|      0|    loudness_info_count = pstr_loudness_info->loudness_info_album_count;
   78|  1.83k|  } else {
   79|  1.83k|    mode = 0;
   80|  1.83k|    loudness_info_count = pstr_loudness_info->loudness_info_count;
   81|  1.83k|  }
   82|       |
   83|  18.8k|  for (n = 0; n < loudness_info_count; n++) {
  ------------------
  |  Branch (83:15): [True: 16.9k, False: 1.83k]
  ------------------
   84|  16.9k|    if (mode == 1) {
  ------------------
  |  Branch (84:9): [True: 0, False: 16.9k]
  ------------------
   85|      0|      loudness_info = &(pstr_loudness_info->str_loudness_info_album[n]);
   86|  16.9k|    } else {
   87|  16.9k|      loudness_info = &(pstr_loudness_info->loudness_info[n]);
   88|  16.9k|    }
   89|  16.9k|    if (loudness_drc_set_id_requested == loudness_info->drc_set_id &&
  ------------------
  |  Branch (89:9): [True: 2.94k, False: 14.0k]
  ------------------
   90|  2.94k|        requested_dwnmix_id == loudness_info->downmix_id) {
  ------------------
  |  Branch (90:9): [True: 2.31k, False: 630]
  ------------------
   91|  2.31k|      if (loudness_info->true_peak_level_present) {
  ------------------
  |  Branch (91:11): [True: 91, False: 2.22k]
  ------------------
   92|     91|        eq_set_id[peak_count] = loudness_info->eq_set_id;
   93|       |
   94|     91|        signal_peak_level[peak_count] = loudness_info->true_peak_level;
   95|     91|        explicit_peak_information_present[peak_count] = 1;
   96|       |
   97|     91|        match_found_flag = 1;
   98|     91|        peak_count++;
   99|     91|      }
  100|  2.31k|      if (match_found_flag == 0) {
  ------------------
  |  Branch (100:11): [True: 1.50k, False: 804]
  ------------------
  101|  1.50k|        if (loudness_info->sample_peak_level_present) {
  ------------------
  |  Branch (101:13): [True: 109, False: 1.39k]
  ------------------
  102|    109|          eq_set_id[peak_count] = loudness_info->eq_set_id;
  103|       |
  104|    109|          signal_peak_level[peak_count] = loudness_info->sample_peak_level;
  105|    109|          explicit_peak_information_present[peak_count] = 1;
  106|       |
  107|    109|          match_found_flag = 1;
  108|    109|          peak_count++;
  109|    109|        }
  110|  1.50k|      }
  111|  2.31k|    }
  112|  16.9k|  }
  113|  1.83k|  if (match_found_flag == 0) {
  ------------------
  |  Branch (113:7): [True: 1.67k, False: 161]
  ------------------
  114|  13.9k|    for (n = 0; n < loudness_info_count; n++) {
  ------------------
  |  Branch (114:17): [True: 12.2k, False: 1.67k]
  ------------------
  115|  12.2k|      if (mode == 1) {
  ------------------
  |  Branch (115:11): [True: 0, False: 12.2k]
  ------------------
  116|      0|        loudness_info = &(pstr_loudness_info->str_loudness_info_album[n]);
  117|  12.2k|      } else {
  118|  12.2k|        loudness_info = &(pstr_loudness_info->loudness_info[n]);
  119|  12.2k|      }
  120|  12.2k|      if (ID_FOR_ANY_DRC == loudness_info->drc_set_id &&
  ------------------
  |  |  138|  12.2k|#define ID_FOR_ANY_DRC 0x3F
  ------------------
  |  Branch (120:11): [True: 448, False: 11.7k]
  ------------------
  121|    448|          requested_dwnmix_id == loudness_info->downmix_id) {
  ------------------
  |  Branch (121:11): [True: 340, False: 108]
  ------------------
  122|    340|        if (loudness_info->true_peak_level_present) {
  ------------------
  |  Branch (122:13): [True: 103, False: 237]
  ------------------
  123|    103|          eq_set_id[peak_count] = loudness_info->eq_set_id;
  124|       |
  125|    103|          signal_peak_level[peak_count] = loudness_info->true_peak_level;
  126|    103|          explicit_peak_information_present[peak_count] = 1;
  127|       |
  128|    103|          match_found_flag = 1;
  129|    103|          peak_count++;
  130|    103|        }
  131|    340|        if (match_found_flag == 0) {
  ------------------
  |  Branch (131:13): [True: 218, False: 122]
  ------------------
  132|    218|          if (loudness_info->sample_peak_level_present) {
  ------------------
  |  Branch (132:15): [True: 39, False: 179]
  ------------------
  133|     39|            eq_set_id[peak_count] = loudness_info->eq_set_id;
  134|       |
  135|     39|            signal_peak_level[peak_count] = loudness_info->sample_peak_level;
  136|     39|            explicit_peak_information_present[peak_count] = 1;
  137|       |
  138|     39|            match_found_flag = 1;
  139|     39|            peak_count++;
  140|     39|          }
  141|    218|        }
  142|    340|      }
  143|  12.2k|    }
  144|  1.67k|  }
  145|  1.83k|  if (match_found_flag == 0) {
  ------------------
  |  Branch (145:7): [True: 1.58k, False: 255]
  ------------------
  146|  3.16k|    for (i = 0; i < str_drc_instruction_str->dwnmix_id_count; i++) {
  ------------------
  |  Branch (146:17): [True: 1.58k, False: 1.58k]
  ------------------
  147|  1.58k|      if (requested_dwnmix_id == str_drc_instruction_str->downmix_id[0] ||
  ------------------
  |  Branch (147:11): [True: 1.58k, False: 0]
  ------------------
  148|  1.58k|          ID_FOR_ANY_DOWNMIX == str_drc_instruction_str->downmix_id[0]) {
  ------------------
  |  |  136|      0|#define ID_FOR_ANY_DOWNMIX 0x7F
  ------------------
  |  Branch (148:11): [True: 0, False: 0]
  ------------------
  149|  1.58k|        if (str_drc_instruction_str->limiter_peak_target_present) {
  ------------------
  |  Branch (149:13): [True: 0, False: 1.58k]
  ------------------
  150|      0|          if (str_drc_instruction_str->requires_eq == 1) {
  ------------------
  |  Branch (150:15): [True: 0, False: 0]
  ------------------
  151|      0|            for (d = 0;
  152|      0|                 d < pstr_drc_config->str_drc_config_ext.eq_instructions_count;
  ------------------
  |  Branch (152:18): [True: 0, False: 0]
  ------------------
  153|      0|                 d++) {
  154|      0|              ia_eq_instructions_struct* eq_instructions =
  155|      0|                  &pstr_drc_config->str_drc_config_ext.str_eq_instructions[d];
  156|      0|              for (c = 0; c < eq_instructions->drc_set_id_count; c++) {
  ------------------
  |  Branch (156:27): [True: 0, False: 0]
  ------------------
  157|      0|                if ((eq_instructions->drc_set_id[c] ==
  ------------------
  |  Branch (157:21): [True: 0, False: 0]
  ------------------
  158|      0|                     loudness_drc_set_id_requested) ||
  159|      0|                    (eq_instructions->drc_set_id[c] == ID_FOR_ANY_DRC)) {
  ------------------
  |  |  138|      0|#define ID_FOR_ANY_DRC 0x3F
  ------------------
  |  Branch (159:21): [True: 0, False: 0]
  ------------------
  160|      0|                  for (i = 0; i < eq_instructions->dwnmix_id_count; i++) {
  ------------------
  |  Branch (160:31): [True: 0, False: 0]
  ------------------
  161|      0|                    if ((eq_instructions->downmix_id[i] ==
  ------------------
  |  Branch (161:25): [True: 0, False: 0]
  ------------------
  162|      0|                         requested_dwnmix_id) ||
  163|      0|                        (eq_instructions->downmix_id[i] ==
  ------------------
  |  Branch (163:25): [True: 0, False: 0]
  ------------------
  164|      0|                         ID_FOR_ANY_DOWNMIX)) {
  ------------------
  |  |  136|      0|#define ID_FOR_ANY_DOWNMIX 0x7F
  ------------------
  165|      0|                      eq_set_id[peak_count] = eq_instructions->eq_set_id;
  166|      0|                      signal_peak_level[peak_count] =
  167|      0|                          str_drc_instruction_str->limiter_peak_target;
  168|      0|                      explicit_peak_information_present[peak_count] = 1;
  169|      0|                      match_found_flag = 1;
  170|      0|                      peak_count++;
  171|      0|                    }
  172|      0|                  }
  173|      0|                }
  174|      0|              }
  175|      0|            }
  176|      0|          } else
  177|       |
  178|      0|          {
  179|      0|            eq_set_id[peak_count] = 0;
  180|      0|            signal_peak_level[peak_count] =
  181|      0|                str_drc_instruction_str->limiter_peak_target;
  182|      0|            explicit_peak_information_present[peak_count] = 1;
  183|      0|            match_found_flag = 1;
  184|      0|            peak_count++;
  185|      0|          }
  186|      0|        }
  187|  1.58k|      }
  188|  1.58k|    }
  189|  1.58k|  }
  190|  1.83k|  if (match_found_flag == 0) {
  ------------------
  |  Branch (190:7): [True: 1.58k, False: 255]
  ------------------
  191|  1.58k|    for (i = 1; i < str_drc_instruction_str->dwnmix_id_count; i++) {
  ------------------
  |  Branch (191:17): [True: 0, False: 1.58k]
  ------------------
  192|      0|      if (requested_dwnmix_id == str_drc_instruction_str->downmix_id[i]) {
  ------------------
  |  Branch (192:11): [True: 0, False: 0]
  ------------------
  193|      0|        if (str_drc_instruction_str->limiter_peak_target_present) {
  ------------------
  |  Branch (193:13): [True: 0, False: 0]
  ------------------
  194|      0|          {
  195|      0|            eq_set_id[peak_count] = 0;
  196|      0|            signal_peak_level[peak_count] =
  197|      0|                str_drc_instruction_str->limiter_peak_target;
  198|      0|            explicit_peak_information_present[peak_count] = 1;
  199|      0|            match_found_flag = 1;
  200|      0|            peak_count++;
  201|      0|          }
  202|      0|        }
  203|      0|      }
  204|      0|    }
  205|  1.58k|  }
  206|  1.83k|  if (match_found_flag == 0) {
  ------------------
  |  Branch (206:7): [True: 1.58k, False: 255]
  ------------------
  207|  1.58k|    if (requested_dwnmix_id != ID_FOR_BASE_LAYOUT) {
  ------------------
  |  |  135|  1.58k|#define ID_FOR_BASE_LAYOUT 0x0
  ------------------
  |  Branch (207:9): [True: 0, False: 1.58k]
  ------------------
  208|      0|      signal_peak_level_tmp = 0.f;
  209|      0|      for (i = 0; i < pstr_drc_config->dwnmix_instructions_count; i++) {
  ------------------
  |  Branch (209:19): [True: 0, False: 0]
  ------------------
  210|      0|        if (pstr_drc_config->dwnmix_instructions[i].downmix_id ==
  ------------------
  |  Branch (210:13): [True: 0, False: 0]
  ------------------
  211|      0|            requested_dwnmix_id) {
  212|      0|          if (pstr_drc_config->dwnmix_instructions[i]
  ------------------
  |  Branch (212:15): [True: 0, False: 0]
  ------------------
  213|      0|                  .downmix_coefficients_present) {
  214|      0|            base_channel_count =
  215|      0|                pstr_drc_config->channel_layout.base_channel_count;
  216|      0|            max_sum = 0.0f;
  217|      0|            for (c = 0;
  218|      0|                 c <
  ------------------
  |  Branch (218:18): [True: 0, False: 0]
  ------------------
  219|      0|                 pstr_drc_config->dwnmix_instructions[i].target_channel_count;
  220|      0|                 c++) {
  221|      0|              sum = 0.0f;
  222|      0|              for (d = 0; d < base_channel_count; d++) {
  ------------------
  |  Branch (222:27): [True: 0, False: 0]
  ------------------
  223|      0|                sum += pstr_drc_config->dwnmix_instructions[i]
  224|      0|                           .downmix_coefficient[c * base_channel_count + d];
  225|      0|              }
  226|      0|              if (max_sum < sum) max_sum = sum;
  ------------------
  |  Branch (226:19): [True: 0, False: 0]
  ------------------
  227|      0|            }
  228|      0|            signal_peak_level_tmp = 20.0f * (FLOAT32)log10(max_sum);
  229|      0|          } else {
  230|      0|          }
  231|      0|          break;
  232|      0|        }
  233|      0|      }
  234|      0|      for (n = 0; n < loudness_info_count; n++) {
  ------------------
  |  Branch (234:19): [True: 0, False: 0]
  ------------------
  235|      0|        if (mode == 1) {
  ------------------
  |  Branch (235:13): [True: 0, False: 0]
  ------------------
  236|      0|          loudness_info = &(pstr_loudness_info->str_loudness_info_album[n]);
  237|      0|        } else {
  238|      0|          loudness_info = &(pstr_loudness_info->loudness_info[n]);
  239|      0|        }
  240|      0|        if (loudness_drc_set_id_requested == loudness_info->drc_set_id &&
  ------------------
  |  Branch (240:13): [True: 0, False: 0]
  ------------------
  241|      0|            ID_FOR_BASE_LAYOUT == loudness_info->downmix_id) {
  ------------------
  |  |  135|      0|#define ID_FOR_BASE_LAYOUT 0x0
  ------------------
  |  Branch (241:13): [True: 0, False: 0]
  ------------------
  242|      0|          if (loudness_info->true_peak_level_present) {
  ------------------
  |  Branch (242:15): [True: 0, False: 0]
  ------------------
  243|      0|            eq_set_id[peak_count] = loudness_info->eq_set_id;
  244|       |
  245|      0|            signal_peak_level[peak_count] =
  246|      0|                loudness_info->true_peak_level + signal_peak_level_tmp;
  247|      0|            explicit_peak_information_present[peak_count] = 0;
  248|       |
  249|      0|            match_found_flag = 1;
  250|      0|            peak_count++;
  251|      0|          }
  252|      0|          if (match_found_flag == 0) {
  ------------------
  |  Branch (252:15): [True: 0, False: 0]
  ------------------
  253|      0|            if (loudness_info->sample_peak_level_present) {
  ------------------
  |  Branch (253:17): [True: 0, False: 0]
  ------------------
  254|      0|              eq_set_id[peak_count] = loudness_info->eq_set_id;
  255|       |
  256|      0|              signal_peak_level[peak_count] =
  257|      0|                  loudness_info->sample_peak_level + signal_peak_level_tmp;
  258|      0|              explicit_peak_information_present[peak_count] = 0;
  259|       |
  260|      0|              match_found_flag = 1;
  261|      0|              peak_count++;
  262|      0|            }
  263|      0|          }
  264|      0|        }
  265|      0|      }
  266|      0|      if (match_found_flag == 0) {
  ------------------
  |  Branch (266:11): [True: 0, False: 0]
  ------------------
  267|      0|        for (n = 0; n < loudness_info_count; n++) {
  ------------------
  |  Branch (267:21): [True: 0, False: 0]
  ------------------
  268|      0|          if (mode == 1) {
  ------------------
  |  Branch (268:15): [True: 0, False: 0]
  ------------------
  269|      0|            loudness_info = &(pstr_loudness_info->str_loudness_info_album[n]);
  270|      0|          } else {
  271|      0|            loudness_info = &(pstr_loudness_info->loudness_info[n]);
  272|      0|          }
  273|      0|          if (ID_FOR_ANY_DRC == loudness_info->drc_set_id &&
  ------------------
  |  |  138|      0|#define ID_FOR_ANY_DRC 0x3F
  ------------------
  |  Branch (273:15): [True: 0, False: 0]
  ------------------
  274|      0|              ID_FOR_BASE_LAYOUT == loudness_info->downmix_id) {
  ------------------
  |  |  135|      0|#define ID_FOR_BASE_LAYOUT 0x0
  ------------------
  |  Branch (274:15): [True: 0, False: 0]
  ------------------
  275|      0|            if (loudness_info->true_peak_level_present) {
  ------------------
  |  Branch (275:17): [True: 0, False: 0]
  ------------------
  276|      0|              eq_set_id[peak_count] = loudness_info->eq_set_id;
  277|       |
  278|      0|              signal_peak_level[peak_count] =
  279|      0|                  loudness_info->true_peak_level + signal_peak_level_tmp;
  280|      0|              explicit_peak_information_present[peak_count] = 0;
  281|       |
  282|      0|              match_found_flag = 1;
  283|      0|              peak_count++;
  284|      0|            }
  285|      0|            if (match_found_flag == 0) {
  ------------------
  |  Branch (285:17): [True: 0, False: 0]
  ------------------
  286|      0|              if (loudness_info->sample_peak_level_present) {
  ------------------
  |  Branch (286:19): [True: 0, False: 0]
  ------------------
  287|      0|                eq_set_id[peak_count] = loudness_info->eq_set_id;
  288|       |
  289|      0|                signal_peak_level[peak_count] =
  290|      0|                    loudness_info->sample_peak_level + signal_peak_level_tmp;
  291|      0|                explicit_peak_information_present[peak_count] = 0;
  292|       |
  293|      0|                match_found_flag = 1;
  294|      0|                peak_count++;
  295|      0|              }
  296|      0|            }
  297|      0|          }
  298|      0|        }
  299|      0|      }
  300|      0|      if (match_found_flag == 0) {
  ------------------
  |  Branch (300:11): [True: 0, False: 0]
  ------------------
  301|      0|        ia_drc_instructions_struct* drc_instructions_drc_tmp;
  302|      0|        for (n = 0; n < pstr_drc_config->drc_instructions_count_plus; n++) {
  ------------------
  |  Branch (302:21): [True: 0, False: 0]
  ------------------
  303|      0|          drc_instructions_drc_tmp =
  304|      0|              &pstr_drc_config->str_drc_instruction_str[n];
  305|      0|          if (loudness_drc_set_id_requested ==
  ------------------
  |  Branch (305:15): [True: 0, False: 0]
  ------------------
  306|      0|              drc_instructions_drc_tmp->drc_set_id) {
  307|      0|            if (ID_FOR_BASE_LAYOUT == drc_instructions_drc_tmp->downmix_id[0]) {
  ------------------
  |  |  135|      0|#define ID_FOR_BASE_LAYOUT 0x0
  ------------------
  |  Branch (307:17): [True: 0, False: 0]
  ------------------
  308|      0|              if (drc_instructions_drc_tmp->limiter_peak_target_present) {
  ------------------
  |  Branch (308:19): [True: 0, False: 0]
  ------------------
  309|      0|                eq_set_id[peak_count] = -1;
  310|      0|                signal_peak_level[peak_count] =
  311|      0|                    drc_instructions_drc_tmp->limiter_peak_target +
  312|      0|                    signal_peak_level_tmp;
  313|      0|                explicit_peak_information_present[peak_count] = 0;
  314|      0|                match_found_flag = 1;
  315|      0|                peak_count++;
  316|      0|              }
  317|      0|            }
  318|      0|          }
  319|      0|        }
  320|      0|      }
  321|      0|    }
  322|  1.58k|  }
  323|  1.83k|  if (peak_count > 0) {
  ------------------
  |  Branch (323:7): [True: 255, False: 1.58k]
  ------------------
  324|    255|    *peak_info_count = peak_count;
  325|  1.58k|  } else {
  326|  1.58k|    *peak_info_count = pre_lim_count;
  327|  1.58k|  }
  328|  1.83k|  return;
  329|  1.83k|}
impd_extract_loudness_peak_to_average_info:
  335|  2.77k|    FLOAT32* loudness_peak_2_avg_value) {
  336|  2.77k|  WORD32 k;
  337|  2.77k|  WORD32 program_loudness_present = 0;
  338|  2.77k|  WORD32 peak_loudness_present = 0;
  339|  2.77k|  WORD32 match_measure_program_loudness = 0;
  340|  2.77k|  WORD32 match_measure_peak_loudness = 0;
  341|  2.77k|  FLOAT32 program_loudness = 0.0f;
  342|  2.77k|  FLOAT32 peak_loudness = 0.0f;
  343|  2.77k|  ia_loudness_measure_struct* loudness_measure = NULL;
  344|       |
  345|  6.26k|  for (k = 0; k < loudness_info->measurement_count; k++) {
  ------------------
  |  Branch (345:15): [True: 3.49k, False: 2.77k]
  ------------------
  346|  3.49k|    loudness_measure = &(loudness_info->loudness_measure[k]);
  347|  3.49k|    if (loudness_measure->method_def == METHOD_DEFINITION_PROGRAM_LOUDNESS) {
  ------------------
  |  |   28|  3.49k|#define METHOD_DEFINITION_PROGRAM_LOUDNESS 1
  ------------------
  |  Branch (347:9): [True: 973, False: 2.52k]
  ------------------
  348|    973|      if (match_measure_program_loudness <
  ------------------
  |  Branch (348:11): [True: 136, False: 837]
  ------------------
  349|    973|          measurement_method_prog_loudness_tbl[loudness_measure
  350|    973|                                                   ->measurement_system]) {
  351|    136|        program_loudness = loudness_measure->method_val;
  352|    136|        program_loudness_present = 1;
  353|    136|        match_measure_program_loudness =
  354|    136|            measurement_method_prog_loudness_tbl[loudness_measure
  355|    136|                                                     ->measurement_system];
  356|    136|      }
  357|    973|    }
  358|  3.49k|    switch (dyn_range_measurement_type) {
  359|  3.49k|      case SHORT_TERM_LOUDNESS_TO_AVG:
  ------------------
  |  |  106|  3.49k|#define SHORT_TERM_LOUDNESS_TO_AVG 0
  ------------------
  |  Branch (359:7): [True: 3.49k, False: 0]
  ------------------
  360|  3.49k|        if (loudness_measure->method_def ==
  ------------------
  |  Branch (360:13): [True: 215, False: 3.28k]
  ------------------
  361|  3.49k|            METHOD_DEFINITION_SHORT_TERM_LOUDNESS_MAX) {
  ------------------
  |  |   32|  3.49k|#define METHOD_DEFINITION_SHORT_TERM_LOUDNESS_MAX 5
  ------------------
  362|    215|          if (match_measure_peak_loudness <
  ------------------
  |  Branch (362:15): [True: 91, False: 124]
  ------------------
  363|    215|              measurement_method_peak_loudness_tbl[loudness_measure
  364|    215|                                                       ->measurement_system]) {
  365|     91|            peak_loudness = loudness_measure->method_val;
  366|     91|            peak_loudness_present = 1;
  367|     91|            match_measure_peak_loudness =
  368|     91|                measurement_method_peak_loudness_tbl[loudness_measure
  369|     91|                                                         ->measurement_system];
  370|     91|          }
  371|    215|        }
  372|  3.49k|        break;
  373|       |
  374|      0|      case MOMENTARY_LOUDNESS_TO_AVG:
  ------------------
  |  |  107|      0|#define MOMENTARY_LOUDNESS_TO_AVG 1
  ------------------
  |  Branch (374:7): [True: 0, False: 3.49k]
  ------------------
  375|      0|        if (loudness_measure->method_def ==
  ------------------
  |  Branch (375:13): [True: 0, False: 0]
  ------------------
  376|      0|            METHOD_DEFINITION_MOMENTARY_LOUDNESS_MAX) {
  ------------------
  |  |   31|      0|#define METHOD_DEFINITION_MOMENTARY_LOUDNESS_MAX 4
  ------------------
  377|      0|          if (match_measure_peak_loudness <
  ------------------
  |  Branch (377:15): [True: 0, False: 0]
  ------------------
  378|      0|              measurement_method_peak_loudness_tbl[loudness_measure
  379|      0|                                                       ->measurement_system]) {
  380|      0|            peak_loudness = loudness_measure->method_val;
  381|      0|            peak_loudness_present = 1;
  382|      0|            match_measure_peak_loudness =
  383|      0|                measurement_method_peak_loudness_tbl[loudness_measure
  384|      0|                                                         ->measurement_system];
  385|      0|          }
  386|      0|        }
  387|      0|        break;
  388|       |
  389|      0|      case TOP_OF_LOUDNESS_RANGE_TO_AVG:
  ------------------
  |  |  108|      0|#define TOP_OF_LOUDNESS_RANGE_TO_AVG 2
  ------------------
  |  Branch (389:7): [True: 0, False: 3.49k]
  ------------------
  390|      0|        if (loudness_measure->method_def ==
  ------------------
  |  Branch (390:13): [True: 0, False: 0]
  ------------------
  391|      0|            METHOD_DEFINITION_MAX_OF_LOUDNESS_RANGE) {
  ------------------
  |  |   30|      0|#define METHOD_DEFINITION_MAX_OF_LOUDNESS_RANGE 3
  ------------------
  392|      0|          if (match_measure_peak_loudness <
  ------------------
  |  Branch (392:15): [True: 0, False: 0]
  ------------------
  393|      0|              measurement_method_peak_loudness_tbl[loudness_measure
  394|      0|                                                       ->measurement_system]) {
  395|      0|            peak_loudness = loudness_measure->method_val;
  396|      0|            peak_loudness_present = 1;
  397|      0|            match_measure_peak_loudness =
  398|      0|                measurement_method_peak_loudness_tbl[loudness_measure
  399|      0|                                                         ->measurement_system];
  400|      0|          }
  401|      0|        }
  402|      0|        break;
  403|       |
  404|      0|      default:
  ------------------
  |  Branch (404:7): [True: 0, False: 3.49k]
  ------------------
  405|      0|        return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  406|       |
  407|      0|        break;
  408|  3.49k|    }
  409|  3.49k|  }
  410|  2.77k|  if ((program_loudness_present == 1) && (peak_loudness_present == 1)) {
  ------------------
  |  Branch (410:7): [True: 136, False: 2.63k]
  |  Branch (410:42): [True: 66, False: 70]
  ------------------
  411|     66|    *loudness_peak_2_avg_value = peak_loudness - program_loudness;
  412|     66|    *loudness_peak_2_avg_value_present = 1;
  413|     66|  }
  414|  2.77k|  return (0);
  415|  2.77k|}
impd_loudness_peak_to_average_info:
  422|    962|    FLOAT32* loudness_peak_2_avg_value) {
  423|    962|  WORD32 n, err;
  424|    962|  WORD32 drc_set_id = max(0, str_drc_instruction_str->drc_set_id);
  ------------------
  |  |  224|    962|#define max(a, b) ((a) > (b) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (224:20): [True: 161, False: 801]
  |  |  ------------------
  ------------------
  425|       |
  426|    962|  *loudness_peak_2_avg_value_present = 0;
  427|       |
  428|    962|  if (album_mode == 1) {
  ------------------
  |  Branch (428:7): [True: 0, False: 962]
  ------------------
  429|      0|    for (n = 0; n < pstr_loudness_info->loudness_info_album_count; n++) {
  ------------------
  |  Branch (429:17): [True: 0, False: 0]
  ------------------
  430|      0|      ia_loudness_info_struct* loudness_info =
  431|      0|          &(pstr_loudness_info->str_loudness_info_album[n]);
  432|      0|      if (drc_set_id == loudness_info->drc_set_id) {
  ------------------
  |  Branch (432:11): [True: 0, False: 0]
  ------------------
  433|      0|        if (requested_dwnmix_id == loudness_info->downmix_id) {
  ------------------
  |  Branch (433:13): [True: 0, False: 0]
  ------------------
  434|      0|          err = impd_extract_loudness_peak_to_average_info(
  435|      0|              loudness_info, dyn_range_measurement_type,
  436|      0|              loudness_peak_2_avg_value_present, loudness_peak_2_avg_value);
  437|      0|          if (err) return (err);
  ------------------
  |  Branch (437:15): [True: 0, False: 0]
  ------------------
  438|      0|        }
  439|      0|      }
  440|      0|    }
  441|      0|  }
  442|    962|  if (*loudness_peak_2_avg_value_present == 0) {
  ------------------
  |  Branch (442:7): [True: 962, False: 0]
  ------------------
  443|  23.0k|    for (n = 0; n < pstr_loudness_info->loudness_info_count; n++) {
  ------------------
  |  Branch (443:17): [True: 22.0k, False: 962]
  ------------------
  444|  22.0k|      ia_loudness_info_struct* loudness_info =
  445|  22.0k|          &(pstr_loudness_info->loudness_info[n]);
  446|  22.0k|      if (drc_set_id == loudness_info->drc_set_id) {
  ------------------
  |  Branch (446:11): [True: 3.30k, False: 18.7k]
  ------------------
  447|  3.30k|        if (requested_dwnmix_id == loudness_info->downmix_id) {
  ------------------
  |  Branch (447:13): [True: 2.77k, False: 530]
  ------------------
  448|  2.77k|          err = impd_extract_loudness_peak_to_average_info(
  449|  2.77k|              loudness_info, dyn_range_measurement_type,
  450|  2.77k|              loudness_peak_2_avg_value_present, loudness_peak_2_avg_value);
  451|  2.77k|          if (err) return (err);
  ------------------
  |  Branch (451:15): [True: 0, False: 2.77k]
  ------------------
  452|  2.77k|        }
  453|  3.30k|      }
  454|  22.0k|    }
  455|    962|  }
  456|    962|  return (0);
  457|    962|}
impd_overall_loudness_present:
  460|  10.0k|                                   WORD32* loudness_info_present) {
  461|  10.0k|  WORD32 m;
  462|       |
  463|  10.0k|  *loudness_info_present = 0;
  464|  18.8k|  for (m = 0; m < loudness_info->measurement_count; m++) {
  ------------------
  |  Branch (464:15): [True: 8.79k, False: 10.0k]
  ------------------
  465|  8.79k|    if ((loudness_info->loudness_measure[m].method_def ==
  ------------------
  |  Branch (465:9): [True: 1.72k, False: 7.07k]
  ------------------
  466|  8.79k|         METHOD_DEFINITION_PROGRAM_LOUDNESS) ||
  ------------------
  |  |   28|  8.79k|#define METHOD_DEFINITION_PROGRAM_LOUDNESS 1
  ------------------
  467|  7.07k|        (loudness_info->loudness_measure[m].method_def ==
  ------------------
  |  Branch (467:9): [True: 748, False: 6.32k]
  ------------------
  468|  7.07k|         METHOD_DEFINITION_ANCHOR_LOUDNESS)) {
  ------------------
  |  |   29|  7.07k|#define METHOD_DEFINITION_ANCHOR_LOUDNESS 2
  ------------------
  469|  2.46k|      *loudness_info_present = 1;
  470|  2.46k|    }
  471|  8.79k|  }
  472|  10.0k|  return;
  473|  10.0k|}
impd_check_loud_info:
  479|  13.6k|                            ia_loudness_info_struct* loudness_info_matching[]) {
  480|  13.6k|  WORD32 n;
  481|  13.6k|  WORD32 loudness_info_present;
  482|  86.9k|  for (n = 0; n < loudness_info_count; n++) {
  ------------------
  |  Branch (482:15): [True: 73.3k, False: 13.6k]
  ------------------
  483|  73.3k|    if (requested_dwnmix_id == loudness_info[n].downmix_id) {
  ------------------
  |  Branch (483:9): [True: 33.5k, False: 39.8k]
  ------------------
  484|  33.5k|      if (drc_set_id_requested == loudness_info[n].drc_set_id) {
  ------------------
  |  Branch (484:11): [True: 10.0k, False: 23.4k]
  ------------------
  485|  10.0k|        impd_overall_loudness_present(&(loudness_info[n]),
  486|  10.0k|                                      &loudness_info_present);
  487|       |
  488|  10.0k|        if (loudness_info_present) {
  ------------------
  |  Branch (488:13): [True: 1.37k, False: 8.72k]
  ------------------
  489|  1.37k|          loudness_info_matching[*info_count] = &(loudness_info[n]);
  490|  1.37k|          (*info_count)++;
  491|  1.37k|        }
  492|  10.0k|      }
  493|  33.5k|    }
  494|  73.3k|  }
  495|       |
  496|  13.6k|  return (0);
  497|  13.6k|}
impd_check_loud_payload:
  502|  1.83k|    ia_loudness_info_struct* loudness_info_matching[]) {
  503|  1.83k|  WORD32 err = 0;
  504|       |
  505|  1.83k|  err = impd_check_loud_info(loudness_info_count, loudness_info,
  506|  1.83k|                             requested_dwnmix_id, drc_set_id_requested,
  507|  1.83k|                             info_count, loudness_info_matching);
  508|  1.83k|  if (err || *info_count) goto matchEnd;
  ------------------
  |  Branch (508:7): [True: 0, False: 1.83k]
  |  Branch (508:14): [True: 153, False: 1.68k]
  ------------------
  509|  1.68k|  err = impd_check_loud_info(loudness_info_count, loudness_info,
  510|  1.68k|                             ID_FOR_ANY_DOWNMIX, drc_set_id_requested,
  ------------------
  |  |  136|  1.68k|#define ID_FOR_ANY_DOWNMIX 0x7F
  ------------------
  511|  1.68k|                             info_count, loudness_info_matching);
  512|  1.68k|  if (err || *info_count) goto matchEnd;
  ------------------
  |  Branch (512:7): [True: 0, False: 1.68k]
  |  Branch (512:14): [True: 15, False: 1.66k]
  ------------------
  513|  1.66k|  err = impd_check_loud_info(loudness_info_count, loudness_info,
  514|  1.66k|                             requested_dwnmix_id, ID_FOR_ANY_DRC, info_count,
  ------------------
  |  |  138|  1.66k|#define ID_FOR_ANY_DRC 0x3F
  ------------------
  515|  1.66k|                             loudness_info_matching);
  516|  1.66k|  if (err || *info_count) goto matchEnd;
  ------------------
  |  Branch (516:7): [True: 0, False: 1.66k]
  |  Branch (516:14): [True: 71, False: 1.59k]
  ------------------
  517|  1.59k|  err = impd_check_loud_info(loudness_info_count, loudness_info,
  518|  1.59k|                             requested_dwnmix_id, ID_FOR_NO_DRC, info_count,
  ------------------
  |  |  137|  1.59k|#define ID_FOR_NO_DRC 0x0
  ------------------
  519|  1.59k|                             loudness_info_matching);
  520|  1.59k|  if (err || *info_count) goto matchEnd;
  ------------------
  |  Branch (520:7): [True: 0, False: 1.59k]
  |  Branch (520:14): [True: 217, False: 1.38k]
  ------------------
  521|  1.38k|  err = impd_check_loud_info(loudness_info_count, loudness_info,
  522|  1.38k|                             ID_FOR_ANY_DOWNMIX, ID_FOR_ANY_DRC, info_count,
  ------------------
  |  |  136|  1.38k|#define ID_FOR_ANY_DOWNMIX 0x7F
  ------------------
                                           ID_FOR_ANY_DOWNMIX, ID_FOR_ANY_DRC, info_count,
  ------------------
  |  |  138|  1.38k|#define ID_FOR_ANY_DRC 0x3F
  ------------------
  523|  1.38k|                             loudness_info_matching);
  524|  1.38k|  if (err || *info_count) goto matchEnd;
  ------------------
  |  Branch (524:7): [True: 0, False: 1.38k]
  |  Branch (524:14): [True: 12, False: 1.36k]
  ------------------
  525|  1.36k|  err = impd_check_loud_info(loudness_info_count, loudness_info,
  526|  1.36k|                             ID_FOR_ANY_DOWNMIX, ID_FOR_NO_DRC, info_count,
  ------------------
  |  |  136|  1.36k|#define ID_FOR_ANY_DOWNMIX 0x7F
  ------------------
                                           ID_FOR_ANY_DOWNMIX, ID_FOR_NO_DRC, info_count,
  ------------------
  |  |  137|  1.36k|#define ID_FOR_NO_DRC 0x0
  ------------------
  527|  1.36k|                             loudness_info_matching);
  528|  1.36k|  if (err || *info_count) goto matchEnd;
  ------------------
  |  Branch (528:7): [True: 0, False: 1.36k]
  |  Branch (528:14): [True: 7, False: 1.36k]
  ------------------
  529|  1.36k|  err = impd_check_loud_info(loudness_info_count, loudness_info,
  530|  1.36k|                             ID_FOR_BASE_LAYOUT, drc_set_id_requested,
  ------------------
  |  |  135|  1.36k|#define ID_FOR_BASE_LAYOUT 0x0
  ------------------
  531|  1.36k|                             info_count, loudness_info_matching);
  532|  1.36k|  if (err || *info_count) goto matchEnd;
  ------------------
  |  Branch (532:7): [True: 0, False: 1.36k]
  |  Branch (532:14): [True: 0, False: 1.36k]
  ------------------
  533|  1.36k|  err = impd_check_loud_info(loudness_info_count, loudness_info,
  534|  1.36k|                             ID_FOR_BASE_LAYOUT, ID_FOR_ANY_DRC, info_count,
  ------------------
  |  |  135|  1.36k|#define ID_FOR_BASE_LAYOUT 0x0
  ------------------
                                           ID_FOR_BASE_LAYOUT, ID_FOR_ANY_DRC, info_count,
  ------------------
  |  |  138|  1.36k|#define ID_FOR_ANY_DRC 0x3F
  ------------------
  535|  1.36k|                             loudness_info_matching);
  536|  1.36k|  if (err || *info_count) goto matchEnd;
  ------------------
  |  Branch (536:7): [True: 0, False: 1.36k]
  |  Branch (536:14): [True: 0, False: 1.36k]
  ------------------
  537|  1.36k|  err = impd_check_loud_info(loudness_info_count, loudness_info,
  538|  1.36k|                             ID_FOR_BASE_LAYOUT, ID_FOR_NO_DRC, info_count,
  ------------------
  |  |  135|  1.36k|#define ID_FOR_BASE_LAYOUT 0x0
  ------------------
                                           ID_FOR_BASE_LAYOUT, ID_FOR_NO_DRC, info_count,
  ------------------
  |  |  137|  1.36k|#define ID_FOR_NO_DRC 0x0
  ------------------
  539|  1.36k|                             loudness_info_matching);
  540|  1.36k|  if (err || *info_count) goto matchEnd;
  ------------------
  |  Branch (540:7): [True: 0, False: 1.36k]
  |  Branch (540:14): [True: 0, False: 1.36k]
  ------------------
  541|  1.83k|matchEnd:
  542|  1.83k|  return (err);
  543|  1.36k|}
impd_find_overall_loudness_info:
  550|  1.83k|    ia_loudness_info_struct* loudness_info_matching[]) {
  551|  1.83k|  WORD32 err;
  552|  1.83k|  WORD32 loudness_drc_set_id_requested;
  553|       |
  554|  1.83k|  *info_count = 0;
  555|  1.83k|  if (drc_set_id_requested < 0) {
  ------------------
  |  Branch (555:7): [True: 596, False: 1.24k]
  ------------------
  556|    596|    loudness_drc_set_id_requested = ID_FOR_NO_DRC;
  ------------------
  |  |  137|    596|#define ID_FOR_NO_DRC 0x0
  ------------------
  557|  1.24k|  } else {
  558|  1.24k|    loudness_drc_set_id_requested = drc_set_id_requested;
  559|  1.24k|  }
  560|  1.83k|  if (pstr_drc_sel_proc_params_struct->album_mode == 1) {
  ------------------
  |  Branch (560:7): [True: 0, False: 1.83k]
  ------------------
  561|      0|    err = impd_check_loud_payload(
  562|      0|        pstr_loudness_info->loudness_info_album_count,
  563|      0|        pstr_loudness_info->str_loudness_info_album, requested_dwnmix_id,
  564|      0|        loudness_drc_set_id_requested, info_count, loudness_info_matching);
  565|      0|    if (err) return (err);
  ------------------
  |  Branch (565:9): [True: 0, False: 0]
  ------------------
  566|      0|  }
  567|  1.83k|  if (*info_count == 0) {
  ------------------
  |  Branch (567:7): [True: 1.83k, False: 0]
  ------------------
  568|  1.83k|    err = impd_check_loud_payload(pstr_loudness_info->loudness_info_count,
  569|  1.83k|                                  pstr_loudness_info->loudness_info,
  570|  1.83k|                                  requested_dwnmix_id,
  571|  1.83k|                                  loudness_drc_set_id_requested,
  572|       |
  573|  1.83k|                                  info_count, loudness_info_matching);
  574|  1.83k|    if (err) return (err);
  ------------------
  |  Branch (574:9): [True: 0, False: 1.83k]
  ------------------
  575|  1.83k|  }
  576|  1.83k|  *overall_loudness_info_present = (*info_count > 0);
  577|  1.83k|  return (0);
  578|  1.83k|}
impd_init_loudness_control:
  701|  1.83k|    FLOAT32 loudness_normalization_gain_db[], FLOAT32 loudness[]) {
  702|  1.83k|  WORD32 err, k, info_count = 0, pre_lim_count;
  703|  1.83k|  WORD32 loudness_hp_adjust_present;
  704|  1.83k|  WORD32 overall_loudness_info_present;
  705|  1.83k|  FLOAT32 pre_proc_adjust;
  706|       |
  707|  1.83k|  k = 0;
  708|  1.83k|  if (drc_set_id_requested < 0) {
  ------------------
  |  Branch (708:7): [True: 596, False: 1.24k]
  ------------------
  709|    596|    for (k = 0; k < num_compression_eq_count; k++) {
  ------------------
  |  Branch (709:17): [True: 0, False: 596]
  ------------------
  710|      0|      eq_set_id[k] = num_compression_eq_id[k];
  711|      0|      loudness[k] = UNDEFINED_LOUDNESS_VALUE;
  ------------------
  |  |  134|      0|#define UNDEFINED_LOUDNESS_VALUE 1000.0f
  ------------------
  712|      0|      loudness_normalization_gain_db[k] = 0.0f;
  713|      0|    }
  714|    596|  }
  715|  1.83k|  if (k >= MAX_NUM_COMPRESSION_EQ) return UNEXPECTED_ERROR;
  ------------------
  |  |  125|  1.83k|#define MAX_NUM_COMPRESSION_EQ (16)
  ------------------
                if (k >= MAX_NUM_COMPRESSION_EQ) return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  |  Branch (715:7): [True: 0, False: 1.83k]
  ------------------
  716|  1.83k|  eq_set_id[k] = 0;
  717|       |
  718|  1.83k|  loudness[k] = UNDEFINED_LOUDNESS_VALUE;
  ------------------
  |  |  134|  1.83k|#define UNDEFINED_LOUDNESS_VALUE 1000.0f
  ------------------
  719|       |
  720|  1.83k|  loudness_normalization_gain_db[k] = 0.0f;
  721|  1.83k|  k++;
  722|       |
  723|  1.83k|  pre_lim_count = k;
  724|       |
  725|  1.83k|  if (pstr_drc_sel_proc_params_struct->loudness_normalization_on == 1) {
  ------------------
  |  Branch (725:7): [True: 1.83k, False: 0]
  ------------------
  726|  1.83k|    WORD32 n;
  727|  1.83k|    ia_loudness_info_struct* loudness_info[16];
  728|  1.83k|    err = impd_find_overall_loudness_info(
  729|  1.83k|        pstr_drc_sel_proc_params_struct, pstr_loudness_info,
  730|  1.83k|        requested_dwnmix_id, drc_set_id_requested,
  731|  1.83k|        &overall_loudness_info_present, &info_count, loudness_info);
  732|  1.83k|    if (err) return (err);
  ------------------
  |  Branch (732:9): [True: 0, False: 1.83k]
  ------------------
  733|       |
  734|  1.83k|    if (overall_loudness_info_present == 1) {
  ------------------
  |  Branch (734:9): [True: 475, False: 1.36k]
  ------------------
  735|    475|      WORD32 requested_method_definition = METHOD_DEFINITION_PROGRAM_LOUDNESS;
  ------------------
  |  |   28|    475|#define METHOD_DEFINITION_PROGRAM_LOUDNESS 1
  ------------------
  736|    475|      WORD32 other_method_definition = METHOD_DEFINITION_PROGRAM_LOUDNESS;
  ------------------
  |  |   28|    475|#define METHOD_DEFINITION_PROGRAM_LOUDNESS 1
  ------------------
  737|    475|      WORD32 requested_preprocessing = 0;
  738|       |
  739|    475|      const WORD32* system_bonus = measurement_system_default_tbl;
  740|       |
  741|    475|      WORD32 match_measure;
  742|    475|      FLOAT32 method_val = 0;
  743|       |
  744|    475|      switch (pstr_drc_sel_proc_params_struct->loudness_measurement_method) {
  745|      0|        case USER_METHOD_DEFINITION_DEFAULT:
  ------------------
  |  |   84|      0|#define USER_METHOD_DEFINITION_DEFAULT 0
  ------------------
  |  Branch (745:9): [True: 0, False: 475]
  ------------------
  746|    340|        case USER_METHOD_DEFINITION_PROGRAM_LOUDNESS:
  ------------------
  |  |   85|    340|#define USER_METHOD_DEFINITION_PROGRAM_LOUDNESS 1
  ------------------
  |  Branch (746:9): [True: 340, False: 135]
  ------------------
  747|    340|          requested_method_definition = METHOD_DEFINITION_PROGRAM_LOUDNESS;
  ------------------
  |  |   28|    340|#define METHOD_DEFINITION_PROGRAM_LOUDNESS 1
  ------------------
  748|    340|          other_method_definition = METHOD_DEFINITION_ANCHOR_LOUDNESS;
  ------------------
  |  |   29|    340|#define METHOD_DEFINITION_ANCHOR_LOUDNESS 2
  ------------------
  749|    340|          break;
  750|    135|        case USER_METHOD_DEFINITION_ANCHOR_LOUDNESS:
  ------------------
  |  |   86|    135|#define USER_METHOD_DEFINITION_ANCHOR_LOUDNESS 2
  ------------------
  |  Branch (750:9): [True: 135, False: 340]
  ------------------
  751|    135|          requested_method_definition = METHOD_DEFINITION_ANCHOR_LOUDNESS;
  ------------------
  |  |   29|    135|#define METHOD_DEFINITION_ANCHOR_LOUDNESS 2
  ------------------
  752|    135|          other_method_definition = METHOD_DEFINITION_PROGRAM_LOUDNESS;
  ------------------
  |  |   28|    135|#define METHOD_DEFINITION_PROGRAM_LOUDNESS 1
  ------------------
  753|    135|          break;
  754|       |
  755|      0|        default:
  ------------------
  |  Branch (755:9): [True: 0, False: 475]
  ------------------
  756|      0|          return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  757|      0|          break;
  758|    475|      }
  759|       |
  760|    475|      switch (pstr_drc_sel_proc_params_struct->loudness_measurement_system) {
  761|      0|        case USER_MEASUREMENT_SYSTEM_DEFAULT:
  ------------------
  |  |   88|      0|#define USER_MEASUREMENT_SYSTEM_DEFAULT 0
  ------------------
  |  Branch (761:9): [True: 0, False: 475]
  ------------------
  762|    470|        case USER_MEASUREMENT_SYSTEM_BS_1770_4:
  ------------------
  |  |   89|    470|#define USER_MEASUREMENT_SYSTEM_BS_1770_4 1
  ------------------
  |  Branch (762:9): [True: 470, False: 5]
  ------------------
  763|    470|          system_bonus = measurement_system_bs1770_3_tbl;
  764|    470|          break;
  765|      0|        case USER_MEASUREMENT_SYSTEM_USER:
  ------------------
  |  |   91|      0|#define USER_MEASUREMENT_SYSTEM_USER 2
  ------------------
  |  Branch (765:9): [True: 0, False: 475]
  ------------------
  766|      0|          system_bonus = measurement_system_user_tbl;
  767|      0|          break;
  768|      5|        case USER_MEASUREMENT_SYSTEM_EXPERT_PANEL:
  ------------------
  |  |   92|      5|#define USER_MEASUREMENT_SYSTEM_EXPERT_PANEL 3
  ------------------
  |  Branch (768:9): [True: 5, False: 470]
  ------------------
  769|      5|          system_bonus = measurement_system_expert_tbl;
  770|      5|          break;
  771|      0|        case USER_MEASUREMENT_SYSTEM_RESERVED_A:
  ------------------
  |  |   93|      0|#define USER_MEASUREMENT_SYSTEM_RESERVED_A 4
  ------------------
  |  Branch (771:9): [True: 0, False: 475]
  ------------------
  772|      0|          system_bonus = measurement_system_rms_a_tbl;
  773|      0|          break;
  774|      0|        case USER_MEASUREMENT_SYSTEM_RESERVED_B:
  ------------------
  |  |   94|      0|#define USER_MEASUREMENT_SYSTEM_RESERVED_B 5
  ------------------
  |  Branch (774:9): [True: 0, False: 475]
  ------------------
  775|      0|          system_bonus = measurement_system_rms_b_tbl;
  776|      0|          break;
  777|      0|        case USER_MEASUREMENT_SYSTEM_RESERVED_C:
  ------------------
  |  |   95|      0|#define USER_MEASUREMENT_SYSTEM_RESERVED_C 6
  ------------------
  |  Branch (777:9): [True: 0, False: 475]
  ------------------
  778|      0|          system_bonus = measurement_system_rms_c_tbl;
  779|      0|          break;
  780|      0|        case USER_MEASUREMENT_SYSTEM_RESERVED_D:
  ------------------
  |  |   96|      0|#define USER_MEASUREMENT_SYSTEM_RESERVED_D 7
  ------------------
  |  Branch (780:9): [True: 0, False: 475]
  ------------------
  781|      0|          system_bonus = measurement_system_rms_d_tbl;
  782|      0|          break;
  783|      0|        case USER_MEASUREMENT_SYSTEM_RESERVED_E:
  ------------------
  |  |   97|      0|#define USER_MEASUREMENT_SYSTEM_RESERVED_E 8
  ------------------
  |  Branch (783:9): [True: 0, False: 475]
  ------------------
  784|      0|          system_bonus = measurement_system_rms_e_tbl;
  785|      0|          break;
  786|       |
  787|      0|        default:
  ------------------
  |  Branch (787:9): [True: 0, False: 475]
  ------------------
  788|      0|          return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  789|      0|          break;
  790|    475|      }
  791|       |
  792|    475|      switch (pstr_drc_sel_proc_params_struct->loudness_measurement_pre_proc) {
  793|    475|        case USER_LOUDNESS_PREPROCESSING_DEFAULT:
  ------------------
  |  |   99|    475|#define USER_LOUDNESS_PREPROCESSING_DEFAULT 0
  ------------------
  |  Branch (793:9): [True: 475, False: 0]
  ------------------
  794|    475|        case USER_LOUDNESS_PREPROCESSING_OFF:
  ------------------
  |  |  100|    475|#define USER_LOUDNESS_PREPROCESSING_OFF 1
  ------------------
  |  Branch (794:9): [True: 0, False: 475]
  ------------------
  795|    475|          requested_preprocessing = 0;
  796|    475|          break;
  797|      0|        case USER_LOUDNESS_PREPROCESSING_HIGHPASS:
  ------------------
  |  |  101|      0|#define USER_LOUDNESS_PREPROCESSING_HIGHPASS 2
  ------------------
  |  Branch (797:9): [True: 0, False: 475]
  ------------------
  798|      0|          requested_preprocessing = 1;
  799|      0|          break;
  800|       |
  801|      0|        default:
  ------------------
  |  Branch (801:9): [True: 0, False: 475]
  ------------------
  802|      0|          return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  803|      0|          break;
  804|    475|      }
  805|       |
  806|  1.84k|      for (k = 0; k < info_count; k++) {
  ------------------
  |  Branch (806:19): [True: 1.37k, False: 475]
  ------------------
  807|  1.37k|        match_measure = -1;
  808|  8.21k|        for (n = 0; n < loudness_info[k]->measurement_count; n++) {
  ------------------
  |  Branch (808:21): [True: 6.84k, False: 1.37k]
  ------------------
  809|  6.84k|          ia_loudness_measure_struct* loudness_measure =
  810|  6.84k|              &(loudness_info[k]->loudness_measure[n]);
  811|  6.84k|          if (match_measure <
  ------------------
  |  Branch (811:15): [True: 4.64k, False: 2.19k]
  ------------------
  812|  6.84k|                  system_bonus[loudness_measure->measurement_system] &&
  813|  4.64k|              requested_method_definition == loudness_measure->method_def) {
  ------------------
  |  Branch (813:15): [True: 997, False: 3.64k]
  ------------------
  814|    997|            method_val = loudness_measure->method_val;
  815|    997|            match_measure = system_bonus[loudness_measure->measurement_system];
  816|    997|          }
  817|  6.84k|        }
  818|  1.37k|        if (match_measure == -1) {
  ------------------
  |  Branch (818:13): [True: 559, False: 813]
  ------------------
  819|  3.20k|          for (n = 0; n < loudness_info[k]->measurement_count; n++) {
  ------------------
  |  Branch (819:23): [True: 2.65k, False: 559]
  ------------------
  820|  2.65k|            ia_loudness_measure_struct* loudness_measure =
  821|  2.65k|                &(loudness_info[k]->loudness_measure[n]);
  822|  2.65k|            if (match_measure <
  ------------------
  |  Branch (822:17): [True: 1.57k, False: 1.07k]
  ------------------
  823|  2.65k|                    system_bonus[loudness_measure->measurement_system] &&
  824|  1.57k|                other_method_definition == loudness_measure->method_def) {
  ------------------
  |  Branch (824:17): [True: 650, False: 924]
  ------------------
  825|    650|              method_val = loudness_measure->method_val;
  826|    650|              match_measure =
  827|    650|                  system_bonus[loudness_measure->measurement_system];
  828|    650|            }
  829|  2.65k|          }
  830|    559|        }
  831|       |
  832|  1.37k|        if (requested_preprocessing == 1) {
  ------------------
  |  Branch (832:13): [True: 0, False: 1.37k]
  ------------------
  833|      0|          err = impd_find_high_pass_loudness_adjust(
  834|      0|              pstr_loudness_info, requested_dwnmix_id, drc_set_id_requested,
  835|      0|              pstr_drc_sel_proc_params_struct->album_mode,
  836|      0|              (FLOAT32)
  837|      0|                  pstr_drc_sel_proc_params_struct->device_cut_off_frequency,
  838|      0|              &loudness_hp_adjust_present, &pre_proc_adjust);
  839|      0|          if (err) return (err);
  ------------------
  |  Branch (839:15): [True: 0, False: 0]
  ------------------
  840|       |
  841|      0|          if (loudness_hp_adjust_present == 0) {
  ------------------
  |  Branch (841:15): [True: 0, False: 0]
  ------------------
  842|      0|            pre_proc_adjust = -2.0f;
  843|      0|          }
  844|      0|          method_val += pre_proc_adjust;
  845|      0|        }
  846|       |
  847|  1.37k|        eq_set_id[k] = 0;
  848|       |
  849|  1.37k|        loudness_normalization_gain_db[k] =
  850|  1.37k|            pstr_drc_sel_proc_params_struct->target_loudness - method_val;
  851|  1.37k|        loudness[k] = method_val;
  852|  1.37k|      }
  853|    475|    }
  854|  1.83k|  }
  855|  1.83k|  if (info_count > 0) {
  ------------------
  |  Branch (855:7): [True: 475, False: 1.36k]
  ------------------
  856|    475|    *loudness_info_count = info_count;
  857|  1.36k|  } else {
  858|  1.36k|    *loudness_info_count = pre_lim_count;
  859|  1.36k|  }
  860|       |
  861|  1.83k|  return (0);
  862|  1.83k|}
impd_mixing_level_info:
  870|  2.70k|    WORD32 eq_set_id_requested, FLOAT32* mixing_level) {
  871|  2.70k|  WORD32 n, k, info_count;
  872|  2.70k|  WORD32 album_mode = pstr_drc_sel_proc_params_struct->album_mode;
  873|  2.70k|  WORD32 loudness_drc_set_id_requested;
  874|  2.70k|  ia_loudness_info_struct* loudness_info;
  875|       |
  876|  2.70k|  *mixing_level = MIXING_LEVEL_DEFAULT;
  ------------------
  |  |  864|  2.70k|#define MIXING_LEVEL_DEFAULT 85.0f
  ------------------
  877|  2.70k|  if (drc_set_id_requested < 0) {
  ------------------
  |  Branch (877:7): [True: 771, False: 1.93k]
  ------------------
  878|    771|    loudness_drc_set_id_requested = 0;
  879|  1.93k|  } else {
  880|  1.93k|    loudness_drc_set_id_requested = drc_set_id_requested;
  881|  1.93k|  }
  882|  2.70k|  if (album_mode == 1) {
  ------------------
  |  Branch (882:7): [True: 0, False: 2.70k]
  ------------------
  883|      0|    info_count = pstr_loudness_info->loudness_info_album_count;
  884|      0|    loudness_info = pstr_loudness_info->str_loudness_info_album;
  885|  2.70k|  } else {
  886|  2.70k|    info_count = pstr_loudness_info->loudness_info_count;
  887|  2.70k|    loudness_info = pstr_loudness_info->loudness_info;
  888|  2.70k|  }
  889|  46.8k|  for (n = 0; n < info_count; n++) {
  ------------------
  |  Branch (889:15): [True: 44.1k, False: 2.70k]
  ------------------
  890|  44.1k|    if ((requested_dwnmix_id == loudness_info[n].downmix_id) ||
  ------------------
  |  Branch (890:9): [True: 30.3k, False: 13.8k]
  ------------------
  891|  30.8k|        (ID_FOR_ANY_DOWNMIX == loudness_info[n].downmix_id)) {
  ------------------
  |  |  136|  13.8k|#define ID_FOR_ANY_DOWNMIX 0x7F
  ------------------
  |  Branch (891:9): [True: 559, False: 13.2k]
  ------------------
  892|  30.8k|      if (loudness_drc_set_id_requested == loudness_info[n].drc_set_id) {
  ------------------
  |  Branch (892:11): [True: 6.16k, False: 24.6k]
  ------------------
  893|  6.16k|        if (eq_set_id_requested == loudness_info[n].eq_set_id) {
  ------------------
  |  Branch (893:13): [True: 6.13k, False: 31]
  ------------------
  894|  13.3k|          for (k = 0; k < loudness_info[n].measurement_count; k++) {
  ------------------
  |  Branch (894:23): [True: 7.23k, False: 6.09k]
  ------------------
  895|  7.23k|            if (loudness_info[n].loudness_measure[k].method_def ==
  ------------------
  |  Branch (895:17): [True: 34, False: 7.20k]
  ------------------
  896|  7.23k|                METHOD_DEFINITION_MIXING_LEVEL) {
  ------------------
  |  |   34|  7.23k|#define METHOD_DEFINITION_MIXING_LEVEL 7
  ------------------
  897|     34|              *mixing_level = loudness_info[n].loudness_measure[k].method_val;
  898|     34|              break;
  899|     34|            }
  900|  7.23k|          }
  901|  6.13k|        }
  902|  6.16k|      }
  903|  30.8k|    }
  904|  44.1k|  }
  905|  2.70k|  return (0);
  906|  2.70k|}

impd_process_time_domain:
   77|  19.4k|IA_ERRORCODE impd_process_time_domain(ia_drc_api_struct *p_obj_drc) {
   78|  19.4k|  IA_ERRORCODE err_code = IA_NO_ERROR;
  ------------------
  |  |   36|  19.4k|#define IA_NO_ERROR 0x00000000
  ------------------
   79|  19.4k|  WORD32 i, j;
   80|  19.4k|  FLOAT32 *audio_buff[10];
   81|  19.4k|  WORD32 last_frame = 0;
   82|  19.4k|  WORD32 num_sample_to_process;
   83|       |
   84|  19.4k|  if (p_obj_drc->p_state->ui_in_bytes <= 0) {
  ------------------
  |  Branch (84:7): [True: 334, False: 19.0k]
  ------------------
   85|    334|    p_obj_drc->p_state->ui_out_bytes = 0;
   86|    334|    return IA_NO_ERROR;
  ------------------
  |  |   36|    334|#define IA_NO_ERROR 0x00000000
  ------------------
   87|    334|  }
   88|       |
   89|  19.0k|  p_obj_drc->str_payload.pstr_loudness_info->loudness_info_album_count = 0;
   90|  19.0k|  p_obj_drc->str_payload.pstr_loudness_info->loudness_info_count = 0;
   91|  19.0k|  p_obj_drc->str_payload.pstr_loudness_info->loudness_info_set_ext_present = 0;
   92|  19.0k|  p_obj_drc->str_payload.pstr_drc_config->is_config_changed =
   93|  19.0k|      p_obj_drc->str_config.is_config_changed;
   94|       |
   95|  19.0k|  if (p_obj_drc->str_config.is_config_changed == 1) {
  ------------------
  |  Branch (95:7): [True: 0, False: 19.0k]
  ------------------
   96|      0|    err_code = impd_process_drc_bitstream_dec_loudness_info_set(
   97|      0|        p_obj_drc->pstr_bit_buf, p_obj_drc->str_payload.pstr_loudness_info,
   98|      0|        &p_obj_drc->str_bit_handler.bitstream_loudness_info[0],
   99|      0|        p_obj_drc->str_bit_handler.num_bytes_bs_loudness_info);
  100|      0|    if (err_code != IA_NO_ERROR) return err_code;
  ------------------
  |  |   36|      0|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (100:9): [True: 0, False: 0]
  ------------------
  101|       |
  102|      0|    err_code = impd_drc_uni_sel_proc_process(
  103|      0|        p_obj_drc->str_payload.pstr_selection_proc,
  104|      0|        p_obj_drc->str_payload.pstr_drc_config,
  105|      0|        p_obj_drc->str_payload.pstr_loudness_info,
  106|      0|        p_obj_drc->str_payload.pstr_drc_sel_proc_output);
  107|      0|    if (err_code != IA_NO_ERROR) return err_code;
  ------------------
  |  |   36|      0|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (107:9): [True: 0, False: 0]
  ------------------
  108|       |
  109|      0|    err_code = impd_process_drc_bitstream_dec_config(
  110|      0|        p_obj_drc->str_payload.pstr_bitstream_dec, p_obj_drc->pstr_bit_buf,
  111|      0|        p_obj_drc->str_payload.pstr_drc_config,
  112|      0|        &p_obj_drc->str_bit_handler.bitstream_drc_config[0],
  113|      0|        p_obj_drc->str_bit_handler.num_bytes_bs_drc_config);
  114|      0|    if (err_code == 1) {
  ------------------
  |  Branch (114:9): [True: 0, False: 0]
  ------------------
  115|      0|      memset(p_obj_drc->str_payload.pstr_drc_config, 0, sizeof(ia_drc_config));
  116|      0|      err_code = impd_drc_set_default_bitstream_config(
  117|      0|          p_obj_drc->str_payload.pstr_drc_config);
  118|      0|      p_obj_drc->str_payload.pstr_drc_config->channel_layout
  119|      0|          .base_channel_count = p_obj_drc->str_config.num_ch_in;
  120|      0|    }
  121|       |
  122|      0|    if (err_code != IA_NO_ERROR) return err_code;
  ------------------
  |  |   36|      0|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (122:9): [True: 0, False: 0]
  ------------------
  123|      0|  }
  124|       |
  125|  19.0k|  if (p_obj_drc->frame_count == 0) {
  ------------------
  |  Branch (125:7): [True: 1.29k, False: 17.7k]
  ------------------
  126|  1.29k|    p_obj_drc->str_config.ln_dbgain_prev =
  127|  1.29k|        (WORD32)p_obj_drc->str_payload.pstr_drc_sel_proc_output
  128|  1.29k|            ->loudness_normalization_gain_db;
  129|  1.29k|  }
  130|       |
  131|  19.0k|  if (!p_obj_drc->str_payload.pstr_drc_config->ln_gain_changed) {
  ------------------
  |  Branch (131:7): [True: 18.4k, False: 677]
  ------------------
  132|  18.4k|    if (p_obj_drc->str_payload.pstr_drc_sel_proc_output
  ------------------
  |  Branch (132:9): [True: 24, False: 18.3k]
  ------------------
  133|  18.4k|            ->loudness_normalization_gain_db !=
  134|  18.4k|        p_obj_drc->str_config.ln_dbgain_prev) {
  135|     24|      p_obj_drc->str_payload.pstr_drc_config->ln_gain_changed = 1;
  136|     24|    }
  137|  18.4k|  }
  138|       |
  139|  19.0k|  err_code = impd_process_drc_bitstream_dec_gain(
  140|  19.0k|      p_obj_drc->str_payload.pstr_bitstream_dec, p_obj_drc->pstr_bit_buf,
  141|  19.0k|      p_obj_drc->str_payload.pstr_drc_config,
  142|  19.0k|      p_obj_drc->str_payload.pstr_drc_gain,
  143|  19.0k|      p_obj_drc->str_bit_handler.it_bit_buf,
  144|  19.0k|      p_obj_drc->str_bit_handler.num_bytes_bs,
  145|  19.0k|      p_obj_drc->str_bit_handler.num_bits_offset_bs,
  146|  19.0k|      &p_obj_drc->str_bit_handler.num_bits_read_bs);
  147|       |
  148|  19.0k|  if (err_code > PROC_COMPLETE) return -1;
  ------------------
  |  |  127|  19.0k|#define PROC_COMPLETE 1
  ------------------
  |  Branch (148:7): [True: 2.13k, False: 16.9k]
  ------------------
  149|       |
  150|  16.9k|  p_obj_drc->str_bit_handler.num_bytes_read_bs =
  151|  16.9k|      (p_obj_drc->str_bit_handler.num_bits_read_bs >> 3);
  152|  16.9k|  p_obj_drc->str_bit_handler.num_bits_offset_bs =
  153|  16.9k|      (p_obj_drc->str_bit_handler.num_bits_read_bs & 7);
  154|  16.9k|  p_obj_drc->str_bit_handler.byte_index_bs +=
  155|  16.9k|      p_obj_drc->str_bit_handler.num_bytes_read_bs;
  156|       |
  157|  16.9k|  if (p_obj_drc->str_bit_handler.num_bits_offset_bs != 0) {
  ------------------
  |  Branch (157:7): [True: 9.49k, False: 7.46k]
  ------------------
  158|  9.49k|    p_obj_drc->str_bit_handler.num_bits_read_bs =
  159|  9.49k|        p_obj_drc->str_bit_handler.num_bits_read_bs + 8 -
  160|  9.49k|        p_obj_drc->str_bit_handler.num_bits_offset_bs;
  161|  9.49k|    p_obj_drc->str_bit_handler.num_bytes_read_bs =
  162|  9.49k|        p_obj_drc->str_bit_handler.num_bytes_read_bs + 1;
  163|  9.49k|    p_obj_drc->str_bit_handler.num_bits_offset_bs = 0;
  164|  9.49k|    p_obj_drc->str_bit_handler.byte_index_bs =
  165|  9.49k|        p_obj_drc->str_bit_handler.byte_index_bs + 1;
  166|  9.49k|  }
  167|       |
  168|  16.9k|  num_sample_to_process =
  169|  16.9k|      (p_obj_drc->p_state->ui_in_bytes / p_obj_drc->str_config.num_ch_in /
  170|  16.9k|       (p_obj_drc->str_config.pcm_size >> 3));
  171|       |
  172|  16.9k|  p_obj_drc->str_config.frame_size = num_sample_to_process;
  173|       |
  174|  16.9k|  if (num_sample_to_process < p_obj_drc->str_config.frame_size) last_frame = 1;
  ------------------
  |  Branch (174:7): [True: 0, False: 16.9k]
  ------------------
  175|       |
  176|  16.9k|  if (p_obj_drc->str_config.pcm_size == 16) {
  ------------------
  |  Branch (176:7): [True: 16.9k, False: 0]
  ------------------
  177|  16.9k|    FLOAT32 *scratch_buffer = (FLOAT32 *)p_obj_drc->pp_mem[1];
  178|  16.9k|    WORD16 *input_buffer16 = (WORD16 *)p_obj_drc->pp_mem[2];
  179|  45.3k|    for (i = 0; i < p_obj_drc->str_config.num_ch_in; i++) {
  ------------------
  |  Branch (179:17): [True: 28.3k, False: 16.9k]
  ------------------
  180|  28.3k|      audio_buff[i] =
  181|  28.3k|          scratch_buffer + i * (p_obj_drc->str_config.frame_size + 32);
  182|       |
  183|  55.6M|      for (j = 0; j < num_sample_to_process; j++) {
  ------------------
  |  Branch (183:19): [True: 55.6M, False: 28.3k]
  ------------------
  184|  55.6M|        audio_buff[i][j] =
  185|  55.6M|            ((FLOAT32)input_buffer16[j * p_obj_drc->str_config.num_ch_in + i]) /
  186|  55.6M|            32767.0f;
  187|  55.6M|      }
  188|  28.3k|    }
  189|  16.9k|  } else if (p_obj_drc->str_config.pcm_size == 24) {
  ------------------
  |  Branch (189:14): [True: 0, False: 0]
  ------------------
  190|      0|    FLOAT32 *scratch_buffer = (FLOAT32 *)p_obj_drc->pp_mem[1];
  191|      0|    WORD8 *input_buffer8 = (WORD8 *)p_obj_drc->pp_mem[2];
  192|      0|    for (i = 0; i < p_obj_drc->str_config.num_ch_in; i++) {
  ------------------
  |  Branch (192:17): [True: 0, False: 0]
  ------------------
  193|      0|      audio_buff[i] =
  194|      0|          scratch_buffer + i * (p_obj_drc->str_config.frame_size + 32);
  195|       |
  196|      0|      for (j = 0; j < num_sample_to_process; j++) {
  ------------------
  |  Branch (196:19): [True: 0, False: 0]
  ------------------
  197|      0|        WORD32 temp;
  198|       |
  199|      0|        WORD8 *addr =
  200|      0|            (WORD8 *)(&input_buffer8[3 * j * p_obj_drc->str_config.num_ch_in +
  201|      0|                                     3 * i]);
  202|      0|        temp = (WORD8)(*(addr + 2));
  203|      0|        temp = (temp << 8) | ((WORD8)(*(addr + 1)) & 0xff);
  204|      0|        temp = (temp << 8) | (((WORD8) * (addr)) & 0xff);
  205|       |
  206|      0|        audio_buff[i][j] = (FLOAT32)((temp) / 8388607.0f);
  207|      0|      }
  208|      0|    }
  209|      0|  } else {
  210|      0|    FLOAT32 *scratch_buffer = (FLOAT32 *)p_obj_drc->pp_mem[1];
  211|      0|    FLOAT32 *input_buffer = (FLOAT32 *)p_obj_drc->pp_mem[2];
  212|      0|    for (i = 0; i < p_obj_drc->str_config.num_ch_in; i++) {
  ------------------
  |  Branch (212:17): [True: 0, False: 0]
  ------------------
  213|      0|      audio_buff[i] =
  214|      0|          scratch_buffer + i * (p_obj_drc->str_config.frame_size + 32);
  215|       |
  216|      0|      for (j = 0; j < num_sample_to_process; j++) {
  ------------------
  |  Branch (216:19): [True: 0, False: 0]
  ------------------
  217|      0|        audio_buff[i][j] =
  218|      0|            input_buffer[j * p_obj_drc->str_config.num_ch_in + i];
  219|      0|      }
  220|      0|    }
  221|      0|  }
  222|       |
  223|  16.9k|  err_code = impd_drc_process_time_domain(
  224|  16.9k|      p_obj_drc->str_payload.pstr_gain_dec[0],
  225|  16.9k|      p_obj_drc->str_payload.pstr_drc_config,
  226|  16.9k|      p_obj_drc->str_payload.pstr_drc_gain, audio_buff,
  227|  16.9k|      p_obj_drc->str_payload.pstr_drc_sel_proc_output
  228|  16.9k|          ->loudness_normalization_gain_db,
  229|  16.9k|      p_obj_drc->str_payload.pstr_drc_sel_proc_output->boost,
  230|  16.9k|      p_obj_drc->str_payload.pstr_drc_sel_proc_output->compress,
  231|  16.9k|      p_obj_drc->str_payload.pstr_drc_sel_proc_output
  232|  16.9k|          ->drc_characteristic_target);
  233|       |
  234|  16.9k|  if (err_code != IA_NO_ERROR) return err_code;
  ------------------
  |  |   36|  16.9k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (234:7): [True: 630, False: 16.3k]
  ------------------
  235|       |
  236|  16.3k|  if (p_obj_drc->str_payload.pstr_drc_sel_proc_output->downmix_matrix_present !=
  ------------------
  |  Branch (236:7): [True: 0, False: 16.3k]
  ------------------
  237|  16.3k|      0)
  238|      0|    err_code = impd_down_mix(p_obj_drc->str_payload.pstr_drc_sel_proc_output,
  239|      0|                             audio_buff, p_obj_drc->str_config.frame_size);
  240|       |
  241|  16.3k|  if (err_code != IA_NO_ERROR) return err_code;
  ------------------
  |  |   36|  16.3k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (241:7): [True: 0, False: 16.3k]
  ------------------
  242|       |
  243|  16.3k|  err_code = impd_drc_process_time_domain(
  244|  16.3k|      p_obj_drc->str_payload.pstr_gain_dec[1],
  245|  16.3k|      p_obj_drc->str_payload.pstr_drc_config,
  246|  16.3k|      p_obj_drc->str_payload.pstr_drc_gain, audio_buff,
  247|  16.3k|      p_obj_drc->str_payload.pstr_drc_sel_proc_output
  248|  16.3k|          ->loudness_normalization_gain_db,
  249|  16.3k|      p_obj_drc->str_payload.pstr_drc_sel_proc_output->boost,
  250|  16.3k|      p_obj_drc->str_payload.pstr_drc_sel_proc_output->compress,
  251|  16.3k|      p_obj_drc->str_payload.pstr_drc_sel_proc_output
  252|  16.3k|          ->drc_characteristic_target);
  253|       |
  254|  16.3k|  if (err_code != IA_NO_ERROR) return err_code;
  ------------------
  |  |   36|  16.3k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (254:7): [True: 0, False: 16.3k]
  ------------------
  255|       |
  256|  16.3k|  if (p_obj_drc->str_payload.pstr_drc_config->apply_drc == 0 ||
  ------------------
  |  Branch (256:7): [True: 8.39k, False: 7.93k]
  ------------------
  257|  7.93k|      p_obj_drc->str_payload.pstr_drc_config->is_config_changed == 0 ||
  ------------------
  |  Branch (257:7): [True: 7.93k, False: 0]
  ------------------
  258|  16.3k|      p_obj_drc->str_payload.pstr_drc_config->ln_gain_changed == 0) {
  ------------------
  |  Branch (258:7): [True: 0, False: 0]
  ------------------
  259|  16.3k|    if (p_obj_drc->str_payload.pstr_drc_sel_proc_output
  ------------------
  |  Branch (259:9): [True: 580, False: 15.7k]
  ------------------
  260|  16.3k|          ->loudness_normalization_gain_db != 0.0f) {
  261|    580|      FLOAT32 gain_value =
  262|    580|          (FLOAT32)pow(10.0, p_obj_drc->str_payload.pstr_drc_sel_proc_output
  263|    580|                                   ->loudness_normalization_gain_db /
  264|    580|                               20.0);
  265|  1.66k|      for (i = 0; i < p_obj_drc->str_config.num_ch_out; i++) {
  ------------------
  |  Branch (265:19): [True: 1.08k, False: 580]
  ------------------
  266|  1.10M|        for (j = 0; j < p_obj_drc->str_config.frame_size; j++) {
  ------------------
  |  Branch (266:21): [True: 1.10M, False: 1.08k]
  ------------------
  267|  1.10M|          audio_buff[i][j] *= gain_value;
  268|  1.10M|        }
  269|  1.08k|      }
  270|    580|    }
  271|  16.3k|  }
  272|       |
  273|  16.3k|  if (p_obj_drc->str_config.peak_limiter) {
  ------------------
  |  Branch (273:7): [True: 0, False: 16.3k]
  ------------------
  274|      0|    FLOAT32 *output_buffer = (FLOAT32 *)p_obj_drc->pp_mem[3];
  275|      0|    for (i = 0; i < p_obj_drc->str_config.num_ch_out; i++) {
  ------------------
  |  Branch (275:17): [True: 0, False: 0]
  ------------------
  276|      0|      for (j = 0; j < p_obj_drc->str_config.frame_size; j++) {
  ------------------
  |  Branch (276:19): [True: 0, False: 0]
  ------------------
  277|      0|        output_buffer[j * p_obj_drc->str_config.num_ch_out + i] =
  278|      0|            audio_buff[i][j];
  279|      0|      }
  280|      0|    }
  281|       |
  282|      0|    impd_limiter_process(p_obj_drc->str_payload.pstr_peak_limiter,
  283|      0|                         output_buffer, p_obj_drc->str_config.frame_size);
  284|       |
  285|      0|    for (i = 0; i < p_obj_drc->str_config.num_ch_out; i++) {
  ------------------
  |  Branch (285:17): [True: 0, False: 0]
  ------------------
  286|      0|      for (j = 0; j < p_obj_drc->str_config.frame_size; j++) {
  ------------------
  |  Branch (286:19): [True: 0, False: 0]
  ------------------
  287|      0|        audio_buff[i][j] =
  288|      0|            output_buffer[j * p_obj_drc->str_config.num_ch_out + i];
  289|      0|      }
  290|      0|    }
  291|      0|  }
  292|       |
  293|  16.3k|  if (p_obj_drc->str_config.pcm_size == 16) {
  ------------------
  |  Branch (293:7): [True: 16.3k, False: 0]
  ------------------
  294|  16.3k|    WORD16 *output_buffer16 = (WORD16 *)p_obj_drc->pp_mem[3];
  295|  43.9k|    for (i = 0; i < p_obj_drc->str_config.num_ch_out; i++) {
  ------------------
  |  Branch (295:17): [True: 27.6k, False: 16.3k]
  ------------------
  296|  54.3M|      for (j = 0; j < p_obj_drc->str_config.frame_size; j++) {
  ------------------
  |  Branch (296:19): [True: 54.3M, False: 27.6k]
  ------------------
  297|  54.3M|        if (audio_buff[i][j] < -1.0f)
  ------------------
  |  Branch (297:13): [True: 49.5k, False: 54.2M]
  ------------------
  298|  49.5k|          output_buffer16[j * p_obj_drc->str_config.num_ch_out + i] = -32767;
  299|       |
  300|  54.2M|        else if (audio_buff[i][j] > 1.0f)
  ------------------
  |  Branch (300:18): [True: 49.1k, False: 54.2M]
  ------------------
  301|  49.1k|          output_buffer16[j * p_obj_drc->str_config.num_ch_out + i] = 32767;
  302|       |
  303|  54.2M|        else
  304|  54.2M|          output_buffer16[j * p_obj_drc->str_config.num_ch_out + i] =
  305|  54.2M|              (WORD16)(audio_buff[i][j] * 32767.0f);
  306|  54.3M|      }
  307|  27.6k|    }
  308|  16.3k|  } else if (p_obj_drc->str_config.pcm_size == 24) {
  ------------------
  |  Branch (308:14): [True: 0, False: 0]
  ------------------
  309|      0|    WORD8 *output_buffer8 = (WORD8 *)p_obj_drc->pp_mem[3];
  310|      0|    for (i = 0; i < p_obj_drc->str_config.num_ch_out; i++) {
  ------------------
  |  Branch (310:17): [True: 0, False: 0]
  ------------------
  311|      0|      for (j = 0; j < p_obj_drc->str_config.frame_size; j++) {
  ------------------
  |  Branch (311:19): [True: 0, False: 0]
  ------------------
  312|      0|        WORD32 temp = 0;
  313|      0|        WORD8 *temp_addr =
  314|      0|            &output_buffer8[3 * j * p_obj_drc->str_config.num_ch_out + 3 * i];
  315|       |
  316|      0|        if (audio_buff[i][j] < -1.0f)
  ------------------
  |  Branch (316:13): [True: 0, False: 0]
  ------------------
  317|      0|          temp = -8388607;
  318|       |
  319|      0|        else if (audio_buff[i][j] > 1.0f)
  ------------------
  |  Branch (319:18): [True: 0, False: 0]
  ------------------
  320|      0|          temp = 8388607;
  321|       |
  322|      0|        else
  323|      0|          temp = (WORD32)(audio_buff[i][j] * 8388607.0f);
  324|       |
  325|      0|        *temp_addr++ = (WORD8)(temp & 0xff);
  326|      0|        *temp_addr++ = (WORD8)((WORD32)temp >> 8) & 0xff;
  327|      0|        *temp_addr = (WORD8)((WORD32)temp >> 16) & 0xff;
  328|      0|      }
  329|      0|    }
  330|      0|  } else {
  331|      0|    FLOAT32 *output_buffer = (FLOAT32 *)p_obj_drc->pp_mem[3];
  332|      0|    for (i = 0; i < p_obj_drc->str_config.num_ch_out; i++) {
  ------------------
  |  Branch (332:17): [True: 0, False: 0]
  ------------------
  333|      0|      for (j = 0; j < p_obj_drc->str_config.frame_size; j++) {
  ------------------
  |  Branch (333:19): [True: 0, False: 0]
  ------------------
  334|      0|        output_buffer[j * p_obj_drc->str_config.num_ch_out + i] =
  335|      0|            audio_buff[i][j];
  336|      0|      }
  337|      0|    }
  338|      0|  }
  339|       |
  340|  16.3k|  p_obj_drc->p_state->ui_out_bytes =
  341|  16.3k|      p_obj_drc->str_config.num_ch_out *
  342|  16.3k|      (p_obj_drc->p_state->ui_in_bytes / p_obj_drc->str_config.num_ch_in);
  343|       |
  344|  16.3k|  if (p_obj_drc->p_state->delay_in_output != 0) {
  ------------------
  |  Branch (344:7): [True: 0, False: 16.3k]
  ------------------
  345|      0|    FLOAT32 *output_buffer = (FLOAT32 *)p_obj_drc->pp_mem[3];
  346|      0|    WORD16 *output_buffer16 = (WORD16 *)p_obj_drc->pp_mem[3];
  347|      0|    p_obj_drc->p_state->ui_out_bytes = p_obj_drc->str_config.num_ch_out *
  348|      0|                                       (p_obj_drc->str_config.frame_size -
  349|      0|                                        p_obj_drc->p_state->delay_in_output) *
  350|      0|                                       (p_obj_drc->str_config.pcm_size >> 3);
  351|      0|    if (p_obj_drc->str_config.pcm_size == 16)
  ------------------
  |  Branch (351:9): [True: 0, False: 0]
  ------------------
  352|      0|      memcpy(output_buffer16,
  353|      0|             (output_buffer16 + (p_obj_drc->p_state->delay_in_output *
  354|      0|                                 p_obj_drc->str_config.num_ch_out)),
  355|      0|             p_obj_drc->p_state->ui_out_bytes);
  356|      0|    else
  357|      0|      memcpy(output_buffer,
  358|      0|             (output_buffer + (p_obj_drc->p_state->delay_in_output *
  359|      0|                               p_obj_drc->str_config.num_ch_out)),
  360|      0|             p_obj_drc->p_state->ui_out_bytes);
  361|       |
  362|      0|    p_obj_drc->p_state->delay_adjust_samples =
  363|      0|        p_obj_drc->p_state->delay_in_output;
  364|      0|    p_obj_drc->p_state->delay_in_output = 0;
  365|      0|  }
  366|  16.3k|  if (last_frame == 1) {
  ------------------
  |  Branch (366:7): [True: 0, False: 16.3k]
  ------------------
  367|      0|    if ((num_sample_to_process + p_obj_drc->p_state->delay_adjust_samples) <=
  ------------------
  |  Branch (367:9): [True: 0, False: 0]
  ------------------
  368|      0|        p_obj_drc->str_config.frame_size)
  369|      0|      p_obj_drc->p_state->ui_out_bytes =
  370|      0|          (num_sample_to_process + p_obj_drc->p_state->delay_adjust_samples) *
  371|      0|          p_obj_drc->str_config.num_ch_out *
  372|      0|          (p_obj_drc->str_config.pcm_size >> 3);
  373|      0|    else
  374|      0|      p_obj_drc->p_state->ui_out_bytes = (p_obj_drc->str_config.frame_size) *
  375|      0|                                         p_obj_drc->str_config.num_ch_out *
  376|      0|                                         (p_obj_drc->str_config.pcm_size >> 3);
  377|      0|  }
  378|  16.3k|  p_obj_drc->frame_count++;
  379|  16.3k|  return err_code;
  380|  16.3k|}

impd_init_parametric_drc:
   44|  3.08k|    ia_parametric_drc_params_struct* p_parametricdrc_params) {
   45|  3.08k|  static const WORD32 sub_band_count_tbl[4] = {0, 64, 71, 256};
   46|  3.08k|  p_parametricdrc_params->drc_frame_size = drc_frame_size;
   47|  3.08k|  p_parametricdrc_params->sampling_rate = sampling_rate;
   48|  3.08k|  p_parametricdrc_params->sub_band_domain_mode = sub_band_domain_mode;
   49|       |
   50|  3.08k|  p_parametricdrc_params->sub_band_count =
   51|  3.08k|      sub_band_count_tbl[sub_band_domain_mode];
   52|       |
   53|  3.08k|  return 0;
   54|  3.08k|}

impd_apply_gains_and_add:
   41|  4.49k|    FLOAT32* channel_audio[], WORD32 impd_apply_gains) {
   42|  4.49k|  WORD32 c, b, g, i;
   43|  4.49k|  WORD32 offset = 0, signal_index = 0;
   44|  4.49k|  WORD32 gain_index_for_group[CHANNEL_GROUP_COUNT_MAX];
   45|  4.49k|  WORD32 signal_index_for_channel[MAX_CHANNEL_COUNT];
   46|  4.49k|  FLOAT32* lpcm_gains;
   47|  4.49k|  FLOAT32 sum;
   48|  4.49k|  FLOAT32 drc_gain_last = 0, gain_thr;
   49|  4.49k|  WORD32 i_end, i_start;
   50|  4.49k|  ia_drc_instructions_struct* str_drc_instruction_str =
   51|  4.49k|      &(pstr_drc_instruction_arr[drc_instructions_index]);
   52|       |
   53|  4.49k|  if (drc_instructions_index >= 0) {
  ------------------
  |  Branch (53:7): [True: 4.49k, False: 0]
  ------------------
   54|  4.49k|    str_drc_instruction_str =
   55|  4.49k|        &(pstr_drc_instruction_arr[drc_instructions_index]);
   56|  4.49k|    {
   57|  4.49k|      if (str_drc_instruction_str->drc_set_id > 0) {
  ------------------
  |  Branch (57:11): [True: 4.49k, False: 0]
  ------------------
   58|  4.49k|        if (ia_drc_params_struct->delay_mode == DELAY_MODE_LOW_DELAY) {
  ------------------
  |  |  117|  4.49k|#define DELAY_MODE_LOW_DELAY 1
  ------------------
  |  Branch (58:13): [True: 0, False: 4.49k]
  ------------------
   59|      0|          offset = ia_drc_params_struct->drc_frame_size;
   60|      0|        }
   61|  4.49k|        gain_index_for_group[0] = 0;
   62|  8.99k|        for (g = 0; g < str_drc_instruction_str->num_drc_ch_groups - 1; g++) {
  ------------------
  |  Branch (62:21): [True: 4.49k, False: 4.49k]
  ------------------
   63|  4.49k|          gain_index_for_group[g + 1] =
   64|  4.49k|              gain_index_for_group[g] +
   65|  4.49k|              str_drc_instruction_str->band_count_of_ch_group[g];
   66|  4.49k|        }
   67|  4.49k|        signal_index_for_channel[0] = 0;
   68|  6.15k|        for (c = 0; c < str_drc_instruction_str->audio_num_chan - 1; c++) {
  ------------------
  |  Branch (68:21): [True: 1.65k, False: 4.49k]
  ------------------
   69|  1.65k|          if (str_drc_instruction_str->channel_group_of_ch[c] >= 0) {
  ------------------
  |  Branch (69:15): [True: 1.65k, False: 0]
  ------------------
   70|  1.65k|            signal_index_for_channel[c + 1] =
   71|  1.65k|                signal_index_for_channel[c] +
   72|  1.65k|                str_drc_instruction_str->band_count_of_ch_group
   73|  1.65k|                    [str_drc_instruction_str->channel_group_of_ch[c]];
   74|  1.65k|          } else {
   75|      0|            signal_index_for_channel[c + 1] = signal_index_for_channel[c] + 1;
   76|      0|          }
   77|  1.65k|        }
   78|       |
   79|  13.4k|        for (g = 0; g < str_drc_instruction_str->num_drc_ch_groups; g++) {
  ------------------
  |  Branch (79:21): [True: 8.99k, False: 4.49k]
  ------------------
   80|  17.9k|          for (b = 0; b < str_drc_instruction_str->band_count_of_ch_group[g];
  ------------------
  |  Branch (80:23): [True: 8.99k, False: 8.99k]
  ------------------
   81|  8.99k|               b++) {
   82|  8.99k|            if (str_drc_instruction_str->ch_group_parametric_drc_flag[g] == 0) {
  ------------------
  |  Branch (82:17): [True: 8.99k, False: 0]
  ------------------
   83|  8.99k|              lpcm_gains =
   84|  8.99k|                  pstr_gain_buf->buf_interpolation[gain_index_for_group[g] + b]
   85|  8.99k|                      .lpcm_gains +
   86|  8.99k|                  MAX_SIGNAL_DELAY - ia_drc_params_struct->gain_delay_samples -
  ------------------
  |  |   52|  8.99k|#define MAX_SIGNAL_DELAY 4500
  ------------------
   87|  8.99k|                  ia_drc_params_struct->audio_delay_samples + offset;
   88|  8.99k|            } else {
   89|      0|              lpcm_gains =
   90|      0|                  pstr_gain_buf->buf_interpolation[gain_index_for_group[g] + b]
   91|      0|                      .lpcm_gains +
   92|      0|                  MAX_SIGNAL_DELAY +
  ------------------
  |  |   52|      0|#define MAX_SIGNAL_DELAY 4500
  ------------------
   93|      0|                  str_drc_instruction_str
   94|      0|                      ->parametric_drc_look_ahead_samples[g] -
   95|      0|                  ia_drc_params_struct->audio_delay_samples;
   96|      0|            }
   97|  8.99k|            i_end = 0;
   98|  8.99k|            i_start = 0;
   99|  17.9k|            while (i_end < ia_drc_params_struct->drc_frame_size) {
  ------------------
  |  Branch (99:20): [True: 8.99k, False: 8.99k]
  ------------------
  100|  8.99k|              if (shape_filter_block[g].shape_flter_block_flag) {
  ------------------
  |  Branch (100:19): [True: 0, False: 8.99k]
  ------------------
  101|      0|                drc_gain_last = shape_filter_block[g].drc_gain_last;
  102|      0|                gain_thr = 0.0001f * drc_gain_last;
  103|      0|                while ((i_end < ia_drc_params_struct->drc_frame_size) &&
  ------------------
  |  Branch (103:24): [True: 0, False: 0]
  ------------------
  104|      0|                       (fabs(lpcm_gains[i_end] - drc_gain_last) <= gain_thr))
  ------------------
  |  Branch (104:24): [True: 0, False: 0]
  ------------------
  105|      0|                  i_end++;
  106|  8.99k|              } else {
  107|  8.99k|                i_end = ia_drc_params_struct->drc_frame_size;
  108|  8.99k|              }
  109|       |
  110|  21.3k|              for (c = 0; c < str_drc_instruction_str->audio_num_chan; c++)
  ------------------
  |  Branch (110:27): [True: 12.3k, False: 8.99k]
  ------------------
  111|       |
  112|  12.3k|              {
  113|  12.3k|                if (g == str_drc_instruction_str->channel_group_of_ch[c]) {
  ------------------
  |  Branch (113:21): [True: 6.15k, False: 6.15k]
  ------------------
  114|  6.15k|                  signal_index = signal_index_for_channel[c] + b;
  115|       |
  116|  6.15k|                  if (impd_apply_gains == 1) {
  ------------------
  |  Branch (116:23): [True: 6.15k, False: 0]
  ------------------
  117|  6.15k|                    impd_shape_filt_block_time_process(
  118|  6.15k|                        &shape_filter_block[g], &lpcm_gains[0], signal_index,
  119|  6.15k|                        &deinterleaved_audio[signal_index][0], i_start, i_end);
  120|       |
  121|  6.15k|                  } else {
  122|      0|                    for (i = i_start; i < i_end; i++) {
  ------------------
  |  Branch (122:39): [True: 0, False: 0]
  ------------------
  123|      0|                      deinterleaved_audio[signal_index][i] = lpcm_gains[i];
  124|      0|                    }
  125|      0|                  }
  126|  6.15k|                }
  127|  12.3k|              }
  128|  8.99k|              if ((i_end < ia_drc_params_struct->drc_frame_size) &&
  ------------------
  |  Branch (128:19): [True: 0, False: 8.99k]
  ------------------
  129|      0|                  (shape_filter_block[g].shape_flter_block_flag)) {
  ------------------
  |  Branch (129:19): [True: 0, False: 0]
  ------------------
  130|      0|                impd_shape_filt_block_adapt(lpcm_gains[i_end],
  131|      0|                                            &shape_filter_block[g]);
  132|      0|              }
  133|  8.99k|              if ((i_end == i_start) &&
  ------------------
  |  Branch (133:19): [True: 0, False: 8.99k]
  ------------------
  134|      0|                  (drc_gain_last == shape_filter_block[g].drc_gain_last))
  ------------------
  |  Branch (134:19): [True: 0, False: 0]
  ------------------
  135|      0|                break;
  136|  8.99k|              i_start = i_end;
  137|  8.99k|            }
  138|  8.99k|          }
  139|  8.99k|        }
  140|  4.49k|      }
  141|  4.49k|    }
  142|  4.49k|  }
  143|       |
  144|  4.49k|  signal_index = 0;
  145|       |
  146|  4.49k|  if (str_drc_instruction_str->drc_set_id > 0) {
  ------------------
  |  Branch (146:7): [True: 4.49k, False: 0]
  ------------------
  147|  10.6k|    for (c = 0; c < str_drc_instruction_str->audio_num_chan; c++)
  ------------------
  |  Branch (147:17): [True: 6.15k, False: 4.49k]
  ------------------
  148|       |
  149|  6.15k|    {
  150|  6.15k|      g = str_drc_instruction_str->channel_group_of_ch[c];
  151|  6.15k|      if (g >= 0) {
  ------------------
  |  Branch (151:11): [True: 6.15k, False: 0]
  ------------------
  152|  14.5M|        for (i = 0; i < ia_drc_params_struct->drc_frame_size; i++) {
  ------------------
  |  Branch (152:21): [True: 14.5M, False: 6.15k]
  ------------------
  153|  14.5M|          sum = 0.0f;
  154|  29.0M|          for (b = 0; b < str_drc_instruction_str->band_count_of_ch_group[g];
  ------------------
  |  Branch (154:23): [True: 14.5M, False: 14.5M]
  ------------------
  155|  14.5M|               b++) {
  156|  14.5M|            sum += deinterleaved_audio[signal_index + b][i];
  157|  14.5M|          }
  158|       |
  159|  14.5M|          channel_audio[c][i] = sum;
  160|  14.5M|        }
  161|  6.15k|        signal_index += str_drc_instruction_str->band_count_of_ch_group[g];
  162|  6.15k|      } else {
  163|      0|        for (i = 0; i < ia_drc_params_struct->drc_frame_size; i++) {
  ------------------
  |  Branch (163:21): [True: 0, False: 0]
  ------------------
  164|      0|          channel_audio[c][i] = deinterleaved_audio[signal_index][i];
  165|      0|        }
  166|      0|        signal_index++;
  167|      0|      }
  168|  6.15k|    }
  169|  4.49k|  } else {
  170|      0|    for (c = 0; c < str_drc_instruction_str->audio_num_chan; c++)
  ------------------
  |  Branch (170:17): [True: 0, False: 0]
  ------------------
  171|       |
  172|      0|    {
  173|      0|      for (i = 0; i < ia_drc_params_struct->drc_frame_size; i++) {
  ------------------
  |  Branch (173:19): [True: 0, False: 0]
  ------------------
  174|      0|        channel_audio[c][i] = deinterleaved_audio[c][i];
  175|      0|      }
  176|      0|    }
  177|      0|  }
  178|       |
  179|  4.49k|  return;
  180|  4.49k|}
impd_filter_banks_process:
  189|  4.49k|                          const WORD32 passThru) {
  190|  4.49k|  WORD32 c, g, e, i, num_bands;
  191|       |  // WORD32 err = 0;
  192|  4.49k|  FLOAT32* audio_in;
  193|  4.49k|  FLOAT32** audio_out;
  194|  4.49k|  ia_drc_filter_bank_struct* str_drc_filter_bank;
  195|  4.49k|  ia_drc_instructions_struct* str_drc_instruction_str;
  196|  4.49k|  WORD32 drc_frame_size = ia_drc_params_struct->drc_frame_size;
  197|       |
  198|  4.49k|  if (drc_instructions_index >= 0) {
  ------------------
  |  Branch (198:7): [True: 4.49k, False: 0]
  ------------------
  199|  4.49k|    str_drc_instruction_str =
  200|  4.49k|        &(pstr_drc_instruction_arr[drc_instructions_index]);
  201|  4.49k|  } else {
  202|      0|    return -1;
  203|      0|  }
  204|       |
  205|  4.49k|  e = 0;
  206|       |
  207|  10.6k|  for (c = 0; c < str_drc_instruction_str->audio_num_chan; c++)
  ------------------
  |  Branch (207:15): [True: 6.15k, False: 4.49k]
  ------------------
  208|       |
  209|  6.15k|  {
  210|  6.15k|    str_drc_filter_bank = NULL;
  211|       |
  212|  6.15k|    audio_in = audio_io_buf[c];
  213|       |
  214|  6.15k|    audio_out = &(audio_band_buffer->non_interleaved_audio[e]);
  215|  6.15k|    if ((passThru == 0) && (drc_instructions_index >= 0)) {
  ------------------
  |  Branch (215:9): [True: 0, False: 6.15k]
  |  Branch (215:28): [True: 0, False: 0]
  ------------------
  216|      0|      if (str_drc_instruction_str->drc_set_id < 0) {
  ------------------
  |  Branch (216:11): [True: 0, False: 0]
  ------------------
  217|      0|        num_bands = 1;
  218|      0|      } else {
  219|      0|        g = str_drc_instruction_str->channel_group_of_ch[c];
  220|      0|        if (g == -1) {
  ------------------
  |  Branch (220:13): [True: 0, False: 0]
  ------------------
  221|      0|          num_bands = 1;
  222|       |          // if (ia_filter_banks_struct->str_drc_filter_bank != NULL)
  223|       |          //{
  224|      0|          str_drc_filter_bank =
  225|      0|              &(ia_filter_banks_struct->str_drc_filter_bank
  226|      0|                    [str_drc_instruction_str->num_drc_ch_groups]);
  227|       |          //}
  228|      0|        } else {
  229|      0|          num_bands = str_drc_instruction_str->band_count_of_ch_group[g];
  230|       |          // if (ia_filter_banks_struct->str_drc_filter_bank != NULL)
  231|       |          //{
  232|      0|          str_drc_filter_bank =
  233|      0|              &(ia_filter_banks_struct->str_drc_filter_bank[g]);
  234|       |          //}
  235|      0|        }
  236|       |        // if (ia_filter_banks_struct->str_drc_filter_bank != NULL)
  237|       |        //{
  238|       |        // if (&str_drc_filter_bank->str_all_pass_cascade != NULL)
  239|       |        //{
  240|      0|        impd_all_pass_cascade_process(
  241|      0|            &str_drc_filter_bank->str_all_pass_cascade, c, drc_frame_size,
  242|      0|            audio_in);
  243|       |        //}
  244|       |        //}
  245|      0|      }
  246|  6.15k|    } else {
  247|  6.15k|      num_bands = 1;
  248|  6.15k|    }
  249|  6.15k|    switch (num_bands) {
  250|  6.15k|      case 1:
  ------------------
  |  Branch (250:7): [True: 6.15k, False: 0]
  ------------------
  251|  14.5M|        for (i = 0; i < drc_frame_size; i++) {
  ------------------
  |  Branch (251:21): [True: 14.5M, False: 6.15k]
  ------------------
  252|  14.5M|          audio_out[0][i] = audio_in[i];
  253|  14.5M|        }
  254|  6.15k|        e++;
  255|  6.15k|        break;
  256|      0|      case 2:
  ------------------
  |  Branch (256:7): [True: 0, False: 6.15k]
  ------------------
  257|      0|        impd_two_band_filter_process(&str_drc_filter_bank->str_two_band_bank, c,
  258|      0|                                     drc_frame_size, audio_in, audio_out);
  259|      0|        e += 2;
  260|      0|        break;
  261|      0|      case 3:
  ------------------
  |  Branch (261:7): [True: 0, False: 6.15k]
  ------------------
  262|      0|        impd_three_band_filter_process(
  263|      0|            &str_drc_filter_bank->str_three_band_bank, c, drc_frame_size,
  264|      0|            audio_in, audio_out);
  265|      0|        e += 3;
  266|      0|        break;
  267|      0|      case 4:
  ------------------
  |  Branch (267:7): [True: 0, False: 6.15k]
  ------------------
  268|      0|        impd_four_band_filter_process(&str_drc_filter_bank->str_four_band_bank,
  269|      0|                                      c, drc_frame_size, audio_in, audio_out);
  270|      0|        e += 4;
  271|      0|        break;
  272|      0|      default:
  ------------------
  |  Branch (272:7): [True: 0, False: 6.15k]
  ------------------
  273|      0|        return (PARAM_ERROR);
  ------------------
  |  |  129|      0|#define PARAM_ERROR 3
  ------------------
  274|      0|        break;
  275|  6.15k|    }
  276|  6.15k|  }
  277|       |
  278|  4.49k|  return (0);
  279|  4.49k|}
impd_store_audio_io_buffer_time:
  282|  33.2k|    FLOAT32* audio_in_out_buf[], ia_audio_in_out_buf* audio_io_buf_internal) {
  283|  33.2k|  WORD32 i, j;
  284|       |
  285|  33.2k|  if (audio_io_buf_internal->audio_delay_samples) {
  ------------------
  |  Branch (285:7): [True: 0, False: 33.2k]
  ------------------
  286|      0|    for (i = 0; i < audio_io_buf_internal->audio_num_chan; i++) {
  ------------------
  |  Branch (286:17): [True: 0, False: 0]
  ------------------
  287|      0|      for (j = 0; j < audio_io_buf_internal->frame_size; j++) {
  ------------------
  |  Branch (287:19): [True: 0, False: 0]
  ------------------
  288|      0|        audio_io_buf_internal->audio_io_buffer_delayed
  289|      0|            [i][audio_io_buf_internal->audio_delay_samples + j] =
  290|      0|            audio_in_out_buf[i][j];
  291|      0|      }
  292|      0|    }
  293|  33.2k|  } else {
  294|  33.2k|    audio_io_buf_internal->audio_io_buffer_delayed = audio_in_out_buf;
  295|  33.2k|    audio_io_buf_internal->audio_in_out_buf = audio_in_out_buf;
  296|  33.2k|  }
  297|       |
  298|  33.2k|  return;
  299|  33.2k|}
impd_retrieve_audio_io_buffer_time:
  302|  11.3k|    FLOAT32* audio_in_out_buf[], ia_audio_in_out_buf* audio_io_buf_internal) {
  303|  11.3k|  WORD32 i, j;
  304|       |
  305|  11.3k|  if (audio_io_buf_internal->audio_delay_samples) {
  ------------------
  |  Branch (305:7): [True: 0, False: 11.3k]
  ------------------
  306|      0|    for (i = 0; i < audio_io_buf_internal->audio_num_chan; i++) {
  ------------------
  |  Branch (306:17): [True: 0, False: 0]
  ------------------
  307|      0|      for (j = 0; j < audio_io_buf_internal->frame_size; j++) {
  ------------------
  |  Branch (307:19): [True: 0, False: 0]
  ------------------
  308|      0|        audio_in_out_buf[i][j] =
  309|      0|            audio_io_buf_internal->audio_io_buffer_delayed[i][j];
  310|      0|      }
  311|      0|    }
  312|      0|  }
  313|       |
  314|  11.3k|  return;
  315|  11.3k|}
impd_advance_audio_io_buffer_time:
  318|  32.6k|    ia_audio_in_out_buf* audio_io_buf_internal) {
  319|  32.6k|  WORD32 i;
  320|  32.6k|  if (audio_io_buf_internal->audio_delay_samples) {
  ------------------
  |  Branch (320:7): [True: 0, False: 32.6k]
  ------------------
  321|      0|    for (i = 0; i < audio_io_buf_internal->audio_num_chan; i++) {
  ------------------
  |  Branch (321:17): [True: 0, False: 0]
  ------------------
  322|      0|      memmove(
  323|      0|          audio_io_buf_internal->audio_io_buffer_delayed[i],
  324|      0|          &audio_io_buf_internal
  325|      0|               ->audio_io_buffer_delayed[i][audio_io_buf_internal->frame_size],
  326|      0|          sizeof(FLOAT32) * audio_io_buf_internal->audio_delay_samples);
  327|      0|    }
  328|      0|  }
  329|       |
  330|  32.6k|  return;
  331|  32.6k|}

impd_drc_uni_selction_proc_init:
   35|  1.54k|    ia_drc_interface_struct* pstr_drc_interface, WORD32 subband_domain_mode) {
   36|  1.54k|  WORD32 err = 0;
   37|       |
   38|  1.54k|  if (pstr_drc_uni_sel_proc == NULL) {
  ------------------
  |  Branch (38:7): [True: 0, False: 1.54k]
  ------------------
   39|      0|    return 1;
   40|      0|  }
   41|       |
   42|  1.54k|  if (pstr_drc_uni_sel_proc->first_frame == 1) {
  ------------------
  |  Branch (42:7): [True: 1.54k, False: 0]
  ------------------
   43|  1.54k|    err = impd_drc_sel_proc_init_dflt(pstr_drc_uni_sel_proc);
   44|  1.54k|    if (err) return (err);
  ------------------
  |  Branch (44:9): [True: 0, False: 1.54k]
  ------------------
   45|  1.54k|  }
   46|       |
   47|  1.54k|  err = impd_drc_sel_proc_init_sel_proc_params(pstr_drc_uni_sel_proc,
   48|  1.54k|                                               pstr_drc_sel_proc_params_struct);
   49|  1.54k|  if (err) return (err);
  ------------------
  |  Branch (49:7): [True: 0, False: 1.54k]
  ------------------
   50|  1.54k|  {
   51|  1.54k|    WORD32 i;
   52|  1.54k|    pstr_drc_uni_sel_proc->drc_set_id_valid_flag[0] = 1;
   53|  55.5k|    for (i = 1; i < DRC_INSTRUCTIONS_COUNT_MAX; i++) {
  ------------------
  |  |   43|  55.5k|#define DRC_INSTRUCTIONS_COUNT_MAX (DOWNMIX_INSTRUCTION_COUNT_MAX + 20)
  |  |  ------------------
  |  |  |  |   41|  55.5k|#define DOWNMIX_INSTRUCTION_COUNT_MAX 16
  |  |  ------------------
  ------------------
  |  Branch (53:17): [True: 54.0k, False: 1.54k]
  ------------------
   54|  54.0k|      pstr_drc_uni_sel_proc->drc_set_id_valid_flag[i] = 0;
   55|  54.0k|    }
   56|       |
   57|  1.54k|    pstr_drc_uni_sel_proc->eq_set_id_valid_flag[0] = 1;
   58|  12.3k|    for (i = 1; i < EQ_INSTRUCTIONS_COUNT_MAX; i++) {
  ------------------
  |  |  112|  12.3k|#define EQ_INSTRUCTIONS_COUNT_MAX 8
  ------------------
  |  Branch (58:17): [True: 10.8k, False: 1.54k]
  ------------------
   59|  10.8k|      pstr_drc_uni_sel_proc->eq_set_id_valid_flag[i] = 0;
   60|  10.8k|    }
   61|  1.54k|  }
   62|  1.54k|  impd_drc_sel_proc_init_interface_params(pstr_drc_uni_sel_proc,
   63|  1.54k|                                          pstr_drc_interface);
   64|       |
   65|  1.54k|  pstr_drc_uni_sel_proc->subband_domain_mode = subband_domain_mode;
   66|       |
   67|  1.54k|  return 0;
   68|  1.54k|}
impd_drc_uni_sel_proc_process:
   75|    601|    ia_drc_sel_proc_output_struct* hia_drc_sel_proc_output_struct) {
   76|    601|  WORD32 i, err, drc_set_id_selected, activeDrcSetIndex;
   77|    601|  WORD32 eq_set_id_selected;
   78|    601|  WORD32 loudEqSetIdSelected;
   79|       |
   80|    601|  if (pstr_drc_config != NULL) {
  ------------------
  |  Branch (80:7): [True: 601, False: 0]
  ------------------
   81|    601|    if (memcmp(&pstr_drc_uni_sel_proc->drc_config, pstr_drc_config,
  ------------------
  |  Branch (81:9): [True: 601, False: 0]
  ------------------
   82|    601|               sizeof(ia_drc_config))) {
   83|    601|      pstr_drc_uni_sel_proc->drc_config = *pstr_drc_config;
   84|    601|      pstr_drc_uni_sel_proc->drc_config_flag = 1;
   85|       |
   86|    601|      if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.base_channel_count !=
  ------------------
  |  Branch (86:11): [True: 601, False: 0]
  ------------------
   87|    601|          pstr_drc_uni_sel_proc->drc_config.channel_layout.base_channel_count) {
   88|    601|        pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.base_channel_count =
   89|    601|            pstr_drc_uni_sel_proc->drc_config.channel_layout.base_channel_count;
   90|    601|      }
   91|    601|      if (pstr_drc_uni_sel_proc->drc_config.channel_layout
  ------------------
  |  Branch (91:11): [True: 2, False: 599]
  ------------------
   92|    601|                  .layout_signaling_present == 1 &&
   93|      2|          pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.base_layout !=
  ------------------
  |  Branch (93:11): [True: 2, False: 0]
  ------------------
   94|      2|              pstr_drc_uni_sel_proc->drc_config.channel_layout.defined_layout) {
   95|      2|        pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.base_layout =
   96|      2|            pstr_drc_uni_sel_proc->drc_config.channel_layout.defined_layout;
   97|      2|      }
   98|    601|    } else {
   99|      0|      pstr_drc_uni_sel_proc->drc_config_flag = 0;
  100|      0|    }
  101|    601|  }
  102|    601|  if (pstr_loudness_info != NULL) {
  ------------------
  |  Branch (102:7): [True: 601, False: 0]
  ------------------
  103|    601|    if (memcmp(&pstr_drc_uni_sel_proc->loudness_info_set, pstr_loudness_info,
  ------------------
  |  Branch (103:9): [True: 237, False: 364]
  ------------------
  104|    601|               sizeof(ia_drc_loudness_info_set_struct))) {
  105|    237|      pstr_drc_uni_sel_proc->loudness_info_set = *pstr_loudness_info;
  106|    237|      pstr_drc_uni_sel_proc->loudness_info_set_flag = 1;
  107|    364|    } else {
  108|    364|      pstr_drc_uni_sel_proc->loudness_info_set_flag = 0;
  109|    364|    }
  110|    601|  }
  111|       |
  112|    601|  if ((pstr_drc_uni_sel_proc->drc_config_flag &&
  ------------------
  |  Branch (112:8): [True: 601, False: 0]
  ------------------
  113|    601|       pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (113:8): [True: 0, False: 601]
  ------------------
  114|    601|               .target_config_request_type != 0) ||
  115|    601|      (pstr_drc_uni_sel_proc->sel_proc_request_flag &&
  ------------------
  |  Branch (115:8): [True: 601, False: 0]
  ------------------
  116|    601|       pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (116:8): [True: 0, False: 601]
  ------------------
  117|    601|               .target_config_request_type != 0) ||
  118|    601|      (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (118:8): [True: 601, False: 0]
  ------------------
  119|    601|               .target_config_request_type == 0 &&
  120|    601|       pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.num_downmix_id_requests ==
  ------------------
  |  Branch (120:8): [True: 601, False: 0]
  ------------------
  121|    601|           0)) {
  122|    601|    err = impd_map_target_config_req_downmix_id(
  123|    601|        pstr_drc_uni_sel_proc, &pstr_drc_uni_sel_proc->drc_config);
  124|    601|    if (err) return (err);
  ------------------
  |  Branch (124:9): [True: 0, False: 601]
  ------------------
  125|    601|  }
  126|       |
  127|    601|  if (pstr_drc_uni_sel_proc->drc_config_flag ||
  ------------------
  |  Branch (127:7): [True: 601, False: 0]
  ------------------
  128|      0|      pstr_drc_uni_sel_proc->loudness_info_set_flag ||
  ------------------
  |  Branch (128:7): [True: 0, False: 0]
  ------------------
  129|    601|      pstr_drc_uni_sel_proc->sel_proc_request_flag) {
  ------------------
  |  Branch (129:7): [True: 0, False: 0]
  ------------------
  130|    601|    WORD32 repeat_selection = 1;
  131|       |
  132|    601|    err = impd_manage_drc_complexity(pstr_drc_uni_sel_proc, pstr_drc_config);
  133|    601|    if (err) return (err);
  ------------------
  |  Branch (133:9): [True: 4, False: 597]
  ------------------
  134|    597|    err = impd_manage_eq_complexity(pstr_drc_uni_sel_proc, pstr_drc_config);
  135|    597|    if (err) return (err);
  ------------------
  |  Branch (135:9): [True: 0, False: 597]
  ------------------
  136|  1.18k|    while (repeat_selection == 1) {
  ------------------
  |  Branch (136:12): [True: 597, False: 590]
  ------------------
  137|    597|      err = impd_select_drc_set(pstr_drc_uni_sel_proc, &drc_set_id_selected,
  138|    597|                                &eq_set_id_selected, &loudEqSetIdSelected);
  139|    597|      if (err) return (err);
  ------------------
  |  Branch (139:11): [True: 7, False: 590]
  ------------------
  140|       |
  141|    590|      err =
  142|    590|          impd_get_selected_drc_set(pstr_drc_uni_sel_proc, drc_set_id_selected);
  143|    590|      if (err) return (err);
  ------------------
  |  Branch (143:11): [True: 0, False: 590]
  ------------------
  144|       |
  145|    590|      err = impd_get_dependent_drc_set(pstr_drc_uni_sel_proc);
  146|    590|      if (err) return (err);
  ------------------
  |  Branch (146:11): [True: 0, False: 590]
  ------------------
  147|       |
  148|    590|      err = impd_get_fading_drc_set(pstr_drc_uni_sel_proc);
  149|    590|      if (err) return (err);
  ------------------
  |  Branch (149:11): [True: 0, False: 590]
  ------------------
  150|       |
  151|    590|      err = impd_get_ducking_drc_set(pstr_drc_uni_sel_proc);
  152|    590|      if (err) return (err);
  ------------------
  |  Branch (152:11): [True: 0, False: 590]
  ------------------
  153|       |
  154|    590|      pstr_drc_uni_sel_proc->eq_inst_index[0] = -1;
  155|    590|      pstr_drc_uni_sel_proc->eq_inst_index[1] = -1;
  156|       |
  157|    590|      err = impd_get_selected_eq_set(pstr_drc_uni_sel_proc, eq_set_id_selected);
  158|    590|      if (err) return (err);
  ------------------
  |  Branch (158:11): [True: 0, False: 590]
  ------------------
  159|       |
  160|    590|      err = impd_get_dependent_eq_set(pstr_drc_uni_sel_proc);
  161|    590|      if (err) return (err);
  ------------------
  |  Branch (161:11): [True: 0, False: 590]
  ------------------
  162|       |
  163|    590|      err = impd_get_selected_loud_eq_set(pstr_drc_uni_sel_proc,
  164|    590|                                          loudEqSetIdSelected);
  165|    590|      if (err) return (err);
  ------------------
  |  Branch (165:11): [True: 0, False: 590]
  ------------------
  166|       |
  167|    590|      activeDrcSetIndex = 0;
  168|  2.95k|      for (i = SUB_DRC_COUNT - 1; i >= 0; i--) {
  ------------------
  |  |   49|    590|#define SUB_DRC_COUNT 4
  ------------------
  |  Branch (168:35): [True: 2.36k, False: 590]
  ------------------
  169|  2.36k|        WORD32 drc_instructions_index =
  170|  2.36k|            pstr_drc_uni_sel_proc->drc_instructions_index[i];
  171|  2.36k|        ia_drc_instructions_struct* str_drc_instruction_str;
  172|  2.36k|        if (drc_instructions_index < 0) continue;
  ------------------
  |  Branch (172:13): [True: 1.77k, False: 590]
  ------------------
  173|       |
  174|    590|        str_drc_instruction_str =
  175|    590|            &(pstr_drc_uni_sel_proc->drc_config
  176|    590|                  .str_drc_instruction_str[drc_instructions_index]);
  177|       |
  178|    590|        if (str_drc_instruction_str->drc_set_id > 0) {
  ------------------
  |  Branch (178:13): [True: 208, False: 382]
  ------------------
  179|    208|          pstr_drc_uni_sel_proc->uni_drc_sel_proc_output
  180|    208|              .sel_drc_set_ids[activeDrcSetIndex] =
  181|    208|              str_drc_instruction_str->drc_set_id;
  182|       |
  183|    208|          if ((i == 3) && (str_drc_instruction_str->drc_set_effect &
  ------------------
  |  Branch (183:15): [True: 0, False: 208]
  |  Branch (183:27): [True: 0, False: 0]
  ------------------
  184|      0|                           (EFFECT_BIT_DUCK_SELF | EFFECT_BIT_DUCK_OTHER))) {
  ------------------
  |  |   73|      0|#define EFFECT_BIT_DUCK_SELF 0x0800
  ------------------
                                         (EFFECT_BIT_DUCK_SELF | EFFECT_BIT_DUCK_OTHER))) {
  ------------------
  |  |   72|      0|#define EFFECT_BIT_DUCK_OTHER 0x0400
  ------------------
  185|      0|            pstr_drc_uni_sel_proc->uni_drc_sel_proc_output
  186|      0|                .sel_downmix_ids[activeDrcSetIndex] = 0;
  187|    208|          } else {
  188|    208|            if (str_drc_instruction_str->drc_apply_to_dwnmix == 1) {
  ------------------
  |  Branch (188:17): [True: 0, False: 208]
  ------------------
  189|      0|              pstr_drc_uni_sel_proc->uni_drc_sel_proc_output
  190|      0|                  .sel_downmix_ids[activeDrcSetIndex] =
  191|      0|                  str_drc_instruction_str->downmix_id[0];
  192|    208|            } else {
  193|    208|              pstr_drc_uni_sel_proc->uni_drc_sel_proc_output
  194|    208|                  .sel_downmix_ids[activeDrcSetIndex] = 0;
  195|    208|            }
  196|    208|          }
  197|       |
  198|    208|          activeDrcSetIndex++;
  199|    208|        }
  200|    590|      }
  201|    590|      if (activeDrcSetIndex <= 3) {
  ------------------
  |  Branch (201:11): [True: 590, False: 0]
  ------------------
  202|    590|        pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.num_sel_drc_sets =
  203|    590|            activeDrcSetIndex;
  204|    590|      } else {
  205|      0|        pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.num_sel_drc_sets = -1;
  206|      0|        return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  207|      0|      }
  208|       |
  209|    590|      impd_sel_downmix_matrix(pstr_drc_uni_sel_proc,
  210|    590|                              &pstr_drc_uni_sel_proc->drc_config);
  211|       |
  212|    590|      err = impd_manage_complexity(pstr_drc_uni_sel_proc, pstr_drc_config,
  213|    590|                                   &repeat_selection);
  214|    590|      if (err) return (err);
  ------------------
  |  Branch (214:11): [True: 0, False: 590]
  ------------------
  215|    590|    }
  216|       |
  217|    590|    pstr_drc_uni_sel_proc->sel_proc_request_flag = 0;
  218|    590|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.boost =
  219|    590|        pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.boost;
  220|    590|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.compress =
  221|    590|        pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.compress;
  222|    590|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.drc_characteristic_target =
  223|    590|        pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  224|    590|            .drc_characteristic_target;
  225|    590|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_output
  226|    590|        .loudness_normalization_gain_db +=
  227|    590|        pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  228|    590|            .loudness_norm_gain_modification_db;
  229|    590|  }
  230|  1.77k|  for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (230:15): [True: 1.18k, False: 590]
  ------------------
  231|  1.18k|    if (pstr_drc_uni_sel_proc->eq_inst_index[i] >= 0) {
  ------------------
  |  Branch (231:9): [True: 0, False: 1.18k]
  ------------------
  232|      0|      pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.sel_eq_set_ids[i] =
  233|      0|          pstr_drc_uni_sel_proc->drc_config.str_drc_config_ext
  234|      0|              .str_eq_instructions[pstr_drc_uni_sel_proc->eq_inst_index[i]]
  235|      0|              .eq_set_id;
  236|      0|    }
  237|  1.18k|  }
  238|    590|  if (pstr_drc_uni_sel_proc->loud_eq_inst_index_sel >= 0) {
  ------------------
  |  Branch (238:7): [True: 1, False: 589]
  ------------------
  239|      1|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.sel_loud_eq_id =
  240|      1|        pstr_drc_uni_sel_proc->drc_config.str_drc_config_ext
  241|      1|            .loud_eq_instructions[pstr_drc_uni_sel_proc->loud_eq_inst_index_sel]
  242|      1|            .loud_eq_set_id;
  243|    589|  } else {
  244|    589|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.sel_loud_eq_id = 0;
  245|    589|  }
  246|    590|  *hia_drc_sel_proc_output_struct =
  247|    590|      pstr_drc_uni_sel_proc->uni_drc_sel_proc_output;
  248|       |
  249|    590|  return 0;
  250|    601|}
impd_map_target_config_req_downmix_id:
  254|    601|    ia_drc_config* pstr_drc_config) {
  255|    601|  WORD32 i, dwnmix_instructions_count;
  256|    601|  WORD32 target_ch_count_prelim =
  257|    601|      pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.base_channel_count;
  258|       |
  259|    601|  pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.num_downmix_id_requests = 0;
  260|    601|  switch (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  261|    601|              .target_config_request_type) {
  262|    601|    case 0:
  ------------------
  |  Branch (262:5): [True: 601, False: 0]
  ------------------
  263|    601|      if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (263:11): [True: 601, False: 0]
  ------------------
  264|    601|              .num_downmix_id_requests == 0) {
  265|    601|        pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.requested_dwnmix_id[0] =
  266|    601|            0;
  267|    601|        pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.num_downmix_id_requests =
  268|    601|            1;
  269|    601|      }
  270|    601|      break;
  271|      0|    case 1:
  ------------------
  |  Branch (271:5): [True: 0, False: 601]
  ------------------
  272|      0|      if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (272:11): [True: 0, False: 0]
  ------------------
  273|      0|              .requested_target_layout ==
  274|      0|          pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.base_layout) {
  275|      0|        pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.requested_dwnmix_id[0] =
  276|      0|            0;
  277|      0|        pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.num_downmix_id_requests =
  278|      0|            1;
  279|      0|      }
  280|      0|      if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (280:11): [True: 0, False: 0]
  ------------------
  281|      0|              .num_downmix_id_requests == 0) {
  282|      0|        dwnmix_instructions_count =
  283|      0|            pstr_drc_uni_sel_proc->drc_config.dwnmix_instructions_count;
  284|      0|        for (i = 0; i < dwnmix_instructions_count; i++) {
  ------------------
  |  Branch (284:21): [True: 0, False: 0]
  ------------------
  285|      0|          ia_downmix_instructions_struct* dwnmix_instructions =
  286|      0|              &(pstr_drc_config->dwnmix_instructions[i]);
  287|      0|          if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (287:15): [True: 0, False: 0]
  ------------------
  288|      0|                  .requested_target_layout ==
  289|      0|              dwnmix_instructions->target_layout) {
  290|      0|            pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.requested_dwnmix_id
  291|      0|                [pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  292|      0|                     .num_downmix_id_requests] =
  293|      0|                dwnmix_instructions->downmix_id;
  294|      0|            pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  295|      0|                .num_downmix_id_requests += 1;
  296|      0|            target_ch_count_prelim = dwnmix_instructions->target_channel_count;
  297|      0|          }
  298|      0|        }
  299|      0|      }
  300|       |
  301|      0|      if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (301:11): [True: 0, False: 0]
  ------------------
  302|      0|              .num_downmix_id_requests == 0) {
  303|      0|        pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.requested_dwnmix_id[0] =
  304|      0|            0;
  305|      0|        pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.num_downmix_id_requests =
  306|      0|            1;
  307|      0|      }
  308|      0|      break;
  309|      0|    case 2:
  ------------------
  |  Branch (309:5): [True: 0, False: 601]
  ------------------
  310|      0|      if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (310:11): [True: 0, False: 0]
  ------------------
  311|      0|              .requested_target_ch_count ==
  312|      0|          pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.base_channel_count) {
  313|      0|        pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.requested_dwnmix_id[0] =
  314|      0|            0;
  315|      0|        pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.num_downmix_id_requests =
  316|      0|            1;
  317|      0|      }
  318|      0|      if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (318:11): [True: 0, False: 0]
  ------------------
  319|      0|              .num_downmix_id_requests == 0) {
  320|      0|        dwnmix_instructions_count =
  321|      0|            pstr_drc_uni_sel_proc->drc_config.dwnmix_instructions_count;
  322|      0|        for (i = 0; i < dwnmix_instructions_count; i++) {
  ------------------
  |  Branch (322:21): [True: 0, False: 0]
  ------------------
  323|      0|          ia_downmix_instructions_struct* dwnmix_instructions =
  324|      0|              &(pstr_drc_config->dwnmix_instructions[i]);
  325|      0|          if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (325:15): [True: 0, False: 0]
  ------------------
  326|      0|                  .requested_target_ch_count ==
  327|      0|              dwnmix_instructions->target_channel_count) {
  328|      0|            pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.requested_dwnmix_id
  329|      0|                [pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  330|      0|                     .num_downmix_id_requests] =
  331|      0|                dwnmix_instructions->downmix_id;
  332|      0|            pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  333|      0|                .num_downmix_id_requests += 1;
  334|      0|            target_ch_count_prelim = dwnmix_instructions->target_channel_count;
  335|      0|          }
  336|      0|        }
  337|      0|      }
  338|       |
  339|      0|      if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (339:11): [True: 0, False: 0]
  ------------------
  340|      0|              .num_downmix_id_requests == 0) {
  341|      0|        pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.requested_dwnmix_id[0] =
  342|      0|            0;
  343|      0|        pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.num_downmix_id_requests =
  344|      0|            1;
  345|      0|      }
  346|      0|      break;
  347|      0|    default:
  ------------------
  |  Branch (347:5): [True: 0, False: 601]
  ------------------
  348|      0|      return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  349|      0|      break;
  350|    601|  }
  351|    601|  pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.target_ch_count_prelim =
  352|    601|      target_ch_count_prelim;
  353|       |
  354|    601|  return 0;
  355|    601|}
impd_sel_downmix_matrix:
  358|    590|                             ia_drc_config* pstr_drc_config) {
  359|    590|  WORD32 i, j, n;
  360|       |
  361|    590|  pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.base_channel_count =
  362|    590|      pstr_drc_config->channel_layout.base_channel_count;
  363|    590|  pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.target_channel_count =
  364|    590|      pstr_drc_config->channel_layout.base_channel_count;
  365|    590|  pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.target_layout = -1;
  366|    590|  pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.downmix_matrix_present = 0;
  367|    590|  pstr_drc_uni_sel_proc->downmix_inst_index_sel = -1;
  368|       |
  369|    590|  if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.active_downmix_id != 0) {
  ------------------
  |  Branch (369:7): [True: 0, False: 590]
  ------------------
  370|      0|    for (n = 0; n < pstr_drc_config->dwnmix_instructions_count; n++) {
  ------------------
  |  Branch (370:17): [True: 0, False: 0]
  ------------------
  371|      0|      ia_downmix_instructions_struct* dwnmix_instructions =
  372|      0|          &(pstr_drc_config->dwnmix_instructions[n]);
  373|       |
  374|      0|      if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.active_downmix_id ==
  ------------------
  |  Branch (374:11): [True: 0, False: 0]
  ------------------
  375|      0|          dwnmix_instructions->downmix_id) {
  376|      0|        pstr_drc_uni_sel_proc->downmix_inst_index_sel = n;
  377|      0|        pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.target_channel_count =
  378|      0|            dwnmix_instructions->target_channel_count;
  379|      0|        pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.target_layout =
  380|      0|            dwnmix_instructions->target_layout;
  381|      0|        if (dwnmix_instructions->downmix_coefficients_present) {
  ------------------
  |  Branch (381:13): [True: 0, False: 0]
  ------------------
  382|      0|          for (i = 0; i < pstr_drc_uni_sel_proc->uni_drc_sel_proc_output
  ------------------
  |  Branch (382:23): [True: 0, False: 0]
  ------------------
  383|      0|                              .base_channel_count;
  384|      0|               i++) {
  385|      0|            for (j = 0; j < pstr_drc_uni_sel_proc->uni_drc_sel_proc_output
  ------------------
  |  Branch (385:25): [True: 0, False: 0]
  ------------------
  386|      0|                                .target_channel_count;
  387|      0|                 j++) {
  388|      0|              pstr_drc_uni_sel_proc->uni_drc_sel_proc_output
  389|      0|                  .downmix_matrix[i][j] =
  390|      0|                  dwnmix_instructions->downmix_coefficient
  391|      0|                      [i +
  392|      0|                       j *
  393|      0|                           pstr_drc_uni_sel_proc->uni_drc_sel_proc_output
  394|      0|                               .base_channel_count];
  395|      0|            }
  396|      0|          }
  397|      0|          pstr_drc_uni_sel_proc->uni_drc_sel_proc_output
  398|      0|              .downmix_matrix_present = 1;
  399|      0|        }
  400|      0|        break;
  401|      0|      }
  402|      0|    }
  403|      0|  }
  404|    590|  return;
  405|    590|}
impd_get_selected_eq_set:
  408|    590|                                WORD32 eq_set_id_selected) {
  409|    590|  WORD32 n;
  410|       |
  411|    590|  pstr_drc_uni_sel_proc->eq_inst_index_sel = -1;
  412|       |
  413|    590|  if (eq_set_id_selected > 0) {
  ------------------
  |  Branch (413:7): [True: 0, False: 590]
  ------------------
  414|      0|    for (n = 0; n < pstr_drc_uni_sel_proc->drc_config.str_drc_config_ext
  ------------------
  |  Branch (414:17): [True: 0, False: 0]
  ------------------
  415|      0|                        .eq_instructions_count;
  416|      0|         n++) {
  417|      0|      if (pstr_drc_uni_sel_proc->drc_config.str_drc_config_ext
  ------------------
  |  Branch (417:11): [True: 0, False: 0]
  ------------------
  418|      0|              .str_eq_instructions[n]
  419|      0|              .eq_set_id == eq_set_id_selected)
  420|      0|        break;
  421|      0|    }
  422|      0|    if (n ==
  ------------------
  |  Branch (422:9): [True: 0, False: 0]
  ------------------
  423|      0|        pstr_drc_uni_sel_proc->drc_config.str_drc_config_ext
  424|      0|            .eq_instructions_count) {
  425|      0|      return (EXTERNAL_ERROR);
  ------------------
  |  |  130|      0|#define EXTERNAL_ERROR 4
  ------------------
  426|      0|    }
  427|      0|    pstr_drc_uni_sel_proc->eq_inst_index_sel = n;
  428|      0|    if (pstr_drc_uni_sel_proc->drc_config.str_drc_config_ext
  ------------------
  |  Branch (428:9): [True: 0, False: 0]
  ------------------
  429|      0|            .str_eq_instructions[n]
  430|      0|            .eq_apply_to_downmix == 1) {
  431|      0|      pstr_drc_uni_sel_proc->eq_inst_index[1] =
  432|      0|          pstr_drc_uni_sel_proc->eq_inst_index_sel;
  433|      0|    } else {
  434|      0|      pstr_drc_uni_sel_proc->eq_inst_index[0] =
  435|      0|          pstr_drc_uni_sel_proc->eq_inst_index_sel;
  436|      0|    }
  437|      0|  }
  438|    590|  return (0);
  439|    590|}
impd_get_dependent_eq_set:
  441|    590|WORD32 impd_get_dependent_eq_set(ia_drc_sel_pro_struct* pstr_drc_uni_sel_proc) {
  442|    590|  ia_eq_instructions_struct* str_eq_instructions = NULL;
  443|       |
  444|    590|  if (pstr_drc_uni_sel_proc->eq_inst_index_sel >= 0) {
  ------------------
  |  Branch (444:7): [True: 0, False: 590]
  ------------------
  445|      0|    str_eq_instructions =
  446|      0|        &(pstr_drc_uni_sel_proc->drc_config.str_drc_config_ext
  447|      0|              .str_eq_instructions[pstr_drc_uni_sel_proc->eq_inst_index_sel]);
  448|       |
  449|      0|    if (str_eq_instructions->depends_on_eq_set_present == 1) {
  ------------------
  |  Branch (449:9): [True: 0, False: 0]
  ------------------
  450|      0|      WORD32 n;
  451|      0|      WORD32 dependsOnEqSetID = str_eq_instructions->depends_on_eq_set;
  452|       |
  453|      0|      for (n = 0; n < pstr_drc_uni_sel_proc->drc_config.str_drc_config_ext
  ------------------
  |  Branch (453:19): [True: 0, False: 0]
  ------------------
  454|      0|                          .eq_instructions_count;
  455|      0|           n++) {
  456|      0|        if (pstr_drc_uni_sel_proc->drc_config.str_drc_config_ext
  ------------------
  |  Branch (456:13): [True: 0, False: 0]
  ------------------
  457|      0|                .str_eq_instructions[n]
  458|      0|                .eq_set_id == dependsOnEqSetID)
  459|      0|          break;
  460|      0|      }
  461|      0|      if (n ==
  ------------------
  |  Branch (461:11): [True: 0, False: 0]
  ------------------
  462|      0|          pstr_drc_uni_sel_proc->drc_config.str_drc_config_ext
  463|      0|              .eq_instructions_count) {
  464|      0|        return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  465|      0|      }
  466|      0|      if (pstr_drc_uni_sel_proc->drc_config.str_drc_config_ext
  ------------------
  |  Branch (466:11): [True: 0, False: 0]
  ------------------
  467|      0|              .str_eq_instructions[n]
  468|      0|              .eq_apply_to_downmix == 1) {
  469|      0|        pstr_drc_uni_sel_proc->eq_inst_index[1] = n;
  470|      0|      } else {
  471|      0|        pstr_drc_uni_sel_proc->eq_inst_index[0] = n;
  472|      0|      }
  473|      0|    }
  474|      0|  }
  475|    590|  return (0);
  476|    590|}
impd_get_selected_loud_eq_set:
  479|    590|    ia_drc_sel_pro_struct* pstr_drc_uni_sel_proc, WORD32 loudEqSetIdSelected) {
  480|    590|  WORD32 n;
  481|       |
  482|    590|  pstr_drc_uni_sel_proc->loud_eq_inst_index_sel = -1;
  483|       |
  484|    590|  if (loudEqSetIdSelected > 0) {
  ------------------
  |  Branch (484:7): [True: 1, False: 589]
  ------------------
  485|      2|    for (n = 0; n < pstr_drc_uni_sel_proc->drc_config.str_drc_config_ext
  ------------------
  |  Branch (485:17): [True: 2, False: 0]
  ------------------
  486|      2|                        .loud_eq_instructions_count;
  487|      2|         n++) {
  488|      2|      if (pstr_drc_uni_sel_proc->drc_config.str_drc_config_ext
  ------------------
  |  Branch (488:11): [True: 1, False: 1]
  ------------------
  489|      2|              .loud_eq_instructions[n]
  490|      2|              .loud_eq_set_id == loudEqSetIdSelected)
  491|      1|        break;
  492|      2|    }
  493|      1|    if (n ==
  ------------------
  |  Branch (493:9): [True: 0, False: 1]
  ------------------
  494|      1|        pstr_drc_uni_sel_proc->drc_config.str_drc_config_ext
  495|      1|            .loud_eq_instructions_count) {
  496|      0|      return (EXTERNAL_ERROR);
  ------------------
  |  |  130|      0|#define EXTERNAL_ERROR 4
  ------------------
  497|      0|    }
  498|      1|    pstr_drc_uni_sel_proc->loud_eq_inst_index_sel = n;
  499|      1|  }
  500|    590|  return (0);
  501|    590|}
impd_select_loud_eq:
  506|    590|                           WORD32 eq_set_id_requested, WORD32* loud_eq_id_sel) {
  507|    590|  WORD32 i, c, d, e;
  508|       |
  509|    590|  *loud_eq_id_sel = 0;
  510|    590|  for (i = 0;
  511|    604|       i < pstr_drc_config->str_drc_config_ext.loud_eq_instructions_count;
  ------------------
  |  Branch (511:8): [True: 14, False: 590]
  ------------------
  512|    590|       i++) {
  513|     14|    ia_loud_eq_instructions_struct* loud_eq_instructions =
  514|     14|        &pstr_drc_config->str_drc_config_ext.loud_eq_instructions[i];
  515|     14|    if (loud_eq_instructions->drc_location == LOCATION_SELECTED) {
  ------------------
  |  |  144|     14|#define LOCATION_SELECTED LOCATION_MP4_INSTREAM_UNIDRC
  |  |  ------------------
  |  |  |  |  141|     14|#define LOCATION_MP4_INSTREAM_UNIDRC 0x1
  |  |  ------------------
  ------------------
  |  Branch (515:9): [True: 6, False: 8]
  ------------------
  516|     12|      for (d = 0; d < loud_eq_instructions->dwnmix_id_count; d++) {
  ------------------
  |  Branch (516:19): [True: 6, False: 6]
  ------------------
  517|      6|        if ((loud_eq_instructions->downmix_id[d] == requested_dwnmix_id) ||
  ------------------
  |  Branch (517:13): [True: 4, False: 2]
  ------------------
  518|      4|            (loud_eq_instructions->downmix_id[d] == ID_FOR_ANY_DOWNMIX)) {
  ------------------
  |  |  136|      2|#define ID_FOR_ANY_DOWNMIX 0x7F
  ------------------
  |  Branch (518:13): [True: 0, False: 2]
  ------------------
  519|      8|          for (c = 0; c < loud_eq_instructions->drc_set_id_count; c++) {
  ------------------
  |  Branch (519:23): [True: 4, False: 4]
  ------------------
  520|      4|            if ((loud_eq_instructions->drc_set_id[c] == drc_set_id_requested) ||
  ------------------
  |  Branch (520:17): [True: 0, False: 4]
  ------------------
  521|      4|                (loud_eq_instructions->drc_set_id[c] == ID_FOR_ANY_DRC)) {
  ------------------
  |  |  138|      4|#define ID_FOR_ANY_DRC 0x3F
  ------------------
  |  Branch (521:17): [True: 3, False: 1]
  ------------------
  522|      6|              for (e = 0; e < loud_eq_instructions->eq_set_id_count; e++) {
  ------------------
  |  Branch (522:27): [True: 3, False: 3]
  ------------------
  523|      3|                if ((loud_eq_instructions->eq_set_id[e] ==
  ------------------
  |  Branch (523:21): [True: 2, False: 1]
  ------------------
  524|      3|                     eq_set_id_requested) ||
  525|      2|                    (loud_eq_instructions->eq_set_id[e] == ID_FOR_ANY_EQ)) {
  ------------------
  |  |  139|      1|#define ID_FOR_ANY_EQ 0x3F
  ------------------
  |  Branch (525:21): [True: 0, False: 1]
  ------------------
  526|      2|                  *loud_eq_id_sel = loud_eq_instructions->loud_eq_set_id;
  527|      2|                }
  528|      3|              }
  529|      3|            }
  530|      4|          }
  531|      4|        }
  532|      6|      }
  533|      6|    }
  534|     14|  }
  535|    590|  return (0);
  536|    590|}
impd_find_eq_set_no_compression:
  624|    597|                                       WORD32* num_compression_eq_id) {
  625|    597|  WORD32 i, d, k, c;
  626|    597|  k = 0;
  627|    597|  for (i = 0; i < pstr_drc_config->str_drc_config_ext.eq_instructions_count;
  ------------------
  |  Branch (627:15): [True: 0, False: 597]
  ------------------
  628|    597|       i++) {
  629|      0|    ia_eq_instructions_struct* str_eq_instructions =
  630|      0|        &pstr_drc_config->str_drc_config_ext.str_eq_instructions[i];
  631|      0|    for (d = 0; d < str_eq_instructions->dwnmix_id_count; d++) {
  ------------------
  |  Branch (631:17): [True: 0, False: 0]
  ------------------
  632|      0|      if (requested_dwnmix_id == str_eq_instructions->downmix_id[d]) {
  ------------------
  |  Branch (632:11): [True: 0, False: 0]
  ------------------
  633|      0|        for (c = 0; c < str_eq_instructions->drc_set_id_count; c++) {
  ------------------
  |  Branch (633:21): [True: 0, False: 0]
  ------------------
  634|      0|          if ((str_eq_instructions->drc_set_id[c] == ID_FOR_ANY_DRC) ||
  ------------------
  |  |  138|      0|#define ID_FOR_ANY_DRC 0x3F
  ------------------
  |  Branch (634:15): [True: 0, False: 0]
  ------------------
  635|      0|              (str_eq_instructions->drc_set_id[c] == 0)) {
  ------------------
  |  Branch (635:15): [True: 0, False: 0]
  ------------------
  636|      0|            if (k >= MAX_NUM_COMPRESSION_EQ) return UNEXPECTED_ERROR;
  ------------------
  |  |  125|      0|#define MAX_NUM_COMPRESSION_EQ (16)
  ------------------
                          if (k >= MAX_NUM_COMPRESSION_EQ) return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  |  Branch (636:17): [True: 0, False: 0]
  ------------------
  637|      0|            num_compression_eq_id[k] = str_eq_instructions->eq_set_id;
  638|      0|            k++;
  639|      0|          }
  640|      0|        }
  641|      0|      }
  642|      0|    }
  643|      0|  }
  644|    597|  *num_compression_eq_count = k;
  645|    597|  return (0);
  646|    597|}
impd_select_drc_coeff3:
  650|  1.78k|    ia_uni_drc_coeffs_struct** str_p_loc_drc_coefficients_uni_drc) {
  651|  1.78k|  WORD32 n;
  652|  1.78k|  WORD32 cV1 = -1;
  653|  1.78k|  WORD32 cV0 = -1;
  654|  3.69k|  for (n = 0; n < drc_config->drc_coefficients_drc_count; n++) {
  ------------------
  |  Branch (654:15): [True: 1.90k, False: 1.78k]
  ------------------
  655|  1.90k|    if (drc_config->str_p_loc_drc_coefficients_uni_drc[n].drc_location == 1) {
  ------------------
  |  Branch (655:9): [True: 1.80k, False: 105]
  ------------------
  656|  1.80k|      if (drc_config->str_p_loc_drc_coefficients_uni_drc[n].version == 0) {
  ------------------
  |  Branch (656:11): [True: 0, False: 1.80k]
  ------------------
  657|      0|        cV0 = n;
  658|  1.80k|      } else {
  659|  1.80k|        cV1 = n;
  660|  1.80k|      }
  661|  1.80k|    }
  662|  1.90k|  }
  663|  1.78k|  if (cV1 >= 0) {
  ------------------
  |  Branch (663:7): [True: 1.78k, False: 4]
  ------------------
  664|  1.78k|    *str_p_loc_drc_coefficients_uni_drc =
  665|  1.78k|        &(drc_config->str_p_loc_drc_coefficients_uni_drc[cV1]);
  666|  1.78k|  } else if (cV0 >= 0) {
  ------------------
  |  Branch (666:14): [True: 0, False: 4]
  ------------------
  667|      0|    *str_p_loc_drc_coefficients_uni_drc =
  668|      0|        &(drc_config->str_p_loc_drc_coefficients_uni_drc[cV0]);
  669|      4|  } else {
  670|       |    *str_p_loc_drc_coefficients_uni_drc = NULL;
  671|      4|  }
  672|  1.78k|  return;
  673|  1.78k|}
impd_manage_drc_complexity:
  676|    601|                                  ia_drc_config* pstr_drc_config) {
  677|    601|  WORD32 i, j, err, channel_count;
  678|    601|  WORD32 numBandsTooLarge = 0;
  679|    601|  FLOAT32 complexityDrcPrelim;
  680|    601|  ia_uni_drc_coeffs_struct* str_p_loc_drc_coefficients_uni_drc;
  681|    601|  FLOAT32 complexitySupportedTotal =
  682|    601|      (FLOAT32)(pow(2.0f, pstr_drc_uni_sel_proc->compl_level_supported_total));
  683|    601|  ia_drc_instructions_struct* str_drc_instruction_str;
  684|    601|  ia_drc_instructions_struct* drc_inst_uni_drc_dependent;
  685|    601|  ia_drc_sel_proc_output_struct* uni_drc_sel_proc_output =
  686|    601|      &pstr_drc_uni_sel_proc->uni_drc_sel_proc_output;
  687|    601|  ia_drc_sel_proc_params_struct* pstr_drc_sel_proc_params_struct =
  688|    601|      &pstr_drc_uni_sel_proc->uni_drc_sel_proc_params;
  689|       |
  690|    601|  impd_select_drc_coeff3(pstr_drc_config, &str_p_loc_drc_coefficients_uni_drc);
  691|    601|  if (str_p_loc_drc_coefficients_uni_drc == NULL) return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      4|#define UNEXPECTED_ERROR 2
  ------------------
  |  Branch (691:7): [True: 4, False: 597]
  ------------------
  692|  2.95k|  for (i = 0; i < pstr_drc_config->drc_instructions_uni_drc_count; i++) {
  ------------------
  |  Branch (692:15): [True: 2.35k, False: 597]
  ------------------
  693|  2.35k|    str_drc_instruction_str = &pstr_drc_config->str_drc_instruction_str[i];
  694|  2.35k|    if (str_drc_instruction_str->no_independent_use) continue;
  ------------------
  |  Branch (694:9): [True: 0, False: 2.35k]
  ------------------
  695|       |
  696|  2.35k|    numBandsTooLarge = 0;
  697|  2.35k|    if (str_drc_instruction_str->drc_apply_to_dwnmix == 1) {
  ------------------
  |  Branch (697:9): [True: 0, False: 2.35k]
  ------------------
  698|      0|      channel_count = uni_drc_sel_proc_output->target_channel_count;
  699|  2.35k|    } else {
  700|  2.35k|      channel_count = uni_drc_sel_proc_output->base_channel_count;
  701|  2.35k|    }
  702|  2.35k|    if (pstr_drc_uni_sel_proc->subband_domain_mode == SUBBAND_DOMAIN_MODE_OFF) {
  ------------------
  |  |  148|  2.35k|#define SUBBAND_DOMAIN_MODE_OFF 0
  ------------------
  |  Branch (702:9): [True: 2.35k, False: 0]
  ------------------
  703|  7.06k|      for (j = 0; j < str_drc_instruction_str->num_drc_ch_groups; j++) {
  ------------------
  |  Branch (703:19): [True: 4.71k, False: 2.35k]
  ------------------
  704|  4.71k|        ia_gain_set_params_struct* gain_set_params = &(
  705|  4.71k|            str_p_loc_drc_coefficients_uni_drc->gain_set_params
  706|  4.71k|                [str_drc_instruction_str->gain_set_index_for_channel_group[j]]);
  707|  4.71k|        if (gain_set_params->band_count >
  ------------------
  |  Branch (707:13): [True: 0, False: 4.71k]
  ------------------
  708|  4.71k|            pstr_drc_sel_proc_params_struct->num_bands_supported) {
  709|      0|          numBandsTooLarge = 1;
  710|  4.71k|        } else {
  711|  4.71k|          if (gain_set_params->band_count > 4) {
  ------------------
  |  Branch (711:15): [True: 0, False: 4.71k]
  ------------------
  712|       |            /* Add complexity for analysis and synthesis QMF bank here, if
  713|       |             * supported */
  714|      0|          }
  715|  4.71k|        }
  716|  4.71k|      }
  717|  2.35k|    }
  718|  2.35k|    complexityDrcPrelim =
  719|  2.35k|        (FLOAT32)(channel_count *
  720|  2.35k|                  (1 << str_drc_instruction_str->drc_set_complexity_level));
  721|       |
  722|  2.35k|    if (str_drc_instruction_str->depends_on_drc_set > 0) {
  ------------------
  |  Branch (722:9): [True: 0, False: 2.35k]
  ------------------
  723|      0|      err = impd_find_drc_instructions_uni_drc(
  724|      0|          pstr_drc_config, str_drc_instruction_str->depends_on_drc_set,
  725|      0|          &drc_inst_uni_drc_dependent);
  726|      0|      if (err) return (err);
  ------------------
  |  Branch (726:11): [True: 0, False: 0]
  ------------------
  727|      0|      if (drc_inst_uni_drc_dependent->drc_apply_to_dwnmix == 1) {
  ------------------
  |  Branch (727:11): [True: 0, False: 0]
  ------------------
  728|      0|        channel_count = uni_drc_sel_proc_output->target_channel_count;
  729|      0|      } else {
  730|      0|        channel_count = uni_drc_sel_proc_output->base_channel_count;
  731|      0|      }
  732|      0|      if (pstr_drc_uni_sel_proc->subband_domain_mode ==
  ------------------
  |  Branch (732:11): [True: 0, False: 0]
  ------------------
  733|      0|          SUBBAND_DOMAIN_MODE_OFF) {
  ------------------
  |  |  148|      0|#define SUBBAND_DOMAIN_MODE_OFF 0
  ------------------
  734|      0|        for (j = 0; j < str_drc_instruction_str->num_drc_ch_groups; j++) {
  ------------------
  |  Branch (734:21): [True: 0, False: 0]
  ------------------
  735|      0|          ia_gain_set_params_struct* gain_set_params = &(
  736|      0|              str_p_loc_drc_coefficients_uni_drc
  737|      0|                  ->gain_set_params[drc_inst_uni_drc_dependent
  738|      0|                                        ->gain_set_index_for_channel_group[j]]);
  739|      0|          if (gain_set_params->band_count >
  ------------------
  |  Branch (739:15): [True: 0, False: 0]
  ------------------
  740|      0|              pstr_drc_sel_proc_params_struct->num_bands_supported) {
  741|      0|            numBandsTooLarge = 1;
  742|      0|          } else {
  743|      0|            if (gain_set_params->band_count > 4) {
  ------------------
  |  Branch (743:17): [True: 0, False: 0]
  ------------------
  744|       |              /* Add complexity for analysis and synthesis QMF bank here, if
  745|       |               * supported */
  746|      0|            }
  747|      0|          }
  748|      0|        }
  749|      0|      }
  750|      0|      complexityDrcPrelim +=
  751|      0|          channel_count *
  752|      0|          (1 << drc_inst_uni_drc_dependent->drc_set_complexity_level);
  753|      0|    }
  754|       |
  755|  2.35k|    complexityDrcPrelim *= pstr_drc_config->sampling_rate / 48000.0f;
  756|       |
  757|  2.35k|    if ((complexityDrcPrelim <= complexitySupportedTotal) &&
  ------------------
  |  Branch (757:9): [True: 2.35k, False: 0]
  ------------------
  758|  2.35k|        (numBandsTooLarge == 0)) {
  ------------------
  |  Branch (758:9): [True: 2.35k, False: 0]
  ------------------
  759|  2.35k|      pstr_drc_uni_sel_proc
  760|  2.35k|          ->drc_set_id_valid_flag[str_drc_instruction_str->drc_set_id] = 1;
  761|  2.35k|    }
  762|  2.35k|  }
  763|    597|  return (0);
  764|    597|}
impd_manage_eq_complexity:
  767|    597|                                 ia_drc_config* pstr_drc_config) {
  768|    597|  WORD32 k, n, m, err;
  769|    597|  WORD32 eqComplexityPrimary = 0;
  770|    597|  WORD32 eqComplexityDependent = 0;
  771|    597|  WORD32 eqChannelCountPrimary = 0, eqChannelCountDependent = 0;
  772|    597|  FLOAT32 complexityTotalEq;
  773|    597|  ia_drc_config* drc_config = &pstr_drc_uni_sel_proc->drc_config;
  774|    597|  ia_drc_sel_proc_params_struct* pstr_drc_sel_proc_params_struct =
  775|    597|      &pstr_drc_uni_sel_proc->uni_drc_sel_proc_params;
  776|    597|  FLOAT32 complexitySupportedTotal =
  777|    597|      (FLOAT32)(pow(2.0f, pstr_drc_uni_sel_proc->compl_level_supported_total));
  778|       |
  779|    597|  for (n = 0; n < drc_config->str_drc_config_ext.eq_instructions_count; n++) {
  ------------------
  |  Branch (779:15): [True: 0, False: 597]
  ------------------
  780|      0|    ia_eq_instructions_struct* str_eq_instructions =
  781|      0|        &pstr_drc_config->str_drc_config_ext.str_eq_instructions[n];
  782|       |
  783|      0|    eqChannelCountPrimary = pstr_drc_sel_proc_params_struct->base_channel_count;
  784|      0|    eqChannelCountDependent =
  785|      0|        pstr_drc_sel_proc_params_struct->base_channel_count;
  786|       |
  787|      0|    eqComplexityPrimary = 1 << str_eq_instructions->eq_set_complexity_level;
  788|      0|    if (pstr_drc_uni_sel_proc->subband_domain_mode == SUBBAND_DOMAIN_MODE_OFF) {
  ------------------
  |  |  148|      0|#define SUBBAND_DOMAIN_MODE_OFF 0
  ------------------
  |  Branch (788:9): [True: 0, False: 0]
  ------------------
  789|      0|      if (str_eq_instructions->td_filter_cascade_present == 0) {
  ------------------
  |  Branch (789:11): [True: 0, False: 0]
  ------------------
  790|      0|        eqComplexityPrimary = 0;
  791|      0|      }
  792|      0|    } else {
  793|      0|      if (str_eq_instructions->td_filter_cascade_present == 1) {
  ------------------
  |  Branch (793:11): [True: 0, False: 0]
  ------------------
  794|      0|        eqComplexityPrimary = (WORD32)2.5f;
  795|      0|      }
  796|      0|    }
  797|      0|    if (str_eq_instructions->eq_apply_to_downmix == 1) {
  ------------------
  |  Branch (797:9): [True: 0, False: 0]
  ------------------
  798|      0|      if (str_eq_instructions->downmix_id[0] == ID_FOR_ANY_DOWNMIX) {
  ------------------
  |  |  136|      0|#define ID_FOR_ANY_DOWNMIX 0x7F
  ------------------
  |  Branch (798:11): [True: 0, False: 0]
  ------------------
  799|      0|        eqChannelCountPrimary =
  800|      0|            pstr_drc_sel_proc_params_struct->target_ch_count_prelim;
  801|      0|      } else {
  802|      0|        for (k = 0; k < pstr_drc_config->dwnmix_instructions_count; k++) {
  ------------------
  |  Branch (802:21): [True: 0, False: 0]
  ------------------
  803|      0|          for (m = 0; m < str_eq_instructions->dwnmix_id_count; m++) {
  ------------------
  |  Branch (803:23): [True: 0, False: 0]
  ------------------
  804|      0|            if (pstr_drc_config->dwnmix_instructions[k].downmix_id ==
  ------------------
  |  Branch (804:17): [True: 0, False: 0]
  ------------------
  805|      0|                str_eq_instructions->downmix_id[m]) {
  806|      0|              if (eqChannelCountPrimary >
  ------------------
  |  Branch (806:19): [True: 0, False: 0]
  ------------------
  807|      0|                  pstr_drc_config->dwnmix_instructions[k]
  808|      0|                      .target_channel_count) {
  809|      0|                eqChannelCountPrimary = pstr_drc_config->dwnmix_instructions[k]
  810|      0|                                            .target_channel_count;
  811|      0|              }
  812|      0|            }
  813|      0|          }
  814|      0|        }
  815|      0|      }
  816|      0|    }
  817|      0|    complexityTotalEq = (FLOAT32)(eqChannelCountPrimary * eqComplexityPrimary);
  818|       |
  819|      0|    if (str_eq_instructions->depends_on_eq_set_present > 0) {
  ------------------
  |  Branch (819:9): [True: 0, False: 0]
  ------------------
  820|      0|      ia_eq_instructions_struct* eq_instructionsDependent;
  821|      0|      err = impd_find_eq_instructions(drc_config,
  822|      0|                                      str_eq_instructions->depends_on_eq_set,
  823|      0|                                      &eq_instructionsDependent);
  824|      0|      if (err) return (err);
  ------------------
  |  Branch (824:11): [True: 0, False: 0]
  ------------------
  825|      0|      eqComplexityDependent =
  826|      0|          1 << eq_instructionsDependent->eq_set_complexity_level;
  827|      0|      if (pstr_drc_uni_sel_proc->subband_domain_mode ==
  ------------------
  |  Branch (827:11): [True: 0, False: 0]
  ------------------
  828|      0|          SUBBAND_DOMAIN_MODE_OFF) {
  ------------------
  |  |  148|      0|#define SUBBAND_DOMAIN_MODE_OFF 0
  ------------------
  829|      0|        if (str_eq_instructions->td_filter_cascade_present == 0) {
  ------------------
  |  Branch (829:13): [True: 0, False: 0]
  ------------------
  830|      0|          eqComplexityDependent = 0;
  831|      0|        }
  832|      0|      } else {
  833|      0|        if (str_eq_instructions->td_filter_cascade_present == 1) {
  ------------------
  |  Branch (833:13): [True: 0, False: 0]
  ------------------
  834|      0|          eqComplexityDependent = (WORD32)2.5f;
  835|      0|        }
  836|      0|      }
  837|      0|      if (eq_instructionsDependent->eq_apply_to_downmix == 1) {
  ------------------
  |  Branch (837:11): [True: 0, False: 0]
  ------------------
  838|      0|        if (eq_instructionsDependent->downmix_id[0] == ID_FOR_ANY_DOWNMIX) {
  ------------------
  |  |  136|      0|#define ID_FOR_ANY_DOWNMIX 0x7F
  ------------------
  |  Branch (838:13): [True: 0, False: 0]
  ------------------
  839|      0|          eqChannelCountDependent =
  840|      0|              pstr_drc_sel_proc_params_struct->target_ch_count_prelim;
  841|      0|        } else {
  842|      0|          for (k = 0; k < pstr_drc_config->dwnmix_instructions_count; k++) {
  ------------------
  |  Branch (842:23): [True: 0, False: 0]
  ------------------
  843|      0|            for (m = 0; m < str_eq_instructions->dwnmix_id_count; m++) {
  ------------------
  |  Branch (843:25): [True: 0, False: 0]
  ------------------
  844|      0|              if (pstr_drc_config->dwnmix_instructions[k].downmix_id ==
  ------------------
  |  Branch (844:19): [True: 0, False: 0]
  ------------------
  845|      0|                  eq_instructionsDependent->downmix_id[m]) {
  846|      0|                if (eqChannelCountDependent >
  ------------------
  |  Branch (846:21): [True: 0, False: 0]
  ------------------
  847|      0|                    pstr_drc_config->dwnmix_instructions[k]
  848|      0|                        .target_channel_count) {
  849|      0|                  eqChannelCountDependent =
  850|      0|                      pstr_drc_config->dwnmix_instructions[k]
  851|      0|                          .target_channel_count;
  852|      0|                }
  853|      0|              }
  854|      0|            }
  855|      0|          }
  856|      0|        }
  857|      0|      }
  858|      0|      complexityTotalEq += eqChannelCountDependent * eqComplexityDependent;
  859|      0|    }
  860|       |
  861|      0|    pstr_drc_uni_sel_proc
  862|      0|        ->eq_set_id_valid_flag[str_eq_instructions->eq_set_id] = 0;
  863|      0|    complexityTotalEq *= pstr_drc_config->sampling_rate / 48000.0f;
  864|       |
  865|      0|    if (complexityTotalEq <= complexitySupportedTotal) {
  ------------------
  |  Branch (865:9): [True: 0, False: 0]
  ------------------
  866|      0|      pstr_drc_uni_sel_proc
  867|      0|          ->eq_set_id_valid_flag[str_eq_instructions->eq_set_id] = 1;
  868|      0|    }
  869|      0|  }
  870|    597|  return 0;
  871|    597|}
impd_manage_complexity:
  875|    590|                              WORD32* repeat_selection) {
  876|    590|  WORD32 i, j, p, err;
  877|    590|  WORD32 channel_count;
  878|    590|  WORD32 numBandsTooLarge = 0;
  879|    590|  WORD32 drcRequiresEq;
  880|    590|  FLOAT32 complexityEq;
  881|    590|  FLOAT32 complexityDrcTotal = 0.0f;
  882|    590|  FLOAT32 complexityEqTotal = 0.0f;
  883|    590|  FLOAT32 freqNorm = pstr_drc_config->sampling_rate / 48000.0f;
  884|    590|  ia_uni_drc_coeffs_struct* str_p_loc_drc_coefficients_uni_drc;
  885|    590|  ia_drc_instructions_struct* str_drc_instruction_str =
  886|    590|      &pstr_drc_config->str_drc_instruction_str[0];
  887|    590|  ia_drc_sel_proc_output_struct* uni_drc_sel_proc_output =
  888|    590|      &pstr_drc_uni_sel_proc->uni_drc_sel_proc_output;
  889|    590|  ia_drc_sel_proc_params_struct* pstr_drc_sel_proc_params_struct =
  890|    590|      &pstr_drc_uni_sel_proc->uni_drc_sel_proc_params;
  891|    590|  FLOAT32 complexitySupportedTotal =
  892|    590|      (FLOAT32)(pow(2.0f, pstr_drc_uni_sel_proc->compl_level_supported_total));
  893|       |
  894|    590|  impd_select_drc_coeff3(pstr_drc_config, &str_p_loc_drc_coefficients_uni_drc);
  895|       |
  896|    590|  if (str_p_loc_drc_coefficients_uni_drc == NULL) return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  |  Branch (896:7): [True: 0, False: 590]
  ------------------
  897|       |
  898|  2.95k|  for (p = 0; p < 4; p++) {
  ------------------
  |  Branch (898:15): [True: 2.36k, False: 590]
  ------------------
  899|  2.36k|    if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.sel_drc_set_ids[p] <= 0)
  ------------------
  |  Branch (899:9): [True: 2.15k, False: 208]
  ------------------
  900|  2.15k|      continue;
  901|    208|    err = impd_find_drc_instructions_uni_drc(
  902|    208|        pstr_drc_config,
  903|    208|        pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.sel_drc_set_ids[p],
  904|    208|        &str_drc_instruction_str);
  905|    208|    if (err) return (err);
  ------------------
  |  Branch (905:9): [True: 0, False: 208]
  ------------------
  906|       |
  907|    208|    if (str_drc_instruction_str->drc_apply_to_dwnmix == 1) {
  ------------------
  |  Branch (907:9): [True: 0, False: 208]
  ------------------
  908|      0|      channel_count = uni_drc_sel_proc_output->target_channel_count;
  909|    208|    } else {
  910|    208|      channel_count = uni_drc_sel_proc_output->base_channel_count;
  911|    208|    }
  912|    208|    if (pstr_drc_uni_sel_proc->subband_domain_mode == SUBBAND_DOMAIN_MODE_OFF) {
  ------------------
  |  |  148|    208|#define SUBBAND_DOMAIN_MODE_OFF 0
  ------------------
  |  Branch (912:9): [True: 208, False: 0]
  ------------------
  913|    624|      for (j = 0; j < str_drc_instruction_str->num_drc_ch_groups; j++) {
  ------------------
  |  Branch (913:19): [True: 416, False: 208]
  ------------------
  914|    416|        ia_gain_set_params_struct* gain_set_params = &(
  915|    416|            str_p_loc_drc_coefficients_uni_drc->gain_set_params
  916|    416|                [str_drc_instruction_str->gain_set_index_for_channel_group[j]]);
  917|    416|        if (gain_set_params->band_count >
  ------------------
  |  Branch (917:13): [True: 0, False: 416]
  ------------------
  918|    416|            pstr_drc_sel_proc_params_struct->num_bands_supported) {
  919|      0|          if (p < 2) {
  ------------------
  |  Branch (919:15): [True: 0, False: 0]
  ------------------
  920|      0|            numBandsTooLarge = 1;
  921|      0|          } else {
  922|      0|            pstr_drc_uni_sel_proc
  923|      0|                ->drc_set_id_valid_flag[str_drc_instruction_str->drc_set_id] =
  924|      0|                0;
  925|      0|            pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.sel_drc_set_ids[p] =
  926|      0|                0;
  927|      0|          }
  928|    416|        } else {
  929|    416|          if (gain_set_params->band_count > 4) {
  ------------------
  |  Branch (929:15): [True: 0, False: 416]
  ------------------
  930|       |            /* Add complexity for analysis and synthesis QMF bank here, if
  931|       |             * supported */
  932|      0|          }
  933|    416|        }
  934|    416|      }
  935|    208|    }
  936|    208|    complexityDrcTotal +=
  937|    208|        channel_count *
  938|    208|        (1 << str_drc_instruction_str->drc_set_complexity_level);
  939|    208|  }
  940|       |
  941|    590|  if (uni_drc_sel_proc_output->active_downmix_id > 0) {
  ------------------
  |  Branch (941:7): [True: 0, False: 590]
  ------------------
  942|      0|    FLOAT32 complexityPerCoeff;
  943|      0|    ia_downmix_instructions_struct* dwnmix_instructions;
  944|       |
  945|      0|    if (pstr_drc_uni_sel_proc->subband_domain_mode == SUBBAND_DOMAIN_MODE_OFF) {
  ------------------
  |  |  148|      0|#define SUBBAND_DOMAIN_MODE_OFF 0
  ------------------
  |  Branch (945:9): [True: 0, False: 0]
  ------------------
  946|      0|      complexityPerCoeff = 1.0f;
  947|      0|    } else {
  948|      0|      complexityPerCoeff = 2.0f;
  949|      0|    }
  950|      0|    err = impd_find_downmix(pstr_drc_config,
  951|      0|                            uni_drc_sel_proc_output->active_downmix_id,
  952|      0|                            &dwnmix_instructions);
  953|      0|    if (err) return (err);
  ------------------
  |  Branch (953:9): [True: 0, False: 0]
  ------------------
  954|      0|    if (dwnmix_instructions->downmix_coefficients_present == 1) {
  ------------------
  |  Branch (954:9): [True: 0, False: 0]
  ------------------
  955|      0|      for (i = 0; i < uni_drc_sel_proc_output->base_channel_count; i++) {
  ------------------
  |  Branch (955:19): [True: 0, False: 0]
  ------------------
  956|      0|        for (j = 0; j < uni_drc_sel_proc_output->target_channel_count; j++) {
  ------------------
  |  Branch (956:21): [True: 0, False: 0]
  ------------------
  957|      0|          if (uni_drc_sel_proc_output->downmix_matrix[i][j] != 0.0f) {
  ------------------
  |  Branch (957:15): [True: 0, False: 0]
  ------------------
  958|      0|            complexityDrcTotal += complexityPerCoeff;
  959|      0|          }
  960|      0|        }
  961|      0|      }
  962|      0|    } else {
  963|       |      /* add standard downmix here */
  964|      0|    }
  965|      0|  }
  966|       |
  967|  1.77k|  for (p = 0; p < 2; p++) {
  ------------------
  |  Branch (967:15): [True: 1.18k, False: 590]
  ------------------
  968|  1.18k|    if (pstr_drc_uni_sel_proc->eq_inst_index[p] >= 0) {
  ------------------
  |  Branch (968:9): [True: 0, False: 1.18k]
  ------------------
  969|      0|      ia_eq_instructions_struct* str_eq_instructions =
  970|      0|          &pstr_drc_config->str_drc_config_ext
  971|      0|               .str_eq_instructions[pstr_drc_uni_sel_proc->eq_inst_index[p]];
  972|      0|      if (p == 0) {
  ------------------
  |  Branch (972:11): [True: 0, False: 0]
  ------------------
  973|      0|        channel_count = uni_drc_sel_proc_output->base_channel_count;
  974|      0|      } else {
  975|      0|        channel_count = uni_drc_sel_proc_output->target_channel_count;
  976|      0|      }
  977|       |
  978|      0|      complexityEq =
  979|      0|          (FLOAT32)(1 << str_eq_instructions->eq_set_complexity_level);
  980|      0|      if (pstr_drc_uni_sel_proc->subband_domain_mode ==
  ------------------
  |  Branch (980:11): [True: 0, False: 0]
  ------------------
  981|      0|          SUBBAND_DOMAIN_MODE_OFF) {
  ------------------
  |  |  148|      0|#define SUBBAND_DOMAIN_MODE_OFF 0
  ------------------
  982|      0|        if (str_eq_instructions->td_filter_cascade_present == 0) {
  ------------------
  |  Branch (982:13): [True: 0, False: 0]
  ------------------
  983|      0|          complexityEq = 0.0;
  984|      0|        }
  985|      0|      } else {
  986|      0|        if (str_eq_instructions->td_filter_cascade_present == 1) {
  ------------------
  |  Branch (986:13): [True: 0, False: 0]
  ------------------
  987|      0|          complexityEq = 2.5;
  988|      0|        }
  989|      0|      }
  990|       |
  991|      0|      complexityEqTotal += channel_count * complexityEq;
  992|      0|    }
  993|  1.18k|  }
  994|       |
  995|    590|  complexityDrcTotal *= freqNorm;
  996|    590|  complexityEqTotal *= freqNorm;
  997|       |
  998|    590|  if ((complexityDrcTotal > complexitySupportedTotal) ||
  ------------------
  |  Branch (998:7): [True: 0, False: 590]
  ------------------
  999|    590|      (complexityEqTotal > complexitySupportedTotal))
  ------------------
  |  Branch (999:7): [True: 0, False: 590]
  ------------------
 1000|      0|    return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
 1001|       |
 1002|    590|  if (numBandsTooLarge == 1) {
  ------------------
  |  Branch (1002:7): [True: 0, False: 590]
  ------------------
 1003|      0|    if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.sel_drc_set_ids[0] > 0) {
  ------------------
  |  Branch (1003:9): [True: 0, False: 0]
  ------------------
 1004|      0|      err = impd_find_drc_instructions_uni_drc(
 1005|      0|          pstr_drc_config,
 1006|      0|          pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.sel_drc_set_ids[0],
 1007|      0|          &str_drc_instruction_str);
 1008|      0|      if (err) return (err);
  ------------------
  |  Branch (1008:11): [True: 0, False: 0]
  ------------------
 1009|       |
 1010|      0|      pstr_drc_uni_sel_proc
 1011|      0|          ->drc_set_id_valid_flag[str_drc_instruction_str->drc_set_id] = 0;
 1012|      0|    }
 1013|      0|    *repeat_selection = 1;
 1014|    590|  } else {
 1015|    590|    if (complexityDrcTotal + complexityEqTotal <= complexitySupportedTotal) {
  ------------------
  |  Branch (1015:9): [True: 590, False: 0]
  ------------------
 1016|    590|      *repeat_selection = 0;
 1017|    590|    } else {
 1018|      0|      drcRequiresEq = 0;
 1019|      0|      for (p = 0; p < 2; p++) {
  ------------------
  |  Branch (1019:19): [True: 0, False: 0]
  ------------------
 1020|      0|        if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.sel_drc_set_ids[p] <=
  ------------------
  |  Branch (1020:13): [True: 0, False: 0]
  ------------------
 1021|      0|            0)
 1022|      0|          continue;
 1023|      0|        err = impd_find_drc_instructions_uni_drc(
 1024|      0|            pstr_drc_config,
 1025|      0|            pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.sel_drc_set_ids[p],
 1026|      0|            &str_drc_instruction_str);
 1027|      0|        if (err) return (err);
  ------------------
  |  Branch (1027:13): [True: 0, False: 0]
  ------------------
 1028|      0|        if (str_drc_instruction_str->requires_eq == 1) {
  ------------------
  |  Branch (1028:13): [True: 0, False: 0]
  ------------------
 1029|      0|          drcRequiresEq = 1;
 1030|      0|        }
 1031|      0|      }
 1032|      0|      if ((drcRequiresEq == 0) &&
  ------------------
  |  Branch (1032:11): [True: 0, False: 0]
  ------------------
 1033|      0|          (complexityDrcTotal <= complexitySupportedTotal)) {
  ------------------
  |  Branch (1033:11): [True: 0, False: 0]
  ------------------
 1034|      0|        for (p = 0; p < 2; p++) {
  ------------------
  |  Branch (1034:21): [True: 0, False: 0]
  ------------------
 1035|      0|          pstr_drc_uni_sel_proc->eq_inst_index[p] = 0;
 1036|      0|        }
 1037|      0|        *repeat_selection = 0;
 1038|      0|      } else {
 1039|      0|        if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.sel_drc_set_ids[0] >
  ------------------
  |  Branch (1039:13): [True: 0, False: 0]
  ------------------
 1040|      0|            0) {
 1041|      0|          err = impd_find_drc_instructions_uni_drc(
 1042|      0|              pstr_drc_config,
 1043|      0|              pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.sel_drc_set_ids[0],
 1044|      0|              &str_drc_instruction_str);
 1045|      0|          if (err) return (err);
  ------------------
  |  Branch (1045:15): [True: 0, False: 0]
  ------------------
 1046|       |
 1047|      0|          pstr_drc_uni_sel_proc
 1048|      0|              ->drc_set_id_valid_flag[str_drc_instruction_str->drc_set_id] = 0;
 1049|      0|        } else {
 1050|      0|          for (p = 2; p < 4; p++) {
  ------------------
  |  Branch (1050:23): [True: 0, False: 0]
  ------------------
 1051|      0|            pstr_drc_uni_sel_proc
 1052|      0|                ->drc_set_id_valid_flag[str_drc_instruction_str->drc_set_id] =
 1053|      0|                0;
 1054|      0|            pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.sel_drc_set_ids[p] =
 1055|      0|                0;
 1056|      0|          }
 1057|      0|        }
 1058|      0|        *repeat_selection = 1;
 1059|      0|      }
 1060|      0|    }
 1061|    590|  }
 1062|       |
 1063|    590|  if (*repeat_selection == 1) {
  ------------------
  |  Branch (1063:7): [True: 0, False: 590]
  ------------------
 1064|      0|    memset(&pstr_drc_uni_sel_proc->uni_drc_sel_proc_output, 0,
 1065|      0|           sizeof(ia_drc_sel_proc_output_struct));
 1066|      0|  }
 1067|    590|  return (0);
 1068|    590|}

impd_validate_requested_drc_feature:
   43|    590|    ia_drc_sel_proc_params_struct* pstr_drc_sel_proc_params_struct) {
   44|    590|  WORD32 i, j;
   45|       |
   46|  1.24k|  for (i = 0; i < pstr_drc_sel_proc_params_struct->num_drc_feature_requests;
  ------------------
  |  Branch (46:15): [True: 654, False: 590]
  ------------------
   47|    654|       i++) {
   48|    654|    switch (pstr_drc_sel_proc_params_struct->drc_feature_req_type[i]) {
   49|    218|      case MATCH_EFFECT_TYPE:
  ------------------
  |  |   38|    218|#define MATCH_EFFECT_TYPE 0
  ------------------
  |  Branch (49:7): [True: 218, False: 436]
  ------------------
   50|    436|        for (j = 0; j < pstr_drc_sel_proc_params_struct
  ------------------
  |  Branch (50:21): [True: 218, False: 218]
  ------------------
   51|    436|                            ->desired_num_drc_effects_of_requested[i];
   52|    218|             j++) {
   53|    218|          if (pstr_drc_sel_proc_params_struct
  ------------------
  |  Branch (53:15): [True: 0, False: 218]
  ------------------
   54|    218|                  ->requested_drc_effect_type[i][j] ==
   55|    218|              EFFECT_TYPE_REQUESTED_NONE) {
  ------------------
  |  |   27|    218|#define EFFECT_TYPE_REQUESTED_NONE 0
  ------------------
   56|      0|            if (pstr_drc_sel_proc_params_struct
  ------------------
  |  Branch (56:17): [True: 0, False: 0]
  ------------------
   57|      0|                    ->desired_num_drc_effects_of_requested[i] > 1) {
   58|      0|              return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
   59|      0|            }
   60|      0|          }
   61|    218|        }
   62|    218|        break;
   63|    218|      case MATCH_DYNAMIC_RANGE:
  ------------------
  |  |   39|    218|#define MATCH_DYNAMIC_RANGE 1
  ------------------
  |  Branch (63:7): [True: 218, False: 436]
  ------------------
   64|    218|        break;
   65|    218|      case MATCH_DRC_CHARACTERISTIC:
  ------------------
  |  |   40|    218|#define MATCH_DRC_CHARACTERISTIC 2
  ------------------
  |  Branch (65:7): [True: 218, False: 436]
  ------------------
   66|    218|        break;
   67|      0|      default:
  ------------------
  |  Branch (67:7): [True: 0, False: 654]
  ------------------
   68|      0|        return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
   69|      0|        break;
   70|    654|    }
   71|    654|  }
   72|    590|  return (0);
   73|    590|}
impd_find_drc_instructions_uni_drc:
   77|    208|    ia_drc_instructions_struct** str_drc_instruction_str) {
   78|    208|  WORD32 i;
   79|    488|  for (i = 0; i < drc_config->drc_instructions_uni_drc_count; i++) {
  ------------------
  |  Branch (79:15): [True: 488, False: 0]
  ------------------
   80|    488|    if (drc_set_id_requested ==
  ------------------
  |  Branch (80:9): [True: 208, False: 280]
  ------------------
   81|    488|        drc_config->str_drc_instruction_str[i].drc_set_id)
   82|    208|      break;
   83|    488|  }
   84|    208|  if (i == drc_config->drc_instructions_uni_drc_count) {
  ------------------
  |  Branch (84:7): [True: 0, False: 208]
  ------------------
   85|      0|    return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
   86|      0|  }
   87|    208|  *str_drc_instruction_str = &drc_config->str_drc_instruction_str[i];
   88|    208|  return (0);
   89|    208|}
impd_map_requested_effect_bit_idx:
   92|    248|                                         WORD32* effect_bit_idx) {
   93|    248|  switch (requested_effect_type) {
   94|      0|    case EFFECT_TYPE_REQUESTED_NONE:
  ------------------
  |  |   27|      0|#define EFFECT_TYPE_REQUESTED_NONE 0
  ------------------
  |  Branch (94:5): [True: 0, False: 248]
  ------------------
   95|      0|      *effect_bit_idx = EFFECT_BIT_NONE;
  ------------------
  |  |   61|      0|#define EFFECT_BIT_NONE (-1)
  ------------------
   96|      0|      break;
   97|     75|    case EFFECT_TYPE_REQUESTED_NIGHT:
  ------------------
  |  |   28|     75|#define EFFECT_TYPE_REQUESTED_NIGHT 1
  ------------------
  |  Branch (97:5): [True: 75, False: 173]
  ------------------
   98|     75|      *effect_bit_idx = EFFECT_BIT_NIGHT;
  ------------------
  |  |   62|     75|#define EFFECT_BIT_NIGHT 0x0001
  ------------------
   99|     75|      break;
  100|     70|    case EFFECT_TYPE_REQUESTED_NOISY:
  ------------------
  |  |   29|     70|#define EFFECT_TYPE_REQUESTED_NOISY 2
  ------------------
  |  Branch (100:5): [True: 70, False: 178]
  ------------------
  101|     70|      *effect_bit_idx = EFFECT_BIT_NOISY;
  ------------------
  |  |   63|     70|#define EFFECT_BIT_NOISY 0x0002
  ------------------
  102|     70|      break;
  103|      6|    case EFFECT_TYPE_REQUESTED_LIMITED:
  ------------------
  |  |   30|      6|#define EFFECT_TYPE_REQUESTED_LIMITED 3
  ------------------
  |  Branch (103:5): [True: 6, False: 242]
  ------------------
  104|      6|      *effect_bit_idx = EFFECT_BIT_LIMITED;
  ------------------
  |  |   64|      6|#define EFFECT_BIT_LIMITED 0x0004
  ------------------
  105|      6|      break;
  106|      1|    case EFFECT_TYPE_REQUESTED_LOWLEVEL:
  ------------------
  |  |   31|      1|#define EFFECT_TYPE_REQUESTED_LOWLEVEL 4
  ------------------
  |  Branch (106:5): [True: 1, False: 247]
  ------------------
  107|      1|      *effect_bit_idx = EFFECT_BIT_LOWLEVEL;
  ------------------
  |  |   65|      1|#define EFFECT_BIT_LOWLEVEL 0x0008
  ------------------
  108|      1|      break;
  109|      9|    case EFFECT_TYPE_REQUESTED_DIALOG:
  ------------------
  |  |   32|      9|#define EFFECT_TYPE_REQUESTED_DIALOG 5
  ------------------
  |  Branch (109:5): [True: 9, False: 239]
  ------------------
  110|      9|      *effect_bit_idx = EFFECT_BIT_DIALOG;
  ------------------
  |  |   66|      9|#define EFFECT_BIT_DIALOG 0x0010
  ------------------
  111|      9|      break;
  112|     24|    case EFFECT_TYPE_REQUESTED_GENERAL_COMPR:
  ------------------
  |  |   33|     24|#define EFFECT_TYPE_REQUESTED_GENERAL_COMPR 6
  ------------------
  |  Branch (112:5): [True: 24, False: 224]
  ------------------
  113|     24|      *effect_bit_idx = EFFECT_BIT_GENERAL_COMPR;
  ------------------
  |  |   67|     24|#define EFFECT_BIT_GENERAL_COMPR 0x0020
  ------------------
  114|     24|      break;
  115|     58|    case EFFECT_TYPE_REQUESTED_EXPAND:
  ------------------
  |  |   34|     58|#define EFFECT_TYPE_REQUESTED_EXPAND 7
  ------------------
  |  Branch (115:5): [True: 58, False: 190]
  ------------------
  116|     58|      *effect_bit_idx = EFFECT_BIT_EXPAND;
  ------------------
  |  |   68|     58|#define EFFECT_BIT_EXPAND 0x0040
  ------------------
  117|     58|      break;
  118|      5|    case EFFECT_TYPE_REQUESTED_ARTISTIC:
  ------------------
  |  |   35|      5|#define EFFECT_TYPE_REQUESTED_ARTISTIC 8
  ------------------
  |  Branch (118:5): [True: 5, False: 243]
  ------------------
  119|      5|      *effect_bit_idx = EFFECT_BIT_ARTISTIC;
  ------------------
  |  |   69|      5|#define EFFECT_BIT_ARTISTIC 0x0080
  ------------------
  120|      5|      break;
  121|       |
  122|      0|    default:
  ------------------
  |  Branch (122:5): [True: 0, False: 248]
  ------------------
  123|      0|      return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  124|       |
  125|      0|      break;
  126|    248|  }
  127|    248|  return (0);
  128|    248|}
impd_get_fading_drc_set:
  130|    590|WORD32 impd_get_fading_drc_set(ia_drc_sel_pro_struct* pstr_drc_uni_sel_proc) {
  131|    590|  pstr_drc_uni_sel_proc->drc_instructions_index[2] = -1;
  132|    590|  if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.album_mode == 0) {
  ------------------
  |  Branch (132:7): [True: 590, False: 0]
  ------------------
  133|    590|    WORD32 n;
  134|    590|    ia_drc_instructions_struct* str_drc_instruction_str = NULL;
  135|    590|    for (n = 0;
  136|  2.91k|         n < pstr_drc_uni_sel_proc->drc_config.drc_instructions_uni_drc_count;
  ------------------
  |  Branch (136:10): [True: 2.32k, False: 590]
  ------------------
  137|  2.32k|         n++) {
  138|  2.32k|      str_drc_instruction_str =
  139|  2.32k|          &(pstr_drc_uni_sel_proc->drc_config.str_drc_instruction_str[n]);
  140|       |
  141|  2.32k|      if (str_drc_instruction_str->drc_set_effect & EFFECT_BIT_FADE) {
  ------------------
  |  |   71|  2.32k|#define EFFECT_BIT_FADE 0x0200
  ------------------
  |  Branch (141:11): [True: 0, False: 2.32k]
  ------------------
  142|      0|        if (str_drc_instruction_str->downmix_id[0] == ID_FOR_ANY_DOWNMIX) {
  ------------------
  |  |  136|      0|#define ID_FOR_ANY_DOWNMIX 0x7F
  ------------------
  |  Branch (142:13): [True: 0, False: 0]
  ------------------
  143|      0|          pstr_drc_uni_sel_proc->drc_instructions_index[2] = n;
  144|       |
  145|      0|        } else {
  146|      0|          return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  147|      0|        }
  148|      0|      }
  149|  2.32k|    }
  150|    590|  }
  151|    590|  return (0);
  152|    590|}
impd_get_ducking_drc_set:
  154|    590|WORD32 impd_get_ducking_drc_set(ia_drc_sel_pro_struct* pstr_drc_uni_sel_proc) {
  155|    590|  WORD32 drc_instructions_index;
  156|    590|  WORD32 n, k;
  157|    590|  ia_drc_instructions_struct* str_drc_instruction_str;
  158|       |
  159|    590|  WORD32 requested_dwnmix_id =
  160|    590|      pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.active_downmix_id;
  161|       |
  162|    590|  pstr_drc_uni_sel_proc->drc_instructions_index[3] = -1;
  163|    590|  drc_instructions_index = -1;
  164|    590|  str_drc_instruction_str = NULL;
  165|       |
  166|    590|  for (n = 0;
  167|  2.91k|       n < pstr_drc_uni_sel_proc->drc_config.drc_instructions_uni_drc_count;
  ------------------
  |  Branch (167:8): [True: 2.32k, False: 590]
  ------------------
  168|  2.32k|       n++) {
  169|  2.32k|    str_drc_instruction_str =
  170|  2.32k|        &(pstr_drc_uni_sel_proc->drc_config.str_drc_instruction_str[n]);
  171|       |
  172|  2.32k|    if (str_drc_instruction_str->drc_set_effect &
  ------------------
  |  Branch (172:9): [True: 0, False: 2.32k]
  ------------------
  173|  2.32k|        (EFFECT_BIT_DUCK_OTHER | EFFECT_BIT_DUCK_SELF)) {
  ------------------
  |  |   72|  2.32k|#define EFFECT_BIT_DUCK_OTHER 0x0400
  ------------------
                      (EFFECT_BIT_DUCK_OTHER | EFFECT_BIT_DUCK_SELF)) {
  ------------------
  |  |   73|  2.32k|#define EFFECT_BIT_DUCK_SELF 0x0800
  ------------------
  174|      0|      for (k = 0; k < str_drc_instruction_str->dwnmix_id_count; k++) {
  ------------------
  |  Branch (174:19): [True: 0, False: 0]
  ------------------
  175|      0|        if (str_drc_instruction_str->downmix_id[k] == requested_dwnmix_id) {
  ------------------
  |  Branch (175:13): [True: 0, False: 0]
  ------------------
  176|      0|#ifdef LOUDNESS_LEVELING_SUPPORT
  177|      0|          if (drc_instructions_index != -1) break;
  ------------------
  |  Branch (177:15): [True: 0, False: 0]
  ------------------
  178|      0|          if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.loudness_leveling_on == 0 &&
  ------------------
  |  Branch (178:15): [True: 0, False: 0]
  ------------------
  179|      0|              str_drc_instruction_str->leveling_present == 1)
  ------------------
  |  Branch (179:15): [True: 0, False: 0]
  ------------------
  180|      0|            continue;
  181|      0|#endif
  182|      0|          drc_instructions_index = n;
  183|      0|        }
  184|      0|      }
  185|      0|    }
  186|  2.32k|  }
  187|    590|  if (drc_instructions_index == -1) {
  ------------------
  |  Branch (187:7): [True: 590, False: 0]
  ------------------
  188|    590|    for (n = 0;
  189|  2.91k|         n < pstr_drc_uni_sel_proc->drc_config.drc_instructions_uni_drc_count;
  ------------------
  |  Branch (189:10): [True: 2.32k, False: 590]
  ------------------
  190|  2.32k|         n++) {
  191|  2.32k|      str_drc_instruction_str =
  192|  2.32k|          &(pstr_drc_uni_sel_proc->drc_config.str_drc_instruction_str[n]);
  193|       |
  194|  2.32k|      if (str_drc_instruction_str->drc_set_effect &
  ------------------
  |  Branch (194:11): [True: 0, False: 2.32k]
  ------------------
  195|  2.32k|          (EFFECT_BIT_DUCK_OTHER | EFFECT_BIT_DUCK_SELF)) {
  ------------------
  |  |   72|  2.32k|#define EFFECT_BIT_DUCK_OTHER 0x0400
  ------------------
                        (EFFECT_BIT_DUCK_OTHER | EFFECT_BIT_DUCK_SELF)) {
  ------------------
  |  |   73|  2.32k|#define EFFECT_BIT_DUCK_SELF 0x0800
  ------------------
  196|      0|        for (k = 0; k < str_drc_instruction_str->dwnmix_id_count; k++) {
  ------------------
  |  Branch (196:21): [True: 0, False: 0]
  ------------------
  197|      0|          if (str_drc_instruction_str->downmix_id[k] == ID_FOR_BASE_LAYOUT) {
  ------------------
  |  |  135|      0|#define ID_FOR_BASE_LAYOUT 0x0
  ------------------
  |  Branch (197:15): [True: 0, False: 0]
  ------------------
  198|      0|#ifdef LOUDNESS_LEVELING_SUPPORT
  199|      0|            if (drc_instructions_index != -1) break;
  ------------------
  |  Branch (199:17): [True: 0, False: 0]
  ------------------
  200|      0|            if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.loudness_leveling_on == 0 &&
  ------------------
  |  Branch (200:17): [True: 0, False: 0]
  ------------------
  201|      0|                str_drc_instruction_str->leveling_present == 1)
  ------------------
  |  Branch (201:17): [True: 0, False: 0]
  ------------------
  202|      0|              continue;
  203|      0|#endif
  204|      0|            drc_instructions_index = n;
  205|      0|          }
  206|      0|        }
  207|      0|      }
  208|  2.32k|    }
  209|    590|  }
  210|    590|  if (drc_instructions_index > -1) {
  ------------------
  |  Branch (210:7): [True: 0, False: 590]
  ------------------
  211|      0|    pstr_drc_uni_sel_proc->drc_instructions_index[2] = -1;
  212|      0|    pstr_drc_uni_sel_proc->drc_instructions_index[3] = drc_instructions_index;
  213|      0|  }
  214|    590|  return (0);
  215|    590|}
impd_get_selected_drc_set:
  218|    590|                                 WORD32 drc_set_id_selected) {
  219|    590|  WORD32 n;
  220|       |
  221|  2.36k|  for (n = 0; n < pstr_drc_uni_sel_proc->drc_config.drc_instructions_count_plus;
  ------------------
  |  Branch (221:15): [True: 2.36k, False: 0]
  ------------------
  222|  2.36k|       n++) {
  223|  2.36k|    if (pstr_drc_uni_sel_proc->drc_config.str_drc_instruction_str[n]
  ------------------
  |  Branch (223:9): [True: 590, False: 1.77k]
  ------------------
  224|  2.36k|            .drc_set_id == drc_set_id_selected)
  225|    590|      break;
  226|  2.36k|  }
  227|    590|  if (n == pstr_drc_uni_sel_proc->drc_config.drc_instructions_count_plus) {
  ------------------
  |  Branch (227:7): [True: 0, False: 590]
  ------------------
  228|      0|    return (EXTERNAL_ERROR);
  ------------------
  |  |  130|      0|#define EXTERNAL_ERROR 4
  ------------------
  229|      0|  }
  230|    590|  pstr_drc_uni_sel_proc->drc_inst_index_sel = n;
  231|       |
  232|    590|  pstr_drc_uni_sel_proc->drc_instructions_index[0] =
  233|    590|      pstr_drc_uni_sel_proc->drc_inst_index_sel;
  234|    590|  return (0);
  235|    590|}
impd_get_dependent_drc_set:
  238|    590|    ia_drc_sel_pro_struct* pstr_drc_uni_sel_proc) {
  239|    590|  ia_drc_instructions_struct* str_drc_instruction_str = NULL;
  240|    590|  str_drc_instruction_str = &(
  241|    590|      pstr_drc_uni_sel_proc->drc_config
  242|    590|          .str_drc_instruction_str[pstr_drc_uni_sel_proc->drc_inst_index_sel]);
  243|       |
  244|    590|  if (str_drc_instruction_str->depends_on_drc_set_present == 1) {
  ------------------
  |  Branch (244:7): [True: 0, False: 590]
  ------------------
  245|      0|    WORD32 n;
  246|      0|    WORD32 drc_dependent_set_id = str_drc_instruction_str->depends_on_drc_set;
  247|       |
  248|      0|    for (n = 0;
  249|      0|         n < pstr_drc_uni_sel_proc->drc_config.drc_instructions_count_plus;
  ------------------
  |  Branch (249:10): [True: 0, False: 0]
  ------------------
  250|      0|         n++) {
  251|      0|      if (pstr_drc_uni_sel_proc->drc_config.str_drc_instruction_str[n]
  ------------------
  |  Branch (251:11): [True: 0, False: 0]
  ------------------
  252|      0|              .drc_set_id == drc_dependent_set_id)
  253|      0|        break;
  254|      0|    }
  255|      0|    if (n == pstr_drc_uni_sel_proc->drc_config.drc_instructions_count_plus) {
  ------------------
  |  Branch (255:9): [True: 0, False: 0]
  ------------------
  256|      0|      return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  257|      0|    }
  258|      0|    pstr_drc_uni_sel_proc->drc_instructions_index[1] = n;
  259|    590|  } else {
  260|    590|    pstr_drc_uni_sel_proc->drc_instructions_index[1] = -1;
  261|    590|  }
  262|    590|  return (0);
  263|    590|}
impd_select_drcs_without_compr_effects:
  292|     97|    ia_selection_candidate_info_struct* selection_candidate_info) {
  293|     97|  WORD32 i, k, n;
  294|     97|  WORD32 selection_candidate_step_2_count = 0;
  295|     97|  ia_selection_candidate_info_struct
  296|     97|      selection_candidate_info_step_2[SELECTION_CANDIDATE_COUNT_MAX];
  297|     97|  WORD32 effect_types_request_table_size;
  298|     97|  WORD32 match;
  299|     97|  ia_drc_instructions_struct* str_drc_instruction_str;
  300|       |
  301|     97|  effect_types_request_table_size =
  302|     97|      sizeof(effect_types_request_table) / sizeof(WORD32);
  303|       |
  304|     97|  k = 0;
  305|    612|  for (i = 0; i < *selection_candidate_count; i++) {
  ------------------
  |  Branch (305:15): [True: 515, False: 97]
  ------------------
  306|    515|    str_drc_instruction_str = &(
  307|    515|        pstr_drc_config->str_drc_instruction_str[selection_candidate_info[i]
  308|    515|                                                     .drc_instructions_index]);
  309|       |
  310|    515|    match = 1;
  311|  4.63k|    for (n = 0; n < effect_types_request_table_size; n++) {
  ------------------
  |  Branch (311:17): [True: 4.12k, False: 515]
  ------------------
  312|  4.12k|      if ((str_drc_instruction_str->drc_set_effect &
  ------------------
  |  Branch (312:11): [True: 425, False: 3.69k]
  ------------------
  313|  4.12k|           effect_types_request_table[n]) != 0x0) {
  314|    425|        match = 0;
  315|    425|      }
  316|  4.12k|    }
  317|    515|    if (match == 1) {
  ------------------
  |  Branch (317:9): [True: 90, False: 425]
  ------------------
  318|     90|      if (k >= SELECTION_CANDIDATE_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |  123|     90|#define SELECTION_CANDIDATE_COUNT_MAX 32
  ------------------
                    if (k >= SELECTION_CANDIDATE_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  |  Branch (318:11): [True: 0, False: 90]
  ------------------
  319|     90|      memcpy(&selection_candidate_info_step_2[k], &selection_candidate_info[i],
  320|     90|             sizeof(ia_selection_candidate_info_struct));
  321|     90|      k++;
  322|     90|    }
  323|    515|  }
  324|     97|  selection_candidate_step_2_count = k;
  325|       |
  326|     97|  if (selection_candidate_step_2_count > 0) {
  ------------------
  |  Branch (326:7): [True: 79, False: 18]
  ------------------
  327|     79|    *match_found_flag = 1;
  328|    169|    for (i = 0; i < selection_candidate_step_2_count; i++) {
  ------------------
  |  Branch (328:17): [True: 90, False: 79]
  ------------------
  329|     90|      memcpy(&selection_candidate_info[i], &selection_candidate_info_step_2[i],
  330|     90|             sizeof(ia_selection_candidate_info_struct));
  331|     90|      *selection_candidate_count = selection_candidate_step_2_count;
  332|     90|    }
  333|     79|  } else {
  334|     18|    *match_found_flag = 0;
  335|     18|  }
  336|       |
  337|     97|  return (0);
  338|     97|}
impd_match_effect_type_attempt:
  344|    248|    ia_selection_candidate_info_struct* selection_candidate_info) {
  345|    248|  WORD32 i, k, err;
  346|    248|  WORD32 selection_candidate_step_2_count = 0;
  347|    248|  ia_selection_candidate_info_struct
  348|    248|      selection_candidate_info_step_2[SELECTION_CANDIDATE_COUNT_MAX];
  349|    248|  ia_drc_instructions_struct* str_drc_instruction_str;
  350|    248|  ia_drc_instructions_struct* drc_instructions_dependent;
  351|    248|  WORD32 effect_bit_idx;
  352|       |
  353|    248|  err =
  354|    248|      impd_map_requested_effect_bit_idx(requested_effect_type, &effect_bit_idx);
  355|    248|  if (err) return (err);
  ------------------
  |  Branch (355:7): [True: 0, False: 248]
  ------------------
  356|       |
  357|    248|  if (effect_bit_idx == EFFECT_BIT_NONE) {
  ------------------
  |  |   61|    248|#define EFFECT_BIT_NONE (-1)
  ------------------
  |  Branch (357:7): [True: 0, False: 248]
  ------------------
  358|      0|    err = impd_select_drcs_without_compr_effects(
  359|      0|        pstr_drc_config, match_found_flag, selection_candidate_count,
  360|      0|        selection_candidate_info);
  361|      0|    if (err) return (err);
  ------------------
  |  Branch (361:9): [True: 0, False: 0]
  ------------------
  362|    248|  } else {
  363|    248|    k = 0;
  364|  1.90k|    for (i = 0; i < *selection_candidate_count; i++) {
  ------------------
  |  Branch (364:17): [True: 1.65k, False: 248]
  ------------------
  365|  1.65k|      str_drc_instruction_str =
  366|  1.65k|          &(pstr_drc_config->str_drc_instruction_str
  367|  1.65k|                [selection_candidate_info[i].drc_instructions_index]);
  368|  1.65k|      if (str_drc_instruction_str->depends_on_drc_set_present == 1) {
  ------------------
  |  Branch (368:11): [True: 0, False: 1.65k]
  ------------------
  369|      0|        err = impd_get_dependent_drc_instructions(pstr_drc_config,
  370|      0|                                                  str_drc_instruction_str,
  371|      0|                                                  &drc_instructions_dependent);
  372|      0|        if (err) return (err);
  ------------------
  |  Branch (372:13): [True: 0, False: 0]
  ------------------
  373|       |
  374|      0|        if (state_requested == 1) {
  ------------------
  |  Branch (374:13): [True: 0, False: 0]
  ------------------
  375|      0|          if (((str_drc_instruction_str->drc_set_effect & effect_bit_idx) !=
  ------------------
  |  Branch (375:15): [True: 0, False: 0]
  ------------------
  376|      0|               0x0) ||
  377|      0|              ((drc_instructions_dependent->drc_set_effect & effect_bit_idx) !=
  ------------------
  |  Branch (377:15): [True: 0, False: 0]
  ------------------
  378|      0|               0x0)) {
  379|      0|            if (k >= SELECTION_CANDIDATE_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |  123|      0|#define SELECTION_CANDIDATE_COUNT_MAX 32
  ------------------
                          if (k >= SELECTION_CANDIDATE_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  |  Branch (379:17): [True: 0, False: 0]
  ------------------
  380|      0|            memcpy(&selection_candidate_info_step_2[k],
  381|      0|                   &selection_candidate_info[i],
  382|      0|                   sizeof(ia_selection_candidate_info_struct));
  383|      0|            k++;
  384|      0|          }
  385|      0|        } else {
  386|      0|          if (((str_drc_instruction_str->drc_set_effect & effect_bit_idx) ==
  ------------------
  |  Branch (386:15): [True: 0, False: 0]
  ------------------
  387|      0|               0x0) &&
  388|      0|              ((drc_instructions_dependent->drc_set_effect & effect_bit_idx) ==
  ------------------
  |  Branch (388:15): [True: 0, False: 0]
  ------------------
  389|      0|               0x0)) {
  390|      0|            if (k >= SELECTION_CANDIDATE_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |  123|      0|#define SELECTION_CANDIDATE_COUNT_MAX 32
  ------------------
                          if (k >= SELECTION_CANDIDATE_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  |  Branch (390:17): [True: 0, False: 0]
  ------------------
  391|      0|            memcpy(&selection_candidate_info_step_2[k],
  392|      0|                   &selection_candidate_info[i],
  393|      0|                   sizeof(ia_selection_candidate_info_struct));
  394|      0|            k++;
  395|      0|          }
  396|      0|        }
  397|  1.65k|      } else {
  398|  1.65k|        if (state_requested == 1) {
  ------------------
  |  Branch (398:13): [True: 1.65k, False: 0]
  ------------------
  399|  1.65k|          if ((str_drc_instruction_str->drc_set_effect & effect_bit_idx) !=
  ------------------
  |  Branch (399:15): [True: 207, False: 1.44k]
  ------------------
  400|  1.65k|              0x0) {
  401|    207|            if (k >= SELECTION_CANDIDATE_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |  123|    207|#define SELECTION_CANDIDATE_COUNT_MAX 32
  ------------------
                          if (k >= SELECTION_CANDIDATE_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  |  Branch (401:17): [True: 0, False: 207]
  ------------------
  402|    207|            memcpy(&selection_candidate_info_step_2[k],
  403|    207|                   &selection_candidate_info[i],
  404|    207|                   sizeof(ia_selection_candidate_info_struct));
  405|    207|            k++;
  406|    207|          }
  407|  1.65k|        } else {
  408|      0|          if ((str_drc_instruction_str->drc_set_effect & effect_bit_idx) ==
  ------------------
  |  Branch (408:15): [True: 0, False: 0]
  ------------------
  409|      0|              0x0) {
  410|      0|            if (k >= SELECTION_CANDIDATE_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |  123|      0|#define SELECTION_CANDIDATE_COUNT_MAX 32
  ------------------
                          if (k >= SELECTION_CANDIDATE_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  |  Branch (410:17): [True: 0, False: 0]
  ------------------
  411|      0|            memcpy(&selection_candidate_info_step_2[k],
  412|      0|                   &selection_candidate_info[i],
  413|      0|                   sizeof(ia_selection_candidate_info_struct));
  414|      0|            k++;
  415|      0|          }
  416|      0|        }
  417|  1.65k|      }
  418|  1.65k|    }
  419|    248|    selection_candidate_step_2_count = k;
  420|       |
  421|    248|    if (selection_candidate_step_2_count > 0) {
  ------------------
  |  Branch (421:9): [True: 157, False: 91]
  ------------------
  422|    157|      *match_found_flag = 1;
  423|    364|      for (i = 0; i < selection_candidate_step_2_count; i++) {
  ------------------
  |  Branch (423:19): [True: 207, False: 157]
  ------------------
  424|    207|        *selection_candidate_count = selection_candidate_step_2_count;
  425|    207|        memcpy(&selection_candidate_info[i],
  426|    207|               &selection_candidate_info_step_2[i],
  427|    207|               sizeof(ia_selection_candidate_info_struct));
  428|    207|      }
  429|    157|    } else {
  430|     91|      *match_found_flag = 0;
  431|     91|    }
  432|    248|  }
  433|    248|  return (0);
  434|    248|}
impd_match_effect_types:
  440|    236|    ia_selection_candidate_info_struct* selection_candidate_info) {
  441|    236|  WORD32 k, err;
  442|    236|  WORD32 match_found_flag = 0;
  443|    236|  WORD32 state_requested;
  444|    236|  WORD32 desired_effect_type_found;
  445|       |
  446|    236|  desired_effect_type_found = 0;
  447|    236|  k = 0;
  448|    472|  while (k < effect_type_requested_desired_count) {
  ------------------
  |  Branch (448:10): [True: 236, False: 236]
  ------------------
  449|    236|    state_requested = 1;
  450|    236|    err = impd_match_effect_type_attempt(
  451|    236|        pstr_drc_config, requested_effect_type[k], state_requested,
  452|    236|        &match_found_flag, selection_candidate_count, selection_candidate_info);
  453|    236|    if (err) return (err);
  ------------------
  |  Branch (453:9): [True: 0, False: 236]
  ------------------
  454|    236|    if (match_found_flag) desired_effect_type_found = 1;
  ------------------
  |  Branch (454:9): [True: 151, False: 85]
  ------------------
  455|    236|    k++;
  456|    236|  }
  457|    236|  if (desired_effect_type_found == 0) {
  ------------------
  |  Branch (457:7): [True: 85, False: 151]
  ------------------
  458|     97|    while ((k < effect_type_requested_total_count) && (match_found_flag == 0)) {
  ------------------
  |  Branch (458:12): [True: 18, False: 79]
  |  Branch (458:55): [True: 12, False: 6]
  ------------------
  459|     12|      state_requested = 1;
  460|     12|      err = impd_match_effect_type_attempt(
  461|     12|          pstr_drc_config, requested_effect_type[k], state_requested,
  462|     12|          &match_found_flag, selection_candidate_count,
  463|     12|          selection_candidate_info);
  464|     12|      if (err) return (err);
  ------------------
  |  Branch (464:11): [True: 0, False: 12]
  ------------------
  465|     12|      k++;
  466|     12|    }
  467|     85|  }
  468|       |
  469|    236|  return (0);
  470|    236|}
impd_match_dynamic_range:
  477|    218|    ia_selection_candidate_info_struct* selection_candidate_info) {
  478|    218|  ia_drc_instructions_struct* str_drc_instruction_str;
  479|    218|  WORD32 err, i, k;
  480|    218|  WORD32 lp_avg_present_val;
  481|    218|  FLOAT32 lp_avg_val;
  482|    218|  FLOAT32 deviation_min = 1000.0f;
  483|    218|  WORD32 selected[DRC_INSTRUCTIONS_COUNT_MAX];
  484|    218|  WORD32 dynamic_range_measurement_type =
  485|    218|      pstr_drc_sel_proc_params_struct
  486|    218|          ->requested_dyn_range_measur_type[num_drc_requests];
  487|       |
  488|    218|  WORD32 requested_dyn_range_range_flag =
  489|    218|      pstr_drc_sel_proc_params_struct
  490|    218|          ->requested_dyn_range_range_flag[num_drc_requests];
  491|       |
  492|    218|  FLOAT32 dynamic_range_requested =
  493|    218|      pstr_drc_sel_proc_params_struct
  494|    218|          ->requested_dyn_range_value[num_drc_requests];
  495|       |
  496|    218|  FLOAT32 dynamic_range_min_requested =
  497|    218|      pstr_drc_sel_proc_params_struct
  498|    218|          ->requested_dyn_range_min_val[num_drc_requests];
  499|       |
  500|    218|  FLOAT32 dynamic_range_max_requested =
  501|    218|      pstr_drc_sel_proc_params_struct
  502|    218|          ->requested_dyn_range_max_val[num_drc_requests];
  503|       |
  504|    218|  WORD32* requested_dwnmix_id =
  505|    218|      pstr_drc_sel_proc_params_struct->requested_dwnmix_id;
  506|       |
  507|    218|  WORD32 album_mode = pstr_drc_sel_proc_params_struct->album_mode;
  508|       |
  509|    218|  k = 0;
  510|  1.18k|  for (i = 0; i < *selection_candidate_count; i++) {
  ------------------
  |  Branch (510:15): [True: 962, False: 218]
  ------------------
  511|    962|    str_drc_instruction_str = &(
  512|    962|        pstr_drc_config->str_drc_instruction_str[selection_candidate_info[i]
  513|    962|                                                     .drc_instructions_index]);
  514|       |
  515|    962|    err = impd_loudness_peak_to_average_info(
  516|    962|        pstr_loudness_info, str_drc_instruction_str,
  517|    962|        requested_dwnmix_id[selection_candidate_info[i]
  518|    962|                                .downmix_id_request_index],
  519|    962|        dynamic_range_measurement_type, album_mode, &lp_avg_present_val,
  520|    962|        &lp_avg_val);
  521|    962|    if (err) return (err);
  ------------------
  |  Branch (521:9): [True: 0, False: 962]
  ------------------
  522|       |
  523|    962|    if (lp_avg_present_val == 1) {
  ------------------
  |  Branch (523:9): [True: 60, False: 902]
  ------------------
  524|     60|      if (requested_dyn_range_range_flag == 1) {
  ------------------
  |  Branch (524:11): [True: 0, False: 60]
  ------------------
  525|      0|        if ((lp_avg_val >= dynamic_range_min_requested) &&
  ------------------
  |  Branch (525:13): [True: 0, False: 0]
  ------------------
  526|      0|            (lp_avg_val <= dynamic_range_max_requested)) {
  ------------------
  |  Branch (526:13): [True: 0, False: 0]
  ------------------
  527|      0|          if (k >= DRC_INSTRUCTIONS_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |   43|      0|#define DRC_INSTRUCTIONS_COUNT_MAX (DOWNMIX_INSTRUCTION_COUNT_MAX + 20)
  |  |  ------------------
  |  |  |  |   41|      0|#define DOWNMIX_INSTRUCTION_COUNT_MAX 16
  |  |  ------------------
  ------------------
                        if (k >= DRC_INSTRUCTIONS_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  |  Branch (527:15): [True: 0, False: 0]
  ------------------
  528|      0|          selected[k] = i;
  529|      0|          k++;
  530|      0|        }
  531|     60|      } else {
  532|     60|        FLOAT32 deviation =
  533|     60|            (FLOAT32)fabs((FLOAT64)(dynamic_range_requested - lp_avg_val));
  534|     60|        if (deviation_min >= deviation) {
  ------------------
  |  Branch (534:13): [True: 52, False: 8]
  ------------------
  535|     52|          if (deviation_min > deviation) {
  ------------------
  |  Branch (535:15): [True: 15, False: 37]
  ------------------
  536|     15|            deviation_min = deviation;
  537|     15|            k = 0;
  538|     15|          }
  539|     52|          if (k >= DRC_INSTRUCTIONS_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |   43|     52|#define DRC_INSTRUCTIONS_COUNT_MAX (DOWNMIX_INSTRUCTION_COUNT_MAX + 20)
  |  |  ------------------
  |  |  |  |   41|     52|#define DOWNMIX_INSTRUCTION_COUNT_MAX 16
  |  |  ------------------
  ------------------
                        if (k >= DRC_INSTRUCTIONS_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  |  Branch (539:15): [True: 0, False: 52]
  ------------------
  540|     52|          selected[k] = i;
  541|     52|          k++;
  542|     52|        }
  543|     60|      }
  544|     60|    }
  545|    962|  }
  546|    218|  if (k > 0) {
  ------------------
  |  Branch (546:7): [True: 14, False: 204]
  ------------------
  547|     65|    for (i = 0; i < k; i++) {
  ------------------
  |  Branch (547:17): [True: 51, False: 14]
  ------------------
  548|     51|      memcpy(&selection_candidate_info[i],
  549|     51|             &selection_candidate_info[selected[i]],
  550|     51|             sizeof(ia_selection_candidate_info_struct));
  551|     51|    }
  552|     14|    *selection_candidate_count = k;
  553|     14|  }
  554|       |
  555|    218|  return (0);
  556|    218|}
impd_match_drc_characteristic_attempt:
  561|    654|    ia_selection_candidate_info_struct* selection_candidate_info) {
  562|    654|  WORD32 i, k, n, b, m;
  563|    654|  WORD32 ref_count;
  564|    654|  WORD32 drc_characteristic;
  565|    654|  FLOAT32 match_count;
  566|    654|  WORD32 drc_characteristic_request_1;
  567|    654|  WORD32 drc_characteristic_request_2;
  568|    654|  WORD32 drc_characteristic_request_3;
  569|       |
  570|    654|  ia_drc_instructions_struct* str_drc_instruction_str = NULL;
  571|    654|  ia_uni_drc_coeffs_struct* str_p_loc_drc_coefficients_uni_drc = NULL;
  572|    654|  ia_gain_set_params_struct* gain_set_params = NULL;
  573|    654|  *match_found_flag = 0;
  574|       |
  575|    654|  if (requested_drc_characteristic < 1) {
  ------------------
  |  Branch (575:7): [True: 0, False: 654]
  ------------------
  576|      0|    return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  577|      0|  }
  578|    654|  if (requested_drc_characteristic < 12) {
  ------------------
  |  Branch (578:7): [True: 654, False: 0]
  ------------------
  579|    654|    drc_characteristic_request_1 =
  580|    654|        drc_characteristic_order_default[requested_drc_characteristic - 1][0];
  581|    654|    drc_characteristic_request_2 =
  582|    654|        drc_characteristic_order_default[requested_drc_characteristic - 1][1];
  583|    654|    drc_characteristic_request_3 =
  584|    654|        drc_characteristic_order_default[requested_drc_characteristic - 1][2];
  585|    654|  } else {
  586|      0|    drc_characteristic_request_1 = requested_drc_characteristic;
  587|      0|    drc_characteristic_request_2 = -1;
  588|      0|    drc_characteristic_request_3 = -1;
  589|      0|  }
  590|       |
  591|    654|  if (pstr_drc_config->drc_coefficients_drc_count) {
  ------------------
  |  Branch (591:7): [True: 654, False: 0]
  ------------------
  592|    714|    for (i = 0; i < pstr_drc_config->drc_coefficients_drc_count; i++) {
  ------------------
  |  Branch (592:17): [True: 714, False: 0]
  ------------------
  593|    714|      str_p_loc_drc_coefficients_uni_drc =
  594|    714|          &(pstr_drc_config->str_p_loc_drc_coefficients_uni_drc[i]);
  595|    714|      if (str_p_loc_drc_coefficients_uni_drc->drc_location == LOCATION_SELECTED)
  ------------------
  |  |  144|    714|#define LOCATION_SELECTED LOCATION_MP4_INSTREAM_UNIDRC
  |  |  ------------------
  |  |  |  |  141|    714|#define LOCATION_MP4_INSTREAM_UNIDRC 0x1
  |  |  ------------------
  ------------------
  |  Branch (595:11): [True: 654, False: 60]
  ------------------
  596|    654|        break;
  597|    714|    }
  598|       |
  599|    654|    if (i == pstr_drc_config->drc_coefficients_drc_count) {
  ------------------
  |  Branch (599:9): [True: 0, False: 654]
  ------------------
  600|      0|      return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  601|      0|    }
  602|    654|  }
  603|       |
  604|    654|  n = 0;
  605|  2.75k|  for (i = 0; i < *selection_candidate_count; i++) {
  ------------------
  |  Branch (605:15): [True: 2.10k, False: 654]
  ------------------
  606|  2.10k|    ref_count = 0;
  607|  2.10k|    match_count = 0;
  608|       |
  609|  2.10k|    str_drc_instruction_str = &(
  610|  2.10k|        pstr_drc_config->str_drc_instruction_str[selection_candidate_info[i]
  611|  2.10k|                                                     .drc_instructions_index]);
  612|  5.38k|    for (k = 0; k < str_drc_instruction_str->num_drc_ch_groups; k++) {
  ------------------
  |  Branch (612:17): [True: 3.28k, False: 2.10k]
  ------------------
  613|  3.28k|      gain_set_params =
  614|  3.28k|          &(str_p_loc_drc_coefficients_uni_drc->gain_set_params
  615|  3.28k|                [str_drc_instruction_str->gain_set_index_for_channel_group[k]]);
  616|  6.57k|      for (b = 0; b < gain_set_params->band_count; b++) {
  ------------------
  |  Branch (616:19): [True: 3.28k, False: 3.28k]
  ------------------
  617|  3.28k|        ref_count++;
  618|  3.28k|        drc_characteristic = gain_set_params->gain_params[b].drc_characteristic;
  619|  3.28k|        if (drc_characteristic == drc_characteristic_request_1)
  ------------------
  |  Branch (619:13): [True: 0, False: 3.28k]
  ------------------
  620|      0|          match_count += 1.0f;
  621|  3.28k|        else if (drc_characteristic == drc_characteristic_request_2)
  ------------------
  |  Branch (621:18): [True: 0, False: 3.28k]
  ------------------
  622|      0|          match_count += 0.75f;
  623|  3.28k|        else if (drc_characteristic == drc_characteristic_request_3)
  ------------------
  |  Branch (623:18): [True: 0, False: 3.28k]
  ------------------
  624|      0|          match_count += 0.5f;
  625|  3.28k|      }
  626|  3.28k|    }
  627|  2.10k|    if (str_drc_instruction_str->depends_on_drc_set_present == 1) {
  ------------------
  |  Branch (627:9): [True: 0, False: 2.10k]
  ------------------
  628|      0|      WORD32 depends_on_drc_set = str_drc_instruction_str->depends_on_drc_set;
  629|      0|      for (m = 0; m < pstr_drc_config->drc_instructions_uni_drc_count; m++) {
  ------------------
  |  Branch (629:19): [True: 0, False: 0]
  ------------------
  630|      0|        if (pstr_drc_config->str_drc_instruction_str[m].drc_set_id ==
  ------------------
  |  Branch (630:13): [True: 0, False: 0]
  ------------------
  631|      0|            depends_on_drc_set)
  632|      0|          break;
  633|      0|      }
  634|      0|      if (m == pstr_drc_config->drc_instructions_uni_drc_count) {
  ------------------
  |  Branch (634:11): [True: 0, False: 0]
  ------------------
  635|      0|        return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  636|      0|      }
  637|      0|      str_drc_instruction_str = &(pstr_drc_config->str_drc_instruction_str[m]);
  638|      0|      if ((str_drc_instruction_str->drc_set_effect &
  ------------------
  |  Branch (638:11): [True: 0, False: 0]
  ------------------
  639|      0|           (EFFECT_BIT_FADE | EFFECT_BIT_DUCK_OTHER | EFFECT_BIT_DUCK_SELF)) ==
  ------------------
  |  |   71|      0|#define EFFECT_BIT_FADE 0x0200
  ------------------
                         (EFFECT_BIT_FADE | EFFECT_BIT_DUCK_OTHER | EFFECT_BIT_DUCK_SELF)) ==
  ------------------
  |  |   72|      0|#define EFFECT_BIT_DUCK_OTHER 0x0400
  ------------------
                         (EFFECT_BIT_FADE | EFFECT_BIT_DUCK_OTHER | EFFECT_BIT_DUCK_SELF)) ==
  ------------------
  |  |   73|      0|#define EFFECT_BIT_DUCK_SELF 0x0800
  ------------------
  640|      0|          0) {
  641|      0|        if (str_drc_instruction_str->drc_set_effect != EFFECT_BIT_CLIPPING) {
  ------------------
  |  |   70|      0|#define EFFECT_BIT_CLIPPING 0x0100
  ------------------
  |  Branch (641:13): [True: 0, False: 0]
  ------------------
  642|      0|          for (k = 0; k < str_drc_instruction_str->num_drc_ch_groups; k++) {
  ------------------
  |  Branch (642:23): [True: 0, False: 0]
  ------------------
  643|      0|            gain_set_params =
  644|      0|                &(str_p_loc_drc_coefficients_uni_drc->gain_set_params
  645|      0|                      [str_drc_instruction_str
  646|      0|                           ->gain_set_index_for_channel_group[k]]);
  647|      0|            for (b = 0; b < gain_set_params->band_count; b++) {
  ------------------
  |  Branch (647:25): [True: 0, False: 0]
  ------------------
  648|      0|              ref_count++;
  649|      0|              drc_characteristic =
  650|      0|                  gain_set_params->gain_params[b].drc_characteristic;
  651|      0|              if (drc_characteristic == drc_characteristic_request_1)
  ------------------
  |  Branch (651:19): [True: 0, False: 0]
  ------------------
  652|      0|                match_count += 1.0f;
  653|      0|              else if (drc_characteristic == drc_characteristic_request_2)
  ------------------
  |  Branch (653:24): [True: 0, False: 0]
  ------------------
  654|      0|                match_count += 0.75f;
  655|      0|              else if (drc_characteristic == drc_characteristic_request_3)
  ------------------
  |  Branch (655:24): [True: 0, False: 0]
  ------------------
  656|      0|                match_count += 0.5;
  657|      0|            }
  658|      0|          }
  659|      0|        }
  660|      0|      }
  661|      0|    }
  662|  2.10k|    if ((ref_count > 0) && (((FLOAT32)match_count) > 0.5f * ref_count)) {
  ------------------
  |  Branch (662:9): [True: 1.64k, False: 456]
  |  Branch (662:28): [True: 0, False: 1.64k]
  ------------------
  663|      0|      if (n >= SELECTION_CANDIDATE_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |  123|      0|#define SELECTION_CANDIDATE_COUNT_MAX 32
  ------------------
                    if (n >= SELECTION_CANDIDATE_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  |  Branch (663:11): [True: 0, False: 0]
  ------------------
  664|      0|      memcpy(&selection_candidate_info[n], &selection_candidate_info[i],
  665|      0|             sizeof(ia_selection_candidate_info_struct));
  666|      0|      n++;
  667|      0|    }
  668|  2.10k|  }
  669|    654|  if (n > 0) {
  ------------------
  |  Branch (669:7): [True: 0, False: 654]
  ------------------
  670|      0|    *selection_candidate_count = n;
  671|      0|    *match_found_flag = 1;
  672|      0|  }
  673|       |
  674|    654|  return (0);
  675|    654|}
impd_match_drc_characteristic:
  680|    218|    ia_selection_candidate_info_struct* selection_candidate_info) {
  681|    218|  WORD32 k, err;
  682|    218|  WORD32 match_found_flag = 0;
  683|       |
  684|    218|  const WORD32* drc_characteristic_order =
  685|    218|      drc_characteristic_order_default[requested_drc_characteristic - 1];
  686|    218|  const WORD32 drc_characteristic_order_count =
  687|    218|      sizeof(drc_characteristic_order_default[requested_drc_characteristic]) /
  688|    218|      sizeof(WORD32);
  689|    218|  k = 0;
  690|    872|  while ((k < drc_characteristic_order_count) && (match_found_flag == 0) &&
  ------------------
  |  Branch (690:10): [True: 654, False: 218]
  |  Branch (690:50): [True: 654, False: 0]
  ------------------
  691|    654|         (drc_characteristic_order[k] > 0)) {
  ------------------
  |  Branch (691:10): [True: 654, False: 0]
  ------------------
  692|    654|    err = impd_match_drc_characteristic_attempt(
  693|    654|        pstr_drc_config, drc_characteristic_order[k], &match_found_flag,
  694|    654|        selection_candidate_count, selection_candidate_info);
  695|    654|    if (err) return (err);
  ------------------
  |  Branch (695:9): [True: 0, False: 654]
  ------------------
  696|    654|    k++;
  697|    654|  }
  698|    218|  return (0);
  699|    218|}
impd_drc_set_preselection:
  708|    597|    ia_selection_candidate_info_struct* selection_candidate_info) {
  709|    597|  WORD32 i, j, k, l, d, n, err;
  710|    597|  WORD32 downmix_id_match = 0;
  711|       |
  712|    597|  WORD32 selection_candidate_step_2_count;
  713|    597|  ia_selection_candidate_info_struct
  714|    597|      selection_candidate_info_step_2[SELECTION_CANDIDATE_COUNT_MAX];
  715|       |
  716|    597|  WORD32 num_downmix_id_requests =
  717|    597|      pstr_drc_sel_proc_params_struct->num_downmix_id_requests;
  718|    597|  WORD32* requested_dwnmix_id =
  719|    597|      pstr_drc_sel_proc_params_struct->requested_dwnmix_id;
  720|    597|  FLOAT32 output_peak_level_max =
  721|    597|      pstr_drc_sel_proc_params_struct->output_peak_level_max;
  722|    597|  WORD32 loudness_deviation_max =
  723|    597|      pstr_drc_sel_proc_params_struct->loudness_deviation_max;
  724|    597|  WORD32* drc_set_id_valid_flag = pstr_drc_uni_sel_proc->drc_set_id_valid_flag;
  725|    597|  WORD32* eq_set_id_valid_flag = pstr_drc_uni_sel_proc->eq_set_id_valid_flag;
  726|       |
  727|    597|  FLOAT32 output_peak_level_min = 1000.0f;
  728|    597|  FLOAT32 adjustment;
  729|    597|  WORD32 loudness_drc_set_id_requested;
  730|       |
  731|    597|  WORD32 num_compression_eq_count = 0;
  732|    597|  WORD32 num_compression_eq_id[16];
  733|       |
  734|    597|  WORD32 loudness_info_count = 0;
  735|    597|  WORD32 eq_set_id_loudness[16];
  736|    597|  FLOAT32 loudness_normalization_gain_db[16];
  737|    597|  FLOAT32 loudness[16];
  738|    597|  WORD32 peak_info_count;
  739|    597|  WORD32 eq_set_id_Peak[16];
  740|    597|  FLOAT32 signal_peak_level[16];
  741|    597|  WORD32 explicit_peak_information_present[16] = { 0 };
  742|       |
  743|    597|  ia_uni_drc_coeffs_struct* str_p_loc_drc_coefficients_uni_drc = NULL;
  744|    597|  ia_drc_instructions_struct* str_drc_instruction_str = NULL;
  745|       |
  746|    597|  impd_select_drc_coeff3(pstr_drc_config, &str_p_loc_drc_coefficients_uni_drc);
  747|    597|  if (str_p_loc_drc_coefficients_uni_drc == NULL) return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  |  Branch (747:7): [True: 0, False: 597]
  ------------------
  748|    597|  k = 0;
  749|  1.19k|  for (d = 0; d < num_downmix_id_requests; d++) {
  ------------------
  |  Branch (749:15): [True: 597, False: 594]
  ------------------
  750|    597|    err = impd_find_eq_set_no_compression(
  751|    597|        pstr_drc_config, requested_dwnmix_id[d], &num_compression_eq_count,
  752|    597|        num_compression_eq_id);
  753|    597|    if (err) return (err);
  ------------------
  |  Branch (753:9): [True: 0, False: 597]
  ------------------
  754|  3.54k|    for (i = 0; i < pstr_drc_config->drc_instructions_count_plus; i++) {
  ------------------
  |  Branch (754:17): [True: 2.95k, False: 594]
  ------------------
  755|  2.95k|      downmix_id_match = 0;
  756|  2.95k|      str_drc_instruction_str = &(pstr_drc_config->str_drc_instruction_str[i]);
  757|       |
  758|  5.90k|      for (j = 0; j < str_drc_instruction_str->dwnmix_id_count; j++) {
  ------------------
  |  Branch (758:19): [True: 2.95k, False: 2.95k]
  ------------------
  759|  2.95k|        if ((str_drc_instruction_str->downmix_id[j] ==
  ------------------
  |  Branch (759:13): [True: 2.95k, False: 0]
  ------------------
  760|  2.95k|             requested_dwnmix_id[d]) ||
  761|      0|            ((str_drc_instruction_str->downmix_id[j] == ID_FOR_BASE_LAYOUT) &&
  ------------------
  |  |  135|      0|#define ID_FOR_BASE_LAYOUT 0x0
  ------------------
  |  Branch (761:14): [True: 0, False: 0]
  ------------------
  762|      0|             (str_drc_instruction_str->drc_set_id > 0)) ||
  ------------------
  |  Branch (762:14): [True: 0, False: 0]
  ------------------
  763|  2.95k|            (str_drc_instruction_str->downmix_id[j] == ID_FOR_ANY_DOWNMIX)) {
  ------------------
  |  |  136|      0|#define ID_FOR_ANY_DOWNMIX 0x7F
  ------------------
  |  Branch (763:13): [True: 0, False: 0]
  ------------------
  764|  2.95k|          downmix_id_match = 1;
  765|  2.95k|        }
  766|  2.95k|      }
  767|  2.95k|      if (downmix_id_match == 1) {
  ------------------
  |  Branch (767:11): [True: 2.95k, False: 0]
  ------------------
  768|  2.95k|        if (pstr_drc_sel_proc_params_struct->dynamic_range_control_on == 1) {
  ------------------
  |  Branch (768:13): [True: 1.55k, False: 1.39k]
  ------------------
  769|  1.55k|          if ((str_drc_instruction_str->drc_set_effect != EFFECT_BIT_FADE) &&
  ------------------
  |  |   71|  1.55k|#define EFFECT_BIT_FADE 0x0200
  ------------------
  |  Branch (769:15): [True: 1.55k, False: 0]
  ------------------
  770|  1.55k|              (str_drc_instruction_str->drc_set_effect !=
  ------------------
  |  Branch (770:15): [True: 1.55k, False: 0]
  ------------------
  771|  1.55k|               EFFECT_BIT_DUCK_OTHER) &&
  ------------------
  |  |   72|  1.55k|#define EFFECT_BIT_DUCK_OTHER 0x0400
  ------------------
  772|  1.55k|              (str_drc_instruction_str->drc_set_effect !=
  ------------------
  |  Branch (772:15): [True: 1.55k, False: 0]
  ------------------
  773|  1.55k|               EFFECT_BIT_DUCK_SELF) &&
  ------------------
  |  |   73|  1.55k|#define EFFECT_BIT_DUCK_SELF 0x0800
  ------------------
  774|  1.55k|              (str_drc_instruction_str->drc_set_effect != 0 ||
  ------------------
  |  Branch (774:16): [True: 1.24k, False: 317]
  ------------------
  775|    317|               str_drc_instruction_str->drc_set_id < 0) &&
  ------------------
  |  Branch (775:16): [True: 317, False: 0]
  ------------------
  776|  1.55k|              (((str_drc_instruction_str->depends_on_drc_set_present == 0) &&
  ------------------
  |  Branch (776:17): [True: 1.55k, False: 0]
  ------------------
  777|  1.55k|                (str_drc_instruction_str->no_independent_use == 0)) ||
  ------------------
  |  Branch (777:17): [True: 1.55k, False: 0]
  ------------------
  778|  1.55k|               (str_drc_instruction_str->depends_on_drc_set_present == 1))) {
  ------------------
  |  Branch (778:16): [True: 0, False: 0]
  ------------------
  779|  1.55k|            WORD32 drc_is_permitted = 1;
  780|  1.55k|            if (str_drc_instruction_str->drc_set_id > 0) {
  ------------------
  |  Branch (780:17): [True: 1.24k, False: 317]
  ------------------
  781|  1.24k|              drc_is_permitted =
  782|  1.24k|                  drc_set_id_valid_flag[str_drc_instruction_str->drc_set_id];
  783|  1.24k|            }
  784|  1.55k|            if (drc_is_permitted == 1) {
  ------------------
  |  Branch (784:17): [True: 1.55k, False: 0]
  ------------------
  785|  1.55k|              err = impd_init_loudness_control(
  786|  1.55k|                  pstr_drc_sel_proc_params_struct, pstr_loudness_info,
  787|  1.55k|                  requested_dwnmix_id[d], str_drc_instruction_str->drc_set_id,
  788|       |
  789|  1.55k|                  num_compression_eq_count, num_compression_eq_id,
  790|  1.55k|                  &loudness_info_count, eq_set_id_loudness,
  791|  1.55k|                  loudness_normalization_gain_db, loudness);
  792|  1.55k|              if (err) return (err);
  ------------------
  |  Branch (792:19): [True: 0, False: 1.55k]
  ------------------
  793|       |
  794|  1.55k|              if (loudness_info_count > MAX_LOUDNESS_INFO_COUNT)
  ------------------
  |  |  191|  1.55k|#define MAX_LOUDNESS_INFO_COUNT (16)
  ------------------
  |  Branch (794:19): [True: 0, False: 1.55k]
  ------------------
  795|      0|                return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  796|       |
  797|  1.55k|              impd_signal_peak_level_info(
  798|  1.55k|                  pstr_drc_config, pstr_loudness_info, str_drc_instruction_str,
  799|  1.55k|                  requested_dwnmix_id[d],
  800|  1.55k|                  pstr_drc_sel_proc_params_struct->album_mode,
  801|  1.55k|                  num_compression_eq_count, num_compression_eq_id,
  802|  1.55k|                  &peak_info_count, eq_set_id_Peak, signal_peak_level,
  803|  1.55k|                  explicit_peak_information_present);
  804|       |
  805|  3.95k|              for (l = 0; l < loudness_info_count; l++) {
  ------------------
  |  Branch (805:27): [True: 2.40k, False: 1.55k]
  ------------------
  806|  2.40k|                WORD32 match_found_flag = 0;
  807|  2.40k|                WORD32 p;
  808|  2.40k|                if (k >= SELECTION_CANDIDATE_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |  123|  2.40k|#define SELECTION_CANDIDATE_COUNT_MAX 32
  ------------------
                              if (k >= SELECTION_CANDIDATE_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      3|#define UNEXPECTED_ERROR 2
  ------------------
  |  Branch (808:21): [True: 3, False: 2.39k]
  ------------------
  809|  2.39k|                selection_candidate_info[k].loudness_norm_db_gain_adjusted =
  810|  2.39k|                    loudness_normalization_gain_db[l];
  811|       |
  812|  2.39k|                selection_candidate_info[k]
  813|  2.39k|                    .loudness_norm_db_gain_adjusted = min(
  ------------------
  |  |  221|  2.39k|#define min(a, b) ((a) < (b) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (221:20): [True: 2.39k, False: 0]
  |  |  ------------------
  ------------------
  814|  2.39k|                    selection_candidate_info[k].loudness_norm_db_gain_adjusted,
  815|  2.39k|                    pstr_drc_sel_proc_params_struct->loudness_norm_gain_db_max);
  816|       |
  817|  2.39k|                if (loudness[l] != UNDEFINED_LOUDNESS_VALUE) {
  ------------------
  |  |  134|  2.39k|#define UNDEFINED_LOUDNESS_VALUE 1000.0f
  ------------------
  |  Branch (817:21): [True: 1.29k, False: 1.10k]
  ------------------
  818|  1.29k|                  selection_candidate_info[k].output_loudness =
  819|  1.29k|                      loudness[l] +
  820|  1.29k|                      selection_candidate_info[k]
  821|  1.29k|                          .loudness_norm_db_gain_adjusted;
  822|  1.29k|                } else {
  823|  1.10k|                  selection_candidate_info[k].output_loudness =
  824|  1.10k|                      UNDEFINED_LOUDNESS_VALUE;
  ------------------
  |  |  134|  1.10k|#define UNDEFINED_LOUDNESS_VALUE 1000.0f
  ------------------
  825|  1.10k|                }
  826|       |
  827|  2.47k|                for (p = 0; p < peak_info_count; p++) {
  ------------------
  |  Branch (827:29): [True: 2.43k, False: 42]
  ------------------
  828|  2.43k|                  if (eq_set_id_Peak[p] == eq_set_id_loudness[l]) {
  ------------------
  |  Branch (828:23): [True: 2.35k, False: 74]
  ------------------
  829|  2.35k|                    if (eq_set_id_valid_flag[eq_set_id_Peak[p]] == 1)
  ------------------
  |  Branch (829:25): [True: 2.35k, False: 0]
  ------------------
  830|       |
  831|  2.35k|                    {
  832|  2.35k|                      match_found_flag = 1;
  833|  2.35k|                      break;
  834|  2.35k|                    }
  835|  2.35k|                  }
  836|  2.43k|                }
  837|  2.39k|                if (match_found_flag == 1) {
  ------------------
  |  Branch (837:21): [True: 2.35k, False: 42]
  ------------------
  838|  2.35k|                  selection_candidate_info[k].output_peak_level =
  839|  2.35k|                      signal_peak_level[p] +
  840|  2.35k|                      selection_candidate_info[k]
  841|  2.35k|                          .loudness_norm_db_gain_adjusted;
  842|  2.35k|                } else {
  843|     42|                  selection_candidate_info[k].output_peak_level =
  844|     42|                      selection_candidate_info[k]
  845|     42|                          .loudness_norm_db_gain_adjusted;
  846|     42|                }
  847|  2.39k|                if ((str_drc_instruction_str->requires_eq == 1) &&
  ------------------
  |  Branch (847:21): [True: 0, False: 2.39k]
  ------------------
  848|      0|                    (eq_set_id_valid_flag[eq_set_id_loudness[l]] == 0))
  ------------------
  |  Branch (848:21): [True: 0, False: 0]
  ------------------
  849|      0|                  continue;
  850|  2.39k|                selection_candidate_info[k].drc_instructions_index = i;
  851|  2.39k|                selection_candidate_info[k].downmix_id_request_index = d;
  852|  2.39k|                selection_candidate_info[k].eq_set_id = eq_set_id_loudness[l];
  853|  2.39k|                if (explicit_peak_information_present[p] == 1) {
  ------------------
  |  Branch (853:21): [True: 521, False: 1.87k]
  ------------------
  854|    521|                  selection_candidate_info[k].selection_flags =
  855|    521|                      SELECTION_FLAG_EXPLICIT_PEAK_INFO_PRESENT;
  ------------------
  |  |   28|    521|#define SELECTION_FLAG_EXPLICIT_PEAK_INFO_PRESENT (1 << 1)
  ------------------
  856|  1.87k|                } else {
  857|  1.87k|                  selection_candidate_info[k].selection_flags = 0;
  858|  1.87k|                }
  859|  2.39k|                impd_mixing_level_info(
  860|  2.39k|                    pstr_drc_sel_proc_params_struct, pstr_loudness_info,
  861|  2.39k|                    requested_dwnmix_id[d], str_drc_instruction_str->drc_set_id,
  862|  2.39k|                    eq_set_id_loudness[l],
  863|  2.39k|                    &selection_candidate_info[k].mixing_level);
  864|  2.39k|                if (str_drc_instruction_str->drc_set_target_loudness_present &&
  ------------------
  |  Branch (864:21): [True: 0, False: 2.39k]
  ------------------
  865|      0|                    ((pstr_drc_sel_proc_params_struct
  ------------------
  |  Branch (865:23): [True: 0, False: 0]
  ------------------
  866|      0|                          ->loudness_normalization_on &&
  867|      0|                      str_drc_instruction_str
  ------------------
  |  Branch (867:23): [True: 0, False: 0]
  ------------------
  868|      0|                              ->drc_set_target_loudness_value_upper >=
  869|      0|                          pstr_drc_sel_proc_params_struct->target_loudness &&
  870|      0|                      str_drc_instruction_str
  ------------------
  |  Branch (870:23): [True: 0, False: 0]
  ------------------
  871|      0|                              ->drc_set_target_loudness_value_lower <
  872|      0|                          pstr_drc_sel_proc_params_struct->target_loudness) ||
  873|      0|                     !pstr_drc_sel_proc_params_struct
  ------------------
  |  Branch (873:22): [True: 0, False: 0]
  ------------------
  874|      0|                          ->loudness_normalization_on)) {
  875|      0|                  selection_candidate_info[k].selection_flags |=
  876|      0|                      SELECTION_FLAG_DRC_TARGET_LOUDNESS_MATCH;
  ------------------
  |  |   27|      0|#define SELECTION_FLAG_DRC_TARGET_LOUDNESS_MATCH (1 << 0)
  ------------------
  877|      0|                  if (!explicit_peak_information_present[p]) {
  ------------------
  |  Branch (877:23): [True: 0, False: 0]
  ------------------
  878|      0|                    if (pstr_drc_sel_proc_params_struct
  ------------------
  |  Branch (878:25): [True: 0, False: 0]
  ------------------
  879|      0|                            ->loudness_normalization_on) {
  880|      0|                      selection_candidate_info[k].output_peak_level =
  881|      0|                          pstr_drc_sel_proc_params_struct->target_loudness -
  882|      0|                          str_drc_instruction_str
  883|      0|                              ->drc_set_target_loudness_value_upper;
  884|      0|                    } else {
  885|      0|                      selection_candidate_info[k].output_peak_level = 0.0f;
  886|      0|                    }
  887|      0|                  }
  888|      0|                }
  889|  2.39k|                if ((selection_candidate_info[k].selection_flags &
  ------------------
  |  Branch (889:22): [True: 521, False: 1.87k]
  ------------------
  890|  2.39k|                         (SELECTION_FLAG_DRC_TARGET_LOUDNESS_MATCH |
  ------------------
  |  |   27|  2.39k|#define SELECTION_FLAG_DRC_TARGET_LOUDNESS_MATCH (1 << 0)
  ------------------
  891|  2.39k|                          SELECTION_FLAG_EXPLICIT_PEAK_INFO_PRESENT) ||
  ------------------
  |  |   28|  2.39k|#define SELECTION_FLAG_EXPLICIT_PEAK_INFO_PRESENT (1 << 1)
  ------------------
  892|  1.87k|                     !str_drc_instruction_str
  ------------------
  |  Branch (892:22): [True: 1.87k, False: 0]
  ------------------
  893|  2.39k|                          ->drc_set_target_loudness_present)) {
  894|  2.39k|                  k++;
  895|  2.39k|                }
  896|  2.39k|              }
  897|  1.55k|            }
  898|  1.55k|          }
  899|  1.55k|        } else {
  900|  1.39k|          if (str_drc_instruction_str->drc_set_id < 0) {
  ------------------
  |  Branch (900:15): [True: 279, False: 1.11k]
  ------------------
  901|    279|            err = impd_init_loudness_control(
  902|    279|                pstr_drc_sel_proc_params_struct, pstr_loudness_info,
  903|    279|                requested_dwnmix_id[d], str_drc_instruction_str->drc_set_id,
  904|    279|                num_compression_eq_count, num_compression_eq_id,
  905|    279|                &loudness_info_count, eq_set_id_loudness,
  906|    279|                loudness_normalization_gain_db, loudness);
  907|    279|            if (err) return (err);
  ------------------
  |  Branch (907:17): [True: 0, False: 279]
  ------------------
  908|       |
  909|    279|            impd_signal_peak_level_info(
  910|    279|                pstr_drc_config, pstr_loudness_info, str_drc_instruction_str,
  911|    279|                requested_dwnmix_id[d],
  912|    279|                pstr_drc_sel_proc_params_struct->album_mode,
  913|    279|                num_compression_eq_count, num_compression_eq_id,
  914|    279|                &peak_info_count, eq_set_id_Peak, signal_peak_level,
  915|    279|                explicit_peak_information_present);
  916|    594|            for (l = 0; l < loudness_info_count; l++) {
  ------------------
  |  Branch (916:25): [True: 315, False: 279]
  ------------------
  917|    315|              WORD32 match_found_flag = 0;
  918|    315|              WORD32 p;
  919|    315|              if (k >= SELECTION_CANDIDATE_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |  123|    315|#define SELECTION_CANDIDATE_COUNT_MAX 32
  ------------------
                            if (k >= SELECTION_CANDIDATE_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  |  Branch (919:19): [True: 0, False: 315]
  ------------------
  920|    326|              for (p = 0; p < peak_info_count; p++) {
  ------------------
  |  Branch (920:27): [True: 321, False: 5]
  ------------------
  921|    321|                if (eq_set_id_Peak[p] == eq_set_id_loudness[l]) {
  ------------------
  |  Branch (921:21): [True: 310, False: 11]
  ------------------
  922|    310|                  if (eq_set_id_valid_flag[eq_set_id_Peak[p]] == 1) {
  ------------------
  |  Branch (922:23): [True: 310, False: 0]
  ------------------
  923|    310|                    match_found_flag = 1;
  924|    310|                    break;
  925|    310|                  }
  926|    310|                }
  927|    321|              }
  928|    315|              if (match_found_flag == 1) {
  ------------------
  |  Branch (928:19): [True: 310, False: 5]
  ------------------
  929|    310|                adjustment = max(
  ------------------
  |  |  224|    310|#define max(a, b) ((a) > (b) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (224:20): [True: 27, False: 283]
  |  |  ------------------
  ------------------
  930|    310|                    0.0f,
  931|    310|                    signal_peak_level[p] + loudness_normalization_gain_db[l] -
  932|    310|                        pstr_drc_sel_proc_params_struct->output_peak_level_max);
  933|    310|                adjustment = min(adjustment, max(0.0f, loudness_deviation_max));
  ------------------
  |  |  221|    620|#define min(a, b) ((a) < (b) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (221:20): [True: 300, False: 10]
  |  |  |  Branch (221:27): [True: 0, False: 310]
  |  |  |  Branch (221:39): [True: 0, False: 10]
  |  |  ------------------
  ------------------
  934|    310|                selection_candidate_info[k].loudness_norm_db_gain_adjusted =
  935|    310|                    loudness_normalization_gain_db[l] - adjustment;
  936|       |
  937|    310|                selection_candidate_info[k]
  938|    310|                    .loudness_norm_db_gain_adjusted = min(
  ------------------
  |  |  221|    310|#define min(a, b) ((a) < (b) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (221:20): [True: 310, False: 0]
  |  |  ------------------
  ------------------
  939|    310|                    selection_candidate_info[k].loudness_norm_db_gain_adjusted,
  940|    310|                    pstr_drc_sel_proc_params_struct->loudness_norm_gain_db_max);
  941|       |
  942|    310|                selection_candidate_info[k].output_peak_level =
  943|    310|                    signal_peak_level[p] +
  944|    310|                    selection_candidate_info[k].loudness_norm_db_gain_adjusted;
  945|    310|                if (loudness[l] != UNDEFINED_LOUDNESS_VALUE) {
  ------------------
  |  |  134|    310|#define UNDEFINED_LOUDNESS_VALUE 1000.0f
  ------------------
  |  Branch (945:21): [True: 56, False: 254]
  ------------------
  946|     56|                  selection_candidate_info[k].output_loudness =
  947|     56|                      loudness[l] +
  948|     56|                      selection_candidate_info[k]
  949|     56|                          .loudness_norm_db_gain_adjusted;
  950|    254|                } else {
  951|    254|                  selection_candidate_info[k].output_loudness =
  952|    254|                      UNDEFINED_LOUDNESS_VALUE;
  ------------------
  |  |  134|    254|#define UNDEFINED_LOUDNESS_VALUE 1000.0f
  ------------------
  953|    254|                }
  954|    310|                selection_candidate_info[k].drc_instructions_index = i;
  955|    310|                selection_candidate_info[k].downmix_id_request_index = d;
  956|    310|                selection_candidate_info[k].eq_set_id = eq_set_id_loudness[l];
  957|    310|                if (explicit_peak_information_present[p] == 1) {
  ------------------
  |  Branch (957:21): [True: 45, False: 265]
  ------------------
  958|     45|                  selection_candidate_info[k].selection_flags =
  959|     45|                      SELECTION_FLAG_EXPLICIT_PEAK_INFO_PRESENT;
  ------------------
  |  |   28|     45|#define SELECTION_FLAG_EXPLICIT_PEAK_INFO_PRESENT (1 << 1)
  ------------------
  960|    265|                } else {
  961|    265|                  selection_candidate_info[k].selection_flags = 0;
  962|    265|                }
  963|    310|                impd_mixing_level_info(
  964|    310|                    pstr_drc_sel_proc_params_struct, pstr_loudness_info,
  965|    310|                    requested_dwnmix_id[d], str_drc_instruction_str->drc_set_id,
  966|    310|                    eq_set_id_loudness[l],
  967|    310|                    &selection_candidate_info[k].mixing_level);
  968|    310|                k++;
  969|    310|              }
  970|    315|            }
  971|    279|          }
  972|  1.39k|        }
  973|  2.95k|      }
  974|  2.95k|    }
  975|    597|  }
  976|    594|  if (k > SELECTION_CANDIDATE_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |  123|    594|#define SELECTION_CANDIDATE_COUNT_MAX 32
  ------------------
                if (k > SELECTION_CANDIDATE_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  |  Branch (976:7): [True: 0, False: 594]
  ------------------
  977|    594|  *selection_candidate_count = k;
  978|    594|  if (pstr_drc_sel_proc_params_struct->dynamic_range_control_on == 1) {
  ------------------
  |  Branch (978:7): [True: 315, False: 279]
  ------------------
  979|    315|    n = 0;
  980|  2.61k|    for (k = 0; k < *selection_candidate_count; k++) {
  ------------------
  |  Branch (980:17): [True: 2.30k, False: 315]
  ------------------
  981|  2.30k|      str_drc_instruction_str =
  982|  2.30k|          &(pstr_drc_config->str_drc_instruction_str
  983|  2.30k|                [selection_candidate_info[k].drc_instructions_index]);
  984|       |
  985|  2.30k|      if (pstr_drc_sel_proc_params_struct->eq_set_purpose_request !=
  ------------------
  |  Branch (985:11): [True: 0, False: 2.30k]
  ------------------
  986|  2.30k|          EQ_PURPOSE_EQ_OFF) {
  ------------------
  |  |  205|  2.30k|#define EQ_PURPOSE_EQ_OFF 0
  ------------------
  987|      0|        WORD32 matching_eq_set_count = 0;
  988|      0|        WORD32 matching_eq_instrucions_index[64];
  989|      0|        err = impd_match_eq_set(
  990|      0|            pstr_drc_config, requested_dwnmix_id[selection_candidate_info[k]
  991|      0|                                                     .downmix_id_request_index],
  992|      0|            str_drc_instruction_str->drc_set_id, eq_set_id_valid_flag,
  993|      0|            &matching_eq_set_count, matching_eq_instrucions_index);
  994|      0|        if (err) return (err);
  ------------------
  |  Branch (994:13): [True: 0, False: 0]
  ------------------
  995|      0|        for (j = 0; j < matching_eq_set_count; j++) {
  ------------------
  |  Branch (995:21): [True: 0, False: 0]
  ------------------
  996|      0|          if (n >= SELECTION_CANDIDATE_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |  123|      0|#define SELECTION_CANDIDATE_COUNT_MAX 32
  ------------------
                        if (n >= SELECTION_CANDIDATE_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  |  Branch (996:15): [True: 0, False: 0]
  ------------------
  997|      0|          memcpy(&selection_candidate_info_step_2[n],
  998|      0|                 &selection_candidate_info[k],
  999|      0|                 sizeof(ia_selection_candidate_info_struct));
 1000|      0|          selection_candidate_info_step_2[n].eq_set_id =
 1001|      0|              pstr_drc_config->str_drc_config_ext
 1002|      0|                  .str_eq_instructions[matching_eq_instrucions_index[j]]
 1003|      0|                  .eq_set_id;
 1004|      0|          n++;
 1005|      0|        }
 1006|      0|      }
 1007|  2.30k|      if (str_drc_instruction_str->requires_eq == 0) {
  ------------------
  |  Branch (1007:11): [True: 2.30k, False: 0]
  ------------------
 1008|  2.30k|        if (n >= SELECTION_CANDIDATE_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |  123|  2.30k|#define SELECTION_CANDIDATE_COUNT_MAX 32
  ------------------
                      if (n >= SELECTION_CANDIDATE_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  |  Branch (1008:13): [True: 0, False: 2.30k]
  ------------------
 1009|  2.30k|        memcpy(&selection_candidate_info_step_2[n],
 1010|  2.30k|               &selection_candidate_info[k],
 1011|  2.30k|               sizeof(ia_selection_candidate_info_struct));
 1012|  2.30k|        selection_candidate_info_step_2[n].eq_set_id = 0;
 1013|  2.30k|        n++;
 1014|  2.30k|      }
 1015|  2.30k|    }
 1016|    315|    if (n > SELECTION_CANDIDATE_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |  123|    315|#define SELECTION_CANDIDATE_COUNT_MAX 32
  ------------------
                  if (n > SELECTION_CANDIDATE_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  |  Branch (1016:9): [True: 0, False: 315]
  ------------------
 1017|    315|    memcpy(selection_candidate_info, selection_candidate_info_step_2,
 1018|    315|           n * sizeof(ia_selection_candidate_info_struct));
 1019|    315|    *selection_candidate_count = n;
 1020|    315|    n = 0;
 1021|  2.61k|    for (k = 0; k < *selection_candidate_count; k++) {
  ------------------
  |  Branch (1021:17): [True: 2.30k, False: 315]
  ------------------
 1022|  2.30k|      if ((selection_candidate_info[k].selection_flags &
  ------------------
  |  Branch (1022:11): [True: 0, False: 2.30k]
  ------------------
 1023|  2.30k|           SELECTION_FLAG_DRC_TARGET_LOUDNESS_MATCH) &&
  ------------------
  |  |   27|  2.30k|#define SELECTION_FLAG_DRC_TARGET_LOUDNESS_MATCH (1 << 0)
  ------------------
 1024|      0|          !(selection_candidate_info[k].selection_flags &
  ------------------
  |  Branch (1024:11): [True: 0, False: 0]
  ------------------
 1025|      0|            SELECTION_FLAG_EXPLICIT_PEAK_INFO_PRESENT)) {
  ------------------
  |  |   28|      0|#define SELECTION_FLAG_EXPLICIT_PEAK_INFO_PRESENT (1 << 1)
  ------------------
 1026|      0|        memcpy(&selection_candidate_info_step_2[n],
 1027|      0|               &selection_candidate_info[k],
 1028|      0|               sizeof(ia_selection_candidate_info_struct));
 1029|      0|        n++;
 1030|  2.30k|      } else {
 1031|  2.30k|        if (selection_candidate_info[k].output_peak_level <=
  ------------------
  |  Branch (1031:13): [True: 1.90k, False: 395]
  ------------------
 1032|  2.30k|            output_peak_level_max) {
 1033|  1.90k|          memcpy(&selection_candidate_info_step_2[n],
 1034|  1.90k|                 &selection_candidate_info[k],
 1035|  1.90k|                 sizeof(ia_selection_candidate_info_struct));
 1036|  1.90k|          n++;
 1037|  1.90k|        }
 1038|  2.30k|        if (selection_candidate_info[k].output_peak_level <
  ------------------
  |  Branch (1038:13): [True: 481, False: 1.82k]
  ------------------
 1039|  2.30k|            output_peak_level_min) {
 1040|    481|          output_peak_level_min = selection_candidate_info[k].output_peak_level;
 1041|    481|        }
 1042|  2.30k|      }
 1043|  2.30k|    }
 1044|    315|    selection_candidate_step_2_count = n;
 1045|    315|    if (selection_candidate_step_2_count == 0) {
  ------------------
  |  Branch (1045:9): [True: 25, False: 290]
  ------------------
 1046|     25|      n = 0;
 1047|    270|      for (k = 0; k < *selection_candidate_count; k++) {
  ------------------
  |  Branch (1047:19): [True: 245, False: 25]
  ------------------
 1048|    245|        if ((selection_candidate_info[k].selection_flags &
  ------------------
  |  Branch (1048:13): [True: 0, False: 245]
  ------------------
 1049|    245|             SELECTION_FLAG_DRC_TARGET_LOUDNESS_MATCH) &&
  ------------------
  |  |   27|    245|#define SELECTION_FLAG_DRC_TARGET_LOUDNESS_MATCH (1 << 0)
  ------------------
 1050|      0|            (selection_candidate_info[k].selection_flags &
  ------------------
  |  Branch (1050:13): [True: 0, False: 0]
  ------------------
 1051|      0|             SELECTION_FLAG_EXPLICIT_PEAK_INFO_PRESENT)) {
  ------------------
  |  |   28|      0|#define SELECTION_FLAG_EXPLICIT_PEAK_INFO_PRESENT (1 << 1)
  ------------------
 1052|      0|          memcpy(&selection_candidate_info_step_2[n],
 1053|      0|                 &selection_candidate_info[k],
 1054|      0|                 sizeof(ia_selection_candidate_info_struct));
 1055|      0|          n++;
 1056|      0|        }
 1057|    245|      }
 1058|     25|      selection_candidate_step_2_count = n;
 1059|     25|    }
 1060|    315|    if (selection_candidate_step_2_count == 0) {
  ------------------
  |  Branch (1060:9): [True: 25, False: 290]
  ------------------
 1061|     25|      n = 0;
 1062|    270|      for (k = 0; k < *selection_candidate_count; k++) {
  ------------------
  |  Branch (1062:19): [True: 245, False: 25]
  ------------------
 1063|    245|        if (selection_candidate_info_step_2[k].output_peak_level <
  ------------------
  |  Branch (1063:13): [True: 146, False: 99]
  ------------------
 1064|    245|            output_peak_level_min + 1.0f) {
 1065|    146|          memcpy(&selection_candidate_info_step_2[n],
 1066|    146|                 &selection_candidate_info[k],
 1067|    146|                 sizeof(ia_selection_candidate_info_struct));
 1068|    146|          adjustment =
 1069|    146|              max(0.0f, selection_candidate_info_step_2[n].output_peak_level -
  ------------------
  |  |  224|    146|#define max(a, b) ((a) > (b) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (224:20): [True: 0, False: 146]
  |  |  ------------------
  ------------------
 1070|    146|                            output_peak_level_max);
 1071|    146|          adjustment = min(adjustment, max(0.0f, loudness_deviation_max));
  ------------------
  |  |  221|    292|#define min(a, b) ((a) < (b) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (221:20): [True: 88, False: 58]
  |  |  |  Branch (221:27): [True: 0, False: 146]
  |  |  |  Branch (221:39): [True: 0, False: 58]
  |  |  ------------------
  ------------------
 1072|    146|          selection_candidate_info_step_2[n].loudness_norm_db_gain_adjusted -=
 1073|    146|              adjustment;
 1074|    146|          selection_candidate_info_step_2[n].output_peak_level -= adjustment;
 1075|    146|          selection_candidate_info_step_2[n].output_loudness -= adjustment;
 1076|    146|          n++;
 1077|    146|        }
 1078|    245|      }
 1079|     25|      selection_candidate_step_2_count = n;
 1080|     25|    }
 1081|       |
 1082|  2.36k|    for (n = 0; n < selection_candidate_step_2_count; n++) {
  ------------------
  |  Branch (1082:17): [True: 2.05k, False: 315]
  ------------------
 1083|  2.05k|      memcpy(&selection_candidate_info[n], &selection_candidate_info_step_2[n],
 1084|  2.05k|             sizeof(ia_selection_candidate_info_struct));
 1085|  2.05k|    }
 1086|    315|    *selection_candidate_count = selection_candidate_step_2_count;
 1087|    315|  }
 1088|       |
 1089|    594|  if (restrict_to_drc_with_album_loudness == 1) {
  ------------------
  |  Branch (1089:7): [True: 0, False: 594]
  ------------------
 1090|      0|    j = 0;
 1091|      0|    for (k = 0; k < *selection_candidate_count; k++) {
  ------------------
  |  Branch (1091:17): [True: 0, False: 0]
  ------------------
 1092|      0|      loudness_drc_set_id_requested =
 1093|      0|          max(0, pstr_drc_config
  ------------------
  |  |  224|      0|#define max(a, b) ((a) > (b) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (224:20): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1094|      0|                     ->str_drc_instruction_str[selection_candidate_info[k]
 1095|      0|                                                   .drc_instructions_index]
 1096|      0|                     .drc_set_id);
 1097|      0|      for (n = 0; n < pstr_loudness_info->loudness_info_album_count; n++) {
  ------------------
  |  Branch (1097:19): [True: 0, False: 0]
  ------------------
 1098|      0|        if (loudness_drc_set_id_requested ==
  ------------------
  |  Branch (1098:13): [True: 0, False: 0]
  ------------------
 1099|      0|            pstr_loudness_info->str_loudness_info_album[n].drc_set_id) {
 1100|      0|          if (j >= SELECTION_CANDIDATE_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |  123|      0|#define SELECTION_CANDIDATE_COUNT_MAX 32
  ------------------
                        if (j >= SELECTION_CANDIDATE_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  |  Branch (1100:15): [True: 0, False: 0]
  ------------------
 1101|      0|          memcpy(&selection_candidate_info[j], &selection_candidate_info[k],
 1102|      0|                 sizeof(ia_selection_candidate_info_struct));
 1103|      0|          j++;
 1104|      0|          break;
 1105|      0|        }
 1106|      0|      }
 1107|      0|    }
 1108|      0|    *selection_candidate_count = j;
 1109|      0|  }
 1110|    594|  return (0);
 1111|    594|}
impd_drc_set_final_selection:
 1118|    315|    WORD32* eq_set_id_valid_flag) {
 1119|    315|  WORD32 k, i, n, err;
 1120|    315|  WORD32 selection_candidate_step_2_count;
 1121|    315|  ia_selection_candidate_info_struct
 1122|    315|      selection_candidate_info_step_2[SELECTION_CANDIDATE_COUNT_MAX];
 1123|    315|  WORD32 drc_set_id_max;
 1124|    315|  FLOAT32 output_level_max;
 1125|    315|  FLOAT32 output_level_min;
 1126|    315|  WORD32 effect_count, effect_count_min;
 1127|    315|  WORD32 effect_types_request_table_size;
 1128|    315|  WORD32 drc_set_target_loudness_val_upper_min;
 1129|    315|  ia_drc_instructions_struct* str_drc_instruction_str;
 1130|    315|  ia_drc_instructions_struct* drc_instructions_dependent;
 1131|       |
 1132|    315|  if (pstr_drc_sel_proc_params_struct->eq_set_purpose_request > 0) {
  ------------------
  |  Branch (1132:7): [True: 0, False: 315]
  ------------------
 1133|      0|    WORD32 eq_purpose_requested =
 1134|      0|        pstr_drc_sel_proc_params_struct->eq_set_purpose_request;
 1135|       |
 1136|      0|    err = impd_match_eq_set_purpose(
 1137|      0|        pstr_drc_config, eq_purpose_requested, eq_set_id_valid_flag,
 1138|      0|        selection_candidate_count, selection_candidate_info,
 1139|      0|        selection_candidate_info_step_2);
 1140|      0|    if (err) return (err);
  ------------------
  |  Branch (1140:9): [True: 0, False: 0]
  ------------------
 1141|      0|  }
 1142|       |
 1143|    315|  output_level_min = 10000.0f;
 1144|    315|  k = 0;
 1145|  1.14k|  for (i = 0; i < *selection_candidate_count; i++) {
  ------------------
  |  Branch (1145:15): [True: 827, False: 315]
  ------------------
 1146|    827|    if (output_level_min >= selection_candidate_info[i].output_peak_level) {
  ------------------
  |  Branch (1146:9): [True: 594, False: 233]
  ------------------
 1147|    594|      if (output_level_min > selection_candidate_info[i].output_peak_level) {
  ------------------
  |  Branch (1147:11): [True: 389, False: 205]
  ------------------
 1148|    389|        output_level_min = selection_candidate_info[i].output_peak_level;
 1149|    389|        k = 0;
 1150|    389|      }
 1151|    594|      memcpy(&selection_candidate_info_step_2[k], &selection_candidate_info[i],
 1152|    594|             sizeof(ia_selection_candidate_info_struct));
 1153|    594|      k++;
 1154|    594|    }
 1155|    827|  }
 1156|    315|  selection_candidate_step_2_count = k;
 1157|       |
 1158|    315|  if (output_level_min <= 0.0f) {
  ------------------
  |  Branch (1158:7): [True: 308, False: 7]
  ------------------
 1159|    308|    selection_candidate_step_2_count = *selection_candidate_count;
 1160|    308|    k = 0;
 1161|  1.11k|    for (i = 0; i < selection_candidate_step_2_count; i++) {
  ------------------
  |  Branch (1161:17): [True: 805, False: 308]
  ------------------
 1162|    805|      if (selection_candidate_info[i].output_peak_level <= 0.0f) {
  ------------------
  |  Branch (1162:11): [True: 805, False: 0]
  ------------------
 1163|    805|        memcpy(&selection_candidate_info_step_2[k],
 1164|    805|               &selection_candidate_info[i],
 1165|    805|               sizeof(ia_selection_candidate_info_struct));
 1166|    805|        k++;
 1167|    805|      }
 1168|    805|    }
 1169|    308|    selection_candidate_step_2_count = k;
 1170|       |
 1171|    308|    k = 0;
 1172|  1.11k|    for (i = 0; i < selection_candidate_step_2_count; i++) {
  ------------------
  |  Branch (1172:17): [True: 805, False: 308]
  ------------------
 1173|    805|      str_drc_instruction_str =
 1174|    805|          &(pstr_drc_config->str_drc_instruction_str
 1175|    805|                [selection_candidate_info_step_2[i].drc_instructions_index]);
 1176|  1.61k|      for (n = 0; n < str_drc_instruction_str->dwnmix_id_count; n++) {
  ------------------
  |  Branch (1176:19): [True: 805, False: 805]
  ------------------
 1177|    805|        if (pstr_drc_sel_proc_params_struct->requested_dwnmix_id
  ------------------
  |  Branch (1177:13): [True: 805, False: 0]
  ------------------
 1178|    805|                [selection_candidate_info_step_2[i].downmix_id_request_index] ==
 1179|    805|            str_drc_instruction_str->downmix_id[n]) {
 1180|    805|          if (k >= SELECTION_CANDIDATE_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |  123|    805|#define SELECTION_CANDIDATE_COUNT_MAX 32
  ------------------
                        if (k >= SELECTION_CANDIDATE_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  |  Branch (1180:15): [True: 0, False: 805]
  ------------------
 1181|    805|          memcpy(&selection_candidate_info_step_2[k],
 1182|    805|                 &selection_candidate_info_step_2[i],
 1183|    805|                 sizeof(ia_selection_candidate_info_struct));
 1184|    805|          k++;
 1185|    805|        }
 1186|    805|      }
 1187|    805|    }
 1188|    308|    if (k > 0) {
  ------------------
  |  Branch (1188:9): [True: 308, False: 0]
  ------------------
 1189|    308|      selection_candidate_step_2_count = k;
 1190|    308|    }
 1191|       |
 1192|    308|    effect_types_request_table_size =
 1193|    308|        sizeof(effect_types_request_table) / sizeof(WORD32);
 1194|    308|    effect_count_min = 100;
 1195|    308|    k = 0;
 1196|  1.11k|    for (i = 0; i < selection_candidate_step_2_count; i++) {
  ------------------
  |  Branch (1196:17): [True: 805, False: 308]
  ------------------
 1197|    805|      str_drc_instruction_str =
 1198|    805|          &(pstr_drc_config->str_drc_instruction_str
 1199|    805|                [selection_candidate_info_step_2[i].drc_instructions_index]);
 1200|    805|      effect_count = 0;
 1201|    805|      if (str_drc_instruction_str->depends_on_drc_set_present == 1) {
  ------------------
  |  Branch (1201:11): [True: 0, False: 805]
  ------------------
 1202|      0|        err = impd_get_dependent_drc_instructions(pstr_drc_config,
 1203|      0|                                                  str_drc_instruction_str,
 1204|      0|                                                  &drc_instructions_dependent);
 1205|      0|        if (err) return (err);
  ------------------
  |  Branch (1205:13): [True: 0, False: 0]
  ------------------
 1206|       |
 1207|      0|        for (n = 0; n < effect_types_request_table_size; n++) {
  ------------------
  |  Branch (1207:21): [True: 0, False: 0]
  ------------------
 1208|      0|          if (effect_types_request_table[n] != EFFECT_BIT_GENERAL_COMPR) {
  ------------------
  |  |   67|      0|#define EFFECT_BIT_GENERAL_COMPR 0x0020
  ------------------
  |  Branch (1208:15): [True: 0, False: 0]
  ------------------
 1209|      0|            if (((str_drc_instruction_str->drc_set_effect &
  ------------------
  |  Branch (1209:17): [True: 0, False: 0]
  ------------------
 1210|      0|                  effect_types_request_table[n]) != 0x0) ||
 1211|      0|                ((drc_instructions_dependent->drc_set_effect &
  ------------------
  |  Branch (1211:17): [True: 0, False: 0]
  ------------------
 1212|      0|                  effect_types_request_table[n]) != 0x0)) {
 1213|      0|              effect_count++;
 1214|      0|            }
 1215|      0|          }
 1216|      0|        }
 1217|    805|      } else {
 1218|  7.24k|        for (n = 0; n < effect_types_request_table_size; n++) {
  ------------------
  |  Branch (1218:21): [True: 6.44k, False: 805]
  ------------------
 1219|  6.44k|          if (effect_types_request_table[n] != EFFECT_BIT_GENERAL_COMPR) {
  ------------------
  |  |   67|  6.44k|#define EFFECT_BIT_GENERAL_COMPR 0x0020
  ------------------
  |  Branch (1219:15): [True: 5.63k, False: 805]
  ------------------
 1220|  5.63k|            if ((str_drc_instruction_str->drc_set_effect &
  ------------------
  |  Branch (1220:17): [True: 440, False: 5.19k]
  ------------------
 1221|  5.63k|                 effect_types_request_table[n]) != 0x0) {
 1222|    440|              effect_count++;
 1223|    440|            }
 1224|  5.63k|          }
 1225|  6.44k|        }
 1226|    805|      }
 1227|    805|      if (effect_count_min >= effect_count) {
  ------------------
  |  Branch (1227:11): [True: 805, False: 0]
  ------------------
 1228|    805|        if (effect_count_min > effect_count) {
  ------------------
  |  Branch (1228:13): [True: 359, False: 446]
  ------------------
 1229|    359|          effect_count_min = effect_count;
 1230|    359|          k = 0;
 1231|    359|        }
 1232|    805|        memcpy(&selection_candidate_info_step_2[k],
 1233|    805|               &selection_candidate_info_step_2[i],
 1234|    805|               sizeof(ia_selection_candidate_info_struct));
 1235|    805|        k++;
 1236|    805|      }
 1237|    805|    }
 1238|    308|    selection_candidate_step_2_count = k;
 1239|       |
 1240|    308|    drc_set_target_loudness_val_upper_min = 100;
 1241|    308|    k = 0;
 1242|    845|    for (i = 0; i < selection_candidate_step_2_count; i++) {
  ------------------
  |  Branch (1242:17): [True: 537, False: 308]
  ------------------
 1243|    537|      if (selection_candidate_info_step_2[i].selection_flags &
  ------------------
  |  Branch (1243:11): [True: 0, False: 537]
  ------------------
 1244|    537|          SELECTION_FLAG_DRC_TARGET_LOUDNESS_MATCH) {
  ------------------
  |  |   27|    537|#define SELECTION_FLAG_DRC_TARGET_LOUDNESS_MATCH (1 << 0)
  ------------------
 1245|      0|        k++;
 1246|      0|      }
 1247|    537|    }
 1248|    308|    if (k != 0 && k != selection_candidate_step_2_count) {
  ------------------
  |  Branch (1248:9): [True: 0, False: 308]
  |  Branch (1248:19): [True: 0, False: 0]
  ------------------
 1249|      0|      k = 0;
 1250|      0|      for (i = 0; i < selection_candidate_step_2_count; i++) {
  ------------------
  |  Branch (1250:19): [True: 0, False: 0]
  ------------------
 1251|      0|        if (!(selection_candidate_info_step_2[i].selection_flags &
  ------------------
  |  Branch (1251:13): [True: 0, False: 0]
  ------------------
 1252|      0|              SELECTION_FLAG_DRC_TARGET_LOUDNESS_MATCH)) {
  ------------------
  |  |   27|      0|#define SELECTION_FLAG_DRC_TARGET_LOUDNESS_MATCH (1 << 0)
  ------------------
 1253|      0|          memcpy(&selection_candidate_info_step_2[k],
 1254|      0|                 &selection_candidate_info_step_2[i],
 1255|      0|                 sizeof(ia_selection_candidate_info_struct));
 1256|      0|          k++;
 1257|      0|        }
 1258|      0|      }
 1259|      0|      selection_candidate_step_2_count = k;
 1260|    308|    } else if (k == selection_candidate_step_2_count) {
  ------------------
  |  Branch (1260:16): [True: 0, False: 308]
  ------------------
 1261|      0|      k = 0;
 1262|      0|      for (i = 0; i < selection_candidate_step_2_count; i++) {
  ------------------
  |  Branch (1262:19): [True: 0, False: 0]
  ------------------
 1263|      0|        str_drc_instruction_str =
 1264|      0|            &(pstr_drc_config->str_drc_instruction_str
 1265|      0|                  [selection_candidate_info_step_2[i].drc_instructions_index]);
 1266|      0|        if (str_drc_instruction_str->drc_set_target_loudness_present != 1) {
  ------------------
  |  Branch (1266:13): [True: 0, False: 0]
  ------------------
 1267|      0|          return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
 1268|      0|        }
 1269|      0|        if (drc_set_target_loudness_val_upper_min >=
  ------------------
  |  Branch (1269:13): [True: 0, False: 0]
  ------------------
 1270|      0|            str_drc_instruction_str->drc_set_target_loudness_value_upper) {
 1271|      0|          if (drc_set_target_loudness_val_upper_min >
  ------------------
  |  Branch (1271:15): [True: 0, False: 0]
  ------------------
 1272|      0|              str_drc_instruction_str->drc_set_target_loudness_value_upper) {
 1273|      0|            drc_set_target_loudness_val_upper_min =
 1274|      0|                str_drc_instruction_str->drc_set_target_loudness_value_upper;
 1275|      0|            k = 0;
 1276|      0|          }
 1277|      0|          memcpy(&selection_candidate_info_step_2[k],
 1278|      0|                 &selection_candidate_info_step_2[i],
 1279|      0|                 sizeof(ia_selection_candidate_info_struct));
 1280|      0|          k++;
 1281|      0|        }
 1282|      0|      }
 1283|      0|      selection_candidate_step_2_count = k;
 1284|      0|    }
 1285|       |
 1286|    308|    k = 0;
 1287|    845|    for (i = 0; i < selection_candidate_step_2_count; i++) {
  ------------------
  |  Branch (1287:17): [True: 537, False: 308]
  ------------------
 1288|    537|      str_drc_instruction_str =
 1289|    537|          &(pstr_drc_config->str_drc_instruction_str
 1290|    537|                [selection_candidate_info_step_2[i].drc_instructions_index]);
 1291|    537|      if (str_drc_instruction_str->drc_set_target_loudness_present &&
  ------------------
  |  Branch (1291:11): [True: 0, False: 537]
  ------------------
 1292|      0|          pstr_drc_sel_proc_params_struct->loudness_normalization_on &&
  ------------------
  |  Branch (1292:11): [True: 0, False: 0]
  ------------------
 1293|      0|          str_drc_instruction_str->drc_set_target_loudness_value_upper >=
  ------------------
  |  Branch (1293:11): [True: 0, False: 0]
  ------------------
 1294|      0|              pstr_drc_sel_proc_params_struct->target_loudness &&
 1295|      0|          str_drc_instruction_str->drc_set_target_loudness_value_lower <
  ------------------
  |  Branch (1295:11): [True: 0, False: 0]
  ------------------
 1296|      0|              pstr_drc_sel_proc_params_struct->target_loudness) {
 1297|      0|        k++;
 1298|      0|      }
 1299|    537|    }
 1300|    308|    if (k != 0 && k != selection_candidate_step_2_count) {
  ------------------
  |  Branch (1300:9): [True: 0, False: 308]
  |  Branch (1300:19): [True: 0, False: 0]
  ------------------
 1301|      0|      k = 0;
 1302|      0|      for (i = 0; i < selection_candidate_step_2_count; i++) {
  ------------------
  |  Branch (1302:19): [True: 0, False: 0]
  ------------------
 1303|      0|        str_drc_instruction_str =
 1304|      0|            &(pstr_drc_config->str_drc_instruction_str
 1305|      0|                  [selection_candidate_info_step_2[i].drc_instructions_index]);
 1306|      0|        if (str_drc_instruction_str->drc_set_target_loudness_present &&
  ------------------
  |  Branch (1306:13): [True: 0, False: 0]
  ------------------
 1307|      0|            pstr_drc_sel_proc_params_struct->loudness_normalization_on &&
  ------------------
  |  Branch (1307:13): [True: 0, False: 0]
  ------------------
 1308|      0|            str_drc_instruction_str->drc_set_target_loudness_value_upper >=
  ------------------
  |  Branch (1308:13): [True: 0, False: 0]
  ------------------
 1309|      0|                pstr_drc_sel_proc_params_struct->target_loudness &&
 1310|      0|            str_drc_instruction_str->drc_set_target_loudness_value_lower <
  ------------------
  |  Branch (1310:13): [True: 0, False: 0]
  ------------------
 1311|      0|                pstr_drc_sel_proc_params_struct->target_loudness) {
 1312|      0|          memcpy(&selection_candidate_info_step_2[k],
 1313|      0|                 &selection_candidate_info_step_2[i],
 1314|      0|                 sizeof(ia_selection_candidate_info_struct));
 1315|      0|          k++;
 1316|      0|        }
 1317|      0|      }
 1318|      0|      selection_candidate_step_2_count = k;
 1319|      0|      drc_set_target_loudness_val_upper_min = 100;
 1320|      0|      k = 0;
 1321|      0|      for (i = 0; i < selection_candidate_step_2_count; i++) {
  ------------------
  |  Branch (1321:19): [True: 0, False: 0]
  ------------------
 1322|      0|        str_drc_instruction_str =
 1323|      0|            &(pstr_drc_config->str_drc_instruction_str
 1324|      0|                  [selection_candidate_info_step_2[i].drc_instructions_index]);
 1325|      0|        if (str_drc_instruction_str->drc_set_target_loudness_present != 1) {
  ------------------
  |  Branch (1325:13): [True: 0, False: 0]
  ------------------
 1326|      0|          return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
 1327|      0|        }
 1328|      0|        if (drc_set_target_loudness_val_upper_min >=
  ------------------
  |  Branch (1328:13): [True: 0, False: 0]
  ------------------
 1329|      0|            str_drc_instruction_str->drc_set_target_loudness_value_upper) {
 1330|      0|          if (drc_set_target_loudness_val_upper_min >
  ------------------
  |  Branch (1330:15): [True: 0, False: 0]
  ------------------
 1331|      0|              str_drc_instruction_str->drc_set_target_loudness_value_upper) {
 1332|      0|            drc_set_target_loudness_val_upper_min =
 1333|      0|                str_drc_instruction_str->drc_set_target_loudness_value_upper;
 1334|      0|            k = 0;
 1335|      0|          }
 1336|      0|          memcpy(&selection_candidate_info_step_2[k],
 1337|      0|                 &selection_candidate_info_step_2[i],
 1338|      0|                 sizeof(ia_selection_candidate_info_struct));
 1339|      0|          k++;
 1340|      0|        }
 1341|      0|      }
 1342|      0|      selection_candidate_step_2_count = k;
 1343|    308|    } else if (k == selection_candidate_step_2_count) {
  ------------------
  |  Branch (1343:16): [True: 0, False: 308]
  ------------------
 1344|      0|      drc_set_target_loudness_val_upper_min = 100;
 1345|      0|      k = 0;
 1346|      0|      for (i = 0; i < selection_candidate_step_2_count; i++) {
  ------------------
  |  Branch (1346:19): [True: 0, False: 0]
  ------------------
 1347|      0|        str_drc_instruction_str =
 1348|      0|            &(pstr_drc_config->str_drc_instruction_str
 1349|      0|                  [selection_candidate_info_step_2[i].drc_instructions_index]);
 1350|      0|        if (str_drc_instruction_str->drc_set_target_loudness_present != 1) {
  ------------------
  |  Branch (1350:13): [True: 0, False: 0]
  ------------------
 1351|      0|          return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
 1352|      0|        }
 1353|      0|        if (drc_set_target_loudness_val_upper_min >=
  ------------------
  |  Branch (1353:13): [True: 0, False: 0]
  ------------------
 1354|      0|            str_drc_instruction_str->drc_set_target_loudness_value_upper) {
 1355|      0|          if (drc_set_target_loudness_val_upper_min >
  ------------------
  |  Branch (1355:15): [True: 0, False: 0]
  ------------------
 1356|      0|              str_drc_instruction_str->drc_set_target_loudness_value_upper) {
 1357|      0|            drc_set_target_loudness_val_upper_min =
 1358|      0|                str_drc_instruction_str->drc_set_target_loudness_value_upper;
 1359|      0|            k = 0;
 1360|      0|          }
 1361|      0|          memcpy(&selection_candidate_info_step_2[k],
 1362|      0|                 &selection_candidate_info_step_2[i],
 1363|      0|                 sizeof(ia_selection_candidate_info_struct));
 1364|      0|          k++;
 1365|      0|        }
 1366|      0|      }
 1367|      0|      selection_candidate_step_2_count = k;
 1368|      0|    }
 1369|    308|    k = 0;
 1370|    308|    output_level_max = -1000.0f;
 1371|    845|    for (i = 0; i < selection_candidate_step_2_count; i++) {
  ------------------
  |  Branch (1371:17): [True: 537, False: 308]
  ------------------
 1372|    537|      if ((selection_candidate_info_step_2[i].output_peak_level <= 0.0f) &&
  ------------------
  |  Branch (1372:11): [True: 537, False: 0]
  ------------------
 1373|    537|          (output_level_max <=
  ------------------
  |  Branch (1373:11): [True: 414, False: 123]
  ------------------
 1374|    537|           selection_candidate_info_step_2[i].output_peak_level)) {
 1375|    414|        if (output_level_max <
  ------------------
  |  Branch (1375:13): [True: 329, False: 85]
  ------------------
 1376|    414|            selection_candidate_info_step_2[i].output_peak_level) {
 1377|    329|          output_level_max =
 1378|    329|              selection_candidate_info_step_2[i].output_peak_level;
 1379|    329|          k = 0;
 1380|    329|        }
 1381|    414|        memcpy(&selection_candidate_info_step_2[k],
 1382|    414|               &selection_candidate_info_step_2[i],
 1383|    414|               sizeof(ia_selection_candidate_info_struct));
 1384|    414|        k++;
 1385|    414|        output_level_max = selection_candidate_info_step_2[i].output_peak_level;
 1386|    414|      }
 1387|    537|    }
 1388|    308|    selection_candidate_step_2_count = k;
 1389|    308|  }
 1390|       |
 1391|    315|  drc_set_id_max = -1000;
 1392|    723|  for (i = 0; i < selection_candidate_step_2_count; i++) {
  ------------------
  |  Branch (1392:15): [True: 408, False: 315]
  ------------------
 1393|    408|    str_drc_instruction_str =
 1394|    408|        &(pstr_drc_config->str_drc_instruction_str
 1395|    408|              [selection_candidate_info_step_2[i].drc_instructions_index]);
 1396|    408|    if (drc_set_id_max < str_drc_instruction_str->drc_set_id) {
  ------------------
  |  Branch (1396:9): [True: 318, False: 90]
  ------------------
 1397|    318|      drc_set_id_max = str_drc_instruction_str->drc_set_id;
 1398|    318|      memcpy(&selection_candidate_info_step_2[0],
 1399|    318|             &selection_candidate_info_step_2[i],
 1400|    318|             sizeof(ia_selection_candidate_info_struct));
 1401|    318|    }
 1402|    408|  }
 1403|    315|  memcpy(&selection_candidate_info[0], &selection_candidate_info_step_2[0],
 1404|    315|         sizeof(ia_selection_candidate_info_struct));
 1405|    315|  *selection_candidate_count = 1;
 1406|       |
 1407|    315|  return 0;
 1408|    315|}
impd_select_drc_set:
 1412|    597|                           WORD32* eq_set_id_selected, WORD32* loud_eq_id_sel) {
 1413|    597|  WORD32 i, err;
 1414|       |
 1415|    597|  ia_drc_sel_proc_params_struct* pstr_drc_sel_proc_params_struct =
 1416|    597|      &pstr_drc_uni_sel_proc->uni_drc_sel_proc_params;
 1417|    597|  ia_drc_config* pstr_drc_config = &pstr_drc_uni_sel_proc->drc_config;
 1418|    597|  ia_drc_loudness_info_set_struct* pstr_loudness_info =
 1419|    597|      &pstr_drc_uni_sel_proc->loudness_info_set;
 1420|       |
 1421|    597|  WORD32 selection_candidate_count = 0;
 1422|    597|  WORD32 restrict_to_drc_with_album_loudness = 0;
 1423|    597|  ia_selection_candidate_info_struct
 1424|    597|      selection_candidate_info[SELECTION_CANDIDATE_COUNT_MAX];
 1425|       |
 1426|       |  //    WORD32 selected_eq_set_count = 0;
 1427|       |
 1428|    597|  if (pstr_drc_sel_proc_params_struct->album_mode == 1) {
  ------------------
  |  Branch (1428:7): [True: 0, False: 597]
  ------------------
 1429|      0|    restrict_to_drc_with_album_loudness = 1;
 1430|      0|  }
 1431|       |
 1432|  1.18k|  while (!selection_candidate_count) {
  ------------------
  |  Branch (1432:10): [True: 597, False: 590]
  ------------------
 1433|    597|    err = impd_drc_set_preselection(
 1434|    597|        pstr_drc_sel_proc_params_struct, pstr_drc_config, pstr_loudness_info,
 1435|    597|        restrict_to_drc_with_album_loudness, pstr_drc_uni_sel_proc,
 1436|    597|        &selection_candidate_count, selection_candidate_info);
 1437|    597|    if (err) return err;
  ------------------
  |  Branch (1437:9): [True: 3, False: 594]
  ------------------
 1438|       |
 1439|    594|    if (selection_candidate_count == 0) {
  ------------------
  |  Branch (1439:9): [True: 4, False: 590]
  ------------------
 1440|      4|      if (restrict_to_drc_with_album_loudness == 1) {
  ------------------
  |  Branch (1440:11): [True: 0, False: 4]
  ------------------
 1441|      0|        restrict_to_drc_with_album_loudness = 0;
 1442|      0|        continue;
 1443|      4|      } else {
 1444|      4|        return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      4|#define UNEXPECTED_ERROR 2
  ------------------
 1445|      4|      }
 1446|      4|    }
 1447|       |
 1448|    590|    err = impd_validate_requested_drc_feature(pstr_drc_sel_proc_params_struct);
 1449|    590|    if (err) return (err);
  ------------------
  |  Branch (1449:9): [True: 0, False: 590]
  ------------------
 1450|       |
 1451|    590|    if (pstr_drc_sel_proc_params_struct->dynamic_range_control_on == 1) {
  ------------------
  |  Branch (1451:9): [True: 315, False: 275]
  ------------------
 1452|    315|      if (pstr_drc_sel_proc_params_struct->num_drc_feature_requests > 0) {
  ------------------
  |  Branch (1452:11): [True: 218, False: 97]
  ------------------
 1453|    218|        for (i = 0;
 1454|    872|             i < pstr_drc_sel_proc_params_struct->num_drc_feature_requests;
  ------------------
  |  Branch (1454:14): [True: 654, False: 218]
  ------------------
 1455|    654|             i++) {
 1456|    654|          switch (pstr_drc_sel_proc_params_struct->drc_feature_req_type[i]) {
 1457|    218|            case MATCH_EFFECT_TYPE:
  ------------------
  |  |   38|    218|#define MATCH_EFFECT_TYPE 0
  ------------------
  |  Branch (1457:13): [True: 218, False: 436]
  ------------------
 1458|    218|              err = impd_match_effect_types(
 1459|    218|                  pstr_drc_config,
 1460|    218|                  pstr_drc_sel_proc_params_struct->requested_num_drc_effects[i],
 1461|    218|                  pstr_drc_sel_proc_params_struct
 1462|    218|                      ->desired_num_drc_effects_of_requested[i],
 1463|    218|                  pstr_drc_sel_proc_params_struct->requested_drc_effect_type[i],
 1464|    218|                  &selection_candidate_count, selection_candidate_info);
 1465|    218|              if (err) return (err);
  ------------------
  |  Branch (1465:19): [True: 0, False: 218]
  ------------------
 1466|    218|              break;
 1467|    218|            case MATCH_DYNAMIC_RANGE:
  ------------------
  |  |   39|    218|#define MATCH_DYNAMIC_RANGE 1
  ------------------
  |  Branch (1467:13): [True: 218, False: 436]
  ------------------
 1468|    218|              err = impd_match_dynamic_range(
 1469|    218|                  pstr_drc_config, pstr_loudness_info,
 1470|    218|                  pstr_drc_sel_proc_params_struct, i,
 1471|    218|                  &selection_candidate_count, selection_candidate_info);
 1472|    218|              if (err) return (err);
  ------------------
  |  Branch (1472:19): [True: 0, False: 218]
  ------------------
 1473|    218|              break;
 1474|    218|            case MATCH_DRC_CHARACTERISTIC:
  ------------------
  |  |   40|    218|#define MATCH_DRC_CHARACTERISTIC 2
  ------------------
  |  Branch (1474:13): [True: 218, False: 436]
  ------------------
 1475|    218|              err = impd_match_drc_characteristic(
 1476|    218|                  pstr_drc_config, pstr_drc_sel_proc_params_struct
 1477|    218|                                       ->requested_drc_characteristic[i],
 1478|    218|                  &selection_candidate_count, selection_candidate_info);
 1479|    218|              if (err) return (err);
  ------------------
  |  Branch (1479:19): [True: 0, False: 218]
  ------------------
 1480|    218|              break;
 1481|       |
 1482|    218|            default:
  ------------------
  |  Branch (1482:13): [True: 0, False: 654]
  ------------------
 1483|      0|              return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
 1484|      0|              break;
 1485|    654|          }
 1486|    654|        }
 1487|    218|      } else {
 1488|     97|        WORD32 match_found_flag = 0;
 1489|       |
 1490|     97|        err = impd_select_drcs_without_compr_effects(
 1491|     97|            pstr_drc_config, &match_found_flag, &selection_candidate_count,
 1492|     97|            selection_candidate_info);
 1493|     97|        if (err) return (err);
  ------------------
  |  Branch (1493:13): [True: 0, False: 97]
  ------------------
 1494|       |
 1495|     97|        if (match_found_flag == 0) {
  ------------------
  |  Branch (1495:13): [True: 18, False: 79]
  ------------------
 1496|     18|          WORD32 requested_num_drc_effects = 5;
 1497|     18|          WORD32 desired_num_drc_effects_of_requested = 1;
 1498|     18|          WORD32 requested_drc_effect_type[5] = {
 1499|     18|              EFFECT_TYPE_REQUESTED_GENERAL_COMPR, EFFECT_TYPE_REQUESTED_NIGHT,
  ------------------
  |  |   33|     18|#define EFFECT_TYPE_REQUESTED_GENERAL_COMPR 6
  ------------------
                            EFFECT_TYPE_REQUESTED_GENERAL_COMPR, EFFECT_TYPE_REQUESTED_NIGHT,
  ------------------
  |  |   28|     18|#define EFFECT_TYPE_REQUESTED_NIGHT 1
  ------------------
 1500|     18|              EFFECT_TYPE_REQUESTED_NOISY, EFFECT_TYPE_REQUESTED_LIMITED,
  ------------------
  |  |   29|     18|#define EFFECT_TYPE_REQUESTED_NOISY 2
  ------------------
                            EFFECT_TYPE_REQUESTED_NOISY, EFFECT_TYPE_REQUESTED_LIMITED,
  ------------------
  |  |   30|     18|#define EFFECT_TYPE_REQUESTED_LIMITED 3
  ------------------
 1501|     18|              EFFECT_TYPE_REQUESTED_LOWLEVEL};
  ------------------
  |  |   31|     18|#define EFFECT_TYPE_REQUESTED_LOWLEVEL 4
  ------------------
 1502|       |
 1503|     18|          err = impd_match_effect_types(
 1504|     18|              pstr_drc_config, requested_num_drc_effects,
 1505|     18|              desired_num_drc_effects_of_requested, requested_drc_effect_type,
 1506|     18|              &selection_candidate_count, selection_candidate_info);
 1507|     18|          if (err) return (err);
  ------------------
  |  Branch (1507:15): [True: 0, False: 18]
  ------------------
 1508|     18|        }
 1509|     97|      }
 1510|       |
 1511|    315|      if (selection_candidate_count > 0) {
  ------------------
  |  Branch (1511:11): [True: 315, False: 0]
  ------------------
 1512|    315|        err = impd_drc_set_final_selection(
 1513|    315|            pstr_drc_config, pstr_drc_sel_proc_params_struct,
 1514|    315|            &selection_candidate_count, selection_candidate_info,
 1515|    315|            pstr_drc_uni_sel_proc->eq_set_id_valid_flag);
 1516|    315|        if (err) return (err);
  ------------------
  |  Branch (1516:13): [True: 0, False: 315]
  ------------------
 1517|    315|      } else {
 1518|      0|        selection_candidate_count = 0;
 1519|      0|        return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
 1520|      0|      }
 1521|    315|    }
 1522|       |
 1523|    590|    if (selection_candidate_count == 0) {
  ------------------
  |  Branch (1523:9): [True: 0, False: 590]
  ------------------
 1524|      0|      if (restrict_to_drc_with_album_loudness == 1) {
  ------------------
  |  Branch (1524:11): [True: 0, False: 0]
  ------------------
 1525|      0|        restrict_to_drc_with_album_loudness = 0;
 1526|      0|      } else {
 1527|      0|        return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
 1528|      0|      }
 1529|      0|    }
 1530|    590|  }
 1531|    590|  *drc_set_id_selected =
 1532|    590|      pstr_drc_config
 1533|    590|          ->str_drc_instruction_str[selection_candidate_info[0]
 1534|    590|                                        .drc_instructions_index]
 1535|    590|          .drc_set_id;
 1536|    590|  *eq_set_id_selected = selection_candidate_info[0].eq_set_id;
 1537|       |
 1538|    590|  err = impd_select_loud_eq(
 1539|    590|      pstr_drc_config,
 1540|    590|      pstr_drc_sel_proc_params_struct->requested_dwnmix_id
 1541|    590|          [selection_candidate_info[0].downmix_id_request_index],
 1542|    590|      *drc_set_id_selected, *eq_set_id_selected, loud_eq_id_sel);
 1543|    590|  if (err) return (err);
  ------------------
  |  Branch (1543:7): [True: 0, False: 590]
  ------------------
 1544|    590|  if (selection_candidate_count > 0) {
  ------------------
  |  Branch (1544:7): [True: 590, False: 0]
  ------------------
 1545|    590|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_output
 1546|    590|        .loudness_normalization_gain_db =
 1547|    590|        selection_candidate_info[0].loudness_norm_db_gain_adjusted;
 1548|    590|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.output_peak_level_db =
 1549|    590|        selection_candidate_info[0].output_peak_level;
 1550|    590|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.output_loudness =
 1551|    590|        selection_candidate_info[0].output_loudness;
 1552|    590|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.active_downmix_id =
 1553|    590|        pstr_drc_sel_proc_params_struct->requested_dwnmix_id
 1554|    590|            [selection_candidate_info[0].downmix_id_request_index];
 1555|    590|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.mixing_level =
 1556|    590|        selection_candidate_info[0].mixing_level;
 1557|    590|  }
 1558|    590|  return (0);
 1559|    590|}

impd_drc_sel_proc_init_dflt:
   31|  1.54k|    ia_drc_sel_pro_struct* pstr_drc_uni_sel_proc) {
   32|  1.54k|  if (pstr_drc_uni_sel_proc != NULL) {
  ------------------
  |  Branch (32:7): [True: 1.54k, False: 0]
  ------------------
   33|  1.54k|    pstr_drc_uni_sel_proc->first_frame = 0;
   34|       |
   35|  1.54k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.base_channel_count = -1;
   36|  1.54k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.base_layout = -1;
   37|  1.54k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.target_config_request_type =
   38|  1.54k|        0;
   39|  1.54k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.num_downmix_id_requests = 0;
   40|       |
   41|  1.54k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.album_mode = 0;
   42|       |
   43|  1.54k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.peak_limiter = 0;
   44|       |
   45|  1.54k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.loudness_normalization_on =
   46|  1.54k|        0;
   47|  1.54k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.target_loudness = -24.0f;
   48|       |
   49|  1.54k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.loudness_deviation_max =
   50|  1.54k|        LOUDNESS_DEVIATION_MAX_DEFAULT;
  ------------------
  |  |  103|  1.54k|#define LOUDNESS_DEVIATION_MAX_DEFAULT 63
  ------------------
   51|       |
   52|  1.54k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.loudness_measurement_method =
   53|  1.54k|        USER_METHOD_DEFINITION_DEFAULT;
  ------------------
  |  |   84|  1.54k|#define USER_METHOD_DEFINITION_DEFAULT 0
  ------------------
   54|  1.54k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.loudness_measurement_system =
   55|  1.54k|        USER_MEASUREMENT_SYSTEM_DEFAULT;
  ------------------
  |  |   88|  1.54k|#define USER_MEASUREMENT_SYSTEM_DEFAULT 0
  ------------------
   56|  1.54k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
   57|  1.54k|        .loudness_measurement_pre_proc = USER_LOUDNESS_PREPROCESSING_DEFAULT;
  ------------------
  |  |   99|  1.54k|#define USER_LOUDNESS_PREPROCESSING_DEFAULT 0
  ------------------
   58|  1.54k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.device_cut_off_frequency =
   59|  1.54k|        500;
   60|  1.54k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.loudness_norm_gain_db_max =
   61|  1.54k|        LOUDNESS_NORMALIZATION_GAIN_MAX_DEFAULT;
  ------------------
  |  |  104|  1.54k|#define LOUDNESS_NORMALIZATION_GAIN_MAX_DEFAULT 1000
  ------------------
   62|  1.54k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
   63|  1.54k|        .loudness_norm_gain_modification_db = 0.0f;
   64|  1.54k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.output_peak_level_max = 0.0f;
   65|  1.54k|    if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.peak_limiter == 1) {
  ------------------
  |  Branch (65:9): [True: 0, False: 1.54k]
  ------------------
   66|      0|      pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.output_peak_level_max =
   67|      0|          6.0f;
   68|      0|    }
   69|       |
   70|  1.54k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.dynamic_range_control_on = 1;
   71|  1.54k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.num_bands_supported = 4;
   72|  1.54k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.num_drc_feature_requests = 0;
   73|       |
   74|  1.54k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.boost = 1.f;
   75|  1.54k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.compress = 1.f;
   76|  1.54k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.drc_characteristic_target =
   77|  1.54k|        0;
   78|       |
   79|  1.54k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.loudness_eq_request =
   80|  1.54k|        LOUD_EQ_REQUEST_OFF;
  ------------------
  |  |  200|  1.54k|#define LOUD_EQ_REQUEST_OFF 0x0
  ------------------
   81|  1.54k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.eq_set_purpose_request =
   82|  1.54k|        EQ_PURPOSE_EQ_OFF;
  ------------------
  |  |  205|  1.54k|#define EQ_PURPOSE_EQ_OFF 0
  ------------------
   83|  1.54k|    pstr_drc_uni_sel_proc->compl_level_supported_total =
   84|  1.54k|        COMPLEXITY_LEVEL_SUPPORTED_TOTAL;
  ------------------
  |  |  112|  1.54k|#define COMPLEXITY_LEVEL_SUPPORTED_TOTAL 20.0f
  ------------------
   85|       |
   86|  1.54k|    pstr_drc_uni_sel_proc->drc_inst_index_sel = -1;
   87|  1.54k|    pstr_drc_uni_sel_proc->drc_coef_index_sel = -1;
   88|  1.54k|    pstr_drc_uni_sel_proc->downmix_inst_index_sel = -1;
   89|  1.54k|    pstr_drc_uni_sel_proc->drc_instructions_index[0] = -1;
   90|  1.54k|    pstr_drc_uni_sel_proc->drc_instructions_index[1] = -1;
   91|  1.54k|    pstr_drc_uni_sel_proc->drc_instructions_index[2] = -1;
   92|  1.54k|    pstr_drc_uni_sel_proc->drc_instructions_index[3] = -1;
   93|  1.54k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.output_peak_level_db = 0;
   94|  1.54k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_output
   95|  1.54k|        .loudness_normalization_gain_db = 0;
   96|  1.54k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.output_loudness =
   97|  1.54k|        UNDEFINED_LOUDNESS_VALUE;
  ------------------
  |  |  134|  1.54k|#define UNDEFINED_LOUDNESS_VALUE 1000.0f
  ------------------
   98|  1.54k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.num_sel_drc_sets = 0;
   99|  1.54k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.active_downmix_id = 0;
  100|  1.54k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.base_channel_count = 0;
  101|  1.54k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.target_channel_count = 0;
  102|  1.54k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.downmix_matrix_present = 0;
  103|       |
  104|  1.54k|    pstr_drc_uni_sel_proc->eq_inst_index[0] = -1;
  105|  1.54k|    pstr_drc_uni_sel_proc->eq_inst_index[1] = -1;
  106|  1.54k|    pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
  107|       |
  108|  1.54k|#ifdef LOUDNESS_LEVELING_SUPPORT
  109|  1.54k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.loudness_leveling_on = 1;
  110|  1.54k|#endif
  111|  1.54k|  } else {
  112|      0|    return 1;
  113|      0|  }
  114|       |
  115|  1.54k|  return 0;
  116|  1.54k|}
impd_drc_sel_proc_init_sel_proc_params:
  120|  1.54k|    ia_drc_sel_proc_params_struct* pstr_drc_sel_proc_params_struct) {
  121|  1.54k|  if (pstr_drc_uni_sel_proc != NULL &&
  ------------------
  |  Branch (121:7): [True: 1.54k, False: 0]
  ------------------
  122|  1.54k|      pstr_drc_sel_proc_params_struct != NULL) {
  ------------------
  |  Branch (122:7): [True: 0, False: 1.54k]
  ------------------
  123|      0|    if (memcmp(&pstr_drc_uni_sel_proc->uni_drc_sel_proc_params,
  ------------------
  |  Branch (123:9): [True: 0, False: 0]
  ------------------
  124|      0|               pstr_drc_sel_proc_params_struct,
  125|      0|               sizeof(ia_drc_sel_proc_params_struct))) {
  126|      0|      pstr_drc_uni_sel_proc->uni_drc_sel_proc_params =
  127|      0|          *pstr_drc_sel_proc_params_struct;
  128|      0|      pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
  129|      0|    }
  130|      0|  }
  131|       |
  132|  1.54k|  return 0;
  133|  1.54k|}
impd_drc_sel_proc_init_interface_params:
  136|  1.54k|    ia_drc_interface_struct* pstr_drc_interface) {
  137|  1.54k|  WORD32 i, j;
  138|       |
  139|  1.54k|  if (pstr_drc_uni_sel_proc != NULL && pstr_drc_interface != NULL) {
  ------------------
  |  Branch (139:7): [True: 1.54k, False: 0]
  |  Branch (139:40): [True: 1.54k, False: 0]
  ------------------
  140|  1.54k|#ifdef LOUDNESS_LEVELING_SUPPORT
  141|  1.54k|    pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.loudness_leveling_on =
  142|  1.54k|        pstr_drc_interface->drc_uni_interface_ext.loudness_leveling_on;
  143|  1.54k|#endif
  144|  1.54k|    if (pstr_drc_interface->system_interface_flag) {
  ------------------
  |  Branch (144:9): [True: 1.54k, False: 0]
  ------------------
  145|  1.54k|      if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (145:11): [True: 0, False: 1.54k]
  ------------------
  146|  1.54k|              .target_config_request_type !=
  147|  1.54k|          pstr_drc_interface->system_interface.target_config_request_type) {
  148|      0|        pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  149|      0|            .target_config_request_type =
  150|      0|            pstr_drc_interface->system_interface.target_config_request_type;
  151|      0|        pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
  152|      0|      }
  153|  1.54k|      switch (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (153:15): [True: 1.54k, False: 0]
  ------------------
  154|  1.54k|                  .target_config_request_type) {
  155|  1.54k|        case 0:
  ------------------
  |  Branch (155:9): [True: 1.54k, False: 0]
  ------------------
  156|  1.54k|          if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (156:15): [True: 0, False: 1.54k]
  ------------------
  157|  1.54k|                  .num_downmix_id_requests !=
  158|  1.54k|              pstr_drc_interface->system_interface.num_downmix_id_requests) {
  159|      0|            pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  160|      0|                .num_downmix_id_requests =
  161|      0|                pstr_drc_interface->system_interface.num_downmix_id_requests;
  162|      0|            pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
  163|      0|          }
  164|  1.54k|          for (i = 0; i < pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (164:23): [True: 0, False: 1.54k]
  ------------------
  165|  1.54k|                              .num_downmix_id_requests;
  166|  1.54k|               i++) {
  167|      0|            if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (167:17): [True: 0, False: 0]
  ------------------
  168|      0|                    .requested_dwnmix_id[i] !=
  169|      0|                pstr_drc_interface->system_interface.requested_dwnmix_id[i]) {
  170|      0|              pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  171|      0|                  .requested_dwnmix_id[i] =
  172|      0|                  pstr_drc_interface->system_interface.requested_dwnmix_id[i];
  173|      0|              pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
  174|      0|            }
  175|      0|          }
  176|  1.54k|          break;
  177|      0|        case 1:
  ------------------
  |  Branch (177:9): [True: 0, False: 1.54k]
  ------------------
  178|      0|          if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (178:15): [True: 0, False: 0]
  ------------------
  179|      0|                  .requested_target_layout !=
  180|      0|              pstr_drc_interface->system_interface.requested_target_layout) {
  181|      0|            pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  182|      0|                .requested_target_layout =
  183|      0|                pstr_drc_interface->system_interface.requested_target_layout;
  184|      0|            pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
  185|      0|          }
  186|      0|          break;
  187|      0|        case 2:
  ------------------
  |  Branch (187:9): [True: 0, False: 1.54k]
  ------------------
  188|      0|          if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (188:15): [True: 0, False: 0]
  ------------------
  189|      0|                  .requested_target_ch_count !=
  190|      0|              pstr_drc_interface->system_interface.requested_target_ch_count) {
  191|      0|            pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  192|      0|                .requested_target_ch_count =
  193|      0|                pstr_drc_interface->system_interface.requested_target_ch_count;
  194|      0|            pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
  195|      0|          }
  196|      0|          break;
  197|  1.54k|      }
  198|  1.54k|    }
  199|  1.54k|    if (pstr_drc_interface->loudness_norm_ctrl_interface_flag) {
  ------------------
  |  Branch (199:9): [True: 1.54k, False: 0]
  ------------------
  200|  1.54k|      if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (200:11): [True: 1.54k, False: 0]
  ------------------
  201|  1.54k|              .loudness_normalization_on !=
  202|  1.54k|          pstr_drc_interface->loudness_norm_ctrl_interface
  203|  1.54k|              .loudness_normalization_on) {
  204|  1.54k|        pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  205|  1.54k|            .loudness_normalization_on =
  206|  1.54k|            pstr_drc_interface->loudness_norm_ctrl_interface
  207|  1.54k|                .loudness_normalization_on;
  208|  1.54k|        pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
  209|  1.54k|      }
  210|  1.54k|      if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (210:11): [True: 1.54k, False: 0]
  ------------------
  211|  1.54k|              .loudness_normalization_on) {
  212|  1.54k|        if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.target_loudness !=
  ------------------
  |  Branch (212:13): [True: 1.52k, False: 14]
  ------------------
  213|  1.54k|            pstr_drc_interface->loudness_norm_ctrl_interface.target_loudness) {
  214|  1.52k|          pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.target_loudness =
  215|  1.52k|              pstr_drc_interface->loudness_norm_ctrl_interface.target_loudness;
  216|  1.52k|          pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
  217|  1.52k|        }
  218|  1.54k|      }
  219|  1.54k|    }
  220|  1.54k|    if (pstr_drc_interface->loudness_norm_parameter_interface_flag) {
  ------------------
  |  Branch (220:9): [True: 1.54k, False: 0]
  ------------------
  221|  1.54k|      if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.album_mode !=
  ------------------
  |  Branch (221:11): [True: 0, False: 1.54k]
  ------------------
  222|  1.54k|          pstr_drc_interface->loudness_norm_param_interface.album_mode) {
  223|      0|        pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.album_mode =
  224|      0|            pstr_drc_interface->loudness_norm_param_interface.album_mode;
  225|      0|        pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
  226|      0|      }
  227|  1.54k|      if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.peak_limiter !=
  ------------------
  |  Branch (227:11): [True: 0, False: 1.54k]
  ------------------
  228|  1.54k|          pstr_drc_interface->loudness_norm_param_interface.peak_limiter) {
  229|      0|        pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.peak_limiter =
  230|      0|            pstr_drc_interface->loudness_norm_param_interface.peak_limiter;
  231|      0|        pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
  232|      0|      }
  233|  1.54k|      if (pstr_drc_interface->loudness_norm_param_interface
  ------------------
  |  Branch (233:11): [True: 1.54k, False: 0]
  ------------------
  234|  1.54k|              .change_loudness_deviation_max) {
  235|  1.54k|        if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (235:13): [True: 0, False: 1.54k]
  ------------------
  236|  1.54k|                .loudness_deviation_max !=
  237|  1.54k|            pstr_drc_interface->loudness_norm_param_interface
  238|  1.54k|                .loudness_deviation_max) {
  239|      0|          pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  240|      0|              .loudness_deviation_max =
  241|      0|              pstr_drc_interface->loudness_norm_param_interface
  242|      0|                  .loudness_deviation_max;
  243|      0|          pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
  244|      0|        }
  245|  1.54k|      }
  246|  1.54k|      if (pstr_drc_interface->loudness_norm_param_interface
  ------------------
  |  Branch (246:11): [True: 1.54k, False: 0]
  ------------------
  247|  1.54k|              .change_loudness_measur_method) {
  248|  1.54k|        if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (248:13): [True: 1.54k, False: 0]
  ------------------
  249|  1.54k|                .loudness_measurement_method !=
  250|  1.54k|            pstr_drc_interface->loudness_norm_param_interface
  251|  1.54k|                .loudness_measurement_method) {
  252|  1.54k|          pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  253|  1.54k|              .loudness_measurement_method =
  254|  1.54k|              pstr_drc_interface->loudness_norm_param_interface
  255|  1.54k|                  .loudness_measurement_method;
  256|  1.54k|          pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
  257|  1.54k|        }
  258|  1.54k|      }
  259|  1.54k|      if (pstr_drc_interface->loudness_norm_param_interface
  ------------------
  |  Branch (259:11): [True: 0, False: 1.54k]
  ------------------
  260|  1.54k|              .change_loudness_measur_pre_proc) {
  261|      0|        if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (261:13): [True: 0, False: 0]
  ------------------
  262|      0|                .loudness_measurement_pre_proc !=
  263|      0|            pstr_drc_interface->loudness_norm_param_interface
  264|      0|                .loudness_measurement_pre_proc) {
  265|      0|          pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  266|      0|              .loudness_measurement_pre_proc =
  267|      0|              pstr_drc_interface->loudness_norm_param_interface
  268|      0|                  .loudness_measurement_pre_proc;
  269|      0|          pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
  270|      0|        }
  271|      0|      }
  272|  1.54k|      if (pstr_drc_interface->loudness_norm_param_interface
  ------------------
  |  Branch (272:11): [True: 1.54k, False: 0]
  ------------------
  273|  1.54k|              .change_loudness_measur_system) {
  274|  1.54k|        if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (274:13): [True: 1.54k, False: 0]
  ------------------
  275|  1.54k|                .loudness_measurement_system !=
  276|  1.54k|            pstr_drc_interface->loudness_norm_param_interface
  277|  1.54k|                .loudness_measurement_system) {
  278|  1.54k|          pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  279|  1.54k|              .loudness_measurement_system =
  280|  1.54k|              pstr_drc_interface->loudness_norm_param_interface
  281|  1.54k|                  .loudness_measurement_system;
  282|  1.54k|          pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
  283|  1.54k|        }
  284|  1.54k|      }
  285|  1.54k|      if (pstr_drc_interface->loudness_norm_param_interface
  ------------------
  |  Branch (285:11): [True: 1.54k, False: 0]
  ------------------
  286|  1.54k|              .change_device_cut_off_freq) {
  287|  1.54k|        if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (287:13): [True: 1.54k, False: 0]
  ------------------
  288|  1.54k|                .device_cut_off_frequency !=
  289|  1.54k|            pstr_drc_interface->loudness_norm_param_interface
  290|  1.54k|                .device_cut_off_frequency) {
  291|  1.54k|          pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  292|  1.54k|              .device_cut_off_frequency =
  293|  1.54k|              pstr_drc_interface->loudness_norm_param_interface
  294|  1.54k|                  .device_cut_off_frequency;
  295|  1.54k|          pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
  296|  1.54k|        }
  297|  1.54k|      }
  298|  1.54k|      if (pstr_drc_interface->loudness_norm_param_interface
  ------------------
  |  Branch (298:11): [True: 1.54k, False: 0]
  ------------------
  299|  1.54k|              .change_loudness_norm_gain_db_max) {
  300|  1.54k|        if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (300:13): [True: 0, False: 1.54k]
  ------------------
  301|  1.54k|                .loudness_norm_gain_db_max !=
  302|  1.54k|            pstr_drc_interface->loudness_norm_param_interface
  303|  1.54k|                .loudness_norm_gain_db_max) {
  304|      0|          pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  305|      0|              .loudness_norm_gain_db_max =
  306|      0|              pstr_drc_interface->loudness_norm_param_interface
  307|      0|                  .loudness_norm_gain_db_max;
  308|      0|          pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
  309|      0|        }
  310|  1.54k|      }
  311|  1.54k|      if (pstr_drc_interface->loudness_norm_param_interface
  ------------------
  |  Branch (311:11): [True: 1.54k, False: 0]
  ------------------
  312|  1.54k|              .change_loudness_norm_gain_modification_db) {
  313|  1.54k|        if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (313:13): [True: 0, False: 1.54k]
  ------------------
  314|  1.54k|                .loudness_norm_gain_modification_db !=
  315|  1.54k|            pstr_drc_interface->loudness_norm_param_interface
  316|  1.54k|                .loudness_norm_gain_modification_db) {
  317|      0|          pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  318|      0|              .loudness_norm_gain_modification_db =
  319|      0|              pstr_drc_interface->loudness_norm_param_interface
  320|      0|                  .loudness_norm_gain_modification_db;
  321|      0|          pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
  322|      0|        }
  323|  1.54k|      }
  324|  1.54k|      if (pstr_drc_interface->loudness_norm_param_interface
  ------------------
  |  Branch (324:11): [True: 1.54k, False: 0]
  ------------------
  325|  1.54k|              .change_output_peak_level_max) {
  326|  1.54k|        if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (326:13): [True: 0, False: 1.54k]
  ------------------
  327|  1.54k|                .output_peak_level_max !=
  328|  1.54k|            pstr_drc_interface->loudness_norm_param_interface
  329|  1.54k|                .output_peak_level_max) {
  330|      0|          pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.output_peak_level_max =
  331|      0|              pstr_drc_interface->loudness_norm_param_interface
  332|      0|                  .output_peak_level_max;
  333|      0|          pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
  334|      0|        }
  335|  1.54k|      }
  336|  1.54k|    }
  337|  1.54k|    if (pstr_drc_interface->drc_interface_flag) {
  ------------------
  |  Branch (337:9): [True: 1.54k, False: 0]
  ------------------
  338|  1.54k|      if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (338:11): [True: 1.06k, False: 474]
  ------------------
  339|  1.54k|              .dynamic_range_control_on !=
  340|  1.54k|          pstr_drc_interface->drc_ctrl_interface.dynamic_range_control_on) {
  341|  1.06k|        pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  342|  1.06k|            .dynamic_range_control_on =
  343|  1.06k|            pstr_drc_interface->drc_ctrl_interface.dynamic_range_control_on;
  344|  1.06k|        pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
  345|  1.06k|        if (!pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (345:13): [True: 1.06k, False: 0]
  ------------------
  346|  1.06k|                 .dynamic_range_control_on) {
  347|  1.06k|          pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  348|  1.06k|              .num_drc_feature_requests = 0;
  349|  1.06k|        }
  350|  1.06k|      }
  351|  1.54k|      if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (351:11): [True: 474, False: 1.06k]
  ------------------
  352|  1.54k|              .dynamic_range_control_on) {
  353|    474|        if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (353:13): [True: 300, False: 174]
  ------------------
  354|    474|                .num_drc_feature_requests !=
  355|    474|            pstr_drc_interface->drc_ctrl_interface.num_drc_feature_requests) {
  356|    300|          pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  357|    300|              .num_drc_feature_requests =
  358|    300|              pstr_drc_interface->drc_ctrl_interface.num_drc_feature_requests;
  359|    300|          pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
  360|    300|        }
  361|  1.37k|        for (i = 0; i < pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (361:21): [True: 900, False: 474]
  ------------------
  362|  1.37k|                            .num_drc_feature_requests;
  363|    900|             i++) {
  364|    900|          if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (364:15): [True: 600, False: 300]
  ------------------
  365|    900|                  .drc_feature_req_type[i] !=
  366|    900|              pstr_drc_interface->drc_ctrl_interface.drc_feature_req_type[i]) {
  367|    600|            pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  368|    600|                .drc_feature_req_type[i] =
  369|    600|                pstr_drc_interface->drc_ctrl_interface.drc_feature_req_type[i];
  370|    600|            pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
  371|    600|          }
  372|    900|          switch (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (372:19): [True: 900, False: 0]
  ------------------
  373|    900|                      .drc_feature_req_type[i]) {
  374|    300|            case 0:
  ------------------
  |  Branch (374:13): [True: 300, False: 600]
  ------------------
  375|    300|              if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (375:19): [True: 300, False: 0]
  ------------------
  376|    300|                      .requested_num_drc_effects[i] !=
  377|    300|                  pstr_drc_interface->drc_ctrl_interface
  378|    300|                      .requested_num_drc_effects[i]) {
  379|    300|                pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  380|    300|                    .requested_num_drc_effects[i] =
  381|    300|                    pstr_drc_interface->drc_ctrl_interface
  382|    300|                        .requested_num_drc_effects[i];
  383|    300|                pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
  384|    300|              }
  385|    300|              if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (385:19): [True: 300, False: 0]
  ------------------
  386|    300|                      .desired_num_drc_effects_of_requested[i] !=
  387|    300|                  pstr_drc_interface->drc_ctrl_interface
  388|    300|                      .desired_num_drc_effects_of_requested[i]) {
  389|    300|                pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  390|    300|                    .desired_num_drc_effects_of_requested[i] =
  391|    300|                    pstr_drc_interface->drc_ctrl_interface
  392|    300|                        .desired_num_drc_effects_of_requested[i];
  393|    300|                pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
  394|    300|              }
  395|    600|              for (j = 0; j < pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (395:27): [True: 300, False: 300]
  ------------------
  396|    600|                                  .requested_num_drc_effects[i];
  397|    300|                   j++) {
  398|    300|                if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (398:21): [True: 300, False: 0]
  ------------------
  399|    300|                        .requested_drc_effect_type[i][j] !=
  400|    300|                    pstr_drc_interface->drc_ctrl_interface
  401|    300|                        .requested_drc_effect_type[i][j]) {
  402|    300|                  pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  403|    300|                      .requested_drc_effect_type[i][j] =
  404|    300|                      pstr_drc_interface->drc_ctrl_interface
  405|    300|                          .requested_drc_effect_type[i][j];
  406|    300|                  pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
  407|    300|                }
  408|    300|              }
  409|    300|              break;
  410|    300|            case 1:
  ------------------
  |  Branch (410:13): [True: 300, False: 600]
  ------------------
  411|    300|              if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (411:19): [True: 0, False: 300]
  ------------------
  412|    300|                      .requested_dyn_range_measur_type[i] !=
  413|    300|                  pstr_drc_interface->drc_ctrl_interface
  414|    300|                      .requested_dyn_rng_measurement_type[i]) {
  415|      0|                pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  416|      0|                    .requested_dyn_range_measur_type[i] =
  417|      0|                    pstr_drc_interface->drc_ctrl_interface
  418|      0|                        .requested_dyn_rng_measurement_type[i];
  419|      0|                pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
  420|      0|              }
  421|    300|              if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (421:19): [True: 0, False: 300]
  ------------------
  422|    300|                      .requested_dyn_range_range_flag[i] !=
  423|    300|                  pstr_drc_interface->drc_ctrl_interface
  424|    300|                      .requested_dyn_range_is_single_val_flag[i]) {
  425|      0|                pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  426|      0|                    .requested_dyn_range_range_flag[i] =
  427|      0|                    pstr_drc_interface->drc_ctrl_interface
  428|      0|                        .requested_dyn_range_is_single_val_flag[i];
  429|      0|                pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
  430|      0|              }
  431|    300|              if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (431:19): [True: 300, False: 0]
  ------------------
  432|    300|                      .requested_dyn_range_range_flag[i] == 0) {
  433|    300|                if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (433:21): [True: 0, False: 300]
  ------------------
  434|    300|                        .requested_dyn_range_value[i] !=
  435|    300|                    pstr_drc_interface->drc_ctrl_interface
  436|    300|                        .requested_dyn_range_value[i]) {
  437|      0|                  pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  438|      0|                      .requested_dyn_range_value[i] =
  439|      0|                      pstr_drc_interface->drc_ctrl_interface
  440|      0|                          .requested_dyn_range_value[i];
  441|      0|                  pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
  442|      0|                }
  443|    300|              } else {
  444|      0|                if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (444:21): [True: 0, False: 0]
  ------------------
  445|      0|                        .requested_dyn_range_min_val[i] !=
  446|      0|                    pstr_drc_interface->drc_ctrl_interface
  447|      0|                        .requested_dyn_range_min_val[i]) {
  448|      0|                  pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  449|      0|                      .requested_dyn_range_min_val[i] =
  450|      0|                      pstr_drc_interface->drc_ctrl_interface
  451|      0|                          .requested_dyn_range_min_val[i];
  452|      0|                  pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
  453|      0|                }
  454|      0|                if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (454:21): [True: 0, False: 0]
  ------------------
  455|      0|                        .requested_dyn_range_max_val[i] !=
  456|      0|                    pstr_drc_interface->drc_ctrl_interface
  457|      0|                        .requested_dyn_range_max_val[i]) {
  458|      0|                  pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  459|      0|                      .requested_dyn_range_max_val[i] =
  460|      0|                      pstr_drc_interface->drc_ctrl_interface
  461|      0|                          .requested_dyn_range_max_val[i];
  462|      0|                  pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
  463|      0|                }
  464|      0|              }
  465|    300|              break;
  466|    300|            case 2:
  ------------------
  |  Branch (466:13): [True: 300, False: 600]
  ------------------
  467|    300|              if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (467:19): [True: 300, False: 0]
  ------------------
  468|    300|                      .requested_drc_characteristic[i] !=
  469|    300|                  pstr_drc_interface->drc_ctrl_interface
  470|    300|                      .requested_drc_characteristic[i]) {
  471|    300|                pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  472|    300|                    .requested_drc_characteristic[i] =
  473|    300|                    pstr_drc_interface->drc_ctrl_interface
  474|    300|                        .requested_drc_characteristic[i];
  475|    300|                pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
  476|    300|              }
  477|    300|              break;
  478|    900|          }
  479|    900|        }
  480|    474|      }
  481|  1.54k|    }
  482|  1.54k|    if (pstr_drc_interface->drc_parameter_interface_flag) {
  ------------------
  |  Branch (482:9): [True: 1.54k, False: 0]
  ------------------
  483|  1.54k|      if (pstr_drc_interface->drc_parameter_interface.change_compress) {
  ------------------
  |  Branch (483:11): [True: 1.54k, False: 0]
  ------------------
  484|  1.54k|        if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.compress !=
  ------------------
  |  Branch (484:13): [True: 0, False: 1.54k]
  ------------------
  485|  1.54k|            pstr_drc_interface->drc_parameter_interface.compress) {
  486|      0|          pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.compress =
  487|      0|              pstr_drc_interface->drc_parameter_interface.compress;
  488|      0|          pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
  489|      0|        }
  490|  1.54k|      }
  491|  1.54k|      if (pstr_drc_interface->drc_parameter_interface.change_boost) {
  ------------------
  |  Branch (491:11): [True: 1.54k, False: 0]
  ------------------
  492|  1.54k|        if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.boost !=
  ------------------
  |  Branch (492:13): [True: 0, False: 1.54k]
  ------------------
  493|  1.54k|            pstr_drc_interface->drc_parameter_interface.boost) {
  494|      0|          pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.boost =
  495|      0|              pstr_drc_interface->drc_parameter_interface.boost;
  496|      0|          pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
  497|      0|        }
  498|  1.54k|      }
  499|  1.54k|      if (pstr_drc_interface->drc_parameter_interface
  ------------------
  |  Branch (499:11): [True: 1.54k, False: 0]
  ------------------
  500|  1.54k|              .change_drc_characteristic_target) {
  501|  1.54k|        if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  ------------------
  |  Branch (501:13): [True: 0, False: 1.54k]
  ------------------
  502|  1.54k|                .drc_characteristic_target !=
  503|  1.54k|            pstr_drc_interface->drc_parameter_interface
  504|  1.54k|                .drc_characteristic_target) {
  505|      0|          pstr_drc_uni_sel_proc->uni_drc_sel_proc_params
  506|      0|              .drc_characteristic_target =
  507|      0|              pstr_drc_interface->drc_parameter_interface
  508|      0|                  .drc_characteristic_target;
  509|      0|          pstr_drc_uni_sel_proc->sel_proc_request_flag = 1;
  510|      0|        }
  511|  1.54k|      }
  512|  1.54k|    }
  513|  1.54k|    if (pstr_drc_interface->drc_uni_interface_ext_flag) {
  ------------------
  |  Branch (513:9): [True: 0, False: 1.54k]
  ------------------
  514|      0|      ia_drc_uni_interface_ext_struct* drc_uni_interface_ext =
  515|      0|          &pstr_drc_interface->drc_uni_interface_ext;
  516|      0|      if (drc_uni_interface_ext->loudness_eq_parameter_interface_flag) {
  ------------------
  |  Branch (516:11): [True: 0, False: 0]
  ------------------
  517|      0|        ia_loudness_eq_parameter_interface_struct*
  518|      0|            loudness_eq_parameter_interface =
  519|      0|                &drc_uni_interface_ext->loudness_eq_parameter_interface;
  520|      0|        if (loudness_eq_parameter_interface->loudness_eq_request_flag) {
  ------------------
  |  Branch (520:13): [True: 0, False: 0]
  ------------------
  521|      0|          pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.loudness_eq_request =
  522|      0|              loudness_eq_parameter_interface->loudness_eq_request;
  523|      0|          pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.sensitivity =
  524|      0|              loudness_eq_parameter_interface->sensitivity;
  525|      0|          pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.playback_gain =
  526|      0|              loudness_eq_parameter_interface->playback_gain;
  527|      0|        }
  528|      0|      }
  529|      0|      if (drc_uni_interface_ext->eq_ctrl_interface_flag) {
  ------------------
  |  Branch (529:11): [True: 0, False: 0]
  ------------------
  530|      0|        pstr_drc_uni_sel_proc->uni_drc_sel_proc_params.eq_set_purpose_request =
  531|      0|            drc_uni_interface_ext->eq_ctrl_interface.eq_set_purpose_request;
  532|      0|      }
  533|      0|    }
  534|  1.54k|  }
  535|       |
  536|  1.54k|  return;
  537|  1.54k|}

impd_shape_filt_block_time_process:
  244|  6.15k|                                        WORD32 end) {
  245|  6.15k|  WORD32 i, j;
  246|  6.15k|  FLOAT32 audio_out;
  247|       |
  248|  6.15k|  if (shape_filter_block->shape_flter_block_flag) {
  ------------------
  |  Branch (248:7): [True: 0, False: 6.15k]
  ------------------
  249|      0|    for (i = start; i < end; i++) {
  ------------------
  |  Branch (249:21): [True: 0, False: 0]
  ------------------
  250|      0|      FLOAT32 tmp = audio_in[i];
  251|      0|      for (j = 0; j < 4; j++) {
  ------------------
  |  Branch (251:19): [True: 0, False: 0]
  ------------------
  252|      0|        if (shape_filter_block->shape_filter[j].type ==
  ------------------
  |  Branch (252:13): [True: 0, False: 0]
  ------------------
  253|      0|                SHAPE_FILTER_TYPE_LF_CUT ||
  ------------------
  |  |  146|      0|#define SHAPE_FILTER_TYPE_LF_CUT 1
  ------------------
  254|      0|            shape_filter_block->shape_filter[j].type ==
  ------------------
  |  Branch (254:13): [True: 0, False: 0]
  ------------------
  255|      0|                SHAPE_FILTER_TYPE_LF_BOOST) {
  ------------------
  |  |  147|      0|#define SHAPE_FILTER_TYPE_LF_BOOST 2
  ------------------
  256|      0|          audio_out = tmp +
  257|      0|                      shape_filter_block->shape_filter[j].b1 *
  258|      0|                          shape_filter_block->shape_filter[j]
  259|      0|                              .audio_in_state_1[channel] -
  260|      0|                      shape_filter_block->shape_filter[j].a1 *
  261|      0|                          shape_filter_block->shape_filter[j]
  262|      0|                              .audio_out_state_1[channel];
  263|      0|          shape_filter_block->shape_filter[j].audio_in_state_1[channel] = tmp;
  264|      0|          shape_filter_block->shape_filter[j].audio_out_state_1[channel] =
  265|      0|              audio_out;
  266|       |
  267|      0|        } else if (shape_filter_block->shape_filter[j].type ==
  ------------------
  |  Branch (267:20): [True: 0, False: 0]
  ------------------
  268|      0|                       SHAPE_FILTER_TYPE_HF_CUT ||
  ------------------
  |  |  148|      0|#define SHAPE_FILTER_TYPE_HF_CUT 3
  ------------------
  269|      0|                   shape_filter_block->shape_filter[j].type ==
  ------------------
  |  Branch (269:20): [True: 0, False: 0]
  ------------------
  270|      0|                       SHAPE_FILTER_TYPE_HF_BOOST) {
  ------------------
  |  |  149|      0|#define SHAPE_FILTER_TYPE_HF_BOOST 4
  ------------------
  271|      0|          audio_out = shape_filter_block->shape_filter[j].g_norm * tmp +
  272|      0|                      shape_filter_block->shape_filter[j].b1 *
  273|      0|                          shape_filter_block->shape_filter[j]
  274|      0|                              .audio_in_state_1[channel] +
  275|      0|                      shape_filter_block->shape_filter[j].b2 *
  276|      0|                          shape_filter_block->shape_filter[j]
  277|      0|                              .audio_in_state_2[channel] -
  278|      0|                      shape_filter_block->shape_filter[j].a1 *
  279|      0|                          shape_filter_block->shape_filter[j]
  280|      0|                              .audio_out_state_1[channel] -
  281|      0|                      shape_filter_block->shape_filter[j].a2 *
  282|      0|                          shape_filter_block->shape_filter[j]
  283|      0|                              .audio_out_state_2[channel];
  284|      0|          shape_filter_block->shape_filter[j].audio_in_state_2[channel] =
  285|      0|              shape_filter_block->shape_filter[j].audio_in_state_1[channel];
  286|      0|          shape_filter_block->shape_filter[j].audio_in_state_1[channel] =
  287|      0|              shape_filter_block->shape_filter[j].g_norm * tmp;
  288|      0|          shape_filter_block->shape_filter[j].audio_out_state_2[channel] =
  289|      0|              shape_filter_block->shape_filter[j].audio_out_state_1[channel];
  290|      0|          shape_filter_block->shape_filter[j].audio_out_state_1[channel] =
  291|      0|              audio_out;
  292|      0|        } else {
  293|      0|          audio_out = tmp;
  294|      0|        }
  295|      0|        tmp = audio_out;
  296|      0|      }
  297|       |
  298|      0|      audio_in[i] = audio_out * drc_gain[i];
  299|      0|    }
  300|       |
  301|  6.15k|  } else {
  302|  14.5M|    for (i = start; i < end; i++) {
  ------------------
  |  Branch (302:21): [True: 14.5M, False: 6.15k]
  ------------------
  303|  14.5M|      audio_in[i] = audio_in[i] * drc_gain[i];
  304|  14.5M|    }
  305|  6.15k|  }
  306|       |
  307|  6.15k|  return;
  308|  6.15k|}

impd_parametric_drc_parse_gain_set_params:
  332|    989|        str_parametric_drc_gain_set_params) {
  333|    989|  WORD32 i = 0, bsDrcInputLoudness = 0, bs_channel_weight = 0, temp;
  334|       |  // WORD32 err = 0;
  335|    989|  temp = impd_read_bits_buf(it_bit_buff, 7);
  336|    989|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (336:7): [True: 2, False: 987]
  ------------------
  337|       |
  338|    987|  str_parametric_drc_gain_set_params->parametric_drc_id = (temp >> 3) & 0xf;
  339|    987|  str_parametric_drc_gain_set_params->side_chain_config_type = temp & 7;
  340|       |
  341|    987|  if (str_parametric_drc_gain_set_params->side_chain_config_type == 1) {
  ------------------
  |  Branch (341:7): [True: 67, False: 920]
  ------------------
  342|     67|    temp = impd_read_bits_buf(it_bit_buff, 8);
  343|     67|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (343:9): [True: 2, False: 65]
  ------------------
  344|       |
  345|     65|    str_parametric_drc_gain_set_params->downmix_id = (temp >> 1) & 0x7f;
  346|     65|    str_parametric_drc_gain_set_params->level_estim_channel_weight_format =
  347|     65|        temp & 1;
  348|       |
  349|     65|    if (str_parametric_drc_gain_set_params->downmix_id == ID_FOR_BASE_LAYOUT) {
  ------------------
  |  |  135|     65|#define ID_FOR_BASE_LAYOUT 0x0
  ------------------
  |  Branch (349:9): [True: 21, False: 44]
  ------------------
  350|     21|      str_parametric_drc_gain_set_params->ch_count_from_dwnmix_id =
  351|     21|          drc_config->channel_layout.base_channel_count;
  352|     44|    } else if (str_parametric_drc_gain_set_params->downmix_id ==
  ------------------
  |  Branch (352:16): [True: 14, False: 30]
  ------------------
  353|     44|               ID_FOR_ANY_DOWNMIX) {
  ------------------
  |  |  136|     44|#define ID_FOR_ANY_DOWNMIX 0x7F
  ------------------
  354|     14|      str_parametric_drc_gain_set_params->ch_count_from_dwnmix_id = 1;
  355|     30|    } else {
  356|     59|      for (i = 0; i < drc_config->dwnmix_instructions_count; i++) {
  ------------------
  |  Branch (356:19): [True: 51, False: 8]
  ------------------
  357|     51|        if (str_parametric_drc_gain_set_params->downmix_id ==
  ------------------
  |  Branch (357:13): [True: 22, False: 29]
  ------------------
  358|     51|            drc_config->dwnmix_instructions[i].downmix_id)
  359|     22|          break;
  360|     51|      }
  361|     30|      if (i == drc_config->dwnmix_instructions_count) {
  ------------------
  |  Branch (361:11): [True: 8, False: 22]
  ------------------
  362|       |        /* dwnmix_instructions not found */
  363|      8|        return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      8|#define UNEXPECTED_ERROR 2
  ------------------
  364|      8|      }
  365|     22|      str_parametric_drc_gain_set_params->ch_count_from_dwnmix_id =
  366|     22|          drc_config->dwnmix_instructions[i].target_channel_count;
  367|     22|    }
  368|       |
  369|    248|    for (i = 0; i < str_parametric_drc_gain_set_params->ch_count_from_dwnmix_id;
  ------------------
  |  Branch (369:17): [True: 193, False: 55]
  ------------------
  370|    193|         i++) {
  371|    193|      if (str_parametric_drc_gain_set_params
  ------------------
  |  Branch (371:11): [True: 69, False: 124]
  ------------------
  372|    193|              ->level_estim_channel_weight_format == 0) {
  373|     69|        str_parametric_drc_gain_set_params->level_estim_ch_weight[i] =
  374|     69|            (FLOAT32)impd_read_bits_buf(it_bit_buff, 1);
  375|     69|        if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (375:13): [True: 1, False: 68]
  ------------------
  376|    124|      } else {
  377|    124|        bs_channel_weight = impd_read_bits_buf(it_bit_buff, 4);
  378|    124|        if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (378:13): [True: 1, False: 123]
  ------------------
  379|    123|        str_parametric_drc_gain_set_params->level_estim_ch_weight[i] =
  380|    123|            (FLOAT32)pow(10.0f, 0.05f * channel_weight[bs_channel_weight]);
  381|    123|      }
  382|    193|    }
  383|    920|  } else {
  384|    920|    str_parametric_drc_gain_set_params->downmix_id = 0;
  385|    920|    str_parametric_drc_gain_set_params->ch_count_from_dwnmix_id = 0;
  386|    920|  }
  387|       |
  388|    975|  str_parametric_drc_gain_set_params->drc_input_loudness_present =
  389|    975|      impd_read_bits_buf(it_bit_buff, 1);
  390|    975|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (390:7): [True: 3, False: 972]
  ------------------
  391|       |
  392|    972|  if (str_parametric_drc_gain_set_params->drc_input_loudness_present) {
  ------------------
  |  Branch (392:7): [True: 129, False: 843]
  ------------------
  393|    129|    bsDrcInputLoudness = impd_read_bits_buf(it_bit_buff, 8);
  394|    129|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (394:9): [True: 1, False: 128]
  ------------------
  395|    128|    str_parametric_drc_gain_set_params->drc_input_loudness =
  396|    128|        -57.75f + bsDrcInputLoudness * 0.25f;
  397|    128|  }
  398|       |
  399|    971|  return 0;
  400|    972|}
impd_parse_loud_info_set_ext_eq:
  694|     74|    ia_drc_loudness_info_set_struct* loudness_info_set) {
  695|     74|  WORD32 err, i, offset, version = 1, temp;
  696|     74|  WORD32 loudness_info_v1_album_cnt, loudness_info_v1_cnt;
  697|       |
  698|     74|  temp = impd_read_bits_buf(it_bit_buff, 12);
  699|     74|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (699:7): [True: 1, False: 73]
  ------------------
  700|       |
  701|     73|  loudness_info_v1_album_cnt = (temp >> 6) & 0x3f;
  702|     73|  loudness_info_v1_cnt = temp & 0x3f;
  703|       |
  704|     73|  offset = loudness_info_set->loudness_info_album_count;
  705|     73|  loudness_info_set->loudness_info_album_count += loudness_info_v1_album_cnt;
  706|     73|  if ((offset + loudness_info_v1_album_cnt) > LOUDNESS_INFO_COUNT_MAX)
  ------------------
  |  |   44|     73|#define LOUDNESS_INFO_COUNT_MAX (DOWNMIX_INSTRUCTION_COUNT_MAX + 20)
  |  |  ------------------
  |  |  |  |   41|     73|#define DOWNMIX_INSTRUCTION_COUNT_MAX 16
  |  |  ------------------
  ------------------
  |  Branch (706:7): [True: 3, False: 70]
  ------------------
  707|      3|    return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      3|#define UNEXPECTED_ERROR 2
  ------------------
  708|    152|  for (i = 0; i < loudness_info_v1_album_cnt; i++) {
  ------------------
  |  Branch (708:15): [True: 89, False: 63]
  ------------------
  709|     89|    err = impd_parse_loudness_info(
  710|     89|        it_bit_buff, version,
  711|     89|        &loudness_info_set->str_loudness_info_album[i + offset]);
  712|     89|    if (err) return (err);
  ------------------
  |  Branch (712:9): [True: 7, False: 82]
  ------------------
  713|     89|  }
  714|     63|  offset = loudness_info_set->loudness_info_count;
  715|     63|  loudness_info_set->loudness_info_count += loudness_info_v1_cnt;
  716|     63|  if (offset + loudness_info_v1_cnt > LOUDNESS_INFO_COUNT_MAX)
  ------------------
  |  |   44|     63|#define LOUDNESS_INFO_COUNT_MAX (DOWNMIX_INSTRUCTION_COUNT_MAX + 20)
  |  |  ------------------
  |  |  |  |   41|     63|#define DOWNMIX_INSTRUCTION_COUNT_MAX 16
  |  |  ------------------
  ------------------
  |  Branch (716:7): [True: 1, False: 62]
  ------------------
  717|      1|    return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      1|#define UNEXPECTED_ERROR 2
  ------------------
  718|    343|  for (i = 0; i < loudness_info_v1_cnt; i++) {
  ------------------
  |  Branch (718:15): [True: 288, False: 55]
  ------------------
  719|    288|    err = impd_parse_loudness_info(
  720|    288|        it_bit_buff, version, &loudness_info_set->loudness_info[i + offset]);
  721|    288|    if (err) return (err);
  ------------------
  |  Branch (721:9): [True: 7, False: 281]
  ------------------
  722|    288|  }
  723|     55|  return (0);
  724|     62|}
impd_parse_ch_layout:
  728|    828|                            ia_channel_layout_struct* channel_layout) {
  729|       |  // WORD32 err = 0;
  730|    828|  WORD32 i;
  731|       |
  732|    828|  channel_layout->base_channel_count = impd_read_bits_buf(it_bit_buff, 7);
  733|    828|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (733:7): [True: 1, False: 827]
  ------------------
  734|    827|  if ((channel_layout->base_channel_count > MAX_CHANNEL_COUNT) ||
  ------------------
  |  |   35|    827|#define MAX_CHANNEL_COUNT (8)  // 128
  ------------------
  |  Branch (734:7): [True: 3, False: 824]
  ------------------
  735|    824|      (channel_layout->base_channel_count == 0))
  ------------------
  |  Branch (735:7): [True: 9, False: 815]
  ------------------
  736|     12|    return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|     12|#define UNEXPECTED_ERROR 2
  ------------------
  737|    815|  if (ia_drc_params_struct->lfe_channel_map_count != -1 &&
  ------------------
  |  Branch (737:7): [True: 1, False: 814]
  ------------------
  738|      1|      channel_layout->base_channel_count !=
  ------------------
  |  Branch (738:7): [True: 1, False: 0]
  ------------------
  739|      1|          ia_drc_params_struct->lfe_channel_map_count) {
  740|      1|    return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      1|#define UNEXPECTED_ERROR 2
  ------------------
  741|      1|  }
  742|    814|  channel_layout->layout_signaling_present = impd_read_bits_buf(it_bit_buff, 1);
  743|    814|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (743:7): [True: 1, False: 813]
  ------------------
  744|       |
  745|    813|  if (channel_layout->layout_signaling_present) {
  ------------------
  |  Branch (745:7): [True: 116, False: 697]
  ------------------
  746|    116|    channel_layout->defined_layout = impd_read_bits_buf(it_bit_buff, 8);
  747|    116|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (747:9): [True: 0, False: 116]
  ------------------
  748|       |
  749|    116|    if (channel_layout->defined_layout == 0) {
  ------------------
  |  Branch (749:9): [True: 8, False: 108]
  ------------------
  750|     51|      for (i = 0; i < channel_layout->base_channel_count; i++) {
  ------------------
  |  Branch (750:19): [True: 44, False: 7]
  ------------------
  751|     44|        channel_layout->speaker_position[i] =
  752|     44|            impd_read_bits_buf(it_bit_buff, 7);
  753|     44|        if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (753:13): [True: 1, False: 43]
  ------------------
  754|     43|        if (channel_layout->speaker_position[i] == 3 ||
  ------------------
  |  Branch (754:13): [True: 3, False: 40]
  ------------------
  755|     40|            channel_layout->speaker_position[i] == 26) {
  ------------------
  |  Branch (755:13): [True: 3, False: 37]
  ------------------
  756|      6|          ia_drc_params_struct->lfe_channel_map[i] = 1;
  757|     37|        } else {
  758|     37|          ia_drc_params_struct->lfe_channel_map[i] = 0;
  759|     37|        }
  760|     43|      }
  761|      8|    }
  762|    116|  }
  763|       |
  764|    812|  return (0);
  765|    813|}
impd_parse_dwnmix_instructions:
  772|    365|    ia_downmix_instructions_struct* dwnmix_instructions) {
  773|       |  // WORD32 err = 0;
  774|    365|  WORD32 i, j, k, temp;
  775|       |
  776|    365|  temp = impd_read_bits_buf(it_bit_buff, 23);
  777|    365|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (777:7): [True: 5, False: 360]
  ------------------
  778|       |
  779|    360|  dwnmix_instructions->downmix_id = (temp >> 16) & 0x7f;
  780|    360|  dwnmix_instructions->target_channel_count = (temp >> 9) & 0x7f;
  781|    360|  if (dwnmix_instructions->target_channel_count > MAX_CHANNEL_COUNT)
  ------------------
  |  |   35|    360|#define MAX_CHANNEL_COUNT (8)  // 128
  ------------------
  |  Branch (781:7): [True: 10, False: 350]
  ------------------
  782|     10|    return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|     10|#define UNEXPECTED_ERROR 2
  ------------------
  783|    350|  dwnmix_instructions->target_layout = (temp >> 1) & 0xff;
  784|    350|  dwnmix_instructions->downmix_coefficients_present = temp & 1;
  785|       |
  786|    350|  if (dwnmix_instructions->downmix_coefficients_present) {
  ------------------
  |  Branch (786:7): [True: 90, False: 260]
  ------------------
  787|     90|    if (version == 0) {
  ------------------
  |  Branch (787:9): [True: 38, False: 52]
  ------------------
  788|     38|      WORD32 dmix_coeff;
  789|     38|      k = 0;
  790|     91|      for (i = 0; i < dwnmix_instructions->target_channel_count; i++) {
  ------------------
  |  Branch (790:19): [True: 57, False: 34]
  ------------------
  791|    362|        for (j = 0; j < channel_layout->base_channel_count; j++) {
  ------------------
  |  Branch (791:21): [True: 309, False: 53]
  ------------------
  792|    309|          dmix_coeff = impd_read_bits_buf(it_bit_buff, 4);
  793|    309|          if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (793:15): [True: 4, False: 305]
  ------------------
  794|       |
  795|    305|          if (k >= DOWNMIX_COEFF_COUNT_MAX) return (UNEXPECTED_ERROR);
  ------------------
  |  |   34|    305|#define DOWNMIX_COEFF_COUNT_MAX 32 * 32
  ------------------
                        if (k >= DOWNMIX_COEFF_COUNT_MAX) return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  |  Branch (795:15): [True: 0, False: 305]
  ------------------
  796|    305|          if (ia_drc_params_struct->lfe_channel_map[j]) {
  ------------------
  |  Branch (796:15): [True: 6, False: 299]
  ------------------
  797|      6|            dwnmix_instructions->downmix_coefficient[k] =
  798|      6|                (FLOAT32)pow(10.0f, 0.05f * dwnmix_coeff_lfe[dmix_coeff]);
  799|    299|          } else {
  800|    299|            dwnmix_instructions->downmix_coefficient[k] =
  801|    299|                (FLOAT32)pow(10.0f, 0.05f * dwnmix_coeff[dmix_coeff]);
  802|    299|          }
  803|    305|          k++;
  804|    305|        }
  805|     57|      }
  806|     52|    } else {
  807|     52|      WORD32 dmix_coeff_v1, bs_dmix_offset;
  808|     52|      FLOAT32 a, b, dmix_offset, sum;
  809|       |
  810|     52|      bs_dmix_offset = impd_read_bits_buf(it_bit_buff, 4);
  811|     52|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (811:11): [True: 1, False: 51]
  ------------------
  812|     51|      k = 0;
  813|       |
  814|     76|      for (i = 0; i < dwnmix_instructions->target_channel_count; i++) {
  ------------------
  |  Branch (814:19): [True: 28, False: 48]
  ------------------
  815|    207|        for (j = 0; j < channel_layout->base_channel_count; j++) {
  ------------------
  |  Branch (815:21): [True: 182, False: 25]
  ------------------
  816|    182|          dmix_coeff_v1 = impd_read_bits_buf(it_bit_buff, 5);
  817|    182|          if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (817:15): [True: 3, False: 179]
  ------------------
  818|    179|          if (k >= DOWNMIX_COEFF_COUNT_MAX) return (UNEXPECTED_ERROR);
  ------------------
  |  |   34|    179|#define DOWNMIX_COEFF_COUNT_MAX 32 * 32
  ------------------
                        if (k >= DOWNMIX_COEFF_COUNT_MAX) return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  |  Branch (818:15): [True: 0, False: 179]
  ------------------
  819|    179|          dwnmix_instructions->downmix_coefficient[k] =
  820|    179|              dwnmix_coeff_v1[dmix_coeff_v1];
  821|    179|          k++;
  822|    179|        }
  823|     28|      }
  824|     48|      switch (bs_dmix_offset) {
  825|     24|        case 0:
  ------------------
  |  Branch (825:9): [True: 24, False: 24]
  ------------------
  826|     24|          dmix_offset = 0.0f;
  827|     24|          break;
  828|      2|        case 1:
  ------------------
  |  Branch (828:9): [True: 2, False: 46]
  ------------------
  829|      2|          a = 20.0f * (FLOAT32)log10(
  830|      2|                          (FLOAT32)dwnmix_instructions->target_channel_count /
  831|      2|                          (FLOAT32)channel_layout->base_channel_count);
  832|      2|          dmix_offset = 0.5f * (FLOAT32)floor(0.5f + a);
  833|      2|          break;
  834|      1|        case 2:
  ------------------
  |  Branch (834:9): [True: 1, False: 47]
  ------------------
  835|      1|          a = 20.0f * (FLOAT32)log10(
  836|      1|                          (FLOAT32)dwnmix_instructions->target_channel_count /
  837|      1|                          (FLOAT32)channel_layout->base_channel_count);
  838|      1|          dmix_offset = 0.5f * (FLOAT32)floor(0.5f + 2.0f * a);
  839|      1|          break;
  840|     20|        case 3:
  ------------------
  |  Branch (840:9): [True: 20, False: 28]
  ------------------
  841|     20|          sum = 0.0f;
  842|    120|          for (k = 0; k < dwnmix_instructions->target_channel_count *
  ------------------
  |  Branch (842:23): [True: 100, False: 20]
  ------------------
  843|    120|                              channel_layout->base_channel_count;
  844|    100|               k++) {
  845|    100|            sum += (FLOAT32)pow(
  846|    100|                10.0f, 0.1f * dwnmix_instructions->downmix_coefficient[k]);
  847|    100|          }
  848|     20|          b = 10.0f * (FLOAT32)log10(sum);
  849|     20|          dmix_offset = 0.5f * (FLOAT32)floor(0.5f + 2.0f * b);
  850|     20|          break;
  851|       |
  852|      1|        default:
  ------------------
  |  Branch (852:9): [True: 1, False: 47]
  ------------------
  853|      1|          return (BITSTREAM_ERROR);
  ------------------
  |  |  132|      1|#define BITSTREAM_ERROR 6
  ------------------
  854|      0|          break;
  855|     48|      }
  856|    187|      for (k = 0; k < dwnmix_instructions->target_channel_count *
  ------------------
  |  Branch (856:19): [True: 140, False: 47]
  ------------------
  857|    187|                          channel_layout->base_channel_count;
  858|    140|           k++) {
  859|    140|        dwnmix_instructions->downmix_coefficient[k] = (FLOAT32)pow(
  860|    140|            10.0f, 0.05f * (dwnmix_instructions->downmix_coefficient[k] +
  861|    140|                            dmix_offset));
  862|    140|      }
  863|     47|    }
  864|     90|  }
  865|    341|  return (0);
  866|    350|}
impd_drc_gen_instructions_for_drc_off:
  868|     65|VOID impd_drc_gen_instructions_for_drc_off(ia_drc_config* drc_config) {
  869|     65|  WORD32 i, k, s;
  870|     65|  ia_drc_instructions_struct* str_drc_instruction_str;
  871|     65|  s = -1;
  872|       |
  873|     65|  k = drc_config->drc_instructions_uni_drc_count;
  874|       |
  875|     65|  str_drc_instruction_str = &(drc_config->str_drc_instruction_str[k]);
  876|     65|  memset(str_drc_instruction_str, 0, sizeof(ia_drc_instructions_struct));
  877|     65|  str_drc_instruction_str->drc_set_id = s;
  878|     65|  s--;
  879|     65|  str_drc_instruction_str->downmix_id[0] = ID_FOR_BASE_LAYOUT;
  ------------------
  |  |  135|     65|#define ID_FOR_BASE_LAYOUT 0x0
  ------------------
  880|     65|  str_drc_instruction_str->dwnmix_id_count = 1;
  881|     65|  str_drc_instruction_str->drc_apply_to_dwnmix = 0;
  882|     65|  str_drc_instruction_str->depends_on_drc_set_present = 0;
  883|     65|  str_drc_instruction_str->no_independent_use = 0;
  884|     65|  str_drc_instruction_str->gain_element_count = 0;
  885|    111|  for (i = 1; i < drc_config->dwnmix_instructions_count + 1; i++) {
  ------------------
  |  Branch (885:15): [True: 46, False: 65]
  ------------------
  886|     46|    str_drc_instruction_str = &(drc_config->str_drc_instruction_str[k + i]);
  887|     46|    memset(str_drc_instruction_str, 0, sizeof(ia_drc_instructions_struct));
  888|     46|    str_drc_instruction_str->drc_set_id = s;
  889|     46|    s--;
  890|     46|    str_drc_instruction_str->drc_set_complexity_level = 0;
  891|     46|    str_drc_instruction_str->requires_eq = 0;
  892|     46|    str_drc_instruction_str->downmix_id[0] =
  893|     46|        drc_config->dwnmix_instructions[i - 1].downmix_id;
  894|     46|    str_drc_instruction_str->dwnmix_id_count = 1;
  895|     46|    str_drc_instruction_str->drc_apply_to_dwnmix = 0;
  896|     46|    str_drc_instruction_str->depends_on_drc_set_present = 0;
  897|     46|    str_drc_instruction_str->no_independent_use = 0;
  898|     46|    str_drc_instruction_str->gain_element_count = 0;
  899|     46|  }
  900|     65|  drc_config->drc_instructions_count_plus =
  901|     65|      drc_config->drc_instructions_uni_drc_count +
  902|     65|      drc_config->dwnmix_instructions_count + 1;
  903|     65|  return;
  904|     65|}
impd_parse_drc_config_ext:
  910|    547|                          ia_drc_config_ext* str_drc_config_ext) {
  911|    547|  WORD32 err = 0, i, k;
  912|    547|  WORD32 bit_size_len, ext_size_bits, bit_size;
  913|       |
  914|    547|  k = 0;
  915|    547|  str_drc_config_ext->drc_config_ext_type[k] =
  916|    547|      impd_read_bits_buf(it_bit_buff, 4);
  917|    547|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (917:7): [True: 1, False: 546]
  ------------------
  918|    837|  while (str_drc_config_ext->drc_config_ext_type[k] != UNIDRCCONFEXT_TERM) {
  ------------------
  |  |  173|    837|#define UNIDRCCONFEXT_TERM 0x0
  ------------------
  |  Branch (918:10): [True: 753, False: 84]
  ------------------
  919|    753|    if (k >= (EXT_COUNT_MAX - 1)) return UNEXPECTED_ERROR;
  ------------------
  |  |  170|    753|#define EXT_COUNT_MAX 8
  ------------------
                  if (k >= (EXT_COUNT_MAX - 1)) return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      2|#define UNEXPECTED_ERROR 2
  ------------------
  |  Branch (919:9): [True: 2, False: 751]
  ------------------
  920|    751|    bit_size_len = impd_read_bits_buf(it_bit_buff, 4);
  921|    751|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (921:9): [True: 3, False: 748]
  ------------------
  922|    748|    ext_size_bits = bit_size_len + 4;
  923|       |
  924|    748|    bit_size = impd_read_bits_buf(it_bit_buff, ext_size_bits);
  925|    748|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (925:9): [True: 1, False: 747]
  ------------------
  926|    747|    str_drc_config_ext->ext_bit_size[k] = bit_size + 1;
  927|       |
  928|    747|    switch (str_drc_config_ext->drc_config_ext_type[k]) {
  929|    144|      case UNIDRCCONFEXT_PARAM_DRC:
  ------------------
  |  |  176|    144|#define UNIDRCCONFEXT_PARAM_DRC 0x1
  ------------------
  |  Branch (929:7): [True: 144, False: 603]
  ------------------
  930|    144|        str_drc_config_ext->parametric_drc_present = 1;
  931|    144|        err = impd_parametic_drc_parse_coeff(
  932|    144|            it_bit_buff, drc_config,
  933|    144|            &(str_drc_config_ext->str_drc_coeff_param_drc));
  934|    144|        if (err) return (err);
  ------------------
  |  Branch (934:13): [True: 29, False: 115]
  ------------------
  935|    115|        str_drc_config_ext->parametric_drc_instructions_count =
  936|    115|            impd_read_bits_buf(it_bit_buff, 4);
  937|    115|        if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (937:13): [True: 1, False: 114]
  ------------------
  938|    114|        if (str_drc_config_ext->parametric_drc_instructions_count >
  ------------------
  |  Branch (938:13): [True: 2, False: 112]
  ------------------
  939|    114|            PARAM_DRC_INSTRUCTIONS_COUNT_MAX)
  ------------------
  |  |  178|    114|#define PARAM_DRC_INSTRUCTIONS_COUNT_MAX 8
  ------------------
  940|      2|          return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      2|#define UNEXPECTED_ERROR 2
  ------------------
  941|       |
  942|    647|        for (i = 0; i < str_drc_config_ext->parametric_drc_instructions_count;
  ------------------
  |  Branch (942:21): [True: 583, False: 64]
  ------------------
  943|    583|             i++) {
  944|    583|          err = impd_parse_parametric_drc_instructions(
  945|    583|              it_bit_buff, str_drc_config_ext->str_drc_coeff_param_drc
  946|    583|                               .parametric_drc_frame_size,
  947|    583|              &(str_drc_config_ext->str_parametric_drc_instructions[i]));
  948|    583|          if (err) return (err);
  ------------------
  |  Branch (948:15): [True: 48, False: 535]
  ------------------
  949|    583|        }
  950|     64|        break;
  951|    490|      case UNIDRCCONFEXT_V1:
  ------------------
  |  |  193|    490|#define UNIDRCCONFEXT_V1 0x2
  ------------------
  |  Branch (951:7): [True: 490, False: 257]
  ------------------
  952|    490|        str_drc_config_ext->drc_extension_v1_present = 1;
  953|    490|        err = impd_parse_drc_ext_v1(it_bit_buff, ia_drc_params_struct,
  954|    490|                                    drc_config, str_drc_config_ext);
  955|    490|        if (err) return (err);
  ------------------
  |  Branch (955:13): [True: 356, False: 134]
  ------------------
  956|    134|        break;
  957|       |
  958|    134|#ifdef LOUDNESS_LEVELING_SUPPORT
  959|    134|      case UNIDRCCONFEXT_LEVELING:
  ------------------
  |  |  197|     54|#define UNIDRCCONFEXT_LEVELING (0x4)
  ------------------
  |  Branch (959:7): [True: 54, False: 693]
  ------------------
  960|     54|        err = impd_leveling_instructions(it_bit_buff, drc_config);
  961|     54|        if (err) return err;
  ------------------
  |  Branch (961:13): [True: 1, False: 53]
  ------------------
  962|     53|        break;
  963|     53|#endif
  964|     59|      default:
  ------------------
  |  Branch (964:7): [True: 59, False: 688]
  ------------------
  965|  1.41k|        for (i = 0; i < str_drc_config_ext->ext_bit_size[k]; i++) {
  ------------------
  |  Branch (965:21): [True: 1.37k, False: 45]
  ------------------
  966|  1.37k|          impd_read_bits_buf(it_bit_buff, 1);
  967|  1.37k|          if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (967:15): [True: 14, False: 1.35k]
  ------------------
  968|  1.37k|        }
  969|     45|        break;
  970|    747|    }
  971|    296|    k++;
  972|    296|    str_drc_config_ext->drc_config_ext_type[k] =
  973|    296|        impd_read_bits_buf(it_bit_buff, 4);
  974|    296|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (974:9): [True: 5, False: 291]
  ------------------
  975|    296|  }
  976|       |
  977|     84|  return (0);
  978|    546|}
impd_drc_gen_instructions_derived_data:
 1043|    149|    ia_drc_instructions_struct* str_drc_instruction_str) {
 1044|    149|  WORD32 n, g;
 1045|    149|  ia_uni_drc_coeffs_struct* str_p_loc_drc_coefficients_uni_drc = NULL;
 1046|    149|  ia_drc_coeff_parametric_drc_struct* str_drc_coeff_param_drc = NULL;
 1047|    149|  WORD32 gain_element_count = 0;
 1048|       |
 1049|    272|  for (n = 0; n < drc_config->drc_coefficients_drc_count; n++) {
  ------------------
  |  Branch (1049:15): [True: 243, False: 29]
  ------------------
 1050|    243|    if (drc_config->str_p_loc_drc_coefficients_uni_drc[n].drc_location ==
  ------------------
  |  Branch (1050:9): [True: 120, False: 123]
  ------------------
 1051|    243|        str_drc_instruction_str->drc_location)
 1052|    120|      break;
 1053|    243|  }
 1054|    149|  if ((n == drc_config->drc_coefficients_drc_count) &&
  ------------------
  |  Branch (1054:7): [True: 29, False: 120]
  ------------------
 1055|     29|      (drc_config->drc_coefficients_drc_count > 0)) {
  ------------------
  |  Branch (1055:7): [True: 7, False: 22]
  ------------------
 1056|      7|    return -1;
 1057|      7|  }
 1058|    142|  str_p_loc_drc_coefficients_uni_drc =
 1059|    142|      &(drc_config->str_p_loc_drc_coefficients_uni_drc[n]);
 1060|       |
 1061|    142|  if (drc_config->drc_config_ext_present &&
  ------------------
  |  Branch (1061:7): [True: 78, False: 64]
  ------------------
 1062|     78|      drc_config->str_drc_config_ext.parametric_drc_present &&
  ------------------
  |  Branch (1062:7): [True: 12, False: 66]
  ------------------
 1063|     12|      drc_config->str_drc_config_ext.str_drc_coeff_param_drc.drc_location ==
  ------------------
  |  Branch (1063:7): [True: 6, False: 6]
  ------------------
 1064|     12|          str_drc_instruction_str->drc_location) {
 1065|      6|    str_drc_coeff_param_drc =
 1066|      6|        &drc_config->str_drc_config_ext.str_drc_coeff_param_drc;
 1067|      6|  }
 1068|       |
 1069|    198|  for (g = 0; g < str_drc_instruction_str->num_drc_ch_groups; g++) {
  ------------------
  |  Branch (1069:15): [True: 67, False: 131]
  ------------------
 1070|     67|    WORD32 seq = str_drc_instruction_str->gain_set_index_for_channel_group[g];
 1071|     67|    if (seq != -1 &&
  ------------------
  |  Branch (1071:9): [True: 67, False: 0]
  ------------------
 1072|     67|        (drc_config->drc_coefficients_drc_count == 0 ||
  ------------------
  |  Branch (1072:10): [True: 4, False: 63]
  ------------------
 1073|     63|         seq >= str_p_loc_drc_coefficients_uni_drc->gain_set_count)) {
  ------------------
  |  Branch (1073:10): [True: 14, False: 49]
  ------------------
 1074|     18|      str_drc_instruction_str->ch_group_parametric_drc_flag[g] = 1;
 1075|     18|      if (drc_config->drc_coefficients_drc_count != 0) {
  ------------------
  |  Branch (1075:11): [True: 14, False: 4]
  ------------------
 1076|     14|        seq = seq - str_p_loc_drc_coefficients_uni_drc->gain_set_count;
 1077|     14|      }
 1078|     18|      str_drc_instruction_str->gain_set_idx_of_ch_group_parametric_drc[g] = seq;
 1079|       |
 1080|     18|      if (str_drc_coeff_param_drc == NULL ||
  ------------------
  |  Branch (1080:11): [True: 11, False: 7]
  ------------------
 1081|     11|          seq >= str_drc_coeff_param_drc->parametric_drc_gain_set_count) {
  ------------------
  |  Branch (1081:11): [True: 0, False: 7]
  ------------------
 1082|       |        /* parametric drc gain set not available */
 1083|     11|        return (EXTERNAL_ERROR);
  ------------------
  |  |  130|     11|#define EXTERNAL_ERROR 4
  ------------------
 1084|     11|      }
 1085|      7|      str_drc_instruction_str->gain_interpolation_type_for_channel_group[g] = 1;
 1086|      7|      str_drc_instruction_str->time_delta_min_for_channel_group[g] =
 1087|      7|          str_drc_coeff_param_drc->parametric_drc_frame_size;
 1088|      7|      str_drc_instruction_str->time_alignment_for_channel_group[g] = 0;
 1089|     49|    } else {
 1090|     49|      str_drc_instruction_str->ch_group_parametric_drc_flag[g] = 0;
 1091|     49|    }
 1092|     56|    if (str_drc_instruction_str->ch_group_parametric_drc_flag[g] == 0) {
  ------------------
  |  Branch (1092:9): [True: 49, False: 7]
  ------------------
 1093|     49|      if (seq >= str_p_loc_drc_coefficients_uni_drc->gain_set_count) {
  ------------------
  |  Branch (1093:11): [True: 0, False: 49]
  ------------------
 1094|      0|        return -1;
 1095|      0|      }
 1096|     49|      str_drc_instruction_str->gain_interpolation_type_for_channel_group[g] =
 1097|     49|          str_p_loc_drc_coefficients_uni_drc->gain_set_params[seq]
 1098|     49|              .gain_interpolation_type;
 1099|     49|      if (str_p_loc_drc_coefficients_uni_drc->gain_set_params[seq]
  ------------------
  |  Branch (1099:11): [True: 10, False: 39]
  ------------------
 1100|     49|              .time_delt_min_flag) {
 1101|     10|        str_drc_instruction_str->time_delta_min_for_channel_group[g] =
 1102|     10|            str_p_loc_drc_coefficients_uni_drc->gain_set_params[seq]
 1103|     10|                .time_delt_min_val;
 1104|     39|      } else {
 1105|     39|        str_drc_instruction_str->time_delta_min_for_channel_group[g] =
 1106|     39|            ia_drc_params_struct->delta_tmin_default;
 1107|     39|      }
 1108|     49|      str_drc_instruction_str->time_alignment_for_channel_group[g] =
 1109|     49|          str_p_loc_drc_coefficients_uni_drc->gain_set_params[seq]
 1110|     49|              .time_alignment;
 1111|     49|    }
 1112|     56|  }
 1113|       |
 1114|    131|  if (str_drc_instruction_str->drc_set_effect &
  ------------------
  |  Branch (1114:7): [True: 7, False: 124]
  ------------------
 1115|    131|      (EFFECT_BIT_DUCK_OTHER | EFFECT_BIT_DUCK_SELF)) {
  ------------------
  |  |   72|    131|#define EFFECT_BIT_DUCK_OTHER 0x0400
  ------------------
                    (EFFECT_BIT_DUCK_OTHER | EFFECT_BIT_DUCK_SELF)) {
  ------------------
  |  |   73|    131|#define EFFECT_BIT_DUCK_SELF 0x0800
  ------------------
 1116|      7|    str_drc_instruction_str->gain_element_count =
 1117|      7|        str_drc_instruction_str->num_drc_ch_groups;
 1118|    124|  } else {
 1119|    177|    for (g = 0; g < str_drc_instruction_str->num_drc_ch_groups; g++) {
  ------------------
  |  Branch (1119:17): [True: 53, False: 124]
  ------------------
 1120|     53|      if (str_drc_instruction_str->ch_group_parametric_drc_flag[g] == 1) {
  ------------------
  |  Branch (1120:11): [True: 7, False: 46]
  ------------------
 1121|      7|        gain_element_count++;
 1122|      7|        str_drc_instruction_str->band_count_of_ch_group[g] = 1;
 1123|     46|      } else {
 1124|     46|        WORD32 seq, band_count;
 1125|     46|        seq = str_drc_instruction_str->gain_set_index_for_channel_group[g];
 1126|     46|        band_count =
 1127|     46|            str_p_loc_drc_coefficients_uni_drc->gain_set_params[seq].band_count;
 1128|     46|        str_drc_instruction_str->band_count_of_ch_group[g] = band_count;
 1129|     46|        gain_element_count += band_count;
 1130|     46|      }
 1131|     53|    }
 1132|    124|    str_drc_instruction_str->gain_element_count = gain_element_count;
 1133|    124|  }
 1134|       |
 1135|    131|  return (0);
 1136|    142|}
impd_parse_drc_config:
 1141|  1.54k|                      ia_drc_config* drc_config) {
 1142|  1.54k|  WORD32 i, err = 0, temp;
 1143|  1.54k|  WORD32 version = 0;
 1144|       |
 1145|  1.54k|  drc_config->sample_rate_present = impd_read_bits_buf(it_bit_buff, 1);
 1146|  1.54k|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1146:7): [True: 302, False: 1.24k]
  ------------------
 1147|       |
 1148|  1.24k|  if (drc_config->sample_rate_present == 1) {
  ------------------
  |  Branch (1148:7): [True: 451, False: 790]
  ------------------
 1149|    451|    WORD32 bssample_rate;
 1150|    451|    bssample_rate = impd_read_bits_buf(it_bit_buff, 18);
 1151|    451|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1151:9): [True: 0, False: 451]
  ------------------
 1152|    451|    drc_config->sampling_rate = bssample_rate + 1000;
 1153|    451|  }
 1154|       |
 1155|  1.24k|  temp = impd_read_bits_buf(it_bit_buff, 8);
 1156|  1.24k|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1156:7): [True: 392, False: 849]
  ------------------
 1157|       |
 1158|    849|  drc_config->dwnmix_instructions_count = (temp >> 1) & 0x7f;
 1159|    849|  if (drc_config->dwnmix_instructions_count > DOWNMIX_INSTRUCTION_COUNT_MAX)
  ------------------
  |  |   41|    849|#define DOWNMIX_INSTRUCTION_COUNT_MAX 16
  ------------------
  |  Branch (1159:7): [True: 2, False: 847]
  ------------------
 1160|      2|    return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      2|#define UNEXPECTED_ERROR 2
  ------------------
 1161|       |
 1162|    847|  drc_config->drc_description_basic_present = temp & 1;
 1163|       |
 1164|    847|  if (drc_config->drc_description_basic_present == 1) {
  ------------------
  |  Branch (1164:7): [True: 159, False: 688]
  ------------------
 1165|    159|    temp = impd_read_bits_buf(it_bit_buff, 7);
 1166|    159|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1166:9): [True: 1, False: 158]
  ------------------
 1167|       |
 1168|    158|    drc_config->drc_coefficients_basic_count = (temp >> 4) & 7;
 1169|    158|    drc_config->drc_instructions_basic_count = temp & 0xf;
 1170|       |
 1171|    688|  } else {
 1172|    688|    drc_config->drc_coefficients_basic_count = 0;
 1173|    688|    drc_config->drc_instructions_basic_count = 0;
 1174|    688|  }
 1175|       |
 1176|    846|  temp = impd_read_bits_buf(it_bit_buff, 9);
 1177|    846|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1177:7): [True: 16, False: 830]
  ------------------
 1178|       |
 1179|    830|  drc_config->drc_coefficients_drc_count = (temp >> 6) & 7;
 1180|    830|  drc_config->drc_instructions_uni_drc_count = temp & 0x3f;
 1181|       |
 1182|    830|  if (drc_config->drc_instructions_uni_drc_count > DRC_INSTRUCTIONS_COUNT_MAX)
  ------------------
  |  |   43|    830|#define DRC_INSTRUCTIONS_COUNT_MAX (DOWNMIX_INSTRUCTION_COUNT_MAX + 20)
  |  |  ------------------
  |  |  |  |   41|    830|#define DOWNMIX_INSTRUCTION_COUNT_MAX 16
  |  |  ------------------
  ------------------
  |  Branch (1182:7): [True: 2, False: 828]
  ------------------
 1183|      2|    return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      2|#define UNEXPECTED_ERROR 2
  ------------------
 1184|       |
 1185|    828|  err = impd_parse_ch_layout(it_bit_buff, ia_drc_params_struct,
 1186|    828|                             &drc_config->channel_layout);
 1187|    828|  if (err) return (err);
  ------------------
  |  Branch (1187:7): [True: 16, False: 812]
  ------------------
 1188|       |
 1189|  1.05k|  for (i = 0; i < drc_config->dwnmix_instructions_count; i++) {
  ------------------
  |  Branch (1189:15): [True: 250, False: 800]
  ------------------
 1190|    250|    err = impd_parse_dwnmix_instructions(
 1191|    250|        it_bit_buff, version, ia_drc_params_struct, &drc_config->channel_layout,
 1192|    250|        &(drc_config->dwnmix_instructions[i]));
 1193|    250|    if (err) return (err);
  ------------------
  |  Branch (1193:9): [True: 12, False: 238]
  ------------------
 1194|    250|  }
 1195|  1.26k|  for (i = 0; i < drc_config->drc_coefficients_basic_count; i++) {
  ------------------
  |  Branch (1195:15): [True: 534, False: 731]
  ------------------
 1196|    534|    temp = impd_read_bits_buf(it_bit_buff, 11);
 1197|    534|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1197:9): [True: 69, False: 465]
  ------------------
 1198|       |
 1199|    465|    drc_config->str_drc_coefficients_basic[i].drc_location = (temp >> 7) & 0xf;
 1200|    465|    drc_config->str_drc_coefficients_basic[i].drc_characteristic = temp & 0x3f;
 1201|    465|  }
 1202|    930|  for (i = 0; i < drc_config->drc_instructions_basic_count; i++) {
  ------------------
  |  Branch (1202:15): [True: 219, False: 711]
  ------------------
 1203|    219|    err = impd_drc_parse_instructions_basic(
 1204|    219|        it_bit_buff, &(drc_config->str_drc_instructions_basic[i]));
 1205|    219|    if (err) return (err);
  ------------------
  |  Branch (1205:9): [True: 20, False: 199]
  ------------------
 1206|    219|  }
 1207|    945|  for (i = 0; i < drc_config->drc_coefficients_drc_count; i++) {
  ------------------
  |  Branch (1207:15): [True: 271, False: 674]
  ------------------
 1208|    271|    err = impd_drc_parse_coeff(
 1209|    271|        it_bit_buff, version, ia_drc_params_struct,
 1210|    271|        &(drc_config->str_p_loc_drc_coefficients_uni_drc[i]));
 1211|    271|    if (err) return (err);
  ------------------
  |  Branch (1211:9): [True: 37, False: 234]
  ------------------
 1212|    271|  }
 1213|  1.23k|  for (i = 0; i < drc_config->drc_instructions_uni_drc_count; i++) {
  ------------------
  |  Branch (1213:15): [True: 663, False: 570]
  ------------------
 1214|    663|    err = impd_parse_drc_instructions_uni_drc(
 1215|    663|        it_bit_buff, version, drc_config,
 1216|    663|        &(drc_config->str_drc_instruction_str[i]));
 1217|    663|    if (err) return (err);
  ------------------
  |  Branch (1217:9): [True: 104, False: 559]
  ------------------
 1218|    663|  }
 1219|       |
 1220|    570|  drc_config->drc_config_ext_present = impd_read_bits_buf(it_bit_buff, 1);
 1221|    570|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1221:7): [True: 3, False: 567]
  ------------------
 1222|       |
 1223|    567|  if (drc_config->drc_config_ext_present == 1) {
  ------------------
  |  Branch (1223:7): [True: 547, False: 20]
  ------------------
 1224|    547|    err =
 1225|    547|        impd_parse_drc_config_ext(it_bit_buff, ia_drc_params_struct, drc_config,
 1226|    547|                                  &(drc_config->str_drc_config_ext));
 1227|    547|    if (err) return (err);
  ------------------
  |  Branch (1227:9): [True: 463, False: 84]
  ------------------
 1228|    547|  }
 1229|       |
 1230|    104|  if (drc_config->str_drc_config_ext.parametric_drc_present) {
  ------------------
  |  Branch (1230:7): [True: 37, False: 67]
  ------------------
 1231|     37|    err = impd_parametric_drc_gen_virtual_gain_sets(drc_config);
 1232|     37|    if (err) return (err);
  ------------------
  |  Branch (1232:9): [True: 21, False: 16]
  ------------------
 1233|     37|  }
 1234|       |
 1235|    214|  for (i = 0; i < drc_config->drc_instructions_uni_drc_count; i++) {
  ------------------
  |  Branch (1235:15): [True: 149, False: 65]
  ------------------
 1236|    149|    err = impd_drc_gen_instructions_derived_data(
 1237|    149|        drc_config, ia_drc_params_struct,
 1238|    149|        &(drc_config->str_drc_instruction_str[i]));
 1239|    149|    if (err) return (err);
  ------------------
  |  Branch (1239:9): [True: 18, False: 131]
  ------------------
 1240|    149|  }
 1241|       |
 1242|     65|  if ((drc_config->drc_instructions_uni_drc_count +
  ------------------
  |  Branch (1242:7): [True: 0, False: 65]
  ------------------
 1243|     65|       drc_config->dwnmix_instructions_count) >= DRC_INSTRUCTIONS_COUNT_MAX)
  ------------------
  |  |   43|     65|#define DRC_INSTRUCTIONS_COUNT_MAX (DOWNMIX_INSTRUCTION_COUNT_MAX + 20)
  |  |  ------------------
  |  |  |  |   41|     65|#define DOWNMIX_INSTRUCTION_COUNT_MAX 16
  |  |  ------------------
  ------------------
 1244|      0|    return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
 1245|     65|  impd_drc_gen_instructions_for_drc_off(drc_config);
 1246|     65|  return (0);
 1247|     65|}
impd_dec_method_value:
 1251|  4.85k|                      FLOAT32* method_val) {
 1252|       |  // WORD32 err = 0;
 1253|  4.85k|  WORD32 tmp;
 1254|  4.85k|  FLOAT32 val;
 1255|  4.85k|  switch (method_def) {
 1256|  2.46k|    case METHOD_DEFINITION_UNKNOWN_OTHER:
  ------------------
  |  |   27|  2.46k|#define METHOD_DEFINITION_UNKNOWN_OTHER 0
  ------------------
  |  Branch (1256:5): [True: 2.46k, False: 2.39k]
  ------------------
 1257|  3.15k|    case METHOD_DEFINITION_PROGRAM_LOUDNESS:
  ------------------
  |  |   28|  3.15k|#define METHOD_DEFINITION_PROGRAM_LOUDNESS 1
  ------------------
  |  Branch (1257:5): [True: 697, False: 4.16k]
  ------------------
 1258|  3.54k|    case METHOD_DEFINITION_ANCHOR_LOUDNESS:
  ------------------
  |  |   29|  3.54k|#define METHOD_DEFINITION_ANCHOR_LOUDNESS 2
  ------------------
  |  Branch (1258:5): [True: 387, False: 4.47k]
  ------------------
 1259|  3.64k|    case METHOD_DEFINITION_MAX_OF_LOUDNESS_RANGE:
  ------------------
  |  |   30|  3.64k|#define METHOD_DEFINITION_MAX_OF_LOUDNESS_RANGE 3
  ------------------
  |  Branch (1259:5): [True: 102, False: 4.75k]
  ------------------
 1260|  4.09k|    case METHOD_DEFINITION_MOMENTARY_LOUDNESS_MAX:
  ------------------
  |  |   31|  4.09k|#define METHOD_DEFINITION_MOMENTARY_LOUDNESS_MAX 4
  ------------------
  |  Branch (1260:5): [True: 450, False: 4.40k]
  ------------------
 1261|  4.23k|    case METHOD_DEFINITION_SHORT_TERM_LOUDNESS_MAX:
  ------------------
  |  |   32|  4.23k|#define METHOD_DEFINITION_SHORT_TERM_LOUDNESS_MAX 5
  ------------------
  |  Branch (1261:5): [True: 143, False: 4.71k]
  ------------------
 1262|  4.23k|      tmp = impd_read_bits_buf(it_bit_buff, 8);
 1263|  4.23k|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1263:11): [True: 1, False: 4.23k]
  ------------------
 1264|  4.23k|      val = -57.75f + tmp * 0.25f;
 1265|  4.23k|      break;
 1266|     83|    case METHOD_DEFINITION_LOUDNESS_RANGE:
  ------------------
  |  |   33|     83|#define METHOD_DEFINITION_LOUDNESS_RANGE 6
  ------------------
  |  Branch (1266:5): [True: 83, False: 4.77k]
  ------------------
 1267|     83|      tmp = impd_read_bits_buf(it_bit_buff, 8);
 1268|     83|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1268:11): [True: 1, False: 82]
  ------------------
 1269|     82|      if (tmp == 0)
  ------------------
  |  Branch (1269:11): [True: 36, False: 46]
  ------------------
 1270|     36|        val = 0.0f;
 1271|     46|      else if (tmp <= 128)
  ------------------
  |  Branch (1271:16): [True: 26, False: 20]
  ------------------
 1272|     26|        val = tmp * 0.25f;
 1273|     20|      else if (tmp <= 204)
  ------------------
  |  Branch (1273:16): [True: 17, False: 3]
  ------------------
 1274|     17|        val = 0.5f * tmp - 32.0f;
 1275|      3|      else
 1276|      3|        val = tmp - 134.0f;
 1277|     82|      break;
 1278|     48|    case METHOD_DEFINITION_MIXING_LEVEL:
  ------------------
  |  |   34|     48|#define METHOD_DEFINITION_MIXING_LEVEL 7
  ------------------
  |  Branch (1278:5): [True: 48, False: 4.80k]
  ------------------
 1279|     48|      tmp = impd_read_bits_buf(it_bit_buff, 5);
 1280|     48|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1280:11): [True: 0, False: 48]
  ------------------
 1281|     48|      val = tmp + 80.0f;
 1282|     48|      break;
 1283|    398|    case METHOD_DEFINITION_ROOM_TYPE:
  ------------------
  |  |   35|    398|#define METHOD_DEFINITION_ROOM_TYPE 8
  ------------------
  |  Branch (1283:5): [True: 398, False: 4.45k]
  ------------------
 1284|    398|      tmp = impd_read_bits_buf(it_bit_buff, 2);
 1285|    398|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1285:11): [True: 3, False: 395]
  ------------------
 1286|    395|      val = (FLOAT32)tmp;
 1287|    395|      break;
 1288|     75|    case METHOD_DEFINITION_SHORT_TERM_LOUDNESS:
  ------------------
  |  |   36|     75|#define METHOD_DEFINITION_SHORT_TERM_LOUDNESS 9
  ------------------
  |  Branch (1288:5): [True: 75, False: 4.78k]
  ------------------
 1289|     75|      tmp = impd_read_bits_buf(it_bit_buff, 8);
 1290|     75|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1290:11): [True: 3, False: 72]
  ------------------
 1291|     72|      val = -116.f + tmp * 0.5f;
 1292|     72|      break;
 1293|     14|    default:
  ------------------
  |  Branch (1293:5): [True: 14, False: 4.84k]
  ------------------
 1294|     14|      return -1;
 1295|      0|      break;
 1296|  4.85k|  }
 1297|  4.83k|  *method_val = val;
 1298|  4.83k|  return 0;
 1299|  4.85k|}
impd_parse_loudness_info_set:
 1304|  1.29k|    ia_drc_loudness_info_set_struct* loudness_info_set) {
 1305|  1.29k|  WORD32 err = 0, i, version = 0, offset, temp;
 1306|  1.29k|  WORD32 loudness_info_album_count, loudness_info_count;
 1307|       |
 1308|  1.29k|  temp = impd_read_bits_buf(it_bit_buff, 12);
 1309|  1.29k|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1309:7): [True: 505, False: 786]
  ------------------
 1310|       |
 1311|    786|  loudness_info_album_count = (temp >> 6) & 0x3f;
 1312|    786|  loudness_info_count = temp & 0x3f;
 1313|       |
 1314|    786|  offset = loudness_info_set->loudness_info_album_count;
 1315|    786|  loudness_info_set->loudness_info_album_count += loudness_info_album_count;
 1316|    786|  if ((offset + loudness_info_set->loudness_info_album_count) >
  ------------------
  |  Branch (1316:7): [True: 106, False: 680]
  ------------------
 1317|    786|      LOUDNESS_INFO_COUNT_MAX)
  ------------------
  |  |   44|    786|#define LOUDNESS_INFO_COUNT_MAX (DOWNMIX_INSTRUCTION_COUNT_MAX + 20)
  |  |  ------------------
  |  |  |  |   41|    786|#define DOWNMIX_INSTRUCTION_COUNT_MAX 16
  |  |  ------------------
  ------------------
 1318|    106|    return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|    106|#define UNEXPECTED_ERROR 2
  ------------------
 1319|    830|  for (i = 0; i < loudness_info_set->loudness_info_album_count; i++) {
  ------------------
  |  Branch (1319:15): [True: 190, False: 640]
  ------------------
 1320|    190|    err = impd_parse_loudness_info(
 1321|    190|        it_bit_buff, version,
 1322|    190|        &(loudness_info_set->str_loudness_info_album[i + offset]));
 1323|    190|    if (err) return (err);
  ------------------
  |  Branch (1323:9): [True: 40, False: 150]
  ------------------
 1324|    190|  }
 1325|       |
 1326|    640|  offset = loudness_info_set->loudness_info_count;
 1327|    640|  loudness_info_set->loudness_info_count += loudness_info_count;
 1328|    640|  if ((offset + loudness_info_set->loudness_info_count) >
  ------------------
  |  Branch (1328:7): [True: 1, False: 639]
  ------------------
 1329|    640|      LOUDNESS_INFO_COUNT_MAX)
  ------------------
  |  |   44|    640|#define LOUDNESS_INFO_COUNT_MAX (DOWNMIX_INSTRUCTION_COUNT_MAX + 20)
  |  |  ------------------
  |  |  |  |   41|    640|#define DOWNMIX_INSTRUCTION_COUNT_MAX 16
  |  |  ------------------
  ------------------
 1330|      1|    return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      1|#define UNEXPECTED_ERROR 2
  ------------------
 1331|  4.54k|  for (i = 0; i < loudness_info_set->loudness_info_count; i++) {
  ------------------
  |  Branch (1331:15): [True: 3.91k, False: 626]
  ------------------
 1332|  3.91k|    err = impd_parse_loudness_info(
 1333|  3.91k|        it_bit_buff, version, &(loudness_info_set->loudness_info[i + offset]));
 1334|  3.91k|    if (err) return (err);
  ------------------
  |  Branch (1334:9): [True: 13, False: 3.90k]
  ------------------
 1335|  3.91k|  }
 1336|       |
 1337|    626|  loudness_info_set->loudness_info_set_ext_present =
 1338|    626|      impd_read_bits_buf(it_bit_buff, 1);
 1339|    626|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1339:7): [True: 1, False: 625]
  ------------------
 1340|       |
 1341|    625|  if (loudness_info_set->loudness_info_set_ext_present == 1) {
  ------------------
  |  Branch (1341:7): [True: 68, False: 557]
  ------------------
 1342|     68|    err = impd_parse_loudness_info_set_ext(it_bit_buff, loudness_info_set);
 1343|     68|    if (err) return (err);
  ------------------
  |  Branch (1343:9): [True: 24, False: 44]
  ------------------
 1344|     68|  }
 1345|       |
 1346|    601|  return (0);
 1347|    625|}
impd_parse_gain_set_params_characteristics:
 1352|  1.83k|                                           ia_gain_params_struct* gain_params) {
 1353|       |  // WORD32 err = 0;
 1354|  1.83k|  WORD32 temp;
 1355|  1.83k|  if (version == 0) {
  ------------------
  |  Branch (1355:7): [True: 896, False: 943]
  ------------------
 1356|    896|    gain_params->drc_characteristic = impd_read_bits_buf(it_bit_buff, 7);
 1357|    896|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1357:9): [True: 10, False: 886]
  ------------------
 1358|    886|    if (gain_params->drc_characteristic > 0) {
  ------------------
  |  Branch (1358:9): [True: 712, False: 174]
  ------------------
 1359|    712|      gain_params->drc_characteristic_present = 1;
 1360|    712|      gain_params->drc_characteristic_format_is_cicp = 1;
 1361|    712|    } else {
 1362|    174|      gain_params->drc_characteristic_present = 0;
 1363|    174|    }
 1364|    943|  } else {
 1365|    943|    gain_params->drc_characteristic_present =
 1366|    943|        impd_read_bits_buf(it_bit_buff, 1);
 1367|    943|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1367:9): [True: 2, False: 941]
  ------------------
 1368|    941|    if (gain_params->drc_characteristic_present) {
  ------------------
  |  Branch (1368:9): [True: 239, False: 702]
  ------------------
 1369|    239|      gain_params->drc_characteristic_format_is_cicp =
 1370|    239|          impd_read_bits_buf(it_bit_buff, 1);
 1371|    239|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1371:11): [True: 1, False: 238]
  ------------------
 1372|    238|      if (gain_params->drc_characteristic_format_is_cicp) {
  ------------------
  |  Branch (1372:11): [True: 92, False: 146]
  ------------------
 1373|     92|        gain_params->drc_characteristic = impd_read_bits_buf(it_bit_buff, 7);
 1374|     92|        if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1374:13): [True: 1, False: 91]
  ------------------
 1375|    146|      } else {
 1376|    146|        temp = impd_read_bits_buf(it_bit_buff, 8);
 1377|    146|        if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1377:13): [True: 1, False: 145]
  ------------------
 1378|       |
 1379|    145|        gain_params->drc_characteristic_left_index = (temp >> 4) & 0xf;
 1380|    145|        gain_params->drc_characteristic_right_index = temp & 0xf;
 1381|    145|      }
 1382|    238|    }
 1383|    941|  }
 1384|  1.82k|  return (0);
 1385|  1.83k|}
impd_parse_loudness_measure:
 1389|  4.86k|                            ia_loudness_measure_struct* loudness_measure) {
 1390|  4.86k|  WORD32 err = 0, temp;
 1391|       |
 1392|  4.86k|  loudness_measure->method_def = impd_read_bits_buf(it_bit_buff, 4);
 1393|  4.86k|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1393:7): [True: 5, False: 4.85k]
  ------------------
 1394|       |
 1395|  4.85k|  err = impd_dec_method_value(it_bit_buff, loudness_measure->method_def,
 1396|  4.85k|                              &(loudness_measure->method_val));
 1397|  4.85k|  if (err) return err;
  ------------------
  |  Branch (1397:7): [True: 22, False: 4.83k]
  ------------------
 1398|       |
 1399|  4.83k|  temp = impd_read_bits_buf(it_bit_buff, 6);
 1400|  4.83k|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1400:7): [True: 5, False: 4.83k]
  ------------------
 1401|       |
 1402|  4.83k|  loudness_measure->measurement_system = (temp >> 2) & 0xf;
 1403|  4.83k|  if (loudness_measure->measurement_system > MEASUREMENT_SYSTEM_RESERVED_E)
  ------------------
  |  |   52|  4.83k|#define MEASUREMENT_SYSTEM_RESERVED_E 11
  ------------------
  |  Branch (1403:7): [True: 7, False: 4.82k]
  ------------------
 1404|      7|    return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      7|#define UNEXPECTED_ERROR 2
  ------------------
 1405|       |  /* Parsed but unused */
 1406|  4.82k|  loudness_measure->reliability = temp & 3;
 1407|       |
 1408|  4.82k|  return (0);
 1409|  4.83k|}
impd_dec_gain_modifiers:
 1414|    551|                        ia_gain_modifiers_struct* pstr_gain_modifiers) {
 1415|       |  // WORD32 err = 0;
 1416|    551|  WORD32 sign, temp;
 1417|       |
 1418|    551|  if (version > 0) {
  ------------------
  |  Branch (1418:7): [True: 302, False: 249]
  ------------------
 1419|    302|    WORD32 b;
 1420|    599|    for (b = 0; b < band_count; b++) {
  ------------------
  |  Branch (1420:17): [True: 311, False: 288]
  ------------------
 1421|    311|      pstr_gain_modifiers->target_characteristic_left_present[b] =
 1422|    311|          impd_read_bits_buf(it_bit_buff, 1);
 1423|    311|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1423:11): [True: 1, False: 310]
  ------------------
 1424|    310|      if (pstr_gain_modifiers->target_characteristic_left_present[b]) {
  ------------------
  |  Branch (1424:11): [True: 50, False: 260]
  ------------------
 1425|     50|        WORD32 tmp_index = impd_read_bits_buf(it_bit_buff, 4);
 1426|     50|        if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1426:13): [True: 1, False: 49]
  ------------------
 1427|     49|        if (tmp_index >= SPLIT_CHARACTERISTIC_COUNT_MAX)
  ------------------
  |  |   90|     49|#define SPLIT_CHARACTERISTIC_COUNT_MAX 8
  ------------------
  |  Branch (1427:13): [True: 3, False: 46]
  ------------------
 1428|      3|          return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      3|#define UNEXPECTED_ERROR 2
  ------------------
 1429|     46|        pstr_gain_modifiers->target_characteristic_left_index[b] = tmp_index;
 1430|     46|      }
 1431|    306|      pstr_gain_modifiers->target_characteristic_right_present[b] =
 1432|    306|          impd_read_bits_buf(it_bit_buff, 1);
 1433|    306|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1433:11): [True: 3, False: 303]
  ------------------
 1434|    303|      if (pstr_gain_modifiers->target_characteristic_right_present[b]) {
  ------------------
  |  Branch (1434:11): [True: 47, False: 256]
  ------------------
 1435|     47|        WORD32 tmp_index = impd_read_bits_buf(it_bit_buff, 4);
 1436|     47|        if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1436:13): [True: 1, False: 46]
  ------------------
 1437|     46|        if (tmp_index >= SPLIT_CHARACTERISTIC_COUNT_MAX)
  ------------------
  |  |   90|     46|#define SPLIT_CHARACTERISTIC_COUNT_MAX 8
  ------------------
  |  Branch (1437:13): [True: 1, False: 45]
  ------------------
 1438|      1|          return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      1|#define UNEXPECTED_ERROR 2
  ------------------
 1439|     45|        pstr_gain_modifiers->target_characteristic_right_index[b] = tmp_index;
 1440|     45|      }
 1441|    301|      pstr_gain_modifiers->gain_scaling_flag[b] =
 1442|    301|          impd_read_bits_buf(it_bit_buff, 1);
 1443|    301|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1443:11): [True: 1, False: 300]
  ------------------
 1444|    300|      if (pstr_gain_modifiers->gain_scaling_flag[b]) {
  ------------------
  |  Branch (1444:11): [True: 40, False: 260]
  ------------------
 1445|     40|        temp = impd_read_bits_buf(it_bit_buff, 8);
 1446|     40|        if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1446:13): [True: 1, False: 39]
  ------------------
 1447|       |
 1448|     39|        pstr_gain_modifiers->attn_scaling[b] = ((temp >> 4) & 0xf) * 0.125f;
 1449|     39|        pstr_gain_modifiers->ampl_scaling[b] = (temp & 0xf) * 0.125f;
 1450|     39|      }
 1451|       |
 1452|    299|      pstr_gain_modifiers->gain_offset_flag[b] =
 1453|    299|          impd_read_bits_buf(it_bit_buff, 1);
 1454|    299|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1454:11): [True: 1, False: 298]
  ------------------
 1455|    298|      if (pstr_gain_modifiers->gain_offset_flag[b]) {
  ------------------
  |  Branch (1455:11): [True: 48, False: 250]
  ------------------
 1456|     48|        FLOAT32 gain_offset;
 1457|     48|        temp = impd_read_bits_buf(it_bit_buff, 6);
 1458|     48|        if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1458:13): [True: 1, False: 47]
  ------------------
 1459|       |
 1460|     47|        sign = ((temp >> 5) & 1);
 1461|     47|        gain_offset = (1 + (temp & 0x1f)) * 0.25f;
 1462|       |
 1463|     47|        if (sign) {
  ------------------
  |  Branch (1463:13): [True: 13, False: 34]
  ------------------
 1464|     13|          gain_offset = -gain_offset;
 1465|     13|        }
 1466|     47|        pstr_gain_modifiers->gain_offset[b] = gain_offset;
 1467|     47|      }
 1468|    298|    }
 1469|    288|    if (band_count == 1) {
  ------------------
  |  Branch (1469:9): [True: 265, False: 23]
  ------------------
 1470|    265|      WORD32 tmp;
 1471|    265|      pstr_gain_modifiers->shape_filter_flag =
 1472|    265|          impd_read_bits_buf(it_bit_buff, 1);
 1473|    265|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1473:11): [True: 2, False: 263]
  ------------------
 1474|    263|      if (pstr_gain_modifiers->shape_filter_flag) {
  ------------------
  |  Branch (1474:11): [True: 42, False: 221]
  ------------------
 1475|     42|        tmp = impd_read_bits_buf(it_bit_buff, 4);
 1476|     42|        if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1476:13): [True: 1, False: 41]
  ------------------
 1477|     41|        if (tmp >= (SHAPE_FILTER_COUNT_MAX + 1)) return UNEXPECTED_ERROR;
  ------------------
  |  |   92|     41|#define SHAPE_FILTER_COUNT_MAX 8
  ------------------
                      if (tmp >= (SHAPE_FILTER_COUNT_MAX + 1)) return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      1|#define UNEXPECTED_ERROR 2
  ------------------
  |  Branch (1477:13): [True: 1, False: 40]
  ------------------
 1478|     40|        pstr_gain_modifiers->shape_filter_idx = tmp;
 1479|     40|      }
 1480|    263|    }
 1481|    288|  } else if (version == 0) {
  ------------------
  |  Branch (1481:14): [True: 249, False: 0]
  ------------------
 1482|    249|    WORD32 b, gain_scaling_flag, gain_offset_flag;
 1483|    249|    FLOAT32 attn_scaling = 1.0f, ampl_scaling = 1.0f, gain_offset = 0.0f;
 1484|       |
 1485|    249|    gain_scaling_flag = impd_read_bits_buf(it_bit_buff, 1);
 1486|    249|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1486:9): [True: 2, False: 247]
  ------------------
 1487|    247|    if (gain_scaling_flag) {
  ------------------
  |  Branch (1487:9): [True: 43, False: 204]
  ------------------
 1488|     43|      temp = impd_read_bits_buf(it_bit_buff, 8);
 1489|     43|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1489:11): [True: 1, False: 42]
  ------------------
 1490|       |
 1491|     42|      attn_scaling = ((temp >> 4) & 0xf) * 0.125f;
 1492|     42|      ampl_scaling = (temp & 0xf) * 0.125f;
 1493|     42|    }
 1494|       |
 1495|    246|    gain_offset_flag = impd_read_bits_buf(it_bit_buff, 1);
 1496|    246|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1496:9): [True: 1, False: 245]
  ------------------
 1497|    245|    if (gain_offset_flag) {
  ------------------
  |  Branch (1497:9): [True: 47, False: 198]
  ------------------
 1498|     47|      temp = impd_read_bits_buf(it_bit_buff, 6);
 1499|     47|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1499:11): [True: 1, False: 46]
  ------------------
 1500|       |
 1501|     46|      sign = ((temp >> 5) & 1);
 1502|     46|      gain_offset = (1 + (temp & 0x1f)) * 0.25f;
 1503|       |
 1504|     46|      if (sign) {
  ------------------
  |  Branch (1504:11): [True: 10, False: 36]
  ------------------
 1505|     10|        gain_offset = -gain_offset;
 1506|     10|      }
 1507|     46|    }
 1508|    591|    for (b = 0; b < band_count; b++) {
  ------------------
  |  Branch (1508:17): [True: 347, False: 244]
  ------------------
 1509|    347|      pstr_gain_modifiers->target_characteristic_left_present[b] = 0;
 1510|    347|      pstr_gain_modifiers->target_characteristic_right_present[b] = 0;
 1511|    347|      pstr_gain_modifiers->gain_scaling_flag[b] = gain_scaling_flag;
 1512|    347|      pstr_gain_modifiers->attn_scaling[b] = attn_scaling;
 1513|    347|      pstr_gain_modifiers->ampl_scaling[b] = ampl_scaling;
 1514|    347|      pstr_gain_modifiers->gain_offset_flag[b] = gain_offset_flag;
 1515|    347|      pstr_gain_modifiers->gain_offset[b] = gain_offset;
 1516|    347|    }
 1517|    244|    pstr_gain_modifiers->shape_filter_flag = 0;
 1518|    244|  }
 1519|    528|  return (0);
 1520|    551|}
impd_parse_gain_set_params:
 1525|  1.32k|                           ia_gain_set_params_struct* gain_set_params) {
 1526|  1.32k|  WORD32 err = 0, i, temp;
 1527|       |
 1528|  1.32k|  temp = impd_read_bits_buf(it_bit_buff, 6);
 1529|  1.32k|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1529:7): [True: 7, False: 1.32k]
  ------------------
 1530|       |
 1531|  1.32k|  gain_set_params->gain_coding_profile = (temp >> 4) & 3;
 1532|  1.32k|  gain_set_params->gain_interpolation_type = (temp >> 3) & 1;
 1533|  1.32k|  gain_set_params->full_frame = (temp >> 2) & 1;
 1534|  1.32k|  gain_set_params->time_alignment = (temp >> 1) & 1;
 1535|  1.32k|  gain_set_params->time_delt_min_flag = temp & 1;
 1536|       |
 1537|  1.32k|  if (gain_set_params->time_delt_min_flag) {
  ------------------
  |  Branch (1537:7): [True: 322, False: 998]
  ------------------
 1538|    322|    WORD32 time_delta_min;
 1539|    322|    time_delta_min = impd_read_bits_buf(it_bit_buff, 11);
 1540|    322|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1540:9): [True: 1, False: 321]
  ------------------
 1541|    321|    gain_set_params->time_delt_min_val = time_delta_min + 1;
 1542|    321|  }
 1543|       |
 1544|  1.31k|  if (gain_set_params->gain_coding_profile == GAIN_CODING_PROFILE_CONSTANT) {
  ------------------
  |  |   78|  1.31k|#define GAIN_CODING_PROFILE_CONSTANT 3
  ------------------
  |  Branch (1544:7): [True: 155, False: 1.16k]
  ------------------
 1545|    155|    gain_set_params->band_count = 1;
 1546|    155|    *gain_seq_idx = (*gain_seq_idx) + 1;
 1547|  1.16k|  } else {
 1548|  1.16k|    gain_set_params->band_count = impd_read_bits_buf(it_bit_buff, 4);
 1549|  1.16k|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1549:9): [True: 4, False: 1.16k]
  ------------------
 1550|       |
 1551|  1.16k|    if (gain_set_params->band_count > BAND_COUNT_MAX) return (UNEXPECTED_ERROR);
  ------------------
  |  |   37|  1.16k|#define BAND_COUNT_MAX 8
  ------------------
                  if (gain_set_params->band_count > BAND_COUNT_MAX) return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      5|#define UNEXPECTED_ERROR 2
  ------------------
  |  Branch (1551:9): [True: 5, False: 1.15k]
  ------------------
 1552|       |
 1553|  1.15k|    if (gain_set_params->band_count > 1) {
  ------------------
  |  Branch (1553:9): [True: 442, False: 713]
  ------------------
 1554|    442|      gain_set_params->drc_band_type = impd_read_bits_buf(it_bit_buff, 1);
 1555|    442|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1555:11): [True: 2, False: 440]
  ------------------
 1556|    442|    }
 1557|  2.97k|    for (i = 0; i < gain_set_params->band_count; i++) {
  ------------------
  |  Branch (1557:17): [True: 1.85k, False: 1.12k]
  ------------------
 1558|  1.85k|      if (version == 0) {
  ------------------
  |  Branch (1558:11): [True: 901, False: 954]
  ------------------
 1559|    901|        *gain_seq_idx = (*gain_seq_idx) + 1;
 1560|    954|      } else {
 1561|    954|        WORD32 indexPresent;
 1562|    954|        indexPresent = impd_read_bits_buf(it_bit_buff, 1);
 1563|    954|        if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1563:13): [True: 4, False: 950]
  ------------------
 1564|    950|        if (indexPresent) {
  ------------------
  |  Branch (1564:13): [True: 388, False: 562]
  ------------------
 1565|    388|          WORD32 bsIndex;
 1566|    388|          bsIndex = impd_read_bits_buf(it_bit_buff, 6);
 1567|    388|          if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1567:15): [True: 1, False: 387]
  ------------------
 1568|    387|          *gain_seq_idx = bsIndex;
 1569|    562|        } else {
 1570|    562|          *gain_seq_idx = (*gain_seq_idx) + 1;
 1571|    562|        }
 1572|    950|      }
 1573|       |
 1574|  1.85k|      if (*gain_seq_idx >= SEQUENCE_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |   38|  1.85k|#define SEQUENCE_COUNT_MAX 24
  ------------------
                    if (*gain_seq_idx >= SEQUENCE_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |  128|     11|#define UNEXPECTED_ERROR 2
  ------------------
  |  Branch (1574:11): [True: 11, False: 1.83k]
  ------------------
 1575|       |
 1576|  1.83k|      gain_set_params->gain_params[i].gain_seq_idx = *gain_seq_idx;
 1577|  1.83k|      err = impd_parse_gain_set_params_characteristics(
 1578|  1.83k|          it_bit_buff, version, &(gain_set_params->gain_params[i]));
 1579|  1.83k|      if (err) return (err);
  ------------------
  |  Branch (1579:11): [True: 15, False: 1.82k]
  ------------------
 1580|  1.83k|    }
 1581|  1.12k|    if (gain_set_params->drc_band_type) {
  ------------------
  |  Branch (1581:9): [True: 207, False: 915]
  ------------------
 1582|    686|      for (i = 1; i < gain_set_params->band_count; i++) {
  ------------------
  |  Branch (1582:19): [True: 483, False: 203]
  ------------------
 1583|    483|        gain_set_params->gain_params[i].crossover_freq_idx =
 1584|    483|            impd_read_bits_buf(it_bit_buff, 4);
 1585|    483|        if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1585:13): [True: 4, False: 479]
  ------------------
 1586|    483|      }
 1587|    915|    } else {
 1588|  1.69k|      for (i = 1; i < gain_set_params->band_count; i++) {
  ------------------
  |  Branch (1588:19): [True: 784, False: 911]
  ------------------
 1589|    784|        gain_set_params->gain_params[i].start_subband_index =
 1590|    784|            impd_read_bits_buf(it_bit_buff, 10);
 1591|    784|        if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1591:13): [True: 4, False: 780]
  ------------------
 1592|    784|      }
 1593|    915|    }
 1594|  1.12k|  }
 1595|       |
 1596|  1.26k|  return (0);
 1597|  1.31k|}
impd_sel_drc_coeff:
 1602|    851|    ia_uni_drc_coeffs_struct** str_p_loc_drc_coefficients_uni_drc) {
 1603|    851|  WORD32 n;
 1604|    851|  WORD32 c1 = -1;
 1605|    851|  WORD32 c0 = -1;
 1606|  3.07k|  for (n = 0; n < drc_config->drc_coefficients_drc_count; n++) {
  ------------------
  |  Branch (1606:15): [True: 2.22k, False: 851]
  ------------------
 1607|  2.22k|    if (drc_config->str_p_loc_drc_coefficients_uni_drc[n].drc_location ==
  ------------------
  |  Branch (1607:9): [True: 1.18k, False: 1.04k]
  ------------------
 1608|  2.22k|        location) {
 1609|  1.18k|      if (drc_config->str_p_loc_drc_coefficients_uni_drc[n].version == 0) {
  ------------------
  |  Branch (1609:11): [True: 861, False: 326]
  ------------------
 1610|    861|        c0 = n;
 1611|    861|      } else {
 1612|    326|        c1 = n;
 1613|    326|      }
 1614|  1.18k|    }
 1615|  2.22k|  }
 1616|    851|  if (c1 >= 0) {
  ------------------
  |  Branch (1616:7): [True: 123, False: 728]
  ------------------
 1617|    123|    *str_p_loc_drc_coefficients_uni_drc =
 1618|    123|        &(drc_config->str_p_loc_drc_coefficients_uni_drc[c1]);
 1619|    728|  } else if (c0 >= 0) {
  ------------------
  |  Branch (1619:14): [True: 324, False: 404]
  ------------------
 1620|    324|    *str_p_loc_drc_coefficients_uni_drc =
 1621|    324|        &(drc_config->str_p_loc_drc_coefficients_uni_drc[c0]);
 1622|    404|  } else {
 1623|       |    *str_p_loc_drc_coefficients_uni_drc = NULL;
 1624|    404|  }
 1625|    851|  return (0);
 1626|    851|}
impd_parse_loudness_info_set_ext:
 1631|     68|    ia_drc_loudness_info_set_struct* loudness_info_set) {
 1632|     68|  WORD32 err = 0, i, k;
 1633|     68|  WORD32 bit_size_len, ext_size_bits, bit_size;
 1634|       |
 1635|     68|  k = 0;
 1636|     68|  loudness_info_set->str_loudness_info_set_ext.loudness_info_set_ext_type[k] =
 1637|     68|      impd_read_bits_buf(it_bit_buff, 4);
 1638|     68|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1638:7): [True: 1, False: 67]
  ------------------
 1639|    174|  while (loudness_info_set->str_loudness_info_set_ext
  ------------------
  |  Branch (1639:10): [True: 130, False: 44]
  ------------------
 1640|    174|             .loudness_info_set_ext_type[k] != UNIDRCLOUDEXT_TERM) {
  ------------------
  |  |  172|    174|#define UNIDRCLOUDEXT_TERM 0x0
  ------------------
 1641|    130|    bit_size_len = impd_read_bits_buf(it_bit_buff, 4);
 1642|    130|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1642:9): [True: 1, False: 129]
  ------------------
 1643|    129|    ext_size_bits = bit_size_len + 4;
 1644|       |
 1645|    129|    bit_size = impd_read_bits_buf(it_bit_buff, ext_size_bits);
 1646|    129|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1646:9): [True: 0, False: 129]
  ------------------
 1647|    129|    if (k >= (EXT_COUNT_MAX - 1)) return UNEXPECTED_ERROR;
  ------------------
  |  |  170|    129|#define EXT_COUNT_MAX 8
  ------------------
                  if (k >= (EXT_COUNT_MAX - 1)) return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      1|#define UNEXPECTED_ERROR 2
  ------------------
  |  Branch (1647:9): [True: 1, False: 128]
  ------------------
 1648|    128|    loudness_info_set->str_loudness_info_set_ext.ext_bit_size[k] = bit_size + 1;
 1649|       |
 1650|    128|    switch (loudness_info_set->str_loudness_info_set_ext
 1651|    128|                .loudness_info_set_ext_type[k]) {
 1652|     74|      case UNIDRCLOUDEXT_EQ:
  ------------------
  |  |  194|     74|#define UNIDRCLOUDEXT_EQ 0x1
  ------------------
  |  Branch (1652:7): [True: 74, False: 54]
  ------------------
 1653|     74|        err = impd_parse_loud_info_set_ext_eq(it_bit_buff, loudness_info_set);
 1654|     74|        if (err) return (err);
  ------------------
  |  Branch (1654:13): [True: 19, False: 55]
  ------------------
 1655|     55|        break;
 1656|     55|      default:
  ------------------
  |  Branch (1656:7): [True: 54, False: 74]
  ------------------
 1657|     54|        for (i = 0;
 1658|  1.46k|             i < loudness_info_set->str_loudness_info_set_ext.ext_bit_size[k];
  ------------------
  |  Branch (1658:14): [True: 1.40k, False: 53]
  ------------------
 1659|  1.40k|             i++) {
 1660|  1.40k|          impd_read_bits_buf(it_bit_buff, 1);
 1661|  1.40k|          if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1661:15): [True: 1, False: 1.40k]
  ------------------
 1662|  1.40k|        }
 1663|     53|        break;
 1664|    128|    }
 1665|    108|    k++;
 1666|    108|    loudness_info_set->str_loudness_info_set_ext.loudness_info_set_ext_type[k] =
 1667|    108|        impd_read_bits_buf(it_bit_buff, 4);
 1668|    108|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1668:9): [True: 1, False: 107]
  ------------------
 1669|    108|  }
 1670|       |
 1671|     44|  return (0);
 1672|     67|}
impd_drc_parse_coeff:
 1678|    737|    ia_uni_drc_coeffs_struct* str_p_loc_drc_coefficients_uni_drc) {
 1679|    737|  WORD32 err = 0, i, drc_frame_size, temp;
 1680|    737|  WORD32 gain_seq_idx = -1;
 1681|       |
 1682|    737|  str_p_loc_drc_coefficients_uni_drc->version = version;
 1683|    737|  if (version == 0) {
  ------------------
  |  Branch (1683:7): [True: 271, False: 466]
  ------------------
 1684|    271|    WORD32 gain_sequence_count = 0;
 1685|    271|    temp = impd_read_bits_buf(it_bit_buff, 5);
 1686|    271|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1686:9): [True: 1, False: 270]
  ------------------
 1687|       |
 1688|    270|    str_p_loc_drc_coefficients_uni_drc->drc_location = (temp >> 1) & 0xf;
 1689|    270|    str_p_loc_drc_coefficients_uni_drc->drc_frame_size_present = temp & 1;
 1690|       |
 1691|    270|    if (str_p_loc_drc_coefficients_uni_drc->drc_frame_size_present == 1) {
  ------------------
  |  Branch (1691:9): [True: 17, False: 253]
  ------------------
 1692|     17|      drc_frame_size = impd_read_bits_buf(it_bit_buff, 15);
 1693|     17|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1693:11): [True: 0, False: 17]
  ------------------
 1694|     17|      str_p_loc_drc_coefficients_uni_drc->drc_frame_size = drc_frame_size + 1;
 1695|     17|      if (str_p_loc_drc_coefficients_uni_drc->drc_frame_size >
  ------------------
  |  Branch (1695:11): [True: 1, False: 16]
  ------------------
 1696|     17|          MAX_DRC_FRAME_SIZE)
  ------------------
  |  |   65|     17|#define MAX_DRC_FRAME_SIZE AUDIO_CODEC_FRAME_SIZE_MAX
  |  |  ------------------
  |  |  |  |   45|     17|#define AUDIO_CODEC_FRAME_SIZE_MAX 4096
  |  |  ------------------
  ------------------
 1697|      1|        return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      1|#define UNEXPECTED_ERROR 2
  ------------------
 1698|     17|    }
 1699|       |
 1700|    269|    str_p_loc_drc_coefficients_uni_drc->drc_characteristic_left_present = 0;
 1701|    269|    str_p_loc_drc_coefficients_uni_drc->drc_characteristic_right_present = 0;
 1702|    269|    str_p_loc_drc_coefficients_uni_drc->shape_filters_present = 0;
 1703|    269|    str_p_loc_drc_coefficients_uni_drc->gain_set_count =
 1704|    269|        impd_read_bits_buf(it_bit_buff, 6);
 1705|    269|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1705:9): [True: 2, False: 267]
  ------------------
 1706|       |
 1707|    267|    if (str_p_loc_drc_coefficients_uni_drc->gain_set_count > GAIN_SET_COUNT_MAX)
  ------------------
  |  |   91|    267|#define GAIN_SET_COUNT_MAX SEQUENCE_COUNT_MAX
  |  |  ------------------
  |  |  |  |   38|    267|#define SEQUENCE_COUNT_MAX 24
  |  |  ------------------
  ------------------
  |  Branch (1707:9): [True: 2, False: 265]
  ------------------
 1708|      2|      return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      2|#define UNEXPECTED_ERROR 2
  ------------------
 1709|       |
 1710|    265|    str_p_loc_drc_coefficients_uni_drc->gain_set_count_plus =
 1711|    265|        str_p_loc_drc_coefficients_uni_drc->gain_set_count;
 1712|    795|    for (i = 0; i < str_p_loc_drc_coefficients_uni_drc->gain_set_count; i++) {
  ------------------
  |  Branch (1712:17): [True: 561, False: 234]
  ------------------
 1713|    561|      err = impd_parse_gain_set_params(
 1714|    561|          it_bit_buff, version, &gain_seq_idx,
 1715|    561|          &(str_p_loc_drc_coefficients_uni_drc->gain_set_params[i]));
 1716|    561|      if (err) return (err);
  ------------------
  |  Branch (1716:11): [True: 30, False: 531]
  ------------------
 1717|       |
 1718|    531|      if (str_p_loc_drc_coefficients_uni_drc->gain_set_params[i]
  ------------------
  |  Branch (1718:11): [True: 168, False: 363]
  ------------------
 1719|    531|              .time_delt_min_flag) {
 1720|    168|        if (str_p_loc_drc_coefficients_uni_drc->gain_set_params[i]
  ------------------
  |  Branch (1720:13): [True: 0, False: 168]
  ------------------
 1721|    168|                .time_delt_min_val > ia_drc_params_struct->drc_frame_size) {
 1722|       |          /* drc time interval too big */
 1723|      0|          return (PARAM_ERROR);
  ------------------
  |  |  129|      0|#define PARAM_ERROR 3
  ------------------
 1724|      0|        }
 1725|    168|        str_p_loc_drc_coefficients_uni_drc->gain_set_params[i]
 1726|    168|            .num_gain_max_values =
 1727|    168|            ia_drc_params_struct->drc_frame_size /
 1728|    168|            str_p_loc_drc_coefficients_uni_drc->gain_set_params[i]
 1729|    168|                .time_delt_min_val;
 1730|    168|        if (str_p_loc_drc_coefficients_uni_drc->gain_set_params[i]
  ------------------
  |  Branch (1730:13): [True: 1, False: 167]
  ------------------
 1731|    168|                .num_gain_max_values >
 1732|    168|            (N_DELTA_TIME_CODE_TABLE_ENTRIES_MAX / 2 - 1))
  ------------------
  |  |   27|    168|#define N_DELTA_TIME_CODE_TABLE_ENTRIES_MAX (512 + 14)
  ------------------
 1733|      1|          return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      1|#define UNEXPECTED_ERROR 2
  ------------------
 1734|    167|        impd_init_tbls(str_p_loc_drc_coefficients_uni_drc->gain_set_params[i]
 1735|    167|                           .num_gain_max_values,
 1736|    167|                       &(str_p_loc_drc_coefficients_uni_drc->gain_set_params[i]
 1737|    167|                             .str_tables));
 1738|    167|      }
 1739|    530|      gain_sequence_count +=
 1740|    530|          str_p_loc_drc_coefficients_uni_drc->gain_set_params[i].band_count;
 1741|    530|    }
 1742|    234|    str_p_loc_drc_coefficients_uni_drc->gain_sequence_count =
 1743|    234|        gain_sequence_count;
 1744|    466|  } else {
 1745|    466|    ia_shape_filter_block_params_struct* pstr_shape_filter_block_params;
 1746|  11.6k|    for (i = 0; i < SEQUENCE_COUNT_MAX; i++) {
  ------------------
  |  |   38|  11.6k|#define SEQUENCE_COUNT_MAX 24
  ------------------
  |  Branch (1746:17): [True: 11.1k, False: 466]
  ------------------
 1747|  11.1k|      str_p_loc_drc_coefficients_uni_drc
 1748|  11.1k|          ->gain_set_params_index_for_gain_sequence[i] = -1;
 1749|  11.1k|    }
 1750|       |
 1751|    466|    temp = impd_read_bits_buf(it_bit_buff, 5);
 1752|    466|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1752:9): [True: 0, False: 466]
  ------------------
 1753|       |
 1754|    466|    str_p_loc_drc_coefficients_uni_drc->drc_location = (temp >> 1) & 0xf;
 1755|    466|    str_p_loc_drc_coefficients_uni_drc->drc_frame_size_present = temp & 1;
 1756|       |
 1757|    466|    if (str_p_loc_drc_coefficients_uni_drc->drc_frame_size_present == 1) {
  ------------------
  |  Branch (1757:9): [True: 110, False: 356]
  ------------------
 1758|    110|      drc_frame_size = impd_read_bits_buf(it_bit_buff, 15);
 1759|    110|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1759:11): [True: 1, False: 109]
  ------------------
 1760|    109|      str_p_loc_drc_coefficients_uni_drc->drc_frame_size = drc_frame_size + 1;
 1761|    109|    }
 1762|    465|    str_p_loc_drc_coefficients_uni_drc->drc_characteristic_left_present =
 1763|    465|        impd_read_bits_buf(it_bit_buff, 1);
 1764|    465|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1764:9): [True: 2, False: 463]
  ------------------
 1765|    463|    if (str_p_loc_drc_coefficients_uni_drc->drc_characteristic_left_present ==
  ------------------
  |  Branch (1765:9): [True: 113, False: 350]
  ------------------
 1766|    463|        1) {
 1767|    113|      str_p_loc_drc_coefficients_uni_drc->characteristic_left_count =
 1768|    113|          impd_read_bits_buf(it_bit_buff, 4);
 1769|    113|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1769:11): [True: 1, False: 112]
  ------------------
 1770|       |
 1771|    112|      if (str_p_loc_drc_coefficients_uni_drc->characteristic_left_count >
  ------------------
  |  Branch (1771:11): [True: 1, False: 111]
  ------------------
 1772|    112|          SPLIT_CHARACTERISTIC_COUNT_MAX)
  ------------------
  |  |   90|    112|#define SPLIT_CHARACTERISTIC_COUNT_MAX 8
  ------------------
 1773|      1|        return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      1|#define UNEXPECTED_ERROR 2
  ------------------
 1774|       |
 1775|    111|      for (i = 1;
 1776|    479|           i <= str_p_loc_drc_coefficients_uni_drc->characteristic_left_count;
  ------------------
  |  Branch (1776:12): [True: 375, False: 104]
  ------------------
 1777|    375|           i++) {
 1778|    375|        err = impd_parse_split_drc_characteristic(
 1779|    375|            it_bit_buff, LEFT_SIDE, &(str_p_loc_drc_coefficients_uni_drc
  ------------------
  |  |  128|    375|#define LEFT_SIDE 0
  ------------------
 1780|    375|                                          ->str_split_characteristic_left[i]));
 1781|    375|        if (err) return (err);
  ------------------
  |  Branch (1781:13): [True: 7, False: 368]
  ------------------
 1782|    375|      }
 1783|    111|    }
 1784|    454|    str_p_loc_drc_coefficients_uni_drc->drc_characteristic_right_present =
 1785|    454|        impd_read_bits_buf(it_bit_buff, 1);
 1786|    454|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1786:9): [True: 1, False: 453]
  ------------------
 1787|    453|    if (str_p_loc_drc_coefficients_uni_drc->drc_characteristic_right_present ==
  ------------------
  |  Branch (1787:9): [True: 62, False: 391]
  ------------------
 1788|    453|        1) {
 1789|     62|      str_p_loc_drc_coefficients_uni_drc->characteristic_right_count =
 1790|     62|          impd_read_bits_buf(it_bit_buff, 4);
 1791|     62|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1791:11): [True: 1, False: 61]
  ------------------
 1792|       |
 1793|     61|      if (str_p_loc_drc_coefficients_uni_drc->characteristic_right_count >
  ------------------
  |  Branch (1793:11): [True: 1, False: 60]
  ------------------
 1794|     61|          SPLIT_CHARACTERISTIC_COUNT_MAX)
  ------------------
  |  |   90|     61|#define SPLIT_CHARACTERISTIC_COUNT_MAX 8
  ------------------
 1795|      1|        return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      1|#define UNEXPECTED_ERROR 2
  ------------------
 1796|     60|      for (i = 1;
 1797|    282|           i <= str_p_loc_drc_coefficients_uni_drc->characteristic_right_count;
  ------------------
  |  Branch (1797:12): [True: 234, False: 48]
  ------------------
 1798|    234|           i++) {
 1799|    234|        err = impd_parse_split_drc_characteristic(
 1800|    234|            it_bit_buff, RIGHT_SIDE,
  ------------------
  |  |  129|    234|#define RIGHT_SIDE 1
  ------------------
 1801|    234|            &(str_p_loc_drc_coefficients_uni_drc
 1802|    234|                  ->str_split_characteristic_right[i]));
 1803|    234|        if (err) return (err);
  ------------------
  |  Branch (1803:13): [True: 12, False: 222]
  ------------------
 1804|    234|      }
 1805|     60|    }
 1806|    439|    str_p_loc_drc_coefficients_uni_drc->shape_filters_present =
 1807|    439|        impd_read_bits_buf(it_bit_buff, 1);
 1808|    439|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1808:9): [True: 2, False: 437]
  ------------------
 1809|    437|    if (str_p_loc_drc_coefficients_uni_drc->shape_filters_present == 1) {
  ------------------
  |  Branch (1809:9): [True: 64, False: 373]
  ------------------
 1810|     64|      str_p_loc_drc_coefficients_uni_drc->shape_num_filter =
 1811|     64|          impd_read_bits_buf(it_bit_buff, 4);
 1812|     64|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1812:11): [True: 2, False: 62]
  ------------------
 1813|     62|      if (str_p_loc_drc_coefficients_uni_drc->shape_num_filter >
  ------------------
  |  Branch (1813:11): [True: 2, False: 60]
  ------------------
 1814|     62|          SHAPE_FILTER_COUNT_MAX)
  ------------------
  |  |   92|     62|#define SHAPE_FILTER_COUNT_MAX 8
  ------------------
 1815|      2|        return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      2|#define UNEXPECTED_ERROR 2
  ------------------
 1816|    280|      for (i = 1; i <= str_p_loc_drc_coefficients_uni_drc->shape_num_filter;
  ------------------
  |  Branch (1816:19): [True: 231, False: 49]
  ------------------
 1817|    231|           i++) {
 1818|    231|        pstr_shape_filter_block_params =
 1819|    231|            &(str_p_loc_drc_coefficients_uni_drc
 1820|    231|                  ->str_shape_filter_block_params[i]);
 1821|    231|        pstr_shape_filter_block_params->lf_cut_filter_present =
 1822|    231|            impd_read_bits_buf(it_bit_buff, 1);
 1823|    231|        if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1823:13): [True: 1, False: 230]
  ------------------
 1824|       |
 1825|    230|        if (pstr_shape_filter_block_params->lf_cut_filter_present == 1) {
  ------------------
  |  Branch (1825:13): [True: 71, False: 159]
  ------------------
 1826|     71|          temp = impd_read_bits_buf(it_bit_buff, 5);
 1827|     71|          if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1827:15): [True: 1, False: 70]
  ------------------
 1828|       |
 1829|     70|          pstr_shape_filter_block_params->str_lf_cut_params.corner_freq_index =
 1830|     70|              (temp >> 2) & 7;
 1831|     70|          pstr_shape_filter_block_params->str_lf_cut_params
 1832|     70|              .filter_strength_index = temp & 3;
 1833|     70|        }
 1834|    229|        pstr_shape_filter_block_params->lf_boost_filter_present =
 1835|    229|            impd_read_bits_buf(it_bit_buff, 1);
 1836|    229|        if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1836:13): [True: 2, False: 227]
  ------------------
 1837|    227|        if (pstr_shape_filter_block_params->lf_boost_filter_present == 1) {
  ------------------
  |  Branch (1837:13): [True: 55, False: 172]
  ------------------
 1838|     55|          temp = impd_read_bits_buf(it_bit_buff, 5);
 1839|     55|          if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1839:15): [True: 1, False: 54]
  ------------------
 1840|       |
 1841|     54|          pstr_shape_filter_block_params->str_lf_boost_params
 1842|     54|              .corner_freq_index = (temp >> 2) & 7;
 1843|     54|          pstr_shape_filter_block_params->str_lf_boost_params
 1844|     54|              .filter_strength_index = temp & 3;
 1845|     54|        }
 1846|    226|        pstr_shape_filter_block_params->hf_cut_filter_present =
 1847|    226|            impd_read_bits_buf(it_bit_buff, 1);
 1848|    226|        if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1848:13): [True: 1, False: 225]
  ------------------
 1849|    225|        if (pstr_shape_filter_block_params->hf_cut_filter_present == 1) {
  ------------------
  |  Branch (1849:13): [True: 57, False: 168]
  ------------------
 1850|     57|          temp = impd_read_bits_buf(it_bit_buff, 5);
 1851|     57|          if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1851:15): [True: 2, False: 55]
  ------------------
 1852|       |
 1853|     55|          pstr_shape_filter_block_params->str_hfCutParams.corner_freq_index =
 1854|     55|              (temp >> 2) & 7;
 1855|     55|          pstr_shape_filter_block_params->str_hfCutParams
 1856|     55|              .filter_strength_index = temp & 3;
 1857|     55|        }
 1858|    223|        pstr_shape_filter_block_params->hf_boost_filter_present =
 1859|    223|            impd_read_bits_buf(it_bit_buff, 1);
 1860|    223|        if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1860:13): [True: 3, False: 220]
  ------------------
 1861|    220|        if (pstr_shape_filter_block_params->hf_boost_filter_present == 1) {
  ------------------
  |  Branch (1861:13): [True: 80, False: 140]
  ------------------
 1862|     80|          temp = impd_read_bits_buf(it_bit_buff, 5);
 1863|     80|          if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1863:15): [True: 0, False: 80]
  ------------------
 1864|       |
 1865|     80|          pstr_shape_filter_block_params->str_hf_boost_params
 1866|     80|              .corner_freq_index = (temp >> 2) & 7;
 1867|     80|          pstr_shape_filter_block_params->str_hf_boost_params
 1868|     80|              .filter_strength_index = temp & 3;
 1869|     80|        }
 1870|    220|      }
 1871|     60|    }
 1872|       |
 1873|    422|    temp = impd_read_bits_buf(it_bit_buff, 12);
 1874|    422|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1874:9): [True: 3, False: 419]
  ------------------
 1875|       |
 1876|    419|    str_p_loc_drc_coefficients_uni_drc->gain_sequence_count =
 1877|    419|        (temp >> 6) & 0x3f;
 1878|       |
 1879|    419|    if (str_p_loc_drc_coefficients_uni_drc->gain_sequence_count >
  ------------------
  |  Branch (1879:9): [True: 9, False: 410]
  ------------------
 1880|    419|        SEQUENCE_COUNT_MAX)
  ------------------
  |  |   38|    419|#define SEQUENCE_COUNT_MAX 24
  ------------------
 1881|      9|      return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      9|#define UNEXPECTED_ERROR 2
  ------------------
 1882|       |
 1883|    410|    str_p_loc_drc_coefficients_uni_drc->gain_set_count = temp & 0x3f;
 1884|       |
 1885|    410|    if (str_p_loc_drc_coefficients_uni_drc->gain_set_count > GAIN_SET_COUNT_MAX)
  ------------------
  |  |   91|    410|#define GAIN_SET_COUNT_MAX SEQUENCE_COUNT_MAX
  |  |  ------------------
  |  |  |  |   38|    410|#define SEQUENCE_COUNT_MAX 24
  |  |  ------------------
  ------------------
  |  Branch (1885:9): [True: 4, False: 406]
  ------------------
 1886|      4|      return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      4|#define UNEXPECTED_ERROR 2
  ------------------
 1887|       |
 1888|    406|    str_p_loc_drc_coefficients_uni_drc->gain_set_count_plus =
 1889|    406|        str_p_loc_drc_coefficients_uni_drc->gain_set_count;
 1890|  1.14k|    for (i = 0; i < str_p_loc_drc_coefficients_uni_drc->gain_set_count; i++) {
  ------------------
  |  Branch (1890:17): [True: 766, False: 377]
  ------------------
 1891|    766|      err = impd_parse_gain_set_params(
 1892|    766|          it_bit_buff, version, &gain_seq_idx,
 1893|    766|          &(str_p_loc_drc_coefficients_uni_drc->gain_set_params[i]));
 1894|    766|      if (err) return (err);
  ------------------
  |  Branch (1894:11): [True: 28, False: 738]
  ------------------
 1895|       |
 1896|    738|      if (str_p_loc_drc_coefficients_uni_drc->gain_set_params[i]
  ------------------
  |  Branch (1896:11): [True: 137, False: 601]
  ------------------
 1897|    738|              .time_delt_min_flag) {
 1898|    137|        if (str_p_loc_drc_coefficients_uni_drc->gain_set_params[i]
  ------------------
  |  Branch (1898:13): [True: 0, False: 137]
  ------------------
 1899|    137|                .time_delt_min_val > ia_drc_params_struct->drc_frame_size) {
 1900|       |          /* drc time interval too big */
 1901|      0|          return (PARAM_ERROR);
  ------------------
  |  |  129|      0|#define PARAM_ERROR 3
  ------------------
 1902|      0|        }
 1903|    137|        str_p_loc_drc_coefficients_uni_drc->gain_set_params[i]
 1904|    137|            .num_gain_max_values =
 1905|    137|            ia_drc_params_struct->drc_frame_size /
 1906|    137|            str_p_loc_drc_coefficients_uni_drc->gain_set_params[i]
 1907|    137|                .time_delt_min_val;
 1908|    137|        if (str_p_loc_drc_coefficients_uni_drc->gain_set_params[i]
  ------------------
  |  Branch (1908:13): [True: 1, False: 136]
  ------------------
 1909|    137|                .num_gain_max_values >
 1910|    137|            (N_DELTA_TIME_CODE_TABLE_ENTRIES_MAX / 2 - 1))
  ------------------
  |  |   27|    137|#define N_DELTA_TIME_CODE_TABLE_ENTRIES_MAX (512 + 14)
  ------------------
 1911|      1|          return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      1|#define UNEXPECTED_ERROR 2
  ------------------
 1912|    136|        impd_init_tbls(str_p_loc_drc_coefficients_uni_drc->gain_set_params[i]
 1913|    136|                           .num_gain_max_values,
 1914|    136|                       &(str_p_loc_drc_coefficients_uni_drc->gain_set_params[i]
 1915|    136|                             .str_tables));
 1916|    136|      }
 1917|    738|    }
 1918|       |
 1919|  1.02k|    for (i = 0; i < str_p_loc_drc_coefficients_uni_drc->gain_set_count; i++) {
  ------------------
  |  Branch (1919:17): [True: 648, False: 377]
  ------------------
 1920|    648|      WORD32 b;
 1921|    648|      for (b = 0;
 1922|  1.46k|           b <
  ------------------
  |  Branch (1922:12): [True: 818, False: 648]
  ------------------
 1923|  1.46k|           str_p_loc_drc_coefficients_uni_drc->gain_set_params[i].band_count;
 1924|    818|           b++) {
 1925|    818|        str_p_loc_drc_coefficients_uni_drc
 1926|    818|            ->gain_set_params_index_for_gain_sequence
 1927|    818|                [str_p_loc_drc_coefficients_uni_drc->gain_set_params[i]
 1928|    818|                     .gain_params[b]
 1929|    818|                     .gain_seq_idx] = i;
 1930|    818|      }
 1931|    648|    }
 1932|    377|  }
 1933|    611|  return (0);
 1934|    737|}
impd_drc_parse_instructions_basic:
 1939|    219|    ia_drc_instructions_basic_struct* str_drc_instructions_basic) {
 1940|       |  // WORD32 err = 0;
 1941|    219|  WORD32 i, limiter_peak_target, temp;
 1942|    219|  WORD32 additional_dmix_id_present, additional_dmix_id_cnt;
 1943|       |
 1944|    219|  temp = impd_read_bits_buf(it_bit_buff, 18);
 1945|    219|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1945:7): [True: 2, False: 217]
  ------------------
 1946|       |
 1947|    217|  str_drc_instructions_basic->drc_set_id = (temp >> 12) & 0x3f;
 1948|    217|  str_drc_instructions_basic->drc_location = (temp >> 8) & 0xf;
 1949|    217|  str_drc_instructions_basic->downmix_id[0] = (temp >> 1) & 0x7f;
 1950|    217|  additional_dmix_id_present = temp & 1;
 1951|    217|  str_drc_instructions_basic->dwnmix_id_count = 1;
 1952|       |
 1953|    217|  if (additional_dmix_id_present) {
  ------------------
  |  Branch (1953:7): [True: 99, False: 118]
  ------------------
 1954|     99|    additional_dmix_id_cnt = impd_read_bits_buf(it_bit_buff, 3);
 1955|     99|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1955:9): [True: 2, False: 97]
  ------------------
 1956|    368|    for (i = 0; i < additional_dmix_id_cnt; i++) {
  ------------------
  |  Branch (1956:17): [True: 277, False: 91]
  ------------------
 1957|    277|      str_drc_instructions_basic->downmix_id[i + 1] =
 1958|    277|          impd_read_bits_buf(it_bit_buff, 7);
 1959|    277|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1959:11): [True: 6, False: 271]
  ------------------
 1960|    277|    }
 1961|     91|    str_drc_instructions_basic->dwnmix_id_count = 1 + additional_dmix_id_cnt;
 1962|     91|  }
 1963|       |
 1964|    209|  str_drc_instructions_basic->drc_set_effect =
 1965|    209|      impd_read_bits_buf(it_bit_buff, 16);
 1966|    209|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1966:7): [True: 2, False: 207]
  ------------------
 1967|       |
 1968|    207|  if ((str_drc_instructions_basic->drc_set_effect &
  ------------------
  |  Branch (1968:7): [True: 116, False: 91]
  ------------------
 1969|    207|       (EFFECT_BIT_DUCK_OTHER | EFFECT_BIT_DUCK_SELF)) == 0) {
  ------------------
  |  |   72|    207|#define EFFECT_BIT_DUCK_OTHER 0x0400
  ------------------
                     (EFFECT_BIT_DUCK_OTHER | EFFECT_BIT_DUCK_SELF)) == 0) {
  ------------------
  |  |   73|    207|#define EFFECT_BIT_DUCK_SELF 0x0800
  ------------------
 1970|    116|    str_drc_instructions_basic->limiter_peak_target_present =
 1971|    116|        impd_read_bits_buf(it_bit_buff, 1);
 1972|    116|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1972:9): [True: 2, False: 114]
  ------------------
 1973|    114|    if (str_drc_instructions_basic->limiter_peak_target_present) {
  ------------------
  |  Branch (1973:9): [True: 41, False: 73]
  ------------------
 1974|     41|      limiter_peak_target = impd_read_bits_buf(it_bit_buff, 8);
 1975|     41|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1975:11): [True: 1, False: 40]
  ------------------
 1976|     40|      str_drc_instructions_basic->limiter_peak_target =
 1977|     40|          -limiter_peak_target * 0.125f;
 1978|     40|    }
 1979|    114|  }
 1980|       |
 1981|    204|  str_drc_instructions_basic->drc_set_target_loudness_present =
 1982|    204|      impd_read_bits_buf(it_bit_buff, 1);
 1983|    204|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1983:7): [True: 2, False: 202]
  ------------------
 1984|       |
 1985|    202|  str_drc_instructions_basic->drc_set_target_loudness_value_upper = 0;
 1986|    202|  str_drc_instructions_basic->drc_set_target_loudness_value_lower = -63;
 1987|       |
 1988|    202|  if (str_drc_instructions_basic->drc_set_target_loudness_present == 1) {
  ------------------
  |  Branch (1988:7): [True: 80, False: 122]
  ------------------
 1989|     80|    WORD32 bsDrcSetTargetLoudnessValueUpper, bsDrcSetTargetLoudnessValueLower;
 1990|     80|    bsDrcSetTargetLoudnessValueUpper = impd_read_bits_buf(it_bit_buff, 6);
 1991|     80|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1991:9): [True: 1, False: 79]
  ------------------
 1992|     79|    str_drc_instructions_basic->drc_set_target_loudness_value_upper =
 1993|     79|        bsDrcSetTargetLoudnessValueUpper - 63;
 1994|       |
 1995|     79|    str_drc_instructions_basic->drc_set_target_loudness_value_lower_present =
 1996|     79|        impd_read_bits_buf(it_bit_buff, 1);
 1997|     79|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1997:9): [True: 1, False: 78]
  ------------------
 1998|       |
 1999|     78|    if (str_drc_instructions_basic
  ------------------
  |  Branch (1999:9): [True: 39, False: 39]
  ------------------
 2000|     78|            ->drc_set_target_loudness_value_lower_present == 1) {
 2001|     39|      bsDrcSetTargetLoudnessValueLower = impd_read_bits_buf(it_bit_buff, 6);
 2002|     39|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (2002:11): [True: 1, False: 38]
  ------------------
 2003|     38|      str_drc_instructions_basic->drc_set_target_loudness_value_lower =
 2004|     38|          bsDrcSetTargetLoudnessValueLower - 63;
 2005|     38|    }
 2006|     78|  }
 2007|       |
 2008|    199|  return (0);
 2009|    202|}
impd_dec_ducking_scaling:
 2014|    875|                         FLOAT32* p_ducking_scaling) {
 2015|    875|  WORD32 ducking_scaling_present, ducking_scaling, sigma, mu;
 2016|       |
 2017|    875|  ducking_scaling_present = impd_read_bits_buf(it_bit_buff, 1);
 2018|    875|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (2018:7): [True: 2, False: 873]
  ------------------
 2019|       |
 2020|    873|  if (ducking_scaling_present == 0) {
  ------------------
  |  Branch (2020:7): [True: 771, False: 102]
  ------------------
 2021|    771|    *ducking_scaling_flag = 0;
 2022|    771|    *p_ducking_scaling = 1.0f;
 2023|    771|  } else {
 2024|    102|    *ducking_scaling_flag = 1;
 2025|    102|    ducking_scaling = impd_read_bits_buf(it_bit_buff, 4);
 2026|    102|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (2026:9): [True: 1, False: 101]
  ------------------
 2027|       |
 2028|    101|    sigma = ducking_scaling >> 3;
 2029|    101|    mu = ducking_scaling & 0x7;
 2030|       |
 2031|    101|    if (sigma == 0) {
  ------------------
  |  Branch (2031:9): [True: 70, False: 31]
  ------------------
 2032|     70|      *p_ducking_scaling = 1.0f + 0.125f * (1.0f + mu);
 2033|     70|    } else {
 2034|     31|      *p_ducking_scaling = 1.0f - 0.125f * (1.0f + mu);
 2035|     31|    }
 2036|    101|  }
 2037|    872|  return (0);
 2038|    873|}
impd_parse_drc_instructions_uni_drc:
 2043|    906|    ia_drc_instructions_struct* str_drc_instruction_str) {
 2044|    906|  WORD32 err = 0, i, n, k, g, c, limiter_peak_target, idx;
 2045|    906|  WORD32 additional_dmix_id_present, additional_dmix_id_cnt;
 2046|    906|  ia_uni_drc_coeffs_struct* str_p_loc_drc_coefficients_uni_drc = NULL;
 2047|    906|  WORD32 ch_cnt;
 2048|    906|  WORD32 unique_idx[MAX_CHANNEL_COUNT];
 2049|    906|  FLOAT32 unique_scaling[MAX_CHANNEL_COUNT];
 2050|    906|  WORD32 match;
 2051|    906|  WORD32 dmix_id_present;
 2052|    906|  WORD32 repeat_parameters, repeat_parameters_cnt;
 2053|    906|  WORD32 ducking_sequence;
 2054|    906|  FLOAT32 factor;
 2055|       |
 2056|    906|  str_drc_instruction_str->drc_set_id = impd_read_bits_buf(it_bit_buff, 6);
 2057|    906|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (2057:7): [True: 5, False: 901]
  ------------------
 2058|    901|  if (str_drc_instruction_str->drc_set_id >= DRC_INSTRUCTIONS_COUNT_MAX)
  ------------------
  |  |   43|    901|#define DRC_INSTRUCTIONS_COUNT_MAX (DOWNMIX_INSTRUCTION_COUNT_MAX + 20)
  |  |  ------------------
  |  |  |  |   41|    901|#define DOWNMIX_INSTRUCTION_COUNT_MAX 16
  |  |  ------------------
  ------------------
  |  Branch (2058:7): [True: 5, False: 896]
  ------------------
 2059|      5|    return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      5|#define UNEXPECTED_ERROR 2
  ------------------
 2060|    896|  if (version == 0) {
  ------------------
  |  Branch (2060:7): [True: 654, False: 242]
  ------------------
 2061|    654|    str_drc_instruction_str->drc_set_complexity_level =
 2062|    654|        DRC_COMPLEXITY_LEVEL_MAX;
  ------------------
  |  |  110|    654|#define DRC_COMPLEXITY_LEVEL_MAX 0xF
  ------------------
 2063|    654|  } else {
 2064|    242|    str_drc_instruction_str->drc_set_complexity_level =
 2065|    242|        impd_read_bits_buf(it_bit_buff, 4);
 2066|    242|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (2066:9): [True: 1, False: 241]
  ------------------
 2067|    242|  }
 2068|    895|  str_drc_instruction_str->drc_location = impd_read_bits_buf(it_bit_buff, 4);
 2069|    895|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (2069:7): [True: 6, False: 889]
  ------------------
 2070|    889|  dmix_id_present = 1;
 2071|    889|  if (version >= 1) {
  ------------------
  |  Branch (2071:7): [True: 240, False: 649]
  ------------------
 2072|    240|    dmix_id_present = impd_read_bits_buf(it_bit_buff, 1);
 2073|    240|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (2073:9): [True: 2, False: 238]
  ------------------
 2074|    240|  }
 2075|    887|  if (dmix_id_present == 1) {
  ------------------
  |  Branch (2075:7): [True: 696, False: 191]
  ------------------
 2076|    696|    str_drc_instruction_str->downmix_id[0] = impd_read_bits_buf(it_bit_buff, 7);
 2077|    696|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (2077:9): [True: 3, False: 693]
  ------------------
 2078|    693|    if (version >= 1) {
  ------------------
  |  Branch (2078:9): [True: 47, False: 646]
  ------------------
 2079|     47|      str_drc_instruction_str->drc_apply_to_dwnmix =
 2080|     47|          impd_read_bits_buf(it_bit_buff, 1);
 2081|     47|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (2081:11): [True: 1, False: 46]
  ------------------
 2082|     47|    }
 2083|    692|    if (version == 0) {
  ------------------
  |  Branch (2083:9): [True: 646, False: 46]
  ------------------
 2084|    646|      if (str_drc_instruction_str->downmix_id[0] == 0) {
  ------------------
  |  Branch (2084:11): [True: 393, False: 253]
  ------------------
 2085|    393|        str_drc_instruction_str->drc_apply_to_dwnmix = 0;
 2086|    393|      } else {
 2087|    253|        str_drc_instruction_str->drc_apply_to_dwnmix = 1;
 2088|    253|      }
 2089|    646|    }
 2090|    692|    additional_dmix_id_present = impd_read_bits_buf(it_bit_buff, 1);
 2091|    692|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (2091:9): [True: 2, False: 690]
  ------------------
 2092|       |
 2093|    690|    if (additional_dmix_id_present) {
  ------------------
  |  Branch (2093:9): [True: 251, False: 439]
  ------------------
 2094|    251|      additional_dmix_id_cnt = impd_read_bits_buf(it_bit_buff, 3);
 2095|    251|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (2095:11): [True: 1, False: 250]
  ------------------
 2096|    750|      for (i = 0; i < additional_dmix_id_cnt; i++) {
  ------------------
  |  Branch (2096:19): [True: 506, False: 244]
  ------------------
 2097|    506|        str_drc_instruction_str->downmix_id[i + 1] =
 2098|    506|            impd_read_bits_buf(it_bit_buff, 7);
 2099|    506|        if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (2099:13): [True: 6, False: 500]
  ------------------
 2100|    506|      }
 2101|    244|      str_drc_instruction_str->dwnmix_id_count = 1 + additional_dmix_id_cnt;
 2102|    439|    } else {
 2103|    439|      str_drc_instruction_str->dwnmix_id_count = 1;
 2104|    439|    }
 2105|    690|  } else {
 2106|    191|    str_drc_instruction_str->downmix_id[0] = 0;
 2107|    191|    str_drc_instruction_str->dwnmix_id_count = 1;
 2108|    191|  }
 2109|       |
 2110|    874|  str_drc_instruction_str->drc_set_effect = impd_read_bits_buf(it_bit_buff, 16);
 2111|    874|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (2111:7): [True: 4, False: 870]
  ------------------
 2112|       |
 2113|    870|  if ((str_drc_instruction_str->drc_set_effect &
  ------------------
  |  Branch (2113:7): [True: 624, False: 246]
  ------------------
 2114|    870|       (EFFECT_BIT_DUCK_OTHER | EFFECT_BIT_DUCK_SELF)) == 0) {
  ------------------
  |  |   72|    870|#define EFFECT_BIT_DUCK_OTHER 0x0400
  ------------------
                     (EFFECT_BIT_DUCK_OTHER | EFFECT_BIT_DUCK_SELF)) == 0) {
  ------------------
  |  |   73|    870|#define EFFECT_BIT_DUCK_SELF 0x0800
  ------------------
 2115|    624|    str_drc_instruction_str->limiter_peak_target_present =
 2116|    624|        impd_read_bits_buf(it_bit_buff, 1);
 2117|    624|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (2117:9): [True: 5, False: 619]
  ------------------
 2118|    619|    if (str_drc_instruction_str->limiter_peak_target_present) {
  ------------------
  |  Branch (2118:9): [True: 131, False: 488]
  ------------------
 2119|    131|      limiter_peak_target = impd_read_bits_buf(it_bit_buff, 8);
 2120|    131|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (2120:11): [True: 1, False: 130]
  ------------------
 2121|    130|      str_drc_instruction_str->limiter_peak_target =
 2122|    130|          -limiter_peak_target * 0.125f;
 2123|    130|    }
 2124|    619|  }
 2125|       |
 2126|    864|  str_drc_instruction_str->drc_set_target_loudness_present =
 2127|    864|      impd_read_bits_buf(it_bit_buff, 1);
 2128|    864|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (2128:7): [True: 2, False: 862]
  ------------------
 2129|       |
 2130|    862|  str_drc_instruction_str->drc_set_target_loudness_value_upper = 0;
 2131|    862|  str_drc_instruction_str->drc_set_target_loudness_value_lower = -63;
 2132|       |
 2133|    862|  if (str_drc_instruction_str->drc_set_target_loudness_present == 1) {
  ------------------
  |  Branch (2133:7): [True: 126, False: 736]
  ------------------
 2134|    126|    WORD32 bsDrcSetTargetLoudnessValueUpper, bsDrcSetTargetLoudnessValueLower;
 2135|    126|    bsDrcSetTargetLoudnessValueUpper = impd_read_bits_buf(it_bit_buff, 6);
 2136|    126|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (2136:9): [True: 1, False: 125]
  ------------------
 2137|    125|    str_drc_instruction_str->drc_set_target_loudness_value_upper =
 2138|    125|        bsDrcSetTargetLoudnessValueUpper - 63;
 2139|    125|    str_drc_instruction_str->drc_set_target_loudness_value_lower_present =
 2140|    125|        impd_read_bits_buf(it_bit_buff, 1);
 2141|    125|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (2141:9): [True: 2, False: 123]
  ------------------
 2142|    123|    if (str_drc_instruction_str->drc_set_target_loudness_value_lower_present ==
  ------------------
  |  Branch (2142:9): [True: 36, False: 87]
  ------------------
 2143|    123|        1) {
 2144|     36|      bsDrcSetTargetLoudnessValueLower = impd_read_bits_buf(it_bit_buff, 6);
 2145|     36|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (2145:11): [True: 2, False: 34]
  ------------------
 2146|     34|      str_drc_instruction_str->drc_set_target_loudness_value_lower =
 2147|     34|          bsDrcSetTargetLoudnessValueLower - 63;
 2148|     34|    }
 2149|    123|  }
 2150|       |
 2151|    857|  str_drc_instruction_str->depends_on_drc_set_present =
 2152|    857|      impd_read_bits_buf(it_bit_buff, 1);
 2153|    857|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (2153:7): [True: 1, False: 856]
  ------------------
 2154|       |
 2155|    856|  str_drc_instruction_str->no_independent_use = 0;
 2156|    856|  if (str_drc_instruction_str->depends_on_drc_set_present) {
  ------------------
  |  Branch (2156:7): [True: 69, False: 787]
  ------------------
 2157|     69|    str_drc_instruction_str->depends_on_drc_set =
 2158|     69|        impd_read_bits_buf(it_bit_buff, 6);
 2159|     69|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (2159:9): [True: 1, False: 68]
  ------------------
 2160|    787|  } else {
 2161|    787|    str_drc_instruction_str->no_independent_use =
 2162|    787|        impd_read_bits_buf(it_bit_buff, 1);
 2163|    787|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (2163:9): [True: 2, False: 785]
  ------------------
 2164|    787|  }
 2165|    853|  if (version == 0) {
  ------------------
  |  Branch (2165:7): [True: 622, False: 231]
  ------------------
 2166|    622|    str_drc_instruction_str->requires_eq = 0;
 2167|    622|  } else {
 2168|    231|    str_drc_instruction_str->requires_eq = impd_read_bits_buf(it_bit_buff, 1);
 2169|    231|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (2169:9): [True: 2, False: 229]
  ------------------
 2170|    231|  }
 2171|       |
 2172|    851|  err = impd_sel_drc_coeff(drc_config, str_drc_instruction_str->drc_location,
 2173|    851|                           &str_p_loc_drc_coefficients_uni_drc);
 2174|    851|  if (err) return (err);
  ------------------
  |  Branch (2174:7): [True: 0, False: 851]
  ------------------
 2175|       |
 2176|    851|  ch_cnt = drc_config->channel_layout.base_channel_count;
 2177|       |
 2178|    851|  if (ch_cnt > MAX_CHANNEL_COUNT) return (UNEXPECTED_ERROR);
  ------------------
  |  |   35|    851|#define MAX_CHANNEL_COUNT (8)  // 128
  ------------------
                if (ch_cnt > MAX_CHANNEL_COUNT) return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  |  Branch (2178:7): [True: 0, False: 851]
  ------------------
 2179|  7.65k|  for (c = 0; c < MAX_CHANNEL_COUNT; c++) {
  ------------------
  |  |   35|  7.65k|#define MAX_CHANNEL_COUNT (8)  // 128
  ------------------
  |  Branch (2179:15): [True: 6.80k, False: 851]
  ------------------
 2180|  6.80k|    unique_idx[c] = -10;
 2181|  6.80k|    unique_scaling[c] = -10.0f;
 2182|  6.80k|  }
 2183|       |
 2184|    851|  if (str_drc_instruction_str->drc_set_effect &
  ------------------
  |  Branch (2184:7): [True: 239, False: 612]
  ------------------
 2185|    851|      (EFFECT_BIT_DUCK_OTHER | EFFECT_BIT_DUCK_SELF)) {
  ------------------
  |  |   72|    851|#define EFFECT_BIT_DUCK_OTHER 0x0400
  ------------------
                    (EFFECT_BIT_DUCK_OTHER | EFFECT_BIT_DUCK_SELF)) {
  ------------------
  |  |   73|    851|#define EFFECT_BIT_DUCK_SELF 0x0800
  ------------------
 2186|    239|    c = 0;
 2187|  1.09k|    while (c < ch_cnt) {
  ------------------
  |  Branch (2187:12): [True: 886, False: 213]
  ------------------
 2188|    886|      WORD32 bs_gain_set_idx;
 2189|    886|      bs_gain_set_idx = impd_read_bits_buf(it_bit_buff, 6);
 2190|    886|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (2190:11): [True: 2, False: 884]
  ------------------
 2191|    884|      if (bs_gain_set_idx > GAIN_SET_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |   91|    884|#define GAIN_SET_COUNT_MAX SEQUENCE_COUNT_MAX
  |  |  ------------------
  |  |  |  |   38|    884|#define SEQUENCE_COUNT_MAX 24
  |  |  ------------------
  ------------------
                    if (bs_gain_set_idx > GAIN_SET_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      9|#define UNEXPECTED_ERROR 2
  ------------------
  |  Branch (2191:11): [True: 9, False: 875]
  ------------------
 2192|    875|      str_drc_instruction_str->gain_set_index[c] = bs_gain_set_idx - 1;
 2193|    875|      impd_dec_ducking_scaling(
 2194|    875|          it_bit_buff,
 2195|    875|          &(str_drc_instruction_str->str_ducking_modifiers_for_channel[c]
 2196|    875|                .ducking_scaling_flag),
 2197|    875|          &(str_drc_instruction_str->str_ducking_modifiers_for_channel[c]
 2198|    875|                .ducking_scaling));
 2199|       |
 2200|    875|      c++;
 2201|       |
 2202|    875|      repeat_parameters = impd_read_bits_buf(it_bit_buff, 1);
 2203|    875|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (2203:11): [True: 3, False: 872]
  ------------------
 2204|       |
 2205|    872|      if (repeat_parameters == 1) {
  ------------------
  |  Branch (2205:11): [True: 66, False: 806]
  ------------------
 2206|     66|        repeat_parameters_cnt = impd_read_bits_buf(it_bit_buff, 5);
 2207|     66|        if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (2207:13): [True: 1, False: 65]
  ------------------
 2208|       |
 2209|     65|        repeat_parameters_cnt += 1;
 2210|    241|        for (k = 0; k < repeat_parameters_cnt; k++) {
  ------------------
  |  Branch (2210:21): [True: 187, False: 54]
  ------------------
 2211|    187|          if (c > (MAX_CHANNEL_COUNT-1))
  ------------------
  |  |   35|    187|#define MAX_CHANNEL_COUNT (8)  // 128
  ------------------
  |  Branch (2211:15): [True: 11, False: 176]
  ------------------
 2212|     11|            return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|     11|#define UNEXPECTED_ERROR 2
  ------------------
 2213|    176|          str_drc_instruction_str->gain_set_index[c] =
 2214|    176|              str_drc_instruction_str->gain_set_index[c - 1];
 2215|    176|          str_drc_instruction_str->str_ducking_modifiers_for_channel[c] =
 2216|    176|              str_drc_instruction_str->str_ducking_modifiers_for_channel[c - 1];
 2217|    176|          c++;
 2218|    176|        }
 2219|     65|      }
 2220|    872|    }
 2221|    213|    if (c > ch_cnt) {
  ------------------
  |  Branch (2221:9): [True: 1, False: 212]
  ------------------
 2222|      1|      return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      1|#define UNEXPECTED_ERROR 2
  ------------------
 2223|      1|    }
 2224|    212|    ducking_sequence = -1;
 2225|    212|    g = 0;
 2226|    212|    if (str_drc_instruction_str->drc_set_effect & EFFECT_BIT_DUCK_OTHER) {
  ------------------
  |  |   72|    212|#define EFFECT_BIT_DUCK_OTHER 0x0400
  ------------------
  |  Branch (2226:9): [True: 77, False: 135]
  ------------------
 2227|    438|      for (c = 0; c < ch_cnt; c++) {
  ------------------
  |  Branch (2227:19): [True: 368, False: 70]
  ------------------
 2228|    368|        match = 0;
 2229|    368|        idx = str_drc_instruction_str->gain_set_index[c];
 2230|    368|        factor = str_drc_instruction_str->str_ducking_modifiers_for_channel[c]
 2231|    368|                     .ducking_scaling;
 2232|    368|        if (idx < 0) {
  ------------------
  |  Branch (2232:13): [True: 155, False: 213]
  ------------------
 2233|    207|          for (n = 0; n < g; n++) {
  ------------------
  |  Branch (2233:23): [True: 151, False: 56]
  ------------------
 2234|    151|            if (unique_scaling[n] == factor) {
  ------------------
  |  Branch (2234:17): [True: 99, False: 52]
  ------------------
 2235|     99|              match = 1;
 2236|     99|              str_drc_instruction_str->channel_group_of_ch[c] = n;
 2237|     99|              break;
 2238|     99|            }
 2239|    151|          }
 2240|    155|          if (match == 0) {
  ------------------
  |  Branch (2240:15): [True: 56, False: 99]
  ------------------
 2241|     56|            unique_idx[g] = idx;
 2242|     56|            unique_scaling[g] = factor;
 2243|     56|            str_drc_instruction_str->channel_group_of_ch[c] = g;
 2244|     56|            g++;
 2245|     56|          }
 2246|    213|        } else {
 2247|    213|          if ((ducking_sequence > 0) && (ducking_sequence != idx)) {
  ------------------
  |  Branch (2247:15): [True: 127, False: 86]
  |  Branch (2247:41): [True: 7, False: 120]
  ------------------
 2248|       |            /* drc for ducking can have only one ducking sequence */
 2249|      7|            return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      7|#define UNEXPECTED_ERROR 2
  ------------------
 2250|      7|          }
 2251|    206|          ducking_sequence = idx;
 2252|    206|          str_drc_instruction_str->channel_group_of_ch[c] = -1;
 2253|    206|        }
 2254|    368|      }
 2255|     70|      str_drc_instruction_str->num_drc_ch_groups = g;
 2256|     70|      if (ducking_sequence == -1) {
  ------------------
  |  Branch (2256:11): [True: 5, False: 65]
  ------------------
 2257|       |        /* ducking sequence not found */
 2258|      5|        return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      5|#define UNEXPECTED_ERROR 2
  ------------------
 2259|      5|      }
 2260|    135|    } else if (str_drc_instruction_str->drc_set_effect & EFFECT_BIT_DUCK_SELF) {
  ------------------
  |  |   73|    135|#define EFFECT_BIT_DUCK_SELF 0x0800
  ------------------
  |  Branch (2260:16): [True: 135, False: 0]
  ------------------
 2261|    689|      for (c = 0; c < ch_cnt; c++) {
  ------------------
  |  Branch (2261:19): [True: 554, False: 135]
  ------------------
 2262|    554|        match = 0;
 2263|    554|        idx = str_drc_instruction_str->gain_set_index[c];
 2264|    554|        factor = str_drc_instruction_str->str_ducking_modifiers_for_channel[c]
 2265|    554|                     .ducking_scaling;
 2266|    554|        if (idx >= 0) {
  ------------------
  |  Branch (2266:13): [True: 463, False: 91]
  ------------------
 2267|    733|          for (n = 0; n < g; n++) {
  ------------------
  |  Branch (2267:23): [True: 509, False: 224]
  ------------------
 2268|    509|            if ((unique_idx[n] == idx) && (unique_scaling[n] == factor)) {
  ------------------
  |  Branch (2268:17): [True: 260, False: 249]
  |  Branch (2268:43): [True: 239, False: 21]
  ------------------
 2269|    239|              match = 1;
 2270|    239|              str_drc_instruction_str->channel_group_of_ch[c] = n;
 2271|    239|              break;
 2272|    239|            }
 2273|    509|          }
 2274|    463|          if (match == 0) {
  ------------------
  |  Branch (2274:15): [True: 224, False: 239]
  ------------------
 2275|    224|            unique_idx[g] = idx;
 2276|    224|            unique_scaling[g] = factor;
 2277|    224|            str_drc_instruction_str->channel_group_of_ch[c] = g;
 2278|    224|            g++;
 2279|    224|          }
 2280|    463|        } else {
 2281|     91|          str_drc_instruction_str->channel_group_of_ch[c] = -1;
 2282|     91|        }
 2283|    554|      }
 2284|    135|      str_drc_instruction_str->num_drc_ch_groups = g;
 2285|    135|    }
 2286|       |
 2287|    200|    if (str_drc_instruction_str->num_drc_ch_groups >
  ------------------
  |  Branch (2287:9): [True: 0, False: 200]
  ------------------
 2288|    200|        min(CHANNEL_GROUP_COUNT_MAX, MAX_CHANNEL_COUNT))
  ------------------
  |  |  221|    200|#define min(a, b) ((a) < (b) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (221:20): [Folded, False: 200]
  |  |  ------------------
  ------------------
 2289|      0|      return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
 2290|    469|    for (g = 0; g < str_drc_instruction_str->num_drc_ch_groups; g++) {
  ------------------
  |  Branch (2290:17): [True: 269, False: 200]
  ------------------
 2291|    269|      WORD32 set =
 2292|    269|          (str_drc_instruction_str->drc_set_effect & EFFECT_BIT_DUCK_OTHER)
  ------------------
  |  |   72|    269|#define EFFECT_BIT_DUCK_OTHER 0x0400
  ------------------
  |  Branch (2292:11): [True: 45, False: 224]
  ------------------
 2293|    269|              ? ducking_sequence
 2294|    269|              : unique_idx[g];
 2295|    269|      if (set < 0) return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  |  Branch (2295:11): [True: 0, False: 269]
  ------------------
 2296|    269|      str_drc_instruction_str->gain_set_index_for_channel_group[g] = set;
 2297|    269|      str_drc_instruction_str->str_ducking_modifiers_for_channel_group[g]
 2298|    269|          .ducking_scaling = unique_scaling[g];
 2299|    269|      if (unique_scaling[g] != 1.0f) {
  ------------------
  |  Branch (2299:11): [True: 48, False: 221]
  ------------------
 2300|     48|        str_drc_instruction_str->str_ducking_modifiers_for_channel_group[g]
 2301|     48|            .ducking_scaling_flag = 1;
 2302|    221|      } else {
 2303|    221|        str_drc_instruction_str->str_ducking_modifiers_for_channel_group[g]
 2304|    221|            .ducking_scaling_flag = 0;
 2305|    221|      }
 2306|    269|      str_drc_instruction_str->band_count_of_ch_group[g] = 1;
 2307|    269|    }
 2308|    612|  } else {
 2309|    612|    if (((version == 0) ||
  ------------------
  |  Branch (2309:10): [True: 429, False: 183]
  ------------------
 2310|    183|         (str_drc_instruction_str->drc_apply_to_dwnmix != 0)) &&
  ------------------
  |  Branch (2310:10): [True: 17, False: 166]
  ------------------
 2311|    446|        (str_drc_instruction_str->downmix_id[0] != 0) &&
  ------------------
  |  Branch (2311:9): [True: 156, False: 290]
  ------------------
 2312|    156|        (str_drc_instruction_str->downmix_id[0] != ID_FOR_ANY_DOWNMIX) &&
  ------------------
  |  |  136|    156|#define ID_FOR_ANY_DOWNMIX 0x7F
  ------------------
  |  Branch (2312:9): [True: 133, False: 23]
  ------------------
 2313|    133|        (str_drc_instruction_str->dwnmix_id_count == 1)) {
  ------------------
  |  Branch (2313:9): [True: 49, False: 84]
  ------------------
 2314|    170|      for (i = 0; i < drc_config->dwnmix_instructions_count; i++) {
  ------------------
  |  Branch (2314:19): [True: 151, False: 19]
  ------------------
 2315|    151|        if (str_drc_instruction_str->downmix_id[0] ==
  ------------------
  |  Branch (2315:13): [True: 30, False: 121]
  ------------------
 2316|    151|            drc_config->dwnmix_instructions[i].downmix_id)
 2317|     30|          break;
 2318|    151|      }
 2319|     49|      if (i == drc_config->dwnmix_instructions_count) {
  ------------------
  |  Branch (2319:11): [True: 19, False: 30]
  ------------------
 2320|       |        /* dwnmix_instructions not found */
 2321|     19|        return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|     19|#define UNEXPECTED_ERROR 2
  ------------------
 2322|     19|      }
 2323|     30|      ch_cnt = drc_config->dwnmix_instructions[i].target_channel_count;
 2324|    563|    } else if (((version == 0) ||
  ------------------
  |  Branch (2324:17): [True: 381, False: 182]
  ------------------
 2325|    182|                (str_drc_instruction_str->drc_apply_to_dwnmix != 0)) &&
  ------------------
  |  Branch (2325:17): [True: 16, False: 166]
  ------------------
 2326|    397|               ((str_drc_instruction_str->downmix_id[0] ==
  ------------------
  |  Branch (2326:17): [True: 23, False: 374]
  ------------------
 2327|    397|                 ID_FOR_ANY_DOWNMIX) ||
  ------------------
  |  |  136|    397|#define ID_FOR_ANY_DOWNMIX 0x7F
  ------------------
 2328|    374|                (str_drc_instruction_str->dwnmix_id_count > 1))) {
  ------------------
  |  Branch (2328:17): [True: 86, False: 288]
  ------------------
 2329|    109|      ch_cnt = 1;
 2330|    109|    }
 2331|       |
 2332|    593|    if (ch_cnt > MAX_CHANNEL_COUNT) return (UNEXPECTED_ERROR);
  ------------------
  |  |   35|    593|#define MAX_CHANNEL_COUNT (8)  // 128
  ------------------
                  if (ch_cnt > MAX_CHANNEL_COUNT) return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  |  Branch (2332:9): [True: 0, False: 593]
  ------------------
 2333|    593|    c = 0;
 2334|  2.65k|    while (c < ch_cnt) {
  ------------------
  |  Branch (2334:12): [True: 2.08k, False: 572]
  ------------------
 2335|  2.08k|      WORD32 bs_gain_set_idx;
 2336|  2.08k|      WORD32 repeat_gain_set_idx, repeat_gain_set_idx_cnt, temp;
 2337|       |
 2338|  2.08k|      temp = impd_read_bits_buf(it_bit_buff, 7);
 2339|  2.08k|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (2339:11): [True: 2, False: 2.08k]
  ------------------
 2340|       |
 2341|  2.08k|      bs_gain_set_idx = (temp >> 1) & 0x7f;
 2342|  2.08k|      repeat_gain_set_idx = temp & 1;
 2343|       |
 2344|  2.08k|      if (bs_gain_set_idx > GAIN_SET_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |   91|  2.08k|#define GAIN_SET_COUNT_MAX SEQUENCE_COUNT_MAX
  |  |  ------------------
  |  |  |  |   38|  2.08k|#define SEQUENCE_COUNT_MAX 24
  |  |  ------------------
  ------------------
                    if (bs_gain_set_idx > GAIN_SET_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      8|#define UNEXPECTED_ERROR 2
  ------------------
  |  Branch (2344:11): [True: 8, False: 2.07k]
  ------------------
 2345|       |
 2346|  2.07k|      str_drc_instruction_str->gain_set_index[c] = bs_gain_set_idx - 1;
 2347|  2.07k|      c++;
 2348|       |
 2349|  2.07k|      if (repeat_gain_set_idx == 1) {
  ------------------
  |  Branch (2349:11): [True: 123, False: 1.95k]
  ------------------
 2350|    123|        repeat_gain_set_idx_cnt = impd_read_bits_buf(it_bit_buff, 5);
 2351|    123|        if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (2351:13): [True: 1, False: 122]
  ------------------
 2352|       |
 2353|    122|        repeat_gain_set_idx_cnt += 1;
 2354|    353|        for (k = 0; k < repeat_gain_set_idx_cnt; k++) {
  ------------------
  |  Branch (2354:21): [True: 241, False: 112]
  ------------------
 2355|    241|          if (c > (MAX_CHANNEL_COUNT - 1))
  ------------------
  |  |   35|    241|#define MAX_CHANNEL_COUNT (8)  // 128
  ------------------
  |  Branch (2355:15): [True: 10, False: 231]
  ------------------
 2356|     10|            return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|     10|#define UNEXPECTED_ERROR 2
  ------------------
 2357|    231|          str_drc_instruction_str->gain_set_index[c] = bs_gain_set_idx - 1;
 2358|    231|          c++;
 2359|    231|        }
 2360|    122|      }
 2361|  2.07k|    }
 2362|    572|    if (c > ch_cnt) {
  ------------------
  |  Branch (2362:9): [True: 3, False: 569]
  ------------------
 2363|      3|      return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      3|#define UNEXPECTED_ERROR 2
  ------------------
 2364|      3|    }
 2365|       |
 2366|    569|    g = 0;
 2367|    569|    if ((str_drc_instruction_str->downmix_id[0] == ID_FOR_ANY_DOWNMIX) ||
  ------------------
  |  |  136|    569|#define ID_FOR_ANY_DOWNMIX 0x7F
  ------------------
  |  Branch (2367:9): [True: 22, False: 547]
  ------------------
 2368|    547|        (str_drc_instruction_str->dwnmix_id_count > 1)) {
  ------------------
  |  Branch (2368:9): [True: 84, False: 463]
  ------------------
 2369|    106|      WORD32 idx = str_drc_instruction_str->gain_set_index[0];
 2370|    106|      if (idx >= 0) {
  ------------------
  |  Branch (2370:11): [True: 63, False: 43]
  ------------------
 2371|     63|        unique_idx[0] = idx;
 2372|     63|        g = 1;
 2373|     63|      }
 2374|    463|    } else {
 2375|  2.56k|      for (c = 0; c < ch_cnt; c++) {
  ------------------
  |  Branch (2375:19): [True: 2.10k, False: 463]
  ------------------
 2376|  2.10k|        WORD32 idx = str_drc_instruction_str->gain_set_index[c];
 2377|  2.10k|        match = 0;
 2378|  2.10k|        if (idx >= 0) {
  ------------------
  |  Branch (2378:13): [True: 626, False: 1.47k]
  ------------------
 2379|  1.36k|          for (n = 0; n < g; n++) {
  ------------------
  |  Branch (2379:23): [True: 863, False: 500]
  ------------------
 2380|    863|            if (unique_idx[n] == idx) {
  ------------------
  |  Branch (2380:17): [True: 126, False: 737]
  ------------------
 2381|    126|              match = 1;
 2382|    126|              str_drc_instruction_str->channel_group_of_ch[c] = n;
 2383|    126|              break;
 2384|    126|            }
 2385|    863|          }
 2386|    626|          if (match == 0) {
  ------------------
  |  Branch (2386:15): [True: 500, False: 126]
  ------------------
 2387|    500|            unique_idx[g] = idx;
 2388|    500|            str_drc_instruction_str->channel_group_of_ch[c] = g;
 2389|    500|            g++;
 2390|    500|          }
 2391|  1.47k|        } else {
 2392|  1.47k|          str_drc_instruction_str->channel_group_of_ch[c] = -1;
 2393|  1.47k|        }
 2394|  2.10k|      }
 2395|    463|    }
 2396|       |
 2397|    569|    str_drc_instruction_str->num_drc_ch_groups = g;
 2398|       |
 2399|    569|    if (str_drc_instruction_str->num_drc_ch_groups >
  ------------------
  |  Branch (2399:9): [True: 0, False: 569]
  ------------------
 2400|    569|        min(CHANNEL_GROUP_COUNT_MAX, MAX_CHANNEL_COUNT))
  ------------------
  |  |  221|    569|#define min(a, b) ((a) < (b) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (221:20): [Folded, False: 569]
  |  |  ------------------
  ------------------
 2401|      0|      return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
 2402|  1.09k|    for (g = 0; g < str_drc_instruction_str->num_drc_ch_groups; g++) {
  ------------------
  |  Branch (2402:17): [True: 551, False: 546]
  ------------------
 2403|    551|      WORD32 set, band_count;
 2404|       |
 2405|    551|      set = unique_idx[g];
 2406|    551|      if (set < 0) return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  |  Branch (2406:11): [True: 0, False: 551]
  ------------------
 2407|    551|      str_drc_instruction_str->gain_set_index_for_channel_group[g] = set;
 2408|       |
 2409|    551|      if (str_p_loc_drc_coefficients_uni_drc != NULL &&
  ------------------
  |  Branch (2409:11): [True: 271, False: 280]
  ------------------
 2410|    271|          set < str_p_loc_drc_coefficients_uni_drc->gain_set_count) {
  ------------------
  |  Branch (2410:11): [True: 76, False: 195]
  ------------------
 2411|     76|        band_count =
 2412|     76|            str_p_loc_drc_coefficients_uni_drc->gain_set_params[set].band_count;
 2413|    475|      } else {
 2414|    475|        band_count = 1;
 2415|    475|      }
 2416|       |
 2417|    551|      err = impd_dec_gain_modifiers(
 2418|    551|          it_bit_buff, version, band_count,
 2419|    551|          &(str_drc_instruction_str->str_gain_modifiers_of_ch_group[g]));
 2420|    551|      if (err) return (err);
  ------------------
  |  Branch (2420:11): [True: 23, False: 528]
  ------------------
 2421|    551|    }
 2422|    569|  }
 2423|       |
 2424|    746|  return (0);
 2425|    851|}
impd_parse_loudness_info:
 2428|  4.48k|                         ia_loudness_info_struct* loudness_info) {
 2429|  4.48k|  WORD32 err = 0, sample_peak_level, true_peak_level, i, temp;
 2430|       |
 2431|  4.48k|  loudness_info->drc_set_id = impd_read_bits_buf(it_bit_buff, 6);
 2432|  4.48k|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (2432:7): [True: 6, False: 4.47k]
  ------------------
 2433|       |
 2434|  4.47k|  if (version >= 1) {
  ------------------
  |  Branch (2434:7): [True: 376, False: 4.09k]
  ------------------
 2435|    376|    loudness_info->eq_set_id = impd_read_bits_buf(it_bit_buff, 6);
 2436|    376|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (2436:9): [True: 1, False: 375]
  ------------------
 2437|  4.09k|  } else {
 2438|  4.09k|    loudness_info->eq_set_id = 0;
 2439|  4.09k|  }
 2440|       |
 2441|  4.47k|  temp = impd_read_bits_buf(it_bit_buff, 8);
 2442|  4.47k|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (2442:7): [True: 6, False: 4.46k]
  ------------------
 2443|       |
 2444|  4.46k|  loudness_info->downmix_id = (temp >> 1) & 0x7f;
 2445|  4.46k|  loudness_info->sample_peak_level_present = temp & 1;
 2446|       |
 2447|  4.46k|  if (loudness_info->sample_peak_level_present) {
  ------------------
  |  Branch (2447:7): [True: 763, False: 3.70k]
  ------------------
 2448|    763|    sample_peak_level = impd_read_bits_buf(it_bit_buff, 12);
 2449|    763|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (2449:9): [True: 2, False: 761]
  ------------------
 2450|       |
 2451|    761|    if (sample_peak_level == 0) {
  ------------------
  |  Branch (2451:9): [True: 114, False: 647]
  ------------------
 2452|    114|      loudness_info->sample_peak_level_present = 0;
 2453|    114|      loudness_info->sample_peak_level = 0.0f;
 2454|    647|    } else {
 2455|    647|      loudness_info->sample_peak_level = 20.0f - sample_peak_level * 0.03125f;
 2456|    647|    }
 2457|    761|  }
 2458|       |
 2459|  4.46k|  loudness_info->true_peak_level_present = impd_read_bits_buf(it_bit_buff, 1);
 2460|  4.46k|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (2460:7): [True: 8, False: 4.45k]
  ------------------
 2461|       |
 2462|  4.45k|  if (loudness_info->true_peak_level_present) {
  ------------------
  |  Branch (2462:7): [True: 469, False: 3.98k]
  ------------------
 2463|    469|    true_peak_level = impd_read_bits_buf(it_bit_buff, 12);
 2464|    469|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (2464:9): [True: 2, False: 467]
  ------------------
 2465|       |
 2466|    467|    if (true_peak_level == 0) {
  ------------------
  |  Branch (2466:9): [True: 57, False: 410]
  ------------------
 2467|     57|      loudness_info->true_peak_level_present = 0;
 2468|     57|      loudness_info->true_peak_level = 0.0f;
 2469|    410|    } else {
 2470|    410|      loudness_info->true_peak_level = 20.0f - true_peak_level * 0.03125f;
 2471|    410|    }
 2472|       |
 2473|    467|    temp = impd_read_bits_buf(it_bit_buff, 6);
 2474|    467|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (2474:9): [True: 2, False: 465]
  ------------------
 2475|       |
 2476|       |    /* Parsed but unused */
 2477|    465|    loudness_info->true_peak_level_measurement_system = (temp >> 2) & 0xf;
 2478|       |    /* Parsed but unused */
 2479|    465|    loudness_info->true_peak_level_reliability = temp & 3;
 2480|    465|  }
 2481|       |
 2482|  4.45k|  loudness_info->measurement_count = impd_read_bits_buf(it_bit_buff, 4);
 2483|  4.45k|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (2483:7): [True: 1, False: 4.45k]
  ------------------
 2484|       |
 2485|  9.27k|  for (i = 0; i < loudness_info->measurement_count; i++) {
  ------------------
  |  Branch (2485:15): [True: 4.86k, False: 4.41k]
  ------------------
 2486|  4.86k|    err = impd_parse_loudness_measure(it_bit_buff,
 2487|  4.86k|                                      &(loudness_info->loudness_measure[i]));
 2488|       |
 2489|  4.86k|    if (loudness_info->loudness_measure[i].method_def ==
  ------------------
  |  Branch (2489:9): [True: 387, False: 4.47k]
  ------------------
 2490|  4.86k|        METHOD_DEFINITION_ANCHOR_LOUDNESS)
  ------------------
  |  |   29|  4.86k|#define METHOD_DEFINITION_ANCHOR_LOUDNESS 2
  ------------------
 2491|    387|      loudness_info->anchor_loudness_present = 1;
 2492|       |
 2493|  4.86k|    if (loudness_info->loudness_measure[i].measurement_system ==
  ------------------
  |  Branch (2493:9): [True: 93, False: 4.76k]
  ------------------
 2494|  4.86k|        MEASUREMENT_SYSTEM_EXPERT_PANEL)
  ------------------
  |  |   46|  4.86k|#define MEASUREMENT_SYSTEM_EXPERT_PANEL 5
  ------------------
 2495|     93|      loudness_info->expert_loudness_present = 1;
 2496|       |
 2497|  4.86k|    if (err) return (err);
  ------------------
  |  Branch (2497:9): [True: 39, False: 4.82k]
  ------------------
 2498|  4.86k|  }
 2499|       |
 2500|  4.41k|  return (0);
 2501|  4.45k|}
impd_drc_static_payload.c:impd_parametic_drc_parse_coeff:
  518|    144|    ia_drc_coeff_parametric_drc_struct* str_drc_coeff_param_drc) {
  519|    144|  WORD32 i = 0, err = 0, code = 0, mu = 0, nu = 0, temp;
  520|       |
  521|    144|  temp = impd_read_bits_buf(it_bit_buff, 5);
  522|    144|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (522:7): [True: 1, False: 143]
  ------------------
  523|       |
  524|    143|  str_drc_coeff_param_drc->drc_location = (temp >> 1) & 0xf;
  525|    143|  if (str_drc_coeff_param_drc->drc_location < 1 ||
  ------------------
  |  Branch (525:7): [True: 2, False: 141]
  ------------------
  526|    141|      str_drc_coeff_param_drc->drc_location > 4)
  ------------------
  |  Branch (526:7): [True: 2, False: 139]
  ------------------
  527|      4|    return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      4|#define UNEXPECTED_ERROR 2
  ------------------
  528|    139|  str_drc_coeff_param_drc->parametric_drc_frame_size_format = temp & 1;
  529|       |
  530|    139|  if (str_drc_coeff_param_drc->parametric_drc_frame_size_format) {
  ------------------
  |  Branch (530:7): [True: 9, False: 130]
  ------------------
  531|      9|    code = impd_read_bits_buf(it_bit_buff, 15);
  532|      9|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (532:9): [True: 1, False: 8]
  ------------------
  533|      8|    str_drc_coeff_param_drc->parametric_drc_frame_size = code + 1;
  534|    130|  } else {
  535|    130|    code = impd_read_bits_buf(it_bit_buff, 4);
  536|    130|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (536:9): [True: 1, False: 129]
  ------------------
  537|    129|    str_drc_coeff_param_drc->parametric_drc_frame_size = 1 << code;
  538|    129|  }
  539|       |
  540|    137|  str_drc_coeff_param_drc->parametric_drc_delay_max_present =
  541|    137|      impd_read_bits_buf(it_bit_buff, 1);
  542|    137|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (542:7): [True: 1, False: 136]
  ------------------
  543|    136|  if (str_drc_coeff_param_drc->parametric_drc_delay_max_present) {
  ------------------
  |  Branch (543:7): [True: 44, False: 92]
  ------------------
  544|     44|    temp = impd_read_bits_buf(it_bit_buff, 8);
  545|     44|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (545:9): [True: 0, False: 44]
  ------------------
  546|       |
  547|     44|    mu = (temp >> 3) & 0x1f;
  548|     44|    nu = temp & 3;
  549|       |
  550|     44|    str_drc_coeff_param_drc->parametric_drc_delay_max = 16 * mu * (1 << nu);
  551|     44|  }
  552|       |
  553|    136|  temp = impd_read_bits_buf(it_bit_buff, 7);
  554|    136|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (554:7): [True: 1, False: 135]
  ------------------
  555|       |
  556|    135|  str_drc_coeff_param_drc->reset_parametric_drc = (temp >> 6) & 1;
  557|    135|  str_drc_coeff_param_drc->parametric_drc_gain_set_count = temp & 0x3f;
  558|       |
  559|    135|  if (str_drc_coeff_param_drc->parametric_drc_gain_set_count >
  ------------------
  |  Branch (559:7): [True: 2, False: 133]
  ------------------
  560|    135|      SEQUENCE_COUNT_MAX)
  ------------------
  |  |   38|    135|#define SEQUENCE_COUNT_MAX 24
  ------------------
  561|      2|    return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|      2|#define UNEXPECTED_ERROR 2
  ------------------
  562|       |
  563|  1.10k|  for (i = 0; i < str_drc_coeff_param_drc->parametric_drc_gain_set_count; i++) {
  ------------------
  |  Branch (563:15): [True: 989, False: 115]
  ------------------
  564|    989|    err = impd_parametric_drc_parse_gain_set_params(
  565|    989|        it_bit_buff, drc_config,
  566|    989|        &(str_drc_coeff_param_drc->str_parametric_drc_gain_set_params[i]));
  567|    989|    if (err) return (err);
  ------------------
  |  Branch (567:9): [True: 18, False: 971]
  ------------------
  568|    989|  }
  569|       |
  570|    115|  return 0;
  571|    133|}
impd_drc_static_payload.c:impd_parse_parametric_drc_instructions:
  575|    583|    ia_parametric_drc_instructions_struct* str_parametric_drc_instructions) {
  576|    583|  WORD32 i = 0, err = 0, temp;
  577|    583|  WORD32 bit_size_len, bit_size;
  578|       |
  579|    583|  str_parametric_drc_instructions->drc_characteristic = 0;
  580|    583|  str_parametric_drc_instructions->disable_paramteric_drc = 0;
  581|       |
  582|    583|  temp = impd_read_bits_buf(it_bit_buff, 5);
  583|    583|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (583:7): [True: 5, False: 578]
  ------------------
  584|       |
  585|    578|  str_parametric_drc_instructions->parametric_drc_id = (temp >> 1) & 0xf;
  586|    578|  str_parametric_drc_instructions->parametric_drc_look_ahead_flag = temp & 1;
  587|       |
  588|    578|  if (str_parametric_drc_instructions->parametric_drc_look_ahead_flag) {
  ------------------
  |  Branch (588:7): [True: 178, False: 400]
  ------------------
  589|    178|    str_parametric_drc_instructions->parametric_drc_look_ahead =
  590|    178|        impd_read_bits_buf(it_bit_buff, 7);
  591|    178|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (591:9): [True: 1, False: 177]
  ------------------
  592|    400|  } else {
  593|    400|    str_parametric_drc_instructions->parametric_drc_look_ahead = 0;
  594|    400|  }
  595|       |
  596|    577|  str_parametric_drc_instructions->parametric_drc_preset_id_present =
  597|    577|      impd_read_bits_buf(it_bit_buff, 1);
  598|    577|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (598:7): [True: 8, False: 569]
  ------------------
  599|       |
  600|    569|  if (str_parametric_drc_instructions->parametric_drc_preset_id_present) {
  ------------------
  |  Branch (600:7): [True: 190, False: 379]
  ------------------
  601|    190|    str_parametric_drc_instructions->parametric_drc_preset_id =
  602|    190|        impd_read_bits_buf(it_bit_buff, 7);
  603|    190|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (603:9): [True: 2, False: 188]
  ------------------
  604|       |
  605|    188|    switch (str_parametric_drc_instructions->parametric_drc_preset_id) {
  606|     27|      case 0:
  ------------------
  |  Branch (606:7): [True: 27, False: 161]
  ------------------
  607|     40|      case 1:
  ------------------
  |  Branch (607:7): [True: 13, False: 175]
  ------------------
  608|     62|      case 2:
  ------------------
  |  Branch (608:7): [True: 22, False: 166]
  ------------------
  609|     67|      case 3:
  ------------------
  |  Branch (609:7): [True: 5, False: 183]
  ------------------
  610|     68|      case 4:
  ------------------
  |  Branch (610:7): [True: 1, False: 187]
  ------------------
  611|     68|        str_parametric_drc_instructions->drc_characteristic =
  612|     68|            str_parametric_drc_instructions->parametric_drc_preset_id + 7;
  613|     68|        str_parametric_drc_instructions->parametric_drc_type =
  614|     68|            PARAM_DRC_TYPE_FF;
  ------------------
  |  |  181|     68|#define PARAM_DRC_TYPE_FF 0x0
  ------------------
  615|       |
  616|     68|        str_parametric_drc_instructions->str_parametric_drc_type_feed_forward
  617|     68|            .level_estim_k_weighting_type = 2;
  618|     68|        str_parametric_drc_instructions->str_parametric_drc_type_feed_forward
  619|     68|            .level_estim_integration_time = parametric_drc_frame_size;
  620|       |
  621|     68|        impd_parametric_drc_ffwd_init_drc_curve_params(
  622|     68|            str_parametric_drc_instructions->drc_characteristic,
  623|     68|            &str_parametric_drc_instructions
  624|     68|                 ->str_parametric_drc_type_feed_forward);
  625|     68|        impd_parametric_drc_ffwd_init_drc_gain_smooth_params(
  626|     68|            str_parametric_drc_instructions->drc_characteristic,
  627|     68|            &str_parametric_drc_instructions
  628|     68|                 ->str_parametric_drc_type_feed_forward);
  629|       |
  630|     68|        break;
  631|    120|      default:
  ------------------
  |  Branch (631:7): [True: 120, False: 68]
  ------------------
  632|    120|        str_parametric_drc_instructions->disable_paramteric_drc = 1;
  633|    120|        break;
  634|    188|    }
  635|    379|  } else {
  636|    379|    str_parametric_drc_instructions->parametric_drc_type =
  637|    379|        impd_read_bits_buf(it_bit_buff, 3);
  638|    379|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (638:9): [True: 1, False: 378]
  ------------------
  639|       |
  640|    378|    if (str_parametric_drc_instructions->parametric_drc_type ==
  ------------------
  |  Branch (640:9): [True: 221, False: 157]
  ------------------
  641|    378|        PARAM_DRC_TYPE_FF) {
  ------------------
  |  |  181|    378|#define PARAM_DRC_TYPE_FF 0x0
  ------------------
  642|    221|      err = impd_parse_parametric_drc_ffwd(
  643|    221|          it_bit_buff, parametric_drc_frame_size,
  644|    221|          &(str_parametric_drc_instructions
  645|    221|                ->str_parametric_drc_type_feed_forward));
  646|    221|      if (err) return (err);
  ------------------
  |  Branch (646:11): [True: 19, False: 202]
  ------------------
  647|    202|      str_parametric_drc_instructions->disable_paramteric_drc =
  648|    202|          str_parametric_drc_instructions->str_parametric_drc_type_feed_forward
  649|    202|              .disable_paramteric_drc;
  650|    202|      str_parametric_drc_instructions->drc_characteristic =
  651|    202|          str_parametric_drc_instructions->str_parametric_drc_type_feed_forward
  652|    202|              .drc_characteristic;
  653|    202|    } else if (str_parametric_drc_instructions->parametric_drc_type ==
  ------------------
  |  Branch (653:16): [True: 64, False: 93]
  ------------------
  654|    157|               PARAM_DRC_TYPE_LIM) {
  ------------------
  |  |  185|    157|#define PARAM_DRC_TYPE_LIM 0x1
  ------------------
  655|     64|      err = impd_parse_parametric_drc_lim(
  656|     64|          it_bit_buff, &(str_parametric_drc_instructions->parametric_drc_lim));
  657|     64|      if (err) return (err);
  ------------------
  |  Branch (657:11): [True: 4, False: 60]
  ------------------
  658|     60|      str_parametric_drc_instructions->disable_paramteric_drc =
  659|     60|          str_parametric_drc_instructions->parametric_drc_lim
  660|     60|              .disable_paramteric_drc;
  661|     60|      str_parametric_drc_instructions->drc_characteristic =
  662|     60|          str_parametric_drc_instructions->parametric_drc_lim
  663|     60|              .drc_characteristic;
  664|     60|      if (str_parametric_drc_instructions->parametric_drc_look_ahead_flag) {
  ------------------
  |  Branch (664:11): [True: 8, False: 52]
  ------------------
  665|      8|        str_parametric_drc_instructions->parametric_drc_lim
  666|      8|            .parametric_lim_attack =
  667|      8|            str_parametric_drc_instructions->parametric_drc_look_ahead;
  668|      8|      }
  669|     93|    } else {
  670|     93|      bit_size_len = impd_read_bits_buf(it_bit_buff, 3) + 4;
  671|     93|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (671:11): [True: 3, False: 90]
  ------------------
  672|       |
  673|     90|      bit_size = impd_read_bits_buf(it_bit_buff, bit_size_len);
  674|     90|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (674:11): [True: 1, False: 89]
  ------------------
  675|     89|      str_parametric_drc_instructions->len_bit_size = bit_size + 1;
  676|       |
  677|     89|      switch (str_parametric_drc_instructions->parametric_drc_type) {
  678|     89|        default:
  ------------------
  |  Branch (678:9): [True: 89, False: 0]
  ------------------
  679|     89|          str_parametric_drc_instructions->disable_paramteric_drc = 1;
  680|    980|          for (i = 0; i < str_parametric_drc_instructions->len_bit_size; i++) {
  ------------------
  |  Branch (680:23): [True: 895, False: 85]
  ------------------
  681|    895|            impd_read_bits_buf(it_bit_buff, 1);
  682|    895|            if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (682:17): [True: 4, False: 891]
  ------------------
  683|    895|          }
  684|     85|          break;
  685|     89|      }
  686|     89|    }
  687|    378|  }
  688|       |
  689|    535|  return 0;
  690|    569|}
impd_drc_static_payload.c:impd_parametric_drc_ffwd_init_drc_curve_params:
   34|    241|                                   str_parametric_drc_type_feed_forward) {
   35|    241|  WORD32* node_level = str_parametric_drc_type_feed_forward->node_level;
   36|    241|  WORD32* node_gain = str_parametric_drc_type_feed_forward->node_gain;
   37|       |
   38|    241|  switch (drc_characteristic) {
   39|     33|    case 7:
  ------------------
  |  Branch (39:5): [True: 33, False: 208]
  ------------------
   40|     33|      str_parametric_drc_type_feed_forward->node_count = 5;
   41|     33|      node_level[0] = -22;
   42|     33|      node_gain[0] = 6;
   43|     33|      node_level[1] = -10;
   44|     33|      node_gain[1] = 0;
   45|     33|      node_level[2] = 10;
   46|     33|      node_gain[2] = 0;
   47|     33|      node_level[3] = 20;
   48|     33|      node_gain[3] = -5;
   49|     33|      node_level[4] = 40;
   50|     33|      node_gain[4] = -24;
   51|     33|      break;
   52|     28|    case 8:
  ------------------
  |  Branch (52:5): [True: 28, False: 213]
  ------------------
   53|     28|      str_parametric_drc_type_feed_forward->node_count = 5;
   54|     28|      node_level[0] = -12;
   55|     28|      node_gain[0] = 6;
   56|     28|      node_level[1] = 0;
   57|     28|      node_gain[1] = 0;
   58|     28|      node_level[2] = 5;
   59|     28|      node_gain[2] = 0;
   60|     28|      node_level[3] = 15;
   61|     28|      node_gain[3] = -5;
   62|     28|      node_level[4] = 35;
   63|     28|      node_gain[4] = -24;
   64|     28|      break;
   65|     25|    case 9:
  ------------------
  |  Branch (65:5): [True: 25, False: 216]
  ------------------
   66|     25|      str_parametric_drc_type_feed_forward->node_count = 4;
   67|     25|      node_level[0] = -34;
   68|     25|      node_gain[0] = 12;
   69|     25|      node_level[1] = -10;
   70|     25|      node_gain[1] = 0;
   71|     25|      node_level[2] = 10;
   72|     25|      node_gain[2] = 0;
   73|     25|      node_level[3] = 40;
   74|     25|      node_gain[3] = -15;
   75|     25|      break;
   76|      6|    case 10:
  ------------------
  |  Branch (76:5): [True: 6, False: 235]
  ------------------
   77|      6|      str_parametric_drc_type_feed_forward->node_count = 5;
   78|      6|      node_level[0] = -24;
   79|      6|      node_gain[0] = 12;
   80|      6|      node_level[1] = 0;
   81|      6|      node_gain[1] = 0;
   82|      6|      node_level[2] = 5;
   83|      6|      node_gain[2] = 0;
   84|      6|      node_level[3] = 15;
   85|      6|      node_gain[3] = -5;
   86|      6|      node_level[4] = 35;
   87|      6|      node_gain[4] = -24;
   88|      6|      break;
   89|      2|    case 11:
  ------------------
  |  Branch (89:5): [True: 2, False: 239]
  ------------------
   90|      2|      str_parametric_drc_type_feed_forward->node_count = 5;
   91|      2|      node_level[0] = -19;
   92|      2|      node_gain[0] = 15;
   93|      2|      node_level[1] = 0;
   94|      2|      node_gain[1] = 0;
   95|      2|      node_level[2] = 5;
   96|      2|      node_gain[2] = 0;
   97|      2|      node_level[3] = 15;
   98|      2|      node_gain[3] = -5;
   99|      2|      node_level[4] = 35;
  100|      2|      node_gain[4] = -24;
  101|      2|      break;
  102|    147|    default:
  ------------------
  |  Branch (102:5): [True: 147, False: 94]
  ------------------
  103|    147|      str_parametric_drc_type_feed_forward->disable_paramteric_drc = 1;
  104|    241|  }
  105|       |
  106|    241|  return;
  107|    241|}
impd_drc_static_payload.c:impd_parametric_drc_ffwd_init_drc_gain_smooth_params:
  111|    282|                                   str_parametric_drc_type_feed_forward) {
  112|    282|  str_parametric_drc_type_feed_forward->gain_smooth_attack_time_slow = 100;
  113|    282|  str_parametric_drc_type_feed_forward->gain_smooth_time_fast_present = 1;
  114|    282|  str_parametric_drc_type_feed_forward->gain_smooth_attack_time_fast = 10;
  115|    282|  str_parametric_drc_type_feed_forward->gain_smooth_threshold_present = 1;
  116|    282|  str_parametric_drc_type_feed_forward->gain_smooth_hold_off_count_present = 1;
  117|    282|  str_parametric_drc_type_feed_forward->gain_smooth_hold_off = 10;
  118|       |
  119|    282|  switch (drc_characteristic) {
  120|     33|    case 7:
  ------------------
  |  Branch (120:5): [True: 33, False: 249]
  ------------------
  121|     61|    case 8:
  ------------------
  |  Branch (121:5): [True: 28, False: 254]
  ------------------
  122|     86|    case 9:
  ------------------
  |  Branch (122:5): [True: 25, False: 257]
  ------------------
  123|     86|      str_parametric_drc_type_feed_forward->gain_smooth_release_time_slow =
  124|     86|          3000;
  125|     86|      str_parametric_drc_type_feed_forward->gain_smooth_release_time_fast =
  126|     86|          1000;
  127|     86|      str_parametric_drc_type_feed_forward->gain_smooth_attack_threshold = 15;
  128|     86|      str_parametric_drc_type_feed_forward->gain_smooth_rel_threshold = 20;
  129|     86|      break;
  130|      6|    case 10:
  ------------------
  |  Branch (130:5): [True: 6, False: 276]
  ------------------
  131|      6|      str_parametric_drc_type_feed_forward->gain_smooth_release_time_slow =
  132|      6|          10000;
  133|      6|      str_parametric_drc_type_feed_forward->gain_smooth_release_time_fast =
  134|      6|          1000;
  135|      6|      str_parametric_drc_type_feed_forward->gain_smooth_attack_threshold = 15;
  136|      6|      str_parametric_drc_type_feed_forward->gain_smooth_rel_threshold = 20;
  137|      6|      break;
  138|      2|    case 11:
  ------------------
  |  Branch (138:5): [True: 2, False: 280]
  ------------------
  139|      2|      str_parametric_drc_type_feed_forward->gain_smooth_release_time_slow =
  140|      2|          1000;
  141|      2|      str_parametric_drc_type_feed_forward->gain_smooth_release_time_fast = 200;
  142|      2|      str_parametric_drc_type_feed_forward->gain_smooth_attack_threshold = 10;
  143|      2|      str_parametric_drc_type_feed_forward->gain_smooth_rel_threshold = 10;
  144|      2|      break;
  145|    188|    default:
  ------------------
  |  Branch (145:5): [True: 188, False: 94]
  ------------------
  146|    188|      str_parametric_drc_type_feed_forward->gain_smooth_release_time_slow =
  147|    188|          3000;
  148|    188|      str_parametric_drc_type_feed_forward->gain_smooth_release_time_fast =
  149|    188|          1000;
  150|    188|      str_parametric_drc_type_feed_forward->gain_smooth_attack_threshold = 15;
  151|    188|      str_parametric_drc_type_feed_forward->gain_smooth_rel_threshold = 20;
  152|    188|      break;
  153|    282|  }
  154|       |
  155|    282|  return;
  156|    282|}
impd_drc_static_payload.c:impd_parse_parametric_drc_ffwd:
  161|    221|        str_parametric_drc_type_feed_forward) {
  162|    221|  WORD32 i = 0, tmp = 0;
  163|       |  // WORD32 err = 0;
  164|       |
  165|    221|  str_parametric_drc_type_feed_forward->disable_paramteric_drc = 0;
  166|       |
  167|    221|  tmp = impd_read_bits_buf(it_bit_buff, 3);
  168|    221|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (168:7): [True: 1, False: 220]
  ------------------
  169|       |
  170|    220|  str_parametric_drc_type_feed_forward->level_estim_k_weighting_type =
  171|    220|      (tmp >> 1) & 3;
  172|    220|  str_parametric_drc_type_feed_forward->level_estim_integration_time_present =
  173|    220|      tmp & 1;
  174|       |
  175|    220|  if (str_parametric_drc_type_feed_forward
  ------------------
  |  Branch (175:7): [True: 60, False: 160]
  ------------------
  176|    220|          ->level_estim_integration_time_present) {
  177|     60|    tmp = impd_read_bits_buf(it_bit_buff, 6);
  178|     60|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (178:9): [True: 1, False: 59]
  ------------------
  179|     59|    str_parametric_drc_type_feed_forward->level_estim_integration_time =
  180|     59|        (tmp + 1) * parametric_drc_frame_size;
  181|    160|  } else {
  182|    160|    str_parametric_drc_type_feed_forward->level_estim_integration_time =
  183|    160|        parametric_drc_frame_size;
  184|    160|  }
  185|       |
  186|    219|  str_parametric_drc_type_feed_forward->drc_curve_definition_type =
  187|    219|      impd_read_bits_buf(it_bit_buff, 1);
  188|    219|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (188:7): [True: 1, False: 218]
  ------------------
  189|       |
  190|    218|  if (str_parametric_drc_type_feed_forward->drc_curve_definition_type == 0) {
  ------------------
  |  Branch (190:7): [True: 174, False: 44]
  ------------------
  191|    174|    str_parametric_drc_type_feed_forward->drc_characteristic =
  192|    174|        impd_read_bits_buf(it_bit_buff, 7);
  193|    174|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (193:9): [True: 1, False: 173]
  ------------------
  194|    173|    impd_parametric_drc_ffwd_init_drc_curve_params(
  195|    173|        str_parametric_drc_type_feed_forward->drc_characteristic,
  196|    173|        str_parametric_drc_type_feed_forward);
  197|    173|  } else {
  198|     44|    str_parametric_drc_type_feed_forward->drc_characteristic = 0;
  199|       |
  200|     44|    tmp = impd_read_bits_buf(it_bit_buff, 15);
  201|     44|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (201:9): [True: 1, False: 43]
  ------------------
  202|       |
  203|     43|    str_parametric_drc_type_feed_forward->node_count = ((tmp >> 12) & 3) + 2;
  204|     43|    str_parametric_drc_type_feed_forward->node_level[0] =
  205|     43|        -11 - ((tmp >> 6) & 0x3f);
  206|     43|    str_parametric_drc_type_feed_forward->node_gain[0] = (tmp & 0x3f) - 39;
  207|       |
  208|    160|    for (i = 1; i < str_parametric_drc_type_feed_forward->node_count; i++) {
  ------------------
  |  Branch (208:17): [True: 119, False: 41]
  ------------------
  209|    119|      tmp = impd_read_bits_buf(it_bit_buff, 11);
  210|    119|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (210:11): [True: 2, False: 117]
  ------------------
  211|       |
  212|    117|      str_parametric_drc_type_feed_forward->node_level[i] =
  213|    117|          str_parametric_drc_type_feed_forward->node_level[i - 1] + 1 +
  214|    117|          ((tmp >> 6) & 0x1f);
  215|    117|      str_parametric_drc_type_feed_forward->node_gain[i] = (tmp & 0x3f) - 39;
  216|    117|    }
  217|     43|  }
  218|       |
  219|    214|  impd_parametric_drc_ffwd_init_drc_gain_smooth_params(
  220|    214|      str_parametric_drc_type_feed_forward->drc_characteristic,
  221|    214|      str_parametric_drc_type_feed_forward);
  222|       |
  223|    214|  str_parametric_drc_type_feed_forward->drc_gain_smooth_parameters_present =
  224|    214|      impd_read_bits_buf(it_bit_buff, 1);
  225|    214|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (225:7): [True: 6, False: 208]
  ------------------
  226|    208|  if (str_parametric_drc_type_feed_forward
  ------------------
  |  Branch (226:7): [True: 51, False: 157]
  ------------------
  227|    208|          ->drc_gain_smooth_parameters_present) {
  228|     51|    tmp = impd_read_bits_buf(it_bit_buff, 17);
  229|     51|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (229:9): [True: 1, False: 50]
  ------------------
  230|       |
  231|     50|    str_parametric_drc_type_feed_forward->gain_smooth_attack_time_slow =
  232|     50|        ((tmp >> 9) & 0xff) * 5;
  233|     50|    str_parametric_drc_type_feed_forward->gain_smooth_release_time_slow =
  234|     50|        ((tmp >> 1) & 0xff) * 40;
  235|     50|    str_parametric_drc_type_feed_forward->gain_smooth_time_fast_present =
  236|     50|        tmp & 1;
  237|       |
  238|     50|    if (str_parametric_drc_type_feed_forward->gain_smooth_time_fast_present) {
  ------------------
  |  Branch (238:9): [True: 25, False: 25]
  ------------------
  239|     25|      tmp = impd_read_bits_buf(it_bit_buff, 17);
  240|     25|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (240:11): [True: 1, False: 24]
  ------------------
  241|       |
  242|     24|      str_parametric_drc_type_feed_forward->gain_smooth_attack_time_fast =
  243|     24|          ((tmp >> 9) & 0xff) * 5;
  244|     24|      str_parametric_drc_type_feed_forward->gain_smooth_release_time_fast =
  245|     24|          ((tmp >> 1) & 0xff) * 20;
  246|     24|      str_parametric_drc_type_feed_forward->gain_smooth_threshold_present =
  247|     24|          tmp & 1;
  248|       |
  249|     24|      if (str_parametric_drc_type_feed_forward->gain_smooth_threshold_present) {
  ------------------
  |  Branch (249:11): [True: 15, False: 9]
  ------------------
  250|     15|        str_parametric_drc_type_feed_forward->gain_smooth_attack_threshold =
  251|     15|            impd_read_bits_buf(it_bit_buff, 5);
  252|     15|        if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (252:13): [True: 1, False: 14]
  ------------------
  253|     14|        if (str_parametric_drc_type_feed_forward
  ------------------
  |  Branch (253:13): [True: 10, False: 4]
  ------------------
  254|     14|                ->gain_smooth_attack_threshold == 31) {
  255|     10|          str_parametric_drc_type_feed_forward->gain_smooth_attack_threshold =
  256|     10|              1000;
  257|     10|        }
  258|       |
  259|     14|        str_parametric_drc_type_feed_forward->gain_smooth_rel_threshold =
  260|     14|            impd_read_bits_buf(it_bit_buff, 5);
  261|     14|        if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (261:13): [True: 1, False: 13]
  ------------------
  262|     13|        if (str_parametric_drc_type_feed_forward->gain_smooth_rel_threshold ==
  ------------------
  |  Branch (262:13): [True: 8, False: 5]
  ------------------
  263|     13|            31) {
  264|      8|          str_parametric_drc_type_feed_forward->gain_smooth_rel_threshold =
  265|      8|              1000;
  266|      8|        }
  267|     13|      }
  268|     25|    } else {
  269|     25|      str_parametric_drc_type_feed_forward->gain_smooth_attack_time_fast =
  270|     25|          str_parametric_drc_type_feed_forward->gain_smooth_attack_time_slow;
  271|     25|      str_parametric_drc_type_feed_forward->gain_smooth_release_time_fast =
  272|     25|          str_parametric_drc_type_feed_forward->gain_smooth_release_time_slow;
  273|     25|    }
  274|       |
  275|     47|    str_parametric_drc_type_feed_forward->gain_smooth_hold_off_count_present =
  276|     47|        impd_read_bits_buf(it_bit_buff, 1);
  277|     47|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (277:9): [True: 1, False: 46]
  ------------------
  278|       |
  279|     46|    if (str_parametric_drc_type_feed_forward
  ------------------
  |  Branch (279:9): [True: 15, False: 31]
  ------------------
  280|     46|            ->gain_smooth_hold_off_count_present) {
  281|     15|      str_parametric_drc_type_feed_forward->gain_smooth_hold_off =
  282|     15|          impd_read_bits_buf(it_bit_buff, 7);
  283|     15|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (283:11): [True: 1, False: 14]
  ------------------
  284|     15|    }
  285|     46|  }
  286|    202|  return 0;
  287|    208|}
impd_drc_static_payload.c:impd_parse_parametric_drc_lim:
  291|     64|    ia_parametric_drc_lim_struct* parametric_drc_lim) {
  292|       |  // WORD32 err = 0;
  293|     64|  WORD32 tmp = 0;
  294|       |
  295|     64|  parametric_drc_lim->disable_paramteric_drc = 0;
  296|       |
  297|     64|  parametric_drc_lim->parametric_lim_threshold_present =
  298|     64|      impd_read_bits_buf(it_bit_buff, 1);
  299|     64|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (299:7): [True: 1, False: 63]
  ------------------
  300|       |
  301|     63|  if (parametric_drc_lim->parametric_lim_threshold_present) {
  ------------------
  |  Branch (301:7): [True: 25, False: 38]
  ------------------
  302|     25|    tmp = impd_read_bits_buf(it_bit_buff, 8);
  303|     25|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (303:9): [True: 1, False: 24]
  ------------------
  304|     24|    parametric_drc_lim->parametric_lim_threshold = -tmp * 0.125f;
  305|     38|  } else {
  306|     38|    parametric_drc_lim->parametric_lim_threshold =
  307|     38|        PARAM_DRC_TYPE_LIM_THRESHOLD_DEFAULT;
  ------------------
  |  |  186|     38|#define PARAM_DRC_TYPE_LIM_THRESHOLD_DEFAULT (-1.f)
  ------------------
  308|     38|  }
  309|       |
  310|     62|  parametric_drc_lim->parametric_lim_release_present =
  311|     62|      impd_read_bits_buf(it_bit_buff, 1);
  312|     62|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (312:7): [True: 1, False: 61]
  ------------------
  313|     61|  if (parametric_drc_lim->parametric_lim_release_present) {
  ------------------
  |  Branch (313:7): [True: 21, False: 40]
  ------------------
  314|     21|    tmp = impd_read_bits_buf(it_bit_buff, 8);
  315|     21|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (315:9): [True: 1, False: 20]
  ------------------
  316|     20|    parametric_drc_lim->parametric_lim_release = tmp * 10;
  317|     40|  } else {
  318|     40|    parametric_drc_lim->parametric_lim_release =
  319|     40|        PARAM_DRC_TYPE_LIM_RELEASE_DEFAULT;
  ------------------
  |  |  188|     40|#define PARAM_DRC_TYPE_LIM_RELEASE_DEFAULT 50
  ------------------
  320|     40|  }
  321|       |
  322|     60|  parametric_drc_lim->parametric_lim_attack = PARAM_DRC_TYPE_LIM_ATTACK_DEFAULT;
  ------------------
  |  |  187|     60|#define PARAM_DRC_TYPE_LIM_ATTACK_DEFAULT 5
  ------------------
  323|     60|  parametric_drc_lim->drc_characteristic = 0;
  324|       |
  325|     60|  return 0;
  326|     61|}
impd_drc_static_payload.c:impd_parametric_drc_gen_virtual_gain_sets:
  403|     37|    ia_drc_config* drc_config) {
  404|     37|  WORD32 i = 0, j = 0, c1 = -1, c0 = -1, parametric_drc_id = 0,
  405|     37|         drc_characteristic = 0;
  406|     37|  ia_uni_drc_coeffs_struct* str_p_loc_drc_coefficients_uni_drc;
  407|     37|  ia_parametric_drc_instructions_struct* str_parametric_drc_instructions;
  408|     37|  ia_drc_coeff_parametric_drc_struct* str_drc_coeff_param_drc =
  409|     37|      &(drc_config->str_drc_config_ext.str_drc_coeff_param_drc);
  410|       |
  411|     79|  for (i = 0; i < drc_config->drc_coefficients_drc_count; i++) {
  ------------------
  |  Branch (411:15): [True: 42, False: 37]
  ------------------
  412|     42|    if (drc_config->str_p_loc_drc_coefficients_uni_drc[i].drc_location ==
  ------------------
  |  Branch (412:9): [True: 15, False: 27]
  ------------------
  413|     42|        str_drc_coeff_param_drc->drc_location) {
  414|     15|      if (drc_config->str_p_loc_drc_coefficients_uni_drc[i].version == 0) {
  ------------------
  |  Branch (414:11): [True: 0, False: 15]
  ------------------
  415|      0|        c0 = i;
  416|     15|      } else {
  417|     15|        c1 = i;
  418|     15|      }
  419|     15|    }
  420|     42|  }
  421|     37|  if (c1 >= 0) {
  ------------------
  |  Branch (421:7): [True: 7, False: 30]
  ------------------
  422|      7|    str_p_loc_drc_coefficients_uni_drc =
  423|      7|        &(drc_config->str_p_loc_drc_coefficients_uni_drc[c1]);
  424|     30|  } else if (c0 >= 0) {
  ------------------
  |  Branch (424:14): [True: 0, False: 30]
  ------------------
  425|      0|    str_p_loc_drc_coefficients_uni_drc =
  426|      0|        &(drc_config->str_p_loc_drc_coefficients_uni_drc[c0]);
  427|     30|  } else {
  428|     30|    str_p_loc_drc_coefficients_uni_drc =
  429|     30|        &drc_config->str_p_loc_drc_coefficients_uni_drc
  430|     30|             [drc_config->drc_coefficients_drc_count];
  431|       |
  432|     30|    str_p_loc_drc_coefficients_uni_drc->version = 1;
  433|     30|    str_p_loc_drc_coefficients_uni_drc->drc_location =
  434|     30|        str_drc_coeff_param_drc->drc_location;
  435|     30|    str_p_loc_drc_coefficients_uni_drc->drc_frame_size_present = 0;
  436|       |
  437|     30|    str_p_loc_drc_coefficients_uni_drc->gain_set_count = 0;
  438|     30|    str_p_loc_drc_coefficients_uni_drc->gain_set_count_plus = 0;
  439|       |
  440|     30|    str_p_loc_drc_coefficients_uni_drc->drc_characteristic_left_present = 0;
  441|     30|    str_p_loc_drc_coefficients_uni_drc->drc_characteristic_right_present = 0;
  442|     30|    str_p_loc_drc_coefficients_uni_drc->shape_filters_present = 0;
  443|     30|    str_p_loc_drc_coefficients_uni_drc->gain_sequence_count = 0;
  444|     30|    drc_config->drc_coefficients_drc_count += 1;
  445|     30|  }
  446|     37|  {
  447|     37|    WORD32 tmp = str_p_loc_drc_coefficients_uni_drc->gain_set_count +
  448|     37|                 str_drc_coeff_param_drc->parametric_drc_gain_set_count;
  449|     37|    if (tmp > GAIN_SET_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |   91|     37|#define GAIN_SET_COUNT_MAX SEQUENCE_COUNT_MAX
  |  |  ------------------
  |  |  |  |   38|     37|#define SEQUENCE_COUNT_MAX 24
  |  |  ------------------
  ------------------
                  if (tmp > GAIN_SET_COUNT_MAX) return UNEXPECTED_ERROR;
  ------------------
  |  |  128|      0|#define UNEXPECTED_ERROR 2
  ------------------
  |  Branch (449:9): [True: 0, False: 37]
  ------------------
  450|     37|    str_p_loc_drc_coefficients_uni_drc->gain_set_count_plus = tmp;
  451|     37|  }
  452|       |
  453|      0|  for (i = str_p_loc_drc_coefficients_uni_drc->gain_set_count;
  454|    151|       i < str_p_loc_drc_coefficients_uni_drc->gain_set_count_plus; i++) {
  ------------------
  |  Branch (454:8): [True: 135, False: 16]
  ------------------
  455|    135|    str_p_loc_drc_coefficients_uni_drc->gain_set_params[i].band_count = 1;
  456|       |
  457|    135|    parametric_drc_id =
  458|    135|        drc_config->str_drc_config_ext.str_drc_coeff_param_drc
  459|    135|            .str_parametric_drc_gain_set_params
  460|    135|                [i - str_p_loc_drc_coefficients_uni_drc->gain_set_count]
  461|    135|            .parametric_drc_id;
  462|       |
  463|    135|    for (j = 0;
  464|    403|         j < drc_config->str_drc_config_ext.parametric_drc_instructions_count;
  ------------------
  |  Branch (464:10): [True: 382, False: 21]
  ------------------
  465|    382|         j++) {
  466|    382|      if (parametric_drc_id ==
  ------------------
  |  Branch (466:11): [True: 114, False: 268]
  ------------------
  467|    382|          drc_config->str_drc_config_ext.str_parametric_drc_instructions[j]
  468|    382|              .parametric_drc_id)
  469|    114|        break;
  470|    382|    }
  471|    135|    if (j == drc_config->str_drc_config_ext.parametric_drc_instructions_count) {
  ------------------
  |  Branch (471:9): [True: 21, False: 114]
  ------------------
  472|       |      /* str_parametric_drc_instructions not found */
  473|     21|      return (UNEXPECTED_ERROR);
  ------------------
  |  |  128|     21|#define UNEXPECTED_ERROR 2
  ------------------
  474|     21|    }
  475|    114|    str_parametric_drc_instructions =
  476|    114|        &drc_config->str_drc_config_ext.str_parametric_drc_instructions[j];
  477|       |
  478|    114|    drc_characteristic = 0;
  479|    114|    if (str_parametric_drc_instructions->parametric_drc_preset_id_present) {
  ------------------
  |  Branch (479:9): [True: 43, False: 71]
  ------------------
  480|     43|      drc_characteristic = str_parametric_drc_instructions->drc_characteristic;
  481|     71|    } else if (str_parametric_drc_instructions->parametric_drc_type ==
  ------------------
  |  Branch (481:16): [True: 37, False: 34]
  ------------------
  482|     71|               PARAM_DRC_TYPE_FF) {
  ------------------
  |  |  181|     71|#define PARAM_DRC_TYPE_FF 0x0
  ------------------
  483|     37|      if (str_parametric_drc_instructions->str_parametric_drc_type_feed_forward
  ------------------
  |  Branch (483:11): [True: 19, False: 18]
  ------------------
  484|     37|              .drc_curve_definition_type == 0) {
  485|     19|        drc_characteristic =
  486|     19|            str_parametric_drc_instructions
  487|     19|                ->str_parametric_drc_type_feed_forward.drc_characteristic;
  488|     19|      }
  489|     37|    }
  490|    114|    if (drc_characteristic != 0) {
  ------------------
  |  Branch (490:9): [True: 19, False: 95]
  ------------------
  491|     19|      str_p_loc_drc_coefficients_uni_drc->gain_set_params[i]
  492|     19|          .gain_params[0]
  493|     19|          .drc_characteristic_present = 1;
  494|     19|      str_p_loc_drc_coefficients_uni_drc->gain_set_params[i]
  495|     19|          .gain_params[0]
  496|     19|          .drc_characteristic_format_is_cicp = 1;
  497|     19|      str_p_loc_drc_coefficients_uni_drc->gain_set_params[i]
  498|     19|          .gain_params[0]
  499|     19|          .drc_characteristic = drc_characteristic;
  500|     95|    } else {
  501|     95|      str_p_loc_drc_coefficients_uni_drc->gain_set_params[i]
  502|     95|          .gain_params[0]
  503|     95|          .drc_characteristic_present = 0;
  504|     95|      str_p_loc_drc_coefficients_uni_drc->gain_set_params[i]
  505|     95|          .gain_params[0]
  506|     95|          .drc_characteristic_format_is_cicp = 0;
  507|     95|      str_p_loc_drc_coefficients_uni_drc->gain_set_params[i]
  508|     95|          .gain_params[0]
  509|     95|          .drc_characteristic = 0;
  510|     95|    }
  511|    114|  }
  512|       |
  513|     16|  return 0;
  514|     37|}
impd_drc_static_payload.c:impd_parse_split_drc_characteristic:
  982|    609|    ia_split_drc_characteristic_struct* split_drc_characteristic) {
  983|       |  // WORD32 err = 0;
  984|    609|  WORD32 i, temp;
  985|       |
  986|    609|  split_drc_characteristic->characteristic_format =
  987|    609|      impd_read_bits_buf(it_bit_buff, 1);
  988|    609|  if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (988:7): [True: 1, False: 608]
  ------------------
  989|    608|  if (split_drc_characteristic->characteristic_format == 0) {
  ------------------
  |  Branch (989:7): [True: 437, False: 171]
  ------------------
  990|    437|    WORD32 bsGain, bsIoRatio, bsExp;
  991|    437|    bsGain = impd_read_bits_buf(it_bit_buff, 6);
  992|    437|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (992:9): [True: 1, False: 436]
  ------------------
  993|    436|    if (side == LEFT_SIDE) {
  ------------------
  |  |  128|    436|#define LEFT_SIDE 0
  ------------------
  |  Branch (993:9): [True: 266, False: 170]
  ------------------
  994|    266|      split_drc_characteristic->gain = (FLOAT32)bsGain;
  995|    266|    } else {
  996|    170|      split_drc_characteristic->gain = (FLOAT32)-bsGain;
  997|    170|    }
  998|    436|    temp = impd_read_bits_buf(it_bit_buff, 8);
  999|    436|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (999:9): [True: 2, False: 434]
  ------------------
 1000|       |
 1001|    434|    bsIoRatio = (temp >> 4) & 0xf;
 1002|    434|    bsExp = temp & 0xf;
 1003|    434|    split_drc_characteristic->in_out_ratio = 0.05f + 0.15f * bsIoRatio;
 1004|       |
 1005|    434|    if (bsExp < 15) {
  ------------------
  |  Branch (1005:9): [True: 394, False: 40]
  ------------------
 1006|    394|      split_drc_characteristic->exp = 1.0f + 2.0f * bsExp;
 1007|    394|    } else {
 1008|     40|      split_drc_characteristic->exp = 1000.0f;
 1009|     40|    }
 1010|    434|    split_drc_characteristic->flip_sign = impd_read_bits_buf(it_bit_buff, 1);
 1011|    434|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1011:9): [True: 3, False: 431]
  ------------------
 1012|    434|  } else {
 1013|    171|    WORD32 char_node_cnt, node_level_delta, node_gain;
 1014|    171|    char_node_cnt = impd_read_bits_buf(it_bit_buff, 2);
 1015|    171|    if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1015:9): [True: 1, False: 170]
  ------------------
 1016|    170|    split_drc_characteristic->characteristic_node_count = char_node_cnt + 1;
 1017|    170|    split_drc_characteristic->node_level[0] = DRC_INPUT_LOUDNESS_TARGET;
  ------------------
  |  |  143|    170|#define DRC_INPUT_LOUDNESS_TARGET (-31.0f)
  ------------------
 1018|    170|    split_drc_characteristic->node_gain[0] = 0.0f;
 1019|    673|    for (i = 1; i <= split_drc_characteristic->characteristic_node_count; i++) {
  ------------------
  |  Branch (1019:17): [True: 514, False: 159]
  ------------------
 1020|    514|      node_level_delta = impd_read_bits_buf(it_bit_buff, 5);
 1021|    514|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1021:11): [True: 6, False: 508]
  ------------------
 1022|    508|      if (side == LEFT_SIDE) {
  ------------------
  |  |  128|    508|#define LEFT_SIDE 0
  ------------------
  |  Branch (1022:11): [True: 356, False: 152]
  ------------------
 1023|    356|        split_drc_characteristic->node_level[i] =
 1024|    356|            split_drc_characteristic->node_level[i - 1] -
 1025|    356|            (1.0f + node_level_delta);
 1026|    356|      } else {
 1027|    152|        split_drc_characteristic->node_level[i] =
 1028|    152|            split_drc_characteristic->node_level[i - 1] +
 1029|    152|            (1.0f + node_level_delta);
 1030|    152|      }
 1031|    508|      node_gain = impd_read_bits_buf(it_bit_buff, 8);
 1032|    508|      if (it_bit_buff->error) return it_bit_buff->error;
  ------------------
  |  Branch (1032:11): [True: 5, False: 503]
  ------------------
 1033|    503|      split_drc_characteristic->node_gain[i] = 0.5f * node_gain - 64.0f;
 1034|    503|    }
 1035|    170|  }
 1036|    590|  return (0);
 1037|    608|}

ixheaacd_cos_sin_mod:
  261|  1.57M|                          WORD16 *p_twiddle, WORD32 *p_dig_rev_tbl) {
  262|  1.57M|  WORD32 re2, re3;
  263|  1.57M|  WORD16 wim, wre;
  264|       |
  265|  1.57M|  WORD32 i, M_2;
  266|  1.57M|  WORD32 M = ixheaac_shr32(qmf_bank->no_channels, 1);
  267|       |
  268|  1.57M|  const WORD16 *p_sin;
  269|  1.57M|  const WORD16 *p_sin_cos = &qmf_bank->cos_twiddle[0];
  270|  1.57M|  WORD32 subband_tmp[128];
  271|  1.57M|  WORD32 re;
  272|  1.57M|  WORD32 im;
  273|  1.57M|  WORD32 *psubband, *psubband1;
  274|  1.57M|  WORD32 *psubband_t, *psubband1_t;
  275|  1.57M|  WORD32 *psubband2, *psubband12;
  276|  1.57M|  WORD32 *psubband_t2, *psubband1_t2;
  277|       |
  278|  1.57M|  M_2 = ixheaac_shr32(M, 1);
  279|       |
  280|  1.57M|  psubband = &subband[0];
  281|  1.57M|  psubband1 = &subband[2 * M - 1];
  282|  1.57M|  psubband_t = subband_tmp;
  283|  1.57M|  psubband1_t = &subband_tmp[2 * M - 1];
  284|       |
  285|  1.57M|  psubband2 = &subband[64];
  286|  1.57M|  psubband12 = &subband[2 * M - 1 + 64];
  287|  1.57M|  psubband_t2 = &subband_tmp[64];
  288|  1.57M|  psubband1_t2 = &subband_tmp[2 * M - 1 + 64];
  289|       |
  290|  9.68M|  for (i = (M_2 >> 1) - 1; i >= 0; i--) {
  ------------------
  |  Branch (290:28): [True: 8.11M, False: 1.57M]
  ------------------
  291|  8.11M|    re = *psubband++;
  292|  8.11M|    im = *psubband1--;
  293|       |
  294|  8.11M|    wim = *p_sin_cos++;
  295|  8.11M|    wre = *p_sin_cos++;
  296|       |
  297|  8.11M|    *psubband_t++ = ixheaac_add32_sat(ixheaac_mult32x16in32(re, wre),
  298|  8.11M|                                       ixheaac_mult32x16in32(im, wim));
  299|  8.11M|    *psubband_t++ = ixheaac_sub32_sat(ixheaac_mult32x16in32(im, wre),
  300|  8.11M|                                       ixheaac_mult32x16in32(re, wim));
  301|       |
  302|  8.11M|    re = *psubband2++;
  303|  8.11M|    im = *psubband12--;
  304|       |
  305|  8.11M|    *psubband_t2++ = ixheaac_sub32_sat(ixheaac_mult32x16in32(im, wim),
  306|  8.11M|                                        ixheaac_mult32x16in32(re, wre));
  307|  8.11M|    *psubband_t2++ = ixheaac_add32_sat(ixheaac_mult32x16in32(re, wim),
  308|  8.11M|                                        ixheaac_mult32x16in32(im, wre));
  309|       |
  310|  8.11M|    re = *psubband1--;
  311|  8.11M|    im = *psubband++;
  312|       |
  313|  8.11M|    wim = *p_sin_cos++;
  314|  8.11M|    wre = *p_sin_cos++;
  315|       |
  316|  8.11M|    *psubband1_t-- = ixheaac_sub32_sat(ixheaac_mult32x16in32(im, wre),
  317|  8.11M|                                        ixheaac_mult32x16in32(re, wim));
  318|  8.11M|    *psubband1_t-- = ixheaac_add32_sat(ixheaac_mult32x16in32(re, wre),
  319|  8.11M|                                        ixheaac_mult32x16in32(im, wim));
  320|       |
  321|  8.11M|    re = *psubband12--;
  322|  8.11M|    im = *psubband2++;
  323|       |
  324|  8.11M|    *psubband1_t2-- = ixheaac_add32_sat(ixheaac_mult32x16in32(re, wim),
  325|  8.11M|                                         ixheaac_mult32x16in32(im, wre));
  326|  8.11M|    *psubband1_t2-- = ixheaac_sub32_sat(ixheaac_mult32x16in32(im, wim),
  327|  8.11M|                                         ixheaac_mult32x16in32(re, wre));
  328|       |
  329|  8.11M|    re = *psubband++;
  330|  8.11M|    im = *psubband1--;
  331|       |
  332|  8.11M|    wim = *p_sin_cos++;
  333|  8.11M|    wre = *p_sin_cos++;
  334|       |
  335|  8.11M|    *psubband_t++ = ixheaac_add32_sat(ixheaac_mult32x16in32(re, wre),
  336|  8.11M|                                       ixheaac_mult32x16in32(im, wim));
  337|  8.11M|    *psubband_t++ = ixheaac_sub32_sat(ixheaac_mult32x16in32(im, wre),
  338|  8.11M|                                       ixheaac_mult32x16in32(re, wim));
  339|       |
  340|  8.11M|    re = *psubband2++;
  341|  8.11M|    im = *psubband12--;
  342|       |
  343|  8.11M|    *psubband_t2++ = ixheaac_sub32_sat(ixheaac_mult32x16in32(im, wim),
  344|  8.11M|                                        ixheaac_mult32x16in32(re, wre));
  345|  8.11M|    *psubband_t2++ = ixheaac_add32_sat(ixheaac_mult32x16in32(re, wim),
  346|  8.11M|                                        ixheaac_mult32x16in32(im, wre));
  347|       |
  348|  8.11M|    re = *psubband1--;
  349|  8.11M|    im = *psubband++;
  350|       |
  351|  8.11M|    wim = *p_sin_cos++;
  352|  8.11M|    wre = *p_sin_cos++;
  353|       |
  354|  8.11M|    *psubband1_t-- = ixheaac_sub32_sat(ixheaac_mult32x16in32(im, wre),
  355|  8.11M|                                        ixheaac_mult32x16in32(re, wim));
  356|  8.11M|    *psubband1_t-- = ixheaac_add32_sat(ixheaac_mult32x16in32(re, wre),
  357|  8.11M|                                        ixheaac_mult32x16in32(im, wim));
  358|       |
  359|  8.11M|    re = *psubband12--;
  360|  8.11M|    im = *psubband2++;
  361|  8.11M|    ;
  362|       |
  363|  8.11M|    *psubband1_t2-- = ixheaac_add32_sat(ixheaac_mult32x16in32(re, wim),
  364|  8.11M|                                         ixheaac_mult32x16in32(im, wre));
  365|  8.11M|    *psubband1_t2-- = ixheaac_sub32_sat(ixheaac_mult32x16in32(im, wim),
  366|  8.11M|                                         ixheaac_mult32x16in32(re, wre));
  367|  8.11M|  }
  368|       |
  369|  1.57M|  if (M == 32) {
  ------------------
  |  Branch (369:7): [True: 449k, False: 1.12M]
  ------------------
  370|   449k|    ixheaacd_radix4bfly(p_twiddle, subband_tmp, 1, 8);
  371|   449k|    ixheaacd_radix4bfly(p_twiddle + 48, subband_tmp, 4, 2);
  372|   449k|    ixheaacd_postradixcompute2(subband, subband_tmp, p_dig_rev_tbl, 32);
  373|       |
  374|   449k|    ixheaacd_radix4bfly(p_twiddle, &subband_tmp[64], 1, 8);
  375|   449k|    ixheaacd_radix4bfly(p_twiddle + 48, &subband_tmp[64], 4, 2);
  376|   449k|    ixheaacd_postradixcompute2(&subband[64], &subband_tmp[64], p_dig_rev_tbl,
  377|   449k|                               32);
  378|       |
  379|  1.12M|  } else {
  380|  1.12M|    ixheaacd_radix4bfly(p_twiddle, subband_tmp, 1, 4);
  381|  1.12M|    ixheaacd_postradixcompute4(subband, subband_tmp, p_dig_rev_tbl, 16);
  382|       |
  383|  1.12M|    ixheaacd_radix4bfly(p_twiddle, &subband_tmp[64], 1, 4);
  384|  1.12M|    ixheaacd_postradixcompute4(&subband[64], &subband_tmp[64], p_dig_rev_tbl,
  385|  1.12M|                               16);
  386|  1.12M|  }
  387|       |
  388|  1.57M|  psubband = &subband[0];
  389|  1.57M|  psubband1 = &subband[2 * M - 1];
  390|       |
  391|  1.57M|  re = *psubband1;
  392|       |
  393|  1.57M|  *psubband = *psubband >> 1;
  394|  1.57M|  psubband++;
  395|  1.57M|  *psubband1 = ixheaac_negate32_sat(*psubband >> 1);
  396|  1.57M|  psubband1--;
  397|       |
  398|  1.57M|  p_sin = &qmf_bank->alt_sin_twiddle[0];
  399|  1.57M|  wim = *p_sin++;
  400|  1.57M|  wre = *p_sin++;
  401|       |
  402|  1.57M|  im = *psubband1;
  403|       |
  404|  1.57M|  *psubband1-- = ixheaac_add32_sat(ixheaac_mult32x16in32(re, wre),
  405|  1.57M|                                    ixheaac_mult32x16in32(im, wim));
  406|  1.57M|  *psubband++ = ixheaac_sub32_sat(ixheaac_mult32x16in32(im, wre),
  407|  1.57M|                                   ixheaac_mult32x16in32(re, wim));
  408|       |
  409|  1.57M|  psubband2 = &subband[64];
  410|  1.57M|  psubband12 = &subband[2 * M - 1 + 64];
  411|       |
  412|  1.57M|  re = *psubband12;
  413|       |
  414|  1.57M|  *psubband12-- = ixheaac_negate32_sat(*psubband2 >> 1);
  415|       |
  416|  1.57M|  *psubband2 = psubband2[1] >> 1;
  417|       |
  418|  1.57M|  psubband2++;
  419|       |
  420|  1.57M|  im = *psubband12;
  421|       |
  422|  1.57M|  *psubband2++ = ixheaac_negate32_sat(ixheaac_add32_sat(
  423|  1.57M|      ixheaac_mult32x16in32(re, wre), ixheaac_mult32x16in32(im, wim)));
  424|  1.57M|  *psubband12-- = ixheaac_sub32_sat(ixheaac_mult32x16in32(re, wim),
  425|  1.57M|                                     ixheaac_mult32x16in32(im, wre));
  426|       |
  427|  16.2M|  for (i = (M_2 - 2); i >= 0; i--) {
  ------------------
  |  Branch (427:23): [True: 14.6M, False: 1.57M]
  ------------------
  428|  14.6M|    im = psubband[0];
  429|       |
  430|  14.6M|    re = psubband[1];
  431|       |
  432|  14.6M|    re2 = *psubband1;
  433|       |
  434|  14.6M|    *psubband++ = ixheaac_add32_sat(ixheaac_mult32x16in32(re, wim),
  435|  14.6M|                                     ixheaac_mult32x16in32(im, wre));
  436|  14.6M|    *psubband1-- = ixheaac_sub32_sat(ixheaac_mult32x16in32(im, wim),
  437|  14.6M|                                      ixheaac_mult32x16in32(re, wre));
  438|       |
  439|  14.6M|    im = psubband2[0];
  440|       |
  441|  14.6M|    re = psubband2[1];
  442|       |
  443|  14.6M|    re3 = *psubband12;
  444|       |
  445|  14.6M|    *psubband12-- = ixheaac_negate32_sat(ixheaac_add32_sat(
  446|  14.6M|        ixheaac_mult32x16in32(re, wim), ixheaac_mult32x16in32(im, wre)));
  447|  14.6M|    *psubband2++ = ixheaac_sub32_sat(ixheaac_mult32x16in32(re, wre),
  448|  14.6M|                                      ixheaac_mult32x16in32(im, wim));
  449|       |
  450|  14.6M|    wim = *p_sin++;
  451|  14.6M|    wre = *p_sin++;
  452|  14.6M|    im = psubband1[0];
  453|       |
  454|  14.6M|    *psubband1-- = ixheaac_add32_sat(ixheaac_mult32x16in32(re2, wre),
  455|  14.6M|                                      ixheaac_mult32x16in32(im, wim));
  456|  14.6M|    *psubband++ = ixheaac_sub32_sat(ixheaac_mult32x16in32(im, wre),
  457|  14.6M|                                     ixheaac_mult32x16in32(re2, wim));
  458|       |
  459|  14.6M|    im = psubband12[0];
  460|       |
  461|  14.6M|    *psubband2++ = ixheaac_negate32_sat(ixheaac_add32_sat(
  462|  14.6M|        ixheaac_mult32x16in32(re3, wre), ixheaac_mult32x16in32(im, wim)));
  463|  14.6M|    *psubband12-- = ixheaac_sub32_sat(ixheaac_mult32x16in32(re3, wim),
  464|  14.6M|                                       ixheaac_mult32x16in32(im, wre));
  465|  14.6M|  }
  466|  1.57M|}
ixheaacd_fwd_modulation:
  472|   790k|                             WORD32 ld_mps_flag) {
  473|   790k|  WORD32 i;
  474|   790k|  const WORD32 *p_time_in2 = &p_time_in1[2 * qmf_bank->no_channels - 1];
  475|   790k|  WORD32 temp1, temp2;
  476|   790k|  WORD32 *t_real_subband = real_subband;
  477|   790k|  WORD32 *t_imag_subband = imag_subband;
  478|   790k|  const WORD16 *tcos;
  479|       |
  480|  30.8M|  for (i = qmf_bank->no_channels - 1; i >= 0; i--) {
  ------------------
  |  Branch (480:39): [True: 30.0M, False: 790k]
  ------------------
  481|  30.0M|    temp1 = ixheaac_shr32(*p_time_in1++, HQ_SHIFT_VAL);
  ------------------
  |  |   59|  30.0M|#define HQ_SHIFT_VAL 4
  ------------------
  482|  30.0M|    temp2 = ixheaac_shr32(*p_time_in2--, HQ_SHIFT_VAL);
  ------------------
  |  |   59|  30.0M|#define HQ_SHIFT_VAL 4
  ------------------
  483|       |
  484|  30.0M|    *t_real_subband++ = ixheaac_sub32_sat(temp1, temp2);
  485|       |
  486|  30.0M|    *t_imag_subband++ = ixheaac_add32_sat(temp1, temp2);
  487|  30.0M|  }
  488|       |
  489|   790k|  if (qmf_bank->no_channels != 64)
  ------------------
  |  Branch (489:7): [True: 641k, False: 148k]
  ------------------
  490|   641k|    ixheaacd_cos_sin_mod(real_subband, qmf_bank, qmf_dec_tables_ptr->w_16,
  491|   641k|                         qmf_dec_tables_ptr->dig_rev_table4_16);
  492|   148k|  else
  493|   148k|    ixheaacd_cos_sin_mod(real_subband, qmf_bank, qmf_dec_tables_ptr->w_32,
  494|   148k|                         qmf_dec_tables_ptr->dig_rev_table2_32);
  495|       |
  496|   790k|  if (ld_mps_flag == 0) {
  ------------------
  |  Branch (496:7): [True: 723k, False: 66.3k]
  ------------------
  497|   723k|    tcos = qmf_bank->t_cos;
  498|       |
  499|  13.0M|    for (i = (qmf_bank->usb - qmf_bank->lsb - 1); i >= 0; i--) {
  ------------------
  |  Branch (499:51): [True: 12.2M, False: 723k]
  ------------------
  500|  12.2M|      WORD16 cosh, sinh;
  501|  12.2M|      WORD32 re, im;
  502|       |
  503|  12.2M|      re = *real_subband;
  504|  12.2M|      im = *imag_subband;
  505|  12.2M|      cosh = *tcos++;
  506|  12.2M|      sinh = *tcos++;
  507|  12.2M|      *real_subband++ =
  508|  12.2M|          ixheaac_add32_sat(ixheaac_mult32x16in32_shl(re, cosh),
  509|  12.2M|                             ixheaac_mult32x16in32_shl(im, sinh));
  510|  12.2M|      *imag_subband++ =
  511|  12.2M|          ixheaac_sub32_sat(ixheaac_mult32x16in32_shl(im, cosh),
  512|  12.2M|                             ixheaac_mult32x16in32_shl(re, sinh));
  513|  12.2M|    }
  514|   723k|  } else {
  515|  66.3k|    WORD32 i_band;
  516|  1.13M|    for (i = 0; i < min(64, qmf_bank->no_channels); i += 2) {
  ------------------
  |  |   75|  1.13M|#define min(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (75:20): [True: 0, False: 1.13M]
  |  |  ------------------
  ------------------
  |  Branch (516:17): [True: 1.06M, False: 66.3k]
  ------------------
  517|  1.06M|      i_band = real_subband[i];
  518|  1.06M|      real_subband[i] = -imag_subband[i];
  519|  1.06M|      imag_subband[i] = i_band;
  520|       |
  521|  1.06M|      i_band = -real_subband[i + 1];
  522|  1.06M|      real_subband[i + 1] = imag_subband[i + 1];
  523|  1.06M|      imag_subband[i + 1] = i_band;
  524|  1.06M|    }
  525|  66.3k|  }
  526|   790k|}
ixheaacd_cplx_anal_qmffilt:
  596|  46.3k|                                WORD audio_object_type) {
  597|  46.3k|  WORD32 i, k;
  598|  46.3k|  WORD32 num_time_slots = qmf_bank->num_time_slots;
  599|       |
  600|  46.3k|  WORD32 analysis_buffer[4 * NO_ANALYSIS_CHANNELS] = { 0 };
  601|  46.3k|  WORD16 *filter_states = qmf_bank->core_samples_buffer;
  602|       |
  603|  46.3k|  WORD16 *fp1, *fp2, *tmp;
  604|       |
  605|  46.3k|  WORD16 *filter_1;
  606|  46.3k|  WORD16 *filter_2;
  607|  46.3k|  WORD16 *filt_ptr;
  608|  46.3k|  WORD32 start_slot = 0;
  609|       |
  610|  46.3k|  if (audio_object_type != AOT_ER_AAC_ELD &&
  ------------------
  |  Branch (610:7): [True: 0, False: 46.3k]
  ------------------
  611|      0|      audio_object_type != AOT_ER_AAC_LD) {
  ------------------
  |  Branch (611:7): [True: 0, False: 0]
  ------------------
  612|      0|    qmf_bank->filter_pos +=
  613|      0|        (qmf_dec_tables_ptr->qmf_c - qmf_bank->analy_win_coeff);
  614|      0|    qmf_bank->analy_win_coeff = qmf_dec_tables_ptr->qmf_c;
  615|  46.3k|  } else {
  616|  46.3k|    qmf_bank->filter_pos +=
  617|  46.3k|        (qmf_dec_tables_ptr->qmf_c_eld3 - qmf_bank->analy_win_coeff);
  618|  46.3k|    qmf_bank->analy_win_coeff = qmf_dec_tables_ptr->qmf_c_eld3;
  619|  46.3k|  }
  620|       |
  621|  46.3k|  filter_1 = qmf_bank->filter_pos;
  622|       |
  623|  46.3k|  if (audio_object_type != AOT_ER_AAC_ELD &&
  ------------------
  |  Branch (623:7): [True: 0, False: 46.3k]
  ------------------
  624|      0|      audio_object_type != AOT_ER_AAC_LD) {
  ------------------
  |  Branch (624:7): [True: 0, False: 0]
  ------------------
  625|      0|    filter_2 = filter_1 + 64;
  626|  46.3k|  } else {
  627|  46.3k|    filter_2 = filter_1 + qmf_bank->no_channels;
  628|  46.3k|  }
  629|       |
  630|  46.3k|  sbr_scale_factor->st_lb_scale = 0;
  631|  46.3k|  sbr_scale_factor->lb_scale = -10;
  632|  46.3k|  if (!low_pow_flag) {
  ------------------
  |  Branch (632:7): [True: 46.3k, False: 0]
  ------------------
  633|  46.3k|    if (audio_object_type != AOT_ER_AAC_ELD &&
  ------------------
  |  Branch (633:9): [True: 0, False: 46.3k]
  ------------------
  634|      0|        audio_object_type != AOT_ER_AAC_LD) {
  ------------------
  |  Branch (634:9): [True: 0, False: 0]
  ------------------
  635|      0|      sbr_scale_factor->lb_scale = -8;
  636|  46.3k|    } else {
  637|  46.3k|      sbr_scale_factor->lb_scale = -9;
  638|  46.3k|    }
  639|  46.3k|    if (qmf_bank->no_channels != 64) {
  ------------------
  |  Branch (639:9): [True: 36.9k, False: 9.43k]
  ------------------
  640|  36.9k|      qmf_bank->cos_twiddle =
  641|  36.9k|          (WORD16 *)qmf_dec_tables_ptr->sbr_sin_cos_twiddle_l32;
  642|  36.9k|      qmf_bank->alt_sin_twiddle =
  643|  36.9k|          (WORD16 *)qmf_dec_tables_ptr->sbr_alt_sin_twiddle_l32;
  644|  36.9k|    } else {
  645|  9.43k|      qmf_bank->cos_twiddle =
  646|  9.43k|          (WORD16 *)qmf_dec_tables_ptr->sbr_sin_cos_twiddle_l64;
  647|  9.43k|      qmf_bank->alt_sin_twiddle =
  648|  9.43k|          (WORD16 *)qmf_dec_tables_ptr->sbr_alt_sin_twiddle_l64;
  649|  9.43k|    }
  650|  46.3k|    if (audio_object_type != AOT_ER_AAC_ELD &&
  ------------------
  |  Branch (650:9): [True: 0, False: 46.3k]
  ------------------
  651|      0|        audio_object_type != AOT_ER_AAC_LD) {
  ------------------
  |  Branch (651:9): [True: 0, False: 0]
  ------------------
  652|      0|      qmf_bank->t_cos = (WORD16 *)qmf_dec_tables_ptr->sbr_t_cos_sin_l32;
  653|  46.3k|    } else {
  654|  46.3k|      qmf_bank->t_cos =
  655|  46.3k|          (WORD16 *)qmf_dec_tables_ptr->ixheaacd_sbr_t_cos_sin_l32_eld;
  656|  46.3k|    }
  657|  46.3k|  }
  658|       |
  659|  46.3k|  fp1 = qmf_bank->anal_filter_states;
  660|  46.3k|  fp2 = qmf_bank->anal_filter_states + qmf_bank->no_channels;
  661|       |
  662|  46.3k|  if (audio_object_type == AOT_ER_AAC_ELD ||
  ------------------
  |  Branch (662:7): [True: 46.3k, False: 0]
  ------------------
  663|  46.3k|      audio_object_type == AOT_ER_AAC_LD) {
  ------------------
  |  Branch (663:7): [True: 0, False: 0]
  ------------------
  664|  46.3k|    filter_2 = qmf_bank->filter_2;
  665|  46.3k|    fp1 = qmf_bank->fp1_anal;
  666|  46.3k|    fp2 = qmf_bank->fp2_anal;
  667|  46.3k|  }
  668|       |
  669|   770k|  for (i = start_slot; i < num_time_slots + start_slot; i++) {
  ------------------
  |  Branch (669:24): [True: 723k, False: 46.3k]
  ------------------
  670|  28.6M|    for (k = 0; k < qmf_bank->no_channels; k++)
  ------------------
  |  Branch (670:17): [True: 27.8M, False: 723k]
  ------------------
  671|  27.8M|      filter_states[qmf_bank->no_channels - 1 - k] =
  672|  27.8M|          time_sample_buf[ch_fac * k];
  673|       |
  674|   723k|    if (audio_object_type != AOT_ER_AAC_ELD &&
  ------------------
  |  Branch (674:9): [True: 0, False: 723k]
  ------------------
  675|      0|        audio_object_type != AOT_ER_AAC_LD) {
  ------------------
  |  Branch (675:9): [True: 0, False: 0]
  ------------------
  676|      0|      ixheaacd_sbr_qmfanal32_winadd(fp1, fp2, filter_1, filter_2,
  677|      0|                                    analysis_buffer);
  678|   723k|    } else {
  679|   723k|      ixheaacd_sbr_qmfanal32_winadd_eld(fp1, fp2, filter_1, filter_2,
  680|   723k|                                        analysis_buffer);
  681|   723k|    }
  682|       |
  683|   723k|    time_sample_buf += qmf_bank->no_channels * ch_fac;
  684|       |
  685|   723k|    filter_states -= qmf_bank->no_channels;
  686|   723k|    if (filter_states < qmf_bank->anal_filter_states) {
  ------------------
  |  Branch (686:9): [True: 73.7k, False: 650k]
  ------------------
  687|  73.7k|      filter_states = qmf_bank->anal_filter_states +
  688|  73.7k|                      ((qmf_bank->no_channels * 10) - qmf_bank->no_channels);
  689|  73.7k|    }
  690|       |
  691|   723k|    tmp = fp1;
  692|   723k|    fp1 = fp2;
  693|   723k|    fp2 = tmp;
  694|   723k|    if (audio_object_type != AOT_ER_AAC_ELD &&
  ------------------
  |  Branch (694:9): [True: 0, False: 723k]
  ------------------
  695|      0|        audio_object_type != AOT_ER_AAC_LD) {
  ------------------
  |  Branch (695:9): [True: 0, False: 0]
  ------------------
  696|      0|      filter_1 += 64;
  697|      0|      filter_2 += 64;
  698|   723k|    } else {
  699|   723k|      filter_1 += qmf_bank->no_channels;
  700|   723k|      filter_2 += qmf_bank->no_channels;
  701|   723k|    }
  702|       |
  703|   723k|    filt_ptr = filter_1;
  704|   723k|    filter_1 = filter_2;
  705|   723k|    filter_2 = filt_ptr;
  706|   723k|    if (audio_object_type != AOT_ER_AAC_ELD &&
  ------------------
  |  Branch (706:9): [True: 0, False: 723k]
  ------------------
  707|      0|        audio_object_type != AOT_ER_AAC_LD) {
  ------------------
  |  Branch (707:9): [True: 0, False: 0]
  ------------------
  708|      0|      if (filter_2 > (qmf_bank->analy_win_coeff + 640)) {
  ------------------
  |  Branch (708:11): [True: 0, False: 0]
  ------------------
  709|      0|        filter_1 = (WORD16 *)qmf_bank->analy_win_coeff;
  710|      0|        filter_2 = (WORD16 *)qmf_bank->analy_win_coeff + 64;
  711|      0|      }
  712|   723k|    } else {
  713|   723k|      if (filter_2 >
  ------------------
  |  Branch (713:11): [True: 70.7k, False: 653k]
  ------------------
  714|   723k|          (qmf_bank->analy_win_coeff + (qmf_bank->no_channels * 10))) {
  715|  70.7k|        filter_1 = (WORD16 *)qmf_bank->analy_win_coeff;
  716|  70.7k|        filter_2 = (WORD16 *)qmf_bank->analy_win_coeff + qmf_bank->no_channels;
  717|  70.7k|      }
  718|   723k|    }
  719|       |
  720|   723k|    if (!low_pow_flag) {
  ------------------
  |  Branch (720:9): [True: 723k, False: 0]
  ------------------
  721|   723k|      ixheaacd_fwd_modulation(analysis_buffer, qmf_real[i], qmf_imag[i],
  722|   723k|                              qmf_bank, qmf_dec_tables_ptr, 0);
  723|   723k|    } else {
  724|      0|      ixheaacd_dct3_32(
  725|      0|          (WORD32 *)analysis_buffer, qmf_real[i], qmf_dec_tables_ptr->dct23_tw,
  726|      0|          qmf_dec_tables_ptr->post_fft_tbl, qmf_dec_tables_ptr->w_16,
  727|      0|          qmf_dec_tables_ptr->dig_rev_table4_16);
  728|      0|    }
  729|   723k|  }
  730|       |
  731|  46.3k|  qmf_bank->filter_pos = filter_1;
  732|  46.3k|  qmf_bank->core_samples_buffer = filter_states;
  733|       |
  734|  46.3k|  if (audio_object_type == AOT_ER_AAC_ELD || audio_object_type == AOT_ER_AAC_LD)
  ------------------
  |  Branch (734:7): [True: 46.3k, False: 0]
  |  Branch (734:46): [True: 0, False: 0]
  ------------------
  735|       |
  736|  46.3k|  {
  737|  46.3k|    qmf_bank->fp1_anal = fp1;
  738|  46.3k|    qmf_bank->fp2_anal = fp2;
  739|  46.3k|    qmf_bank->filter_2 = filter_2;
  740|  46.3k|  }
  741|  46.3k|}
ixheaacd_cplx_anal_qmffilt_32:
  748|  4.24k|                                   WORD32 ch_fac, WORD32 ldsbr_present) {
  749|  4.24k|  WORD32 i, k;
  750|  4.24k|  WORD32 num_time_slots = qmf_bank->num_time_slots;
  751|       |
  752|  4.24k|  WORD32 analysis_buffer[4 * NO_ANALYSIS_CHANNELS];
  753|  4.24k|  WORD32 *filter_states = qmf_bank->core_samples_buffer_32;
  754|       |
  755|  4.24k|  WORD32 *fp1, *fp2, *tmp;
  756|       |
  757|  4.24k|  WORD32 *filter_1;
  758|  4.24k|  WORD32 *filter_2;
  759|  4.24k|  WORD32 *filt_ptr;
  760|  4.24k|  WORD32 start_slot = 2;
  761|       |
  762|  4.24k|  if (ldsbr_present) {
  ------------------
  |  Branch (762:7): [True: 4.06k, False: 178]
  ------------------
  763|  4.06k|    qmf_bank->filter_pos_32 +=
  764|  4.06k|        (qmf_dec_tables_ptr->qmf_c_ldsbr_mps - qmf_bank->analy_win_coeff_32);
  765|  4.06k|    qmf_bank->analy_win_coeff_32 = qmf_dec_tables_ptr->qmf_c_ldsbr_mps;
  766|  4.06k|  } else {
  767|    178|    qmf_bank->filter_pos_32 += (ixheaacd_ldmps_polyphase_filter_coeff_fix -
  768|    178|                                qmf_bank->analy_win_coeff_32);
  769|    178|    qmf_bank->analy_win_coeff_32 =
  770|    178|        (WORD32 *)ixheaacd_ldmps_polyphase_filter_coeff_fix;
  771|    178|  }
  772|       |
  773|  4.24k|  filter_1 = qmf_bank->filter_pos_32;
  774|  4.24k|  filter_2 = filter_1 + qmf_bank->no_channels;
  775|       |
  776|  4.24k|  sbr_scale_factor->st_lb_scale = 0;
  777|  4.24k|  sbr_scale_factor->lb_scale = -10;
  778|       |
  779|  4.24k|  sbr_scale_factor->lb_scale = -9;
  780|  4.24k|  if (qmf_bank->no_channels != 64) {
  ------------------
  |  Branch (780:7): [True: 4.19k, False: 47]
  ------------------
  781|  4.19k|    qmf_bank->cos_twiddle =
  782|  4.19k|        (WORD16 *)qmf_dec_tables_ptr->sbr_sin_cos_twiddle_l32;
  783|  4.19k|    qmf_bank->alt_sin_twiddle =
  784|  4.19k|        (WORD16 *)qmf_dec_tables_ptr->sbr_alt_sin_twiddle_l32;
  785|  4.19k|  } else {
  786|     47|    qmf_bank->cos_twiddle =
  787|     47|        (WORD16 *)qmf_dec_tables_ptr->sbr_sin_cos_twiddle_l64;
  788|     47|    qmf_bank->alt_sin_twiddle =
  789|     47|        (WORD16 *)qmf_dec_tables_ptr->sbr_alt_sin_twiddle_l64;
  790|     47|  }
  791|  4.24k|  qmf_bank->t_cos =
  792|  4.24k|      (WORD16 *)qmf_dec_tables_ptr->ixheaacd_sbr_t_cos_sin_l32_eld;
  793|       |
  794|  4.24k|  fp1 = qmf_bank->anal_filter_states_32;
  795|  4.24k|  fp2 = qmf_bank->anal_filter_states_32 + qmf_bank->no_channels;
  796|       |
  797|  4.24k|  filter_2 = qmf_bank->filter_2_32;
  798|  4.24k|  fp1 = qmf_bank->fp1_anal_32;
  799|  4.24k|  fp2 = qmf_bank->fp2_anal_32;
  800|       |
  801|  70.5k|  for (i = start_slot; i < num_time_slots + start_slot; i++) {
  ------------------
  |  Branch (801:24): [True: 66.3k, False: 4.24k]
  ------------------
  802|  2.20M|    for (k = 0; k < qmf_bank->no_channels; k++)
  ------------------
  |  Branch (802:17): [True: 2.13M, False: 66.3k]
  ------------------
  803|  2.13M|      filter_states[qmf_bank->no_channels - 1 - k] =
  804|  2.13M|          time_sample_buf[ch_fac * k];
  805|       |
  806|  66.3k|    if (ldsbr_present) {
  ------------------
  |  Branch (806:9): [True: 64.1k, False: 2.14k]
  ------------------
  807|  64.1k|      ixheaacd_sbr_qmfanal32_winadd_eld_32(fp1, fp2, filter_1, filter_2,
  808|  64.1k|                                           analysis_buffer);
  809|  64.1k|    } else {
  810|  2.14k|      ixheaacd_sbr_qmfanal32_winadd_eld_mps(fp1, fp2, filter_1, filter_2,
  811|  2.14k|                                            analysis_buffer);
  812|  2.14k|    }
  813|       |
  814|  66.3k|    time_sample_buf += qmf_bank->no_channels * ch_fac;
  815|       |
  816|  66.3k|    filter_states -= qmf_bank->no_channels;
  817|       |
  818|  66.3k|    if (filter_states < qmf_bank->anal_filter_states_32) {
  ------------------
  |  Branch (818:9): [True: 7.06k, False: 59.2k]
  ------------------
  819|  7.06k|      filter_states = qmf_bank->anal_filter_states_32 +
  820|  7.06k|                      ((qmf_bank->no_channels * 10) - qmf_bank->no_channels);
  821|  7.06k|    }
  822|       |
  823|  66.3k|    tmp = fp1;
  824|  66.3k|    fp1 = fp2;
  825|  66.3k|    fp2 = tmp;
  826|       |
  827|  66.3k|    filter_1 += qmf_bank->no_channels;
  828|  66.3k|    filter_2 += qmf_bank->no_channels;
  829|       |
  830|  66.3k|    filt_ptr = filter_1;
  831|  66.3k|    filter_1 = filter_2;
  832|  66.3k|    filter_2 = filt_ptr;
  833|       |
  834|  66.3k|    if (filter_2 >
  ------------------
  |  Branch (834:9): [True: 6.18k, False: 60.1k]
  ------------------
  835|  66.3k|        (qmf_bank->analy_win_coeff_32 + (qmf_bank->no_channels * 10))) {
  836|  6.18k|      filter_1 = (WORD32 *)qmf_bank->analy_win_coeff_32;
  837|  6.18k|      filter_2 = (WORD32 *)qmf_bank->analy_win_coeff_32 + qmf_bank->no_channels;
  838|  6.18k|    }
  839|       |
  840|  66.3k|    ixheaacd_fwd_modulation(analysis_buffer, qmf_real[i], qmf_imag[i], qmf_bank,
  841|  66.3k|                            qmf_dec_tables_ptr, 1);
  842|  66.3k|  }
  843|       |
  844|  4.24k|  qmf_bank->filter_pos_32 = filter_1;
  845|  4.24k|  qmf_bank->core_samples_buffer_32 = filter_states;
  846|       |
  847|  4.24k|  qmf_bank->fp1_anal_32 = fp1;
  848|  4.24k|  qmf_bank->fp2_anal_32 = fp2;
  849|  4.24k|  qmf_bank->filter_2_32 = filter_2;
  850|  4.24k|}
ixheaacd_inv_emodulation:
  871|   787k|                              ia_qmf_dec_tables_struct *qmf_dec_tables_ptr) {
  872|   787k|  if (syn_qmf->no_channels == 64)
  ------------------
  |  Branch (872:7): [True: 301k, False: 486k]
  ------------------
  873|   301k|    ixheaacd_cos_sin_mod(qmf_real, syn_qmf, qmf_dec_tables_ptr->w_32,
  874|   301k|                         qmf_dec_tables_ptr->dig_rev_table2_32);
  875|   486k|  else
  876|   486k|    ixheaacd_cos_sin_mod(qmf_real, syn_qmf, qmf_dec_tables_ptr->w_16,
  877|   486k|                         qmf_dec_tables_ptr->dig_rev_table4_16);
  878|   787k|}
ixheaacd_esbr_radix4bfly:
  881|  27.6M|                              WORD32 index) {
  882|  27.6M|  int i;
  883|  27.6M|  WORD32 l1, l2, h2, fft_jmp;
  884|  27.6M|  WORD32 xt0_0, yt0_0, xt1_0, yt1_0, xt2_0, yt2_0;
  885|  27.6M|  WORD32 xh0_0, xh1_0, xh20_0, xh21_0, xl0_0, xl1_0, xl20_0, xl21_0;
  886|  27.6M|  WORD32 x_0, x_1, x_l1_0, x_l1_1, x_l2_0, x_l2_1;
  887|  27.6M|  WORD32 x_h2_0, x_h2_1;
  888|  27.6M|  WORD32 si10, si20, si30, co10, co20, co30;
  889|       |
  890|  27.6M|  WORD64 mul_1, mul_2, mul_3, mul_4, mul_5, mul_6;
  891|  27.6M|  WORD64 mul_7, mul_8, mul_9, mul_10, mul_11, mul_12;
  892|  27.6M|  const WORD32 *w_ptr = w;
  893|  27.6M|  WORD32 i1;
  894|       |
  895|  27.6M|  h2 = index << 1;
  896|  27.6M|  l1 = index << 2;
  897|  27.6M|  l2 = (index << 2) + (index << 1);
  898|       |
  899|  27.6M|  fft_jmp = 6 * (index);
  900|       |
  901|  77.5M|  for (i1 = 0; i1 < index1; i1++) {
  ------------------
  |  Branch (901:16): [True: 49.9M, False: 27.6M]
  ------------------
  902|   219M|    for (i = 0; i < index; i++) {
  ------------------
  |  Branch (902:17): [True: 170M, False: 49.9M]
  ------------------
  903|   170M|      si10 = (*w_ptr++);
  904|   170M|      co10 = (*w_ptr++);
  905|   170M|      si20 = (*w_ptr++);
  906|   170M|      co20 = (*w_ptr++);
  907|   170M|      si30 = (*w_ptr++);
  908|   170M|      co30 = (*w_ptr++);
  909|       |
  910|   170M|      x_0 = x[0];
  911|   170M|      x_h2_0 = x[h2];
  912|   170M|      x_l1_0 = x[l1];
  913|   170M|      x_l2_0 = x[l2];
  914|       |
  915|   170M|      xh0_0 = ixheaac_add32_sat(x_0, x_l1_0);
  916|   170M|      xl0_0 = ixheaac_sub32_sat(x_0, x_l1_0);
  917|       |
  918|   170M|      xh20_0 = ixheaac_add32_sat(x_h2_0, x_l2_0);
  919|   170M|      xl20_0 = ixheaac_sub32_sat(x_h2_0, x_l2_0);
  920|       |
  921|   170M|      x[0] = ixheaac_add32_sat(xh0_0, xh20_0);
  922|   170M|      xt0_0 = ixheaac_sub32_sat(xh0_0, xh20_0);
  923|       |
  924|   170M|      x_1 = x[1];
  925|   170M|      x_h2_1 = x[h2 + 1];
  926|   170M|      x_l1_1 = x[l1 + 1];
  927|   170M|      x_l2_1 = x[l2 + 1];
  928|       |
  929|   170M|      xh1_0 = ixheaac_add32_sat(x_1, x_l1_1);
  930|   170M|      xl1_0 = ixheaac_sub32_sat(x_1, x_l1_1);
  931|       |
  932|   170M|      xh21_0 = ixheaac_add32_sat(x_h2_1, x_l2_1);
  933|   170M|      xl21_0 = ixheaac_sub32_sat(x_h2_1, x_l2_1);
  934|       |
  935|   170M|      x[1] = ixheaac_add32_sat(xh1_0, xh21_0);
  936|   170M|      yt0_0 = ixheaac_sub32_sat(xh1_0, xh21_0);
  937|       |
  938|   170M|      xt1_0 = ixheaac_add32_sat(xl0_0, xl21_0);
  939|   170M|      xt2_0 = ixheaac_sub32_sat(xl0_0, xl21_0);
  940|       |
  941|   170M|      yt2_0 = ixheaac_add32_sat(xl1_0, xl20_0);
  942|   170M|      yt1_0 = ixheaac_sub32_sat(xl1_0, xl20_0);
  943|       |
  944|   170M|      mul_11 = ixheaac_mult64(xt2_0, co30);
  945|   170M|      mul_3 = ixheaac_mult64(yt2_0, si30);
  946|   170M|      x[l2] = (WORD32)((mul_3 + mul_11) >> 32) << RADIXSHIFT;
  ------------------
  |  |   58|   170M|#define RADIXSHIFT 1
  ------------------
  947|       |
  948|   170M|      mul_5 = ixheaac_mult64(xt2_0, si30);
  949|   170M|      mul_9 = ixheaac_mult64(yt2_0, co30);
  950|   170M|      x[l2 + 1] = (WORD32)((mul_9 - mul_5) >> 32) << RADIXSHIFT;
  ------------------
  |  |   58|   170M|#define RADIXSHIFT 1
  ------------------
  951|       |
  952|   170M|      mul_12 = ixheaac_mult64(xt0_0, co20);
  953|   170M|      mul_2 = ixheaac_mult64(yt0_0, si20);
  954|   170M|      x[l1] = (WORD32)((mul_2 + mul_12) >> 32) << RADIXSHIFT;
  ------------------
  |  |   58|   170M|#define RADIXSHIFT 1
  ------------------
  955|       |
  956|   170M|      mul_6 = ixheaac_mult64(xt0_0, si20);
  957|   170M|      mul_8 = ixheaac_mult64(yt0_0, co20);
  958|   170M|      x[l1 + 1] = (WORD32)((mul_8 - mul_6) >> 32) << RADIXSHIFT;
  ------------------
  |  |   58|   170M|#define RADIXSHIFT 1
  ------------------
  959|       |
  960|   170M|      mul_4 = ixheaac_mult64(xt1_0, co10);
  961|   170M|      mul_1 = ixheaac_mult64(yt1_0, si10);
  962|   170M|      x[h2] = (WORD32)((mul_1 + mul_4) >> 32) << RADIXSHIFT;
  ------------------
  |  |   58|   170M|#define RADIXSHIFT 1
  ------------------
  963|       |
  964|   170M|      mul_10 = ixheaac_mult64(xt1_0, si10);
  965|   170M|      mul_7 = ixheaac_mult64(yt1_0, co10);
  966|   170M|      x[h2 + 1] = (WORD32)((mul_7 - mul_10) >> 32) << RADIXSHIFT;
  ------------------
  |  |   58|   170M|#define RADIXSHIFT 1
  ------------------
  967|       |
  968|   170M|      x += 2;
  969|   170M|    }
  970|  49.9M|    x += fft_jmp;
  971|  49.9M|    w_ptr = w_ptr - fft_jmp;
  972|  49.9M|  }
  973|  27.6M|}
ixheaacd_esbr_postradixcompute2:
  977|  7.42M|                                     WORD32 npoints) {
  978|  7.42M|  WORD32 i, k;
  979|  7.42M|  WORD32 h2;
  980|  7.42M|  WORD32 x_0, x_1, x_2, x_3;
  981|  7.42M|  WORD32 x_4, x_5, x_6, x_7;
  982|  7.42M|  WORD32 x_8, x_9, x_a, x_b, x_c, x_d, x_e, x_f;
  983|  7.42M|  WORD32 n00, n10, n20, n30, n01, n11, n21, n31;
  984|  7.42M|  WORD32 n02, n12, n22, n32, n03, n13, n23, n33;
  985|  7.42M|  WORD32 *x2, *x0;
  986|  7.42M|  WORD32 *y0, *y1, *y2, *y3;
  987|       |
  988|  7.42M|  y0 = ptr_y;
  989|  7.42M|  y2 = ptr_y + (WORD32)npoints;
  990|  7.42M|  x0 = ptr_x;
  991|  7.42M|  x2 = ptr_x + (WORD32)(npoints >> 1);
  992|       |
  993|  7.42M|  y1 = y0 + (WORD32)(npoints >> 2);
  994|  7.42M|  y3 = y2 + (WORD32)(npoints >> 2);
  995|       |
  996|  22.2M|  for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (996:15): [True: 14.8M, False: 7.42M]
  ------------------
  997|  44.5M|    for (i = 0; i<npoints>> 1; i += 8) {
  ------------------
  |  Branch (997:17): [True: 29.6M, False: 14.8M]
  ------------------
  998|  29.6M|      h2 = *pdig_rev_tbl++ >> 2;
  999|       |
 1000|  29.6M|      x_0 = *x0++;
 1001|  29.6M|      x_1 = *x0++;
 1002|  29.6M|      x_2 = *x0++;
 1003|  29.6M|      x_3 = *x0++;
 1004|  29.6M|      x_4 = *x0++;
 1005|  29.6M|      x_5 = *x0++;
 1006|  29.6M|      x_6 = *x0++;
 1007|  29.6M|      x_7 = *x0++;
 1008|       |
 1009|  29.6M|      n00 = ixheaac_add32_sat(x_0, x_2);
 1010|  29.6M|      n01 = ixheaac_add32_sat(x_1, x_3);
 1011|  29.6M|      n20 = ixheaac_sub32_sat(x_0, x_2);
 1012|  29.6M|      n21 = ixheaac_sub32_sat(x_1, x_3);
 1013|  29.6M|      n10 = ixheaac_add32_sat(x_4, x_6);
 1014|  29.6M|      n11 = ixheaac_add32_sat(x_5, x_7);
 1015|  29.6M|      n30 = ixheaac_sub32_sat(x_4, x_6);
 1016|  29.6M|      n31 = ixheaac_sub32_sat(x_5, x_7);
 1017|       |
 1018|  29.6M|      y0[h2] = n00;
 1019|  29.6M|      y0[h2 + 1] = n01;
 1020|  29.6M|      y1[h2] = n10;
 1021|  29.6M|      y1[h2 + 1] = n11;
 1022|  29.6M|      y2[h2] = n20;
 1023|  29.6M|      y2[h2 + 1] = n21;
 1024|  29.6M|      y3[h2] = n30;
 1025|  29.6M|      y3[h2 + 1] = n31;
 1026|       |
 1027|  29.6M|      x_8 = *x2++;
 1028|  29.6M|      x_9 = *x2++;
 1029|  29.6M|      x_a = *x2++;
 1030|  29.6M|      x_b = *x2++;
 1031|  29.6M|      x_c = *x2++;
 1032|  29.6M|      x_d = *x2++;
 1033|  29.6M|      x_e = *x2++;
 1034|  29.6M|      x_f = *x2++;
 1035|       |
 1036|  29.6M|      n02 = ixheaac_add32_sat(x_8, x_a);
 1037|  29.6M|      n03 = ixheaac_add32_sat(x_9, x_b);
 1038|  29.6M|      n22 = ixheaac_sub32_sat(x_8, x_a);
 1039|  29.6M|      n23 = ixheaac_sub32_sat(x_9, x_b);
 1040|  29.6M|      n12 = ixheaac_add32_sat(x_c, x_e);
 1041|  29.6M|      n13 = ixheaac_add32_sat(x_d, x_f);
 1042|  29.6M|      n32 = ixheaac_sub32_sat(x_c, x_e);
 1043|  29.6M|      n33 = ixheaac_sub32_sat(x_d, x_f);
 1044|       |
 1045|  29.6M|      y0[h2 + 2] = n02;
 1046|  29.6M|      y0[h2 + 3] = n03;
 1047|  29.6M|      y1[h2 + 2] = n12;
 1048|  29.6M|      y1[h2 + 3] = n13;
 1049|  29.6M|      y2[h2 + 2] = n22;
 1050|  29.6M|      y2[h2 + 3] = n23;
 1051|  29.6M|      y3[h2 + 2] = n32;
 1052|  29.6M|      y3[h2 + 3] = n33;
 1053|  29.6M|    }
 1054|  14.8M|    x0 += (WORD32)npoints >> 1;
 1055|  14.8M|    x2 += (WORD32)npoints >> 1;
 1056|  14.8M|  }
 1057|  7.42M|}
ixheaacd_esbr_postradixcompute4:
 1061|  12.8M|                                     WORD32 npoints) {
 1062|  12.8M|  WORD32 i, k;
 1063|  12.8M|  WORD32 h2;
 1064|  12.8M|  WORD32 xh0_0, xh1_0, xl0_0, xl1_0;
 1065|  12.8M|  WORD32 xh0_1, xh1_1, xl0_1, xl1_1;
 1066|  12.8M|  WORD32 x_0, x_1, x_2, x_3;
 1067|  12.8M|  WORD32 xh0_2, xh1_2, xl0_2, xl1_2, xh0_3, xh1_3, xl0_3, xl1_3;
 1068|  12.8M|  WORD32 x_4, x_5, x_6, x_7;
 1069|  12.8M|  WORD32 x_8, x_9, x_a, x_b, x_c, x_d, x_e, x_f;
 1070|  12.8M|  WORD32 n00, n10, n20, n30, n01, n11, n21, n31;
 1071|  12.8M|  WORD32 n02, n12, n22, n32, n03, n13, n23, n33;
 1072|  12.8M|  WORD32 *x2, *x0;
 1073|  12.8M|  WORD32 *y0, *y1, *y2, *y3;
 1074|       |
 1075|  12.8M|  y0 = ptr_y;
 1076|  12.8M|  y2 = ptr_y + (WORD32)npoints;
 1077|  12.8M|  x0 = ptr_x;
 1078|  12.8M|  x2 = ptr_x + (WORD32)(npoints >> 1);
 1079|       |
 1080|  12.8M|  y1 = y0 + (WORD32)(npoints >> 1);
 1081|  12.8M|  y3 = y2 + (WORD32)(npoints >> 1);
 1082|       |
 1083|  38.4M|  for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (1083:15): [True: 25.6M, False: 12.8M]
  ------------------
 1084|  51.2M|    for (i = 0; i<npoints>> 1; i += 8) {
  ------------------
  |  Branch (1084:17): [True: 25.6M, False: 25.6M]
  ------------------
 1085|  25.6M|      h2 = *p_dig_rev_tbl++ >> 2;
 1086|  25.6M|      x_0 = *x0++;
 1087|  25.6M|      x_1 = *x0++;
 1088|  25.6M|      x_2 = *x0++;
 1089|  25.6M|      x_3 = *x0++;
 1090|  25.6M|      x_4 = *x0++;
 1091|  25.6M|      x_5 = *x0++;
 1092|  25.6M|      x_6 = *x0++;
 1093|  25.6M|      x_7 = *x0++;
 1094|       |
 1095|  25.6M|      xh0_0 = ixheaac_add32_sat(x_0, x_4);
 1096|  25.6M|      xh1_0 = ixheaac_add32_sat(x_1, x_5);
 1097|  25.6M|      xl0_0 = ixheaac_sub32_sat(x_0, x_4);
 1098|  25.6M|      xl1_0 = ixheaac_sub32_sat(x_1, x_5);
 1099|  25.6M|      xh0_1 = ixheaac_add32_sat(x_2, x_6);
 1100|  25.6M|      xh1_1 = ixheaac_add32_sat(x_3, x_7);
 1101|  25.6M|      xl0_1 = ixheaac_sub32_sat(x_2, x_6);
 1102|  25.6M|      xl1_1 = ixheaac_sub32_sat(x_3, x_7);
 1103|       |
 1104|  25.6M|      n00 = ixheaac_add32_sat(xh0_0, xh0_1);
 1105|  25.6M|      n01 = ixheaac_add32_sat(xh1_0, xh1_1);
 1106|  25.6M|      n10 = ixheaac_add32_sat(xl0_0, xl1_1);
 1107|  25.6M|      n11 = ixheaac_sub32_sat(xl1_0, xl0_1);
 1108|  25.6M|      n20 = ixheaac_sub32_sat(xh0_0, xh0_1);
 1109|  25.6M|      n21 = ixheaac_sub32_sat(xh1_0, xh1_1);
 1110|  25.6M|      n30 = ixheaac_sub32_sat(xl0_0, xl1_1);
 1111|  25.6M|      n31 = ixheaac_add32_sat(xl1_0, xl0_1);
 1112|       |
 1113|  25.6M|      y0[h2] = n00;
 1114|  25.6M|      y0[h2 + 1] = n01;
 1115|  25.6M|      y1[h2] = n10;
 1116|  25.6M|      y1[h2 + 1] = n11;
 1117|  25.6M|      y2[h2] = n20;
 1118|  25.6M|      y2[h2 + 1] = n21;
 1119|  25.6M|      y3[h2] = n30;
 1120|  25.6M|      y3[h2 + 1] = n31;
 1121|       |
 1122|  25.6M|      x_8 = *x2++;
 1123|  25.6M|      x_9 = *x2++;
 1124|  25.6M|      x_a = *x2++;
 1125|  25.6M|      x_b = *x2++;
 1126|  25.6M|      x_c = *x2++;
 1127|  25.6M|      x_d = *x2++;
 1128|  25.6M|      x_e = *x2++;
 1129|  25.6M|      x_f = *x2++;
 1130|       |
 1131|  25.6M|      xh0_2 = ixheaac_add32_sat(x_8, x_c);
 1132|  25.6M|      xh1_2 = ixheaac_add32_sat(x_9, x_d);
 1133|  25.6M|      xl0_2 = ixheaac_sub32_sat(x_8, x_c);
 1134|  25.6M|      xl1_2 = ixheaac_sub32_sat(x_9, x_d);
 1135|  25.6M|      xh0_3 = ixheaac_add32_sat(x_a, x_e);
 1136|  25.6M|      xh1_3 = ixheaac_add32_sat(x_b, x_f);
 1137|  25.6M|      xl0_3 = ixheaac_sub32_sat(x_a, x_e);
 1138|  25.6M|      xl1_3 = ixheaac_sub32_sat(x_b, x_f);
 1139|       |
 1140|  25.6M|      n02 = ixheaac_add32_sat(xh0_2, xh0_3);
 1141|  25.6M|      n03 = ixheaac_add32_sat(xh1_2, xh1_3);
 1142|  25.6M|      n12 = ixheaac_add32_sat(xl0_2, xl1_3);
 1143|  25.6M|      n13 = ixheaac_sub32_sat(xl1_2, xl0_3);
 1144|  25.6M|      n22 = ixheaac_sub32_sat(xh0_2, xh0_3);
 1145|  25.6M|      n23 = ixheaac_sub32_sat(xh1_2, xh1_3);
 1146|  25.6M|      n32 = ixheaac_sub32_sat(xl0_2, xl1_3);
 1147|  25.6M|      n33 = ixheaac_add32_sat(xl1_2, xl0_3);
 1148|       |
 1149|  25.6M|      y0[h2 + 2] = n02;
 1150|  25.6M|      y0[h2 + 3] = n03;
 1151|  25.6M|      y1[h2 + 2] = n12;
 1152|  25.6M|      y1[h2 + 3] = n13;
 1153|  25.6M|      y2[h2 + 2] = n22;
 1154|  25.6M|      y2[h2 + 3] = n23;
 1155|  25.6M|      y3[h2 + 2] = n32;
 1156|  25.6M|      y3[h2 + 3] = n33;
 1157|  25.6M|    }
 1158|  25.6M|    x0 += (WORD32)npoints >> 1;
 1159|  25.6M|    x2 += (WORD32)npoints >> 1;
 1160|  25.6M|  }
 1161|  12.8M|}
ixheaacd_esbr_cos_sin_mod:
 1165|  12.5M|                               WORD32 *p_twiddle, WORD32 *p_dig_rev_tbl) {
 1166|  12.5M|  WORD32 z;
 1167|  12.5M|  WORD32 temp[128];
 1168|  12.5M|  WORD32 scaleshift = 0;
 1169|       |
 1170|  12.5M|  WORD32 re2, re3;
 1171|  12.5M|  WORD32 wim, wre;
 1172|       |
 1173|  12.5M|  WORD32 i, M_2;
 1174|  12.5M|  WORD32 M = ixheaac_shr32(qmf_bank->no_channels, 1);
 1175|       |
 1176|  12.5M|  const WORD32 *p_sin;
 1177|  12.5M|  const WORD32 *p_sin_cos;
 1178|       |
 1179|  12.5M|  WORD32 subband_tmp[128];
 1180|  12.5M|  WORD32 re;
 1181|  12.5M|  WORD32 im;
 1182|  12.5M|  WORD32 *psubband, *psubband1;
 1183|  12.5M|  WORD32 *psubband_t, *psubband1_t;
 1184|  12.5M|  WORD32 *psubband2, *psubband12;
 1185|  12.5M|  WORD32 *psubband_t2, *psubband1_t2;
 1186|       |
 1187|  12.5M|  M_2 = ixheaac_shr32(M, 1);
 1188|       |
 1189|  12.5M|  p_sin_cos = qmf_bank->esbr_cos_twiddle;
 1190|       |
 1191|  12.5M|  psubband = &subband[0];
 1192|  12.5M|  psubband1 = &subband[2 * M - 1];
 1193|  12.5M|  psubband_t = subband_tmp;
 1194|  12.5M|  psubband1_t = &subband_tmp[2 * M - 1];
 1195|       |
 1196|  12.5M|  psubband2 = &subband[64];
 1197|  12.5M|  psubband12 = &subband[2 * M - 1 + 64];
 1198|  12.5M|  psubband_t2 = &subband_tmp[64];
 1199|  12.5M|  psubband1_t2 = &subband_tmp[2 * M - 1 + 64];
 1200|       |
 1201|  73.3M|  for (i = (M_2 >> 1) - 1; i >= 0; i--) {
  ------------------
  |  Branch (1201:28): [True: 60.7M, False: 12.5M]
  ------------------
 1202|  60.7M|    re = *psubband++;
 1203|  60.7M|    im = *psubband1--;
 1204|       |
 1205|  60.7M|    wim = *p_sin_cos++;
 1206|  60.7M|    wre = *p_sin_cos++;
 1207|       |
 1208|  60.7M|    *psubband_t++ = (WORD32)(
 1209|  60.7M|        (ixheaac_add64(ixheaac_mult64(re, wre), ixheaac_mult64(im, wim))) >>
 1210|  60.7M|        32);
 1211|  60.7M|    *psubband_t++ = (WORD32)((ixheaac_sub64_sat(ixheaac_mult64(im, wre),
 1212|  60.7M|                                                 ixheaac_mult64(re, wim))) >>
 1213|  60.7M|                             32);
 1214|       |
 1215|  60.7M|    re = *psubband2++;
 1216|  60.7M|    im = *psubband12--;
 1217|       |
 1218|  60.7M|    *psubband_t2++ = (WORD32)((ixheaac_sub64_sat(ixheaac_mult64(im, wim),
 1219|  60.7M|                                                  ixheaac_mult64(re, wre))) >>
 1220|  60.7M|                              32);
 1221|  60.7M|    *psubband_t2++ = (WORD32)(
 1222|  60.7M|        (ixheaac_add64(ixheaac_mult64(re, wim), ixheaac_mult64(im, wre))) >>
 1223|  60.7M|        32);
 1224|       |
 1225|  60.7M|    re = *psubband1--;
 1226|  60.7M|    im = *psubband++;
 1227|       |
 1228|  60.7M|    wim = *p_sin_cos++;
 1229|  60.7M|    wre = *p_sin_cos++;
 1230|       |
 1231|  60.7M|    *psubband1_t-- = (WORD32)((ixheaac_sub64_sat(ixheaac_mult64(im, wre),
 1232|  60.7M|                                                  ixheaac_mult64(re, wim))) >>
 1233|  60.7M|                              32);
 1234|  60.7M|    *psubband1_t-- = (WORD32)(
 1235|  60.7M|        (ixheaac_add64(ixheaac_mult64(re, wre), ixheaac_mult64(im, wim))) >>
 1236|  60.7M|        32);
 1237|       |
 1238|  60.7M|    re = *psubband12--;
 1239|  60.7M|    im = *psubband2++;
 1240|       |
 1241|  60.7M|    *psubband1_t2-- = (WORD32)(
 1242|  60.7M|        (ixheaac_add64(ixheaac_mult64(re, wim), ixheaac_mult64(im, wre))) >>
 1243|  60.7M|        32);
 1244|  60.7M|    *psubband1_t2-- = (WORD32)((ixheaac_sub64_sat(ixheaac_mult64(im, wim),
 1245|  60.7M|                                                   ixheaac_mult64(re, wre))) >>
 1246|  60.7M|                               32);
 1247|       |
 1248|  60.7M|    re = *psubband++;
 1249|  60.7M|    im = *psubband1--;
 1250|       |
 1251|  60.7M|    wim = *p_sin_cos++;
 1252|  60.7M|    wre = *p_sin_cos++;
 1253|       |
 1254|  60.7M|    *psubband_t++ = (WORD32)(
 1255|  60.7M|        (ixheaac_add64(ixheaac_mult64(re, wre), ixheaac_mult64(im, wim))) >>
 1256|  60.7M|        32);
 1257|  60.7M|    *psubband_t++ = (WORD32)((ixheaac_sub64_sat(ixheaac_mult64(im, wre),
 1258|  60.7M|                                                 ixheaac_mult64(re, wim))) >>
 1259|  60.7M|                             32);
 1260|       |
 1261|  60.7M|    re = *psubband2++;
 1262|  60.7M|    im = *psubband12--;
 1263|       |
 1264|  60.7M|    *psubband_t2++ = (WORD32)((ixheaac_sub64_sat(ixheaac_mult64(im, wim),
 1265|  60.7M|                                                  ixheaac_mult64(re, wre))) >>
 1266|  60.7M|                              32);
 1267|  60.7M|    *psubband_t2++ = (WORD32)(
 1268|  60.7M|        (ixheaac_add64(ixheaac_mult64(re, wim), ixheaac_mult64(im, wre))) >>
 1269|  60.7M|        32);
 1270|       |
 1271|  60.7M|    re = *psubband1--;
 1272|  60.7M|    im = *psubband++;
 1273|       |
 1274|  60.7M|    wim = *p_sin_cos++;
 1275|  60.7M|    wre = *p_sin_cos++;
 1276|       |
 1277|  60.7M|    *psubband1_t-- = (WORD32)((ixheaac_sub64_sat(ixheaac_mult64(im, wre),
 1278|  60.7M|                                                  ixheaac_mult64(re, wim))) >>
 1279|  60.7M|                              32);
 1280|  60.7M|    *psubband1_t-- = (WORD32)(
 1281|  60.7M|        (ixheaac_add64(ixheaac_mult64(re, wre), ixheaac_mult64(im, wim))) >>
 1282|  60.7M|        32);
 1283|       |
 1284|  60.7M|    re = *psubband12--;
 1285|  60.7M|    im = *psubband2++;
 1286|       |
 1287|  60.7M|    *psubband1_t2-- = (WORD32)(
 1288|  60.7M|        (ixheaac_add64(ixheaac_mult64(re, wim), ixheaac_mult64(im, wre))) >>
 1289|  60.7M|        32);
 1290|  60.7M|    *psubband1_t2-- = (WORD32)((ixheaac_sub64_sat(ixheaac_mult64(im, wim),
 1291|  60.7M|                                                   ixheaac_mult64(re, wre))) >>
 1292|  60.7M|                               32);
 1293|  60.7M|  }
 1294|       |
 1295|  12.5M|  if (M == 32) {
  ------------------
  |  Branch (1295:7): [True: 3.71M, False: 8.84M]
  ------------------
 1296|  3.71M|    ixheaacd_esbr_radix4bfly(p_twiddle, subband_tmp, 1, 8);
 1297|  3.71M|    ixheaacd_esbr_radix4bfly(p_twiddle + 48, subband_tmp, 4, 2);
 1298|  3.71M|    ixheaacd_esbr_postradixcompute2(subband, subband_tmp, p_dig_rev_tbl, 32);
 1299|       |
 1300|  3.71M|    ixheaacd_esbr_radix4bfly(p_twiddle, &subband_tmp[64], 1, 8);
 1301|  3.71M|    ixheaacd_esbr_radix4bfly(p_twiddle + 48, &subband_tmp[64], 4, 2);
 1302|  3.71M|    ixheaacd_esbr_postradixcompute2(&subband[64], &subband_tmp[64],
 1303|  3.71M|                                    p_dig_rev_tbl, 32);
 1304|       |
 1305|  3.71M|  }
 1306|       |
 1307|  8.84M|  else if (M == 16) {
  ------------------
  |  Branch (1307:12): [True: 6.41M, False: 2.43M]
  ------------------
 1308|  6.41M|    ixheaacd_esbr_radix4bfly(p_twiddle, subband_tmp, 1, 4);
 1309|  6.41M|    ixheaacd_esbr_postradixcompute4(subband, subband_tmp, p_dig_rev_tbl, 16);
 1310|       |
 1311|  6.41M|    ixheaacd_esbr_radix4bfly(p_twiddle, &subband_tmp[64], 1, 4);
 1312|  6.41M|    ixheaacd_esbr_postradixcompute4(&subband[64], &subband_tmp[64],
 1313|  6.41M|                                    p_dig_rev_tbl, 16);
 1314|       |
 1315|  6.41M|  }
 1316|       |
 1317|  2.43M|  else if (M == 12) {
  ------------------
  |  Branch (1317:12): [True: 575k, False: 1.86M]
  ------------------
 1318|  7.48M|    for (z = 0; z < (qmf_bank->no_channels >> 1); z++) {
  ------------------
  |  Branch (1318:17): [True: 6.90M, False: 575k]
  ------------------
 1319|  6.90M|      temp[z] = subband_tmp[2 * z];
 1320|  6.90M|      temp[12 + z] = subband_tmp[2 * z + 1];
 1321|  6.90M|    }
 1322|       |
 1323|   575k|    ixheaacd_complex_fft_p3(temp, &temp[12], 12, -1, &scaleshift);
 1324|       |
 1325|  7.48M|    for (z = 0; z < (qmf_bank->no_channels >> 1); z++) {
  ------------------
  |  Branch (1325:17): [True: 6.90M, False: 575k]
  ------------------
 1326|  6.90M|      subband[2 * z] = temp[z];
 1327|  6.90M|      subband[2 * z + 1] = temp[z + 12];
 1328|  6.90M|    }
 1329|   575k|    scaleshift = 0;
 1330|  7.48M|    for (z = 0; z < (qmf_bank->no_channels >> 1); z++) {
  ------------------
  |  Branch (1330:17): [True: 6.90M, False: 575k]
  ------------------
 1331|  6.90M|      temp[z] = subband_tmp[64 + 2 * z];
 1332|  6.90M|      temp[12 + z] = subband_tmp[64 + 2 * z + 1];
 1333|  6.90M|    }
 1334|       |
 1335|   575k|    ixheaacd_complex_fft_p3(temp, &temp[12], 12, -1, &scaleshift);
 1336|       |
 1337|  7.48M|    for (z = 0; z < (qmf_bank->no_channels >> 1); z++) {
  ------------------
  |  Branch (1337:17): [True: 6.90M, False: 575k]
  ------------------
 1338|  6.90M|      subband[64 + 2 * z] = temp[z];
 1339|  6.90M|      subband[64 + 2 * z + 1] = temp[z + 12];
 1340|  6.90M|    }
 1341|       |
 1342|   575k|  }
 1343|       |
 1344|  1.86M|  else {
 1345|  16.7M|    for (z = 0; z < (qmf_bank->no_channels >> 1); z++) {
  ------------------
  |  Branch (1345:17): [True: 14.8M, False: 1.86M]
  ------------------
 1346|  14.8M|      temp[z] = subband_tmp[2 * z];
 1347|  14.8M|      temp[8 + z] = subband_tmp[2 * z + 1];
 1348|  14.8M|    }
 1349|       |
 1350|  1.86M|    (*ixheaacd_complex_fft_p2)(temp, &temp[8], 8, -1, &scaleshift);
 1351|       |
 1352|  16.7M|    for (z = 0; z < (qmf_bank->no_channels >> 1); z++) {
  ------------------
  |  Branch (1352:17): [True: 14.8M, False: 1.86M]
  ------------------
 1353|  14.8M|      subband[2 * z] = temp[z] << scaleshift;
 1354|  14.8M|      subband[2 * z + 1] = temp[z + 8] << scaleshift;
 1355|  14.8M|    }
 1356|  1.86M|    scaleshift = 0;
 1357|  16.7M|    for (z = 0; z < (qmf_bank->no_channels >> 1); z++) {
  ------------------
  |  Branch (1357:17): [True: 14.8M, False: 1.86M]
  ------------------
 1358|  14.8M|      temp[z] = subband_tmp[64 + 2 * z];
 1359|  14.8M|      temp[8 + z] = subband_tmp[64 + 2 * z + 1];
 1360|  14.8M|    }
 1361|       |
 1362|  1.86M|    (*ixheaacd_complex_fft_p2)(temp, &temp[8], 8, -1, &scaleshift);
 1363|       |
 1364|  16.7M|    for (z = 0; z < (qmf_bank->no_channels >> 1); z++) {
  ------------------
  |  Branch (1364:17): [True: 14.8M, False: 1.86M]
  ------------------
 1365|  14.8M|      subband[64 + 2 * z] = temp[z] << scaleshift;
 1366|  14.8M|      subband[64 + 2 * z + 1] = temp[8 + z] << scaleshift;
 1367|  14.8M|    }
 1368|  1.86M|  }
 1369|       |
 1370|  12.5M|  psubband = &subband[0];
 1371|  12.5M|  psubband1 = &subband[2 * M - 1];
 1372|       |
 1373|  12.5M|  re = *psubband1;
 1374|       |
 1375|  12.5M|  *psubband = *psubband >> 1;
 1376|  12.5M|  psubband++;
 1377|  12.5M|  *psubband1 = ixheaac_negate32_sat(*psubband >> 1);
 1378|  12.5M|  psubband1--;
 1379|       |
 1380|  12.5M|  p_sin = qmf_bank->esbr_alt_sin_twiddle;
 1381|       |
 1382|  12.5M|  wim = *p_sin++;
 1383|  12.5M|  wre = *p_sin++;
 1384|       |
 1385|  12.5M|  im = *psubband1;
 1386|       |
 1387|  12.5M|  *psubband1-- = (WORD32)(
 1388|  12.5M|      (ixheaac_add64(ixheaac_mult64(re, wre), ixheaac_mult64(im, wim))) >>
 1389|  12.5M|      32);
 1390|  12.5M|  *psubband++ = (WORD32)((ixheaac_sub64_sat(ixheaac_mult64(im, wre),
 1391|  12.5M|                                             ixheaac_mult64(re, wim))) >>
 1392|  12.5M|                         32);
 1393|       |
 1394|  12.5M|  psubband2 = &subband[64];
 1395|  12.5M|  psubband12 = &subband[2 * M - 1 + 64];
 1396|       |
 1397|  12.5M|  re = *psubband12;
 1398|       |
 1399|  12.5M|  *psubband12-- = ixheaac_negate32_sat(*psubband2 >> 1);
 1400|       |
 1401|  12.5M|  *psubband2 = psubband2[1] >> 1;
 1402|       |
 1403|  12.5M|  psubband2++;
 1404|       |
 1405|  12.5M|  im = *psubband12;
 1406|       |
 1407|  12.5M|  *psubband2++ = ixheaac_negate32_sat((WORD32)(
 1408|  12.5M|      (ixheaac_add64(ixheaac_mult64(re, wre), ixheaac_mult64(im, wim))) >>
 1409|  12.5M|      32));
 1410|  12.5M|  *psubband12-- = (WORD32)((ixheaac_sub64_sat(ixheaac_mult64(re, wim),
 1411|  12.5M|                                               ixheaac_mult64(im, wre))) >>
 1412|  12.5M|                           32);
 1413|       |
 1414|   121M|  for (i = (M_2 - 2); i >= 0; i--) {
  ------------------
  |  Branch (1414:23): [True: 108M, False: 12.5M]
  ------------------
 1415|   108M|    im = psubband[0];
 1416|       |
 1417|   108M|    re = psubband[1];
 1418|       |
 1419|   108M|    re2 = *psubband1;
 1420|       |
 1421|   108M|    *psubband++ = (WORD32)(
 1422|   108M|        (ixheaac_add64(ixheaac_mult64(re, wim), ixheaac_mult64(im, wre))) >>
 1423|   108M|        32);
 1424|   108M|    *psubband1-- = (WORD32)((ixheaac_sub64_sat(ixheaac_mult64(im, wim),
 1425|   108M|                                                ixheaac_mult64(re, wre))) >>
 1426|   108M|                            32);
 1427|       |
 1428|   108M|    im = psubband2[0];
 1429|       |
 1430|   108M|    re = psubband2[1];
 1431|       |
 1432|   108M|    re3 = *psubband12;
 1433|       |
 1434|   108M|    *psubband12-- = ixheaac_negate32_sat((WORD32)(
 1435|   108M|        (ixheaac_add64(ixheaac_mult64(re, wim), ixheaac_mult64(im, wre))) >>
 1436|   108M|        32));
 1437|   108M|    *psubband2++ = (WORD32)((ixheaac_sub64_sat(ixheaac_mult64(re, wre),
 1438|   108M|                                                ixheaac_mult64(im, wim))) >>
 1439|   108M|                            32);
 1440|       |
 1441|   108M|    wim = *p_sin++;
 1442|   108M|    wre = *p_sin++;
 1443|   108M|    im = psubband1[0];
 1444|       |
 1445|   108M|    *psubband1-- = (WORD32)(
 1446|   108M|        (ixheaac_add64(ixheaac_mult64(re2, wre), ixheaac_mult64(im, wim))) >>
 1447|   108M|        32);
 1448|   108M|    *psubband++ = (WORD32)((ixheaac_sub64_sat(ixheaac_mult64(im, wre),
 1449|   108M|                                               ixheaac_mult64(re2, wim))) >>
 1450|   108M|                           32);
 1451|       |
 1452|   108M|    im = psubband12[0];
 1453|       |
 1454|   108M|    *psubband2++ = ixheaac_negate32_sat((WORD32)(
 1455|   108M|        (ixheaac_add64(ixheaac_mult64(re3, wre), ixheaac_mult64(im, wim))) >>
 1456|   108M|        32));
 1457|   108M|    *psubband12-- = (WORD32)((ixheaac_sub64_sat(ixheaac_mult64(re3, wim),
 1458|   108M|                                                 ixheaac_mult64(im, wre))) >>
 1459|   108M|                             32);
 1460|   108M|  }
 1461|  12.5M|}
ixheaacd_esbr_fwd_modulation:
 1466|  8.84M|    ia_qmf_dec_tables_struct *qmf_dec_tables_ptr) {
 1467|  8.84M|  WORD32 i;
 1468|  8.84M|  const WORD32 *time_sample_buf1 =
 1469|  8.84M|      &time_sample_buf[2 * qmf_bank->no_channels - 1];
 1470|  8.84M|  WORD32 temp1, temp2;
 1471|  8.84M|  WORD32 *t_real_subband = real_subband;
 1472|  8.84M|  WORD32 *t_imag_subband = imag_subband;
 1473|  8.84M|  const WORD32 *tcos;
 1474|       |
 1475|   257M|  for (i = qmf_bank->no_channels - 1; i >= 0; i--) {
  ------------------
  |  Branch (1475:39): [True: 248M, False: 8.84M]
  ------------------
 1476|   248M|    temp1 = ixheaac_shr32(*time_sample_buf++, HQ_SHIFT_64);
  ------------------
  |  |   57|   248M|#define HQ_SHIFT_64 4
  ------------------
 1477|   248M|    temp2 = ixheaac_shr32(*time_sample_buf1--, HQ_SHIFT_64);
  ------------------
  |  |   57|   248M|#define HQ_SHIFT_64 4
  ------------------
 1478|       |
 1479|   248M|    *t_real_subband++ = ixheaac_sub32_sat(temp1, temp2);
 1480|       |
 1481|   248M|    *t_imag_subband++ = ixheaac_add32_sat(temp1, temp2);
 1482|   248M|  }
 1483|       |
 1484|  8.84M|  ixheaacd_esbr_cos_sin_mod(real_subband, qmf_bank,
 1485|  8.84M|                            qmf_dec_tables_ptr->esbr_w_16,
 1486|  8.84M|                            qmf_dec_tables_ptr->dig_rev_table4_16);
 1487|       |
 1488|  8.84M|  tcos = qmf_bank->esbr_t_cos;
 1489|       |
 1490|   257M|  for (i = (qmf_bank->usb - qmf_bank->lsb - 1); i >= 0; i--) {
  ------------------
  |  Branch (1490:49): [True: 248M, False: 8.84M]
  ------------------
 1491|   248M|    WORD32 cosh, sinh;
 1492|   248M|    WORD32 re, im;
 1493|       |
 1494|   248M|    re = *real_subband;
 1495|   248M|    im = *imag_subband;
 1496|   248M|    cosh = *tcos++;
 1497|   248M|    sinh = *tcos++;
 1498|   248M|    *real_subband++ = (WORD32)((ixheaac_add64(ixheaac_mult64(re, cosh),
 1499|   248M|                                               ixheaac_mult64(im, sinh))) >>
 1500|   248M|                               31);
 1501|   248M|    *imag_subband++ =
 1502|   248M|        (WORD32)((ixheaac_sub64_sat(ixheaac_mult64(im, cosh),
 1503|   248M|                                     ixheaac_mult64(re, sinh))) >>
 1504|   248M|                 31);
 1505|   248M|  }
 1506|  8.84M|}
ixheaacd_sbr_qmfsyn64_winadd:
 1510|   301k|                                  WORD32 ch_fac) {
 1511|   301k|  WORD32 k;
 1512|   301k|  WORD32 rounding_fac = 0x8000;
 1513|   301k|  rounding_fac = rounding_fac >> shift;
 1514|       |
 1515|  19.6M|  for (k = 0; k < 64; k++) {
  ------------------
  |  Branch (1515:15): [True: 19.2M, False: 301k]
  ------------------
 1516|  19.2M|    WORD32 syn_out = rounding_fac;
 1517|       |
 1518|  19.2M|    syn_out = ixheaac_add32_sat(
 1519|  19.2M|        syn_out, ixheaac_mult16x16in32(tmp1[0 + k], inp1[k + 0]));
 1520|  19.2M|    syn_out = ixheaac_add32_sat(
 1521|  19.2M|        syn_out, ixheaac_mult16x16in32(tmp1[256 + k], inp1[k + 128]));
 1522|  19.2M|    syn_out = ixheaac_add32_sat(
 1523|  19.2M|        syn_out, ixheaac_mult16x16in32(tmp1[512 + k], inp1[k + 256]));
 1524|  19.2M|    syn_out = ixheaac_add32_sat(
 1525|  19.2M|        syn_out, ixheaac_mult16x16in32(tmp1[768 + k], inp1[k + 384]));
 1526|  19.2M|    syn_out = ixheaac_add32_sat(
 1527|  19.2M|        syn_out, ixheaac_mult16x16in32(tmp1[1024 + k], inp1[k + 512]));
 1528|       |
 1529|  19.2M|    syn_out = ixheaac_add32_sat(
 1530|  19.2M|        syn_out, ixheaac_mult16x16in32(tmp2[128 + k], inp1[k + 64]));
 1531|  19.2M|    syn_out = ixheaac_add32_sat(
 1532|  19.2M|        syn_out, ixheaac_mult16x16in32(tmp2[384 + k], inp1[k + 192]));
 1533|  19.2M|    syn_out = ixheaac_add32_sat(
 1534|  19.2M|        syn_out, ixheaac_mult16x16in32(tmp2[640 + k], inp1[k + 320]));
 1535|  19.2M|    syn_out = ixheaac_add32_sat(
 1536|  19.2M|        syn_out, ixheaac_mult16x16in32(tmp2[896 + k], inp1[k + 448]));
 1537|  19.2M|    syn_out = ixheaac_add32_sat(
 1538|  19.2M|        syn_out, ixheaac_mult16x16in32(tmp2[1152 + k], inp1[k + 576]));
 1539|       |
 1540|  19.2M|    sample_buffer[ch_fac * k] = (ixheaac_shl32_sat(syn_out, shift) >> 16);
 1541|  19.2M|  }
 1542|   301k|}
ixheaacd_esbr_qmfsyn64_winadd:
 1545|  3.71M|                                   WORD32 *sample_buffer, WORD32 ch_fac) {
 1546|  3.71M|  WORD32 k;
 1547|       |
 1548|   241M|  for (k = 0; k < 64; k++) {
  ------------------
  |  Branch (1548:15): [True: 237M, False: 3.71M]
  ------------------
 1549|   237M|    WORD64 syn_out = 0;
 1550|       |
 1551|   237M|    syn_out =
 1552|   237M|        ixheaac_add64(syn_out, ixheaac_mult64(tmp1[0 + k], inp1[k + 0]));
 1553|   237M|    syn_out =
 1554|   237M|        ixheaac_add64(syn_out, ixheaac_mult64(tmp1[256 + k], inp1[k + 128]));
 1555|   237M|    syn_out =
 1556|   237M|        ixheaac_add64(syn_out, ixheaac_mult64(tmp1[512 + k], inp1[k + 256]));
 1557|   237M|    syn_out =
 1558|   237M|        ixheaac_add64(syn_out, ixheaac_mult64(tmp1[768 + k], inp1[k + 384]));
 1559|   237M|    syn_out =
 1560|   237M|        ixheaac_add64(syn_out, ixheaac_mult64(tmp1[1024 + k], inp1[k + 512]));
 1561|       |
 1562|   237M|    syn_out =
 1563|   237M|        ixheaac_add64(syn_out, ixheaac_mult64(tmp2[128 + k], inp1[k + 64]));
 1564|   237M|    syn_out =
 1565|   237M|        ixheaac_add64(syn_out, ixheaac_mult64(tmp2[384 + k], inp1[k + 192]));
 1566|   237M|    syn_out =
 1567|   237M|        ixheaac_add64(syn_out, ixheaac_mult64(tmp2[640 + k], inp1[k + 320]));
 1568|   237M|    syn_out =
 1569|   237M|        ixheaac_add64(syn_out, ixheaac_mult64(tmp2[896 + k], inp1[k + 448]));
 1570|   237M|    syn_out =
 1571|   237M|        ixheaac_add64(syn_out, ixheaac_mult64(tmp2[1152 + k], inp1[k + 576]));
 1572|       |
 1573|   237M|    sample_buffer[ch_fac * k] = (WORD32)(syn_out >> 31);
 1574|   237M|  }
 1575|  3.71M|}
ixheaacd_esbr_qmfsyn32_winadd:
 1578|  7.04k|                                   WORD32 *sample_buffer, WORD32 ch_fac) {
 1579|  7.04k|  WORD32 k;
 1580|       |
 1581|   232k|  for (k = 0; k < 32; k++) {
  ------------------
  |  Branch (1581:15): [True: 225k, False: 7.04k]
  ------------------
 1582|   225k|    WORD64 syn_out = 0;
 1583|       |
 1584|   225k|    syn_out =
 1585|   225k|        ixheaac_add64(syn_out, ixheaac_mult64(tmp1[0 + k], inp1[2 * (k + 0)]));
 1586|   225k|    syn_out =
 1587|   225k|        ixheaac_add64(syn_out, ixheaac_mult64(tmp1[128 + k], inp1[2 * (k + 64)]));
 1588|   225k|    syn_out =
 1589|   225k|        ixheaac_add64(syn_out, ixheaac_mult64(tmp1[256 + k], inp1[2 * (k + 128)]));
 1590|   225k|    syn_out =
 1591|   225k|        ixheaac_add64(syn_out, ixheaac_mult64(tmp1[384 + k], inp1[2 * (k + 192)]));
 1592|   225k|    syn_out =
 1593|   225k|        ixheaac_add64(syn_out, ixheaac_mult64(tmp1[512 + k], inp1[2 * (k + 256)]));
 1594|       |
 1595|   225k|    syn_out =
 1596|   225k|        ixheaac_add64(syn_out, ixheaac_mult64(tmp2[64 + k], inp1[2 * (k + 32)]));
 1597|   225k|    syn_out =
 1598|   225k|        ixheaac_add64(syn_out, ixheaac_mult64(tmp2[192 + k], inp1[2 * (k + 96)]));
 1599|   225k|    syn_out =
 1600|   225k|        ixheaac_add64(syn_out, ixheaac_mult64(tmp2[320 + k], inp1[2 * (k + 160)]));
 1601|   225k|    syn_out =
 1602|   225k|        ixheaac_add64(syn_out, ixheaac_mult64(tmp2[448 + k], inp1[2 * (k + 224)]));
 1603|   225k|    syn_out =
 1604|   225k|        ixheaac_add64(syn_out, ixheaac_mult64(tmp2[576 + k], inp1[2 * (k + 288)]));
 1605|       |
 1606|   225k|    sample_buffer[ch_fac * k] = (WORD32)(syn_out >> 31);
 1607|   225k|  }
 1608|  7.04k|}
ixheaacd_shiftrountine_with_rnd_eld:
 1674|   787k|                                         WORD32 shift) {
 1675|   787k|  WORD16 *filter_states_rev = filter_states + len;
 1676|   787k|  WORD32 treal, timag;
 1677|   787k|  WORD32 j;
 1678|       |
 1679|  18.2M|  for (j = (len - 1); j >= 0; j -= 2) {
  ------------------
  |  Branch (1679:23): [True: 17.4M, False: 787k]
  ------------------
 1680|  17.4M|    WORD32 r1, r2, i1, i2;
 1681|  17.4M|    i2 = qmf_imag[j];
 1682|  17.4M|    r2 = qmf_real[j];
 1683|  17.4M|    r1 = *qmf_real++;
 1684|  17.4M|    i1 = *qmf_imag++;
 1685|       |
 1686|  17.4M|    timag = ixheaac_negate32_sat(ixheaac_add32_sat(i1, r1));
 1687|  17.4M|    timag = (ixheaac_shl32_sat(timag, shift));
 1688|  17.4M|    filter_states_rev[j] = ixheaac_round16(timag);
 1689|       |
 1690|  17.4M|    treal = ixheaac_sub32_sat(r2, i2);
 1691|  17.4M|    treal = (ixheaac_shl32_sat(treal, shift));
 1692|  17.4M|    filter_states[j] = ixheaac_round16(treal);
 1693|       |
 1694|  17.4M|    treal = ixheaac_sub32_sat(r1, i1);
 1695|  17.4M|    treal = (ixheaac_shl32_sat(treal, shift));
 1696|  17.4M|    *filter_states++ = ixheaac_round16(treal);
 1697|       |
 1698|  17.4M|    timag = ixheaac_negate32_sat(ixheaac_add32_sat(i2, r2));
 1699|  17.4M|    timag = (ixheaac_shl32_sat(timag, shift));
 1700|  17.4M|    *filter_states_rev++ = ixheaac_round16(timag);
 1701|  17.4M|  }
 1702|   787k|}
ixheaacd_shiftrountine_with_rnd_hq:
 1706|  3.71M|                                        WORD32 shift) {
 1707|  3.71M|  WORD32 *filter_states_rev = filter_states + len;
 1708|  3.71M|  WORD32 treal, timag;
 1709|  3.71M|  WORD32 j;
 1710|       |
 1711|   122M|  for (j = (len - 1); j >= 0; j -= 2) {
  ------------------
  |  Branch (1711:23): [True: 118M, False: 3.71M]
  ------------------
 1712|   118M|    WORD32 r1, r2, i1, i2;
 1713|   118M|    i2 = qmf_imag[j];
 1714|   118M|    r2 = qmf_real[j];
 1715|   118M|    r1 = *qmf_real++;
 1716|   118M|    i1 = *qmf_imag++;
 1717|       |
 1718|   118M|    timag = ixheaac_add32_sat(i1, r1);
 1719|   118M|    timag = (ixheaac_shl32_sat(timag, shift));
 1720|   118M|    filter_states_rev[j] = timag;
 1721|       |
 1722|   118M|    treal = ixheaac_sub32_sat(i2, r2);
 1723|   118M|    treal = (ixheaac_shl32_sat(treal, shift));
 1724|   118M|    filter_states[j] = treal;
 1725|       |
 1726|   118M|    treal = ixheaac_sub32_sat(i1, r1);
 1727|   118M|    treal = (ixheaac_shl32_sat(treal, shift));
 1728|   118M|    *filter_states++ = treal;
 1729|       |
 1730|   118M|    timag = ixheaac_add32_sat(i2, r2);
 1731|   118M|    timag = (ixheaac_shl32_sat(timag, shift));
 1732|   118M|    *filter_states_rev++ = timag;
 1733|   118M|  }
 1734|  3.71M|}
ixheaacd_radix4bfly:
 1737|  4.05M|                         WORD32 index) {
 1738|  4.05M|  int i;
 1739|  4.05M|  WORD32 l1, l2, h2, fft_jmp;
 1740|  4.05M|  WORD32 xt0_0, yt0_0, xt1_0, yt1_0, xt2_0, yt2_0;
 1741|  4.05M|  WORD32 xh0_0, xh1_0, xh20_0, xh21_0, xl0_0, xl1_0, xl20_0, xl21_0;
 1742|  4.05M|  WORD32 x_0, x_1, x_l1_0, x_l1_1, x_l2_0, x_l2_1;
 1743|  4.05M|  WORD32 x_h2_0, x_h2_1;
 1744|  4.05M|  WORD16 si10, si20, si30, co10, co20, co30;
 1745|       |
 1746|  4.05M|  WORD32 mul_1, mul_2, mul_3, mul_4, mul_5, mul_6;
 1747|  4.05M|  WORD32 mul_7, mul_8, mul_9, mul_10, mul_11, mul_12;
 1748|  4.05M|  const WORD16 *w_ptr = w;
 1749|  4.05M|  WORD32 i1;
 1750|       |
 1751|  4.05M|  h2 = index << 1;
 1752|  4.05M|  l1 = index << 2;
 1753|  4.05M|  l2 = (index << 2) + (index << 1);
 1754|       |
 1755|  4.05M|  fft_jmp = 6 * (index);
 1756|       |
 1757|  10.8M|  for (i1 = 0; i1 < index1; i1++) {
  ------------------
  |  Branch (1757:16): [True: 6.75M, False: 4.05M]
  ------------------
 1758|  30.1M|    for (i = 0; i < index; i++) {
  ------------------
  |  Branch (1758:17): [True: 23.4M, False: 6.75M]
  ------------------
 1759|  23.4M|      si10 = (*w_ptr++);
 1760|  23.4M|      co10 = (*w_ptr++);
 1761|  23.4M|      si20 = (*w_ptr++);
 1762|  23.4M|      co20 = (*w_ptr++);
 1763|  23.4M|      si30 = (*w_ptr++);
 1764|  23.4M|      co30 = (*w_ptr++);
 1765|       |
 1766|  23.4M|      x_0 = x[0];
 1767|  23.4M|      x_h2_0 = x[h2];
 1768|  23.4M|      x_l1_0 = x[l1];
 1769|  23.4M|      x_l2_0 = x[l2];
 1770|       |
 1771|  23.4M|      xh0_0 = ixheaac_add32_sat(x_0, x_l1_0);
 1772|  23.4M|      xl0_0 = ixheaac_sub32_sat(x_0, x_l1_0);
 1773|       |
 1774|  23.4M|      xh20_0 = ixheaac_add32_sat(x_h2_0, x_l2_0);
 1775|  23.4M|      xl20_0 = ixheaac_sub32_sat(x_h2_0, x_l2_0);
 1776|       |
 1777|  23.4M|      x[0] = ixheaac_add32_sat(xh0_0, xh20_0);
 1778|  23.4M|      xt0_0 = ixheaac_sub32_sat(xh0_0, xh20_0);
 1779|       |
 1780|  23.4M|      x_1 = x[1];
 1781|  23.4M|      x_h2_1 = x[h2 + 1];
 1782|  23.4M|      x_l1_1 = x[l1 + 1];
 1783|  23.4M|      x_l2_1 = x[l2 + 1];
 1784|       |
 1785|  23.4M|      xh1_0 = ixheaac_add32_sat(x_1, x_l1_1);
 1786|  23.4M|      xl1_0 = ixheaac_sub32_sat(x_1, x_l1_1);
 1787|       |
 1788|  23.4M|      xh21_0 = ixheaac_add32_sat(x_h2_1, x_l2_1);
 1789|  23.4M|      xl21_0 = ixheaac_sub32_sat(x_h2_1, x_l2_1);
 1790|       |
 1791|  23.4M|      x[1] = ixheaac_add32_sat(xh1_0, xh21_0);
 1792|  23.4M|      yt0_0 = ixheaac_sub32_sat(xh1_0, xh21_0);
 1793|       |
 1794|  23.4M|      xt1_0 = ixheaac_add32_sat(xl0_0, xl21_0);
 1795|  23.4M|      xt2_0 = ixheaac_sub32_sat(xl0_0, xl21_0);
 1796|       |
 1797|  23.4M|      yt2_0 = ixheaac_add32_sat(xl1_0, xl20_0);
 1798|  23.4M|      yt1_0 = ixheaac_sub32_sat(xl1_0, xl20_0);
 1799|       |
 1800|  23.4M|      mul_11 = ixheaac_mult32x16in32(xt2_0, co30);
 1801|  23.4M|      mul_3 = ixheaac_mult32x16in32(yt2_0, si30);
 1802|  23.4M|      x[l2] = (mul_3 + mul_11) << RADIXSHIFT;
  ------------------
  |  |   58|  23.4M|#define RADIXSHIFT 1
  ------------------
 1803|       |
 1804|  23.4M|      mul_5 = ixheaac_mult32x16in32(xt2_0, si30);
 1805|  23.4M|      mul_9 = ixheaac_mult32x16in32(yt2_0, co30);
 1806|  23.4M|      x[l2 + 1] = (mul_9 - mul_5) << RADIXSHIFT;
  ------------------
  |  |   58|  23.4M|#define RADIXSHIFT 1
  ------------------
 1807|       |
 1808|  23.4M|      mul_12 = ixheaac_mult32x16in32(xt0_0, co20);
 1809|  23.4M|      mul_2 = ixheaac_mult32x16in32(yt0_0, si20);
 1810|  23.4M|      x[l1] = (mul_2 + mul_12) << RADIXSHIFT;
  ------------------
  |  |   58|  23.4M|#define RADIXSHIFT 1
  ------------------
 1811|       |
 1812|  23.4M|      mul_6 = ixheaac_mult32x16in32(xt0_0, si20);
 1813|  23.4M|      mul_8 = ixheaac_mult32x16in32(yt0_0, co20);
 1814|  23.4M|      x[l1 + 1] = (mul_8 - mul_6) << RADIXSHIFT;
  ------------------
  |  |   58|  23.4M|#define RADIXSHIFT 1
  ------------------
 1815|       |
 1816|  23.4M|      mul_4 = ixheaac_mult32x16in32(xt1_0, co10);
 1817|  23.4M|      mul_1 = ixheaac_mult32x16in32(yt1_0, si10);
 1818|  23.4M|      x[h2] = (mul_1 + mul_4) << RADIXSHIFT;
  ------------------
  |  |   58|  23.4M|#define RADIXSHIFT 1
  ------------------
 1819|       |
 1820|  23.4M|      mul_10 = ixheaac_mult32x16in32(xt1_0, si10);
 1821|  23.4M|      mul_7 = ixheaac_mult32x16in32(yt1_0, co10);
 1822|  23.4M|      x[h2 + 1] = (mul_7 - mul_10) << RADIXSHIFT;
  ------------------
  |  |   58|  23.4M|#define RADIXSHIFT 1
  ------------------
 1823|       |
 1824|  23.4M|      x += 2;
 1825|  23.4M|    }
 1826|  6.75M|    x += fft_jmp;
 1827|  6.75M|    w_ptr = w_ptr - fft_jmp;
 1828|  6.75M|  }
 1829|  4.05M|}
ixheaacd_postradixcompute4:
 1832|  2.25M|                                const WORD32 *p_dig_rev_tbl, WORD32 npoints) {
 1833|  2.25M|  WORD32 i, k;
 1834|  2.25M|  WORD32 h2;
 1835|  2.25M|  WORD32 xh0_0, xh1_0, xl0_0, xl1_0;
 1836|  2.25M|  WORD32 xh0_1, xh1_1, xl0_1, xl1_1;
 1837|  2.25M|  WORD32 x_0, x_1, x_2, x_3;
 1838|  2.25M|  WORD32 xh0_2, xh1_2, xl0_2, xl1_2, xh0_3, xh1_3, xl0_3, xl1_3;
 1839|  2.25M|  WORD32 x_4, x_5, x_6, x_7;
 1840|  2.25M|  WORD32 x_8, x_9, x_a, x_b, x_c, x_d, x_e, x_f;
 1841|  2.25M|  WORD32 n00, n10, n20, n30, n01, n11, n21, n31;
 1842|  2.25M|  WORD32 n02, n12, n22, n32, n03, n13, n23, n33;
 1843|  2.25M|  WORD32 *x2, *x0;
 1844|  2.25M|  WORD32 *y0, *y1, *y2, *y3;
 1845|       |
 1846|  2.25M|  y0 = ptr_y;
 1847|  2.25M|  y2 = ptr_y + (WORD32)npoints;
 1848|  2.25M|  x0 = ptr_x;
 1849|  2.25M|  x2 = ptr_x + (WORD32)(npoints >> 1);
 1850|       |
 1851|  2.25M|  y1 = y0 + (WORD32)(npoints >> 1);
 1852|  2.25M|  y3 = y2 + (WORD32)(npoints >> 1);
 1853|       |
 1854|  6.76M|  for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (1854:15): [True: 4.51M, False: 2.25M]
  ------------------
 1855|  9.02M|    for (i = 0; i<npoints>> 1; i += 8) {
  ------------------
  |  Branch (1855:17): [True: 4.51M, False: 4.51M]
  ------------------
 1856|  4.51M|      h2 = *p_dig_rev_tbl++ >> 2;
 1857|  4.51M|      x_0 = *x0++;
 1858|  4.51M|      x_1 = *x0++;
 1859|  4.51M|      x_2 = *x0++;
 1860|  4.51M|      x_3 = *x0++;
 1861|  4.51M|      x_4 = *x0++;
 1862|  4.51M|      x_5 = *x0++;
 1863|  4.51M|      x_6 = *x0++;
 1864|  4.51M|      x_7 = *x0++;
 1865|       |
 1866|  4.51M|      xh0_0 = ixheaac_add32_sat(x_0, x_4);
 1867|  4.51M|      xh1_0 = ixheaac_add32_sat(x_1, x_5);
 1868|  4.51M|      xl0_0 = ixheaac_sub32_sat(x_0, x_4);
 1869|  4.51M|      xl1_0 = ixheaac_sub32_sat(x_1, x_5);
 1870|  4.51M|      xh0_1 = ixheaac_add32_sat(x_2, x_6);
 1871|  4.51M|      xh1_1 = ixheaac_add32_sat(x_3, x_7);
 1872|  4.51M|      xl0_1 = ixheaac_sub32_sat(x_2, x_6);
 1873|  4.51M|      xl1_1 = ixheaac_sub32_sat(x_3, x_7);
 1874|       |
 1875|  4.51M|      n00 = ixheaac_add32_sat(xh0_0, xh0_1);
 1876|  4.51M|      n01 = ixheaac_add32_sat(xh1_0, xh1_1);
 1877|  4.51M|      n10 = ixheaac_add32_sat(xl0_0, xl1_1);
 1878|  4.51M|      n11 = ixheaac_sub32_sat(xl1_0, xl0_1);
 1879|  4.51M|      n20 = ixheaac_sub32_sat(xh0_0, xh0_1);
 1880|  4.51M|      n21 = ixheaac_sub32_sat(xh1_0, xh1_1);
 1881|  4.51M|      n30 = ixheaac_sub32_sat(xl0_0, xl1_1);
 1882|  4.51M|      n31 = ixheaac_add32_sat(xl1_0, xl0_1);
 1883|       |
 1884|  4.51M|      y0[h2] = n00;
 1885|  4.51M|      y0[h2 + 1] = n01;
 1886|  4.51M|      y1[h2] = n10;
 1887|  4.51M|      y1[h2 + 1] = n11;
 1888|  4.51M|      y2[h2] = n20;
 1889|  4.51M|      y2[h2 + 1] = n21;
 1890|  4.51M|      y3[h2] = n30;
 1891|  4.51M|      y3[h2 + 1] = n31;
 1892|       |
 1893|  4.51M|      x_8 = *x2++;
 1894|  4.51M|      x_9 = *x2++;
 1895|  4.51M|      x_a = *x2++;
 1896|  4.51M|      x_b = *x2++;
 1897|  4.51M|      x_c = *x2++;
 1898|  4.51M|      x_d = *x2++;
 1899|  4.51M|      x_e = *x2++;
 1900|  4.51M|      x_f = *x2++;
 1901|       |
 1902|  4.51M|      xh0_2 = ixheaac_add32_sat(x_8, x_c);
 1903|  4.51M|      xh1_2 = ixheaac_add32_sat(x_9, x_d);
 1904|  4.51M|      xl0_2 = ixheaac_sub32_sat(x_8, x_c);
 1905|  4.51M|      xl1_2 = ixheaac_sub32_sat(x_9, x_d);
 1906|  4.51M|      xh0_3 = ixheaac_add32_sat(x_a, x_e);
 1907|  4.51M|      xh1_3 = ixheaac_add32_sat(x_b, x_f);
 1908|  4.51M|      xl0_3 = ixheaac_sub32_sat(x_a, x_e);
 1909|  4.51M|      xl1_3 = ixheaac_sub32_sat(x_b, x_f);
 1910|       |
 1911|  4.51M|      n02 = ixheaac_add32_sat(xh0_2, xh0_3);
 1912|  4.51M|      n03 = ixheaac_add32_sat(xh1_2, xh1_3);
 1913|  4.51M|      n12 = ixheaac_add32_sat(xl0_2, xl1_3);
 1914|  4.51M|      n13 = ixheaac_sub32_sat(xl1_2, xl0_3);
 1915|  4.51M|      n22 = ixheaac_sub32_sat(xh0_2, xh0_3);
 1916|  4.51M|      n23 = ixheaac_sub32_sat(xh1_2, xh1_3);
 1917|  4.51M|      n32 = ixheaac_sub32_sat(xl0_2, xl1_3);
 1918|  4.51M|      n33 = ixheaac_add32_sat(xl1_2, xl0_3);
 1919|       |
 1920|  4.51M|      y0[h2 + 2] = n02;
 1921|  4.51M|      y0[h2 + 3] = n03;
 1922|  4.51M|      y1[h2 + 2] = n12;
 1923|  4.51M|      y1[h2 + 3] = n13;
 1924|  4.51M|      y2[h2 + 2] = n22;
 1925|  4.51M|      y2[h2 + 3] = n23;
 1926|  4.51M|      y3[h2 + 2] = n32;
 1927|  4.51M|      y3[h2 + 3] = n33;
 1928|  4.51M|    }
 1929|  4.51M|    x0 += (WORD32)npoints >> 1;
 1930|  4.51M|    x2 += (WORD32)npoints >> 1;
 1931|  4.51M|  }
 1932|  2.25M|}
ixheaacd_postradixcompute2:
 1935|   899k|                                const WORD32 *pdig_rev_tbl, WORD32 npoints) {
 1936|   899k|  WORD32 i, k;
 1937|   899k|  WORD32 h2;
 1938|   899k|  WORD32 x_0, x_1, x_2, x_3;
 1939|   899k|  WORD32 x_4, x_5, x_6, x_7;
 1940|   899k|  WORD32 x_8, x_9, x_a, x_b, x_c, x_d, x_e, x_f;
 1941|   899k|  WORD32 n00, n10, n20, n30, n01, n11, n21, n31;
 1942|   899k|  WORD32 n02, n12, n22, n32, n03, n13, n23, n33;
 1943|   899k|  WORD32 *x2, *x0;
 1944|   899k|  WORD32 *y0, *y1, *y2, *y3;
 1945|       |
 1946|   899k|  y0 = ptr_y;
 1947|   899k|  y2 = ptr_y + (WORD32)npoints;
 1948|   899k|  x0 = ptr_x;
 1949|   899k|  x2 = ptr_x + (WORD32)(npoints >> 1);
 1950|       |
 1951|   899k|  y1 = y0 + (WORD32)(npoints >> 2);
 1952|   899k|  y3 = y2 + (WORD32)(npoints >> 2);
 1953|       |
 1954|  2.69M|  for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (1954:15): [True: 1.79M, False: 899k]
  ------------------
 1955|  5.39M|    for (i = 0; i<npoints>> 1; i += 8) {
  ------------------
  |  Branch (1955:17): [True: 3.59M, False: 1.79M]
  ------------------
 1956|  3.59M|      h2 = *pdig_rev_tbl++ >> 2;
 1957|       |
 1958|  3.59M|      x_0 = *x0++;
 1959|  3.59M|      x_1 = *x0++;
 1960|  3.59M|      x_2 = *x0++;
 1961|  3.59M|      x_3 = *x0++;
 1962|  3.59M|      x_4 = *x0++;
 1963|  3.59M|      x_5 = *x0++;
 1964|  3.59M|      x_6 = *x0++;
 1965|  3.59M|      x_7 = *x0++;
 1966|       |
 1967|  3.59M|      n00 = ixheaac_add32_sat(x_0, x_2);
 1968|  3.59M|      n01 = ixheaac_add32_sat(x_1, x_3);
 1969|  3.59M|      n20 = ixheaac_sub32_sat(x_0, x_2);
 1970|  3.59M|      n21 = ixheaac_sub32_sat(x_1, x_3);
 1971|  3.59M|      n10 = ixheaac_add32_sat(x_4, x_6);
 1972|  3.59M|      n11 = ixheaac_add32_sat(x_5, x_7);
 1973|  3.59M|      n30 = ixheaac_sub32_sat(x_4, x_6);
 1974|  3.59M|      n31 = ixheaac_sub32_sat(x_5, x_7);
 1975|       |
 1976|  3.59M|      y0[h2] = n00;
 1977|  3.59M|      y0[h2 + 1] = n01;
 1978|  3.59M|      y1[h2] = n10;
 1979|  3.59M|      y1[h2 + 1] = n11;
 1980|  3.59M|      y2[h2] = n20;
 1981|  3.59M|      y2[h2 + 1] = n21;
 1982|  3.59M|      y3[h2] = n30;
 1983|  3.59M|      y3[h2 + 1] = n31;
 1984|       |
 1985|  3.59M|      x_8 = *x2++;
 1986|  3.59M|      x_9 = *x2++;
 1987|  3.59M|      x_a = *x2++;
 1988|  3.59M|      x_b = *x2++;
 1989|  3.59M|      x_c = *x2++;
 1990|  3.59M|      x_d = *x2++;
 1991|  3.59M|      x_e = *x2++;
 1992|  3.59M|      x_f = *x2++;
 1993|       |
 1994|  3.59M|      n02 = ixheaac_add32_sat(x_8, x_a);
 1995|  3.59M|      n03 = ixheaac_add32_sat(x_9, x_b);
 1996|  3.59M|      n22 = ixheaac_sub32_sat(x_8, x_a);
 1997|  3.59M|      n23 = ixheaac_sub32_sat(x_9, x_b);
 1998|  3.59M|      n12 = ixheaac_add32_sat(x_c, x_e);
 1999|  3.59M|      n13 = ixheaac_add32_sat(x_d, x_f);
 2000|  3.59M|      n32 = ixheaac_sub32_sat(x_c, x_e);
 2001|  3.59M|      n33 = ixheaac_sub32_sat(x_d, x_f);
 2002|       |
 2003|  3.59M|      y0[h2 + 2] = n02;
 2004|  3.59M|      y0[h2 + 3] = n03;
 2005|  3.59M|      y1[h2 + 2] = n12;
 2006|  3.59M|      y1[h2 + 3] = n13;
 2007|  3.59M|      y2[h2 + 2] = n22;
 2008|  3.59M|      y2[h2 + 3] = n23;
 2009|  3.59M|      y3[h2 + 2] = n32;
 2010|  3.59M|      y3[h2 + 3] = n33;
 2011|  3.59M|    }
 2012|  1.79M|    x0 += (WORD32)npoints >> 1;
 2013|  1.79M|    x2 += (WORD32)npoints >> 1;
 2014|  1.79M|  }
 2015|   899k|}

ixheaacd_calc_window:
   29|   336k|WORD32 ixheaacd_calc_window(WORD32 **win, WORD32 win_sz, WORD32 win_sel, WORD32 ec_flag) {
   30|   336k|  switch (win_sel) {
   31|   242k|    case WIN_SEL_0:
  ------------------
  |  |   91|   242k|#define WIN_SEL_0 0
  ------------------
  |  Branch (31:5): [True: 242k, False: 93.9k]
  ------------------
   32|   242k|      switch (win_sz) {
   33|   140k|        case WIN_LEN_128:
  ------------------
  |  |   77|   140k|#define WIN_LEN_128 128
  ------------------
  |  Branch (33:9): [True: 140k, False: 101k]
  ------------------
   34|   140k|          *win = (WORD32 *)ixheaacd_sine_win_128;
   35|   140k|          break;
   36|  75.9k|        case WIN_LEN_1024:
  ------------------
  |  |   73|  75.9k|#define WIN_LEN_1024 1024
  ------------------
  |  Branch (36:9): [True: 75.9k, False: 166k]
  ------------------
   37|  75.9k|          *win = (WORD32 *)ixheaacd_sine_win_1024;
   38|  75.9k|          break;
   39|      0|        case WIN_LEN_64:
  ------------------
  |  |   83|      0|#define WIN_LEN_64 64
  ------------------
  |  Branch (39:9): [True: 0, False: 242k]
  ------------------
   40|      0|          *win = (WORD32 *)ixheaacd_sine_win_64;
   41|      0|          break;
   42|  11.1k|        case WIN_LEN_768:
  ------------------
  |  |   74|  11.1k|#define WIN_LEN_768 768
  ------------------
  |  Branch (42:9): [True: 11.1k, False: 231k]
  ------------------
   43|  11.1k|          *win = (WORD32 *)ixheaacd_sine_win_768;
   44|  11.1k|          break;
   45|  1.44k|        case WIN_LEN_192:
  ------------------
  |  |   76|  1.44k|#define WIN_LEN_192 192
  ------------------
  |  Branch (45:9): [True: 1.44k, False: 240k]
  ------------------
   46|  1.44k|          *win = (WORD32 *)ixheaacd_sine_win_192;
   47|  1.44k|          break;
   48|  6.14k|        case WIN_LEN_96:
  ------------------
  |  |   82|  6.14k|#define WIN_LEN_96 96
  ------------------
  |  Branch (48:9): [True: 6.14k, False: 236k]
  ------------------
   49|  6.14k|          *win = (WORD32 *)ixheaacd_sine_win_96;
   50|  6.14k|          break;
   51|  6.51k|        case WIN_LEN_256:
  ------------------
  |  |   80|  6.51k|#define WIN_LEN_256 256
  ------------------
  |  Branch (51:9): [True: 6.51k, False: 235k]
  ------------------
   52|  6.51k|          *win = (WORD32 *)ixheaacd_sine_win_256;
   53|  6.51k|          break;
   54|      0|        default:
  ------------------
  |  Branch (54:9): [True: 0, False: 242k]
  ------------------
   55|      0|          if (ec_flag)
  ------------------
  |  Branch (55:15): [True: 0, False: 0]
  ------------------
   56|      0|            *win = (WORD32 *)ixheaacd_sine_win_1024;
   57|      0|          else
   58|      0|            return -1;
   59|      0|          break;
   60|   242k|      }
   61|   242k|      break;
   62|       |
   63|   242k|    case WIN_SEL_1:
  ------------------
  |  |   92|  93.9k|#define WIN_SEL_1 1
  ------------------
  |  Branch (63:5): [True: 93.9k, False: 242k]
  ------------------
   64|  93.9k|      switch (win_sz) {
   65|      0|        case WIN_LEN_120:
  ------------------
  |  |   81|      0|#define WIN_LEN_120 120
  ------------------
  |  Branch (65:9): [True: 0, False: 93.9k]
  ------------------
   66|      0|          *win = (WORD32 *)ixheaacd_kbd_win120;
   67|      0|          break;
   68|  73.1k|        case WIN_LEN_128:
  ------------------
  |  |   77|  73.1k|#define WIN_LEN_128 128
  ------------------
  |  Branch (68:9): [True: 73.1k, False: 20.7k]
  ------------------
   69|  73.1k|          *win = (WORD32 *)ixheaacd_kbd_win128;
   70|  73.1k|          break;
   71|      0|        case WIN_LEN_960:
  ------------------
  |  |   78|      0|#define WIN_LEN_960 960
  ------------------
  |  Branch (71:9): [True: 0, False: 93.9k]
  ------------------
   72|      0|          *win = (WORD32 *)ixheaacd_kbd_win960;
   73|      0|          break;
   74|  19.4k|        case WIN_LEN_1024:
  ------------------
  |  |   73|  19.4k|#define WIN_LEN_1024 1024
  ------------------
  |  Branch (74:9): [True: 19.4k, False: 74.4k]
  ------------------
   75|  19.4k|          *win = (WORD32 *)ixheaacd_kbd_win1024;
   76|  19.4k|          break;
   77|      0|        case WIN_LEN_4:
  ------------------
  |  |   86|      0|#define WIN_LEN_4 4
  ------------------
  |  Branch (77:9): [True: 0, False: 93.9k]
  ------------------
   78|      0|          *win = (WORD32 *)ixheaacd_kbd_win4;
   79|      0|          break;
   80|      0|        case WIN_LEN_16:
  ------------------
  |  |   85|      0|#define WIN_LEN_16 16
  ------------------
  |  Branch (80:9): [True: 0, False: 93.9k]
  ------------------
   81|      0|          *win = (WORD32 *)ixheaacd_kbd_win16;
   82|      0|          break;
   83|      0|        case WIN_LEN_64:
  ------------------
  |  |   83|      0|#define WIN_LEN_64 64
  ------------------
  |  Branch (83:9): [True: 0, False: 93.9k]
  ------------------
   84|      0|          *win = (WORD32 *)ixheaacd_kbd_win_64;
   85|      0|          break;
   86|    248|        case WIN_LEN_768:
  ------------------
  |  |   74|    248|#define WIN_LEN_768 768
  ------------------
  |  Branch (86:9): [True: 248, False: 93.6k]
  ------------------
   87|    248|          *win = (WORD32 *)ixheaacd_kbd_win768;
   88|    248|          break;
   89|      0|        case WIN_LEN_192:
  ------------------
  |  |   76|      0|#define WIN_LEN_192 192
  ------------------
  |  Branch (89:9): [True: 0, False: 93.9k]
  ------------------
   90|      0|          *win = (WORD32 *)ixheaacd_kbd_win192;
   91|      0|          break;
   92|  1.01k|        case WIN_LEN_96:
  ------------------
  |  |   82|  1.01k|#define WIN_LEN_96 96
  ------------------
  |  Branch (92:9): [True: 1.01k, False: 92.8k]
  ------------------
   93|  1.01k|          *win = (WORD32 *)ixheaacd_kbd_win96;
   94|  1.01k|          break;
   95|      0|        case WIN_LEN_48:
  ------------------
  |  |   84|      0|#define WIN_LEN_48 48
  ------------------
  |  Branch (95:9): [True: 0, False: 93.9k]
  ------------------
   96|      0|          *win = (WORD32 *)ixheaacd_kbd_win48;
   97|      0|          break;
   98|      0|        default:
  ------------------
  |  Branch (98:9): [True: 0, False: 93.9k]
  ------------------
   99|      0|          if (ec_flag)
  ------------------
  |  Branch (99:15): [True: 0, False: 0]
  ------------------
  100|      0|            *win = (WORD32 *)ixheaacd_kbd_win1024;
  101|      0|          else
  102|      0|            return -1;
  103|      0|          break;
  104|  93.9k|      }
  105|  93.9k|      break;
  106|       |
  107|  93.9k|    default:
  ------------------
  |  Branch (107:5): [True: 0, False: 336k]
  ------------------
  108|      0|      return -1;
  109|      0|      break;
  110|   336k|  }
  111|   336k|  return 0;
  112|   336k|}

ixheaacd_neg_expo_inc_dec:
  108|  69.3k|WORD16 ixheaacd_neg_expo_inc_dec(WORD16 neg_expo) { return (neg_expo + 2); }
ixheaacd_pretwiddle_compute_dec:
  168|   153k|    WORD32 neg_expo) {
  169|   153k|  WORD32 i;
  170|   153k|  WORD32 tempr, tempi;
  171|   153k|  WORD32 tempr1, tempi1;
  172|   153k|  WORD32 npoints2 = npoints4 * 2;
  173|   153k|  WORD32 *out_ptr1 = out_ptr + (npoints2 << 1) - 1;
  174|   153k|  const WORD16 *cos_sin_ptr = ptr_imdct_tables->cosine_array_2048_256;
  175|       |
  176|   153k|  WORD16 cos = 0, cos1 = 0, sin = 0, sin1 = 0;
  177|   153k|  if (neg_expo < 0) {
  ------------------
  |  Branch (177:7): [True: 59.1k, False: 94.6k]
  ------------------
  178|  59.1k|    neg_expo = -neg_expo;
  179|  59.1k|    if (npoints4 == 256) {
  ------------------
  |  Branch (179:9): [True: 27.3k, False: 31.7k]
  ------------------
  180|  27.3k|      cos = *cos_sin_ptr++;
  181|  27.3k|      sin = *cos_sin_ptr++;
  182|  31.7k|    } else if (npoints4 == 32) {
  ------------------
  |  Branch (182:16): [True: 31.7k, False: 0]
  ------------------
  183|  31.7k|      cos = *cos_sin_ptr++;
  184|  31.7k|      sin = *cos_sin_ptr;
  185|  31.7k|      cos_sin_ptr += 15;
  186|  31.7k|    }
  187|  59.1k|    tempr = *spec_data1++;
  188|  59.1k|    tempi = *spec_data2--;
  189|       |
  190|  59.1k|    *out_ptr =
  191|  59.1k|        ixheaac_mac32x16in32(ixheaac_mult32x16in32(tempr, cos), tempi, sin);
  192|       |
  193|  59.1k|    *out_ptr = ixheaac_shl32(*out_ptr, neg_expo);
  194|  59.1k|    out_ptr++;
  195|       |
  196|  59.1k|    *out_ptr = ixheaac_sub32(ixheaac_mult32x16in32(tempi, cos),
  197|  59.1k|                              ixheaac_mult32x16in32(tempr, sin));
  198|       |
  199|  59.1k|    *out_ptr = ixheaac_shl32(*out_ptr, neg_expo);
  200|  59.1k|    out_ptr++;
  201|       |
  202|  8.02M|    for (i = 0; i < npoints4 - 1; i++) {
  ------------------
  |  Branch (202:17): [True: 7.96M, False: 59.1k]
  ------------------
  203|  7.96M|      if (npoints4 == 256) {
  ------------------
  |  Branch (203:11): [True: 6.98M, False: 983k]
  ------------------
  204|  6.98M|        sin = *cos_sin_ptr++;
  205|  6.98M|        cos = *cos_sin_ptr++;
  206|  6.98M|      } else if (npoints4 == 32) {
  ------------------
  |  Branch (206:18): [True: 983k, False: 0]
  ------------------
  207|   983k|        sin = *cos_sin_ptr++;
  208|   983k|        cos = *cos_sin_ptr;
  209|   983k|        cos_sin_ptr += 15;
  210|   983k|      }
  211|       |
  212|  7.96M|      tempi1 = *spec_data1++;
  213|  7.96M|      tempr = *spec_data1++;
  214|  7.96M|      tempr1 = *spec_data2--;
  215|  7.96M|      tempi = *spec_data2--;
  216|       |
  217|  7.96M|      *out_ptr1 = ixheaac_sub32(ixheaac_mult32x16in32(tempi1, cos),
  218|  7.96M|                                 ixheaac_mult32x16in32(tempr1, sin));
  219|       |
  220|  7.96M|      *out_ptr1 = ixheaac_shl32(*out_ptr1, neg_expo);
  221|  7.96M|      out_ptr1--;
  222|       |
  223|  7.96M|      *out_ptr1 = ixheaac_mac32x16in32(ixheaac_mult32x16in32(tempr1, cos),
  224|  7.96M|                                        tempi1, sin);
  225|  7.96M|      *out_ptr1 = ixheaac_shl32(*out_ptr1, neg_expo);
  226|  7.96M|      out_ptr1--;
  227|       |
  228|  7.96M|      *out_ptr =
  229|  7.96M|          ixheaac_mac32x16in32(ixheaac_mult32x16in32(tempr, sin), tempi, cos);
  230|  7.96M|      *out_ptr = ixheaac_shl32(*out_ptr, neg_expo);
  231|  7.96M|      out_ptr++;
  232|       |
  233|  7.96M|      *out_ptr = ixheaac_sub32(ixheaac_mult32x16in32(tempi, sin),
  234|  7.96M|                                ixheaac_mult32x16in32(tempr, cos));
  235|  7.96M|      *out_ptr = ixheaac_shl32(*out_ptr, neg_expo);
  236|  7.96M|      out_ptr++;
  237|  7.96M|    }
  238|  59.1k|    cos1 = *cos_sin_ptr++;
  239|  59.1k|    sin1 = *cos_sin_ptr;
  240|       |
  241|  59.1k|    tempr1 = *spec_data2;
  242|  59.1k|    tempi1 = *spec_data1;
  243|       |
  244|  59.1k|    *out_ptr1 = ixheaac_sub32(ixheaac_mult32x16in32(tempi1, cos1),
  245|  59.1k|                               ixheaac_mult32x16in32(tempr1, sin1));
  246|  59.1k|    *out_ptr1 = ixheaac_shl32(*out_ptr1, neg_expo);
  247|  59.1k|    out_ptr1--;
  248|       |
  249|  59.1k|    *out_ptr1 = ixheaac_mac32x16in32(ixheaac_mult32x16in32(tempr1, cos1),
  250|  59.1k|                                      tempi1, sin1);
  251|  59.1k|    *out_ptr1 = ixheaac_shl32(*out_ptr1, neg_expo);
  252|  59.1k|    out_ptr1--;
  253|       |
  254|  94.6k|  } else {
  255|  94.6k|    if (npoints4 == 256) {
  ------------------
  |  Branch (255:9): [True: 42.8k, False: 51.8k]
  ------------------
  256|  42.8k|      cos = *cos_sin_ptr++;
  257|  42.8k|      sin = *cos_sin_ptr++;
  258|       |
  259|  51.8k|    } else if (npoints4 == 32) {
  ------------------
  |  Branch (259:16): [True: 51.8k, False: 0]
  ------------------
  260|  51.8k|      cos = *cos_sin_ptr++;
  261|  51.8k|      sin = *cos_sin_ptr;
  262|  51.8k|      cos_sin_ptr += 15;
  263|  51.8k|    }
  264|  94.6k|    tempr = *spec_data1++;
  265|  94.6k|    tempi = *spec_data2--;
  266|       |
  267|  94.6k|    *out_ptr =
  268|  94.6k|        ixheaac_mac32x16in32(ixheaac_mult32x16in32(tempr, cos), tempi, sin);
  269|  94.6k|    *out_ptr = ixheaac_shr32(*out_ptr, neg_expo);
  270|  94.6k|    out_ptr++;
  271|       |
  272|  94.6k|    *out_ptr = ixheaac_sub32(ixheaac_mult32x16in32(tempi, cos),
  273|  94.6k|                              ixheaac_mult32x16in32(tempr, sin));
  274|       |
  275|  94.6k|    *out_ptr = ixheaac_shr32(*out_ptr, neg_expo);
  276|  94.6k|    out_ptr++;
  277|       |
  278|  12.6M|    for (i = 0; i < npoints4 - 1; i++) {
  ------------------
  |  Branch (278:17): [True: 12.5M, False: 94.6k]
  ------------------
  279|  12.5M|      if (npoints4 == 256) {
  ------------------
  |  Branch (279:11): [True: 10.9M, False: 1.60M]
  ------------------
  280|  10.9M|        sin = *cos_sin_ptr++;
  281|  10.9M|        cos = *cos_sin_ptr++;
  282|  10.9M|      } else if (npoints4 == 32) {
  ------------------
  |  Branch (282:18): [True: 1.60M, False: 0]
  ------------------
  283|  1.60M|        sin = *cos_sin_ptr++;
  284|  1.60M|        cos = *cos_sin_ptr;
  285|  1.60M|        cos_sin_ptr += 15;
  286|  1.60M|      }
  287|       |
  288|  12.5M|      tempi1 = *spec_data1++;
  289|  12.5M|      tempr = *spec_data1++;
  290|  12.5M|      tempr1 = *spec_data2--;
  291|  12.5M|      tempi = *spec_data2--;
  292|       |
  293|  12.5M|      *out_ptr1 = ixheaac_sub32(ixheaac_mult32x16in32(tempi1, cos),
  294|  12.5M|                                 ixheaac_mult32x16in32(tempr1, sin));
  295|  12.5M|      *out_ptr1 = ixheaac_shr32(*out_ptr1, neg_expo);
  296|  12.5M|      out_ptr1--;
  297|       |
  298|  12.5M|      *out_ptr1 = ixheaac_mac32x16in32(ixheaac_mult32x16in32(tempr1, cos),
  299|  12.5M|                                        tempi1, sin);
  300|  12.5M|      *out_ptr1 = ixheaac_shr32(*out_ptr1, neg_expo);
  301|  12.5M|      out_ptr1--;
  302|       |
  303|  12.5M|      *out_ptr =
  304|  12.5M|          ixheaac_mac32x16in32(ixheaac_mult32x16in32(tempr, sin), tempi, cos);
  305|  12.5M|      *out_ptr = ixheaac_shr32(*out_ptr, neg_expo);
  306|  12.5M|      out_ptr++;
  307|       |
  308|  12.5M|      *out_ptr = ixheaac_sub32(ixheaac_mult32x16in32(tempi, sin),
  309|  12.5M|                                ixheaac_mult32x16in32(tempr, cos));
  310|  12.5M|      *out_ptr = ixheaac_shr32(*out_ptr, neg_expo);
  311|  12.5M|      out_ptr++;
  312|  12.5M|    }
  313|  94.6k|    cos1 = *cos_sin_ptr++;
  314|  94.6k|    sin1 = *cos_sin_ptr;
  315|       |
  316|  94.6k|    tempr1 = *spec_data2;
  317|  94.6k|    tempi1 = *spec_data1;
  318|       |
  319|  94.6k|    *out_ptr1 = ixheaac_sub32(ixheaac_mult32x16in32(tempi1, cos1),
  320|  94.6k|                               ixheaac_mult32x16in32(tempr1, sin1));
  321|  94.6k|    *out_ptr1 = ixheaac_shr32(*out_ptr1, neg_expo);
  322|  94.6k|    out_ptr1--;
  323|       |
  324|  94.6k|    *out_ptr1 = ixheaac_mac32x16in32(ixheaac_mult32x16in32(tempr1, cos1),
  325|  94.6k|                                      tempi1, sin1);
  326|  94.6k|    *out_ptr1 = ixheaac_shr32(*out_ptr1, neg_expo);
  327|  94.6k|    out_ptr1--;
  328|  94.6k|  }
  329|   153k|}
ixheaacd_post_twiddle_dec:
  333|   114k|                               WORD npoints) {
  334|   114k|  WORD i;
  335|   114k|  WORD16 cos, cos1, sin, sin1;
  336|   114k|  WORD32 *spec_data1 = spec_data + npoints - 1;
  337|   114k|  WORD32 *out_ptr1 = out_ptr + npoints - 1;
  338|   114k|  WORD16 adjust = 50, adjust1 = -50;
  339|   114k|  const WORD16 *cos_sin_ptr = ptr_imdct_tables->cosine_array_2048_256;
  340|       |
  341|   114k|  if (npoints == 1024) {
  ------------------
  |  Branch (341:7): [True: 30.5k, False: 83.5k]
  ------------------
  342|  30.5k|    WORD32 tempr, tempi, outi, outr, temp1, temp2;
  343|  30.5k|    tempr = *spec_data++;
  344|  30.5k|    tempi = *spec_data++;
  345|       |
  346|  30.5k|    cos = *cos_sin_ptr;
  347|  30.5k|    cos_sin_ptr++;
  348|  30.5k|    sin = *cos_sin_ptr;
  349|  30.5k|    cos_sin_ptr++;
  350|       |
  351|  30.5k|    outi = ixheaac_sub32(ixheaac_mult32x16in32(tempr, sin),
  352|  30.5k|                          ixheaac_mult32x16in32(tempi, cos));
  353|  30.5k|    outr =
  354|  30.5k|        ixheaac_mac32x16in32(ixheaac_mult32x16in32(tempr, cos), tempi, sin);
  355|       |
  356|  30.5k|    temp1 = ixheaac_mult32x16in32(outi, adjust1);
  357|  30.5k|    temp2 = ixheaac_mult32x16in32(outr, adjust);
  358|       |
  359|  30.5k|    outr = outr + temp1;
  360|  30.5k|    outi = outi + temp2;
  361|  30.5k|    *out_ptr1-- = outi;
  362|  30.5k|    *out_ptr++ = outr;
  363|       |
  364|  7.82M|    for (i = 0; i < (npoints / 2 - 2); i++) {
  ------------------
  |  Branch (364:17): [True: 7.79M, False: 30.5k]
  ------------------
  365|  7.79M|      sin = *cos_sin_ptr++;
  366|  7.79M|      cos = *cos_sin_ptr++;
  367|       |
  368|  7.79M|      tempi = *spec_data1--;
  369|  7.79M|      tempr = *spec_data1--;
  370|       |
  371|  7.79M|      outi = ixheaac_sub32(ixheaac_mult32x16in32(tempr, sin),
  372|  7.79M|                            ixheaac_mult32x16in32(tempi, cos));
  373|  7.79M|      outr =
  374|  7.79M|          ixheaac_mac32x16in32(ixheaac_mult32x16in32(tempr, cos), tempi, sin);
  375|       |
  376|  7.79M|      temp1 = ixheaac_mult32x16in32(outi, adjust1);
  377|  7.79M|      temp2 = ixheaac_mult32x16in32(outr, adjust);
  378|       |
  379|  7.79M|      outr = outr + temp1;
  380|  7.79M|      outi = outi + temp2;
  381|       |
  382|  7.79M|      *out_ptr++ = outi;
  383|  7.79M|      *out_ptr1-- = outr;
  384|       |
  385|  7.79M|      i++;
  386|  7.79M|      tempr = *spec_data++;
  387|  7.79M|      tempi = *spec_data++;
  388|       |
  389|  7.79M|      outi = ixheaac_sub32(ixheaac_mult32x16in32(tempr, cos),
  390|  7.79M|                            ixheaac_mult32x16in32(tempi, sin));
  391|  7.79M|      outr =
  392|  7.79M|          ixheaac_mac32x16in32(ixheaac_mult32x16in32(tempr, sin), tempi, cos);
  393|       |
  394|  7.79M|      temp1 = ixheaac_mult32x16in32(outi, adjust1);
  395|  7.79M|      temp2 = ixheaac_mult32x16in32(outr, adjust);
  396|       |
  397|  7.79M|      outr = outr + temp1;
  398|  7.79M|      outi = outi + temp2;
  399|       |
  400|  7.79M|      *out_ptr1-- = outi;
  401|  7.79M|      *out_ptr++ = outr;
  402|  7.79M|    }
  403|  30.5k|    cos1 = *cos_sin_ptr++;
  404|  30.5k|    sin1 = *cos_sin_ptr;
  405|       |
  406|  30.5k|    tempi = *spec_data1--;
  407|  30.5k|    tempr = *spec_data1--;
  408|       |
  409|  30.5k|    outi = ixheaac_sub32(ixheaac_mult32x16in32(tempr, sin1),
  410|  30.5k|                          ixheaac_mult32x16in32(tempi, cos1));
  411|  30.5k|    outr =
  412|  30.5k|        ixheaac_mac32x16in32(ixheaac_mult32x16in32(tempr, cos1), tempi, sin1);
  413|       |
  414|  30.5k|    temp1 = ixheaac_mult32x16in32(outi, adjust1);
  415|  30.5k|    temp2 = ixheaac_mult32x16in32(outr, adjust);
  416|       |
  417|  30.5k|    outr = outr + temp1;
  418|  30.5k|    outi = outi + temp2;
  419|       |
  420|  30.5k|    *out_ptr++ = outi;
  421|  30.5k|    *out_ptr1-- = outr;
  422|  83.5k|  } else if (npoints == 128) {
  ------------------
  |  Branch (422:14): [True: 83.5k, False: 0]
  ------------------
  423|  83.5k|    WORD32 tempr, tempi, outi, outr, temp1, temp2;
  424|  83.5k|    tempr = *spec_data++;
  425|  83.5k|    tempi = *spec_data++;
  426|       |
  427|  83.5k|    cos = *cos_sin_ptr++;
  428|  83.5k|    sin = *cos_sin_ptr;
  429|  83.5k|    cos_sin_ptr += 15;
  430|       |
  431|  83.5k|    outi = ixheaac_sub32(ixheaac_mult32x16in32(tempr, sin),
  432|  83.5k|                          ixheaac_mult32x16in32(tempi, cos));
  433|  83.5k|    outr =
  434|  83.5k|        ixheaac_mac32x16in32(ixheaac_mult32x16in32(tempr, cos), tempi, sin);
  435|       |
  436|  83.5k|    temp1 = ixheaac_mult32x16in32(outi, -(201 << 1));
  437|  83.5k|    temp2 = ixheaac_mult32x16in32(outr, 201 << 1);
  438|       |
  439|  83.5k|    outr = outr + temp1;
  440|  83.5k|    outi = outi + temp2;
  441|  83.5k|    *out_ptr1-- = outi;
  442|  83.5k|    *out_ptr++ = outr;
  443|       |
  444|  2.67M|    for (i = 0; i < (npoints / 2 - 2); i++) {
  ------------------
  |  Branch (444:17): [True: 2.58M, False: 83.5k]
  ------------------
  445|  2.58M|      sin = *cos_sin_ptr++;
  446|  2.58M|      cos = *cos_sin_ptr;
  447|  2.58M|      cos_sin_ptr += 15;
  448|       |
  449|  2.58M|      tempi = *spec_data1--;
  450|  2.58M|      tempr = *spec_data1--;
  451|       |
  452|  2.58M|      outi = ixheaac_sub32(ixheaac_mult32x16in32(tempr, sin),
  453|  2.58M|                            ixheaac_mult32x16in32(tempi, cos));
  454|  2.58M|      outr =
  455|  2.58M|          ixheaac_mac32x16in32(ixheaac_mult32x16in32(tempr, cos), tempi, sin);
  456|       |
  457|  2.58M|      temp1 = ixheaac_mult32x16in32(outi, -(201 << 1));
  458|  2.58M|      temp2 = ixheaac_mult32x16in32(outr, 201 << 1);
  459|       |
  460|  2.58M|      outr = outr + temp1;
  461|  2.58M|      outi = outi + temp2;
  462|       |
  463|  2.58M|      *out_ptr++ = outi;
  464|  2.58M|      *out_ptr1-- = outr;
  465|       |
  466|  2.58M|      i++;
  467|  2.58M|      tempr = *spec_data++;
  468|  2.58M|      tempi = *spec_data++;
  469|       |
  470|  2.58M|      outi = ixheaac_sub32(ixheaac_mult32x16in32(tempr, cos),
  471|  2.58M|                            ixheaac_mult32x16in32(tempi, sin));
  472|  2.58M|      outr =
  473|  2.58M|          ixheaac_mac32x16in32(ixheaac_mult32x16in32(tempr, sin), tempi, cos);
  474|       |
  475|  2.58M|      temp1 = ixheaac_mult32x16in32(outi, -(201 << 1));
  476|  2.58M|      temp2 = ixheaac_mult32x16in32(outr, 201 << 1);
  477|       |
  478|  2.58M|      outr = outr + temp1;
  479|  2.58M|      outi = outi + temp2;
  480|       |
  481|  2.58M|      *out_ptr1-- = outi;
  482|  2.58M|      *out_ptr++ = outr;
  483|  2.58M|    }
  484|  83.5k|    cos1 = *cos_sin_ptr++;
  485|  83.5k|    sin1 = *cos_sin_ptr;
  486|       |
  487|  83.5k|    tempi = *spec_data1--;
  488|  83.5k|    tempr = *spec_data1--;
  489|       |
  490|  83.5k|    outi = ixheaac_sub32(ixheaac_mult32x16in32(tempr, sin1),
  491|  83.5k|                          ixheaac_mult32x16in32(tempi, cos1));
  492|  83.5k|    outr =
  493|  83.5k|        ixheaac_mac32x16in32(ixheaac_mult32x16in32(tempr, cos1), tempi, sin1);
  494|       |
  495|  83.5k|    temp1 = ixheaac_mult32x16in32(outi, -(201 << 1));
  496|  83.5k|    temp2 = ixheaac_mult32x16in32(outr, 201 << 1);
  497|       |
  498|  83.5k|    outr = outr + temp1;
  499|  83.5k|    outi = outi + temp2;
  500|       |
  501|  83.5k|    *out_ptr++ = outi;
  502|  83.5k|    *out_ptr1-- = outr;
  503|  83.5k|  }
  504|   114k|}
ixheaacd_post_twid_overlap_add_dec:
  510|  39.7k|    WORD16 ch_fac) {
  511|  39.7k|  WORD i;
  512|  39.7k|  WORD16 cos, cos1, sin, sin1;
  513|  39.7k|  WORD32 size = npoints / 2;
  514|  39.7k|  WORD32 *pcmout1 = pcm_out + (ch_fac * size);
  515|  39.7k|  const WORD16 *cos_sin_ptr = ptr_imdct_tables->cosine_array_2048_256;
  516|       |
  517|  39.7k|  pcm_out = pcmout1 - ch_fac;
  518|  39.7k|  spec_data += size;
  519|       |
  520|  39.7k|  if (q_shift > 0) {
  ------------------
  |  Branch (520:7): [True: 19.3k, False: 20.3k]
  ------------------
  521|  19.3k|    WORD32 tempr, tempi, outr, outi, win1, accu, temp1, temp2;
  522|  19.3k|    WORD16 adjust, adjust1;
  523|  19.3k|    WORD32 overlap_data;
  524|       |
  525|  19.3k|    tempr = *(spec_data - size);
  526|  19.3k|    tempi = *(spec_data - size + 1);
  527|  19.3k|    adjust = 50;
  528|  19.3k|    adjust1 = -50;
  529|  19.3k|    cos = *cos_sin_ptr++;
  530|  19.3k|    sin = *cos_sin_ptr++;
  531|  19.3k|    outi = ixheaac_sub32(ixheaac_mult32x16in32(tempr, sin),
  532|  19.3k|                          ixheaac_mult32x16in32(tempi, cos));
  533|  19.3k|    outr = ixheaac_add32(ixheaac_mult32x16in32(tempr, cos),
  534|  19.3k|                          ixheaac_mult32x16in32(tempi, sin));
  535|       |
  536|  19.3k|    overlap_data = *ptr_overlap_buf;
  537|       |
  538|  19.3k|    temp1 = ixheaac_mult32x16in32(outi, adjust1);
  539|  19.3k|    temp2 = ixheaac_mult32x16in32(outr, adjust);
  540|       |
  541|  19.3k|    outr = outr + temp1;
  542|  19.3k|    outi = outi + temp2;
  543|       |
  544|  19.3k|    *ptr_overlap_buf++ = ixheaac_shr32_sat(outr, 16 - q_shift);
  545|       |
  546|  19.3k|    win1 = *((WORD32 *)window + size - 1);
  547|  19.3k|    accu = ixheaac_sub32_sat(
  548|  19.3k|        ixheaac_shl32_sat(ixheaacd_mult32x16lin32(outi, win1), q_shift),
  549|  19.3k|        ixheaacd_mult32x16lin32_sat(overlap_data, (WORD16)(win1 >> 16)));
  550|       |
  551|  19.3k|    *pcm_out = accu;
  552|       |
  553|  19.3k|    pcm_out -= ch_fac;
  554|  19.3k|    accu = ixheaac_sub32_sat(
  555|  19.3k|        ixheaac_shl32_sat(
  556|  19.3k|            ixheaac_mult32x16hin32(ixheaac_negate32_sat(outi), win1),
  557|  19.3k|            q_shift),
  558|  19.3k|        ixheaacd_mult32x16lin32_sat(overlap_data, (WORD16)(win1)));
  559|       |
  560|  19.3k|    *pcmout1 = accu;
  561|       |
  562|  19.3k|    pcmout1 += ch_fac;
  563|       |
  564|  4.96M|    for (i = size - 2; i != 0;) {
  ------------------
  |  Branch (564:24): [True: 4.94M, False: 19.3k]
  ------------------
  565|  4.94M|      sin = *cos_sin_ptr++;
  566|  4.94M|      cos = *cos_sin_ptr++;
  567|       |
  568|  4.94M|      tempr = *(spec_data + i);
  569|  4.94M|      tempi = *(spec_data + i + 1);
  570|       |
  571|  4.94M|      outr = ixheaac_add32(ixheaac_mult32x16in32(tempr, cos),
  572|  4.94M|                            ixheaac_mult32x16in32(tempi, sin));
  573|  4.94M|      outi = ixheaac_sub32(ixheaac_mult32x16in32(tempr, sin),
  574|  4.94M|                            ixheaac_mult32x16in32(tempi, cos));
  575|       |
  576|  4.94M|      temp1 = ixheaac_mult32x16in32(outi, adjust1);
  577|  4.94M|      temp2 = ixheaac_mult32x16in32(outr, adjust);
  578|       |
  579|  4.94M|      outr = outr + temp1;
  580|  4.94M|      outi = outi + temp2;
  581|       |
  582|  4.94M|      overlap_data = *ptr_overlap_buf;
  583|       |
  584|  4.94M|      *ptr_overlap_buf++ = ixheaac_shr32_sat(outi, 16 - q_shift);
  585|       |
  586|  4.94M|      win1 = *((WORD32 *)window + i);
  587|  4.94M|      accu = ixheaac_sub32_sat(
  588|  4.94M|          ixheaac_shl32_sat(ixheaacd_mult32x16lin32(outr, win1), q_shift),
  589|  4.94M|          ixheaacd_mult32x16lin32_sat(overlap_data, (WORD16)(win1 >> 16)));
  590|       |
  591|  4.94M|      *pcm_out = accu;
  592|  4.94M|      pcm_out -= ch_fac;
  593|  4.94M|      accu = ixheaac_sub32_sat(
  594|  4.94M|          ixheaac_shl32_sat(
  595|  4.94M|              ixheaac_mult32x16hin32(ixheaac_negate32_sat(outr), win1),
  596|  4.94M|              q_shift),
  597|  4.94M|          ixheaacd_mult32x16lin32_sat(overlap_data, (WORD16)win1));
  598|       |
  599|  4.94M|      *pcmout1 = accu;
  600|  4.94M|      pcmout1 += ch_fac;
  601|       |
  602|  4.94M|      tempr = *(spec_data - i);
  603|  4.94M|      tempi = *(spec_data - i + 1);
  604|       |
  605|  4.94M|      i -= 2;
  606|       |
  607|  4.94M|      outi = ixheaac_sub32(ixheaac_mult32x16in32(tempr, cos),
  608|  4.94M|                            ixheaac_mult32x16in32(tempi, sin));
  609|  4.94M|      outr = ixheaac_add32(ixheaac_mult32x16in32(tempr, sin),
  610|  4.94M|                            ixheaac_mult32x16in32(tempi, cos));
  611|       |
  612|  4.94M|      overlap_data = *ptr_overlap_buf;
  613|       |
  614|  4.94M|      temp1 = ixheaac_mult32x16in32(outi, adjust1);
  615|       |
  616|  4.94M|      temp2 = ixheaac_mult32x16in32(outr, adjust);
  617|       |
  618|  4.94M|      outr = outr + temp1;
  619|  4.94M|      outi = outi + temp2;
  620|       |
  621|  4.94M|      *ptr_overlap_buf++ = ixheaac_shr32_sat(outr, 16 - q_shift);
  622|       |
  623|  4.94M|      win1 = *((WORD32 *)window + i + 1);
  624|  4.94M|      accu = ixheaac_sub32_sat(
  625|  4.94M|          ixheaac_shl32_sat(ixheaacd_mult32x16lin32(outi, win1), q_shift),
  626|  4.94M|          ixheaacd_mult32x16lin32_sat(overlap_data, (WORD16)(win1 >> 16)));
  627|       |
  628|  4.94M|      *pcm_out = accu;
  629|  4.94M|      pcm_out -= ch_fac;
  630|  4.94M|      accu = ixheaac_sub32_sat(
  631|  4.94M|          ixheaac_shl32_sat(
  632|  4.94M|              ixheaac_mult32x16hin32(ixheaac_negate32_sat(outi), win1),
  633|  4.94M|              q_shift),
  634|  4.94M|          ixheaacd_mult32x16lin32_sat(overlap_data, (WORD16)(win1)));
  635|  4.94M|      *pcmout1 = accu;
  636|  4.94M|      pcmout1 += ch_fac;
  637|  4.94M|    }
  638|  19.3k|    cos1 = *cos_sin_ptr++;
  639|  19.3k|    sin1 = *cos_sin_ptr;
  640|       |
  641|  19.3k|    tempr = *(spec_data + i);
  642|  19.3k|    tempi = *(spec_data + i + 1);
  643|       |
  644|  19.3k|    outr = ixheaac_add32(ixheaac_mult32x16in32(tempr, cos1),
  645|  19.3k|                          ixheaac_mult32x16in32(tempi, sin1));
  646|  19.3k|    outi = ixheaac_sub32(ixheaac_mult32x16in32(tempr, sin1),
  647|  19.3k|                          ixheaac_mult32x16in32(tempi, cos1));
  648|       |
  649|  19.3k|    temp1 = ixheaac_mult32x16in32(outi, adjust1);
  650|       |
  651|  19.3k|    temp2 = ixheaac_mult32x16in32(outr, adjust);
  652|       |
  653|  19.3k|    outr = outr + temp1;
  654|  19.3k|    outi = outi + temp2;
  655|       |
  656|  19.3k|    overlap_data = *ptr_overlap_buf;
  657|       |
  658|  19.3k|    *ptr_overlap_buf++ = ixheaac_shr32_sat(outi, 16 - q_shift);
  659|  19.3k|    win1 = *((WORD32 *)window + i);
  660|  19.3k|    accu = ixheaac_sub32_sat(
  661|  19.3k|        ixheaac_shl32_sat(ixheaacd_mult32x16lin32(outr, win1), q_shift),
  662|  19.3k|        ixheaacd_mult32x16lin32_sat(overlap_data, (WORD16)(win1 >> 16)));
  663|       |
  664|  19.3k|    *pcm_out = accu;
  665|  19.3k|    pcm_out -= ch_fac;
  666|  19.3k|    accu = ixheaac_sub32_sat(
  667|  19.3k|        ixheaac_shl32_sat(
  668|  19.3k|            ixheaac_mult32x16hin32(ixheaac_negate32_sat(outr), win1),
  669|  19.3k|            q_shift),
  670|  19.3k|        ixheaacd_mult32x16lin32_sat(overlap_data, (WORD16)win1));
  671|       |
  672|  19.3k|    *pcmout1 = accu;
  673|  19.3k|    pcmout1 += ch_fac;
  674|  20.3k|  } else {
  675|  20.3k|    q_shift = -q_shift;
  676|  20.3k|    {
  677|  20.3k|      WORD32 tempr, tempi, temp1, temp2, outr, outi, win1, accu;
  678|  20.3k|      WORD16 adjust, adjust1;
  679|  20.3k|      WORD16 overlap_data;
  680|  20.3k|      tempr = *(spec_data - size);
  681|  20.3k|      tempi = *(spec_data - size + 1);
  682|       |
  683|  20.3k|      adjust = 50;
  684|  20.3k|      adjust1 = -50;
  685|  20.3k|      cos = *cos_sin_ptr++;
  686|  20.3k|      sin = *cos_sin_ptr++;
  687|       |
  688|  20.3k|      outi = ixheaac_sub32(ixheaac_mult32x16in32(tempr, sin),
  689|  20.3k|                            ixheaac_mult32x16in32(tempi, cos));
  690|  20.3k|      outr = ixheaac_add32(ixheaac_mult32x16in32(tempr, cos),
  691|  20.3k|                            ixheaac_mult32x16in32(tempi, sin));
  692|       |
  693|  20.3k|      overlap_data = *ptr_overlap_buf;
  694|       |
  695|  20.3k|      temp1 = ixheaac_mult32x16in32(outi, adjust1);
  696|  20.3k|      temp2 = ixheaac_mult32x16in32(outr, adjust);
  697|       |
  698|  20.3k|      outr = outr + temp1;
  699|  20.3k|      outi = outi + temp2;
  700|       |
  701|  20.3k|      *ptr_overlap_buf++ = ixheaac_shr32_sat(outr, 16 + q_shift);
  702|       |
  703|  20.3k|      win1 = *((WORD32 *)window + size - 1);
  704|  20.3k|      accu = ixheaac_sub32_sat(
  705|  20.3k|          ixheaac_shr32(ixheaacd_mult32x16lin32(outi, win1), q_shift),
  706|  20.3k|          ixheaacd_mult32x16lin32_sat(overlap_data, (WORD16)(win1 >> 16)));
  707|       |
  708|  20.3k|      *pcm_out = accu;
  709|       |
  710|  20.3k|      pcm_out -= ch_fac;
  711|  20.3k|      accu = ixheaac_sub32_sat(
  712|  20.3k|          ixheaac_shr32(
  713|  20.3k|              ixheaac_mult32x16hin32(ixheaac_negate32_sat(outi), win1),
  714|  20.3k|              q_shift),
  715|  20.3k|          ixheaacd_mult32x16lin32_sat(overlap_data, (WORD16)(win1)));
  716|       |
  717|  20.3k|      *pcmout1 = accu;
  718|  20.3k|      pcmout1 += ch_fac;
  719|       |
  720|  5.20M|      for (i = size - 2; i != 0;) {
  ------------------
  |  Branch (720:26): [True: 5.18M, False: 20.3k]
  ------------------
  721|  5.18M|        sin = *cos_sin_ptr++;
  722|  5.18M|        cos = *cos_sin_ptr++;
  723|       |
  724|  5.18M|        tempr = *(spec_data + i);
  725|  5.18M|        tempi = *(spec_data + i + 1);
  726|       |
  727|  5.18M|        outr = ixheaac_add32(ixheaac_mult32x16in32(tempr, cos),
  728|  5.18M|                              ixheaac_mult32x16in32(tempi, sin));
  729|  5.18M|        outi = ixheaac_sub32(ixheaac_mult32x16in32(tempr, sin),
  730|  5.18M|                              ixheaac_mult32x16in32(tempi, cos));
  731|       |
  732|  5.18M|        overlap_data = *ptr_overlap_buf;
  733|       |
  734|  5.18M|        temp1 = ixheaac_mult32x16in32(outi, adjust1);
  735|       |
  736|  5.18M|        temp2 = ixheaac_mult32x16in32(outr, adjust);
  737|  5.18M|        outr = outr + temp1;
  738|  5.18M|        outi = outi + temp2;
  739|  5.18M|        *ptr_overlap_buf++ = ixheaac_shr32_sat(outi, 16 + q_shift);
  740|       |
  741|  5.18M|        win1 = *((WORD32 *)window + i);
  742|  5.18M|        accu = ixheaac_sub32_sat(
  743|  5.18M|            ixheaac_shr32(ixheaacd_mult32x16lin32(outr, win1), q_shift),
  744|  5.18M|            ixheaacd_mult32x16lin32_sat(overlap_data, (WORD16)(win1 >> 16)));
  745|       |
  746|  5.18M|        *pcm_out = accu;
  747|  5.18M|        pcm_out -= ch_fac;
  748|       |
  749|  5.18M|        accu = ixheaac_sub32_sat(
  750|  5.18M|            ixheaac_shr32(
  751|  5.18M|                ixheaac_mult32x16hin32(ixheaac_negate32_sat(outr), win1),
  752|  5.18M|                q_shift),
  753|  5.18M|            ixheaacd_mult32x16lin32_sat(overlap_data, (WORD16)win1));
  754|       |
  755|  5.18M|        *pcmout1 = accu;
  756|  5.18M|        pcmout1 += ch_fac;
  757|       |
  758|  5.18M|        tempr = *(spec_data - i);
  759|  5.18M|        tempi = *(spec_data - i + 1);
  760|  5.18M|        i -= 2;
  761|       |
  762|  5.18M|        outi = ixheaac_sub32(ixheaac_mult32x16in32(tempr, cos),
  763|  5.18M|                              ixheaac_mult32x16in32(tempi, sin));
  764|  5.18M|        outr = ixheaac_add32(ixheaac_mult32x16in32(tempr, sin),
  765|  5.18M|                              ixheaac_mult32x16in32(tempi, cos));
  766|       |
  767|  5.18M|        overlap_data = *ptr_overlap_buf;
  768|       |
  769|  5.18M|        temp1 = ixheaac_mult32x16in32(outi, adjust1);
  770|  5.18M|        temp2 = ixheaac_mult32x16in32(outr, adjust);
  771|       |
  772|  5.18M|        outr = outr + temp1;
  773|  5.18M|        outi = outi + temp2;
  774|       |
  775|  5.18M|        *ptr_overlap_buf++ = ixheaac_shr32_sat(outr, 16 + q_shift);
  776|       |
  777|  5.18M|        win1 = *((WORD32 *)window + i + 1);
  778|  5.18M|        accu = ixheaac_sub32_sat(
  779|  5.18M|            ixheaac_shr32(ixheaacd_mult32x16lin32(outi, win1), q_shift),
  780|  5.18M|            ixheaacd_mult32x16lin32_sat(overlap_data, (WORD16)(win1 >> 16)));
  781|       |
  782|  5.18M|        *pcm_out = accu;
  783|  5.18M|        pcm_out -= ch_fac;
  784|       |
  785|  5.18M|        accu = ixheaac_sub32_sat(
  786|  5.18M|            ixheaac_shr32(
  787|  5.18M|                ixheaac_mult32x16hin32(ixheaac_negate32_sat(outi), win1),
  788|  5.18M|                q_shift),
  789|  5.18M|            ixheaacd_mult32x16lin32_sat(overlap_data, (WORD16)(win1)));
  790|       |
  791|  5.18M|        *pcmout1 = accu;
  792|  5.18M|        pcmout1 += ch_fac;
  793|  5.18M|      }
  794|  20.3k|      cos1 = *cos_sin_ptr++;
  795|  20.3k|      sin1 = *cos_sin_ptr++;
  796|       |
  797|  20.3k|      tempr = *(spec_data + i);
  798|  20.3k|      tempi = *(spec_data + i + 1);
  799|       |
  800|  20.3k|      outr = ixheaac_add32(ixheaac_mult32x16in32(tempr, cos1),
  801|  20.3k|                            ixheaac_mult32x16in32(tempi, sin1));
  802|  20.3k|      outi = ixheaac_sub32(ixheaac_mult32x16in32(tempr, sin1),
  803|  20.3k|                            ixheaac_mult32x16in32(tempi, cos1));
  804|       |
  805|  20.3k|      overlap_data = *ptr_overlap_buf;
  806|       |
  807|  20.3k|      temp1 = ixheaac_mult32x16in32(outi, adjust1);
  808|       |
  809|  20.3k|      temp2 = ixheaac_mult32x16in32(outr, adjust);
  810|       |
  811|  20.3k|      outr = outr + temp1;
  812|  20.3k|      outi = outi + temp2;
  813|       |
  814|  20.3k|      *ptr_overlap_buf++ = ixheaac_shr32_sat(outi, 16 + q_shift);
  815|       |
  816|  20.3k|      win1 = *((WORD32 *)window + i);
  817|  20.3k|      accu = ixheaac_sub32_sat(
  818|  20.3k|          ixheaac_shr32(ixheaacd_mult32x16lin32(outr, win1), q_shift),
  819|  20.3k|          ixheaacd_mult32x16lin32_sat(overlap_data, (WORD16)(win1 >> 16)));
  820|       |
  821|  20.3k|      *pcm_out = accu;
  822|  20.3k|      pcm_out -= ch_fac;
  823|  20.3k|      accu = ixheaac_sub32_sat(
  824|  20.3k|          ixheaac_shr32(
  825|  20.3k|              ixheaac_mult32x16hin32(ixheaac_negate32_sat(outr), win1),
  826|  20.3k|              q_shift),
  827|  20.3k|          ixheaacd_mult32x16lin32_sat(overlap_data, (WORD16)win1));
  828|  20.3k|      *pcmout1 = accu;
  829|  20.3k|      pcmout1 += ch_fac;
  830|  20.3k|    }
  831|  20.3k|  }
  832|  39.7k|}
ixheaacd_imdct_using_fft_dec:
  838|   153k|{
  839|   153k|  WORD32 i, j, k, k1, n_stages;
  840|   153k|  WORD32 x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i, x4r, x4i, x5r, x5i, x6r, x6i,
  841|   153k|      x7r, x7i;
  842|   153k|  WORD32 del, nodespacing, in_loop_cnt, tmp, twiddle_val, *ptr_tmp;
  843|   153k|  const WORD32 *ptr_twiddle;
  844|   153k|  WORD8 *ptr_dig_rev_table;
  845|   153k|  n_stages = ixheaac_norm32(npoints);
  846|       |
  847|   153k|  n_stages = (30 - n_stages) / 3;
  848|       |
  849|   153k|  ptr_tmp = ptr_y;
  850|       |
  851|   153k|  ptr_twiddle = ptr_imdct_tables->fft_twiddle;
  852|   153k|  ptr_dig_rev_table = ((npoints << 1) == 1024)
  ------------------
  |  Branch (852:23): [True: 70.2k, False: 83.5k]
  ------------------
  853|   153k|                          ? ptr_imdct_tables->dig_rev_table8_long
  854|   153k|                          : ptr_imdct_tables->dig_rev_table8_short;
  855|       |
  856|  5.31M|  for (i = npoints; i != 0; i -= 8) {
  ------------------
  |  Branch (856:21): [True: 5.16M, False: 153k]
  ------------------
  857|  5.16M|    WORD32 *data = ptr_x;
  858|  5.16M|    data = data + (*ptr_dig_rev_table++ << 1);
  859|       |
  860|  5.16M|    x0r = *data;
  861|  5.16M|    x0i = *(data + 1);
  862|  5.16M|    data += (npoints >> 1);
  863|       |
  864|  5.16M|    x2r = *data;
  865|  5.16M|    x2i = *(data + 1);
  866|  5.16M|    data += (npoints >> 1);
  867|       |
  868|  5.16M|    x4r = *data;
  869|  5.16M|    x4i = *(data + 1);
  870|  5.16M|    data += (npoints >> 1);
  871|       |
  872|  5.16M|    x6r = *data;
  873|  5.16M|    x6i = *(data + 1);
  874|  5.16M|    data -= 5 * (npoints >> 2);
  875|       |
  876|  5.16M|    x0r = x0r + x4r;
  877|  5.16M|    x0i = x0i + x4i;
  878|  5.16M|    x4r = x0r - (x4r << 1);
  879|  5.16M|    x4i = x0i - (x4i << 1);
  880|       |
  881|  5.16M|    x2r = x2r + x6r;
  882|  5.16M|    x2i = x2i + x6i;
  883|  5.16M|    x6r = x2r - (x6r << 1);
  884|  5.16M|    x6i = x2i - (x6i << 1);
  885|       |
  886|  5.16M|    x0r = x0r + x2r;
  887|  5.16M|    x0i = x0i + x2i;
  888|  5.16M|    x2r = x0r - (x2r << 1);
  889|  5.16M|    x2i = x0i - (x2i << 1);
  890|       |
  891|  5.16M|    x4r = x4r + x6i;
  892|  5.16M|    x4i = x4i - x6r;
  893|  5.16M|    tmp = x6r;
  894|  5.16M|    x6r = x4r - (x6i << 1);
  895|  5.16M|    x6i = x4i + (tmp << 1);
  896|       |
  897|  5.16M|    x1r = *data;
  898|  5.16M|    x1i = *(data + 1);
  899|  5.16M|    data += (npoints >> 1);
  900|       |
  901|  5.16M|    x3r = *data;
  902|  5.16M|    x3i = *(data + 1);
  903|  5.16M|    data += (npoints >> 1);
  904|       |
  905|  5.16M|    x5r = *data;
  906|  5.16M|    x5i = *(data + 1);
  907|  5.16M|    data += (npoints >> 1);
  908|       |
  909|  5.16M|    x7r = *data;
  910|  5.16M|    x7i = *(data + 1);
  911|  5.16M|    data -= 7 * (npoints >> 2);
  912|       |
  913|  5.16M|    x1r = x1r + x5r;
  914|  5.16M|    x1i = x1i + x5i;
  915|  5.16M|    x5r = x1r - (x5r << 1);
  916|  5.16M|    x5i = x1i - (x5i << 1);
  917|       |
  918|  5.16M|    x3r = x3r + x7r;
  919|  5.16M|    x3i = x3i + x7i;
  920|  5.16M|    x7r = x3r - (x7r << 1);
  921|  5.16M|    x7i = x3i - (x7i << 1);
  922|       |
  923|  5.16M|    x1r = x1r + x3r;
  924|  5.16M|    x1i = x1i + x3i;
  925|  5.16M|    x3r = x1r - (x3r << 1);
  926|  5.16M|    x3i = x1i - (x3i << 1);
  927|       |
  928|  5.16M|    x5r = x5r + x5i;
  929|  5.16M|    x5i = x5r - (x5i << 1);
  930|       |
  931|  5.16M|    x7r = x7r + x7i;
  932|  5.16M|    x7i = x7r - (x7i << 1);
  933|       |
  934|  5.16M|    x7i = x5r - x7i;
  935|  5.16M|    x5r = x7i - (x5r << 1);
  936|       |
  937|  5.16M|    x5i = x7r - x5i;
  938|  5.16M|    x7r = x5i - (x7r << 1);
  939|       |
  940|  5.16M|    x7i = x7i << 1;
  941|  5.16M|    x5r = x5r << 1;
  942|  5.16M|    x5i = x5i << 1;
  943|  5.16M|    x7r = x7r << 1;
  944|       |
  945|  5.16M|    x0r = x0r + x1r;
  946|  5.16M|    x0i = x0i + x1i;
  947|  5.16M|    x1r = x0r - (x1r << 1);
  948|  5.16M|    x1i = x0i - (x1i << 1);
  949|       |
  950|  5.16M|    x2r = x2r + x3i;
  951|  5.16M|    tmp = x2r - (x3i << 1);
  952|  5.16M|    x2i = x2i - x3r;
  953|  5.16M|    x3i = x2i + (x3r << 1);
  954|       |
  955|  5.16M|    *ptr_tmp = x0r;
  956|  5.16M|    *(ptr_tmp + 1) = x0i;
  957|  5.16M|    ptr_tmp += 4;
  958|       |
  959|  5.16M|    *ptr_tmp = x2r;
  960|  5.16M|    *(ptr_tmp + 1) = x2i;
  961|  5.16M|    ptr_tmp += 4;
  962|       |
  963|  5.16M|    *ptr_tmp = x1r;
  964|  5.16M|    *(ptr_tmp + 1) = x1i;
  965|  5.16M|    ptr_tmp += 4;
  966|       |
  967|  5.16M|    *ptr_tmp = tmp;
  968|  5.16M|    *(ptr_tmp + 1) = x3i;
  969|  5.16M|    ptr_tmp -= 10;
  970|       |
  971|  5.16M|    tmp = 0x5A82;
  972|       |
  973|  5.16M|    x7i = x4r + (ixheaacd_mult32x16lin32(x7i, tmp));
  974|  5.16M|    x4r = x7i - (x4r << 1);
  975|       |
  976|  5.16M|    x7r = x4i + (ixheaacd_mult32x16lin32(x7r, tmp));
  977|  5.16M|    x4i = x7r - (x4i << 1);
  978|       |
  979|  5.16M|    x5i = x6r + (ixheaacd_mult32x16lin32(x5i, tmp));
  980|  5.16M|    x6r = x5i - (x6r << 1);
  981|       |
  982|  5.16M|    x5r = x6i + (ixheaacd_mult32x16lin32(x5r, tmp));
  983|  5.16M|    x6i = x5r - (x6i << 1);
  984|       |
  985|  5.16M|    *ptr_tmp = x7i;
  986|  5.16M|    *(ptr_tmp + 1) = x7r;
  987|  5.16M|    ptr_tmp += 4;
  988|       |
  989|  5.16M|    *ptr_tmp = x5i;
  990|  5.16M|    *(ptr_tmp + 1) = x5r;
  991|  5.16M|    ptr_tmp += 4;
  992|       |
  993|  5.16M|    *ptr_tmp = -x4r;
  994|  5.16M|    *(ptr_tmp + 1) = -x4i;
  995|  5.16M|    ptr_tmp += 4;
  996|       |
  997|  5.16M|    *ptr_tmp = -x6r;
  998|  5.16M|    *(ptr_tmp + 1) = -x6i;
  999|  5.16M|    ptr_tmp += 2;
 1000|  5.16M|  }
 1001|       |
 1002|   153k|  del = 8;
 1003|       |
 1004|   153k|  nodespacing = 64;
 1005|   153k|  in_loop_cnt = npoints >> 6;
 1006|       |
 1007|   224k|  for (k1 = n_stages - 2; k1 > 0; k1--) {
  ------------------
  |  Branch (1007:27): [True: 70.2k, False: 153k]
  ------------------
 1008|  70.2k|    WORD32 *data = ptr_y;
 1009|  70.2k|    const WORD32 *twiddles;
 1010|       |
 1011|   632k|    for (i = 0; i != npoints; i += 8 * del) {
  ------------------
  |  Branch (1011:17): [True: 562k, False: 70.2k]
  ------------------
 1012|   562k|      data = ptr_y + (i << 1);
 1013|   562k|      x0r = *data;
 1014|   562k|      x0i = *(data + 1);
 1015|   562k|      data += (del << 2);
 1016|       |
 1017|   562k|      x2r = *data;
 1018|   562k|      x2i = *(data + 1);
 1019|   562k|      data += (del << 2);
 1020|       |
 1021|   562k|      x4r = *data;
 1022|   562k|      x4i = *(data + 1);
 1023|   562k|      data += (del << 2);
 1024|       |
 1025|   562k|      x6r = *data;
 1026|   562k|      x6i = *(data + 1);
 1027|   562k|      data -= 5 * (del << 1);
 1028|       |
 1029|   562k|      x0r = x0r + x4r;
 1030|   562k|      x0i = x0i + x4i;
 1031|   562k|      x4r = x0r - (x4r << 1);
 1032|   562k|      x4i = x0i - (x4i << 1);
 1033|       |
 1034|   562k|      x2r = x2r + x6r;
 1035|   562k|      x2i = x2i + x6i;
 1036|   562k|      x6r = x2r - (x6r << 1);
 1037|   562k|      x6i = x2i - (x6i << 1);
 1038|       |
 1039|   562k|      x0r = x0r + x2r;
 1040|   562k|      x0i = x0i + x2i;
 1041|   562k|      x2r = x0r - (x2r << 1);
 1042|   562k|      x2i = x0i - (x2i << 1);
 1043|       |
 1044|   562k|      x4r = x4r + x6i;
 1045|   562k|      x4i = x4i - x6r;
 1046|   562k|      tmp = x6r;
 1047|   562k|      x6r = x4r - (x6i << 1);
 1048|   562k|      x6i = x4i + (tmp << 1);
 1049|       |
 1050|   562k|      x1r = *data;
 1051|   562k|      x1i = *(data + 1);
 1052|   562k|      data += (del << 2);
 1053|       |
 1054|   562k|      x3r = *data;
 1055|   562k|      x3i = *(data + 1);
 1056|   562k|      data += (del << 2);
 1057|       |
 1058|   562k|      x5r = *data;
 1059|   562k|      x5i = *(data + 1);
 1060|   562k|      data += (del << 2);
 1061|       |
 1062|   562k|      x7r = *data;
 1063|   562k|      x7i = *(data + 1);
 1064|   562k|      data -= 7 * (del << 1);
 1065|       |
 1066|   562k|      x1r = x1r + x5r;
 1067|   562k|      x1i = x1i + x5i;
 1068|   562k|      x5r = x1r - (x5r << 1);
 1069|   562k|      x5i = x1i - (x5i << 1);
 1070|       |
 1071|   562k|      x3r = x3r + x7r;
 1072|   562k|      x3i = x3i + x7i;
 1073|   562k|      x7r = x3r - (x7r << 1);
 1074|   562k|      x7i = x3i - (x7i << 1);
 1075|       |
 1076|   562k|      x1r = x1r + x3r;
 1077|   562k|      x1i = x1i + x3i;
 1078|   562k|      x3r = x1r - (x3r << 1);
 1079|   562k|      x3i = x1i - (x3i << 1);
 1080|       |
 1081|   562k|      x5r = x5r + x5i;
 1082|   562k|      x5i = x5r - (x5i << 1);
 1083|       |
 1084|   562k|      x7r = x7r + x7i;
 1085|   562k|      x7i = x7r - (x7i << 1);
 1086|       |
 1087|   562k|      x7i = x5r - x7i;
 1088|   562k|      x5r = x7i - (x5r << 1);
 1089|       |
 1090|   562k|      x5i = x7r - x5i;
 1091|   562k|      x7r = x5i - (x7r << 1);
 1092|       |
 1093|   562k|      x7i = x7i << 1;
 1094|   562k|      x5r = x5r << 1;
 1095|   562k|      x5i = x5i << 1;
 1096|   562k|      x7r = x7r << 1;
 1097|       |
 1098|   562k|      x0r = x0r + x1r;
 1099|   562k|      x0i = x0i + x1i;
 1100|   562k|      x1r = x0r - (x1r << 1);
 1101|   562k|      x1i = x0i - (x1i << 1);
 1102|       |
 1103|   562k|      x2r = x2r + x3i;
 1104|   562k|      tmp = x2r - (x3i << 1);
 1105|   562k|      x2i = x2i - x3r;
 1106|   562k|      x3i = x2i + (x3r << 1);
 1107|       |
 1108|   562k|      *data = x0r;
 1109|   562k|      *(data + 1) = x0i;
 1110|   562k|      data += (del << 2);
 1111|       |
 1112|   562k|      *data = x2r;
 1113|   562k|      *(data + 1) = x2i;
 1114|   562k|      data += (del << 2);
 1115|       |
 1116|   562k|      *data = x1r;
 1117|   562k|      *(data + 1) = x1i;
 1118|   562k|      data += (del << 2);
 1119|       |
 1120|   562k|      *data = tmp;
 1121|   562k|      *(data + 1) = x3i;
 1122|   562k|      data -= 5 * (del << 1);
 1123|       |
 1124|   562k|      tmp = 0x5A82;
 1125|       |
 1126|   562k|      x7i = x4r + (ixheaacd_mult32x16lin32(x7i, tmp));
 1127|   562k|      x4r = x7i - (x4r << 1);
 1128|   562k|      x7r = x4i + (ixheaacd_mult32x16lin32(x7r, tmp));
 1129|   562k|      x4i = x7r - (x4i << 1);
 1130|       |
 1131|   562k|      x5i = x6r + (ixheaacd_mult32x16lin32(x5i, tmp));
 1132|   562k|      x6r = x5i - (x6r << 1);
 1133|   562k|      x5r = x6i + (ixheaacd_mult32x16lin32(x5r, tmp));
 1134|   562k|      x6i = x5r - (x6i << 1);
 1135|       |
 1136|   562k|      *data = x7i;
 1137|   562k|      *(data + 1) = x7r;
 1138|   562k|      data += (del << 2);
 1139|       |
 1140|   562k|      *data = x5i;
 1141|   562k|      *(data + 1) = x5r;
 1142|   562k|      data += (del << 2);
 1143|       |
 1144|   562k|      *data = -x4r;
 1145|   562k|      *(data + 1) = -x4i;
 1146|   562k|      data += (del << 2);
 1147|       |
 1148|   562k|      *data = -x6r;
 1149|   562k|      *(data + 1) = -x6i;
 1150|       |
 1151|   562k|      data -= 7 * (del << 1);
 1152|   562k|    }
 1153|       |
 1154|  70.2k|    twiddles = ptr_twiddle;
 1155|  70.2k|    data = ptr_y;
 1156|       |
 1157|   562k|    for (j = nodespacing; j < nodespacing * del; j += nodespacing) {
  ------------------
  |  Branch (1157:27): [True: 491k, False: 70.2k]
  ------------------
 1158|   491k|      data = data + 2;
 1159|       |
 1160|  4.42M|      for (k = in_loop_cnt; k != 0; k--) {
  ------------------
  |  Branch (1160:29): [True: 3.93M, False: 491k]
  ------------------
 1161|  3.93M|        data += (del << 2);
 1162|  3.93M|        x2r = *data;
 1163|  3.93M|        x2i = *(data + 1);
 1164|       |
 1165|  3.93M|        data += (del << 2);
 1166|  3.93M|        x4r = *data;
 1167|  3.93M|        x4i = *(data + 1);
 1168|       |
 1169|  3.93M|        data += (del << 2);
 1170|  3.93M|        x6r = *data;
 1171|  3.93M|        x6i = *(data + 1);
 1172|       |
 1173|  3.93M|        data -= 6 * (del << 1);
 1174|       |
 1175|  3.93M|        twiddles += (j >> 2);
 1176|       |
 1177|  3.93M|        twiddle_val = *(twiddles);
 1178|       |
 1179|  3.93M|        tmp = (ixheaacd_mult32x16lin32(x2r, twiddle_val) -
 1180|  3.93M|               ixheaac_mult32x16hin32(x2i, twiddle_val));
 1181|  3.93M|        x2i = (ixheaacd_mac32x16lin32(
 1182|  3.93M|                  ixheaac_mult32x16hin32(x2r, twiddle_val), x2i,
 1183|  3.93M|                  twiddle_val))
 1184|  3.93M|              << 1;
 1185|  3.93M|        x2r = tmp << 1;
 1186|       |
 1187|  3.93M|        twiddles += (j >> 2);
 1188|  3.93M|        twiddle_val = *(twiddles);
 1189|       |
 1190|  3.93M|        tmp = (ixheaacd_mult32x16lin32(x4r, twiddle_val) -
 1191|  3.93M|               ixheaac_mult32x16hin32(x4i, twiddle_val));
 1192|  3.93M|        x4i = (ixheaacd_mac32x16lin32(
 1193|  3.93M|                  ixheaac_mult32x16hin32(x4r, twiddle_val), x4i,
 1194|  3.93M|                  twiddle_val))
 1195|  3.93M|              << 1;
 1196|  3.93M|        x4r = tmp << 1;
 1197|       |
 1198|  3.93M|        twiddles += (j >> 2);
 1199|  3.93M|        twiddle_val = *(twiddles);
 1200|       |
 1201|  3.93M|        tmp = (ixheaacd_mult32x16lin32(x6r, twiddle_val) -
 1202|  3.93M|               ixheaac_mult32x16hin32(x6i, twiddle_val));
 1203|  3.93M|        x6i = (ixheaacd_mac32x16lin32(
 1204|  3.93M|                  ixheaac_mult32x16hin32(x6r, twiddle_val), x6i,
 1205|  3.93M|                  twiddle_val))
 1206|  3.93M|              << 1;
 1207|  3.93M|        x6r = tmp << 1;
 1208|       |
 1209|  3.93M|        x0r = *data;
 1210|  3.93M|        x0i = *(data + 1);
 1211|  3.93M|        data += (del << 1);
 1212|       |
 1213|  3.93M|        x0r = x0r + x4r;
 1214|  3.93M|        x0i = x0i + x4i;
 1215|  3.93M|        x4r = x0r - (x4r << 1);
 1216|  3.93M|        x4i = x0i - (x4i << 1);
 1217|       |
 1218|  3.93M|        x2r = x2r + x6r;
 1219|  3.93M|        x2i = x2i + x6i;
 1220|  3.93M|        x6r = x2r - (x6r << 1);
 1221|  3.93M|        x6i = x2i - (x6i << 1);
 1222|       |
 1223|  3.93M|        x0r = x0r + x2r;
 1224|  3.93M|        x0i = x0i + x2i;
 1225|  3.93M|        x2r = x0r - (x2r << 1);
 1226|  3.93M|        x2i = x0i - (x2i << 1);
 1227|       |
 1228|  3.93M|        x4r = x4r + x6i;
 1229|  3.93M|        x4i = x4i - x6r;
 1230|  3.93M|        tmp = x6r;
 1231|  3.93M|        x6r = x4r - (x6i << 1);
 1232|  3.93M|        x6i = x4i + (tmp << 1);
 1233|       |
 1234|  3.93M|        x1r = *data;
 1235|  3.93M|        x1i = *(data + 1);
 1236|  3.93M|        data += (del << 2);
 1237|       |
 1238|  3.93M|        twiddles -= 5 * (j >> 3);
 1239|  3.93M|        twiddle_val = *(twiddles);
 1240|       |
 1241|  3.93M|        tmp = (ixheaacd_mult32x16lin32(x1r, twiddle_val) -
 1242|  3.93M|               ixheaac_mult32x16hin32(x1i, twiddle_val));
 1243|  3.93M|        x1i = (ixheaacd_mac32x16lin32(
 1244|  3.93M|                  ixheaac_mult32x16hin32(x1r, twiddle_val), x1i,
 1245|  3.93M|                  twiddle_val))
 1246|  3.93M|              << 1;
 1247|  3.93M|        x1r = tmp << 1;
 1248|       |
 1249|  3.93M|        x3r = *data;
 1250|  3.93M|        x3i = *(data + 1);
 1251|  3.93M|        data += (del << 2);
 1252|       |
 1253|  3.93M|        twiddles += (j >> 2);
 1254|  3.93M|        twiddle_val = *(twiddles);
 1255|       |
 1256|  3.93M|        tmp = (ixheaacd_mult32x16lin32(x3r, twiddle_val) -
 1257|  3.93M|               ixheaac_mult32x16hin32(x3i, twiddle_val));
 1258|  3.93M|        x3i = (ixheaacd_mac32x16lin32(
 1259|  3.93M|            ixheaac_mult32x16hin32(x3r, twiddle_val), x3i, twiddle_val));
 1260|  3.93M|        x3r = tmp;
 1261|       |
 1262|  3.93M|        x5r = *data;
 1263|  3.93M|        x5i = *(data + 1);
 1264|  3.93M|        data += (del << 2);
 1265|       |
 1266|  3.93M|        twiddles += (j >> 2);
 1267|  3.93M|        twiddle_val = *(twiddles);
 1268|       |
 1269|  3.93M|        tmp = (ixheaacd_mult32x16lin32(x5r, twiddle_val) -
 1270|  3.93M|               ixheaac_mult32x16hin32(x5i, twiddle_val));
 1271|  3.93M|        x5i = (ixheaacd_mac32x16lin32(
 1272|  3.93M|            ixheaac_mult32x16hin32(x5r, twiddle_val), x5i, twiddle_val));
 1273|  3.93M|        x5r = tmp;
 1274|       |
 1275|  3.93M|        x7r = *data;
 1276|  3.93M|        x7i = *(data + 1);
 1277|  3.93M|        data -= 7 * (del << 1);
 1278|       |
 1279|  3.93M|        twiddles += (j >> 2);
 1280|  3.93M|        twiddle_val = *(twiddles);
 1281|  3.93M|        twiddles -= 7 * (j >> 3);
 1282|       |
 1283|  3.93M|        tmp = (ixheaacd_mult32x16lin32(x7r, twiddle_val) -
 1284|  3.93M|               ixheaac_mult32x16hin32(x7i, twiddle_val));
 1285|  3.93M|        x7i = (ixheaacd_mac32x16lin32(
 1286|  3.93M|            ixheaac_mult32x16hin32(x7r, twiddle_val), x7i, twiddle_val));
 1287|  3.93M|        x7r = tmp;
 1288|       |
 1289|  3.93M|        x1r = x1r + (x5r << 1);
 1290|  3.93M|        x1i = x1i + (x5i << 1);
 1291|  3.93M|        x5r = x1r - (x5r << 2);
 1292|  3.93M|        x5i = x1i - (x5i << 2);
 1293|       |
 1294|  3.93M|        x3r = x3r + x7r;
 1295|  3.93M|        x3i = x3i + x7i;
 1296|  3.93M|        x7r = x3r - (x7r << 1);
 1297|  3.93M|        x7i = x3i - (x7i << 1);
 1298|       |
 1299|  3.93M|        x1r = x1r + (x3r << 1);
 1300|  3.93M|        x1i = x1i + (x3i << 1);
 1301|  3.93M|        x3r = x1r - (x3r << 2);
 1302|  3.93M|        x3i = x1i - (x3i << 2);
 1303|       |
 1304|  3.93M|        x5r = x5r + x5i;
 1305|  3.93M|        x5i = x5r - (x5i << 1);
 1306|       |
 1307|  3.93M|        x7r = x7r + x7i;
 1308|  3.93M|        x7i = x7r - (x7i << 1);
 1309|       |
 1310|  3.93M|        x7i = x5r - (x7i << 1);
 1311|  3.93M|        x5r = x7i - (x5r << 1);
 1312|       |
 1313|  3.93M|        x5i = (x7r << 1) - x5i;
 1314|  3.93M|        x7r = x5i - (x7r << 2);
 1315|       |
 1316|  3.93M|        x7i = x7i << 1;
 1317|  3.93M|        x5r = x5r << 1;
 1318|  3.93M|        x5i = x5i << 1;
 1319|  3.93M|        x7r = x7r << 1;
 1320|       |
 1321|  3.93M|        x0r = x0r + x1r;
 1322|  3.93M|        x0i = x0i + x1i;
 1323|  3.93M|        x1r = x0r - (x1r << 1);
 1324|  3.93M|        x1i = x0i - (x1i << 1);
 1325|       |
 1326|  3.93M|        x2r = x2r + x3i;
 1327|  3.93M|        tmp = x2r - (x3i << 1);
 1328|  3.93M|        x2i = x2i - x3r;
 1329|  3.93M|        x3i = x2i + (x3r << 1);
 1330|       |
 1331|  3.93M|        *data = x0r;
 1332|  3.93M|        *(data + 1) = x0i;
 1333|  3.93M|        data += (del << 2);
 1334|       |
 1335|  3.93M|        *data = x2r;
 1336|  3.93M|        *(data + 1) = x2i;
 1337|  3.93M|        data += (del << 2);
 1338|       |
 1339|  3.93M|        *data = x1r;
 1340|  3.93M|        *(data + 1) = x1i;
 1341|  3.93M|        data += (del << 2);
 1342|       |
 1343|  3.93M|        *data = tmp;
 1344|  3.93M|        *(data + 1) = x3i;
 1345|  3.93M|        data -= 5 * (del << 1);
 1346|       |
 1347|  3.93M|        tmp = 0x5A82;
 1348|       |
 1349|  3.93M|        x7i = x4r + (ixheaacd_mult32x16lin32(x7i, tmp));
 1350|  3.93M|        x4r = x7i - (x4r << 1);
 1351|       |
 1352|  3.93M|        x7r = x4i + (ixheaacd_mult32x16lin32(x7r, tmp));
 1353|  3.93M|        x4i = x7r - (x4i << 1);
 1354|       |
 1355|  3.93M|        x5i = x6r + (ixheaacd_mult32x16lin32(x5i, tmp));
 1356|  3.93M|        x6r = x5i - (x6r << 1);
 1357|       |
 1358|  3.93M|        x5r = x6i + (ixheaacd_mult32x16lin32(x5r, tmp));
 1359|  3.93M|        x6i = x5r - (x6i << 1);
 1360|       |
 1361|  3.93M|        *data = x7i;
 1362|  3.93M|        *(data + 1) = x7r;
 1363|  3.93M|        data += (del << 2);
 1364|       |
 1365|  3.93M|        *data = x5i;
 1366|  3.93M|        *(data + 1) = x5r;
 1367|  3.93M|        data += (del << 2);
 1368|       |
 1369|  3.93M|        *data = -x4r;
 1370|  3.93M|        *(data + 1) = -x4i;
 1371|  3.93M|        data += (del << 2);
 1372|       |
 1373|  3.93M|        *data = -x6r;
 1374|  3.93M|        *(data + 1) = -x6i;
 1375|       |
 1376|  3.93M|        data -= 7 * (del << 1);
 1377|  3.93M|        data += (del << 4);
 1378|  3.93M|      }
 1379|   491k|      data -= npoints << 1;
 1380|   491k|    }
 1381|  70.2k|    nodespacing >>= 3;
 1382|  70.2k|    del <<= 3;
 1383|  70.2k|    in_loop_cnt >>= 3;
 1384|  70.2k|  }
 1385|       |
 1386|   153k|  {
 1387|   153k|    WORD32 *data = ptr_y;
 1388|   153k|    const WORD32 *twiddles;
 1389|   153k|    twiddles = ptr_twiddle;
 1390|   153k|    data = ptr_y;
 1391|   153k|    data = data - 2;
 1392|       |
 1393|  5.31M|    for (j = 0; j < nodespacing * del; j += nodespacing) {
  ------------------
  |  Branch (1393:17): [True: 5.16M, False: 153k]
  ------------------
 1394|  5.16M|      data = data + 2;
 1395|       |
 1396|  5.16M|      {
 1397|  5.16M|        data += (del << 2);
 1398|  5.16M|        x2r = *data;
 1399|  5.16M|        x2i = *(data + 1);
 1400|       |
 1401|  5.16M|        data += (del << 2);
 1402|  5.16M|        x4r = *data;
 1403|  5.16M|        x4i = *(data + 1);
 1404|       |
 1405|  5.16M|        data += (del << 2);
 1406|  5.16M|        x6r = *data;
 1407|  5.16M|        x6i = *(data + 1);
 1408|       |
 1409|  5.16M|        data -= 6 * (del << 1);
 1410|       |
 1411|  5.16M|        twiddles += (j >> 2);
 1412|       |
 1413|  5.16M|        twiddle_val = *(twiddles);
 1414|       |
 1415|  5.16M|        tmp = (ixheaacd_mult32x16lin32(x2r, twiddle_val) -
 1416|  5.16M|               ixheaac_mult32x16hin32(x2i, twiddle_val));
 1417|  5.16M|        x2i = (ixheaacd_mac32x16lin32(
 1418|  5.16M|                  ixheaac_mult32x16hin32(x2r, twiddle_val), x2i,
 1419|  5.16M|                  twiddle_val))
 1420|  5.16M|              << 1;
 1421|  5.16M|        x2r = tmp << 1;
 1422|       |
 1423|  5.16M|        twiddles += (j >> 2);
 1424|  5.16M|        twiddle_val = *(twiddles);
 1425|       |
 1426|  5.16M|        tmp = (ixheaacd_mult32x16lin32(x4r, twiddle_val) -
 1427|  5.16M|               ixheaac_mult32x16hin32(x4i, twiddle_val));
 1428|  5.16M|        x4i = (ixheaacd_mac32x16lin32(
 1429|  5.16M|                  ixheaac_mult32x16hin32(x4r, twiddle_val), x4i,
 1430|  5.16M|                  twiddle_val))
 1431|  5.16M|              << 1;
 1432|  5.16M|        x4r = tmp << 1;
 1433|       |
 1434|  5.16M|        twiddles += (j >> 2);
 1435|  5.16M|        twiddle_val = *(twiddles);
 1436|       |
 1437|  5.16M|        tmp = (ixheaacd_mult32x16lin32(x6r, twiddle_val) -
 1438|  5.16M|               ixheaac_mult32x16hin32(x6i, twiddle_val));
 1439|  5.16M|        x6i = (ixheaacd_mac32x16lin32(
 1440|  5.16M|                  ixheaac_mult32x16hin32(x6r, twiddle_val), x6i,
 1441|  5.16M|                  twiddle_val))
 1442|  5.16M|              << 1;
 1443|  5.16M|        x6r = tmp << 1;
 1444|       |
 1445|  5.16M|        x0r = *data;
 1446|  5.16M|        x0i = *(data + 1);
 1447|  5.16M|        data += (del << 1);
 1448|       |
 1449|  5.16M|        x0r = x0r + x4r;
 1450|  5.16M|        x0i = x0i + x4i;
 1451|  5.16M|        x4r = x0r - (x4r << 1);
 1452|  5.16M|        x4i = x0i - (x4i << 1);
 1453|       |
 1454|  5.16M|        x2r = x2r + x6r;
 1455|  5.16M|        x2i = x2i + x6i;
 1456|  5.16M|        x6r = x2r - (x6r << 1);
 1457|  5.16M|        x6i = x2i - (x6i << 1);
 1458|       |
 1459|  5.16M|        x0r = x0r + x2r;
 1460|  5.16M|        x0i = x0i + x2i;
 1461|  5.16M|        x2r = x0r - (x2r << 1);
 1462|  5.16M|        x2i = x0i - (x2i << 1);
 1463|       |
 1464|  5.16M|        x4r = x4r + x6i;
 1465|  5.16M|        x4i = x4i - x6r;
 1466|  5.16M|        tmp = x6r;
 1467|  5.16M|        x6r = x4r - (x6i << 1);
 1468|  5.16M|        x6i = x4i + (tmp << 1);
 1469|       |
 1470|  5.16M|        x1r = *data;
 1471|  5.16M|        x1i = *(data + 1);
 1472|  5.16M|        data += (del << 2);
 1473|       |
 1474|  5.16M|        twiddles -= 5 * (j >> 3);
 1475|  5.16M|        twiddle_val = *(twiddles);
 1476|       |
 1477|  5.16M|        tmp = (ixheaacd_mult32x16lin32(x1r, twiddle_val) -
 1478|  5.16M|               ixheaac_mult32x16hin32(x1i, twiddle_val));
 1479|  5.16M|        x1i = (ixheaacd_mac32x16lin32(
 1480|  5.16M|                  ixheaac_mult32x16hin32(x1r, twiddle_val), x1i,
 1481|  5.16M|                  twiddle_val))
 1482|  5.16M|              << 1;
 1483|  5.16M|        x1r = tmp << 1;
 1484|       |
 1485|  5.16M|        x3r = *data;
 1486|  5.16M|        x3i = *(data + 1);
 1487|  5.16M|        data += (del << 2);
 1488|       |
 1489|  5.16M|        twiddles += (j >> 2);
 1490|  5.16M|        twiddle_val = *(twiddles);
 1491|       |
 1492|  5.16M|        tmp = (ixheaacd_mult32x16lin32(x3r, twiddle_val) -
 1493|  5.16M|               ixheaac_mult32x16hin32(x3i, twiddle_val));
 1494|  5.16M|        x3i = (ixheaacd_mac32x16lin32(
 1495|  5.16M|            ixheaac_mult32x16hin32(x3r, twiddle_val), x3i, twiddle_val));
 1496|  5.16M|        x3r = tmp;
 1497|       |
 1498|  5.16M|        x5r = *data;
 1499|  5.16M|        x5i = *(data + 1);
 1500|  5.16M|        data += (del << 2);
 1501|       |
 1502|  5.16M|        twiddles += (j >> 2);
 1503|  5.16M|        twiddle_val = *(twiddles);
 1504|       |
 1505|  5.16M|        tmp = (ixheaacd_mult32x16lin32(x5r, twiddle_val) -
 1506|  5.16M|               ixheaac_mult32x16hin32(x5i, twiddle_val));
 1507|  5.16M|        x5i = (ixheaacd_mac32x16lin32(
 1508|  5.16M|            ixheaac_mult32x16hin32(x5r, twiddle_val), x5i, twiddle_val));
 1509|  5.16M|        x5r = tmp;
 1510|       |
 1511|  5.16M|        x7r = *data;
 1512|  5.16M|        x7i = *(data + 1);
 1513|  5.16M|        data -= 7 * (del << 1);
 1514|       |
 1515|  5.16M|        twiddles += (j >> 2);
 1516|  5.16M|        twiddle_val = *(twiddles);
 1517|  5.16M|        twiddles -= 7 * (j >> 3);
 1518|       |
 1519|  5.16M|        tmp = (ixheaacd_mult32x16lin32(x7r, twiddle_val) -
 1520|  5.16M|               ixheaac_mult32x16hin32(x7i, twiddle_val));
 1521|  5.16M|        x7i = (ixheaacd_mac32x16lin32(
 1522|  5.16M|            ixheaac_mult32x16hin32(x7r, twiddle_val), x7i, twiddle_val));
 1523|  5.16M|        x7r = tmp;
 1524|       |
 1525|  5.16M|        x1r = x1r + (x5r << 1);
 1526|  5.16M|        x1i = x1i + (x5i << 1);
 1527|  5.16M|        x5r = x1r - (x5r << 2);
 1528|  5.16M|        x5i = x1i - (x5i << 2);
 1529|       |
 1530|  5.16M|        x3r = x3r + x7r;
 1531|  5.16M|        x3i = x3i + x7i;
 1532|  5.16M|        x7r = x3r - (x7r << 1);
 1533|  5.16M|        x7i = x3i - (x7i << 1);
 1534|       |
 1535|  5.16M|        x1r = x1r + (x3r << 1);
 1536|  5.16M|        x1i = x1i + (x3i << 1);
 1537|  5.16M|        x3r = x1r - (x3r << 2);
 1538|  5.16M|        x3i = x1i - (x3i << 2);
 1539|       |
 1540|  5.16M|        x5r = x5r + x5i;
 1541|  5.16M|        x5i = x5r - (x5i << 1);
 1542|       |
 1543|  5.16M|        x7r = x7r + x7i;
 1544|  5.16M|        x7i = x7r - (x7i << 1);
 1545|       |
 1546|  5.16M|        x7i = x5r - (x7i << 1);
 1547|  5.16M|        x5r = x7i - (x5r << 1);
 1548|       |
 1549|  5.16M|        x5i = (x7r << 1) - x5i;
 1550|  5.16M|        x7r = x5i - (x7r << 2);
 1551|       |
 1552|  5.16M|        x7i = x7i << 1;
 1553|  5.16M|        x5r = x5r << 1;
 1554|  5.16M|        x5i = x5i << 1;
 1555|  5.16M|        x7r = x7r << 1;
 1556|       |
 1557|  5.16M|        x0r = x0r + x1r;
 1558|  5.16M|        x0i = x0i + x1i;
 1559|  5.16M|        x1r = x0r - (x1r << 1);
 1560|  5.16M|        x1i = x0i - (x1i << 1);
 1561|       |
 1562|  5.16M|        x2r = x2r + x3i;
 1563|  5.16M|        tmp = x2r - (x3i << 1);
 1564|  5.16M|        x2i = x2i - x3r;
 1565|  5.16M|        x3i = x2i + (x3r << 1);
 1566|       |
 1567|  5.16M|        *data = x0r;
 1568|  5.16M|        *(data + 1) = x0i;
 1569|  5.16M|        data += (del << 2);
 1570|       |
 1571|  5.16M|        *data = x2r;
 1572|  5.16M|        *(data + 1) = x2i;
 1573|  5.16M|        data += (del << 2);
 1574|       |
 1575|  5.16M|        *data = x1r;
 1576|  5.16M|        *(data + 1) = x1i;
 1577|  5.16M|        data += (del << 2);
 1578|       |
 1579|  5.16M|        *data = tmp;
 1580|  5.16M|        *(data + 1) = x3i;
 1581|  5.16M|        data -= 5 * (del << 1);
 1582|       |
 1583|  5.16M|        tmp = 0x5A82;
 1584|       |
 1585|  5.16M|        x7i = x4r + (ixheaacd_mult32x16lin32(x7i, tmp));
 1586|  5.16M|        x4r = x7i - (x4r << 1);
 1587|       |
 1588|  5.16M|        x7r = x4i + (ixheaacd_mult32x16lin32(x7r, tmp));
 1589|  5.16M|        x4i = x7r - (x4i << 1);
 1590|       |
 1591|  5.16M|        x5i = x6r + (ixheaacd_mult32x16lin32(x5i, tmp));
 1592|  5.16M|        x6r = x5i - (x6r << 1);
 1593|       |
 1594|  5.16M|        x5r = x6i + (ixheaacd_mult32x16lin32(x5r, tmp));
 1595|  5.16M|        x6i = x5r - (x6i << 1);
 1596|       |
 1597|  5.16M|        *data = x7i;
 1598|  5.16M|        *(data + 1) = x7r;
 1599|  5.16M|        data += (del << 2);
 1600|       |
 1601|  5.16M|        *data = x5i;
 1602|  5.16M|        *(data + 1) = x5r;
 1603|  5.16M|        data += (del << 2);
 1604|       |
 1605|  5.16M|        *data = -x4r;
 1606|  5.16M|        *(data + 1) = -x4i;
 1607|  5.16M|        data += (del << 2);
 1608|       |
 1609|  5.16M|        *data = -x6r;
 1610|  5.16M|        *(data + 1) = -x6i;
 1611|       |
 1612|  5.16M|        data -= 7 * (del << 1);
 1613|  5.16M|        data += (del << 4);
 1614|  5.16M|      }
 1615|  5.16M|      data -= npoints << 1;
 1616|  5.16M|    }
 1617|       |
 1618|   153k|    nodespacing >>= 3;
 1619|   153k|    del <<= 3;
 1620|   153k|    in_loop_cnt >>= 3;
 1621|   153k|  }
 1622|   153k|}
ixheaacd_inverse_transform_960:
 1627|   189k|    WORD32 *imdct_scale) {
 1628|       |
 1629|   189k|  WORD32 n;
 1630|   189k|  WORD32 Nd2;
 1631|   189k|  WORD16 const_mltfac;
 1632|   189k|  WORD32 neg_expo;
 1633|       |
 1634|   189k|  WORD32 i;
 1635|       |
 1636|   189k|  n = 120;
 1637|   189k|  Nd2 = n >> 1;
 1638|   189k|  neg_expo = 4;
 1639|       |
 1640|   189k|  ixheaacd_pre_twiddle_120(spec_data, scratch, n, ptr_imdct_tables->cosine_array_240,
 1641|   189k|                           neg_expo - expo);
 1642|       |
 1643|   189k|  ixheaacd_fft_120(ptr_imdct_tables, Nd2, spec_data, scratch);
 1644|       |
 1645|   189k|  neg_expo += 2;
 1646|   189k|  *imdct_scale = neg_expo + 1;
 1647|       |
 1648|   189k|  ixheaacd_post_twiddle_120(spec_data, scratch, ptr_imdct_tables->cosine_array_240,
 1649|   189k|                            n);
 1650|   189k|  const_mltfac = 17476;
 1651|  22.9M|  for (i = 0; i < 120; i++)
  ------------------
  |  Branch (1651:15): [True: 22.7M, False: 189k]
  ------------------
 1652|  22.7M|  {
 1653|  22.7M|    spec_data[i] = ixheaac_mult32x16in32_shl(spec_data[i], const_mltfac);
 1654|  22.7M|  }
 1655|   189k|}
ixheaacd_inverse_transform:
 1660|   153k|    WORD32 npoints) {
 1661|   153k|  (*ixheaacd_pretwiddle_compute)(spec_data, spec_data + npoints - 1, scratch,
 1662|   153k|                                 ptr_imdct_tables, (npoints >> 2), expo);
 1663|       |
 1664|   153k|  (*ixheaacd_imdct_using_fft)(ptr_imdct_tables, npoints >> 1, scratch,
 1665|   153k|                              spec_data);
 1666|       |
 1667|   153k|  expo += 2;
 1668|       |
 1669|   153k|  return expo;
 1670|   153k|}
ixheaacd_mdct_960:
 1674|  40.2k|                       ia_aac_dec_imdct_tables_struct *imdct_tables_ptr) {
 1675|  40.2k|  WORD32 expo, neg_expo = 0, k;
 1676|       |
 1677|  40.2k|  WORD16 const_mltfac = 17476;
 1678|       |
 1679|  40.2k|  expo = (*ixheaacd_calc_max_spectral_line)(inp, MDCT_LEN_960) - 1;
  ------------------
  |  |   76|  40.2k|#define MDCT_LEN_960 960
  ------------------
 1680|  40.2k|  ;
 1681|       |
 1682|  40.2k|  memcpy(scratch, inp, sizeof(WORD32) * MDCT_LEN_960);
  ------------------
  |  |   76|  40.2k|#define MDCT_LEN_960 960
  ------------------
 1683|       |
 1684|  40.2k|  neg_expo = 7 - expo;
 1685|       |
 1686|  40.2k|  ixheaacd_pre_twiddle_960(inp, scratch, MDCT_LEN_960, imdct_tables_ptr->cosine_array_1920,
  ------------------
  |  |   76|  40.2k|#define MDCT_LEN_960 960
  ------------------
 1687|  40.2k|                           neg_expo);
 1688|       |
 1689|  40.2k|  ixheaacd_fft_960(inp, scratch, imdct_tables_ptr);
 1690|       |
 1691|  40.2k|  ixheaacd_post_twiddle_960(inp, scratch, imdct_tables_ptr->cosine_array_1920,
 1692|  40.2k|                            MDCT_LEN_960);
  ------------------
  |  |   76|  40.2k|#define MDCT_LEN_960 960
  ------------------
 1693|       |
 1694|  40.2k|  if (0 == mdct_flag) {
  ------------------
  |  Branch (1694:7): [True: 40.2k, False: 0]
  ------------------
 1695|  40.2k|    WORD32 *data = inp;
 1696|       |
 1697|  19.3M|    for (k = MDCT_LEN_960 - 1; k >= 0; k -= 2) {
  ------------------
  |  |   76|  40.2k|#define MDCT_LEN_960 960
  ------------------
  |  Branch (1697:32): [True: 19.3M, False: 40.2k]
  ------------------
 1698|  19.3M|      *data = ixheaac_mult32x16in32_shl(*data, const_mltfac);
 1699|  19.3M|      data++;
 1700|  19.3M|      *data = ixheaac_mult32x16in32_shl(*data, const_mltfac);
 1701|  19.3M|      data++;
 1702|  19.3M|    }
 1703|  40.2k|  }
 1704|  40.2k|  *mdct_scale = neg_expo + 1 + 1 + 1;
 1705|  40.2k|}
ixheaacd_mdct_480_ld:
 1710|  35.8k|                          WORD32 object_type) {
 1711|  35.8k|  WORD32 expo, neg_expo = 0, k;
 1712|       |
 1713|  35.8k|  WORD32 const_mltfac = 1145324612;
 1714|       |
 1715|  35.8k|  expo = (*ixheaacd_calc_max_spectral_line)(inp, MDCT_LEN) - 1;
  ------------------
  |  |   67|  35.8k|#define MDCT_LEN 480
  ------------------
 1716|  35.8k|  ;
 1717|       |
 1718|  35.8k|  memcpy(scratch, inp, sizeof(WORD32) * MDCT_LEN);
  ------------------
  |  |   67|  35.8k|#define MDCT_LEN 480
  ------------------
 1719|       |
 1720|  35.8k|  neg_expo = 7 - expo;
 1721|       |
 1722|  35.8k|  ixheaacd_pre_twiddle(inp, scratch, 480, imdct_tables_ptr->cosine_array_960,
 1723|  35.8k|                       neg_expo);
 1724|       |
 1725|  35.8k|  ixheaacd_fft_480_ld(inp, scratch, imdct_tables_ptr);
 1726|       |
 1727|  35.8k|  if (object_type == AOT_ER_AAC_LD) {
  ------------------
  |  Branch (1727:7): [True: 13.3k, False: 22.4k]
  ------------------
 1728|  13.3k|    ixheaacd_post_twiddle_ld(inp, scratch, imdct_tables_ptr->cosine_array_960,
 1729|  13.3k|                             480);
 1730|  22.4k|  } else if (object_type == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (1730:14): [True: 22.4k, False: 0]
  ------------------
 1731|  22.4k|    ixheaacd_post_twiddle_eld(inp + (480), scratch,
 1732|  22.4k|                              imdct_tables_ptr->cosine_array_960, 480);
 1733|  22.4k|  }
 1734|       |
 1735|  35.8k|  if (0 == mdct_flag) {
  ------------------
  |  Branch (1735:7): [True: 31.1k, False: 4.68k]
  ------------------
 1736|  31.1k|    WORD32 *data = inp;
 1737|       |
 1738|  31.1k|    if (object_type != AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (1738:9): [True: 8.65k, False: 22.4k]
  ------------------
 1739|  2.08M|      for (k = MDCT_LEN - 1; k >= 0; k -= 2) {
  ------------------
  |  |   67|  8.65k|#define MDCT_LEN 480
  ------------------
  |  Branch (1739:30): [True: 2.07M, False: 8.65k]
  ------------------
 1740|  2.07M|        *data = ixheaac_mult32_shl(*data, const_mltfac);
 1741|  2.07M|        data++;
 1742|  2.07M|        *data = ixheaac_mult32_shl(*data, const_mltfac);
 1743|  2.07M|        data++;
 1744|  2.07M|      }
 1745|  8.65k|      neg_expo += 1;
 1746|  22.4k|    } else {
 1747|  22.4k|      data = inp + 480;
 1748|  10.8M|      for (k = (MDCT_LEN << 1) - 1; k >= 0; k -= 2) {
  ------------------
  |  |   67|  22.4k|#define MDCT_LEN 480
  ------------------
  |  Branch (1748:37): [True: 10.7M, False: 22.4k]
  ------------------
 1749|  10.7M|        *data = ixheaac_mult32_shl(*data, const_mltfac);
 1750|  10.7M|        data++;
 1751|  10.7M|        *data = ixheaac_mult32_shl(*data, const_mltfac);
 1752|  10.7M|        data++;
 1753|  10.7M|      }
 1754|  22.4k|      neg_expo += 1;
 1755|  22.4k|    }
 1756|  31.1k|  }
 1757|       |
 1758|  35.8k|  *mdct_scale = neg_expo + 3;
 1759|  35.8k|}
ixheaacd_inverse_transform_512:
 1763|  69.3k|    ia_aac_dec_imdct_tables_struct *imdct_tables_ptr, WORD32 object_type) {
 1764|  69.3k|  WORD32 n;
 1765|  69.3k|  WORD32 npoints_2;
 1766|  69.3k|  WORD16 expo, neg_expo;
 1767|       |
 1768|  69.3k|  n = 512;
 1769|       |
 1770|  69.3k|  npoints_2 = n >> 1;
 1771|       |
 1772|  69.3k|  expo = (*ixheaacd_calc_max_spectral_line)(data, n) - 1;
 1773|       |
 1774|  69.3k|  memcpy(temp, data, sizeof(WORD32) * n);
 1775|       |
 1776|  69.3k|  neg_expo = 7 - expo;
 1777|       |
 1778|  69.3k|  ixheaacd_pre_twiddle(data, temp, n, cos_sin_ptr, neg_expo);
 1779|       |
 1780|  69.3k|  (*ixheaacd_fft32x32_ld)(imdct_tables_ptr, npoints_2, data, temp);
 1781|       |
 1782|  69.3k|  neg_expo = (*ixheaacd_neg_expo_inc)(neg_expo);
 1783|       |
 1784|  69.3k|  *imdct_scale = neg_expo + 1;
 1785|       |
 1786|  69.3k|  if (object_type == AOT_ER_AAC_ELD)
  ------------------
  |  Branch (1786:7): [True: 19.2k, False: 50.0k]
  ------------------
 1787|  19.2k|    ixheaacd_post_twiddle_eld((data + n), temp, cos_sin_ptr, n);
 1788|  50.0k|  else
 1789|  50.0k|    ixheaacd_post_twiddle_ld((data), temp, cos_sin_ptr, n);
 1790|  69.3k|}
ixheaacd_fft_960:
 1793|  40.2k|                      ia_aac_dec_imdct_tables_struct *imdct_tables_ptr) {
 1794|  40.2k|  WORD32 i;
 1795|  40.2k|  WORD32 *buf1, *buf2;
 1796|  40.2k|  WORD16 *re_arr_tab_sml_480_ptr;
 1797|       |
 1798|  40.2k|  (*ixheaacd_aac_ld_dec_rearrange_960)(inp, op, 480,
 1799|  40.2k|                                       imdct_tables_ptr->re_arr_tab_32);
 1800|       |
 1801|  40.2k|  buf1 = op;
 1802|  40.2k|  buf2 = inp;
 1803|       |
 1804|   644k|  for (i = 0; i < FFT15; i++) {
  ------------------
  |  |   74|   644k|#define FFT15 15
  ------------------
  |  Branch (1804:15): [True: 604k, False: 40.2k]
  ------------------
 1805|   604k|    ixheaacd_fft_32_points(imdct_tables_ptr->w_32,
 1806|   604k|                           32, buf1, buf2);
 1807|       |
 1808|   604k|    buf1 += (FFT16X2 * 2);
  ------------------
  |  |   75|   604k|#define FFT16X2 32
  ------------------
 1809|   604k|    buf2 += (FFT16X2 * 2);
  ------------------
  |  |   75|   604k|#define FFT16X2 32
  ------------------
 1810|   604k|  }
 1811|       |
 1812|  40.2k|  re_arr_tab_sml_480_ptr = imdct_tables_ptr->re_arr_tab_sml_480;
 1813|  40.2k|  buf1 = inp;
 1814|       |
 1815|  1.32M|  for (i = 0; i < FFT16 * 2; i++) {
  ------------------
  |  |   71|  1.32M|#define FFT16 16
  ------------------
  |  Branch (1815:15): [True: 1.28M, False: 40.2k]
  ------------------
 1816|  1.28M|    ixheaacd_ld_dec_fft_15_opt(buf1, op,
 1817|  1.28M|                               ixheaacd_fft5out, re_arr_tab_sml_480_ptr);
 1818|  1.28M|    buf1 += 2;
 1819|  1.28M|    re_arr_tab_sml_480_ptr += FFT15;
  ------------------
  |  |   74|  1.28M|#define FFT15 15
  ------------------
 1820|  1.28M|  }
 1821|  40.2k|}
ixheaacd_fft_32_points:
 1824|   604k|                            WORD32* ptr_x, WORD32* ptr_y) {
 1825|   604k|  WORD32   i, j, l1, l2, h2, predj, tw_offset, stride, fft_jmp;
 1826|   604k|  WORD32   xt0_0, yt0_0, xt1_0, yt1_0, xt2_0, yt2_0;
 1827|   604k|  WORD32   xh0_0, xh1_0, xh20_0, xh21_0, xl0_0, xl1_0, xl20_0, xl21_0;
 1828|   604k|  WORD32   x_0, x_1, x_l1_0, x_l1_1, x_l2_0, x_l2_1;
 1829|   604k|  WORD32   x_h2_0, x_h2_1;
 1830|   604k|  WORD16 si10, si20, si30, co10, co20, co30;
 1831|   604k|  WORD16 *w;
 1832|   604k|  WORD32   *x, *x2, *x0;
 1833|   604k|  WORD32   *y0, *y1, *y2, *y3;
 1834|   604k|  WORD32   n0, j0;
 1835|   604k|  WORD32   radix;
 1836|   604k|  WORD32   norm;
 1837|       |
 1838|   604k|  radix = 2;
 1839|   604k|  norm = 25;
 1840|       |
 1841|   604k|  stride = 32;
 1842|   604k|  tw_offset = 0;
 1843|   604k|  fft_jmp = 192;
 1844|       |
 1845|  1.81M|  while (stride > radix) {
  ------------------
  |  Branch (1845:10): [True: 1.20M, False: 604k]
  ------------------
 1846|  1.20M|    j = 0;
 1847|  1.20M|    fft_jmp >>= 2;
 1848|       |
 1849|  1.20M|    h2 = stride >> 1;
 1850|  1.20M|    l1 = stride;
 1851|  1.20M|    l2 = stride + (stride >> 1);
 1852|       |
 1853|  1.20M|    x = ptr_x;
 1854|  1.20M|    w = ptr_w + tw_offset;
 1855|  1.20M|    tw_offset += fft_jmp;
 1856|       |
 1857|  10.8M|    for (i = 0; i < npoints; i += 4) {
  ------------------
  |  Branch (1857:17): [True: 9.66M, False: 1.20M]
  ------------------
 1858|  9.66M|      co10 = w[j + 1];            si10 = w[j + 0];
 1859|  9.66M|      co20 = w[j + 3];            si20 = w[j + 2];
 1860|  9.66M|      co30 = w[j + 5];            si30 = w[j + 4];
 1861|       |
 1862|  9.66M|      x_0 = x[0];             x_1 = x[1];
 1863|  9.66M|      x_l1_0 = x[l1];         x_l1_1 = x[l1 + 1];
 1864|  9.66M|      x_l2_0 = x[l2];         x_l2_1 = x[l2 + 1];
 1865|  9.66M|      x_h2_0 = x[h2];         x_h2_1 = x[h2 + 1];
 1866|       |
 1867|  9.66M|      xh0_0 = ixheaac_add32_sat(x_0, x_l1_0);
 1868|  9.66M|      xh1_0 = ixheaac_add32_sat(x_1, x_l1_1);
 1869|  9.66M|      xl0_0 = ixheaac_sub32_sat(x_0, x_l1_0);
 1870|  9.66M|      xl1_0 = ixheaac_sub32_sat(x_1, x_l1_1);
 1871|  9.66M|      xh20_0 = ixheaac_add32_sat(x_h2_0, x_l2_0);
 1872|  9.66M|      xh21_0 = ixheaac_add32_sat(x_h2_1, x_l2_1);
 1873|  9.66M|      xl20_0 = ixheaac_sub32_sat(x_h2_0, x_l2_0);
 1874|  9.66M|      xl21_0 = ixheaac_sub32_sat(x_h2_1, x_l2_1);
 1875|       |
 1876|  9.66M|      x0 = x;
 1877|  9.66M|      x2 = x0;
 1878|       |
 1879|  9.66M|      j += 6;
 1880|  9.66M|      x += 2;
 1881|  9.66M|      predj = (j - fft_jmp);
 1882|  9.66M|      if (!predj) x += fft_jmp;
  ------------------
  |  Branch (1882:11): [True: 3.02M, False: 6.64M]
  ------------------
 1883|  9.66M|      if (!predj) j = 0;
  ------------------
  |  Branch (1883:11): [True: 3.02M, False: 6.64M]
  ------------------
 1884|       |
 1885|  9.66M|      x0[0] = ixheaac_add32_sat(xh0_0, xh20_0);
 1886|  9.66M|      x0[1] = ixheaac_add32_sat(xh1_0, xh21_0);
 1887|  9.66M|      xt0_0 = ixheaac_sub32_sat(xh0_0, xh20_0);
 1888|  9.66M|      yt0_0 = ixheaac_sub32_sat(xh1_0, xh21_0);
 1889|  9.66M|      xt1_0 = ixheaac_add32_sat(xl0_0, xl21_0);
 1890|  9.66M|      yt2_0 = ixheaac_add32_sat(xl1_0, xl20_0);
 1891|  9.66M|      xt2_0 = ixheaac_sub32_sat(xl0_0, xl21_0);
 1892|  9.66M|      yt1_0 = ixheaac_sub32_sat(xl1_0, xl20_0);
 1893|       |
 1894|  9.66M|      x2[h2] = ixheaac_add32_sat(MPYLIRC(si10, yt1_0), MPYLIRC(co10, xt1_0));
  ------------------
  |  |   62|  9.66M|  (((WORD32)((WORD16)(x) * (UWORD16)(y & 0x0000FFFF) + 0x4000) >> 15)+ \
  |  |   63|  9.66M|((WORD32)((WORD16)(x) * (WORD16)((y) >> 16)) << 1))
  ------------------
                    x2[h2] = ixheaac_add32_sat(MPYLIRC(si10, yt1_0), MPYLIRC(co10, xt1_0));
  ------------------
  |  |   62|  9.66M|  (((WORD32)((WORD16)(x) * (UWORD16)(y & 0x0000FFFF) + 0x4000) >> 15)+ \
  |  |   63|  9.66M|((WORD32)((WORD16)(x) * (WORD16)((y) >> 16)) << 1))
  ------------------
 1895|       |
 1896|  9.66M|      x2[h2 + 1] = ixheaac_sub32_sat(MPYLIRC(co10, yt1_0), MPYLIRC(si10, xt1_0));
  ------------------
  |  |   62|  9.66M|  (((WORD32)((WORD16)(x) * (UWORD16)(y & 0x0000FFFF) + 0x4000) >> 15)+ \
  |  |   63|  9.66M|((WORD32)((WORD16)(x) * (WORD16)((y) >> 16)) << 1))
  ------------------
                    x2[h2 + 1] = ixheaac_sub32_sat(MPYLIRC(co10, yt1_0), MPYLIRC(si10, xt1_0));
  ------------------
  |  |   62|  9.66M|  (((WORD32)((WORD16)(x) * (UWORD16)(y & 0x0000FFFF) + 0x4000) >> 15)+ \
  |  |   63|  9.66M|((WORD32)((WORD16)(x) * (WORD16)((y) >> 16)) << 1))
  ------------------
 1897|       |
 1898|  9.66M|      x2[l1] = ixheaac_add32_sat(MPYLIRC(si20, yt0_0), MPYLIRC(co20, xt0_0));
  ------------------
  |  |   62|  9.66M|  (((WORD32)((WORD16)(x) * (UWORD16)(y & 0x0000FFFF) + 0x4000) >> 15)+ \
  |  |   63|  9.66M|((WORD32)((WORD16)(x) * (WORD16)((y) >> 16)) << 1))
  ------------------
                    x2[l1] = ixheaac_add32_sat(MPYLIRC(si20, yt0_0), MPYLIRC(co20, xt0_0));
  ------------------
  |  |   62|  9.66M|  (((WORD32)((WORD16)(x) * (UWORD16)(y & 0x0000FFFF) + 0x4000) >> 15)+ \
  |  |   63|  9.66M|((WORD32)((WORD16)(x) * (WORD16)((y) >> 16)) << 1))
  ------------------
 1899|       |
 1900|  9.66M|      x2[l1 + 1] = ixheaac_sub32_sat(MPYLIRC(co20, yt0_0), MPYLIRC(si20, xt0_0));
  ------------------
  |  |   62|  9.66M|  (((WORD32)((WORD16)(x) * (UWORD16)(y & 0x0000FFFF) + 0x4000) >> 15)+ \
  |  |   63|  9.66M|((WORD32)((WORD16)(x) * (WORD16)((y) >> 16)) << 1))
  ------------------
                    x2[l1 + 1] = ixheaac_sub32_sat(MPYLIRC(co20, yt0_0), MPYLIRC(si20, xt0_0));
  ------------------
  |  |   62|  9.66M|  (((WORD32)((WORD16)(x) * (UWORD16)(y & 0x0000FFFF) + 0x4000) >> 15)+ \
  |  |   63|  9.66M|((WORD32)((WORD16)(x) * (WORD16)((y) >> 16)) << 1))
  ------------------
 1901|  9.66M|      yt0_0 = MPYLIRC(si20, yt0_0);
  ------------------
  |  |   62|  9.66M|  (((WORD32)((WORD16)(x) * (UWORD16)(y & 0x0000FFFF) + 0x4000) >> 15)+ \
  |  |   63|  9.66M|((WORD32)((WORD16)(x) * (WORD16)((y) >> 16)) << 1))
  ------------------
 1902|       |
 1903|  9.66M|      x2[l2] = ixheaac_add32_sat(MPYLIRC(si30, yt2_0), MPYLIRC(co30, xt2_0));
  ------------------
  |  |   62|  9.66M|  (((WORD32)((WORD16)(x) * (UWORD16)(y & 0x0000FFFF) + 0x4000) >> 15)+ \
  |  |   63|  9.66M|((WORD32)((WORD16)(x) * (WORD16)((y) >> 16)) << 1))
  ------------------
                    x2[l2] = ixheaac_add32_sat(MPYLIRC(si30, yt2_0), MPYLIRC(co30, xt2_0));
  ------------------
  |  |   62|  9.66M|  (((WORD32)((WORD16)(x) * (UWORD16)(y & 0x0000FFFF) + 0x4000) >> 15)+ \
  |  |   63|  9.66M|((WORD32)((WORD16)(x) * (WORD16)((y) >> 16)) << 1))
  ------------------
 1904|       |
 1905|  9.66M|      x2[l2 + 1] = ixheaac_sub32_sat(MPYLIRC(co30, yt2_0), MPYLIRC(si30, xt2_0));
  ------------------
  |  |   62|  9.66M|  (((WORD32)((WORD16)(x) * (UWORD16)(y & 0x0000FFFF) + 0x4000) >> 15)+ \
  |  |   63|  9.66M|((WORD32)((WORD16)(x) * (WORD16)((y) >> 16)) << 1))
  ------------------
                    x2[l2 + 1] = ixheaac_sub32_sat(MPYLIRC(co30, yt2_0), MPYLIRC(si30, xt2_0));
  ------------------
  |  |   62|  9.66M|  (((WORD32)((WORD16)(x) * (UWORD16)(y & 0x0000FFFF) + 0x4000) >> 15)+ \
  |  |   63|  9.66M|((WORD32)((WORD16)(x) * (WORD16)((y) >> 16)) << 1))
  ------------------
 1906|  9.66M|      yt2_0 = MPYLIRC(si30, yt2_0);
  ------------------
  |  |   62|  9.66M|  (((WORD32)((WORD16)(x) * (UWORD16)(y & 0x0000FFFF) + 0x4000) >> 15)+ \
  |  |   63|  9.66M|((WORD32)((WORD16)(x) * (WORD16)((y) >> 16)) << 1))
  ------------------
 1907|       |
 1908|  9.66M|    }
 1909|  1.20M|    stride >>= 2;
 1910|  1.20M|  }
 1911|       |
 1912|   604k|  y0 = ptr_y;
 1913|   604k|  y2 = ptr_y + (int)npoints;
 1914|   604k|  x0 = ptr_x;
 1915|   604k|  x2 = ptr_x + (int)(npoints >> 1);
 1916|       |
 1917|   604k|  y1 = y0 + (int)(npoints >> 2);
 1918|   604k|  y3 = y2 + (int)(npoints >> 2);
 1919|   604k|  l1 = norm + 1;
 1920|   604k|  j0 = 8;
 1921|   604k|  n0 = npoints >> 1;
 1922|       |
 1923|   604k|  j = 0;
 1924|  3.02M|  for (i = 0; i < 4; i++) {
  ------------------
  |  Branch (1924:15): [True: 2.41M, False: 604k]
  ------------------
 1925|  2.41M|    int t1, t2;
 1926|  2.41M|    h2 = rev_dig[i];
 1927|       |
 1928|  2.41M|    t1 = h2 << 1;
 1929|  2.41M|    t2 = t1 + 1;
 1930|       |
 1931|  2.41M|    y0[t1] = ixheaac_add32_sat(x0[0], x0[2]);
 1932|  2.41M|    y2[t1] = ixheaac_sub32_sat(x0[0], x0[2]);
 1933|  2.41M|    y0[t2] = ixheaac_add32_sat(x0[1], x0[3]);
 1934|  2.41M|    y2[t2] = ixheaac_sub32_sat(x0[1], x0[3]);
 1935|  2.41M|    y1[t1] = ixheaac_add32_sat(x0[4], x0[6]);
 1936|  2.41M|    y3[t1] = ixheaac_sub32_sat(x0[4], x0[6]);
 1937|  2.41M|    y1[t2] = ixheaac_add32_sat(x0[5], x0[7]);
 1938|  2.41M|    y3[t2] = ixheaac_sub32_sat(x0[5], x0[7]);
 1939|  2.41M|    x0 += 8;
 1940|       |
 1941|  2.41M|    t1 += 2;
 1942|  2.41M|    t2 += 2;
 1943|       |
 1944|  2.41M|    y0[t1] = ixheaac_add32_sat(x2[0], x2[2]);
 1945|  2.41M|    y2[t1] = ixheaac_sub32_sat(x2[0], x2[2]);
 1946|  2.41M|    y0[t2] = ixheaac_add32_sat(x2[1], x2[3]);
 1947|  2.41M|    y2[t2] = ixheaac_sub32_sat(x2[1], x2[3]);
 1948|  2.41M|    y1[t1] = ixheaac_add32_sat(x2[4], x2[6]);
 1949|  2.41M|    y3[t1] = ixheaac_sub32_sat(x2[4], x2[6]);
 1950|  2.41M|    y1[t2] = ixheaac_add32_sat(x2[5], x2[7]);
 1951|  2.41M|    y3[t2] = ixheaac_sub32_sat(x2[5], x2[7]);
 1952|  2.41M|    x2 += 8;
 1953|       |
 1954|  2.41M|    j += j0;
 1955|       |
 1956|  2.41M|    if (j == n0)
  ------------------
  |  Branch (1956:9): [True: 604k, False: 1.81M]
  ------------------
 1957|   604k|    {
 1958|   604k|      j += n0;
 1959|   604k|      x0 += (int)npoints >> 1;
 1960|   604k|      x2 += (int)npoints >> 1;
 1961|   604k|    }
 1962|  2.41M|  }
 1963|   604k|}
ixheaacd_dec_rearrange_short:
 1965|  2.88M|VOID ixheaacd_dec_rearrange_short(WORD32 *ip, WORD32 *op, WORD32 mdct_len_2, WORD16 *re_arr_tab) {
 1966|  2.88M|  WORD32 n, i = 0;
 1967|       |
 1968|  90.4M|  for (n = 0; n < mdct_len_2; n++) {
  ------------------
  |  Branch (1968:15): [True: 87.5M, False: 2.88M]
  ------------------
 1969|  87.5M|    WORD32 idx = re_arr_tab[n] << 1;
 1970|  87.5M|    op[i++] = ip[idx];
 1971|  87.5M|    op[i++] = ip[idx + 1];
 1972|  87.5M|  }
 1973|  2.88M|}
ixheaacd_ld_dec_fft_15_opt:
 1976|  1.28M|                                WORD16 *ptr_re_arr_tab_sml_240) {
 1977|  1.28M|  WORD32 i, n, idx;
 1978|  1.28M|  WORD32 *buf1, *buf2, *buf1a;
 1979|  1.28M|  WORD32 add_r, sub_r;
 1980|  1.28M|  WORD32 add_i, sub_i;
 1981|  1.28M|  WORD32 x_01_r, x_01_i, temp;
 1982|  1.28M|  WORD32 p1, p2, p3, p4;
 1983|       |
 1984|  1.28M|  WORD32 sinmu = 1859775393;
 1985|  1.28M|  WORD32 c_51 = 2042378317;
 1986|  1.28M|  WORD32 c_52 = -1652318768;
 1987|  1.28M|  WORD32 c_53 = -780119100;
 1988|  1.28M|  WORD32 c_54 = 1200479854;
 1989|  1.28M|  WORD32 c_55 = -1342177280;
 1990|       |
 1991|  1.28M|  WORD32 r1, r2, r3, r4;
 1992|  1.28M|  WORD32 s1, s2, s3, s4, t, temp1, temp2;
 1993|  1.28M|  WORD32 *fft3outptr = fft3out;
 1994|       |
 1995|  1.28M|  WORD32 xr_0, xr_1, xr_2;
 1996|  1.28M|  WORD32 xi_0, xi_1, xi_2;
 1997|       |
 1998|  1.28M|  buf2 = fft3out;
 1999|  1.28M|  buf1 = buf1a = fft3out;
 2000|  1.28M|  n = 0;
 2001|       |
 2002|  1.28M|  {
 2003|  1.28M|    *buf1++ = inp[0];
 2004|  1.28M|    *buf1++ = inp[1];
 2005|       |
 2006|  1.28M|    *buf1++ = inp[192];
 2007|  1.28M|    *buf1++ = inp[193];
 2008|       |
 2009|  1.28M|    *buf1++ = inp[384];
 2010|  1.28M|    *buf1++ = inp[385];
 2011|       |
 2012|  1.28M|    *buf1++ = inp[576];
 2013|  1.28M|    *buf1++ = inp[577];
 2014|       |
 2015|  1.28M|    *buf1++ = inp[768];
 2016|  1.28M|    *buf1++ = inp[769];
 2017|       |
 2018|  1.28M|    r1 = ixheaac_add32_sat(buf1a[2], buf1a[8]);
 2019|  1.28M|    r4 = ixheaac_sub32_sat(buf1a[2], buf1a[8]);
 2020|  1.28M|    r3 = ixheaac_add32_sat(buf1a[4], buf1a[6]);
 2021|  1.28M|    r2 = ixheaac_sub32_sat(buf1a[4], buf1a[6]);
 2022|       |
 2023|  1.28M|    t = ixheaac_mult32_shl(ixheaac_sub32_sat(r1, r3), c_54);
 2024|       |
 2025|  1.28M|    r1 = ixheaac_add32_sat(r1, r3);
 2026|       |
 2027|  1.28M|    temp1 = ixheaac_add32_sat(buf1a[0], r1);
 2028|       |
 2029|  1.28M|    r1 = ixheaac_add32_sat(temp1, (ixheaac_mult32_shl(r1, c_55) << 1));
 2030|       |
 2031|  1.28M|    r3 = ixheaac_sub32_sat(r1, t);
 2032|  1.28M|    r1 = ixheaac_add32_sat(r1, t);
 2033|       |
 2034|  1.28M|    t = ixheaac_mult32_shl(ixheaac_add32_sat(r4, r2), c_51);
 2035|  1.28M|    r4 = ixheaac_add32_sat(t, (ixheaac_mult32_shl(r4, c_52) << 1));
 2036|  1.28M|    r2 = ixheaac_add32_sat(t, ixheaac_mult32_shl(r2, c_53));
 2037|       |
 2038|  1.28M|    s1 = ixheaac_add32_sat(buf1a[3], buf1a[9]);
 2039|  1.28M|    s4 = ixheaac_sub32_sat(buf1a[3], buf1a[9]);
 2040|  1.28M|    s3 = ixheaac_add32_sat(buf1a[5], buf1a[7]);
 2041|  1.28M|    s2 = ixheaac_sub32_sat(buf1a[5], buf1a[7]);
 2042|       |
 2043|  1.28M|    t = ixheaac_mult32_shl(ixheaac_sub32_sat(s1, s3), c_54);
 2044|       |
 2045|  1.28M|    s1 = ixheaac_add32_sat(s1, s3);
 2046|       |
 2047|  1.28M|    temp2 = ixheaac_add32_sat(buf1a[1], s1);
 2048|       |
 2049|       |
 2050|  1.28M|    s1 = ixheaac_add32_sat(temp2, (ixheaac_mult32_shl(s1, c_55) << 1));
 2051|       |
 2052|  1.28M|    s3 = ixheaac_sub32_sat(s1, t);
 2053|  1.28M|    s1 = ixheaac_add32_sat(s1, t);
 2054|       |
 2055|  1.28M|    t = ixheaac_mult32_shl(ixheaac_add32_sat(s4, s2), c_51);
 2056|  1.28M|    s4 = ixheaac_add32_sat(t, (ixheaac_mult32_shl(s4, c_52) << 1));
 2057|  1.28M|    s2 = ixheaac_add32_sat(t, (ixheaac_mult32_shl(s2, c_53)));
 2058|       |
 2059|  1.28M|    *buf2++ = temp1;
 2060|  1.28M|    *buf2++ = temp2;
 2061|  1.28M|    *buf2++ = ixheaac_add32_sat(r1, s2);
 2062|  1.28M|    *buf2++ = ixheaac_sub32_sat(s1, r2);
 2063|  1.28M|    *buf2++ = ixheaac_sub32_sat(r3, s4);
 2064|  1.28M|    *buf2++ = ixheaac_add32_sat(s3, r4);
 2065|  1.28M|    *buf2++ = ixheaac_add32_sat(r3, s4);
 2066|  1.28M|    *buf2++ = ixheaac_sub32_sat(s3, r4);
 2067|  1.28M|    *buf2++ = ixheaac_sub32_sat(r1, s2);
 2068|  1.28M|    *buf2++ = ixheaac_add32_sat(s1, r2);
 2069|  1.28M|    buf1a = buf1;
 2070|       |
 2071|  1.28M|    *buf1++ = inp[320];
 2072|  1.28M|    *buf1++ = inp[321];
 2073|       |
 2074|  1.28M|    *buf1++ = inp[512];
 2075|  1.28M|    *buf1++ = inp[513];
 2076|       |
 2077|  1.28M|    *buf1++ = inp[704];
 2078|  1.28M|    *buf1++ = inp[705];
 2079|       |
 2080|  1.28M|    *buf1++ = inp[896];
 2081|  1.28M|    *buf1++ = inp[897];
 2082|       |
 2083|  1.28M|    *buf1++ = inp[128];
 2084|  1.28M|    *buf1++ = inp[129];
 2085|       |
 2086|  1.28M|    r1 = ixheaac_add32_sat(buf1a[2], buf1a[8]);
 2087|  1.28M|    r4 = ixheaac_sub32_sat(buf1a[2], buf1a[8]);
 2088|  1.28M|    r3 = ixheaac_add32_sat(buf1a[4], buf1a[6]);
 2089|  1.28M|    r2 = ixheaac_sub32_sat(buf1a[4], buf1a[6]);
 2090|       |
 2091|  1.28M|    t = ixheaac_mult32_shl(ixheaac_sub32_sat(r1, r3), c_54);
 2092|       |
 2093|  1.28M|    r1 = ixheaac_add32_sat(r1, r3);
 2094|       |
 2095|  1.28M|    temp1 = ixheaac_add32_sat(buf1a[0], r1);
 2096|       |
 2097|  1.28M|    r1 = ixheaac_add32_sat(temp1, (ixheaac_mult32_shl(r1, c_55) << 1));
 2098|       |
 2099|  1.28M|    r3 = ixheaac_sub32_sat(r1, t);
 2100|  1.28M|    r1 = ixheaac_add32_sat(r1, t);
 2101|       |
 2102|  1.28M|    t = ixheaac_mult32_shl(ixheaac_add32_sat(r4, r2), c_51);
 2103|  1.28M|    r4 = ixheaac_add32_sat(t, (ixheaac_mult32_shl(r4, c_52) << 1));
 2104|  1.28M|    r2 = ixheaac_add32_sat(t, ixheaac_mult32_shl(r2, c_53));
 2105|       |
 2106|  1.28M|    s1 = ixheaac_add32_sat(buf1a[3], buf1a[9]);
 2107|  1.28M|    s4 = ixheaac_sub32_sat(buf1a[3], buf1a[9]);
 2108|  1.28M|    s3 = ixheaac_add32_sat(buf1a[5], buf1a[7]);
 2109|  1.28M|    s2 = ixheaac_sub32_sat(buf1a[5], buf1a[7]);
 2110|       |
 2111|  1.28M|    t = ixheaac_mult32_shl(ixheaac_sub32_sat(s1, s3), c_54);
 2112|       |
 2113|  1.28M|    s1 = ixheaac_add32_sat(s1, s3);
 2114|       |
 2115|  1.28M|    temp2 = ixheaac_add32_sat(buf1a[1], s1);
 2116|       |
 2117|  1.28M|    s1 = ixheaac_add32_sat(temp2, (ixheaac_mult32_shl(s1, c_55) << 1));
 2118|       |
 2119|  1.28M|    s3 = ixheaac_sub32_sat(s1, t);
 2120|  1.28M|    s1 = ixheaac_add32_sat(s1, t);
 2121|       |
 2122|  1.28M|    t = ixheaac_mult32_shl(ixheaac_add32_sat(s4, s2), c_51);
 2123|  1.28M|    s4 = ixheaac_add32_sat(t, (ixheaac_mult32_shl(s4, c_52) << 1));
 2124|  1.28M|    s2 = ixheaac_add32_sat(t, ixheaac_mult32_shl(s2, c_53));
 2125|       |
 2126|  1.28M|    *buf2++ = temp1;
 2127|  1.28M|    *buf2++ = temp2;
 2128|  1.28M|    *buf2++ = ixheaac_add32_sat(r1, s2);
 2129|  1.28M|    *buf2++ = ixheaac_sub32_sat(s1, r2);
 2130|  1.28M|    *buf2++ = ixheaac_sub32_sat(r3, s4);
 2131|  1.28M|    *buf2++ = ixheaac_add32_sat(s3, r4);
 2132|  1.28M|    *buf2++ = ixheaac_add32_sat(r3, s4);
 2133|  1.28M|    *buf2++ = ixheaac_sub32_sat(s3, r4);
 2134|  1.28M|    *buf2++ = ixheaac_sub32_sat(r1, s2);
 2135|  1.28M|    *buf2++ = ixheaac_add32_sat(s1, r2);
 2136|  1.28M|    buf1a = buf1;
 2137|       |
 2138|  1.28M|    *buf1++ = inp[640];
 2139|  1.28M|    *buf1++ = inp[641];
 2140|       |
 2141|  1.28M|    *buf1++ = inp[832];
 2142|  1.28M|    *buf1++ = inp[833];
 2143|       |
 2144|  1.28M|    *buf1++ = inp[64];
 2145|  1.28M|    *buf1++ = inp[65];
 2146|       |
 2147|  1.28M|    *buf1++ = inp[256];
 2148|  1.28M|    *buf1++ = inp[257];
 2149|       |
 2150|  1.28M|    *buf1++ = inp[448];
 2151|  1.28M|    *buf1++ = inp[449];
 2152|       |
 2153|  1.28M|    r1 = ixheaac_add32_sat(buf1a[2], buf1a[8]);
 2154|  1.28M|    r4 = ixheaac_sub32_sat(buf1a[2], buf1a[8]);
 2155|  1.28M|    r3 = ixheaac_add32_sat(buf1a[4], buf1a[6]);
 2156|  1.28M|    r2 = ixheaac_sub32_sat(buf1a[4], buf1a[6]);
 2157|       |
 2158|  1.28M|    t = ixheaac_mult32_shl(ixheaac_sub32_sat(r1, r3), c_54);
 2159|       |
 2160|  1.28M|    r1 = ixheaac_add32_sat(r1, r3);
 2161|       |
 2162|  1.28M|    temp1 = ixheaac_add32_sat(buf1a[0], r1);
 2163|       |
 2164|  1.28M|    r1 = ixheaac_add32_sat(temp1, (ixheaac_mult32_shl(r1, c_55) << 1));
 2165|       |
 2166|  1.28M|    r3 = ixheaac_sub32_sat(r1, t);
 2167|  1.28M|    r1 = ixheaac_add32_sat(r1, t);
 2168|       |
 2169|  1.28M|    t = ixheaac_mult32_shl(ixheaac_add32_sat(r4, r2), c_51);
 2170|  1.28M|    r4 = ixheaac_add32_sat(t, ixheaac_mult32_shl(r4, c_52) << 1);
 2171|  1.28M|    r2 = ixheaac_add32_sat(t, ixheaac_mult32_shl(r2, c_53));
 2172|       |
 2173|  1.28M|    s1 = ixheaac_add32_sat(buf1a[3], buf1a[9]);
 2174|  1.28M|    s4 = ixheaac_sub32_sat(buf1a[3], buf1a[9]);
 2175|  1.28M|    s3 = ixheaac_add32_sat(buf1a[5], buf1a[7]);
 2176|  1.28M|    s2 = ixheaac_sub32_sat(buf1a[5], buf1a[7]);
 2177|       |
 2178|  1.28M|    t = ixheaac_mult32_shl(ixheaac_sub32_sat(s1, s3), c_54);
 2179|       |
 2180|  1.28M|    s1 = ixheaac_add32_sat(s1, s3);
 2181|       |
 2182|  1.28M|    temp2 = ixheaac_add32_sat(buf1a[1], s1);
 2183|       |
 2184|  1.28M|    s1 = ixheaac_add32_sat(temp2, (ixheaac_mult32_shl(s1, c_55) << 1));
 2185|       |
 2186|  1.28M|    s3 = ixheaac_sub32_sat(s1, t);
 2187|  1.28M|    s1 = ixheaac_add32_sat(s1, t);
 2188|       |
 2189|  1.28M|    t = ixheaac_mult32_shl(ixheaac_add32_sat(s4, s2), c_51);
 2190|  1.28M|    s4 = ixheaac_add32_sat(t, (ixheaac_mult32_shl(s4, c_52) << 1));
 2191|  1.28M|    s2 = ixheaac_add32_sat(t, ixheaac_mult32_shl(s2, c_53));
 2192|       |
 2193|  1.28M|    *buf2++ = temp1;
 2194|  1.28M|    *buf2++ = temp2;
 2195|  1.28M|    *buf2++ = ixheaac_add32_sat(r1, s2);
 2196|  1.28M|    *buf2++ = ixheaac_sub32_sat(s1, r2);
 2197|  1.28M|    *buf2++ = ixheaac_sub32_sat(r3, s4);
 2198|  1.28M|    *buf2++ = ixheaac_add32_sat(s3, r4);
 2199|  1.28M|    *buf2++ = ixheaac_add32_sat(r3, s4);
 2200|  1.28M|    *buf2++ = ixheaac_sub32_sat(s3, r4);
 2201|  1.28M|    *buf2++ = ixheaac_sub32_sat(r1, s2);
 2202|  1.28M|    *buf2++ = ixheaac_add32_sat(s1, r2);
 2203|  1.28M|    buf1a = buf1;
 2204|  1.28M|  }
 2205|       |
 2206|  1.28M|  n = 0;
 2207|  7.73M|  for (i = 0; i < FFT5; i++) {
  ------------------
  |  |   70|  7.73M|#define FFT5 5
  ------------------
  |  Branch (2207:15): [True: 6.44M, False: 1.28M]
  ------------------
 2208|  6.44M|    xr_0 = fft3outptr[0];
 2209|  6.44M|    xi_0 = fft3outptr[1];
 2210|       |
 2211|  6.44M|    xr_1 = fft3outptr[10];
 2212|  6.44M|    xi_1 = fft3outptr[11];
 2213|       |
 2214|  6.44M|    xr_2 = fft3outptr[20];
 2215|  6.44M|    xi_2 = fft3outptr[21];
 2216|       |
 2217|  6.44M|    x_01_r = ixheaac_add32_sat(xr_0, xr_1);
 2218|  6.44M|    x_01_i = ixheaac_add32_sat(xi_0, xi_1);
 2219|       |
 2220|  6.44M|    add_r = ixheaac_add32_sat(xr_1, xr_2);
 2221|  6.44M|    add_i = ixheaac_add32_sat(xi_1, xi_2);
 2222|       |
 2223|  6.44M|    sub_r = ixheaac_sub32_sat(xr_1, xr_2);
 2224|  6.44M|    sub_i = ixheaac_sub32_sat(xi_1, xi_2);
 2225|       |
 2226|  6.44M|    p1 = add_r >> 1;
 2227|       |
 2228|  6.44M|    p2 = ixheaac_mult32_shl(sub_i, sinmu);
 2229|  6.44M|    p3 = ixheaac_mult32_shl(sub_r, sinmu);
 2230|       |
 2231|  6.44M|    p4 = add_i >> 1;
 2232|       |
 2233|  6.44M|    temp = ixheaac_sub32_sat(xr_0, p1);
 2234|  6.44M|    temp1 = ixheaac_add32_sat(xi_0, p3);
 2235|  6.44M|    temp2 = ixheaac_sub32_sat(xi_0, p3);
 2236|       |
 2237|  6.44M|    idx = ptr_re_arr_tab_sml_240[n++] << 1;
 2238|  6.44M|    op[idx] = ixheaac_add32_sat(x_01_r, xr_2);
 2239|  6.44M|    op[idx + 1] = ixheaac_add32_sat(x_01_i, xi_2);
 2240|       |
 2241|  6.44M|    idx = ptr_re_arr_tab_sml_240[n++] << 1;
 2242|  6.44M|    op[idx] = ixheaac_add32_sat(temp, p2);
 2243|  6.44M|    op[idx + 1] = ixheaac_sub32_sat(temp2, p4);
 2244|       |
 2245|  6.44M|    idx = ptr_re_arr_tab_sml_240[n++] << 1;
 2246|  6.44M|    op[idx] = ixheaac_sub32_sat(temp, p2);
 2247|  6.44M|    op[idx + 1] = ixheaac_sub32_sat(temp1, p4);
 2248|  6.44M|    fft3outptr += 2;
 2249|  6.44M|  }
 2250|  1.28M|  return;
 2251|  1.28M|}
ixheaacd_fft_120:
 2254|   189k|                      WORD32 npoints, WORD32* ptr_x, WORD32* ptr_y) {
 2255|   189k|  WORD32 i;
 2256|   189k|  WORD32 *buf1, *buf2;
 2257|   189k|  WORD32 *inp, *op;
 2258|       |
 2259|   189k|  inp = ptr_x;
 2260|   189k|  op = ptr_y;
 2261|       |
 2262|   189k|  ixheaacd_dec_rearrange_short(inp, op, 60, imdct_tables_ptr->re_arr_tab_4);
 2263|   189k|  buf1 = op;
 2264|   189k|  buf2 = inp;
 2265|       |
 2266|  3.03M|  for (i = 0; i < FFT15; i++) {
  ------------------
  |  |   74|  3.03M|#define FFT15 15
  ------------------
  |  Branch (2266:15): [True: 2.84M, False: 189k]
  ------------------
 2267|  2.84M|    {
 2268|  2.84M|      WORD32   x_0, x_1, x_2, x_3, x_4, x_5, x_6, x_7;
 2269|  2.84M|      WORD32   *y0, *y1, *y2, *y3;
 2270|  2.84M|      WORD32   *x0;
 2271|  2.84M|      WORD32   xh0_0, xh1_0, xh0_1, xh1_1, xl0_0, xl1_0, xl0_1, xl1_1;
 2272|  2.84M|      WORD32   h2;
 2273|  2.84M|      WORD32   n00, n01, n10, n11, n20, n21, n30, n31;
 2274|       |
 2275|  2.84M|      ptr_x = buf1;
 2276|  2.84M|      ptr_y = buf2;
 2277|  2.84M|      npoints = 4;
 2278|  2.84M|      h2 = 0;
 2279|       |
 2280|  2.84M|      y0 = ptr_y;
 2281|  2.84M|      y2 = ptr_y + (WORD32)npoints;
 2282|  2.84M|      x0 = ptr_x;
 2283|       |
 2284|  2.84M|      y1 = y0 + (WORD32)(npoints >> 1);
 2285|  2.84M|      y3 = y2 + (WORD32)(npoints >> 1);
 2286|       |
 2287|  2.84M|      x_0 = x0[0];         x_1 = x0[1];
 2288|  2.84M|      x_2 = x0[2];         x_3 = x0[3];
 2289|  2.84M|      x_4 = x0[4];         x_5 = x0[5];
 2290|  2.84M|      x_6 = x0[6];         x_7 = x0[7];
 2291|  2.84M|      x0 += 8;
 2292|       |
 2293|  2.84M|      xh0_0 = ixheaac_add32_sat(x_0, x_4);
 2294|  2.84M|      xh1_0 = ixheaac_add32_sat(x_1, x_5);
 2295|  2.84M|      xl0_0 = ixheaac_sub32_sat(x_0, x_4);
 2296|  2.84M|      xl1_0 = ixheaac_sub32_sat(x_1, x_5);
 2297|  2.84M|      xh0_1 = ixheaac_add32_sat(x_2, x_6);
 2298|  2.84M|      xh1_1 = ixheaac_add32_sat(x_3, x_7);
 2299|  2.84M|      xl0_1 = ixheaac_sub32_sat(x_2, x_6);
 2300|  2.84M|      xl1_1 = ixheaac_sub32_sat(x_3, x_7);
 2301|       |
 2302|  2.84M|      n00 = ixheaac_add32_sat(xh0_0, xh0_1);
 2303|  2.84M|      n01 = ixheaac_add32_sat(xh1_0, xh1_1);
 2304|  2.84M|      n10 = ixheaac_add32_sat(xl0_0, xl1_1);
 2305|  2.84M|      n11 = ixheaac_sub32_sat(xl1_0, xl0_1);
 2306|  2.84M|      n20 = ixheaac_sub32_sat(xh0_0, xh0_1);
 2307|  2.84M|      n21 = ixheaac_sub32_sat(xh1_0, xh1_1);
 2308|  2.84M|      n30 = ixheaac_sub32_sat(xl0_0, xl1_1);
 2309|  2.84M|      n31 = ixheaac_add32_sat(xl1_0, xl0_1);
 2310|       |
 2311|  2.84M|      y0[2 * h2] = n00;            y0[2 * h2 + 1] = n01;
 2312|  2.84M|      y1[2 * h2] = n10;            y1[2 * h2 + 1] = n11;
 2313|  2.84M|      y2[2 * h2] = n20;            y2[2 * h2 + 1] = n21;
 2314|  2.84M|      y3[2 * h2] = n30;            y3[2 * h2 + 1] = n31;
 2315|  2.84M|    }
 2316|  2.84M|    buf1 += (FFT4 * 2);
  ------------------
  |  |   72|  2.84M|#define FFT4 4
  ------------------
 2317|  2.84M|    buf2 += (FFT4 * 2);
  ------------------
  |  |   72|  2.84M|#define FFT4 4
  ------------------
 2318|  2.84M|  }
 2319|       |
 2320|   189k|  ixheaacd_dec_rearrange_short(inp, op, 60, imdct_tables_ptr->re_arr_tab_15_4);
 2321|       |
 2322|   189k|  buf1 = op;
 2323|   189k|  buf2 = inp;
 2324|       |
 2325|   947k|  for (i = 0; i < FFT4; i++) {
  ------------------
  |  |   72|   947k|#define FFT4 4
  ------------------
  |  Branch (2325:15): [True: 757k, False: 189k]
  ------------------
 2326|   757k|    ixheaacd_fft_960_15(buf1, buf2, imdct_tables_ptr);
 2327|   757k|    buf1 += (FFT15 * 2);
  ------------------
  |  |   74|   757k|#define FFT15 15
  ------------------
 2328|   757k|    buf2 += (FFT15 * 2);
  ------------------
  |  |   74|   757k|#define FFT15 15
  ------------------
 2329|   757k|  }
 2330|       |
 2331|   189k|  ixheaacd_dec_rearrange_short(inp, op, 60, imdct_tables_ptr->re_arr_tab_120);
 2332|   189k|}
ixheaacd_fft_960_15:
 2335|   757k|                         ia_aac_dec_imdct_tables_struct *imdct_tables_ptr) {
 2336|   757k|  WORD32 i;
 2337|   757k|  WORD32 *buf1, *buf2;
 2338|       |
 2339|   757k|  ixheaacd_dec_rearrange_short(inp, op, FFT15, imdct_tables_ptr->re_arr_tab_5);
  ------------------
  |  |   74|   757k|#define FFT15 15
  ------------------
 2340|       |
 2341|   757k|  buf1 = op;
 2342|   757k|  buf2 = inp;
 2343|       |
 2344|  3.03M|  for (i = 0; i < FFT3; i++) {
  ------------------
  |  |   73|  3.03M|#define FFT3 3
  ------------------
  |  Branch (2344:15): [True: 2.27M, False: 757k]
  ------------------
 2345|  2.27M|    ixheaacd_fft_5(buf1, buf2);
 2346|       |
 2347|  2.27M|    buf1 += (FFT5 * 2);
  ------------------
  |  |   70|  2.27M|#define FFT5 5
  ------------------
 2348|  2.27M|    buf2 += (FFT5 * 2);
  ------------------
  |  |   70|  2.27M|#define FFT5 5
  ------------------
 2349|  2.27M|  }
 2350|       |
 2351|   757k|  ixheaacd_dec_rearrange_short(inp, op, FFT15, imdct_tables_ptr->re_arr_tab_3);
  ------------------
  |  |   74|   757k|#define FFT15 15
  ------------------
 2352|       |
 2353|   757k|  buf1 = op;
 2354|   757k|  buf2 = inp;
 2355|       |
 2356|  4.54M|  for (i = 0; i < FFT5; i++) {
  ------------------
  |  |   70|  4.54M|#define FFT5 5
  ------------------
  |  Branch (2356:15): [True: 3.78M, False: 757k]
  ------------------
 2357|  3.78M|    ixheaacd_fft_3(buf1, buf2);
 2358|       |
 2359|  3.78M|    buf1 += (FFT3 * 2);
  ------------------
  |  |   73|  3.78M|#define FFT3 3
  ------------------
 2360|  3.78M|    buf2 += (FFT3 * 2);
  ------------------
  |  |   73|  3.78M|#define FFT3 3
  ------------------
 2361|  3.78M|  }
 2362|       |
 2363|   757k|  ixheaacd_dec_rearrange_short(inp, op, FFT15, imdct_tables_ptr->re_arr_tab_sml);
  ------------------
  |  |   74|   757k|#define FFT15 15
  ------------------
 2364|   757k|}
ixheaacd_fft_3:
 2366|  3.78M|VOID ixheaacd_fft_3(WORD32 *inp, WORD32 *op) {
 2367|  3.78M|  WORD32 add_r, sub_r;
 2368|  3.78M|  WORD32 add_i, sub_i;
 2369|  3.78M|  WORD32 x_01_r, x_01_i, temp;
 2370|       |
 2371|  3.78M|  WORD32 p1, p2, p3, p4;
 2372|  3.78M|  WORD32 sinmu = 1859775393;
 2373|       |
 2374|  3.78M|  x_01_r = ixheaac_add32_sat(inp[0], inp[2]);
 2375|  3.78M|  x_01_i = ixheaac_add32_sat(inp[1], inp[3]);
 2376|       |
 2377|  3.78M|  add_r = ixheaac_add32_sat(inp[2], inp[4]);
 2378|  3.78M|  add_i = ixheaac_add32_sat(inp[3], inp[5]);
 2379|       |
 2380|  3.78M|  sub_r = ixheaac_sub32_sat(inp[2], inp[4]);
 2381|  3.78M|  sub_i = ixheaac_sub32_sat(inp[3], inp[5]);
 2382|       |
 2383|  3.78M|  p1 = add_r >> 1;
 2384|  3.78M|  p2 = ixheaac_mult32_shl(sub_i, sinmu);
 2385|  3.78M|  p3 = ixheaac_mult32_shl(sub_r, sinmu);
 2386|  3.78M|  p4 = add_i >> 1;
 2387|       |
 2388|  3.78M|  temp = ixheaac_sub32_sat(inp[0], p1);
 2389|       |
 2390|  3.78M|  op[0] = ixheaac_add32_sat(x_01_r, inp[4]);
 2391|  3.78M|  op[1] = ixheaac_add32_sat(x_01_i, inp[5]);
 2392|  3.78M|  op[2] = ixheaac_add32_sat(temp, p2);
 2393|  3.78M|  op[3] = ixheaac_sub32_sat(ixheaac_sub32_sat(inp[1], p3), p4);
 2394|  3.78M|  op[4] = ixheaac_sub32_sat(temp, p2);
 2395|  3.78M|  op[5] = ixheaac_sub32_sat(ixheaac_add32_sat(inp[1], p3), p4);
 2396|  3.78M|}
ixheaacd_fft_5:
 2398|  2.27M|VOID ixheaacd_fft_5(WORD32 *inp, WORD32 *op) {
 2399|  2.27M|  WORD32 c_51 = 2042378317;
 2400|  2.27M|  WORD32 c_52 = -1652318768;
 2401|  2.27M|  WORD32 c_53 = -780119100;
 2402|  2.27M|  WORD32 c_54 = 1200479854;
 2403|  2.27M|  WORD32 c_55 = -1342177280;
 2404|       |
 2405|  2.27M|  WORD32 r1, r2, r3, r4;
 2406|  2.27M|  WORD32 s1, s2, s3, s4, t, temp1, temp2;
 2407|       |
 2408|  2.27M|  r1 = ixheaac_add32_sat(inp[2], inp[8]);
 2409|  2.27M|  r4 = ixheaac_sub32_sat(inp[2], inp[8]);
 2410|  2.27M|  r3 = ixheaac_add32_sat(inp[4], inp[6]);
 2411|  2.27M|  r2 = ixheaac_sub32_sat(inp[4], inp[6]);
 2412|       |
 2413|  2.27M|  t = ixheaac_mult32_shl(ixheaac_sub32_sat(r1, r3), c_54);
 2414|  2.27M|  r1 = ixheaac_add32_sat(r1, r3);
 2415|       |
 2416|  2.27M|  temp1 = ixheaac_add32_sat(inp[0], r1);
 2417|  2.27M|  r1 = ixheaac_add32_sat(
 2418|  2.27M|      temp1, ixheaac_shl32_sat((ixheaac_mult32_shl(r1, c_55)), 1));
 2419|       |
 2420|  2.27M|  r3 = ixheaac_sub32_sat(r1, t);
 2421|  2.27M|  r1 = ixheaac_add32_sat(r1, t);
 2422|       |
 2423|  2.27M|  t = ixheaac_mult32_shl(ixheaac_add32_sat(r4, r2), c_51);
 2424|  2.27M|  r4 = ixheaac_add32_sat(
 2425|  2.27M|      t, ixheaac_shl32_sat(ixheaac_mult32_shl(r4, c_52), 1));
 2426|  2.27M|  r2 = ixheaac_add32_sat(t, ixheaac_mult32_shl(r2, c_53));
 2427|       |
 2428|  2.27M|  s1 = ixheaac_add32_sat(inp[3], inp[9]);
 2429|  2.27M|  s4 = ixheaac_sub32_sat(inp[3], inp[9]);
 2430|  2.27M|  s3 = ixheaac_add32_sat(inp[5], inp[7]);
 2431|  2.27M|  s2 = ixheaac_sub32_sat(inp[5], inp[7]);
 2432|       |
 2433|  2.27M|  t = ixheaac_mult32_shl(ixheaac_sub32_sat(s1, s3), c_54);
 2434|  2.27M|  s1 = ixheaac_add32_sat(s1, s3);
 2435|       |
 2436|  2.27M|  temp2 = ixheaac_add32_sat(inp[1], s1);
 2437|       |
 2438|  2.27M|  s1 = ixheaac_add32_sat(
 2439|  2.27M|      temp2, ixheaac_shl32_sat((ixheaac_mult32_shl(s1, c_55)), 1));
 2440|       |
 2441|  2.27M|  s3 = ixheaac_sub32_sat(s1, t);
 2442|  2.27M|  s1 = ixheaac_add32_sat(s1, t);
 2443|       |
 2444|  2.27M|  t = ixheaac_mult32_shl(ixheaac_add32_sat(s4, s2), c_51);
 2445|  2.27M|  s4 = ixheaac_add32_sat(
 2446|  2.27M|      t, ixheaac_shl32_sat((ixheaac_mult32_shl(s4, c_52)), 1));
 2447|  2.27M|  s2 = ixheaac_add32_sat(t, (ixheaac_mult32_shl(s2, c_53)));
 2448|       |
 2449|  2.27M|  op[0] = temp1;
 2450|  2.27M|  op[1] = temp2;
 2451|  2.27M|  op[2] = ixheaac_add32_sat(r1, s2);
 2452|  2.27M|  op[3] = ixheaac_sub32_sat(s1, r2);
 2453|  2.27M|  op[4] = ixheaac_sub32_sat(r3, s4);
 2454|  2.27M|  op[5] = ixheaac_add32_sat(s3, r4);
 2455|  2.27M|  op[6] = ixheaac_add32_sat(r3, s4);
 2456|  2.27M|  op[7] = ixheaac_sub32_sat(s3, r4);
 2457|  2.27M|  op[8] = ixheaac_sub32_sat(r1, s2);
 2458|  2.27M|  op[9] = ixheaac_add32_sat(s1, r2);
 2459|  2.27M|}
ixheaacd_fft_480_ld:
 2462|  35.8k|                         ia_aac_dec_imdct_tables_struct *imdct_tables_ptr) {
 2463|  35.8k|  WORD32 i;
 2464|  35.8k|  WORD32 *buf1, *buf2;
 2465|  35.8k|  UWORD8 *re_arr_tab_sml_240_ptr;
 2466|       |
 2467|  35.8k|  (*ixheaacd_aac_ld_dec_rearrange)(inp, op, MDCT_LEN_BY2,
  ------------------
  |  |   69|  35.8k|#define MDCT_LEN_BY2 240
  ------------------
 2468|  35.8k|                                   imdct_tables_ptr->re_arr_tab_16);
 2469|       |
 2470|  35.8k|  buf1 = op;
 2471|  35.8k|  buf2 = inp;
 2472|       |
 2473|   573k|  for (i = 0; i < FFT15; i++) {
  ------------------
  |  |   74|   573k|#define FFT15 15
  ------------------
  |  Branch (2473:15): [True: 537k, False: 35.8k]
  ------------------
 2474|   537k|    (*ixheaacd_fft32x32_ld2)(imdct_tables_ptr, 16, buf1, buf2);
 2475|       |
 2476|   537k|    buf1 += (FFT16X2);
  ------------------
  |  |   75|   537k|#define FFT16X2 32
  ------------------
 2477|   537k|    buf2 += (FFT16X2);
  ------------------
  |  |   75|   537k|#define FFT16X2 32
  ------------------
 2478|   537k|  }
 2479|  35.8k|  re_arr_tab_sml_240_ptr = imdct_tables_ptr->re_arr_tab_sml_240;
 2480|  35.8k|  buf1 = inp;
 2481|       |
 2482|   609k|  for (i = 0; i < FFT16; i++) {
  ------------------
  |  |   71|   609k|#define FFT16 16
  ------------------
  |  Branch (2482:15): [True: 573k, False: 35.8k]
  ------------------
 2483|   573k|    (*ixheaacd_fft_15_ld)(buf1, op, ixheaacd_fft5out, re_arr_tab_sml_240_ptr);
 2484|   573k|    re_arr_tab_sml_240_ptr += FFT15;
  ------------------
  |  |   74|   573k|#define FFT15 15
  ------------------
 2485|   573k|    buf1 += 2;
 2486|   573k|  }
 2487|  35.8k|}
ixheaacd_pre_twiddle_960:
 2490|  40.2k|                              WORD32 *cos_sin_ptr, WORD32 neg_expo) {
 2491|  40.2k|  WORD npoints_4, i;
 2492|  40.2k|  WORD32 tempr, tempi, temp;
 2493|  40.2k|  WORD32 c, c1, s, s1;
 2494|  40.2k|  WORD32 *in_ptr1, *in_ptr2;
 2495|  40.2k|  WORD32 *xprt1 = xptr + (n - 1);
 2496|       |
 2497|  40.2k|  npoints_4 = n >> 2;
 2498|       |
 2499|  40.2k|  in_ptr1 = data;
 2500|  40.2k|  in_ptr2 = data + n - 1;
 2501|       |
 2502|  9.70M|  for (i = 0; i < npoints_4; i++) {
  ------------------
  |  Branch (2502:15): [True: 9.66M, False: 40.2k]
  ------------------
 2503|  9.66M|    c = *cos_sin_ptr++;
 2504|  9.66M|    s = *cos_sin_ptr++;
 2505|       |
 2506|  9.66M|    tempr = *in_ptr1++;
 2507|  9.66M|    tempi = *in_ptr2--;
 2508|       |
 2509|  9.66M|    temp = -ixheaac_add32(ixheaac_mult32x32in32(tempr, c),
 2510|  9.66M|                           ixheaac_mult32x32in32(tempi, s));
 2511|  9.66M|    *xptr++ = ixheaac_shr32_dir_sat(temp, neg_expo);
 2512|       |
 2513|  9.66M|    temp = -ixheaac_sub32(ixheaac_mult32x32in32(tempi, c),
 2514|  9.66M|                           ixheaac_mult32x32in32(tempr, s));
 2515|  9.66M|    *xptr++ = ixheaac_shr32_dir_sat(temp, neg_expo);
 2516|       |
 2517|  9.66M|    c1 = *cos_sin_ptr++;
 2518|  9.66M|    s1 = *cos_sin_ptr++;
 2519|       |
 2520|  9.66M|    tempi = *in_ptr1++;
 2521|  9.66M|    tempr = *in_ptr2--;
 2522|       |
 2523|  9.66M|    temp = -ixheaac_sub32(ixheaac_mult32x32in32(tempi, c1),
 2524|  9.66M|                           ixheaac_mult32x32in32(tempr, s1));
 2525|  9.66M|    *xprt1-- = ixheaac_shr32_dir_sat(temp, neg_expo);
 2526|       |
 2527|  9.66M|    temp = -ixheaac_add32(ixheaac_mult32x32in32(tempr, c1),
 2528|  9.66M|                           ixheaac_mult32x32in32(tempi, s1));
 2529|  9.66M|    *xprt1-- = ixheaac_shr32_dir_sat(temp, neg_expo);
 2530|  9.66M|  }
 2531|  40.2k|}
ixheaacd_pre_twiddle_120:
 2534|   189k|                              WORD16 *cos_sin_ptr, WORD32 neg_expo) {
 2535|   189k|  WORD npoints_4, i;
 2536|   189k|  WORD32 tempr, tempi, temp;
 2537|   189k|  WORD16 c, c1, s, s1;
 2538|   189k|  WORD32 *in_ptr1, *in_ptr2;
 2539|   189k|  WORD32 *xprt1 = xptr + (n - 1);
 2540|       |
 2541|   189k|  npoints_4 = n >> 2;
 2542|       |
 2543|   189k|  in_ptr1 = data;
 2544|   189k|  in_ptr2 = data + n - 1;
 2545|       |
 2546|  5.87M|  for (i = 0; i < npoints_4; i++) {
  ------------------
  |  Branch (2546:15): [True: 5.68M, False: 189k]
  ------------------
 2547|  5.68M|    c = *cos_sin_ptr++;
 2548|  5.68M|    s = *cos_sin_ptr++;
 2549|       |
 2550|  5.68M|    tempr = *in_ptr1++;
 2551|  5.68M|    tempi = *in_ptr2--;
 2552|       |
 2553|  5.68M|    temp = -ixheaac_add32(ixheaac_mult32x16in32(tempr, c),
 2554|  5.68M|                           ixheaac_mult32x16in32(tempi, s));
 2555|  5.68M|    *xptr++ = ixheaac_shr32_dir_sat(temp, neg_expo);
 2556|       |
 2557|  5.68M|    temp = -ixheaac_sub32(ixheaac_mult32x16in32(tempi, c),
 2558|  5.68M|                           ixheaac_mult32x16in32(tempr, s));
 2559|  5.68M|    *xptr++ = ixheaac_shr32_dir_sat(temp, neg_expo);
 2560|       |
 2561|  5.68M|    c1 = *cos_sin_ptr++;
 2562|  5.68M|    s1 = *cos_sin_ptr++;
 2563|       |
 2564|  5.68M|    tempi = *in_ptr1++;
 2565|  5.68M|    tempr = *in_ptr2--;
 2566|       |
 2567|  5.68M|    temp = -ixheaac_sub32(ixheaac_mult32x16in32(tempi, c1),
 2568|  5.68M|                           ixheaac_mult32x16in32(tempr, s1));
 2569|  5.68M|    *xprt1-- = ixheaac_shr32_dir_sat(temp, neg_expo);
 2570|       |
 2571|  5.68M|    temp = -ixheaac_add32(ixheaac_mult32x16in32(tempr, c1),
 2572|  5.68M|                           ixheaac_mult32x16in32(tempi, s1));
 2573|  5.68M|    *xprt1-- = ixheaac_shr32_dir_sat(temp, neg_expo);
 2574|  5.68M|  }
 2575|   189k|}
ixheaacd_pre_twiddle:
 2578|   105k|                          WORD32 *cos_sin_ptr, WORD32 neg_expo) {
 2579|   105k|  WORD npoints_4, i;
 2580|   105k|  WORD32 tempr, tempi, temp;
 2581|   105k|  WORD32 c, c1, s, s1;
 2582|   105k|  WORD32 *in_ptr1, *in_ptr2;
 2583|       |
 2584|   105k|  npoints_4 = n >> 2;
 2585|       |
 2586|   105k|  in_ptr1 = data;
 2587|   105k|  in_ptr2 = data + n - 1;
 2588|       |
 2589|   105k|  if (neg_expo >= 0) {
  ------------------
  |  Branch (2589:7): [True: 28.4k, False: 76.7k]
  ------------------
 2590|  3.57M|    for (i = npoints_4 - 1; i >= 0; i--) {
  ------------------
  |  Branch (2590:29): [True: 3.54M, False: 28.4k]
  ------------------
 2591|  3.54M|      c = *cos_sin_ptr++;
 2592|  3.54M|      c1 = *cos_sin_ptr++;
 2593|  3.54M|      s = *cos_sin_ptr++;
 2594|  3.54M|      s1 = *cos_sin_ptr++;
 2595|       |
 2596|  3.54M|      tempr = *in_ptr1;
 2597|  3.54M|      tempi = *in_ptr2;
 2598|       |
 2599|  3.54M|      in_ptr1 += 2;
 2600|  3.54M|      in_ptr2 -= 2;
 2601|       |
 2602|  3.54M|      temp =
 2603|  3.54M|          -ixheaac_add32(ixheaac_mult32(tempr, c), ixheaac_mult32(tempi, s));
 2604|  3.54M|      *xptr++ = ixheaac_shr32(temp, neg_expo);
 2605|       |
 2606|  3.54M|      temp =
 2607|  3.54M|          ixheaac_sub32(ixheaac_mult32(tempr, s), ixheaac_mult32(tempi, c));
 2608|  3.54M|      *xptr++ = ixheaac_shr32(temp, neg_expo);
 2609|       |
 2610|  3.54M|      tempr = *in_ptr1;
 2611|  3.54M|      tempi = *in_ptr2;
 2612|       |
 2613|  3.54M|      in_ptr1 += 2;
 2614|  3.54M|      in_ptr2 -= 2;
 2615|       |
 2616|  3.54M|      temp = -ixheaac_add32(ixheaac_mult32(tempr, c1),
 2617|  3.54M|                             ixheaac_mult32(tempi, s1));
 2618|  3.54M|      *xptr++ = ixheaac_shr32(temp, neg_expo);
 2619|       |
 2620|  3.54M|      temp = ixheaac_sub32(ixheaac_mult32(tempr, s1),
 2621|  3.54M|                            ixheaac_mult32(tempi, c1));
 2622|  3.54M|      *xptr++ = ixheaac_shr32(temp, neg_expo);
 2623|  3.54M|    }
 2624|  76.7k|  } else {
 2625|  76.7k|    neg_expo = -neg_expo;
 2626|       |
 2627|  9.70M|    for (i = npoints_4 - 1; i >= 0; i--) {
  ------------------
  |  Branch (2627:29): [True: 9.62M, False: 76.7k]
  ------------------
 2628|  9.62M|      c = *cos_sin_ptr++;
 2629|  9.62M|      c1 = *cos_sin_ptr++;
 2630|  9.62M|      s = *cos_sin_ptr++;
 2631|  9.62M|      s1 = *cos_sin_ptr++;
 2632|       |
 2633|  9.62M|      tempr = *in_ptr1;
 2634|  9.62M|      tempi = *in_ptr2;
 2635|       |
 2636|  9.62M|      in_ptr1 += 2;
 2637|  9.62M|      in_ptr2 -= 2;
 2638|       |
 2639|  9.62M|      temp =
 2640|  9.62M|          -ixheaac_add32(ixheaac_mult32(tempr, c), ixheaac_mult32(tempi, s));
 2641|  9.62M|      *xptr++ = ixheaac_shl32(temp, neg_expo);
 2642|       |
 2643|  9.62M|      temp =
 2644|  9.62M|          ixheaac_sub32(ixheaac_mult32(tempr, s), ixheaac_mult32(tempi, c));
 2645|  9.62M|      *xptr++ = ixheaac_shl32(temp, neg_expo);
 2646|       |
 2647|  9.62M|      tempr = *in_ptr1;
 2648|  9.62M|      tempi = *in_ptr2;
 2649|       |
 2650|  9.62M|      in_ptr1 += 2;
 2651|  9.62M|      in_ptr2 -= 2;
 2652|       |
 2653|  9.62M|      temp = -ixheaac_add32(ixheaac_mult32(tempr, c1),
 2654|  9.62M|                             ixheaac_mult32(tempi, s1));
 2655|  9.62M|      *xptr++ = ixheaac_shl32(temp, neg_expo);
 2656|       |
 2657|  9.62M|      temp = ixheaac_sub32(ixheaac_mult32(tempr, s1),
 2658|  9.62M|                            ixheaac_mult32(tempi, c1));
 2659|  9.62M|      *xptr++ = ixheaac_shl32(temp, neg_expo);
 2660|  9.62M|    }
 2661|  76.7k|  }
 2662|   105k|}
ixheaacd_post_twiddle_120:
 2665|   189k|                               const WORD16 *cos_sin_ptr, WORD m) {
 2666|   189k|  WORD i;
 2667|   189k|  WORD16 c, c1, s, s1;
 2668|   189k|  WORD32 tempr, tempi, temp;
 2669|   189k|  WORD32 *in_ptr2 = x + (m - 1);
 2670|   189k|  WORD32 *in_ptr1 = x;
 2671|   189k|  WORD32 *xptr = out;
 2672|   189k|  WORD32 *xptr1 = out + (m - 1);
 2673|       |
 2674|  5.87M|  for (i = 0; i < m; i += 4) {
  ------------------
  |  Branch (2674:15): [True: 5.68M, False: 189k]
  ------------------
 2675|  5.68M|    c = *cos_sin_ptr++;
 2676|  5.68M|    s = *cos_sin_ptr++;
 2677|  5.68M|    c1 = *cos_sin_ptr++;
 2678|  5.68M|    s1 = *cos_sin_ptr++;
 2679|       |
 2680|  5.68M|    tempr = *in_ptr1++;
 2681|  5.68M|    tempi = *in_ptr1++;
 2682|       |
 2683|  5.68M|    temp = -ixheaac_sub32_sat(ixheaac_mult32x16in32(tempr, s),
 2684|  5.68M|                               ixheaac_mult32x16in32(tempi, c));
 2685|  5.68M|    *xptr1-- = temp;
 2686|       |
 2687|  5.68M|    temp = -ixheaac_add32_sat(ixheaac_mult32x16in32(tempr, c),
 2688|  5.68M|                               ixheaac_mult32x16in32(tempi, s));
 2689|  5.68M|    *xptr++ = temp;
 2690|       |
 2691|  5.68M|    tempi = *in_ptr2--;
 2692|  5.68M|    tempr = *in_ptr2--;
 2693|       |
 2694|  5.68M|    temp = -ixheaac_sub32_sat(ixheaac_mult32x16in32(tempr, s1),
 2695|  5.68M|                               ixheaac_mult32x16in32(tempi, c1));
 2696|  5.68M|    *xptr++ = temp;
 2697|       |
 2698|  5.68M|    temp = -ixheaac_add32_sat(ixheaac_mult32x16in32(tempr, c1),
 2699|  5.68M|                               ixheaac_mult32x16in32(tempi, s1));
 2700|  5.68M|    *xptr1-- = temp;
 2701|  5.68M|  }
 2702|   189k|}
ixheaacd_post_twiddle_960:
 2705|  40.2k|                               const WORD32 *cos_sin_ptr, WORD m) {
 2706|  40.2k|  WORD i;
 2707|  40.2k|  WORD32 c, c1, s, s1;
 2708|  40.2k|  WORD32 tempr, tempi, temp;
 2709|  40.2k|  WORD32 *in_ptr2 = x + (m - 1);
 2710|  40.2k|  WORD32 *in_ptr1 = x;
 2711|  40.2k|  WORD32 *xptr = out;
 2712|  40.2k|  WORD32 *xptr1 = out + (m - 1);
 2713|       |
 2714|  9.70M|  for (i = 0; i < m; i += 4) {
  ------------------
  |  Branch (2714:15): [True: 9.66M, False: 40.2k]
  ------------------
 2715|  9.66M|    c = *cos_sin_ptr++;
 2716|  9.66M|    s = *cos_sin_ptr++;
 2717|  9.66M|    c1 = *cos_sin_ptr++;
 2718|  9.66M|    s1 = *cos_sin_ptr++;
 2719|       |
 2720|  9.66M|    tempr = *in_ptr1++;
 2721|  9.66M|    tempi = *in_ptr1++;
 2722|       |
 2723|  9.66M|    temp = -ixheaac_sub32_sat(ixheaac_mult32x32in32(tempr, s),
 2724|  9.66M|                               ixheaac_mult32x32in32(tempi, c));
 2725|  9.66M|    *xptr1-- = temp;
 2726|       |
 2727|  9.66M|    temp = -ixheaac_add32_sat(ixheaac_mult32x32in32(tempr, c),
 2728|  9.66M|                               ixheaac_mult32x32in32(tempi, s));
 2729|  9.66M|    *xptr++ = temp;
 2730|       |
 2731|  9.66M|    tempi = *in_ptr2--;
 2732|  9.66M|    tempr = *in_ptr2--;
 2733|       |
 2734|  9.66M|    temp = -ixheaac_sub32_sat(ixheaac_mult32x32in32(tempr, s1),
 2735|  9.66M|                               ixheaac_mult32x32in32(tempi, c1));
 2736|  9.66M|    *xptr++ = temp;
 2737|       |
 2738|  9.66M|    temp = -ixheaac_add32_sat(ixheaac_mult32x32in32(tempr, c1),
 2739|  9.66M|                               ixheaac_mult32x32in32(tempi, s1));
 2740|  9.66M|    *xptr1-- = temp;
 2741|  9.66M|  }
 2742|  40.2k|}
ixheaacd_post_twiddle_ld:
 2745|  63.4k|                              const WORD32 *cos_sin_ptr, WORD m) {
 2746|  63.4k|  WORD i;
 2747|       |
 2748|  63.4k|  WORD32 *ptr_x = &x[0];
 2749|  63.4k|  WORD32 *ptr_out, *ptr_out1;
 2750|       |
 2751|  63.4k|  ptr_out = &out[0];
 2752|  63.4k|  ptr_out1 = &out[m - 1];
 2753|       |
 2754|  8.07M|  for (i = (m >> 2) - 1; i >= 0; i--) {
  ------------------
  |  Branch (2754:26): [True: 8.00M, False: 63.4k]
  ------------------
 2755|  8.00M|    WORD32 c, c1, s, s1;
 2756|  8.00M|    WORD32 re, im;
 2757|       |
 2758|  8.00M|    c = *cos_sin_ptr++;
 2759|  8.00M|    c1 = *cos_sin_ptr++;
 2760|  8.00M|    s = *cos_sin_ptr++;
 2761|  8.00M|    s1 = *cos_sin_ptr++;
 2762|       |
 2763|  8.00M|    re = *ptr_x++;
 2764|  8.00M|    im = *ptr_x++;
 2765|       |
 2766|  8.00M|    *ptr_out1 = ixheaac_sub32(ixheaac_mult32(im, c), ixheaac_mult32(re, s));
 2767|       |
 2768|  8.00M|    *ptr_out = -ixheaac_add32(ixheaac_mult32(re, c), ixheaac_mult32(im, s));
 2769|       |
 2770|  8.00M|    ptr_out += 2;
 2771|  8.00M|    ptr_out1 -= 2;
 2772|       |
 2773|  8.00M|    re = *ptr_x++;
 2774|  8.00M|    im = *ptr_x++;
 2775|       |
 2776|  8.00M|    *ptr_out1 =
 2777|  8.00M|        ixheaac_sub32(ixheaac_mult32(im, c1), ixheaac_mult32(re, s1));
 2778|  8.00M|    *ptr_out =
 2779|  8.00M|        -ixheaac_add32(ixheaac_mult32(re, c1), ixheaac_mult32(im, s1));
 2780|       |
 2781|  8.00M|    ptr_out += 2;
 2782|  8.00M|    ptr_out1 -= 2;
 2783|  8.00M|  }
 2784|  63.4k|}
ixheaacd_post_twiddle_eld:
 2787|  41.7k|                               const WORD32 *cos_sin_ptr, WORD m) {
 2788|  41.7k|  WORD i = 0;
 2789|       |
 2790|  41.7k|  WORD32 *ptr_x = &x[0];
 2791|  41.7k|  WORD32 *ptr_out_767, *ptr_out_256;
 2792|  41.7k|  WORD32 *ptr_out_768, *ptr_out_255;
 2793|  41.7k|  WORD32 *ptr_out_0, *ptr_out_1279;
 2794|  41.7k|  WORD32 tempr, tempi;
 2795|       |
 2796|  41.7k|  ptr_out_767 = &out[m + (m >> 1) - 1 - 2 * i];
 2797|  41.7k|  ptr_out_256 = &out[(m >> 1) + 2 * i];
 2798|       |
 2799|  41.7k|  ptr_out_768 = &out[m + (m >> 1) + 2 * i];
 2800|  41.7k|  ptr_out_255 = &out[(m >> 1) - 1 - 2 * i];
 2801|       |
 2802|  2.62M|  for (i = 0; i < (m >> 3); i++) {
  ------------------
  |  Branch (2802:15): [True: 2.58M, False: 41.7k]
  ------------------
 2803|  2.58M|    WORD32 c, c1, s, s1;
 2804|  2.58M|    WORD32 re, im;
 2805|       |
 2806|  2.58M|    c = *cos_sin_ptr++;
 2807|  2.58M|    c1 = *cos_sin_ptr++;
 2808|  2.58M|    s = *cos_sin_ptr++;
 2809|  2.58M|    s1 = *cos_sin_ptr++;
 2810|       |
 2811|  2.58M|    re = *ptr_x++;
 2812|  2.58M|    im = *ptr_x++;
 2813|       |
 2814|  2.58M|    tempi = ixheaac_sub32(ixheaac_mult32(im, c), ixheaac_mult32(re, s));
 2815|  2.58M|    tempr = -ixheaac_add32(ixheaac_mult32(re, c), ixheaac_mult32(im, s));
 2816|       |
 2817|  2.58M|    *ptr_out_767 = tempr;
 2818|  2.58M|    *ptr_out_256 = tempi;
 2819|       |
 2820|  2.58M|    *ptr_out_768 = *ptr_out_767;
 2821|  2.58M|    *ptr_out_255 = -*ptr_out_256;
 2822|       |
 2823|  2.58M|    ptr_out_256 += 2;
 2824|  2.58M|    ptr_out_767 -= 2;
 2825|  2.58M|    ptr_out_768 += 2;
 2826|  2.58M|    ptr_out_255 -= 2;
 2827|       |
 2828|  2.58M|    re = *ptr_x++;
 2829|  2.58M|    im = *ptr_x++;
 2830|       |
 2831|  2.58M|    tempi = ixheaac_sub32(ixheaac_mult32(im, c1), ixheaac_mult32(re, s1));
 2832|  2.58M|    tempr = -ixheaac_add32(ixheaac_mult32(re, c1), ixheaac_mult32(im, s1));
 2833|       |
 2834|  2.58M|    *ptr_out_767 = tempr;
 2835|  2.58M|    *ptr_out_256 = tempi;
 2836|       |
 2837|  2.58M|    *ptr_out_768 = *ptr_out_767;
 2838|  2.58M|    *ptr_out_255 = -*ptr_out_256;
 2839|       |
 2840|  2.58M|    ptr_out_256 += 2;
 2841|  2.58M|    ptr_out_767 -= 2;
 2842|  2.58M|    ptr_out_768 += 2;
 2843|  2.58M|    ptr_out_255 -= 2;
 2844|  2.58M|  }
 2845|       |
 2846|  41.7k|  ptr_out_0 = &out[2 * 2 * i - (m >> 1)];
 2847|  41.7k|  ptr_out_1279 = &out[m + m + (m >> 1) - 1 - 2 * 2 * i];
 2848|       |
 2849|  2.62M|  for (; i < (m >> 2); i++) {
  ------------------
  |  Branch (2849:10): [True: 2.58M, False: 41.7k]
  ------------------
 2850|  2.58M|    WORD32 c, c1, s, s1;
 2851|  2.58M|    WORD32 re, im;
 2852|       |
 2853|  2.58M|    c = *cos_sin_ptr++;
 2854|  2.58M|    c1 = *cos_sin_ptr++;
 2855|  2.58M|    s = *cos_sin_ptr++;
 2856|  2.58M|    s1 = *cos_sin_ptr++;
 2857|       |
 2858|  2.58M|    re = *ptr_x++;
 2859|  2.58M|    im = *ptr_x++;
 2860|       |
 2861|  2.58M|    tempi = ixheaac_sub32(ixheaac_mult32(im, c), ixheaac_mult32(re, s));
 2862|  2.58M|    tempr = -ixheaac_add32(ixheaac_mult32(re, c), ixheaac_mult32(im, s));
 2863|       |
 2864|  2.58M|    *ptr_out_767 = tempr;
 2865|  2.58M|    *ptr_out_256 = tempi;
 2866|       |
 2867|  2.58M|    *ptr_out_0 = -*ptr_out_767;
 2868|  2.58M|    *ptr_out_1279 = *ptr_out_256;
 2869|       |
 2870|  2.58M|    ptr_out_256 += 2;
 2871|  2.58M|    ptr_out_767 -= 2;
 2872|  2.58M|    ptr_out_0 += 2;
 2873|  2.58M|    ptr_out_1279 -= 2;
 2874|       |
 2875|  2.58M|    re = *ptr_x++;
 2876|  2.58M|    im = *ptr_x++;
 2877|       |
 2878|  2.58M|    tempi = ixheaac_sub32(ixheaac_mult32(im, c1), ixheaac_mult32(re, s1));
 2879|  2.58M|    tempr = -ixheaac_add32(ixheaac_mult32(re, c1), ixheaac_mult32(im, s1));
 2880|       |
 2881|  2.58M|    *ptr_out_767 = tempr;
 2882|  2.58M|    *ptr_out_256 = tempi;
 2883|       |
 2884|  2.58M|    *ptr_out_0 = -*ptr_out_767;
 2885|  2.58M|    *ptr_out_1279 = *ptr_out_256;
 2886|       |
 2887|  2.58M|    ptr_out_256 += 2;
 2888|  2.58M|    ptr_out_767 -= 2;
 2889|  2.58M|    ptr_out_0 += 2;
 2890|  2.58M|    ptr_out_1279 -= 2;
 2891|  2.58M|  }
 2892|  41.7k|}
ixheaacd_fft32x32_ld_dec:
 2895|   606k|                              WORD32 npoints, WORD32 *ptr_x, WORD32 *ptr_y) {
 2896|   606k|  WORD32 i, j, l1, l2, h2, predj, tw_offset, stride, fft_jmp, k;
 2897|   606k|  WORD32 xt0_0, yt0_0, xt1_0, yt1_0, xt2_0, yt2_0;
 2898|   606k|  WORD32 xh0_0, xh1_0, xh20_0, xh21_0, xl0_0, xl1_0, xl20_0, xl21_0;
 2899|   606k|  WORD32 xh0_1, xh1_1, xl0_1, xl1_1;
 2900|   606k|  WORD32 x_0, x_1, x_2, x_3, x_l1_0, x_l1_1, x_l2_0, x_l2_1;
 2901|   606k|  WORD32 xh0_2, xh1_2, xl0_2, xl1_2, xh0_3, xh1_3, xl0_3, xl1_3;
 2902|   606k|  WORD32 x_4, x_5, x_6, x_7, x_h2_0, x_h2_1;
 2903|   606k|  WORD32 x_8, x_9, x_a, x_b, x_c, x_d, x_e, x_f;
 2904|   606k|  WORD32 si10, si20, si30, co10, co20, co30;
 2905|   606k|  WORD32 *w;
 2906|   606k|  WORD32 *x, *x2, *x0;
 2907|   606k|  WORD32 *y0, *y1, *y2, *y3;
 2908|   606k|  WORD32 n00, n10, n20, n30, n01, n11, n21, n31;
 2909|   606k|  WORD32 n02, n12, n22, n32, n03, n13, n23, n33;
 2910|   606k|  WORD32 n0, j0;
 2911|   606k|  WORD32 radix;
 2912|   606k|  WORD32 norm;
 2913|   606k|  WORD32 m;
 2914|   606k|  WORD32 *ptr_w;
 2915|       |
 2916|   606k|  if (npoints == 256)
  ------------------
  |  Branch (2916:7): [True: 69.3k, False: 537k]
  ------------------
 2917|  69.3k|    ptr_w = imdct_tables_ptr->w_256;
 2918|   537k|  else if (npoints == 32)
  ------------------
  |  Branch (2918:12): [True: 0, False: 537k]
  ------------------
 2919|      0|    ptr_w = (WORD32*)imdct_tables_ptr->w_32;
 2920|   537k|  else
 2921|   537k|    ptr_w = imdct_tables_ptr->w_16;
 2922|       |
 2923|  16.7M|  for (i = 31, m = 1; (npoints & (1 << i)) == 0; i--, m++)
  ------------------
  |  Branch (2923:23): [True: 16.1M, False: 606k]
  ------------------
 2924|  16.1M|    ;
 2925|   606k|  radix = m & 1 ? 2 : 4;
  ------------------
  |  Branch (2925:11): [True: 0, False: 606k]
  ------------------
 2926|   606k|  norm = m - 2;
 2927|       |
 2928|   606k|  stride = npoints;
 2929|   606k|  tw_offset = 0;
 2930|   606k|  fft_jmp = 6 * stride;
 2931|       |
 2932|  1.35M|  while (stride > radix) {
  ------------------
  |  Branch (2932:10): [True: 745k, False: 606k]
  ------------------
 2933|   745k|    j = 0;
 2934|   745k|    fft_jmp >>= 2;
 2935|       |
 2936|   745k|    h2 = stride >> 1;
 2937|   745k|    l1 = stride;
 2938|   745k|    l2 = stride + (stride >> 1);
 2939|       |
 2940|   745k|    x = ptr_x;
 2941|   745k|    w = ptr_w + tw_offset;
 2942|   745k|    tw_offset += fft_jmp;
 2943|       |
 2944|   745k|    stride >>= 2;
 2945|       |
 2946|  16.2M|    for (i = 0; i < npoints; i += 4) {
  ------------------
  |  Branch (2946:17): [True: 15.4M, False: 745k]
  ------------------
 2947|  15.4M|      co10 = w[j + 1];
 2948|  15.4M|      si10 = w[j + 0];
 2949|  15.4M|      co20 = w[j + 3];
 2950|  15.4M|      si20 = w[j + 2];
 2951|  15.4M|      co30 = w[j + 5];
 2952|  15.4M|      si30 = w[j + 4];
 2953|       |
 2954|  15.4M|      x_0 = x[0];
 2955|  15.4M|      x_1 = x[1];
 2956|  15.4M|      x_l1_0 = x[l1];
 2957|  15.4M|      x_l1_1 = x[l1 + 1];
 2958|  15.4M|      x_l2_0 = x[l2];
 2959|  15.4M|      x_l2_1 = x[l2 + 1];
 2960|  15.4M|      x_h2_0 = x[h2];
 2961|  15.4M|      x_h2_1 = x[h2 + 1];
 2962|       |
 2963|  15.4M|      xh0_0 = ixheaac_add32_sat(x_0, x_l1_0);
 2964|  15.4M|      xh1_0 = ixheaac_add32_sat(x_1, x_l1_1);
 2965|  15.4M|      xl0_0 = ixheaac_sub32_sat(x_0, x_l1_0);
 2966|  15.4M|      xl1_0 = ixheaac_sub32_sat(x_1, x_l1_1);
 2967|  15.4M|      xh20_0 = ixheaac_add32_sat(x_h2_0, x_l2_0);
 2968|  15.4M|      xh21_0 = ixheaac_add32_sat(x_h2_1, x_l2_1);
 2969|  15.4M|      xl20_0 = ixheaac_sub32_sat(x_h2_0, x_l2_0);
 2970|  15.4M|      xl21_0 = ixheaac_sub32_sat(x_h2_1, x_l2_1);
 2971|       |
 2972|  15.4M|      x0 = x;
 2973|  15.4M|      x2 = x0;
 2974|       |
 2975|  15.4M|      j += 6;
 2976|  15.4M|      x += 2;
 2977|  15.4M|      predj = (j - fft_jmp);
 2978|  15.4M|      if (!predj) x += fft_jmp;
  ------------------
  |  Branch (2978:11): [True: 1.99M, False: 13.4M]
  ------------------
 2979|  15.4M|      if (!predj) j = 0;
  ------------------
  |  Branch (2979:11): [True: 1.99M, False: 13.4M]
  ------------------
 2980|       |
 2981|  15.4M|      x0[0] = ixheaac_add32_sat(xh0_0, xh20_0);
 2982|  15.4M|      x0[1] = ixheaac_add32_sat(xh1_0, xh21_0);
 2983|  15.4M|      xt0_0 = ixheaac_sub32_sat(xh0_0, xh20_0);
 2984|  15.4M|      yt0_0 = ixheaac_sub32_sat(xh1_0, xh21_0);
 2985|  15.4M|      xt1_0 = ixheaac_add32_sat(xl0_0, xl21_0);
 2986|  15.4M|      yt2_0 = ixheaac_add32_sat(xl1_0, xl20_0);
 2987|  15.4M|      xt2_0 = ixheaac_sub32_sat(xl0_0, xl21_0);
 2988|  15.4M|      yt1_0 = ixheaac_sub32_sat(xl1_0, xl20_0);
 2989|       |
 2990|  15.4M|      x2[h2] =
 2991|  15.4M|          MPYHIRC(si10, yt1_0) + MPYHIRC(co10, xt1_0) +
  ------------------
  |  |   54|  15.4M|  (((WORD32)((WORD16)(x >> 16) * (UWORD16)(y & 0x0000FFFF) + 0x4000) >>       \
  |  |   55|  15.4M|    15) +                                                                     \
  |  |   56|  15.4M|   ((WORD32)((WORD16)(x >> 16) * (WORD16)((y) >> 16)) << 1))
  ------------------
                        MPYHIRC(si10, yt1_0) + MPYHIRC(co10, xt1_0) +
  ------------------
  |  |   54|  15.4M|  (((WORD32)((WORD16)(x >> 16) * (UWORD16)(y & 0x0000FFFF) + 0x4000) >>       \
  |  |   55|  15.4M|    15) +                                                                     \
  |  |   56|  15.4M|   ((WORD32)((WORD16)(x >> 16) * (WORD16)((y) >> 16)) << 1))
  ------------------
 2992|  15.4M|          (((MPYLUHS(si10, yt1_0) + MPYLUHS(co10, xt1_0) + 0x8000) >> 16) << 1);
  ------------------
  |  |   59|  15.4M|  ((WORD32)((UWORD16)(x & 0x0000FFFF) * (WORD16)(y >> 16)))
  ------------------
                        (((MPYLUHS(si10, yt1_0) + MPYLUHS(co10, xt1_0) + 0x8000) >> 16) << 1);
  ------------------
  |  |   59|  15.4M|  ((WORD32)((UWORD16)(x & 0x0000FFFF) * (WORD16)(y >> 16)))
  ------------------
 2993|       |
 2994|  15.4M|      x2[h2 + 1] =
 2995|  15.4M|          MPYHIRC(co10, yt1_0) - MPYHIRC(si10, xt1_0) +
  ------------------
  |  |   54|  15.4M|  (((WORD32)((WORD16)(x >> 16) * (UWORD16)(y & 0x0000FFFF) + 0x4000) >>       \
  |  |   55|  15.4M|    15) +                                                                     \
  |  |   56|  15.4M|   ((WORD32)((WORD16)(x >> 16) * (WORD16)((y) >> 16)) << 1))
  ------------------
                        MPYHIRC(co10, yt1_0) - MPYHIRC(si10, xt1_0) +
  ------------------
  |  |   54|  15.4M|  (((WORD32)((WORD16)(x >> 16) * (UWORD16)(y & 0x0000FFFF) + 0x4000) >>       \
  |  |   55|  15.4M|    15) +                                                                     \
  |  |   56|  15.4M|   ((WORD32)((WORD16)(x >> 16) * (WORD16)((y) >> 16)) << 1))
  ------------------
 2996|  15.4M|          (((MPYLUHS(co10, yt1_0) - MPYLUHS(si10, xt1_0) + 0x8000) >> 16) << 1);
  ------------------
  |  |   59|  15.4M|  ((WORD32)((UWORD16)(x & 0x0000FFFF) * (WORD16)(y >> 16)))
  ------------------
                        (((MPYLUHS(co10, yt1_0) - MPYLUHS(si10, xt1_0) + 0x8000) >> 16) << 1);
  ------------------
  |  |   59|  15.4M|  ((WORD32)((UWORD16)(x & 0x0000FFFF) * (WORD16)(y >> 16)))
  ------------------
 2997|       |
 2998|  15.4M|      x2[l1] =
 2999|  15.4M|          MPYHIRC(si20, yt0_0) + MPYHIRC(co20, xt0_0) +
  ------------------
  |  |   54|  15.4M|  (((WORD32)((WORD16)(x >> 16) * (UWORD16)(y & 0x0000FFFF) + 0x4000) >>       \
  |  |   55|  15.4M|    15) +                                                                     \
  |  |   56|  15.4M|   ((WORD32)((WORD16)(x >> 16) * (WORD16)((y) >> 16)) << 1))
  ------------------
                        MPYHIRC(si20, yt0_0) + MPYHIRC(co20, xt0_0) +
  ------------------
  |  |   54|  15.4M|  (((WORD32)((WORD16)(x >> 16) * (UWORD16)(y & 0x0000FFFF) + 0x4000) >>       \
  |  |   55|  15.4M|    15) +                                                                     \
  |  |   56|  15.4M|   ((WORD32)((WORD16)(x >> 16) * (WORD16)((y) >> 16)) << 1))
  ------------------
 3000|  15.4M|          (((MPYLUHS(si20, yt0_0) + MPYLUHS(co20, xt0_0) + 0x8000) >> 16) << 1);
  ------------------
  |  |   59|  15.4M|  ((WORD32)((UWORD16)(x & 0x0000FFFF) * (WORD16)(y >> 16)))
  ------------------
                        (((MPYLUHS(si20, yt0_0) + MPYLUHS(co20, xt0_0) + 0x8000) >> 16) << 1);
  ------------------
  |  |   59|  15.4M|  ((WORD32)((UWORD16)(x & 0x0000FFFF) * (WORD16)(y >> 16)))
  ------------------
 3001|       |
 3002|  15.4M|      x2[l1 + 1] =
 3003|  15.4M|          MPYHIRC(co20, yt0_0) - MPYHIRC(si20, xt0_0) +
  ------------------
  |  |   54|  15.4M|  (((WORD32)((WORD16)(x >> 16) * (UWORD16)(y & 0x0000FFFF) + 0x4000) >>       \
  |  |   55|  15.4M|    15) +                                                                     \
  |  |   56|  15.4M|   ((WORD32)((WORD16)(x >> 16) * (WORD16)((y) >> 16)) << 1))
  ------------------
                        MPYHIRC(co20, yt0_0) - MPYHIRC(si20, xt0_0) +
  ------------------
  |  |   54|  15.4M|  (((WORD32)((WORD16)(x >> 16) * (UWORD16)(y & 0x0000FFFF) + 0x4000) >>       \
  |  |   55|  15.4M|    15) +                                                                     \
  |  |   56|  15.4M|   ((WORD32)((WORD16)(x >> 16) * (WORD16)((y) >> 16)) << 1))
  ------------------
 3004|  15.4M|          (((MPYLUHS(co20, yt0_0) - MPYLUHS(si20, xt0_0) + 0x8000) >> 16) << 1);
  ------------------
  |  |   59|  15.4M|  ((WORD32)((UWORD16)(x & 0x0000FFFF) * (WORD16)(y >> 16)))
  ------------------
                        (((MPYLUHS(co20, yt0_0) - MPYLUHS(si20, xt0_0) + 0x8000) >> 16) << 1);
  ------------------
  |  |   59|  15.4M|  ((WORD32)((UWORD16)(x & 0x0000FFFF) * (WORD16)(y >> 16)))
  ------------------
 3005|       |
 3006|  15.4M|      x2[l2] =
 3007|  15.4M|          MPYHIRC(si30, yt2_0) + MPYHIRC(co30, xt2_0) +
  ------------------
  |  |   54|  15.4M|  (((WORD32)((WORD16)(x >> 16) * (UWORD16)(y & 0x0000FFFF) + 0x4000) >>       \
  |  |   55|  15.4M|    15) +                                                                     \
  |  |   56|  15.4M|   ((WORD32)((WORD16)(x >> 16) * (WORD16)((y) >> 16)) << 1))
  ------------------
                        MPYHIRC(si30, yt2_0) + MPYHIRC(co30, xt2_0) +
  ------------------
  |  |   54|  15.4M|  (((WORD32)((WORD16)(x >> 16) * (UWORD16)(y & 0x0000FFFF) + 0x4000) >>       \
  |  |   55|  15.4M|    15) +                                                                     \
  |  |   56|  15.4M|   ((WORD32)((WORD16)(x >> 16) * (WORD16)((y) >> 16)) << 1))
  ------------------
 3008|  15.4M|          (((MPYLUHS(si30, yt2_0) + MPYLUHS(co30, xt2_0) + 0x8000) >> 16) << 1);
  ------------------
  |  |   59|  15.4M|  ((WORD32)((UWORD16)(x & 0x0000FFFF) * (WORD16)(y >> 16)))
  ------------------
                        (((MPYLUHS(si30, yt2_0) + MPYLUHS(co30, xt2_0) + 0x8000) >> 16) << 1);
  ------------------
  |  |   59|  15.4M|  ((WORD32)((UWORD16)(x & 0x0000FFFF) * (WORD16)(y >> 16)))
  ------------------
 3009|       |
 3010|  15.4M|      x2[l2 + 1] =
 3011|  15.4M|          MPYHIRC(co30, yt2_0) - MPYHIRC(si30, xt2_0) +
  ------------------
  |  |   54|  15.4M|  (((WORD32)((WORD16)(x >> 16) * (UWORD16)(y & 0x0000FFFF) + 0x4000) >>       \
  |  |   55|  15.4M|    15) +                                                                     \
  |  |   56|  15.4M|   ((WORD32)((WORD16)(x >> 16) * (WORD16)((y) >> 16)) << 1))
  ------------------
                        MPYHIRC(co30, yt2_0) - MPYHIRC(si30, xt2_0) +
  ------------------
  |  |   54|  15.4M|  (((WORD32)((WORD16)(x >> 16) * (UWORD16)(y & 0x0000FFFF) + 0x4000) >>       \
  |  |   55|  15.4M|    15) +                                                                     \
  |  |   56|  15.4M|   ((WORD32)((WORD16)(x >> 16) * (WORD16)((y) >> 16)) << 1))
  ------------------
 3012|  15.4M|          (((MPYLUHS(co30, yt2_0) - MPYLUHS(si30, xt2_0) + 0x8000) >> 16) << 1);
  ------------------
  |  |   59|  15.4M|  ((WORD32)((UWORD16)(x & 0x0000FFFF) * (WORD16)(y >> 16)))
  ------------------
                        (((MPYLUHS(co30, yt2_0) - MPYLUHS(si30, xt2_0) + 0x8000) >> 16) << 1);
  ------------------
  |  |   59|  15.4M|  ((WORD32)((UWORD16)(x & 0x0000FFFF) * (WORD16)(y >> 16)))
  ------------------
 3013|  15.4M|    }
 3014|   745k|  }
 3015|       |
 3016|   606k|  y0 = ptr_y;
 3017|   606k|  y2 = ptr_y + (WORD32)npoints;
 3018|   606k|  x0 = ptr_x;
 3019|   606k|  x2 = ptr_x + (WORD32)(npoints >> 1);
 3020|       |
 3021|   606k|  if (radix == 2) {
  ------------------
  |  Branch (3021:7): [True: 0, False: 606k]
  ------------------
 3022|      0|    y1 = y0 + (WORD32)(npoints >> 2);
 3023|      0|    y3 = y2 + (WORD32)(npoints >> 2);
 3024|      0|    l1 = norm + 1;
 3025|      0|    j0 = 8;
 3026|      0|    n0 = npoints >> 1;
 3027|   606k|  } else {
 3028|   606k|    y1 = y0 + (WORD32)(npoints >> 1);
 3029|   606k|    y3 = y2 + (WORD32)(npoints >> 1);
 3030|   606k|    l1 = norm + 2;
 3031|   606k|    j0 = 4;
 3032|   606k|    n0 = npoints >> 2;
 3033|   606k|  }
 3034|       |
 3035|   606k|  j = 0;
 3036|   606k|  k = 0;
 3037|       |
 3038|  3.90M|  for (i = 0; i < npoints; i += 8) {
  ------------------
  |  Branch (3038:15): [True: 3.29M, False: 606k]
  ------------------
 3039|  3.29M|    if (npoints == 32)
  ------------------
  |  Branch (3039:9): [True: 0, False: 3.29M]
  ------------------
 3040|      0|      h2 = rev_dig[k++];
 3041|  3.29M|    else
 3042|  3.29M|      DIG_REV(j, l1, h2);
  ------------------
  |  |   43|  3.29M|  do {                                                        \
  |  |   44|  3.29M|    unsigned _ = (i);                                         \
  |  |   45|  3.29M|    _ = ((_ & 0x33333333) << 2) | ((_ & ~0x33333333) >> 2);   \
  |  |   46|  3.29M|    _ = ((_ & 0x0F0F0F0F) << 4) | ((_ & ~0x0F0F0F0F) >> 4);   \
  |  |   47|  3.29M|    _ = ((_ & 0x00FF00FF) << 8) | ((_ & ~0x00FF00FF) >> 8);   \
  |  |   48|  3.29M|    _ = ((_ & 0x0000FFFF) << 16) | ((_ & ~0x0000FFFF) >> 16); \
  |  |   49|  3.29M|    (j) = _ >> (m);                                           \
  |  |   50|  3.29M|  } while (0)
  |  |  ------------------
  |  |  |  Branch (50:12): [Folded, False: 3.29M]
  |  |  ------------------
  ------------------
 3043|       |
 3044|  3.29M|    x_0 = x0[0];
 3045|  3.29M|    x_1 = x0[1];
 3046|  3.29M|    x_2 = x0[2];
 3047|  3.29M|    x_3 = x0[3];
 3048|  3.29M|    x_4 = x0[4];
 3049|  3.29M|    x_5 = x0[5];
 3050|  3.29M|    x_6 = x0[6];
 3051|  3.29M|    x_7 = x0[7];
 3052|  3.29M|    x0 += 8;
 3053|       |
 3054|  3.29M|    xh0_0 = ixheaac_add32_sat(x_0, x_4);
 3055|  3.29M|    xh1_0 = ixheaac_add32_sat(x_1, x_5);
 3056|  3.29M|    xl0_0 = ixheaac_sub32_sat(x_0, x_4);
 3057|  3.29M|    xl1_0 = ixheaac_sub32_sat(x_1, x_5);
 3058|  3.29M|    xh0_1 = ixheaac_add32_sat(x_2, x_6);
 3059|  3.29M|    xh1_1 = ixheaac_add32_sat(x_3, x_7);
 3060|  3.29M|    xl0_1 = ixheaac_sub32_sat(x_2, x_6);
 3061|  3.29M|    xl1_1 = ixheaac_sub32_sat(x_3, x_7);
 3062|       |
 3063|  3.29M|    n00 = ixheaac_add32_sat(xh0_0, xh0_1);
 3064|  3.29M|    n01 = ixheaac_add32_sat(xh1_0, xh1_1);
 3065|  3.29M|    n10 = ixheaac_add32_sat(xl0_0, xl1_1);
 3066|  3.29M|    n11 = ixheaac_sub32_sat(xl1_0, xl0_1);
 3067|  3.29M|    n20 = ixheaac_sub32_sat(xh0_0, xh0_1);
 3068|  3.29M|    n21 = ixheaac_sub32_sat(xh1_0, xh1_1);
 3069|  3.29M|    n30 = ixheaac_sub32_sat(xl0_0, xl1_1);
 3070|  3.29M|    n31 = ixheaac_add32_sat(xl1_0, xl0_1);
 3071|       |
 3072|  3.29M|    if (radix == 2) {
  ------------------
  |  Branch (3072:9): [True: 0, False: 3.29M]
  ------------------
 3073|      0|      n00 = ixheaac_add32_sat(x_0, x_2);
 3074|      0|      n01 = ixheaac_add32_sat(x_1, x_3);
 3075|      0|      n20 = ixheaac_sub32_sat(x_0, x_2);
 3076|      0|      n21 = ixheaac_sub32_sat(x_1, x_3);
 3077|      0|      n10 = ixheaac_add32_sat(x_4, x_6);
 3078|      0|      n11 = ixheaac_add32_sat(x_5, x_7);
 3079|      0|      n30 = ixheaac_sub32_sat(x_4, x_6);
 3080|      0|      n31 = ixheaac_sub32_sat(x_5, x_7);
 3081|      0|    }
 3082|       |
 3083|  3.29M|    y0[2 * h2] = n00;
 3084|  3.29M|    y0[2 * h2 + 1] = n01;
 3085|  3.29M|    y1[2 * h2] = n10;
 3086|  3.29M|    y1[2 * h2 + 1] = n11;
 3087|  3.29M|    y2[2 * h2] = n20;
 3088|  3.29M|    y2[2 * h2 + 1] = n21;
 3089|  3.29M|    y3[2 * h2] = n30;
 3090|  3.29M|    y3[2 * h2 + 1] = n31;
 3091|       |
 3092|  3.29M|    x_8 = x2[0];
 3093|  3.29M|    x_9 = x2[1];
 3094|  3.29M|    x_a = x2[2];
 3095|  3.29M|    x_b = x2[3];
 3096|  3.29M|    x_c = x2[4];
 3097|  3.29M|    x_d = x2[5];
 3098|  3.29M|    x_e = x2[6];
 3099|  3.29M|    x_f = x2[7];
 3100|  3.29M|    x2 += 8;
 3101|       |
 3102|  3.29M|    xh0_2 = ixheaac_add32_sat(x_8, x_c);
 3103|  3.29M|    xh1_2 = ixheaac_add32_sat(x_9, x_d);
 3104|  3.29M|    xl0_2 = ixheaac_sub32_sat(x_8, x_c);
 3105|  3.29M|    xl1_2 = ixheaac_sub32_sat(x_9, x_d);
 3106|  3.29M|    xh0_3 = ixheaac_add32_sat(x_a, x_e);
 3107|  3.29M|    xh1_3 = ixheaac_add32_sat(x_b, x_f);
 3108|  3.29M|    xl0_3 = ixheaac_sub32_sat(x_a, x_e);
 3109|  3.29M|    xl1_3 = ixheaac_sub32_sat(x_b, x_f);
 3110|       |
 3111|  3.29M|    n02 = ixheaac_add32_sat(xh0_2, xh0_3);
 3112|  3.29M|    n03 = ixheaac_add32_sat(xh1_2, xh1_3);
 3113|  3.29M|    n12 = ixheaac_add32_sat(xl0_2, xl1_3);
 3114|  3.29M|    n13 = ixheaac_sub32_sat(xl1_2, xl0_3);
 3115|  3.29M|    n22 = ixheaac_sub32_sat(xh0_2, xh0_3);
 3116|  3.29M|    n23 = ixheaac_sub32_sat(xh1_2, xh1_3);
 3117|  3.29M|    n32 = ixheaac_sub32_sat(xl0_2, xl1_3);
 3118|  3.29M|    n33 = ixheaac_add32_sat(xl1_2, xl0_3);
 3119|       |
 3120|  3.29M|    if (radix == 2) {
  ------------------
  |  Branch (3120:9): [True: 0, False: 3.29M]
  ------------------
 3121|      0|      n02 = ixheaac_add32_sat(x_8, x_a);
 3122|      0|      n03 = ixheaac_add32_sat(x_9, x_b);
 3123|      0|      n22 = ixheaac_sub32_sat(x_8, x_a);
 3124|      0|      n23 = ixheaac_sub32_sat(x_9, x_b);
 3125|      0|      n12 = ixheaac_add32_sat(x_c, x_e);
 3126|      0|      n13 = ixheaac_add32_sat(x_d, x_f);
 3127|      0|      n32 = ixheaac_sub32_sat(x_c, x_e);
 3128|      0|      n33 = ixheaac_sub32_sat(x_d, x_f);
 3129|      0|    }
 3130|       |
 3131|  3.29M|    y0[2 * h2 + 2] = n02;
 3132|  3.29M|    y0[2 * h2 + 3] = n03;
 3133|  3.29M|    y1[2 * h2 + 2] = n12;
 3134|  3.29M|    y1[2 * h2 + 3] = n13;
 3135|  3.29M|    y2[2 * h2 + 2] = n22;
 3136|  3.29M|    y2[2 * h2 + 3] = n23;
 3137|  3.29M|    y3[2 * h2 + 2] = n32;
 3138|  3.29M|    y3[2 * h2 + 3] = n33;
 3139|       |
 3140|  3.29M|    j += j0;
 3141|       |
 3142|  3.29M|    if (j == n0) {
  ------------------
  |  Branch (3142:9): [True: 606k, False: 2.68M]
  ------------------
 3143|   606k|      j += n0;
 3144|   606k|      x0 += (WORD32)npoints >> 1;
 3145|   606k|      x2 += (WORD32)npoints >> 1;
 3146|   606k|    }
 3147|  3.29M|  }
 3148|   606k|}
ixheaacd_rearrange_dec:
 3151|  35.8k|                            UWORD8 *re_arr_tab) {
 3152|  35.8k|  WORD32 n, i = 0;
 3153|       |
 3154|  8.63M|  for (n = 0; n < mdct_len_2; n++) {
  ------------------
  |  Branch (3154:15): [True: 8.60M, False: 35.8k]
  ------------------
 3155|  8.60M|    WORD32 idx = re_arr_tab[n] << 1;
 3156|       |
 3157|  8.60M|    op[i++] = ip[idx];
 3158|  8.60M|    op[i++] = ip[idx + 1];
 3159|  8.60M|  }
 3160|  35.8k|}
ixheaacd_fft_15_ld_dec:
 3163|   573k|                            UWORD8 *re_arr_tab_sml_240_ptr) {
 3164|   573k|  WORD32 i, n, idx;
 3165|   573k|  WORD32 *buf1, *buf2, *buf1a;
 3166|   573k|  WORD32 add_r, sub_r;
 3167|   573k|  WORD32 add_i, sub_i;
 3168|   573k|  WORD32 x01_real, x_01_imag, temp;
 3169|   573k|  WORD32 p1, p2, p3, p4;
 3170|       |
 3171|   573k|  WORD32 sinmu = 1859775393;
 3172|   573k|  WORD32 cos_51 = 2042378317;
 3173|   573k|  WORD32 cos_52 = -1652318768;
 3174|   573k|  WORD32 cos_53 = -780119100;
 3175|   573k|  WORD32 cos_54 = 1200479854;
 3176|   573k|  WORD32 cos_55 = -1342177280;
 3177|       |
 3178|   573k|  WORD32 r1, r2, r3, r4;
 3179|   573k|  WORD32 s1, s2, s3, s4, t, temp1, temp2;
 3180|   573k|  WORD32 *fft3outptr = fft3out;
 3181|       |
 3182|   573k|  WORD32 xr_0, xr_1, xr_2;
 3183|   573k|  WORD32 xi_0, xi_1, xi_2;
 3184|       |
 3185|   573k|  buf2 = fft3out;
 3186|   573k|  buf1 = buf1a = fft3out;
 3187|   573k|  n = 0;
 3188|       |
 3189|   573k|  {
 3190|   573k|    *buf1++ = inp[0];
 3191|   573k|    *buf1++ = inp[1];
 3192|       |
 3193|   573k|    *buf1++ = inp[96];
 3194|   573k|    *buf1++ = inp[97];
 3195|       |
 3196|   573k|    *buf1++ = inp[192];
 3197|   573k|    *buf1++ = inp[193];
 3198|       |
 3199|   573k|    *buf1++ = inp[288];
 3200|   573k|    *buf1++ = inp[289];
 3201|       |
 3202|   573k|    *buf1++ = inp[384];
 3203|   573k|    *buf1++ = inp[385];
 3204|       |
 3205|   573k|    r1 = ixheaac_add32_sat(buf1a[2], buf1a[8]);
 3206|   573k|    r4 = ixheaac_sub32_sat(buf1a[2], buf1a[8]);
 3207|   573k|    r3 = ixheaac_add32_sat(buf1a[4], buf1a[6]);
 3208|   573k|    r2 = ixheaac_sub32_sat(buf1a[4], buf1a[6]);
 3209|       |
 3210|   573k|    t = ixheaac_mult32_shl(ixheaac_sub32_sat(r1, r3), cos_54);
 3211|       |
 3212|   573k|    r1 = ixheaac_add32_sat(r1, r3);
 3213|       |
 3214|   573k|    temp1 = ixheaac_add32_sat(buf1a[0], r1);
 3215|       |
 3216|   573k|    r1 = ixheaac_add32_sat(
 3217|   573k|        temp1, ixheaac_shl32_sat((ixheaac_mult32_shl(r1, cos_55)), 1));
 3218|       |
 3219|   573k|    r3 = ixheaac_sub32_sat(r1, t);
 3220|   573k|    r1 = ixheaac_add32_sat(r1, t);
 3221|       |
 3222|   573k|    t = ixheaac_mult32_shl(ixheaac_add32_sat(r4, r2), cos_51);
 3223|   573k|    r4 = ixheaac_add32_sat(
 3224|   573k|        t, ixheaac_shl32_sat(ixheaac_mult32_shl(r4, cos_52), 1));
 3225|   573k|    r2 = ixheaac_add32_sat(t, ixheaac_mult32_shl(r2, cos_53));
 3226|       |
 3227|   573k|    s1 = ixheaac_add32_sat(buf1a[3], buf1a[9]);
 3228|   573k|    s4 = ixheaac_sub32_sat(buf1a[3], buf1a[9]);
 3229|   573k|    s3 = ixheaac_add32_sat(buf1a[5], buf1a[7]);
 3230|   573k|    s2 = ixheaac_sub32_sat(buf1a[5], buf1a[7]);
 3231|       |
 3232|   573k|    t = ixheaac_mult32_shl(ixheaac_sub32_sat(s1, s3), cos_54);
 3233|   573k|    s1 = ixheaac_add32_sat(s1, s3);
 3234|       |
 3235|   573k|    temp2 = ixheaac_add32_sat(buf1a[1], s1);
 3236|       |
 3237|   573k|    s1 = ixheaac_add32_sat(
 3238|   573k|        temp2, ixheaac_shl32_sat((ixheaac_mult32_shl(s1, cos_55)), 1));
 3239|       |
 3240|   573k|    s3 = ixheaac_sub32_sat(s1, t);
 3241|   573k|    s1 = ixheaac_add32_sat(s1, t);
 3242|       |
 3243|   573k|    t = ixheaac_mult32_shl(ixheaac_add32_sat(s4, s2), cos_51);
 3244|   573k|    s4 = ixheaac_add32_sat(
 3245|   573k|        t, ixheaac_shl32_sat((ixheaac_mult32_shl(s4, cos_52)), 1));
 3246|   573k|    s2 = ixheaac_add32_sat(t, (ixheaac_mult32_shl(s2, cos_53)));
 3247|       |
 3248|   573k|    *buf2++ = temp1;
 3249|   573k|    *buf2++ = temp2;
 3250|   573k|    *buf2++ = ixheaac_add32_sat(r1, s2);
 3251|   573k|    *buf2++ = ixheaac_sub32_sat(s1, r2);
 3252|   573k|    *buf2++ = ixheaac_sub32_sat(r3, s4);
 3253|   573k|    *buf2++ = ixheaac_add32_sat(s3, r4);
 3254|   573k|    *buf2++ = ixheaac_add32_sat(r3, s4);
 3255|   573k|    *buf2++ = ixheaac_sub32_sat(s3, r4);
 3256|   573k|    *buf2++ = ixheaac_sub32_sat(r1, s2);
 3257|   573k|    *buf2++ = ixheaac_add32_sat(s1, r2);
 3258|   573k|    buf1a = buf1;
 3259|       |
 3260|   573k|    *buf1++ = inp[160];
 3261|   573k|    *buf1++ = inp[161];
 3262|       |
 3263|   573k|    *buf1++ = inp[256];
 3264|   573k|    *buf1++ = inp[257];
 3265|       |
 3266|   573k|    *buf1++ = inp[352];
 3267|   573k|    *buf1++ = inp[353];
 3268|       |
 3269|   573k|    *buf1++ = inp[448];
 3270|   573k|    *buf1++ = inp[449];
 3271|       |
 3272|   573k|    *buf1++ = inp[64];
 3273|   573k|    *buf1++ = inp[65];
 3274|       |
 3275|   573k|    r1 = ixheaac_add32_sat(buf1a[2], buf1a[8]);
 3276|   573k|    r4 = ixheaac_sub32_sat(buf1a[2], buf1a[8]);
 3277|   573k|    r3 = ixheaac_add32_sat(buf1a[4], buf1a[6]);
 3278|   573k|    r2 = ixheaac_sub32_sat(buf1a[4], buf1a[6]);
 3279|       |
 3280|   573k|    t = ixheaac_mult32_shl(ixheaac_sub32_sat(r1, r3), cos_54);
 3281|       |
 3282|   573k|    r1 = ixheaac_add32_sat(r1, r3);
 3283|       |
 3284|   573k|    temp1 = ixheaac_add32_sat(buf1a[0], r1);
 3285|       |
 3286|   573k|    r1 = ixheaac_add32_sat(
 3287|   573k|        temp1, ixheaac_shl32_sat((ixheaac_mult32_shl(r1, cos_55)), 1));
 3288|       |
 3289|   573k|    r3 = ixheaac_sub32_sat(r1, t);
 3290|   573k|    r1 = ixheaac_add32_sat(r1, t);
 3291|       |
 3292|   573k|    t = ixheaac_mult32_shl(ixheaac_add32_sat(r4, r2), cos_51);
 3293|   573k|    r4 = ixheaac_add32_sat(
 3294|   573k|        t, ixheaac_shl32_sat(ixheaac_mult32_shl(r4, cos_52), 1));
 3295|   573k|    r2 = ixheaac_add32_sat(t, ixheaac_mult32_shl(r2, cos_53));
 3296|       |
 3297|   573k|    s1 = ixheaac_add32_sat(buf1a[3], buf1a[9]);
 3298|   573k|    s4 = ixheaac_sub32_sat(buf1a[3], buf1a[9]);
 3299|   573k|    s3 = ixheaac_add32_sat(buf1a[5], buf1a[7]);
 3300|   573k|    s2 = ixheaac_sub32_sat(buf1a[5], buf1a[7]);
 3301|       |
 3302|   573k|    t = ixheaac_mult32_shl(ixheaac_sub32_sat(s1, s3), cos_54);
 3303|       |
 3304|   573k|    s1 = ixheaac_add32_sat(s1, s3);
 3305|       |
 3306|   573k|    temp2 = ixheaac_add32_sat(buf1a[1], s1);
 3307|       |
 3308|   573k|    s1 = ixheaac_add32_sat(
 3309|   573k|        temp2, ixheaac_shl32_sat((ixheaac_mult32_shl(s1, cos_55)), 1));
 3310|       |
 3311|   573k|    s3 = ixheaac_sub32_sat(s1, t);
 3312|   573k|    s1 = ixheaac_add32_sat(s1, t);
 3313|       |
 3314|   573k|    t = ixheaac_mult32_shl(ixheaac_add32_sat(s4, s2), cos_51);
 3315|   573k|    s4 = ixheaac_add32_sat(
 3316|   573k|        t, ixheaac_shl32_sat((ixheaac_mult32_shl(s4, cos_52)), 1));
 3317|   573k|    s2 = ixheaac_add32_sat(t, (ixheaac_mult32_shl(s2, cos_53)));
 3318|       |
 3319|   573k|    *buf2++ = temp1;
 3320|   573k|    *buf2++ = temp2;
 3321|   573k|    *buf2++ = ixheaac_add32_sat(r1, s2);
 3322|   573k|    *buf2++ = ixheaac_sub32_sat(s1, r2);
 3323|   573k|    *buf2++ = ixheaac_sub32_sat(r3, s4);
 3324|   573k|    *buf2++ = ixheaac_add32_sat(s3, r4);
 3325|   573k|    *buf2++ = ixheaac_add32_sat(r3, s4);
 3326|   573k|    *buf2++ = ixheaac_sub32_sat(s3, r4);
 3327|   573k|    *buf2++ = ixheaac_sub32_sat(r1, s2);
 3328|   573k|    *buf2++ = ixheaac_add32_sat(s1, r2);
 3329|   573k|    buf1a = buf1;
 3330|   573k|    ;
 3331|       |
 3332|   573k|    *buf1++ = inp[320];
 3333|   573k|    *buf1++ = inp[321];
 3334|       |
 3335|   573k|    *buf1++ = inp[416];
 3336|   573k|    *buf1++ = inp[417];
 3337|       |
 3338|   573k|    *buf1++ = inp[32];
 3339|   573k|    *buf1++ = inp[33];
 3340|       |
 3341|   573k|    *buf1++ = inp[128];
 3342|   573k|    *buf1++ = inp[129];
 3343|       |
 3344|   573k|    *buf1++ = inp[224];
 3345|   573k|    *buf1++ = inp[225];
 3346|       |
 3347|   573k|    r1 = ixheaac_add32_sat(buf1a[2], buf1a[8]);
 3348|   573k|    r4 = ixheaac_sub32_sat(buf1a[2], buf1a[8]);
 3349|   573k|    r3 = ixheaac_add32_sat(buf1a[4], buf1a[6]);
 3350|   573k|    r2 = ixheaac_sub32_sat(buf1a[4], buf1a[6]);
 3351|       |
 3352|   573k|    t = ixheaac_mult32_shl(ixheaac_sub32_sat(r1, r3), cos_54);
 3353|       |
 3354|   573k|    r1 = ixheaac_add32_sat(r1, r3);
 3355|       |
 3356|   573k|    temp1 = ixheaac_add32_sat(buf1a[0], r1);
 3357|       |
 3358|   573k|    r1 = ixheaac_add32_sat(
 3359|   573k|        temp1, ixheaac_shl32_sat((ixheaac_mult32_shl(r1, cos_55)), 1));
 3360|       |
 3361|   573k|    r3 = ixheaac_sub32_sat(r1, t);
 3362|   573k|    r1 = ixheaac_add32_sat(r1, t);
 3363|       |
 3364|   573k|    t = ixheaac_mult32_shl(ixheaac_add32_sat(r4, r2), cos_51);
 3365|   573k|    r4 = ixheaac_add32_sat(
 3366|   573k|        t, ixheaac_shl32_sat(ixheaac_mult32_shl(r4, cos_52), 1));
 3367|   573k|    r2 = ixheaac_add32_sat(t, ixheaac_mult32_shl(r2, cos_53));
 3368|       |
 3369|   573k|    s1 = ixheaac_add32_sat(buf1a[3], buf1a[9]);
 3370|   573k|    s4 = ixheaac_sub32_sat(buf1a[3], buf1a[9]);
 3371|   573k|    s3 = ixheaac_add32_sat(buf1a[5], buf1a[7]);
 3372|   573k|    s2 = ixheaac_sub32_sat(buf1a[5], buf1a[7]);
 3373|       |
 3374|   573k|    t = ixheaac_mult32_shl(ixheaac_sub32_sat(s1, s3), cos_54);
 3375|       |
 3376|   573k|    s1 = ixheaac_add32_sat(s1, s3);
 3377|       |
 3378|   573k|    temp2 = ixheaac_add32_sat(buf1a[1], s1);
 3379|       |
 3380|   573k|    s1 = ixheaac_add32_sat(
 3381|   573k|        temp2, ixheaac_shl32_sat((ixheaac_mult32_shl(s1, cos_55)), 1));
 3382|       |
 3383|   573k|    s3 = ixheaac_sub32_sat(s1, t);
 3384|   573k|    s1 = ixheaac_add32_sat(s1, t);
 3385|       |
 3386|   573k|    t = ixheaac_mult32_shl(ixheaac_add32_sat(s4, s2), cos_51);
 3387|   573k|    s4 = ixheaac_add32_sat(
 3388|   573k|        t, ixheaac_shl32_sat((ixheaac_mult32_shl(s4, cos_52)), 1));
 3389|   573k|    s2 = ixheaac_add32_sat(t, (ixheaac_mult32_shl(s2, cos_53)));
 3390|       |
 3391|   573k|    *buf2++ = temp1;
 3392|   573k|    *buf2++ = temp2;
 3393|   573k|    *buf2++ = ixheaac_add32_sat(r1, s2);
 3394|   573k|    *buf2++ = ixheaac_sub32_sat(s1, r2);
 3395|   573k|    *buf2++ = ixheaac_sub32_sat(r3, s4);
 3396|   573k|    *buf2++ = ixheaac_add32_sat(s3, r4);
 3397|   573k|    *buf2++ = ixheaac_add32_sat(r3, s4);
 3398|   573k|    *buf2++ = ixheaac_sub32_sat(s3, r4);
 3399|   573k|    *buf2++ = ixheaac_sub32_sat(r1, s2);
 3400|   573k|    *buf2++ = ixheaac_add32_sat(s1, r2);
 3401|   573k|    buf1a = buf1;
 3402|   573k|    ;
 3403|   573k|  }
 3404|       |
 3405|   573k|  n = 0;
 3406|  3.44M|  for (i = 0; i < FFT5; i++) {
  ------------------
  |  |   70|  3.44M|#define FFT5 5
  ------------------
  |  Branch (3406:15): [True: 2.86M, False: 573k]
  ------------------
 3407|  2.86M|    xr_0 = fft3outptr[0];
 3408|  2.86M|    xi_0 = fft3outptr[1];
 3409|       |
 3410|  2.86M|    xr_1 = fft3outptr[10];
 3411|  2.86M|    xi_1 = fft3outptr[11];
 3412|       |
 3413|  2.86M|    xr_2 = fft3outptr[20];
 3414|  2.86M|    xi_2 = fft3outptr[21];
 3415|       |
 3416|  2.86M|    x01_real = ixheaac_add32_sat(xr_0, xr_1);
 3417|  2.86M|    x_01_imag = ixheaac_add32_sat(xi_0, xi_1);
 3418|       |
 3419|  2.86M|    add_r = ixheaac_add32_sat(xr_1, xr_2);
 3420|  2.86M|    add_i = ixheaac_add32_sat(xi_1, xi_2);
 3421|       |
 3422|  2.86M|    sub_r = ixheaac_sub32_sat(xr_1, xr_2);
 3423|  2.86M|    sub_i = ixheaac_sub32_sat(xi_1, xi_2);
 3424|       |
 3425|  2.86M|    p1 = add_r >> 1;
 3426|       |
 3427|  2.86M|    p2 = ixheaac_mult32_shl(sub_i, sinmu);
 3428|  2.86M|    p3 = ixheaac_mult32_shl(sub_r, sinmu);
 3429|       |
 3430|  2.86M|    p4 = add_i >> 1;
 3431|       |
 3432|  2.86M|    temp = ixheaac_sub32_sat(xr_0, p1);
 3433|  2.86M|    temp1 = ixheaac_add32_sat(xi_0, p3);
 3434|  2.86M|    temp2 = ixheaac_sub32_sat(xi_0, p3);
 3435|       |
 3436|  2.86M|    idx = re_arr_tab_sml_240_ptr[n++] << 1;
 3437|  2.86M|    op[idx] = ixheaac_add32_sat(x01_real, xr_2);
 3438|  2.86M|    op[idx + 1] = ixheaac_add32_sat(x_01_imag, xi_2);
 3439|       |
 3440|  2.86M|    idx = re_arr_tab_sml_240_ptr[n++] << 1;
 3441|  2.86M|    op[idx] = ixheaac_add32_sat(temp, p2);
 3442|  2.86M|    op[idx + 1] = ixheaac_sub32_sat(temp2, p4);
 3443|       |
 3444|  2.86M|    idx = re_arr_tab_sml_240_ptr[n++] << 1;
 3445|  2.86M|    op[idx] = ixheaac_sub32_sat(temp, p2);
 3446|  2.86M|    op[idx + 1] = ixheaac_sub32_sat(temp1, p4);
 3447|  2.86M|    fft3outptr += 2;
 3448|  2.86M|  }
 3449|   573k|}
ixheaacd_aac_imdct.c:ixheaacd_mult32x16lin32:
   80|   207M|static PLATFORM_INLINE WORD32 ixheaacd_mult32x16lin32(WORD32 a, WORD32 b) {
   81|   207M|  WORD32 result;
   82|   207M|  WORD64 temp_result;
   83|   207M|  temp_result = (WORD64)a * (WORD64)(((b & 0xFFFF) << 16) >> 16);
   84|   207M|  result = (WORD32)(temp_result >> 16);
   85|   207M|  return (result);
   86|   207M|}
ixheaacd_aac_imdct.c:ixheaacd_mult32x16lin32_sat:
   95|  40.6M|static PLATFORM_INLINE WORD32 ixheaacd_mult32x16lin32_sat(WORD32 a, WORD32 b) {
   96|  40.6M|  WORD32 result;
   97|  40.6M|  WORD64 temp_result;
   98|  40.6M|  temp_result = (WORD64)a * (WORD64)(((b & 0xFFFF) << 16) >> 16);
   99|  40.6M|  if (temp_result < (WORD64)MIN_32)
  ------------------
  |  |   61|  40.6M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (99:7): [True: 5.26M, False: 35.4M]
  ------------------
  100|  5.26M|    result = MIN_32;
  ------------------
  |  |   61|  5.26M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  101|  35.4M|  else if (temp_result > (WORD64)MAX_32)
  ------------------
  |  |   60|  35.4M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (101:12): [True: 6.16M, False: 29.2M]
  ------------------
  102|  6.16M|    result = MAX_32;
  ------------------
  |  |   60|  6.16M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  103|  29.2M|  else
  104|  29.2M|    result = (WORD32)(temp_result);
  105|  40.6M|  return (result);
  106|  40.6M|}
ixheaacd_aac_imdct.c:ixheaacd_mac32x16lin32:
   89|  63.7M|                                                     WORD32 c) {
   90|  63.7M|  WORD32 result;
   91|  63.7M|  result = a + ixheaacd_mult32x16lin32(b, c);
   92|  63.7M|  return (result);
   93|  63.7M|}

ixheaacd_tns_decode_coefficients:
   71|  25.6k|    ia_aac_dec_tables_struct *ptr_aac_tables) {
   72|  25.6k|  WORD32 i;
   73|  25.6k|  WORD32 tmp;
   74|  25.6k|  WORD32 *aptr = a;
   75|  25.6k|  WORD32 *tns_coeff_ptr;
   76|  25.6k|  WORD8 ixheaacd_drc_offset;
   77|       |
   78|  25.6k|  tmp = filter->resolution;
   79|  25.6k|  if (tmp == 0) {
  ------------------
  |  Branch (79:7): [True: 23.6k, False: 1.94k]
  ------------------
   80|  23.6k|    tns_coeff_ptr = ptr_aac_tables->pstr_block_tables->tns_coeff3;
   81|  23.6k|    ixheaacd_drc_offset = 4;
   82|       |
   83|  23.6k|  } else {
   84|  1.94k|    tns_coeff_ptr = ptr_aac_tables->pstr_block_tables->tns_coeff4;
   85|  1.94k|    ixheaacd_drc_offset = 8;
   86|  1.94k|  }
   87|       |
   88|   259k|  for (i = 0; i < filter->order; i++) {
  ------------------
  |  Branch (88:15): [True: 234k, False: 25.6k]
  ------------------
   89|   234k|    *aptr++ = tns_coeff_ptr[filter->coef[i] + ixheaacd_drc_offset];
   90|   234k|  }
   91|  25.6k|}
ixheaacd_tns_parcor_to_lpc:
   96|  20.9k|{
   97|  20.9k|  WORD i, j, status;
   98|  20.9k|  WORD32 z1;
   99|  20.9k|  WORD32 z[MAX_ORDER + 1];
  100|  20.9k|  WORD32 w[MAX_ORDER + 1];
  101|  20.9k|  WORD32 accu1, accu2;
  102|       |
  103|  20.9k|  status = 1;
  104|  20.9k|  *scale = 1;
  105|       |
  106|  62.8k|  while (status) {
  ------------------
  |  Branch (106:10): [True: 41.9k, False: 20.9k]
  ------------------
  107|  41.9k|    status = 0;
  108|       |
  109|  1.38M|    for (i = MAX_ORDER; i >= 0; i--) {
  ------------------
  |  |   24|  41.9k|#define MAX_ORDER 31
  ------------------
  |  Branch (109:25): [True: 1.34M, False: 41.9k]
  ------------------
  110|  1.34M|      z[i] = 0;
  111|  1.34M|      w[i] = 0;
  112|  1.34M|    }
  113|       |
  114|  41.9k|    accu1 = (0x40000000 >> (*scale - 1));
  115|       |
  116|   534k|    for (i = 0; i <= order; i++) {
  ------------------
  |  Branch (116:17): [True: 492k, False: 41.9k]
  ------------------
  117|   492k|      z1 = accu1;
  118|       |
  119|  6.02M|      for (j = 0; j < order; j++) {
  ------------------
  |  Branch (119:19): [True: 5.52M, False: 492k]
  ------------------
  120|  5.52M|        w[j] = (accu1);
  121|       |
  122|  5.52M|        accu1 = ixheaac_add32_sat(accu1,
  123|  5.52M|                                   ixheaac_mult32_shl_sat(parcor[j], (z[j])));
  124|  5.52M|        if (ixheaac_abs32_sat(accu1) == 0x7fffffff) status = 1;
  ------------------
  |  Branch (124:13): [True: 281k, False: 5.24M]
  ------------------
  125|  5.52M|      }
  126|  6.02M|      for (j = (order - 1); j >= 0; j--) {
  ------------------
  |  Branch (126:29): [True: 5.52M, False: 492k]
  ------------------
  127|  5.52M|        accu2 = (z[j]);
  128|  5.52M|        accu2 = ixheaac_add32_sat(accu2,
  129|  5.52M|                                   ixheaac_mult32_shl_sat(parcor[j], (w[j])));
  130|  5.52M|        z[j + 1] = (accu2);
  131|  5.52M|        if (ixheaac_abs32_sat(accu2) == 0x7fffffff) status = 1;
  ------------------
  |  Branch (131:13): [True: 281k, False: 5.24M]
  ------------------
  132|  5.52M|      }
  133|       |
  134|   492k|      z[0] = (z1);
  135|   492k|      lpc[i] = (accu1);
  136|   492k|      accu1 = 0;
  137|   492k|    }
  138|       |
  139|  41.9k|    accu1 = (status - 1);
  140|       |
  141|  41.9k|    if (accu1 == 0) {
  ------------------
  |  Branch (141:9): [True: 21.0k, False: 20.9k]
  ------------------
  142|  21.0k|      *scale = *scale + 1;
  143|  21.0k|    }
  144|  41.9k|  }
  145|  20.9k|}
ixheaacd_tns_parcor_lpc_convert_dec:
  150|  25.6k|{
  151|  25.6k|  WORD i, j, status;
  152|  25.6k|  WORD32 accu;
  153|  25.6k|  WORD16 temp_buf1[MAX_ORDER + 1];
  154|  25.6k|  WORD16 temp_buf2[MAX_ORDER + 1];
  155|  25.6k|  WORD32 accu1, accu2;
  156|       |
  157|  25.6k|  status = 1;
  158|  25.6k|  *scale = 0;
  159|       |
  160|  78.1k|  while (status) {
  ------------------
  |  Branch (160:10): [True: 52.4k, False: 25.6k]
  ------------------
  161|  52.4k|    status = 0;
  162|       |
  163|  1.73M|    for (i = MAX_ORDER; i >= 0; i--) {
  ------------------
  |  |   24|  52.4k|#define MAX_ORDER 31
  ------------------
  |  Branch (163:25): [True: 1.67M, False: 52.4k]
  ------------------
  164|  1.67M|      temp_buf1[i] = 0;
  165|  1.67M|      temp_buf2[i] = 0;
  166|  1.67M|    }
  167|       |
  168|  52.4k|    accu1 = (0x7fffffff >> *scale);
  169|       |
  170|   436k|    for (i = 0; i <= order; i++) {
  ------------------
  |  Branch (170:17): [True: 383k, False: 52.4k]
  ------------------
  171|   383k|      accu = accu1;
  172|       |
  173|  2.99M|      for (j = 0; j < order; j++) {
  ------------------
  |  Branch (173:19): [True: 2.61M, False: 383k]
  ------------------
  174|  2.61M|        temp_buf2[j] = ixheaac_round16(accu1);
  175|  2.61M|        accu1 = ixheaac_mac16x16in32_shl_sat(accu1, parcor[j], temp_buf1[j]);
  176|       |
  177|  2.61M|        if (ixheaac_abs32_sat(accu1) == 0x7fffffff) {
  ------------------
  |  Branch (177:13): [True: 191k, False: 2.42M]
  ------------------
  178|   191k|          status = 1;
  179|   191k|        }
  180|  2.61M|      }
  181|       |
  182|  2.99M|      for (j = (order - 1); j >= 0; j--) {
  ------------------
  |  Branch (182:29): [True: 2.61M, False: 383k]
  ------------------
  183|  2.61M|        accu2 = ixheaac_deposit16h_in32(temp_buf1[j]);
  184|  2.61M|        accu2 = ixheaac_mac16x16in32_shl_sat(accu2, parcor[j], temp_buf2[j]);
  185|  2.61M|        temp_buf1[j + 1] = ixheaac_round16(accu2);
  186|  2.61M|        if (ixheaac_abs32_sat(accu2) == 0x7fffffff) {
  ------------------
  |  Branch (186:13): [True: 29.0k, False: 2.58M]
  ------------------
  187|  29.0k|          status = 1;
  188|  29.0k|        }
  189|  2.61M|      }
  190|       |
  191|   383k|      temp_buf1[0] = ixheaac_round16(accu);
  192|   383k|      lpc[i] = ixheaac_round16(accu1);
  193|   383k|      accu1 = 0;
  194|   383k|    }
  195|       |
  196|  52.4k|    accu1 = (status - 1);
  197|       |
  198|  52.4k|    if (accu1 == 0) {
  ------------------
  |  Branch (198:9): [True: 26.8k, False: 25.6k]
  ------------------
  199|  26.8k|      *scale = *scale + 1;
  200|  26.8k|    }
  201|  52.4k|  }
  202|  25.6k|}
ixheaacd_tns_ar_filter_fixed_dec:
  208|  10.6k|{
  209|  10.6k|  WORD32 i, j;
  210|  10.6k|  WORD32 y, state[MAX_ORDER + 1];
  211|  10.6k|  WORD32 acc;
  212|       |
  213|  10.6k|  if ((order & 3) != 0) {
  ------------------
  |  Branch (213:7): [True: 4.69k, False: 5.91k]
  ------------------
  214|  9.47k|    for (i = order + 1; i < ((WORD32)(order & 0xfffffffc) + 4); i++) {
  ------------------
  |  Branch (214:25): [True: 4.78k, False: 4.69k]
  ------------------
  215|  4.78k|      lpc[i] = 0;
  216|  4.78k|    }
  217|  4.69k|    lpc[i] = 0;
  218|  4.69k|    order = ((order & 0xfffffffc) + 4);
  219|  4.69k|    order = order & 31;
  220|  4.69k|  }
  221|  10.6k|  {
  222|   124k|    for (i = 0; i < order; i++) {
  ------------------
  |  Branch (222:17): [True: 113k, False: 10.6k]
  ------------------
  223|   113k|      y = ixheaac_shl32_sat((*spectrum), scale_spec);
  224|   113k|      acc = 0;
  225|       |
  226|   695k|      for (j = i; j > 0; j--) {
  ------------------
  |  Branch (226:19): [True: 581k, False: 113k]
  ------------------
  227|   581k|        acc = ixheaacd_mac32_tns_sat(state[j - 1], lpc[j], acc);
  228|   581k|        state[j] = state[j - 1];
  229|   581k|      }
  230|   113k|      y = ixheaac_sub32_sat(y, ixheaac_shl32_sat(acc, 1));
  231|   113k|      state[0] = ixheaac_shl32_sat(y, shift_value);
  232|       |
  233|   113k|      *spectrum = y >> scale_spec;
  234|   113k|      spectrum += inc;
  235|   113k|    }
  236|  2.12M|    for (i = order; i < size; i++) {
  ------------------
  |  Branch (236:21): [True: 2.10M, False: 10.6k]
  ------------------
  237|  2.10M|      y = ixheaac_shl32_sat((*spectrum), scale_spec);
  238|  2.10M|      acc = 0;
  239|  25.3M|      for (j = order; j > 0; j--) {
  ------------------
  |  Branch (239:23): [True: 23.2M, False: 2.10M]
  ------------------
  240|  23.2M|        acc = ixheaacd_mac32_tns_sat(state[j - 1], lpc[j], acc);
  241|  23.2M|        state[j] = state[j - 1];
  242|  23.2M|      }
  243|  2.10M|      y = ixheaac_sub32_sat(y, ixheaac_shl32_sat(acc, 1));
  244|  2.10M|      state[0] = ixheaac_shl32_sat(y, shift_value);
  245|       |
  246|  2.10M|      *spectrum = y >> scale_spec;
  247|  2.10M|      spectrum += inc;
  248|  2.10M|    }
  249|  10.6k|  }
  250|  10.6k|}
ixheaacd_tns_ma_filter_fixed_ld:
  352|  10.3k|                                     WORD16 shift_value) {
  353|  10.3k|  WORD32 i, j;
  354|  10.3k|  WORD32 y, state[MAX_ORDER];
  355|       |
  356|   112k|  for (i = 0; i < order; i++) state[i] = 0;
  ------------------
  |  Branch (356:15): [True: 102k, False: 10.3k]
  ------------------
  357|       |
  358|  2.19M|  for (i = 0; i < size; i++) {
  ------------------
  |  Branch (358:15): [True: 2.18M, False: 10.3k]
  ------------------
  359|  2.18M|    y = *spectrum;
  360|       |
  361|  25.0M|    for (j = 0; j < order; j++) y += ixheaac_mult32_shl(state[j], lpc[j + 1]);
  ------------------
  |  Branch (361:17): [True: 22.8M, False: 2.18M]
  ------------------
  362|       |
  363|  22.8M|    for (j = order - 1; j > 0; j--) state[j] = state[j - 1];
  ------------------
  |  Branch (363:25): [True: 20.6M, False: 2.18M]
  ------------------
  364|       |
  365|  2.18M|    state[0] = ixheaac_shl32_dir_sat(*spectrum, shift_value);
  366|  2.18M|    *spectrum = y;
  367|  2.18M|    spectrum += inc;
  368|  2.18M|  }
  369|  10.3k|}
ixheaacd_tns_ar_filter_dec:
  373|  23.1k|                                WORD scale_spec, WORD32 *ptr_filter_state) {
  374|  23.1k|  WORD32 i, j;
  375|  23.1k|  WORD32 y;
  376|  23.1k|  WORD32 acc;
  377|       |
  378|  23.1k|  if ((order & 3) != 0) {
  ------------------
  |  Branch (378:7): [True: 19.6k, False: 3.53k]
  ------------------
  379|  23.6k|    for (i = order + 1; i < ((WORD32)(order & (~3)) + 4); i++) {
  ------------------
  |  Branch (379:25): [True: 3.98k, False: 19.6k]
  ------------------
  380|  3.98k|      lpc[i] = 0;
  381|  3.98k|    }
  382|  19.6k|    if (i < (MAX_ORDER + 1)) {
  ------------------
  |  |   24|  19.6k|#define MAX_ORDER 31
  ------------------
  |  Branch (382:9): [True: 19.6k, False: 0]
  ------------------
  383|  19.6k|      lpc[i] = 0;
  384|  19.6k|      order = ((order & (~3)) + 4);
  385|  19.6k|    } else {
  386|      0|      order = MAX_ORDER;
  ------------------
  |  |   24|      0|#define MAX_ORDER 31
  ------------------
  387|      0|    }
  388|  19.6k|  }
  389|       |
  390|   189k|  for (i = 0; i < order; i++) {
  ------------------
  |  Branch (390:15): [True: 166k, False: 23.1k]
  ------------------
  391|   166k|    y = ixheaac_shl32_sat((*spectrum), scale_spec);
  392|   166k|    acc = 0;
  393|       |
  394|   719k|    for (j = i; j > 0; j--) {
  ------------------
  |  Branch (394:17): [True: 553k, False: 166k]
  ------------------
  395|   553k|      acc = ixheaac_add32_sat(
  396|   553k|          acc, ixheaac_mult32x16in32(ptr_filter_state[j - 1], lpc[j]));
  397|   553k|      ptr_filter_state[j] = ptr_filter_state[j - 1];
  398|   553k|    }
  399|       |
  400|   166k|    y = ixheaac_sub32_sat(y, ixheaac_shl32_sat(acc, 1));
  401|   166k|    ptr_filter_state[0] = ixheaac_shl32_sat(y, shift_value);
  402|   166k|    *spectrum = y >> scale_spec;
  403|   166k|    spectrum += inc;
  404|   166k|  }
  405|       |
  406|  1.19M|  for (i = order; i < size; i++) {
  ------------------
  |  Branch (406:19): [True: 1.17M, False: 23.1k]
  ------------------
  407|  1.17M|    y = ixheaac_shl32_sat((*spectrum), scale_spec);
  408|  1.17M|    acc = 0;
  409|  8.64M|    for (j = order; j > 0; j--) {
  ------------------
  |  Branch (409:21): [True: 7.47M, False: 1.17M]
  ------------------
  410|  7.47M|      acc = ixheaac_add32_sat(
  411|  7.47M|          acc, ixheaac_mult32x16in32(ptr_filter_state[j - 1], lpc[j]));
  412|  7.47M|      ptr_filter_state[j] = ptr_filter_state[j - 1];
  413|  7.47M|    }
  414|       |
  415|  1.17M|    y = ixheaac_sub32_sat(y, ixheaac_shl32_sat(acc, 1));
  416|  1.17M|    ptr_filter_state[0] = ixheaac_shl32_sat(y, shift_value);
  417|  1.17M|    *spectrum = y >> scale_spec;
  418|  1.17M|    spectrum += inc;
  419|  1.17M|  }
  420|  23.1k|}
ixheaacd_calc_max_spectral_line_dec:
  422|   335k|WORD32 ixheaacd_calc_max_spectral_line_dec(WORD32 *ptr_tmp, WORD32 size) {
  423|   335k|  WORD32 max_spec_line = 0, i;
  424|   335k|  WORD unroll_cnt, rem;
  425|       |
  426|   335k|  unroll_cnt = size >> 3;
  427|  26.0M|  for (i = unroll_cnt; i--;) {
  ------------------
  |  Branch (427:24): [True: 25.7M, False: 335k]
  ------------------
  428|  25.7M|    max_spec_line = ixheaac_abs32_nrm(*ptr_tmp++) | max_spec_line;
  429|  25.7M|    max_spec_line = ixheaac_abs32_nrm(*ptr_tmp++) | max_spec_line;
  430|  25.7M|    max_spec_line = ixheaac_abs32_nrm(*ptr_tmp++) | max_spec_line;
  431|  25.7M|    max_spec_line = ixheaac_abs32_nrm(*ptr_tmp++) | max_spec_line;
  432|       |
  433|  25.7M|    max_spec_line = ixheaac_abs32_nrm(*ptr_tmp++) | max_spec_line;
  434|  25.7M|    max_spec_line = ixheaac_abs32_nrm(*ptr_tmp++) | max_spec_line;
  435|  25.7M|    max_spec_line = ixheaac_abs32_nrm(*ptr_tmp++) | max_spec_line;
  436|  25.7M|    max_spec_line = ixheaac_abs32_nrm(*ptr_tmp++) | max_spec_line;
  437|  25.7M|  }
  438|       |
  439|   335k|  rem = size - (unroll_cnt << 3);
  440|       |
  441|   335k|  if (rem) {
  ------------------
  |  Branch (441:7): [True: 45.5k, False: 289k]
  ------------------
  442|   227k|    for (i = rem; i--;) {
  ------------------
  |  Branch (442:19): [True: 182k, False: 45.5k]
  ------------------
  443|   182k|      max_spec_line = ixheaac_abs32_nrm(*ptr_tmp++) | max_spec_line;
  444|   182k|    }
  445|  45.5k|  }
  446|       |
  447|   335k|  return ixheaac_norm32(max_spec_line);
  448|   335k|}
ixheaacd_aac_tns.c:ixheaacd_mac32_tns_sat:
   59|  23.7M|                                                     WORD32 c) {
   60|  23.7M|  WORD32 result;
   61|  23.7M|  WORD64 temp_result;
   62|       |
   63|  23.7M|  temp_result = (WORD64)a * (WORD64)b;
   64|  23.7M|  result = (WORD32)(temp_result >> 32);
   65|  23.7M|  result = ixheaac_add32_sat(c, result);
   66|  23.7M|  return (result);
   67|  23.7M|}

ixheaacd_aacdec_decodeframe:
  110|   223k|    WORD32 *mps_header, WORD32 *mps_bytes, WORD32 is_init, WORD32 first_frame) {
  111|   223k|  WORD ch, ele_type;
  112|   223k|  ia_aac_dec_state_struct *p_state_enhaacplus_dec;
  113|   223k|  ia_aac_decoder_struct *aac_dec_handle;
  114|   223k|  ia_bit_buf_struct *it_bit_buff;
  115|   223k|  ixheaacd_latm_struct *latm_element;
  116|       |
  117|   223k|  WORD error_code = (WORD)frame_status;
  118|   223k|  WORD previous_element;
  119|   223k|  WORD prev_data_ele_present = 0;
  120|   223k|  WORD new_element;
  121|   223k|  WORD32 num_ch = 0;
  122|       |
  123|   223k|  WORD32 crc_reg = 0;
  124|   223k|  ia_adts_crc_info_struct *ptr_adts_crc_info;
  125|       |
  126|   223k|  WORD32 cnt_bits = 0;
  127|       |
  128|   223k|  WORD32 eld_sbr_flag = eld_specific_config.ld_sbr_flag_present;
  129|   223k|  WORD32 ld_sbr_crc_flag = eld_specific_config.ld_sbr_crc_flag;
  130|   223k|  WORD32 aac_spect_data_resil_flag =
  131|   223k|      eld_specific_config.aac_spect_data_resil_flag;
  132|       |
  133|   223k|  WORD32 ele_ch = 0;
  134|       |
  135|   223k|  ia_aac_sfb_code_book_struct *ptr_aac_sfb_code_book_data[CHANNELS];
  136|   223k|  ia_pns_stereo_data_struct *ptr_pns_stereo_data;
  137|       |
  138|   223k|  WORD32 *work_buffer_core = aac_scratch_ptrs->base_scr_8k;
  139|   223k|  WORD32 *work_buffer_1 = aac_scratch_ptrs->extra_scr_4k[0];
  140|   223k|  WORD32 *work_buffer_2 = aac_scratch_ptrs->extra_scr_4k[2];
  141|   223k|  p_state_enhaacplus_dec = p_obj_exhaacplus_dec->p_state_aac;
  142|       |
  143|   223k|  WORD32 *time_data = (WORD32 *)time_data_tmp;
  144|       |
  145|   223k|  aac_dec_handle = p_state_enhaacplus_dec->pstr_aac_dec_info[*ch_idx];
  146|   223k|  it_bit_buff = p_state_enhaacplus_dec->ptr_bit_stream;
  147|   223k|  p_obj_exhaacplus_dec->aac_config.str_prog_config.alignment_bits = it_bit_buff->bit_pos;
  148|       |
  149|   223k|  ptr_adts_crc_info = it_bit_buff->pstr_adts_crc_info;
  150|       |
  151|   223k|  latm_element = &p_state_enhaacplus_dec->latm_struct_element;
  152|       |
  153|   223k|  ptr_pns_stereo_data =
  154|   223k|      (ia_pns_stereo_data_struct
  155|   223k|           *)&work_buffer_1[2 * SIZEOF_INT(ia_aac_dec_channel_info_struct) +
  ------------------
  |  |   91|   223k|#define SIZEOF_INT(x) ((sizeof(x) + sizeof(WORD32) - 1) / sizeof(WORD32))
  ------------------
  156|   223k|                            2 * SIZEOF_INT(ia_aac_sfb_code_book_struct)];
  ------------------
  |  |   91|   223k|#define SIZEOF_INT(x) ((sizeof(x) + sizeof(WORD32) - 1) / sizeof(WORD32))
  ------------------
  157|       |
  158|   223k|  aac_dec_handle->frame_status = 1;
  159|       |
  160|   498k|  for (ch = 0; ch < channel; ch++) {
  ------------------
  |  Branch (160:16): [True: 275k, False: 223k]
  ------------------
  161|   275k|    const ia_aac_dec_imdct_tables_struct *pstr_imdct_tables;
  162|   275k|    aac_dec_handle->pstr_aac_dec_ch_info[ch] =
  163|   275k|        (ia_aac_dec_channel_info_struct
  164|   275k|             *)&work_buffer_1[ch * SIZEOF_INT(ia_aac_dec_channel_info_struct)];
  ------------------
  |  |   91|   275k|#define SIZEOF_INT(x) ((sizeof(x) + sizeof(WORD32) - 1) / sizeof(WORD32))
  ------------------
  165|   275k|    ptr_aac_sfb_code_book_data[ch] =
  166|   275k|        (ia_aac_sfb_code_book_struct
  167|   275k|             *)&work_buffer_1[2 * SIZEOF_INT(ia_aac_dec_channel_info_struct) +
  ------------------
  |  |   91|   275k|#define SIZEOF_INT(x) ((sizeof(x) + sizeof(WORD32) - 1) / sizeof(WORD32))
  ------------------
  168|   275k|                              (ch * SIZEOF_INT(ia_aac_sfb_code_book_struct))];
  ------------------
  |  |   91|   275k|#define SIZEOF_INT(x) ((sizeof(x) + sizeof(WORD32) - 1) / sizeof(WORD32))
  ------------------
  169|       |
  170|   275k|    aac_dec_handle->pstr_aac_dec_ch_info[ch]->ptr_scale_factor =
  171|   275k|        ptr_aac_sfb_code_book_data[ch]->scale_factor;
  172|   275k|    aac_dec_handle->pstr_aac_dec_ch_info[ch]->ptr_code_book =
  173|   275k|        ptr_aac_sfb_code_book_data[ch]->code_book;
  174|       |
  175|   275k|    aac_dec_handle->pstr_aac_dec_ch_info[ch]->ptr_spec_coeff =
  176|   275k|        &work_buffer_core[ch * MAX_BINS_LONG];
  ------------------
  |  |   28|   275k|#define MAX_BINS_LONG 1024
  ------------------
  177|       |
  178|   275k|    if (object_type == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (178:9): [True: 91.7k, False: 184k]
  ------------------
  179|  91.7k|      aac_dec_handle->pstr_aac_dec_ch_info[ch]->ptr_spec_coeff =
  180|  91.7k|          &work_buffer_core[2 * ch * MAX_BINS_LONG];
  ------------------
  |  |   28|  91.7k|#define MAX_BINS_LONG 1024
  ------------------
  181|  91.7k|    }
  182|       |
  183|   275k|    aac_dec_handle->pstr_aac_dec_ch_info[ch]->pstr_stereo_info =
  184|   275k|        &ptr_pns_stereo_data->str_stereo_info;
  185|   275k|    aac_dec_handle->pstr_aac_dec_ch_info[ch]->pstr_pns_corr_info =
  186|   275k|        &ptr_pns_stereo_data->str_pns_corr_info;
  187|   275k|    aac_dec_handle->pstr_aac_dec_ch_info[ch]->pstr_pns_rand_vec_data =
  188|   275k|        aac_dec_handle->pstr_pns_rand_vec_data;
  189|       |
  190|   275k|    pstr_imdct_tables = aac_dec_handle->pstr_aac_tables->pstr_imdct_tables;
  191|       |
  192|   275k|    if (960 != frame_length) {
  ------------------
  |  Branch (192:9): [True: 216k, False: 59.1k]
  ------------------
  193|   216k|      aac_dec_handle->pstr_aac_dec_overlap_info[ch]->ptr_long_window[0] =
  194|   216k|          pstr_imdct_tables->only_long_window_sine;
  195|   216k|      aac_dec_handle->pstr_aac_dec_overlap_info[ch]->ptr_short_window[0] =
  196|   216k|          pstr_imdct_tables->only_short_window_sine;
  197|   216k|      aac_dec_handle->pstr_aac_dec_overlap_info[ch]->ptr_long_window[1] =
  198|   216k|          pstr_imdct_tables->only_long_window_kbd;
  199|   216k|      aac_dec_handle->pstr_aac_dec_overlap_info[ch]->ptr_short_window[1] =
  200|   216k|          pstr_imdct_tables->only_short_window_kbd;
  201|       |
  202|   216k|      aac_dec_handle->ptr_aac_dec_static_channel_info[ch]->ptr_long_window[0] =
  203|   216k|          pstr_imdct_tables->only_long_window_sine;
  204|   216k|      aac_dec_handle->ptr_aac_dec_static_channel_info[ch]->ptr_short_window[0] =
  205|   216k|          pstr_imdct_tables->only_short_window_sine;
  206|   216k|      aac_dec_handle->ptr_aac_dec_static_channel_info[ch]->ptr_long_window[1] =
  207|   216k|          pstr_imdct_tables->only_long_window_kbd;
  208|   216k|      aac_dec_handle->ptr_aac_dec_static_channel_info[ch]->ptr_short_window[1] =
  209|   216k|          pstr_imdct_tables->only_short_window_kbd;
  210|   216k|    } else {
  211|  59.1k|      aac_dec_handle->pstr_aac_dec_overlap_info[ch]->ptr_long_window[0] =
  212|  59.1k|          pstr_imdct_tables->only_long_window_sine_960;
  213|  59.1k|      aac_dec_handle->pstr_aac_dec_overlap_info[ch]->ptr_short_window[0] =
  214|  59.1k|          pstr_imdct_tables->only_short_window_sine_120;
  215|  59.1k|      aac_dec_handle->pstr_aac_dec_overlap_info[ch]->ptr_long_window[1] =
  216|  59.1k|          pstr_imdct_tables->only_long_window_kbd_960;
  217|  59.1k|      aac_dec_handle->pstr_aac_dec_overlap_info[ch]->ptr_short_window[1] =
  218|  59.1k|          pstr_imdct_tables->only_short_window_kbd_120;
  219|       |
  220|  59.1k|      aac_dec_handle->ptr_aac_dec_static_channel_info[ch]->ptr_long_window[0] =
  221|  59.1k|          pstr_imdct_tables->only_long_window_sine_960;
  222|  59.1k|      aac_dec_handle->ptr_aac_dec_static_channel_info[ch]->ptr_short_window[0] =
  223|  59.1k|          pstr_imdct_tables->only_short_window_sine_120;
  224|  59.1k|      aac_dec_handle->ptr_aac_dec_static_channel_info[ch]->ptr_long_window[1] =
  225|  59.1k|          pstr_imdct_tables->only_long_window_kbd_960;
  226|  59.1k|      aac_dec_handle->ptr_aac_dec_static_channel_info[ch]->ptr_short_window[1] =
  227|  59.1k|          pstr_imdct_tables->only_short_window_kbd_120;
  228|  59.1k|    }
  229|       |
  230|   275k|    if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal && frame_status == 0)
  ------------------
  |  Branch (230:9): [True: 0, False: 275k]
  |  Branch (230:60): [True: 0, False: 0]
  ------------------
  231|      0|    {
  232|      0|      memset(&aac_dec_handle->pstr_aac_dec_ch_info[ch]->str_ics_info, 0,
  233|      0|             sizeof(ia_ics_info_struct));
  234|      0|    }
  235|   275k|    aac_dec_handle->pstr_aac_dec_ch_info[ch]->str_ics_info.frame_length = frame_length;
  236|   275k|    if (object_type == AOT_ER_AAC_ELD || object_type == AOT_ER_AAC_LD ||
  ------------------
  |  Branch (236:9): [True: 91.7k, False: 184k]
  |  Branch (236:42): [True: 72.0k, False: 112k]
  ------------------
  237|   194k|        object_type == AOT_AAC_LTP) {
  ------------------
  |  Branch (237:9): [True: 30.7k, False: 81.4k]
  ------------------
  238|   194k|      if (512 == aac_dec_handle->samples_per_frame) {
  ------------------
  |  Branch (238:11): [True: 115k, False: 78.8k]
  ------------------
  239|   115k|        if (object_type != AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (239:13): [True: 56.7k, False: 58.9k]
  ------------------
  240|  56.7k|          aac_dec_handle->pstr_aac_dec_overlap_info[ch]->ptr_long_window[1] =
  241|  56.7k|              (WORD16 *)pstr_imdct_tables->low_overlap_win;
  242|  56.7k|          aac_dec_handle->pstr_aac_dec_overlap_info[ch]->ptr_long_window[0] =
  243|  56.7k|              (WORD16 *)pstr_imdct_tables->window_sine_512;
  244|       |
  245|  56.7k|          aac_dec_handle->ptr_aac_dec_static_channel_info[ch]
  246|  56.7k|              ->ptr_long_window[1] =
  247|  56.7k|              (WORD16 *)pstr_imdct_tables->low_overlap_win;
  248|  56.7k|          aac_dec_handle->ptr_aac_dec_static_channel_info[ch]
  249|  56.7k|              ->ptr_long_window[0] =
  250|  56.7k|              (WORD16 *)pstr_imdct_tables->window_sine_512;
  251|  58.9k|        } else {
  252|  58.9k|          aac_dec_handle->pstr_aac_dec_overlap_info[ch]->ptr_long_window[1] =
  253|  58.9k|              (WORD16 *)pstr_imdct_tables->window_sine_512_eld;
  254|  58.9k|          aac_dec_handle->pstr_aac_dec_overlap_info[ch]->ptr_long_window[0] =
  255|  58.9k|              (WORD16 *)pstr_imdct_tables->window_sine_512_eld;
  256|  58.9k|        }
  257|   115k|      } else if (480 == aac_dec_handle->samples_per_frame) {
  ------------------
  |  Branch (257:18): [True: 48.1k, False: 30.7k]
  ------------------
  258|  48.1k|        if (object_type != AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (258:13): [True: 15.3k, False: 32.7k]
  ------------------
  259|  15.3k|          aac_dec_handle->pstr_aac_dec_overlap_info[ch]->ptr_long_window[1] =
  260|  15.3k|              (WORD16 *)pstr_imdct_tables->low_overlap_win_480;
  261|  15.3k|          aac_dec_handle->pstr_aac_dec_overlap_info[ch]->ptr_long_window[0] =
  262|  15.3k|              (WORD16 *)pstr_imdct_tables->window_sine_480;
  263|       |
  264|  15.3k|          aac_dec_handle->ptr_aac_dec_static_channel_info[ch]
  265|  15.3k|              ->ptr_long_window[1] =
  266|  15.3k|              (WORD16 *)pstr_imdct_tables->low_overlap_win_480;
  267|  15.3k|          aac_dec_handle->ptr_aac_dec_static_channel_info[ch]
  268|  15.3k|              ->ptr_long_window[0] =
  269|  15.3k|              (WORD16 *)pstr_imdct_tables->window_sine_480;
  270|       |
  271|  32.7k|        } else {
  272|  32.7k|          aac_dec_handle->pstr_aac_dec_overlap_info[ch]->ptr_long_window[1] =
  273|  32.7k|              (WORD16 *)pstr_imdct_tables->window_sine_480_eld;
  274|  32.7k|          aac_dec_handle->pstr_aac_dec_overlap_info[ch]->ptr_long_window[0] =
  275|  32.7k|              (WORD16 *)pstr_imdct_tables->window_sine_480_eld;
  276|  32.7k|        }
  277|  48.1k|      }
  278|   194k|    }
  279|   275k|    if ((object_type == AOT_ER_AAC_LD) || (object_type == AOT_AAC_LTP)) {
  ------------------
  |  Branch (279:9): [True: 72.0k, False: 203k]
  |  Branch (279:43): [True: 30.7k, False: 173k]
  ------------------
  280|   102k|      if (aac_dec_handle->samples_per_frame <= 512) {
  ------------------
  |  Branch (280:11): [True: 72.0k, False: 30.7k]
  ------------------
  281|  72.0k|        aac_dec_handle->pstr_aac_dec_ch_info[ch]->str_ics_info.ltp2.lag =
  282|  72.0k|            aac_dec_handle->ptr_aac_dec_static_channel_info[ch]->ltp_lag_1;
  283|  72.0k|        aac_dec_handle->pstr_aac_dec_ch_info[ch]->str_ics_info.ltp.lag =
  284|  72.0k|            aac_dec_handle->ptr_aac_dec_static_channel_info[ch]->ltp_lag_2;
  285|  72.0k|      }
  286|   102k|      aac_dec_handle->pstr_aac_dec_ch_info[ch]->ltp_buf =
  287|   102k|          aac_dec_handle->ptr_aac_dec_static_channel_info[ch]->ltp_buf;
  288|   102k|      aac_dec_handle->pstr_aac_dec_ch_info[ch]->ltp_lag =
  289|   102k|          aac_dec_handle->ptr_aac_dec_static_channel_info[ch]->ltp_lag_1;
  290|   102k|    }
  291|       |
  292|   275k|    aac_dec_handle->pstr_aac_dec_ch_info[ch]->scratch_buf_ptr = work_buffer_2;
  293|   275k|    if (object_type == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (293:9): [True: 91.7k, False: 184k]
  ------------------
  294|  91.7k|      aac_dec_handle->pstr_aac_dec_ch_info[ch]->pulse_scratch =
  295|  91.7k|          aac_scratch_ptrs->extra_scr_4k[3];
  296|  91.7k|    }
  297|   275k|  }
  298|       |
  299|   223k|  if (channel == 2) {
  ------------------
  |  Branch (299:7): [True: 52.9k, False: 170k]
  ------------------
  300|  52.9k|    if (aac_dec_handle->pstr_aac_dec_ch_info[1]->ptr_spec_coeff ==
  ------------------
  |  Branch (300:9): [True: 0, False: 52.9k]
  ------------------
  301|  52.9k|        aac_scratch_ptrs->extra_scr_4k[0]) {
  302|      0|      aac_dec_handle->pstr_aac_dec_ch_info[1]->ptr_spec_coeff =
  303|      0|          aac_dec_handle->pstr_aac_dec_ch_info[0]->ptr_spec_coeff;
  304|      0|    }
  305|  52.9k|  }
  306|       |
  307|   498k|  for (ch = 0; ch < channel; ch++) {
  ------------------
  |  Branch (307:16): [True: 275k, False: 223k]
  ------------------
  308|   275k|    ia_pns_info_struct *ptr_pns_info =
  309|   275k|        &aac_dec_handle->pstr_aac_dec_ch_info[ch]->str_pns_info;
  310|   275k|    memset(ptr_pns_info, 0, sizeof(ia_pns_info_struct));
  311|   275k|  }
  312|       |
  313|   223k|  if (channel > 0) {
  ------------------
  |  Branch (313:7): [True: 223k, False: 0]
  ------------------
  314|   223k|    ia_pns_correlation_info_struct *ptr_corr_info =
  315|   223k|        aac_dec_handle->pstr_aac_dec_ch_info[0]->pstr_pns_corr_info;
  316|   223k|    memset(ptr_corr_info->correlated, 0, sizeof(UWORD8) * PNS_BAND_FLAGS_SIZE);
  ------------------
  |  |   25|   223k|#define PNS_BAND_FLAGS_SIZE 16
  ------------------
  317|   223k|  }
  318|       |
  319|   498k|  for (ch = 0; ch < channel; ch++) {
  ------------------
  |  Branch (319:16): [True: 275k, False: 223k]
  ------------------
  320|   275k|    memset(&aac_dec_handle->pstr_aac_dec_ch_info[ch]->str_hcr_info, 0,
  321|   275k|           sizeof(ia_hcr_info_struct));
  322|   275k|    ixheaacd_huff_code_reorder_tbl_init(
  323|   275k|        &aac_dec_handle->pstr_aac_dec_ch_info[ch]->str_hcr_info);
  324|   275k|  }
  325|       |
  326|   498k|  for (ch = 0; ch < channel; ch++) {
  ------------------
  |  Branch (326:16): [True: 275k, False: 223k]
  ------------------
  327|   275k|    aac_dec_handle->pstr_aac_dec_ch_info[ch]->str_ics_info.ltp.data_present = 0;
  328|   275k|    aac_dec_handle->pstr_aac_dec_ch_info[ch]->str_ics_info.ltp2.data_present =
  329|   275k|        0;
  330|   275k|  }
  331|       |
  332|   498k|  for (ch = 0; ch < channel; ch++) {
  ------------------
  |  Branch (332:16): [True: 275k, False: 223k]
  ------------------
  333|   275k|    if (object_type == AOT_ER_AAC_ELD || object_type == AOT_ER_AAC_LD)
  ------------------
  |  Branch (333:9): [True: 91.7k, False: 184k]
  |  Branch (333:42): [True: 72.0k, False: 112k]
  ------------------
  334|   163k|      aac_dec_handle->pstr_aac_dec_ch_info[ch]->granule_len =
  335|   163k|          aac_dec_handle->samples_per_frame;
  336|   275k|    if (object_type == AOT_ER_AAC_LC)
  ------------------
  |  Branch (336:9): [True: 40.6k, False: 235k]
  ------------------
  337|  40.6k|      aac_dec_handle->pstr_aac_dec_ch_info[ch]->granule_len =
  338|  40.6k|          aac_dec_handle->samples_per_frame / 8;
  339|   275k|  }
  340|   223k|  previous_element = ID_END;
  341|       |
  342|   223k|  aac_dec_handle->pstr_sbr_bitstream->no_elements = 0;
  343|   223k|  new_element = 0;
  344|   223k|  ele_type = *type;
  345|       |
  346|   223k|  cnt_bits = it_bit_buff->cnt_bits;
  347|       |
  348|   223k|  WORD32 err = 0;
  349|   223k|  jmp_buf local;
  350|       |
  351|   223k|  if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
  ------------------
  |  Branch (351:7): [True: 0, False: 223k]
  ------------------
  352|      0|    err = setjmp(local);
  353|      0|  }
  354|       |
  355|   223k|  if (!err && frame_status) {
  ------------------
  |  Branch (355:7): [True: 223k, False: 0]
  |  Branch (355:15): [True: 223k, False: 0]
  ------------------
  356|   223k|    if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
  ------------------
  |  Branch (356:9): [True: 0, False: 223k]
  ------------------
  357|      0|      it_bit_buff->xaac_jmp_buf = &local;
  358|      0|    }
  359|       |
  360|   223k|    if (((object_type != AOT_ER_AAC_ELD) && (object_type != AOT_ER_AAC_LD) &&
  ------------------
  |  Branch (360:10): [True: 165k, False: 57.8k]
  |  Branch (360:45): [True: 100k, False: 64.8k]
  ------------------
  361|   100k|         (object_type != AOT_ER_AAC_LC)) ||
  ------------------
  |  Branch (361:10): [True: 63.0k, False: 37.3k]
  ------------------
  362|   159k|        (object_type < ER_OBJECT_START)) {
  ------------------
  |  |   64|   159k|#define ER_OBJECT_START 17
  ------------------
  |  Branch (362:9): [True: 0, False: 159k]
  ------------------
  363|   205k|      while (ele_type != ID_END && aac_dec_handle->frame_status) {
  ------------------
  |  Branch (363:14): [True: 163k, False: 41.4k]
  |  Branch (363:36): [True: 163k, False: 33]
  ------------------
  364|   163k|        ele_type = (WORD)ixheaacd_read_bits_buf(it_bit_buff, 3);
  365|   163k|        ixheaacd_read_bidirection(it_bit_buff, -3);
  366|       |
  367|   163k|        if (it_bit_buff->cnt_bits < 3) {
  ------------------
  |  Branch (367:13): [True: 0, False: 163k]
  ------------------
  368|      0|          it_bit_buff->cnt_bits = -1;
  369|      0|          error_code = (WORD16)((WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|      0|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  370|      0|          break;
  371|      0|        }
  372|       |
  373|   163k|        if ((ele_type == ID_FIL) || (ele_type == ID_DSE) || (new_element == 0)) {
  ------------------
  |  Branch (373:13): [True: 31.9k, False: 131k]
  |  Branch (373:37): [True: 7.48k, False: 124k]
  |  Branch (373:61): [True: 63.0k, False: 61.3k]
  ------------------
  374|   102k|          ele_type = (WORD)ixheaacd_read_bits_buf(it_bit_buff, 3);
  375|   102k|          new_element = 1;
  376|   102k|        } else if ((ele_type != ID_END)) {
  ------------------
  |  Branch (376:20): [True: 19.9k, False: 41.5k]
  ------------------
  377|  19.9k|          ele_type = -1;
  378|  19.9k|          break;
  379|  41.5k|        } else {
  380|  41.5k|          ele_type = (WORD)ixheaacd_read_bits_buf(it_bit_buff, 3);
  381|  41.5k|        }
  382|       |
  383|   143k|        if (it_bit_buff->cnt_bits < 0) {
  ------------------
  |  Branch (383:13): [True: 0, False: 143k]
  ------------------
  384|      0|          aac_dec_handle->frame_status = 0;
  385|      0|        }
  386|       |
  387|   143k|        switch (ele_type) {
  ------------------
  |  Branch (387:17): [True: 143k, False: 169]
  ------------------
  388|  48.2k|          case ID_SCE:
  ------------------
  |  Branch (388:11): [True: 48.2k, False: 95.6k]
  ------------------
  389|  50.1k|          case ID_CPE:
  ------------------
  |  Branch (389:11): [True: 1.85k, False: 142k]
  ------------------
  390|  62.0k|          case ID_LFE:
  ------------------
  |  Branch (390:11): [True: 11.8k, False: 131k]
  ------------------
  391|       |
  392|  62.0k|            if (aac_dec_handle->frame_status) {
  ------------------
  |  Branch (392:17): [True: 62.0k, False: 0]
  ------------------
  393|  62.0k|              ia_aac_dec_channel_info_struct *pstr_aac_dec_ch_info =
  394|  62.0k|                  aac_dec_handle->pstr_aac_dec_ch_info[LEFT];
  ------------------
  |  |   40|  62.0k|#define LEFT 0
  ------------------
  395|  62.0k|              ia_ics_info_struct *ptr_ics_info = &pstr_aac_dec_ch_info->str_ics_info;
  396|  62.0k|              ele_ch = 1;
  397|  62.0k|              if (ele_type == ID_CPE) {
  ------------------
  |  Branch (397:19): [True: 1.85k, False: 60.1k]
  ------------------
  398|  1.85k|                ele_ch = 2;
  399|  60.1k|              } else {
  400|  60.1k|                ele_ch = 1;
  401|  60.1k|              }
  402|       |
  403|  62.0k|              prev_data_ele_present = 1;
  404|       |
  405|  62.0k|              if (ptr_adts_crc_info->crc_active == 1 && ptr_adts_crc_info->no_reg < 7) {
  ------------------
  |  Branch (405:19): [True: 208, False: 61.8k]
  |  Branch (405:57): [True: 171, False: 37]
  ------------------
  406|    171|                crc_reg = ixheaacd_adts_crc_start_reg(ptr_adts_crc_info, it_bit_buff,
  407|    171|                                                      CRC_ADTS_RAW_DATA_BLK_LEN);
  ------------------
  |  |   26|    171|#define CRC_ADTS_RAW_DATA_BLK_LEN 192
  ------------------
  408|    171|              }
  409|       |
  410|  62.0k|              pstr_aac_dec_ch_info->element_instance_tag =
  411|  62.0k|                  (WORD16)ixheaacd_read_bits_buf(it_bit_buff, 4);
  412|       |
  413|  62.0k|              element_index_order[*ch_idx] = pstr_aac_dec_ch_info->element_instance_tag;
  414|  62.0k|              pstr_aac_dec_ch_info->common_window = 0;
  415|       |
  416|  62.0k|              ptr_ics_info->num_swb_window = 0;
  417|  62.0k|              ptr_ics_info->sampling_rate_index = aac_dec_handle->sampling_rate_index;
  418|  62.0k|              if ((object_type == AOT_ER_AAC_LD) || (object_type == AOT_AAC_LTP)) {
  ------------------
  |  Branch (418:19): [True: 34, False: 61.9k]
  |  Branch (418:53): [True: 28.3k, False: 33.5k]
  ------------------
  419|  28.3k|                ptr_ics_info->ltp.data_present = 0;
  420|  28.3k|                ptr_ics_info->ltp2.data_present = 0;
  421|  28.3k|                ptr_ics_info->predictor_data_present = 0;
  422|  28.3k|              }
  423|       |
  424|  62.0k|              if (ele_ch > 1) {
  ------------------
  |  Branch (424:19): [True: 1.84k, False: 60.1k]
  ------------------
  425|  1.84k|                aac_dec_handle->pstr_aac_dec_ch_info[RIGHT]->str_ics_info.num_swb_window = 0;
  ------------------
  |  |   41|  1.84k|#define RIGHT 1
  ------------------
  426|  1.84k|                aac_dec_handle->pstr_aac_dec_ch_info[RIGHT]->str_ics_info.sampling_rate_index =
  ------------------
  |  |   41|  1.84k|#define RIGHT 1
  ------------------
  427|  1.84k|                    aac_dec_handle->sampling_rate_index;
  428|       |
  429|  1.84k|                pstr_aac_dec_ch_info->common_window =
  430|  1.84k|                    (WORD16)ixheaacd_read_bits_buf(it_bit_buff, 1);
  431|       |
  432|  1.84k|                if (pstr_aac_dec_ch_info->common_window) {
  ------------------
  |  Branch (432:21): [True: 730, False: 1.11k]
  ------------------
  433|    730|                  error_code = ixheaacd_ics_read(
  434|    730|                      it_bit_buff, ptr_ics_info, aac_dec_handle->num_swb_window, object_type,
  435|    730|                      pstr_aac_dec_ch_info->common_window, aac_dec_handle->samples_per_frame);
  436|    730|                  if (error_code) {
  ------------------
  |  Branch (436:23): [True: 18, False: 712]
  ------------------
  437|     18|                    aac_dec_handle->pstr_aac_dec_ch_info[RIGHT]->str_ics_info =
  ------------------
  |  |   41|     18|#define RIGHT 1
  ------------------
  438|     18|                        aac_dec_handle->pstr_aac_dec_ch_info[LEFT]->str_ics_info;
  ------------------
  |  |   40|     18|#define LEFT 0
  ------------------
  439|     18|                    if (it_bit_buff->cnt_bits < 0) {
  ------------------
  |  Branch (439:25): [True: 0, False: 18]
  ------------------
  440|      0|                      error_code =
  441|      0|                          (WORD16)((WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|      0|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  442|      0|                    }
  443|       |
  444|     18|                    goto _ia_handle_error;
  445|     18|                  }
  446|       |
  447|    712|                  aac_dec_handle->pstr_aac_dec_ch_info[RIGHT]->str_ics_info =
  ------------------
  |  |   41|    712|#define RIGHT 1
  ------------------
  448|    712|                      pstr_aac_dec_ch_info->str_ics_info;
  449|       |
  450|    712|                  ixheaacd_read_ms_data(it_bit_buff, pstr_aac_dec_ch_info);
  451|    712|                }
  452|  1.84k|              }
  453|       |
  454|  61.9k|              error_code = ixheaacd_individual_ch_stream(
  455|  61.9k|                  it_bit_buff, aac_dec_handle, ele_ch, frame_length, total_channels, object_type,
  456|  61.9k|                  eld_specific_config, ele_type);
  457|       |
  458|  61.9k|              if (error_code) {
  ------------------
  |  Branch (458:19): [True: 822, False: 61.1k]
  ------------------
  459|    822|                if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal && !is_init) {
  ------------------
  |  Branch (459:21): [True: 0, False: 822]
  |  Branch (459:72): [True: 0, False: 0]
  ------------------
  460|      0|                  aac_dec_handle->frame_status = 0;
  461|    822|                } else {
  462|    822|                  return error_code;
  463|    822|                }
  464|    822|              }
  465|       |
  466|  61.1k|              if (ptr_adts_crc_info->crc_active == 1) {
  ------------------
  |  Branch (466:19): [True: 172, False: 61.0k]
  ------------------
  467|    172|                ixheaacd_adts_crc_end_reg(ptr_adts_crc_info, it_bit_buff, crc_reg);
  468|    172|              }
  469|       |
  470|  61.1k|              if (it_bit_buff->cnt_bits < 0) {
  ------------------
  |  Branch (470:19): [True: 15, False: 61.1k]
  ------------------
  471|     15|                error_code =
  472|     15|                    (WORD16)((WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|     15|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  473|     15|              }
  474|       |
  475|  61.1k|              if (error_code) {
  ------------------
  |  Branch (475:19): [True: 15, False: 61.1k]
  ------------------
  476|     15|                goto _ia_handle_error;
  477|     15|              }
  478|       |
  479|  61.1k|            _ia_handle_error:
  480|  60.8k|              if (error_code) {
  ------------------
  |  Branch (480:19): [True: 33, False: 60.7k]
  ------------------
  481|     33|                aac_dec_handle->frame_status = 0;
  482|     33|                if ((ele_type >= ID_SCE) && (ele_type <= ID_LFE)) num_ch = num_ch + ele_ch;
  ------------------
  |  Branch (482:21): [True: 33, False: 0]
  |  Branch (482:45): [True: 33, False: 0]
  ------------------
  483|     33|                break;
  484|  60.7k|              } else {
  485|  60.7k|                error_code = ixheaacd_channel_pair_process(
  486|  60.7k|                    aac_dec_handle->pstr_aac_dec_ch_info, ele_ch, aac_dec_handle->pstr_aac_tables,
  487|  60.7k|                    total_channels, object_type, aac_spect_data_resil_flag,
  488|  60.7k|                    eld_specific_config.aac_sf_data_resil_flag, aac_scratch_ptrs->in_data,
  489|  60.7k|                    aac_scratch_ptrs->out_data, (VOID *)aac_dec_handle);
  490|  60.7k|                if (error_code) {
  ------------------
  |  Branch (490:21): [True: 0, False: 60.7k]
  ------------------
  491|      0|                  if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal && !is_init) {
  ------------------
  |  Branch (491:23): [True: 0, False: 0]
  |  Branch (491:74): [True: 0, False: 0]
  ------------------
  492|      0|                    aac_dec_handle->frame_status = 0;
  493|      0|                  } else {
  494|      0|                    return error_code;
  495|      0|                  }
  496|      0|                }
  497|  60.7k|                num_ch = num_ch + ele_ch;
  498|  60.7k|              }
  499|  60.8k|            }
  500|       |
  501|  60.7k|            break;
  502|  60.7k|          case ID_CCE:
  ------------------
  |  Branch (502:11): [True: 884, False: 143k]
  ------------------
  503|    884|            if (max_channels > 2) {
  ------------------
  |  Branch (503:17): [True: 884, False: 0]
  ------------------
  504|    884|              prev_data_ele_present = 1;
  505|    884|              error_code = ixheaacd_dec_coupling_channel_element(
  506|    884|                  it_bit_buff, aac_dec_handle, aac_dec_handle->sampling_rate_index,
  507|    884|                  aac_dec_handle->pstr_aac_tables, aac_dec_handle->pstr_common_tables,
  508|    884|                  &element_index_order[*ch_idx],
  509|    884|                  (ia_enhaacplus_dec_ind_cc *)aac_dec_handle->p_ind_channel_info, total_channels,
  510|    884|                  frame_length, object_type, eld_specific_config, ele_type);
  511|       |
  512|    884|              num_ch = num_ch + 1;
  513|       |
  514|    884|              if (error_code) {
  ------------------
  |  Branch (514:19): [True: 42, False: 842]
  ------------------
  515|     42|                aac_dec_handle->frame_status = 0;
  516|     42|                if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal && !is_init) {
  ------------------
  |  Branch (516:21): [True: 0, False: 42]
  |  Branch (516:72): [True: 0, False: 0]
  ------------------
  517|      0|                  aac_dec_handle->frame_status = 0;
  518|     42|                } else {
  519|     42|                  return error_code;
  520|     42|                }
  521|    842|              } else {
  522|    842|                error_code = ixheaacd_channel_pair_process(
  523|    842|                    aac_dec_handle->pstr_aac_dec_ch_info, 1, aac_dec_handle->pstr_aac_tables,
  524|    842|                    total_channels, object_type, aac_spect_data_resil_flag,
  525|    842|                    eld_specific_config.aac_sf_data_resil_flag, aac_scratch_ptrs->in_data,
  526|    842|                    aac_scratch_ptrs->out_data, (VOID *)aac_dec_handle);
  527|    842|                if (error_code) {
  ------------------
  |  Branch (527:21): [True: 0, False: 842]
  ------------------
  528|      0|                  if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal && !is_init) {
  ------------------
  |  Branch (528:23): [True: 0, False: 0]
  |  Branch (528:74): [True: 0, False: 0]
  ------------------
  529|      0|                    aac_dec_handle->frame_status = 0;
  530|      0|                  } else {
  531|      0|                    return error_code;
  532|      0|                  }
  533|      0|                }
  534|    842|              }
  535|    884|            } else {
  536|      0|              error_code = (WORD32)((WORD32)IA_XHEAAC_DEC_EXE_FATAL_UNIMPLEMENTED_CCE);
  ------------------
  |  |  119|      0|#define IA_XHEAAC_DEC_EXE_FATAL_UNIMPLEMENTED_CCE 0xFFFF9800
  ------------------
  537|      0|            }
  538|    842|            if (it_bit_buff->cnt_bits < 0) {
  ------------------
  |  Branch (538:17): [True: 0, False: 842]
  ------------------
  539|      0|              error_code = (WORD16)((WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|      0|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  540|      0|              goto _ia_handle_error;
  541|      0|            }
  542|    842|            break;
  543|       |
  544|  7.48k|          case ID_DSE:
  ------------------
  |  Branch (544:11): [True: 7.48k, False: 136k]
  ------------------
  545|  7.59k|          case ID_PCE:
  ------------------
  |  Branch (545:11): [True: 115, False: 143k]
  ------------------
  546|  39.3k|          case ID_FIL:
  ------------------
  |  Branch (546:11): [True: 31.7k, False: 112k]
  ------------------
  547|       |
  548|  39.3k|          {
  549|  39.3k|            WORD32 flag = 1;
  550|       |
  551|  39.3k|            if ((ele_type != ID_FIL) && (ptr_adts_crc_info->crc_active == 1) &&
  ------------------
  |  Branch (551:17): [True: 7.59k, False: 31.7k]
  |  Branch (551:41): [True: 118, False: 7.48k]
  ------------------
  552|    118|                (ptr_adts_crc_info->no_reg < 7)) {
  ------------------
  |  Branch (552:17): [True: 45, False: 73]
  ------------------
  553|     45|              crc_reg = ixheaacd_adts_crc_start_reg(ptr_adts_crc_info, it_bit_buff, 0);
  554|     45|            }
  555|  39.3k|            if (ele_type == ID_DSE) {
  ------------------
  |  Branch (555:17): [True: 7.48k, False: 31.8k]
  ------------------
  556|  7.48k|              ixheaacd_read_data_stream_element(it_bit_buff, &aac_dec_handle->byte_align_bits,
  557|  7.48k|                                                p_obj_exhaacplus_dec->p_state_aac->pstr_drc_dec);
  558|  7.48k|            }
  559|       |
  560|  31.8k|            else if (ele_type == ID_PCE) {
  ------------------
  |  Branch (560:22): [True: 115, False: 31.7k]
  ------------------
  561|    115|              error_code = ixheaacd_decode_pce(
  562|    115|                  it_bit_buff, &p_obj_exhaacplus_dec->aac_config.ui_pce_found_in_hdr,
  563|    115|                  &p_obj_exhaacplus_dec->aac_config.str_prog_config);
  564|    115|              if (error_code != 0) {
  ------------------
  |  Branch (564:19): [True: 30, False: 85]
  ------------------
  565|     30|                if (it_bit_buff->cnt_bits < 0) {
  ------------------
  |  Branch (565:21): [True: 0, False: 30]
  ------------------
  566|      0|                  error_code =
  567|      0|                      (WORD16)((WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|      0|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  568|      0|                  goto _ia_handle_error;
  569|      0|                }
  570|     30|                aac_dec_handle->frame_status = 0;
  571|     30|                if (error_code > 0) {
  ------------------
  |  Branch (571:21): [True: 9, False: 21]
  ------------------
  572|      9|                  if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal && !is_init) {
  ------------------
  |  Branch (572:23): [True: 0, False: 9]
  |  Branch (572:74): [True: 0, False: 0]
  ------------------
  573|      0|                    aac_dec_handle->frame_status = 0;
  574|      9|                  } else {
  575|      9|                    return IA_XHEAAC_DEC_EXE_NONFATAL_DECODE_FRAME_ERROR;
  ------------------
  |  |  102|      9|#define IA_XHEAAC_DEC_EXE_NONFATAL_DECODE_FRAME_ERROR 0x00001807
  ------------------
  576|      9|                  }
  577|     21|                } else {
  578|     21|                  if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal && !is_init) {
  ------------------
  |  Branch (578:23): [True: 0, False: 21]
  |  Branch (578:74): [True: 0, False: 0]
  ------------------
  579|      0|                    aac_dec_handle->frame_status = 0;
  580|     21|                  } else {
  581|     21|                    return error_code;
  582|     21|                  }
  583|     21|                }
  584|     30|              }
  585|    115|            }
  586|       |
  587|  31.7k|            else if (ele_type == ID_FIL) {
  ------------------
  |  Branch (587:22): [True: 31.7k, False: 0]
  ------------------
  588|  31.7k|              WORD32 bits_decoded = 0;
  589|  31.7k|              if (object_type == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (589:19): [True: 0, False: 31.7k]
  ------------------
  590|      0|                bits_decoded = (it_bit_buff->size - it_bit_buff->cnt_bits);
  591|      0|                cnt_bits = (frame_size * 8 - bits_decoded);
  592|      0|                if (adtsheader == 1) {
  ------------------
  |  Branch (592:21): [True: 0, False: 0]
  ------------------
  593|      0|                  if (cnt_bits > it_bit_buff->cnt_bits) {
  ------------------
  |  Branch (593:23): [True: 0, False: 0]
  ------------------
  594|      0|                    if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal && !is_init) {
  ------------------
  |  Branch (594:25): [True: 0, False: 0]
  |  Branch (594:76): [True: 0, False: 0]
  ------------------
  595|      0|                      aac_dec_handle->frame_status = 0;
  596|      0|                    } else {
  597|      0|                      return IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES;
  ------------------
  |  |   98|      0|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  598|      0|                    }
  599|      0|                  }
  600|      0|                }
  601|      0|              }
  602|       |
  603|  31.7k|              if (ixheaacd_check_for_sbr_payload(
  ------------------
  |  Branch (603:19): [True: 13.6k, False: 18.0k]
  ------------------
  604|  31.7k|                      it_bit_buff, aac_dec_handle->pstr_sbr_bitstream, (WORD16)previous_element,
  605|  31.7k|                      pstr_drc_dec, object_type, adtsheader, cnt_bits, ld_sbr_crc_flag, drc_dummy,
  606|  31.7k|                      mps_buffer, mps_header, mps_bytes, is_init, &aac_dec_handle->is_first,
  607|  31.7k|                      p_obj_exhaacplus_dec->aac_config.ui_err_conceal)) {
  608|  13.6k|                flag = 0;
  609|  13.6k|              }
  610|  31.7k|            }
  611|       |
  612|  39.3k|            if (it_bit_buff->cnt_bits < 0) {
  ------------------
  |  Branch (612:17): [True: 0, False: 39.3k]
  ------------------
  613|      0|              error_code = (WORD16)((WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|      0|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  614|      0|              goto _ia_handle_error;
  615|      0|            }
  616|       |
  617|  39.3k|            if (flag) {
  ------------------
  |  Branch (617:17): [True: 25.5k, False: 13.8k]
  ------------------
  618|  25.5k|              if (prev_data_ele_present == 0) {
  ------------------
  |  Branch (618:19): [True: 1.61k, False: 23.8k]
  ------------------
  619|  1.61k|                new_element = 0;
  620|  1.61k|              }
  621|  25.5k|            }
  622|  39.3k|            if ((ele_type != ID_FIL) && (ptr_adts_crc_info->crc_active == 1)) {
  ------------------
  |  Branch (622:17): [True: 7.52k, False: 31.8k]
  |  Branch (622:41): [True: 110, False: 7.41k]
  ------------------
  623|    110|              ixheaacd_adts_crc_end_reg(ptr_adts_crc_info, it_bit_buff, crc_reg);
  624|    110|            }
  625|       |
  626|  39.3k|            if (ele_type == ID_PCE) {
  ------------------
  |  Branch (626:17): [True: 73, False: 39.2k]
  ------------------
  627|     73|              if (ptr_adts_crc_info->str_crc_reg_data[crc_reg].bit_buf_cnt) {
  ------------------
  |  Branch (627:19): [True: 34, False: 39]
  ------------------
  628|     34|                ptr_adts_crc_info->str_crc_reg_data[crc_reg].max_bits =
  629|     34|                    ptr_adts_crc_info->str_crc_reg_data[crc_reg].bit_buf_cnt;
  630|     34|              }
  631|     73|            }
  632|  39.3k|          }
  633|       |
  634|      0|          break;
  635|       |
  636|  41.4k|          case ID_END:
  ------------------
  |  Branch (636:11): [True: 41.4k, False: 102k]
  ------------------
  637|  41.4k|            error_code = 0;
  638|  41.4k|            break;
  639|   143k|        }
  640|       |
  641|   142k|        previous_element = ele_type;
  642|       |
  643|   142k|        if (init_flag) {
  ------------------
  |  Branch (643:13): [True: 17.4k, False: 124k]
  ------------------
  644|  17.4k|          if ((ele_type >= ID_SCE) && (ele_type <= ID_LFE)) {
  ------------------
  |  Branch (644:15): [True: 17.4k, False: 0]
  |  Branch (644:39): [True: 6.56k, False: 10.8k]
  ------------------
  645|  6.56k|            p_obj_exhaacplus_dec->aac_config.element_type[*ch_idx] = ele_type;
  646|  6.56k|          }
  647|  17.4k|        }
  648|   142k|      }
  649|   159k|    } else {
  650|   159k|      {
  651|   159k|        switch (ch_config) {
  652|   159k|          default:
  ------------------
  |  Branch (652:11): [True: 159k, False: 0]
  ------------------
  653|   159k|            if (aac_dec_handle->frame_status) {
  ------------------
  |  Branch (653:17): [True: 159k, False: 0]
  ------------------
  654|   159k|              ia_aac_dec_channel_info_struct *pstr_aac_dec_ch_info =
  655|   159k|                  aac_dec_handle->pstr_aac_dec_ch_info[LEFT];
  ------------------
  |  |   40|   159k|#define LEFT 0
  ------------------
  656|   159k|              ia_ics_info_struct *ptr_ics_info = &pstr_aac_dec_ch_info->str_ics_info;
  657|       |
  658|   159k|              if (ch_config == 2)
  ------------------
  |  Branch (658:19): [True: 42.1k, False: 117k]
  ------------------
  659|  42.1k|                ele_ch = 2, ele_type = 1;
  660|   117k|              else
  661|   117k|                ele_ch = 1, ele_type = 0;
  662|       |
  663|   159k|              prev_data_ele_present = 1;
  664|       |
  665|   159k|              if ((ptr_adts_crc_info->crc_active == 1) && (ptr_adts_crc_info->no_reg < 7)) {
  ------------------
  |  Branch (665:19): [True: 0, False: 159k]
  |  Branch (665:59): [True: 0, False: 0]
  ------------------
  666|      0|                crc_reg = ixheaacd_adts_crc_start_reg(ptr_adts_crc_info, it_bit_buff,
  667|      0|                                                      CRC_ADTS_RAW_DATA_BLK_LEN);
  ------------------
  |  |   26|      0|#define CRC_ADTS_RAW_DATA_BLK_LEN 192
  ------------------
  668|      0|              }
  669|       |
  670|   159k|              if (object_type != AOT_ER_AAC_ELD)
  ------------------
  |  Branch (670:19): [True: 102k, False: 57.8k]
  ------------------
  671|   102k|                pstr_aac_dec_ch_info->element_instance_tag =
  672|   102k|                    (WORD16)ixheaacd_read_bits_buf(it_bit_buff, 4);
  673|       |
  674|   159k|              element_index_order[*ch_idx] = pstr_aac_dec_ch_info->element_instance_tag;
  675|   159k|              pstr_aac_dec_ch_info->common_window = 0;
  676|       |
  677|   159k|              ptr_ics_info->num_swb_window = 0;
  678|   159k|              ptr_ics_info->sampling_rate_index = aac_dec_handle->sampling_rate_index;
  679|       |
  680|   159k|              if (object_type == AOT_ER_AAC_LD) {
  ------------------
  |  Branch (680:19): [True: 64.8k, False: 95.1k]
  ------------------
  681|  64.8k|                ptr_ics_info->ltp.data_present = 0;
  682|  64.8k|                ptr_ics_info->ltp2.data_present = 0;
  683|  64.8k|                ptr_ics_info->predictor_data_present = 0;
  684|  64.8k|              }
  685|   159k|              if (ele_ch > 1) {
  ------------------
  |  Branch (685:19): [True: 42.1k, False: 117k]
  ------------------
  686|  42.1k|                aac_dec_handle->pstr_aac_dec_ch_info[RIGHT]->str_ics_info.num_swb_window = 0;
  ------------------
  |  |   41|  42.1k|#define RIGHT 1
  ------------------
  687|  42.1k|                aac_dec_handle->pstr_aac_dec_ch_info[RIGHT]->str_ics_info.sampling_rate_index =
  ------------------
  |  |   41|  42.1k|#define RIGHT 1
  ------------------
  688|  42.1k|                    aac_dec_handle->sampling_rate_index;
  689|       |
  690|  42.1k|                if (object_type != 39)
  ------------------
  |  Branch (690:21): [True: 9.01k, False: 33.1k]
  ------------------
  691|  9.01k|                  pstr_aac_dec_ch_info->common_window =
  692|  9.01k|                      (WORD16)ixheaacd_read_bits_buf(it_bit_buff, 1);
  693|  33.1k|                else
  694|  33.1k|                  pstr_aac_dec_ch_info->common_window = 1;
  695|       |
  696|  42.1k|                if (pstr_aac_dec_ch_info->common_window) {
  ------------------
  |  Branch (696:21): [True: 40.5k, False: 1.65k]
  ------------------
  697|  40.5k|                  error_code = ixheaacd_ics_read(
  698|  40.5k|                      it_bit_buff, ptr_ics_info, aac_dec_handle->num_swb_window, object_type,
  699|  40.5k|                      pstr_aac_dec_ch_info->common_window, aac_dec_handle->samples_per_frame);
  700|  40.5k|                  if (error_code) {
  ------------------
  |  Branch (700:23): [True: 24.4k, False: 16.0k]
  ------------------
  701|  24.4k|                    aac_dec_handle->pstr_aac_dec_ch_info[RIGHT]->str_ics_info =
  ------------------
  |  |   41|  24.4k|#define RIGHT 1
  ------------------
  702|  24.4k|                        aac_dec_handle->pstr_aac_dec_ch_info[LEFT]->str_ics_info;
  ------------------
  |  |   40|  24.4k|#define LEFT 0
  ------------------
  703|  24.4k|                    if (it_bit_buff->cnt_bits < 0) {
  ------------------
  |  Branch (703:25): [True: 0, False: 24.4k]
  ------------------
  704|      0|                      error_code =
  705|      0|                          (WORD16)((WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|      0|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  706|      0|                    }
  707|       |
  708|  24.4k|                    goto _ia_handle_error1;
  709|  24.4k|                  }
  710|       |
  711|  16.0k|                  aac_dec_handle->pstr_aac_dec_ch_info[RIGHT]->str_ics_info =
  ------------------
  |  |   41|  16.0k|#define RIGHT 1
  ------------------
  712|  16.0k|                      pstr_aac_dec_ch_info->str_ics_info;
  713|       |
  714|  16.0k|                  ixheaacd_read_ms_data(it_bit_buff, pstr_aac_dec_ch_info);
  715|       |
  716|  16.0k|                  {
  717|  16.0k|                    if (object_type == AOT_ER_AAC_LD) {
  ------------------
  |  Branch (717:25): [True: 4.80k, False: 11.2k]
  ------------------
  718|  4.80k|                      IA_ERRORCODE temp =
  719|  4.80k|                          ixheaacd_ltp_decode(it_bit_buff, ptr_ics_info, object_type,
  720|  4.80k|                                              aac_dec_handle->samples_per_frame, LEFT);
  ------------------
  |  |   40|  4.80k|#define LEFT 0
  ------------------
  721|       |
  722|  4.80k|                      if (temp != 0) {
  ------------------
  |  Branch (722:27): [True: 2, False: 4.80k]
  ------------------
  723|      2|                        if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal && !is_init) {
  ------------------
  |  Branch (723:29): [True: 0, False: 2]
  |  Branch (723:80): [True: 0, False: 0]
  ------------------
  724|      0|                          p_obj_exhaacplus_dec->aac_config.frame_status = 0;
  725|      2|                        } else {
  726|      2|                          return temp;
  727|      2|                        }
  728|      2|                      }
  729|  4.80k|                    }
  730|  16.0k|                  }
  731|  16.0k|                }
  732|  42.1k|              }
  733|       |
  734|   135k|              error_code = ixheaacd_individual_ch_stream(
  735|   135k|                  it_bit_buff, aac_dec_handle, ele_ch, frame_length, total_channels, object_type,
  736|   135k|                  eld_specific_config, ele_type);
  737|   135k|              if (error_code) {
  ------------------
  |  Branch (737:19): [True: 2.51k, False: 132k]
  ------------------
  738|  2.51k|                if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal && !is_init) {
  ------------------
  |  Branch (738:21): [True: 0, False: 2.51k]
  |  Branch (738:72): [True: 0, False: 0]
  ------------------
  739|      0|                  aac_dec_handle->frame_status = 0;
  740|  2.51k|                } else {
  741|  2.51k|                  return error_code;
  742|  2.51k|                }
  743|  2.51k|              }
  744|       |
  745|   132k|              if (ptr_adts_crc_info->crc_active == 1) {
  ------------------
  |  Branch (745:19): [True: 0, False: 132k]
  ------------------
  746|      0|                ixheaacd_adts_crc_end_reg(ptr_adts_crc_info, it_bit_buff, crc_reg);
  747|      0|              }
  748|       |
  749|   132k|              if (it_bit_buff->cnt_bits < 0) {
  ------------------
  |  Branch (749:19): [True: 25, False: 132k]
  ------------------
  750|     25|                error_code =
  751|     25|                    (WORD16)((WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|     25|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  752|     25|              }
  753|       |
  754|   132k|              if (error_code) {
  ------------------
  |  Branch (754:19): [True: 25, False: 132k]
  ------------------
  755|     25|                goto _ia_handle_error1;
  756|     25|              }
  757|       |
  758|   156k|            _ia_handle_error1:
  759|   156k|              if (error_code) {
  ------------------
  |  Branch (759:19): [True: 24.5k, False: 132k]
  ------------------
  760|  24.5k|                aac_dec_handle->frame_status = 0;
  761|  24.5k|                if ((ele_type >= ID_SCE) && (ele_type <= ID_LFE)) num_ch = num_ch + ele_ch;
  ------------------
  |  Branch (761:21): [True: 24.5k, False: 0]
  |  Branch (761:45): [True: 24.5k, False: 0]
  ------------------
  762|  24.5k|                break;
  763|   132k|              } else {
  764|   132k|                error_code = ixheaacd_channel_pair_process(
  765|   132k|                    aac_dec_handle->pstr_aac_dec_ch_info, ele_ch, aac_dec_handle->pstr_aac_tables,
  766|   132k|                    total_channels, object_type, aac_spect_data_resil_flag,
  767|   132k|                    eld_specific_config.aac_sf_data_resil_flag, aac_scratch_ptrs->in_data,
  768|   132k|                    aac_scratch_ptrs->out_data, (VOID *)aac_dec_handle);
  769|   132k|                if (error_code) {
  ------------------
  |  Branch (769:21): [True: 0, False: 132k]
  ------------------
  770|      0|                  if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal && !is_init) {
  ------------------
  |  Branch (770:23): [True: 0, False: 0]
  |  Branch (770:74): [True: 0, False: 0]
  ------------------
  771|      0|                    aac_dec_handle->frame_status = 0;
  772|      0|                  } else {
  773|      0|                    return error_code;
  774|      0|                  }
  775|      0|                }
  776|   132k|                num_ch = num_ch + ele_ch;
  777|   132k|              }
  778|   156k|            }
  779|       |
  780|   132k|            p_obj_exhaacplus_dec->aac_config.element_type[*ch_idx] = ele_ch - 1;
  781|   132k|            break;
  782|   159k|        }
  783|       |
  784|   156k|        if ((object_type == AOT_ER_AAC_LC) || (!eld_sbr_flag)) {
  ------------------
  |  Branch (784:13): [True: 36.1k, False: 120k]
  |  Branch (784:47): [True: 66.6k, False: 54.0k]
  ------------------
  785|   102k|          WORD32 cnt_bits;
  786|   102k|          cnt_bits = it_bit_buff->cnt_bits;
  787|   102k|          p_obj_exhaacplus_dec->p_state_aac->mps_dec_handle.ldmps_config.no_ldsbr_present = 1;
  788|       |
  789|   102k|          if (cnt_bits >= 8) {
  ------------------
  |  Branch (789:15): [True: 102k, False: 388]
  ------------------
  790|   102k|            error_code = ixheaacd_extension_payload(
  791|   102k|                it_bit_buff, &cnt_bits, &p_obj_exhaacplus_dec->p_state_aac->mps_dec_handle);
  792|   102k|            if (error_code) {
  ------------------
  |  Branch (792:17): [True: 31, False: 102k]
  ------------------
  793|     31|              if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal && !is_init) {
  ------------------
  |  Branch (793:19): [True: 0, False: 31]
  |  Branch (793:70): [True: 0, False: 0]
  ------------------
  794|      0|                aac_dec_handle->frame_status = 0;
  795|     31|              } else {
  796|     31|                return error_code;
  797|     31|              }
  798|     31|            }
  799|   102k|          }
  800|       |
  801|   102k|          if (it_bit_buff->cnt_bits) {
  ------------------
  |  Branch (801:15): [True: 6.75k, False: 96.0k]
  ------------------
  802|  6.75k|            WORD32 alignment = it_bit_buff->bit_pos & 0x07;
  803|  6.75k|            it_bit_buff->cnt_bits = (it_bit_buff->cnt_bits + alignment) & 7;
  804|  6.75k|            it_bit_buff->bit_pos = 7;
  805|  6.75k|            it_bit_buff->ptr_read_next++;
  806|  6.75k|          }
  807|   102k|        }
  808|       |
  809|  54.0k|        else if ((object_type != AOT_ER_AAC_ELD) || (!eld_sbr_flag)) {
  ------------------
  |  Branch (809:18): [True: 0, False: 54.0k]
  |  Branch (809:53): [True: 0, False: 54.0k]
  ------------------
  810|      0|          WORD32 bits_decoded, cnt_bits;
  811|      0|          bits_decoded = (it_bit_buff->size - it_bit_buff->cnt_bits);
  812|       |
  813|      0|          cnt_bits = (frame_size * 8 - bits_decoded);
  814|       |
  815|      0|          if (object_type == AOT_ER_AAC_LC) cnt_bits = it_bit_buff->cnt_bits;
  ------------------
  |  Branch (815:15): [True: 0, False: 0]
  ------------------
  816|       |
  817|      0|          p_obj_exhaacplus_dec->p_state_aac->mps_dec_handle.ldmps_config.no_ldsbr_present = 1;
  818|       |
  819|      0|          if (cnt_bits >= 8) {
  ------------------
  |  Branch (819:15): [True: 0, False: 0]
  ------------------
  820|      0|            error_code = ixheaacd_extension_payload(
  821|      0|                it_bit_buff, &cnt_bits, &p_obj_exhaacplus_dec->p_state_aac->mps_dec_handle);
  822|      0|            if (error_code) {
  ------------------
  |  Branch (822:17): [True: 0, False: 0]
  ------------------
  823|      0|              if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal && !is_init) {
  ------------------
  |  Branch (823:19): [True: 0, False: 0]
  |  Branch (823:70): [True: 0, False: 0]
  ------------------
  824|      0|                aac_dec_handle->frame_status = 0;
  825|      0|              } else {
  826|      0|                return error_code;
  827|      0|              }
  828|      0|            }
  829|      0|          }
  830|       |
  831|      0|          if (((object_type == AOT_ER_AAC_ELD) || (object_type == AOT_ER_AAC_LD)) &&
  ------------------
  |  Branch (831:16): [True: 0, False: 0]
  |  Branch (831:51): [True: 0, False: 0]
  ------------------
  832|      0|              (p_obj_exhaacplus_dec->aac_config.ld_decoder != 1)) {
  ------------------
  |  Branch (832:15): [True: 0, False: 0]
  ------------------
  833|      0|            if (it_bit_buff->cnt_bits) {
  ------------------
  |  Branch (833:17): [True: 0, False: 0]
  ------------------
  834|      0|              WORD32 alignment = it_bit_buff->bit_pos & 0x07;
  835|      0|              it_bit_buff->cnt_bits = (it_bit_buff->cnt_bits + alignment) & 7;
  836|      0|              it_bit_buff->bit_pos = 7;
  837|      0|              it_bit_buff->ptr_read_next++;
  838|      0|            }
  839|      0|          } else {
  840|      0|            if (it_bit_buff->bit_pos != 7) {
  ------------------
  |  Branch (840:17): [True: 0, False: 0]
  ------------------
  841|      0|              WORD32 alignment = it_bit_buff->bit_pos & 0x07;
  842|      0|              it_bit_buff->cnt_bits -= alignment + 1;
  843|      0|              it_bit_buff->bit_pos += 7 - alignment;
  844|      0|              it_bit_buff->ptr_read_next++;
  845|      0|            }
  846|      0|          }
  847|  54.0k|        } else {
  848|  54.0k|          WORD32 bits_decoded, cnt_bits;
  849|  54.0k|          bits_decoded = (it_bit_buff->size - it_bit_buff->cnt_bits);
  850|  54.0k|          cnt_bits = (frame_size * 8 - bits_decoded);
  851|  54.0k|          if (adtsheader == 1) {
  ------------------
  |  Branch (851:15): [True: 0, False: 54.0k]
  ------------------
  852|      0|            if (cnt_bits > it_bit_buff->cnt_bits) {
  ------------------
  |  Branch (852:17): [True: 0, False: 0]
  ------------------
  853|      0|              if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal && !is_init) {
  ------------------
  |  Branch (853:19): [True: 0, False: 0]
  |  Branch (853:70): [True: 0, False: 0]
  ------------------
  854|      0|                aac_dec_handle->frame_status = 0;
  855|      0|              } else {
  856|      0|                return IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES;
  ------------------
  |  |   98|      0|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  857|      0|              }
  858|      0|            }
  859|      0|          }
  860|  54.0k|          ixheaacd_check_for_sbr_payload(
  861|  54.0k|              it_bit_buff, aac_dec_handle->pstr_sbr_bitstream, (WORD16)(ch_config - 1),
  862|  54.0k|              pstr_drc_dec, object_type, adtsheader, cnt_bits, ld_sbr_crc_flag, drc_dummy,
  863|  54.0k|              mps_buffer, mps_header, mps_bytes, is_init, &aac_dec_handle->is_first,
  864|  54.0k|              p_obj_exhaacplus_dec->aac_config.ui_err_conceal);
  865|  54.0k|        }
  866|   156k|      }
  867|   156k|    }
  868|   223k|  }
  869|   218k|  if ((err || (aac_dec_handle->frame_status == 0) || (frame_status == 0)) && (!is_init)) {
  ------------------
  |  Branch (869:8): [True: 97, False: 218k]
  |  Branch (869:15): [True: 24.5k, False: 193k]
  |  Branch (869:54): [True: 0, False: 193k]
  |  Branch (869:78): [True: 24.5k, False: 33]
  ------------------
  870|  24.5k|    if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
  ------------------
  |  Branch (870:9): [True: 0, False: 24.5k]
  ------------------
  871|      0|      aac_dec_handle->frame_status = 0;
  872|      0|      error_code = 0;
  873|      0|      num_ch = channel;
  874|      0|      ele_type = ID_END;
  875|      0|      p_obj_exhaacplus_dec->aac_config.frame_status = 0;
  876|      0|      it_bit_buff->cnt_bits = 0;
  877|      0|      aac_dec_handle->byte_align_bits = 0;
  878|  24.5k|    } else {
  879|  24.5k|      return err;
  880|  24.5k|    }
  881|  24.5k|  }
  882|   193k|  if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal && aac_dec_handle->conceal_count == 0) {
  ------------------
  |  Branch (882:7): [True: 0, False: 193k]
  |  Branch (882:58): [True: 0, False: 0]
  ------------------
  883|      0|    for (ch = 0; ch < channel; ch++) {
  ------------------
  |  Branch (883:18): [True: 0, False: 0]
  ------------------
  884|      0|      ixheaacd_aac_ec_init(&aac_dec_handle->ptr_aac_dec_static_channel_info[ch]->str_ec_state);
  885|      0|    }
  886|      0|  }
  887|       |
  888|   193k|  if (ele_type == ID_END && p_state_enhaacplus_dec->bs_format == LOAS_BSFORMAT) {
  ------------------
  |  |   29|  41.4k|#define LOAS_BSFORMAT 3
  ------------------
  |  Branch (888:7): [True: 41.4k, False: 152k]
  |  Branch (888:29): [True: 10.5k, False: 30.9k]
  ------------------
  889|  10.5k|    WORD32 tmp;
  890|  10.5k|    tmp = ((WORD32)latm_element->layer_info[0][0].frame_len_bits) -
  891|  10.5k|          (it_bit_buff->initial_cnt_bits - it_bit_buff->cnt_bits);
  892|       |
  893|  10.5k|    if (tmp > 0) ixheaacd_read_bidirection(it_bit_buff, tmp);
  ------------------
  |  Branch (893:9): [True: 6.20k, False: 4.31k]
  ------------------
  894|       |
  895|  10.5k|    if (latm_element->other_data_present) {
  ------------------
  |  Branch (895:9): [True: 3.37k, False: 7.13k]
  ------------------
  896|  3.37k|      WORD32 count_bits = (WORD32)latm_element->other_data_length;
  897|  3.37k|      ixheaacd_read_bidirection(it_bit_buff, count_bits);
  898|  3.37k|    }
  899|  10.5k|  }
  900|       |
  901|   193k|  if (object_type == AOT_ER_AAC_LD) {
  ------------------
  |  Branch (901:7): [True: 63.3k, False: 130k]
  ------------------
  902|   133k|    for (ch = 0; ch < channel; ch++) {
  ------------------
  |  Branch (902:18): [True: 70.2k, False: 63.3k]
  ------------------
  903|  70.2k|      aac_dec_handle->ptr_aac_dec_static_channel_info[ch]->ltp_lag_1 =
  904|  70.2k|          aac_dec_handle->pstr_aac_dec_ch_info[ch]->str_ics_info.ltp2.lag;
  905|  70.2k|      aac_dec_handle->ptr_aac_dec_static_channel_info[ch]->ltp_lag_2 =
  906|  70.2k|          aac_dec_handle->pstr_aac_dec_ch_info[ch]->str_ics_info.ltp.lag;
  907|  70.2k|    }
  908|  63.3k|  }
  909|   193k|  aac_dec_handle->frame_status = aac_dec_handle->frame_status && frame_status;
  ------------------
  |  Branch (909:34): [True: 193k, False: 138]
  |  Branch (909:66): [True: 193k, False: 0]
  ------------------
  910|       |
  911|   193k|  aac_dec_handle->channels = num_ch;
  912|       |
  913|   193k|  if (error_code == 0)
  ------------------
  |  Branch (913:7): [True: 193k, False: 137]
  ------------------
  914|   193k|    if ((skip_full_decode == 0) || ((skip_full_decode == 1) && error_code)) {
  ------------------
  |  Branch (914:9): [True: 193k, False: 146]
  |  Branch (914:37): [True: 146, False: 0]
  |  Branch (914:64): [True: 0, False: 146]
  ------------------
  915|   193k|      ia_ics_info_struct str_ics_info[2];
  916|   193k|      WORD32 *spec_coef[2];
  917|   193k|      WORD32 *scratch[2];
  918|       |
  919|   413k|      for (ch = 0; ch < channel; ch++) {
  ------------------
  |  Branch (919:20): [True: 220k, False: 193k]
  ------------------
  920|   220k|        str_ics_info[ch] = aac_dec_handle->pstr_aac_dec_ch_info[ch]->str_ics_info;
  921|   220k|        spec_coef[ch] = aac_dec_handle->pstr_aac_dec_ch_info[ch]->ptr_spec_coeff;
  922|   220k|      }
  923|       |
  924|   193k|      scratch[0] = (WORD32 *)aac_scratch_ptrs->extra_scr_4k[2];
  925|   193k|      scratch[1] = (WORD32 *)aac_scratch_ptrs->extra_scr_4k[1];
  926|       |
  927|   193k|      error_code = ixheaacd_drc_map_channels(
  928|   193k|          pstr_drc_dec, aac_dec_handle->channels,
  929|   193k|          aac_dec_handle->pstr_aac_dec_ch_info[0]->str_ics_info.frame_length);
  930|   193k|      if (error_code) {
  ------------------
  |  Branch (930:11): [True: 3, False: 193k]
  ------------------
  931|      3|        if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal && !is_init) {
  ------------------
  |  Branch (931:13): [True: 0, False: 3]
  |  Branch (931:64): [True: 0, False: 0]
  ------------------
  932|      0|          error_code = 0;
  933|      0|          aac_dec_handle->frame_status = 0;
  934|      3|        } else {
  935|      3|          return error_code;
  936|      3|        }
  937|      3|      }
  938|       |
  939|   405k|      for (ch = 0; ch < aac_dec_handle->channels; ch++) {
  ------------------
  |  Branch (939:20): [True: 211k, False: 193k]
  ------------------
  940|   211k|        WORD32 *overlap1 =
  941|   211k|            aac_dec_handle->ptr_aac_dec_static_channel_info[ch]->overlap_add_data.ptr_overlap_buf;
  942|   211k|        const WORD16 *ptr_long_window_next =
  943|   211k|            aac_dec_handle->ptr_aac_dec_static_channel_info[ch]
  944|   211k|                ->ptr_long_window[(int)str_ics_info[ch].window_shape];
  945|   211k|        const WORD16 *ptr_short_window_next =
  946|   211k|            aac_dec_handle->ptr_aac_dec_static_channel_info[ch]
  947|   211k|                ->ptr_short_window[(int)str_ics_info[ch].window_shape];
  948|   211k|        if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
  ------------------
  |  Branch (948:13): [True: 0, False: 211k]
  ------------------
  949|      0|          ia_aac_dec_channel_info_struct *pstr_aac_dec_channel_info =
  950|      0|              aac_dec_handle->pstr_aac_dec_ch_info[ch];
  951|      0|          ia_aac_dec_channel_info *pstr_aac_dec_static_channel_info =
  952|      0|              aac_dec_handle->ptr_aac_dec_static_channel_info[ch];
  953|       |
  954|      0|          ia_aac_dec_channel_info_struct **ppstr_aac_dec_channel_info =
  955|      0|              &pstr_aac_dec_channel_info;
  956|      0|          ia_aac_dec_channel_info **ppstr_aac_dec_static_channel_info =
  957|      0|              &pstr_aac_dec_static_channel_info;
  958|      0|          ia_audio_specific_config_struct *pstr_audio_specific_config;
  959|      0|          pstr_audio_specific_config = p_state_enhaacplus_dec->ia_audio_specific_config;
  960|       |
  961|      0|          if (str_ics_info[ch].max_sfb > str_ics_info[ch].num_swb_window) {
  ------------------
  |  Branch (961:15): [True: 0, False: 0]
  ------------------
  962|      0|            aac_dec_handle->frame_status = 0;
  963|      0|          }
  964|       |
  965|      0|          ixheaacd_aac_apply_ec(
  966|      0|              &(*ppstr_aac_dec_static_channel_info)->str_ec_state, *ppstr_aac_dec_channel_info,
  967|      0|              &ixheaacd_samp_rate_info[pstr_audio_specific_config->samp_frequency_index],
  968|      0|              aac_dec_handle->samples_per_frame, &str_ics_info[ch], aac_dec_handle->frame_status);
  969|       |
  970|      0|          aac_dec_handle->conceal_count = aac_dec_handle->conceal_count + 1;
  971|      0|          if (aac_dec_handle->frame_status) {
  ------------------
  |  Branch (971:15): [True: 0, False: 0]
  ------------------
  972|      0|            aac_dec_handle->sbr_num_elements = aac_dec_handle->pstr_sbr_bitstream->no_elements;
  973|      0|          } else {
  974|      0|            aac_dec_handle->pstr_sbr_bitstream->no_elements = aac_dec_handle->sbr_num_elements;
  975|      0|          }
  976|      0|          if (first_frame == 1)
  ------------------
  |  Branch (976:15): [True: 0, False: 0]
  ------------------
  977|      0|            skip_full_decode = 1;
  978|      0|          else
  979|      0|            skip_full_decode = 0;
  980|      0|        }
  981|   211k|        if (pstr_drc_dec->drc_on) {
  ------------------
  |  Branch (981:13): [True: 211k, False: 0]
  ------------------
  982|   211k|          ixheaacd_drc_apply(pstr_drc_dec, spec_coef[ch],
  983|   211k|                             str_ics_info[ch].window_sequence, ch,
  984|   211k|                             str_ics_info[ch].frame_length,
  985|   211k|                             p_obj_exhaacplus_dec->aac_config.ui_enh_sbr, object_type);
  986|   211k|        }
  987|   211k|        if (skip_full_decode == 0) {
  ------------------
  |  Branch (987:13): [True: 211k, False: 0]
  ------------------
  988|   211k|          ixheaacd_imdct_process(aac_dec_handle->pstr_aac_dec_overlap_info[ch],
  989|   211k|                                 spec_coef[ch], &str_ics_info[ch],
  990|   211k|                                 time_data + slot_element, ch_fac, scratch[ch],
  991|   211k|                                 aac_dec_handle->pstr_aac_tables, object_type,
  992|   211k|                                 ldmps_present, slot_element);
  993|       |
  994|   211k|          if (slot_pos != NULL) *slot_pos = slot_element;
  ------------------
  |  Branch (994:15): [True: 211k, False: 0]
  ------------------
  995|   211k|          if (p_obj_exhaacplus_dec->p_state_aac->qshift_cnt > 15) {
  ------------------
  |  Branch (995:15): [True: 1, False: 211k]
  ------------------
  996|      1|            return IA_FATAL_ERROR;
  ------------------
  |  |   25|      1|#define IA_FATAL_ERROR 0x80000000
  ------------------
  997|      1|          }
  998|       |
  999|   211k|          p_obj_exhaacplus_dec->p_state_aac
 1000|   211k|              ->qshift_adj[p_obj_exhaacplus_dec->p_state_aac->qshift_cnt++] =
 1001|   211k|              str_ics_info[ch].qshift_adj;
 1002|       |
 1003|   211k|          aac_dec_handle->ptr_aac_dec_static_channel_info[ch]
 1004|   211k|              ->overlap_add_data.win_shape = str_ics_info[ch].window_shape;
 1005|   211k|          aac_dec_handle->ptr_aac_dec_static_channel_info[ch]
 1006|   211k|              ->overlap_add_data.win_seq = str_ics_info[ch].window_sequence;
 1007|   211k|          if ((object_type == AOT_ER_AAC_LD) || (object_type == AOT_AAC_LTP)) {
  ------------------
  |  Branch (1007:15): [True: 69.3k, False: 142k]
  |  Branch (1007:49): [True: 28.9k, False: 113k]
  ------------------
 1008|  98.2k|            {
 1009|  98.2k|              if ((str_ics_info[ch].window_sequence == ONLY_LONG_SEQUENCE) ||
  ------------------
  |  |  100|  98.2k|#define ONLY_LONG_SEQUENCE 0
  ------------------
  |  Branch (1009:19): [True: 54.5k, False: 43.7k]
  ------------------
 1010|  66.9k|                  (str_ics_info[ch].window_sequence == LONG_STOP_SEQUENCE)) {
  ------------------
  |  |  103|  43.7k|#define LONG_STOP_SEQUENCE 3
  ------------------
  |  Branch (1010:19): [True: 12.4k, False: 31.3k]
  ------------------
 1011|  66.9k|                ixheaacd_lt_update_state(
 1012|  66.9k|                    aac_dec_handle->ptr_aac_dec_static_channel_info[ch]
 1013|  66.9k|                        ->ltp_buf,
 1014|  66.9k|                    time_data + slot_element, overlap1,
 1015|  66.9k|                    aac_dec_handle->samples_per_frame, object_type,
 1016|  66.9k|                    (WORD16)ch_fac, str_ics_info[ch].window_sequence,
 1017|  66.9k|                    (WORD16 *)ptr_long_window_next, slot_element);
 1018|  66.9k|              } else {
 1019|  31.3k|                ixheaacd_lt_update_state(
 1020|  31.3k|                    aac_dec_handle->ptr_aac_dec_static_channel_info[ch]
 1021|  31.3k|                        ->ltp_buf,
 1022|  31.3k|                    time_data + slot_element, overlap1,
 1023|  31.3k|                    aac_dec_handle->samples_per_frame, object_type,
 1024|  31.3k|                    (WORD16)ch_fac, str_ics_info[ch].window_sequence,
 1025|  31.3k|                    (WORD16 *)ptr_short_window_next, slot_element);
 1026|  31.3k|              }
 1027|  98.2k|            }
 1028|  98.2k|          }
 1029|   211k|          if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
  ------------------
  |  Branch (1029:15): [True: 0, False: 211k]
  ------------------
 1030|      0|            ia_aac_dec_channel_info *pstr_aac_dec_static_channel_info =
 1031|      0|                aac_dec_handle->ptr_aac_dec_static_channel_info[ch];
 1032|      0|            ia_ec_state_str *pstr_ec_state = &pstr_aac_dec_static_channel_info->str_ec_state;
 1033|      0|            WORD32 k;
 1034|       |
 1035|      0|            if (pstr_ec_state->fade_idx < MAX_FADE_FRAMES) {
  ------------------
  |  |   30|      0|#define MAX_FADE_FRAMES (8)
  ------------------
  |  Branch (1035:17): [True: 0, False: 0]
  ------------------
 1036|      0|              WORD32 fade_fac = ia_ec_fade_factors_fix[pstr_ec_state->fade_idx];
 1037|      0|              for (k = 0; k < str_ics_info[ch].frame_length; k++) {
  ------------------
  |  Branch (1037:27): [True: 0, False: 0]
  ------------------
 1038|      0|                time_data[k] = ixheaac_mul32_sh(time_data[k], fade_fac, 30);
 1039|      0|              }
 1040|      0|            } else {
 1041|      0|              memset(time_data, 0, str_ics_info[ch].frame_length * sizeof(time_data[0]));
 1042|      0|            }
 1043|      0|          }
 1044|   211k|          slot_element++;
 1045|   211k|        }
 1046|   211k|      }
 1047|   193k|    }
 1048|       |
 1049|   193k|  if (ele_type == ID_END) {
  ------------------
  |  Branch (1049:7): [True: 41.4k, False: 152k]
  ------------------
 1050|  41.4k|    if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
  ------------------
  |  Branch (1050:9): [True: 0, False: 41.4k]
  ------------------
 1051|      0|      if (err && !is_init) {
  ------------------
  |  Branch (1051:11): [True: 0, False: 0]
  |  Branch (1051:18): [True: 0, False: 0]
  ------------------
 1052|      0|        aac_dec_handle->frame_status = 0;
 1053|      0|      } else {
 1054|      0|        ixheaacd_byte_align(it_bit_buff, &aac_dec_handle->byte_align_bits);
 1055|      0|        if (p_state_enhaacplus_dec->bs_format == LOAS_BSFORMAT) {
  ------------------
  |  |   29|      0|#define LOAS_BSFORMAT 3
  ------------------
  |  Branch (1055:13): [True: 0, False: 0]
  ------------------
 1056|      0|          ixheaacd_byte_align(it_bit_buff, &it_bit_buff->audio_mux_align);
 1057|      0|        }
 1058|      0|      }
 1059|  41.4k|    } else {
 1060|  41.4k|      ixheaacd_byte_align(it_bit_buff, &aac_dec_handle->byte_align_bits);
 1061|  41.4k|      if (p_state_enhaacplus_dec->bs_format == LOAS_BSFORMAT) {
  ------------------
  |  |   29|  41.4k|#define LOAS_BSFORMAT 3
  ------------------
  |  Branch (1061:11): [True: 10.5k, False: 30.9k]
  ------------------
 1062|  10.5k|        ixheaacd_byte_align(it_bit_buff, &it_bit_buff->audio_mux_align);
 1063|  10.5k|      }
 1064|  41.4k|    }
 1065|  41.4k|  }
 1066|   193k|  *type = ele_type;
 1067|       |
 1068|   193k|  aac_dec_handle->block_number =
 1069|   193k|      ixheaac_add32(aac_dec_handle->block_number, 1);
 1070|   193k|  if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal && !is_init) {
  ------------------
  |  Branch (1070:7): [True: 0, False: 193k]
  |  Branch (1070:58): [True: 0, False: 0]
  ------------------
 1071|      0|    p_obj_exhaacplus_dec->aac_config.frame_status = aac_dec_handle->frame_status;
 1072|      0|    return IA_NO_ERROR;
  ------------------
  |  |   23|      0|#define IA_NO_ERROR 0x00000000
  ------------------
 1073|   193k|  } else {
 1074|   193k|    return error_code;
 1075|   193k|  }
 1076|   193k|}
ixheaacd_extension_payload:
 1079|   112k|                                  ia_mps_dec_state_struct *self) {
 1080|   112k|  WORD16 extension_type;
 1081|   112k|  WORD32 len, add_len;
 1082|   112k|  WORD32 i;
 1083|   112k|  WORD32 fill_nibble;
 1084|       |
 1085|   112k|  WORD32 err = 0;
 1086|   112k|  extension_type = (WORD16)ixheaacd_read_bits_buf(it_bit_buff, 4);
 1087|   112k|  switch (extension_type) {
 1088|  6.09k|    case EXT_FILL_DATA:
  ------------------
  |  |   93|  6.09k|#define EXT_FILL_DATA 1
  ------------------
  |  Branch (1088:5): [True: 6.09k, False: 105k]
  ------------------
 1089|       |
 1090|  6.09k|      fill_nibble = ixheaacd_read_bits_buf(it_bit_buff, 4);
 1091|       |
 1092|  6.09k|      if (fill_nibble == 0) {
  ------------------
  |  Branch (1092:11): [True: 3.09k, False: 2.99k]
  ------------------
 1093|  18.7M|        for (i = 0; i < (*cnt >> 3) - 1; i++) {
  ------------------
  |  Branch (1093:21): [True: 18.7M, False: 3.09k]
  ------------------
 1094|  18.7M|          if (it_bit_buff->cnt_bits >= 8)
  ------------------
  |  Branch (1094:15): [True: 18.7M, False: 377]
  ------------------
 1095|  18.7M|            ixheaacd_read_bits_buf(it_bit_buff, 8);
 1096|    377|          else
 1097|    377|            ixheaacd_read_bits_buf(it_bit_buff, it_bit_buff->cnt_bits);
 1098|  18.7M|        }
 1099|       |
 1100|  3.09k|      } else
 1101|  2.99k|          err = -1;
 1102|  6.09k|      *cnt = it_bit_buff->cnt_bits;
 1103|  6.09k|      break;
 1104|       |
 1105|  4.87k|    case EXT_DATA_LENGTH:
  ------------------
  |  |   95|  4.87k|#define EXT_DATA_LENGTH 3
  ------------------
  |  Branch (1105:5): [True: 4.87k, False: 107k]
  ------------------
 1106|       |
 1107|  4.87k|      len = ixheaacd_read_bits_buf(it_bit_buff, 4);
 1108|       |
 1109|  4.87k|      if (len == 15) {
  ------------------
  |  Branch (1109:11): [True: 860, False: 4.01k]
  ------------------
 1110|    860|        add_len = ixheaacd_read_bits_buf(it_bit_buff, 8);
 1111|    860|        len += add_len;
 1112|       |
 1113|    860|        if (add_len == 255) {
  ------------------
  |  Branch (1113:13): [True: 496, False: 364]
  ------------------
 1114|    496|          len += ixheaacd_read_bits_buf(it_bit_buff, 16);
 1115|    496|        }
 1116|    860|      }
 1117|  4.87k|      len <<= 3;
 1118|       |
 1119|  4.87k|      ixheaacd_extension_payload(it_bit_buff, cnt, self);
 1120|  4.87k|      break;
 1121|       |
 1122|  5.86k|    case EXT_LDSAC_DATA:
  ------------------
  |  |   96|  5.86k|#define EXT_LDSAC_DATA 9
  ------------------
  |  Branch (1122:5): [True: 5.86k, False: 106k]
  ------------------
 1123|       |
 1124|  5.86k|      self->parse_nxt_frame = 1;
 1125|  5.86k|      ixheaacd_read_bits_buf(it_bit_buff, 2);/*anc_type*/
 1126|  5.86k|      ixheaacd_read_bits_buf(it_bit_buff, 2);/*anc_start_stop*/
 1127|       |
 1128|  5.86k|      if (self->ldmps_config.ldmps_present_flag == 1) {
  ------------------
  |  Branch (1128:11): [True: 2.14k, False: 3.71k]
  ------------------
 1129|  2.14k|        err = ixheaacd_ld_mps_frame_parsing(self, it_bit_buff);
 1130|  2.14k|        if (err) return err;
  ------------------
  |  Branch (1130:13): [True: 50, False: 2.09k]
  ------------------
 1131|  2.14k|      }
 1132|       |
 1133|  5.81k|      *cnt = it_bit_buff->cnt_bits;
 1134|  5.81k|      break;
 1135|  41.3k|    case EXT_FIL:
  ------------------
  |  |   94|  41.3k|#define EXT_FIL 0
  ------------------
  |  Branch (1135:5): [True: 41.3k, False: 70.7k]
  ------------------
 1136|  95.2k|    default:
  ------------------
  |  Branch (1136:5): [True: 53.9k, False: 58.1k]
  ------------------
 1137|       |
 1138|  4.44G|      for (i = 0; i < (*cnt) - 4; i++) {
  ------------------
  |  Branch (1138:19): [True: 4.44G, False: 95.2k]
  ------------------
 1139|  4.44G|         ixheaacd_skip_bits_buf(it_bit_buff, 1);/*discard*/
 1140|  4.44G|      }
 1141|       |
 1142|  95.2k|      *cnt = it_bit_buff->cnt_bits;
 1143|  95.2k|      break;
 1144|   112k|  }
 1145|       |
 1146|   108k|  return err;
 1147|   112k|}

ixheaacd_check_for_sbr_payload:
   65|  85.8k|                                    WORD32 is_init, WORD32 *is_first, WORD32 ec_flag) {
   66|  85.8k|  FLAG ret = 0;
   67|  85.8k|  WORD32 count;
   68|       |
   69|  85.8k|  if (object_type == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (69:7): [True: 54.0k, False: 31.7k]
  ------------------
   70|  54.0k|    count = it_bit_buff->cnt_bits >> 3;
   71|  54.0k|    if (adtsheader == 1) count = cnt_bits >> 3;
  ------------------
  |  Branch (71:9): [True: 0, False: 54.0k]
  ------------------
   72|  54.0k|  } else {
   73|  31.7k|    count = ixheaacd_read_bits_buf(it_bit_buff, 4);
   74|       |
   75|  31.7k|    if ((count - 15) == 0) {
  ------------------
  |  Branch (75:9): [True: 5.72k, False: 26.0k]
  ------------------
   76|  5.72k|      WORD32 esc_count;
   77|  5.72k|      esc_count = ixheaacd_read_bits_buf(it_bit_buff, 8);
   78|  5.72k|      count = (esc_count + 14);
   79|  5.72k|    }
   80|  31.7k|  }
   81|       |
   82|  85.8k|  if (count > 0) {
  ------------------
  |  Branch (82:7): [True: 80.0k, False: 5.78k]
  ------------------
   83|  80.0k|    WORD32 extension_type;
   84|       |
   85|  80.0k|    if (object_type == AOT_ER_AAC_ELD)
  ------------------
  |  Branch (85:9): [True: 53.9k, False: 26.0k]
  ------------------
   86|  53.9k|      extension_type = ld_sbr_crc_flag ? SBR_EXTENSION_CRC : SBR_EXTENSION;
  ------------------
  |  |   27|  10.2k|#define SBR_EXTENSION_CRC 14
  ------------------
                    extension_type = ld_sbr_crc_flag ? SBR_EXTENSION_CRC : SBR_EXTENSION;
  ------------------
  |  |   26|  43.6k|#define SBR_EXTENSION 13
  ------------------
  |  Branch (86:24): [True: 10.2k, False: 43.6k]
  ------------------
   87|  26.0k|    else
   88|  26.0k|      extension_type = ixheaacd_read_bits_buf(it_bit_buff, 4);
   89|       |
   90|  80.0k|    if (((count < MAXSBRBYTES)) &&
  ------------------
  |  |   31|  80.0k|#define MAXSBRBYTES 1024
  ------------------
  |  Branch (90:9): [True: 55.1k, False: 24.8k]
  ------------------
   91|  55.1k|        (((extension_type == SBR_EXTENSION)) || ((extension_type == SBR_EXTENSION_CRC))) &&
  ------------------
  |  |   26|  55.1k|#define SBR_EXTENSION 13
  ------------------
                      (((extension_type == SBR_EXTENSION)) || ((extension_type == SBR_EXTENSION_CRC))) &&
  ------------------
  |  |   27|  21.9k|#define SBR_EXTENSION_CRC 14
  ------------------
  |  Branch (91:10): [True: 33.2k, False: 21.9k]
  |  Branch (91:49): [True: 9.76k, False: 12.1k]
  ------------------
   92|  43.0k|        ((prev_element == SBR_ID_SCE) || (prev_element == SBR_ID_CPE) ||
  ------------------
  |  Branch (92:10): [True: 13.5k, False: 29.4k]
  |  Branch (92:42): [True: 22.7k, False: 6.72k]
  ------------------
   93|  6.72k|         sub_d(prev_element, SBR_ID_CCE) == 0)
  ------------------
  |  |   24|  6.72k|#define sub_d(a, b) ((a) - (b))
  ------------------
  |  Branch (93:10): [True: 6.12k, False: 595]
  ------------------
   94|       |
   95|  80.0k|            ) {
   96|  42.4k|      WORD32 no_elements = pstr_stream_sbr->no_elements;
   97|  42.4k|      WORD32 byte_count;
   98|  42.4k|      ia_sbr_element_stream_struct *ptr_stream_sbr;
   99|       |
  100|  42.4k|      ret = 1;
  101|       |
  102|  42.4k|      ptr_stream_sbr = &pstr_stream_sbr->str_sbr_ele[no_elements];
  103|       |
  104|  42.4k|      if (ec_flag) {
  ------------------
  |  Branch (104:11): [True: 0, False: 42.4k]
  ------------------
  105|      0|        ptr_stream_sbr->size_payload = ptr_stream_sbr->size_payload_old;
  106|      0|        byte_count = ptr_stream_sbr->size_payload;
  107|      0|        ptr_stream_sbr->extension_type = ptr_stream_sbr->prev_extension_type;
  108|      0|        ptr_stream_sbr->sbr_ele_id = ptr_stream_sbr->prev_sbr_ele_id;
  109|      0|      }
  110|       |
  111|  42.4k|      if (ec_flag) {
  ------------------
  |  Branch (111:11): [True: 0, False: 42.4k]
  ------------------
  112|      0|        ptr_stream_sbr->size_payload_old = count;
  113|      0|        byte_count = ptr_stream_sbr->size_payload_old;
  114|      0|        ptr_stream_sbr->prev_extension_type = extension_type;
  115|      0|        ptr_stream_sbr->prev_sbr_ele_id = prev_element;
  116|  42.4k|      } else {
  117|  42.4k|        ptr_stream_sbr->size_payload = count;
  118|  42.4k|        byte_count = ptr_stream_sbr->size_payload;
  119|  42.4k|        ptr_stream_sbr->extension_type = extension_type;
  120|  42.4k|        ptr_stream_sbr->sbr_ele_id = prev_element;
  121|  42.4k|      }
  122|  42.4k|      pstr_stream_sbr->no_elements = no_elements + 1;
  123|       |
  124|  42.4k|      if (pstr_drc_dec) pstr_drc_dec->sbr_found = 1;
  ------------------
  |  Branch (124:11): [True: 42.4k, False: 0]
  ------------------
  125|       |
  126|  42.4k|      if (ec_flag) {
  ------------------
  |  Branch (126:11): [True: 0, False: 42.4k]
  ------------------
  127|      0|        memcpy(ptr_stream_sbr->ptr_sbr_data, ptr_stream_sbr->sbr_prev_data,
  128|      0|               sizeof(ptr_stream_sbr->sbr_prev_data));
  129|      0|      }
  130|       |
  131|  42.4k|      if (byte_count > 0 && sub_d(byte_count, MAXSBRBYTES) <= 0) {
  ------------------
  |  |   24|  42.4k|#define sub_d(a, b) ((a) - (b))
  ------------------
  |  Branch (131:11): [True: 42.4k, False: 0]
  |  Branch (131:29): [True: 42.4k, False: 0]
  ------------------
  132|  42.4k|        WORD32 i;
  133|  42.4k|        WORD8 *ptr_sbr_data;
  134|  42.4k|        if (object_type != AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (134:13): [True: 13.6k, False: 28.7k]
  ------------------
  135|  13.6k|          if (ec_flag) {
  ------------------
  |  Branch (135:15): [True: 0, False: 13.6k]
  ------------------
  136|      0|            ptr_sbr_data = &ptr_stream_sbr->sbr_prev_data[1];
  137|      0|            ptr_stream_sbr->sbr_prev_data[0] = (WORD8)ixheaacd_read_bits_buf(it_bit_buff, 4);
  138|  13.6k|          } else {
  139|  13.6k|            ptr_sbr_data = &ptr_stream_sbr->ptr_sbr_data[1];
  140|  13.6k|            ptr_stream_sbr->ptr_sbr_data[0] = (WORD8)ixheaacd_read_bits_buf(it_bit_buff, 4);
  141|  13.6k|          }
  142|  28.7k|        } else {
  143|  28.7k|          if (ec_flag) {
  ------------------
  |  Branch (143:15): [True: 0, False: 28.7k]
  ------------------
  144|      0|            ptr_sbr_data = ptr_stream_sbr->sbr_prev_data;
  145|  28.7k|          } else {
  146|  28.7k|            ptr_sbr_data = ptr_stream_sbr->ptr_sbr_data;
  147|  28.7k|          }
  148|  28.7k|        }
  149|  10.7M|        for (i = byte_count - 2; i >= 0; i--) {
  ------------------
  |  Branch (149:34): [True: 10.7M, False: 42.4k]
  ------------------
  150|  10.7M|          *ptr_sbr_data++ = (WORD8)ixheaacd_read_bits_buf(it_bit_buff, 8);
  151|  10.7M|          if (object_type == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (151:15): [True: 10.6M, False: 115k]
  ------------------
  152|  10.6M|            if (adtsheader == 1) {
  ------------------
  |  Branch (152:17): [True: 0, False: 10.6M]
  ------------------
  153|      0|              cnt_bits = cnt_bits - 8;
  154|      0|            }
  155|  10.6M|          }
  156|  10.7M|        }
  157|       |
  158|  42.4k|        if (object_type == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (158:13): [True: 28.7k, False: 13.6k]
  ------------------
  159|  28.7k|          *ptr_sbr_data++ = (WORD8)ixheaacd_read_bits_buf(it_bit_buff, 8);
  160|  28.7k|          if (adtsheader == 1) {
  ------------------
  |  Branch (160:15): [True: 0, False: 28.7k]
  ------------------
  161|      0|            cnt_bits = cnt_bits - 8;
  162|      0|            if (cnt_bits > 0) {
  ------------------
  |  Branch (162:17): [True: 0, False: 0]
  ------------------
  163|      0|              WORD32 unaligned_bits = (8 - it_bit_buff->cnt_bits);
  164|      0|              *ptr_sbr_data = (WORD8)ixheaacd_read_bits_buf(it_bit_buff, cnt_bits);
  165|      0|              *ptr_sbr_data = *ptr_sbr_data << unaligned_bits;
  166|      0|              if (!ec_flag)
  ------------------
  |  Branch (166:19): [True: 0, False: 0]
  ------------------
  167|      0|                ptr_stream_sbr->size_payload++;
  168|      0|              else
  169|      0|                ptr_stream_sbr->size_payload_old++;
  170|      0|            }
  171|  28.7k|          } else {
  172|  28.7k|            if (it_bit_buff->cnt_bits > 0) {
  ------------------
  |  Branch (172:17): [True: 24.9k, False: 3.77k]
  ------------------
  173|  24.9k|              WORD32 unaligned_bits = (8 - it_bit_buff->cnt_bits);
  174|  24.9k|              *ptr_sbr_data = (WORD8)ixheaacd_read_bits_buf(it_bit_buff, it_bit_buff->cnt_bits);
  175|  24.9k|              *ptr_sbr_data = *ptr_sbr_data << unaligned_bits;
  176|  24.9k|              if (!ec_flag)
  ------------------
  |  Branch (176:19): [True: 24.9k, False: 0]
  ------------------
  177|  24.9k|                ptr_stream_sbr->size_payload++;
  178|      0|              else
  179|      0|                ptr_stream_sbr->size_payload_old++;
  180|  24.9k|            }
  181|  28.7k|          }
  182|  28.7k|        }
  183|  42.4k|      }
  184|       |
  185|  42.4k|    } else if (extension_type == EXT_DYNAMIC_RANGE) {
  ------------------
  |  |   23|  37.6k|#define EXT_DYNAMIC_RANGE 11
  ------------------
  |  Branch (185:16): [True: 435, False: 37.1k]
  ------------------
  186|    435|      pstr_drc_dec->drc_element_found = 1;
  187|    435|      count -= ixheaacd_dec_drc_read_element(pstr_drc_dec, drc_dummy, it_bit_buff);
  188|  37.1k|    } else if (extension_type == EXT_SAC_DATA) {
  ------------------
  |  |   25|  37.1k|#define EXT_SAC_DATA 12
  ------------------
  |  Branch (188:16): [True: 9.77k, False: 27.4k]
  ------------------
  189|  9.77k|      WORD32 anc_type, anc_start, i, len = 0;
  190|  9.77k|      anc_type = ixheaacd_read_bits_buf(it_bit_buff, 2);
  191|  9.77k|      *mps_header = anc_type;
  192|       |
  193|  9.77k|      anc_start = ixheaacd_read_bits_buf(it_bit_buff, 1);
  194|  9.77k|      if (anc_start == 1) {
  ------------------
  |  Branch (194:11): [True: 7.85k, False: 1.92k]
  ------------------
  195|  7.85k|        *mps_bytes = 0;
  196|  7.85k|      }
  197|  9.77k|      ixheaacd_read_bits_buf(it_bit_buff, 1);
  198|       |
  199|  9.77k|      if (anc_type == 1 && is_init == 0 && *is_first == 1) {
  ------------------
  |  Branch (199:11): [True: 1.75k, False: 8.02k]
  |  Branch (199:28): [True: 672, False: 1.08k]
  |  Branch (199:44): [True: 423, False: 249]
  ------------------
  200|    423|        len = ixheaacd_read_bits_buf(it_bit_buff, 1);
  201|    423|        len = ixheaacd_read_bits_buf(it_bit_buff, 7) + 1;
  202|    423|        ixheaacd_read_bidirection(it_bit_buff, -8);
  203|    423|      }
  204|       |
  205|   366k|      for (i = 0; i < count - 1; i++) {
  ------------------
  |  Branch (205:19): [True: 356k, False: 9.77k]
  ------------------
  206|   356k|        mps_buffer[i + *mps_bytes] = ixheaacd_read_bits_buf(it_bit_buff, 8);
  207|   356k|      }
  208|       |
  209|  9.77k|      *mps_bytes += (count - 1);
  210|  9.77k|      if (anc_type == 1 && is_init == 0 && *is_first == 1) {
  ------------------
  |  Branch (210:11): [True: 1.75k, False: 8.02k]
  |  Branch (210:28): [True: 672, False: 1.08k]
  |  Branch (210:44): [True: 423, False: 249]
  ------------------
  211|    423|        if (*mps_bytes < len) {
  ------------------
  |  Branch (211:13): [True: 2, False: 421]
  ------------------
  212|      2|          if (ec_flag) {
  ------------------
  |  Branch (212:15): [True: 0, False: 2]
  ------------------
  213|      0|            *mps_bytes = 0;
  214|      0|          }
  215|      2|          longjmp(*(it_bit_buff->xaac_jmp_buf),
  216|      2|            IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|      2|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  217|      2|        }
  218|  11.5k|        for (i = 0; i < count - 1; i++) {
  ------------------
  |  Branch (218:21): [True: 11.1k, False: 421]
  ------------------
  219|  11.1k|          mps_buffer[i] = mps_buffer[i + len];
  220|  11.1k|        }
  221|    421|        *mps_bytes = *mps_bytes - len;
  222|    421|      }
  223|  9.77k|      *is_first = 1;
  224|  27.4k|    } else {
  225|  27.4k|      ixheaacd_read_bits_buf(it_bit_buff, 4);
  226|       |
  227|  27.4k|      if (it_bit_buff->cnt_bits < ((count - 1) << 3)) {
  ------------------
  |  Branch (227:11): [True: 10, False: 27.4k]
  ------------------
  228|     10|        longjmp(*(it_bit_buff->xaac_jmp_buf),
  229|     10|                IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|     10|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  230|     10|      }
  231|  27.4k|      it_bit_buff->ptr_read_next += count - 1;
  232|  27.4k|      it_bit_buff->cnt_bits -= ((count - 1) << 3);
  233|  27.4k|    }
  234|  80.0k|  }
  235|  85.8k|  return (ret);
  236|  85.8k|}

ixheaacd_get_mode_lpc:
   53|   284k|WORD32 ixheaacd_get_mode_lpc(WORD32 lpc_set, ia_bit_buf_struct *it_bit_buff, WORD32 *nk_mode) {
   54|   284k|  WORD32 mode_lpc = 0;
   55|   284k|  switch (lpc_set) {
  ------------------
  |  Branch (55:11): [True: 284k, False: 0]
  ------------------
   56|  68.7k|    case 4:
  ------------------
  |  Branch (56:5): [True: 68.7k, False: 215k]
  ------------------
   57|  68.7k|      mode_lpc = 0;
   58|  68.7k|      break;
   59|  41.5k|    case 0:
  ------------------
  |  Branch (59:5): [True: 41.5k, False: 242k]
  ------------------
   60|   109k|    case 2:
  ------------------
  |  Branch (60:5): [True: 68.3k, False: 216k]
  ------------------
   61|   109k|      mode_lpc = ixheaacd_read_bits_buf(it_bit_buff, 1);
   62|   109k|      if (mode_lpc == 1) *nk_mode = 3;
  ------------------
  |  Branch (62:11): [True: 37.6k, False: 72.2k]
  ------------------
   63|   109k|      break;
   64|  44.7k|    case 1:
  ------------------
  |  Branch (64:5): [True: 44.7k, False: 239k]
  ------------------
   65|  44.7k|      if (ixheaacd_read_bits_buf(it_bit_buff, 1) == 0)
  ------------------
  |  Branch (65:11): [True: 29.8k, False: 14.9k]
  ------------------
   66|  29.8k|        mode_lpc = *nk_mode = 2;
   67|  14.9k|      else {
   68|  14.9k|        if (ixheaacd_read_bits_buf(it_bit_buff, 1) == 0)
  ------------------
  |  Branch (68:13): [True: 11.4k, False: 3.52k]
  ------------------
   69|  11.4k|          mode_lpc = *nk_mode = 0;
   70|  3.52k|        else
   71|  3.52k|          mode_lpc = *nk_mode = 1;
   72|  14.9k|      }
   73|  44.7k|      break;
   74|  61.0k|    case 3:
  ------------------
  |  Branch (74:5): [True: 61.0k, False: 223k]
  ------------------
   75|  61.0k|      if (ixheaacd_read_bits_buf(it_bit_buff, 1) == 0)
  ------------------
  |  Branch (75:11): [True: 37.5k, False: 23.5k]
  ------------------
   76|  37.5k|        mode_lpc = *nk_mode = 1;
   77|  23.5k|      else {
   78|  23.5k|        if (ixheaacd_read_bits_buf(it_bit_buff, 1) == 0)
  ------------------
  |  Branch (78:13): [True: 16.8k, False: 6.68k]
  ------------------
   79|  16.8k|          mode_lpc = *nk_mode = 0;
   80|  6.68k|        else {
   81|  6.68k|          if (ixheaacd_read_bits_buf(it_bit_buff, 1) == 0)
  ------------------
  |  Branch (81:15): [True: 2.04k, False: 4.63k]
  ------------------
   82|  2.04k|            mode_lpc = 2;
   83|  4.63k|          else
   84|  4.63k|            mode_lpc = 3;
   85|  6.68k|          *nk_mode = 2;
   86|  6.68k|        }
   87|  23.5k|      }
   88|  61.0k|      break;
   89|   284k|  }
   90|   284k|  return mode_lpc;
   91|   284k|}
ixheaacd_qn_data:
   93|   280k|VOID ixheaacd_qn_data(WORD32 nk_mode, WORD32 *qn, ia_bit_buf_struct *it_bit_buff) {
   94|   280k|  WORD32 k;
   95|   280k|  switch (nk_mode) {
  ------------------
  |  Branch (95:11): [True: 280k, False: 0]
  ------------------
   96|  37.5k|    case 1:
  ------------------
  |  Branch (96:5): [True: 37.5k, False: 243k]
  ------------------
   97|   112k|      for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (97:19): [True: 75.0k, False: 37.5k]
  ------------------
   98|   107k|        while (ixheaacd_read_bits_buf(it_bit_buff, 1) == 1) {
  ------------------
  |  Branch (98:16): [True: 32.0k, False: 75.0k]
  ------------------
   99|  32.0k|          qn[k] += 1;
  100|  32.0k|        }
  101|  75.0k|        if (qn[k] > 0) qn[k] += 1;
  ------------------
  |  Branch (101:13): [True: 22.1k, False: 52.8k]
  ------------------
  102|  75.0k|      }
  103|  37.5k|      break;
  104|   158k|    case 0:
  ------------------
  |  Branch (104:5): [True: 158k, False: 122k]
  ------------------
  105|   195k|    case 2:
  ------------------
  |  Branch (105:5): [True: 36.5k, False: 244k]
  ------------------
  106|   243k|    case 3:
  ------------------
  |  Branch (106:5): [True: 48.2k, False: 232k]
  ------------------
  107|   730k|      for (k = 0; k < 2; k++) qn[k] = 2 + ixheaacd_read_bits_buf(it_bit_buff, 2);
  ------------------
  |  Branch (107:19): [True: 486k, False: 243k]
  ------------------
  108|       |
  109|   243k|      if (nk_mode == 2) {
  ------------------
  |  Branch (109:11): [True: 36.5k, False: 206k]
  ------------------
  110|   109k|        for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (110:21): [True: 73.0k, False: 36.5k]
  ------------------
  111|  73.0k|          if (qn[k] > 4) {
  ------------------
  |  Branch (111:15): [True: 13.6k, False: 59.3k]
  ------------------
  112|  13.6k|            qn[k] = 0;
  113|       |
  114|  32.2k|            while (ixheaacd_read_bits_buf(it_bit_buff, 1) == 1) qn[k] += 1;
  ------------------
  |  Branch (114:20): [True: 18.5k, False: 13.6k]
  ------------------
  115|       |
  116|  13.6k|            if (qn[k] > 0) qn[k] += 4;
  ------------------
  |  Branch (116:17): [True: 4.26k, False: 9.40k]
  ------------------
  117|  13.6k|          }
  118|  73.0k|        }
  119|   206k|      } else {
  120|   620k|        for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (120:21): [True: 413k, False: 206k]
  ------------------
  121|   413k|          if (qn[k] > 4) {
  ------------------
  |  Branch (121:15): [True: 65.6k, False: 348k]
  ------------------
  122|  65.6k|            WORD32 qn_ext = 0;
  123|   183k|            while (ixheaacd_read_bits_buf(it_bit_buff, 1) == 1) qn_ext += 1;
  ------------------
  |  Branch (123:20): [True: 117k, False: 65.6k]
  ------------------
  124|       |
  125|  65.6k|            switch (qn_ext) {
  126|  38.3k|              case 0:
  ------------------
  |  Branch (126:15): [True: 38.3k, False: 27.2k]
  ------------------
  127|  38.3k|                qn[k] = 5;
  128|  38.3k|                break;
  129|  12.8k|              case 1:
  ------------------
  |  Branch (129:15): [True: 12.8k, False: 52.7k]
  ------------------
  130|  12.8k|                qn[k] = 6;
  131|  12.8k|                break;
  132|  4.38k|              case 2:
  ------------------
  |  Branch (132:15): [True: 4.38k, False: 61.2k]
  ------------------
  133|  4.38k|                qn[k] = 0;
  134|  4.38k|                break;
  135|  10.0k|              default:
  ------------------
  |  Branch (135:15): [True: 10.0k, False: 55.5k]
  ------------------
  136|  10.0k|                qn[k] = qn_ext + 4;
  137|  10.0k|                break;
  138|  65.6k|            }
  139|  65.6k|          }
  140|   413k|        }
  141|   206k|      }
  142|   243k|      break;
  143|   280k|  }
  144|   280k|  return;
  145|   280k|}
ixheaacd_code_book_indices:
  148|   280k|                                WORD32 *pos, ia_bit_buf_struct *it_bit_buff) {
  149|   280k|  WORD32 k, qn[2] = {0, 0}, nk, n, i;
  150|       |
  151|   280k|  ixheaacd_qn_data(nk_mode, &qn[0], it_bit_buff);
  152|       |
  153|   280k|  pstr_td_frame_data->lpc_first_approx_idx[(*pos)++] = qn[0];
  154|   280k|  pstr_td_frame_data->lpc_first_approx_idx[(*pos)++] = qn[1];
  155|       |
  156|   842k|  for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (156:15): [True: 561k, False: 280k]
  ------------------
  157|   561k|    if (qn[k] > 0) {
  ------------------
  |  Branch (157:9): [True: 495k, False: 66.6k]
  ------------------
  158|   495k|      if (qn[k] > 4) {
  ------------------
  |  Branch (158:11): [True: 66.4k, False: 428k]
  ------------------
  159|  66.4k|        nk = (qn[k] - 3) / 2;
  160|  66.4k|        n = qn[k] - nk * 2;
  161|   428k|      } else {
  162|   428k|        nk = 0;
  163|   428k|        n = qn[k];
  164|   428k|      }
  165|   495k|      pstr_td_frame_data->lpc_first_approx_idx[(*pos)++] =
  166|   495k|          ixheaacd_read_bits_buf(it_bit_buff, 4 * n);
  167|       |
  168|  4.45M|      for (i = 0; i < 8; i++)
  ------------------
  |  Branch (168:19): [True: 3.95M, False: 495k]
  ------------------
  169|  3.95M|        pstr_td_frame_data->lpc_first_approx_idx[(*pos)++] =
  170|  3.95M|            ixheaacd_read_bits_buf(it_bit_buff, nk);
  171|   495k|    }
  172|   561k|  }
  173|   280k|  return;
  174|   280k|}
ixheaacd_lpc_data:
  178|  68.7k|                       ia_bit_buf_struct *it_bit_buff) {
  179|  68.7k|  WORD32 mode_lpc, nk_mode = 0, j = 0;
  180|       |
  181|  68.7k|  mode_lpc = ixheaacd_get_mode_lpc(4, it_bit_buff, &nk_mode);
  182|       |
  183|  68.7k|  pstr_td_frame_data->lpc_first_approx_idx[j++] = ixheaacd_read_bits_buf(it_bit_buff, 8);
  184|       |
  185|  68.7k|  ixheaacd_code_book_indices(pstr_td_frame_data, nk_mode, &j, it_bit_buff);
  186|  68.7k|  if (first_lpd_flag) {
  ------------------
  |  Branch (186:7): [True: 41.5k, False: 27.2k]
  ------------------
  187|  41.5k|    mode_lpc = ixheaacd_get_mode_lpc(0, it_bit_buff, &nk_mode);
  188|  41.5k|    pstr_td_frame_data->lpc_first_approx_idx[j++] = mode_lpc;
  189|       |
  190|  41.5k|    if (mode_lpc == 0)
  ------------------
  |  Branch (190:9): [True: 26.9k, False: 14.5k]
  ------------------
  191|  26.9k|      pstr_td_frame_data->lpc_first_approx_idx[j++] = ixheaacd_read_bits_buf(it_bit_buff, 8);
  192|       |
  193|  41.5k|    ixheaacd_code_book_indices(pstr_td_frame_data, nk_mode, &j, it_bit_buff);
  194|  41.5k|  }
  195|  68.7k|  if (mod[0] < 3) {
  ------------------
  |  Branch (195:7): [True: 68.3k, False: 354]
  ------------------
  196|  68.3k|    mode_lpc = ixheaacd_get_mode_lpc(2, it_bit_buff, &nk_mode);
  197|  68.3k|    pstr_td_frame_data->lpc_first_approx_idx[j++] = mode_lpc;
  198|       |
  199|  68.3k|    if (mode_lpc == 0)
  ------------------
  |  Branch (199:9): [True: 45.3k, False: 23.0k]
  ------------------
  200|  45.3k|      pstr_td_frame_data->lpc_first_approx_idx[j++] = ixheaacd_read_bits_buf(it_bit_buff, 8);
  201|       |
  202|  68.3k|    ixheaacd_code_book_indices(pstr_td_frame_data, nk_mode, &j, it_bit_buff);
  203|  68.3k|  }
  204|  68.7k|  if (mod[0] < 2) {
  ------------------
  |  Branch (204:7): [True: 44.7k, False: 23.9k]
  ------------------
  205|  44.7k|    mode_lpc = ixheaacd_get_mode_lpc(1, it_bit_buff, &nk_mode);
  206|  44.7k|    pstr_td_frame_data->lpc_first_approx_idx[j++] = mode_lpc;
  207|       |
  208|  44.7k|    if (mode_lpc == 0)
  ------------------
  |  Branch (208:9): [True: 11.4k, False: 33.3k]
  ------------------
  209|  11.4k|      pstr_td_frame_data->lpc_first_approx_idx[j++] = ixheaacd_read_bits_buf(it_bit_buff, 8);
  210|       |
  211|  44.7k|    if (mode_lpc != 1) ixheaacd_code_book_indices(pstr_td_frame_data, nk_mode, &j, it_bit_buff);
  ------------------
  |  Branch (211:9): [True: 41.2k, False: 3.52k]
  ------------------
  212|  44.7k|  }
  213|  68.7k|  if (mod[2] < 2) {
  ------------------
  |  Branch (213:7): [True: 61.0k, False: 7.69k]
  ------------------
  214|  61.0k|    mode_lpc = ixheaacd_get_mode_lpc(3, it_bit_buff, &nk_mode);
  215|  61.0k|    pstr_td_frame_data->lpc_first_approx_idx[j++] = mode_lpc;
  216|       |
  217|  61.0k|    if (mode_lpc == 0)
  ------------------
  |  Branch (217:9): [True: 16.8k, False: 44.1k]
  ------------------
  218|  16.8k|      pstr_td_frame_data->lpc_first_approx_idx[j++] = ixheaacd_read_bits_buf(it_bit_buff, 8);
  219|       |
  220|  61.0k|    ixheaacd_code_book_indices(pstr_td_frame_data, nk_mode, &j, it_bit_buff);
  221|  61.0k|  }
  222|  68.7k|  return;
  223|  68.7k|}
ixheaacd_fac_decoding:
  226|   177k|                           ia_bit_buf_struct *it_bit_buff) {
  227|   177k|  WORD32 i, j, n, qn, nk, kv[8];
  228|   177k|  long code_book_index;
  229|       |
  230|  2.64M|  for (i = 0; i < fac_length; i += 8) {
  ------------------
  |  Branch (230:15): [True: 2.47M, False: 177k]
  ------------------
  231|  2.47M|    qn = 0;
  232|  4.31M|    while (ixheaacd_read_bits_buf(it_bit_buff, 1) == 1) {
  ------------------
  |  Branch (232:12): [True: 1.84M, False: 2.47M]
  ------------------
  233|  1.84M|      qn += 1;
  234|  1.84M|    }
  235|  2.47M|    if (qn != 0) qn += 1;
  ------------------
  |  Branch (235:9): [True: 970k, False: 1.50M]
  ------------------
  236|       |
  237|  2.47M|    nk = 0;
  238|  2.47M|    n = qn;
  239|  2.47M|    if (qn > 4) {
  ------------------
  |  Branch (239:9): [True: 37.8k, False: 2.43M]
  ------------------
  240|  37.8k|      nk = (qn - 3) >> 1;
  241|  37.8k|      n = qn - nk * 2;
  242|  37.8k|    }
  243|       |
  244|  2.47M|    code_book_index = ixheaacd_read_bits_buf(it_bit_buff, 4 * n);
  245|       |
  246|  22.2M|    for (j = 0; j < 8; j++) {
  ------------------
  |  Branch (246:17): [True: 19.7M, False: 2.47M]
  ------------------
  247|  19.7M|      kv[j] = ixheaacd_read_bits_buf(it_bit_buff, nk);
  248|  19.7M|    }
  249|       |
  250|  2.47M|    ixheaacd_rotated_gosset_mtx_dec(qn, code_book_index, kv, &fac_prm[k * FAC_LENGTH + i]);
  ------------------
  |  |   33|  2.47M|#define FAC_LENGTH 128
  ------------------
  251|  2.47M|  }
  252|   177k|}
ixheaacd_acelp_decoding:
  260|   137k|                             ia_bit_buf_struct *it_bit_buff, WORD32 chan) {
  261|   137k|  WORD32 sfr, kk;
  262|   137k|  WORD32 nb_subfr = usac_data->num_subfrm;
  263|   137k|  const UWORD8 *ptr_num_bits =
  264|   137k|      &ixheaacd_num_bites_celp_coding[pstr_td_frame_data->acelp_core_mode][0];
  265|       |
  266|   137k|  chan = 0;
  267|   137k|  pstr_td_frame_data->mean_energy[k] = ixheaacd_read_bits_buf(it_bit_buff, 2);
  268|       |
  269|   637k|  for (sfr = 0; sfr < nb_subfr; sfr++) {
  ------------------
  |  Branch (269:17): [True: 499k, False: 137k]
  ------------------
  270|   499k|    kk = k * 4 + sfr;
  271|       |
  272|   499k|    if ((sfr == 0) || ((nb_subfr == 4) && (sfr == 2)))
  ------------------
  |  Branch (272:9): [True: 137k, False: 361k]
  |  Branch (272:24): [True: 257k, False: 103k]
  |  Branch (272:43): [True: 85.9k, False: 171k]
  ------------------
  273|   223k|      pstr_td_frame_data->acb_index[kk] = ixheaacd_read_bits_buf(it_bit_buff, 9);
  274|       |
  275|   275k|    else
  276|   275k|      pstr_td_frame_data->acb_index[kk] = ixheaacd_read_bits_buf(it_bit_buff, 6);
  277|       |
  278|   499k|    pstr_td_frame_data->ltp_filtering_flag[kk] = ixheaacd_read_bits_buf(it_bit_buff, 1);
  279|       |
  280|   499k|    if (pstr_td_frame_data->acelp_core_mode == 5) {
  ------------------
  |  Branch (280:9): [True: 66.4k, False: 432k]
  ------------------
  281|  66.4k|      pstr_td_frame_data->icb_index[kk][0] =
  282|  66.4k|          ixheaacd_read_bits_buf(it_bit_buff, 2);
  283|  66.4k|      pstr_td_frame_data->icb_index[kk][1] =
  284|  66.4k|          ixheaacd_read_bits_buf(it_bit_buff, 2);
  285|  66.4k|      pstr_td_frame_data->icb_index[kk][2] =
  286|  66.4k|          ixheaacd_read_bits_buf(it_bit_buff, 2);
  287|  66.4k|      pstr_td_frame_data->icb_index[kk][3] =
  288|  66.4k|          ixheaacd_read_bits_buf(it_bit_buff, 2);
  289|  66.4k|      pstr_td_frame_data->icb_index[kk][4] =
  290|  66.4k|          ixheaacd_read_bits_buf(it_bit_buff, 14);
  291|  66.4k|      pstr_td_frame_data->icb_index[kk][5] =
  292|  66.4k|          ixheaacd_read_bits_buf(it_bit_buff, 14);
  293|  66.4k|      pstr_td_frame_data->icb_index[kk][6] =
  294|  66.4k|          ixheaacd_read_bits_buf(it_bit_buff, 14);
  295|  66.4k|      pstr_td_frame_data->icb_index[kk][7] =
  296|  66.4k|          ixheaacd_read_bits_buf(it_bit_buff, 14);
  297|   432k|    } else {
  298|   432k|      pstr_td_frame_data->icb_index[kk][0] =
  299|   432k|          ixheaacd_read_bits_buf(it_bit_buff, ptr_num_bits[0]);
  300|   432k|      pstr_td_frame_data->icb_index[kk][1] =
  301|   432k|          ixheaacd_read_bits_buf(it_bit_buff, ptr_num_bits[1]);
  302|   432k|      pstr_td_frame_data->icb_index[kk][2] =
  303|   432k|          ixheaacd_read_bits_buf(it_bit_buff, ptr_num_bits[2]);
  304|   432k|      pstr_td_frame_data->icb_index[kk][3] =
  305|   432k|          ixheaacd_read_bits_buf(it_bit_buff, ptr_num_bits[3]);
  306|   432k|    }
  307|       |
  308|   499k|    pstr_td_frame_data->gains[kk] = ixheaacd_read_bits_buf(it_bit_buff, 7);
  309|   499k|  }
  310|   137k|}
ixheaacd_tcx_coding:
  314|   106k|                         ia_bit_buf_struct *it_bit_buff) {
  315|   106k|  pstr_td_frame_data->noise_factor[k] = ixheaacd_read_bits_buf(it_bit_buff, 3);
  316|       |
  317|   106k|  pstr_td_frame_data->global_gain[k] = ixheaacd_read_bits_buf(it_bit_buff, 7);
  318|       |
  319|   106k|  switch (pstr_td_frame_data->mod[k]) {
  ------------------
  |  Branch (319:11): [True: 106k, False: 4]
  ------------------
  320|  74.9k|    case 1:
  ------------------
  |  Branch (320:5): [True: 74.9k, False: 31.3k]
  ------------------
  321|  74.9k|      pstr_td_frame_data->tcx_lg[k] = usac_data->len_subfrm;
  322|  74.9k|      break;
  323|  31.0k|    case 2:
  ------------------
  |  Branch (323:5): [True: 31.0k, False: 75.2k]
  ------------------
  324|  31.0k|      pstr_td_frame_data->tcx_lg[k] = 2 * (usac_data->len_subfrm);
  325|  31.0k|      break;
  326|    315|    case 3:
  ------------------
  |  Branch (326:5): [True: 315, False: 105k]
  ------------------
  327|    315|      pstr_td_frame_data->tcx_lg[k] = 4 * (usac_data->len_subfrm);
  328|    315|      break;
  329|   106k|  }
  330|       |
  331|   106k|  if (first_tcx_flag) {
  ------------------
  |  Branch (331:7): [True: 62.8k, False: 43.4k]
  ------------------
  332|  62.8k|    if (usac_data->usac_independency_flg) {
  ------------------
  |  Branch (332:9): [True: 22.7k, False: 40.0k]
  ------------------
  333|  22.7k|      pstr_td_frame_data->arith_reset_flag = 1;
  334|  40.0k|    } else {
  335|  40.0k|      pstr_td_frame_data->arith_reset_flag = ixheaacd_read_bits_buf(it_bit_buff, 1);
  336|  40.0k|    }
  337|  62.8k|  }
  338|       |
  339|   106k|  ixheaacd_arith_data(pstr_td_frame_data, quant, usac_data, it_bit_buff, (first_tcx_flag), k);
  340|       |
  341|   106k|  return;
  342|   106k|}
ixheaacd_lpd_channel_stream:
  346|  75.0k|                                   ia_bit_buf_struct *it_bit_buff, FLOAT32 *synth) {
  347|  75.0k|  WORD32 lpd_mode, k, cnt, ii;
  348|  75.0k|  WORD32 first_tcx_flag;
  349|  75.0k|  WORD32 *quant;
  350|  75.0k|  WORD32 core_mode_last = 0, fac_data_present;
  351|  75.0k|  WORD32 *fac_data;
  352|  75.0k|  WORD32 first_lpd_flag = 0;
  353|  75.0k|  WORD32 short_fac_flag;
  354|  75.0k|  WORD32 bpf_control_info = 0;
  355|  75.0k|  WORD32 chan = usac_data->present_chan;
  356|  75.0k|  WORD32 last_lpd_mode = usac_data->str_tddec[chan]->mode_prev;
  357|  75.0k|  WORD32 err = 0;
  358|  75.0k|  short_fac_flag = 0;
  359|       |
  360|  75.0k|  jmp_buf local;
  361|       |
  362|  75.0k|  if (usac_data->ec_flag) {
  ------------------
  |  Branch (362:7): [True: 0, False: 75.0k]
  ------------------
  363|      0|    err = setjmp(local);
  364|      0|  }
  365|       |
  366|  75.0k|  if (usac_data->sampling_rate_idx <= 5 && usac_data->ec_flag) {
  ------------------
  |  Branch (366:7): [True: 9.27k, False: 65.7k]
  |  Branch (366:44): [True: 0, False: 9.27k]
  ------------------
  367|      0|    usac_data->frame_ok = 0;
  368|      0|  }
  369|       |
  370|  75.0k|  if (err == 0 && usac_data->frame_ok == 1) {
  ------------------
  |  Branch (370:7): [True: 75.0k, False: 0]
  |  Branch (370:19): [True: 75.0k, False: 0]
  ------------------
  371|  75.0k|    if (usac_data->ec_flag) {
  ------------------
  |  Branch (371:9): [True: 0, False: 75.0k]
  ------------------
  372|      0|      it_bit_buff->xaac_jmp_buf = &local;
  373|      0|    }
  374|  75.0k|    pstr_td_frame_data->acelp_core_mode = ixheaacd_read_bits_buf(it_bit_buff, 3);
  375|       |
  376|  75.0k|    lpd_mode = ixheaacd_read_bits_buf(it_bit_buff, 5);
  377|       |
  378|  75.0k|    if ((lpd_mode > 25 || lpd_mode < 0)) {
  ------------------
  |  Branch (378:10): [True: 5.91k, False: 69.1k]
  |  Branch (378:27): [True: 0, False: 69.1k]
  ------------------
  379|  5.90k|      if (usac_data->ec_flag) {
  ------------------
  |  Branch (379:11): [True: 0, False: 5.90k]
  ------------------
  380|      0|        longjmp(*(it_bit_buff->xaac_jmp_buf),
  381|      0|                IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|      0|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  382|  5.90k|      } else {
  383|  5.90k|        return IA_FATAL_ERROR;
  ------------------
  |  |   25|  5.90k|#define IA_FATAL_ERROR 0x80000000
  ------------------
  384|  5.90k|      }
  385|  5.90k|    }
  386|       |
  387|  69.1k|    if (lpd_mode == 25) {
  ------------------
  |  Branch (387:9): [True: 315, False: 68.8k]
  ------------------
  388|    315|      pstr_td_frame_data->mod[0] = pstr_td_frame_data->mod[1] = pstr_td_frame_data->mod[2] =
  389|    315|          pstr_td_frame_data->mod[3] = 3;
  390|  68.8k|    } else if (lpd_mode == 24) {
  ------------------
  |  Branch (390:16): [True: 509, False: 68.3k]
  ------------------
  391|    509|      pstr_td_frame_data->mod[0] = pstr_td_frame_data->mod[1] = pstr_td_frame_data->mod[2] =
  392|    509|          pstr_td_frame_data->mod[3] = 2;
  393|  68.3k|    } else {
  394|  68.3k|      if (lpd_mode >= 20) {
  ------------------
  |  Branch (394:11): [True: 6.89k, False: 61.4k]
  ------------------
  395|  6.89k|        pstr_td_frame_data->mod[0] = lpd_mode & 1;
  396|  6.89k|        pstr_td_frame_data->mod[1] = (lpd_mode >> 1) & 1;
  397|  6.89k|        pstr_td_frame_data->mod[2] = pstr_td_frame_data->mod[3] = 2;
  398|  61.4k|      } else if (lpd_mode >= 16) {
  ------------------
  |  Branch (398:18): [True: 23.1k, False: 38.2k]
  ------------------
  399|  23.1k|        pstr_td_frame_data->mod[0] = pstr_td_frame_data->mod[1] = 2;
  400|  23.1k|        pstr_td_frame_data->mod[2] = lpd_mode & 1;
  401|  23.1k|        pstr_td_frame_data->mod[3] = (lpd_mode >> 1) & 1;
  402|  38.2k|      } else {
  403|  38.2k|        pstr_td_frame_data->mod[0] = lpd_mode & 1;
  404|  38.2k|        pstr_td_frame_data->mod[1] = (lpd_mode >> 1) & 1;
  405|  38.2k|        pstr_td_frame_data->mod[2] = (lpd_mode >> 2) & 1;
  406|  38.2k|        pstr_td_frame_data->mod[3] = (lpd_mode >> 3) & 1;
  407|  38.2k|      }
  408|  68.3k|    }
  409|       |
  410|  69.1k|    bpf_control_info = ixheaacd_read_bits_buf(it_bit_buff, 1);
  411|       |
  412|  69.1k|    core_mode_last = ixheaacd_read_bits_buf(it_bit_buff, 1);
  413|       |
  414|  69.1k|    fac_data_present = ixheaacd_read_bits_buf(it_bit_buff, 1);
  415|       |
  416|  69.1k|    first_lpd_flag = (core_mode_last == 0) ? 1 : 0;
  ------------------
  |  Branch (416:22): [True: 41.7k, False: 27.4k]
  ------------------
  417|       |
  418|  69.1k|    quant = pstr_td_frame_data->x_tcx_invquant;
  419|  69.1k|    first_tcx_flag = 1;
  420|  69.1k|    k = 0;
  421|   313k|    while (k < 4) {
  ------------------
  |  Branch (421:12): [True: 244k, False: 69.1k]
  ------------------
  422|   244k|      if (k == 0) {
  ------------------
  |  Branch (422:11): [True: 69.1k, False: 175k]
  ------------------
  423|  69.1k|        if ((core_mode_last == 1) && (fac_data_present == 1))
  ------------------
  |  Branch (423:13): [True: 27.4k, False: 41.7k]
  |  Branch (423:38): [True: 10.8k, False: 16.5k]
  ------------------
  424|  10.8k|          ixheaacd_fac_decoding((usac_data->len_subfrm) / 2, k, pstr_td_frame_data->fac,
  425|  10.8k|                                it_bit_buff);
  426|   175k|      } else {
  427|   175k|        if (((last_lpd_mode == 0) && (pstr_td_frame_data->mod[k] > 0)) ||
  ------------------
  |  Branch (427:14): [True: 92.3k, False: 82.6k]
  |  Branch (427:38): [True: 29.2k, False: 63.1k]
  ------------------
  428|   145k|            ((last_lpd_mode > 0) && (pstr_td_frame_data->mod[k] == 0)))
  ------------------
  |  Branch (428:14): [True: 82.6k, False: 63.1k]
  |  Branch (428:37): [True: 53.6k, False: 28.9k]
  ------------------
  429|  82.8k|          ixheaacd_fac_decoding((usac_data->len_subfrm) / 2, k, pstr_td_frame_data->fac,
  430|  82.8k|                                it_bit_buff);
  431|   175k|      }
  432|       |
  433|   244k|      if (pstr_td_frame_data->mod[k] == 0) {
  ------------------
  |  Branch (433:11): [True: 137k, False: 106k]
  ------------------
  434|   137k|        ixheaacd_acelp_decoding(k, usac_data, pstr_td_frame_data, it_bit_buff, chan);
  435|   137k|        last_lpd_mode = 0;
  436|   137k|        pstr_td_frame_data->tcx_lg[k] = 0;
  437|   137k|        k += 1;
  438|   137k|      } else {
  439|   106k|        ixheaacd_tcx_coding(usac_data, quant, k, first_tcx_flag, pstr_td_frame_data, it_bit_buff);
  440|   106k|        last_lpd_mode = pstr_td_frame_data->mod[k];
  441|   106k|        quant += pstr_td_frame_data->tcx_lg[k];
  442|       |
  443|   106k|        cnt = 1 << (pstr_td_frame_data->mod[k] - 1);
  444|       |
  445|   138k|        for (ii = 0; ii < cnt - 1; ii++) pstr_td_frame_data->tcx_lg[k + 1 + ii] = 0;
  ------------------
  |  Branch (445:22): [True: 31.8k, False: 106k]
  ------------------
  446|       |
  447|   106k|        k += cnt;
  448|   106k|        first_tcx_flag = 0;
  449|   106k|      }
  450|   244k|    }
  451|       |
  452|  69.1k|    ixheaacd_lpc_data(first_lpd_flag, pstr_td_frame_data->mod, pstr_td_frame_data, it_bit_buff);
  453|       |
  454|  69.1k|    if ((core_mode_last == 0) && (fac_data_present == 1)) {
  ------------------
  |  Branch (454:9): [True: 41.4k, False: 27.7k]
  |  Branch (454:34): [True: 10.6k, False: 30.7k]
  ------------------
  455|  10.6k|      WORD32 fac_length;
  456|  10.6k|      short_fac_flag = ixheaacd_read_bits_buf(it_bit_buff, 1);
  457|       |
  458|  10.6k|      fac_length = (short_fac_flag) ? ((usac_data->ccfl) / 16) : ((usac_data->ccfl) / 8);
  ------------------
  |  Branch (458:20): [True: 5.74k, False: 4.93k]
  ------------------
  459|       |
  460|  10.6k|      fac_data = pstr_td_frame_data->fac_data;
  461|  10.6k|      fac_data[0] = ixheaacd_read_bits_buf(it_bit_buff, 7);
  462|  10.6k|      if ((pstr_td_frame_data->fac_data[0] < 0) || (pstr_td_frame_data->fac_data[0] > 128)) {
  ------------------
  |  Branch (462:11): [True: 0, False: 10.6k]
  |  Branch (462:52): [True: 0, False: 10.6k]
  ------------------
  463|      0|        if (usac_data->ec_flag) {
  ------------------
  |  Branch (463:13): [True: 0, False: 0]
  ------------------
  464|      0|          longjmp(*(it_bit_buff->xaac_jmp_buf),
  465|      0|                  IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|      0|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  466|      0|        } else {
  467|      0|          return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
  468|      0|        }
  469|      0|      }
  470|  10.6k|      ixheaacd_fac_decoding(fac_length, 0, &fac_data[1], it_bit_buff);
  471|  10.6k|    }
  472|  69.1k|    if (fac_data_present == 0) {
  ------------------
  |  Branch (472:9): [True: 47.1k, False: 21.9k]
  ------------------
  473|  47.1k|      memset(&pstr_td_frame_data->fac_data[0], 0, sizeof(pstr_td_frame_data->fac_data));
  474|  47.1k|    }
  475|  69.1k|    if (usac_data->ec_flag && usac_data->frame_ok) {
  ------------------
  |  Branch (475:9): [True: 0, False: 69.1k]
  |  Branch (475:31): [True: 0, False: 0]
  ------------------
  476|      0|      usac_data->bpf_control_info = bpf_control_info;
  477|      0|      usac_data->core_mode_last = core_mode_last;
  478|      0|      usac_data->first_lpd_flag = first_lpd_flag;
  479|      0|    }
  480|  69.1k|  } else {
  481|      0|    usac_data->frame_ok = 0;
  482|      0|  }
  483|       |
  484|  69.1k|  if (usac_data->ec_flag) {
  ------------------
  |  Branch (484:7): [True: 0, False: 69.1k]
  ------------------
  485|      0|    usac_data->str_error_concealment[chan].pstr_ec_scratch =
  486|      0|        (ia_ec_scratch_str *)&usac_data->str_error_concealment[chan].str_ec_scratch;
  487|       |
  488|      0|    ixheaacd_usac_apply_ec(usac_data, &ixheaacd_samp_rate_info[0], chan);
  489|       |
  490|      0|    if (usac_data->frame_ok == 0) {
  ------------------
  |  Branch (490:9): [True: 0, False: 0]
  ------------------
  491|      0|      bpf_control_info = usac_data->bpf_control_info;
  492|      0|      core_mode_last = usac_data->core_mode_last;
  493|      0|      first_lpd_flag = usac_data->first_lpd_flag;
  494|      0|    }
  495|      0|  }
  496|  69.1k|  if (usac_data->frame_ok) {
  ------------------
  |  Branch (496:7): [True: 68.6k, False: 543]
  ------------------
  497|  68.6k|    err = ixheaacd_lpd_dec(usac_data, usac_data->str_tddec[chan], pstr_td_frame_data, synth,
  498|  68.6k|                           first_lpd_flag, short_fac_flag, bpf_control_info);
  499|  68.6k|  } else {
  500|    543|    if (usac_data->ec_flag) {
  ------------------
  |  Branch (500:9): [True: 0, False: 543]
  ------------------
  501|      0|      usac_data->fac_data_present[chan] = 0;
  502|      0|      err = ixheaacd_lpd_dec(usac_data, usac_data->str_tddec[chan],
  503|      0|                             &usac_data->td_frame_data_prev[chan], synth, first_lpd_flag,
  504|      0|                             short_fac_flag, bpf_control_info);
  505|      0|    }
  506|    543|  }
  507|       |
  508|  69.1k|  return (err);
  509|  75.0k|}
ixheaacd_tw_buff_update:
  512|  75.0k|                               ia_usac_lpd_decoder_handle st) {
  513|  75.0k|  WORD32 *p_ioverlap = usac_data->overlap_data_ptr[i];
  514|  75.0k|  WORD32 td_frame_prev = usac_data->td_frame_prev[i];
  515|  75.0k|  WORD32 window_sequence_last = usac_data->window_sequence_last[i];
  516|  75.0k|  WORD32 tw_mdct = usac_data->tw_mdct[0];
  517|       |
  518|  75.0k|  if (!td_frame_prev) {
  ------------------
  |  Branch (518:7): [True: 15.3k, False: 59.6k]
  ------------------
  519|  15.3k|    if (tw_mdct) {
  ------------------
  |  Branch (519:9): [True: 0, False: 15.3k]
  ------------------
  520|      0|      if (usac_data->ec_flag == 0) {
  ------------------
  |  Branch (520:11): [True: 0, False: 0]
  ------------------
  521|      0|        return -1;
  522|      0|      } else {
  523|      0|        tw_mdct = 0;
  524|      0|      }
  525|  15.3k|    } else {
  526|  15.3k|      ixheaacd_reset_acelp_data_fix(usac_data, st, p_ioverlap,
  527|  15.3k|                                    (window_sequence_last == EIGHT_SHORT_SEQUENCE), 0);
  ------------------
  |  |  102|  15.3k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  528|  15.3k|    }
  529|  15.3k|  }
  530|  75.0k|  return 0;
  531|  75.0k|}
ixheaacd_td_frm_dec:
  533|  74.5k|VOID ixheaacd_td_frm_dec(ia_usac_data_struct *usac_data, WORD32 k, WORD32 mod0) {
  534|  74.5k|  WORD32 i;
  535|  74.5k|  WORD32 lfac = 0;
  536|       |
  537|  74.5k|  WORD32 *p_out_idata = usac_data->output_data_ptr[k];
  538|  74.5k|  WORD32 *p_ioverlap = usac_data->overlap_data_ptr[k];
  539|  74.5k|  WORD32 nlong = usac_data->ccfl;
  540|  74.5k|  WORD32 window_sequence_last = usac_data->window_sequence_last[k];
  541|  74.5k|  WORD32 td_frame_prev = usac_data->td_frame_prev[k];
  542|  74.5k|  WORD32 tw_mdct = usac_data->tw_mdct[0];
  543|  74.5k|  WORD32 nshort = nlong / 8;
  544|  74.5k|  WORD32 *p_in_idata = p_out_idata;
  545|       |
  546|  74.5k|  if (!td_frame_prev) {
  ------------------
  |  Branch (546:7): [True: 15.1k, False: 59.4k]
  ------------------
  547|  15.1k|    if (window_sequence_last == EIGHT_SHORT_SEQUENCE) {
  ------------------
  |  |  102|  15.1k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  |  Branch (547:9): [True: 6.15k, False: 8.94k]
  ------------------
  548|  6.15k|      lfac = nshort / 2;
  549|  8.94k|    } else {
  550|  8.94k|      lfac = nshort;
  551|  8.94k|    }
  552|  15.1k|  }
  553|       |
  554|  74.5k|  if (!td_frame_prev && (mod0 == 0)) {
  ------------------
  |  Branch (554:7): [True: 15.1k, False: 59.4k]
  |  Branch (554:25): [True: 6.33k, False: 8.76k]
  ------------------
  555|  2.07M|    for (i = 0; i < (nlong / 2) - lfac - (LEN_SUBFR); i++) {
  ------------------
  |  |  118|  2.07M|#define LEN_SUBFR 64
  ------------------
  |  Branch (555:17): [True: 2.06M, False: 6.33k]
  ------------------
  556|  2.06M|      p_in_idata[i] = 0;
  557|  2.06M|    }
  558|  68.1k|  } else if (!td_frame_prev && (mod0 > 0)) {
  ------------------
  |  Branch (558:14): [True: 8.76k, False: 59.4k]
  |  Branch (558:32): [True: 8.76k, False: 0]
  ------------------
  559|  3.46M|    for (i = 0; i < (nlong / 2) - lfac; i++) {
  ------------------
  |  Branch (559:17): [True: 3.45M, False: 8.76k]
  ------------------
  560|  3.45M|      p_in_idata[i] = 0;
  561|  3.45M|    }
  562|  8.76k|  }
  563|       |
  564|  74.5k|  if (tw_mdct) {
  ------------------
  |  Branch (564:7): [True: 0, False: 74.5k]
  ------------------
  565|      0|    if (!td_frame_prev && (mod0 == 0)) {
  ------------------
  |  Branch (565:9): [True: 0, False: 0]
  |  Branch (565:27): [True: 0, False: 0]
  ------------------
  566|      0|      for (i = (nlong / 2) - lfac - (LEN_SUBFR); i < nlong / 2; i++) {
  ------------------
  |  |  118|      0|#define LEN_SUBFR 64
  ------------------
  |  Branch (566:50): [True: 0, False: 0]
  ------------------
  567|      0|        p_ioverlap[i + (nlong / 2)] = 0;
  568|      0|      }
  569|      0|    }
  570|      0|    for (i = 0; i < nlong / 2; i++) {
  ------------------
  |  Branch (570:17): [True: 0, False: 0]
  ------------------
  571|      0|      p_out_idata[i] = p_ioverlap[i] << 1;
  572|      0|      p_out_idata[i + nlong / 2] =
  573|      0|          ixheaac_add32_sat(p_ioverlap[i + nlong / 2] << 1, p_in_idata[i]);
  574|      0|      p_ioverlap[i] = ixheaac_add32_sat(p_in_idata[i + (nlong / 2)] >> 1, p_ioverlap[i + nlong]);
  575|      0|      p_ioverlap[i + (nlong / 2)] = 0;
  576|      0|      p_ioverlap[i + nlong] = 0;
  577|      0|      p_ioverlap[i + nlong + (nlong / 2)] = 0;
  578|      0|    }
  579|  74.5k|  } else {
  580|  74.5k|    if (!td_frame_prev && (mod0 == 0)) {
  ------------------
  |  Branch (580:9): [True: 15.1k, False: 59.4k]
  |  Branch (580:27): [True: 6.33k, False: 8.76k]
  ------------------
  581|  1.04M|      for (i = (nlong / 2) - lfac - (LEN_SUBFR); i < nlong / 2; i++) {
  ------------------
  |  |  118|  6.33k|#define LEN_SUBFR 64
  ------------------
  |  Branch (581:50): [True: 1.03M, False: 6.33k]
  ------------------
  582|  1.03M|        p_ioverlap[i] = 0;
  583|  1.03M|      }
  584|  68.1k|    } else if (!td_frame_prev) {
  ------------------
  |  Branch (584:16): [True: 8.76k, False: 59.4k]
  ------------------
  585|  5.14M|      for (i = (nlong / 2) - lfac; i < nlong; i++) {
  ------------------
  |  Branch (585:36): [True: 5.13M, False: 8.76k]
  ------------------
  586|  5.13M|        p_ioverlap[i] = 0;
  587|  5.13M|      }
  588|  8.76k|    }
  589|  69.1M|    for (i = 0; i < nlong; i++) {
  ------------------
  |  Branch (589:17): [True: 69.1M, False: 74.5k]
  ------------------
  590|  69.1M|      p_out_idata[i] = ixheaac_add32_sat(p_ioverlap[i] << 1, p_in_idata[i]);
  591|  69.1M|      p_ioverlap[i] = 0;
  592|  69.1M|    }
  593|  74.5k|  }
  594|  74.5k|}

ixheaacd_acelp_pitch_sharpening:
   60|   496k|VOID ixheaacd_acelp_pitch_sharpening(FLOAT32 *x, WORD32 pit_lag) {
   61|   496k|  WORD32 i;
   62|  8.29M|  for (i = pit_lag; i < LEN_SUBFR; i++) {
  ------------------
  |  |  118|  8.29M|#define LEN_SUBFR 64
  ------------------
  |  Branch (62:21): [True: 7.79M, False: 496k]
  ------------------
   63|  7.79M|    x[i] += x[i - pit_lag] * F_PIT_SHARP;
  ------------------
  |  |   55|  7.79M|#define F_PIT_SHARP 0.85F
  ------------------
   64|  7.79M|  }
   65|   496k|  return;
   66|   496k|}
ixheaacd_acelp_decode_pulses_per_track:
  225|   496k|                                            FLOAT32 code_vec[]) {
  226|   496k|  WORD32 track_idx, index, ixheaacd_drc_offset, pos[6], i;
  227|   496k|  memset(code_vec, 0, 64 * sizeof(FLOAT32));
  228|       |
  229|   496k|  if (code_bits == 12) {
  ------------------
  |  Branch (229:7): [True: 27.4k, False: 469k]
  ------------------
  230|  82.3k|    for (track_idx = 0; track_idx < 4; track_idx += 2) {
  ------------------
  |  Branch (230:25): [True: 54.8k, False: 27.4k]
  ------------------
  231|  54.8k|      ixheaacd_drc_offset = cb_index[2 * (track_idx / 2)];
  232|  54.8k|      index = cb_index[2 * (track_idx / 2) + 1];
  233|  54.8k|      ixheaacd_d_acelp_decode_1p_n1(index, 4, 0, pos);
  234|  54.8k|      ixheaacd_d_acelp_add_pulse(
  235|  54.8k|          pos, 1, 2 * ixheaacd_drc_offset + track_idx / 2, code_vec);
  236|  54.8k|    }
  237|   469k|  } else if (code_bits == 16) {
  ------------------
  |  Branch (237:14): [True: 40.9k, False: 428k]
  ------------------
  238|  40.9k|    i = 0;
  239|  40.9k|    ixheaacd_drc_offset = cb_index[i++];
  240|  40.9k|    ixheaacd_drc_offset = (ixheaacd_drc_offset == 0) ? 1 : 3;
  ------------------
  |  Branch (240:27): [True: 20.9k, False: 19.9k]
  ------------------
  241|   204k|    for (track_idx = 0; track_idx < 4; track_idx++) {
  ------------------
  |  Branch (241:25): [True: 163k, False: 40.9k]
  ------------------
  242|   163k|      if (track_idx != ixheaacd_drc_offset) {
  ------------------
  |  Branch (242:11): [True: 122k, False: 40.9k]
  ------------------
  243|   122k|        index = cb_index[i++];
  244|   122k|        ixheaacd_d_acelp_decode_1p_n1(index, 4, 0, pos);
  245|   122k|        ixheaacd_d_acelp_add_pulse(pos, 1, track_idx, code_vec);
  246|   122k|      }
  247|   163k|    }
  248|   428k|  } else if (code_bits == 20) {
  ------------------
  |  Branch (248:14): [True: 177k, False: 250k]
  ------------------
  249|   886k|    for (track_idx = 0; track_idx < 4; track_idx++) {
  ------------------
  |  Branch (249:25): [True: 709k, False: 177k]
  ------------------
  250|   709k|      index = cb_index[track_idx];
  251|   709k|      ixheaacd_acelp_decode_1sp_per_track(index, 4, 0, track_idx, code_vec);
  252|   709k|    }
  253|   250k|  } else if (code_bits == 28) {
  ------------------
  |  Branch (253:14): [True: 28.0k, False: 222k]
  ------------------
  254|  84.2k|    for (track_idx = 0; track_idx < 2; track_idx++) {
  ------------------
  |  Branch (254:25): [True: 56.1k, False: 28.0k]
  ------------------
  255|  56.1k|      index = cb_index[track_idx];
  256|  56.1k|      ixheaacd_acelp_decode_2sp_per_track(index, 4, 0, track_idx, code_vec);
  257|  56.1k|    }
  258|  84.2k|    for (track_idx = 2; track_idx < 4; track_idx++) {
  ------------------
  |  Branch (258:25): [True: 56.1k, False: 28.0k]
  ------------------
  259|  56.1k|      index = cb_index[track_idx];
  260|  56.1k|      ixheaacd_acelp_decode_1sp_per_track(index, 4, 0, track_idx, code_vec);
  261|  56.1k|    }
  262|   222k|  } else if (code_bits == 36) {
  ------------------
  |  Branch (262:14): [True: 59.1k, False: 163k]
  ------------------
  263|   295k|    for (track_idx = 0; track_idx < 4; track_idx++) {
  ------------------
  |  Branch (263:25): [True: 236k, False: 59.1k]
  ------------------
  264|   236k|      index = cb_index[track_idx];
  265|   236k|      ixheaacd_acelp_decode_2sp_per_track(index, 4, 0, track_idx, code_vec);
  266|   236k|    }
  267|   163k|  } else if (code_bits == 44) {
  ------------------
  |  Branch (267:14): [True: 66.3k, False: 97.2k]
  ------------------
  268|   199k|    for (track_idx = 0; track_idx < 2; track_idx++) {
  ------------------
  |  Branch (268:25): [True: 132k, False: 66.3k]
  ------------------
  269|   132k|      index = cb_index[track_idx];
  270|   132k|      ixheaacd_acelp_decode_3sp_per_track(index, 4, 0, track_idx, code_vec);
  271|   132k|    }
  272|   199k|    for (track_idx = 2; track_idx < 4; track_idx++) {
  ------------------
  |  Branch (272:25): [True: 132k, False: 66.3k]
  ------------------
  273|   132k|      index = cb_index[track_idx];
  274|   132k|      ixheaacd_acelp_decode_2sp_per_track(index, 4, 0, track_idx, code_vec);
  275|   132k|    }
  276|  97.2k|  } else if (code_bits == 52) {
  ------------------
  |  Branch (276:14): [True: 31.0k, False: 66.2k]
  ------------------
  277|   155k|    for (track_idx = 0; track_idx < 4; track_idx++) {
  ------------------
  |  Branch (277:25): [True: 124k, False: 31.0k]
  ------------------
  278|   124k|      index = cb_index[track_idx];
  279|   124k|      ixheaacd_acelp_decode_3sp_per_track(index, 4, 0, track_idx, code_vec);
  280|   124k|    }
  281|  66.2k|  } else if (code_bits == 64) {
  ------------------
  |  Branch (281:14): [True: 66.2k, False: 0]
  ------------------
  282|   331k|    for (track_idx = 0; track_idx < 4; track_idx++) {
  ------------------
  |  Branch (282:25): [True: 264k, False: 66.2k]
  ------------------
  283|   264k|      index = ((cb_index[track_idx] << 14) + cb_index[track_idx + 4]);
  284|   264k|      ixheaacd_acelp_decode_4sp_per_track(index, track_idx, code_vec);
  285|   264k|    }
  286|  66.2k|  }
  287|   496k|  return;
  288|   496k|}
ixheaacd_acelp_alias_cnx:
  398|   137k|                              ia_usac_lpd_decoder_handle st) {
  399|   137k|  WORD32 i, subfr_idx;
  400|   137k|  WORD32 pitch_lag = 0, pitch_lag_frac = 0, index, pitch_flag, pitch_lag_max;
  401|   137k|  WORD32 pitch_lag_min = 0;
  402|   137k|  FLOAT32 tmp, pitch_gain, gain_code, voicing_factor, r_v, innov_energy,
  403|   137k|      pitch_energy, mean_ener_code;
  404|   137k|  FLOAT32 gain_smooth, gain_code0, cpe;
  405|   137k|  FLOAT32 code[LEN_SUBFR] = {0}, synth_temp[128 + 16] = {0};
  406|   137k|  FLOAT32 post_process_exc[LEN_SUBFR] = {0};
  407|   137k|  FLOAT32 gain_smooth_factor;
  408|   137k|  FLOAT32 *ptr_lp_filt_coeff;
  409|   137k|  WORD32 pitch_min;
  410|   137k|  WORD32 pitch_fr2;
  411|   137k|  WORD32 pitch_fr1;
  412|   137k|  WORD32 pitch_max;
  413|   137k|  WORD32 subfr_nb = 0;
  414|   137k|  const WORD16 num_codebits_table[8] = {20, 28, 36, 44, 52, 64, 12, 16};
  415|   137k|  FLOAT32 x[FAC_LENGTH] = {0}, xn2[2 * FAC_LENGTH + 16] = {0};
  416|   137k|  WORD32 int_x[FAC_LENGTH] = {0};
  417|   137k|  WORD32 TTT;
  418|   137k|  WORD32 len_subfr = usac_data->len_subfrm;
  419|   137k|  WORD32 fac_length;
  420|   137k|  WORD8 shiftp;
  421|   137k|  WORD32 preshift;
  422|   137k|  WORD32 *ptr_scratch = &usac_data->scratch_buffer[0];
  423|   137k|  WORD32 *int_xn2 = &usac_data->x_ac_dec[0];
  424|   137k|  WORD32 loop_count = 0;
  425|   137k|  WORD32 core_mode = pstr_td_frame_data->acelp_core_mode;
  426|   137k|  FLOAT32 *synth_signal =
  427|   137k|      &usac_data->synth_buf[len_subfr * k + MAX_PITCH +
  ------------------
  |  |   55|   137k|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|   137k|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|   137k|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|   137k|   (6 *           \
  |  |   57|   137k|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|   137k|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|   137k|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|   137k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|   137k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|   137k|#define TMIN 34
  |  |  ------------------
  ------------------
  428|   137k|                            (((NUM_FRAMES * usac_data->num_subfrm) / 2) - 1) *
  ------------------
  |  |   27|   137k|#define NUM_FRAMES 4
  ------------------
  429|   137k|                                LEN_SUBFR];
  ------------------
  |  |  118|   137k|#define LEN_SUBFR 64
  ------------------
  430|   137k|  FLOAT32 *xcitation_curr =
  431|   137k|      &usac_data->exc_buf[len_subfr * k + MAX_PITCH + (INTER_LP_FIL_ORDER + 1)];
  ------------------
  |  |   55|   137k|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|   137k|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|   137k|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|   137k|   (6 *           \
  |  |   57|   137k|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|   137k|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|   137k|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|   137k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|   137k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|   137k|#define TMIN 34
  |  |  ------------------
  ------------------
                    &usac_data->exc_buf[len_subfr * k + MAX_PITCH + (INTER_LP_FIL_ORDER + 1)];
  ------------------
  |  |   51|   137k|#define INTER_LP_FIL_ORDER 16
  ------------------
  432|   137k|  FLOAT32 *ptr_pitch_gain =
  433|   137k|      &usac_data->pitch_gain[k * usac_data->num_subfrm +
  434|   137k|                             (((NUM_FRAMES * usac_data->num_subfrm) / 2) - 1)];
  ------------------
  |  |   27|   137k|#define NUM_FRAMES 4
  ------------------
  435|   137k|  WORD32 *ptr_pitch =
  436|   137k|      &usac_data->pitch[k * usac_data->num_subfrm +
  437|   137k|                        (((NUM_FRAMES * usac_data->num_subfrm) / 2) - 1)];
  ------------------
  |  |   27|   137k|#define NUM_FRAMES 4
  ------------------
  438|   137k|  fac_length = len_subfr / 2;
  439|       |
  440|   137k|  WORD32 bfi = (usac_data->num_lost_lpd_frames[usac_data->present_chan] > 0) ? 1 : 0;
  ------------------
  |  Branch (440:16): [True: 0, False: 137k]
  ------------------
  441|   137k|  WORD32 i_offset =
  442|   137k|      (usac_data->str_tddec[usac_data->present_chan]->fscale * TMIN + (FSCALE_DENOM / 2)) /
  ------------------
  |  |   45|   137k|#define TMIN 34
  ------------------
                    (usac_data->str_tddec[usac_data->present_chan]->fscale * TMIN + (FSCALE_DENOM / 2)) /
  ------------------
  |  |   39|   137k|#define FSCALE_DENOM 12800
  ------------------
  443|   137k|          FSCALE_DENOM -
  ------------------
  |  |   39|   137k|#define FSCALE_DENOM 12800
  ------------------
  444|   137k|      TMIN;
  ------------------
  |  |   45|   137k|#define TMIN 34
  ------------------
  445|   137k|  const WORD32 pitch_max_val = TMAX + (6 * i_offset);
  ------------------
  |  |   48|   137k|#define TMAX (27 + 6 * TMIN)
  |  |  ------------------
  |  |  |  |   45|   137k|#define TMIN 34
  |  |  ------------------
  ------------------
  446|   137k|  WORD16 code_t[LEN_SUBFR];
  447|       |
  448|   137k|  if (st->mode_prev > 0) {
  ------------------
  |  Branch (448:7): [True: 61.3k, False: 75.6k]
  ------------------
  449|  3.64M|    for (i = 0; i < fac_length / 2; i++) {
  ------------------
  |  Branch (449:17): [True: 3.58M, False: 61.3k]
  ------------------
  450|  3.58M|      x[i] = st->fac_gain * pstr_td_frame_data->fac[k * FAC_LENGTH + 2 * i];
  ------------------
  |  |   33|  3.58M|#define FAC_LENGTH 128
  ------------------
  451|  3.58M|      x[fac_length / 2 + i] =
  452|  3.58M|          st->fac_gain *
  453|  3.58M|          pstr_td_frame_data->fac[k * FAC_LENGTH + fac_length - 2 * i - 1];
  ------------------
  |  |   33|  3.58M|#define FAC_LENGTH 128
  ------------------
  454|  3.58M|    }
  455|   957k|    for (i = 0; i < fac_length / 8; i++) {
  ------------------
  |  Branch (455:17): [True: 895k, False: 61.3k]
  ------------------
  456|   895k|      x[i] *= st->fac_fd_data[2 * i];
  457|   895k|      x[fac_length - i - 1] *= st->fac_fd_data[2 * i + 1];
  458|   895k|    }
  459|       |
  460|  61.3k|    preshift = 0;
  461|  61.3k|    shiftp = ixheaacd_float2fix(x, int_x, fac_length);
  462|       |
  463|  61.3k|    ixheaacd_acelp_mdct(int_x, int_xn2, &preshift, fac_length, ptr_scratch);
  464|       |
  465|  61.3k|    ixheaacd_fix2float(int_xn2, xn2 + fac_length, fac_length, &shiftp,
  466|  61.3k|                       &preshift);
  467|       |
  468|  61.3k|    ixheaacd_vec_cnst_mul((2.0f / (FLOAT32)fac_length), xn2 + fac_length,
  469|  61.3k|                          xn2 + fac_length, fac_length);
  470|       |
  471|  61.3k|    memset(xn2, 0, fac_length * sizeof(FLOAT32));
  472|       |
  473|  61.3k|    ixheaacd_lpc_wt_synthesis_tool(st->lp_flt_coeff_a_prev, xn2 + fac_length,
  474|  61.3k|                                   fac_length);
  475|       |
  476|  14.3M|    for (i = 0; i < 2 * fac_length; i++)
  ------------------
  |  Branch (476:17): [True: 14.3M, False: 61.3k]
  ------------------
  477|  14.3M|      xn2[i] += synth_signal[i - (2 * fac_length)];
  478|       |
  479|  61.3k|    memcpy(synth_signal - fac_length, xn2 + fac_length,
  480|  61.3k|           fac_length * sizeof(FLOAT32));
  481|       |
  482|  61.3k|    tmp = 0.0;
  483|  61.3k|    ixheaacd_preemphsis_tool_float(xn2, PREEMPH_FILT_FAC, 2 * fac_length, tmp);
  ------------------
  |  |   61|  61.3k|#define PREEMPH_FILT_FAC 0.68f
  ------------------
  484|       |
  485|  61.3k|    ptr_lp_filt_coeff = st->lp_flt_coeff_a_prev;
  486|  61.3k|    TTT = fac_length % LEN_SUBFR;
  ------------------
  |  |  118|  61.3k|#define LEN_SUBFR 64
  ------------------
  487|  61.3k|    if (TTT != 0) {
  ------------------
  |  Branch (487:9): [True: 21.5k, False: 39.7k]
  ------------------
  488|  21.5k|      ixheaacd_residual_tool_float(
  489|  21.5k|          ptr_lp_filt_coeff, &xn2[fac_length],
  490|  21.5k|          &xcitation_curr[fac_length - (2 * fac_length)], TTT, 1);
  491|  21.5k|      ptr_lp_filt_coeff += (ORDER + 1);
  ------------------
  |  |   30|  21.5k|#define ORDER 16
  ------------------
  492|  21.5k|    }
  493|       |
  494|  61.3k|    loop_count = (fac_length + TTT) / LEN_SUBFR;
  ------------------
  |  |  118|  61.3k|#define LEN_SUBFR 64
  ------------------
  495|  61.3k|    ixheaacd_residual_tool_float(ptr_lp_filt_coeff, &xn2[fac_length + TTT],
  496|  61.3k|                                 &xcitation_curr[TTT - fac_length], LEN_SUBFR,
  ------------------
  |  |  118|  61.3k|#define LEN_SUBFR 64
  ------------------
  497|  61.3k|                                 loop_count);
  498|  61.3k|  }
  499|       |
  500|  2.32M|  for (i = 0; i < ORDER; i++)
  ------------------
  |  |   30|  2.32M|#define ORDER 16
  ------------------
  |  Branch (500:15): [True: 2.19M, False: 137k]
  ------------------
  501|  2.19M|    synth_temp[i] = synth_signal[i - ORDER] -
  ------------------
  |  |   30|  2.19M|#define ORDER 16
  ------------------
  502|  2.19M|                    (PREEMPH_FILT_FAC * synth_signal[i - ORDER - 1]);
  ------------------
  |  |   61|  2.19M|#define PREEMPH_FILT_FAC 0.68f
  ------------------
                                  (PREEMPH_FILT_FAC * synth_signal[i - ORDER - 1]);
  ------------------
  |  |   30|  2.19M|#define ORDER 16
  ------------------
  503|       |
  504|   137k|  i = (((st->fscale * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN;
  ------------------
  |  |   45|   137k|#define TMIN 34
  ------------------
                i = (((st->fscale * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN;
  ------------------
  |  |   39|   137k|#define FSCALE_DENOM 12800
  ------------------
                i = (((st->fscale * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN;
  ------------------
  |  |   39|   137k|#define FSCALE_DENOM 12800
  ------------------
                i = (((st->fscale * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN;
  ------------------
  |  |   45|   137k|#define TMIN 34
  ------------------
  505|   137k|  pitch_min = TMIN + i;
  ------------------
  |  |   45|   137k|#define TMIN 34
  ------------------
  506|   137k|  pitch_fr2 = TFR2 - i;
  ------------------
  |  |   46|   137k|#define TFR2 (162 - TMIN)
  |  |  ------------------
  |  |  |  |   45|   137k|#define TMIN 34
  |  |  ------------------
  ------------------
  507|   137k|  pitch_fr1 = TFR1;
  ------------------
  |  |   47|   137k|#define TFR1 160
  ------------------
  508|   137k|  pitch_max = TMAX + (6 * i);
  ------------------
  |  |   48|   137k|#define TMAX (27 + 6 * TMIN)
  |  |  ------------------
  |  |  |  |   45|   137k|#define TMIN 34
  |  |  ------------------
  ------------------
  509|       |
  510|   137k|  ptr_lp_filt_coeff = lp_filt_coeff;
  511|   633k|  for (subfr_idx = 0; subfr_idx < len_subfr; subfr_idx += LEN_SUBFR) {
  ------------------
  |  |  118|   496k|#define LEN_SUBFR 64
  ------------------
  |  Branch (511:23): [True: 496k, False: 137k]
  ------------------
  512|   496k|    pitch_flag = subfr_idx;
  513|   496k|    if ((len_subfr == 256) && (subfr_idx == (2 * LEN_SUBFR))) {
  ------------------
  |  |  118|   342k|#define LEN_SUBFR 64
  ------------------
  |  Branch (513:9): [True: 342k, False: 154k]
  |  Branch (513:31): [True: 85.5k, False: 256k]
  ------------------
  514|  85.5k|      pitch_flag = 0;
  515|  85.5k|    }
  516|   496k|    index = pstr_td_frame_data->acb_index[k * 4 + subfr_nb];
  517|       |
  518|   496k|    if (pitch_flag == 0) {
  ------------------
  |  Branch (518:9): [True: 222k, False: 274k]
  ------------------
  519|   222k|      if (index < (pitch_fr2 - pitch_min) * 4) {
  ------------------
  |  Branch (519:11): [True: 179k, False: 43.2k]
  ------------------
  520|   179k|        pitch_lag = pitch_min + (index / 4);
  521|   179k|        pitch_lag_frac = index - (pitch_lag - pitch_min) * 4;
  522|   179k|      } else if (index <
  ------------------
  |  Branch (522:18): [True: 24.6k, False: 18.5k]
  ------------------
  523|  43.2k|                 ((pitch_fr2 - pitch_min) * 4 + (pitch_fr1 - pitch_fr2) * 2)) {
  524|  24.6k|        index -= (pitch_fr2 - pitch_min) * 4;
  525|  24.6k|        pitch_lag = pitch_fr2 + (index / 2);
  526|  24.6k|        pitch_lag_frac = index - (pitch_lag - pitch_fr2) * 2;
  527|  24.6k|        pitch_lag_frac *= 2;
  528|  24.6k|      } else {
  529|  18.5k|        pitch_lag = index + pitch_fr1 - ((pitch_fr2 - pitch_min) * 4) -
  530|  18.5k|                    ((pitch_fr1 - pitch_fr2) * 2);
  531|  18.5k|        pitch_lag_frac = 0;
  532|  18.5k|      }
  533|   222k|      pitch_lag_min = pitch_lag - 8;
  534|   222k|      if (pitch_lag_min < pitch_min) pitch_lag_min = pitch_min;
  ------------------
  |  Branch (534:11): [True: 46.8k, False: 175k]
  ------------------
  535|       |
  536|   222k|      pitch_lag_max = pitch_lag_min + 15;
  537|   222k|      if (pitch_lag_max > pitch_max) {
  ------------------
  |  Branch (537:11): [True: 30.4k, False: 192k]
  ------------------
  538|  30.4k|        pitch_lag_max = pitch_max;
  539|  30.4k|        pitch_lag_min = pitch_lag_max - 15;
  540|  30.4k|      }
  541|   274k|    } else {
  542|   274k|      pitch_lag = pitch_lag_min + index / 4;
  543|   274k|      pitch_lag_frac = index - (pitch_lag - pitch_lag_min) * 4;
  544|   274k|    }
  545|       |
  546|   496k|    if (usac_data->ec_flag) {
  ------------------
  |  Branch (546:9): [True: 0, False: 496k]
  ------------------
  547|      0|      if (bfi) {
  ------------------
  |  Branch (547:11): [True: 0, False: 0]
  ------------------
  548|      0|        if (usac_data->pitch_lag_old >= pitch_max_val) {
  ------------------
  |  Branch (548:13): [True: 0, False: 0]
  ------------------
  549|      0|          usac_data->pitch_lag_old = (pitch_max_val - 5);
  550|      0|        }
  551|      0|        pitch_lag = usac_data->pitch_lag_old;
  552|      0|        pitch_lag_frac = usac_data->pitch_lag_frac_old;
  553|      0|      }
  554|      0|    }
  555|   496k|    ixheaacd_cb_exc_calc(&xcitation_curr[subfr_idx], pitch_lag, pitch_lag_frac);
  556|       |
  557|   496k|    mean_ener_code =
  558|   496k|        (((FLOAT32)pstr_td_frame_data->mean_energy[k]) * 12.0f) + 18.0f;
  559|       |
  560|   496k|    if (pstr_td_frame_data->ltp_filtering_flag[k * 4 + subfr_nb] == 0) {
  ------------------
  |  Branch (560:9): [True: 330k, False: 166k]
  ------------------
  561|  21.4M|      for (i = 0; i < LEN_SUBFR; i++)
  ------------------
  |  |  118|  21.4M|#define LEN_SUBFR 64
  ------------------
  |  Branch (561:19): [True: 21.1M, False: 330k]
  ------------------
  562|  21.1M|        code[i] = (FLOAT32)(0.18 * xcitation_curr[i - 1 + subfr_idx] +
  563|  21.1M|                            0.64 * xcitation_curr[i + subfr_idx] +
  564|  21.1M|                            0.18 * xcitation_curr[i + 1 + subfr_idx]);
  565|       |
  566|   330k|      ixheaacd_mem_cpy(code, &xcitation_curr[subfr_idx], LEN_SUBFR);
  ------------------
  |  |  118|   330k|#define LEN_SUBFR 64
  ------------------
  567|   330k|    }
  568|   496k|    if (usac_data->frame_ok == 1) {
  ------------------
  |  Branch (568:9): [True: 496k, False: 0]
  ------------------
  569|   496k|      ixheaacd_acelp_decode_pulses_per_track(
  570|   496k|          &(pstr_td_frame_data->icb_index[k * 4 + subfr_nb][0]), num_codebits_table[core_mode],
  571|   496k|          code);
  572|   496k|    } else {
  573|      0|      if (usac_data->ec_flag) {
  ------------------
  |  Branch (573:11): [True: 0, False: 0]
  ------------------
  574|      0|        WORD32 idx;
  575|      0|        if (bfi) {
  ------------------
  |  Branch (575:13): [True: 0, False: 0]
  ------------------
  576|      0|          for (idx = 0; idx < LEN_SUBFR; idx++) {
  ------------------
  |  |  118|      0|#define LEN_SUBFR 64
  ------------------
  |  Branch (576:25): [True: 0, False: 0]
  ------------------
  577|      0|            usac_data->seed_ace = ((((WORD32)usac_data->seed_ace * 31821) >> 1) + 13849);
  578|      0|            code_t[idx] = (WORD16)((usac_data->seed_ace) >> 4);
  579|      0|            code[idx] = ((FLOAT32)code_t[idx] / 512);
  580|      0|          }
  581|      0|        }
  582|      0|      }
  583|      0|    }
  584|       |
  585|   496k|    tmp = 0.0;
  586|   496k|    ixheaacd_preemphsis_tool_float(code, TILT_CODE, LEN_SUBFR, tmp);
  ------------------
  |  |   66|   496k|#define TILT_CODE 0.3f
  ------------------
                  ixheaacd_preemphsis_tool_float(code, TILT_CODE, LEN_SUBFR, tmp);
  ------------------
  |  |  118|   496k|#define LEN_SUBFR 64
  ------------------
  587|   496k|    i = pitch_lag;
  588|   496k|    if (pitch_lag_frac > 2) i++;
  ------------------
  |  Branch (588:9): [True: 61.5k, False: 434k]
  ------------------
  589|   496k|    if (i >= 0) ixheaacd_acelp_pitch_sharpening(code, i);
  ------------------
  |  Branch (589:9): [True: 496k, False: 0]
  ------------------
  590|       |
  591|   496k|    index = pstr_td_frame_data->gains[k * 4 + subfr_nb];
  592|   496k|    if (usac_data->ec_flag) {
  ------------------
  |  Branch (592:9): [True: 0, False: 496k]
  ------------------
  593|      0|      ixheaacd_acelp_decode_gains_with_ec(index, code, &pitch_gain, &gain_code, mean_ener_code,
  594|      0|                                          &innov_energy, &usac_data->past_pitch_gain,
  595|      0|                                          &usac_data->past_gain_code, bfi);
  596|   496k|    } else {
  597|   496k|      ixheaacd_acelp_decode_gains(index, code, &pitch_gain, &gain_code, mean_ener_code,
  598|   496k|                                  &innov_energy);
  599|   496k|    }
  600|       |
  601|   496k|    pitch_energy = 0.0;
  602|  32.2M|    for (i = 0; i < LEN_SUBFR; i++)
  ------------------
  |  |  118|  32.2M|#define LEN_SUBFR 64
  ------------------
  |  Branch (602:17): [True: 31.7M, False: 496k]
  ------------------
  603|  31.7M|      pitch_energy +=
  604|  31.7M|          xcitation_curr[i + subfr_idx] * xcitation_curr[i + subfr_idx];
  605|       |
  606|   496k|    pitch_energy *= (pitch_gain * pitch_gain);
  607|       |
  608|   496k|    innov_energy *= gain_code * gain_code;
  609|       |
  610|   496k|    r_v = (FLOAT32)((pitch_energy - innov_energy) /
  611|   496k|                    (pitch_energy + innov_energy));
  612|       |
  613|  32.2M|    for (i = 0; i < LEN_SUBFR; i++)
  ------------------
  |  |  118|  32.2M|#define LEN_SUBFR 64
  ------------------
  |  Branch (613:17): [True: 31.7M, False: 496k]
  ------------------
  614|  31.7M|      post_process_exc[i] = pitch_gain * xcitation_curr[i + subfr_idx];
  615|       |
  616|  32.2M|    for (i = 0; i < LEN_SUBFR; i++)
  ------------------
  |  |  118|  32.2M|#define LEN_SUBFR 64
  ------------------
  |  Branch (616:17): [True: 31.7M, False: 496k]
  ------------------
  617|  31.7M|      xcitation_curr[i + subfr_idx] =
  618|  31.7M|          pitch_gain * xcitation_curr[i + subfr_idx] + gain_code * code[i];
  619|       |
  620|   496k|    i = pitch_lag;
  621|   496k|    if (pitch_lag_frac > 2) i++;
  ------------------
  |  Branch (621:9): [True: 61.5k, False: 434k]
  ------------------
  622|       |
  623|   496k|    if (i > pitch_max) i = pitch_max;
  ------------------
  |  Branch (623:9): [True: 26.4k, False: 470k]
  ------------------
  624|       |
  625|   496k|    *ptr_pitch++ = i;
  626|   496k|    *ptr_pitch_gain++ = pitch_gain;
  627|       |
  628|   496k|    voicing_factor = (FLOAT32)(0.5 * (1.0 - r_v));
  629|   496k|    gain_smooth_factor = stability_factor * voicing_factor;
  630|   496k|    gain_code0 = gain_code;
  631|   496k|    if (gain_code0 < st->gain_threshold) {
  ------------------
  |  Branch (631:9): [True: 253k, False: 242k]
  ------------------
  632|   253k|      gain_code0 = (FLOAT32)(gain_code0 * 1.19);
  633|   253k|      if (gain_code0 > st->gain_threshold) gain_code0 = st->gain_threshold;
  ------------------
  |  Branch (633:11): [True: 27.2k, False: 226k]
  ------------------
  634|   253k|    } else {
  635|   242k|      gain_code0 = (FLOAT32)(gain_code0 / 1.19);
  636|   242k|      if (gain_code0 < st->gain_threshold) gain_code0 = st->gain_threshold;
  ------------------
  |  Branch (636:11): [True: 25.3k, False: 217k]
  ------------------
  637|   242k|    }
  638|   496k|    st->gain_threshold = gain_code0;
  639|   496k|    gain_smooth = (FLOAT32)((gain_smooth_factor * gain_code0) +
  640|   496k|                            ((1.0 - gain_smooth_factor) * gain_code));
  641|  32.2M|    for (i = 0; i < LEN_SUBFR; i++) code[i] *= gain_smooth;
  ------------------
  |  |  118|  32.2M|#define LEN_SUBFR 64
  ------------------
  |  Branch (641:17): [True: 31.7M, False: 496k]
  ------------------
  642|       |
  643|   496k|    cpe = (FLOAT32)(0.125 * (1.0 + r_v));
  644|       |
  645|   496k|    post_process_exc[0] += code[0] - (cpe * code[1]);
  646|       |
  647|  31.2M|    for (i = 1; i < LEN_SUBFR - 1; i++)
  ------------------
  |  |  118|  31.2M|#define LEN_SUBFR 64
  ------------------
  |  Branch (647:17): [True: 30.7M, False: 496k]
  ------------------
  648|  30.7M|      post_process_exc[i] += code[i] - (cpe * (code[i - 1] + code[i + 1]));
  649|       |
  650|   496k|    post_process_exc[LEN_SUBFR - 1] +=
  ------------------
  |  |  118|   496k|#define LEN_SUBFR 64
  ------------------
  651|   496k|        code[LEN_SUBFR - 1] - (cpe * code[LEN_SUBFR - 2]);
  ------------------
  |  |  118|   496k|#define LEN_SUBFR 64
  ------------------
                      code[LEN_SUBFR - 1] - (cpe * code[LEN_SUBFR - 2]);
  ------------------
  |  |  118|   496k|#define LEN_SUBFR 64
  ------------------
  652|       |
  653|   496k|    ixheaacd_synthesis_tool_float(ptr_lp_filt_coeff, post_process_exc,
  654|   496k|                                  &synth_signal[subfr_idx], LEN_SUBFR,
  ------------------
  |  |  118|   496k|#define LEN_SUBFR 64
  ------------------
  655|   496k|                                  synth_temp);
  656|   496k|    memcpy(synth_temp, &synth_signal[subfr_idx + LEN_SUBFR - ORDER],
  ------------------
  |  |  118|   496k|#define LEN_SUBFR 64
  ------------------
                  memcpy(synth_temp, &synth_signal[subfr_idx + LEN_SUBFR - ORDER],
  ------------------
  |  |   30|   496k|#define ORDER 16
  ------------------
  657|   496k|           ORDER * sizeof(FLOAT32));
  ------------------
  |  |   30|   496k|#define ORDER 16
  ------------------
  658|       |
  659|   496k|    ptr_lp_filt_coeff += (ORDER + 1);
  ------------------
  |  |   30|   496k|#define ORDER 16
  ------------------
  660|   496k|    subfr_nb++;
  661|   496k|  }
  662|       |
  663|   137k|  ixheaacd_deemphsis_tool(synth_signal, len_subfr, synth_signal[-1]);
  664|       |
  665|   137k|  memset(synth_temp + 16, 0, 128 * sizeof(FLOAT32));
  666|   137k|  ixheaacd_synthesis_tool_float1(ptr_lp_filt_coeff, synth_temp + 16, 128);
  667|       |
  668|   137k|  ptr_lp_filt_coeff -= (2 * (ORDER + 1));
  ------------------
  |  |   30|   137k|#define ORDER 16
  ------------------
  669|   137k|  memcpy(st->lp_flt_coeff_a_prev, ptr_lp_filt_coeff,
  670|   137k|         (2 * (ORDER + 1)) * sizeof(FLOAT32));
  ------------------
  |  |   30|   137k|#define ORDER 16
  ------------------
  671|       |
  672|   137k|  memcpy(st->exc_prev, synth_signal + len_subfr - (1 + fac_length),
  673|   137k|         (1 + fac_length) * sizeof(FLOAT32));
  674|       |
  675|   137k|  memcpy(st->exc_prev + 1 + fac_length, synth_temp + 16,
  676|   137k|         fac_length * sizeof(FLOAT32));
  677|   137k|  ixheaacd_deemphsis_tool(st->exc_prev + 1 + fac_length, fac_length,
  678|   137k|                          synth_signal[len_subfr - 1]);
  679|       |
  680|   137k|  if (usac_data->ec_flag) {
  ------------------
  |  Branch (680:7): [True: 0, False: 137k]
  ------------------
  681|      0|    usac_data->pitch_lag_old = pitch_lag;
  682|      0|    usac_data->pitch_lag_frac_old = pitch_lag_frac;
  683|      0|  }
  684|   137k|  return;
  685|   137k|}
ixheaacd_acelp_decode.c:ixheaacd_d_acelp_decode_1p_n1:
  210|   177k|                                          WORD32 pos[]) {
  211|   177k|  WORD32 i, pos1, mask;
  212|   177k|  mask = ((1 << N) - 1);
  213|       |
  214|   177k|  pos1 = ((index & mask) + ixheaacd_drc_offset);
  215|   177k|  i = ((index >> N) & 1);
  216|   177k|  if (i == 1) {
  ------------------
  |  Branch (216:7): [True: 76.9k, False: 100k]
  ------------------
  217|  76.9k|    pos1 += 16;
  218|  76.9k|  }
  219|   177k|  pos[0] = pos1;
  220|   177k|  return;
  221|   177k|}
ixheaacd_acelp_decode.c:ixheaacd_d_acelp_add_pulse:
  195|   177k|                                       WORD32 track, FLOAT32 code[]) {
  196|   177k|  WORD32 i, k;
  197|   355k|  for (k = 0; k < nb_pulse; k++) {
  ------------------
  |  Branch (197:15): [True: 177k, False: 177k]
  ------------------
  198|   177k|    i = ((pos[k] & (16 - 1)) << 2) + track;
  199|   177k|    if ((pos[k] & 16) == 0) {
  ------------------
  |  Branch (199:9): [True: 100k, False: 76.9k]
  ------------------
  200|   100k|      code[i] = (WORD16)(code[i] + 1.0f);
  201|   100k|    } else {
  202|  76.9k|      code[i] = (WORD16)(code[i] - 1.0f);
  203|  76.9k|    }
  204|   177k|  }
  205|   177k|  return;
  206|   177k|}
ixheaacd_acelp_decode.c:ixheaacd_acelp_decode_1sp_per_track:
   71|  1.24M|                                                FLOAT32 code_vec[]) {
   72|  1.24M|  WORD32 sign_index, mask, m;
   73|  1.24M|  WORD32 sp_pos;
   74|  1.24M|  mask = ((1 << M) - 1);
   75|       |
   76|  1.24M|  sp_pos = (idx_1p & mask) + ixheaacd_drc_offset;
   77|  1.24M|  sign_index = ((idx_1p >> M) & 1);
   78|       |
   79|  1.24M|  m = (sp_pos << 2) + track;
   80|  1.24M|  if (sign_index == 1)
  ------------------
  |  Branch (80:7): [True: 391k, False: 849k]
  ------------------
   81|   391k|    code_vec[m] = (code_vec[m] - 1.0f);
   82|   849k|  else
   83|   849k|    code_vec[m] = (code_vec[m] + 1.0f);
   84|       |
   85|  1.24M|  return;
   86|  1.24M|}
ixheaacd_acelp_decode.c:ixheaacd_acelp_decode_2sp_per_track:
   91|  1.10M|                                                FLOAT32 code_vec[]) {
   92|  1.10M|  WORD32 sign_index;
   93|  1.10M|  WORD32 mask, m0, m1;
   94|  1.10M|  WORD32 sp_pos[2];
   95|  1.10M|  mask = ((1 << M) - 1);
   96|       |
   97|  1.10M|  sp_pos[0] = (((idx_2p >> M) & mask) + ixheaacd_drc_offset);
   98|  1.10M|  sp_pos[1] = ((idx_2p & mask) + ixheaacd_drc_offset);
   99|       |
  100|  1.10M|  sign_index = (idx_2p >> 2 * M) & 1;
  101|       |
  102|  1.10M|  m0 = (sp_pos[0] << 2) + track;
  103|  1.10M|  m1 = (sp_pos[1] << 2) + track;
  104|       |
  105|  1.10M|  if ((sp_pos[1] - sp_pos[0]) < 0) {
  ------------------
  |  Branch (105:7): [True: 485k, False: 617k]
  ------------------
  106|   485k|    if (sign_index == 1) {
  ------------------
  |  Branch (106:9): [True: 203k, False: 282k]
  ------------------
  107|   203k|      code_vec[m0] = (code_vec[m0] - 1.0f);
  108|   203k|      code_vec[m1] = (code_vec[m1] + 1.0f);
  109|   282k|    } else {
  110|   282k|      code_vec[m0] = (code_vec[m0] + 1.0f);
  111|   282k|      code_vec[m1] = (code_vec[m1] - 1.0f);
  112|   282k|    }
  113|   617k|  } else {
  114|   617k|    if (sign_index == 1) {
  ------------------
  |  Branch (114:9): [True: 252k, False: 365k]
  ------------------
  115|   252k|      code_vec[m0] = (code_vec[m0] - 1.0f);
  116|   252k|      code_vec[m1] = (code_vec[m1] - 1.0f);
  117|   365k|    } else {
  118|   365k|      code_vec[m0] = (code_vec[m0] + 1.0f);
  119|   365k|      code_vec[m1] = (code_vec[m1] + 1.0f);
  120|   365k|    }
  121|   617k|  }
  122|  1.10M|  return;
  123|  1.10M|}
ixheaacd_acelp_decode.c:ixheaacd_acelp_decode_3sp_per_track:
  128|   366k|                                                FLOAT32 code_vec[]) {
  129|   366k|  WORD32 j, mask, idx_2p, idx_1p;
  130|       |
  131|   366k|  mask = ((1 << (2 * M - 1)) - 1);
  132|   366k|  idx_2p = idx_3p & mask;
  133|   366k|  j = ixheaacd_drc_offset;
  134|   366k|  if (((idx_3p >> ((2 * M) - 1)) & 1) == 1) {
  ------------------
  |  Branch (134:7): [True: 148k, False: 217k]
  ------------------
  135|   148k|    j += (1 << (M - 1));
  136|   148k|  }
  137|   366k|  ixheaacd_acelp_decode_2sp_per_track(idx_2p, M - 1, j, track, code_vec);
  138|   366k|  mask = ((1 << (M + 1)) - 1);
  139|   366k|  idx_1p = (idx_3p >> 2 * M) & mask;
  140|   366k|  ixheaacd_acelp_decode_1sp_per_track(idx_1p, M, ixheaacd_drc_offset, track,
  141|   366k|                                      code_vec);
  142|   366k|  return;
  143|   366k|}
ixheaacd_acelp_decode.c:ixheaacd_acelp_decode_4sp_per_track:
  163|   264k|                                                FLOAT32 code_vec[]) {
  164|   264k|  WORD32 idx_1p, idx_2p, idx_3p;
  165|       |
  166|   264k|  switch ((idx_4p >> 14) & 3) {
  ------------------
  |  Branch (166:11): [True: 264k, False: 0]
  ------------------
  167|  79.2k|    case 0:
  ------------------
  |  Branch (167:5): [True: 79.2k, False: 185k]
  ------------------
  168|  79.2k|      if (((idx_4p >> 13) & 1) == 0)
  ------------------
  |  Branch (168:11): [True: 53.5k, False: 25.7k]
  ------------------
  169|  53.5k|        ixheaacd_d_acelp_decode_4sp_per_track_section(idx_4p, 0, track,
  170|  53.5k|                                                      code_vec);
  171|  25.7k|      else
  172|  25.7k|        ixheaacd_d_acelp_decode_4sp_per_track_section(idx_4p, 8, track,
  173|  25.7k|                                                      code_vec);
  174|  79.2k|      break;
  175|  77.9k|    case 1:
  ------------------
  |  Branch (175:5): [True: 77.9k, False: 187k]
  ------------------
  176|  77.9k|      idx_1p = idx_4p >> 10;
  177|  77.9k|      ixheaacd_acelp_decode_1sp_per_track(idx_1p, 3, 0, track, code_vec);
  178|  77.9k|      ixheaacd_acelp_decode_3sp_per_track(idx_4p, 3, 8, track, code_vec);
  179|  77.9k|      break;
  180|  76.3k|    case 2:
  ------------------
  |  Branch (180:5): [True: 76.3k, False: 188k]
  ------------------
  181|  76.3k|      idx_2p = idx_4p >> 7;
  182|  76.3k|      ixheaacd_acelp_decode_2sp_per_track(idx_2p, 3, 0, track, code_vec);
  183|  76.3k|      ixheaacd_acelp_decode_2sp_per_track(idx_4p, 3, 8, track, code_vec);
  184|  76.3k|      break;
  185|  31.5k|    case 3:
  ------------------
  |  Branch (185:5): [True: 31.5k, False: 233k]
  ------------------
  186|  31.5k|      idx_3p = idx_4p >> 4;
  187|  31.5k|      ixheaacd_acelp_decode_3sp_per_track(idx_3p, 3, 0, track, code_vec);
  188|  31.5k|      ixheaacd_acelp_decode_1sp_per_track(idx_4p, 3, 8, track, code_vec);
  189|  31.5k|      break;
  190|   264k|  }
  191|   264k|  return;
  192|   264k|}
ixheaacd_acelp_decode.c:ixheaacd_d_acelp_decode_4sp_per_track_section:
  147|  79.2k|    FLOAT32 code_vec[]) {
  148|  79.2k|  WORD32 j, idx_2p;
  149|       |
  150|  79.2k|  idx_2p = index & 31;
  151|  79.2k|  j = ixheaacd_drc_offset;
  152|  79.2k|  if (((index >> 5) & 1) == 1) {
  ------------------
  |  Branch (152:7): [True: 26.7k, False: 52.4k]
  ------------------
  153|  26.7k|    j += 4;
  154|  26.7k|  }
  155|  79.2k|  ixheaacd_acelp_decode_2sp_per_track(idx_2p, 2, j, track, code_vec);
  156|  79.2k|  idx_2p = (index >> 6) & 127;
  157|  79.2k|  ixheaacd_acelp_decode_2sp_per_track(idx_2p, 3, ixheaacd_drc_offset, track,
  158|  79.2k|                                      code_vec);
  159|  79.2k|  return;
  160|  79.2k|}
ixheaacd_acelp_decode.c:ixheaacd_cb_exc_calc:
  370|   496k|                                 WORD32 frac) {
  371|   496k|  WORD32 i, j;
  372|   496k|  FLOAT32 s, *x0, *x1, *x2;
  373|   496k|  const FLOAT32 *c1, *c2;
  374|       |
  375|   496k|  x0 = &xcitation_curr[-pitch_lag];
  376|   496k|  frac = -frac;
  377|   496k|  if (frac < 0) {
  ------------------
  |  Branch (377:7): [True: 271k, False: 224k]
  ------------------
  378|   271k|    frac += UP_SAMP;
  ------------------
  |  |   50|   271k|#define UP_SAMP 4
  ------------------
  379|   271k|    x0--;
  380|   271k|  }
  381|  32.7M|  for (j = 0; j < LEN_SUBFR + 1; j++) {
  ------------------
  |  |  118|  32.7M|#define LEN_SUBFR 64
  ------------------
  |  Branch (381:15): [True: 32.2M, False: 496k]
  ------------------
  382|  32.2M|    x1 = x0++;
  383|  32.2M|    x2 = x1 + 1;
  384|  32.2M|    c1 = &ixheaacd_interpol_filt[frac];
  385|  32.2M|    c2 = &ixheaacd_interpol_filt[UP_SAMP - frac];
  ------------------
  |  |   50|  32.2M|#define UP_SAMP 4
  ------------------
  386|  32.2M|    s = 0.0;
  387|   548M|    for (i = 0; i < INTER_LP_FIL_ORDER; i++, c1 += UP_SAMP, c2 += UP_SAMP) {
  ------------------
  |  |   51|   548M|#define INTER_LP_FIL_ORDER 16
  ------------------
                  for (i = 0; i < INTER_LP_FIL_ORDER; i++, c1 += UP_SAMP, c2 += UP_SAMP) {
  ------------------
  |  |   50|   516M|#define UP_SAMP 4
  ------------------
                  for (i = 0; i < INTER_LP_FIL_ORDER; i++, c1 += UP_SAMP, c2 += UP_SAMP) {
  ------------------
  |  |   50|   516M|#define UP_SAMP 4
  ------------------
  |  Branch (387:17): [True: 516M, False: 32.2M]
  ------------------
  388|   516M|      s += (*x1--) * (*c1) + (*x2++) * (*c2);
  389|   516M|    }
  390|  32.2M|    xcitation_curr[j] = s;
  391|  32.2M|  }
  392|   496k|  return;
  393|   496k|}
ixheaacd_acelp_decode.c:ixheaacd_acelp_decode_gains:
  294|   496k|                                        FLOAT32 *energy) {
  295|   496k|  WORD32 i;
  296|   496k|  FLOAT32 avg_innov_energy, est_gain;
  297|   496k|  const FLOAT32 *gain_table = ixheaacd_int_leave_gain_table;
  298|       |
  299|   496k|  avg_innov_energy = 0.01f;
  300|  32.2M|  for (i = 0; i < LEN_SUBFR; i++) {
  ------------------
  |  |  118|  32.2M|#define LEN_SUBFR 64
  ------------------
  |  Branch (300:15): [True: 31.7M, False: 496k]
  ------------------
  301|  31.7M|    avg_innov_energy += code_vec[i] * code_vec[i];
  302|  31.7M|  }
  303|   496k|  *energy = avg_innov_energy;
  304|       |
  305|   496k|  avg_innov_energy =
  306|   496k|      (FLOAT32)(10.0 * log10(avg_innov_energy / (FLOAT32)LEN_SUBFR));
  ------------------
  |  |  118|   496k|#define LEN_SUBFR 64
  ------------------
  307|       |
  308|   496k|  est_gain = mean_exc_energy - avg_innov_energy;
  309|       |
  310|   496k|  est_gain = (FLOAT32)pow(10.0, 0.05 * est_gain);
  311|   496k|  *pitch_gain = gain_table[index * 2];
  312|       |
  313|   496k|  *codebook_gain = gain_table[index * 2 + 1] * est_gain;
  314|       |
  315|   496k|  return;
  316|   496k|}

ixheaacd_acelp_mdct:
  167|   318k|                         WORD32 *ptr_scratch) {
  168|   318k|  WORD32 *ptr_data_r = ptr_scratch;
  169|   318k|  WORD32 *ptr_data_i = ptr_scratch + 512;
  170|   318k|  const WORD32 *ptr_pre_post_twid;
  171|       |
  172|   318k|  switch (length) {
  173|    167|    case 1024:
  ------------------
  |  Branch (173:5): [True: 167, False: 318k]
  ------------------
  174|    167|      ptr_pre_post_twid = &ixheaacd_pre_post_twid_cos_sin_512[0][0];
  175|    167|      break;
  176|    139|    case 768:
  ------------------
  |  Branch (176:5): [True: 139, False: 318k]
  ------------------
  177|    139|      ptr_pre_post_twid = &ixheaacd_pre_post_twid_cos_sin_384[0][0];
  178|    139|      break;
  179|  18.5k|    case 512:
  ------------------
  |  Branch (179:5): [True: 18.5k, False: 300k]
  ------------------
  180|  18.5k|      ptr_pre_post_twid = &ixheaacd_pre_post_twid_cos_sin_256[0][0];
  181|  18.5k|      break;
  182|  12.3k|    case 384:
  ------------------
  |  Branch (182:5): [True: 12.3k, False: 306k]
  ------------------
  183|  12.3k|      ptr_pre_post_twid = &ixheaacd_pre_post_twid_cos_sin_192[0][0];
  184|  12.3k|      break;
  185|  50.0k|    case 256:
  ------------------
  |  Branch (185:5): [True: 50.0k, False: 268k]
  ------------------
  186|  50.0k|      ptr_pre_post_twid = &ixheaacd_pre_post_twid_cos_sin_128[0][0];
  187|  50.0k|      break;
  188|  24.4k|    case 192:
  ------------------
  |  Branch (188:5): [True: 24.4k, False: 294k]
  ------------------
  189|  24.4k|      ptr_pre_post_twid = &ixheaacd_pre_post_twid_cos_sin_96[0][0];
  190|  24.4k|      break;
  191|   158k|    case 128:
  ------------------
  |  Branch (191:5): [True: 158k, False: 160k]
  ------------------
  192|   158k|      ptr_pre_post_twid = &ixheaacd_pre_post_twid_cos_sin_64[0][0];
  193|   158k|      break;
  194|  46.8k|    case 96:
  ------------------
  |  Branch (194:5): [True: 46.8k, False: 272k]
  ------------------
  195|  46.8k|      ptr_pre_post_twid = &ixheaacd_pre_post_twid_cos_sin_48[0][0];
  196|  46.8k|      break;
  197|  7.51k|    case 64:
  ------------------
  |  Branch (197:5): [True: 7.51k, False: 311k]
  ------------------
  198|  7.51k|      ptr_pre_post_twid = &ixheaacd_pre_post_twid_cos_sin_32[0][0];
  199|  7.51k|      break;
  200|    659|    case 48:
  ------------------
  |  Branch (200:5): [True: 659, False: 318k]
  ------------------
  201|    659|      ptr_pre_post_twid = &ixheaacd_pre_post_twid_cos_sin_24[0][0];
  202|    659|      break;
  203|      0|    default:
  ------------------
  |  Branch (203:5): [True: 0, False: 318k]
  ------------------
  204|      0|      ptr_pre_post_twid = &ixheaacd_pre_post_twid_cos_sin_24[0][0];
  205|      0|      break;
  206|   318k|  }
  207|       |
  208|   318k|  ixheaacd_pre_twid(ptr_in, ptr_data_r, ptr_data_i, length / 2,
  209|   318k|                    ptr_pre_post_twid);
  210|       |
  211|   318k|  ixheaacd_complex_fft(ptr_data_r, ptr_data_i, length / 2, -1, preshift);
  212|   318k|  *preshift += 1;
  213|       |
  214|   318k|  ixheaacd_post_twid(ptr_data_r, ptr_data_i, ptr_out, length / 2,
  215|   318k|                     ptr_pre_post_twid);
  216|   318k|  *preshift += 1;
  217|   318k|  return;
  218|   318k|}
ixheaacd_acelp_mdct_main:
  221|   105k|                              WORD32 m, WORD32 *preshift) {
  222|   105k|  WORD32 i;
  223|   105k|  WORD32 *ptr_scratch = &usac_data->scratch_buffer[0];
  224|   105k|  WORD32 *output_buffer = &usac_data->x_ac_dec[0];
  225|       |
  226|   105k|  ixheaacd_acelp_mdct(in, output_buffer, preshift, l + m, ptr_scratch);
  227|       |
  228|  3.76M|  for (i = 0; i < m / 2; i++) {
  ------------------
  |  Branch (228:15): [True: 3.66M, False: 105k]
  ------------------
  229|  3.66M|    out[l + m / 2 - 1 - i] = -output_buffer[m / 2 + l / 2 + i];
  230|  3.66M|  }
  231|  12.4M|  for (i = 0; i < l / 2; i++) {
  ------------------
  |  Branch (231:15): [True: 12.3M, False: 105k]
  ------------------
  232|  12.3M|    out[i] = output_buffer[m + l / 2 + i];
  233|  12.3M|    out[l - 1 - i] = -output_buffer[m + l / 2 + i];
  234|  12.3M|  }
  235|  3.76M|  for (i = 0; i < m / 2; i++) {
  ------------------
  |  Branch (235:15): [True: 3.66M, False: 105k]
  ------------------
  236|  3.66M|    out[l + m / 2 + i] = -output_buffer[m / 2 + l / 2 - 1 - i];
  237|  3.66M|  }
  238|  12.4M|  for (i = 0; i < l / 2; i++) {
  ------------------
  |  Branch (238:15): [True: 12.3M, False: 105k]
  ------------------
  239|  12.3M|    out[l + m + i] = -output_buffer[l / 2 - 1 - i];
  240|  12.3M|    out[2 * l + m - 1 - i] = -output_buffer[l / 2 - 1 - i];
  241|  12.3M|  }
  242|   105k|  return;
  243|   105k|}
ixheaacd_acelp_mdct.c:ixheaacd_pre_twid:
  104|   318k|                              WORD32 nlength, const WORD32 *ptr_pre_cos_sin) {
  105|   318k|  WORD32 i;
  106|       |
  107|   318k|  const WORD32 *cos_ptr = &ptr_pre_cos_sin[0];
  108|   318k|  const WORD32 *sin_ptr = &ptr_pre_cos_sin[nlength];
  109|       |
  110|  7.47M|  for (i = 0; i < nlength; i += 4) {
  ------------------
  |  Branch (110:15): [True: 7.15M, False: 318k]
  ------------------
  111|  7.15M|    *r_ptr++ = ixheaacd_mul_sub64_sat_32(in[i], in[nlength + i], cos_ptr[i],
  112|  7.15M|                                         sin_ptr[i]);
  113|  7.15M|    *i_ptr++ = ixheaacd_mul_add64_sat_32(in[i], in[nlength + i], sin_ptr[i],
  114|  7.15M|                                         cos_ptr[i]);
  115|       |
  116|  7.15M|    *r_ptr++ = ixheaacd_mul_sub64_sat_32(in[i + 1], in[nlength + i + 1],
  117|  7.15M|                                         cos_ptr[i + 1], sin_ptr[i + 1]);
  118|  7.15M|    *i_ptr++ = ixheaacd_mul_add64_sat_32(in[i + 1], in[nlength + i + 1],
  119|  7.15M|                                         sin_ptr[i + 1], cos_ptr[i + 1]);
  120|       |
  121|  7.15M|    *r_ptr++ = ixheaacd_mul_sub64_sat_32(in[i + 2], in[nlength + i + 2],
  122|  7.15M|                                         cos_ptr[i + 2], sin_ptr[i + 2]);
  123|  7.15M|    *i_ptr++ = ixheaacd_mul_add64_sat_32(in[i + 2], in[nlength + i + 2],
  124|  7.15M|                                         sin_ptr[i + 2], cos_ptr[i + 2]);
  125|       |
  126|  7.15M|    *r_ptr++ = ixheaacd_mul_sub64_sat_32(in[i + 3], in[nlength + i + 3],
  127|  7.15M|                                         cos_ptr[i + 3], sin_ptr[i + 3]);
  128|  7.15M|    *i_ptr++ = ixheaacd_mul_add64_sat_32(in[i + 3], in[nlength + i + 3],
  129|  7.15M|                                         sin_ptr[i + 3], cos_ptr[i + 3]);
  130|  7.15M|  }
  131|   318k|}
ixheaacd_acelp_mdct.c:ixheaacd_mul_sub64_sat_32:
   66|  57.2M|                                                        WORD32 c, WORD32 d) {
   67|  57.2M|  WORD64 diff;
   68|  57.2M|  WORD64 temp_result1;
   69|  57.2M|  WORD64 temp_result2;
   70|       |
   71|  57.2M|  temp_result1 = (WORD64)a * (WORD64)c;
   72|  57.2M|  temp_result2 = (WORD64)b * (WORD64)d;
   73|       |
   74|  57.2M|  diff = (temp_result1 - temp_result2) >> 32;
   75|       |
   76|  57.2M|  if (diff >= 2147483647)
  ------------------
  |  Branch (76:7): [True: 0, False: 57.2M]
  ------------------
   77|      0|    diff = 2147483647;
   78|  57.2M|  else if (diff <= -2147483647 - 1)
  ------------------
  |  Branch (78:12): [True: 0, False: 57.2M]
  ------------------
   79|      0|    diff = -2147483647 - 1;
   80|       |
   81|  57.2M|  return ((WORD32)diff);
   82|  57.2M|}
ixheaacd_acelp_mdct.c:ixheaacd_mul_add64_sat_32:
   85|  57.2M|                                                        WORD32 c, WORD32 d) {
   86|  57.2M|  WORD64 sum;
   87|  57.2M|  WORD64 temp_result1;
   88|  57.2M|  WORD64 temp_result2;
   89|       |
   90|  57.2M|  temp_result1 = (WORD64)a * (WORD64)c;
   91|  57.2M|  temp_result2 = (WORD64)b * (WORD64)d;
   92|       |
   93|  57.2M|  sum = (temp_result1 + temp_result2) >> 32;
   94|       |
   95|  57.2M|  if (sum >= 2147483647)
  ------------------
  |  Branch (95:7): [True: 0, False: 57.2M]
  ------------------
   96|      0|    sum = 2147483647;
   97|  57.2M|  else if (sum <= -2147483647 - 1)
  ------------------
  |  Branch (97:12): [True: 0, False: 57.2M]
  ------------------
   98|      0|    sum = -2147483647 - 1;
   99|       |
  100|  57.2M|  return ((WORD32)sum);
  101|  57.2M|}
ixheaacd_acelp_mdct.c:ixheaacd_post_twid:
  134|   318k|                               WORD32 nlength, const WORD32 *ptr_post_cos_sin) {
  135|   318k|  WORD32 i;
  136|       |
  137|   318k|  const WORD32 *cos_ptr = &ptr_post_cos_sin[nlength * 2];
  138|   318k|  const WORD32 *sin_ptr = &ptr_post_cos_sin[nlength * 3];
  139|       |
  140|   318k|  WORD32 *out_ptr = &out[2 * nlength - 1];
  141|  7.47M|  for (i = 0; i < nlength; i += 4) {
  ------------------
  |  Branch (141:15): [True: 7.15M, False: 318k]
  ------------------
  142|  7.15M|    out[0] = ixheaacd_mul_sub64_sat_32(data_re[i], data_im[i], cos_ptr[i],
  143|  7.15M|                                       sin_ptr[i]);
  144|  7.15M|    out_ptr[0] = -ixheaacd_mul_add64_sat_32(data_re[i], data_im[i], sin_ptr[i],
  145|  7.15M|                                            cos_ptr[i]);
  146|       |
  147|  7.15M|    out[2] = ixheaacd_mul_sub64_sat_32(data_re[i + 1], data_im[i + 1],
  148|  7.15M|                                       cos_ptr[i + 1], sin_ptr[i + 1]);
  149|  7.15M|    out_ptr[-2] = -ixheaacd_mul_add64_sat_32(data_re[i + 1], data_im[i + 1],
  150|  7.15M|                                             sin_ptr[i + 1], cos_ptr[i + 1]);
  151|       |
  152|  7.15M|    out[4] = ixheaacd_mul_sub64_sat_32(data_re[i + 2], data_im[i + 2],
  153|  7.15M|                                       cos_ptr[i + 2], sin_ptr[i + 2]);
  154|  7.15M|    out_ptr[-4] = -ixheaacd_mul_add64_sat_32(data_re[i + 2], data_im[i + 2],
  155|  7.15M|                                             sin_ptr[i + 2], cos_ptr[i + 2]);
  156|       |
  157|  7.15M|    out[6] = ixheaacd_mul_sub64_sat_32(data_re[i + 3], data_im[i + 3],
  158|  7.15M|                                       cos_ptr[i + 3], sin_ptr[i + 3]);
  159|  7.15M|    out_ptr[-6] = -ixheaacd_mul_add64_sat_32(data_re[i + 3], data_im[i + 3],
  160|  7.15M|                                             sin_ptr[i + 3], cos_ptr[i + 3]);
  161|  7.15M|    out += 8;
  162|  7.15M|    out_ptr -= 8;
  163|  7.15M|  }
  164|   318k|}

ixheaacd_preemphsis_tool_float:
   50|   691k|                                    FLOAT32 mem) {
   51|   691k|  WORD32 i;
   52|  92.6M|  for (i = len - 1; i > 0; i--) {
  ------------------
  |  Branch (52:21): [True: 91.9M, False: 691k]
  ------------------
   53|  91.9M|    signal[i] = signal[i] - mu * signal[i - 1];
   54|  91.9M|  }
   55|   691k|  signal[0] -= mu * mem;
   56|   691k|  return;
   57|   691k|}
ixheaacd_deemphsis_tool:
   59|   274k|VOID ixheaacd_deemphsis_tool(FLOAT32 *signal, WORD32 len, FLOAT32 mem) {
   60|   274k|  WORD32 i;
   61|   274k|  signal[0] = signal[0] + PREEMPH_FILT_FAC * mem;
  ------------------
  |  |   61|   274k|#define PREEMPH_FILT_FAC 0.68f
  ------------------
   62|  47.6M|  for (i = 1; i < len; i++) {
  ------------------
  |  Branch (62:15): [True: 47.3M, False: 274k]
  ------------------
   63|  47.3M|    signal[i] = signal[i] + PREEMPH_FILT_FAC * signal[i - 1];
  ------------------
  |  |   61|  47.3M|#define PREEMPH_FILT_FAC 0.68f
  ------------------
   64|  47.3M|  }
   65|   274k|  return;
   66|   274k|}
ixheaacd_lpc_wt_synthesis_tool:
   68|  61.3k|VOID ixheaacd_lpc_wt_synthesis_tool(FLOAT32 a[], FLOAT32 x[], WORD32 l) {
   69|  61.3k|  FLOAT32 s;
   70|  61.3k|  WORD32 i, j;
   71|       |
   72|  7.22M|  for (i = 0; i < l; i++) {
  ------------------
  |  Branch (72:15): [True: 7.16M, False: 61.3k]
  ------------------
   73|  7.16M|    s = x[i];
   74|  35.8M|    for (j = 1; j <= ORDER; j += 4) {
  ------------------
  |  |   30|  35.8M|#define ORDER 16
  ------------------
  |  Branch (74:17): [True: 28.6M, False: 7.16M]
  ------------------
   75|  28.6M|      s -= (a[j] * ixheaacd_gamma_table[j]) * x[i - j];
   76|  28.6M|      s -= (a[j + 1] * ixheaacd_gamma_table[j + 1]) * x[i - (j + 1)];
   77|  28.6M|      s -= (a[j + 2] * ixheaacd_gamma_table[j + 2]) * x[i - (j + 2)];
   78|  28.6M|      s -= (a[j + 3] * ixheaacd_gamma_table[j + 3]) * x[i - (j + 3)];
   79|  28.6M|    }
   80|  7.16M|    x[i] = s;
   81|  7.16M|  }
   82|       |
   83|  61.3k|  return;
   84|  61.3k|}
ixheaacd_synthesis_tool_float:
   87|   552k|                                   WORD32 l, FLOAT32 mem[]) {
   88|   552k|  FLOAT32 buf[LEN_FRAME * 2];
   89|   552k|  FLOAT32 s;
   90|   552k|  FLOAT32 *yy;
   91|   552k|  WORD32 i, j;
   92|   552k|  memcpy(buf, mem, ORDER * sizeof(FLOAT32));
  ------------------
  |  |   30|   552k|#define ORDER 16
  ------------------
   93|   552k|  yy = &buf[ORDER];
  ------------------
  |  |   30|   552k|#define ORDER 16
  ------------------
   94|  45.3M|  for (i = 0; i < l; i++) {
  ------------------
  |  Branch (94:15): [True: 44.8M, False: 552k]
  ------------------
   95|  44.8M|    s = x[i];
   96|   224M|    for (j = 1; j <= ORDER; j += 4) {
  ------------------
  |  |   30|   224M|#define ORDER 16
  ------------------
  |  Branch (96:17): [True: 179M, False: 44.8M]
  ------------------
   97|   179M|      s -= a[j] * yy[i - j];
   98|   179M|      s -= a[j + 1] * yy[i - (j + 1)];
   99|   179M|      s -= a[j + 2] * yy[i - (j + 2)];
  100|   179M|      s -= a[j + 3] * yy[i - (j + 3)];
  101|   179M|    }
  102|  44.8M|    yy[i] = s;
  103|  44.8M|    y[i] = s;
  104|  44.8M|  }
  105|       |
  106|   552k|  return;
  107|   552k|}
ixheaacd_synthesis_tool_float1:
  109|   153k|VOID ixheaacd_synthesis_tool_float1(FLOAT32 a[], FLOAT32 x[], WORD32 l) {
  110|   153k|  FLOAT32 s;
  111|   153k|  WORD32 i, j;
  112|  19.4M|  for (i = 0; i < l; i++) {
  ------------------
  |  Branch (112:15): [True: 19.2M, False: 153k]
  ------------------
  113|  19.2M|    s = x[i];
  114|  96.3M|    for (j = 1; j <= ORDER; j += 4) {
  ------------------
  |  |   30|  96.3M|#define ORDER 16
  ------------------
  |  Branch (114:17): [True: 77.1M, False: 19.2M]
  ------------------
  115|  77.1M|      s -= a[j] * x[i - j];
  116|  77.1M|      s -= a[j + 1] * x[i - (j + 1)];
  117|  77.1M|      s -= a[j + 2] * x[i - (j + 2)];
  118|  77.1M|      s -= a[j + 3] * x[i - (j + 3)];
  119|  77.1M|    }
  120|  19.2M|    x[i] = s;
  121|  19.2M|  }
  122|       |
  123|   153k|  return;
  124|   153k|}
ixheaacd_residual_tool_float:
  143|   254k|                                  WORD32 loop_count) {
  144|   254k|  FLOAT32 s;
  145|   254k|  WORD32 i, j;
  146|   603k|  for (j = 0; j < loop_count; j++) {
  ------------------
  |  Branch (146:15): [True: 349k, False: 254k]
  ------------------
  147|  46.7M|    for (i = 0; i < l; i++) {
  ------------------
  |  Branch (147:17): [True: 46.3M, False: 349k]
  ------------------
  148|  46.3M|      s = x[i];
  149|  46.3M|      s += a[1] * x[i - 1];
  150|  46.3M|      s += a[2] * x[i - 2];
  151|  46.3M|      s += a[3] * x[i - 3];
  152|  46.3M|      s += a[4] * x[i - 4];
  153|  46.3M|      s += a[5] * x[i - 5];
  154|  46.3M|      s += a[6] * x[i - 6];
  155|  46.3M|      s += a[7] * x[i - 7];
  156|  46.3M|      s += a[8] * x[i - 8];
  157|  46.3M|      s += a[9] * x[i - 9];
  158|  46.3M|      s += a[10] * x[i - 10];
  159|  46.3M|      s += a[11] * x[i - 11];
  160|  46.3M|      s += a[12] * x[i - 12];
  161|  46.3M|      s += a[13] * x[i - 13];
  162|  46.3M|      s += a[14] * x[i - 14];
  163|  46.3M|      s += a[15] * x[i - 15];
  164|  46.3M|      s += a[16] * x[i - 16];
  165|  46.3M|      y[i] = s;
  166|  46.3M|    }
  167|   349k|    a += 17;
  168|   349k|    x += l;
  169|   349k|    y += l;
  170|   349k|  }
  171|   254k|  return;
  172|   254k|}
ixheaacd_residual_tool_float1:
  175|  27.6k|                                   WORD32 loop_count) {
  176|  27.6k|  FLOAT32 s;
  177|  27.6k|  WORD32 i, j;
  178|   227k|  for (j = 0; j < loop_count; j++) {
  ------------------
  |  Branch (178:15): [True: 200k, False: 27.6k]
  ------------------
  179|  13.0M|    for (i = 0; i < l; i++) {
  ------------------
  |  Branch (179:17): [True: 12.8M, False: 200k]
  ------------------
  180|  12.8M|      s = x[i];
  181|  12.8M|      s += a[1] * x[i - 1];
  182|  12.8M|      s += a[2] * x[i - 2];
  183|  12.8M|      s += a[3] * x[i - 3];
  184|  12.8M|      s += a[4] * x[i - 4];
  185|  12.8M|      s += a[5] * x[i - 5];
  186|  12.8M|      s += a[6] * x[i - 6];
  187|  12.8M|      s += a[7] * x[i - 7];
  188|  12.8M|      s += a[8] * x[i - 8];
  189|  12.8M|      s += a[9] * x[i - 9];
  190|  12.8M|      s += a[10] * x[i - 10];
  191|  12.8M|      s += a[11] * x[i - 11];
  192|  12.8M|      s += a[12] * x[i - 12];
  193|  12.8M|      s += a[13] * x[i - 13];
  194|  12.8M|      s += a[14] * x[i - 14];
  195|  12.8M|      s += a[15] * x[i - 15];
  196|  12.8M|      s += a[16] * x[i - 16];
  197|  12.8M|      y[i] = s;
  198|  12.8M|    }
  199|   200k|    x += l;
  200|   200k|    y += l;
  201|   200k|  }
  202|  27.6k|  return;
  203|  27.6k|}

ixheaacd_adts_crc_open:
   75|  1.35M|VOID ixheaacd_adts_crc_open(ia_adts_crc_info_struct *ptr_adts_crc_info) {
   76|  1.35M|  WORD32 i, j;
   77|  1.35M|  UWORD16 val;
   78|       |
   79|  1.35M|  ptr_adts_crc_info->no_reg = 0;
   80|  1.35M|  ptr_adts_crc_info->crc_active = 0;
   81|       |
   82|   347M|  for (i = 0; i <= 255; ++i) {
  ------------------
  |  Branch (82:15): [True: 346M, False: 1.35M]
  ------------------
   83|  3.11G|    for (val = i << 8, j = 8; --j >= 0;) {
  ------------------
  |  Branch (83:31): [True: 2.76G, False: 346M]
  ------------------
   84|  2.76G|      val = (val & 0x8000) ? (val << 1) ^ 0x8005 : val << 1;
  ------------------
  |  Branch (84:13): [True: 1.38G, False: 1.38G]
  ------------------
   85|  2.76G|    }
   86|       |
   87|   346M|    ptr_adts_crc_info->crc_lookup[i] = val;
   88|   346M|  }
   89|  1.35M|}
ixheaacd_copy_bit_buf_state:
   93|   100k|    ia_crc_bit_buf_struct_handle it_crc_bit_buff_dst) {
   94|   100k|  it_crc_bit_buff_dst->ptr_bit_buf_base = it_bit_buff_src->ptr_bit_buf_base;
   95|   100k|  it_crc_bit_buff_dst->ptr_bit_buf_end = it_bit_buff_src->ptr_bit_buf_end;
   96|   100k|  it_crc_bit_buff_dst->ptr_read_next = it_bit_buff_src->ptr_read_next;
   97|   100k|  it_crc_bit_buff_dst->bit_pos = it_bit_buff_src->bit_pos;
   98|   100k|  it_crc_bit_buff_dst->cnt_bits = it_bit_buff_src->cnt_bits;
   99|   100k|  it_crc_bit_buff_dst->size = it_bit_buff_src->size;
  100|   100k|}
ixheaacd_adts_crc_start_reg:
  104|   100k|                                   WORD32 no_bits) {
  105|   100k|  UWORD32 no_bytes;
  106|       |
  107|   100k|  ptr_adts_crc_info->str_crc_reg_data[ptr_adts_crc_info->no_reg].bit_cnt = 0;
  108|   100k|  ptr_adts_crc_info->str_crc_reg_data[ptr_adts_crc_info->no_reg].max_bits =
  109|   100k|      no_bits;
  110|       |
  111|   100k|  if (no_bits < 0) {
  ------------------
  |  Branch (111:7): [True: 0, False: 100k]
  ------------------
  112|      0|    no_bits = -no_bits;
  113|      0|  }
  114|       |
  115|   100k|  if (no_bits == 0) {
  ------------------
  |  Branch (115:7): [True: 45, False: 100k]
  ------------------
  116|     45|    no_bits = 16 << 3;
  117|     45|  }
  118|       |
  119|   100k|  no_bytes = no_bits >> 3;
  120|       |
  121|   100k|  if (no_bytes << 3 < (UWORD32)no_bits) {
  ------------------
  |  Branch (121:7): [True: 0, False: 100k]
  ------------------
  122|      0|    no_bytes++;
  123|      0|  }
  124|       |
  125|   100k|  ptr_adts_crc_info->str_crc_reg_data[ptr_adts_crc_info->no_reg].buf_size =
  126|   100k|      no_bytes;
  127|   100k|  ptr_adts_crc_info->str_crc_reg_data[ptr_adts_crc_info->no_reg].active = 1;
  128|       |
  129|   100k|  ixheaacd_copy_bit_buf_state(
  130|   100k|      it_bit_buff_src,
  131|   100k|      &(ptr_adts_crc_info->str_crc_reg_data[ptr_adts_crc_info->no_reg]
  132|   100k|            .str_bit_buf));
  133|       |
  134|   100k|  ptr_adts_crc_info->no_reg += 1;
  135|       |
  136|   100k|  return (ptr_adts_crc_info->no_reg - 1);
  137|   100k|}
ixheaacd_adts_crc_end_reg:
  140|  48.1k|                               ia_bit_buf_struct *it_bit_buff_src, WORD32 reg) {
  141|  48.1k|  ptr_adts_crc_info->str_crc_reg_data[reg].active = 0;
  142|  48.1k|  ptr_adts_crc_info->str_crc_reg_data[reg].bit_buf_cnt =
  143|  48.1k|      ptr_adts_crc_info->str_crc_reg_data[reg].str_bit_buf.cnt_bits -
  144|  48.1k|      it_bit_buff_src->cnt_bits;
  145|  48.1k|}
ixheaacd_adts_crc_fast_crc:
  148|  2.48k|                                UWORD16 *crc_reg, UWORD8 feed) {
  149|  2.48k|  *crc_reg =
  150|  2.48k|      (*crc_reg << 8) ^ ptr_adts_crc_info->crc_lookup[(*crc_reg >> 8) ^ feed];
  151|  2.48k|}
ixheaacd_adts_crc_slow_crc:
  154|    185|                                UWORD32 no_bits) {
  155|    185|  UWORD32 i;
  156|    185|  UWORD16 tmp;
  157|    647|  for (i = 0; i < no_bits; i++) {
  ------------------
  |  Branch (157:15): [True: 462, False: 185]
  ------------------
  158|    462|    tmp = (feed & (1 << (7 - i))) >> (7 - i);
  159|    462|    tmp ^= (*crc_reg & (1 << 15)) >> 15;
  160|    462|    tmp *= 32773;
  161|    462|    *crc_reg <<= 1;
  162|    462|    *crc_reg ^= tmp;
  163|    462|  }
  164|    185|}
ixheaacd_adts_crc_check_crc:
  166|     46|WORD32 ixheaacd_adts_crc_check_crc(ia_adts_crc_info_struct *ptr_adts_crc_info) {
  167|     46|  WORD32 error_code = AAC_DEC_OK;
  ------------------
  |  |   23|     46|#define AAC_DEC_OK IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR
  |  |  ------------------
  |  |  |  |   27|     46|#define IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR 0x00000000
  |  |  ------------------
  ------------------
  168|     46|  UWORD16 crc = 65535;
  169|     46|  WORD32 reg;
  170|     46|  ia_crc_reg_data_struct *ptr_reg_data;
  171|       |
  172|    173|  for (reg = 0; reg < ptr_adts_crc_info->no_reg; reg++) {
  ------------------
  |  Branch (172:17): [True: 127, False: 46]
  ------------------
  173|    127|    UWORD8 bits;
  174|    127|    WORD32 bits_remaining;
  175|       |
  176|    127|    ptr_reg_data = &ptr_adts_crc_info->str_crc_reg_data[reg];
  177|       |
  178|    127|    if (ptr_reg_data->max_bits > 0) {
  ------------------
  |  Branch (178:9): [True: 122, False: 5]
  ------------------
  179|    122|      if (ptr_adts_crc_info->str_crc_reg_data[reg].bit_buf_cnt >
  ------------------
  |  Branch (179:11): [True: 21, False: 101]
  ------------------
  180|    122|          ptr_reg_data->max_bits)
  181|     21|        bits_remaining = ptr_reg_data->max_bits;
  182|    101|      else
  183|    101|        bits_remaining = ptr_adts_crc_info->str_crc_reg_data[reg].bit_buf_cnt;
  184|    122|    } else {
  185|      5|      bits_remaining = ptr_adts_crc_info->str_crc_reg_data[reg].bit_buf_cnt;
  186|      5|    }
  187|       |
  188|  1.65k|    while (bits_remaining >= 8) {
  ------------------
  |  Branch (188:12): [True: 1.52k, False: 127]
  ------------------
  189|  1.52k|      if (ptr_reg_data->str_bit_buf.cnt_bits < 8) {
  ------------------
  |  Branch (189:11): [True: 0, False: 1.52k]
  ------------------
  190|      0|        return IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES;
  ------------------
  |  |   98|      0|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  191|      0|      }
  192|  1.52k|      bits = (UWORD8)ixheaacd_read_bits_buf(
  193|  1.52k|          (ia_bit_buf_struct *)(&ptr_adts_crc_info->str_crc_reg_data[reg]
  194|  1.52k|                                     .str_bit_buf),
  195|  1.52k|          8);
  196|  1.52k|      ixheaacd_adts_crc_fast_crc(ptr_adts_crc_info, &crc, bits);
  197|  1.52k|      bits_remaining -= 8;
  198|  1.52k|    }
  199|       |
  200|    127|    if (ptr_reg_data->str_bit_buf.cnt_bits < bits_remaining) {
  ------------------
  |  Branch (200:9): [True: 0, False: 127]
  ------------------
  201|      0|      return IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES;
  ------------------
  |  |   98|      0|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  202|      0|    }
  203|    127|    bits = (UWORD8)ixheaacd_read_bits_buf(
  204|    127|        (ia_bit_buf_struct *)(&ptr_adts_crc_info->str_crc_reg_data[reg]
  205|    127|                                   .str_bit_buf),
  206|    127|        bits_remaining);
  207|    127|    ixheaacd_adts_crc_slow_crc(&crc, (UWORD8)(bits << (8 - bits_remaining)),
  208|    127|                               bits_remaining);
  209|       |
  210|    127|    if (ptr_reg_data->max_bits >
  ------------------
  |  Branch (210:9): [True: 58, False: 69]
  ------------------
  211|    127|        ptr_adts_crc_info->str_crc_reg_data[reg].bit_buf_cnt) {
  212|     58|      bits_remaining = ptr_reg_data->max_bits -
  213|     58|                       ptr_adts_crc_info->str_crc_reg_data[reg].bit_buf_cnt;
  214|       |
  215|  1.01k|      for (; bits_remaining >= 8; bits_remaining -= 8) {
  ------------------
  |  Branch (215:14): [True: 957, False: 58]
  ------------------
  216|    957|        ixheaacd_adts_crc_fast_crc(ptr_adts_crc_info, &crc, 0);
  217|    957|      }
  218|       |
  219|     58|      ixheaacd_adts_crc_slow_crc(&crc, 0, bits_remaining);
  220|     58|    }
  221|    127|  }
  222|       |
  223|     46|  ptr_adts_crc_info->no_reg = 0;
  224|       |
  225|     46|  if (crc != ptr_adts_crc_info->file_value) {
  ------------------
  |  Branch (225:7): [True: 46, False: 0]
  ------------------
  226|     46|    return (IA_XHEAAC_DEC_EXE_NONFATAL_ADTS_HDR_CRC_FAIL);
  ------------------
  |  |   97|     46|#define IA_XHEAAC_DEC_EXE_NONFATAL_ADTS_HDR_CRC_FAIL 0x00001803
  ------------------
  227|     46|  }
  228|       |
  229|      0|  return (error_code);
  230|     46|}

ixheaacd_dec_mem_api:
  170|   227k|                                  WORD32 i_cmd, WORD32 i_idx, VOID *pv_value) {
  171|   227k|  pUWORD32 pui_value = pv_value;
  172|       |
  173|   227k|  if (i_idx < 0 || i_idx >= IA_ENHAACPDEC_NUM_MEMTABS) {
  ------------------
  |  |  121|   227k|#define IA_ENHAACPDEC_NUM_MEMTABS (4)
  ------------------
  |  Branch (173:7): [True: 0, False: 227k]
  |  Branch (173:20): [True: 0, False: 227k]
  ------------------
  174|      0|    return IA_XHEAAC_DEC_API_FATAL_INVALID_MEMTAB_INDEX;
  ------------------
  |  |   31|      0|#define IA_XHEAAC_DEC_API_FATAL_INVALID_MEMTAB_INDEX 0xFFFF8000
  ------------------
  175|      0|  }
  176|       |
  177|   227k|  if (i_cmd == IA_API_CMD_SET_MEM_PTR) {
  ------------------
  |  |   53|   227k|#define IA_API_CMD_SET_MEM_PTR 0x0016
  ------------------
  |  Branch (177:7): [True: 56.9k, False: 170k]
  ------------------
  178|  56.9k|    if (pv_value == 0) {
  ------------------
  |  Branch (178:9): [True: 0, False: 56.9k]
  ------------------
  179|      0|      return (IA_XHEAAC_DEC_API_FATAL_MEM_ALLOC);
  ------------------
  |  |   33|      0|#define IA_XHEAAC_DEC_API_FATAL_MEM_ALLOC 0xFFFF8002
  ------------------
  180|      0|    }
  181|  56.9k|    if (((SIZE_T)pv_value %
  ------------------
  |  Branch (181:9): [True: 0, False: 56.9k]
  ------------------
  182|  56.9k|         p_obj_exhaacplus_dec->p_mem_info_aac[i_idx].ui_alignment) != 0) {
  183|      0|      return (IA_XHEAAC_DEC_API_FATAL_MEM_ALIGN);
  ------------------
  |  |   37|      0|#define IA_XHEAAC_DEC_API_FATAL_MEM_ALIGN 0xFFFF8006
  ------------------
  184|      0|    }
  185|  56.9k|    p_obj_exhaacplus_dec->pp_mem_aac[i_idx] = pv_value;
  186|  56.9k|    memset(p_obj_exhaacplus_dec->pp_mem_aac[i_idx], 0,
  187|  56.9k|           p_obj_exhaacplus_dec->p_mem_info_aac[i_idx].ui_size);
  188|       |
  189|  56.9k|    if (i_idx == IA_ENHAACPLUS_DEC_PERSIST_IDX) {
  ------------------
  |  |   32|  56.9k|#define IA_ENHAACPLUS_DEC_PERSIST_IDX (0)
  ------------------
  |  Branch (189:9): [True: 14.2k, False: 42.6k]
  ------------------
  190|  14.2k|      pUWORD8 p_temp = pv_value;
  191|  14.2k|      UWORD32 *meminfo =
  192|  14.2k|          (UWORD32 *)p_obj_exhaacplus_dec->p_mem_info_aac + i_idx;
  193|  14.2k|      UWORD32 pers_size = meminfo[0];
  194|  14.2k|      p_temp = p_temp + pers_size -
  195|  14.2k|               (IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_dec_data_struct), BYTE_ALIGN_8) +
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  196|  14.2k|                IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_audio_specific_config_struct), BYTE_ALIGN_8) +
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  197|  14.2k|                IXHEAAC_GET_SIZE_ALIGNED(MAX_HEADER_BUF_SIZE, BYTE_ALIGN_8));
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  198|  14.2k|      p_obj_exhaacplus_dec->p_state_aac = pv_value;
  199|  14.2k|      memset(p_obj_exhaacplus_dec->p_state_aac, 0,
  200|  14.2k|             IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_aac_dec_state_struct), BYTE_ALIGN_8));
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  201|  14.2k|      p_obj_exhaacplus_dec->p_state_aac->pstr_dec_data = p_temp;
  202|  14.2k|      p_obj_exhaacplus_dec->p_state_aac->ia_audio_specific_config =
  203|  14.2k|          p_temp + IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_dec_data_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  204|  14.2k|      p_obj_exhaacplus_dec->p_state_aac->header_ptr =
  205|  14.2k|          p_temp + IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_dec_data_struct), BYTE_ALIGN_8) +
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  206|  14.2k|          IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_audio_specific_config_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  207|  14.2k|    }
  208|       |
  209|   170k|  } else {
  210|   170k|    UWORD32 *meminfo =
  211|   170k|        (UWORD32 *)(p_obj_exhaacplus_dec->p_mem_info_aac + i_idx);
  212|   170k|    *pui_value = *(meminfo + (i_cmd - IA_API_CMD_GET_MEM_INFO_SIZE));
  ------------------
  |  |   48|   170k|#define IA_API_CMD_GET_MEM_INFO_SIZE 0x0011
  ------------------
  213|   170k|  }
  214|       |
  215|   227k|  return IA_NO_ERROR;
  ------------------
  |  |   23|   227k|#define IA_NO_ERROR 0x00000000
  ------------------
  216|   227k|}
ixheaacd_updatebytesconsumed:
  232|   195k|    struct ia_bit_buf_struct *it_bit_buff) {
  233|   195k|  p_state_enhaacplus_dec->i_bytes_consumed =
  234|   195k|      (WORD32)(it_bit_buff->ptr_read_next - it_bit_buff->ptr_bit_buf_base);
  235|   195k|  if ((p_state_enhaacplus_dec->i_bytes_consumed == 0) &&
  ------------------
  |  Branch (235:7): [True: 2.03k, False: 193k]
  ------------------
  236|  2.03k|      (it_bit_buff->cnt_bits == 0)) {
  ------------------
  |  Branch (236:7): [True: 0, False: 2.03k]
  ------------------
  237|      0|    p_state_enhaacplus_dec->i_bytes_consumed =
  238|      0|        p_state_enhaacplus_dec->ui_in_bytes;
  239|      0|  }
  240|   195k|  if (it_bit_buff->cnt_bits < 0) {
  ------------------
  |  Branch (240:7): [True: 152, False: 195k]
  ------------------
  241|    152|    p_state_enhaacplus_dec->i_bytes_consumed = 0;
  242|    152|    p_state_enhaacplus_dec->ui_out_bytes = 0;
  243|    152|    p_state_enhaacplus_dec->ui_mps_out_bytes = 0;
  244|    152|    p_state_enhaacplus_dec->b_n_raw_data_blk = 0;
  245|    152|  }
  246|   195k|}
ixheaacd_readifadts:
  268|  32.4k|                           ia_adts_header_struct *adts) {
  269|  32.4k|  WORD error;
  270|       |
  271|  32.4k|  if ((error = ixheaacd_find_syncword(adts, it_bit_buff)) != 0) {
  ------------------
  |  Branch (271:7): [True: 778, False: 31.6k]
  ------------------
  272|    778|    ixheaacd_updatebytesconsumed(p_state_enhaacplus_dec, it_bit_buff);
  273|    778|    return IA_XHEAAC_DEC_EXE_NONFATAL_ADTS_SYNC_LOST;
  ------------------
  |  |   94|    778|#define IA_XHEAAC_DEC_EXE_NONFATAL_ADTS_SYNC_LOST 0x00001800
  ------------------
  274|    778|  }
  275|  31.6k|  if ((error = ixheaacd_check_if_adts(
  ------------------
  |  Branch (275:7): [True: 125, False: 31.5k]
  ------------------
  276|  31.6k|           adts, it_bit_buff,
  277|  31.6k|           p_state_enhaacplus_dec->p_config->ui_max_channels)) != 0) {
  278|    125|    p_state_enhaacplus_dec->i_bytes_consumed = 1;
  279|       |
  280|    125|    if (it_bit_buff->cnt_bits < 0) {
  ------------------
  |  Branch (280:9): [True: 0, False: 125]
  ------------------
  281|      0|      p_state_enhaacplus_dec->i_bytes_consumed = 0;
  282|      0|      p_state_enhaacplus_dec->ui_out_bytes = 0;
  283|      0|      p_state_enhaacplus_dec->ui_mps_out_bytes = 0;
  284|      0|      error = IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES;
  ------------------
  |  |   98|      0|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  285|      0|      return error;
  286|      0|    }
  287|    125|    return IA_XHEAAC_DEC_EXE_NONFATAL_ADTS_SYNC_LOST;
  ------------------
  |  |   94|    125|#define IA_XHEAAC_DEC_EXE_NONFATAL_ADTS_SYNC_LOST 0x00001800
  ------------------
  288|    125|  }
  289|  31.5k|  p_state_enhaacplus_dec->b_n_raw_data_blk =
  290|  31.5k|      (WORD8)(adts->no_raw_data_blocks + 1);
  291|  31.5k|  return 0;
  292|  31.6k|}
ixheaacd_allocate_sbr_scr:
  339|   204k|                               UWORD8 slot_pos, UWORD8 num_ch) {
  340|   204k|  WORD32 j, i;
  341|   204k|  sbr_scratch_struct->ptr_work_buf_core = base_scratch_ptr;
  342|       |
  343|   204k|  if (p_qshift_arr != NULL && *p_qshift_arr != LD_OBJ) {
  ------------------
  |  |  125|  40.3k|#define LD_OBJ -2
  ------------------
  |  Branch (343:7): [True: 40.3k, False: 163k]
  |  Branch (343:31): [True: 31.9k, False: 8.44k]
  ------------------
  344|  31.9k|    WORD32 *tmp_buf = (WORD32 *)output_ptr;
  345|       |
  346|  50.9k|    for (j = 1; j < num_ch; j++) {
  ------------------
  |  Branch (346:17): [True: 19.0k, False: 31.9k]
  ------------------
  347|  19.0k|      if ((*p_qshift_arr + j) == 0)
  ------------------
  |  Branch (347:11): [True: 0, False: 19.0k]
  ------------------
  348|      0|        *(p_qshift_arr + j) = *(p_qshift_arr + j - 1);
  349|  19.0k|    }
  350|       |
  351|  31.9k|    if (total_channels > 2) {
  ------------------
  |  Branch (351:9): [True: 120, False: 31.8k]
  ------------------
  352|    274|      for (j = 0; j < num_ch; j++) {
  ------------------
  |  Branch (352:19): [True: 154, False: 120]
  ------------------
  353|   157k|        for (i = 0; i < 1024; i++) {
  ------------------
  |  Branch (353:21): [True: 157k, False: 154]
  ------------------
  354|   157k|          *((WORD16 *)tmp_buf + slot_pos + total_channels * i + j) =
  355|   157k|              ixheaac_round16(ixheaac_shl32_sat(
  356|   157k|                  *(tmp_buf + slot_pos + total_channels * i + j),
  357|   157k|                  *(p_qshift_arr + j)));
  358|   157k|        }
  359|    154|      }
  360|  31.8k|    } else {
  361|  82.6k|      for (j = 0; j < num_ch; j++) {
  ------------------
  |  Branch (361:19): [True: 50.7k, False: 31.8k]
  ------------------
  362|  52.0M|        for (i = 0; i < 1024; i++) {
  ------------------
  |  Branch (362:21): [True: 52.0M, False: 50.7k]
  ------------------
  363|  52.0M|          *((WORD16 *)tmp_buf + total_channels * i + j) =
  364|  52.0M|              ixheaac_round16(ixheaac_shl32_sat(
  365|  52.0M|                  *(tmp_buf + total_channels * i + j), *(p_qshift_arr + j)));
  366|  52.0M|        }
  367|  50.7k|      }
  368|  31.8k|    }
  369|  31.9k|  }
  370|   204k|}
ixheaacd_dec_api:
  382|  3.40M|                              WORD32 i_idx, pVOID pv_value) {
  383|  3.40M|  ia_exhaacplus_dec_api_struct *p_obj_exhaacplus_dec = p_ia_xheaac_dec_obj;
  384|  3.40M|  pUWORD32 pui_value = pv_value;
  385|  3.40M|  pWORD32 pui_value_signed = pv_value;
  386|  3.40M|  pWORD8 pb_value = pv_value;
  387|  3.40M|  pVOID *pp_value = (pVOID *)pv_value;
  388|  3.40M|  float *pf_value = pv_value;
  389|       |
  390|  3.40M|  if ((i_cmd != IA_API_CMD_GET_API_SIZE) &&
  ------------------
  |  |   28|  3.40M|#define IA_API_CMD_GET_API_SIZE 0x0002
  ------------------
  |  Branch (390:7): [True: 3.39M, False: 14.2k]
  ------------------
  391|  3.39M|      (i_cmd != IA_API_CMD_GET_LIB_ID_STRINGS)) {
  ------------------
  |  |   26|  3.39M|#define IA_API_CMD_GET_LIB_ID_STRINGS 0x0001
  ------------------
  |  Branch (391:7): [True: 3.39M, False: 0]
  ------------------
  392|  3.39M|    if (p_ia_xheaac_dec_obj == 0) {
  ------------------
  |  Branch (392:9): [True: 0, False: 3.39M]
  ------------------
  393|      0|      return (IA_XHEAAC_DEC_API_FATAL_MEM_ALLOC);
  ------------------
  |  |   33|      0|#define IA_XHEAAC_DEC_API_FATAL_MEM_ALLOC 0xFFFF8002
  ------------------
  394|      0|    }
  395|  3.39M|    if (((SIZE_T)p_ia_xheaac_dec_obj & 3) != 0) {
  ------------------
  |  Branch (395:9): [True: 0, False: 3.39M]
  ------------------
  396|      0|      return (IA_XHEAAC_DEC_API_FATAL_MEM_ALIGN);
  ------------------
  |  |   37|      0|#define IA_XHEAAC_DEC_API_FATAL_MEM_ALIGN 0xFFFF8006
  ------------------
  397|      0|    }
  398|  3.39M|  }
  399|       |
  400|  3.40M|  switch (i_cmd) {
  ------------------
  |  Branch (400:11): [True: 227k, False: 3.17M]
  ------------------
  401|  56.9k|    case IA_API_CMD_GET_MEM_INFO_SIZE:
  ------------------
  |  |   48|  56.9k|#define IA_API_CMD_GET_MEM_INFO_SIZE 0x0011
  ------------------
  |  Branch (401:5): [True: 56.9k, False: 3.34M]
  ------------------
  402|   113k|    case IA_API_CMD_GET_MEM_INFO_ALIGNMENT:
  ------------------
  |  |   49|   113k|#define IA_API_CMD_GET_MEM_INFO_ALIGNMENT 0x0012
  ------------------
  |  Branch (402:5): [True: 56.9k, False: 3.34M]
  ------------------
  403|   170k|    case IA_API_CMD_GET_MEM_INFO_TYPE:
  ------------------
  |  |   50|   170k|#define IA_API_CMD_GET_MEM_INFO_TYPE 0x0013
  ------------------
  |  Branch (403:5): [True: 56.9k, False: 3.34M]
  ------------------
  404|   227k|    case IA_API_CMD_SET_MEM_PTR: {
  ------------------
  |  |   53|   227k|#define IA_API_CMD_SET_MEM_PTR 0x0016
  ------------------
  |  Branch (404:5): [True: 56.9k, False: 3.34M]
  ------------------
  405|   227k|      return ixheaacd_dec_mem_api(p_ia_xheaac_dec_obj, i_cmd, i_idx,
  406|   227k|                                  pv_value);
  407|   170k|    }
  408|       |
  409|      0|    case IA_API_CMD_GET_TABLE_INFO_SIZE:
  ------------------
  |  |   58|      0|#define IA_API_CMD_GET_TABLE_INFO_SIZE 0x001A
  ------------------
  |  Branch (409:5): [True: 0, False: 3.40M]
  ------------------
  410|      0|    case IA_API_CMD_GET_TABLE_INFO_ALIGNMENT:
  ------------------
  |  |   59|      0|#define IA_API_CMD_GET_TABLE_INFO_ALIGNMENT 0x001B
  ------------------
  |  Branch (410:5): [True: 0, False: 3.40M]
  ------------------
  411|      0|    case IA_API_CMD_SET_TABLE_PTR:
  ------------------
  |  |   61|      0|#define IA_API_CMD_SET_TABLE_PTR 0x001D
  ------------------
  |  Branch (411:5): [True: 0, False: 3.40M]
  ------------------
  412|      0|    case IA_API_CMD_GET_TABLE_PTR: {
  ------------------
  |  |   62|      0|#define IA_API_CMD_GET_TABLE_PTR 0x001E
  ------------------
  |  Branch (412:5): [True: 0, False: 3.40M]
  ------------------
  413|      0|      return ixheaacd_dec_table_api(p_ia_xheaac_dec_obj, i_cmd, i_idx,
  414|      0|                                    pv_value);
  415|      0|    }
  416|  3.40M|  };
  417|       |
  418|  3.17M|  switch (i_cmd) {
  419|      0|    case IA_API_CMD_GET_LIB_ID_STRINGS: {
  ------------------
  |  |   26|      0|#define IA_API_CMD_GET_LIB_ID_STRINGS 0x0001
  ------------------
  |  Branch (419:5): [True: 0, False: 3.17M]
  ------------------
  420|      0|      WORD8 *i1_ver;
  421|      0|      WORD8 ver_char;
  422|       |
  423|      0|      if (i_idx == IA_CMD_TYPE_LIB_NAME)
  ------------------
  |  |   69|      0|#define IA_CMD_TYPE_LIB_NAME 0x0100
  ------------------
  |  Branch (423:11): [True: 0, False: 0]
  ------------------
  424|      0|        i1_ver = (WORD8 *)LIBNAME;
  ------------------
  |  |   23|      0|#define LIBNAME "IA_XHEAAC_DEC"
  ------------------
  425|      0|      else if (i_idx == IA_CMD_TYPE_LIB_VERSION)
  ------------------
  |  |   70|      0|#define IA_CMD_TYPE_LIB_VERSION 0x0200
  ------------------
  |  Branch (425:16): [True: 0, False: 0]
  ------------------
  426|      0|        i1_ver = (WORD8 *)xHE_AAC_DEC_ITTIAM_VER;
  ------------------
  |  |   23|      0|#define xHE_AAC_DEC_ITTIAM_VER "_X86 $Rev: 1.41 $"
  ------------------
  427|      0|      else
  428|      0|        return IA_XHEAAC_DEC_API_FATAL_INVALID_LIB_ID_STRINGS_IDX;
  ------------------
  |  |   32|      0|#define IA_XHEAAC_DEC_API_FATAL_INVALID_LIB_ID_STRINGS_IDX 0xFFFF8001
  ------------------
  429|       |
  430|      0|      ver_char = *i1_ver++;
  431|       |
  432|      0|      for (; ver_char != '\0';) {
  ------------------
  |  Branch (432:14): [True: 0, False: 0]
  ------------------
  433|      0|        if (ver_char != '$') {
  ------------------
  |  Branch (433:13): [True: 0, False: 0]
  ------------------
  434|      0|          *pb_value++ = ver_char;
  435|      0|        }
  436|      0|        ver_char = *i1_ver++;
  437|      0|      }
  438|      0|      *pb_value = ver_char;
  439|       |
  440|      0|      break;
  441|      0|    }
  442|  14.2k|    case IA_API_CMD_GET_API_SIZE: {
  ------------------
  |  |   28|  14.2k|#define IA_API_CMD_GET_API_SIZE 0x0002
  ------------------
  |  Branch (442:5): [True: 14.2k, False: 3.16M]
  ------------------
  443|  14.2k|      *pui_value = sizeof(ia_exhaacplus_dec_api_struct);
  444|  14.2k|      break;
  445|      0|    }
  446|  74.5k|    case IA_API_CMD_INIT: {
  ------------------
  |  |   29|  74.5k|#define IA_API_CMD_INIT 0x0003
  ------------------
  |  Branch (446:5): [True: 74.5k, False: 3.10M]
  ------------------
  447|  74.5k|      switch (i_idx) {
  448|  14.2k|        case IA_CMD_TYPE_INIT_API_PRE_CONFIG_PARAMS: {
  ------------------
  |  |   74|  14.2k|#define IA_CMD_TYPE_INIT_API_PRE_CONFIG_PARAMS 0x0100
  ------------------
  |  Branch (448:9): [True: 14.2k, False: 60.3k]
  ------------------
  449|  14.2k|          memset(p_obj_exhaacplus_dec, 0, sizeof(*p_obj_exhaacplus_dec));
  450|  14.2k|          p_obj_exhaacplus_dec->aac_config.ui_pcm_wdsz = 16;
  451|  14.2k|          p_obj_exhaacplus_dec->aac_config.flag_downmix = 0;
  452|  14.2k|          p_obj_exhaacplus_dec->aac_config.flag_08khz_out = 0;
  453|  14.2k|          p_obj_exhaacplus_dec->aac_config.flag_16khz_out = 0;
  454|  14.2k|          p_obj_exhaacplus_dec->aac_config.flag_to_stereo = 0;
  455|  14.2k|          p_obj_exhaacplus_dec->aac_config.down_sample_flag = 0;
  456|  14.2k|          p_obj_exhaacplus_dec->aac_config.header_dec_done = 0;
  457|  14.2k|          p_obj_exhaacplus_dec->aac_config.frame_status = 1;
  458|  14.2k|          p_obj_exhaacplus_dec->aac_config.ui_mp4_flag = 0;
  459|  14.2k|          p_obj_exhaacplus_dec->aac_config.ui_disable_sync = 0;
  460|  14.2k|          p_obj_exhaacplus_dec->aac_config.ui_auto_sbr_upsample = 1;
  461|  14.2k|          p_obj_exhaacplus_dec->aac_config.ui_samp_freq = 0;
  462|  14.2k|          p_obj_exhaacplus_dec->aac_config.ui_frame_size = 0;
  463|       |
  464|  14.2k|          p_obj_exhaacplus_dec->aac_config.ui_n_channels = 2;
  465|  14.2k|          p_obj_exhaacplus_dec->aac_config.i_channel_mask = 3;
  466|  14.2k|          p_obj_exhaacplus_dec->aac_config.ui_channel_mode = 3;
  467|  14.2k|          p_obj_exhaacplus_dec->aac_config.ui_sbr_mode = 0;
  468|  14.2k|          p_obj_exhaacplus_dec->aac_config.ui_effect_type = 0;
  469|  14.2k|          p_obj_exhaacplus_dec->aac_config.ui_target_loudness = -24;
  470|  14.2k|          p_obj_exhaacplus_dec->aac_config.ui_loud_norm_flag = 0;
  471|  14.2k|          p_obj_exhaacplus_dec->aac_config.ui_hq_esbr = 0;
  472|  14.2k|          p_obj_exhaacplus_dec->aac_config.ui_enh_sbr = 1;
  473|  14.2k|          p_obj_exhaacplus_dec->aac_config.ui_enh_sbr_ps = 0;
  474|  14.2k|          p_obj_exhaacplus_dec->aac_config.ui_pce_found_in_hdr = 0;
  475|  14.2k|          p_obj_exhaacplus_dec->aac_config.loas_present = 0;
  476|  14.2k|          p_obj_exhaacplus_dec->aac_config.ld_decoder = 0;
  477|  14.2k|          p_obj_exhaacplus_dec->aac_config.ui_drc_boost = 100;
  478|  14.2k|          p_obj_exhaacplus_dec->aac_config.ui_drc_cut = 100;
  479|  14.2k|          p_obj_exhaacplus_dec->aac_config.ui_drc_mode_cut = 0;
  480|  14.2k|          p_obj_exhaacplus_dec->aac_config.ui_drc_mode_boost = 0;
  481|  14.2k|          p_obj_exhaacplus_dec->aac_config.ui_drc_target_level = 108;
  482|  14.2k|          p_obj_exhaacplus_dec->aac_config.ui_drc_set = 0;
  483|  14.2k|          p_obj_exhaacplus_dec->aac_config.ui_flush_cmd = 0;
  484|  14.2k|          p_obj_exhaacplus_dec->aac_config.output_level = -1;
  485|  14.2k|#ifdef LOUDNESS_LEVELING_SUPPORT
  486|  14.2k|          p_obj_exhaacplus_dec->aac_config.ui_loudness_leveling_flag = 1;
  487|  14.2k|#endif
  488|  14.2k|          p_obj_exhaacplus_dec->aac_config.ui_max_channels = 6;
  489|       |
  490|  14.2k|          p_obj_exhaacplus_dec->aac_config.ui_coupling_channel = 0;
  491|  14.2k|          p_obj_exhaacplus_dec->aac_config.downmix = 0;
  492|       |
  493|  14.2k|          p_obj_exhaacplus_dec->aac_config.ui_err_conceal = 0;
  494|       |
  495|  14.2k|          {
  496|  14.2k|            ia_aac_dec_tables_struct *pstr_aac_tables =
  497|  14.2k|                &p_obj_exhaacplus_dec->aac_tables;
  498|  14.2k|            pstr_aac_tables->pstr_huffmann_tables =
  499|  14.2k|                (ia_aac_dec_huffman_tables_struct
  500|  14.2k|                     *)&ixheaacd_aac_huffmann_tables;
  501|  14.2k|            pstr_aac_tables->pstr_block_tables =
  502|  14.2k|                (ia_aac_dec_block_tables_struct *)&ixheaacd_aac_block_tables;
  503|  14.2k|            pstr_aac_tables->pstr_imdct_tables =
  504|  14.2k|                (ia_aac_dec_imdct_tables_struct *)&ixheaacd_imdct_tables;
  505|       |
  506|  14.2k|            ixheaacd_huff_tables_create(pstr_aac_tables);
  507|  14.2k|          }
  508|  14.2k|          ixheaacd_init_sbr_tables(&p_obj_exhaacplus_dec->str_sbr_tables);
  509|  14.2k|          p_obj_exhaacplus_dec->common_tables =
  510|  14.2k|              (ixheaacd_misc_tables *)&ixheaacd_str_fft_n_transcendent_tables;
  511|  14.2k|          p_obj_exhaacplus_dec->aac_config.ui_qmf_bands = 64;
  512|       |
  513|  14.2k|          break;
  514|      0|        }
  515|  14.2k|        case IA_CMD_TYPE_INIT_API_POST_CONFIG_PARAMS: {
  ------------------
  |  |   75|  14.2k|#define IA_CMD_TYPE_INIT_API_POST_CONFIG_PARAMS 0x0200
  ------------------
  |  Branch (515:9): [True: 14.2k, False: 60.3k]
  ------------------
  516|  14.2k|          ixheaacd_fill_aac_mem_tables(p_obj_exhaacplus_dec);
  517|  14.2k|          break;
  518|      0|        }
  519|  23.0k|        case IA_CMD_TYPE_INIT_PROCESS: {
  ------------------
  |  |   76|  23.0k|#define IA_CMD_TYPE_INIT_PROCESS 0x0300
  ------------------
  |  Branch (519:9): [True: 23.0k, False: 51.5k]
  ------------------
  520|  23.0k|          WORD32 err_code = 0;
  521|  23.0k|          if (p_obj_exhaacplus_dec->p_state_aac->fatal_err_present) {
  ------------------
  |  Branch (521:15): [True: 245, False: 22.7k]
  ------------------
  522|    245|            err_code = IA_FATAL_ERROR;
  ------------------
  |  |   25|    245|#define IA_FATAL_ERROR 0x80000000
  ------------------
  523|  22.7k|          } else {
  524|  22.7k|            err_code = ixheaacd_dec_init(p_obj_exhaacplus_dec);
  525|  22.7k|            if (err_code && p_obj_exhaacplus_dec->p_state_aac->s_adts_hdr_present) {
  ------------------
  |  Branch (525:17): [True: 804, False: 21.9k]
  |  Branch (525:29): [True: 306, False: 498]
  ------------------
  526|    306|              p_obj_exhaacplus_dec->p_state_aac->header_dec_done = 0;
  527|    306|            }
  528|  22.7k|            if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal && err_code) {
  ------------------
  |  Branch (528:17): [True: 0, False: 22.7k]
  |  Branch (528:68): [True: 0, False: 0]
  ------------------
  529|      0|              if (err_code & IA_FATAL_ERROR) {
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
  |  Branch (529:19): [True: 0, False: 0]
  ------------------
  530|      0|                err_code = IA_XHEAAC_DEC_INIT_FATAL_EC_INIT_FAIL;
  ------------------
  |  |   87|      0|#define IA_XHEAAC_DEC_INIT_FATAL_EC_INIT_FAIL 0xFFFF9004
  ------------------
  531|      0|              } else {
  532|      0|                err_code = IA_XHEAAC_DEC_INIT_NONFATAL_EC_INIT_FAIL;
  ------------------
  |  |   78|      0|#define IA_XHEAAC_DEC_INIT_NONFATAL_EC_INIT_FAIL 0x00001002
  ------------------
  533|      0|              }
  534|      0|            }
  535|  22.7k|          }
  536|  23.0k|          if (err_code != 0) {
  ------------------
  |  Branch (536:15): [True: 1.04k, False: 21.9k]
  ------------------
  537|  1.04k|            if (err_code < 0)
  ------------------
  |  Branch (537:17): [True: 694, False: 355]
  ------------------
  538|    694|              p_obj_exhaacplus_dec->p_state_aac->fatal_err_present = 1;
  539|  1.04k|            p_obj_exhaacplus_dec->p_state_aac->i_bytes_consumed =
  540|  1.04k|                p_obj_exhaacplus_dec->p_state_aac->ui_in_bytes;
  541|  1.04k|          }
  542|  23.0k|          return err_code;
  543|      0|          break;
  544|      0|        }
  545|  23.0k|        case IA_CMD_TYPE_INIT_DONE_QUERY: {
  ------------------
  |  |   77|  23.0k|#define IA_CMD_TYPE_INIT_DONE_QUERY 0x0400
  ------------------
  |  Branch (545:9): [True: 23.0k, False: 51.5k]
  ------------------
  546|  23.0k|          if (p_obj_exhaacplus_dec->p_state_aac->ui_init_done == 1) {
  ------------------
  |  Branch (546:15): [True: 12.4k, False: 10.6k]
  ------------------
  547|  12.4k|            *pui_value = 1;
  548|  12.4k|          } else {
  549|  10.6k|            *pui_value = 0;
  550|  10.6k|          }
  551|  23.0k|          break;
  552|      0|        }
  553|       |
  554|      0|        case IA_CMD_TYPE_GA_HDR: {
  ------------------
  |  |   78|      0|#define IA_CMD_TYPE_GA_HDR 0x0800
  ------------------
  |  Branch (554:9): [True: 0, False: 74.5k]
  ------------------
  555|      0|          return ixheaacd_decoder_2_ga_hdr(p_obj_exhaacplus_dec);
  556|      0|          break;
  557|      0|        }
  558|       |
  559|      0|        case IA_CMD_TYPE_FLUSH_MEM: {
  ------------------
  |  |   79|      0|#define IA_CMD_TYPE_FLUSH_MEM 0x1000
  ------------------
  |  Branch (559:9): [True: 0, False: 74.5k]
  ------------------
  560|      0|          return ixheaacd_decoder_flush_api(p_obj_exhaacplus_dec);
  561|      0|          break;
  562|      0|        }
  563|       |
  564|      0|        default: {
  ------------------
  |  Branch (564:9): [True: 0, False: 74.5k]
  ------------------
  565|      0|          return IA_XHEAAC_DEC_API_NONFATAL_CMD_TYPE_NOT_SUPPORTED;
  ------------------
  |  |   29|      0|#define IA_XHEAAC_DEC_API_NONFATAL_CMD_TYPE_NOT_SUPPORTED 0x00000002
  ------------------
  566|      0|        }
  567|  74.5k|      };
  568|  51.5k|      break;
  569|  74.5k|    }
  570|   113k|    case IA_API_CMD_SET_CONFIG_PARAM: {
  ------------------
  |  |   31|   113k|#define IA_API_CMD_SET_CONFIG_PARAM 0x0004
  ------------------
  |  Branch (570:5): [True: 113k, False: 3.06M]
  ------------------
  571|   113k|      switch (i_idx) {
  572|      0|        case IA_XHEAAC_DEC_CONFIG_PARAM_SAMP_FREQ: {
  ------------------
  |  |   24|      0|#define IA_XHEAAC_DEC_CONFIG_PARAM_SAMP_FREQ 0x0001
  ------------------
  |  Branch (572:9): [True: 0, False: 113k]
  ------------------
  573|      0|          if ((*pui_value < 8000) || (*pui_value > 96000)) {
  ------------------
  |  Branch (573:15): [True: 0, False: 0]
  |  Branch (573:38): [True: 0, False: 0]
  ------------------
  574|      0|            return (IA_XHEAAC_DEC_CONFIG_FATAL_INVALID_SAMPLE_RATE);
  ------------------
  |  |   70|      0|#define IA_XHEAAC_DEC_CONFIG_FATAL_INVALID_SAMPLE_RATE 0xFFFF8800
  ------------------
  575|      0|          }
  576|      0|          p_obj_exhaacplus_dec->aac_config.ui_samp_freq = *pui_value;
  577|      0|          break;
  578|      0|        }
  579|      0|        case IA_XHEAAC_DEC_CONFIG_PARAM_FRAMELENGTH_FLAG: {
  ------------------
  |  |   52|      0|#define IA_XHEAAC_DEC_CONFIG_PARAM_FRAMELENGTH_FLAG 0x001C
  ------------------
  |  Branch (579:9): [True: 0, False: 113k]
  ------------------
  580|      0|          if ((*pui_value != 1) && (*pui_value != 0)) {
  ------------------
  |  Branch (580:15): [True: 0, False: 0]
  |  Branch (580:36): [True: 0, False: 0]
  ------------------
  581|      0|            return (IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_FRAMELENGTHFLAG);
  ------------------
  |  |   64|      0|#define IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_FRAMELENGTHFLAG 0x00000816
  ------------------
  582|      0|          }
  583|      0|          p_obj_exhaacplus_dec->aac_config.ui_frame_size = *pui_value;
  584|      0|          break;
  585|      0|        }
  586|      0|        case IA_XHEAAC_DEC_CONFIG_PARAM_PCM_WDSZ: {
  ------------------
  |  |   23|      0|#define IA_XHEAAC_DEC_CONFIG_PARAM_PCM_WDSZ 0x0000
  ------------------
  |  Branch (586:9): [True: 0, False: 113k]
  ------------------
  587|      0|          if ((*pui_value != 16) && (*pui_value != 24)) {
  ------------------
  |  Branch (587:15): [True: 0, False: 0]
  |  Branch (587:37): [True: 0, False: 0]
  ------------------
  588|      0|            p_obj_exhaacplus_dec->aac_config.ui_pcm_wdsz = 16;
  589|      0|            return (IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_PCM_WDSZ);
  ------------------
  |  |   42|      0|#define IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_PCM_WDSZ 0x00000800
  ------------------
  590|      0|          }
  591|      0|          p_obj_exhaacplus_dec->aac_config.ui_pcm_wdsz = *pui_value;
  592|      0|          break;
  593|      0|        }
  594|      0|        case IA_XHEAAC_DEC_CONFIG_PARAM_DOWNMIX: {
  ------------------
  |  |   33|      0|#define IA_XHEAAC_DEC_CONFIG_PARAM_DOWNMIX 0x0009
  ------------------
  |  Branch (594:9): [True: 0, False: 113k]
  ------------------
  595|      0|          if ((*pui_value != 1) && (*pui_value != 0)) {
  ------------------
  |  Branch (595:15): [True: 0, False: 0]
  |  Branch (595:36): [True: 0, False: 0]
  ------------------
  596|      0|            p_obj_exhaacplus_dec->aac_config.flag_downmix = 0;
  597|      0|            return (IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_DOWNMIX);
  ------------------
  |  |   43|      0|#define IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_DOWNMIX 0x00000801
  ------------------
  598|      0|          }
  599|      0|          p_obj_exhaacplus_dec->aac_config.flag_downmix = *pui_value;
  600|      0|          p_obj_exhaacplus_dec->aac_config.downmix = *pui_value;
  601|      0|          break;
  602|      0|        }
  603|       |
  604|      0|        case IA_XHEAAC_DEC_CONFIG_PARAM_TOSTEREO: {
  ------------------
  |  |   34|      0|#define IA_XHEAAC_DEC_CONFIG_PARAM_TOSTEREO 0x000A
  ------------------
  |  Branch (604:9): [True: 0, False: 113k]
  ------------------
  605|      0|          if ((*pui_value != 1) && (*pui_value != 0)) {
  ------------------
  |  Branch (605:15): [True: 0, False: 0]
  |  Branch (605:36): [True: 0, False: 0]
  ------------------
  606|      0|            p_obj_exhaacplus_dec->aac_config.flag_to_stereo = 1;
  607|      0|            return (IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_TOSTEREO);
  ------------------
  |  |   46|      0|#define IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_TOSTEREO 0x00000804
  ------------------
  608|      0|          }
  609|      0|          p_obj_exhaacplus_dec->aac_config.flag_to_stereo = *pui_value;
  610|      0|          break;
  611|      0|        }
  612|      0|        case IA_XHEAAC_DEC_CONFIG_PARAM_DSAMPLE: {
  ------------------
  |  |   35|      0|#define IA_XHEAAC_DEC_CONFIG_PARAM_DSAMPLE 0x000B
  ------------------
  |  Branch (612:9): [True: 0, False: 113k]
  ------------------
  613|      0|          if ((*pui_value != 1) && (*pui_value != 0)) {
  ------------------
  |  Branch (613:15): [True: 0, False: 0]
  |  Branch (613:36): [True: 0, False: 0]
  ------------------
  614|      0|            p_obj_exhaacplus_dec->aac_config.down_sample_flag = 0;
  615|      0|            return (IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_DSAMPLE);
  ------------------
  |  |   47|      0|#define IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_DSAMPLE 0x00000805
  ------------------
  616|      0|          }
  617|      0|          p_obj_exhaacplus_dec->aac_config.down_sample_flag = *pui_value;
  618|      0|          break;
  619|      0|        }
  620|       |
  621|  14.2k|        case IA_XHEAAC_DEC_CONFIG_PARAM_MP4FLAG: {
  ------------------
  |  |   36|  14.2k|#define IA_XHEAAC_DEC_CONFIG_PARAM_MP4FLAG 0x000C
  ------------------
  |  Branch (621:9): [True: 14.2k, False: 99.6k]
  ------------------
  622|  14.2k|          if ((*pui_value != 1) && (*pui_value != 0)) {
  ------------------
  |  Branch (622:15): [True: 12.5k, False: 1.67k]
  |  Branch (622:36): [True: 0, False: 12.5k]
  ------------------
  623|      0|            p_obj_exhaacplus_dec->aac_config.ui_mp4_flag = 0;
  624|      0|            return (IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_MP4FLAG);
  ------------------
  |  |   49|      0|#define IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_MP4FLAG 0x00000807
  ------------------
  625|      0|          }
  626|  14.2k|          p_obj_exhaacplus_dec->aac_config.ui_mp4_flag = *pui_value;
  627|  14.2k|          break;
  628|  14.2k|        }
  629|  14.2k|        case IA_XHEAAC_DEC_CONFIG_PARAM_DRC_CUT: {
  ------------------
  |  |   42|  14.2k|#define IA_XHEAAC_DEC_CONFIG_PARAM_DRC_CUT 0x0012
  ------------------
  |  Branch (629:9): [True: 14.2k, False: 99.6k]
  ------------------
  630|  14.2k|          p_obj_exhaacplus_dec->aac_config.ui_drc_set = 1;
  631|  14.2k|          if (*pf_value > 1 || *pf_value < 0) {
  ------------------
  |  Branch (631:15): [True: 0, False: 14.2k]
  |  Branch (631:32): [True: 0, False: 14.2k]
  ------------------
  632|      0|            p_obj_exhaacplus_dec->aac_config.ui_drc_cut = 0;
  633|      0|            return (IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_DRC_CUT);
  ------------------
  |  |   56|      0|#define IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_DRC_CUT 0x0000080E
  ------------------
  634|      0|          }
  635|       |
  636|  14.2k|          p_obj_exhaacplus_dec->aac_config.ui_drc_mode_cut = 1;
  637|  14.2k|          p_obj_exhaacplus_dec->aac_config.ui_drc_cut =
  638|  14.2k|              (WORD32)((*pf_value) * 100);
  639|  14.2k|          break;
  640|  14.2k|        }
  641|       |
  642|  14.2k|        case IA_XHEAAC_DEC_CONFIG_PARAM_DRC_BOOST: {
  ------------------
  |  |   43|  14.2k|#define IA_XHEAAC_DEC_CONFIG_PARAM_DRC_BOOST 0x0013
  ------------------
  |  Branch (642:9): [True: 14.2k, False: 99.6k]
  ------------------
  643|  14.2k|          p_obj_exhaacplus_dec->aac_config.ui_drc_set = 1;
  644|  14.2k|          if (*pf_value > 1 || *pf_value < 0) {
  ------------------
  |  Branch (644:15): [True: 0, False: 14.2k]
  |  Branch (644:32): [True: 0, False: 14.2k]
  ------------------
  645|      0|            p_obj_exhaacplus_dec->aac_config.ui_drc_boost = 0;
  646|      0|            return (IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_DRC_BOOST);
  ------------------
  |  |   57|      0|#define IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_DRC_BOOST 0x0000080F
  ------------------
  647|      0|          }
  648|       |
  649|  14.2k|          p_obj_exhaacplus_dec->aac_config.ui_drc_mode_boost = 1;
  650|  14.2k|          p_obj_exhaacplus_dec->aac_config.ui_drc_boost =
  651|  14.2k|              (WORD32)((*pf_value) * 100);
  652|  14.2k|          break;
  653|  14.2k|        }
  654|       |
  655|  14.2k|        case IA_XHEAAC_DEC_CONFIG_PARAM_DRC_TARGET_LEVEL: {
  ------------------
  |  |   44|  14.2k|#define IA_XHEAAC_DEC_CONFIG_PARAM_DRC_TARGET_LEVEL 0x0014
  ------------------
  |  Branch (655:9): [True: 14.2k, False: 99.6k]
  ------------------
  656|  14.2k|          p_obj_exhaacplus_dec->aac_config.ui_drc_set = 1;
  657|  14.2k|          p_obj_exhaacplus_dec->aac_config.i_loud_ref_level = *pui_value_signed;
  658|  14.2k|          if (*pui_value > 127) {
  ------------------
  |  Branch (658:15): [True: 5.79k, False: 8.43k]
  ------------------
  659|  5.79k|            p_obj_exhaacplus_dec->aac_config.ui_drc_target_level = 108;
  660|  5.79k|            return (IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_DRC_TARGET);
  ------------------
  |  |   58|  5.79k|#define IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_DRC_TARGET 0x00000810
  ------------------
  661|  5.79k|          }
  662|  8.43k|          p_obj_exhaacplus_dec->aac_config.ui_drc_target_level = *pui_value;
  663|  8.43k|          break;
  664|  14.2k|        }
  665|  14.2k|        case IA_XHEAAC_DEC_CONFIG_PARAM_DRC_HEAVY_COMP: {
  ------------------
  |  |   45|  14.2k|#define IA_XHEAAC_DEC_CONFIG_PARAM_DRC_HEAVY_COMP 0x0015
  ------------------
  |  Branch (665:9): [True: 14.2k, False: 99.6k]
  ------------------
  666|  14.2k|          p_obj_exhaacplus_dec->aac_config.ui_drc_set = 1;
  667|  14.2k|          if ((*pui_value != 1) && (*pui_value != 0)) {
  ------------------
  |  Branch (667:15): [True: 13.9k, False: 263]
  |  Branch (667:36): [True: 10.6k, False: 3.34k]
  ------------------
  668|  10.6k|            p_obj_exhaacplus_dec->aac_config.ui_drc_heavy_comp = 0;
  669|  10.6k|            return (IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_DRCFLAG);
  ------------------
  |  |   55|  10.6k|#define IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_DRCFLAG 0x0000080D
  ------------------
  670|  10.6k|          }
  671|  3.61k|          p_obj_exhaacplus_dec->aac_config.ui_drc_heavy_comp = *pui_value;
  672|  3.61k|          break;
  673|  14.2k|        }
  674|      0|        case IA_XHEAAC_DEC_CONFIG_DISABLE_SYNC: {
  ------------------
  |  |   40|      0|#define IA_XHEAAC_DEC_CONFIG_DISABLE_SYNC 0x0010
  ------------------
  |  Branch (674:9): [True: 0, False: 113k]
  ------------------
  675|      0|          if ((*pui_value != 1) && (*pui_value != 0)) {
  ------------------
  |  Branch (675:15): [True: 0, False: 0]
  |  Branch (675:36): [True: 0, False: 0]
  ------------------
  676|      0|            p_obj_exhaacplus_dec->aac_config.ui_disable_sync = 0;
  677|      0|            return (IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_SYNCFLAG);
  ------------------
  |  |   53|      0|#define IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_SYNCFLAG 0x0000080B
  ------------------
  678|      0|          }
  679|      0|          p_obj_exhaacplus_dec->aac_config.ui_disable_sync = *pui_value;
  680|      0|          break;
  681|      0|        }
  682|      0|        case IA_XHEAAC_DEC_CONFIG_PARAM_AUTO_SBR_UPSAMPLE: {
  ------------------
  |  |   41|      0|#define IA_XHEAAC_DEC_CONFIG_PARAM_AUTO_SBR_UPSAMPLE 0x0011
  ------------------
  |  Branch (682:9): [True: 0, False: 113k]
  ------------------
  683|      0|          if ((*pui_value != 1) && (*pui_value != 0)) {
  ------------------
  |  Branch (683:15): [True: 0, False: 0]
  |  Branch (683:36): [True: 0, False: 0]
  ------------------
  684|      0|            p_obj_exhaacplus_dec->aac_config.ui_auto_sbr_upsample = 0;
  685|      0|            return (IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_SBRUPFLAG);
  ------------------
  |  |   54|      0|#define IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_SBRUPFLAG 0x0000080C
  ------------------
  686|      0|          }
  687|      0|          p_obj_exhaacplus_dec->aac_config.ui_auto_sbr_upsample = *pui_value;
  688|      0|          break;
  689|      0|        }
  690|      0|        case IA_XHEAAC_DEC_CONFIG_PARAM_MAX_CHANNEL: {
  ------------------
  |  |   37|      0|#define IA_XHEAAC_DEC_CONFIG_PARAM_MAX_CHANNEL 0x000D
  ------------------
  |  Branch (690:9): [True: 0, False: 113k]
  ------------------
  691|      0|          if (*pui_value > 8) {
  ------------------
  |  Branch (691:15): [True: 0, False: 0]
  ------------------
  692|      0|            p_obj_exhaacplus_dec->aac_config.ui_max_channels = 8;
  693|      0|            return (IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_MAX_CHANNEL);
  ------------------
  |  |   50|      0|#define IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_MAX_CHANNEL 0x00000808
  ------------------
  694|      0|          }
  695|      0|          if (*pui_value < 2) {
  ------------------
  |  Branch (695:15): [True: 0, False: 0]
  ------------------
  696|      0|            p_obj_exhaacplus_dec->aac_config.ui_max_channels = 2;
  697|      0|            return (IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_MAX_CHANNEL);
  ------------------
  |  |   50|      0|#define IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_MAX_CHANNEL 0x00000808
  ------------------
  698|      0|          }
  699|      0|          p_obj_exhaacplus_dec->aac_config.ui_max_channels = *pui_value;
  700|      0|          break;
  701|      0|        }
  702|      0|        case IA_XHEAAC_DEC_CONFIG_PARAM_FRAMESIZE: {
  ------------------
  |  |   46|      0|#define IA_XHEAAC_DEC_CONFIG_PARAM_FRAMESIZE 0x0016
  ------------------
  |  Branch (702:9): [True: 0, False: 113k]
  ------------------
  703|      0|          if (*pui_value == 1) {
  ------------------
  |  Branch (703:15): [True: 0, False: 0]
  ------------------
  704|      0|            p_obj_exhaacplus_dec->aac_config.framesize_480 = 1;
  705|      0|          } else if (*pui_value == 0) {
  ------------------
  |  Branch (705:22): [True: 0, False: 0]
  ------------------
  706|      0|            p_obj_exhaacplus_dec->aac_config.framesize_480 = 0;
  707|      0|          } else {
  708|      0|            return (IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_FRAMSZ);
  ------------------
  |  |   59|      0|#define IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_FRAMSZ 0x00000811
  ------------------
  709|      0|          }
  710|      0|          break;
  711|      0|        }
  712|       |
  713|      0|        case IA_XHEAAC_DEC_CONFIG_PARAM_LD_TESTING: {
  ------------------
  |  |   47|      0|#define IA_XHEAAC_DEC_CONFIG_PARAM_LD_TESTING 0x0017
  ------------------
  |  Branch (713:9): [True: 0, False: 113k]
  ------------------
  714|      0|          if (*pui_value == 1) {
  ------------------
  |  Branch (714:15): [True: 0, False: 0]
  ------------------
  715|      0|            p_obj_exhaacplus_dec->aac_config.ld_decoder = 1;
  716|      0|          } else if (*pui_value == 0) {
  ------------------
  |  Branch (716:22): [True: 0, False: 0]
  ------------------
  717|      0|            p_obj_exhaacplus_dec->aac_config.ld_decoder = 0;
  718|      0|          } else {
  719|      0|            return (IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_LD_CONFIG);
  ------------------
  |  |   60|      0|#define IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_LD_CONFIG 0x00000812
  ------------------
  720|      0|          }
  721|      0|          break;
  722|      0|        }
  723|       |
  724|      0|        case IA_XHEAAC_DEC_CONFIG_PARAM_COUP_CHANNEL: {
  ------------------
  |  |   38|      0|#define IA_XHEAAC_DEC_CONFIG_PARAM_COUP_CHANNEL 0x000E
  ------------------
  |  Branch (724:9): [True: 0, False: 113k]
  ------------------
  725|      0|          if (*pui_value > 16) {
  ------------------
  |  Branch (725:15): [True: 0, False: 0]
  ------------------
  726|      0|            p_obj_exhaacplus_dec->aac_config.ui_coupling_channel = 1;
  727|      0|            return (IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_COUP_CHANNEL);
  ------------------
  |  |   51|      0|#define IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_COUP_CHANNEL 0x00000809
  ------------------
  728|      0|          }
  729|      0|          p_obj_exhaacplus_dec->aac_config.ui_coupling_channel = *pui_value;
  730|      0|          break;
  731|      0|        }
  732|       |
  733|      0|        case IA_XHEAAC_DEC_CONFIG_PARAM_DOWNMIX_STEREO: {
  ------------------
  |  |   39|      0|#define IA_XHEAAC_DEC_CONFIG_PARAM_DOWNMIX_STEREO 0x000F
  ------------------
  |  Branch (733:9): [True: 0, False: 113k]
  ------------------
  734|      0|          if ((*pui_value != 1) && (*pui_value != 0)) {
  ------------------
  |  Branch (734:15): [True: 0, False: 0]
  |  Branch (734:36): [True: 0, False: 0]
  ------------------
  735|      0|            p_obj_exhaacplus_dec->aac_config.downmix = 0;
  736|      0|            return (IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_DOWNMIX_STEREO);
  ------------------
  |  |   45|      0|#define IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_DOWNMIX_STEREO 0x00000803
  ------------------
  737|      0|          }
  738|      0|          p_obj_exhaacplus_dec->aac_config.downmix = *pui_value;
  739|      0|          break;
  740|      0|        }
  741|       |
  742|  14.2k|        case IA_XHEAAC_DEC_CONFIG_PARAM_DRC_EFFECT_TYPE: {
  ------------------
  |  |   29|  14.2k|#define IA_XHEAAC_DEC_CONFIG_PARAM_DRC_EFFECT_TYPE 0x0006
  ------------------
  |  Branch (742:9): [True: 14.2k, False: 99.6k]
  ------------------
  743|  14.2k|          if (((*pui_value_signed) > 8) || ((*pui_value_signed) < -1)) {
  ------------------
  |  Branch (743:15): [True: 11.5k, False: 2.64k]
  |  Branch (743:44): [True: 0, False: 2.64k]
  ------------------
  744|  11.5k|            p_obj_exhaacplus_dec->aac_config.ui_effect_type = -1;
  745|  11.5k|            return (IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_EFFECT_TYPE);
  ------------------
  |  |   61|  11.5k|#define IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_EFFECT_TYPE 0x00000813
  ------------------
  746|  11.5k|          }
  747|  2.64k|          p_obj_exhaacplus_dec->aac_config.ui_effect_type = *pui_value_signed;
  748|  2.64k|          break;
  749|  14.2k|        }
  750|  14.2k|        case IA_XHEAAC_DEC_CONFIG_PARAM_DRC_TARGET_LOUDNESS: {
  ------------------
  |  |   30|  14.2k|#define IA_XHEAAC_DEC_CONFIG_PARAM_DRC_TARGET_LOUDNESS 0x0007
  ------------------
  |  Branch (750:9): [True: 14.2k, False: 99.6k]
  ------------------
  751|  14.2k|          if (*pui_value_signed >= 0) {
  ------------------
  |  Branch (751:15): [True: 14.2k, False: 0]
  ------------------
  752|  14.2k|            p_obj_exhaacplus_dec->aac_config.ui_loud_norm_flag = 1;
  753|  14.2k|          }
  754|  14.2k|          *pui_value_signed = -(*pui_value_signed >> 2);
  755|  14.2k|          if (((*pui_value_signed) > 0) || ((*pui_value_signed) < -63)) {
  ------------------
  |  Branch (755:15): [True: 0, False: 14.2k]
  |  Branch (755:44): [True: 0, False: 14.2k]
  ------------------
  756|      0|            p_obj_exhaacplus_dec->aac_config.ui_target_loudness = 0;
  757|      0|            return (IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_TARGET_LOUDNESS);
  ------------------
  |  |   62|      0|#define IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_TARGET_LOUDNESS 0x00000814
  ------------------
  758|      0|          }
  759|  14.2k|          p_obj_exhaacplus_dec->aac_config.ui_target_loudness =
  760|  14.2k|              *pui_value_signed;
  761|  14.2k|          break;
  762|  14.2k|        }
  763|      0|        case IA_XHEAAC_DEC_CONFIG_PARAM_HQ_ESBR: {
  ------------------
  |  |   48|      0|#define IA_XHEAAC_DEC_CONFIG_PARAM_HQ_ESBR 0x0018
  ------------------
  |  Branch (763:9): [True: 0, False: 113k]
  ------------------
  764|      0|          if (((*pui_value_signed) != 0) && ((*pui_value_signed) != 1)) {
  ------------------
  |  Branch (764:15): [True: 0, False: 0]
  |  Branch (764:45): [True: 0, False: 0]
  ------------------
  765|      0|            p_obj_exhaacplus_dec->aac_config.ui_hq_esbr = 0;
  766|      0|            return (IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_ESBR_HQ_FLAG);
  ------------------
  |  |   63|      0|#define IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_ESBR_HQ_FLAG 0x00000815
  ------------------
  767|      0|          }
  768|      0|          p_obj_exhaacplus_dec->aac_config.ui_hq_esbr = *pui_value_signed;
  769|      0|          break;
  770|      0|        }
  771|      0|        case IA_XHEAAC_DEC_CONFIG_PARAM_PS_ENABLE: {
  ------------------
  |  |   49|      0|#define IA_XHEAAC_DEC_CONFIG_PARAM_PS_ENABLE 0x0019
  ------------------
  |  Branch (771:9): [True: 0, False: 113k]
  ------------------
  772|      0|          if (((*pui_value_signed) != 0) && ((*pui_value_signed) != 1)) {
  ------------------
  |  Branch (772:15): [True: 0, False: 0]
  |  Branch (772:45): [True: 0, False: 0]
  ------------------
  773|      0|            p_obj_exhaacplus_dec->aac_config.ui_enh_sbr_ps = 0;
  774|      0|            return (IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_ESBR_PS_FLAG);
  ------------------
  |  |   44|      0|#define IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_ESBR_PS_FLAG 0x00000802
  ------------------
  775|      0|          }
  776|      0|          p_obj_exhaacplus_dec->aac_config.ui_enh_sbr_ps = *pui_value_signed;
  777|      0|          break;
  778|      0|        }
  779|      0|        case IA_XHEAAC_DEC_CONFIG_PARAM_PEAK_LIMITER: {
  ------------------
  |  |   51|      0|#define IA_XHEAAC_DEC_CONFIG_PARAM_PEAK_LIMITER 0x001B
  ------------------
  |  Branch (779:9): [True: 0, False: 113k]
  ------------------
  780|      0|          if (((*pui_value_signed) != 0) && ((*pui_value_signed) != 1)) {
  ------------------
  |  Branch (780:15): [True: 0, False: 0]
  |  Branch (780:45): [True: 0, False: 0]
  ------------------
  781|      0|            p_obj_exhaacplus_dec->aac_config.peak_limiter_off = 0;
  782|      0|            return (IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_PEAK_LIM_FLAG_TYPE);
  ------------------
  |  |   48|      0|#define IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_PEAK_LIM_FLAG_TYPE 0x00000806
  ------------------
  783|      0|          }
  784|      0|          p_obj_exhaacplus_dec->aac_config.peak_limiter_off = *pui_value_signed;
  785|      0|          break;
  786|      0|        }
  787|      0|        case IA_XHEAAC_DEC_CONFIG_ERROR_CONCEALMENT: {
  ------------------
  |  |   53|      0|#define IA_XHEAAC_DEC_CONFIG_ERROR_CONCEALMENT 0x001D
  ------------------
  |  Branch (787:9): [True: 0, False: 113k]
  ------------------
  788|      0|          if (((*pui_value_signed) != 0) && ((*pui_value_signed) != 1)) {
  ------------------
  |  Branch (788:15): [True: 0, False: 0]
  |  Branch (788:45): [True: 0, False: 0]
  ------------------
  789|      0|            p_obj_exhaacplus_dec->aac_config.ui_err_conceal = 0;
  790|      0|            return (IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_ERR_CONCEAL_FLAG_TYPE);
  ------------------
  |  |   52|      0|#define IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_ERR_CONCEAL_FLAG_TYPE 0x0000080A
  ------------------
  791|      0|          }
  792|      0|          p_obj_exhaacplus_dec->aac_config.ui_err_conceal = *pui_value_signed;
  793|      0|          break;
  794|      0|        }
  795|      0|        case IA_XHEAAC_DEC_CONFIG_PARAM_ESBR: {
  ------------------
  |  |   66|      0|#define IA_XHEAAC_DEC_CONFIG_PARAM_ESBR 0x0028
  ------------------
  |  Branch (795:9): [True: 0, False: 113k]
  ------------------
  796|      0|          if (((*pui_value_signed) != 0) && ((*pui_value_signed) != 1)) {
  ------------------
  |  Branch (796:15): [True: 0, False: 0]
  |  Branch (796:45): [True: 0, False: 0]
  ------------------
  797|      0|            p_obj_exhaacplus_dec->aac_config.ui_enh_sbr = 1;
  798|      0|            return (IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_ESBR_FLAG);
  ------------------
  |  |   65|      0|#define IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_ESBR_FLAG 0x00000817
  ------------------
  799|      0|          }
  800|      0|          p_obj_exhaacplus_dec->aac_config.ui_enh_sbr = *pui_value_signed;
  801|      0|          break;
  802|      0|        }
  803|      0|#ifdef LOUDNESS_LEVELING_SUPPORT
  804|  14.2k|        case IA_XHEAAC_DEC_CONFIG_PARAM_DRC_LOUDNESS_LEVELING: {
  ------------------
  |  |   69|  14.2k|#define IA_XHEAAC_DEC_CONFIG_PARAM_DRC_LOUDNESS_LEVELING 0x0029
  ------------------
  |  Branch (804:9): [True: 14.2k, False: 99.6k]
  ------------------
  805|  14.2k|          if (((*pui_value_signed) != 0) && ((*pui_value_signed) != 1)) {
  ------------------
  |  Branch (805:15): [True: 12.0k, False: 2.17k]
  |  Branch (805:45): [True: 11.8k, False: 205]
  ------------------
  806|  11.8k|            p_obj_exhaacplus_dec->aac_config.ui_loudness_leveling_flag = 1;
  807|  11.8k|            return (IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_LOUDNESS_LEVELING_FLAG);
  ------------------
  |  |   67|  11.8k|#define IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_LOUDNESS_LEVELING_FLAG 0x00000818
  ------------------
  808|  11.8k|          }
  809|  2.37k|          p_obj_exhaacplus_dec->aac_config.ui_loudness_leveling_flag = *pui_value_signed;
  810|  2.37k|          break;
  811|  14.2k|        }
  812|      0|#endif
  813|      0|        default: { return IA_XHEAAC_DEC_API_FATAL_INVALID_CONFIG_PARAM; }
  ------------------
  |  |   34|      0|#define IA_XHEAAC_DEC_API_FATAL_INVALID_CONFIG_PARAM 0xFFFF8003
  ------------------
  |  Branch (813:9): [True: 0, False: 113k]
  ------------------
  814|   113k|      }
  815|  74.0k|      break;
  816|   113k|    }
  817|       |
  818|   948k|    case IA_API_CMD_GET_CONFIG_PARAM: {
  ------------------
  |  |   32|   948k|#define IA_API_CMD_GET_CONFIG_PARAM 0x0005
  ------------------
  |  Branch (818:5): [True: 948k, False: 2.22M]
  ------------------
  819|   948k|      UWORD32 i;
  820|   948k|      WORD32 *pvalue =
  821|   948k|          (WORD32 *)(&p_obj_exhaacplus_dec->aac_config.ui_pcm_wdsz);
  822|   948k|      if (IA_XHEAAC_DEC_CONFIG_PARAM_NUM_CHANNELS == i_idx) {
  ------------------
  |  |   25|   948k|#define IA_XHEAAC_DEC_CONFIG_PARAM_NUM_CHANNELS 0x0002
  ------------------
  |  Branch (822:11): [True: 12.4k, False: 936k]
  ------------------
  823|  12.4k|        if (p_obj_exhaacplus_dec->p_state_aac != NULL &&
  ------------------
  |  Branch (823:13): [True: 12.4k, False: 0]
  ------------------
  824|  12.4k|            p_obj_exhaacplus_dec->p_state_aac->heaac_mps_handle
  ------------------
  |  Branch (824:13): [True: 3.23k, False: 9.17k]
  ------------------
  825|  12.4k|                    .heaac_mps_present == 1) {
  826|  3.23k|          *pui_value = p_obj_exhaacplus_dec->p_state_aac->heaac_mps_handle
  827|  3.23k|                           .num_output_channels_at;
  828|  9.17k|        } else {
  829|  9.17k|          *pui_value = pvalue[i_idx];
  830|  9.17k|        }
  831|   936k|      } else if (IA_XHEAAC_DEC_CONFIG_PARAM_CHANNEL_MASK == i_idx) {
  ------------------
  |  |   26|   936k|#define IA_XHEAAC_DEC_CONFIG_PARAM_CHANNEL_MASK 0x0003
  ------------------
  |  Branch (831:18): [True: 12.4k, False: 923k]
  ------------------
  832|  12.4k|        if (p_obj_exhaacplus_dec->p_state_aac != NULL &&
  ------------------
  |  Branch (832:13): [True: 12.4k, False: 0]
  ------------------
  833|  12.4k|            p_obj_exhaacplus_dec->p_state_aac->heaac_mps_handle
  ------------------
  |  Branch (833:13): [True: 3.23k, False: 9.17k]
  ------------------
  834|  12.4k|                    .heaac_mps_present == 1) {
  835|  3.23k|          *pui_value = p_obj_exhaacplus_dec->p_state_aac->heaac_mps_handle
  836|  3.23k|                           .bs_config.ui_channel_mask;
  837|  9.17k|        } else {
  838|  9.17k|          *pui_value = pvalue[i_idx];
  839|  9.17k|        }
  840|  12.4k|      } else
  841|   923k|      if (i_idx >= 0 && i_idx <= 8) {
  ------------------
  |  Branch (841:11): [True: 923k, False: 0]
  |  Branch (841:25): [True: 99.2k, False: 824k]
  ------------------
  842|  99.2k|        *pui_value = pvalue[i_idx];
  843|   824k|      } else if (IA_ENHAACPLUS_DEC_CONFIG_GET_NUM_PRE_ROLL_FRAMES == i_idx) {
  ------------------
  |  |   61|   824k|#define IA_ENHAACPLUS_DEC_CONFIG_GET_NUM_PRE_ROLL_FRAMES 0x0024
  ------------------
  |  Branch (843:18): [True: 0, False: 824k]
  ------------------
  844|      0|        WORD32 *ptri_value = (WORD32 *)pv_value;
  845|      0|        ia_audio_specific_config_struct *ptr_audio_specific_config =
  846|      0|            ((ia_audio_specific_config_struct *)
  847|      0|                 p_obj_exhaacplus_dec->p_state_aac->ia_audio_specific_config);
  848|       |
  849|      0|        for (i = 0; i < MAX_AUDIO_PREROLLS + 1; i++) {
  ------------------
  |  |  249|      0|#define MAX_AUDIO_PREROLLS 3
  ------------------
  |  Branch (849:21): [True: 0, False: 0]
  ------------------
  850|      0|          if (ptr_audio_specific_config->str_usac_config.str_usac_dec_config
  ------------------
  |  Branch (850:15): [True: 0, False: 0]
  ------------------
  851|      0|                  .preroll_bytes[i] == 0) {
  852|      0|            break;
  853|      0|          }
  854|      0|        }
  855|       |
  856|      0|        *ptri_value = i;
  857|   824k|      } else if (IA_ENHAACPLUS_DEC_CONFIG_EXT_ELE_PTR == i_idx) {
  ------------------
  |  |   55|   824k|#define IA_ENHAACPLUS_DEC_CONFIG_EXT_ELE_PTR 0x001E
  ------------------
  |  Branch (857:18): [True: 12.4k, False: 812k]
  ------------------
  858|  12.4k|        ia_audio_specific_config_struct *ptr_audio_specific_config =
  859|  12.4k|            ((ia_audio_specific_config_struct *)
  860|  12.4k|                p_obj_exhaacplus_dec->p_state_aac->ia_audio_specific_config);
  861|       |
  862|  18.9k|        for (i = 0; i < ptr_audio_specific_config->str_usac_config
  ------------------
  |  Branch (862:21): [True: 6.50k, False: 12.4k]
  ------------------
  863|  18.9k|                            .str_usac_dec_config.num_config_extensions;
  864|  12.4k|             i++) {
  865|  6.50k|          pp_value[i] = ptr_audio_specific_config->str_usac_config
  866|  6.50k|                            .str_usac_dec_config.usac_cfg_ext_info_buf[i];
  867|  6.50k|        }
  868|       |
  869|  24.2k|        for (i = 0; i < ptr_audio_specific_config->str_usac_config
  ------------------
  |  Branch (869:21): [True: 11.8k, False: 12.4k]
  ------------------
  870|  24.2k|                            .str_usac_dec_config.num_elements;
  871|  12.4k|             i++) {
  872|  11.8k|          if (ptr_audio_specific_config->str_usac_config.str_usac_dec_config
  ------------------
  |  Branch (872:15): [True: 1.24k, False: 10.6k]
  ------------------
  873|  11.8k|                  .usac_ext_ele_payload_present[i]) {
  874|  1.24k|            pp_value[i + 16] =
  875|  1.24k|                ptr_audio_specific_config->str_usac_config.str_usac_dec_config
  876|  1.24k|                    .usac_ext_ele_payload_buf[i];
  877|  1.24k|          }
  878|  11.8k|        }
  879|   812k|      } else if (IA_ENHAACPLUS_DEC_CONFIG_EXT_ELE_BUF_SIZES == i_idx) {
  ------------------
  |  |   56|   812k|#define IA_ENHAACPLUS_DEC_CONFIG_EXT_ELE_BUF_SIZES 0x001F
  ------------------
  |  Branch (879:18): [True: 12.4k, False: 799k]
  ------------------
  880|  12.4k|        WORD32 *ptri_value = (WORD32 *)pv_value;
  881|  12.4k|        ia_audio_specific_config_struct *ptr_audio_specific_config =
  882|  12.4k|            ((ia_audio_specific_config_struct *)
  883|  12.4k|                 p_obj_exhaacplus_dec->p_state_aac->ia_audio_specific_config);
  884|  18.9k|        for (i = 0; i < ptr_audio_specific_config->str_usac_config
  ------------------
  |  Branch (884:21): [True: 6.50k, False: 12.4k]
  ------------------
  885|  18.9k|                            .str_usac_dec_config.num_config_extensions;
  886|  12.4k|             i++) {
  887|  6.50k|          ptri_value[i] = ptr_audio_specific_config->str_usac_config
  888|  6.50k|                              .str_usac_dec_config.usac_cfg_ext_info_len[i];
  889|  6.50k|        }
  890|  24.2k|        for (i = 0; i < ptr_audio_specific_config->str_usac_config
  ------------------
  |  Branch (890:21): [True: 11.8k, False: 12.4k]
  ------------------
  891|  24.2k|                            .str_usac_dec_config.num_elements;
  892|  12.4k|             i++) {
  893|  11.8k|          ptri_value[i + 16] =
  894|  11.8k|              ptr_audio_specific_config->str_usac_config.str_usac_dec_config
  895|  11.8k|                  .usac_ext_ele_payload_len[i];
  896|  11.8k|        }
  897|       |
  898|   799k|      } else if (IA_ENHAACPLUS_DEC_DRC_IS_CONFIG_CHANGED == i_idx) {
  ------------------
  |  |   62|   799k|#define IA_ENHAACPLUS_DEC_DRC_IS_CONFIG_CHANGED 0x0025
  ------------------
  |  Branch (898:18): [True: 0, False: 799k]
  ------------------
  899|      0|        *pui_value = p_obj_exhaacplus_dec->p_state_aac->drc_config_changed;
  900|   799k|      } else if (IA_ENHAACPLUS_DEC_DRC_APPLY_CROSSFADE == i_idx) {
  ------------------
  |  |   63|   799k|#define IA_ENHAACPLUS_DEC_DRC_APPLY_CROSSFADE 0x0026
  ------------------
  |  Branch (900:18): [True: 0, False: 799k]
  ------------------
  901|      0|        *pui_value = p_obj_exhaacplus_dec->p_state_aac->apply_crossfade;
  902|   799k|      } else if (IA_ENHAACPLUS_DEC_CONFIG_NUM_ELE == i_idx) {
  ------------------
  |  |   57|   799k|#define IA_ENHAACPLUS_DEC_CONFIG_NUM_ELE 0x0020
  ------------------
  |  Branch (902:18): [True: 12.4k, False: 787k]
  ------------------
  903|  12.4k|        UWORD32 *ptri_value = (UWORD32 *)pv_value;
  904|  12.4k|        ia_audio_specific_config_struct *ptr_audio_specific_config =
  905|  12.4k|            ((ia_audio_specific_config_struct *)
  906|  12.4k|                 p_obj_exhaacplus_dec->p_state_aac->ia_audio_specific_config);
  907|  12.4k|        *ptri_value = ptr_audio_specific_config->str_usac_config
  908|  12.4k|                          .str_usac_dec_config.num_elements;
  909|       |
  910|   787k|      } else if (IA_ENHAACPLUS_DEC_CONFIG_NUM_CONFIG_EXT == i_idx) {
  ------------------
  |  |   58|   787k|#define IA_ENHAACPLUS_DEC_CONFIG_NUM_CONFIG_EXT 0x0021
  ------------------
  |  Branch (910:18): [True: 12.4k, False: 774k]
  ------------------
  911|  12.4k|        UWORD32 *ptri_value = (UWORD32 *)pv_value;
  912|  12.4k|        ia_audio_specific_config_struct *ptr_audio_specific_config =
  913|  12.4k|            ((ia_audio_specific_config_struct *)
  914|  12.4k|                 p_obj_exhaacplus_dec->p_state_aac->ia_audio_specific_config);
  915|  12.4k|        *ptri_value = ptr_audio_specific_config->str_usac_config
  916|  12.4k|                          .str_usac_dec_config.num_config_extensions;
  917|   774k|      } else if (IA_ENHAACPLUS_DEC_CONFIG_GAIN_PAYLOAD_LEN == i_idx) {
  ------------------
  |  |   59|   774k|#define IA_ENHAACPLUS_DEC_CONFIG_GAIN_PAYLOAD_LEN 0x0022
  ------------------
  |  Branch (917:18): [True: 387k, False: 387k]
  ------------------
  918|   387k|        UWORD32 *ptri_value = (UWORD32 *)pv_value;
  919|   387k|        ia_audio_specific_config_struct *ptr_audio_specific_config =
  920|   387k|            ((ia_audio_specific_config_struct *)
  921|   387k|                 p_obj_exhaacplus_dec->p_state_aac->ia_audio_specific_config);
  922|   387k|        WORD32 preroll_counter = ptr_audio_specific_config->str_usac_config
  923|   387k|                                     .str_usac_dec_config.preroll_counter;
  924|   387k|        *ptri_value =
  925|   387k|            ptr_audio_specific_config->str_usac_config.str_usac_dec_config
  926|   387k|                .usac_ext_gain_payload_len[preroll_counter];
  927|   387k|      } else if (IA_ENHAACPLUS_DEC_CONFIG_GAIN_PAYLOAD_BUF == i_idx) {
  ------------------
  |  |   60|   387k|#define IA_ENHAACPLUS_DEC_CONFIG_GAIN_PAYLOAD_BUF 0x0023
  ------------------
  |  Branch (927:18): [True: 387k, False: 0]
  ------------------
  928|   387k|        WORD32 payload_buffer_offeset = 0;
  929|   387k|        ia_audio_specific_config_struct *ptr_audio_specific_config =
  930|   387k|            ((ia_audio_specific_config_struct *)
  931|   387k|                 p_obj_exhaacplus_dec->p_state_aac->ia_audio_specific_config);
  932|   387k|        WORD32 preroll_counter = ptr_audio_specific_config->str_usac_config
  933|   387k|                                     .str_usac_dec_config.preroll_counter;
  934|   388k|        for (i = 0; i < (UWORD32)preroll_counter; i++)
  ------------------
  |  Branch (934:21): [True: 1.45k, False: 387k]
  ------------------
  935|  1.45k|          payload_buffer_offeset +=
  936|  1.45k|              ptr_audio_specific_config->str_usac_config.str_usac_dec_config
  937|  1.45k|                  .usac_ext_gain_payload_len[i] *
  938|  1.45k|              sizeof(WORD8);
  939|   387k|        *pp_value = ptr_audio_specific_config->str_usac_config
  940|   387k|                        .str_usac_dec_config.usac_ext_gain_payload_buf +
  941|   387k|                    payload_buffer_offeset;
  942|   387k|      } else if (IA_XHEAAC_DEC_CONFIG_PARAM_AOT == i_idx) {
  ------------------
  |  |   50|      0|#define IA_XHEAAC_DEC_CONFIG_PARAM_AOT 0x001A
  ------------------
  |  Branch (942:18): [True: 0, False: 0]
  ------------------
  943|      0|        if (p_obj_exhaacplus_dec->p_state_aac != NULL) {
  ------------------
  |  Branch (943:13): [True: 0, False: 0]
  ------------------
  944|      0|          if (p_obj_exhaacplus_dec->aac_config.ui_mp4_flag == 1) {
  ------------------
  |  Branch (944:15): [True: 0, False: 0]
  ------------------
  945|      0|            ia_audio_specific_config_struct *ptr_audio_specific_config =
  946|      0|                ((ia_audio_specific_config_struct *)
  947|      0|                    p_obj_exhaacplus_dec->p_state_aac->ia_audio_specific_config);
  948|      0|            *pui_value = ptr_audio_specific_config->audio_object_type;
  949|      0|          } else {
  950|      0|            *pui_value = p_obj_exhaacplus_dec->p_state_aac->audio_object_type;
  951|      0|          }
  952|      0|        } else {
  953|      0|          *pui_value = AOT_AAC_LC;
  954|      0|        }
  955|      0|      }
  956|      0|#ifdef LOUDNESS_LEVELING_SUPPORT
  957|      0|      else if (IA_XHEAAC_DEC_CONFIG_PARAM_DRC_LOUDNESS_LEVELING == i_idx) {
  ------------------
  |  |   69|      0|#define IA_XHEAAC_DEC_CONFIG_PARAM_DRC_LOUDNESS_LEVELING 0x0029
  ------------------
  |  Branch (957:16): [True: 0, False: 0]
  ------------------
  958|      0|        WORD32 *ui_value =
  959|      0|            (WORD32 *)(&p_obj_exhaacplus_dec->aac_config.ui_loudness_leveling_flag);
  960|      0|        *pui_value = *ui_value;
  961|      0|      }
  962|      0|#endif
  963|      0|      else if (IA_XHEAAC_DEC_CONFIG_PARAM_DRC_CUT == i_idx) {
  ------------------
  |  |   42|      0|#define IA_XHEAAC_DEC_CONFIG_PARAM_DRC_CUT 0x0012
  ------------------
  |  Branch (963:16): [True: 0, False: 0]
  ------------------
  964|      0|        UWORD32 *ui_value = (UWORD32 *)(&p_obj_exhaacplus_dec->aac_config.ui_drc_cut);
  965|      0|        *pf_value = (*ui_value) / 100.0f;
  966|      0|      } else if (IA_XHEAAC_DEC_CONFIG_PARAM_DRC_BOOST == i_idx) {
  ------------------
  |  |   43|      0|#define IA_XHEAAC_DEC_CONFIG_PARAM_DRC_BOOST 0x0013
  ------------------
  |  Branch (966:18): [True: 0, False: 0]
  ------------------
  967|      0|        UWORD32 *ui_value = (UWORD32 *)(&p_obj_exhaacplus_dec->aac_config.ui_drc_boost);
  968|      0|        *pf_value = (*ui_value) / 100.0f;
  969|      0|      } else if (IA_XHEAAC_DEC_CONFIG_PARAM_DRC_MODE_CUT == i_idx) {
  ------------------
  |  |   72|      0|#define IA_XHEAAC_DEC_CONFIG_PARAM_DRC_MODE_CUT 0x002A
  ------------------
  |  Branch (969:18): [True: 0, False: 0]
  ------------------
  970|      0|        UWORD8 *ui_value = (&p_obj_exhaacplus_dec->aac_config.ui_drc_mode_cut);
  971|      0|        *pb_value = (*ui_value);
  972|      0|      } else if (IA_XHEAAC_DEC_CONFIG_PARAM_DRC_MODE_BOOST == i_idx) {
  ------------------
  |  |   73|      0|#define IA_XHEAAC_DEC_CONFIG_PARAM_DRC_MODE_BOOST 0x002B
  ------------------
  |  Branch (972:18): [True: 0, False: 0]
  ------------------
  973|      0|        UWORD8 *ui_value = (&p_obj_exhaacplus_dec->aac_config.ui_drc_mode_boost);
  974|      0|        *pb_value = *ui_value;
  975|      0|      }
  976|      0|      else {
  977|      0|        return IA_XHEAAC_DEC_API_FATAL_INVALID_CONFIG_PARAM;
  ------------------
  |  |   34|      0|#define IA_XHEAAC_DEC_API_FATAL_INVALID_CONFIG_PARAM 0xFFFF8003
  ------------------
  978|      0|      }
  979|   948k|      break;
  980|   948k|    }
  981|       |
  982|   948k|    case IA_API_CMD_GET_MEMTABS_SIZE: {
  ------------------
  |  |   34|  14.2k|#define IA_API_CMD_GET_MEMTABS_SIZE 0x0006
  ------------------
  |  Branch (982:5): [True: 14.2k, False: 3.16M]
  ------------------
  983|  14.2k|      *pui_value = (sizeof(ia_mem_info_struct) + sizeof(pVOID *)) *
  984|  14.2k|                   (IA_ENHAACPDEC_NUM_MEMTABS);
  ------------------
  |  |  121|  14.2k|#define IA_ENHAACPDEC_NUM_MEMTABS (4)
  ------------------
  985|  14.2k|      break;
  986|   948k|    }
  987|      0|    case IA_API_CMD_GET_LOUDNESS_VAL: {
  ------------------
  |  |   63|      0|#define IA_API_CMD_GET_LOUDNESS_VAL 0x001F
  ------------------
  |  Branch (987:5): [True: 0, False: 3.17M]
  ------------------
  988|      0|      *pui_value = p_obj_exhaacplus_dec->aac_config.output_level;
  989|      0|      break;
  990|   948k|    }
  991|  14.2k|    case IA_API_CMD_SET_MEMTABS_PTR: {
  ------------------
  |  |   35|  14.2k|#define IA_API_CMD_SET_MEMTABS_PTR 0x0007
  ------------------
  |  Branch (991:5): [True: 14.2k, False: 3.16M]
  ------------------
  992|  14.2k|      if (pv_value == NULL) return IA_XHEAAC_DEC_API_FATAL_MEM_ALLOC;
  ------------------
  |  |   33|      0|#define IA_XHEAAC_DEC_API_FATAL_MEM_ALLOC 0xFFFF8002
  ------------------
  |  Branch (992:11): [True: 0, False: 14.2k]
  ------------------
  993|  14.2k|      memset(pv_value, 0, (sizeof(ia_mem_info_struct) + sizeof(pVOID *)) *
  994|  14.2k|                              (IA_ENHAACPDEC_NUM_MEMTABS));
  ------------------
  |  |  121|  14.2k|#define IA_ENHAACPDEC_NUM_MEMTABS (4)
  ------------------
  995|       |
  996|  14.2k|      p_obj_exhaacplus_dec->p_mem_info_aac = pv_value;
  997|  14.2k|      p_obj_exhaacplus_dec->pp_mem_aac =
  998|  14.2k|          (pVOID *)((WORD8 *)pv_value +
  999|  14.2k|                    sizeof(ia_mem_info_struct) * IA_ENHAACPDEC_NUM_MEMTABS);
  ------------------
  |  |  121|  14.2k|#define IA_ENHAACPDEC_NUM_MEMTABS (4)
  ------------------
 1000|       |
 1001|  14.2k|      break;
 1002|  14.2k|    }
 1003|      0|    case IA_API_CMD_GET_N_MEMTABS: {
  ------------------
  |  |   36|      0|#define IA_API_CMD_GET_N_MEMTABS 0x0008
  ------------------
  |  Branch (1003:5): [True: 0, False: 3.17M]
  ------------------
 1004|      0|      *pui_value = IA_ENHAACPDEC_NUM_MEMTABS;
  ------------------
  |  |  121|      0|#define IA_ENHAACPDEC_NUM_MEMTABS (4)
  ------------------
 1005|      0|      break;
 1006|  14.2k|    }
 1007|       |
 1008|      0|    case IA_API_CMD_GET_N_TABLES: {
  ------------------
  |  |   57|      0|#define IA_API_CMD_GET_N_TABLES 0x0019
  ------------------
  |  Branch (1008:5): [True: 0, False: 3.17M]
  ------------------
 1009|      0|      *pui_value = NUM_AAC_TABLES + NUM_MPS_TABLES;
  ------------------
  |  |  123|      0|#define NUM_AAC_TABLES 8
  ------------------
                    *pui_value = NUM_AAC_TABLES + NUM_MPS_TABLES;
  ------------------
  |  |   29|      0|#define NUM_MPS_TABLES (13)
  ------------------
 1010|      0|      break;
 1011|  14.2k|    }
 1012|   774k|    case IA_API_CMD_EXECUTE: {
  ------------------
  |  |   38|   774k|#define IA_API_CMD_EXECUTE 0x0009
  ------------------
  |  Branch (1012:5): [True: 774k, False: 2.40M]
  ------------------
 1013|   774k|      switch (i_idx) {
 1014|   387k|        case IA_CMD_TYPE_DO_EXECUTE: {
  ------------------
  |  |   82|   387k|#define IA_CMD_TYPE_DO_EXECUTE 0x0100
  ------------------
  |  Branch (1014:9): [True: 387k, False: 387k]
  ------------------
 1015|   387k|          WORD32 err_code = 0;
 1016|   387k|          if (!p_obj_exhaacplus_dec->p_state_aac->ui_init_done ||
  ------------------
  |  Branch (1016:15): [True: 1.38k, False: 386k]
  ------------------
 1017|   386k|              p_obj_exhaacplus_dec->p_state_aac->fatal_err_present) {
  ------------------
  |  Branch (1017:15): [True: 533, False: 385k]
  ------------------
 1018|  1.91k|            err_code = IA_FATAL_ERROR;
  ------------------
  |  |   25|  1.91k|#define IA_FATAL_ERROR 0x80000000
  ------------------
 1019|   385k|          } else {
 1020|   385k|            memset(p_obj_exhaacplus_dec->p_state_aac->qshift_adj, 0,
 1021|   385k|                   sizeof(p_obj_exhaacplus_dec->p_state_aac->qshift_adj));
 1022|   385k|            p_obj_exhaacplus_dec->p_state_aac->qshift_cnt = 0;
 1023|   385k|            err_code = ixheaacd_dec_execute(p_obj_exhaacplus_dec);
 1024|   385k|          }
 1025|   387k|          if (err_code != IA_NO_ERROR) {
  ------------------
  |  |   23|   387k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (1025:15): [True: 13.4k, False: 373k]
  ------------------
 1026|  13.4k|            if (err_code < 0) {
  ------------------
  |  Branch (1026:17): [True: 4.05k, False: 9.39k]
  ------------------
 1027|  4.05k|              p_obj_exhaacplus_dec->p_state_aac->fatal_err_present = 1;
 1028|  4.05k|            }
 1029|  13.4k|            p_obj_exhaacplus_dec->p_state_aac->i_bytes_consumed =
 1030|  13.4k|                p_obj_exhaacplus_dec->p_state_aac->ui_in_bytes;
 1031|  13.4k|          }
 1032|   387k|          return err_code;
 1033|      0|          break;
 1034|      0|        }
 1035|   387k|        case IA_CMD_TYPE_DONE_QUERY: {
  ------------------
  |  |   83|   387k|#define IA_CMD_TYPE_DONE_QUERY 0x0200
  ------------------
  |  Branch (1035:9): [True: 387k, False: 387k]
  ------------------
 1036|   387k|          if (p_obj_exhaacplus_dec->p_state_aac->ui_input_over == 1) {
  ------------------
  |  Branch (1036:15): [True: 0, False: 387k]
  ------------------
 1037|      0|            *pui_value = 1;
 1038|   387k|          } else {
 1039|   387k|            *pui_value = 0;
 1040|   387k|          }
 1041|       |
 1042|   387k|          break;
 1043|      0|        }
 1044|      0|        default: { return IA_XHEAAC_DEC_API_FATAL_INVALID_EXECUTE_TYPE; }
  ------------------
  |  |   35|      0|#define IA_XHEAAC_DEC_API_FATAL_INVALID_EXECUTE_TYPE 0xFFFF8004
  ------------------
  |  Branch (1044:9): [True: 0, False: 774k]
  ------------------
 1045|   774k|      };
 1046|   387k|      break;
 1047|   774k|    }
 1048|   410k|    case IA_API_CMD_GET_CURIDX_INPUT_BUF: {
  ------------------
  |  |   41|   410k|#define IA_API_CMD_GET_CURIDX_INPUT_BUF 0x000B
  ------------------
  |  Branch (1048:5): [True: 410k, False: 2.76M]
  ------------------
 1049|   410k|      *pui_value = p_obj_exhaacplus_dec->p_state_aac->i_bytes_consumed;
 1050|   410k|      break;
 1051|   774k|    }
 1052|   410k|    case IA_API_CMD_SET_INPUT_BYTES: {
  ------------------
  |  |   42|   410k|#define IA_API_CMD_SET_INPUT_BYTES 0x000C
  ------------------
  |  Branch (1052:5): [True: 410k, False: 2.76M]
  ------------------
 1053|   410k|      p_obj_exhaacplus_dec->p_state_aac->ui_in_bytes = *pui_value;
 1054|   410k|      break;
 1055|   774k|    }
 1056|   387k|    case IA_API_CMD_GET_OUTPUT_BYTES: {
  ------------------
  |  |   43|   387k|#define IA_API_CMD_GET_OUTPUT_BYTES 0x000D
  ------------------
  |  Branch (1056:5): [True: 387k, False: 2.78M]
  ------------------
 1057|   387k|      if (1 == i_idx) {
  ------------------
  |  Branch (1057:11): [True: 0, False: 387k]
  ------------------
 1058|      0|        *pui_value = p_obj_exhaacplus_dec->p_state_aac->ui_mps_out_bytes;
 1059|   387k|      } else {
 1060|   387k|        *pui_value = p_obj_exhaacplus_dec->p_state_aac->ui_out_bytes;
 1061|   387k|      }
 1062|   387k|      if (p_obj_exhaacplus_dec->p_state_aac->audio_object_type == AOT_USAC) {
  ------------------
  |  Branch (1062:11): [True: 184k, False: 202k]
  ------------------
 1063|   184k|        ia_audio_specific_config_struct *ptr_audio_specific_config =
 1064|   184k|            ((ia_audio_specific_config_struct *)
 1065|   184k|                 p_obj_exhaacplus_dec->p_state_aac->ia_audio_specific_config);
 1066|       |
 1067|   184k|        WORD32 preroll_counter = ptr_audio_specific_config->str_usac_config
 1068|   184k|                                     .str_usac_dec_config.preroll_counter;
 1069|       |
 1070|   184k|        *pui_value = ptr_audio_specific_config->str_usac_config
 1071|   184k|                         .str_usac_dec_config.preroll_bytes[preroll_counter];
 1072|       |
 1073|   184k|        preroll_counter++;
 1074|   184k|        if (preroll_counter > (MAX_AUDIO_PREROLLS + 1)) return IA_FATAL_ERROR;
  ------------------
  |  |  249|   184k|#define MAX_AUDIO_PREROLLS 3
  ------------------
                      if (preroll_counter > (MAX_AUDIO_PREROLLS + 1)) return IA_FATAL_ERROR;
  ------------------
  |  |   25|    291|#define IA_FATAL_ERROR 0x80000000
  ------------------
  |  Branch (1074:13): [True: 291, False: 184k]
  ------------------
 1075|   184k|        ptr_audio_specific_config->str_usac_config.str_usac_dec_config
 1076|   184k|            .preroll_counter = preroll_counter;
 1077|   184k|      }
 1078|   387k|      break;
 1079|   387k|    }
 1080|   387k|    case IA_API_CMD_INPUT_OVER: {
  ------------------
  |  |   44|  14.2k|#define IA_API_CMD_INPUT_OVER 0x000E
  ------------------
  |  Branch (1080:5): [True: 14.2k, False: 3.16M]
  ------------------
 1081|  14.2k|      p_obj_exhaacplus_dec->p_state_aac->ui_input_over = 1;
 1082|  14.2k|      break;
 1083|   387k|    }
 1084|      0|    default: { return IA_XHEAAC_DEC_API_FATAL_INVALID_CMD; }
  ------------------
  |  |   36|      0|#define IA_XHEAAC_DEC_API_FATAL_INVALID_CMD 0xFFFF8005
  ------------------
  |  Branch (1084:5): [True: 0, False: 3.17M]
  ------------------
 1085|  3.17M|  };
 1086|  2.72M|  return IA_NO_ERROR;
  ------------------
  |  |   23|  2.72M|#define IA_NO_ERROR 0x00000000
  ------------------
 1087|  3.17M|}
ixheaacd_fill_aac_mem_tables:
 1352|  14.2k|    ia_exhaacplus_dec_api_struct *p_obj_exhaacplus_dec) {
 1353|  14.2k|  ia_mem_info_struct *p_mem_info_aac;
 1354|       |
 1355|  14.2k|  WORD32 num_channels;
 1356|  14.2k|  WORD32 channels;
 1357|  14.2k|  WORD32 buffer_size;
 1358|       |
 1359|  14.2k|  if (p_obj_exhaacplus_dec->aac_config.ui_max_channels > 2) {
  ------------------
  |  Branch (1359:7): [True: 14.2k, False: 0]
  ------------------
 1360|  14.2k|    num_channels = (p_obj_exhaacplus_dec->aac_config.ui_max_channels + 1);
 1361|  14.2k|  } else
 1362|       |
 1363|      0|  {
 1364|      0|    num_channels = p_obj_exhaacplus_dec->aac_config.ui_max_channels;
 1365|      0|  }
 1366|       |
 1367|  14.2k|  channels = num_channels;
 1368|  14.2k|  buffer_size = ixheaacd_persistent_buffer_sizes(num_channels);
 1369|       |
 1370|  14.2k|  {
 1371|  14.2k|    p_mem_info_aac =
 1372|  14.2k|        &p_obj_exhaacplus_dec->p_mem_info_aac[IA_ENHAACPLUS_DEC_PERSIST_IDX];
  ------------------
  |  |   32|  14.2k|#define IA_ENHAACPLUS_DEC_PERSIST_IDX (0)
  ------------------
 1373|  14.2k|    p_mem_info_aac->ui_size =
 1374|  14.2k|        IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_aac_dec_state_struct), BYTE_ALIGN_8) +
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1375|  14.2k|        channels *
 1376|  14.2k|            IXHEAAC_GET_SIZE_ALIGNED(sizeof(struct ia_aac_persistent_struct), BYTE_ALIGN_8) +
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1377|  14.2k|        buffer_size + channels * ixheaacd_getsize_sbr_persistent() + channels * 16 +
 1378|  14.2k|        ixheaacd_mps_persistent_buffer_sizes();
 1379|  14.2k|    p_mem_info_aac->ui_size += IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_dec_data_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1380|  14.2k|    p_mem_info_aac->ui_size +=
 1381|  14.2k|        IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_audio_specific_config_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1382|  14.2k|    p_mem_info_aac->ui_size += IXHEAAC_GET_SIZE_ALIGNED(MAX_HEADER_BUF_SIZE, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1383|  14.2k|    p_mem_info_aac->ui_alignment = 16;
 1384|  14.2k|    p_mem_info_aac->ui_type = IA_MEMTYPE_PERSIST;
  ------------------
  |  |   51|  14.2k|#define IA_MEMTYPE_PERSIST 0x00
  ------------------
 1385|  14.2k|  }
 1386|       |
 1387|  14.2k|  {
 1388|  14.2k|    p_mem_info_aac =
 1389|  14.2k|        &p_obj_exhaacplus_dec->p_mem_info_aac[IA_ENHAACPLUS_DEC_SCRATCH_IDX];
  ------------------
  |  |   33|  14.2k|#define IA_ENHAACPLUS_DEC_SCRATCH_IDX (1)
  ------------------
 1390|       |
 1391|  14.2k|    p_mem_info_aac->ui_size = MAX_SCR_SIZE;
  ------------------
  |  |  167|  14.2k|#define MAX_SCR_SIZE (max(max(HEAACV2_MAX_SIZE, ELDV2_MAX_SIZE), LD_MAX_SIZE))
  |  |  ------------------
  |  |  |  |   74|   113k|#define max(a, b) (((a) > (b)) ? (a) : (b))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:20): [Folded, False: 14.2k]
  |  |  |  |  |  Branch (74:22): [True: 0, Folded]
  |  |  |  |  |  Branch (74:22): [True: 0, Folded]
  |  |  |  |  |  Branch (74:22): [True: 0, Folded]
  |  |  |  |  |  Branch (74:22): [True: 0, Folded]
  |  |  |  |  |  Branch (74:22): [Folded, False: 14.2k]
  |  |  |  |  |  Branch (74:28): [True: 0, Folded]
  |  |  |  |  |  Branch (74:35): [True: 0, Folded]
  |  |  |  |  |  Branch (74:35): [True: 0, Folded]
  |  |  |  |  |  Branch (74:35): [True: 0, Folded]
  |  |  |  |  |  Branch (74:35): [True: 0, Folded]
  |  |  |  |  |  Branch (74:35): [Folded, False: 0]
  |  |  |  |  |  Branch (74:41): [True: 14.2k, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1392|       |
 1393|  14.2k|    p_mem_info_aac->ui_alignment = 8;
 1394|  14.2k|    p_mem_info_aac->ui_type = IA_MEMTYPE_SCRATCH;
  ------------------
  |  |   53|  14.2k|#define IA_MEMTYPE_SCRATCH 0x01
  ------------------
 1395|  14.2k|  }
 1396|  14.2k|  {
 1397|  14.2k|    p_mem_info_aac =
 1398|  14.2k|        &p_obj_exhaacplus_dec->p_mem_info_aac[IA_ENHAACPLUS_DEC_INPUT_IDX];
  ------------------
  |  |   34|  14.2k|#define IA_ENHAACPLUS_DEC_INPUT_IDX (2)
  ------------------
 1399|       |
 1400|  14.2k|    p_mem_info_aac->ui_size = IA_MAX_INP_BUFFER_SIZE;
  ------------------
  |  |   44|  14.2k|#define IA_MAX_INP_BUFFER_SIZE (8 * 1024 + 11)
  ------------------
 1401|       |
 1402|  14.2k|    p_mem_info_aac->ui_alignment = 8;
 1403|  14.2k|    p_mem_info_aac->ui_type = IA_MEMTYPE_INPUT;
  ------------------
  |  |   55|  14.2k|#define IA_MEMTYPE_INPUT 0x02
  ------------------
 1404|  14.2k|  }
 1405|  14.2k|  {
 1406|  14.2k|    p_mem_info_aac =
 1407|  14.2k|        &p_obj_exhaacplus_dec->p_mem_info_aac[IA_ENHAACPLUS_DEC_OUTPUT_IDX];
  ------------------
  |  |   35|  14.2k|#define IA_ENHAACPLUS_DEC_OUTPUT_IDX (3)
  ------------------
 1408|  14.2k|    p_mem_info_aac->ui_size = IA_ENHAACPLUS_DEC_OUT_BUF_SIZE;
  ------------------
  |  |   47|  14.2k|  (IA_MAX_USAC_CH * IA_MAX_PREROLL_FRAMES * IA_MAX_OUT_SAMPLES_PER_FRAME * \
  |  |  ------------------
  |  |  |  |   39|  14.2k|#define IA_MAX_USAC_CH (2)
  |  |  ------------------
  |  |                 (IA_MAX_USAC_CH * IA_MAX_PREROLL_FRAMES * IA_MAX_OUT_SAMPLES_PER_FRAME * \
  |  |  ------------------
  |  |  |  |   37|  14.2k|#define IA_MAX_PREROLL_FRAMES (4)
  |  |  ------------------
  |  |                 (IA_MAX_USAC_CH * IA_MAX_PREROLL_FRAMES * IA_MAX_OUT_SAMPLES_PER_FRAME * \
  |  |  ------------------
  |  |  |  |   40|  14.2k|#define IA_MAX_OUT_SAMPLES_PER_FRAME (4096)
  |  |  ------------------
  |  |   48|  14.2k|   IA_MAX_OUTPUT_PCM_SIZE)
  |  |  ------------------
  |  |  |  |   38|  14.2k|#define IA_MAX_OUTPUT_PCM_SIZE (3)
  |  |  ------------------
  ------------------
 1409|  14.2k|    p_mem_info_aac->ui_alignment = 8;
 1410|  14.2k|    p_mem_info_aac->ui_type = IA_MEMTYPE_OUTPUT;
  ------------------
  |  |   57|  14.2k|#define IA_MEMTYPE_OUTPUT 0x03
  ------------------
 1411|  14.2k|  }
 1412|  14.2k|  return;
 1413|  14.2k|}
ixheaacd_mps_payload:
 1510|  3.33k|                          ia_exhaacplus_dec_api_struct *p_obj_exhaacplus_dec) {
 1511|  3.33k|  struct ia_bit_buf_struct local_bit_buff;
 1512|  3.33k|  struct ia_bit_buf_struct *it_bit_buff;
 1513|  3.33k|  if (self->ptr_mps_data != NULL) {
  ------------------
  |  Branch (1513:7): [True: 2.32k, False: 1.01k]
  ------------------
 1514|  2.32k|    ixheaacd_create_init_bit_buf(&local_bit_buff, (UWORD8 *)self->ptr_mps_data,
 1515|  2.32k|                                 (self->left_mps_bits >> 3) + 1);
 1516|  2.32k|  }
 1517|       |
 1518|  3.33k|  local_bit_buff.xaac_jmp_buf =
 1519|  3.33k|      &p_obj_exhaacplus_dec->p_state_aac->xaac_jmp_buf;
 1520|       |
 1521|  3.33k|  it_bit_buff = &local_bit_buff;
 1522|       |
 1523|  3.33k|  it_bit_buff->bit_pos = self->mps_bits_pos;
 1524|  3.33k|  it_bit_buff->cnt_bits = self->left_mps_bits;
 1525|       |
 1526|  8.09k|  while (self->left_mps_bits >= 8) {
  ------------------
  |  Branch (1526:10): [True: 4.75k, False: 3.33k]
  ------------------
 1527|  4.75k|    ixheaacd_extension_payload(
 1528|  4.75k|        it_bit_buff, &self->left_mps_bits,
 1529|  4.75k|        &p_obj_exhaacplus_dec->p_state_aac->mps_dec_handle);
 1530|  4.75k|  }
 1531|  3.33k|}
ixheaacd_dec_init:
 1534|  22.7k|    ia_exhaacplus_dec_api_struct *p_obj_exhaacplus_dec) {
 1535|  22.7k|  FLAG frame_status = 1;
 1536|  22.7k|  WORD32 frame_size_1;
 1537|  22.7k|  WORD32 sample_rate_1;
 1538|  22.7k|  WORD16 num_channels_1;
 1539|  22.7k|  WORD32 ps_detected = 0;
 1540|  22.7k|  UWORD8 *in_buffer;
 1541|  22.7k|  WORD16 *time_data;
 1542|  22.7k|  WORD ch_idx;
 1543|  22.7k|  WORD sbr_present_flag = 0;
 1544|  22.7k|  UWORD8 *mps_buffer;
 1545|  22.7k|  ia_aac_dec_state_struct *p_state_enhaacplus_dec;
 1546|       |
 1547|  22.7k|  WORD32 error_code = IA_NO_ERROR;
  ------------------
  |  |   23|  22.7k|#define IA_NO_ERROR 0x00000000
  ------------------
 1548|  22.7k|  WORD32 persistent_used = 0;
 1549|  22.7k|  IA_ERRORCODE err_code = IA_NO_ERROR;
  ------------------
  |  |   23|  22.7k|#define IA_NO_ERROR 0x00000000
  ------------------
 1550|  22.7k|  struct ia_aac_persistent_struct *aac_persistent_mem;
 1551|  22.7k|  struct ia_sbr_pers_struct *sbr_persistent_mem;
 1552|  22.7k|  WORD32 ret_val;
 1553|       |
 1554|  22.7k|  p_obj_exhaacplus_dec->p_state_aac =
 1555|  22.7k|      p_obj_exhaacplus_dec->pp_mem_aac[IA_ENHAACPLUS_DEC_PERSIST_IDX];
  ------------------
  |  |   32|  22.7k|#define IA_ENHAACPLUS_DEC_PERSIST_IDX (0)
  ------------------
 1556|       |
 1557|  22.7k|  if (p_obj_exhaacplus_dec->p_state_aac->ui_init_done)
  ------------------
  |  Branch (1557:7): [True: 0, False: 22.7k]
  ------------------
 1558|      0|  {
 1559|      0|    return IA_NO_ERROR;
  ------------------
  |  |   23|      0|#define IA_NO_ERROR 0x00000000
  ------------------
 1560|      0|  }
 1561|       |
 1562|  22.7k|  p_obj_exhaacplus_dec->p_state_aac->preroll_config_present = 0;
 1563|       |
 1564|  22.7k|  if (p_obj_exhaacplus_dec->p_state_aac != NULL) {
  ------------------
  |  Branch (1564:7): [True: 22.7k, False: 0]
  ------------------
 1565|  22.7k|    ret_val = setjmp(p_obj_exhaacplus_dec->p_state_aac->xaac_jmp_buf);
 1566|  22.7k|    if (ret_val != 0) {
  ------------------
  |  Branch (1566:9): [True: 966, False: 21.8k]
  ------------------
 1567|    966|      p_obj_exhaacplus_dec->p_state_aac->i_bytes_consumed =
 1568|    966|          p_obj_exhaacplus_dec->p_state_aac->ui_in_bytes;
 1569|    966|      p_obj_exhaacplus_dec->p_state_aac->ui_out_bytes = 0;
 1570|    966|      return IA_NO_ERROR;
  ------------------
  |  |   23|    966|#define IA_NO_ERROR 0x00000000
  ------------------
 1571|    966|    }
 1572|  22.7k|  }
 1573|       |
 1574|  21.8k|  time_data = (WORD16 *)(p_obj_exhaacplus_dec
 1575|  21.8k|                             ->pp_mem_aac[IA_ENHAACPLUS_DEC_OUTPUT_IDX]);
  ------------------
  |  |   35|  21.8k|#define IA_ENHAACPLUS_DEC_OUTPUT_IDX (3)
  ------------------
 1576|       |
 1577|  22.7k|  if (p_obj_exhaacplus_dec->aac_config.ui_flush_cmd == 0) {
  ------------------
  |  Branch (1577:7): [True: 22.7k, False: 18.4E]
  ------------------
 1578|  22.7k|    in_buffer = p_obj_exhaacplus_dec->pp_mem_aac[IA_ENHAACPLUS_DEC_INPUT_IDX];
  ------------------
  |  |   34|  22.7k|#define IA_ENHAACPLUS_DEC_INPUT_IDX (2)
  ------------------
 1579|  18.4E|  } else {
 1580|  18.4E|    in_buffer = p_obj_exhaacplus_dec->p_state_aac->header_ptr;
 1581|  18.4E|  }
 1582|       |
 1583|  21.8k|  p_state_enhaacplus_dec = p_obj_exhaacplus_dec->p_state_aac;
 1584|       |
 1585|  21.8k|  p_state_enhaacplus_dec->aac_scratch_mem_v =
 1586|  21.8k|      p_obj_exhaacplus_dec->pp_mem_aac[IA_ENHAACPLUS_DEC_SCRATCH_IDX];
  ------------------
  |  |   33|  21.8k|#define IA_ENHAACPLUS_DEC_SCRATCH_IDX (1)
  ------------------
 1587|  21.8k|  p_obj_exhaacplus_dec->p_state_aac->huffman_code_book_scl =
 1588|  21.8k|      p_obj_exhaacplus_dec->aac_tables.pstr_huffmann_tables
 1589|  21.8k|          ->huffman_code_book_scl;
 1590|  21.8k|  mps_buffer = p_obj_exhaacplus_dec->p_state_aac->mps_buffer;
 1591|  21.8k|  p_state_enhaacplus_dec->mps_header = -1;
 1592|  21.8k|  p_obj_exhaacplus_dec->p_state_aac->huffman_code_book_scl_index =
 1593|  21.8k|      p_obj_exhaacplus_dec->aac_tables.pstr_huffmann_tables
 1594|  21.8k|          ->huffman_code_book_scl_index;
 1595|       |
 1596|  21.8k|  p_state_enhaacplus_dec->pstr_aac_tables = &p_obj_exhaacplus_dec->aac_tables;
 1597|  21.8k|  if (p_obj_exhaacplus_dec->p_state_aac->header_dec_done == 0)
  ------------------
  |  Branch (1597:7): [True: 14.2k, False: 7.58k]
  ------------------
 1598|  14.2k|  {
 1599|  14.2k|    p_obj_exhaacplus_dec->aac_config.header_dec_done = 0;
 1600|  14.2k|    p_state_enhaacplus_dec->mps_dec_handle.ldmps_config.ldmps_present_flag = 0;
 1601|  14.2k|  }
 1602|  21.8k|  if (p_obj_exhaacplus_dec->aac_config.header_dec_done == 0) {
  ------------------
  |  Branch (1602:7): [True: 14.2k, False: 7.58k]
  ------------------
 1603|  14.2k|    WORD32 channels;
 1604|  14.2k|    UWORD32 total_persistent_used = 0;
 1605|       |
 1606|  14.2k|    p_obj_exhaacplus_dec->p_state_aac->p_config =
 1607|  14.2k|        &p_obj_exhaacplus_dec->aac_config;
 1608|       |
 1609|  14.2k|    p_obj_exhaacplus_dec->p_state_aac->pstr_stream_sbr =
 1610|  14.2k|        (pVOID)((pWORD8)p_obj_exhaacplus_dec->p_state_aac +
 1611|  14.2k|                IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_aac_dec_state_struct), BYTE_ALIGN_8));
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1612|  14.2k|    if (p_obj_exhaacplus_dec->aac_config.ui_max_channels > 2) {
  ------------------
  |  Branch (1612:9): [True: 14.2k, False: 0]
  ------------------
 1613|  14.2k|      p_state_enhaacplus_dec->aac_persistent_mem_v =
 1614|  14.2k|          (pVOID)((pWORD8)p_obj_exhaacplus_dec->p_state_aac->pstr_stream_sbr +
 1615|  14.2k|                  (MAX_BS_ELEMENT)*2 *
  ------------------
  |  |   24|  14.2k|#define MAX_BS_ELEMENT (8 + MAX_CC_CHANNEL_NUM)
  |  |  ------------------
  |  |  |  |   23|  14.2k|#define MAX_CC_CHANNEL_NUM (2)
  |  |  ------------------
  ------------------
 1616|  14.2k|                      IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_aac_dec_sbr_bitstream_struct),
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1617|  14.2k|                                               BYTE_ALIGN_8));
 1618|       |
 1619|  14.2k|      memset(p_obj_exhaacplus_dec->p_state_aac->pstr_stream_sbr, 0,
 1620|  14.2k|             (MAX_BS_ELEMENT)*2 *
  ------------------
  |  |   24|  14.2k|#define MAX_BS_ELEMENT (8 + MAX_CC_CHANNEL_NUM)
  |  |  ------------------
  |  |  |  |   23|  14.2k|#define MAX_CC_CHANNEL_NUM (2)
  |  |  ------------------
  ------------------
 1621|  14.2k|                 IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_aac_dec_sbr_bitstream_struct), BYTE_ALIGN_8));
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1622|  14.2k|    } else {
 1623|      0|      p_state_enhaacplus_dec->aac_persistent_mem_v =
 1624|      0|          (pVOID)((pWORD8)p_obj_exhaacplus_dec->p_state_aac->pstr_stream_sbr +
 1625|      0|                  (2) * 2 *
 1626|      0|                      IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_aac_dec_sbr_bitstream_struct),
  ------------------
  |  |   87|      0|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1627|      0|                                               BYTE_ALIGN_8));
 1628|       |
 1629|      0|      memset(p_obj_exhaacplus_dec->p_state_aac->pstr_stream_sbr, 0,
 1630|      0|             (2) * 2 *
 1631|      0|                 IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_aac_dec_sbr_bitstream_struct), BYTE_ALIGN_8));
  ------------------
  |  |   87|      0|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1632|      0|    }
 1633|  14.2k|    if (1 == p_obj_exhaacplus_dec->aac_config.ui_max_channels)
  ------------------
  |  Branch (1633:9): [True: 0, False: 14.2k]
  ------------------
 1634|      0|      channels = 1;
 1635|  14.2k|    else
 1636|  14.2k|      channels = 2;
 1637|       |
 1638|  14.2k|    persistent_used = ixheaacd_set_aac_persistent_buffers(
 1639|  14.2k|        p_state_enhaacplus_dec->aac_persistent_mem_v, channels);
 1640|       |
 1641|  14.2k|    p_state_enhaacplus_dec->sbr_persistent_mem_v =
 1642|  14.2k|        (pVOID)((pWORD8)p_state_enhaacplus_dec->aac_persistent_mem_v +
 1643|  14.2k|                IXHEAAC_GET_SIZE_ALIGNED(persistent_used, BYTE_ALIGN_8));
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1644|  14.2k|    total_persistent_used += IXHEAAC_GET_SIZE_ALIGNED(persistent_used, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1645|       |
 1646|  14.2k|    persistent_used = ixheaacd_getsize_sbr_persistent();
 1647|  14.2k|    ixheaacd_set_sbr_persistent_buffers(
 1648|  14.2k|        p_state_enhaacplus_dec->sbr_persistent_mem_v, &persistent_used,
 1649|  14.2k|        channels, 1);
 1650|       |
 1651|  14.2k|    p_state_enhaacplus_dec->heaac_mps_handle.mps_persistent_mem_v =
 1652|  14.2k|        (pVOID)((pWORD8)p_state_enhaacplus_dec->sbr_persistent_mem_v +
 1653|  14.2k|                IXHEAAC_GET_SIZE_ALIGNED(persistent_used, BYTE_ALIGN_8));
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1654|  14.2k|    total_persistent_used += IXHEAAC_GET_SIZE_ALIGNED(persistent_used, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1655|       |
 1656|  14.2k|    persistent_used = ixheaacd_getsize_mps_persistent();
 1657|       |
 1658|  14.2k|    ixheaacd_set_mps_persistent_buffers(
 1659|  14.2k|        &p_state_enhaacplus_dec->heaac_mps_handle, &persistent_used, channels,
 1660|  14.2k|        p_state_enhaacplus_dec->heaac_mps_handle.mps_persistent_mem_v);
 1661|  14.2k|    total_persistent_used += IXHEAAC_GET_SIZE_ALIGNED(persistent_used, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1662|       |
 1663|  14.2k|    if (total_persistent_used >
  ------------------
  |  Branch (1663:9): [True: 0, False: 14.2k]
  ------------------
 1664|  14.2k|        p_obj_exhaacplus_dec->p_mem_info_aac[IA_ENHAACPLUS_DEC_PERSIST_IDX].ui_size) {
  ------------------
  |  |   32|  14.2k|#define IA_ENHAACPLUS_DEC_PERSIST_IDX (0)
  ------------------
 1665|      0|      return IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL;
  ------------------
  |  |   83|      0|#define IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL 0xFFFF9000
  ------------------
 1666|      0|    }
 1667|       |
 1668|  14.2k|    aac_persistent_mem = (struct ia_aac_persistent_struct *)
 1669|  14.2k|                             p_state_enhaacplus_dec->aac_persistent_mem_v;
 1670|  14.2k|    if (p_state_enhaacplus_dec->audio_object_type == AOT_ER_AAC_LD ||
  ------------------
  |  Branch (1670:9): [True: 0, False: 14.2k]
  ------------------
 1671|  14.2k|        p_state_enhaacplus_dec->audio_object_type == AOT_ER_AAC_ELD)
  ------------------
  |  Branch (1671:9): [True: 1, False: 14.2k]
  ------------------
 1672|      1|      p_state_enhaacplus_dec->frame_len_flag =
 1673|      1|          p_obj_exhaacplus_dec->aac_config.framesize_480;
 1674|       |
 1675|  14.2k|    p_state_enhaacplus_dec->ptr_overlap_buf =
 1676|  14.2k|        aac_persistent_mem->overlap_buffer;
 1677|       |
 1678|  14.2k|    p_state_enhaacplus_dec->bit_count = 0;
 1679|  14.2k|    p_state_enhaacplus_dec->ec_enable = p_obj_exhaacplus_dec->aac_config.ui_err_conceal;
 1680|  14.2k|    p_state_enhaacplus_dec->sync_status = 0;
 1681|  14.2k|    p_state_enhaacplus_dec->bs_format = ADTS_BSFORMAT;
  ------------------
  |  |   28|  14.2k|#define ADTS_BSFORMAT 2
  ------------------
 1682|  14.2k|    p_state_enhaacplus_dec->latm_initialized = 0;
 1683|  14.2k|    p_state_enhaacplus_dec->frame_size = 0;
 1684|  14.2k|    memset(&p_state_enhaacplus_dec->latm_struct_element, 0,
 1685|  14.2k|           sizeof(ixheaacd_latm_struct));
 1686|  14.2k|    memset(&p_state_enhaacplus_dec->b_n_raw_data_blk, 0,
 1687|  14.2k|           sizeof(WORD32) * (9 + MAX_BS_ELEMENT));
  ------------------
  |  |   24|  14.2k|#define MAX_BS_ELEMENT (8 + MAX_CC_CHANNEL_NUM)
  |  |  ------------------
  |  |  |  |   23|  14.2k|#define MAX_CC_CHANNEL_NUM (2)
  |  |  ------------------
  ------------------
 1688|       |
 1689|  14.2k|    p_state_enhaacplus_dec->sbr_present_flag = 0;
 1690|       |
 1691|   156k|    for (ch_idx = 0; ch_idx < MAX_BS_ELEMENT; ch_idx++) {
  ------------------
  |  |   24|   156k|#define MAX_BS_ELEMENT (8 + MAX_CC_CHANNEL_NUM)
  |  |  ------------------
  |  |  |  |   23|   156k|#define MAX_CC_CHANNEL_NUM (2)
  |  |  ------------------
  ------------------
  |  Branch (1691:22): [True: 142k, False: 14.2k]
  ------------------
 1692|   142k|      p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx] = 0;
 1693|   142k|    }
 1694|       |
 1695|  14.2k|    memset(&p_state_enhaacplus_dec->ind_cc_info, 0,
 1696|  14.2k|           sizeof(ia_enhaacplus_dec_ind_cc));
 1697|       |
 1698|  14.2k|    p_state_enhaacplus_dec->last_frame_ok = 1;
 1699|  14.2k|    p_obj_exhaacplus_dec->aac_config.header_dec_done = 1;
 1700|       |
 1701|  14.2k|    aac_persistent_mem->str_aac_decoder.pstr_aac_tables =
 1702|  14.2k|        &p_obj_exhaacplus_dec->aac_tables;
 1703|  14.2k|    aac_persistent_mem->str_aac_decoder.pstr_common_tables =
 1704|  14.2k|        p_obj_exhaacplus_dec->common_tables;
 1705|       |
 1706|  14.2k|    p_obj_exhaacplus_dec->p_state_aac->sbr_persistent_mem_u =
 1707|  14.2k|        p_obj_exhaacplus_dec->p_state_aac->sbr_persistent_mem_v;
 1708|       |
 1709|  14.2k|    p_obj_exhaacplus_dec->p_state_aac->sbr_scratch_mem_u =
 1710|  14.2k|        p_obj_exhaacplus_dec->p_state_aac->aac_scratch_mem_v;
 1711|       |
 1712|  14.2k|    ixheaacd_set_sbr_persistent_table_pointer(
 1713|  14.2k|        p_obj_exhaacplus_dec->p_state_aac->sbr_persistent_mem_v,
 1714|  14.2k|        &p_obj_exhaacplus_dec->str_sbr_tables,
 1715|  14.2k|        p_obj_exhaacplus_dec->common_tables);
 1716|  14.2k|    ixheaacd_set_scratch_buffers(
 1717|  14.2k|        &p_obj_exhaacplus_dec->p_state_aac->heaac_mps_handle,
 1718|  14.2k|        p_state_enhaacplus_dec->aac_scratch_mem_v);
 1719|  14.2k|  }
 1720|       |
 1721|  21.8k|  if (p_obj_exhaacplus_dec->p_state_aac->ui_input_over == 1) {
  ------------------
  |  Branch (1721:7): [True: 0, False: 21.8k]
  ------------------
 1722|      0|    return IA_XHEAAC_DEC_INIT_FATAL_EO_INPUT_REACHED;
  ------------------
  |  |   84|      0|#define IA_XHEAAC_DEC_INIT_FATAL_EO_INPUT_REACHED 0xFFFF9001
  ------------------
 1723|      0|  }
 1724|       |
 1725|  21.8k|  if (p_obj_exhaacplus_dec->p_state_aac->header_dec_done == 0) {
  ------------------
  |  Branch (1725:7): [True: 14.2k, False: 7.58k]
  ------------------
 1726|  14.2k|    if (p_state_enhaacplus_dec->audio_object_type == AOT_ER_AAC_LD ||
  ------------------
  |  Branch (1726:9): [True: 0, False: 14.2k]
  ------------------
 1727|  14.2k|        p_state_enhaacplus_dec->audio_object_type == AOT_ER_AAC_ELD)
  ------------------
  |  Branch (1727:9): [True: 1, False: 14.2k]
  ------------------
 1728|      1|      p_state_enhaacplus_dec->frame_len_flag =
 1729|      1|          p_obj_exhaacplus_dec->aac_config.framesize_480;
 1730|       |
 1731|  14.2k|    aac_persistent_mem = (struct ia_aac_persistent_struct *)
 1732|  14.2k|                             p_state_enhaacplus_dec->aac_persistent_mem_v;
 1733|  14.2k|    sbr_persistent_mem = (struct ia_sbr_pers_struct *)
 1734|  14.2k|                             p_state_enhaacplus_dec->sbr_persistent_mem_v;
 1735|  14.2k|    if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
  ------------------
  |  Branch (1735:9): [True: 0, False: 14.2k]
  ------------------
 1736|      0|      p_obj_exhaacplus_dec->p_state_aac->first_frame = 1;
 1737|      0|    }
 1738|       |
 1739|  14.2k|    if (p_obj_exhaacplus_dec->aac_config.ui_samp_freq == 0) {
  ------------------
  |  Branch (1739:9): [True: 14.2k, False: 1]
  ------------------
 1740|  14.2k|      WORD32 header_bytes_consumed, return_val;
 1741|       |
 1742|  14.2k|      if (p_state_enhaacplus_dec->ui_in_bytes == 0) {
  ------------------
  |  Branch (1742:11): [True: 0, False: 14.2k]
  ------------------
 1743|      0|        p_state_enhaacplus_dec->i_bytes_consumed = 0;
 1744|      0|        return IA_NO_ERROR;
  ------------------
  |  |   23|      0|#define IA_NO_ERROR 0x00000000
  ------------------
 1745|      0|      }
 1746|       |
 1747|  14.2k|      if (1 == p_obj_exhaacplus_dec->aac_config.ui_frame_size) {
  ------------------
  |  Branch (1747:11): [True: 0, False: 14.2k]
  ------------------
 1748|      0|        p_state_enhaacplus_dec->frame_len_flag = 1;
 1749|      0|        p_state_enhaacplus_dec->frame_length = 960;
 1750|  14.2k|      } else {
 1751|  14.2k|        p_state_enhaacplus_dec->frame_len_flag = 0;
 1752|  14.2k|        p_state_enhaacplus_dec->frame_length = 1024;
 1753|  14.2k|      }
 1754|       |
 1755|  14.2k|      p_state_enhaacplus_dec->ui_init_done = 0;
 1756|  14.2k|      memset(&(p_state_enhaacplus_dec->eld_specific_config), 0,
 1757|  14.2k|             sizeof(ia_eld_specific_config_struct));
 1758|  14.2k|      return_val = ixheaacd_aac_headerdecode(
 1759|  14.2k|          p_obj_exhaacplus_dec, (UWORD8 *)in_buffer, &header_bytes_consumed,
 1760|  14.2k|          aac_persistent_mem->str_aac_decoder.pstr_aac_tables
 1761|  14.2k|              ->pstr_huffmann_tables);
 1762|  14.2k|      if (p_state_enhaacplus_dec->audio_object_type == AOT_ER_AAC_LD ||
  ------------------
  |  Branch (1762:11): [True: 1.24k, False: 12.9k]
  ------------------
 1763|  12.9k|          p_state_enhaacplus_dec->audio_object_type == AOT_ER_AAC_ELD ||
  ------------------
  |  Branch (1763:11): [True: 1.85k, False: 11.1k]
  ------------------
 1764|  11.1k|          p_state_enhaacplus_dec->audio_object_type == AOT_ER_AAC_LC) {
  ------------------
  |  Branch (1764:11): [True: 693, False: 10.4k]
  ------------------
 1765|  3.50k|        *sbr_persistent_mem->str_sbr_dec_inst.pstr_sbr_header[0] =
 1766|  3.50k|            p_obj_exhaacplus_dec->p_state_aac->str_sbr_config;
 1767|  3.50k|        *sbr_persistent_mem->str_sbr_dec_inst.pstr_sbr_header[1] =
 1768|  3.50k|            p_obj_exhaacplus_dec->p_state_aac->str_sbr_config;
 1769|  10.7k|      } else {
 1770|  10.7k|        memset(&(p_state_enhaacplus_dec->eld_specific_config), 0,
 1771|  10.7k|               sizeof(ia_eld_specific_config_struct));
 1772|  10.7k|      }
 1773|       |
 1774|  14.2k|      if (return_val < 0) {
  ------------------
  |  Branch (1774:11): [True: 313, False: 13.9k]
  ------------------
 1775|    313|        if (return_val ==
  ------------------
  |  Branch (1775:13): [True: 5, False: 308]
  ------------------
 1776|    313|            (WORD32)IA_XHEAAC_DEC_INIT_FATAL_STREAM_CHAN_GT_MAX) {
  ------------------
  |  |   85|    313|#define IA_XHEAAC_DEC_INIT_FATAL_STREAM_CHAN_GT_MAX 0xFFFF9002
  ------------------
 1777|      5|          p_state_enhaacplus_dec->i_bytes_consumed = header_bytes_consumed;
 1778|      5|          return return_val;
 1779|      5|        }
 1780|    308|        p_state_enhaacplus_dec->i_bytes_consumed = 1;
 1781|       |
 1782|    308|        return return_val;
 1783|    313|      }
 1784|       |
 1785|  13.9k|      if (return_val ==
  ------------------
  |  Branch (1785:11): [True: 19, False: 13.9k]
  ------------------
 1786|  13.9k|          IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES) {
  ------------------
  |  |   98|  13.9k|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
 1787|     19|        p_state_enhaacplus_dec->i_bytes_consumed = header_bytes_consumed;
 1788|     19|        return return_val;
 1789|     19|      }
 1790|       |
 1791|  13.9k|      p_state_enhaacplus_dec->i_bytes_consumed = header_bytes_consumed;
 1792|       |
 1793|  13.9k|      if ((return_val == 0) &&
  ------------------
  |  Branch (1793:11): [True: 13.6k, False: 294]
  ------------------
 1794|  13.6k|          (p_obj_exhaacplus_dec->p_state_aac->audio_object_type == AOT_USAC)) {
  ------------------
  |  Branch (1794:11): [True: 5.00k, False: 8.61k]
  ------------------
 1795|  5.00k|        {
 1796|  5.00k|          WORD32 pcm_size = p_obj_exhaacplus_dec->aac_config.ui_pcm_wdsz;
 1797|  5.00k|          WORD8 *inbuffer =
 1798|  5.00k|              p_obj_exhaacplus_dec->pp_mem_aac[IA_ENHAACPLUS_DEC_INPUT_IDX];
  ------------------
  |  |   34|  5.00k|#define IA_ENHAACPLUS_DEC_INPUT_IDX (2)
  ------------------
 1799|  5.00k|          WORD8 *outbuffer =
 1800|  5.00k|              p_obj_exhaacplus_dec->pp_mem_aac[IA_ENHAACPLUS_DEC_OUTPUT_IDX];
  ------------------
  |  |   35|  5.00k|#define IA_ENHAACPLUS_DEC_OUTPUT_IDX (3)
  ------------------
 1801|  5.00k|          WORD32 out_bytes = 0;
 1802|  5.00k|          WORD32 frames_done = p_obj_exhaacplus_dec->p_state_aac->frame_counter;
 1803|  5.00k|          p_obj_exhaacplus_dec->p_state_aac->decode_create_done = 0;
 1804|       |
 1805|  5.00k|          if (p_obj_exhaacplus_dec->p_state_aac->ui_input_over == 0) {
  ------------------
  |  Branch (1805:15): [True: 5.00k, False: 0]
  ------------------
 1806|  5.00k|            error_code = ixheaacd_dec_main(
 1807|  5.00k|                p_obj_exhaacplus_dec, inbuffer, outbuffer, &out_bytes,
 1808|  5.00k|                frames_done, pcm_size,
 1809|  5.00k|                &p_obj_exhaacplus_dec->p_state_aac->num_of_output_ch);
 1810|  5.00k|            if (error_code) return error_code;
  ------------------
  |  Branch (1810:17): [True: 13, False: 4.98k]
  ------------------
 1811|  4.98k|            p_obj_exhaacplus_dec->p_state_aac->frame_counter++;
 1812|  4.98k|          } else {
 1813|      0|            out_bytes = 0;
 1814|      0|          }
 1815|       |
 1816|  4.98k|          p_obj_exhaacplus_dec->aac_config.ui_n_channels =
 1817|  4.98k|              p_obj_exhaacplus_dec->p_state_aac->num_of_output_ch;
 1818|  4.98k|        }
 1819|  4.98k|        if (return_val == 0)
  ------------------
  |  Branch (1819:13): [True: 4.98k, False: 0]
  ------------------
 1820|  4.98k|          p_obj_exhaacplus_dec->p_state_aac->ui_init_done = 1;
 1821|  4.98k|        return return_val;
 1822|  5.00k|      }
 1823|       |
 1824|  8.90k|      if (return_val == 0) {
  ------------------
  |  Branch (1824:11): [True: 8.61k, False: 294]
  ------------------
 1825|  8.61k|        p_obj_exhaacplus_dec->p_state_aac->header_dec_done = 1;
 1826|  8.61k|        if (p_obj_exhaacplus_dec->aac_config.ui_flush_cmd == 0) {
  ------------------
  |  Branch (1826:13): [True: 8.61k, False: 0]
  ------------------
 1827|  8.61k|          memcpy(p_state_enhaacplus_dec->header_ptr, in_buffer,
 1828|  8.61k|                 header_bytes_consumed * sizeof(UWORD8));
 1829|  8.61k|          p_state_enhaacplus_dec->header_length = header_bytes_consumed;
 1830|  8.61k|        }
 1831|  8.61k|      }
 1832|       |
 1833|  8.90k|      if (p_obj_exhaacplus_dec->p_state_aac->header_dec_done != 1)
  ------------------
  |  Branch (1833:11): [True: 14, False: 8.89k]
  ------------------
 1834|     14|        return IA_XHEAAC_DEC_INIT_NONFATAL_HEADER_NOT_AT_START;
  ------------------
  |  |   76|     14|#define IA_XHEAAC_DEC_INIT_NONFATAL_HEADER_NOT_AT_START 0x00001000
  ------------------
 1835|       |
 1836|  8.89k|      if (p_state_enhaacplus_dec->dwnsmp_signal == 1 &&
  ------------------
  |  Branch (1836:11): [True: 1.00k, False: 7.89k]
  ------------------
 1837|  1.00k|          p_state_enhaacplus_dec->audio_object_type == AOT_ER_AAC_ELD)
  ------------------
  |  Branch (1837:11): [True: 999, False: 1]
  ------------------
 1838|    999|        p_obj_exhaacplus_dec->aac_config.down_sample_flag = 1;
 1839|       |
 1840|  8.89k|      if (p_state_enhaacplus_dec->sampling_rate ==
  ------------------
  |  Branch (1840:11): [True: 3, False: 8.89k]
  ------------------
 1841|  8.89k|          p_state_enhaacplus_dec->extension_samp_rate) {
 1842|      3|        p_obj_exhaacplus_dec->aac_config.down_sample_flag = 1;
 1843|      3|      }
 1844|       |
 1845|  8.89k|    } else {
 1846|      1|      p_obj_exhaacplus_dec->p_state_aac->header_dec_done = 1;
 1847|      1|      p_state_enhaacplus_dec->i_bytes_consumed = 0;
 1848|       |
 1849|      1|      p_state_enhaacplus_dec->sampling_rate =
 1850|      1|          p_obj_exhaacplus_dec->aac_config.ui_samp_freq;
 1851|       |
 1852|      1|      if (1 == p_obj_exhaacplus_dec->aac_config.ui_frame_size) {
  ------------------
  |  Branch (1852:11): [True: 0, False: 1]
  ------------------
 1853|      0|        p_state_enhaacplus_dec->frame_len_flag = 1;
 1854|      0|        p_state_enhaacplus_dec->frame_length = 960;
 1855|      1|      } else {
 1856|      1|        p_state_enhaacplus_dec->frame_len_flag = 0;
 1857|      1|        p_state_enhaacplus_dec->frame_length = 1024;
 1858|      1|      }
 1859|      1|    }
 1860|       |
 1861|  8.89k|    p_state_enhaacplus_dec->pstr_bit_buf = ixheaacd_create_bit_buf(
 1862|  8.89k|        &p_state_enhaacplus_dec->str_bit_buf, (UWORD8 *)in_buffer,
 1863|  8.89k|        p_obj_exhaacplus_dec->p_mem_info_aac[IA_ENHAACPLUS_DEC_INPUT_IDX]
  ------------------
  |  |   34|  8.89k|#define IA_ENHAACPLUS_DEC_INPUT_IDX (2)
  ------------------
 1864|  8.89k|            .ui_size);
 1865|  8.89k|    p_state_enhaacplus_dec->pstr_bit_buf->xaac_jmp_buf =
 1866|  8.89k|        &(p_state_enhaacplus_dec->xaac_jmp_buf);
 1867|       |
 1868|  8.89k|    p_state_enhaacplus_dec->ptr_bit_stream =
 1869|  8.89k|        p_state_enhaacplus_dec->pstr_bit_buf;
 1870|       |
 1871|  8.89k|    if (p_state_enhaacplus_dec->s_adts_hdr_present) {
  ------------------
  |  Branch (1871:9): [True: 4.79k, False: 4.10k]
  ------------------
 1872|  4.79k|      if (p_obj_exhaacplus_dec->aac_config.ld_decoder == 1)
  ------------------
  |  Branch (1872:11): [True: 0, False: 4.79k]
  ------------------
 1873|      0|        p_state_enhaacplus_dec->audio_object_type = 23;
 1874|  4.79k|    }
 1875|       |
 1876|  8.89k|    if ((p_state_enhaacplus_dec->audio_object_type == AOT_ER_AAC_ELD) ||
  ------------------
  |  Branch (1876:9): [True: 2.09k, False: 6.79k]
  ------------------
 1877|  6.79k|        (p_state_enhaacplus_dec->audio_object_type == AOT_ER_AAC_LD))
  ------------------
  |  Branch (1877:9): [True: 961, False: 5.83k]
  ------------------
 1878|  2.77k|      if (p_state_enhaacplus_dec->s_adts_hdr_present) {
  ------------------
  |  Branch (1878:11): [True: 0, False: 2.77k]
  ------------------
 1879|      0|        if (p_state_enhaacplus_dec->audio_object_type == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (1879:13): [True: 0, False: 0]
  ------------------
 1880|      0|          p_state_enhaacplus_dec->eld_specific_config.ld_sbr_samp_rate = 1;
 1881|      0|          p_state_enhaacplus_dec->eld_specific_config.ld_sbr_crc_flag = 0;
 1882|      0|          p_state_enhaacplus_dec->eld_specific_config.ld_sbr_flag_present = 0;
 1883|       |
 1884|      0|          if (p_obj_exhaacplus_dec->aac_config.eld_sbr_present == 1) {
  ------------------
  |  Branch (1884:15): [True: 0, False: 0]
  ------------------
 1885|      0|            p_state_enhaacplus_dec->eld_specific_config.ld_sbr_flag_present = 1;
 1886|      0|          }
 1887|      0|        }
 1888|      0|        if (p_obj_exhaacplus_dec->aac_config.framesize_480)
  ------------------
  |  Branch (1888:13): [True: 0, False: 0]
  ------------------
 1889|      0|          p_state_enhaacplus_dec->frame_length = 480;
 1890|      0|        else
 1891|      0|          p_state_enhaacplus_dec->frame_length = 512;
 1892|      0|      }
 1893|       |
 1894|  8.89k|    {
 1895|  95.0k|      for (ch_idx = 0; ch_idx < MAX_BS_ELEMENT; ch_idx++) {
  ------------------
  |  |   24|  95.0k|#define MAX_BS_ELEMENT (8 + MAX_CC_CHANNEL_NUM)
  |  |  ------------------
  |  |  |  |   23|  95.0k|#define MAX_CC_CHANNEL_NUM (2)
  |  |  ------------------
  ------------------
  |  Branch (1895:24): [True: 86.1k, False: 8.89k]
  ------------------
 1896|  86.1k|        WORD32 channels;
 1897|  86.1k|        channels = 2;
 1898|       |
 1899|  86.1k|        p_state_enhaacplus_dec->pstr_aac_dec_info[ch_idx] =
 1900|  86.1k|            ixheaacd_aac_decoder_init(
 1901|  86.1k|                p_state_enhaacplus_dec,
 1902|       |
 1903|  86.1k|                p_state_enhaacplus_dec->pstr_stream_sbr[0], channels,
 1904|  86.1k|                p_state_enhaacplus_dec->aac_persistent_mem_v,
 1905|  86.1k|                p_state_enhaacplus_dec->frame_length);
 1906|       |
 1907|  86.1k|        if (!p_state_enhaacplus_dec->pstr_aac_dec_info[ch_idx]) {
  ------------------
  |  Branch (1907:13): [True: 0, False: 86.1k]
  ------------------
 1908|      0|          p_state_enhaacplus_dec->i_bytes_consumed = 1;
 1909|      0|          return IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL;
  ------------------
  |  |   83|      0|#define IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL 0xFFFF9000
  ------------------
 1910|      0|        }
 1911|  86.1k|      }
 1912|       |
 1913|  8.89k|      {
 1914|  8.89k|        p_state_enhaacplus_dec->pstr_drc_dec =
 1915|  8.89k|            &p_state_enhaacplus_dec->str_drc_dec_info;
 1916|  8.89k|        ixheaacd_drc_dec_create(p_state_enhaacplus_dec->pstr_drc_dec, 127, 127);
 1917|  8.89k|      }
 1918|  8.89k|      p_state_enhaacplus_dec->pstr_drc_dec->cut_factor =
 1919|  8.89k|          p_obj_exhaacplus_dec->aac_config.ui_drc_cut;
 1920|  8.89k|      p_state_enhaacplus_dec->pstr_drc_dec->boost_factor =
 1921|  8.89k|          p_obj_exhaacplus_dec->aac_config.ui_drc_boost;
 1922|  8.89k|      p_state_enhaacplus_dec->pstr_drc_dec->target_ref_level =
 1923|  8.89k|          p_obj_exhaacplus_dec->aac_config.ui_drc_target_level;
 1924|  8.89k|      p_state_enhaacplus_dec->pstr_drc_dec->prog_ref_level =
 1925|  8.89k|          p_obj_exhaacplus_dec->aac_config.ui_drc_target_level;
 1926|       |
 1927|  8.89k|      if (1 == p_obj_exhaacplus_dec->aac_config.ui_drc_set) {
  ------------------
  |  Branch (1927:11): [True: 8.61k, False: 280]
  ------------------
 1928|  8.61k|        if (p_obj_exhaacplus_dec->aac_config.ui_drc_heavy_comp == 1) {
  ------------------
  |  Branch (1928:13): [True: 211, False: 8.40k]
  ------------------
 1929|    211|          p_state_enhaacplus_dec->pstr_drc_dec->drc_on = 1;
 1930|    211|          p_state_enhaacplus_dec->pstr_drc_dec->heavy_mode = 1;
 1931|  8.40k|        } else {
 1932|  8.40k|          p_state_enhaacplus_dec->pstr_drc_dec->heavy_mode = 0;
 1933|  8.40k|          if (p_state_enhaacplus_dec->pstr_drc_dec->target_ref_level > 127)
  ------------------
  |  Branch (1933:15): [True: 0, False: 8.40k]
  ------------------
 1934|      0|            p_state_enhaacplus_dec->pstr_drc_dec->target_ref_level = 127;
 1935|  8.40k|          if (p_state_enhaacplus_dec->pstr_drc_dec->target_ref_level < 0) {
  ------------------
  |  Branch (1935:15): [True: 0, False: 8.40k]
  ------------------
 1936|      0|            if (p_state_enhaacplus_dec->pstr_drc_dec->cut_factor > 0 ||
  ------------------
  |  Branch (1936:17): [True: 0, False: 0]
  ------------------
 1937|      0|                p_state_enhaacplus_dec->pstr_drc_dec->boost_factor > 0)
  ------------------
  |  Branch (1937:17): [True: 0, False: 0]
  ------------------
 1938|      0|              p_state_enhaacplus_dec->pstr_drc_dec->drc_on = 1;
 1939|      0|            else
 1940|      0|              p_state_enhaacplus_dec->pstr_drc_dec->drc_on = 0;
 1941|      0|            p_state_enhaacplus_dec->pstr_drc_dec->drc_dig_norm = 0;
 1942|      0|            p_state_enhaacplus_dec->pstr_drc_dec->target_ref_level = 108;
 1943|  8.40k|          } else {
 1944|  8.40k|            p_state_enhaacplus_dec->pstr_drc_dec->drc_on = 1;
 1945|  8.40k|            p_state_enhaacplus_dec->pstr_drc_dec->drc_dig_norm = 1;
 1946|  8.40k|          }
 1947|  8.40k|        }
 1948|  8.61k|      }
 1949|  8.89k|    }
 1950|  8.89k|  } else {
 1951|  7.58k|    struct ia_bit_buf_struct temp_bit_buff = {0};
 1952|  7.58k|    ia_adts_header_struct adts;
 1953|  7.58k|    struct ia_bit_buf_struct *it_bit_buff;
 1954|       |
 1955|  7.58k|    WORD16 frame_size_2 = 0;
 1956|  7.58k|    WORD32 sample_rate_2 = 0;
 1957|  7.58k|    WORD32 sample_rate = 0;
 1958|  7.58k|    WORD type, i;
 1959|  7.58k|    WORD elements_number;
 1960|       |
 1961|  7.58k|    if (p_state_enhaacplus_dec->audio_object_type == AOT_USAC)
  ------------------
  |  Branch (1961:9): [True: 0, False: 7.58k]
  ------------------
 1962|      0|      return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
 1963|       |
 1964|  7.58k|    memset(&adts, 0, sizeof(ia_adts_header_struct));
 1965|       |
 1966|   101k|    for (i = 0; i < MAX_BS_ELEMENT + 1; i++) {
  ------------------
  |  |   24|   101k|#define MAX_BS_ELEMENT (8 + MAX_CC_CHANNEL_NUM)
  |  |  ------------------
  |  |  |  |   23|   101k|#define MAX_CC_CHANNEL_NUM (2)
  |  |  ------------------
  ------------------
  |  Branch (1966:17): [True: 94.0k, False: 7.58k]
  ------------------
 1967|  94.0k|      p_obj_exhaacplus_dec->aac_config.element_type[i] = -1;
 1968|  94.0k|    }
 1969|       |
 1970|  7.58k|    it_bit_buff = p_state_enhaacplus_dec->pstr_bit_buf;
 1971|       |
 1972|  7.58k|    p_obj_exhaacplus_dec->aac_config.ui_sbr_mode = 0;
 1973|  7.58k|    p_obj_exhaacplus_dec->p_state_aac->ui_out_bytes = 0;
 1974|  7.58k|    p_state_enhaacplus_dec->ui_mps_out_bytes = 0;
 1975|  7.58k|    if (p_state_enhaacplus_dec->ui_in_bytes == 0) {
  ------------------
  |  Branch (1975:9): [True: 0, False: 7.58k]
  ------------------
 1976|      0|      p_state_enhaacplus_dec->i_bytes_consumed = 0;
 1977|      0|      return IA_NO_ERROR;
  ------------------
  |  |   23|      0|#define IA_NO_ERROR 0x00000000
  ------------------
 1978|      0|    }
 1979|       |
 1980|  7.58k|    if (p_state_enhaacplus_dec->audio_object_type == AOT_ER_AAC_LD ||
  ------------------
  |  Branch (1980:9): [True: 18.4E, False: 7.59k]
  ------------------
 1981|  7.59k|        p_state_enhaacplus_dec->audio_object_type == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (1981:9): [True: 1.80k, False: 5.79k]
  ------------------
 1982|  2.75k|      if (p_obj_exhaacplus_dec->aac_config.ui_mp4_flag)
  ------------------
  |  Branch (1982:11): [True: 23, False: 2.73k]
  ------------------
 1983|     23|        p_state_enhaacplus_dec->frame_size =
 1984|     23|            p_state_enhaacplus_dec->ui_in_bytes;
 1985|  2.75k|    }
 1986|       |
 1987|  7.58k|    ixheaacd_create_init_bit_buf(it_bit_buff, in_buffer,
 1988|  7.58k|                                 p_state_enhaacplus_dec->ui_in_bytes);
 1989|  7.58k|    p_state_enhaacplus_dec->pstr_bit_buf->xaac_jmp_buf =
 1990|  7.58k|        &(p_state_enhaacplus_dec->xaac_jmp_buf);
 1991|       |
 1992|  7.58k|    it_bit_buff->adts_header_present =
 1993|  7.58k|        p_state_enhaacplus_dec->s_adts_hdr_present;
 1994|  7.58k|    it_bit_buff->no_raw_data_blocks =
 1995|  7.58k|        (WORD8)p_state_enhaacplus_dec->b_n_raw_data_blk;
 1996|  7.58k|    it_bit_buff->protection_absent = p_state_enhaacplus_dec->protection_absent;
 1997|       |
 1998|  7.58k|    memcpy(&temp_bit_buff, it_bit_buff, sizeof(struct ia_bit_buf_struct));
 1999|       |
 2000|  7.58k|    if (p_obj_exhaacplus_dec->aac_config.ui_max_channels > 2)
  ------------------
  |  Branch (2000:9): [True: 8.55k, False: 18.4E]
  ------------------
 2001|  8.55k|      elements_number = MAX_BS_ELEMENT;
  ------------------
  |  |   24|  8.55k|#define MAX_BS_ELEMENT (8 + MAX_CC_CHANNEL_NUM)
  |  |  ------------------
  |  |  |  |   23|  8.55k|#define MAX_CC_CHANNEL_NUM (2)
  |  |  ------------------
  ------------------
 2002|  18.4E|    else
 2003|  18.4E|      elements_number = 2;
 2004|       |
 2005|  93.1k|    for (i = 0; i < elements_number; i++)
  ------------------
  |  Branch (2005:17): [True: 85.5k, False: 7.58k]
  ------------------
 2006|  85.5k|      p_state_enhaacplus_dec->pstr_stream_sbr[i][0].no_elements = 0;
 2007|       |
 2008|  7.58k|    { it_bit_buff->initial_cnt_bits = it_bit_buff->cnt_bits; }
 2009|       |
 2010|  7.58k|    ixheaacd_byte_align(
 2011|  7.58k|        p_state_enhaacplus_dec->ptr_bit_stream,
 2012|  7.58k|        &p_state_enhaacplus_dec->pstr_aac_dec_info[0]->byte_align_bits);
 2013|       |
 2014|  7.58k|    if (p_state_enhaacplus_dec->s_adts_hdr_present) {
  ------------------
  |  Branch (2014:9): [True: 4.79k, False: 2.79k]
  ------------------
 2015|  4.79k|      WORD32 error;
 2016|       |
 2017|  4.79k|      if (p_state_enhaacplus_dec->b_n_raw_data_blk == 0) {
  ------------------
  |  Branch (2017:11): [True: 4.79k, False: 0]
  ------------------
 2018|  4.79k|        error = ixheaacd_readifadts(p_state_enhaacplus_dec, it_bit_buff, &adts);
 2019|       |
 2020|  4.79k|        if (error) return error;
  ------------------
  |  Branch (2020:13): [True: 0, False: 4.79k]
  ------------------
 2021|       |
 2022|  4.79k|        p_state_enhaacplus_dec->protection_absent = adts.protection_absent;
 2023|       |
 2024|  4.79k|        if (p_state_enhaacplus_dec->audio_object_type == AOT_ER_AAC_LD ||
  ------------------
  |  Branch (2024:13): [True: 0, False: 4.79k]
  ------------------
 2025|  4.79k|            p_state_enhaacplus_dec->audio_object_type == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (2025:13): [True: 0, False: 4.79k]
  ------------------
 2026|      0|          p_state_enhaacplus_dec->frame_size = adts.aac_frame_length;
 2027|      0|          if (p_obj_exhaacplus_dec->aac_config.framesize_480)
  ------------------
  |  Branch (2027:15): [True: 0, False: 0]
  ------------------
 2028|      0|            p_state_enhaacplus_dec->frame_length = 480;
 2029|      0|          else
 2030|      0|            p_state_enhaacplus_dec->frame_length = 512;
 2031|      0|        }
 2032|  4.79k|      }
 2033|  4.79k|    }
 2034|       |
 2035|  7.58k|    if (p_state_enhaacplus_dec->bs_format == LOAS_BSFORMAT) {
  ------------------
  |  |   29|  7.58k|#define LOAS_BSFORMAT 3
  ------------------
  |  Branch (2035:9): [True: 3.69k, False: 3.89k]
  ------------------
 2036|  3.69k|      WORD32 result;
 2037|  3.69k|      WORD32 sync;
 2038|  3.69k|      WORD32 cnt_bits;
 2039|       |
 2040|  3.69k|      sync = ixheaacd_read_bits_buf(it_bit_buff, 11);
 2041|  3.69k|      cnt_bits = it_bit_buff->cnt_bits;
 2042|  3.69k|      if (it_bit_buff->cnt_bits <= 24) {
  ------------------
  |  Branch (2042:11): [True: 0, False: 3.69k]
  ------------------
 2043|      0|        return IA_XHEAAC_DEC_INIT_NONFATAL_INSUFFICIENT_INPUT_BYTES;
  ------------------
  |  |   79|      0|#define IA_XHEAAC_DEC_INIT_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001003
  ------------------
 2044|      0|      }
 2045|       |
 2046|  3.69k|      while (sync != 0x2b7) {
  ------------------
  |  Branch (2046:14): [True: 0, False: 3.69k]
  ------------------
 2047|      0|        sync = ((sync & 0x3ff) << 1) | ixheaacd_read_bits_buf(it_bit_buff, 1);
 2048|      0|        if (it_bit_buff->cnt_bits < 11) {
  ------------------
  |  Branch (2048:13): [True: 0, False: 0]
  ------------------
 2049|      0|          ixheaacd_read_bidirection(it_bit_buff, -11);
 2050|      0|          p_state_enhaacplus_dec->i_bytes_consumed =
 2051|      0|              (cnt_bits - it_bit_buff->cnt_bits) / 8;
 2052|      0|          return (IA_XHEAAC_DEC_INIT_NONFATAL_HEADER_NOT_AT_START);
  ------------------
  |  |   76|      0|#define IA_XHEAAC_DEC_INIT_NONFATAL_HEADER_NOT_AT_START 0x00001000
  ------------------
 2053|      0|        }
 2054|      0|      }
 2055|       |
 2056|  3.69k|      it_bit_buff->audio_mux_align = it_bit_buff->cnt_bits - 13;
 2057|       |
 2058|  3.69k|      if (sync == 0x2b7) {
  ------------------
  |  Branch (2058:11): [True: 3.69k, False: 0]
  ------------------
 2059|  3.69k|        result = ixheaacd_latm_audio_mux_element(
 2060|  3.69k|            it_bit_buff, &p_state_enhaacplus_dec->latm_struct_element,
 2061|  3.69k|            p_state_enhaacplus_dec,
 2062|  3.69k|            (ia_sampling_rate_info_struct *)&p_obj_exhaacplus_dec->aac_tables
 2063|  3.69k|                .pstr_huffmann_tables->str_sample_rate_info[0]);
 2064|  3.69k|        if (result < 0) {
  ------------------
  |  Branch (2064:13): [True: 2, False: 3.69k]
  ------------------
 2065|      2|          return result;
 2066|      2|        }
 2067|  3.69k|      }
 2068|  3.69k|    }
 2069|       |
 2070|  7.58k|    p_state_enhaacplus_dec->pstr_aac_dec_info[0]->byte_align_bits =
 2071|  7.58k|        it_bit_buff->cnt_bits;
 2072|       |
 2073|  7.58k|    type = -1;
 2074|  7.58k|    ch_idx = 0;
 2075|       |
 2076|  14.6k|    while ((type != 7)) {
  ------------------
  |  Branch (2076:12): [True: 10.6k, False: 4.01k]
  ------------------
 2077|  10.6k|      ia_aac_dec_scratch_struct aac_scratch_struct;
 2078|  10.6k|      memset(&aac_scratch_struct, 0, sizeof(aac_scratch_struct));
 2079|       |
 2080|  10.6k|      if (ch_idx >= elements_number) {
  ------------------
  |  Branch (2080:11): [True: 10, False: 10.6k]
  ------------------
 2081|     10|        p_state_enhaacplus_dec->i_bytes_consumed = 1;
 2082|       |
 2083|     10|        return IA_XHEAAC_DEC_INIT_FATAL_STREAM_CHAN_GT_MAX;
  ------------------
  |  |   85|     10|#define IA_XHEAAC_DEC_INIT_FATAL_STREAM_CHAN_GT_MAX 0xFFFF9002
  ------------------
 2084|     10|      }
 2085|       |
 2086|  10.6k|      ixheaacd_allocate_aac_scr(
 2087|  10.6k|          &aac_scratch_struct, p_state_enhaacplus_dec->aac_scratch_mem_v,
 2088|  10.6k|          time_data, 1, p_obj_exhaacplus_dec->aac_config.ui_max_channels,
 2089|  10.6k|          p_state_enhaacplus_dec->audio_object_type);
 2090|       |
 2091|  10.6k|      p_state_enhaacplus_dec->pstr_aac_dec_info[ch_idx]->p_ind_channel_info =
 2092|  10.6k|          &p_state_enhaacplus_dec->ind_cc_info;
 2093|  10.6k|      if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
  ------------------
  |  Branch (2093:11): [True: 0, False: 10.6k]
  ------------------
 2094|      0|        p_obj_exhaacplus_dec->aac_config.first_frame = 1;
 2095|      0|      }
 2096|       |
 2097|  10.6k|      error_code = ixheaacd_aacdec_decodeframe(
 2098|  10.6k|          p_obj_exhaacplus_dec, &aac_scratch_struct, time_data, frame_status, &type, &ch_idx, 1,
 2099|  10.6k|          2, p_obj_exhaacplus_dec->aac_config.element_instance_order, 0, 1, 0,
 2100|  10.6k|          p_obj_exhaacplus_dec->aac_config.ui_max_channels, 2,
 2101|  10.6k|          p_obj_exhaacplus_dec->p_state_aac->frame_length,
 2102|  10.6k|          p_obj_exhaacplus_dec->p_state_aac->frame_size, p_state_enhaacplus_dec->pstr_drc_dec,
 2103|  10.6k|          p_state_enhaacplus_dec->audio_object_type, p_state_enhaacplus_dec->ch_config,
 2104|  10.6k|          p_state_enhaacplus_dec->eld_specific_config, p_state_enhaacplus_dec->s_adts_hdr_present,
 2105|  10.6k|          &p_state_enhaacplus_dec->drc_dummy, p_state_enhaacplus_dec->ldmps_present,
 2106|  10.6k|          &p_state_enhaacplus_dec->slot_pos, mps_buffer, &p_state_enhaacplus_dec->mps_header,
 2107|  10.6k|          &p_state_enhaacplus_dec->ui_mps_out_bytes, 1,
 2108|  10.6k|          p_obj_exhaacplus_dec->aac_config.first_frame);
 2109|       |
 2110|  10.6k|      if (p_state_enhaacplus_dec->pstr_drc_dec->drc_element_found == 1) {
  ------------------
  |  Branch (2110:11): [True: 431, False: 10.2k]
  ------------------
 2111|    431|        if (p_obj_exhaacplus_dec->aac_config.i_loud_ref_level < 0) {
  ------------------
  |  Branch (2111:13): [True: 0, False: 431]
  ------------------
 2112|      0|          p_obj_exhaacplus_dec->aac_config.output_level =
 2113|      0|              p_state_enhaacplus_dec->pstr_drc_dec->prog_ref_level;
 2114|    431|        } else {
 2115|    431|          p_obj_exhaacplus_dec->aac_config.output_level =
 2116|    431|              p_obj_exhaacplus_dec->aac_config.i_loud_ref_level;
 2117|    431|        }
 2118|    431|      }
 2119|       |
 2120|  10.6k|      memset(&(p_obj_exhaacplus_dec->p_state_aac->pstr_aac_dec_info[ch_idx]
 2121|  10.6k|                   ->pstr_aac_dec_ch_info[0]
 2122|  10.6k|                   ->str_ics_info.ltp),
 2123|  10.6k|             0, sizeof(ltp_info));
 2124|  10.6k|      memset(&(p_obj_exhaacplus_dec->p_state_aac->pstr_aac_dec_info[ch_idx]
 2125|  10.6k|                   ->pstr_aac_dec_ch_info[0]
 2126|  10.6k|                   ->str_ics_info.ltp2),
 2127|  10.6k|             0, sizeof(ltp_info));
 2128|  10.6k|      memset(&(p_obj_exhaacplus_dec->p_state_aac->pstr_aac_dec_info[ch_idx]
 2129|  10.6k|                   ->pstr_aac_dec_ch_info[1]
 2130|  10.6k|                   ->str_ics_info.ltp),
 2131|  10.6k|             0, sizeof(ltp_info));
 2132|  10.6k|      memset(&(p_obj_exhaacplus_dec->p_state_aac->pstr_aac_dec_info[ch_idx]
 2133|  10.6k|                   ->pstr_aac_dec_ch_info[1]
 2134|  10.6k|                   ->str_ics_info.ltp2),
 2135|  10.6k|             0, sizeof(ltp_info));
 2136|       |
 2137|  10.6k|      {
 2138|       |
 2139|  10.6k|        frame_size_1 = p_state_enhaacplus_dec->frame_length;
 2140|  10.6k|        sample_rate_1 =
 2141|  10.6k|            p_state_enhaacplus_dec->pstr_aac_dec_info[ch_idx]->sampling_rate;
 2142|  10.6k|        num_channels_1 =
 2143|  10.6k|            p_state_enhaacplus_dec->pstr_aac_dec_info[ch_idx]->channels;
 2144|  10.6k|      }
 2145|       |
 2146|  10.6k|      if ((p_obj_exhaacplus_dec->aac_config.ui_max_channels <= 2) &&
  ------------------
  |  Branch (2146:11): [True: 0, False: 10.6k]
  ------------------
 2147|      0|          (p_obj_exhaacplus_dec->aac_config.element_type[ch_idx] == 2)) {
  ------------------
  |  Branch (2147:11): [True: 0, False: 0]
  ------------------
 2148|      0|        p_state_enhaacplus_dec->i_bytes_consumed = 1;
 2149|      0|        return IA_XHEAAC_DEC_INIT_FATAL_UNIMPLEMENTED_CCE;
  ------------------
  |  |   88|      0|#define IA_XHEAAC_DEC_INIT_FATAL_UNIMPLEMENTED_CCE 0xFFFF9005
  ------------------
 2150|      0|      }
 2151|       |
 2152|  10.6k|      if (p_state_enhaacplus_dec->pstr_stream_sbr[0][0].no_elements) {
  ------------------
  |  Branch (2152:11): [True: 1.74k, False: 8.90k]
  ------------------
 2153|  1.74k|        sbr_present_flag = 1;
 2154|  1.74k|        p_obj_exhaacplus_dec->aac_config.ui_sbr_mode = 1;
 2155|  1.74k|      }
 2156|       |
 2157|  10.6k|      if (error_code) {
  ------------------
  |  Branch (2157:11): [True: 301, False: 10.3k]
  ------------------
 2158|    301|        if (p_state_enhaacplus_dec->ui_input_over) {
  ------------------
  |  Branch (2158:13): [True: 0, False: 301]
  ------------------
 2159|      0|          return IA_XHEAAC_DEC_INIT_FATAL_EO_INPUT_REACHED;
  ------------------
  |  |   84|      0|#define IA_XHEAAC_DEC_INIT_FATAL_EO_INPUT_REACHED 0xFFFF9001
  ------------------
 2160|      0|        }
 2161|       |
 2162|    301|        ixheaacd_updatebytesconsumed(p_state_enhaacplus_dec, it_bit_buff);
 2163|    301|        return error_code;
 2164|    301|      }
 2165|       |
 2166|  10.3k|      if (p_state_enhaacplus_dec->s_adts_hdr_present) {
  ------------------
  |  Branch (2166:11): [True: 5.52k, False: 4.82k]
  ------------------
 2167|  5.52k|        if (adts.no_raw_data_blocks != 0) {
  ------------------
  |  Branch (2167:13): [True: 3.21k, False: 2.30k]
  ------------------
 2168|  3.21k|          if (adts.protection_absent == 0 && it_bit_buff->cnt_bits >= 16) {
  ------------------
  |  Branch (2168:15): [True: 61, False: 3.15k]
  |  Branch (2168:46): [True: 55, False: 6]
  ------------------
 2169|     55|            adts.crc_check = ixheaacd_read_bits_buf(it_bit_buff, 16);
 2170|     55|          }
 2171|  3.21k|        }
 2172|  5.52k|        p_state_enhaacplus_dec->b_n_raw_data_blk--;
 2173|  5.52k|      }
 2174|       |
 2175|  10.3k|      sample_rate_2 = sample_rate_1;
 2176|  10.3k|      frame_size_2 = frame_size_1;
 2177|       |
 2178|  10.3k|      if (!p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx] &&
  ------------------
  |  Branch (2178:11): [True: 9.74k, False: 600]
  ------------------
 2179|  9.74k|          p_state_enhaacplus_dec->pstr_stream_sbr[0][0].no_elements) {
  ------------------
  |  Branch (2179:11): [True: 1.73k, False: 8.00k]
  ------------------
 2180|  1.73k|        WORD32 harmonic_sbr_flag = 0;
 2181|  1.73k|        if ((p_obj_exhaacplus_dec->aac_config.flag_16khz_out == 1) &&
  ------------------
  |  Branch (2181:13): [True: 0, False: 1.73k]
  ------------------
 2182|      0|            (sample_rate_1 == 8000)) {
  ------------------
  |  Branch (2182:13): [True: 0, False: 0]
  ------------------
 2183|      0|          p_obj_exhaacplus_dec->aac_config.flag_16khz_out = 0;
 2184|      0|        }
 2185|       |
 2186|  1.73k|        p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx] = ixheaacd_init_sbr(
 2187|  1.73k|            sample_rate_1, frame_size_1,
 2188|  1.73k|            (FLAG *)&p_obj_exhaacplus_dec->aac_config.down_sample_flag,
 2189|  1.73k|            p_state_enhaacplus_dec->sbr_persistent_mem_v,
 2190|  1.73k|            p_state_enhaacplus_dec->ptr_overlap_buf, MAXNRSBRCHANNELS, (WORD)1,
  ------------------
  |  |   54|  1.73k|#define MAXNRSBRCHANNELS 2
  ------------------
 2191|  1.73k|            1, frame_size_1 * 2, &harmonic_sbr_flag, NULL,
 2192|  1.73k|            p_state_enhaacplus_dec->str_sbr_config,
 2193|  1.73k|            p_state_enhaacplus_dec->audio_object_type,
 2194|  1.73k|            p_state_enhaacplus_dec->mps_dec_handle.ldmps_config
 2195|  1.73k|                .ldmps_present_flag,
 2196|  1.73k|            p_state_enhaacplus_dec->mps_dec_handle.ldmps_config
 2197|  1.73k|                .no_ldsbr_present);
 2198|  1.73k|        if (p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]) {
  ------------------
  |  Branch (2198:13): [True: 1.72k, False: 11]
  ------------------
 2199|  1.72k|          p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->xaac_jmp_buf =
 2200|  1.72k|              &(p_state_enhaacplus_dec->xaac_jmp_buf);
 2201|  1.72k|        }
 2202|  8.60k|      } else {
 2203|  8.60k|      }
 2204|       |
 2205|  10.3k|      if (p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx] &&
  ------------------
  |  Branch (2205:11): [True: 1.72k, False: 8.61k]
  ------------------
 2206|  1.72k|          p_state_enhaacplus_dec->pstr_stream_sbr[0][0].no_elements) {
  ------------------
  |  Branch (2206:11): [True: 1.72k, False: 0]
  ------------------
 2207|  1.72k|        ia_sbr_scr_struct sbr_scratch_struct;
 2208|  1.72k|        WORD16 num_channels_1_t = num_channels_1;
 2209|  1.72k|        ixheaacd_allocate_sbr_scr(&sbr_scratch_struct, p_state_enhaacplus_dec->aac_scratch_mem_v,
 2210|  1.72k|                                  time_data, 0, NULL, 0, 0);
 2211|  1.72k|        {
 2212|  1.72k|          WORD32 audio_object_type = p_state_enhaacplus_dec->audio_object_type;
 2213|       |
 2214|  1.72k|          if (audio_object_type != AOT_ER_AAC_ELD && audio_object_type != AOT_ER_AAC_LD) {
  ------------------
  |  Branch (2214:15): [True: 376, False: 1.35k]
  |  Branch (2214:54): [True: 376, False: 0]
  ------------------
 2215|    376|            WORD32 i = 0;
 2216|    376|            ia_dec_data_struct *pstr_dec_data =
 2217|    376|                (ia_dec_data_struct *)p_state_enhaacplus_dec->pstr_dec_data;
 2218|    376|            if (num_channels_1 == 1) {
  ------------------
  |  Branch (2218:17): [True: 329, False: 47]
  ------------------
 2219|   337k|              for (; i < 1024; i++) {
  ------------------
  |  Branch (2219:22): [True: 336k, False: 329]
  ------------------
 2220|   336k|                pstr_dec_data->str_usac_data.time_sample_vector[0][i] =
 2221|   336k|                    ((FLOAT32)time_data[i]);
 2222|   336k|              }
 2223|    329|              p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->time_sample_buf[0] =
 2224|    329|                  &pstr_dec_data->str_usac_data.time_sample_vector[0][0];
 2225|       |
 2226|    329|              p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->time_sample_buf[1] =
 2227|    329|                  &pstr_dec_data->str_usac_data.time_sample_vector[1][0];
 2228|    329|            } else if (num_channels_1 == 2) {
  ------------------
  |  Branch (2228:24): [True: 47, False: 0]
  ------------------
 2229|  48.1k|              for (; i < 1024; i++) {
  ------------------
  |  Branch (2229:22): [True: 48.1k, False: 47]
  ------------------
 2230|  48.1k|                pstr_dec_data->str_usac_data.time_sample_vector[0][i] =
 2231|  48.1k|                    ((FLOAT32)time_data[2 * i + 0]);
 2232|  48.1k|                pstr_dec_data->str_usac_data.time_sample_vector[1][i] =
 2233|  48.1k|                    ((FLOAT32)time_data[2 * i + 1]);
 2234|  48.1k|              }
 2235|     47|              p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->time_sample_buf[0] =
 2236|     47|                  &pstr_dec_data->str_usac_data.time_sample_vector[0][0];
 2237|       |
 2238|     47|              p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->time_sample_buf[1] =
 2239|     47|                  &pstr_dec_data->str_usac_data.time_sample_vector[1][0];
 2240|     47|            }
 2241|    376|          }
 2242|  1.72k|        }
 2243|  1.72k|        p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->ec_flag =
 2244|  1.72k|            p_obj_exhaacplus_dec->aac_config.ui_err_conceal;
 2245|  1.72k|        p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->esbr_hq =
 2246|  1.72k|            p_obj_exhaacplus_dec->aac_config.ui_hq_esbr;
 2247|  1.72k|        p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->enh_sbr =
 2248|  1.72k|            p_obj_exhaacplus_dec->aac_config.ui_enh_sbr;
 2249|  1.72k|        p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->enh_sbr_ps =
 2250|  1.72k|            p_obj_exhaacplus_dec->aac_config.ui_enh_sbr_ps;
 2251|       |
 2252|  1.72k|        if (p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]) {
  ------------------
  |  Branch (2252:13): [True: 1.72k, False: 0]
  ------------------
 2253|  1.72k|          p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->xaac_jmp_buf =
 2254|  1.72k|              &(p_state_enhaacplus_dec->xaac_jmp_buf);
 2255|  1.72k|        }
 2256|       |
 2257|  1.72k|        if (ixheaacd_applysbr(p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx],
  ------------------
  |  Branch (2257:13): [True: 21, False: 1.70k]
  ------------------
 2258|  1.72k|                              &p_state_enhaacplus_dec->pstr_stream_sbr[0][0], time_data,
 2259|  1.72k|                              &num_channels_1, frame_status,
 2260|  1.72k|                              p_obj_exhaacplus_dec->aac_config.down_sample_flag, 0,
 2261|  1.72k|                              &sbr_scratch_struct, 1, 1, 0, NULL, NULL,
 2262|  1.72k|                              p_state_enhaacplus_dec->eld_specific_config.ld_sbr_flag_present,
 2263|  1.72k|                              p_state_enhaacplus_dec->audio_object_type, 1,
 2264|  1.72k|                              p_state_enhaacplus_dec->ldmps_present, frame_size_1,
 2265|  1.72k|                              p_state_enhaacplus_dec->heaac_mps_handle.heaac_mps_present,
 2266|  1.72k|                              p_obj_exhaacplus_dec->aac_config.ui_err_conceal,
 2267|  1.72k|                              p_obj_exhaacplus_dec->aac_config.first_frame) != SBRDEC_OK) {
  ------------------
  |  |   33|  1.72k|#define SBRDEC_OK 0
  ------------------
 2268|     21|          p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx] = 0;
 2269|     21|          return -1;
 2270|  1.70k|        } else {
 2271|  1.70k|          if (!p_obj_exhaacplus_dec->aac_config.down_sample_flag) {
  ------------------
  |  Branch (2271:15): [True: 857, False: 850]
  ------------------
 2272|    857|            sample_rate_1 *= 2;
 2273|    857|          }
 2274|  1.70k|          if (p_state_enhaacplus_dec->eld_specific_config.ld_sbr_flag_present == 1) {
  ------------------
  |  Branch (2274:15): [True: 1.30k, False: 404]
  ------------------
 2275|  1.30k|            p_obj_exhaacplus_dec->p_state_aac->mps_dec_handle.pre_mix_req = 1;
 2276|  1.30k|            ixheaacd_mps_payload(
 2277|  1.30k|              p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx],
 2278|  1.30k|              p_obj_exhaacplus_dec);
 2279|  1.30k|          }
 2280|  1.70k|        }
 2281|  1.70k|        {
 2282|  1.70k|          WORD32 audio_object_type = p_state_enhaacplus_dec->audio_object_type;
 2283|       |
 2284|  1.70k|          if (audio_object_type != AOT_ER_AAC_ELD && audio_object_type != AOT_ER_AAC_LD) {
  ------------------
  |  Branch (2284:15): [True: 376, False: 1.33k]
  |  Branch (2284:54): [True: 376, False: 0]
  ------------------
 2285|    376|            WORD32 out_bytes = 0;
 2286|    376|            ia_dec_data_struct *pstr_dec_data =
 2287|    376|                (ia_dec_data_struct *)p_state_enhaacplus_dec->pstr_dec_data;
 2288|    376|            ixheaacd_samples_sat((WORD8 *)time_data, 2048, 16,
 2289|    376|                                 pstr_dec_data->str_usac_data.time_sample_vector, &out_bytes, 1);
 2290|    376|          }
 2291|  1.70k|        }
 2292|  1.70k|        if (p_obj_exhaacplus_dec->aac_config.flag_downmix) {
  ------------------
  |  Branch (2292:13): [True: 0, False: 1.70k]
  ------------------
 2293|      0|          num_channels_1 = 1;
 2294|      0|        }
 2295|  1.70k|        if (num_channels_1_t == 1 && num_channels_1 == 2) ps_detected = 1;
  ------------------
  |  Branch (2295:13): [True: 684, False: 1.02k]
  |  Branch (2295:38): [True: 0, False: 684]
  ------------------
 2296|  8.61k|      } else {
 2297|  8.61k|        p_state_enhaacplus_dec->mps_dec_handle.ldmps_config.no_ldsbr_present = 1;
 2298|  8.61k|      }
 2299|       |
 2300|  10.3k|      p_state_enhaacplus_dec->i_bytes_consumed = 0;
 2301|  10.3k|      p_state_enhaacplus_dec->pstr_bit_buf = it_bit_buff;
 2302|       |
 2303|  10.3k|      {
 2304|  10.3k|        p_state_enhaacplus_dec->pstr_aac_dec_info[ch_idx] =
 2305|  10.3k|            ixheaacd_aac_decoder_init(
 2306|  10.3k|                p_state_enhaacplus_dec,
 2307|  10.3k|                p_state_enhaacplus_dec->pstr_stream_sbr[0], 2,
 2308|  10.3k|                p_state_enhaacplus_dec->aac_persistent_mem_v,
 2309|  10.3k|                p_state_enhaacplus_dec->frame_length);
 2310|       |
 2311|  10.3k|        if (!p_state_enhaacplus_dec->pstr_aac_dec_info[ch_idx]) {
  ------------------
  |  Branch (2311:13): [True: 0, False: 10.3k]
  ------------------
 2312|      0|          p_state_enhaacplus_dec->i_bytes_consumed = 1;
 2313|      0|          return IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL;
  ------------------
  |  |   83|      0|#define IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL 0xFFFF9000
  ------------------
 2314|      0|        }
 2315|       |
 2316|  10.3k|        if (p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]) {
  ------------------
  |  Branch (2316:13): [True: 1.65k, False: 8.66k]
  ------------------
 2317|  1.65k|          WORD32 harmonic_sbr_flag = 0;
 2318|  1.65k|          p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx] = ixheaacd_init_sbr(
 2319|  1.65k|              sample_rate_2, frame_size_2,
 2320|  1.65k|              (FLAG *)&p_obj_exhaacplus_dec->aac_config.down_sample_flag,
 2321|  1.65k|              p_state_enhaacplus_dec->sbr_persistent_mem_v,
 2322|  1.65k|              p_state_enhaacplus_dec->ptr_overlap_buf, MAXNRSBRCHANNELS, 1, 1,
  ------------------
  |  |   54|  1.65k|#define MAXNRSBRCHANNELS 2
  ------------------
 2323|  1.65k|              frame_size_2 * 2, &harmonic_sbr_flag, NULL,
 2324|  1.65k|              p_state_enhaacplus_dec->str_sbr_config,
 2325|  1.65k|              p_state_enhaacplus_dec->audio_object_type,
 2326|  1.65k|              p_state_enhaacplus_dec->mps_dec_handle.ldmps_config
 2327|  1.65k|                .ldmps_present_flag,
 2328|  1.65k|              p_state_enhaacplus_dec->mps_dec_handle.ldmps_config
 2329|  1.65k|                .no_ldsbr_present);
 2330|  1.65k|        }
 2331|  10.3k|        if (p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]) {
  ------------------
  |  Branch (2331:13): [True: 1.65k, False: 8.66k]
  ------------------
 2332|  1.65k|          p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->xaac_jmp_buf =
 2333|  1.65k|              &(p_state_enhaacplus_dec->xaac_jmp_buf);
 2334|  1.65k|        }
 2335|  10.3k|      }
 2336|       |
 2337|  10.3k|      if (sample_rate < sample_rate_1) sample_rate = sample_rate_1;
  ------------------
  |  Branch (2337:11): [True: 7.95k, False: 2.37k]
  ------------------
 2338|       |
 2339|  10.3k|      ch_idx++;
 2340|       |
 2341|  10.3k|      if (p_state_enhaacplus_dec->audio_object_type >= ER_OBJECT_START &&
  ------------------
  |  |   64|  20.6k|#define ER_OBJECT_START 17
  ------------------
  |  Branch (2341:11): [True: 3.26k, False: 7.06k]
  ------------------
 2342|  3.26k|          (p_state_enhaacplus_dec->audio_object_type == AOT_ER_AAC_ELD ||
  ------------------
  |  Branch (2342:12): [True: 1.69k, False: 1.56k]
  ------------------
 2343|  1.56k|          p_state_enhaacplus_dec->audio_object_type == AOT_ER_AAC_LD ||
  ------------------
  |  Branch (2343:11): [True: 929, False: 636]
  ------------------
 2344|    636|          p_state_enhaacplus_dec->audio_object_type == AOT_ER_AAC_LC))
  ------------------
  |  Branch (2344:11): [True: 616, False: 20]
  ------------------
 2345|  3.24k|        break;
 2346|  10.3k|    }
 2347|       |
 2348|  7.25k|    {
 2349|  7.25k|      ia_adts_crc_info_struct *ptr_adts_crc_info =
 2350|  7.25k|          p_state_enhaacplus_dec->ptr_bit_stream->pstr_adts_crc_info;
 2351|  7.25k|      if (ptr_adts_crc_info->crc_active == 1) {
  ------------------
  |  Branch (2351:11): [True: 34, False: 7.22k]
  ------------------
 2352|     34|        if ((error_code = ixheaacd_adts_crc_check_crc(ptr_adts_crc_info))) {
  ------------------
  |  Branch (2352:13): [True: 34, False: 0]
  ------------------
 2353|     34|          return error_code;
 2354|     34|        }
 2355|     34|      }
 2356|  7.25k|    }
 2357|       |
 2358|  7.22k|    {
 2359|  7.22k|      VOID *temp;
 2360|  7.22k|      WORD prev_persistent_used_t;
 2361|  7.22k|      WORD prev_sbrpersistent_used_t;
 2362|  7.22k|      WORD ps_enable;
 2363|  7.22k|      WORD ch_idx_err = 0;
 2364|  7.22k|      WORD persistent_used_t = 0;
 2365|  7.22k|      WORD channel_check = 0;
 2366|  7.22k|      WORD cc_channel_check = 0;
 2367|  7.22k|      WORD max_ch_num = p_obj_exhaacplus_dec->aac_config.ui_max_channels;
 2368|  7.22k|      WORD32 harmonic_sbr_flag = 0;
 2369|  7.22k|      i = 0;
 2370|       |
 2371|  7.22k|      p_obj_exhaacplus_dec->aac_config.ui_n_channels = ch_idx;
 2372|  15.9k|      while (p_obj_exhaacplus_dec->aac_config.element_type[ch_idx_err] <= 3 &&
  ------------------
  |  Branch (2372:14): [True: 16.2k, False: 18.4E]
  ------------------
 2373|  16.2k|             p_obj_exhaacplus_dec->aac_config.element_type[ch_idx_err] >= 0) {
  ------------------
  |  Branch (2373:14): [True: 8.74k, False: 7.53k]
  ------------------
 2374|  8.74k|        ch_idx_err++;
 2375|  8.74k|      }
 2376|       |
 2377|  7.22k|      if (ch_idx_err == 0) {
  ------------------
  |  Branch (2377:11): [True: 12, False: 7.20k]
  ------------------
 2378|     12|        p_obj_exhaacplus_dec->p_state_aac->header_dec_done = 0;
 2379|     12|        p_state_enhaacplus_dec->i_bytes_consumed = (WORD32)(
 2380|     12|            it_bit_buff->ptr_read_next - it_bit_buff->ptr_bit_buf_base);
 2381|     12|        return IA_XHEAAC_DEC_INIT_NONFATAL_DECODE_FRAME_ERROR;
  ------------------
  |  |   80|     12|#define IA_XHEAAC_DEC_INIT_NONFATAL_DECODE_FRAME_ERROR 0x00001004
  ------------------
 2382|     12|      }
 2383|       |
 2384|  7.20k|      if (ch_idx_err == 1)
  ------------------
  |  Branch (2384:11): [True: 7.03k, False: 176]
  ------------------
 2385|  7.03k|        ps_enable = 1;
 2386|    176|      else
 2387|    176|        ps_enable = 0;
 2388|       |
 2389|  12.6k|      while (p_obj_exhaacplus_dec->aac_config.element_type[i] >= 0 &&
  ------------------
  |  Branch (2389:14): [True: 8.73k, False: 3.87k]
  ------------------
 2390|  8.73k|             p_obj_exhaacplus_dec->aac_config.element_type[i] <= 3) {
  ------------------
  |  Branch (2390:14): [True: 8.73k, False: 0]
  ------------------
 2391|  8.73k|        WORD32 channel = 0;
 2392|  8.73k|        switch (p_obj_exhaacplus_dec->aac_config.element_type[i]) {
 2393|  5.82k|          case 0:
  ------------------
  |  Branch (2393:11): [True: 5.82k, False: 2.91k]
  ------------------
 2394|  6.97k|          case 3:
  ------------------
  |  Branch (2394:11): [True: 1.15k, False: 7.58k]
  ------------------
 2395|  6.97k|            channel = 1;
 2396|  6.97k|            break;
 2397|  1.47k|          case 1:
  ------------------
  |  Branch (2397:11): [True: 1.47k, False: 7.25k]
  ------------------
 2398|  1.47k|            channel = 2;
 2399|  1.47k|            break;
 2400|    283|          case 2:
  ------------------
  |  Branch (2400:11): [True: 283, False: 8.45k]
  ------------------
 2401|    283|            if (max_ch_num > 2) {
  ------------------
  |  Branch (2401:17): [True: 283, False: 0]
  ------------------
 2402|    283|              if (p_obj_exhaacplus_dec->aac_config.element_instance_order[i] !=
  ------------------
  |  Branch (2402:19): [True: 174, False: 109]
  ------------------
 2403|    283|                  p_obj_exhaacplus_dec->aac_config.ui_coupling_channel) {
 2404|    174|                i++;
 2405|    174|                continue;
 2406|    174|              }
 2407|    109|              channel = 1;
 2408|    109|            } else {
 2409|      0|              i++;
 2410|      0|              continue;
 2411|      0|            }
 2412|    109|            cc_channel_check++;
 2413|    109|            break;
 2414|      0|          default:
  ------------------
  |  Branch (2414:11): [True: 0, False: 8.73k]
  ------------------
 2415|      0|            return -1;
 2416|  8.73k|        }
 2417|       |
 2418|  8.56k|        if (cc_channel_check > MAX_CC_CHANNEL_NUM)
  ------------------
  |  |   23|  8.56k|#define MAX_CC_CHANNEL_NUM (2)
  ------------------
  |  Branch (2418:13): [True: 1, False: 8.56k]
  ------------------
 2419|      1|          return IA_XHEAAC_DEC_EXE_FATAL_UNIMPLEMENTED_CCE;
  ------------------
  |  |  119|      1|#define IA_XHEAAC_DEC_EXE_FATAL_UNIMPLEMENTED_CCE 0xFFFF9800
  ------------------
 2420|  8.56k|        if (ps_enable == 1) {
  ------------------
  |  Branch (2420:13): [True: 7.02k, False: 1.54k]
  ------------------
 2421|  7.02k|          channel = 2;
 2422|  7.02k|        }
 2423|       |
 2424|  8.56k|        if (p_obj_exhaacplus_dec->aac_config.element_type[i] != 2) {
  ------------------
  |  Branch (2424:13): [True: 8.45k, False: 108]
  ------------------
 2425|  8.45k|          channel_check += channel;
 2426|  8.45k|        }
 2427|       |
 2428|  8.56k|        if (channel_check > max_ch_num) {
  ------------------
  |  Branch (2428:13): [True: 4, False: 8.55k]
  ------------------
 2429|      4|          p_state_enhaacplus_dec->i_bytes_consumed = 1;
 2430|      4|          return IA_XHEAAC_DEC_INIT_FATAL_STREAM_CHAN_GT_MAX;
  ------------------
  |  |   85|      4|#define IA_XHEAAC_DEC_INIT_FATAL_STREAM_CHAN_GT_MAX 0xFFFF9002
  ------------------
 2431|      4|        }
 2432|       |
 2433|  8.55k|        temp = p_state_enhaacplus_dec->aac_persistent_mem_v;
 2434|       |
 2435|  8.55k|        prev_persistent_used_t = persistent_used_t;
 2436|       |
 2437|  8.55k|        ixheaacd_allocate_mem_persistent(
 2438|  8.55k|            p_obj_exhaacplus_dec, p_state_enhaacplus_dec, channel,
 2439|  8.55k|            &persistent_used_t, &prev_sbrpersistent_used_t, ps_enable);
 2440|       |
 2441|  8.55k|        p_state_enhaacplus_dec->aac_persistent_mem_v = temp;
 2442|  8.55k|        p_state_enhaacplus_dec->last_frame_ok = 1;
 2443|       |
 2444|  8.55k|        p_state_enhaacplus_dec->num_channel_last = 0;
 2445|  8.55k|        p_state_enhaacplus_dec->ui_init_done = 0;
 2446|  8.55k|        p_state_enhaacplus_dec->ui_input_over = 0;
 2447|  8.55k|        p_state_enhaacplus_dec->ptr_bit_stream =
 2448|  8.55k|            p_state_enhaacplus_dec->pstr_bit_buf;
 2449|       |
 2450|  8.55k|        p_state_enhaacplus_dec->pstr_aac_dec_info[i] = 0;
 2451|       |
 2452|  8.55k|        p_state_enhaacplus_dec->pstr_aac_dec_info[i] =
 2453|  8.55k|            ixheaacd_aac_decoder_init(
 2454|  8.55k|                p_state_enhaacplus_dec,
 2455|  8.55k|                p_state_enhaacplus_dec->pstr_stream_sbr[i], channel,
 2456|  8.55k|                (WORD8 *)p_state_enhaacplus_dec->aac_persistent_mem_v +
 2457|  8.55k|                    prev_persistent_used_t,
 2458|  8.55k|                p_state_enhaacplus_dec->frame_length);
 2459|       |
 2460|  8.55k|        if (!p_state_enhaacplus_dec->pstr_aac_dec_info[i]) {
  ------------------
  |  Branch (2460:13): [True: 0, False: 8.55k]
  ------------------
 2461|      0|          p_state_enhaacplus_dec->i_bytes_consumed = 1;
 2462|      0|          return IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL;
  ------------------
  |  |   83|      0|#define IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL 0xFFFF9000
  ------------------
 2463|      0|        }
 2464|       |
 2465|  8.55k|        p_state_enhaacplus_dec->str_sbr_dec_info[i] = ixheaacd_init_sbr(
 2466|  8.55k|            sample_rate_2, frame_size_2,
 2467|  8.55k|            (FLAG *)&p_obj_exhaacplus_dec->aac_config.down_sample_flag,
 2468|  8.55k|            p_state_enhaacplus_dec->sbr_persistent_mem_v,
 2469|  8.55k|            p_state_enhaacplus_dec->ptr_overlap_buf, channel, ps_enable, 1,
 2470|  8.55k|            frame_size_2 * 2, &harmonic_sbr_flag, NULL,
 2471|  8.55k|            p_state_enhaacplus_dec->str_sbr_config,
 2472|  8.55k|            p_state_enhaacplus_dec->audio_object_type,
 2473|  8.55k|            p_state_enhaacplus_dec->mps_dec_handle.ldmps_config
 2474|  8.55k|                .ldmps_present_flag,
 2475|  8.55k|            p_state_enhaacplus_dec->mps_dec_handle.ldmps_config
 2476|  8.55k|                .no_ldsbr_present);
 2477|  8.55k|        if (p_state_enhaacplus_dec->str_sbr_dec_info[i]) {
  ------------------
  |  Branch (2477:13): [True: 8.51k, False: 43]
  ------------------
 2478|  8.51k|          p_state_enhaacplus_dec->str_sbr_dec_info[i]->xaac_jmp_buf =
 2479|  8.51k|              &(p_state_enhaacplus_dec->xaac_jmp_buf);
 2480|  8.51k|        }
 2481|  8.55k|        if ((sbr_present_flag &&
  ------------------
  |  Branch (2481:14): [True: 1.70k, False: 6.85k]
  ------------------
 2482|  1.70k|            ((p_obj_exhaacplus_dec->p_state_aac->audio_object_type ==
  ------------------
  |  Branch (2482:14): [True: 390, False: 1.31k]
  ------------------
 2483|  1.70k|              AOT_AAC_LC) ||
 2484|  1.31k|             (p_obj_exhaacplus_dec->p_state_aac->audio_object_type ==
  ------------------
  |  Branch (2484:14): [True: 0, False: 1.31k]
  ------------------
 2485|  1.31k|              AOT_SBR) ||
 2486|  1.31k|             (p_obj_exhaacplus_dec->p_state_aac->audio_object_type ==
  ------------------
  |  Branch (2486:14): [True: 0, False: 1.31k]
  ------------------
 2487|  1.31k|               AOT_PS))) ||
 2488|  8.16k|            ((p_state_enhaacplus_dec->mps_dec_handle.ldmps_config
  ------------------
  |  Branch (2488:14): [True: 265, False: 7.90k]
  ------------------
 2489|  8.16k|                  .ldmps_present_flag == 1) &&
 2490|    265|             (p_obj_exhaacplus_dec->p_state_aac->audio_object_type ==
  ------------------
  |  Branch (2490:14): [True: 265, False: 0]
  ------------------
 2491|    265|              AOT_ER_AAC_ELD)))
 2492|    655|          p_obj_exhaacplus_dec->aac_config.flag_to_stereo = 1;
 2493|  8.55k|        copy_qmf_to_ldmps(&p_obj_exhaacplus_dec->p_state_aac->mps_dec_handle,
 2494|  8.55k|                          p_state_enhaacplus_dec->sbr_persistent_mem_v);
 2495|  8.55k|        if (p_state_enhaacplus_dec->audio_object_type == AOT_AAC_LC &&
  ------------------
  |  Branch (2495:13): [True: 4.70k, False: 3.85k]
  ------------------
 2496|  4.70k|            p_state_enhaacplus_dec->ui_mps_out_bytes != 0) {
  ------------------
  |  Branch (2496:13): [True: 3.32k, False: 1.37k]
  ------------------
 2497|  3.32k|          p_state_enhaacplus_dec->heaac_mps_handle.heaac_mps_present = 1;
 2498|  3.32k|          if (p_state_enhaacplus_dec->pstr_stream_sbr[0][0].no_elements) {
  ------------------
  |  Branch (2498:15): [True: 0, False: 3.32k]
  ------------------
 2499|      0|            p_obj_exhaacplus_dec->p_state_aac->heaac_mps_handle.mps_with_sbr = 1;
 2500|      0|          }
 2501|  3.32k|          error_code =
 2502|  3.32k|              ixheaacd_aac_mps_init(p_obj_exhaacplus_dec, mps_buffer,
 2503|  3.32k|                                    p_state_enhaacplus_dec->ui_mps_out_bytes, sample_rate_1);
 2504|  3.32k|          if (error_code) return error_code;
  ------------------
  |  Branch (2504:15): [True: 59, False: 3.27k]
  ------------------
 2505|  3.27k|          p_obj_exhaacplus_dec->aac_config.ui_n_channels =
 2506|  3.27k|              p_state_enhaacplus_dec->heaac_mps_handle.num_output_channels_at;
 2507|  3.27k|          if (p_obj_exhaacplus_dec->p_state_aac->heaac_mps_handle.mps_with_sbr == 1) {
  ------------------
  |  Branch (2507:15): [True: 0, False: 3.27k]
  ------------------
 2508|      0|            p_obj_exhaacplus_dec->aac_config.ui_sbr_mode = 1;
 2509|      0|          }
 2510|  3.27k|          if (p_obj_exhaacplus_dec->aac_config.element_type[i + 1] >= 0 &&
  ------------------
  |  Branch (2510:15): [True: 1, False: 3.26k]
  ------------------
 2511|      1|              p_obj_exhaacplus_dec->aac_config.element_type[i + 1] <= 3) {
  ------------------
  |  Branch (2511:15): [True: 1, False: 0]
  ------------------
 2512|      1|            return IA_FATAL_ERROR;
  ------------------
  |  |   25|      1|#define IA_FATAL_ERROR 0x80000000
  ------------------
 2513|      1|          }
 2514|  3.26k|          break;
 2515|  3.27k|        }
 2516|  5.22k|        i++;
 2517|  5.22k|      }
 2518|  7.14k|      p_state_enhaacplus_dec->pers_mem_ptr =
 2519|  7.14k|          (WORD8 *)p_state_enhaacplus_dec->aac_persistent_mem_v +
 2520|  7.14k|          persistent_used_t;
 2521|       |
 2522|  7.14k|      p_obj_exhaacplus_dec->aac_config.i_channel_mask =
 2523|  7.14k|          ixheaacd_get_channel_mask(p_obj_exhaacplus_dec);
 2524|       |
 2525|  7.14k|      {
 2526|  7.14k|        num_channels_1 = 0;
 2527|  7.14k|        ch_idx = 0;
 2528|  15.7k|        while (p_obj_exhaacplus_dec->aac_config.element_type[ch_idx] >= 0 &&
  ------------------
  |  Branch (2528:16): [True: 8.61k, False: 7.14k]
  ------------------
 2529|  8.61k|               p_obj_exhaacplus_dec->aac_config.element_type[ch_idx] <= 3) {
  ------------------
  |  Branch (2529:16): [True: 8.61k, False: 0]
  ------------------
 2530|  8.61k|          if (p_obj_exhaacplus_dec->aac_config.element_type[ch_idx] == 0 ||
  ------------------
  |  Branch (2530:15): [True: 5.71k, False: 2.89k]
  ------------------
 2531|  2.89k|              p_obj_exhaacplus_dec->aac_config.element_type[ch_idx] == 3)
  ------------------
  |  Branch (2531:15): [True: 1.14k, False: 1.75k]
  ------------------
 2532|  6.85k|            num_channels_1 += 1;
 2533|  8.61k|          if (p_obj_exhaacplus_dec->aac_config.element_type[ch_idx] == 1)
  ------------------
  |  Branch (2533:15): [True: 1.47k, False: 7.13k]
  ------------------
 2534|  1.47k|            num_channels_1 += 2;
 2535|  8.61k|          ch_idx++;
 2536|  8.61k|        }
 2537|       |
 2538|  7.14k|        if (ch_idx == 2 && num_channels_1 == 2) {
  ------------------
  |  Branch (2538:13): [True: 222, False: 6.92k]
  |  Branch (2538:28): [True: 151, False: 71]
  ------------------
 2539|    151|          p_obj_exhaacplus_dec->aac_config.ui_channel_mode = 2;
 2540|    151|        }
 2541|  7.14k|        if (ch_idx == 1) {
  ------------------
  |  Branch (2541:13): [True: 6.94k, False: 200]
  ------------------
 2542|  6.94k|          if (num_channels_1 == 1)
  ------------------
  |  Branch (2542:15): [True: 5.61k, False: 1.32k]
  ------------------
 2543|  5.61k|            p_obj_exhaacplus_dec->aac_config.ui_channel_mode = 0;
 2544|  6.94k|          if (num_channels_1 == 2)
  ------------------
  |  Branch (2544:15): [True: 1.30k, False: 5.63k]
  ------------------
 2545|  1.30k|            p_obj_exhaacplus_dec->aac_config.ui_channel_mode = 1;
 2546|  6.94k|        }
 2547|       |
 2548|  7.14k|        if (ps_detected == 1 && num_channels_1 == 1) num_channels_1 = 2;
  ------------------
  |  Branch (2548:13): [True: 0, False: 7.14k]
  |  Branch (2548:33): [True: 0, False: 0]
  ------------------
 2549|  7.14k|      }
 2550|  7.14k|    }
 2551|  7.14k|    if (1 == p_obj_exhaacplus_dec->aac_config.downmix) num_channels_1 = 2;
  ------------------
  |  Branch (2551:9): [True: 0, False: 7.14k]
  ------------------
 2552|       |
 2553|  7.14k|    if (p_obj_exhaacplus_dec->aac_config.flag_downmix == 1) {
  ------------------
  |  Branch (2553:9): [True: 0, False: 7.14k]
  ------------------
 2554|      0|      num_channels_1 = 1;
 2555|      0|    }
 2556|       |
 2557|  7.14k|    if ((p_obj_exhaacplus_dec->aac_config.flag_to_stereo == 1) &&
  ------------------
  |  Branch (2557:9): [True: 570, False: 6.57k]
  ------------------
 2558|    570|        (ch_idx == 1 || num_channels_1 <= 2)) {
  ------------------
  |  Branch (2558:10): [True: 513, False: 57]
  |  Branch (2558:25): [True: 25, False: 32]
  ------------------
 2559|    538|      num_channels_1 = 2;
 2560|    538|    }
 2561|       |
 2562|  7.14k|    p_obj_exhaacplus_dec->aac_config.ui_n_channels = num_channels_1;
 2563|  7.14k|    p_obj_exhaacplus_dec->aac_config.ui_samp_freq = sample_rate;
 2564|  7.14k|    p_state_enhaacplus_dec->ui_init_done = 1;
 2565|       |
 2566|  7.14k|    memcpy(it_bit_buff, &temp_bit_buff, sizeof(struct ia_bit_buf_struct));
 2567|       |
 2568|  7.14k|    p_state_enhaacplus_dec->b_n_raw_data_blk = 0;
 2569|       |
 2570|  7.42k|    if (p_obj_exhaacplus_dec->p_state_aac->header_dec_done == 1) {
  ------------------
  |  Branch (2570:9): [True: 7.42k, False: 18.4E]
  ------------------
 2571|  7.42k|      p_obj_exhaacplus_dec->p_state_aac->header_dec_done = 0;
 2572|  7.42k|    }
 2573|  7.14k|  }
 2574|  16.0k|  return err_code;
 2575|  21.8k|}
ixheaacd_fill_slot_order:
 2579|  17.2k|                              WORD8 *ptr_tag_select, WORD32 *ptr_idx_no) {
 2580|  17.2k|  WORD32 i;
 2581|  17.2k|  WORD32 idx_no = *ptr_idx_no;
 2582|  17.2k|  WORD *p_slot_element = p_state_enhaacplus_dec->p_config->slot_element;
 2583|  17.2k|  WORD *p_element_type = p_state_enhaacplus_dec->p_config->element_type;
 2584|  17.2k|  WORD *p_element_instance_order =
 2585|  17.2k|      p_state_enhaacplus_dec->p_config->element_instance_order;
 2586|       |
 2587|  24.2k|  for (i = 0; i < ch; i++) {
  ------------------
  |  Branch (2587:15): [True: 7.02k, False: 17.2k]
  ------------------
 2588|  7.02k|    if (ptr_is_cpe[i] == 0) {
  ------------------
  |  Branch (2588:9): [True: 3.95k, False: 3.07k]
  ------------------
 2589|  3.95k|      *p_slot_element++ = idx_no++;
 2590|  3.95k|      *p_element_type++ = 0;
 2591|  3.95k|      *p_element_instance_order++ = ptr_tag_select[i];
 2592|  3.95k|    }
 2593|  7.02k|  }
 2594|  17.2k|  *ptr_idx_no = idx_no;
 2595|  17.2k|}
ixheaacd_fill_prog_config_slots:
 2598|  5.75k|    ia_aac_dec_state_struct *p_state_enhaacplus_dec) {
 2599|  5.75k|  WORD32 idx_no = 0;
 2600|       |
 2601|  5.75k|  ixheaacd_fill_slot_order(
 2602|  5.75k|      p_state_enhaacplus_dec, p_state_enhaacplus_dec->p_config->str_prog_config
 2603|  5.75k|                                  .num_front_channel_elements,
 2604|  5.75k|      p_state_enhaacplus_dec->p_config->str_prog_config.front_element_is_cpe,
 2605|  5.75k|      p_state_enhaacplus_dec->p_config->str_prog_config
 2606|  5.75k|          .front_element_tag_select,
 2607|  5.75k|      &idx_no);
 2608|       |
 2609|  5.75k|  ixheaacd_fill_slot_order(
 2610|  5.75k|      p_state_enhaacplus_dec, p_state_enhaacplus_dec->p_config->str_prog_config
 2611|  5.75k|                                  .num_side_channel_elements,
 2612|  5.75k|      p_state_enhaacplus_dec->p_config->str_prog_config.side_element_is_cpe,
 2613|  5.75k|      p_state_enhaacplus_dec->p_config->str_prog_config.side_element_tag_select,
 2614|  5.75k|      &idx_no);
 2615|       |
 2616|  5.75k|  ixheaacd_fill_slot_order(
 2617|  5.75k|      p_state_enhaacplus_dec, p_state_enhaacplus_dec->p_config->str_prog_config
 2618|  5.75k|                                  .num_back_channel_elements,
 2619|  5.75k|      p_state_enhaacplus_dec->p_config->str_prog_config.back_element_is_cpe,
 2620|  5.75k|      p_state_enhaacplus_dec->p_config->str_prog_config.back_element_tag_select,
 2621|  5.75k|      &idx_no);
 2622|  5.75k|}
ixheaacd_dec_execute:
 2625|   385k|    ia_exhaacplus_dec_api_struct *p_obj_exhaacplus_dec) {
 2626|   385k|  ia_adts_header_struct adts = {0};
 2627|   385k|  ia_aac_dec_state_struct *p_state_enhaacplus_dec;
 2628|       |
 2629|   385k|  UWORD8 *in_buffer;
 2630|   385k|  WORD16 *time_data;
 2631|   385k|  WORD16 num_of_out_samples = 0;
 2632|   385k|  WORD16 frame_size = 0;
 2633|   385k|  WORD32 sample_rate_dec = 0;
 2634|   385k|  WORD32 sample_rate = 0;
 2635|   385k|  WORD16 num_ch = 0;
 2636|   385k|  struct ia_bit_buf_struct *it_bit_buff;
 2637|   385k|  UWORD8 *mps_buffer;
 2638|   385k|  WORD32 error_code = IA_NO_ERROR;
  ------------------
  |  |   23|   385k|#define IA_NO_ERROR 0x00000000
  ------------------
 2639|   385k|  WORD ch_idx1;
 2640|   385k|  WORD type;
 2641|   385k|  WORD total_channels = 0;
 2642|   385k|  WORD total_elements = 0;
 2643|   385k|  WORD16 *actual_out_buffer = NULL;
 2644|   385k|  WORD ps_enable;
 2645|   385k|  WORD esbr_mono_downmix = 0;
 2646|   385k|  WORD8 element_used[MAX_BS_ELEMENT];
 2647|   385k|  WORD32 channel_coupling_flag = 0;
 2648|       |
 2649|   385k|  SIZE_T bytes_for_sync;
  ------------------
  |  |   28|   385k|#define SIZE_T size_t
  ------------------
 2650|   385k|  WORD32 audio_mux_length_bytes_last = 0;
 2651|   385k|  WORD32 ret_val;
 2652|   385k|  WORD32 mps_out_samples;
 2653|       |
 2654|   385k|  p_obj_exhaacplus_dec->aac_config.ui_sbr_mode = 0;
 2655|   385k|  p_obj_exhaacplus_dec->aac_config.frame_status = 1;
 2656|       |
 2657|   385k|  if (p_obj_exhaacplus_dec->p_state_aac != NULL) {
  ------------------
  |  Branch (2657:7): [True: 385k, False: 0]
  ------------------
 2658|   385k|    ret_val = setjmp(p_obj_exhaacplus_dec->p_state_aac->xaac_jmp_buf);
 2659|   385k|    if (ret_val != 0) {
  ------------------
  |  Branch (2659:9): [True: 3.71k, False: 381k]
  ------------------
 2660|  3.71k|      p_obj_exhaacplus_dec->p_state_aac->i_bytes_consumed =
 2661|  3.71k|          p_obj_exhaacplus_dec->p_state_aac->ui_in_bytes;
 2662|  3.71k|      p_obj_exhaacplus_dec->p_state_aac->ui_out_bytes = 0;
 2663|  3.71k|      p_obj_exhaacplus_dec->aac_config.frame_status = 0;
 2664|  3.71k|      return IA_NO_ERROR;
  ------------------
  |  |   23|  3.71k|#define IA_NO_ERROR 0x00000000
  ------------------
 2665|  3.71k|    }
 2666|   385k|  }
 2667|       |
 2668|   381k|  time_data = (WORD16 *)(p_obj_exhaacplus_dec
 2669|   381k|                             ->pp_mem_aac[IA_ENHAACPLUS_DEC_OUTPUT_IDX]);
  ------------------
  |  |   35|   381k|#define IA_ENHAACPLUS_DEC_OUTPUT_IDX (3)
  ------------------
 2670|   381k|  in_buffer = p_obj_exhaacplus_dec->pp_mem_aac[IA_ENHAACPLUS_DEC_INPUT_IDX];
  ------------------
  |  |   34|   381k|#define IA_ENHAACPLUS_DEC_INPUT_IDX (2)
  ------------------
 2671|   381k|  p_state_enhaacplus_dec = p_obj_exhaacplus_dec->p_state_aac;
 2672|   381k|  p_state_enhaacplus_dec->aac_scratch_mem_v =
 2673|   381k|      p_obj_exhaacplus_dec->pp_mem_aac[IA_ENHAACPLUS_DEC_SCRATCH_IDX];
  ------------------
  |  |   33|   381k|#define IA_ENHAACPLUS_DEC_SCRATCH_IDX (1)
  ------------------
 2674|   381k|  p_state_enhaacplus_dec->mps_header = -1;
 2675|   381k|  mps_buffer = p_state_enhaacplus_dec->mps_buffer;
 2676|   381k|  it_bit_buff = p_state_enhaacplus_dec->pstr_bit_buf;
 2677|       |
 2678|   381k|  ch_idx1 = 0;
 2679|   381k|  p_state_enhaacplus_dec->i_bytes_consumed = 0;
 2680|       |
 2681|   381k|  if (p_state_enhaacplus_dec->audio_object_type == AOT_USAC) {
  ------------------
  |  Branch (2681:7): [True: 183k, False: 197k]
  ------------------
 2682|   183k|    WORD32 pcm_size = p_obj_exhaacplus_dec->aac_config.ui_pcm_wdsz;
 2683|   183k|    WORD8 *inbuffer = (WORD8 *)(p_obj_exhaacplus_dec
 2684|   183k|                                    ->pp_mem_aac[IA_ENHAACPLUS_DEC_INPUT_IDX]);
  ------------------
  |  |   34|   183k|#define IA_ENHAACPLUS_DEC_INPUT_IDX (2)
  ------------------
 2685|   183k|    WORD8 *outbuffer =
 2686|   183k|        (WORD8 *)(p_obj_exhaacplus_dec
 2687|   183k|                      ->pp_mem_aac[IA_ENHAACPLUS_DEC_OUTPUT_IDX]);
  ------------------
  |  |   35|   183k|#define IA_ENHAACPLUS_DEC_OUTPUT_IDX (3)
  ------------------
 2688|   183k|    WORD32 out_bytes = 0;
 2689|       |
 2690|   183k|    WORD32 frames_done = p_obj_exhaacplus_dec->p_state_aac->frame_counter;
 2691|       |
 2692|   183k|    ia_dec_data_struct *pstr_dec_data =
 2693|   183k|        (ia_dec_data_struct *)(p_obj_exhaacplus_dec->p_state_aac
 2694|   183k|                                   ->pstr_dec_data);
 2695|       |
 2696|   183k|    if (pstr_dec_data->str_usac_data.down_samp_sbr != 0) return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
  |  Branch (2696:9): [True: 0, False: 183k]
  ------------------
 2697|       |
 2698|   183k|    if (p_obj_exhaacplus_dec->p_state_aac->ui_input_over == 0) {
  ------------------
  |  Branch (2698:9): [True: 183k, False: 0]
  ------------------
 2699|   183k|      ia_audio_specific_config_struct *ptr_audio_specific_config =
 2700|   183k|          ((ia_audio_specific_config_struct *)
 2701|   183k|               p_obj_exhaacplus_dec->p_state_aac->ia_audio_specific_config);
 2702|       |
 2703|   183k|      ptr_audio_specific_config->str_usac_config.str_usac_dec_config
 2704|   183k|          .preroll_counter = 0;
 2705|   183k|      {
 2706|   183k|        WORD32 iii = 0;
 2707|   919k|        for (iii = 0; iii < (MAX_AUDIO_PREROLLS + 1); iii++) {
  ------------------
  |  |  249|   919k|#define MAX_AUDIO_PREROLLS 3
  ------------------
  |  Branch (2707:23): [True: 735k, False: 183k]
  ------------------
 2708|   735k|          ((ia_dec_data_struct *)(p_obj_exhaacplus_dec->p_state_aac
 2709|   735k|                                      ->pstr_dec_data))
 2710|   735k|              ->str_frame_data.str_audio_specific_config.str_usac_config
 2711|   735k|              .str_usac_dec_config.usac_ext_gain_payload_len[iii] = 0;
 2712|   735k|          ptr_audio_specific_config->str_usac_config.str_usac_dec_config
 2713|   735k|              .usac_ext_gain_payload_len[iii] =
 2714|   735k|              0;  // reinitilize the payload len buff
 2715|   735k|          ptr_audio_specific_config->str_usac_config.str_usac_dec_config
 2716|   735k|              .preroll_bytes[iii] = 0;
 2717|   735k|        }
 2718|   183k|      }
 2719|       |
 2720|   183k|      ((ia_dec_data_struct *)(p_obj_exhaacplus_dec->p_state_aac->pstr_dec_data))
 2721|   183k|          ->str_frame_data.str_audio_specific_config.str_usac_config
 2722|   183k|          .str_usac_dec_config.preroll_counter = 0;
 2723|   183k|      error_code = ixheaacd_dec_main(
 2724|   183k|          p_obj_exhaacplus_dec, inbuffer, outbuffer, &out_bytes, frames_done,
 2725|   183k|          pcm_size, &p_obj_exhaacplus_dec->p_state_aac->num_of_output_ch);
 2726|   183k|      if (error_code) {
  ------------------
  |  Branch (2726:11): [True: 919, False: 183k]
  ------------------
 2727|    919|        if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
  ------------------
  |  Branch (2727:13): [True: 0, False: 919]
  ------------------
 2728|      0|          p_obj_exhaacplus_dec->aac_config.frame_status = 0;
 2729|    919|        } else {
 2730|    919|          return error_code;
 2731|    919|        }
 2732|    919|      }
 2733|   183k|      p_obj_exhaacplus_dec->p_state_aac->frame_counter++;
 2734|   183k|    } else {
 2735|      0|      out_bytes = 0;
 2736|      0|    }
 2737|       |
 2738|   183k|    if (pstr_dec_data->str_usac_data.ec_flag == 0) {
  ------------------
  |  Branch (2738:9): [True: 181k, False: 1.78k]
  ------------------
 2739|   181k|      if (p_state_enhaacplus_dec->bs_format != LOAS_BSFORMAT) {
  ------------------
  |  |   29|   181k|#define LOAS_BSFORMAT 3
  ------------------
  |  Branch (2739:11): [True: 1.55k, False: 179k]
  ------------------
 2740|  1.55k|        p_obj_exhaacplus_dec->p_state_aac->i_bytes_consumed =
 2741|  1.55k|            p_obj_exhaacplus_dec->p_state_aac->ui_in_bytes;
 2742|  1.55k|      }
 2743|   181k|    } else {
 2744|  1.78k|      if (p_state_enhaacplus_dec->bs_format != LOAS_BSFORMAT) {
  ------------------
  |  |   29|  1.78k|#define LOAS_BSFORMAT 3
  ------------------
  |  Branch (2744:11): [True: 0, False: 1.78k]
  ------------------
 2745|      0|        if (pstr_dec_data->str_usac_data.frame_ok == 0) {
  ------------------
  |  Branch (2745:13): [True: 0, False: 0]
  ------------------
 2746|      0|          p_obj_exhaacplus_dec->p_state_aac->i_bytes_consumed =
 2747|      0|              p_obj_exhaacplus_dec->p_state_aac->ui_in_bytes;
 2748|      0|          pstr_dec_data->dec_bit_buf.cnt_bits = 0;
 2749|      0|        } else {
 2750|      0|          ia_dec_data_struct *pstr_dec_data =
 2751|      0|              (ia_dec_data_struct *)p_obj_exhaacplus_dec->p_state_aac->pstr_dec_data;
 2752|       |
 2753|      0|          if (pstr_dec_data->dec_bit_buf.cnt_bits & 7) {
  ------------------
  |  Branch (2753:15): [True: 0, False: 0]
  ------------------
 2754|      0|            pstr_dec_data->dec_bit_buf.cnt_bits -= (pstr_dec_data->dec_bit_buf.cnt_bits & 7);
 2755|      0|          }
 2756|      0|          if (pstr_dec_data->dec_bit_buf.cnt_bits == 0) {
  ------------------
  |  Branch (2756:15): [True: 0, False: 0]
  ------------------
 2757|      0|            p_obj_exhaacplus_dec->p_state_aac->i_bytes_consumed =
 2758|      0|                p_obj_exhaacplus_dec->p_state_aac->ui_in_bytes;
 2759|      0|          } else {
 2760|      0|            p_obj_exhaacplus_dec->p_state_aac->i_bytes_consumed =
 2761|      0|                p_obj_exhaacplus_dec->p_state_aac->ui_in_bytes -
 2762|      0|                (pstr_dec_data->dec_bit_buf.cnt_bits >> 3);
 2763|      0|          }
 2764|      0|        }
 2765|      0|      }
 2766|  1.78k|    }
 2767|       |
 2768|   183k|    p_obj_exhaacplus_dec->p_state_aac->ui_out_bytes = out_bytes;
 2769|   183k|    p_obj_exhaacplus_dec->aac_config.ui_n_channels =
 2770|   183k|        p_obj_exhaacplus_dec->p_state_aac->num_of_output_ch;
 2771|   183k|    pstr_dec_data->str_usac_data.sbr_parse_err_flag = 0;
 2772|       |
 2773|   183k|    return 0;
 2774|   183k|  }
 2775|       |
 2776|   421k|  while (p_obj_exhaacplus_dec->aac_config.element_type[ch_idx1] <= 3 &&
  ------------------
  |  Branch (2776:10): [True: 425k, False: 18.4E]
  ------------------
 2777|   425k|         p_obj_exhaacplus_dec->aac_config.element_type[ch_idx1] >= 0) {
  ------------------
  |  Branch (2777:10): [True: 224k, False: 201k]
  ------------------
 2778|   224k|    if (p_obj_exhaacplus_dec->aac_config.element_type[ch_idx1] == 0 ||
  ------------------
  |  Branch (2778:9): [True: 166k, False: 57.5k]
  ------------------
 2779|   178k|        p_obj_exhaacplus_dec->aac_config.element_type[ch_idx1] == 3) {
  ------------------
  |  Branch (2779:9): [True: 11.6k, False: 45.8k]
  ------------------
 2780|   178k|      total_channels += 1;
 2781|   178k|      total_elements += 1;
 2782|   178k|    }
 2783|   224k|    if (p_obj_exhaacplus_dec->aac_config.element_type[ch_idx1] == 1) {
  ------------------
  |  Branch (2783:9): [True: 44.5k, False: 179k]
  ------------------
 2784|  44.5k|      total_elements += 1;
 2785|  44.5k|      total_channels += 2;
 2786|  44.5k|    }
 2787|   224k|    if (p_obj_exhaacplus_dec->aac_config.element_type[ch_idx1] == 2) {
  ------------------
  |  Branch (2787:9): [True: 1.28k, False: 222k]
  ------------------
 2788|  1.28k|      total_elements += 1;
 2789|  1.28k|    }
 2790|       |
 2791|   224k|    ch_idx1++;
 2792|   224k|    if (ch_idx1 > MAX_BS_ELEMENT) {
  ------------------
  |  |   24|   224k|#define MAX_BS_ELEMENT (8 + MAX_CC_CHANNEL_NUM)
  |  |  ------------------
  |  |  |  |   23|   224k|#define MAX_CC_CHANNEL_NUM (2)
  |  |  ------------------
  ------------------
  |  Branch (2792:9): [True: 0, False: 224k]
  ------------------
 2793|      0|      if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal)
  ------------------
  |  Branch (2793:11): [True: 0, False: 0]
  ------------------
 2794|      0|        break;
 2795|      0|      else
 2796|      0|        return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
 2797|      0|    }
 2798|   224k|  }
 2799|       |
 2800|   197k|  if (ch_idx1 != 1) {
  ------------------
  |  Branch (2800:7): [True: 13.9k, False: 183k]
  ------------------
 2801|  13.9k|    ps_enable = 0;
 2802|  13.9k|    if (p_obj_exhaacplus_dec->aac_config.ui_max_channels > 2) {
  ------------------
  |  Branch (2802:9): [True: 13.9k, False: 0]
  ------------------
 2803|  13.9k|      WORD32 scratch_pointer;
 2804|       |
 2805|  13.9k|      scratch_pointer = (MAX_SCR_SIZE - SCR_INTER_SCR_SIZE);
  ------------------
  |  |  167|  13.9k|#define MAX_SCR_SIZE (max(max(HEAACV2_MAX_SIZE, ELDV2_MAX_SIZE), LD_MAX_SIZE))
  |  |  ------------------
  |  |  |  |   74|   111k|#define max(a, b) (((a) > (b)) ? (a) : (b))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:20): [Folded, False: 13.9k]
  |  |  |  |  |  Branch (74:22): [True: 0, Folded]
  |  |  |  |  |  Branch (74:22): [True: 0, Folded]
  |  |  |  |  |  Branch (74:22): [True: 0, Folded]
  |  |  |  |  |  Branch (74:22): [True: 0, Folded]
  |  |  |  |  |  Branch (74:22): [Folded, False: 13.9k]
  |  |  |  |  |  Branch (74:28): [True: 0, Folded]
  |  |  |  |  |  Branch (74:35): [True: 0, Folded]
  |  |  |  |  |  Branch (74:35): [True: 0, Folded]
  |  |  |  |  |  Branch (74:35): [True: 0, Folded]
  |  |  |  |  |  Branch (74:35): [True: 0, Folded]
  |  |  |  |  |  Branch (74:35): [Folded, False: 0]
  |  |  |  |  |  Branch (74:41): [True: 13.9k, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                    scratch_pointer = (MAX_SCR_SIZE - SCR_INTER_SCR_SIZE);
  ------------------
  |  |  143|  13.9k|  (MAX_CHANNEL_COUNT *                                                              \
  |  |  ------------------
  |  |  |  |  212|  13.9k|#define MAX_CHANNEL_COUNT (128)
  |  |  ------------------
  |  |  144|  13.9k|   IXHEAAC_GET_SIZE_ALIGNED((IA_ENHAACPLUS_DEC_SAMPLES_PER_FRAME * sizeof(WORD16)), \
  |  |  ------------------
  |  |  |  |   87|  13.9k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  |  |  ------------------
  |  |  145|  13.9k|                            BYTE_ALIGN_8))
  ------------------
 2806|       |
 2807|  13.9k|      p_state_enhaacplus_dec->coup_ch_output =
 2808|  13.9k|          (WORD32 *)((WORD8 *)
 2809|  13.9k|                         p_obj_exhaacplus_dec->p_state_aac->aac_scratch_mem_v +
 2810|  13.9k|                     scratch_pointer);
 2811|  13.9k|    }
 2812|       |
 2813|  13.9k|  }
 2814|       |
 2815|   183k|  else {
 2816|   183k|    if (total_channels < (WORD)p_obj_exhaacplus_dec->aac_config.ui_n_channels)
  ------------------
  |  Branch (2816:9): [True: 16.9k, False: 166k]
  ------------------
 2817|  16.9k|      total_channels = p_obj_exhaacplus_dec->aac_config.ui_n_channels;
 2818|   183k|    ps_enable = 1;
 2819|   183k|  }
 2820|       |
 2821|   197k|  p_obj_exhaacplus_dec->p_state_aac->ui_out_bytes = 0;
 2822|   197k|  p_obj_exhaacplus_dec->p_state_aac->ui_mps_out_bytes = 0;
 2823|   197k|  if (p_state_enhaacplus_dec->ui_in_bytes == 0) {
  ------------------
  |  Branch (2823:7): [True: 0, False: 197k]
  ------------------
 2824|      0|    UWORD32 i;
 2825|      0|    WORD32 j;
 2826|      0|    if (p_state_enhaacplus_dec->peak_lim_init == 1) {
  ------------------
  |  Branch (2826:9): [True: 0, False: 0]
  ------------------
 2827|      0|      p_obj_exhaacplus_dec->p_state_aac->ui_out_bytes =
 2828|      0|          (p_state_enhaacplus_dec->peak_limiter.attack_time_samples) *
 2829|      0|          total_channels * sizeof(WORD16);
 2830|       |
 2831|      0|      for (j = 0; j < total_channels; j++) {
  ------------------
  |  Branch (2831:19): [True: 0, False: 0]
  ------------------
 2832|      0|        for (i = 0;
 2833|      0|             i < (p_state_enhaacplus_dec->peak_limiter.attack_time_samples -
  ------------------
  |  Branch (2833:14): [True: 0, False: 0]
  ------------------
 2834|      0|                  p_state_enhaacplus_dec->peak_limiter.delayed_input_index);
 2835|      0|             i++) {
 2836|      0|          *(time_data + total_channels * i + j) = ixheaac_round16(
 2837|      0|              (WORD32)*(p_state_enhaacplus_dec->peak_limiter.delayed_input +
 2838|      0|                (p_state_enhaacplus_dec->peak_limiter.delayed_input_index) *
 2839|      0|                    total_channels +
 2840|      0|                total_channels * i + j));
 2841|      0|        }
 2842|      0|      }
 2843|       |
 2844|      0|      for (j = 0; j < total_channels; j++) {
  ------------------
  |  Branch (2844:19): [True: 0, False: 0]
  ------------------
 2845|      0|        for (i = 0;
 2846|      0|             i < p_state_enhaacplus_dec->peak_limiter.delayed_input_index;
  ------------------
  |  Branch (2846:14): [True: 0, False: 0]
  ------------------
 2847|      0|             i++) {
 2848|      0|          *(time_data +
 2849|      0|            (p_state_enhaacplus_dec->peak_limiter.attack_time_samples -
 2850|      0|             p_state_enhaacplus_dec->peak_limiter.delayed_input_index) *
 2851|      0|                total_channels +
 2852|      0|            total_channels * i + j) =
 2853|      0|              ixheaac_round16(
 2854|      0|                  (WORD32)*(p_state_enhaacplus_dec->peak_limiter.delayed_input +
 2855|      0|                   total_channels * i + j));
 2856|      0|        }
 2857|      0|      }
 2858|       |
 2859|      0|      if (p_obj_exhaacplus_dec->aac_config.dup_stereo_flag) {
  ------------------
  |  Branch (2859:11): [True: 0, False: 0]
  ------------------
 2860|      0|        for (i = 0;
 2861|      0|             i < (p_state_enhaacplus_dec->peak_limiter.attack_time_samples);
  ------------------
  |  Branch (2861:14): [True: 0, False: 0]
  ------------------
 2862|      0|             i++) {
 2863|      0|          time_data[2 * i + 1] = time_data[2 * i + 0];
 2864|      0|        }
 2865|      0|      }
 2866|      0|    } else {
 2867|      0|      p_obj_exhaacplus_dec->p_state_aac->ui_out_bytes = 0;
 2868|      0|    }
 2869|       |
 2870|      0|    p_state_enhaacplus_dec->i_bytes_consumed = 0;
 2871|      0|    return IA_NO_ERROR;
  ------------------
  |  |   23|      0|#define IA_NO_ERROR 0x00000000
  ------------------
 2872|      0|  }
 2873|       |
 2874|   197k|  if (ch_idx1 == 0) {
  ------------------
  |  Branch (2874:7): [True: 0, False: 197k]
  ------------------
 2875|      0|    p_state_enhaacplus_dec->i_bytes_consumed = 1;
 2876|      0|    if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
  ------------------
  |  Branch (2876:9): [True: 0, False: 0]
  ------------------
 2877|      0|      p_obj_exhaacplus_dec->aac_config.frame_status = 0;
 2878|      0|    } else {
 2879|      0|      return IA_XHEAAC_DEC_EXE_NONFATAL_DECODE_FRAME_ERROR;
  ------------------
  |  |  102|      0|#define IA_XHEAAC_DEC_EXE_NONFATAL_DECODE_FRAME_ERROR 0x00001807
  ------------------
 2880|      0|    }
 2881|      0|  }
 2882|   197k|  if (total_channels > (WORD)p_obj_exhaacplus_dec->aac_config.ui_max_channels) {
  ------------------
  |  Branch (2882:7): [True: 34, False: 197k]
  ------------------
 2883|     34|    p_state_enhaacplus_dec->i_bytes_consumed = 1;
 2884|     34|    if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
  ------------------
  |  Branch (2884:9): [True: 0, False: 34]
  ------------------
 2885|      0|      p_obj_exhaacplus_dec->aac_config.frame_status = 0;
 2886|     34|    } else {
 2887|     34|      return IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_MAX_CHANNEL;
  ------------------
  |  |   50|     34|#define IA_XHEAAC_DEC_CONFIG_NONFATAL_INVALID_MAX_CHANNEL 0x00000808
  ------------------
 2888|     34|    }
 2889|     34|  }
 2890|       |
 2891|   197k|  if (p_state_enhaacplus_dec->audio_object_type == AOT_ER_AAC_LD ||
  ------------------
  |  Branch (2891:7): [True: 61.1k, False: 136k]
  ------------------
 2892|   136k|      p_state_enhaacplus_dec->audio_object_type == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (2892:7): [True: 57.1k, False: 79.5k]
  ------------------
 2893|   121k|    if (p_obj_exhaacplus_dec->aac_config.ui_mp4_flag)
  ------------------
  |  Branch (2893:9): [True: 518, False: 121k]
  ------------------
 2894|    518|      p_state_enhaacplus_dec->frame_size = p_state_enhaacplus_dec->ui_in_bytes;
 2895|   121k|  }
 2896|       |
 2897|   197k|  if (p_state_enhaacplus_dec->audio_object_type == AOT_ER_AAC_LC) {
  ------------------
  |  Branch (2897:7): [True: 36.9k, False: 160k]
  ------------------
 2898|  36.9k|    if (p_obj_exhaacplus_dec->aac_config.ui_mp4_flag)
  ------------------
  |  Branch (2898:9): [True: 76, False: 36.8k]
  ------------------
 2899|     76|      p_state_enhaacplus_dec->frame_size = 1024;
 2900|  36.9k|  }
 2901|       |
 2902|   197k|  {
 2903|   197k|    ixheaacd_create_init_bit_buf(it_bit_buff, in_buffer,
 2904|   197k|                                 p_state_enhaacplus_dec->ui_in_bytes);
 2905|   197k|    it_bit_buff->xaac_jmp_buf = &(p_state_enhaacplus_dec->xaac_jmp_buf);
 2906|       |
 2907|   197k|    it_bit_buff->adts_header_present =
 2908|   197k|        p_state_enhaacplus_dec->s_adts_hdr_present;
 2909|   197k|    it_bit_buff->no_raw_data_blocks =
 2910|   197k|        (WORD8)p_state_enhaacplus_dec->b_n_raw_data_blk;
 2911|   197k|    it_bit_buff->protection_absent = p_state_enhaacplus_dec->protection_absent;
 2912|       |
 2913|   197k|    if (p_state_enhaacplus_dec->s_adts_hdr_present) {
  ------------------
  |  Branch (2913:9): [True: 29.3k, False: 168k]
  ------------------
 2914|  29.3k|      if (p_state_enhaacplus_dec->b_n_raw_data_blk == 0) {
  ------------------
  |  Branch (2914:11): [True: 27.6k, False: 1.68k]
  ------------------
 2915|  27.6k|        WORD32 error;
 2916|       |
 2917|  27.6k|        error = ixheaacd_readifadts(p_state_enhaacplus_dec, it_bit_buff, &adts);
 2918|  27.6k|        if (error) {
  ------------------
  |  Branch (2918:13): [True: 903, False: 26.7k]
  ------------------
 2919|    903|          if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
  ------------------
  |  Branch (2919:15): [True: 0, False: 903]
  ------------------
 2920|      0|            p_obj_exhaacplus_dec->aac_config.frame_status = 0;
 2921|      0|            if (adts.samp_freq_index > 11) {
  ------------------
  |  Branch (2921:17): [True: 0, False: 0]
  ------------------
 2922|      0|              adts.samp_freq_index = 11;
 2923|      0|            }
 2924|    903|          } else {
 2925|    903|            return error;
 2926|    903|          }
 2927|    903|        }
 2928|       |
 2929|  26.7k|        if ((WORD32)p_state_enhaacplus_dec->sampling_rate !=
  ------------------
  |  Branch (2929:13): [True: 15, False: 26.6k]
  ------------------
 2930|  26.7k|            (WORD32)((p_obj_exhaacplus_dec->aac_tables.pstr_huffmann_tables
 2931|  26.7k|                          ->str_sample_rate_info[adts.samp_freq_index]
 2932|  26.7k|                          .sampling_frequency))) {
 2933|     15|          p_state_enhaacplus_dec->i_bytes_consumed = 0;
 2934|     15|          if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
  ------------------
  |  Branch (2934:15): [True: 0, False: 15]
  ------------------
 2935|      0|            p_obj_exhaacplus_dec->aac_config.frame_status = 0;
 2936|     15|          } else {
 2937|     15|            return IA_XHEAAC_DEC_EXE_NONFATAL_CHANGED_ADTS_SF;
  ------------------
  |  |  107|     15|#define IA_XHEAAC_DEC_EXE_NONFATAL_CHANGED_ADTS_SF 0x0000180C
  ------------------
 2938|     15|          }
 2939|     15|        }
 2940|  26.7k|      }
 2941|  29.3k|    }
 2942|       |
 2943|   196k|    bytes_for_sync = (SIZE_T)it_bit_buff->ptr_read_next;
 2944|       |
 2945|   196k|    if (p_state_enhaacplus_dec->bs_format == LOAS_BSFORMAT) {
  ------------------
  |  |   29|   196k|#define LOAS_BSFORMAT 3
  ------------------
  |  Branch (2945:9): [True: 170k, False: 26.4k]
  ------------------
 2946|   170k|      WORD32 result, audio_mux_len_bytes_last;
 2947|   170k|      WORD32 cnt_bits = it_bit_buff->cnt_bits;
 2948|   170k|      WORD32 sync = ixheaacd_read_bits_buf(it_bit_buff, 11);
 2949|   170k|      UWORD32 curr_samp_rate = 0;
 2950|       |
 2951|   170k|      if (p_state_enhaacplus_dec->latm_initialized)
  ------------------
  |  Branch (2951:11): [True: 167k, False: 3.40k]
  ------------------
 2952|   167k|        curr_samp_rate =
 2953|   167k|            p_state_enhaacplus_dec->latm_struct_element.layer_info[0][0]
 2954|   167k|                .asc.sampling_freq;
 2955|       |
 2956|   146M|      while (sync != 0x2b7) {
  ------------------
  |  Branch (2956:14): [True: 145M, False: 169k]
  ------------------
 2957|   145M|        sync = ((sync & 0x3ff) << 1) | ixheaacd_read_bits_buf(it_bit_buff, 1);
 2958|   145M|        if (it_bit_buff->cnt_bits < 13) {
  ------------------
  |  Branch (2958:13): [True: 1.07k, False: 145M]
  ------------------
 2959|  1.07k|          ixheaacd_read_bidirection(it_bit_buff, -11);
 2960|  1.07k|          p_state_enhaacplus_dec->i_bytes_consumed =
 2961|  1.07k|              (cnt_bits - it_bit_buff->cnt_bits) / 8;
 2962|       |
 2963|  1.07k|          if (p_state_enhaacplus_dec->i_bytes_consumed == 0)
  ------------------
  |  Branch (2963:15): [True: 19, False: 1.05k]
  ------------------
 2964|     19|            p_state_enhaacplus_dec->i_bytes_consumed = 1;
 2965|  1.07k|          if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
  ------------------
  |  Branch (2965:15): [True: 0, False: 1.07k]
  ------------------
 2966|      0|            p_obj_exhaacplus_dec->aac_config.frame_status = 0;
 2967|  1.07k|          } else {
 2968|  1.07k|            return (IA_XHEAAC_DEC_INIT_NONFATAL_HEADER_NOT_AT_START);
  ------------------
  |  |   76|  1.07k|#define IA_XHEAAC_DEC_INIT_NONFATAL_HEADER_NOT_AT_START 0x00001000
  ------------------
 2969|  1.07k|          }
 2970|  1.07k|        }
 2971|   145M|      }
 2972|       |
 2973|   169k|      it_bit_buff->audio_mux_align = it_bit_buff->cnt_bits - 13;
 2974|       |
 2975|   169k|      audio_mux_len_bytes_last = ixheaacd_read_bits_buf(it_bit_buff, 13);
 2976|       |
 2977|   169k|      audio_mux_length_bytes_last = audio_mux_len_bytes_last;
 2978|       |
 2979|   169k|      bytes_for_sync = (SIZE_T)it_bit_buff->ptr_read_next - bytes_for_sync;
 2980|       |
 2981|   169k|      if (it_bit_buff->cnt_bits < (audio_mux_len_bytes_last << 3)) {
  ------------------
  |  Branch (2981:11): [True: 699, False: 168k]
  ------------------
 2982|    699|        ixheaacd_read_bidirection(it_bit_buff, -(13 + 11));
 2983|    699|        p_state_enhaacplus_dec->i_bytes_consumed = (cnt_bits - it_bit_buff->cnt_bits) / 8;
 2984|    699|        if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
  ------------------
  |  Branch (2984:13): [True: 0, False: 699]
  ------------------
 2985|      0|          p_obj_exhaacplus_dec->aac_config.frame_status = 0;
 2986|    699|        } else {
 2987|    699|          return IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES;
  ------------------
  |  |   98|    699|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
 2988|    699|        }
 2989|   168k|      } else {
 2990|   168k|        ixheaacd_read_bidirection(it_bit_buff, -(13));
 2991|   168k|      }
 2992|       |
 2993|   168k|      if (sync == 0x2b7) {
  ------------------
  |  Branch (2993:11): [True: 168k, False: 8]
  ------------------
 2994|   168k|        result = ixheaacd_latm_audio_mux_element(
 2995|   168k|            it_bit_buff, &p_state_enhaacplus_dec->latm_struct_element,
 2996|   168k|            p_state_enhaacplus_dec,
 2997|   168k|            (ia_sampling_rate_info_struct *)&p_obj_exhaacplus_dec->aac_tables
 2998|   168k|                .pstr_huffmann_tables->str_sample_rate_info[0]);
 2999|   168k|        if (result < 0) {
  ------------------
  |  Branch (2999:13): [True: 320, False: 168k]
  ------------------
 3000|    320|          if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
  ------------------
  |  Branch (3000:15): [True: 0, False: 320]
  ------------------
 3001|      0|            p_obj_exhaacplus_dec->aac_config.frame_status = 0;
 3002|    320|          } else {
 3003|    320|            return result;
 3004|    320|          }
 3005|    320|        }
 3006|   168k|        if (!p_state_enhaacplus_dec->latm_initialized) {
  ------------------
  |  Branch (3006:13): [True: 3.40k, False: 164k]
  ------------------
 3007|  3.40k|          p_state_enhaacplus_dec->sampling_rate =
 3008|  3.40k|              p_state_enhaacplus_dec->latm_struct_element.layer_info[0][0].asc.sampling_freq;
 3009|  3.40k|          p_state_enhaacplus_dec->latm_initialized = 1;
 3010|   164k|        } else {
 3011|   164k|          if (p_state_enhaacplus_dec->sampling_rate != curr_samp_rate) {
  ------------------
  |  Branch (3011:15): [True: 140, False: 164k]
  ------------------
 3012|    140|            p_state_enhaacplus_dec->i_bytes_consumed = 0;
 3013|    140|            if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
  ------------------
  |  Branch (3013:17): [True: 0, False: 140]
  ------------------
 3014|      0|              p_obj_exhaacplus_dec->aac_config.frame_status = 0;
 3015|    140|            } else {
 3016|    140|              return IA_XHEAAC_DEC_EXE_NONFATAL_CHANGED_ADTS_SF;
  ------------------
  |  |  107|    140|#define IA_XHEAAC_DEC_EXE_NONFATAL_CHANGED_ADTS_SF 0x0000180C
  ------------------
 3017|    140|            }
 3018|    140|          }
 3019|   164k|        }
 3020|   168k|      }
 3021|   168k|    }
 3022|   196k|  }
 3023|       |
 3024|   194k|  if (total_elements == 2 && total_channels == 2 &&
  ------------------
  |  Branch (3024:7): [True: 9.23k, False: 185k]
  |  Branch (3024:30): [True: 9.08k, False: 145]
  ------------------
 3025|  9.08k|      (p_state_enhaacplus_dec->p_config->ui_pce_found_in_hdr == 1 ||
  ------------------
  |  Branch (3025:8): [True: 3.80k, False: 5.28k]
  ------------------
 3026|  5.28k|       p_state_enhaacplus_dec->p_config->ui_pce_found_in_hdr == 3)) {
  ------------------
  |  Branch (3026:8): [True: 1.48k, False: 3.80k]
  ------------------
 3027|  5.28k|    ixheaacd_fill_prog_config_slots(p_state_enhaacplus_dec);
 3028|  5.28k|  }
 3029|       |
 3030|   194k|  memset(element_used, 0, sizeof(WORD8) * MAX_BS_ELEMENT);
  ------------------
  |  |   24|   194k|#define MAX_BS_ELEMENT (8 + MAX_CC_CHANNEL_NUM)
  |  |  ------------------
  |  |  |  |   23|   194k|#define MAX_CC_CHANNEL_NUM (2)
  |  |  ------------------
  ------------------
 3031|       |
 3032|   194k|  if (it_bit_buff->cnt_bits <= 0) {
  ------------------
  |  Branch (3032:7): [True: 18, False: 194k]
  ------------------
 3033|     18|    it_bit_buff->cnt_bits = -1;
 3034|     18|    ixheaacd_updatebytesconsumed(p_state_enhaacplus_dec, it_bit_buff);
 3035|     18|    if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
  ------------------
  |  Branch (3035:9): [True: 0, False: 18]
  ------------------
 3036|      0|      p_obj_exhaacplus_dec->aac_config.frame_status = 0;
 3037|     18|    } else {
 3038|     18|      return (WORD16)((WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|     18|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
 3039|     18|    }
 3040|     18|  }
 3041|       |
 3042|   194k|  { it_bit_buff->initial_cnt_bits = it_bit_buff->cnt_bits; }
 3043|       |
 3044|   194k|  if (p_state_enhaacplus_dec->audio_object_type == AOT_ER_AAC_LD) {
  ------------------
  |  Branch (3044:7): [True: 63.8k, False: 130k]
  ------------------
 3045|  63.8k|    if (p_state_enhaacplus_dec->s_adts_hdr_present)
  ------------------
  |  Branch (3045:9): [True: 0, False: 63.8k]
  ------------------
 3046|      0|      p_state_enhaacplus_dec->frame_size = adts.aac_frame_length;
 3047|  63.8k|  }
 3048|       |
 3049|   194k|  if (p_state_enhaacplus_dec->audio_object_type == AOT_ER_AAC_LC) {
  ------------------
  |  Branch (3049:7): [True: 36.6k, False: 157k]
  ------------------
 3050|  36.6k|    if (p_state_enhaacplus_dec->s_adts_hdr_present)
  ------------------
  |  Branch (3050:9): [True: 0, False: 36.6k]
  ------------------
 3051|      0|      p_state_enhaacplus_dec->frame_size = 1024;
 3052|  36.6k|  }
 3053|       |
 3054|   197k|  if (p_state_enhaacplus_dec->pstr_drc_dec) {
  ------------------
  |  Branch (3054:7): [True: 197k, False: 18.4E]
  ------------------
 3055|   197k|    p_state_enhaacplus_dec->pstr_drc_dec->num_drc_elements = 0;
 3056|       |
 3057|   197k|    p_state_enhaacplus_dec->pstr_drc_dec->state = 1;
 3058|   197k|  }
 3059|   194k|  if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
  ------------------
  |  Branch (3059:7): [True: 0, False: 194k]
  ------------------
 3060|      0|    if (total_elements > MAX_BS_ELEMENT) {
  ------------------
  |  |   24|      0|#define MAX_BS_ELEMENT (8 + MAX_CC_CHANNEL_NUM)
  |  |  ------------------
  |  |  |  |   23|      0|#define MAX_CC_CHANNEL_NUM (2)
  |  |  ------------------
  ------------------
  |  Branch (3060:9): [True: 0, False: 0]
  ------------------
 3061|      0|      total_elements = MAX_BS_ELEMENT;
  ------------------
  |  |   24|      0|#define MAX_BS_ELEMENT (8 + MAX_CC_CHANNEL_NUM)
  |  |  ------------------
  |  |  |  |   23|      0|#define MAX_CC_CHANNEL_NUM (2)
  |  |  ------------------
  ------------------
 3062|      0|    }
 3063|      0|  }
 3064|       |
 3065|   194k|  WORD16 *intermediate_scr = (WORD16 *)(WORD8 *)p_state_enhaacplus_dec->aac_scratch_mem_v +
 3066|   194k|                             (MAX_SCR_SIZE - SCR_INTER_SCR_SIZE - SCR_COUP_CH_OUT_SIZE);
  ------------------
  |  |  167|   194k|#define MAX_SCR_SIZE (max(max(HEAACV2_MAX_SIZE, ELDV2_MAX_SIZE), LD_MAX_SIZE))
  |  |  ------------------
  |  |  |  |   74|  1.55M|#define max(a, b) (((a) > (b)) ? (a) : (b))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (74:20): [Folded, False: 194k]
  |  |  |  |  |  Branch (74:22): [True: 0, Folded]
  |  |  |  |  |  Branch (74:22): [True: 0, Folded]
  |  |  |  |  |  Branch (74:22): [True: 0, Folded]
  |  |  |  |  |  Branch (74:22): [True: 0, Folded]
  |  |  |  |  |  Branch (74:22): [Folded, False: 194k]
  |  |  |  |  |  Branch (74:28): [True: 0, Folded]
  |  |  |  |  |  Branch (74:35): [True: 0, Folded]
  |  |  |  |  |  Branch (74:35): [True: 0, Folded]
  |  |  |  |  |  Branch (74:35): [True: 0, Folded]
  |  |  |  |  |  Branch (74:35): [True: 0, Folded]
  |  |  |  |  |  Branch (74:35): [Folded, False: 0]
  |  |  |  |  |  Branch (74:41): [True: 197k, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                                           (MAX_SCR_SIZE - SCR_INTER_SCR_SIZE - SCR_COUP_CH_OUT_SIZE);
  ------------------
  |  |  143|   194k|  (MAX_CHANNEL_COUNT *                                                              \
  |  |  ------------------
  |  |  |  |  212|   194k|#define MAX_CHANNEL_COUNT (128)
  |  |  ------------------
  |  |  144|   194k|   IXHEAAC_GET_SIZE_ALIGNED((IA_ENHAACPLUS_DEC_SAMPLES_PER_FRAME * sizeof(WORD16)), \
  |  |  ------------------
  |  |  |  |   87|   194k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  |  |  ------------------
  |  |  145|   194k|                            BYTE_ALIGN_8))
  ------------------
                                           (MAX_SCR_SIZE - SCR_INTER_SCR_SIZE - SCR_COUP_CH_OUT_SIZE);
  ------------------
  |  |  147|   194k|  (MAX_CHANNEL_COUNT *                                                              \
  |  |  ------------------
  |  |  |  |  212|   194k|#define MAX_CHANNEL_COUNT (128)
  |  |  ------------------
  |  |  148|   194k|   IXHEAAC_GET_SIZE_ALIGNED((IA_ENHAACPLUS_DEC_SAMPLES_PER_FRAME * sizeof(WORD16)), \
  |  |  ------------------
  |  |  |  |   87|   194k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  |  |  ------------------
  |  |  149|   194k|                            BYTE_ALIGN_8))
  ------------------
 3067|       |
 3068|   402k|  for (ch_idx1 = 0; ch_idx1 < total_elements; ch_idx1++) {
  ------------------
  |  Branch (3068:21): [True: 214k, False: 187k]
  ------------------
 3069|   214k|    WORD32 skip_full_decode = 0;
 3070|   214k|    WORD32 ch_idx = ch_idx1;
 3071|   214k|    WORD32 channel = 0;
 3072|   214k|    WORD ch_fac, slot_ele;
 3073|       |
 3074|   214k|    if (p_state_enhaacplus_dec->audio_object_type < ER_OBJECT_START ||
  ------------------
  |  |   64|   429k|#define ER_OBJECT_START 17
  ------------------
  |  Branch (3074:9): [True: 58.2k, False: 156k]
  ------------------
 3075|   156k|        (p_state_enhaacplus_dec->audio_object_type != AOT_ER_AAC_LD &&
  ------------------
  |  Branch (3075:10): [True: 92.7k, False: 63.8k]
  ------------------
 3076|  92.7k|         p_state_enhaacplus_dec->audio_object_type != AOT_ER_AAC_ELD &&
  ------------------
  |  Branch (3076:10): [True: 36.6k, False: 56.0k]
  ------------------
 3077|  58.2k|         p_state_enhaacplus_dec->audio_object_type != AOT_ER_AAC_LC)) {
  ------------------
  |  Branch (3077:10): [True: 6, False: 36.6k]
  ------------------
 3078|  58.2k|      jmp_buf local;
 3079|       |
 3080|  58.2k|      if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal == 1) {
  ------------------
  |  Branch (3080:11): [True: 0, False: 58.2k]
  ------------------
 3081|      0|        ret_val = setjmp(local);
 3082|      0|      }
 3083|  58.2k|      if (ret_val == 0) {
  ------------------
  |  Branch (3083:11): [True: 58.2k, False: 0]
  ------------------
 3084|  58.2k|        if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal == 1) {
  ------------------
  |  Branch (3084:13): [True: 0, False: 58.2k]
  ------------------
 3085|      0|          p_obj_exhaacplus_dec->p_state_aac->ptr_bit_stream->xaac_jmp_buf = &local;
 3086|      0|        }
 3087|  58.2k|        error_code = ixheaacd_get_element_index_tag(
 3088|  58.2k|            p_obj_exhaacplus_dec, ch_idx1, &ch_idx, &channel,
 3089|  58.2k|            p_obj_exhaacplus_dec->aac_config.element_instance_order, total_elements, element_used,
 3090|  58.2k|            total_channels, p_state_enhaacplus_dec->pstr_drc_dec,
 3091|  58.2k|            &p_state_enhaacplus_dec->drc_dummy, mps_buffer, &p_state_enhaacplus_dec->mps_header,
 3092|  58.2k|            &p_state_enhaacplus_dec->ui_mps_out_bytes);
 3093|  58.2k|      }
 3094|       |
 3095|  58.2k|      if (error_code || ret_val) {
  ------------------
  |  Branch (3095:11): [True: 2.44k, False: 55.8k]
  |  Branch (3095:25): [True: 0, False: 55.8k]
  ------------------
 3096|  2.24k|        ixheaacd_updatebytesconsumed(p_state_enhaacplus_dec, it_bit_buff);
 3097|  2.24k|        if (it_bit_buff->cnt_bits < 0) {
  ------------------
  |  Branch (3097:13): [True: 15, False: 2.22k]
  ------------------
 3098|     15|          p_state_enhaacplus_dec->ui_out_bytes = 0;
 3099|     15|          p_state_enhaacplus_dec->ui_mps_out_bytes = 0;
 3100|     15|          p_state_enhaacplus_dec->b_n_raw_data_blk = 0;
 3101|     15|        }
 3102|  2.24k|        p_state_enhaacplus_dec->i_bytes_consumed = 1;
 3103|  2.24k|        p_state_enhaacplus_dec->b_n_raw_data_blk = 0;
 3104|  2.24k|        if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
  ------------------
  |  Branch (3104:13): [True: 0, False: 2.24k]
  ------------------
 3105|      0|          p_obj_exhaacplus_dec->aac_config.frame_status = 0;
 3106|  2.24k|        } else {
 3107|  2.24k|          return error_code;
 3108|  2.24k|        }
 3109|  2.24k|      }
 3110|  56.0k|      if (p_obj_exhaacplus_dec->aac_config.element_type[ch_idx] == ID_CPE)
  ------------------
  |  Branch (3110:11): [True: 1.29k, False: 54.7k]
  ------------------
 3111|  1.29k|      {
 3112|  1.29k|        if (channel != 2)
  ------------------
  |  Branch (3112:13): [True: 0, False: 1.29k]
  ------------------
 3113|      0|        {
 3114|      0|          if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal)
  ------------------
  |  Branch (3114:15): [True: 0, False: 0]
  ------------------
 3115|      0|          {
 3116|      0|            p_obj_exhaacplus_dec->aac_config.frame_status = 0;
 3117|      0|            channel = 2;
 3118|      0|          }
 3119|      0|          else
 3120|      0|          {
 3121|      0|            return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
 3122|      0|          }
 3123|      0|        }
 3124|  1.29k|      }
 3125|  54.7k|      else
 3126|  54.7k|      {
 3127|  54.7k|        if (channel != 1)
  ------------------
  |  Branch (3127:13): [True: 0, False: 54.7k]
  ------------------
 3128|      0|        {
 3129|      0|          if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal)
  ------------------
  |  Branch (3129:15): [True: 0, False: 0]
  ------------------
 3130|      0|          {
 3131|      0|            p_obj_exhaacplus_dec->aac_config.frame_status = 0;
 3132|      0|            channel = 1;
 3133|      0|          }
 3134|      0|          else
 3135|      0|          {
 3136|      0|            return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
 3137|      0|          }
 3138|      0|        }
 3139|  54.7k|      }
 3140|   156k|    } else {
 3141|   156k|      if (p_obj_exhaacplus_dec->aac_config.element_type[ch_idx] == ID_SCE)
  ------------------
  |  Branch (3141:11): [True: 115k, False: 41.0k]
  ------------------
 3142|   115k|        channel = 1;
 3143|  41.0k|      else
 3144|  41.0k|        channel = 2;
 3145|   156k|    }
 3146|       |
 3147|   212k|    if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal && (error_code || ret_val)) {
  ------------------
  |  Branch (3147:9): [True: 0, False: 212k]
  |  Branch (3147:61): [True: 0, False: 0]
  |  Branch (3147:75): [True: 0, False: 0]
  ------------------
 3148|      0|      if (p_obj_exhaacplus_dec->aac_config.element_type[ch_idx] == 0 ||
  ------------------
  |  Branch (3148:11): [True: 0, False: 0]
  ------------------
 3149|      0|          p_obj_exhaacplus_dec->aac_config.element_type[ch_idx] == 3) {
  ------------------
  |  Branch (3149:11): [True: 0, False: 0]
  ------------------
 3150|      0|        if (channel > 1) {
  ------------------
  |  Branch (3150:13): [True: 0, False: 0]
  ------------------
 3151|      0|          channel = 1;
 3152|      0|        }
 3153|      0|      }
 3154|      0|      if (p_obj_exhaacplus_dec->aac_config.element_type[ch_idx] == 1) {
  ------------------
  |  Branch (3154:11): [True: 0, False: 0]
  ------------------
 3155|      0|        if (channel > 2) {
  ------------------
  |  Branch (3155:13): [True: 0, False: 0]
  ------------------
 3156|      0|          channel = 2;
 3157|      0|        }
 3158|      0|      }
 3159|      0|      if (p_obj_exhaacplus_dec->aac_config.element_type[ch_idx] == 2) {
  ------------------
  |  Branch (3159:11): [True: 0, False: 0]
  ------------------
 3160|      0|        if (p_obj_exhaacplus_dec->aac_config.ui_max_channels > 2) {
  ------------------
  |  Branch (3160:13): [True: 0, False: 0]
  ------------------
 3161|      0|          if (!(p_obj_exhaacplus_dec->aac_config.element_instance_order[ch_idx] !=
  ------------------
  |  Branch (3161:15): [True: 0, False: 0]
  ------------------
 3162|      0|                p_obj_exhaacplus_dec->aac_config.ui_coupling_channel)) {
 3163|      0|            if (channel > 1) {
  ------------------
  |  Branch (3163:17): [True: 0, False: 0]
  ------------------
 3164|      0|              channel = 1;
 3165|      0|            }
 3166|      0|          }
 3167|      0|        }
 3168|      0|      }
 3169|      0|      if (ps_enable == 1) {
  ------------------
  |  Branch (3169:11): [True: 0, False: 0]
  ------------------
 3170|      0|        if (channel > 2) {
  ------------------
  |  Branch (3170:13): [True: 0, False: 0]
  ------------------
 3171|      0|          channel = 2;
 3172|      0|        }
 3173|      0|      }
 3174|      0|    }
 3175|       |
 3176|   212k|    ch_fac = total_channels;
 3177|   212k|    slot_ele = p_obj_exhaacplus_dec->aac_config.slot_element[ch_idx];
 3178|   212k|    actual_out_buffer = time_data;
 3179|   212k|    if (p_obj_exhaacplus_dec->aac_config.element_type[ch_idx] == 2) {
  ------------------
  |  Branch (3179:9): [True: 511, False: 212k]
  ------------------
 3180|    511|      p_state_enhaacplus_dec->pstr_aac_dec_info[ch_idx]->p_ind_channel_info =
 3181|    511|          &p_state_enhaacplus_dec->ind_cc_info;
 3182|    511|      if (p_obj_exhaacplus_dec->aac_config.element_instance_order[ch_idx] !=
  ------------------
  |  Branch (3182:11): [True: 169, False: 342]
  ------------------
 3183|    511|          p_obj_exhaacplus_dec->aac_config.ui_coupling_channel) {
 3184|    169|        skip_full_decode = 1;
 3185|    169|        ixheaacd_set_aac_persistent_buffers(
 3186|    169|            p_state_enhaacplus_dec->pers_mem_ptr, channel);
 3187|       |
 3188|    169|        {
 3189|    169|          struct ia_aac_persistent_struct *aac_persistent_mem =
 3190|    169|              (struct ia_aac_persistent_struct *)
 3191|    169|                  p_state_enhaacplus_dec->pers_mem_ptr;
 3192|    169|          aac_persistent_mem->str_aac_decoder.pstr_aac_tables =
 3193|    169|              &p_obj_exhaacplus_dec->aac_tables;
 3194|    169|          aac_persistent_mem->str_aac_decoder.pstr_common_tables =
 3195|    169|              p_obj_exhaacplus_dec->common_tables;
 3196|    169|        }
 3197|       |
 3198|    169|        p_state_enhaacplus_dec->pstr_aac_dec_info[ch_idx] = 0;
 3199|       |
 3200|    169|        p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx] = 0;
 3201|       |
 3202|    169|        p_state_enhaacplus_dec->pstr_aac_dec_info[ch_idx] =
 3203|    169|            ixheaacd_aac_decoder_init(
 3204|    169|                p_state_enhaacplus_dec,
 3205|       |
 3206|    169|                p_state_enhaacplus_dec->pstr_stream_sbr[ch_idx],
 3207|       |
 3208|    169|                channel, p_state_enhaacplus_dec->pers_mem_ptr,
 3209|    169|                p_state_enhaacplus_dec->frame_length
 3210|       |
 3211|    169|                );
 3212|    169|        if (!p_state_enhaacplus_dec->pstr_aac_dec_info[ch_idx]) {
  ------------------
  |  Branch (3212:13): [True: 0, False: 169]
  ------------------
 3213|      0|          p_state_enhaacplus_dec->i_bytes_consumed = 1;
 3214|      0|          if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
  ------------------
  |  Branch (3214:15): [True: 0, False: 0]
  ------------------
 3215|      0|            p_obj_exhaacplus_dec->aac_config.frame_status = 0;
 3216|      0|          } else {
 3217|      0|            return IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL;
  ------------------
  |  |   83|      0|#define IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL 0xFFFF9000
  ------------------
 3218|      0|          }
 3219|      0|        }
 3220|    169|        p_state_enhaacplus_dec->pstr_aac_dec_info[ch_idx]->p_ind_channel_info =
 3221|    169|            (WORD8 *)p_state_enhaacplus_dec->aac_scratch_mem_v + (P_IND_CH_INFO_OFFSET);
  ------------------
  |  |  152|    169|  (SCR_BASE_SCR_8K_SIZE + SCR_EXTRA_SCR_4K_0_SIZE + SCR_EXTRA_SCR_4K_2_SIZE)
  |  |  ------------------
  |  |  |  |  128|    169|  (IXHEAAC_GET_SIZE_ALIGNED((2 * CHANNELS * MAX_BINS_LONG * sizeof(WORD32)), BYTE_ALIGN_8))
  |  |  |  |  ------------------
  |  |  |  |  |  |   87|    169|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                 (SCR_BASE_SCR_8K_SIZE + SCR_EXTRA_SCR_4K_0_SIZE + SCR_EXTRA_SCR_4K_2_SIZE)
  |  |  ------------------
  |  |  |  |  130|    169|  (2 * IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_aac_dec_channel_info_struct), sizeof(WORD32)) + \
  |  |  |  |  ------------------
  |  |  |  |  |  |   87|    169|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  |  |  |  |  ------------------
  |  |  |  |  131|    169|   2 * IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_aac_sfb_code_book_struct), sizeof(WORD32)) +    \
  |  |  |  |  ------------------
  |  |  |  |  |  |   87|    169|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  |  |  |  |  ------------------
  |  |  |  |  132|    169|   IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_pns_stereo_data_struct), sizeof(WORD32)))
  |  |  |  |  ------------------
  |  |  |  |  |  |   87|    169|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                 (SCR_BASE_SCR_8K_SIZE + SCR_EXTRA_SCR_4K_0_SIZE + SCR_EXTRA_SCR_4K_2_SIZE)
  |  |  ------------------
  |  |  |  |  134|    169|  (IXHEAAC_GET_SIZE_ALIGNED((IA_ENHAACPLUS_DEC_SAMPLES_PER_FRAME * sizeof(WORD32)), BYTE_ALIGN_8))
  |  |  |  |  ------------------
  |  |  |  |  |  |   87|    169|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 3222|    169|      }
 3223|    511|      if (p_obj_exhaacplus_dec->aac_config.element_type[1] < 3 &&
  ------------------
  |  Branch (3223:11): [True: 459, False: 52]
  ------------------
 3224|    459|          p_obj_exhaacplus_dec->aac_config.element_type[1] > 0 &&
  ------------------
  |  Branch (3224:11): [True: 112, False: 347]
  ------------------
 3225|    112|          p_obj_exhaacplus_dec->aac_config.ui_max_channels > 2) {
  ------------------
  |  Branch (3225:11): [True: 112, False: 0]
  ------------------
 3226|    112|        actual_out_buffer =
 3227|    112|            (WORD16 *)(VOID *)p_state_enhaacplus_dec->coup_ch_output;
 3228|    112|      }
 3229|    511|      ch_fac = 1;
 3230|    511|      slot_ele = 0;
 3231|    511|    }
 3232|       |
 3233|   212k|    type = -1;
 3234|   212k|    p_state_enhaacplus_dec->pstr_stream_sbr[ch_idx][0].no_elements = 0;
 3235|       |
 3236|   212k|    {
 3237|   212k|      WORD element_index_order1[MAX_BS_ELEMENT];
 3238|   212k|      ia_aac_dec_scratch_struct aac_scratch_struct;
 3239|   212k|      memset(&aac_scratch_struct, 0, sizeof(aac_scratch_struct));
 3240|       |
 3241|   212k|      ixheaacd_allocate_aac_scr(
 3242|   212k|          &aac_scratch_struct, p_state_enhaacplus_dec->aac_scratch_mem_v,
 3243|   212k|          time_data, channel, p_obj_exhaacplus_dec->aac_config.ui_max_channels,
 3244|   212k|          p_state_enhaacplus_dec->audio_object_type);
 3245|       |
 3246|   212k|      if (p_state_enhaacplus_dec->ch_config == 2 && channel == 1) {
  ------------------
  |  Branch (3246:11): [True: 40.9k, False: 171k]
  |  Branch (3246:53): [True: 89, False: 40.8k]
  ------------------
 3247|     89|        if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
  ------------------
  |  Branch (3247:13): [True: 0, False: 89]
  ------------------
 3248|      0|          p_obj_exhaacplus_dec->aac_config.frame_status = 0;
 3249|     89|        } else {
 3250|     89|          return IA_XHEAAC_DEC_EXE_NONFATAL_DECODE_FRAME_ERROR;
  ------------------
  |  |  102|     89|#define IA_XHEAAC_DEC_EXE_NONFATAL_DECODE_FRAME_ERROR 0x00001807
  ------------------
 3251|     89|        }
 3252|     89|      }
 3253|       |
 3254|   212k|      error_code = ixheaacd_aacdec_decodeframe(
 3255|   212k|          p_obj_exhaacplus_dec, &aac_scratch_struct, actual_out_buffer,
 3256|   212k|          p_obj_exhaacplus_dec->aac_config.frame_status, &type, &ch_idx, 0, channel,
 3257|   212k|          element_index_order1, skip_full_decode, ch_fac, slot_ele,
 3258|   212k|          p_obj_exhaacplus_dec->aac_config.ui_max_channels, total_channels,
 3259|   212k|          p_obj_exhaacplus_dec->p_state_aac->frame_length,
 3260|   212k|          p_obj_exhaacplus_dec->p_state_aac->frame_size, p_state_enhaacplus_dec->pstr_drc_dec,
 3261|   212k|          p_state_enhaacplus_dec->audio_object_type, p_state_enhaacplus_dec->ch_config,
 3262|   212k|          p_state_enhaacplus_dec->eld_specific_config, p_state_enhaacplus_dec->s_adts_hdr_present,
 3263|   212k|          &p_state_enhaacplus_dec->drc_dummy, p_state_enhaacplus_dec->ldmps_present,
 3264|   212k|          &p_state_enhaacplus_dec->slot_pos, mps_buffer, &p_state_enhaacplus_dec->mps_header,
 3265|   212k|          &p_state_enhaacplus_dec->ui_mps_out_bytes, 0,
 3266|   212k|          p_obj_exhaacplus_dec->aac_config.first_frame);
 3267|       |
 3268|   212k|      p_state_enhaacplus_dec->slot_pos -= (channel - 1);
 3269|   212k|      p_state_enhaacplus_dec->sbr_present = 0;
 3270|       |
 3271|   212k|      if (p_obj_exhaacplus_dec->p_state_aac->qshift_adj[0] != LD_OBJ &&
  ------------------
  |  |  125|   425k|#define LD_OBJ -2
  ------------------
  |  Branch (3271:11): [True: 158k, False: 54.5k]
  ------------------
 3272|   158k|          p_state_enhaacplus_dec->frame_counter == 0) {
  ------------------
  |  Branch (3272:11): [True: 6.43k, False: 151k]
  ------------------
 3273|  6.43k|        ixheaacd_peak_limiter_init(
 3274|  6.43k|            &p_state_enhaacplus_dec->peak_limiter, total_channels,
 3275|  6.43k|            p_obj_exhaacplus_dec->p_state_aac->p_config->ui_samp_freq,
 3276|  6.43k|            &p_state_enhaacplus_dec->peak_limiter.buffer[0],
 3277|  6.43k|            &p_obj_exhaacplus_dec->p_state_aac->delay_in_samples);
 3278|  6.43k|        p_obj_exhaacplus_dec->p_state_aac->peak_lim_init = 1;
 3279|  6.43k|      }
 3280|       |
 3281|   212k|      if (p_state_enhaacplus_dec->audio_object_type < ER_OBJECT_START ||
  ------------------
  |  |   64|   425k|#define ER_OBJECT_START 17
  ------------------
  |  Branch (3281:11): [True: 56.5k, False: 155k]
  ------------------
 3282|   155k|          (p_state_enhaacplus_dec->audio_object_type != AOT_ER_AAC_LD &&
  ------------------
  |  Branch (3282:12): [True: 92.2k, False: 63.7k]
  ------------------
 3283|  92.2k|           p_state_enhaacplus_dec->audio_object_type != AOT_ER_AAC_ELD &&
  ------------------
  |  Branch (3283:12): [True: 36.2k, False: 55.9k]
  ------------------
 3284|  55.6k|           p_state_enhaacplus_dec->audio_object_type != AOT_ER_AAC_LC)) {
  ------------------
  |  Branch (3284:12): [True: 4, False: 36.2k]
  ------------------
 3285|  55.6k|        if ((error_code == 0) && ((ch_idx1 + 1) == total_elements) &&
  ------------------
  |  Branch (3285:13): [True: 54.9k, False: 676]
  |  Branch (3285:34): [True: 38.0k, False: 16.9k]
  ------------------
 3286|  38.0k|            (type != ID_END)) {
  ------------------
  |  Branch (3286:13): [True: 977, False: 37.0k]
  ------------------
 3287|    977|          {
 3288|    977|            p_state_enhaacplus_dec->i_bytes_consumed = (WORD32)(
 3289|    977|                it_bit_buff->ptr_read_next - it_bit_buff->ptr_bit_buf_base);
 3290|    977|            p_state_enhaacplus_dec->b_n_raw_data_blk = 0;
 3291|    977|            if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
  ------------------
  |  Branch (3291:17): [True: 0, False: 977]
  ------------------
 3292|      0|              p_obj_exhaacplus_dec->aac_config.frame_status = 0;
 3293|    977|            } else {
 3294|    977|            return IA_XHEAAC_DEC_EXE_NONFATAL_ELE_INSTANCE_TAG_NOT_FOUND;
  ------------------
  |  |  100|    977|#define IA_XHEAAC_DEC_EXE_NONFATAL_ELE_INSTANCE_TAG_NOT_FOUND 0x00001805
  ------------------
 3295|    977|          }
 3296|    977|          }
 3297|    977|        }
 3298|  55.6k|      }
 3299|       |
 3300|   211k|      num_ch = p_state_enhaacplus_dec->pstr_aac_dec_info[ch_idx]->channels;
 3301|   211k|      if (skip_full_decode == 0) {
  ------------------
  |  Branch (3301:11): [True: 210k, False: 1.13k]
  ------------------
 3302|   210k|        if (p_state_enhaacplus_dec->audio_object_type == AOT_ER_AAC_ELD ||
  ------------------
  |  Branch (3302:13): [True: 55.9k, False: 154k]
  ------------------
 3303|   154k|            p_state_enhaacplus_dec->audio_object_type == AOT_ER_AAC_LD)
  ------------------
  |  Branch (3303:13): [True: 63.7k, False: 90.6k]
  ------------------
 3304|   119k|          frame_size = p_state_enhaacplus_dec->frame_length;
 3305|  90.6k|        else {
 3306|  90.6k|          frame_size = p_state_enhaacplus_dec->frame_length;
 3307|  90.6k|        }
 3308|       |
 3309|   210k|        sample_rate_dec =
 3310|   210k|            p_state_enhaacplus_dec->pstr_aac_dec_info[ch_idx]->sampling_rate;
 3311|   210k|      }
 3312|   211k|    }
 3313|       |
 3314|   211k|    if (skip_full_decode == 1) {
  ------------------
  |  Branch (3314:9): [True: 159, False: 211k]
  ------------------
 3315|    159|      p_state_enhaacplus_dec->pstr_stream_sbr[ch_idx][0].no_elements = 0;
 3316|    159|    }
 3317|       |
 3318|   211k|    if (p_state_enhaacplus_dec->pstr_stream_sbr[ch_idx][0].no_elements != 0) {
  ------------------
  |  Branch (3318:9): [True: 40.6k, False: 170k]
  ------------------
 3319|  40.6k|      p_obj_exhaacplus_dec->aac_config.ui_sbr_mode = 1;
 3320|  40.6k|    }
 3321|       |
 3322|   211k|    if (error_code) {
  ------------------
  |  Branch (3322:9): [True: 3.18k, False: 208k]
  ------------------
 3323|  3.18k|      if (p_state_enhaacplus_dec->ui_input_over) {
  ------------------
  |  Branch (3323:11): [True: 0, False: 3.18k]
  ------------------
 3324|      0|        if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
  ------------------
  |  Branch (3324:13): [True: 0, False: 0]
  ------------------
 3325|      0|          p_obj_exhaacplus_dec->aac_config.frame_status = 0;
 3326|      0|        } else {
 3327|      0|          return IA_XHEAAC_DEC_INIT_FATAL_EO_INPUT_REACHED;
  ------------------
  |  |   84|      0|#define IA_XHEAAC_DEC_INIT_FATAL_EO_INPUT_REACHED 0xFFFF9001
  ------------------
 3328|      0|        }
 3329|      0|      }
 3330|  3.18k|      ixheaacd_updatebytesconsumed(p_state_enhaacplus_dec, it_bit_buff);
 3331|  3.18k|      p_obj_exhaacplus_dec->p_state_aac->ui_out_bytes +=
 3332|  3.18k|          p_state_enhaacplus_dec->num_of_out_samples * num_ch * sizeof(WORD16);
 3333|  3.18k|      if (error_code) {
  ------------------
  |  Branch (3333:11): [True: 3.18k, False: 0]
  ------------------
 3334|  3.18k|        if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
  ------------------
  |  Branch (3334:13): [True: 0, False: 3.18k]
  ------------------
 3335|      0|          p_obj_exhaacplus_dec->aac_config.frame_status = 0;
 3336|  3.18k|        } else {
 3337|  3.18k|          return error_code;
 3338|  3.18k|        }
 3339|  3.18k|      }
 3340|  3.18k|    }
 3341|       |
 3342|   208k|    error_code = IA_NO_ERROR;
  ------------------
  |  |   23|   208k|#define IA_NO_ERROR 0x00000000
  ------------------
 3343|       |
 3344|   208k|    if (p_obj_exhaacplus_dec->aac_config.ui_auto_sbr_upsample == 0) {
  ------------------
  |  Branch (3344:9): [True: 0, False: 208k]
  ------------------
 3345|      0|      if (p_state_enhaacplus_dec->pstr_stream_sbr[ch_idx][0].no_elements == 0 &&
  ------------------
  |  Branch (3345:11): [True: 0, False: 0]
  ------------------
 3346|      0|          p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]) {
  ------------------
  |  Branch (3346:11): [True: 0, False: 0]
  ------------------
 3347|      0|        p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx] = 0;
 3348|      0|        error_code = IA_XHEAAC_DEC_EXE_NONFATAL_SBR_TURNED_OFF;
  ------------------
  |  |   95|      0|#define IA_XHEAAC_DEC_EXE_NONFATAL_SBR_TURNED_OFF 0x00001801
  ------------------
 3349|      0|      }
 3350|      0|    }
 3351|   208k|    if ((!p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]) &&
  ------------------
  |  Branch (3351:9): [True: 1.31k, False: 207k]
  ------------------
 3352|  1.31k|        p_state_enhaacplus_dec->pstr_stream_sbr[ch_idx][0].no_elements) {
  ------------------
  |  Branch (3352:9): [True: 21, False: 1.29k]
  ------------------
 3353|     21|      WORD32 harmonic_sbr_flag = 0;
 3354|     21|      error_code = IA_XHEAAC_DEC_EXE_NONFATAL_SBR_TURNED_ON;
  ------------------
  |  |   96|     21|#define IA_XHEAAC_DEC_EXE_NONFATAL_SBR_TURNED_ON 0x00001802
  ------------------
 3355|     21|      p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx] = ixheaacd_init_sbr(
 3356|     21|          sample_rate_dec, frame_size,
 3357|     21|          (FLAG *)&p_obj_exhaacplus_dec->aac_config.down_sample_flag,
 3358|     21|          p_state_enhaacplus_dec->sbr_persistent_mem_v,
 3359|     21|          p_state_enhaacplus_dec->ptr_overlap_buf, ps_enable ? 2 : channel,
  ------------------
  |  Branch (3359:52): [True: 21, False: 0]
  ------------------
 3360|     21|          ps_enable, 1, frame_size * 2, &harmonic_sbr_flag, NULL,
 3361|     21|          p_state_enhaacplus_dec->str_sbr_config,
 3362|     21|          p_state_enhaacplus_dec->audio_object_type,
 3363|     21|          p_state_enhaacplus_dec->mps_dec_handle.ldmps_config
 3364|     21|              .ldmps_present_flag,
 3365|     21|          p_state_enhaacplus_dec->mps_dec_handle.ldmps_config.no_ldsbr_present);
 3366|     21|      if (p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]) {
  ------------------
  |  Branch (3366:11): [True: 1, False: 20]
  ------------------
 3367|      1|        p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->xaac_jmp_buf =
 3368|      1|            &(p_state_enhaacplus_dec->xaac_jmp_buf);
 3369|      1|      }
 3370|     21|    }
 3371|       |
 3372|   208k|    {
 3373|   208k|      if (p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx] &&
  ------------------
  |  Branch (3373:11): [True: 206k, False: 2.29k]
  ------------------
 3374|   206k|          p_state_enhaacplus_dec->pstr_stream_sbr[0][0].no_elements) {
  ------------------
  |  Branch (3374:11): [True: 40.3k, False: 165k]
  ------------------
 3375|  40.3k|        ia_sbr_scr_struct sbr_scratch_struct;
 3376|  40.3k|        ixheaacd_allocate_sbr_scr(&sbr_scratch_struct, p_state_enhaacplus_dec->aac_scratch_mem_v,
 3377|  40.3k|                                  time_data, total_channels,
 3378|  40.3k|                                  p_obj_exhaacplus_dec->p_state_aac->qshift_adj,
 3379|  40.3k|                                  p_state_enhaacplus_dec->slot_pos, channel);
 3380|       |
 3381|  40.3k|        p_state_enhaacplus_dec->sbr_present = 1;
 3382|  40.3k|        p_state_enhaacplus_dec->peak_lim_init = 0;
 3383|       |
 3384|  40.3k|        if (p_obj_exhaacplus_dec->aac_config.ui_enh_sbr)
  ------------------
  |  Branch (3384:13): [True: 40.3k, False: 0]
  ------------------
 3385|  40.3k|        {
 3386|  40.3k|          WORD32 audio_object_type = p_state_enhaacplus_dec->audio_object_type;
 3387|       |
 3388|  40.3k|          if (audio_object_type != AOT_ER_AAC_ELD && audio_object_type != AOT_ER_AAC_LD) {
  ------------------
  |  Branch (3388:15): [True: 13.0k, False: 27.3k]
  |  Branch (3388:54): [True: 13.0k, False: 0]
  ------------------
 3389|  13.0k|            WORD32 i = 0;
 3390|  13.0k|            ia_dec_data_struct* pstr_dec_data =
 3391|  13.0k|                (ia_dec_data_struct*)p_state_enhaacplus_dec->pstr_dec_data;
 3392|  13.0k|            if (ch_fac == 1) {
  ------------------
  |  Branch (3392:17): [True: 1.15k, False: 11.8k]
  ------------------
 3393|  1.18M|              for (; i < 1024; i++) {
  ------------------
  |  Branch (3393:22): [True: 1.18M, False: 1.15k]
  ------------------
 3394|  1.18M|                pstr_dec_data->str_usac_data.time_sample_vector[0][i] =
 3395|  1.18M|                    (FLOAT32)time_data[i];
 3396|  1.18M|              }
 3397|  1.15k|              p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->time_sample_buf[0] =
 3398|  1.15k|                  &pstr_dec_data->str_usac_data.time_sample_vector[0][0];
 3399|       |
 3400|  1.15k|              p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->time_sample_buf[1] =
 3401|  1.15k|                  &pstr_dec_data->str_usac_data.time_sample_vector[1][0];
 3402|  11.8k|            } else if (ch_fac == 2) {
  ------------------
  |  Branch (3402:24): [True: 11.7k, False: 119]
  ------------------
 3403|  12.0M|              for (; i < 1024; i++) {
  ------------------
  |  Branch (3403:22): [True: 12.0M, False: 11.7k]
  ------------------
 3404|  12.0M|                pstr_dec_data->str_usac_data.time_sample_vector[0][i] =
 3405|  12.0M|                    (FLOAT32)time_data[2 * i + 0];
 3406|  12.0M|                pstr_dec_data->str_usac_data.time_sample_vector[1][i] =
 3407|  12.0M|                    (FLOAT32)time_data[2 * i + 1];
 3408|  12.0M|              }
 3409|  11.7k|              p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->time_sample_buf[0] =
 3410|  11.7k|                  &pstr_dec_data->str_usac_data.time_sample_vector[0][0];
 3411|       |
 3412|  11.7k|              p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->time_sample_buf[1] =
 3413|  11.7k|                  &pstr_dec_data->str_usac_data.time_sample_vector[1][0];
 3414|  11.7k|            } else if (ch_fac > 2) {
  ------------------
  |  Branch (3414:24): [True: 119, False: 0]
  ------------------
 3415|    119|              if (channel == 1) {
  ------------------
  |  Branch (3415:19): [True: 85, False: 34]
  ------------------
 3416|  87.1k|                for (; i < 1024; i++) {
  ------------------
  |  Branch (3416:24): [True: 87.0k, False: 85]
  ------------------
 3417|  87.0k|                  pstr_dec_data->str_usac_data.time_sample_vector[0][i] =
 3418|  87.0k|                      (FLOAT32)(time_data + slot_ele)[i* ch_fac];
 3419|  87.0k|                }
 3420|     85|                p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->time_sample_buf[0] =
 3421|     85|                    &pstr_dec_data->str_usac_data.time_sample_vector[0][0];
 3422|     85|              } else if (channel == 2) {
  ------------------
  |  Branch (3422:26): [True: 34, False: 0]
  ------------------
 3423|  34.8k|                for (; i < 1024; i++) {
  ------------------
  |  Branch (3423:24): [True: 34.8k, False: 34]
  ------------------
 3424|  34.8k|                  pstr_dec_data->str_usac_data.time_sample_vector[0][i] =
 3425|  34.8k|                      (FLOAT32)(time_data + slot_ele)[ch_fac * i + 0];
 3426|  34.8k|                  pstr_dec_data->str_usac_data.time_sample_vector[1][i] =
 3427|  34.8k|                      (FLOAT32)(time_data + slot_ele)[ch_fac * i + 1];
 3428|  34.8k|                }
 3429|     34|                p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->time_sample_buf[0] =
 3430|     34|                    &pstr_dec_data->str_usac_data.time_sample_vector[0][0];
 3431|       |
 3432|     34|                p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->time_sample_buf[1] =
 3433|     34|                    &pstr_dec_data->str_usac_data.time_sample_vector[1][0];
 3434|     34|              }
 3435|    119|            }
 3436|  13.0k|          }
 3437|  40.3k|        }
 3438|  40.3k|        p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->esbr_hq =
 3439|  40.3k|            p_obj_exhaacplus_dec->aac_config.ui_hq_esbr;
 3440|  40.3k|        p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->enh_sbr =
 3441|  40.3k|            p_obj_exhaacplus_dec->aac_config.ui_enh_sbr;
 3442|  40.3k|        p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->enh_sbr_ps =
 3443|  40.3k|            p_obj_exhaacplus_dec->aac_config.ui_enh_sbr_ps;
 3444|       |
 3445|  40.3k|        if (p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]) {
  ------------------
  |  Branch (3445:13): [True: 40.3k, False: 0]
  ------------------
 3446|  40.3k|          p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]->xaac_jmp_buf =
 3447|  40.3k|              &(p_state_enhaacplus_dec->xaac_jmp_buf);
 3448|  40.3k|        }
 3449|       |
 3450|  40.3k|        if (ixheaacd_applysbr(p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx],
  ------------------
  |  Branch (3450:13): [True: 174, False: 40.2k]
  ------------------
 3451|  40.3k|                              &p_state_enhaacplus_dec->pstr_stream_sbr[ch_idx][0],
 3452|  40.3k|                              actual_out_buffer, &num_ch,
 3453|  40.3k|                              p_obj_exhaacplus_dec->aac_config.frame_status,
 3454|  40.3k|                              p_obj_exhaacplus_dec->aac_config.down_sample_flag,
 3455|  40.3k|                              esbr_mono_downmix, &sbr_scratch_struct, ps_enable, ch_fac, slot_ele,
 3456|  40.3k|                              NULL, &p_state_enhaacplus_dec->str_drc_dec_info,
 3457|  40.3k|                              p_state_enhaacplus_dec->eld_specific_config.ld_sbr_flag_present,
 3458|  40.3k|                              p_state_enhaacplus_dec->audio_object_type, 0,
 3459|  40.3k|                              p_state_enhaacplus_dec->ldmps_present, frame_size,
 3460|  40.3k|                              p_state_enhaacplus_dec->heaac_mps_handle.heaac_mps_present,
 3461|  40.3k|                              p_obj_exhaacplus_dec->aac_config.ui_err_conceal,
 3462|  40.3k|                              p_obj_exhaacplus_dec->aac_config.first_frame) != SBRDEC_OK) {
  ------------------
  |  |   33|  40.3k|#define SBRDEC_OK 0
  ------------------
 3463|    174|          p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx] = 0;
 3464|    174|          if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
  ------------------
  |  Branch (3464:15): [True: 0, False: 174]
  ------------------
 3465|      0|            p_obj_exhaacplus_dec->aac_config.frame_status = 0;
 3466|    174|          } else {
 3467|    174|            return -1;
 3468|    174|          }
 3469|  40.2k|        } else {
 3470|  40.2k|          if (!p_obj_exhaacplus_dec->aac_config.down_sample_flag) {
  ------------------
  |  Branch (3470:15): [True: 22.9k, False: 17.2k]
  ------------------
 3471|  22.9k|            frame_size = (WORD16)(frame_size * 2);
 3472|  22.9k|            sample_rate_dec *= 2;
 3473|  22.9k|          }
 3474|  40.2k|          if (p_state_enhaacplus_dec->mps_dec_handle.ldmps_config
  ------------------
  |  Branch (3474:15): [True: 2.03k, False: 38.1k]
  ------------------
 3475|  40.2k|                  .ldmps_present_flag == 1) {
 3476|  2.03k|            ixheaacd_mps_payload(
 3477|  2.03k|                p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx],
 3478|  2.03k|                p_obj_exhaacplus_dec);
 3479|  2.03k|          }
 3480|  40.2k|        }
 3481|       |
 3482|  40.2k|        if (p_obj_exhaacplus_dec->aac_config.ui_enh_sbr)
  ------------------
  |  Branch (3482:13): [True: 39.8k, False: 330]
  ------------------
 3483|  39.8k|        {
 3484|  39.8k|          WORD32 audio_object_type = p_state_enhaacplus_dec->audio_object_type;
 3485|       |
 3486|  39.8k|          if (audio_object_type != AOT_ER_AAC_ELD && audio_object_type != AOT_ER_AAC_LD) {
  ------------------
  |  Branch (3486:15): [True: 12.9k, False: 26.8k]
  |  Branch (3486:54): [True: 12.9k, False: 0]
  ------------------
 3487|  12.9k|            WORD32 out_bytes = 0;
 3488|  12.9k|            ia_dec_data_struct *pstr_dec_data =
 3489|  12.9k|                (ia_dec_data_struct *)p_state_enhaacplus_dec->pstr_dec_data;
 3490|  12.9k|            if (ch_fac <= 2) {
  ------------------
  |  Branch (3490:17): [True: 12.8k, False: 119]
  ------------------
 3491|  12.8k|              ixheaacd_samples_sat((WORD8*)time_data, 2048, 16,
 3492|  12.8k|                                   pstr_dec_data->str_usac_data.time_sample_vector,
 3493|  12.8k|                                   &out_bytes, ch_fac);
 3494|  12.8k|            } else {
 3495|    119|              ixheaacd_samples_sat_mc((WORD8*)(time_data + slot_ele), 2048,
 3496|    119|                                      pstr_dec_data->str_usac_data.time_sample_vector,
 3497|    119|                                      &out_bytes, channel, ch_fac);
 3498|    119|            }
 3499|  12.9k|          }
 3500|  39.8k|        }
 3501|  40.2k|        p_state_enhaacplus_dec->mps_dec_handle.ldmps_config.no_ldsbr_present =
 3502|  40.2k|            0;
 3503|  40.2k|        if (p_state_enhaacplus_dec->ui_mps_out_bytes > 0) {
  ------------------
  |  Branch (3503:13): [True: 438, False: 39.7k]
  ------------------
 3504|    438|          p_state_enhaacplus_dec->heaac_mps_handle.heaac_mps_present = 1;
 3505|    438|        }
 3506|   168k|      } else {
 3507|   168k|        p_state_enhaacplus_dec->mps_dec_handle.ldmps_config.no_ldsbr_present = 1;
 3508|   168k|      }
 3509|   208k|    }
 3510|       |
 3511|   208k|    if (p_state_enhaacplus_dec->mps_dec_handle.ldmps_config
  ------------------
  |  Branch (3511:9): [True: 12.4k, False: 195k]
  ------------------
 3512|   208k|                .ldmps_present_flag == 1 &&
 3513|  12.4k|         p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx] &&
  ------------------
  |  Branch (3513:10): [True: 11.9k, False: 511]
  ------------------
 3514|  11.9k|         p_state_enhaacplus_dec->mps_dec_handle.mps_init_done == 1) {
  ------------------
  |  Branch (3514:10): [True: 2.20k, False: 9.77k]
  ------------------
 3515|  2.20k|      if (p_state_enhaacplus_dec->ec_enable) {
  ------------------
  |  Branch (3515:11): [True: 0, False: 2.20k]
  ------------------
 3516|      0|        if (!p_obj_exhaacplus_dec->aac_config.first_frame) {
  ------------------
  |  Branch (3516:13): [True: 0, False: 0]
  ------------------
 3517|      0|          error_code = ixheaacd_ld_mps_apply(p_obj_exhaacplus_dec, actual_out_buffer);
 3518|      0|          if (error_code) p_obj_exhaacplus_dec->aac_config.frame_status = 0;
  ------------------
  |  Branch (3518:15): [True: 0, False: 0]
  ------------------
 3519|      0|        }
 3520|  2.20k|      } else {
 3521|  2.20k|        error_code = ixheaacd_ld_mps_apply(p_obj_exhaacplus_dec, actual_out_buffer);
 3522|       |
 3523|  2.20k|        if (error_code)
  ------------------
  |  Branch (3523:13): [True: 49, False: 2.15k]
  ------------------
 3524|     49|          return error_code;
 3525|  2.20k|      }
 3526|  2.20k|    }
 3527|   208k|    if (sample_rate < sample_rate_dec) {
  ------------------
  |  Branch (3527:9): [True: 191k, False: 17.0k]
  ------------------
 3528|   191k|      sample_rate = sample_rate_dec;
 3529|   191k|    }
 3530|       |
 3531|   208k|    if (p_state_enhaacplus_dec->sbr_present ||
  ------------------
  |  Branch (3531:9): [True: 41.1k, False: 167k]
  ------------------
 3532|   167k|        p_obj_exhaacplus_dec->p_state_aac->qshift_adj[0] == LD_OBJ) {
  ------------------
  |  |  125|   167k|#define LD_OBJ -2
  ------------------
  |  Branch (3532:9): [True: 45.1k, False: 121k]
  ------------------
 3533|  84.9k|      num_of_out_samples = frame_size;
 3534|       |
 3535|   123k|    } else {
 3536|   123k|      num_of_out_samples =
 3537|   123k|          frame_size -
 3538|   123k|          MIN((WORD16)p_obj_exhaacplus_dec->p_state_aac->delay_in_samples, frame_size);
  ------------------
  |  |   23|   123k|#define MIN(a, b) ((a) < (b) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (23:20): [True: 121k, False: 1.39k]
  |  |  ------------------
  ------------------
 3539|   123k|    }
 3540|       |
 3541|   208k|    if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal &&
  ------------------
  |  Branch (3541:9): [True: 0, False: 208k]
  ------------------
 3542|      0|        p_obj_exhaacplus_dec->aac_config.first_frame &&
  ------------------
  |  Branch (3542:9): [True: 0, False: 0]
  ------------------
 3543|      0|        (p_obj_exhaacplus_dec->p_state_aac->audio_object_type == AOT_ER_AAC_ELD ||
  ------------------
  |  Branch (3543:10): [True: 0, False: 0]
  ------------------
 3544|      0|         p_obj_exhaacplus_dec->p_state_aac->audio_object_type == AOT_ER_AAC_LD)) {
  ------------------
  |  Branch (3544:10): [True: 0, False: 0]
  ------------------
 3545|      0|      num_of_out_samples = frame_size;
 3546|      0|    }
 3547|       |
 3548|   208k|    p_obj_exhaacplus_dec->aac_config.ui_samp_freq = sample_rate;
 3549|       |
 3550|   208k|    p_state_enhaacplus_dec->num_channel_last = num_ch;
 3551|   208k|    p_state_enhaacplus_dec->num_of_out_samples = num_of_out_samples;
 3552|       |
 3553|   208k|    if (p_state_enhaacplus_dec->mps_dec_handle.ldmps_config
  ------------------
  |  Branch (3553:9): [True: 12.4k, False: 195k]
  ------------------
 3554|   208k|            .ldmps_present_flag == 1 &&
 3555|  12.4k|        p_state_enhaacplus_dec->mps_dec_handle.mps_init_done == 1 &&
  ------------------
  |  Branch (3555:9): [True: 2.15k, False: 10.2k]
  ------------------
 3556|  2.15k|        p_state_enhaacplus_dec->str_sbr_dec_info[ch_idx]) {
  ------------------
  |  Branch (3556:9): [True: 2.15k, False: 2]
  ------------------
 3557|  2.15k|      if (p_obj_exhaacplus_dec->p_state_aac->mps_dec_handle.output_buffer) {
  ------------------
  |  Branch (3557:11): [True: 2.15k, False: 0]
  ------------------
 3558|  2.15k|        ixheaacd_samples_sat((WORD8 *)actual_out_buffer, num_of_out_samples,
 3559|  2.15k|                             p_obj_exhaacplus_dec->aac_config.ui_pcm_wdsz,
 3560|  2.15k|                             p_obj_exhaacplus_dec->p_state_aac->mps_dec_handle.output_buffer,
 3561|  2.15k|                             &mps_out_samples, 2);
 3562|  2.15k|        p_obj_exhaacplus_dec->p_state_aac->ui_out_bytes = mps_out_samples;
 3563|  2.15k|      }
 3564|  2.15k|      num_ch = p_obj_exhaacplus_dec->p_state_aac->mps_dec_handle.out_ch_count;
 3565|  2.15k|      if (p_state_enhaacplus_dec->ec_enable) {
  ------------------
  |  Branch (3565:11): [True: 0, False: 2.15k]
  ------------------
 3566|      0|        if (p_obj_exhaacplus_dec->aac_config.first_frame) {
  ------------------
  |  Branch (3566:13): [True: 0, False: 0]
  ------------------
 3567|      0|          p_obj_exhaacplus_dec->p_state_aac->ui_out_bytes =
 3568|      0|              p_state_enhaacplus_dec->num_of_out_samples * num_ch * sizeof(WORD16);
 3569|      0|        }
 3570|      0|      }
 3571|   206k|    } else {
 3572|   206k|      if (p_obj_exhaacplus_dec->aac_config.element_type[ch_idx] != 2) {
  ------------------
  |  Branch (3572:11): [True: 204k, False: 1.77k]
  ------------------
 3573|   204k|        if (p_obj_exhaacplus_dec->aac_config.flag_to_stereo == 1 &&
  ------------------
  |  Branch (3573:13): [True: 11.9k, False: 192k]
  ------------------
 3574|  11.9k|          channel == 1 && total_elements == 1 && num_ch == 1) {
  ------------------
  |  Branch (3574:11): [True: 11.8k, False: 96]
  |  Branch (3574:27): [True: 11.7k, False: 112]
  |  Branch (3574:50): [True: 3.92k, False: 7.81k]
  ------------------
 3575|  3.92k|        num_ch = 2;
 3576|  3.92k|        p_obj_exhaacplus_dec->aac_config.dup_stereo_flag = 1;
 3577|       |
 3578|   200k|      } else {
 3579|   200k|        p_obj_exhaacplus_dec->aac_config.dup_stereo_flag = 0;
 3580|   200k|      }
 3581|       |
 3582|   204k|      p_obj_exhaacplus_dec->aac_config.ui_n_channels = 2;
 3583|       |
 3584|   204k|      p_obj_exhaacplus_dec->p_state_aac->ui_out_bytes +=
 3585|   204k|          p_state_enhaacplus_dec->num_of_out_samples * num_ch * sizeof(WORD16);
 3586|       |
 3587|   204k|    } else {
 3588|  1.77k|      channel_coupling_flag = 1;
 3589|  1.77k|    }
 3590|   206k|  }
 3591|       |
 3592|   208k|    if (p_state_enhaacplus_dec->sbr_present && total_channels > 2) {
  ------------------
  |  Branch (3592:9): [True: 39.8k, False: 168k]
  |  Branch (3592:48): [True: 120, False: 39.7k]
  ------------------
 3593|    274|      for (WORD32 j = 0; j < channel; j++) {
  ------------------
  |  Branch (3593:26): [True: 154, False: 120]
  ------------------
 3594|   238k|        for (WORD32 i = 0; i < frame_size; i++) {
  ------------------
  |  Branch (3594:28): [True: 238k, False: 154]
  ------------------
 3595|   238k|          intermediate_scr[total_channels * i + j +
 3596|   238k|                           p_state_enhaacplus_dec->slot_pos] =
 3597|   238k|              actual_out_buffer[total_channels * i + j +
 3598|   238k|                                p_state_enhaacplus_dec->slot_pos];
 3599|   238k|        }
 3600|    154|      }
 3601|    120|    }
 3602|   208k|  }
 3603|       |
 3604|   187k|  if (p_state_enhaacplus_dec->sbr_present && total_channels > 2) {
  ------------------
  |  Branch (3604:7): [True: 39.7k, False: 148k]
  |  Branch (3604:46): [True: 40, False: 39.6k]
  ------------------
 3605|     40|    memcpy(time_data, intermediate_scr,
 3606|     40|           sizeof(WORD16) * frame_size * total_channels);
 3607|     40|  }
 3608|       |
 3609|   187k|  {
 3610|   187k|    ia_adts_crc_info_struct *ptr_adts_crc_info =
 3611|   187k|        p_state_enhaacplus_dec->ptr_bit_stream->pstr_adts_crc_info;
 3612|   187k|    if (ptr_adts_crc_info->crc_active == 1) {
  ------------------
  |  Branch (3612:9): [True: 12, False: 187k]
  ------------------
 3613|     12|      if ((error_code = ixheaacd_adts_crc_check_crc(ptr_adts_crc_info))) {
  ------------------
  |  Branch (3613:11): [True: 12, False: 0]
  ------------------
 3614|     12|        if (error_code) {
  ------------------
  |  Branch (3614:13): [True: 12, False: 0]
  ------------------
 3615|     12|          if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
  ------------------
  |  Branch (3615:15): [True: 0, False: 12]
  ------------------
 3616|      0|            p_obj_exhaacplus_dec->aac_config.frame_status = 0;
 3617|     12|          } else {
 3618|     12|            return error_code;
 3619|     12|          }
 3620|     12|        }
 3621|     12|      }
 3622|     12|    }
 3623|   187k|  }
 3624|       |
 3625|   187k|  p_obj_exhaacplus_dec->aac_config.ui_n_channels = total_channels;
 3626|       |
 3627|   187k|  p_state_enhaacplus_dec->frame_counter++;
 3628|       |
 3629|   187k|  WORD32 i, j;
 3630|       |
 3631|   187k|  if (channel_coupling_flag) {
  ------------------
  |  Branch (3631:7): [True: 301, False: 187k]
  ------------------
 3632|    301|    error_code = ixheaacd_dec_ind_coupling(p_obj_exhaacplus_dec,
 3633|    301|                                           p_state_enhaacplus_dec->coup_ch_output,
 3634|    301|                                           num_of_out_samples, total_channels, time_data);
 3635|    301|    if (error_code)
  ------------------
  |  Branch (3635:9): [True: 11, False: 290]
  ------------------
 3636|     11|      return error_code;
 3637|    301|  }
 3638|       |
 3639|   448k|  for (i = 0; i < total_channels; i++) {
  ------------------
  |  Branch (3639:15): [True: 260k, False: 187k]
  ------------------
 3640|   260k|    if (p_obj_exhaacplus_dec->p_state_aac->qshift_adj[i + 1] == 0)
  ------------------
  |  Branch (3640:9): [True: 230k, False: 30.2k]
  ------------------
 3641|   230k|      p_obj_exhaacplus_dec->p_state_aac->qshift_adj[i + 1] =
 3642|   230k|          p_obj_exhaacplus_dec->p_state_aac->qshift_adj[0];
 3643|   260k|  }
 3644|       |
 3645|   187k|  if (p_obj_exhaacplus_dec->aac_config.flag_to_stereo == 1 &&
  ------------------
  |  Branch (3645:7): [True: 14.0k, False: 173k]
  ------------------
 3646|  14.0k|      total_elements == 1 && num_ch == 2 &&
  ------------------
  |  Branch (3646:7): [True: 13.9k, False: 63]
  |  Branch (3646:30): [True: 13.9k, False: 6]
  ------------------
 3647|  13.9k|      p_obj_exhaacplus_dec->aac_config.dup_stereo_flag == 1) {
  ------------------
  |  Branch (3647:7): [True: 3.92k, False: 10.0k]
  ------------------
 3648|  3.92k|    WORD i;
 3649|       |
 3650|  3.92k|    if (!p_state_enhaacplus_dec->sbr_present &&
  ------------------
  |  Branch (3650:9): [True: 96, False: 3.82k]
  ------------------
 3651|     96|        p_obj_exhaacplus_dec->p_state_aac->qshift_adj[0] != LD_OBJ) {
  ------------------
  |  |  125|     96|#define LD_OBJ -2
  ------------------
  |  Branch (3651:9): [True: 94, False: 2]
  ------------------
 3652|  96.3k|      for (i = 0; i < frame_size; i++) {
  ------------------
  |  Branch (3652:19): [True: 96.2k, False: 94]
  ------------------
 3653|  96.2k|        *((WORD32 *)actual_out_buffer + 2 * i + 1) =
 3654|  96.2k|            *((WORD32 *)actual_out_buffer + 2 * i);
 3655|  96.2k|      }
 3656|  3.82k|    } else {
 3657|  7.80M|      for (i = 0; i < frame_size; i++) {
  ------------------
  |  Branch (3657:19): [True: 7.80M, False: 3.82k]
  ------------------
 3658|  7.80M|        *(actual_out_buffer + 2 * i + 1) = *(actual_out_buffer + 2 * i);
 3659|  7.80M|      }
 3660|  3.82k|    }
 3661|  3.92k|  }
 3662|       |
 3663|   187k|  if (!p_state_enhaacplus_dec->sbr_present &&
  ------------------
  |  Branch (3663:7): [True: 150k, False: 37.6k]
  ------------------
 3664|   150k|      p_obj_exhaacplus_dec->p_state_aac->peak_lim_init == 1 &&
  ------------------
  |  Branch (3664:7): [True: 93.6k, False: 56.5k]
  ------------------
 3665|  93.6k|      p_obj_exhaacplus_dec->p_state_aac->qshift_adj[0] != LD_OBJ) {
  ------------------
  |  |  125|  93.6k|#define LD_OBJ -2
  ------------------
  |  Branch (3665:7): [True: 85.0k, False: 8.65k]
  ------------------
 3666|  85.0k|    if (!p_obj_exhaacplus_dec->aac_config.peak_limiter_off) {
  ------------------
  |  Branch (3666:9): [True: 85.0k, False: 0]
  ------------------
 3667|  85.0k|      ixheaacd_peak_limiter_process(
 3668|  85.0k|          &p_state_enhaacplus_dec->peak_limiter, time_data, frame_size,
 3669|  85.0k|          p_obj_exhaacplus_dec->p_state_aac->qshift_adj);
 3670|  85.0k|    } else {
 3671|      0|      ixheaacd_scale_adjust(time_data, frame_size,
 3672|      0|                            p_obj_exhaacplus_dec->p_state_aac->qshift_adj,
 3673|      0|                            total_channels);
 3674|      0|    }
 3675|       |
 3676|   146M|    for (i = 0; i < frame_size * 2; i++) {
  ------------------
  |  Branch (3676:17): [True: 145M, False: 85.0k]
  ------------------
 3677|   330M|      for (j = 0; j < total_channels; j++) {
  ------------------
  |  Branch (3677:19): [True: 184M, False: 145M]
  ------------------
 3678|   184M|        *((WORD16 *)time_data + total_channels * i + j) =
 3679|   184M|            ixheaac_round16(*((WORD32 *)time_data + total_channels * i + j));
 3680|   184M|      }
 3681|   145M|    }
 3682|       |
 3683|  85.0k|    memmove(
 3684|  85.0k|        time_data,
 3685|  85.0k|        (time_data +
 3686|  85.0k|         total_channels * p_obj_exhaacplus_dec->p_state_aac->delay_in_samples),
 3687|  85.0k|        sizeof(WORD16) * num_of_out_samples * total_channels);
 3688|       |
 3689|  85.0k|    p_obj_exhaacplus_dec->p_state_aac->delay_in_samples =
 3690|  85.0k|        p_obj_exhaacplus_dec->p_state_aac->delay_in_samples -
 3691|  85.0k|        MIN(p_obj_exhaacplus_dec->p_state_aac->delay_in_samples, (UWORD16)frame_size);
  ------------------
  |  |   23|  85.0k|#define MIN(a, b) ((a) < (b) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (23:20): [True: 85.0k, False: 2]
  |  |  ------------------
  ------------------
 3692|  85.0k|  }
 3693|   187k|  if (p_state_enhaacplus_dec->heaac_mps_handle.heaac_mps_present == 1) {
  ------------------
  |  Branch (3693:7): [True: 14.6k, False: 173k]
  ------------------
 3694|  14.6k|    ia_heaac_mps_state_struct *pstr_mps_state =
 3695|  14.6k|        &p_state_enhaacplus_dec->heaac_mps_handle;
 3696|  14.6k|    if (p_state_enhaacplus_dec->sbr_present == 0) {
  ------------------
  |  Branch (3696:9): [True: 13.3k, False: 1.29k]
  ------------------
 3697|  13.3k|      p_state_enhaacplus_dec->heaac_mps_handle.mps_decode = 1;
 3698|  13.3k|    } else {
 3699|  1.29k|      p_state_enhaacplus_dec->heaac_mps_handle.mps_with_sbr = 1;
 3700|  1.29k|    }
 3701|  14.6k|    if (!p_obj_exhaacplus_dec->aac_config.ui_enh_sbr)
  ------------------
  |  Branch (3701:9): [True: 0, False: 14.6k]
  ------------------
 3702|      0|    {
 3703|      0|      p_state_enhaacplus_dec->heaac_mps_handle.mps_decode = 1;
 3704|      0|    }
 3705|  14.6k|    if (p_state_enhaacplus_dec->heaac_mps_handle.mps_init_done == 1) {
  ------------------
  |  Branch (3705:9): [True: 13.7k, False: 878]
  ------------------
 3706|  13.7k|      p_obj_exhaacplus_dec->p_state_aac->heaac_mps_handle.frame_ok =
 3707|  13.7k|          p_obj_exhaacplus_dec->aac_config.frame_status;
 3708|  13.7k|      p_obj_exhaacplus_dec->p_state_aac->heaac_mps_handle.ec_flag =
 3709|  13.7k|          p_obj_exhaacplus_dec->aac_config.ui_err_conceal;
 3710|       |
 3711|  13.7k|      error_code = ixheaacd_heaac_mps_apply(p_obj_exhaacplus_dec, actual_out_buffer, mps_buffer,
 3712|  13.7k|                                            p_state_enhaacplus_dec->ui_mps_out_bytes);
 3713|       |
 3714|  13.7k|      if (error_code != IA_NO_ERROR) {
  ------------------
  |  |   23|  13.7k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (3714:11): [True: 660, False: 13.0k]
  ------------------
 3715|    660|        return error_code;
 3716|    660|      }
 3717|       |
 3718|  13.0k|      p_state_enhaacplus_dec->heaac_mps_handle.mps_decode = 1;
 3719|  13.0k|      p_obj_exhaacplus_dec->p_state_aac->ui_out_bytes =
 3720|  13.0k|          (pstr_mps_state->num_output_channels_at *
 3721|  13.0k|           pstr_mps_state->frame_length *
 3722|  13.0k|           (p_obj_exhaacplus_dec->aac_config.ui_pcm_wdsz >> 3));
 3723|  13.0k|      p_obj_exhaacplus_dec->p_state_aac->heaac_mps_handle.first_frame = 0;
 3724|  13.0k|    }
 3725|  14.6k|  }
 3726|   187k|  if ((total_channels > 2) && (1 == p_obj_exhaacplus_dec->aac_config.downmix)) {
  ------------------
  |  Branch (3726:7): [True: 2.34k, False: 184k]
  |  Branch (3726:31): [True: 0, False: 2.34k]
  ------------------
 3727|      0|    ixheaacd_dec_downmix_to_stereo(p_obj_exhaacplus_dec, num_of_out_samples,
 3728|      0|                                   total_elements, time_data, total_channels);
 3729|       |
 3730|      0|    total_channels = 2;
 3731|      0|    p_obj_exhaacplus_dec->p_state_aac->ui_out_bytes =
 3732|      0|        p_state_enhaacplus_dec->num_of_out_samples * 2 * sizeof(WORD16);
 3733|      0|  }
 3734|       |
 3735|   187k|  if (p_obj_exhaacplus_dec->aac_config.flag_downmix && total_channels == 2) {
  ------------------
  |  Branch (3735:7): [True: 0, False: 187k]
  |  Branch (3735:56): [True: 0, False: 0]
  ------------------
 3736|      0|    WORD32 out_ch = 1;
 3737|      0|    WORD i;
 3738|      0|    if (p_obj_exhaacplus_dec->aac_config.flag_to_stereo == 1) {
  ------------------
  |  Branch (3738:9): [True: 0, False: 0]
  ------------------
 3739|      0|      out_ch = 2;
 3740|      0|    }
 3741|       |
 3742|      0|    p_obj_exhaacplus_dec->aac_config.ui_n_channels = out_ch;
 3743|      0|    p_obj_exhaacplus_dec->p_state_aac->ui_out_bytes =
 3744|      0|        p_state_enhaacplus_dec->num_of_out_samples * out_ch * sizeof(WORD16);
 3745|       |
 3746|      0|    for (i = 0; i < num_of_out_samples; i++) {
  ------------------
  |  Branch (3746:17): [True: 0, False: 0]
  ------------------
 3747|      0|      WORD16 temp;
 3748|       |
 3749|      0|      temp = (time_data[2 * i + 0] >> 1) + (time_data[2 * i + 1] >> 1);
 3750|       |
 3751|      0|      if (out_ch == 2) {
  ------------------
  |  Branch (3751:11): [True: 0, False: 0]
  ------------------
 3752|      0|        time_data[2 * i + 0] = temp;
 3753|      0|        time_data[2 * i + 1] = time_data[2 * i + 0];
 3754|      0|      } else {
 3755|      0|        time_data[i] = temp;
 3756|      0|      }
 3757|      0|    }
 3758|      0|  }
 3759|       |
 3760|   187k|  if (p_state_enhaacplus_dec->s_adts_hdr_present) {
  ------------------
  |  Branch (3760:7): [True: 25.7k, False: 161k]
  ------------------
 3761|  25.7k|    if (adts.no_raw_data_blocks != 0) {
  ------------------
  |  Branch (3761:9): [True: 2.13k, False: 23.6k]
  ------------------
 3762|  2.13k|      if (adts.protection_absent == 0 && it_bit_buff->cnt_bits >= 16) {
  ------------------
  |  Branch (3762:11): [True: 0, False: 2.13k]
  |  Branch (3762:42): [True: 0, False: 0]
  ------------------
 3763|      0|        adts.crc_check = ixheaacd_read_bits_buf(it_bit_buff, 16);
 3764|      0|      }
 3765|  2.13k|    }
 3766|  25.7k|    p_state_enhaacplus_dec->b_n_raw_data_blk--;
 3767|  25.7k|  }
 3768|       |
 3769|   187k|  ixheaacd_updatebytesconsumed(p_state_enhaacplus_dec, it_bit_buff);
 3770|       |
 3771|   187k|  if (p_state_enhaacplus_dec->bs_format == LOAS_BSFORMAT)
  ------------------
  |  |   29|   187k|#define LOAS_BSFORMAT 3
  ------------------
  |  Branch (3771:7): [True: 163k, False: 24.1k]
  ------------------
 3772|   163k|    p_state_enhaacplus_dec->i_bytes_consumed =
 3773|   163k|        (WORD32)(audio_mux_length_bytes_last + bytes_for_sync);
 3774|       |
 3775|   187k|  if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal &&
  ------------------
  |  Branch (3775:7): [True: 0, False: 187k]
  ------------------
 3776|      0|      p_obj_exhaacplus_dec->aac_config.first_frame) {
  ------------------
  |  Branch (3776:7): [True: 0, False: 0]
  ------------------
 3777|      0|    p_obj_exhaacplus_dec->aac_config.first_frame = 0;
 3778|      0|  }
 3779|       |
 3780|   187k|  if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal) {
  ------------------
  |  Branch (3780:7): [True: 0, False: 187k]
  ------------------
 3781|      0|    if (p_obj_exhaacplus_dec->aac_config.frame_status != 1) {
  ------------------
  |  Branch (3781:9): [True: 0, False: 0]
  ------------------
 3782|      0|      p_state_enhaacplus_dec->i_bytes_consumed = p_state_enhaacplus_dec->ui_in_bytes;
 3783|      0|    }
 3784|      0|    return IA_NO_ERROR;
  ------------------
  |  |   23|      0|#define IA_NO_ERROR 0x00000000
  ------------------
 3785|   187k|  } else {
 3786|   187k|    return error_code;
 3787|   187k|  }
 3788|   187k|}
ixheaacd_api.c:ixheaacd_init_sbr_tables:
  219|  14.2k|ixheaacd_init_sbr_tables(ia_sbr_tables_struct *ptr_sbr_tables) {
  220|  14.2k|  ptr_sbr_tables->env_calc_tables_ptr =
  221|  14.2k|      (ia_env_calc_tables_struct *)&ixheaacd_aac_dec_env_calc_tables;
  222|  14.2k|  ptr_sbr_tables->qmf_dec_tables_ptr =
  223|  14.2k|      (ia_qmf_dec_tables_struct *)&ixheaacd_aac_qmf_dec_tables;
  224|  14.2k|  ptr_sbr_tables->env_extr_tables_ptr =
  225|  14.2k|      (ia_env_extr_tables_struct *)&ixheaacd_aac_dec_env_extr_tables;
  226|  14.2k|  ptr_sbr_tables->ps_tables_ptr =
  227|  14.2k|      (ia_ps_tables_struct *)&ixheaacd_aac_dec_ps_tables;
  228|  14.2k|}
ixheaacd_api.c:ixheaacd_persistent_buffer_sizes:
 1256|  14.2k|ixheaacd_persistent_buffer_sizes(WORD32 num_channel) {
 1257|  14.2k|  WORD32 size_buffers = 0;
 1258|       |
 1259|  14.2k|  WORD32 temp;
 1260|  14.2k|  WORD32 max_channels;
 1261|       |
 1262|  14.2k|  size_buffers += IXHEAAC_GET_SIZE_ALIGNED(4 * 512 * num_channel * sizeof(WORD32), BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1263|       |
 1264|  14.2k|  size_buffers +=
 1265|  14.2k|      num_channel * IXHEAAC_GET_SIZE_ALIGNED(ltp_buffer_size * sizeof(WORD16), BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1266|       |
 1267|  14.2k|  size_buffers +=
 1268|  14.2k|      num_channel * IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_aac_dec_channel_info), BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1269|       |
 1270|  14.2k|  if (num_channel > 2) {
  ------------------
  |  Branch (1270:7): [True: 14.2k, False: 0]
  ------------------
 1271|  14.2k|    max_channels = MAX_BS_ELEMENT;
  ------------------
  |  |   24|  14.2k|#define MAX_BS_ELEMENT (8 + MAX_CC_CHANNEL_NUM)
  |  |  ------------------
  |  |  |  |   23|  14.2k|#define MAX_CC_CHANNEL_NUM (2)
  |  |  ------------------
  ------------------
 1272|  14.2k|  } else {
 1273|      0|    max_channels = 2;
 1274|      0|  }
 1275|  14.2k|  size_buffers += (max_channels)*2 *
 1276|  14.2k|                  IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_aac_dec_sbr_bitstream_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1277|       |
 1278|  14.2k|  size_buffers +=
 1279|  14.2k|      num_channel * IXHEAAC_GET_SIZE_ALIGNED(MAXSBRBYTES * sizeof(WORD8), BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1280|       |
 1281|  14.2k|  size_buffers +=
 1282|  14.2k|      num_channel * IXHEAAC_GET_SIZE_ALIGNED(MAXSBRBYTES * sizeof(WORD8), BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1283|       |
 1284|  14.2k|  size_buffers +=
 1285|  14.2k|      2 * num_channel *
 1286|  14.2k|      IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1287|  14.2k|          (QMF_FILTER_STATE_ANA_SIZE + 2 * NO_ANALYSIS_CHANNELS) * sizeof(WORD16), BYTE_ALIGN_8);
 1288|       |
 1289|  14.2k|  size_buffers +=
 1290|  14.2k|      2 * num_channel *
 1291|  14.2k|      IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1292|  14.2k|          (QMF_FILTER_STATE_ANA_SIZE + 2 * NO_ANALYSIS_CHANNELS) * sizeof(WORD32), BYTE_ALIGN_8);
 1293|       |
 1294|  14.2k|  size_buffers +=
 1295|  14.2k|      2 * num_channel *
 1296|  14.2k|      IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1297|  14.2k|          (QMF_FILTER_STATE_SYN_SIZE + 2 * NO_SYNTHESIS_CHANNELS) * sizeof(WORD16), BYTE_ALIGN_8);
 1298|       |
 1299|  14.2k|  size_buffers +=
 1300|  14.2k|      2 * num_channel *
 1301|  14.2k|      IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1302|  14.2k|          (QMF_FILTER_STATE_SYN_SIZE + 2 * NO_SYNTHESIS_CHANNELS) * sizeof(WORD32), BYTE_ALIGN_8);
 1303|       |
 1304|  14.2k|  size_buffers += num_channel * 2 *
 1305|  14.2k|                  IXHEAAC_GET_SIZE_ALIGNED(MAX_OV_COLS * NO_SYNTHESIS_CHANNELS * sizeof(WORD32),
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1306|  14.2k|                                           BYTE_ALIGN_8);
 1307|       |
 1308|  14.2k|  size_buffers += 2 * LPC_ORDER * num_channel *
  ------------------
  |  |   65|  14.2k|#define LPC_ORDER 2
  ------------------
 1309|  14.2k|                  IXHEAAC_GET_SIZE_ALIGNED(NO_ANALYSIS_CHANNELS * sizeof(WORD32), BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1310|       |
 1311|  14.2k|  size_buffers += 2 * IXHEAAC_GET_SIZE_ALIGNED(LPC_ORDER * sizeof(WORD32 *), BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1312|       |
 1313|  14.2k|  size_buffers += 2 * LPC_ORDER * num_channel *
  ------------------
  |  |   65|  14.2k|#define LPC_ORDER 2
  ------------------
 1314|  14.2k|                  IXHEAAC_GET_SIZE_ALIGNED(NO_ANALYSIS_CHANNELS * sizeof(WORD32), BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1315|       |
 1316|  14.2k|  size_buffers += 2 * num_channel * 3 *
 1317|  14.2k|                  IXHEAAC_GET_SIZE_ALIGNED(MAX_FREQ_COEFFS * sizeof(WORD16), BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1318|       |
 1319|  14.2k|  temp = IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_freq_band_data_struct), BYTE_ALIGN_8) +
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1320|  14.2k|         IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_sbr_prev_frame_data_struct), BYTE_ALIGN_8) +
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1321|  14.2k|         IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_sbr_channel_struct), BYTE_ALIGN_8) +
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1322|  14.2k|         IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_sbr_header_data_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1323|  14.2k|  size_buffers += 2 * num_channel * temp;
 1324|       |
 1325|  14.2k|  size_buffers += MAX_BS_ELEMENT *
  ------------------
  |  |   24|  14.2k|#define MAX_BS_ELEMENT (8 + MAX_CC_CHANNEL_NUM)
  |  |  ------------------
  |  |  |  |   23|  14.2k|#define MAX_CC_CHANNEL_NUM (2)
  |  |  ------------------
  ------------------
 1326|  14.2k|                  IXHEAAC_GET_SIZE_ALIGNED(sizeof(ixheaac_drc_bs_data_struct *), BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1327|       |
 1328|  14.2k|  size_buffers += num_channel * IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_ps_dec_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1329|       |
 1330|  14.2k|  {
 1331|  14.2k|    WORD32 temp_size = 0;
 1332|  14.2k|    size_buffers += (num_channel * 2 *
 1333|  14.2k|                     IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_sbr_frame_info_data_struct) +
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1334|  14.2k|                                                  MAX_FREQ_COEFFS * sizeof(WORD32) * 2 + 8,
 1335|  14.2k|                                              BYTE_ALIGN_8));
 1336|  14.2k|    temp_size += IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_pvc_data_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1337|  14.2k|    temp_size += 2 * IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_esbr_hbe_txposer_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1338|  14.2k|    temp_size += 2 * IXHEAAC_GET_SIZE_ALIGNED(MAX_HBE_PERSISTENT_SIZE, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1339|  14.2k|    temp_size +=
 1340|  14.2k|        2 * 2 * IXHEAAC_GET_SIZE_ALIGNED(MAX_QMF_BUF_LEN * sizeof(FLOAT32 *), BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1341|  14.2k|    temp_size += 2 * 2 * MAX_QMF_BUF_LEN *
  ------------------
  |  |  137|  14.2k|#define MAX_QMF_BUF_LEN 78
  ------------------
 1342|  14.2k|                 IXHEAAC_GET_SIZE_ALIGNED(MAX_QMF_BUF_LEN * sizeof(FLOAT32), BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1343|  14.2k|    temp_size += 2 * 2 * MAX_ENV_COLS *
  ------------------
  |  |   71|  14.2k|#define MAX_ENV_COLS (MAX_COLS + MAX_OV_COLS)
  |  |  ------------------
  |  |  |  |   69|  14.2k|#define MAX_COLS (MAX_FRAME_SIZE / NO_ANALYSIS_CHANNELS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  14.2k|#define MAX_FRAME_SIZE 1024
  |  |  |  |  ------------------
  |  |  |  |               #define MAX_COLS (MAX_FRAME_SIZE / NO_ANALYSIS_CHANNELS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   35|  14.2k|#define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|  14.2k|#define NO_SYNTHESIS_CHANNELS 64
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   23|  14.2k|#define SBR_UPSAMPLE_FAC 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define MAX_ENV_COLS (MAX_COLS + MAX_OV_COLS)
  |  |  ------------------
  |  |  |  |   70|  14.2k|#define MAX_OV_COLS 6
  |  |  ------------------
  ------------------
 1344|  14.2k|                 IXHEAAC_GET_SIZE_ALIGNED(MAX_QMF_BUF_LEN * sizeof(WORD32), BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
 1345|  14.2k|    size_buffers += num_channel * temp_size;
 1346|  14.2k|  }
 1347|       |
 1348|  14.2k|  return (size_buffers);
 1349|  14.2k|}
ixheaacd_api.c:ixheaacd_allocate_aac_scr:
  297|   223k|    WORD32 audio_object_type) {
  298|   223k|  WORD32 scratch_used = 0;
  299|   223k|  aac_scratch_struct->base_scr_8k = base_scratch_ptr;
  300|   223k|  aac_scratch_struct->extra_scr_4k[1] = (WORD8 *)base_scratch_ptr;
  301|   223k|  scratch_used += SCR_BASE_SCR_8K_SIZE;
  ------------------
  |  |  128|   223k|  (IXHEAAC_GET_SIZE_ALIGNED((2 * CHANNELS * MAX_BINS_LONG * sizeof(WORD32)), BYTE_ALIGN_8))
  |  |  ------------------
  |  |  |  |   87|   223k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  |  |  ------------------
  ------------------
  302|   223k|  if (channel == 1) {
  ------------------
  |  Branch (302:7): [True: 180k, False: 42.3k]
  ------------------
  303|   180k|    aac_scratch_struct->extra_scr_4k[0] = (WORD8 *)base_scratch_ptr + scratch_used;
  304|   180k|    scratch_used += SCR_EXTRA_SCR_4K_0_SIZE;
  ------------------
  |  |  130|   180k|  (2 * IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_aac_dec_channel_info_struct), sizeof(WORD32)) + \
  |  |  ------------------
  |  |  |  |   87|   180k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  |  |  ------------------
  |  |  131|   180k|   2 * IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_aac_sfb_code_book_struct), sizeof(WORD32)) +    \
  |  |  ------------------
  |  |  |  |   87|   180k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  |  |  ------------------
  |  |  132|   180k|   IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_pns_stereo_data_struct), sizeof(WORD32)))
  |  |  ------------------
  |  |  |  |   87|   180k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  |  |  ------------------
  ------------------
  305|   180k|    aac_scratch_struct->extra_scr_4k[2] = (WORD8 *)base_scratch_ptr + scratch_used;
  306|   180k|    scratch_used += SCR_EXTRA_SCR_4K_2_SIZE;
  ------------------
  |  |  134|   180k|  (IXHEAAC_GET_SIZE_ALIGNED((IA_ENHAACPLUS_DEC_SAMPLES_PER_FRAME * sizeof(WORD32)), BYTE_ALIGN_8))
  |  |  ------------------
  |  |  |  |   87|   180k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  |  |  ------------------
  ------------------
  307|   180k|  } else {
  308|  42.3k|    aac_scratch_struct->extra_scr_4k[0] = output_ptr;
  309|       |
  310|  42.3k|    if (max_channel > 2) {
  ------------------
  |  Branch (310:9): [True: 42.3k, False: 0]
  ------------------
  311|  42.3k|      aac_scratch_struct->extra_scr_4k[0] = (WORD8 *)base_scratch_ptr + scratch_used;
  312|  42.3k|      scratch_used += SCR_EXTRA_SCR_4K_0_SIZE;
  ------------------
  |  |  130|  42.3k|  (2 * IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_aac_dec_channel_info_struct), sizeof(WORD32)) + \
  |  |  ------------------
  |  |  |  |   87|  42.3k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  |  |  ------------------
  |  |  131|  42.3k|   2 * IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_aac_sfb_code_book_struct), sizeof(WORD32)) +    \
  |  |  ------------------
  |  |  |  |   87|  42.3k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  |  |  ------------------
  |  |  132|  42.3k|   IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_pns_stereo_data_struct), sizeof(WORD32)))
  |  |  ------------------
  |  |  |  |   87|  42.3k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  |  |  ------------------
  ------------------
  313|  42.3k|    }
  314|  42.3k|    aac_scratch_struct->extra_scr_4k[2] = (WORD8 *)base_scratch_ptr + scratch_used;
  315|  42.3k|    scratch_used += SCR_EXTRA_SCR_4K_2_SIZE;
  ------------------
  |  |  134|  42.3k|  (IXHEAAC_GET_SIZE_ALIGNED((IA_ENHAACPLUS_DEC_SAMPLES_PER_FRAME * sizeof(WORD32)), BYTE_ALIGN_8))
  |  |  ------------------
  |  |  |  |   87|  42.3k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  |  |  ------------------
  ------------------
  316|  42.3k|  }
  317|       |
  318|   223k|  if (audio_object_type == AOT_ER_AAC_ELD || audio_object_type == AOT_ER_AAC_LD) {
  ------------------
  |  Branch (318:7): [True: 57.8k, False: 165k]
  |  Branch (318:46): [True: 64.8k, False: 100k]
  ------------------
  319|   122k|    aac_scratch_struct->extra_scr_4k[0] = (WORD8 *)base_scratch_ptr + scratch_used;
  320|   122k|    scratch_used += SCR_EXTRA_SCR_4K_0_SIZE;
  ------------------
  |  |  130|   122k|  (2 * IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_aac_dec_channel_info_struct), sizeof(WORD32)) + \
  |  |  ------------------
  |  |  |  |   87|   122k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  |  |  ------------------
  |  |  131|   122k|   2 * IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_aac_sfb_code_book_struct), sizeof(WORD32)) +    \
  |  |  ------------------
  |  |  |  |   87|   122k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  |  |  ------------------
  |  |  132|   122k|   IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_pns_stereo_data_struct), sizeof(WORD32)))
  |  |  ------------------
  |  |  |  |   87|   122k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  |  |  ------------------
  ------------------
  321|       |
  322|   122k|    aac_scratch_struct->extra_scr_4k[2] = (WORD8 *)base_scratch_ptr + scratch_used;
  323|   122k|    scratch_used += SCR_EXTRA_SCR_4K_2_SIZE;
  ------------------
  |  |  134|   122k|  (IXHEAAC_GET_SIZE_ALIGNED((IA_ENHAACPLUS_DEC_SAMPLES_PER_FRAME * sizeof(WORD32)), BYTE_ALIGN_8))
  |  |  ------------------
  |  |  |  |   87|   122k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  |  |  ------------------
  ------------------
  324|       |
  325|   122k|    aac_scratch_struct->extra_scr_4k[3] = (WORD8 *)base_scratch_ptr + scratch_used;
  326|   122k|    scratch_used += SCR_EXTRA_SCR_4K_3_SIZE;
  ------------------
  |  |  136|   122k|  (IXHEAAC_GET_SIZE_ALIGNED((IA_ENHAACPLUS_DEC_SAMPLES_PER_FRAME * sizeof(WORD32)), BYTE_ALIGN_8))
  |  |  ------------------
  |  |  |  |   87|   122k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  |  |  ------------------
  ------------------
  327|   122k|  }
  328|   223k|  if ((audio_object_type == AOT_ER_AAC_LD) || (audio_object_type == AOT_AAC_LTP)) {
  ------------------
  |  Branch (328:7): [True: 64.8k, False: 158k]
  |  Branch (328:47): [True: 28.6k, False: 129k]
  ------------------
  329|  93.5k|    aac_scratch_struct->out_data = (WORD32 *)((WORD8 *)base_scratch_ptr + scratch_used);
  330|  93.5k|    scratch_used += SCR_OUT_DATA_SIZE;
  ------------------
  |  |  138|  93.5k|  (IXHEAAC_GET_SIZE_ALIGNED((IA_ENHAACPLUS_DEC_SAMPLES_PER_FRAME * sizeof(WORD32)), BYTE_ALIGN_8))
  |  |  ------------------
  |  |  |  |   87|  93.5k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  |  |  ------------------
  ------------------
  331|       |
  332|  93.5k|    aac_scratch_struct->in_data = (WORD32 *)((WORD8 *)base_scratch_ptr + scratch_used);
  333|  93.5k|    scratch_used += SCR_IN_DATA_SIZE;
  ------------------
  |  |  140|  93.5k|  (2 * IXHEAAC_GET_SIZE_ALIGNED((IA_ENHAACPLUS_DEC_SAMPLES_PER_FRAME * sizeof(WORD32)), \
  |  |  ------------------
  |  |  |  |   87|  93.5k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  |  |  ------------------
  |  |  141|  93.5k|                                BYTE_ALIGN_8))
  ------------------
  334|  93.5k|  }
  335|   223k|}
ixheaacd_api.c:copy_qmf_to_ldmps:
  249|  8.55k|                              VOID *sbr_persistent_mem_v) {
  250|  8.55k|  ia_sbr_pers_struct *sbr_persistent_mem =
  251|  8.55k|      (ia_sbr_pers_struct *)sbr_persistent_mem_v;
  252|  8.55k|  memcpy(&mps_dec_handle->str_mps_qmf_bank,
  253|  8.55k|         &sbr_persistent_mem->str_sbr_dec_inst.pstr_sbr_channel[0]
  254|  8.55k|              ->str_sbr_dec.str_codec_qmf_bank,
  255|  8.55k|         sizeof(ia_sbr_qmf_filter_bank_struct));
  256|       |
  257|  8.55k|  mps_dec_handle->sbr_tables_ptr =
  258|  8.55k|      sbr_persistent_mem->str_sbr_dec_inst.pstr_sbr_tables;
  259|  8.55k|  mps_dec_handle->qmf_dec_tables_ptr =
  260|  8.55k|      sbr_persistent_mem->str_sbr_dec_inst.pstr_sbr_tables->qmf_dec_tables_ptr;
  261|  8.55k|  mps_dec_handle->str_sbr_scale_fact =
  262|  8.55k|      &sbr_persistent_mem->str_sbr_dec_inst.pstr_sbr_channel[0]
  263|  8.55k|           ->str_sbr_dec.str_sbr_scale_fact;
  264|  8.55k|}

ixheaacd_copy_to_bitbuff:
 1666|   627k|                              ia_bit_buf_struct *it_bit_buff_dst) {
 1667|   627k|  *it_bit_buff_dst = *it_bit_buff_src;
 1668|   627k|}
ixheaacd_arth_decoding_level2:
 1802|   627k|                                   WORD32 n, WORD32 pres_n, WORD32 *quant) {
 1803|   627k|  state_arith as;
 1804|   627k|  WORD32 a, b;
 1805|   627k|  WORD32 i, j, lev, pki, esc_nb;
 1806|   627k|  WORD32 m;
 1807|   627k|  WORD32 c = 0;
 1808|   627k|  struct ia_bit_buf_struct it_bit_buff_temp = {0};
 1809|   627k|  WORD32 bit_count = 0;
 1810|   627k|  WORD32 s1;
 1811|   627k|  WORD32 temp;
 1812|   627k|  WORD32 bit_count_5;
 1813|   627k|  ixheaacd_copy_to_bitbuff(it_bit_buff, &it_bit_buff_temp);
 1814|       |
 1815|  85.9M|  for (i = 0; i < pres_n; i++) {
  ------------------
  |  Branch (1815:15): [True: 85.3M, False: 627k]
  ------------------
 1816|  85.3M|    c_prev[i] = c_pres[i];
 1817|  85.3M|    c_pres[i] = 1;
 1818|  85.3M|  }
 1819|       |
 1820|   627k|  bit_count = ixheaacd_arith_first_symbol(&it_bit_buff_temp, &as);
 1821|       |
 1822|   627k|  c = (WORD32)c_prev[0] << 12;
 1823|   627k|  lev = 0;
 1824|       |
 1825|  28.4M|  for (i = 0; i < n; i++) {
  ------------------
  |  Branch (1825:15): [True: 27.8M, False: 553k]
  ------------------
 1826|  27.8M|    s1 = ixheaacd_arith_get_context(c_prev + i, c_pres + i, &c, i);
 1827|       |
 1828|  30.0M|    for (lev = esc_nb = 0;;) {
 1829|  30.0M|      pki = ixheaacd_arith_get_pk(s1 + ixheaacd_esc_nb_offset[esc_nb]);
 1830|  30.0M|      bit_count = ixheaacd_arith_decode(&it_bit_buff_temp, bit_count, &m, &as,
 1831|  30.0M|                                        ixheaacd_ari_cf_m[pki], 17);
 1832|  30.0M|      if (bit_count == -1) {
  ------------------
  |  Branch (1832:11): [True: 0, False: 30.0M]
  ------------------
 1833|      0|        longjmp(*(it_bit_buff->xaac_jmp_buf),
 1834|      0|                IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|      0|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
 1835|      0|      }
 1836|       |
 1837|  30.0M|      if (m < ARITH_ESCAPE) {
  ------------------
  |  |   52|  30.0M|#define ARITH_ESCAPE 16
  ------------------
  |  Branch (1837:11): [True: 27.8M, False: 2.16M]
  ------------------
 1838|  27.8M|        break;
 1839|  27.8M|      }
 1840|       |
 1841|  2.16M|      lev += 1;
 1842|  2.16M|      esc_nb = lev;
 1843|       |
 1844|  2.16M|      if (esc_nb > 7) {
  ------------------
  |  Branch (1844:11): [True: 20.7k, False: 2.14M]
  ------------------
 1845|  20.7k|        esc_nb = 7;
 1846|  20.7k|      }
 1847|  2.16M|    }
 1848|       |
 1849|  27.8M|    if (m == 0) {
  ------------------
  |  Branch (1849:9): [True: 15.3M, False: 12.4M]
  ------------------
 1850|  15.3M|      if (esc_nb > 0) break;
  ------------------
  |  Branch (1850:11): [True: 73.4k, False: 15.3M]
  ------------------
 1851|       |
 1852|  15.3M|      quant[2 * i + 0] = 0;
 1853|  15.3M|      quant[2 * i + 1] = 0;
 1854|  15.3M|      c_pres[i] = 1;
 1855|  15.3M|    } else {
 1856|  12.4M|      b = m >> 2;
 1857|  12.4M|      a = m & 0x3;
 1858|       |
 1859|  14.5M|      for (j = 0; j < lev; j++) {
  ------------------
  |  Branch (1859:19): [True: 2.09M, False: 12.4M]
  ------------------
 1860|  2.09M|        WORD32 lsbidx = (a == 0) ? 1 : ((b == 0) ? 0 : 2);
  ------------------
  |  Branch (1860:25): [True: 309k, False: 1.78M]
  |  Branch (1860:41): [True: 342k, False: 1.44M]
  ------------------
 1861|  2.09M|        bit_count = ixheaacd_arith_decode(&it_bit_buff_temp, bit_count, &m, &as,
 1862|  2.09M|                                          ixheaacd_ari_cf_r[lsbidx], 4);
 1863|  2.09M|        if (bit_count == -1) {
  ------------------
  |  Branch (1863:13): [True: 0, False: 2.09M]
  ------------------
 1864|      0|          longjmp(*(it_bit_buff->xaac_jmp_buf),
 1865|      0|                  IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|      0|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
 1866|      0|        }
 1867|  2.09M|        a = (a << 1) | (m & 1);
 1868|  2.09M|        b = (b << 1) | ((m >> 1) & 1);
 1869|  2.09M|      }
 1870|  12.4M|      if ((a > (8183)) || (b > (8183))) {
  ------------------
  |  Branch (1870:11): [True: 259, False: 12.4M]
  |  Branch (1870:27): [True: 97, False: 12.4M]
  ------------------
 1871|    299|        longjmp(*(it_bit_buff->xaac_jmp_buf),
 1872|    299|                IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|    299|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
 1873|    299|      }
 1874|  12.4M|      if ((a < (-8183)) || (b < (-8183))) {
  ------------------
  |  Branch (1874:11): [True: 87, False: 12.4M]
  |  Branch (1874:28): [True: 0, False: 12.4M]
  ------------------
 1875|     30|        longjmp(*(it_bit_buff->xaac_jmp_buf),
 1876|     30|                IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|     30|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
 1877|     30|      }
 1878|  12.4M|      quant[2 * i + 0] = a;
 1879|  12.4M|      quant[2 * i + 1] = b;
 1880|  12.4M|      temp = a + b + 1;
 1881|  12.4M|      c_pres[i] = (WORD8)temp;
 1882|  12.4M|      if (temp > 0xF) {
  ------------------
  |  Branch (1882:11): [True: 300k, False: 12.1M]
  ------------------
 1883|   300k|        c_pres[i] = 0xF;
 1884|   300k|      }
 1885|  12.4M|    }
 1886|  27.8M|  }
 1887|       |
 1888|   627k|  bit_count -= 16 - 2;
 1889|   627k|  if (bit_count > it_bit_buff->cnt_bits) {
  ------------------
  |  Branch (1889:7): [True: 273, False: 626k]
  ------------------
 1890|    273|    longjmp(*(it_bit_buff->xaac_jmp_buf), IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|    273|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
 1891|    273|  }
 1892|       |
 1893|   626k|  if (bit_count > 0) {
  ------------------
  |  Branch (1893:7): [True: 626k, False: 59]
  ------------------
 1894|   626k|    bit_count_5 = bit_count >> 5;
 1895|   626k|    bit_count_5 = (bit_count_5 * 32) + (bit_count & 31);
 1896|   626k|    ixheaacd_skip_bits_buf(it_bit_buff, bit_count_5);
 1897|   626k|  }
 1898|       |
 1899|  85.7M|  for (i = 0; i < pres_n; i++) {
  ------------------
  |  Branch (1899:15): [True: 85.1M, False: 626k]
  ------------------
 1900|  85.1M|    WORD32 temp0 = quant[0];
 1901|  85.1M|    WORD32 temp1 = quant[1];
 1902|  85.1M|    if (temp0) {
  ------------------
  |  Branch (1902:9): [True: 8.94M, False: 76.2M]
  ------------------
 1903|  8.94M|      m = ixheaacd_read_bits_buf(it_bit_buff, 1);
 1904|  8.94M|      bit_count++;
 1905|       |
 1906|  8.94M|      m = (m << 1) * temp0;
 1907|  8.94M|      temp0 = m - (temp0);
 1908|  8.94M|    }
 1909|       |
 1910|  85.1M|    if (temp1) {
  ------------------
  |  Branch (1910:9): [True: 9.01M, False: 76.1M]
  ------------------
 1911|  9.01M|      m = ixheaacd_read_bits_buf(it_bit_buff, 1);
 1912|  9.01M|      bit_count++;
 1913|       |
 1914|  9.01M|      m = (m << 1) * temp1;
 1915|  9.01M|      temp1 = m - (temp1);
 1916|  9.01M|    }
 1917|  85.1M|    if ((temp0 > (8183)) || (temp1 > (8183))) {
  ------------------
  |  Branch (1917:9): [True: 98, False: 85.1M]
  |  Branch (1917:29): [True: 0, False: 85.1M]
  ------------------
 1918|      0|      longjmp(*(it_bit_buff->xaac_jmp_buf), IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|      0|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
 1919|      0|    }
 1920|  85.1M|    if ((temp0 < (-8183)) || (temp1 < (-8183))) {
  ------------------
  |  Branch (1920:9): [True: 98, False: 85.1M]
  |  Branch (1920:30): [True: 0, False: 85.1M]
  ------------------
 1921|      0|      longjmp(*(it_bit_buff->xaac_jmp_buf), IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|      0|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
 1922|      0|    }
 1923|  85.1M|    *quant++ = temp0;
 1924|  85.1M|    *quant++ = temp1;
 1925|  85.1M|  }
 1926|   626k|  return;
 1927|   626k|}
ixheaacd_ac_spectral_data:
 2088|   230k|                                 WORD32 ch) {
 2089|   230k|  WORD32 i;
 2090|       |
 2091|   230k|  WORD32 *x_ac_dec = usac_data->x_ac_dec;
 2092|   230k|  WORD32 sbk;
 2093|       |
 2094|   230k|  const WORD32 max_win_len = usac_data->pstr_sfb_info[ch]->max_win_len;
 2095|   230k|  WORD8 *c_prev = &usac_data->c_prev[ch][0];
 2096|   230k|  WORD8 *c_pres = &usac_data->c[ch][0];
 2097|       |
 2098|   230k|  WORD8 *ptr_scratch_buf = (WORD8 *)&usac_data->scratch_buffer[0];
 2099|       |
 2100|   230k|  memset(x_ac_dec, 0, 1024 * sizeof(WORD32));
 2101|       |
 2102|   230k|  ixheaacd_arith_map_context(arith_pres_n, usac_data->arith_prev_n[ch], c_prev,
 2103|   230k|                             c_pres, arith_reset_flag, ptr_scratch_buf);
 2104|       |
 2105|   230k|  usac_data->arith_prev_n[ch] = arith_pres_n;
 2106|       |
 2107|   230k|  if (max_spec_coefficients > 0) {
  ------------------
  |  Branch (2107:7): [True: 136k, False: 93.1k]
  ------------------
 2108|   658k|    for (sbk = 0; sbk < max_win_len; sbk++) {
  ------------------
  |  Branch (2108:19): [True: 521k, False: 136k]
  ------------------
 2109|   521k|      ixheaacd_arth_decoding_level2(it_bit_buff, c_prev + 2, c_pres + 2,
 2110|   521k|                                    max_spec_coefficients / 2, arith_pres_n / 2,
 2111|   521k|                                    &x_ac_dec[sbk * arith_pres_n]);
 2112|       |
 2113|  51.3M|      for (i = max_spec_coefficients / 2; i < arith_pres_n / 2; i++) {
  ------------------
  |  Branch (2113:43): [True: 50.8M, False: 521k]
  ------------------
 2114|  50.8M|        x_ac_dec[sbk * arith_pres_n + 2 * i + 0] = 0;
 2115|  50.8M|        x_ac_dec[sbk * arith_pres_n + 2 * i + 1] = 0;
 2116|  50.8M|      }
 2117|   521k|    }
 2118|   136k|  } else {
 2119|  34.8M|    for (i = 0; i < (arith_pres_n / 2); i++) {
  ------------------
  |  Branch (2119:17): [True: 34.7M, False: 93.1k]
  ------------------
 2120|  34.7M|      c_pres[i + 2] = 1;
 2121|  34.7M|    }
 2122|  93.1k|  }
 2123|       |
 2124|   230k|  ixheaacd_apply_scfs_and_nf(noise_filling, usac_data, x_ac_dec, noise_level,
 2125|   230k|                             noise_offset, max_sfb, ch);
 2126|       |
 2127|   230k|  return 0;
 2128|   230k|}
ixheaacd_arith_data:
 2133|   106k|                           WORD32 first_tcx_flag, WORD32 k) {
 2134|   106k|  WORD32 *arith_prev_n = &usac_data->arith_prev_n[usac_data->present_chan];
 2135|   106k|  WORD32 arith_reset_flag =
 2136|   106k|      first_tcx_flag && pstr_td_frame_data->arith_reset_flag;
  ------------------
  |  Branch (2136:7): [True: 62.8k, False: 43.4k]
  |  Branch (2136:25): [True: 31.2k, False: 31.5k]
  ------------------
 2137|   106k|  WORD32 tcx_size = pstr_td_frame_data->tcx_lg[k];
 2138|   106k|  WORD8 *c_prev = usac_data->c_prev[usac_data->present_chan];
 2139|   106k|  WORD8 *c_pres = usac_data->c[usac_data->present_chan];
 2140|       |
 2141|   106k|  WORD8 *ptr_scratch_buf = (WORD8 *)&usac_data->scratch_buffer[0];
 2142|       |
 2143|   106k|  memset(x_ac_dec, 0, tcx_size * sizeof(WORD32));
 2144|       |
 2145|   106k|  ixheaacd_arith_map_context(tcx_size, *arith_prev_n, c_prev, c_pres,
 2146|   106k|                             arith_reset_flag, ptr_scratch_buf);
 2147|       |
 2148|   106k|  *arith_prev_n = tcx_size;
 2149|       |
 2150|   106k|  ixheaacd_arth_decoding_level2(it_bit_buff, c_prev + 2, c_pres + 2, tcx_size / 2, tcx_size / 2,
 2151|   106k|                                x_ac_dec);
 2152|       |
 2153|   106k|  return;
 2154|   106k|}
ixheaacd_arith_dec.c:ixheaacd_arith_first_symbol:
 1688|   627k|                                          state_arith *s) {
 1689|   627k|  register WORD32 val;
 1690|       |
 1691|   627k|  WORD32 bit_count = 16;
 1692|       |
 1693|   627k|  val = 0;
 1694|   627k|  if (it_bit_buff->cnt_bits < 16) {
  ------------------
  |  Branch (1694:7): [True: 71, False: 627k]
  ------------------
 1695|     71|    WORD32 shift_value = 16 - it_bit_buff->cnt_bits;
 1696|     71|    val = ixheaacd_read_bits_buf(it_bit_buff, it_bit_buff->cnt_bits);
 1697|     71|    val <<= shift_value;
 1698|   627k|  } else {
 1699|   627k|    val = ixheaacd_read_bits_buf(it_bit_buff, 16);
 1700|   627k|  }
 1701|       |
 1702|   627k|  s->low = 0;
 1703|   627k|  s->high = 65535;
 1704|   627k|  s->value = val;
 1705|       |
 1706|   627k|  return bit_count;
 1707|   627k|}
ixheaacd_arith_dec.c:ixheaacd_arith_get_context:
 1671|  27.8M|                                         WORD32 *c, WORD32 i) {
 1672|  27.8M|  WORD32 tmp = (WORD32)c_prev[1] << 12;
 1673|       |
 1674|  27.8M|  *c = *c >> 4;
 1675|  27.8M|  *c = *c + tmp;
 1676|  27.8M|  *c = (*c & 0xFFF0) + c_pres[-1];
 1677|       |
 1678|  27.8M|  if (i > 3) {
  ------------------
  |  Branch (1678:7): [True: 25.6M, False: 2.16M]
  ------------------
 1679|  25.6M|    if ((c_pres[-1] + c_pres[-2] + c_pres[-3]) < 5) {
  ------------------
  |  Branch (1679:9): [True: 13.6M, False: 12.0M]
  ------------------
 1680|  13.6M|      return (*c + 0x10000);
 1681|  13.6M|    }
 1682|  25.6M|  }
 1683|       |
 1684|  14.2M|  return (*c);
 1685|  27.8M|}
ixheaacd_arith_dec.c:ixheaacd_arith_get_pk:
 1709|  30.0M|static UWORD32 ixheaacd_arith_get_pk(UWORD32 c) {
 1710|  30.0M|  UWORD32 j;
 1711|  30.0M|  WORD32 i, i_min, i_max;
 1712|       |
 1713|  30.0M|  i_min = -1;
 1714|  30.0M|  i = i_min;
 1715|  30.0M|  i_max = 742 - 1;
 1716|   287M|  while ((i_max - i_min) > 1) {
  ------------------
  |  Branch (1716:10): [True: 273M, False: 14.2M]
  ------------------
 1717|   273M|    i = i_min + ((i_max - i_min) >> 1);
 1718|   273M|    j = ixheaacd_ari_hash_m[i];
 1719|   273M|    if (c < j)
  ------------------
  |  Branch (1719:9): [True: 144M, False: 128M]
  ------------------
 1720|   144M|      i_max = i;
 1721|   128M|    else if (c > j)
  ------------------
  |  Branch (1721:14): [True: 113M, False: 15.7M]
  ------------------
 1722|   113M|      i_min = i;
 1723|  15.7M|    else
 1724|  15.7M|      return (UWORD32)ixheaacd_ari_hash_m_1[i];
 1725|   273M|  }
 1726|       |
 1727|  14.2M|  return (ixheaacd_ari_lookup_m[i_max]);
 1728|  30.0M|}
ixheaacd_arith_dec.c:ixheaacd_arith_decode:
 1732|  32.1M|                                    UWORD16 const *cum_freq, WORD32 cfl) {
 1733|  32.1M|  register WORD32 symbol;
 1734|  32.1M|  register WORD32 low, high, range, value;
 1735|  32.1M|  register WORD32 cumulative;
 1736|  32.1M|  register UWORD16 const *p;
 1737|  32.1M|  register UWORD16 const *q;
 1738|       |
 1739|  32.1M|  low = s->low;
 1740|  32.1M|  high = s->high;
 1741|  32.1M|  value = s->value;
 1742|       |
 1743|  32.1M|  range = high - low + 1;
 1744|  32.1M|  cumulative = ((((WORD32)(value - low + 1)) << 14) - ((WORD32)1)) / ((WORD32)range);
 1745|       |
 1746|  32.1M|  if (it_bit_buff->cnt_bits == 0)
  ------------------
  |  Branch (1746:7): [True: 22.6k, False: 32.0M]
  ------------------
 1747|  22.6k|    if (cumulative <= 0) {
  ------------------
  |  Branch (1747:9): [True: 57, False: 22.5k]
  ------------------
 1748|     57|       longjmp(*(it_bit_buff->xaac_jmp_buf), IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|     57|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
 1749|     57|    }
 1750|  32.1M|  p = cum_freq - 1;
 1751|       |
 1752|   126M|  do {
 1753|   126M|    q = p + (cfl >> 1);
 1754|       |
 1755|   126M|    if (*q > cumulative) {
  ------------------
  |  Branch (1755:9): [True: 31.5M, False: 95.0M]
  ------------------
 1756|  31.5M|      p = q;
 1757|  31.5M|      cfl++;
 1758|  31.5M|    }
 1759|   126M|    cfl >>= 1;
 1760|   126M|  } while (cfl > 1);
  ------------------
  |  Branch (1760:12): [True: 94.4M, False: 32.1M]
  ------------------
 1761|       |
 1762|  32.1M|  symbol = (WORD32)(p - cum_freq + 1);
 1763|       |
 1764|  32.1M|  if (symbol) high = low + ((range * cum_freq[symbol - 1]) >> 14) - 1;
  ------------------
  |  Branch (1764:7): [True: 16.0M, False: 16.0M]
  ------------------
 1765|       |
 1766|  32.1M|  low += ((range * cum_freq[symbol]) >> 14);
 1767|       |
 1768|  92.9M|  for (;;) {
 1769|  92.9M|    if (high < 32768) {
  ------------------
  |  Branch (1769:9): [True: 21.8M, False: 71.1M]
  ------------------
 1770|  71.1M|    } else if (low >= 32768) {
  ------------------
  |  Branch (1770:16): [True: 17.3M, False: 53.7M]
  ------------------
 1771|  17.3M|      value -= 32768;
 1772|  17.3M|      low -= 32768;
 1773|  17.3M|      high -= 32768;
 1774|  53.7M|    } else if (low >= 16384 && high < 49152) {
  ------------------
  |  Branch (1774:16): [True: 33.9M, False: 19.8M]
  |  Branch (1774:32): [True: 21.6M, False: 12.3M]
  ------------------
 1775|  21.6M|      value -= 16384;
 1776|  21.6M|      low -= 16384;
 1777|  21.6M|      high -= 16384;
 1778|  21.6M|    } else
 1779|  32.1M|      break;
 1780|       |
 1781|  60.8M|    low += low;
 1782|  60.8M|    high += high + 1;
 1783|       |
 1784|  60.8M|    if (it_bit_buff->cnt_bits > 0)
  ------------------
  |  Branch (1784:9): [True: 60.8M, False: 43.5k]
  ------------------
 1785|  60.8M|      value = (value << 1) | ixheaacd_read_bits_buf(it_bit_buff, 1);
 1786|  43.5k|    else
 1787|  43.5k|      value = (value << 1);
 1788|       |
 1789|  60.8M|    bit_count++;
 1790|  60.8M|  }
 1791|       |
 1792|  32.1M|  s->low = low;
 1793|  32.1M|  s->high = high;
 1794|  32.1M|  s->value = value;
 1795|       |
 1796|  32.1M|  *m = symbol;
 1797|       |
 1798|  32.1M|  return bit_count;
 1799|  32.1M|}
ixheaacd_arith_dec.c:ixheaacd_arith_map_context:
 1636|   336k|                                       WORD8 *ptr_scratch) {
 1637|   336k|  WORD32 i, k;
 1638|   336k|  FLOAT32 ratio;
 1639|   336k|  WORD8 *c_prev_tmp = ptr_scratch;
 1640|   336k|  WORD8 *c_tmp = ptr_scratch + 516;
 1641|       |
 1642|   336k|  if (arith_reset_flag) {
  ------------------
  |  Branch (1642:7): [True: 87.0k, False: 249k]
  ------------------
 1643|  44.9M|    for (i = 0; i < (1024 / 2) + 4; i++) {
  ------------------
  |  Branch (1643:17): [True: 44.9M, False: 87.0k]
  ------------------
 1644|  44.9M|      c_prev[i] = 0;
 1645|  44.9M|      c[i] = 0;
 1646|  44.9M|    }
 1647|       |
 1648|   249k|  } else {
 1649|  74.5M|    for (i = 2; i < (prev_n / 2 + 4); i++) {
  ------------------
  |  Branch (1649:17): [True: 74.3M, False: 249k]
  ------------------
 1650|  74.3M|      c_prev_tmp[i] = c_prev[i];
 1651|  74.3M|      c_tmp[i] = c[i];
 1652|  74.3M|    }
 1653|       |
 1654|   249k|    ratio = (FLOAT32)(prev_n) / (FLOAT32)(pres_n);
 1655|  74.4M|    for (i = 0; i < (pres_n / 2); i++) {
  ------------------
  |  Branch (1655:17): [True: 74.2M, False: 249k]
  ------------------
 1656|  74.2M|      k = (WORD32)((FLOAT32)(i)*ratio);
 1657|  74.2M|      c_prev[2 + i] = c_prev_tmp[2 + k];
 1658|  74.2M|      c[2 + i] = c_tmp[2 + k];
 1659|  74.2M|    }
 1660|   249k|    c_prev[(pres_n / 2) + 2] = c_prev_tmp[(prev_n / 2) + 2];
 1661|   249k|    c[(pres_n / 2) + 3] = c_tmp[(prev_n / 2) + 3];
 1662|   249k|  }
 1663|   336k|}
ixheaacd_arith_dec.c:ixheaacd_apply_scfs_and_nf:
 1997|   229k|                                       WORD32 ch) {
 1998|   229k|  WORD32 grp = 0, win_tot = 0, sfb = 0;
 1999|   229k|  WORD32 noise_filling_start_offset = 0;
 2000|   229k|  WORD32 fac = 0, length = 0;
 2001|   229k|  WORD64 fac_fix;
 2002|   229k|  WORD32 noise_level_fix = 0;
 2003|   229k|  ia_sfb_info_struct *pstr_sfb_info = usac_data->pstr_sfb_info[ch];
 2004|   229k|  WORD32 *coef = &usac_data->coef_fix[ch][0];
 2005|   229k|  WORD16 *factors = usac_data->factors[ch];
 2006|   229k|  UWORD32 *seed_value = &usac_data->seed_value[ch];
 2007|       |
 2008|   229k|  if (noise_filling) {
  ------------------
  |  Branch (2008:7): [True: 147k, False: 81.6k]
  ------------------
 2009|   147k|    noise_level_fix = ixheaacd_pow_14_3[noise_level];
 2010|   147k|    noise_filling_start_offset = (usac_data->ccfl == 768)
  ------------------
  |  Branch (2010:34): [True: 6.40k, False: 141k]
  ------------------
 2011|   147k|                                     ? (pstr_sfb_info->islong ? 120 : 15)
  ------------------
  |  Branch (2011:41): [True: 5.26k, False: 1.13k]
  ------------------
 2012|   147k|                                     : (pstr_sfb_info->islong ? 160 : 20);
  ------------------
  |  Branch (2012:41): [True: 80.7k, False: 60.7k]
  ------------------
 2013|   147k|  }
 2014|       |
 2015|   824k|  for (grp = 0; grp < pstr_sfb_info->num_groups; grp++) {
  ------------------
  |  Branch (2015:17): [True: 594k, False: 229k]
  ------------------
 2016|   594k|    WORD32 grp_win = 0;
 2017|  3.21M|    for (sfb = 0; sfb < (WORD32)max_sfb; sfb++) {
  ------------------
  |  Branch (2017:19): [True: 2.62M, False: 594k]
  ------------------
 2018|  2.62M|      WORD32 noise_filling_present = 0;
 2019|  2.62M|      WORD32 band_quantized_to_zero = 1;
 2020|       |
 2021|  2.62M|      WORD32 sfb_offset = win_tot * pstr_sfb_info->sfb_per_sbk;
 2022|  2.62M|      fac = (WORD32)(factors[sfb_offset + sfb] - SF_OFFSET);
 2023|       |
 2024|  2.62M|      if (noise_filling) {
  ------------------
  |  Branch (2024:11): [True: 1.56M, False: 1.06M]
  ------------------
 2025|  4.32M|        for (grp_win = 0; grp_win < pstr_sfb_info->group_len[grp]; grp_win++) {
  ------------------
  |  Branch (2025:27): [True: 2.75M, False: 1.56M]
  ------------------
 2026|  2.75M|          WORD32 win = grp_win + win_tot;
 2027|  2.75M|          WORD32 ixheaacd_drc_offset = win * pstr_sfb_info->bins_per_sbk;
 2028|  2.75M|          WORD32 start = (sfb == 0) ? 0 : pstr_sfb_info->ptr_sfb_tbl[sfb - 1];
  ------------------
  |  Branch (2028:26): [True: 342k, False: 2.41M]
  ------------------
 2029|  2.75M|          WORD32 idx = 0;
 2030|  11.5M|          for (idx = start; idx < pstr_sfb_info->ptr_sfb_tbl[sfb]; idx++) {
  ------------------
  |  Branch (2030:29): [True: 11.0M, False: 570k]
  ------------------
 2031|  11.0M|            if (quant[ixheaacd_drc_offset + idx] != 0) {
  ------------------
  |  Branch (2031:17): [True: 1.57M, False: 9.42M]
  ------------------
 2032|  1.57M|              band_quantized_to_zero = 0;
 2033|  1.57M|              break;
 2034|  1.57M|            }
 2035|  9.42M|            if (!band_quantized_to_zero) break;
  ------------------
  |  Branch (2035:17): [True: 609k, False: 8.81M]
  ------------------
 2036|  9.42M|          }
 2037|  2.75M|        }
 2038|  1.56M|      }
 2039|       |
 2040|  2.62M|      if (band_quantized_to_zero && noise_filling) fac += (noise_offset - 16);
  ------------------
  |  Branch (2040:11): [True: 1.47M, False: 1.15M]
  |  Branch (2040:37): [True: 414k, False: 1.06M]
  ------------------
 2041|  2.62M|      {
 2042|  2.62M|        WORD16 exp, frac;
 2043|       |
 2044|  2.62M|        exp = fac >> 2;
 2045|  2.62M|        frac = fac & 3;
 2046|       |
 2047|  2.62M|        if (exp > 31) exp = 31;
  ------------------
  |  Branch (2047:13): [True: 167k, False: 2.45M]
  ------------------
 2048|       |
 2049|  2.62M|        if (fac < 0)
  ------------------
  |  Branch (2049:13): [True: 872k, False: 1.75M]
  ------------------
 2050|   872k|          fac_fix = 0;
 2051|  1.75M|        else {
 2052|  1.75M|          fac_fix = (WORD64)((WORD64)ixheaacd_table_frac[3 + frac] *
 2053|  1.75M|                             (WORD64)ixheaacd_table_exp[exp]);
 2054|  1.75M|          fac_fix >>= 15;
 2055|  1.75M|        }
 2056|  2.62M|      }
 2057|       |
 2058|  6.63M|      for (grp_win = 0; grp_win < pstr_sfb_info->group_len[grp]; grp_win++) {
  ------------------
  |  Branch (2058:25): [True: 4.01M, False: 2.62M]
  ------------------
 2059|  4.01M|        WORD32 win = win_tot + grp_win;
 2060|  4.01M|        WORD32 start = (sfb == 0) ? 0 : pstr_sfb_info->ptr_sfb_tbl[sfb - 1];
  ------------------
  |  Branch (2060:24): [True: 519k, False: 3.49M]
  ------------------
 2061|  4.01M|        WORD32 ixheaacd_drc_offset = win * pstr_sfb_info->bins_per_sbk;
 2062|       |
 2063|  4.01M|        if (noise_filling) {
  ------------------
  |  Branch (2063:13): [True: 2.75M, False: 1.25M]
  ------------------
 2064|  2.75M|          noise_filling_present =
 2065|  2.75M|              (start >= noise_filling_start_offset) & noise_filling;
 2066|  2.75M|        }
 2067|       |
 2068|  4.01M|        length = pstr_sfb_info->ptr_sfb_tbl[sfb] - start;
 2069|       |
 2070|  4.01M|        ixheaacd_esc_iquant(&quant[ixheaacd_drc_offset + start],
 2071|  4.01M|                            &coef[ixheaacd_drc_offset + start], noise_level_fix,
 2072|  4.01M|                            noise_filling_present, seed_value, length, fac_fix);
 2073|  4.01M|      }
 2074|  2.62M|    }
 2075|       |
 2076|   594k|    win_tot += pstr_sfb_info->group_len[grp];
 2077|   594k|  }
 2078|       |
 2079|   229k|  return;
 2080|   229k|}
ixheaacd_arith_dec.c:ixheaacd_esc_iquant:
 1942|  4.01M|                                WORD32 length, WORD64 fac_fix) {
 1943|  4.01M|  WORD32 q1 = 0;
 1944|  4.01M|  WORD64 temp;
 1945|  4.01M|  WORD16 interp;
 1946|  4.01M|  WORD32 i;
 1947|  4.01M|  WORD16 flag;
 1948|       |
 1949|  40.4M|  for (i = 0; i < length; i++) {
  ------------------
  |  Branch (1949:15): [True: 36.4M, False: 4.01M]
  ------------------
 1950|  36.4M|    flag = 1;
 1951|       |
 1952|  36.4M|    if (with_noise) {
  ------------------
  |  Branch (1952:9): [True: 17.1M, False: 19.2M]
  ------------------
 1953|  17.1M|      if (q[i] == 0) {
  ------------------
  |  Branch (1953:11): [True: 13.5M, False: 3.60M]
  ------------------
 1954|  13.5M|        coef[i] = (ixheaacd_randomsign_fix(seed_value) * noise_level);
 1955|  13.5M|        temp = (fac_fix * coef[i]);
 1956|  13.5M|        coef[i] = (WORD32)(temp >> 25);
 1957|  13.5M|        continue;
 1958|  13.5M|      }
 1959|  17.1M|    }
 1960|       |
 1961|  22.8M|    if (q[i] < 0) {
  ------------------
  |  Branch (1961:9): [True: 6.34M, False: 16.5M]
  ------------------
 1962|  6.34M|      flag = -1;
 1963|  6.34M|      q[i] = -q[i];
 1964|  6.34M|    }
 1965|       |
 1966|  22.8M|    if (q[i] >= 8192) {
  ------------------
  |  Branch (1966:9): [True: 0, False: 22.8M]
  ------------------
 1967|      0|      q[i] = 8191;
 1968|      0|    }
 1969|       |
 1970|  22.8M|    if (q[i] < 1024) {
  ------------------
  |  Branch (1970:9): [True: 22.8M, False: 689]
  ------------------
 1971|  22.8M|      coef[i] = flag * ixheaacd_pow_table_Q13[q[i]];
 1972|  22.8M|    } else {
 1973|    689|      q1 = (q[i]) >> 3;
 1974|       |
 1975|    689|      interp = q[i] - (q1 << 3);
 1976|       |
 1977|    689|      coef[i] = ixheaacd_pow_table_Q13[q1 + 1] - ixheaacd_pow_table_Q13[q1];
 1978|       |
 1979|    689|      coef[i] = (WORD32)(coef[i] * (WORD32)interp);
 1980|       |
 1981|    689|      coef[i] = coef[i] + (ixheaacd_pow_table_Q13[q1] << 3);
 1982|       |
 1983|    689|      coef[i] = flag * (coef[i] << 1);
 1984|    689|    }
 1985|  22.8M|    temp = ixheaac_mult64_sat(fac_fix, (WORD64)coef[i]);
 1986|       |
 1987|  22.8M|    coef[i] = (WORD32)(temp >> 22);
 1988|  22.8M|  }
 1989|       |
 1990|  4.01M|  return;
 1991|  4.01M|}
ixheaacd_arith_dec.c:ixheaacd_randomsign_fix:
 1929|  13.5M|static WORD32 ixheaacd_randomsign_fix(UWORD32 *seed) {
 1930|  13.5M|  WORD32 sign = 0;
 1931|  13.5M|  *seed = (UWORD32)(((UWORD64)(*seed) * (UWORD64)69069) + 5);
 1932|  13.5M|  if (((*seed) & 0x10000) > 0) {
  ------------------
  |  Branch (1932:7): [True: 6.81M, False: 6.70M]
  ------------------
 1933|  6.81M|    sign = -1;
 1934|  6.81M|  } else {
 1935|  6.70M|    sign = +1;
 1936|  6.70M|  }
 1937|  13.5M|  return sign;
 1938|  13.5M|}

ixheaacd_voronoi_search:
  103|   104k|                             WORD32 *rem2) {
  104|   104k|  WORD32 i, y0[8], y1[8];
  105|   104k|  WORD32 x1[8], tmp;
  106|   104k|  WORD32 e0, e1;
  107|       |
  108|   104k|  ixheaacd_nearest_neighbor_2d(x, y0, count, rem1);
  109|   936k|  for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (109:15): [True: 832k, False: 104k]
  ------------------
  110|   832k|    if (x[i] == 0) {
  ------------------
  |  Branch (110:9): [True: 437k, False: 395k]
  ------------------
  111|   437k|      if (rem2[i] == 0) {
  ------------------
  |  Branch (111:11): [True: 173k, False: 263k]
  ------------------
  112|   173k|        x1[i] = x[i] - 1;
  113|   263k|      } else {
  114|   263k|        x1[i] = 0;
  115|   263k|        rem2[i] = ixheaac_sub32_sat(rem2[i], (1 << count));
  116|   263k|      }
  117|   437k|    } else {
  118|   395k|      x1[i] = ixheaac_sub32_sat(x[i], 1);
  119|   395k|    }
  120|   832k|  }
  121|       |
  122|   104k|  ixheaacd_nearest_neighbor_2d(x1, y1, count, rem2);
  123|       |
  124|   936k|  for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (124:15): [True: 832k, False: 104k]
  ------------------
  125|   832k|    y1[i] = ixheaac_add32_sat(y1[i], 1);
  126|   832k|  }
  127|       |
  128|   104k|  e0 = e1 = 0;
  129|   936k|  for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (129:15): [True: 832k, False: 104k]
  ------------------
  130|   832k|    tmp = rem1[i];
  131|   832k|    e0 = ixheaac_add32_sat(ixheaac_sat64_32((WORD64)tmp * (WORD64)tmp), e0);
  132|   832k|    tmp = rem2[i];
  133|   832k|    e1 = ixheaac_add32_sat(ixheaac_sat64_32((WORD64)tmp * (WORD64)tmp), e1);
  134|   832k|  }
  135|       |
  136|   104k|  if (e0 < e1) {
  ------------------
  |  Branch (136:7): [True: 76.3k, False: 27.7k]
  ------------------
  137|   687k|    for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (137:17): [True: 611k, False: 76.3k]
  ------------------
  138|   611k|      y[i] = y0[i];
  139|   611k|    }
  140|  76.3k|  } else {
  141|   249k|    for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (141:17): [True: 221k, False: 27.7k]
  ------------------
  142|   221k|      y[i] = y1[i];
  143|   221k|    }
  144|  27.7k|  }
  145|   104k|  return;
  146|   104k|}
ixheaacd_voronoi_idx_dec:
  148|   104k|VOID ixheaacd_voronoi_idx_dec(WORD32 *kv, WORD32 m, WORD32 *y, WORD32 count) {
  149|   104k|  WORD32 i, v[8], tmp, sum, *ptr1, *ptr2;
  150|   104k|  WORD32 z[8];
  151|   104k|  WORD32 rem1[8], rem2[8];
  152|       |
  153|   936k|  for (i = 0; i < 8; i++) y[i] = kv[7];
  ------------------
  |  Branch (153:15): [True: 832k, False: 104k]
  ------------------
  154|       |
  155|   104k|  z[7] = y[7] >> count;
  156|   104k|  rem1[7] = y[7] & (m - 1);
  157|   104k|  sum = 0;
  158|   728k|  for (i = 6; i >= 1; i--) {
  ------------------
  |  Branch (158:15): [True: 624k, False: 104k]
  ------------------
  159|   624k|    tmp = ixheaac_shl32_sat(kv[i], 1);
  160|   624k|    sum = ixheaac_add32_sat(sum, tmp);
  161|   624k|    y[i] = ixheaac_add32_sat(y[i], tmp);
  162|   624k|    z[i] = y[i] >> count;
  163|   624k|    rem1[i] = y[i] & (m - 1);
  164|   624k|  }
  165|   104k|  y[0] = ixheaac_add32_sat(
  166|   104k|      y[0],
  167|   104k|      ixheaac_add32_sat(ixheaac_sat64_32((WORD64)4 * (WORD64)kv[0]), sum));
  168|   104k|  z[0] = (ixheaac_sub32_sat(y[0], 2)) >> count;
  169|   104k|  if (m != 0)
  ------------------
  |  Branch (169:7): [True: 104k, False: 0]
  ------------------
  170|   104k|    rem1[0] = (ixheaac_sub32_sat(y[0], 2)) % m;
  171|      0|  else
  172|      0|    rem1[0] = ixheaac_sub32_sat(y[0], 2);
  173|       |
  174|   104k|  memcpy(rem2, rem1, 8 * sizeof(WORD32));
  175|       |
  176|   104k|  ixheaacd_voronoi_search(z, v, count, rem1, rem2);
  177|       |
  178|   104k|  ptr1 = y;
  179|   104k|  ptr2 = v;
  180|   936k|  for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (180:15): [True: 832k, False: 104k]
  ------------------
  181|   832k|    *ptr1 = ixheaac_sub32_sat(*ptr1,
  182|   832k|                               ixheaac_sat64_32((WORD64)m * (WORD64)*ptr2++));
  183|   832k|    ptr1++;
  184|   832k|  }
  185|   104k|}
ixheaacd_rotated_gosset_mtx_dec:
  286|  3.03M|                                     WORD32 *kv, WORD32 *b) {
  287|  3.03M|  if (qn <= 4) {
  ------------------
  |  Branch (287:7): [True: 2.92M, False: 104k]
  ------------------
  288|  2.92M|    ixheaacd_gosset_decode_base_index(qn, code_book_idx, b);
  289|  2.92M|  } else {
  290|   104k|    WORD32 i, m, c[8];
  291|   104k|    WORD32 count = 0;
  292|   324k|    while (qn > 4) {
  ------------------
  |  Branch (292:12): [True: 220k, False: 104k]
  ------------------
  293|   220k|      count++;
  294|   220k|      qn -= 2;
  295|   220k|    }
  296|       |
  297|   104k|    if (count >= 31)
  ------------------
  |  Branch (297:9): [True: 0, False: 104k]
  ------------------
  298|      0|      m = MAX_32;
  ------------------
  |  |   60|      0|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  299|   104k|    else
  300|   104k|      m = 1 << count;
  301|       |
  302|   104k|    ixheaacd_gosset_decode_base_index(qn, code_book_idx, b);
  303|       |
  304|   104k|    ixheaacd_voronoi_idx_dec(kv, m, c, count);
  305|       |
  306|   936k|    for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (306:17): [True: 832k, False: 104k]
  ------------------
  307|   832k|      b[i] =
  308|   832k|          ixheaac_add32_sat(ixheaac_sat64_32((WORD64)m * (WORD64)b[i]), c[i]);
  309|   832k|    }
  310|   104k|  }
  311|  3.03M|  return;
  312|  3.03M|}
ixheaacd_avq_dec.c:ixheaacd_nearest_neighbor_2d:
   43|   208k|                                         WORD32 *rem) {
   44|   208k|  WORD32 i, j, sum;
   45|   208k|  WORD32 s, e[8], em;
   46|   208k|  WORD32 rem_temp[8];
   47|       |
   48|   208k|  memcpy(rem_temp, rem, 8 * sizeof(WORD32));
   49|       |
   50|   208k|  sum = 0;
   51|  1.87M|  for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (51:15): [True: 1.66M, False: 208k]
  ------------------
   52|  1.66M|    if (x[i] < 0) {
  ------------------
  |  Branch (52:9): [True: 182k, False: 1.48M]
  ------------------
   53|   182k|      y[i] = ixheaac_negate32_sat(
   54|   182k|          ixheaac_shl32_sat((ixheaac_sub32_sat(1, x[i]) >> 1), 1));
   55|  1.48M|    } else {
   56|  1.48M|      y[i] = ixheaac_shl32_sat((ixheaac_add32_sat(1, x[i]) >> 1), 1);
   57|  1.48M|    }
   58|  1.66M|    sum = ixheaac_add32_sat(sum, y[i]);
   59|       |
   60|  1.66M|    if (x[i] % 2 != 0) {
  ------------------
  |  Branch (60:9): [True: 569k, False: 1.09M]
  ------------------
   61|   569k|      if (x[i] < 0) {
  ------------------
  |  Branch (61:11): [True: 178k, False: 391k]
  ------------------
   62|   178k|        rem_temp[i] = ixheaac_negate32_sat(
   63|   178k|            ixheaac_sub32_sat(rem_temp[i], (1 << count)));
   64|   391k|      } else {
   65|   391k|        rem_temp[i] = ixheaac_sub32_sat(rem_temp[i], (1 << count));
   66|   391k|      }
   67|   569k|    }
   68|  1.66M|  }
   69|       |
   70|   208k|  if (sum % 4) {
  ------------------
  |  Branch (70:7): [True: 101k, False: 106k]
  ------------------
   71|   101k|    em = 0;
   72|   101k|    j = 0;
   73|   913k|    for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (73:17): [True: 812k, False: 101k]
  ------------------
   74|   812k|      e[i] = rem_temp[i];
   75|   812k|    }
   76|   913k|    for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (76:17): [True: 812k, False: 101k]
  ------------------
   77|   812k|      if (e[i] < 0) {
  ------------------
  |  Branch (77:11): [True: 344k, False: 467k]
  ------------------
   78|   344k|        s = -e[i];
   79|   467k|      } else {
   80|   467k|        s = e[i];
   81|   467k|      }
   82|       |
   83|   812k|      if (em < s) {
  ------------------
  |  Branch (83:11): [True: 135k, False: 677k]
  ------------------
   84|   135k|        em = s;
   85|   135k|        j = i;
   86|   135k|      }
   87|   812k|    }
   88|       |
   89|   101k|    if (e[j] < 0) {
  ------------------
  |  Branch (89:9): [True: 54.6k, False: 46.8k]
  ------------------
   90|  54.6k|      y[j] -= 2;
   91|  54.6k|      rem_temp[j] = ixheaac_add32_sat(rem_temp[j], (2 << count));
   92|  54.6k|    } else {
   93|  46.8k|      y[j] = ixheaac_add32_sat(y[j], 2);
   94|  46.8k|      rem_temp[j] = ixheaac_sub32_sat(rem_temp[j], (2 << count));
   95|  46.8k|    }
   96|   101k|  }
   97|       |
   98|   208k|  memcpy(rem, rem_temp, 8 * sizeof(WORD32));
   99|   208k|  return;
  100|   208k|}
ixheaacd_avq_dec.c:ixheaacd_gosset_decode_base_index:
  245|  3.03M|                                              WORD32 *ya) {
  246|  3.03M|  WORD32 i, im, t, sign_code, idx = 0, ks, rank;
  247|       |
  248|  3.03M|  if (n < 2) {
  ------------------
  |  Branch (248:7): [True: 1.56M, False: 1.46M]
  ------------------
  249|  14.1M|    for (i = 0; i < 8; i++) ya[i] = 0;
  ------------------
  |  Branch (249:17): [True: 12.5M, False: 1.56M]
  ------------------
  250|  1.56M|  } else {
  251|  1.46M|    switch (n) {
  ------------------
  |  Branch (251:13): [True: 1.46M, False: 0]
  ------------------
  252|   620k|      case 2:
  ------------------
  |  Branch (252:7): [True: 620k, False: 844k]
  ------------------
  253|  1.25M|      case 3:
  ------------------
  |  Branch (253:7): [True: 631k, False: 833k]
  ------------------
  254|  1.25M|        i = ixheaacd_get_abs_leader_tbl(ixheaacd_cardinality_offset_table_i3,
  255|  1.25M|                                        code_book_ind, LEN_I3);
  ------------------
  |  |   25|  1.25M|#define LEN_I3 9
  ------------------
  256|  1.25M|        idx = ixheaacd_pos_abs_leaders_a3[i];
  257|  1.25M|        break;
  258|   213k|      case 4:
  ------------------
  |  Branch (258:7): [True: 213k, False: 1.25M]
  ------------------
  259|   213k|        i = ixheaacd_get_abs_leader_tbl(ixheaacd_cardinality_offset_tab_i4,
  260|   213k|                                        code_book_ind, LEN_I4);
  ------------------
  |  |   26|   213k|#define LEN_I4 28
  ------------------
  261|   213k|        idx = ixheaacd_pos_abs_leaders_a4[i];
  262|   213k|        break;
  263|  1.46M|    }
  264|       |
  265|  13.1M|    for (i = 0; i < 8; i++) ya[i] = ixheaacd_absolute_leader_tab_da[idx][i];
  ------------------
  |  Branch (265:17): [True: 11.7M, False: 1.46M]
  ------------------
  266|       |
  267|  1.46M|    t = ixheaacd_iso_code_index_table[idx];
  268|  1.46M|    im = ixheaacd_iso_code_num_table[idx];
  269|  1.46M|    ks = ixheaacd_get_abs_leader_tbl(ixheaacd_signed_leader_is + t,
  270|  1.46M|                                     code_book_ind, im);
  271|       |
  272|  1.46M|    sign_code = 2 * ixheaacd_iso_code_data_table[t + ks];
  273|  13.1M|    for (i = 7; i >= 0; i--) {
  ------------------
  |  Branch (273:17): [True: 11.7M, False: 1.46M]
  ------------------
  274|  11.7M|      ya[i] *= (1 - (sign_code & 2));
  275|  11.7M|      sign_code >>= 1;
  276|  11.7M|    }
  277|       |
  278|  1.46M|    rank = code_book_ind - ixheaacd_signed_leader_is[t + ks];
  279|       |
  280|  1.46M|    ixheaacd_gosset_rank_of_permutation(rank, ya);
  281|  1.46M|  }
  282|  3.03M|  return;
  283|  3.03M|}
ixheaacd_avq_dec.c:ixheaacd_get_abs_leader_tbl:
  229|  2.93M|                                          UWORD32 code_book_ind, WORD32 size) {
  230|  2.93M|  WORD32 i;
  231|       |
  232|  3.81M|  for (i = 4; i < size; i += 4) {
  ------------------
  |  Branch (232:15): [True: 3.42M, False: 395k]
  ------------------
  233|  3.42M|    if (code_book_ind < table[i]) break;
  ------------------
  |  Branch (233:9): [True: 2.53M, False: 889k]
  ------------------
  234|  3.42M|  }
  235|  2.93M|  if (i > size) i = size;
  ------------------
  |  Branch (235:7): [True: 329k, False: 2.60M]
  ------------------
  236|       |
  237|  2.93M|  if (code_book_ind < table[i - 2]) i -= 2;
  ------------------
  |  Branch (237:7): [True: 2.03M, False: 895k]
  ------------------
  238|  2.93M|  if (code_book_ind < table[i - 1]) i--;
  ------------------
  |  Branch (238:7): [True: 1.40M, False: 1.52M]
  ------------------
  239|  2.93M|  i--;
  240|       |
  241|  2.93M|  return (i);
  242|  2.93M|}
ixheaacd_avq_dec.c:ixheaacd_gosset_rank_of_permutation:
  187|  1.46M|static VOID ixheaacd_gosset_rank_of_permutation(WORD32 rank, WORD32 *xs) {
  188|  1.46M|  WORD32 i, j, a[8], w[8], base, fac, fac_b, target;
  189|       |
  190|  1.46M|  j = 0;
  191|  1.46M|  w[j] = 1;
  192|  1.46M|  a[j] = xs[0];
  193|  1.46M|  base = 1;
  194|  11.7M|  for (i = 1; i < 8; i++) {
  ------------------
  |  Branch (194:15): [True: 10.2M, False: 1.46M]
  ------------------
  195|  10.2M|    if (xs[i] != xs[i - 1]) {
  ------------------
  |  Branch (195:9): [True: 2.50M, False: 7.75M]
  ------------------
  196|  2.50M|      j++;
  197|  2.50M|      w[j] = 1;
  198|  2.50M|      a[j] = xs[i];
  199|  7.75M|    } else {
  200|  7.75M|      w[j]++;
  201|  7.75M|      base *= w[j];
  202|  7.75M|    }
  203|  10.2M|  }
  204|       |
  205|  1.46M|  if (w[0] == 8) {
  ------------------
  |  Branch (205:7): [True: 44.9k, False: 1.42M]
  ------------------
  206|   404k|    for (i = 0; i < 8; i++) xs[i] = a[0];
  ------------------
  |  Branch (206:17): [True: 359k, False: 44.9k]
  ------------------
  207|  1.42M|  } else {
  208|  1.42M|    target = rank * base;
  209|  1.42M|    fac_b = 1;
  210|       |
  211|  12.7M|    for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (211:17): [True: 11.3M, False: 1.42M]
  ------------------
  212|  11.3M|      fac = fac_b * ixheaacd_factorial_7[i];
  213|  11.3M|      j = -1;
  214|  24.1M|      do {
  215|  24.1M|        target -= w[++j] * fac;
  216|  24.1M|      } while (target >= 0);
  ------------------
  |  Branch (216:16): [True: 12.8M, False: 11.3M]
  ------------------
  217|  11.3M|      xs[i] = a[j];
  218|       |
  219|  11.3M|      target += w[j] * fac;
  220|  11.3M|      fac_b *= w[j];
  221|  11.3M|      w[j]--;
  222|  11.3M|    }
  223|  1.42M|  }
  224|       |
  225|  1.46M|  return;
  226|  1.46M|}

ixheaacd_fix_mant_exp_add:
   37|   734k|                               WORD16 *ptr_result_exp) {
   38|   734k|  WORD32 new_mant;
   39|   734k|  WORD32 new_exp;
   40|   734k|  new_exp = op1_exp - op2_exp;
   41|   734k|  if (new_exp < 0) {
  ------------------
  |  Branch (41:7): [True: 401k, False: 333k]
  ------------------
   42|   401k|    if (new_exp < -31) {
  ------------------
  |  Branch (42:9): [True: 9.27k, False: 391k]
  ------------------
   43|  9.27k|      new_exp = -31;
   44|  9.27k|    }
   45|   401k|    op1_mant = op1_mant >> (-new_exp);
   46|   401k|    new_exp = op2_exp;
   47|   401k|  } else {
   48|   333k|    if (new_exp > 31) {
  ------------------
  |  Branch (48:9): [True: 61.4k, False: 272k]
  ------------------
   49|  61.4k|      new_exp = 31;
   50|  61.4k|    }
   51|   333k|    op2_mant = op2_mant >> new_exp;
   52|   333k|    new_exp = op1_exp;
   53|   333k|  }
   54|       |
   55|   734k|  new_mant = op1_mant + op2_mant;
   56|       |
   57|   734k|  if (ixheaac_abs32(new_mant) >= 0x8000) {
  ------------------
  |  Branch (57:7): [True: 6.76k, False: 728k]
  ------------------
   58|  6.76k|    new_mant = new_mant >> 1;
   59|  6.76k|    new_exp++;
   60|  6.76k|  }
   61|       |
   62|   734k|  *ptr_result_mant = new_mant;
   63|   734k|  *ptr_result_exp = (WORD16)(new_exp);
   64|   734k|}
ixheaacd_fix_mant_div:
   70|  4.14M|{
   71|  4.14M|  WORD32 pre_shift_val, post_shift_val;
   72|  4.14M|  WORD32 index;
   73|  4.14M|  WORD16 one_by_op2_mant;
   74|       |
   75|  4.14M|  pre_shift_val = ixheaac_norm32(op2_mant) - 16;
   76|       |
   77|  4.14M|  index = (op2_mant << pre_shift_val) >> (SHORT_BITS - 3 - 8);
  ------------------
  |  |   23|  4.14M|#define SHORT_BITS 16
  ------------------
   78|       |
   79|  4.14M|  index &= (1 << (8 + 1)) - 1;
   80|       |
   81|  4.14M|  if (index == 0) {
  ------------------
  |  Branch (81:7): [True: 1.39M, False: 2.74M]
  ------------------
   82|  1.39M|    post_shift_val = ixheaac_norm32(op1_mant) - 16;
   83|       |
   84|  1.39M|    *ptr_result_mant = (op1_mant << post_shift_val);
   85|  2.74M|  } else {
   86|  2.74M|    WORD32 ratio_m;
   87|       |
   88|  2.74M|    index = ((index - 1) >> 1);
   89|       |
   90|  2.74M|    one_by_op2_mant = pstr_common_tables->inv_table[index];
   91|       |
   92|  2.74M|    ratio_m = ixheaac_mult16x16in32(one_by_op2_mant, op1_mant);
   93|       |
   94|  2.74M|    post_shift_val = ixheaac_norm32(ratio_m) - 1;
   95|       |
   96|  2.74M|    *ptr_result_mant = (WORD16)((ratio_m << post_shift_val) >> 15);
   97|  2.74M|  }
   98|  4.14M|  return (pre_shift_val - post_shift_val);
   99|  4.14M|}
ixheaacd_fix_mant_exp_sqrt:
  101|  4.07M|VOID ixheaacd_fix_mant_exp_sqrt(WORD16 *ptr_in_out, WORD16 *sqrt_table) {
  102|  4.07M|  WORD32 index;
  103|  4.07M|  WORD32 pre_shift_val;
  104|  4.07M|  WORD32 op_mant = *ptr_in_out;
  105|  4.07M|  WORD32 op_exp = *(ptr_in_out + 1);
  106|  4.07M|  WORD32 result_m;
  107|  4.07M|  WORD32 result_e;
  108|       |
  109|  4.07M|  if (op_mant > 0) {
  ------------------
  |  Branch (109:7): [True: 2.73M, False: 1.34M]
  ------------------
  110|  2.73M|    pre_shift_val = (ixheaac_norm32((WORD16)op_mant) - 16);
  111|  2.73M|    op_exp = (op_exp - pre_shift_val);
  112|  2.73M|    index = (op_mant << pre_shift_val) >> (SHORT_BITS - 3 - 8);
  ------------------
  |  |   23|  2.73M|#define SHORT_BITS 16
  ------------------
  113|  2.73M|    index &= (1 << (8 + 1)) - 1;
  114|  2.73M|    result_m = sqrt_table[index >> 1];
  115|  2.73M|    if ((op_exp & 1) != 0) {
  ------------------
  |  Branch (115:9): [True: 1.38M, False: 1.34M]
  ------------------
  116|  1.38M|      result_m = (result_m * 0x5a82) >> 16;
  117|  1.38M|      op_exp += 3;
  118|  1.38M|    }
  119|  2.73M|    result_e = (op_exp >> 1);
  120|       |
  121|  2.73M|  } else {
  122|  1.34M|    result_m = 0;
  123|  1.34M|    result_e = -SHORT_BITS;
  ------------------
  |  |   23|  1.34M|#define SHORT_BITS 16
  ------------------
  124|  1.34M|  }
  125|       |
  126|  4.07M|  *ptr_in_out++ = (WORD16)result_m;
  127|  4.07M|  *ptr_in_out = (WORD16)result_e;
  128|  4.07M|}
ixheaacd_fix_div_dec:
  130|   750k|WORD32 ixheaacd_fix_div_dec(WORD32 op1, WORD32 op2) {
  131|   750k|  WORD32 quotient = 0;
  132|   750k|  UWORD32 abs_num, abs_den;
  133|   750k|  WORD32 k;
  134|   750k|  WORD32 sign;
  135|       |
  136|   750k|  abs_num = ixheaac_abs32(op1 >> 1);
  137|   750k|  abs_den = ixheaac_abs32(op2 >> 1);
  138|   750k|  sign = op1 ^ op2;
  139|       |
  140|   750k|  if (abs_num != 0) {
  ------------------
  |  Branch (140:7): [True: 750k, False: 0]
  ------------------
  141|  12.0M|    for (k = 15; k > 0; k--) {
  ------------------
  |  Branch (141:18): [True: 11.2M, False: 750k]
  ------------------
  142|  11.2M|      quotient = (quotient << 1);
  143|  11.2M|      abs_num = (abs_num << 1);
  144|  11.2M|      if (abs_num >= abs_den) {
  ------------------
  |  Branch (144:11): [True: 5.92M, False: 5.33M]
  ------------------
  145|  5.92M|        abs_num -= abs_den;
  146|  5.92M|        quotient++;
  147|  5.92M|      }
  148|  11.2M|    }
  149|   750k|  }
  150|   750k|  if (sign < 0) quotient = -(quotient);
  ------------------
  |  Branch (150:7): [True: 7.63k, False: 743k]
  ------------------
  151|       |
  152|   750k|  return quotient;
  153|   750k|}
ixheaacd_sqrt:
  183|   544k|WORD32 ixheaacd_sqrt(WORD32 op) {
  184|   544k|  WORD32 result = 0;
  185|   544k|  WORD16 shift;
  186|       |
  187|   544k|  if (op != 0) {
  ------------------
  |  Branch (187:7): [True: 544k, False: 0]
  ------------------
  188|   544k|    shift = (WORD16)(ixheaac_norm32(op) & ~1);
  189|   544k|    op = ixheaac_shl32_dir_sat_limit(op, shift);
  190|   544k|    shift = ixheaac_shr32_dir_sat_limit(shift, 1);
  191|   544k|    op = ixheaac_mult32_shl_sat(ixheaacd_one_by_sqrt_calc(op), op);
  192|   544k|    result = ixheaac_shr32_dir_sat_limit(op, ixheaac_sat16(shift - 1));
  193|   544k|  }
  194|       |
  195|   544k|  return result;
  196|   544k|}
ixheaacd_basic_funcs.c:ixheaacd_one_by_sqrt_calc:
  157|   544k|static PLATFORM_INLINE WORD32 ixheaacd_one_by_sqrt_calc(WORD32 op) {
  158|   544k|  WORD32 a = ixheaac_add32_sat(0x900ebee0,
  159|   544k|                                ixheaac_mult32x16in32_shl_sat(op, 0x39d9));
  160|   544k|  WORD32 iy =
  161|   544k|      ixheaac_add32_sat(0x573b645a, ixheaac_mult32x16h_in32_shl_sat(op, a));
  162|       |
  163|   544k|  iy = ixheaac_shl32_dir_sat_limit(iy, 1);
  164|       |
  165|   544k|  a = ixheaac_mult32_shl_sat(op, iy);
  166|   544k|  a = ixheaac_sub32_sat(ONE_IN_Q30, ixheaac_shl32_dir_sat_limit(
  ------------------
  |  |  155|   544k|#define ONE_IN_Q30 0x40000000
  ------------------
  167|   544k|                                         ixheaac_mult32_shl_sat(a, iy), 1));
  168|   544k|  iy = ixheaac_add32_sat(iy, ixheaac_mult32_shl_sat(a, iy));
  169|       |
  170|   544k|  a = ixheaac_mult32_shl_sat(op, iy);
  171|   544k|  a = ixheaac_sub32_sat(ONE_IN_Q30, ixheaac_shl32_dir_sat_limit(
  ------------------
  |  |  155|   544k|#define ONE_IN_Q30 0x40000000
  ------------------
  172|   544k|                                         ixheaac_mult32_shl_sat(a, iy), 1));
  173|   544k|  iy = ixheaac_add32_sat(iy, ixheaac_mult32_shl_sat(a, iy));
  174|       |
  175|   544k|  a = ixheaac_mult32_shl_sat(op, iy);
  176|   544k|  a = ixheaac_sub32_sat(ONE_IN_Q30, ixheaac_shl32_dir_sat_limit(
  ------------------
  |  |  155|   544k|#define ONE_IN_Q30 0x40000000
  ------------------
  177|   544k|                                         ixheaac_mult32_shl_sat(a, iy), 1));
  178|   544k|  iy = ixheaac_add32_sat(iy, ixheaac_mult32_shl_sat(a, iy));
  179|       |
  180|   544k|  return iy;
  181|   544k|}

ixheaacd_memset:
   38|   213k|VOID ixheaacd_memset(FLOAT32 *x, WORD32 n) {
   39|   213k|  memset(x, 0, n * sizeof(FLOAT32));
   40|   213k|  return;
   41|   213k|}
ixheaacd_mem_cpy:
   43|  1.87M|VOID ixheaacd_mem_cpy(const FLOAT32 x[], FLOAT32 y[], WORD32 n) {
   44|  1.87M|  memcpy(y, x, n * sizeof(FLOAT32));
   45|  1.87M|  return;
   46|  1.87M|}
ixheaacd_vec_cnst_mul:
   48|   223k|VOID ixheaacd_vec_cnst_mul(FLOAT32 a, FLOAT32 x[], FLOAT32 z[], WORD32 n) {
   49|   223k|  WORD32 i;
   50|  70.6M|  for (i = 0; i < n; i++) {
  ------------------
  |  Branch (50:15): [True: 70.3M, False: 223k]
  ------------------
   51|  70.3M|    z[i] = (FLOAT32)a * x[i];
   52|  70.3M|  }
   53|   223k|  return;
   54|   223k|}
ixheaacd_combine_fac:
   57|  28.4k|                          WORD8 output_q, WORD8 fac_q) {
   58|  28.4k|  WORD32 i;
   59|  28.4k|  if (fac_q > output_q) {
  ------------------
  |  Branch (59:7): [True: 6.65k, False: 21.7k]
  ------------------
   60|  1.51M|    for (i = 0; i < len; i++) {
  ------------------
  |  Branch (60:17): [True: 1.50M, False: 6.65k]
  ------------------
   61|  1.50M|      *dest = ixheaac_add32_sat(*src1, ((*src2) >> (fac_q - output_q)));
   62|  1.50M|      dest++;
   63|  1.50M|      src1++;
   64|  1.50M|      src2++;
   65|  1.50M|    }
   66|  21.7k|  } else {
   67|  5.19M|    for (i = 0; i < len; i++) {
  ------------------
  |  Branch (67:17): [True: 5.17M, False: 21.7k]
  ------------------
   68|  5.17M|      *dest = ixheaac_add32_sat(
   69|  5.17M|          *src1, ixheaac_shl32_sat((*src2), (output_q - fac_q)));
   70|  5.17M|      dest++;
   71|  5.17M|      src1++;
   72|  5.17M|      src2++;
   73|  5.17M|    }
   74|  21.7k|  }
   75|  28.4k|}
ixheaacd_windowing_long1:
   80|   106k|                               WORD8 shift2) {
   81|   106k|  WORD32 i;
   82|   106k|  WORD32 *rsrc2 = src2 + vlen - 1;
   83|       |
   84|   106k|  if (shift1 > shift2) {
  ------------------
  |  Branch (84:7): [True: 104k, False: 2.80k]
  ------------------
   85|  51.9M|    for (i = 0; i < vlen / 2; i++) {
  ------------------
  |  Branch (85:17): [True: 51.8M, False: 104k]
  ------------------
   86|  51.8M|      *dest = ixheaac_add32_sat(
   87|  51.8M|          ((ixheaacd_mult32_sh1(*src1, *win_fwd)) >> (shift1 - shift2)),
   88|  51.8M|          ixheaacd_mult32_sh1(*src2, *win_rev));
   89|  51.8M|      *(dest + (vlen - (2 * i)) - 1) = ixheaac_add32_sat(
   90|  51.8M|          ((ixheaacd_mult32_sh1(ixheaac_negate32_sat(*src1), *win_rev)) >>
   91|  51.8M|           (shift1 - shift2)),
   92|  51.8M|          ixheaacd_mult32_sh1(*rsrc2, *win_fwd));
   93|       |
   94|  51.8M|      src1++;
   95|  51.8M|      src2++;
   96|  51.8M|      win_fwd++;
   97|  51.8M|      win_rev--;
   98|  51.8M|      rsrc2--;
   99|  51.8M|      dest++;
  100|  51.8M|    }
  101|   104k|    return (shift2);
  102|   104k|  } else {
  103|  1.41M|    for (i = 0; i < vlen / 2; i++) {
  ------------------
  |  Branch (103:17): [True: 1.41M, False: 2.80k]
  ------------------
  104|  1.41M|      *dest = ixheaac_add32_sat(
  105|  1.41M|          ixheaacd_mult32_sh1(*src1, *win_fwd),
  106|  1.41M|          ((ixheaacd_mult32_sh1(*src2, *win_rev)) >> (shift2 - shift1)));
  107|       |
  108|  1.41M|      *(dest + (vlen - (2 * i)) - 1) = ixheaac_add32_sat(
  109|  1.41M|          ixheaacd_mult32_sh1(ixheaac_negate32_sat(*src1), *win_rev),
  110|  1.41M|          ((ixheaacd_mult32_sh1(*rsrc2, *win_fwd)) >> (shift2 - shift1)));
  111|  1.41M|      src1++;
  112|  1.41M|      src2++;
  113|  1.41M|      win_fwd++;
  114|  1.41M|      win_rev--;
  115|  1.41M|      rsrc2--;
  116|  1.41M|      dest++;
  117|  1.41M|    }
  118|  2.80k|    return (shift1);
  119|  2.80k|  }
  120|   106k|}
ixheaacd_windowing_long2:
  126|  25.4k|                               WORD8 shiftp, WORD8 shift_olap, WORD8 fac_q) {
  127|  25.4k|  WORD32 i;
  128|  25.4k|  WORD32 *dest = p_out_buffer;
  129|       |
  130|  25.4k|  win_fwd += ixheaacd_drc_offset->lfac;
  131|       |
  132|  25.4k|  if (shiftp > fac_q) {
  ------------------
  |  Branch (132:7): [True: 16.0k, False: 9.41k]
  ------------------
  133|  16.0k|    if (shift_olap > fac_q) {
  ------------------
  |  Branch (133:9): [True: 3.98k, False: 12.0k]
  ------------------
  134|  3.98k|      for (i = 0;
  135|  2.13M|           i < ixheaacd_drc_offset->n_flat_ls + ixheaacd_drc_offset->lfac;
  ------------------
  |  Branch (135:12): [True: 2.13M, False: 3.98k]
  ------------------
  136|  2.13M|           i++) {
  137|  2.13M|        dest[i] = over_lap[i] >> (shift_olap - fac_q);
  138|  2.13M|      }
  139|       |
  140|  3.98k|      for (i = ixheaacd_drc_offset->n_flat_ls + ixheaacd_drc_offset->lfac;
  141|   298k|           i < ixheaacd_drc_offset->n_flat_ls + ixheaacd_drc_offset->n_trans_ls;
  ------------------
  |  Branch (141:12): [True: 294k, False: 3.98k]
  ------------------
  142|   294k|           i++) {
  143|   294k|        dest[i] = ixheaac_add32_sat(
  144|   294k|            (ixheaacd_mult32_sh1(
  145|   294k|                 ixheaac_negate32_sat(src1[ixheaacd_drc_offset->n_long / 2 +
  146|   294k|                                            ixheaacd_drc_offset->n_flat_ls +
  147|   294k|                                            ixheaacd_drc_offset->lfac - i - 1]),
  148|   294k|                 *win_fwd) >>
  149|   294k|             (shiftp - fac_q)),
  150|   294k|            (*fac_data_out));
  151|   294k|        win_fwd++;
  152|   294k|        fac_data_out++;
  153|   294k|      }
  154|       |
  155|  3.98k|      for (;
  156|   721k|           i < ixheaacd_drc_offset->n_flat_ls + (ixheaacd_drc_offset->lfac * 3);
  ------------------
  |  Branch (156:12): [True: 718k, False: 3.98k]
  ------------------
  157|   718k|           i++) {
  158|   718k|        dest[i] = ixheaac_add32_sat(
  159|   718k|            (ixheaac_negate32_sat(src1[ixheaacd_drc_offset->n_long / 2 +
  160|   718k|                                        ixheaacd_drc_offset->n_flat_ls +
  161|   718k|                                        ixheaacd_drc_offset->lfac - i - 1]) >>
  162|   718k|             (shiftp - fac_q)),
  163|   718k|            (*fac_data_out));
  164|   718k|        fac_data_out++;
  165|   718k|      }
  166|       |
  167|   911k|      for (; i < ixheaacd_drc_offset->n_long; i++) {
  ------------------
  |  Branch (167:14): [True: 907k, False: 3.98k]
  ------------------
  168|   907k|        dest[i] =
  169|   907k|            ixheaac_negate32_sat(src1[ixheaacd_drc_offset->n_long / 2 +
  170|   907k|                                       ixheaacd_drc_offset->n_flat_ls +
  171|   907k|                                       ixheaacd_drc_offset->lfac - i - 1]) >>
  172|   907k|            (shiftp - fac_q);
  173|   907k|      }
  174|  3.98k|      return (fac_q);
  175|  12.0k|    } else {
  176|  12.0k|      memcpy(dest, over_lap, sizeof(WORD32) * (ixheaacd_drc_offset->n_flat_ls +
  177|  12.0k|                                               ixheaacd_drc_offset->lfac));
  178|       |
  179|  12.0k|      for (i = ixheaacd_drc_offset->n_flat_ls + ixheaacd_drc_offset->lfac;
  180|   129k|           i < ixheaacd_drc_offset->n_flat_ls + ixheaacd_drc_offset->n_trans_ls;
  ------------------
  |  Branch (180:12): [True: 117k, False: 12.0k]
  ------------------
  181|   117k|           i++) {
  182|   117k|        dest[i] = ixheaac_add32_sat(
  183|   117k|            (ixheaacd_mult32_sh1(
  184|   117k|                 ixheaac_negate32_sat(src1[ixheaacd_drc_offset->n_long / 2 +
  185|   117k|                                            ixheaacd_drc_offset->n_flat_ls +
  186|   117k|                                            ixheaacd_drc_offset->lfac - i - 1]),
  187|   117k|                 *win_fwd) >>
  188|   117k|             (shiftp - shift_olap)),
  189|   117k|            (*fac_data_out) >> (fac_q - shift_olap));
  190|   117k|        win_fwd++;
  191|   117k|        fac_data_out++;
  192|   117k|      }
  193|       |
  194|  12.0k|      for (;
  195|  2.98M|           i < ixheaacd_drc_offset->n_flat_ls + (ixheaacd_drc_offset->lfac * 3);
  ------------------
  |  Branch (195:12): [True: 2.97M, False: 12.0k]
  ------------------
  196|  2.97M|           i++) {
  197|  2.97M|        dest[i] = ixheaac_add32_sat(
  198|  2.97M|            (ixheaac_negate32_sat(src1[ixheaacd_drc_offset->n_long / 2 +
  199|  2.97M|                                        ixheaacd_drc_offset->n_flat_ls +
  200|  2.97M|                                        ixheaacd_drc_offset->lfac - i - 1]) >>
  201|  2.97M|             (shiftp - shift_olap)),
  202|  2.97M|            (*fac_data_out) >> (fac_q - shift_olap));
  203|  2.97M|        fac_data_out++;
  204|  2.97M|      }
  205|       |
  206|  2.38M|      for (; i < ixheaacd_drc_offset->n_long; i++) {
  ------------------
  |  Branch (206:14): [True: 2.37M, False: 12.0k]
  ------------------
  207|  2.37M|        dest[i] =
  208|  2.37M|            ixheaac_negate32_sat(src1[ixheaacd_drc_offset->n_long / 2 +
  209|  2.37M|                                       ixheaacd_drc_offset->n_flat_ls +
  210|  2.37M|                                       ixheaacd_drc_offset->lfac - i - 1]) >>
  211|  2.37M|            (shiftp - shift_olap);
  212|  2.37M|      }
  213|  12.0k|      return (shift_olap);
  214|  12.0k|    }
  215|  16.0k|  } else {
  216|  9.41k|    if (shift_olap > shiftp) {
  ------------------
  |  Branch (216:9): [True: 5.94k, False: 3.46k]
  ------------------
  217|  5.94k|      for (i = 0;
  218|  3.40M|           i < ixheaacd_drc_offset->n_flat_ls + ixheaacd_drc_offset->lfac;
  ------------------
  |  Branch (218:12): [True: 3.40M, False: 5.94k]
  ------------------
  219|  3.40M|           i++) {
  220|  3.40M|        dest[i] = over_lap[i] >> (shift_olap - shiftp);
  221|  3.40M|      }
  222|       |
  223|  5.94k|      for (i = ixheaacd_drc_offset->n_flat_ls + ixheaacd_drc_offset->lfac;
  224|  45.0k|           i < ixheaacd_drc_offset->n_flat_ls + ixheaacd_drc_offset->n_trans_ls;
  ------------------
  |  Branch (224:12): [True: 39.1k, False: 5.94k]
  ------------------
  225|  39.1k|           i++) {
  226|  39.1k|        dest[i] = ixheaac_add32_sat(
  227|  39.1k|            ixheaacd_mult32_sh1(
  228|  39.1k|                ixheaac_negate32_sat(src1[ixheaacd_drc_offset->n_long / 2 +
  229|  39.1k|                                           ixheaacd_drc_offset->n_flat_ls +
  230|  39.1k|                                           ixheaacd_drc_offset->lfac - i - 1]),
  231|  39.1k|                *win_fwd),
  232|  39.1k|            (*fac_data_out) >> (fac_q - shiftp));
  233|  39.1k|        win_fwd++;
  234|  39.1k|        fac_data_out++;
  235|  39.1k|      }
  236|       |
  237|  5.94k|      for (;
  238|  1.48M|           i < ixheaacd_drc_offset->n_flat_ls + (ixheaacd_drc_offset->lfac * 3);
  ------------------
  |  Branch (238:12): [True: 1.48M, False: 5.94k]
  ------------------
  239|  1.48M|           i++) {
  240|  1.48M|        dest[i] = ixheaac_add32_sat(
  241|  1.48M|            ixheaac_negate32_sat(src1[ixheaacd_drc_offset->n_long / 2 +
  242|  1.48M|                                       ixheaacd_drc_offset->n_flat_ls +
  243|  1.48M|                                       ixheaacd_drc_offset->lfac - i - 1]),
  244|  1.48M|            (*fac_data_out) >> (fac_q - shiftp));
  245|  1.48M|        fac_data_out++;
  246|  1.48M|      }
  247|       |
  248|  1.16M|      for (; i < ixheaacd_drc_offset->n_long; i++) {
  ------------------
  |  Branch (248:14): [True: 1.15M, False: 5.94k]
  ------------------
  249|  1.15M|        dest[i] =
  250|  1.15M|            ixheaac_negate32_sat(src1[ixheaacd_drc_offset->n_long / 2 +
  251|  1.15M|                                       ixheaacd_drc_offset->n_flat_ls +
  252|  1.15M|                                       ixheaacd_drc_offset->lfac - i - 1]);
  253|  1.15M|      }
  254|  5.94k|      return (shiftp);
  255|  5.94k|    } else {
  256|  3.46k|      memcpy(dest, over_lap, sizeof(WORD32) * (ixheaacd_drc_offset->n_flat_ls +
  257|  3.46k|                                               ixheaacd_drc_offset->lfac));
  258|       |
  259|  3.46k|      for (i = ixheaacd_drc_offset->n_flat_ls + ixheaacd_drc_offset->lfac;
  260|  9.86k|           i < ixheaacd_drc_offset->n_flat_ls + ixheaacd_drc_offset->n_trans_ls;
  ------------------
  |  Branch (260:12): [True: 6.40k, False: 3.46k]
  ------------------
  261|  6.40k|           i++) {
  262|  6.40k|        dest[i] = ixheaac_add32_sat(
  263|  6.40k|            (ixheaacd_mult32_sh1(
  264|  6.40k|                 ixheaac_negate32_sat(src1[ixheaacd_drc_offset->n_long / 2 +
  265|  6.40k|                                            ixheaacd_drc_offset->n_flat_ls +
  266|  6.40k|                                            ixheaacd_drc_offset->lfac - i - 1]),
  267|  6.40k|                 *win_fwd) >>
  268|  6.40k|             (shiftp - shift_olap)),
  269|  6.40k|            (*fac_data_out) >> (fac_q - shift_olap));
  270|  6.40k|        win_fwd++;
  271|  6.40k|        fac_data_out++;
  272|  6.40k|      }
  273|       |
  274|  3.46k|      for (;
  275|   883k|           i < ixheaacd_drc_offset->n_flat_ls + (ixheaacd_drc_offset->lfac * 3);
  ------------------
  |  Branch (275:12): [True: 880k, False: 3.46k]
  ------------------
  276|   880k|           i++) {
  277|   880k|        dest[i] = ixheaac_add32_sat(
  278|   880k|            (ixheaac_negate32_sat(src1[ixheaacd_drc_offset->n_long / 2 +
  279|   880k|                                        ixheaacd_drc_offset->n_flat_ls +
  280|   880k|                                        ixheaacd_drc_offset->lfac - i - 1]) >>
  281|   880k|             (shiftp - shift_olap)),
  282|   880k|            (*fac_data_out) >> (fac_q - shift_olap));
  283|   880k|        fac_data_out++;
  284|   880k|      }
  285|       |
  286|   671k|      for (; i < ixheaacd_drc_offset->n_long; i++) {
  ------------------
  |  Branch (286:14): [True: 668k, False: 3.46k]
  ------------------
  287|   668k|        dest[i] =
  288|   668k|            ixheaac_negate32_sat(src1[ixheaacd_drc_offset->n_long / 2 +
  289|   668k|                                       ixheaacd_drc_offset->n_flat_ls +
  290|   668k|                                       ixheaacd_drc_offset->lfac - i - 1]) >>
  291|   668k|            (shiftp - shift_olap);
  292|   668k|      }
  293|  3.46k|      return (shift_olap);
  294|  3.46k|    }
  295|  9.41k|  }
  296|  25.4k|}
ixheaacd_windowing_long3:
  302|  26.0k|                               WORD8 shiftp, WORD8 shift_olap) {
  303|  26.0k|  WORD32 i;
  304|  26.0k|  WORD32 *dest = p_out_buffer;
  305|       |
  306|  26.0k|  if (shiftp > shift_olap) {
  ------------------
  |  Branch (306:7): [True: 17.2k, False: 8.79k]
  ------------------
  307|  17.2k|    memcpy(dest, over_lap, sizeof(FLOAT32) * ixheaacd_drc_offset->n_flat_ls);
  308|       |
  309|  17.2k|    for (i = ixheaacd_drc_offset->n_flat_ls;
  310|  1.29M|         i < ixheaacd_drc_offset->n_long / 2; i++) {
  ------------------
  |  Branch (310:10): [True: 1.27M, False: 17.2k]
  ------------------
  311|  1.27M|      dest[i] = ixheaac_add32_sat(
  312|  1.27M|          (ixheaacd_mult32_sh1(src1[i], *win_fwd) >> (shiftp - shift_olap)),
  313|  1.27M|          ixheaacd_mult32_sh1(over_lap[i], *win_rev));
  314|  1.27M|      win_fwd++;
  315|  1.27M|      win_rev--;
  316|  1.27M|    }
  317|       |
  318|  17.2k|    for (i = ixheaacd_drc_offset->n_long / 2;
  319|  1.29M|         i < ixheaacd_drc_offset->n_flat_ls + ixheaacd_drc_offset->n_trans_ls;
  ------------------
  |  Branch (319:10): [True: 1.27M, False: 17.2k]
  ------------------
  320|  1.27M|         i++) {
  321|  1.27M|      dest[i] = ixheaac_add32_sat(
  322|  1.27M|          (ixheaacd_mult32_sh1(
  323|  1.27M|               ixheaac_negate32_sat(src1[ixheaacd_drc_offset->n_long - i - 1]),
  324|  1.27M|               *win_fwd) >>
  325|  1.27M|           (shiftp - shift_olap)),
  326|  1.27M|          ixheaacd_mult32_sh1(over_lap[i], *win_rev));
  327|  1.27M|      win_fwd++;
  328|  1.27M|      win_rev--;
  329|  1.27M|    }
  330|       |
  331|  7.47M|    for (; i < ixheaacd_drc_offset->n_long; i++) {
  ------------------
  |  Branch (331:12): [True: 7.46M, False: 17.2k]
  ------------------
  332|  7.46M|      dest[i] =
  333|  7.46M|          ixheaac_negate32_sat(src1[ixheaacd_drc_offset->n_long - i - 1]) >>
  334|  7.46M|          (shiftp - shift_olap);
  335|  7.46M|    }
  336|       |
  337|  17.2k|    return (shift_olap);
  338|  17.2k|  } else {
  339|  3.82M|    for (i = 0; i < ixheaacd_drc_offset->n_flat_ls; i++) {
  ------------------
  |  Branch (339:17): [True: 3.82M, False: 8.79k]
  ------------------
  340|  3.82M|      dest[i] = over_lap[i] >> (shift_olap - shiftp);
  341|  3.82M|    }
  342|       |
  343|  8.79k|    for (i = ixheaacd_drc_offset->n_flat_ls;
  344|   636k|         i < ixheaacd_drc_offset->n_long / 2; i++) {
  ------------------
  |  Branch (344:10): [True: 627k, False: 8.79k]
  ------------------
  345|   627k|      dest[i] = ixheaac_add32_sat(
  346|   627k|          ixheaacd_mult32_sh1(src1[i], *win_fwd),
  347|   627k|          ixheaacd_mult32_sh1(over_lap[i], *win_rev) >> (shift_olap - shiftp));
  348|   627k|      win_fwd++;
  349|   627k|      win_rev--;
  350|   627k|    }
  351|       |
  352|  8.79k|    for (i = ixheaacd_drc_offset->n_long / 2;
  353|   636k|         i < ixheaacd_drc_offset->n_flat_ls + ixheaacd_drc_offset->n_trans_ls;
  ------------------
  |  Branch (353:10): [True: 627k, False: 8.79k]
  ------------------
  354|   627k|         i++) {
  355|   627k|      dest[i] = ixheaac_add32_sat(
  356|   627k|          ixheaacd_mult32_sh1(
  357|   627k|              ixheaac_negate32_sat(src1[ixheaacd_drc_offset->n_long - i - 1]),
  358|   627k|              *win_fwd),
  359|   627k|          ixheaacd_mult32_sh1(over_lap[i], *win_rev) >> (shift_olap - shiftp));
  360|   627k|      win_fwd++;
  361|   627k|      win_rev--;
  362|   627k|    }
  363|       |
  364|  3.82M|    for (; i < ixheaacd_drc_offset->n_long; i++) {
  ------------------
  |  Branch (364:12): [True: 3.82M, False: 8.79k]
  ------------------
  365|  3.82M|      dest[i] =
  366|  3.82M|          ixheaac_negate32_sat(src1[ixheaacd_drc_offset->n_long - i - 1]);
  367|  3.82M|    }
  368|       |
  369|  8.79k|    return (shiftp);
  370|  8.79k|  }
  371|  26.0k|}
ixheaacd_windowing_short1:
  375|  28.4k|                               WORD8 shiftp, WORD8 shift_olap) {
  376|  28.4k|  WORD32 i;
  377|  28.4k|  WORD32 *dest = fp;
  378|       |
  379|  28.4k|  if (shift_olap > shiftp) {
  ------------------
  |  Branch (379:7): [True: 13.7k, False: 14.6k]
  ------------------
  380|  13.7k|    if (ixheaacd_drc_offset->n_short > ixheaacd_drc_offset->lfac) {
  ------------------
  |  Branch (380:9): [True: 2.37k, False: 11.4k]
  ------------------
  381|   153k|      for (i = 0; i < ixheaacd_drc_offset->lfac; i++) {
  ------------------
  |  Branch (381:19): [True: 151k, False: 2.37k]
  ------------------
  382|   151k|        dest[i] = dest[i] >> (shift_olap - shiftp);
  383|   151k|      }
  384|   153k|      for (i = ixheaacd_drc_offset->lfac; i < ixheaacd_drc_offset->n_short;
  ------------------
  |  Branch (384:43): [True: 151k, False: 2.37k]
  ------------------
  385|   151k|           i++) {
  386|   151k|        dest[i] = ixheaacd_mult32_sh1(
  387|   151k|            ixheaac_negate32_sat(src1[ixheaacd_drc_offset->n_short - i - 1]),
  388|   151k|            src2[i]);
  389|   151k|      }
  390|       |
  391|   908k|      for (; i < ixheaacd_drc_offset->n_flat_ls + ixheaacd_drc_offset->lfac;
  ------------------
  |  Branch (391:14): [True: 906k, False: 2.37k]
  ------------------
  392|   906k|           i++) {
  393|   906k|        dest[i] = 0;
  394|   906k|      }
  395|  11.4k|    } else {
  396|  1.47M|      for (i = 0; i < ixheaacd_drc_offset->lfac; i++) {
  ------------------
  |  Branch (396:19): [True: 1.46M, False: 11.4k]
  ------------------
  397|  1.46M|        dest[i] = dest[i] >> (shift_olap - shiftp);
  398|  1.46M|      }
  399|  11.4k|      for (i = ixheaacd_drc_offset->lfac;
  400|  5.12M|           i < ixheaacd_drc_offset->n_flat_ls + ixheaacd_drc_offset->lfac;
  ------------------
  |  Branch (400:12): [True: 5.11M, False: 11.4k]
  ------------------
  401|  5.11M|           i++) {
  402|  5.11M|        dest[i] = 0;
  403|  5.11M|      }
  404|  11.4k|    }
  405|  14.6k|  } else {
  406|  14.6k|    if (ixheaacd_drc_offset->n_short > ixheaacd_drc_offset->lfac) {
  ------------------
  |  Branch (406:9): [True: 2.19k, False: 12.4k]
  ------------------
  407|   138k|      for (i = ixheaacd_drc_offset->lfac; i < ixheaacd_drc_offset->n_short;
  ------------------
  |  Branch (407:43): [True: 136k, False: 2.19k]
  ------------------
  408|   136k|           i++) {
  409|   136k|        dest[i] =
  410|   136k|            ixheaacd_mult32_sh1(ixheaac_negate32_sat(
  411|   136k|                                    src1[ixheaacd_drc_offset->n_short - i - 1]),
  412|   136k|                                src2[i]) >>
  413|   136k|            (shiftp - shift_olap);
  414|   136k|      }
  415|       |
  416|   822k|      for (; i < ixheaacd_drc_offset->n_flat_ls + ixheaacd_drc_offset->lfac;
  ------------------
  |  Branch (416:14): [True: 820k, False: 2.19k]
  ------------------
  417|   820k|           i++) {
  418|   820k|        dest[i] = 0;
  419|   820k|      }
  420|  12.4k|    } else {
  421|  12.4k|      for (i = ixheaacd_drc_offset->lfac;
  422|  5.58M|           i < ixheaacd_drc_offset->n_flat_ls + ixheaacd_drc_offset->lfac;
  ------------------
  |  Branch (422:12): [True: 5.57M, False: 12.4k]
  ------------------
  423|  5.57M|           i++) {
  424|  5.57M|        dest[i] = 0;
  425|  5.57M|      }
  426|  12.4k|    }
  427|  14.6k|  }
  428|  28.4k|}
ixheaacd_windowing_short2:
  432|  60.3k|                               WORD8 shiftp, WORD8 shift_olap) {
  433|  60.3k|  WORD32 i;
  434|       |
  435|  60.3k|  WORD32 *win_rev = win_fwd + ixheaacd_drc_offset->n_short - 1;
  436|       |
  437|  60.3k|  if (shift_olap > shiftp) {
  ------------------
  |  Branch (437:7): [True: 15.5k, False: 44.8k]
  ------------------
  438|  1.00M|    for (i = 0; i < ixheaacd_drc_offset->n_short / 2; i++) {
  ------------------
  |  Branch (438:17): [True: 990k, False: 15.5k]
  ------------------
  439|   990k|      fp[i] = ixheaac_add32_sat(
  440|   990k|          ixheaacd_mult32_sh1(src1[i], *win_fwd),
  441|   990k|          (ixheaacd_mult32_sh1(fp[i], *win_rev) >> (shift_olap - shiftp)));
  442|       |
  443|   990k|      fp[ixheaacd_drc_offset->n_short - i - 1] = ixheaac_add32_sat(
  444|   990k|          ixheaacd_mult32_sh1(ixheaac_negate32_sat(src1[i]), *win_rev),
  445|   990k|          (ixheaacd_mult32_sh1(fp[ixheaacd_drc_offset->n_short - i - 1],
  446|   990k|                               *win_fwd) >>
  447|   990k|           (shift_olap - shiftp)));
  448|   990k|      win_fwd++;
  449|   990k|      win_rev--;
  450|   990k|    }
  451|       |
  452|  15.5k|    for (i = ixheaacd_drc_offset->n_short;
  453|  6.94M|         i < ixheaacd_drc_offset->n_flat_ls + ixheaacd_drc_offset->n_short;
  ------------------
  |  Branch (453:10): [True: 6.93M, False: 15.5k]
  ------------------
  454|  6.93M|         i++) {
  455|  6.93M|      fp[i] = 0;
  456|  6.93M|    }
  457|  44.8k|  } else {
  458|  2.86M|    for (i = 0; i < ixheaacd_drc_offset->n_short / 2; i++) {
  ------------------
  |  Branch (458:17): [True: 2.82M, False: 44.8k]
  ------------------
  459|  2.82M|      fp[i] = ixheaac_add32_sat(
  460|  2.82M|          (ixheaacd_mult32_sh1(src1[i], *win_fwd) >> (shiftp - shift_olap)),
  461|  2.82M|          ixheaacd_mult32_sh1(fp[i], *win_rev));
  462|       |
  463|  2.82M|      fp[ixheaacd_drc_offset->n_short - i - 1] = ixheaac_add32_sat(
  464|  2.82M|          (ixheaacd_mult32_sh1(ixheaac_negate32_sat(src1[i]), *win_rev) >>
  465|  2.82M|           (shiftp - shift_olap)),
  466|  2.82M|          ixheaacd_mult32_sh1(fp[ixheaacd_drc_offset->n_short - i - 1],
  467|  2.82M|                              *win_fwd));
  468|       |
  469|  2.82M|      win_fwd++;
  470|  2.82M|      win_rev--;
  471|  2.82M|    }
  472|       |
  473|  44.8k|    for (i = ixheaacd_drc_offset->n_short;
  474|  19.8M|         i < ixheaacd_drc_offset->n_flat_ls + ixheaacd_drc_offset->n_short;
  ------------------
  |  Branch (474:10): [True: 19.7M, False: 44.8k]
  ------------------
  475|  19.7M|         i++) {
  476|  19.7M|      fp[i] = 0;
  477|  19.7M|    }
  478|  44.8k|  }
  479|  60.3k|}
ixheaacd_windowing_short3:
  483|  88.8k|                                WORD8 shift_olap) {
  484|  88.8k|  WORD32 i;
  485|  88.8k|  const WORD32 *win_fwd = win_rev - n_short + 1;
  486|  88.8k|  if (shift_olap > shiftp) {
  ------------------
  |  Branch (486:7): [True: 29.3k, False: 59.4k]
  ------------------
  487|  1.90M|    for (i = 0; i < n_short / 2; i++) {
  ------------------
  |  Branch (487:17): [True: 1.87M, False: 29.3k]
  ------------------
  488|  1.87M|      fp[i] = ixheaac_add32_sat(
  489|  1.87M|          ixheaacd_mult32_sh1(ixheaac_negate32_sat(src1[n_short / 2 - i - 1]),
  490|  1.87M|                              *win_rev),
  491|  1.87M|          (fp[i] >> (shift_olap - shiftp)));
  492|       |
  493|  1.87M|      fp[n_short - i - 1] = ixheaac_add32_sat(
  494|  1.87M|          ixheaacd_mult32_sh1(ixheaac_negate32_sat(src1[n_short / 2 - i - 1]),
  495|  1.87M|                              *win_fwd),
  496|  1.87M|          (fp[n_short - i - 1] >> (shift_olap - shiftp)));
  497|  1.87M|      win_rev--;
  498|  1.87M|      win_fwd++;
  499|  1.87M|    }
  500|  29.3k|    return (shiftp);
  501|  59.4k|  } else {
  502|  3.81M|    for (i = 0; i < n_short / 2; i++) {
  ------------------
  |  Branch (502:17): [True: 3.75M, False: 59.4k]
  ------------------
  503|  3.75M|      fp[i] = ixheaac_add32_sat(
  504|  3.75M|          (ixheaacd_mult32_sh1(ixheaac_negate32_sat(src1[n_short / 2 - i - 1]),
  505|  3.75M|                               *win_rev) >>
  506|  3.75M|           (shiftp - shift_olap)),
  507|  3.75M|          fp[i]);
  508|       |
  509|  3.75M|      fp[n_short - i - 1] = ixheaac_add32_sat(
  510|  3.75M|          (ixheaacd_mult32_sh1(ixheaac_negate32_sat(src1[n_short / 2 - i - 1]),
  511|  3.75M|                               *win_fwd) >>
  512|  3.75M|           (shiftp - shift_olap)),
  513|  3.75M|          fp[n_short - i - 1]);
  514|       |
  515|  3.75M|      win_rev--;
  516|  3.75M|      win_fwd++;
  517|  3.75M|    }
  518|  59.4k|    return (shift_olap);
  519|  59.4k|  }
  520|  88.8k|}
ixheaacd_windowing_short4:
  525|   621k|                                WORD8 output_q) {
  526|   621k|  WORD32 i;
  527|   621k|  const WORD32 *win_rev = win_fwd + n_short - 1;
  528|   621k|  const WORD32 *win_rev1 = win_fwd1 - n_short + 1;
  529|   621k|  if (shift_olap > output_q) {
  ------------------
  |  Branch (529:7): [True: 205k, False: 416k]
  ------------------
  530|  13.3M|    for (i = 0; i < n_short / 2; i++) {
  ------------------
  |  Branch (530:17): [True: 13.1M, False: 205k]
  ------------------
  531|  13.1M|      fp[i] = ixheaac_add32_sat(
  532|  13.1M|          ixheaacd_mult32_sh1(src1[n_short / 2 + i], *win_fwd) >>
  533|  13.1M|              (shiftp - output_q),
  534|  13.1M|          fp[i]);
  535|       |
  536|  13.1M|      fp[n_short - i - 1] = ixheaac_add32_sat(
  537|  13.1M|          ixheaacd_mult32_sh1(ixheaac_negate32_sat(src1[n_short / 2 + i]),
  538|  13.1M|                              *win_rev) >>
  539|  13.1M|              (shiftp - output_q),
  540|  13.1M|          fp[n_short - i - 1]);
  541|       |
  542|  13.1M|      win_fwd++;
  543|  13.1M|      win_rev--;
  544|  13.1M|    }
  545|   205k|    if (flag == 1) {
  ------------------
  |  Branch (545:9): [True: 176k, False: 29.3k]
  ------------------
  546|  11.4M|      for (; i < n_short; i++) {
  ------------------
  |  Branch (546:14): [True: 11.2M, False: 176k]
  ------------------
  547|  11.2M|        fp[i + n_short / 2] = ixheaac_add32_sat(
  548|  11.2M|            ixheaacd_mult32_sh1(ixheaac_negate32_sat(src1[n_short - i - 1]),
  549|  11.2M|                                *win_fwd1) >>
  550|  11.2M|                (shiftp - output_q),
  551|  11.2M|            (fp[i + n_short / 2] >> (shift_olap - output_q)));
  552|       |
  553|  11.2M|        fp[3 * n_short - n_short / 2 - i - 1] = ixheaac_add32_sat(
  554|  11.2M|            ixheaacd_mult32_sh1(ixheaac_negate32_sat(src1[n_short - i - 1]),
  555|  11.2M|                                *win_rev1) >>
  556|  11.2M|                (shiftp - output_q),
  557|  11.2M|            (fp[3 * n_short - n_short / 2 - i - 1] >> (shift_olap - output_q)));
  558|       |
  559|  11.2M|        win_fwd1--;
  560|  11.2M|        win_rev1++;
  561|  11.2M|      }
  562|   176k|    } else {
  563|  1.90M|      for (; i < n_short; i++) {
  ------------------
  |  Branch (563:14): [True: 1.87M, False: 29.3k]
  ------------------
  564|  1.87M|        fp[i + n_short / 2] = ixheaac_add32_sat(
  565|  1.87M|            ixheaac_negate32_sat(src1[n_short - i - 1]) >> (shiftp - output_q),
  566|  1.87M|            fp[i + n_short / 2] >> (shift_olap - output_q));
  567|  1.87M|        fp[3 * n_short - n_short / 2 - i - 1] = ixheaac_add32_sat(
  568|  1.87M|            ixheaac_negate32_sat(src1[n_short - i - 1]) >> (shiftp - output_q),
  569|  1.87M|            fp[3 * n_short - n_short / 2 - i - 1] >> (shift_olap - output_q));
  570|  1.87M|      }
  571|  29.3k|    }
  572|   205k|    return (output_q);
  573|   416k|  } else {
  574|  26.7M|    for (i = 0; i < n_short / 2; i++) {
  ------------------
  |  Branch (574:17): [True: 26.2M, False: 416k]
  ------------------
  575|  26.2M|      fp[i] = ixheaac_add32_sat(
  576|  26.2M|          ixheaacd_mult32_sh1(src1[n_short / 2 + i], *win_fwd) >>
  577|  26.2M|              (shiftp - shift_olap),
  578|  26.2M|          fp[i] >> (output_q - shift_olap));
  579|       |
  580|  26.2M|      fp[n_short - i - 1] = ixheaac_add32_sat(
  581|  26.2M|          ixheaacd_mult32_sh1(ixheaac_negate32_sat(src1[n_short / 2 + i]),
  582|  26.2M|                              *win_rev) >>
  583|  26.2M|              (shiftp - shift_olap),
  584|  26.2M|          fp[n_short - i - 1]);
  585|       |
  586|  26.2M|      win_fwd++;
  587|  26.2M|      win_rev--;
  588|  26.2M|    }
  589|   416k|    if (flag == 1) {
  ------------------
  |  Branch (589:9): [True: 356k, False: 59.4k]
  ------------------
  590|  22.8M|      for (; i < n_short; i++) {
  ------------------
  |  Branch (590:14): [True: 22.5M, False: 356k]
  ------------------
  591|  22.5M|        fp[i + n_short / 2] = ixheaac_add32_sat(
  592|  22.5M|            ixheaacd_mult32_sh1(ixheaac_negate32_sat(src1[n_short - i - 1]),
  593|  22.5M|                                *win_fwd1) >>
  594|  22.5M|                (shiftp - shift_olap),
  595|  22.5M|            fp[i + n_short / 2]);
  596|       |
  597|  22.5M|        fp[3 * n_short - n_short / 2 - i - 1] = ixheaac_add32_sat(
  598|  22.5M|            ixheaacd_mult32_sh1(ixheaac_negate32_sat(src1[n_short - i - 1]),
  599|  22.5M|                                *win_rev1) >>
  600|  22.5M|                (shiftp - shift_olap),
  601|  22.5M|            fp[3 * n_short - n_short / 2 - i - 1]);
  602|       |
  603|  22.5M|        win_fwd1--;
  604|  22.5M|        win_rev1++;
  605|  22.5M|      }
  606|   356k|    } else {
  607|  3.81M|      for (; i < n_short; i++) {
  ------------------
  |  Branch (607:14): [True: 3.75M, False: 59.4k]
  ------------------
  608|  3.75M|        fp[i + n_short / 2] =
  609|  3.75M|            ixheaac_add32_sat(ixheaac_negate32_sat(src1[n_short - i - 1]) >>
  610|  3.75M|                                   (shiftp - shift_olap),
  611|  3.75M|                               fp[i + n_short / 2]);
  612|  3.75M|        fp[3 * n_short - n_short / 2 - i - 1] =
  613|  3.75M|            ixheaac_add32_sat(ixheaac_negate32_sat(src1[n_short - i - 1]) >>
  614|  3.75M|                                   (shiftp - shift_olap),
  615|  3.75M|                               fp[3 * n_short - n_short / 2 - i - 1]);
  616|  3.75M|      }
  617|  59.4k|    }
  618|   416k|    return (shift_olap);
  619|   416k|  }
  620|   621k|}
ixheaacd_scale_down:
  623|   266k|                         WORD8 shift2) {
  624|   266k|  WORD32 i;
  625|   266k|  if (shift1 > shift2) {
  ------------------
  |  Branch (625:7): [True: 29.3k, False: 237k]
  ------------------
  626|  13.1M|    for (i = 0; i < len; i++) {
  ------------------
  |  Branch (626:17): [True: 13.1M, False: 29.3k]
  ------------------
  627|  13.1M|      *dest = *src >> (shift1 - shift2);
  628|  13.1M|      src++;
  629|  13.1M|      dest++;
  630|  13.1M|    }
  631|   237k|  } else {
  632|   206M|    for (i = 0; i < len; i++) {
  ------------------
  |  Branch (632:17): [True: 206M, False: 237k]
  ------------------
  633|   206M|      *dest = ixheaac_shl32_sat((*src), (shift2 - shift1));
  634|   206M|      src++;
  635|   206M|      dest++;
  636|   206M|    }
  637|   237k|  }
  638|   266k|}
ixheaacd_scale_down_adj:
  641|   158k|                             WORD8 shift1, WORD8 shift2) {
  642|   158k|  WORD32 i;
  643|   158k|  if (shift1 > shift2) {
  ------------------
  |  Branch (643:7): [True: 0, False: 158k]
  ------------------
  644|      0|    for (i = 0; i < len; i++) {
  ------------------
  |  Branch (644:17): [True: 0, False: 0]
  ------------------
  645|      0|      *dest = ixheaac_add32_sat((*src >> (shift1 - shift2)), ADJ_SCALE);
  ------------------
  |  |   70|      0|#define ADJ_SCALE 11
  ------------------
  646|      0|      src++;
  647|      0|      dest++;
  648|      0|    }
  649|   158k|  } else {
  650|   159M|    for (i = 0; i < len; i++) {
  ------------------
  |  Branch (650:17): [True: 158M, False: 158k]
  ------------------
  651|   158M|      *dest = ixheaac_add32_sat(ixheaac_shl32_sat((*src), (shift2 - shift1)),
  652|   158M|                                 ADJ_SCALE);
  ------------------
  |  |   70|   158M|#define ADJ_SCALE 11
  ------------------
  653|   158M|      src++;
  654|   158M|      dest++;
  655|   158M|    }
  656|   158k|  }
  657|   158k|}
ixheaacd_basic_ops.c:ixheaacd_mult32_sh1:
   28|   394M|static PLATFORM_INLINE WORD32 ixheaacd_mult32_sh1(WORD32 a, WORD32 b) {
   29|   394M|  WORD32 result;
   30|   394M|  WORD64 temp_result;
   31|       |
   32|   394M|  temp_result = (WORD64)a * (WORD64)b;
   33|   394M|  result = (WORD32)(temp_result >> 31);
   34|       |
   35|   394M|  return (result);
   36|   394M|}

ixheaacd_byte_align:
   39|   123k|                         WORD32 *align_bits_cnt) {
   40|   123k|  WORD alignment;
   41|   123k|  alignment = (WORD)((*align_bits_cnt - it_bit_buff->cnt_bits) & 0x07);
   42|       |
   43|   123k|  if (alignment) {
  ------------------
  |  Branch (43:7): [True: 47.5k, False: 76.0k]
  ------------------
   44|  47.5k|    ixheaacd_read_bits_buf(it_bit_buff, (8 - alignment));
   45|  47.5k|  }
   46|       |
   47|   123k|  *align_bits_cnt = it_bit_buff->cnt_bits;
   48|   123k|}
ixheaacd_skip_bits_buf:
   50|  4.44G|WORD32 ixheaacd_skip_bits_buf(ia_bit_buf_struct *it_bit_buff, WORD no_of_bits) {
   51|  4.44G|  UWORD8 *ptr_read_next = it_bit_buff->ptr_read_next;
   52|  4.44G|  WORD bit_pos = it_bit_buff->bit_pos;
   53|       |
   54|  4.44G|  if (it_bit_buff->cnt_bits < no_of_bits || it_bit_buff->cnt_bits < 0)
  ------------------
  |  Branch (54:7): [True: 102, False: 4.44G]
  |  Branch (54:45): [True: 0, False: 4.44G]
  ------------------
   55|    102|    longjmp(*(it_bit_buff->xaac_jmp_buf),
   56|    102|            IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|    102|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
   57|  4.44G|  it_bit_buff->cnt_bits -= no_of_bits;
   58|       |
   59|  4.44G|  ptr_read_next += no_of_bits / 8;
   60|  4.44G|  bit_pos -= (no_of_bits % 8);
   61|  4.44G|  if (bit_pos < 0) {
  ------------------
  |  Branch (61:7): [True: 555M, False: 3.88G]
  ------------------
   62|   555M|    bit_pos += 8;
   63|   555M|    ptr_read_next++;
   64|   555M|  }
   65|  4.44G|  assert(bit_pos >= 0 && bit_pos <= 7);
  ------------------
  |  Branch (65:3): [True: 0, False: 4.44G]
  |  Branch (65:3): [True: 0, False: 0]
  |  Branch (65:3): [True: 4.44G, False: 0]
  |  Branch (65:3): [True: 4.44G, False: 0]
  ------------------
   66|       |
   67|  4.44G|  it_bit_buff->ptr_read_next = ptr_read_next;
   68|  4.44G|  it_bit_buff->bit_pos = (WORD16)bit_pos;
   69|  4.44G|  return no_of_bits;
   70|  4.44G|}
ixheaacd_show_bits_buf:
   72|  4.42M|WORD32 ixheaacd_show_bits_buf(ia_bit_buf_struct *it_bit_buff, WORD no_of_bits) {
   73|  4.42M|  UWORD32 ret_val;
   74|  4.42M|  UWORD8 *ptr_read_next = it_bit_buff->ptr_read_next;
   75|  4.42M|  WORD bit_pos = it_bit_buff->bit_pos;
   76|       |
   77|  4.42M|  if (no_of_bits == 0) {
  ------------------
  |  Branch (77:7): [True: 106, False: 4.42M]
  ------------------
   78|    106|    return 0;
   79|    106|  }
   80|       |
   81|  4.42M|  if (it_bit_buff->cnt_bits < no_of_bits || it_bit_buff->cnt_bits < 0 ||
  ------------------
  |  Branch (81:7): [True: 3, False: 4.42M]
  |  Branch (81:45): [True: 0, False: 4.42M]
  ------------------
   82|  4.42M|      no_of_bits > 25) {
  ------------------
  |  Branch (82:7): [True: 0, False: 4.42M]
  ------------------
   83|      3|    longjmp(*(it_bit_buff->xaac_jmp_buf),
   84|      3|            IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|      3|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
   85|      3|  }
   86|       |
   87|  4.42M|  ret_val = (UWORD32)*ptr_read_next;
   88|       |
   89|  4.42M|  bit_pos -= no_of_bits;
   90|  15.1M|  while (bit_pos < -1) {
  ------------------
  |  Branch (90:10): [True: 10.7M, False: 4.42M]
  ------------------
   91|  10.7M|    bit_pos += 8;
   92|  10.7M|    ptr_read_next++;
   93|       |
   94|  10.7M|    ret_val <<= 8;
   95|       |
   96|  10.7M|    ret_val |= (UWORD32)*ptr_read_next;
   97|  10.7M|  }
   98|       |
   99|  4.42M|  if (bit_pos == -1) {
  ------------------
  |  Branch (99:7): [True: 555k, False: 3.87M]
  ------------------
  100|   555k|    bit_pos += 8;
  101|   555k|    ret_val <<= 8;
  102|   555k|    ptr_read_next++;
  103|   555k|  }
  104|       |
  105|  4.42M|  ret_val = ret_val << ((31 - no_of_bits) - bit_pos) >> (32 - no_of_bits);
  106|       |
  107|  4.42M|  return ret_val;
  108|  4.42M|}
ixheaacd_read_bits_buf:
  110|   345M|WORD32 ixheaacd_read_bits_buf(ia_bit_buf_struct *it_bit_buff, WORD no_of_bits) {
  111|   345M|  UWORD32 ret_val;
  112|   345M|  UWORD8 *ptr_read_next = it_bit_buff->ptr_read_next;
  113|   345M|  WORD bit_pos = it_bit_buff->bit_pos;
  114|       |
  115|   345M|  if (no_of_bits == 0) {
  ------------------
  |  Branch (115:7): [True: 25.5M, False: 319M]
  ------------------
  116|  25.5M|    return 0;
  117|  25.5M|  }
  118|       |
  119|   319M|  if (it_bit_buff->cnt_bits < no_of_bits || it_bit_buff->cnt_bits < 0 ||
  ------------------
  |  Branch (119:7): [True: 3.01k, False: 319M]
  |  Branch (119:45): [True: 2, False: 319M]
  ------------------
  120|   319M|      no_of_bits > 25) {
  ------------------
  |  Branch (120:7): [True: 115, False: 319M]
  ------------------
  121|  3.13k|    longjmp(*(it_bit_buff->xaac_jmp_buf),
  122|  3.13k|            IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|  3.13k|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  123|  3.13k|  }
  124|       |
  125|   319M|  it_bit_buff->cnt_bits -= no_of_bits;
  126|   319M|  ret_val = (UWORD32)*ptr_read_next;
  127|       |
  128|   319M|  bit_pos -= no_of_bits;
  129|   367M|  while (bit_pos < -1) {
  ------------------
  |  Branch (129:10): [True: 48.1M, False: 319M]
  ------------------
  130|  48.1M|    bit_pos += 8;
  131|  48.1M|    ptr_read_next++;
  132|       |
  133|  48.1M|    ret_val <<= 8;
  134|       |
  135|  48.1M|    ret_val |= (UWORD32)*ptr_read_next;
  136|  48.1M|  }
  137|       |
  138|   319M|  if (bit_pos == -1) {
  ------------------
  |  Branch (138:7): [True: 43.7M, False: 275M]
  ------------------
  139|  43.7M|    bit_pos += 8;
  140|  43.7M|    ret_val <<= 8;
  141|  43.7M|    ptr_read_next++;
  142|  43.7M|  }
  143|       |
  144|   319M|  ret_val = ret_val << ((31 - no_of_bits) - bit_pos) >> (32 - no_of_bits);
  145|   319M|  it_bit_buff->ptr_read_next = ptr_read_next;
  146|   319M|  it_bit_buff->bit_pos = (WORD16)bit_pos;
  147|   319M|  return ret_val;
  148|   319M|}
ixheaacd_aac_read_byte:
  151|  2.76k|                            WORD32 *readword) {
  152|  2.76k|  UWORD8 *v = *ptr_read_next;
  153|  2.76k|  WORD32 bits_consumed = *bit_pos;
  154|       |
  155|  2.76k|  if ((bits_consumed -= 8) >= 0) {
  ------------------
  |  Branch (155:7): [True: 593, False: 2.17k]
  ------------------
  156|    593|    *readword = (*readword << 8) | *v;
  157|    593|    v++;
  158|  2.17k|  } else {
  159|  2.17k|    bits_consumed += 8;
  160|  2.17k|  }
  161|  2.76k|  *bit_pos = bits_consumed;
  162|  2.76k|  *ptr_read_next = v;
  163|  2.76k|  return;
  164|  2.76k|}
ixheaacd_aac_read_byte_corr1:
  167|  7.07M|                                  WORD32 *readword, UWORD8 *p_bit_buf_end) {
  168|  7.07M|  UWORD8 *v = *ptr_read_next;
  169|  7.07M|  WORD32 bits_consumed = *ptr_bit_pos;
  170|  7.07M|  WORD32 temp_bit_count = 0;
  171|       |
  172|  9.69M|  while (bits_consumed >= 8) {
  ------------------
  |  Branch (172:10): [True: 2.61M, False: 7.07M]
  ------------------
  173|  2.61M|    bits_consumed -= 8;
  174|  2.61M|    if ((p_bit_buf_end < v) && (p_bit_buf_end != 0))
  ------------------
  |  Branch (174:9): [True: 542k, False: 2.07M]
  |  Branch (174:32): [True: 38.8k, False: 503k]
  ------------------
  175|  38.8k|      temp_bit_count += 8;
  176|  2.58M|    else {
  177|  2.58M|      *readword = (*readword << 8) | *v;
  178|  2.58M|      v++;
  179|  2.58M|    }
  180|  2.61M|  }
  181|       |
  182|  7.07M|  if (bits_consumed > (31 - temp_bit_count)) {
  ------------------
  |  Branch (182:7): [True: 5.15k, False: 7.07M]
  ------------------
  183|  5.15k|    if ((p_bit_buf_end != NULL) && (p_bit_buf_end < v)) {
  ------------------
  |  Branch (183:9): [True: 5.15k, False: 0]
  |  Branch (183:36): [True: 5.15k, False: 0]
  ------------------
  184|  5.15k|      bits_consumed = 31 - temp_bit_count;
  185|  5.15k|    }
  186|  5.15k|  }
  187|       |
  188|  7.07M|  *ptr_bit_pos = bits_consumed + temp_bit_count;
  189|  7.07M|  *ptr_read_next = v;
  190|  7.07M|  return;
  191|  7.07M|}
ixheaacd_aac_read_byte_corr:
  194|  24.1M|                                 WORD32 *readword, UWORD8 *p_bit_buf_end) {
  195|  24.1M|  UWORD8 *v = *ptr_read_next;
  196|  24.1M|  WORD32 bits_consumed = *ptr_bit_pos;
  197|       |
  198|  24.1M|  if ((bits_consumed -= 8) >= 0) {
  ------------------
  |  Branch (198:7): [True: 6.27M, False: 17.8M]
  ------------------
  199|  6.27M|    if (p_bit_buf_end < v)
  ------------------
  |  Branch (199:9): [True: 255k, False: 6.02M]
  ------------------
  200|   255k|      bits_consumed += 8;
  201|  6.02M|    else {
  202|  6.02M|      *readword = (*readword << 8) | *v;
  203|  6.02M|      v++;
  204|  6.02M|    }
  205|  17.8M|  } else {
  206|  17.8M|    bits_consumed += 8;
  207|  17.8M|  }
  208|       |
  209|  24.1M|  if (bits_consumed > 31) {
  ------------------
  |  Branch (209:7): [True: 164k, False: 24.0M]
  ------------------
  210|   164k|    if (p_bit_buf_end < v) {
  ------------------
  |  Branch (210:9): [True: 164k, False: 255]
  ------------------
  211|   164k|      bits_consumed = 31;
  212|   164k|    }
  213|   164k|  }
  214|       |
  215|  24.1M|  *ptr_bit_pos = bits_consumed;
  216|  24.1M|  *ptr_read_next = v;
  217|  24.1M|  return;
  218|  24.1M|}
ixheaacd_aac_read_bit:
  220|  10.3M|WORD32 ixheaacd_aac_read_bit(ia_bit_buf_struct *it_bit_buff) {
  221|  10.3M|  UWORD8 ret_val;
  222|  10.3M|  UWORD8 *ptr_read_next = it_bit_buff->ptr_read_next;
  223|  10.3M|  WORD bit_pos = it_bit_buff->bit_pos;
  224|  10.3M|  UWORD32 temp;
  225|  10.3M|  WORD no_of_bits = 1;
  226|       |
  227|  10.3M|  if (bit_pos < 0) {
  ------------------
  |  Branch (227:7): [True: 1.06M, False: 9.28M]
  ------------------
  228|  1.06M|    bit_pos = 7;
  229|  1.06M|    ptr_read_next--;
  230|  1.06M|  }
  231|       |
  232|  10.3M|  if (ptr_read_next < it_bit_buff->ptr_bit_buf_base) {
  ------------------
  |  Branch (232:7): [True: 155, False: 10.3M]
  ------------------
  233|    155|    longjmp(*(it_bit_buff->xaac_jmp_buf),
  234|    155|            IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|    155|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  235|    155|  }
  236|       |
  237|  10.3M|  it_bit_buff->cnt_bits += no_of_bits;
  238|  10.3M|  ret_val = *ptr_read_next;
  239|  10.3M|  bit_pos -= no_of_bits;
  240|       |
  241|  10.3M|  temp = (ret_val << 24) << (bit_pos + no_of_bits);
  242|  10.3M|  it_bit_buff->ptr_read_next = ptr_read_next;
  243|  10.3M|  it_bit_buff->bit_pos = (WORD16)bit_pos;
  244|       |
  245|  10.3M|  return temp >> (32 - no_of_bits);
  246|  10.3M|}
ixheaacd_aac_read_bit_rev:
  248|  8.73M|WORD32 ixheaacd_aac_read_bit_rev(ia_bit_buf_struct *it_bit_buff) {
  249|  8.73M|  UWORD8 ret_val;
  250|  8.73M|  UWORD8 *ptr_read_next = it_bit_buff->ptr_read_next;
  251|  8.73M|  WORD bit_pos = it_bit_buff->bit_pos;
  252|  8.73M|  UWORD32 temp;
  253|  8.73M|  WORD no_of_bits = 1;
  254|       |
  255|  8.73M|  if (it_bit_buff->cnt_bits < no_of_bits || it_bit_buff->cnt_bits < 0) {
  ------------------
  |  Branch (255:7): [True: 56, False: 8.73M]
  |  Branch (255:45): [True: 0, False: 8.73M]
  ------------------
  256|     56|    longjmp(*(it_bit_buff->xaac_jmp_buf),
  257|     56|            IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|     56|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  258|     56|  }
  259|       |
  260|  8.73M|  if (bit_pos >= 8) {
  ------------------
  |  Branch (260:7): [True: 447k, False: 8.28M]
  ------------------
  261|   447k|    bit_pos -= 8;
  262|   447k|    ptr_read_next++;
  263|   447k|  }
  264|       |
  265|  8.73M|  it_bit_buff->cnt_bits -= no_of_bits;
  266|  8.73M|  ret_val = *ptr_read_next;
  267|  8.73M|  bit_pos += no_of_bits;
  268|       |
  269|  8.73M|  temp = (ret_val << 24) << (bit_pos - no_of_bits);
  270|  8.73M|  it_bit_buff->ptr_read_next = ptr_read_next;
  271|  8.73M|  it_bit_buff->bit_pos = (WORD16)bit_pos;
  272|       |
  273|  8.73M|  return temp >> (32 - no_of_bits);
  274|  8.73M|}
ixheaacd_write_bit:
  279|  14.5M|{
  280|  14.5M|  WORD32 mask;
  281|       |
  282|  14.5M|  if (no_of_bits == 0) return;
  ------------------
  |  Branch (282:7): [True: 219k, False: 14.2M]
  ------------------
  283|       |
  284|  14.2M|  mask = 0x1;
  285|  14.2M|  mask <<= no_of_bits - 1;
  286|       |
  287|  14.2M|  it_bit_buff->bit_count += no_of_bits;
  288|       |
  289|  30.6M|  while (no_of_bits > 0) {
  ------------------
  |  Branch (289:10): [True: 16.3M, False: 14.2M]
  ------------------
  290|  51.1M|    while (no_of_bits > 0 && it_bit_buff->valid_bits < 8) {
  ------------------
  |  Branch (290:12): [True: 36.8M, False: 14.2M]
  |  Branch (290:30): [True: 34.8M, False: 2.07M]
  ------------------
  291|  34.8M|      it_bit_buff->byte <<= 1;
  292|  34.8M|      if (value & mask) it_bit_buff->byte |= 0x1;
  ------------------
  |  Branch (292:11): [True: 6.46M, False: 28.3M]
  ------------------
  293|  34.8M|      value <<= 1;
  294|  34.8M|      no_of_bits--;
  295|  34.8M|      it_bit_buff->valid_bits++;
  296|  34.8M|    }
  297|  16.3M|    if (it_bit_buff->valid_bits == 8) {
  ------------------
  |  Branch (297:9): [True: 4.35M, False: 12.0M]
  ------------------
  298|  4.35M|      *it_bit_buff->byte_ptr++ = it_bit_buff->byte;
  299|  4.35M|      it_bit_buff->byte = 0;
  300|  4.35M|      it_bit_buff->valid_bits = 0;
  301|  4.35M|    }
  302|  16.3M|  }
  303|  14.2M|}
ixheaacd_read_bit:
  305|   477k|WORD32 ixheaacd_read_bit(ia_bit_buf_struct *it_bit_buff, WORD32 no_of_bits) {
  306|   477k|  UWORD32 ret_val;
  307|   477k|  UWORD8 *ptr_read_next = it_bit_buff->byte_ptr;
  308|       |
  309|   477k|  if (no_of_bits == 0) {
  ------------------
  |  Branch (309:7): [True: 227k, False: 249k]
  ------------------
  310|   227k|    return 0;
  311|   227k|  }
  312|       |
  313|   249k|  ret_val =
  314|   249k|      ixheaacd_aac_showbits_32(ptr_read_next, it_bit_buff->bit_count, NULL);
  315|   249k|  it_bit_buff->byte_ptr += (no_of_bits >> 3);
  316|       |
  317|   249k|  if (it_bit_buff->valid_bits != 8) {
  ------------------
  |  Branch (317:7): [True: 11.3k, False: 238k]
  ------------------
  318|  11.3k|    UWORD8 *v = it_bit_buff->byte_ptr;
  319|  11.3k|    ret_val = (ret_val << (8 - it_bit_buff->valid_bits)) |
  320|  11.3k|              (*v >> it_bit_buff->valid_bits);
  321|  11.3k|  }
  322|       |
  323|   249k|  it_bit_buff->valid_bits -= (no_of_bits % 8);
  324|       |
  325|   249k|  ret_val = ret_val >> (32 - no_of_bits);
  326|       |
  327|   249k|  return ret_val;
  328|   477k|}

ixheaacd_huff_sfb_table:
   77|  3.34M|                             const UWORD32 *idx_table) {
   78|  3.34M|  UWORD32 temp = 0;
   79|  3.34M|  UWORD32 temp1 = 0;
   80|  3.34M|  WORD32 found = 0;
   81|  3.34M|  UWORD32 mask = 0x80000000;
   82|       |
   83|  3.34M|  WORD32 leading_ones;
   84|  3.34M|  WORD32 max_len;
   85|  3.34M|  WORD32 ixheaacd_drc_offset = 0;
   86|  3.34M|  WORD32 length;
   87|  3.34M|  UWORD32 code_word;
   88|  3.34M|  WORD32 len_end;
   89|       |
   90|  3.34M|  max_len = code_book_tbl[0];
   91|  3.34M|  mask = mask - (1 << (31 - max_len));
   92|  3.34M|  mask = mask << 1;
   93|       |
   94|  3.34M|  temp = (UWORD32)((it_bit_buff & mask));
   95|       |
   96|  3.34M|  len_end = code_book_tbl[0];
   97|  3.34M|  leading_ones = ixheaacd_cnt_leading_ones(temp);
   98|  5.30M|  do {
   99|  5.30M|    ixheaacd_drc_offset = (idx_table[leading_ones] >> 20) & 0x1ff;
  100|  5.30M|    length = code_book_tbl[ixheaacd_drc_offset + 1] & 0x1f;
  101|  5.30M|    code_word = idx_table[leading_ones] & 0xfffff;
  102|  5.30M|    temp1 = temp >> (32 - length);
  103|  5.30M|    if (temp1 <= code_word) {
  ------------------
  |  Branch (103:9): [True: 3.34M, False: 1.96M]
  ------------------
  104|  3.34M|      ixheaacd_drc_offset = ixheaacd_drc_offset - (code_word - temp1);
  105|  3.34M|      found = 1;
  106|  3.34M|    } else {
  107|  1.96M|      len_end = len_end + ((idx_table[leading_ones] >> 29) & 0x7);
  108|  1.96M|      leading_ones = len_end;
  109|  1.96M|    }
  110|  5.30M|  } while (!found);
  ------------------
  |  Branch (110:12): [True: 1.96M, False: 3.34M]
  ------------------
  111|  3.34M|  *huff_index = code_book_tbl[ixheaacd_drc_offset + 1] >> 5;
  112|  3.34M|  *len = length;
  113|  3.34M|}
ixheaacd_inverse_quantize:
  117|  20.6k|                               WORD8 *scratch_in) {
  118|  20.6k|  WORD32 j;
  119|  20.6k|  WORD32 temp;
  120|  20.6k|  WORD32 q_abs;
  121|       |
  122|  1.48M|  for (j = no_band - 1; j >= 0; j--) {
  ------------------
  |  Branch (122:25): [True: 1.46M, False: 20.6k]
  ------------------
  123|  1.46M|    q_abs = *scratch_in++;
  124|  1.46M|    temp = (ixheaacd_pow_table_Q13[q_abs]);
  125|  1.46M|    *x_invquant++ = -temp;
  126|  1.46M|  }
  127|  20.6k|}
ixheaacd_decode_huffman:
 1002|  64.5k|                             WORD32 maximum_bins_short) {
 1003|  64.5k|  WORD ret_val = 0;
 1004|  64.5k|  WORD start_bit_pos = it_bit_buff->bit_pos;
 1005|  64.5k|  UWORD8 *start_read_pos = it_bit_buff->ptr_read_next;
 1006|  64.5k|  const UWORD16 *cb_table = (UWORD16 *)(ptr_aac_tables->code_book[cb_no]);
 1007|  64.5k|  WORD32 huff_mode;
 1008|  64.5k|  const UWORD32 *idx_table = (UWORD32 *)(ptr_aac_tables->index_table[cb_no]);
 1009|  64.5k|  WORD32 *pow_table =
 1010|  64.5k|      (WORD32 *)ptr_aac_tables->pstr_block_tables->ixheaacd_pow_table_Q13;
 1011|  64.5k|  WORD32 no_bands = sfb - start - 1;
 1012|  64.5k|  WORD16 *band_offset = sfb_offset + start;
 1013|       |
 1014|  64.5k|  if (cb_no == 11) {
  ------------------
  |  Branch (1014:7): [True: 51.7k, False: 12.7k]
  ------------------
 1015|  51.7k|    const UWORD32 *idx_table =
 1016|  51.7k|        ptr_aac_tables->pstr_huffmann_tables->idx_table_hf11;
 1017|  51.7k|    const UWORD16 *cb_table =
 1018|  51.7k|        ptr_aac_tables->pstr_huffmann_tables->input_table_cb11;
 1019|       |
 1020|  51.7k|    ret_val = ixheaacd_huffman_dec_word1(it_bit_buff, spec_coef, band_offset,
 1021|  51.7k|                                         no_bands, group_len, cb_table,
 1022|  51.7k|                                         pow_table, idx_table, maximum_bins_short);
 1023|       |
 1024|  51.7k|  } else if (cb_no <= 4) {
  ------------------
  |  Branch (1024:14): [True: 5.00k, False: 7.77k]
  ------------------
 1025|  5.00k|    WORD32 tbl_sign = 0;
 1026|       |
 1027|  5.00k|    if (cb_no > 2) {
  ------------------
  |  Branch (1027:9): [True: 3.30k, False: 1.69k]
  ------------------
 1028|  3.30k|      tbl_sign = 1;
 1029|  3.30k|    }
 1030|  5.00k|    ret_val = ixheaacd_huffman_dec_quad(it_bit_buff, spec_coef, band_offset,
 1031|  5.00k|                                        no_bands, group_len, cb_table,
 1032|  5.00k|                                        pow_table, tbl_sign, idx_table, maximum_bins_short);
 1033|  5.00k|  }
 1034|       |
 1035|  7.77k|  else if (cb_no <= 10) {
  ------------------
  |  Branch (1035:12): [True: 7.77k, False: 0]
  ------------------
 1036|  7.77k|    WORD32 tbl_sign = 0;
 1037|  7.77k|    huff_mode = 9;
 1038|  7.77k|    if (cb_no > 6) {
  ------------------
  |  Branch (1038:9): [True: 4.95k, False: 2.81k]
  ------------------
 1039|  4.95k|      if (cb_no > 8)
  ------------------
  |  Branch (1039:11): [True: 3.37k, False: 1.58k]
  ------------------
 1040|  3.37k|        huff_mode = 13;
 1041|  1.58k|      else
 1042|  1.58k|        huff_mode = 8;
 1043|  4.95k|      tbl_sign = 1;
 1044|  4.95k|    }
 1045|  7.77k|    ret_val = ixheaacd_huffman_dec_pair(
 1046|  7.77k|        it_bit_buff, spec_coef, band_offset, no_bands, group_len, cb_table,
 1047|  7.77k|        pow_table, tbl_sign, idx_table, huff_mode, maximum_bins_short);
 1048|  7.77k|  }
 1049|       |
 1050|  64.5k|  {
 1051|  64.5k|    WORD bits_cons;
 1052|  64.5k|    bits_cons = (WORD)(((it_bit_buff->ptr_read_next - start_read_pos) << 3) +
 1053|  64.5k|                       (it_bit_buff->bit_pos - start_bit_pos));
 1054|  64.5k|    it_bit_buff->cnt_bits -= bits_cons;
 1055|  64.5k|  }
 1056|  64.5k|  return ret_val;
 1057|  64.5k|}
ixheaacd_huffman_dec_word2:
 1062|   131k|                                WORD32 *x_invquant, WORD8 *scratch_ptr) {
 1063|   131k|  WORD ret_val = 0;
 1064|   131k|  WORD32 huff_mode;
 1065|   131k|  WORD start_bit_pos = it_bit_buff->bit_pos;
 1066|   131k|  WORD32 cnt_bits = it_bit_buff->cnt_bits;
 1067|   131k|  WORD32 *pow_table =
 1068|   131k|      (WORD32 *)ptr_aac_tables->pstr_block_tables->ixheaacd_pow_table_Q13;
 1069|   131k|  UWORD8 *start_read_pos = it_bit_buff->ptr_read_next;
 1070|       |
 1071|   131k|  const UWORD16 *cb_table = (UWORD16 *)(ptr_aac_tables->code_book[cb_no]);
 1072|   131k|  const UWORD32 *idx_table = (UWORD32 *)(ptr_aac_tables->index_table[cb_no]);
 1073|       |
 1074|   131k|  if (cb_no == 11) {
  ------------------
  |  Branch (1074:7): [True: 57.4k, False: 74.2k]
  ------------------
 1075|  57.4k|    const UWORD16 *cb_table =
 1076|  57.4k|        ptr_aac_tables->pstr_huffmann_tables->input_table_cb11;
 1077|       |
 1078|  57.4k|    ret_val = ixheaacd_huffman_dec_word2_11(
 1079|  57.4k|        it_bit_buff, width, cb_table, x_invquant, pow_table, scratch_ptr,
 1080|  57.4k|        ptr_aac_tables->pstr_huffmann_tables->idx_table_hf11);
 1081|  74.2k|  } else if (cb_no <= 4) {
  ------------------
  |  Branch (1081:14): [True: 26.0k, False: 48.1k]
  ------------------
 1082|  26.0k|    WORD32 tbl_sign = 0;
 1083|  26.0k|    if (cb_no > 2) tbl_sign = 1;
  ------------------
  |  Branch (1083:9): [True: 13.5k, False: 12.5k]
  ------------------
 1084|  26.0k|    ret_val = ixheaacd_huffman_dec_word2_quad(it_bit_buff, width, cb_table,
 1085|  26.0k|                                              x_invquant, pow_table,
 1086|  26.0k|                                              scratch_ptr, tbl_sign, idx_table);
 1087|  48.1k|  } else if (cb_no <= 10) {
  ------------------
  |  Branch (1087:14): [True: 48.1k, False: 0]
  ------------------
 1088|  48.1k|    WORD32 tbl_sign = 0;
 1089|  48.1k|    huff_mode = 9;
 1090|  48.1k|    if (cb_no > 6) {
  ------------------
  |  Branch (1090:9): [True: 43.4k, False: 4.70k]
  ------------------
 1091|  43.4k|      if (cb_no > 8) {
  ------------------
  |  Branch (1091:11): [True: 1.16k, False: 42.3k]
  ------------------
 1092|  1.16k|        huff_mode = 13;
 1093|  42.3k|      } else {
 1094|  42.3k|        huff_mode = 8;
 1095|  42.3k|      }
 1096|       |
 1097|  43.4k|      tbl_sign = 1;
 1098|  43.4k|    }
 1099|  48.1k|    ret_val = ixheaacd_huffman_dec_word2_pair(
 1100|  48.1k|        it_bit_buff, width, cb_table, x_invquant, pow_table, scratch_ptr,
 1101|  48.1k|        tbl_sign, idx_table, huff_mode);
 1102|  48.1k|  }
 1103|       |
 1104|   131k|  {
 1105|   131k|    WORD bits_cons;
 1106|   131k|    if (it_bit_buff->bit_pos <= 7) {
  ------------------
  |  Branch (1106:9): [True: 131k, False: 78]
  ------------------
 1107|   131k|      bits_cons = (WORD)(((it_bit_buff->ptr_read_next - start_read_pos) << 3) +
 1108|   131k|                         (it_bit_buff->bit_pos - start_bit_pos));
 1109|   131k|      if (bits_cons > cnt_bits)
  ------------------
  |  Branch (1109:11): [True: 18, False: 131k]
  ------------------
 1110|     18|      {
 1111|     18|        return IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES;
  ------------------
  |  |   98|     18|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
 1112|     18|      }
 1113|   131k|      it_bit_buff->cnt_bits = cnt_bits - bits_cons;
 1114|   131k|    } else {
 1115|     78|      it_bit_buff->ptr_read_next += (it_bit_buff->bit_pos) >> 3;
 1116|     78|      it_bit_buff->bit_pos = it_bit_buff->bit_pos & 0x7;
 1117|     78|      if ((SIZE_T)(it_bit_buff->ptr_read_next) > (SIZE_T)(it_bit_buff->ptr_bit_buf_end + 1))
  ------------------
  |  Branch (1117:11): [True: 78, False: 0]
  ------------------
 1118|     78|      {
 1119|     78|        it_bit_buff->ptr_read_next = it_bit_buff->ptr_bit_buf_end + 1;
 1120|     78|        return IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES;
  ------------------
  |  |   98|     78|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
 1121|     78|      }
 1122|       |
 1123|      0|      bits_cons = (WORD)(((it_bit_buff->ptr_read_next - start_read_pos) << 3) +
 1124|      0|                         (it_bit_buff->bit_pos - start_bit_pos));
 1125|      0|      it_bit_buff->cnt_bits = cnt_bits - bits_cons;
 1126|      0|    }
 1127|   131k|  }
 1128|   131k|  return ret_val;
 1129|   131k|}
ixheaacd_dec_copy_outsample:
 1132|  2.42k|                                 WORD32 size, WORD16 stride) {
 1133|  2.42k|  WORD32 i;
 1134|       |
 1135|  1.02M|  for (i = 0; i < size; i++) {
  ------------------
  |  Branch (1135:15): [True: 1.01M, False: 2.42k]
  ------------------
 1136|  1.01M|    out_samples[stride*i] = (ixheaac_shl16_sat((WORD16)(p_overlap_buffer[i]), 1) << 14);
 1137|  1.01M|  }
 1138|  2.42k|}
ixheaacd_lap1_512_480:
 1142|  24.6k|                           WORD16 stride , WORD slot_element) {
 1143|  24.6k|  WORD32 accu;
 1144|  24.6k|  WORD32 i;
 1145|  24.6k|  WORD16 rounding_fac = -0x2000;
 1146|       |
 1147|  24.6k|  WORD32 *window_i = (WORD32 *)window;
 1148|       |
 1149|  24.6k|  WORD16 *ptr_out1, *ptr_out2;
 1150|       |
 1151|  24.6k|  WORD32 *pwin1, *pwin2;
 1152|  24.6k|  WORD32 *pCoef = &coef[size * 2 - 1 - 0];
 1153|       |
 1154|  24.6k|  WORD16 * out  = (WORD16*)out_tmp - slot_element;
 1155|       |
 1156|  24.6k|  pwin1 = &window_i[size - 1 - 0];
 1157|  24.6k|  pwin2 = &window_i[size + 0];
 1158|       |
 1159|  24.6k|  ptr_out1 = &out[stride * (size - 1 - 0)];
 1160|  24.6k|  ptr_out2 = &out[stride * (size + 0)];
 1161|       |
 1162|  6.23M|  for (i = 0; i < size; i++) {
  ------------------
  |  Branch (1162:15): [True: 6.21M, False: 24.6k]
  ------------------
 1163|  6.21M|    WORD32 win1, win2, coeff;
 1164|  6.21M|    WORD32 prev_data = *prev++;
 1165|       |
 1166|  6.21M|    win1 = *pwin1--;
 1167|  6.21M|    coeff = *pCoef--;
 1168|  6.21M|    win2 = *pwin2++;
 1169|       |
 1170|  6.21M|    accu = ixheaac_sub32_sat(
 1171|  6.21M|        ixheaac_shl32_dir_sat_limit(ixheaac_mult32_shl(coeff, win1), q_shift),
 1172|  6.21M|        ixheaac_mac32x16in32_shl(rounding_fac, win2, (WORD16)(prev_data)));
 1173|       |
 1174|  6.21M|    accu = ixheaac_add32_sat(accu, accu);
 1175|  6.21M|    accu = ixheaac_add32_sat(accu, accu);
 1176|       |
 1177|  6.21M|    *ptr_out1 = ixheaac_shr32(accu, 16);
 1178|  6.21M|    ptr_out1 -= stride;
 1179|       |
 1180|  6.21M|    accu = ixheaac_sub32_sat(
 1181|  6.21M|        ixheaac_shl32_dir_sat_limit(
 1182|  6.21M|            ixheaac_mult32_shl(ixheaac_negate32_sat(coeff), win2), q_shift),
 1183|  6.21M|        ixheaac_mac32x16in32_shl(rounding_fac, win1, (WORD16)(prev_data)));
 1184|       |
 1185|  6.21M|    accu = ixheaac_add32_sat(accu, accu);
 1186|  6.21M|    accu = ixheaac_add32_sat(accu, accu);
 1187|       |
 1188|  6.21M|    *ptr_out2 = ixheaac_shr32(accu, 16);
 1189|  6.21M|    ptr_out2 += stride;
 1190|  6.21M|  }
 1191|  24.6k|}
ixheaacd_over_lap_add1_dec:
 1195|   121k|                                WORD16 size, WORD16 ch_fac) {
 1196|   121k|  WORD32 accu;
 1197|   121k|  WORD32 i;
 1198|   121k|  WORD16 rounding_fac = 0;
 1199|       |
 1200|  21.1M|  for (i = 0; i < size; i++) {
  ------------------
  |  Branch (1200:15): [True: 20.9M, False: 121k]
  ------------------
 1201|  20.9M|    WORD16 window1, window2;
 1202|       |
 1203|  20.9M|    window1 = window[2 * size - 2 * i - 1];
 1204|  20.9M|    window2 = window[2 * size - 2 * i - 2];
 1205|  20.9M|    accu = ixheaac_sub32_sat(
 1206|  20.9M|        ixheaac_shl32_dir_sat_limit(
 1207|  20.9M|            ixheaac_mult32x16in32(coef[size * 2 - 1 - i], window2), q_shift),
 1208|  20.9M|        ixheaacd_mac32x16in32_sat(rounding_fac, prev[i], window1));
 1209|  20.9M|    out[ch_fac * (size - i - 1)] = accu;
 1210|  20.9M|    accu = ixheaac_sub32_sat(
 1211|  20.9M|        ixheaac_shl32_dir_sat_limit(
 1212|  20.9M|            ixheaac_mult32x16in32(ixheaac_negate32_sat(coef[size * 2 - 1 - i]),
 1213|  20.9M|                                   window1),
 1214|  20.9M|            q_shift),
 1215|  20.9M|        ixheaacd_mac32x16in32_sat(rounding_fac, prev[i], window2));
 1216|  20.9M|    out[ch_fac * (size + i)] = accu;
 1217|  20.9M|  }
 1218|   121k|}
ixheaacd_over_lap_add2_dec:
 1222|   123k|                                WORD16 size, WORD16 ch_fac) {
 1223|   123k|  WORD32 accu;
 1224|   123k|  WORD32 i;
 1225|       |
 1226|  7.83M|  for (i = 0; i < size; i++) {
  ------------------
  |  Branch (1226:15): [True: 7.70M, False: 123k]
  ------------------
 1227|  7.70M|    accu = ixheaac_sub32_sat(
 1228|  7.70M|        ixheaac_mult32x16in32(coef[size + i], window[2 * i]),
 1229|  7.70M|        ixheaac_mult32x16in32(prev[size - 1 - i], window[2 * i + 1]));
 1230|  7.70M|    out[ch_fac * i] = ixheaac_shr32_sat(accu, 16 - (q_shift + 1));
 1231|  7.70M|  }
 1232|       |
 1233|  7.83M|  for (i = 0; i < size; i++) {
  ------------------
  |  Branch (1233:15): [True: 7.70M, False: 123k]
  ------------------
 1234|  7.70M|    accu = ixheaac_sub32_sat(
 1235|  7.70M|        ixheaac_mult32x16in32(ixheaac_negate32_sat(coef[size * 2 - 1 - i]),
 1236|  7.70M|                               window[2 * size - 2 * i - 1]),
 1237|  7.70M|        ixheaac_mult32x16in32(prev[i], window[2 * size - 2 * i - 2]));
 1238|  7.70M|    out[ch_fac * (i + size)] = ixheaac_shr32_sat(accu, 16 - (q_shift + 1));
 1239|  7.70M|  }
 1240|   123k|}
ixheaacd_process_single_scf:
 1245|  4.01M|                                 WORD32 aac_sf_data_resil_flag) {
 1246|  4.01M|  WORD32 j;
 1247|       |
 1248|  4.01M|  WORD32 temp1;
 1249|  4.01M|  WORD32 q_factor;
 1250|  4.01M|  WORD32 buffer1;
 1251|  4.01M|  WORD16 scale_short;
 1252|       |
 1253|  4.01M|  object_type = 0;
 1254|  4.01M|  aac_sf_data_resil_flag = 0;
 1255|       |
 1256|  4.01M|  if (scale_factor < 24) {
  ------------------
  |  Branch (1256:7): [True: 2.04M, False: 1.97M]
  ------------------
 1257|  21.6M|    for (j = width; j > 0; j--) {
  ------------------
  |  Branch (1257:21): [True: 19.6M, False: 2.04M]
  ------------------
 1258|  19.6M|      *x_invquant++ = 0;
 1259|  19.6M|    }
 1260|  2.04M|  } else {
 1261|  1.97M|    WORD32 shift;
 1262|       |
 1263|  1.97M|    if (total_channels > 2)
  ------------------
  |  Branch (1263:9): [True: 163k, False: 1.80M]
  ------------------
 1264|   163k|      q_factor = 34 - (scale_factor >> 2);
 1265|  1.80M|    else
 1266|  1.80M|      q_factor = 37 - (scale_factor >> 2);
 1267|       |
 1268|  1.97M|    scale_short = ptr_scale_table[(scale_factor & 0x0003)];
 1269|  1.97M|    shift = q_factor;
 1270|  1.97M|    if (shift > 0) {
  ------------------
  |  Branch (1270:9): [True: 794k, False: 1.17M]
  ------------------
 1271|   794k|      if (scale_short == (WORD16)0x8000) {
  ------------------
  |  Branch (1271:11): [True: 0, False: 794k]
  ------------------
 1272|      0|        for (j = width; j > 0; j--) {
  ------------------
  |  Branch (1272:25): [True: 0, False: 0]
  ------------------
 1273|      0|          temp1 = *x_invquant;
 1274|      0|          buffer1 = ixheaac_mult32x16in32_shl_sat(temp1, scale_short);
 1275|      0|          buffer1 = ixheaac_shr32(buffer1, shift);
 1276|      0|          *x_invquant++ = buffer1;
 1277|      0|        }
 1278|   794k|      } else {
 1279|  12.7M|        for (j = width; j > 0; j--) {
  ------------------
  |  Branch (1279:25): [True: 11.9M, False: 794k]
  ------------------
 1280|  11.9M|          temp1 = *x_invquant;
 1281|  11.9M|          buffer1 = ixheaac_mult32x16in32_shl(temp1, scale_short);
 1282|  11.9M|          buffer1 = ixheaac_shr32(buffer1, shift);
 1283|  11.9M|          *x_invquant++ = buffer1;
 1284|  11.9M|        }
 1285|   794k|      }
 1286|  1.17M|    } else {
 1287|  1.17M|      shift = -shift;
 1288|  1.17M|      if (shift > 0) {
  ------------------
  |  Branch (1288:11): [True: 1.17M, False: 1.64k]
  ------------------
 1289|  1.17M|        if (scale_short == (WORD16)0x8000) {
  ------------------
  |  Branch (1289:13): [True: 0, False: 1.17M]
  ------------------
 1290|      0|          for (j = width; j > 0; j--) {
  ------------------
  |  Branch (1290:27): [True: 0, False: 0]
  ------------------
 1291|      0|            temp1 = *x_invquant;
 1292|      0|            temp1 = ixheaac_shl32(temp1, shift - 1);
 1293|      0|            buffer1 = ixheaac_mult32x16in32_shl_sat(temp1, scale_short);
 1294|      0|            buffer1 = ixheaac_shl32(buffer1, 1);
 1295|      0|            *x_invquant++ = buffer1;
 1296|      0|          }
 1297|  1.17M|        } else {
 1298|  12.8M|          for (j = width; j > 0; j--) {
  ------------------
  |  Branch (1298:27): [True: 11.6M, False: 1.17M]
  ------------------
 1299|  11.6M|            temp1 = *x_invquant;
 1300|  11.6M|            temp1 = ixheaac_shl32(temp1, shift - 1);
 1301|  11.6M|            buffer1 = ixheaac_mult32x16in32_shl(temp1, scale_short);
 1302|  11.6M|            buffer1 = ixheaac_shl32(buffer1, 1);
 1303|  11.6M|            *x_invquant++ = buffer1;
 1304|  11.6M|          }
 1305|  1.17M|        }
 1306|       |
 1307|  1.17M|      } else {
 1308|  1.64k|        if (scale_short == (WORD16)0x8000) {
  ------------------
  |  Branch (1308:13): [True: 0, False: 1.64k]
  ------------------
 1309|      0|          for (j = width; j > 0; j--) {
  ------------------
  |  Branch (1309:27): [True: 0, False: 0]
  ------------------
 1310|      0|            temp1 = *x_invquant;
 1311|      0|            buffer1 = ixheaac_mult32x16in32_shl_sat(temp1, scale_short);
 1312|      0|            *x_invquant++ = buffer1;
 1313|      0|          }
 1314|  1.64k|        } else {
 1315|  17.7k|          for (j = width; j > 0; j--) {
  ------------------
  |  Branch (1315:27): [True: 16.1k, False: 1.64k]
  ------------------
 1316|  16.1k|            temp1 = *x_invquant;
 1317|  16.1k|            buffer1 = ixheaac_mult32x16in32_shl(temp1, scale_short);
 1318|  16.1k|            *x_invquant++ = buffer1;
 1319|  16.1k|          }
 1320|  1.64k|        }
 1321|  1.64k|      }
 1322|  1.17M|    }
 1323|  1.97M|  }
 1324|  4.01M|}
ixheaacd_scale_factor_process_dec:
 1331|   453k|                                       WORD32 aac_sf_data_resil_flag) {
 1332|   453k|  WORD32 i;
 1333|   453k|  WORD16 scale_factor;
 1334|       |
 1335|  4.47M|  for (i = no_band - 1; i >= 0; i--) {
  ------------------
  |  Branch (1335:25): [True: 4.01M, False: 453k]
  ------------------
 1336|  4.01M|    scale_factor = *scale_fact++;
 1337|  4.01M|    ixheaacd_process_single_scf(scale_factor, x_invquant, *width,
 1338|  4.01M|                                ptr_scale_table, total_channels, object_type,
 1339|  4.01M|                                aac_sf_data_resil_flag);
 1340|       |
 1341|  4.01M|    x_invquant += *width;
 1342|  4.01M|    width++;
 1343|  4.01M|  }
 1344|   453k|}
ixheaacd_right_shift_block:
 1347|  12.3k|                                WORD32 shift_val) {
 1348|  12.3k|  WORD32 i;
 1349|  12.3k|  WORD32 temp1, temp2;
 1350|  12.3k|  WORD32 *temp_ptr = &p_spectrum[0];
 1351|  12.3k|  length = length >> 2;
 1352|       |
 1353|   792k|  for (i = length - 1; i >= 0; i--) {
  ------------------
  |  Branch (1353:24): [True: 780k, False: 12.3k]
  ------------------
 1354|   780k|    temp1 = *temp_ptr;
 1355|   780k|    temp2 = *(temp_ptr + 1);
 1356|   780k|    *temp_ptr++ = temp1 >> shift_val;
 1357|   780k|    temp1 = *(temp_ptr + 1);
 1358|   780k|    *temp_ptr++ = temp2 >> shift_val;
 1359|   780k|    temp2 = *(temp_ptr + 1);
 1360|   780k|    *temp_ptr++ = temp1 >> shift_val;
 1361|   780k|    *temp_ptr++ = temp2 >> shift_val;
 1362|   780k|  }
 1363|  12.3k|}
ixheaacd_block.c:ixheaacd_huffman_dec_word1:
  132|  51.7k|    WORD32 *ixheaacd_pow_table_Q13, const UWORD32 *idx_table, WORD32 maximum_bins_short) {
  133|  51.7k|  WORD32 sp1, sp2;
  134|  51.7k|  WORD32 flush_cw;
  135|  51.7k|  WORD32 i, value, norm_val, off;
  136|  51.7k|  WORD idx, grp_idx;
  137|  51.7k|  WORD32 out1, out2;
  138|  51.7k|  WORD32 err_code = 0;
  139|  51.7k|  WORD len_idx = 0;
  140|  51.7k|  UWORD8 *ptr_read_next = it_bit_buff->ptr_read_next;
  141|  51.7k|  WORD32 bit_pos = it_bit_buff->bit_pos;
  142|  51.7k|  WORD16 index;
  143|  51.7k|  WORD32 length;
  144|  51.7k|  WORD32 read_word;
  145|  51.7k|  WORD32 increment;
  146|       |
  147|  51.7k|  read_word = ixheaacd_aac_showbits_32(ptr_read_next, it_bit_buff->cnt_bits,
  148|  51.7k|                                       &increment);
  149|  51.7k|  ptr_read_next += increment;
  150|       |
  151|  53.5k|  do {
  152|  53.5k|    len_idx = offsets[1] - offsets[0];
  153|  53.5k|    grp_idx = group_len;
  154|       |
  155|   116k|    do {
  156|   116k|      spec_coef = spec_coef + offsets[0];
  157|   116k|      idx = len_idx;
  158|   439k|      do {
  159|   439k|        {
  160|   439k|          UWORD32 read_word1;
  161|       |
  162|   439k|          read_word1 = read_word << bit_pos;
  163|   439k|          ixheaacd_huff_sfb_table(read_word1, &index, &length, code_book_tbl,
  164|   439k|                                  idx_table);
  165|   439k|          bit_pos += length;
  166|   439k|          ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
  167|   439k|                                      it_bit_buff->ptr_bit_buf_end);
  168|   439k|        }
  169|       |
  170|   439k|        out1 = index / 17;
  171|   439k|        out2 = index - out1 * 17;
  172|   439k|        flush_cw = read_word << bit_pos;
  173|       |
  174|   439k|        sp1 = out1;
  175|   439k|        sp2 = out2;
  176|       |
  177|   439k|        if (out1) {
  ------------------
  |  Branch (177:13): [True: 221k, False: 217k]
  ------------------
  178|   221k|          if (flush_cw & 0x80000000) {
  ------------------
  |  Branch (178:15): [True: 156k, False: 65.1k]
  ------------------
  179|   156k|            out1 = -out1;
  180|   156k|          }
  181|   221k|          bit_pos++;
  182|   221k|          flush_cw = (WORD32)flush_cw << 1;
  183|   221k|        }
  184|       |
  185|   439k|        if (out2) {
  ------------------
  |  Branch (185:13): [True: 214k, False: 225k]
  ------------------
  186|   214k|          bit_pos++;
  187|   214k|          if (flush_cw & 0x80000000) {
  ------------------
  |  Branch (187:15): [True: 122k, False: 92.0k]
  ------------------
  188|   122k|            out2 = -out2;
  189|   122k|          }
  190|   214k|        }
  191|   439k|        ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
  192|   439k|                                    it_bit_buff->ptr_bit_buf_end);
  193|       |
  194|   439k|        if (sp1 == 16) {
  ------------------
  |  Branch (194:13): [True: 17.8k, False: 421k]
  ------------------
  195|  17.8k|          i = 4;
  196|  17.8k|          value = ixheaac_extu(read_word, bit_pos, 23);
  197|  17.8k|          value = value | 0xfffffe00;
  198|  17.8k|          norm_val = ixheaac_norm32(value);
  199|       |
  200|  17.8k|          i += (norm_val - 22);
  201|  17.8k|          bit_pos += (norm_val - 21);
  202|  17.8k|          ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
  203|  17.8k|                                      it_bit_buff->ptr_bit_buf_end);
  204|       |
  205|  17.8k|          off = ixheaac_extu(read_word, bit_pos, 32 - i);
  206|       |
  207|  17.8k|          bit_pos += i;
  208|       |
  209|  17.8k|          ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
  210|  17.8k|                                      it_bit_buff->ptr_bit_buf_end);
  211|  17.8k|          ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
  212|  17.8k|                                      it_bit_buff->ptr_bit_buf_end);
  213|       |
  214|  17.8k|          i = off + ((WORD32)1 << i);
  215|       |
  216|  17.8k|          if (i <= IQ_TABLE_SIZE_HALF)
  ------------------
  |  |   23|  17.8k|#define IQ_TABLE_SIZE_HALF 128
  ------------------
  |  Branch (216:15): [True: 15.7k, False: 2.15k]
  ------------------
  217|  15.7k|            i = ixheaacd_pow_table_Q13[i];
  218|  2.15k|          else {
  219|  2.15k|            err_code |= ixheaacd_inv_quant(&i, ixheaacd_pow_table_Q13);
  220|  2.15k|          }
  221|       |
  222|  17.8k|          if (out1 < 0) {
  ------------------
  |  Branch (222:15): [True: 6.64k, False: 11.2k]
  ------------------
  223|  6.64k|            out1 = -i;
  224|  11.2k|          } else {
  225|  11.2k|            out1 = i;
  226|  11.2k|          }
  227|  17.8k|          *spec_coef++ = out1;
  228|   421k|        } else {
  229|   421k|          if (out1 <= 0) {
  ------------------
  |  Branch (229:15): [True: 367k, False: 53.9k]
  ------------------
  230|   367k|            out1 = -out1;
  231|   367k|            out1 = ixheaacd_pow_table_Q13[out1];
  232|   367k|            *spec_coef++ = -out1;
  233|   367k|          } else {
  234|  53.9k|            out1 = ixheaacd_pow_table_Q13[out1];
  235|  53.9k|            *spec_coef++ = out1;
  236|  53.9k|          }
  237|   421k|        }
  238|       |
  239|   439k|        if (sp2 == 16) {
  ------------------
  |  Branch (239:13): [True: 17.3k, False: 422k]
  ------------------
  240|  17.3k|          i = 4;
  241|  17.3k|          value = ixheaac_extu(read_word, bit_pos, 23);
  242|  17.3k|          value = value | 0xfffffe00;
  243|  17.3k|          norm_val = ixheaac_norm32(value);
  244|       |
  245|  17.3k|          i += (norm_val - 22);
  246|       |
  247|  17.3k|          bit_pos += (norm_val - 21);
  248|  17.3k|          ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
  249|  17.3k|                                      it_bit_buff->ptr_bit_buf_end);
  250|       |
  251|  17.3k|          off = ixheaac_extu(read_word, bit_pos, 32 - i);
  252|       |
  253|  17.3k|          bit_pos += i;
  254|       |
  255|  17.3k|          ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
  256|  17.3k|                                      it_bit_buff->ptr_bit_buf_end);
  257|  17.3k|          ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
  258|  17.3k|                                      it_bit_buff->ptr_bit_buf_end);
  259|       |
  260|  17.3k|          i = off + ((WORD32)1 << i);
  261|       |
  262|  17.3k|          if (i <= IQ_TABLE_SIZE_HALF)
  ------------------
  |  |   23|  17.3k|#define IQ_TABLE_SIZE_HALF 128
  ------------------
  |  Branch (262:15): [True: 16.0k, False: 1.27k]
  ------------------
  263|  16.0k|            i = ixheaacd_pow_table_Q13[i];
  264|  1.27k|          else {
  265|  1.27k|            err_code |= ixheaacd_inv_quant(&i, ixheaacd_pow_table_Q13);
  266|  1.27k|          }
  267|       |
  268|  17.3k|          if (out2 < 0) {
  ------------------
  |  Branch (268:15): [True: 3.34k, False: 13.9k]
  ------------------
  269|  3.34k|            out2 = -i;
  270|  13.9k|          } else {
  271|  13.9k|            out2 = i;
  272|  13.9k|          }
  273|  17.3k|          *spec_coef++ = out2;
  274|   422k|        } else {
  275|   422k|          if (out2 <= 0) {
  ------------------
  |  Branch (275:15): [True: 344k, False: 78.1k]
  ------------------
  276|   344k|            out2 = -out2;
  277|   344k|            out2 = ixheaacd_pow_table_Q13[out2];
  278|   344k|            *spec_coef++ = -out2;
  279|   344k|          } else {
  280|  78.1k|            out2 = ixheaacd_pow_table_Q13[out2];
  281|  78.1k|            *spec_coef++ = out2;
  282|  78.1k|          }
  283|   422k|        }
  284|       |
  285|   439k|        idx -= 2;
  286|   439k|      } while (idx != 0);
  ------------------
  |  Branch (286:16): [True: 322k, False: 116k]
  ------------------
  287|       |
  288|   116k|      if (maximum_bins_short == 120) {
  ------------------
  |  Branch (288:11): [True: 102k, False: 13.9k]
  ------------------
  289|   102k|        spec_coef += (maximum_bins_short - offsets[1]);
  290|   102k|      } else {
  291|  13.9k|        spec_coef += (MAX_BINS_SHORT - offsets[1]);
  ------------------
  |  |   29|  13.9k|#define MAX_BINS_SHORT 128
  ------------------
  292|  13.9k|      }
  293|       |
  294|   116k|      grp_idx--;
  295|   116k|    } while (grp_idx != 0);
  ------------------
  |  Branch (295:14): [True: 63.2k, False: 53.5k]
  ------------------
  296|       |
  297|  53.5k|    offsets++;
  298|       |
  299|  53.5k|    if (maximum_bins_short == 120) {
  ------------------
  |  Branch (299:9): [True: 47.4k, False: 6.11k]
  ------------------
  300|  47.4k|      spec_coef -= (maximum_bins_short * group_len);
  301|  47.4k|    } else {
  302|  6.11k|      spec_coef -= (MAX_BINS_SHORT * group_len);
  ------------------
  |  |   29|  6.11k|#define MAX_BINS_SHORT 128
  ------------------
  303|  6.11k|    }
  304|       |
  305|  53.5k|    no_bands--;
  306|  53.5k|  } while (no_bands >= 0);
  ------------------
  |  Branch (306:12): [True: 1.75k, False: 51.7k]
  ------------------
  307|       |
  308|  51.7k|  ptr_read_next = ptr_read_next - increment;
  309|  51.7k|  ixheaacd_aac_read_byte_corr1(&ptr_read_next, &bit_pos, &read_word,
  310|  51.7k|                               it_bit_buff->ptr_bit_buf_end);
  311|       |
  312|  51.7k|  it_bit_buff->bit_pos = bit_pos;
  313|  51.7k|  it_bit_buff->ptr_read_next = ptr_read_next;
  314|       |
  315|  51.7k|  return err_code;
  316|  51.7k|}
ixheaacd_block.c:ixheaacd_huffman_dec_quad:
  483|  5.00k|    WORD32 maximum_bins_short) {
  484|  5.00k|  WORD idx, grp_idx;
  485|  5.00k|  WORD idx_len;
  486|  5.00k|  WORD32 *spec_orig;
  487|  5.00k|  WORD16 index, length;
  488|  5.00k|  UWORD8 *ptr_read_next = it_bit_buff->ptr_read_next;
  489|  5.00k|  WORD32 bit_pos = it_bit_buff->bit_pos;
  490|  5.00k|  WORD32 read_word;
  491|  5.00k|  WORD32 increment;
  492|       |
  493|  5.00k|  read_word = ixheaacd_aac_showbits_32(ptr_read_next, it_bit_buff->cnt_bits,
  494|  5.00k|                                       &increment);
  495|  5.00k|  ptr_read_next += increment;
  496|  5.00k|  spec_orig = spec_coef;
  497|  22.2k|  do {
  498|  22.2k|    idx_len = offsets[1] - offsets[0];
  499|  22.2k|    grp_idx = group_len;
  500|       |
  501|  32.9k|    do {
  502|  32.9k|      spec_coef = spec_coef + offsets[0];
  503|  32.9k|      idx = idx_len;
  504|  55.9k|      do {
  505|  55.9k|        UWORD32 read_word1;
  506|       |
  507|  55.9k|        read_word1 = read_word << bit_pos;
  508|  55.9k|        ixheaacd_huffman_decode(read_word1, &index, &length, code_book_tbl,
  509|  55.9k|                                idx_table);
  510|  55.9k|        bit_pos += length;
  511|  55.9k|        ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
  512|  55.9k|                                    it_bit_buff->ptr_bit_buf_end);
  513|  55.9k|        if (tbl_sign) {
  ------------------
  |  Branch (513:13): [True: 23.4k, False: 32.5k]
  ------------------
  514|  23.4k|          WORD32 temp_word;
  515|  23.4k|          WORD32 w, x, y, z;
  516|  23.4k|          temp_word = read_word << bit_pos;
  517|  23.4k|          w = index / 27;
  518|  23.4k|          index = index - w * 27;
  519|  23.4k|          x = index / 9;
  520|  23.4k|          index = index - x * 9;
  521|  23.4k|          y = index / 3;
  522|  23.4k|          z = index - y * 3;
  523|  23.4k|          if (w) {
  ------------------
  |  Branch (523:15): [True: 16.5k, False: 6.87k]
  ------------------
  524|  16.5k|            w = ixheaacd_pow_table_Q13[w];
  525|  16.5k|            if (temp_word & 0x80000000) w = -w;
  ------------------
  |  Branch (525:17): [True: 1.48k, False: 15.0k]
  ------------------
  526|  16.5k|            temp_word <<= 1;
  527|  16.5k|            bit_pos++;
  528|  16.5k|          }
  529|  23.4k|          *spec_coef++ = w;
  530|       |
  531|  23.4k|          if (x) {
  ------------------
  |  Branch (531:15): [True: 17.0k, False: 6.33k]
  ------------------
  532|  17.0k|            x = ixheaacd_pow_table_Q13[x];
  533|  17.0k|            if (temp_word & 0x80000000) x = -x;
  ------------------
  |  Branch (533:17): [True: 998, False: 16.0k]
  ------------------
  534|  17.0k|            temp_word <<= 1;
  535|  17.0k|            bit_pos++;
  536|  17.0k|          }
  537|  23.4k|          *spec_coef++ = x;
  538|  23.4k|          if (y) {
  ------------------
  |  Branch (538:15): [True: 17.3k, False: 6.04k]
  ------------------
  539|  17.3k|            y = ixheaacd_pow_table_Q13[y];
  540|  17.3k|            if (temp_word & 0x80000000) y = -y;
  ------------------
  |  Branch (540:17): [True: 5.26k, False: 12.0k]
  ------------------
  541|  17.3k|            temp_word <<= 1;
  542|  17.3k|            bit_pos++;
  543|  17.3k|          }
  544|  23.4k|          *spec_coef++ = y;
  545|  23.4k|          if (z) {
  ------------------
  |  Branch (545:15): [True: 17.7k, False: 5.61k]
  ------------------
  546|  17.7k|            z = ixheaacd_pow_table_Q13[z];
  547|  17.7k|            if (temp_word & 0x80000000) z = -z;
  ------------------
  |  Branch (547:17): [True: 2.57k, False: 15.2k]
  ------------------
  548|  17.7k|            temp_word <<= 1;
  549|  17.7k|            bit_pos++;
  550|  17.7k|          }
  551|  23.4k|          *spec_coef++ = z;
  552|       |
  553|  23.4k|        }
  554|       |
  555|  32.5k|        else {
  556|  32.5k|          WORD32 w, x, y, z;
  557|       |
  558|  32.5k|          w = index / 27 - 1;
  559|  32.5k|          index = index - (w + 1) * 27;
  560|  32.5k|          x = index / 9 - 1;
  561|  32.5k|          index = index - (x + 1) * 9;
  562|  32.5k|          y = index / 3 - 1;
  563|  32.5k|          z = index - ((y + 1) * 3) - 1;
  564|  32.5k|          if (w < 0) {
  ------------------
  |  Branch (564:15): [True: 2.58k, False: 29.9k]
  ------------------
  565|  2.58k|            w = -w;
  566|  2.58k|            w = ixheaacd_pow_table_Q13[w];
  567|  2.58k|            w = -w;
  568|  2.58k|          } else
  569|  29.9k|            w = ixheaacd_pow_table_Q13[w];
  570|       |
  571|  32.5k|          *spec_coef++ = w;
  572|       |
  573|  32.5k|          if (x < 0) {
  ------------------
  |  Branch (573:15): [True: 1.80k, False: 30.7k]
  ------------------
  574|  1.80k|            x = -x;
  575|  1.80k|            x = ixheaacd_pow_table_Q13[x];
  576|  1.80k|            x = -x;
  577|  1.80k|          } else
  578|  30.7k|            x = ixheaacd_pow_table_Q13[x];
  579|       |
  580|  32.5k|          *spec_coef++ = x;
  581|       |
  582|  32.5k|          if (y < 0) {
  ------------------
  |  Branch (582:15): [True: 3.46k, False: 29.0k]
  ------------------
  583|  3.46k|            y = -y;
  584|  3.46k|            y = ixheaacd_pow_table_Q13[y];
  585|  3.46k|            y = -y;
  586|  3.46k|          } else
  587|  29.0k|            y = ixheaacd_pow_table_Q13[y];
  588|       |
  589|  32.5k|          *spec_coef++ = y;
  590|       |
  591|  32.5k|          if (z < 0) {
  ------------------
  |  Branch (591:15): [True: 2.71k, False: 29.7k]
  ------------------
  592|  2.71k|            z = -z;
  593|  2.71k|            z = ixheaacd_pow_table_Q13[z];
  594|  2.71k|            z = -z;
  595|  2.71k|          } else
  596|  29.7k|            z = ixheaacd_pow_table_Q13[z];
  597|       |
  598|  32.5k|          *spec_coef++ = z;
  599|  32.5k|        }
  600|       |
  601|  55.9k|        ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
  602|  55.9k|                                    it_bit_buff->ptr_bit_buf_end);
  603|  55.9k|        idx -= 4;
  604|  55.9k|      } while (idx != 0);
  ------------------
  |  Branch (604:16): [True: 22.9k, False: 32.9k]
  ------------------
  605|       |
  606|  32.9k|      if (maximum_bins_short == 120) {
  ------------------
  |  Branch (606:11): [True: 25.5k, False: 7.42k]
  ------------------
  607|  25.5k|        spec_coef += (maximum_bins_short - offsets[1]);
  608|  25.5k|      } else {
  609|  7.42k|        spec_coef += (MAX_BINS_SHORT - offsets[1]);
  ------------------
  |  |   29|  7.42k|#define MAX_BINS_SHORT 128
  ------------------
  610|  7.42k|      }
  611|       |
  612|  32.9k|      grp_idx--;
  613|  32.9k|    } while (grp_idx != 0);
  ------------------
  |  Branch (613:14): [True: 10.7k, False: 22.2k]
  ------------------
  614|  22.2k|    offsets++;
  615|  22.2k|    spec_coef = spec_orig;
  616|  22.2k|    no_bands--;
  617|  22.2k|  } while (no_bands >= 0);
  ------------------
  |  Branch (617:12): [True: 17.2k, False: 5.00k]
  ------------------
  618|       |
  619|  5.00k|  ptr_read_next = ptr_read_next - increment;
  620|  5.00k|  ixheaacd_aac_read_byte_corr1(&ptr_read_next, &bit_pos, &read_word,
  621|  5.00k|                               it_bit_buff->ptr_bit_buf_end);
  622|  5.00k|  it_bit_buff->ptr_read_next = ptr_read_next;
  623|  5.00k|  it_bit_buff->bit_pos = bit_pos;
  624|       |
  625|  5.00k|  return 0;
  626|  5.00k|}
ixheaacd_block.c:ixheaacd_huffman_dec_pair:
  794|  7.77k|    WORD32 huff_mode, WORD32 maximum_bins_short) {
  795|  7.77k|  WORD idx, grp_idx;
  796|  7.77k|  WORD len_idx;
  797|  7.77k|  WORD16 index, length;
  798|  7.77k|  WORD32 y, z;
  799|  7.77k|  WORD32 *spec_orig = spec_coef;
  800|       |
  801|  7.77k|  UWORD8 *ptr_read_next = it_bit_buff->ptr_read_next;
  802|  7.77k|  WORD32 bit_pos = it_bit_buff->bit_pos;
  803|  7.77k|  WORD32 read_word;
  804|  7.77k|  WORD32 increment;
  805|       |
  806|  7.77k|  read_word = ixheaacd_aac_showbits_32(ptr_read_next, it_bit_buff->cnt_bits,
  807|  7.77k|                                       &increment);
  808|  7.77k|  ptr_read_next += increment;
  809|       |
  810|  31.6k|  do {
  811|  31.6k|    len_idx = offsets[1] - offsets[0];
  812|  31.6k|    grp_idx = group_len;
  813|   132k|    do {
  814|   132k|      spec_coef += offsets[0];
  815|   132k|      idx = len_idx;
  816|   363k|      do {
  817|   363k|        UWORD32 read_word1;
  818|   363k|        read_word1 = read_word << bit_pos;
  819|   363k|        ixheaacd_huffman_decode(read_word1, &index, &length, code_book_tbl,
  820|   363k|                                idx_table);
  821|   363k|        bit_pos += length;
  822|   363k|        ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
  823|   363k|                                    it_bit_buff->ptr_bit_buf_end);
  824|   363k|        if (tbl_sign) {
  ------------------
  |  Branch (824:13): [True: 99.8k, False: 263k]
  ------------------
  825|  99.8k|          WORD32 temp_word;
  826|  99.8k|          temp_word = read_word << bit_pos;
  827|  99.8k|          y = index / huff_mode;
  828|  99.8k|          z = index - huff_mode * y;
  829|  99.8k|          if (y) {
  ------------------
  |  Branch (829:15): [True: 21.4k, False: 78.4k]
  ------------------
  830|  21.4k|            y = ixheaacd_pow_table_Q13[y];
  831|  21.4k|            if (temp_word & 0x80000000) y = -y;
  ------------------
  |  Branch (831:17): [True: 3.67k, False: 17.7k]
  ------------------
  832|       |
  833|  21.4k|            temp_word = temp_word << 1;
  834|  21.4k|            bit_pos++;
  835|  21.4k|          }
  836|  99.8k|          *spec_coef++ = y;
  837|       |
  838|  99.8k|          if (z) {
  ------------------
  |  Branch (838:15): [True: 19.6k, False: 80.2k]
  ------------------
  839|  19.6k|            z = ixheaacd_pow_table_Q13[z];
  840|  19.6k|            if (temp_word & 0x80000000) {
  ------------------
  |  Branch (840:17): [True: 6.16k, False: 13.5k]
  ------------------
  841|  6.16k|              z = -z;
  842|  6.16k|            }
  843|  19.6k|            temp_word <<= 1;
  844|  19.6k|            bit_pos++;
  845|  19.6k|          }
  846|  99.8k|          *spec_coef++ = z;
  847|   263k|        } else {
  848|   263k|          y = (index / huff_mode) - 4;
  849|   263k|          z = index - ((y + 4) * huff_mode) - 4;
  850|   263k|          if (y < 0) {
  ------------------
  |  Branch (850:15): [True: 29.7k, False: 233k]
  ------------------
  851|  29.7k|            y = -y;
  852|  29.7k|            y = ixheaacd_pow_table_Q13[y];
  853|  29.7k|            y = -y;
  854|  29.7k|          } else
  855|   233k|            y = ixheaacd_pow_table_Q13[y];
  856|       |
  857|   263k|          if (z < 0) {
  ------------------
  |  Branch (857:15): [True: 19.0k, False: 244k]
  ------------------
  858|  19.0k|            z = -z;
  859|  19.0k|            z = ixheaacd_pow_table_Q13[z];
  860|  19.0k|            z = -z;
  861|  19.0k|          } else
  862|   244k|            z = ixheaacd_pow_table_Q13[z];
  863|       |
  864|   263k|          *spec_coef++ = y;
  865|   263k|          *spec_coef++ = z;
  866|   263k|        }
  867|   363k|        ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
  868|   363k|                                    it_bit_buff->ptr_bit_buf_end);
  869|   363k|        idx -= 2;
  870|   363k|      } while (idx != 0);
  ------------------
  |  Branch (870:16): [True: 231k, False: 132k]
  ------------------
  871|       |
  872|   132k|      if (maximum_bins_short == 120)
  ------------------
  |  Branch (872:11): [True: 22.0k, False: 109k]
  ------------------
  873|  22.0k|        spec_coef += (maximum_bins_short - offsets[1]);
  874|   109k|      else
  875|   109k|        spec_coef += (MAX_BINS_SHORT - offsets[1]);
  ------------------
  |  |   29|   109k|#define MAX_BINS_SHORT 128
  ------------------
  876|       |
  877|   132k|      grp_idx--;
  878|   132k|    } while (grp_idx != 0);
  ------------------
  |  Branch (878:14): [True: 100k, False: 31.6k]
  ------------------
  879|       |
  880|  31.6k|    offsets++;
  881|  31.6k|    spec_coef = spec_orig;
  882|  31.6k|    no_bands--;
  883|  31.6k|  } while (no_bands >= 0);
  ------------------
  |  Branch (883:12): [True: 23.8k, False: 7.77k]
  ------------------
  884|       |
  885|  7.77k|  ptr_read_next = ptr_read_next - increment;
  886|  7.77k|  ixheaacd_aac_read_byte_corr1(&ptr_read_next, &bit_pos, &read_word,
  887|  7.77k|                               it_bit_buff->ptr_bit_buf_end);
  888|  7.77k|  it_bit_buff->ptr_read_next = ptr_read_next;
  889|  7.77k|  it_bit_buff->bit_pos = bit_pos;
  890|       |
  891|  7.77k|  return 0;
  892|  7.77k|}
ixheaacd_block.c:ixheaacd_huffman_dec_word2_11:
  321|  57.4k|    const UWORD32 *idx_table) {
  322|  57.4k|  WORD32 sp1, sp2;
  323|  57.4k|  WORD32 flush_cw;
  324|  57.4k|  WORD32 i, value, norm_val, off;
  325|  57.4k|  WORD idx;
  326|  57.4k|  WORD32 out1, out2;
  327|  57.4k|  WORD32 err_code = 0;
  328|  57.4k|  WORD16 index;
  329|  57.4k|  WORD32 length;
  330|  57.4k|  UWORD8 *ptr_read_next = it_bit_buff->ptr_read_next;
  331|  57.4k|  WORD32 bit_pos = it_bit_buff->bit_pos;
  332|  57.4k|  WORD32 read_word;
  333|  57.4k|  WORD32 increment;
  334|       |
  335|  57.4k|  read_word = ixheaacd_aac_showbits_32(ptr_read_next, it_bit_buff->cnt_bits,
  336|  57.4k|                                       &increment);
  337|  57.4k|  ptr_read_next += increment;
  338|       |
  339|  1.38M|  for (idx = width; idx != 0; idx -= 2) {
  ------------------
  |  Branch (339:21): [True: 1.32M, False: 57.4k]
  ------------------
  340|  1.32M|    {
  341|  1.32M|      UWORD32 read_word1;
  342|       |
  343|  1.32M|      read_word1 = read_word << bit_pos;
  344|  1.32M|      ixheaacd_huff_sfb_table(read_word1, &index, &length, code_book_tbl,
  345|  1.32M|                              idx_table);
  346|  1.32M|      bit_pos += length;
  347|  1.32M|      ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
  348|  1.32M|                                  it_bit_buff->ptr_bit_buf_end);
  349|  1.32M|    }
  350|       |
  351|  1.32M|    flush_cw = read_word << bit_pos;
  352|  1.32M|    out1 = index / 17;
  353|  1.32M|    out2 = index - out1 * 17;
  354|  1.32M|    sp1 = out1;
  355|       |
  356|  1.32M|    if (out1) {
  ------------------
  |  Branch (356:9): [True: 757k, False: 572k]
  ------------------
  357|   757k|      if (flush_cw & 0x80000000) {
  ------------------
  |  Branch (357:11): [True: 477k, False: 279k]
  ------------------
  358|   477k|        out1 = -out1;
  359|   477k|      }
  360|       |
  361|   757k|      bit_pos++;
  362|   757k|      flush_cw = (WORD32)flush_cw << 1;
  363|   757k|    }
  364|       |
  365|  1.32M|    sp2 = out2;
  366|  1.32M|    if (out2) {
  ------------------
  |  Branch (366:9): [True: 744k, False: 585k]
  ------------------
  367|   744k|      bit_pos++;
  368|   744k|      if (flush_cw & 0x80000000) {
  ------------------
  |  Branch (368:11): [True: 351k, False: 393k]
  ------------------
  369|   351k|        out2 = -out2;
  370|   351k|      }
  371|   744k|    }
  372|       |
  373|  1.32M|    ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
  374|  1.32M|                                it_bit_buff->ptr_bit_buf_end);
  375|       |
  376|  1.32M|    if (sp1 == 16) {
  ------------------
  |  Branch (376:9): [True: 69.7k, False: 1.26M]
  ------------------
  377|  69.7k|      i = 4;
  378|  69.7k|      value = ixheaac_extu(read_word, bit_pos, 23);
  379|  69.7k|      value = value | 0xfffffe00;
  380|  69.7k|      norm_val = ixheaac_norm32(value);
  381|  69.7k|      i += (norm_val - 22);
  382|  69.7k|      bit_pos += (norm_val - 21);
  383|       |
  384|  69.7k|      ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
  385|  69.7k|                                  it_bit_buff->ptr_bit_buf_end);
  386|       |
  387|  69.7k|      off = ixheaac_extu(read_word, bit_pos, 32 - i);
  388|       |
  389|  69.7k|      bit_pos += i;
  390|  69.7k|      ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
  391|  69.7k|                                  it_bit_buff->ptr_bit_buf_end);
  392|       |
  393|  69.7k|      value = *ptr_scratch++;
  394|       |
  395|  69.7k|      ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
  396|  69.7k|                                  it_bit_buff->ptr_bit_buf_end);
  397|  69.7k|      i = off + ((WORD32)1 << i);
  398|  69.7k|      i += value;
  399|       |
  400|  69.7k|      if (i <= IQ_TABLE_SIZE_HALF)
  ------------------
  |  |   23|  69.7k|#define IQ_TABLE_SIZE_HALF 128
  ------------------
  |  Branch (400:11): [True: 66.3k, False: 3.35k]
  ------------------
  401|  66.3k|        i = ixheaacd_pow_table_Q13[i];
  402|  3.35k|      else {
  403|  3.35k|        err_code |= ixheaacd_inv_quant(&i, ixheaacd_pow_table_Q13);
  404|  3.35k|      }
  405|  69.7k|      if (out1 < 0) {
  ------------------
  |  Branch (405:11): [True: 32.2k, False: 37.4k]
  ------------------
  406|  32.2k|        i = -i;
  407|  32.2k|      }
  408|  69.7k|      *x_invquant++ = i;
  409|  1.26M|    } else {
  410|  1.26M|      WORD8 temp = *ptr_scratch++;
  411|  1.26M|      if (out1 <= 0) {
  ------------------
  |  Branch (411:11): [True: 1.01M, False: 242k]
  ------------------
  412|  1.01M|        out1 = temp - out1;
  413|  1.01M|        out1 = ixheaacd_pow_table_Q13[out1];
  414|  1.01M|        *x_invquant++ = -out1;
  415|  1.01M|      } else {
  416|   242k|        out1 += temp;
  417|   242k|        out1 = ixheaacd_pow_table_Q13[out1];
  418|   242k|        *x_invquant++ = out1;
  419|   242k|      }
  420|  1.26M|    }
  421|       |
  422|  1.32M|    if (sp2 == 16) {
  ------------------
  |  Branch (422:9): [True: 67.6k, False: 1.26M]
  ------------------
  423|  67.6k|      i = 4;
  424|  67.6k|      value = ixheaac_extu(read_word, bit_pos, 23);
  425|  67.6k|      value = value | 0xfffffe00;
  426|  67.6k|      norm_val = ixheaac_norm32(value);
  427|       |
  428|  67.6k|      i += (norm_val - 22);
  429|       |
  430|  67.6k|      bit_pos += (norm_val - 21);
  431|  67.6k|      ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
  432|  67.6k|                                  it_bit_buff->ptr_bit_buf_end);
  433|       |
  434|  67.6k|      off = ixheaac_extu(read_word, bit_pos, 32 - i);
  435|       |
  436|  67.6k|      bit_pos += i;
  437|  67.6k|      ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
  438|  67.6k|                                  it_bit_buff->ptr_bit_buf_end);
  439|  67.6k|      value = *ptr_scratch++;
  440|  67.6k|      ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
  441|  67.6k|                                  it_bit_buff->ptr_bit_buf_end);
  442|       |
  443|  67.6k|      i = off + ((WORD32)1 << i);
  444|  67.6k|      i += value;
  445|  67.6k|      if (i <= IQ_TABLE_SIZE_HALF)
  ------------------
  |  |   23|  67.6k|#define IQ_TABLE_SIZE_HALF 128
  ------------------
  |  Branch (445:11): [True: 61.4k, False: 6.26k]
  ------------------
  446|  61.4k|        i = ixheaacd_pow_table_Q13[i];
  447|  6.26k|      else {
  448|  6.26k|        err_code |= ixheaacd_inv_quant(&i, ixheaacd_pow_table_Q13);
  449|  6.26k|      }
  450|       |
  451|  67.6k|      if (out2 < 0) {
  ------------------
  |  Branch (451:11): [True: 20.7k, False: 46.9k]
  ------------------
  452|  20.7k|        i = -i;
  453|  20.7k|      }
  454|  67.6k|      *x_invquant++ = i;
  455|       |
  456|  1.26M|    } else {
  457|  1.26M|      WORD8 temp = *ptr_scratch++;
  458|  1.26M|      if (out2 <= 0) {
  ------------------
  |  Branch (458:11): [True: 916k, False: 346k]
  ------------------
  459|   916k|        out2 = temp - out2;
  460|   916k|        out2 = ixheaacd_pow_table_Q13[out2];
  461|   916k|        *x_invquant++ = -out2;
  462|   916k|      } else {
  463|   346k|        out2 += temp;
  464|   346k|        out2 = ixheaacd_pow_table_Q13[out2];
  465|   346k|        *x_invquant++ = out2;
  466|   346k|      }
  467|  1.26M|    }
  468|  1.32M|  }
  469|  57.4k|  ptr_read_next = ptr_read_next - increment;
  470|  57.4k|  ixheaacd_aac_read_byte_corr1(&ptr_read_next, &bit_pos, &read_word,
  471|  57.4k|                               it_bit_buff->ptr_bit_buf_end);
  472|       |
  473|  57.4k|  it_bit_buff->ptr_read_next = ptr_read_next;
  474|  57.4k|  it_bit_buff->bit_pos = bit_pos;
  475|       |
  476|  57.4k|  return err_code;
  477|  57.4k|}
ixheaacd_block.c:ixheaacd_huffman_dec_word2_quad:
  631|  26.0k|    WORD32 tbl_sign, const UWORD32 *idx_table) {
  632|  26.0k|  WORD idx;
  633|  26.0k|  WORD16 index, length;
  634|  26.0k|  UWORD8 *ptr_read_next = it_bit_buff->ptr_read_next;
  635|  26.0k|  WORD32 bit_pos = it_bit_buff->bit_pos;
  636|  26.0k|  WORD32 read_word;
  637|  26.0k|  WORD32 increment;
  638|       |
  639|  26.0k|  read_word = ixheaacd_aac_showbits_32(ptr_read_next, it_bit_buff->cnt_bits,
  640|  26.0k|                                       &increment);
  641|  26.0k|  ptr_read_next += increment;
  642|       |
  643|  1.37M|  for (idx = width; idx != 0; idx -= 4) {
  ------------------
  |  Branch (643:21): [True: 1.34M, False: 26.0k]
  ------------------
  644|  1.34M|    WORD32 ampres, ampres1;
  645|  1.34M|    WORD32 ampres2, ampres3;
  646|  1.34M|    UWORD32 read_word1;
  647|       |
  648|  1.34M|    read_word1 = read_word << bit_pos;
  649|  1.34M|    ixheaacd_huffman_decode(read_word1, &index, &length, code_book_tbl,
  650|  1.34M|                            idx_table);
  651|  1.34M|    bit_pos += length;
  652|  1.34M|    ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
  653|  1.34M|                                it_bit_buff->ptr_bit_buf_end);
  654|  1.34M|    if (tbl_sign) {
  ------------------
  |  Branch (654:9): [True: 990k, False: 356k]
  ------------------
  655|   990k|      WORD32 w, x, y, z;
  656|   990k|      WORD32 ampout0, ampout1, ampout2, ampout3;
  657|   990k|      WORD32 temp_word;
  658|   990k|      temp_word = read_word << bit_pos;
  659|       |
  660|   990k|      w = index / 27;
  661|   990k|      index = index - w * 27;
  662|   990k|      x = index / 9;
  663|   990k|      index = index - x * 9;
  664|   990k|      y = index / 3;
  665|   990k|      z = index - y * 3;
  666|       |
  667|   990k|      ampout0 = w + *ptr_scratch++;
  668|   990k|      ampout0 = ixheaacd_pow_table_Q13[ampout0];
  669|       |
  670|   990k|      if (w) {
  ------------------
  |  Branch (670:11): [True: 477k, False: 513k]
  ------------------
  671|   477k|        if (temp_word & 0x80000000) {
  ------------------
  |  Branch (671:13): [True: 233k, False: 244k]
  ------------------
  672|   233k|          ampout0 = -ampout0;
  673|   233k|        }
  674|   477k|        temp_word = temp_word << 1;
  675|   477k|        bit_pos++;
  676|   513k|      } else {
  677|   513k|        ampout0 = -ampout0;
  678|   513k|      }
  679|       |
  680|   990k|      ampout1 = x + *ptr_scratch++;
  681|   990k|      ampout1 = ixheaacd_pow_table_Q13[ampout1];
  682|       |
  683|   990k|      if (x) {
  ------------------
  |  Branch (683:11): [True: 354k, False: 636k]
  ------------------
  684|   354k|        if (temp_word & 0x80000000) {
  ------------------
  |  Branch (684:13): [True: 152k, False: 201k]
  ------------------
  685|   152k|          ampout1 = -ampout1;
  686|   152k|        }
  687|   354k|        temp_word = temp_word << 1;
  688|   354k|        bit_pos++;
  689|   636k|      } else {
  690|   636k|        ampout1 = -ampout1;
  691|   636k|      }
  692|       |
  693|   990k|      ampout2 = y + *ptr_scratch++;
  694|   990k|      ampout2 = ixheaacd_pow_table_Q13[ampout2];
  695|       |
  696|   990k|      if (y) {
  ------------------
  |  Branch (696:11): [True: 470k, False: 520k]
  ------------------
  697|   470k|        if (temp_word & 0x80000000) {
  ------------------
  |  Branch (697:13): [True: 242k, False: 227k]
  ------------------
  698|   242k|          ampout2 = -ampout2;
  699|   242k|        }
  700|   470k|        temp_word = temp_word << 1;
  701|   470k|        bit_pos++;
  702|   520k|      } else {
  703|   520k|        ampout2 = -ampout2;
  704|   520k|      }
  705|       |
  706|   990k|      ampout3 = z + *ptr_scratch++;
  707|   990k|      ampout3 = ixheaacd_pow_table_Q13[ampout3];
  708|       |
  709|   990k|      if (z) {
  ------------------
  |  Branch (709:11): [True: 465k, False: 525k]
  ------------------
  710|   465k|        if (temp_word & 0x80000000) {
  ------------------
  |  Branch (710:13): [True: 228k, False: 236k]
  ------------------
  711|   228k|          ampout3 = -ampout3;
  712|   228k|        }
  713|   465k|        temp_word = temp_word << 1;
  714|   465k|        bit_pos++;
  715|   525k|      } else {
  716|   525k|        ampout3 = -ampout3;
  717|   525k|      }
  718|   990k|      *x_invquant++ = ampout0;
  719|   990k|      *x_invquant++ = ampout1;
  720|   990k|      *x_invquant++ = ampout2;
  721|   990k|      *x_invquant++ = ampout3;
  722|   990k|    } else {
  723|   356k|      WORD32 w, x, y, z;
  724|   356k|      ampres = *ptr_scratch++;
  725|   356k|      ampres1 = *ptr_scratch++;
  726|   356k|      ampres2 = *ptr_scratch++;
  727|   356k|      ampres3 = *ptr_scratch++;
  728|       |
  729|   356k|      w = index / 27 - 1;
  730|   356k|      index = index - (w + 1) * 27;
  731|   356k|      x = index / 9 - 1;
  732|   356k|      index = index - (x + 1) * 9;
  733|   356k|      y = index / 3 - 1;
  734|   356k|      z = index - ((y + 1) * 3) - 1;
  735|   356k|      if (w <= 0) {
  ------------------
  |  Branch (735:11): [True: 318k, False: 37.8k]
  ------------------
  736|   318k|        ampres = ampres - w;
  737|   318k|        ampres = ixheaacd_pow_table_Q13[ampres];
  738|   318k|        ampres = -ampres;
  739|   318k|      } else {
  740|  37.8k|        ampres += w;
  741|  37.8k|        ampres = ixheaacd_pow_table_Q13[ampres];
  742|  37.8k|      }
  743|       |
  744|   356k|      if (x <= 0) {
  ------------------
  |  Branch (744:11): [True: 308k, False: 47.5k]
  ------------------
  745|   308k|        ampres1 = ampres1 - x;
  746|   308k|        ampres1 = ixheaacd_pow_table_Q13[ampres1];
  747|   308k|        ampres1 = -ampres1;
  748|   308k|      } else {
  749|  47.5k|        ampres1 += x;
  750|  47.5k|        ampres1 = ixheaacd_pow_table_Q13[ampres1];
  751|  47.5k|      }
  752|       |
  753|   356k|      if (y <= 0) {
  ------------------
  |  Branch (753:11): [True: 318k, False: 37.8k]
  ------------------
  754|   318k|        ampres2 = ampres2 - y;
  755|   318k|        ampres2 = ixheaacd_pow_table_Q13[ampres2];
  756|   318k|        ampres2 = -ampres2;
  757|   318k|      } else {
  758|  37.8k|        ampres2 += y;
  759|  37.8k|        ampres2 = ixheaacd_pow_table_Q13[ampres2];
  760|  37.8k|      }
  761|       |
  762|   356k|      if (z <= 0) {
  ------------------
  |  Branch (762:11): [True: 345k, False: 11.0k]
  ------------------
  763|   345k|        ampres3 = ampres3 - z;
  764|   345k|        ampres3 = ixheaacd_pow_table_Q13[ampres3];
  765|   345k|        ampres3 = -ampres3;
  766|   345k|      } else {
  767|  11.0k|        ampres3 += z;
  768|  11.0k|        ampres3 = ixheaacd_pow_table_Q13[ampres3];
  769|  11.0k|      }
  770|       |
  771|   356k|      *x_invquant++ = ampres;
  772|   356k|      *x_invquant++ = ampres1;
  773|   356k|      *x_invquant++ = ampres2;
  774|   356k|      *x_invquant++ = ampres3;
  775|   356k|    }
  776|       |
  777|  1.34M|    ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
  778|  1.34M|                                it_bit_buff->ptr_bit_buf_end);
  779|  1.34M|  }
  780|       |
  781|  26.0k|  ptr_read_next = ptr_read_next - increment;
  782|  26.0k|  ixheaacd_aac_read_byte_corr1(&ptr_read_next, &bit_pos, &read_word,
  783|  26.0k|                               it_bit_buff->ptr_bit_buf_end);
  784|  26.0k|  it_bit_buff->ptr_read_next = ptr_read_next;
  785|  26.0k|  it_bit_buff->bit_pos = bit_pos;
  786|       |
  787|  26.0k|  return 0;
  788|  26.0k|}
ixheaacd_block.c:ixheaacd_huffman_dec_word2_pair:
  899|  48.1k|{
  900|  48.1k|  WORD32 ampres;
  901|  48.1k|  WORD idx;
  902|  48.1k|  WORD16 index, length;
  903|  48.1k|  UWORD8 *ptr_read_next = it_bit_buff->ptr_read_next;
  904|  48.1k|  WORD32 bit_pos = it_bit_buff->bit_pos;
  905|  48.1k|  WORD32 read_word;
  906|  48.1k|  WORD32 increment;
  907|       |
  908|  48.1k|  read_word = ixheaacd_aac_showbits_32(ptr_read_next, it_bit_buff->cnt_bits,
  909|  48.1k|                                       &increment);
  910|  48.1k|  ptr_read_next += increment;
  911|       |
  912|   881k|  for (idx = width; idx != 0; idx -= 2) {
  ------------------
  |  Branch (912:21): [True: 832k, False: 48.1k]
  ------------------
  913|   832k|    {
  914|   832k|      UWORD32 read_word1;
  915|   832k|      read_word1 = read_word << bit_pos;
  916|   832k|      ixheaacd_huffman_decode(read_word1, &index, &length, code_book_tbl,
  917|   832k|                              idx_table);
  918|   832k|      bit_pos += length;
  919|   832k|      ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
  920|   832k|                                  it_bit_buff->ptr_bit_buf_end);
  921|   832k|    }
  922|       |
  923|   832k|    if (tbl_sign) {
  ------------------
  |  Branch (923:9): [True: 391k, False: 441k]
  ------------------
  924|   391k|      WORD32 out0, out1, temp_word;
  925|   391k|      WORD32 ampout0, ampout1;
  926|       |
  927|   391k|      ampout0 = *ptr_scratch++;
  928|   391k|      ampout1 = *ptr_scratch++;
  929|   391k|      out0 = index / huff_mode;
  930|   391k|      out1 = index - huff_mode * out0;
  931|   391k|      ampout0 += out0;
  932|   391k|      ampout0 = ixheaacd_pow_table_Q13[ampout0];
  933|       |
  934|   391k|      ampout1 += out1;
  935|   391k|      ampout1 = ixheaacd_pow_table_Q13[ampout1];
  936|   391k|      temp_word = read_word << bit_pos;
  937|   391k|      if (out0) {
  ------------------
  |  Branch (937:11): [True: 270k, False: 120k]
  ------------------
  938|   270k|        if (temp_word & 0x80000000) {
  ------------------
  |  Branch (938:13): [True: 98.3k, False: 172k]
  ------------------
  939|  98.3k|          ampout0 = -(ampout0);
  940|  98.3k|        }
  941|       |
  942|   270k|        bit_pos++;
  943|   270k|        temp_word = temp_word << 1;
  944|   270k|      } else {
  945|   120k|        ampout0 = -(ampout0);
  946|   120k|      }
  947|       |
  948|   391k|      if (out1) {
  ------------------
  |  Branch (948:11): [True: 288k, False: 102k]
  ------------------
  949|   288k|        if (temp_word & 0x80000000) {
  ------------------
  |  Branch (949:13): [True: 128k, False: 160k]
  ------------------
  950|   128k|          ampout1 = -(ampout1);
  951|   128k|        }
  952|   288k|        bit_pos++;
  953|   288k|      } else {
  954|   102k|        ampout1 = -(ampout1);
  955|   102k|      }
  956|       |
  957|   391k|      ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
  958|   391k|                                  it_bit_buff->ptr_bit_buf_end);
  959|   391k|      *x_invquant++ = ampout0;
  960|   391k|      *x_invquant++ = ampout1;
  961|   441k|    } else {
  962|   441k|      WORD32 y, z;
  963|   441k|      y = (index / huff_mode) - 4;
  964|   441k|      z = index - ((y + 4) * huff_mode) - 4;
  965|       |
  966|   441k|      ampres = *ptr_scratch++;
  967|   441k|      if (y <= 0) {
  ------------------
  |  Branch (967:11): [True: 314k, False: 127k]
  ------------------
  968|   314k|        ampres = ampres - y;
  969|   314k|        ampres = ixheaacd_pow_table_Q13[ampres];
  970|   314k|        *x_invquant++ = -ampres;
  971|   314k|      } else {
  972|   127k|        ampres += y;
  973|   127k|        *x_invquant++ = ixheaacd_pow_table_Q13[ampres];
  974|   127k|      }
  975|   441k|      ampres = *ptr_scratch++;
  976|   441k|      if (z <= 0) {
  ------------------
  |  Branch (976:11): [True: 315k, False: 125k]
  ------------------
  977|   315k|        ampres = ampres - z;
  978|   315k|        ampres = ixheaacd_pow_table_Q13[ampres];
  979|   315k|        *x_invquant++ = -ampres;
  980|   315k|      } else {
  981|   125k|        ampres += z;
  982|   125k|        *x_invquant++ = ixheaacd_pow_table_Q13[ampres];
  983|   125k|      }
  984|   441k|    }
  985|   832k|    ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
  986|   832k|                                it_bit_buff->ptr_bit_buf_end);
  987|   832k|  }
  988|       |
  989|  48.1k|  ptr_read_next = ptr_read_next - increment;
  990|  48.1k|  ixheaacd_aac_read_byte_corr1(&ptr_read_next, &bit_pos, &read_word,
  991|  48.1k|                               it_bit_buff->ptr_bit_buf_end);
  992|  48.1k|  it_bit_buff->ptr_read_next = ptr_read_next;
  993|  48.1k|  it_bit_buff->bit_pos = bit_pos;
  994|       |
  995|  48.1k|  return 0;
  996|  48.1k|}
ixheaacd_block.c:ixheaacd_mac32x16in32_sat:
   63|  41.9M|                                                        WORD16 c) {
   64|  41.9M|  WORD32 acc;
   65|       |
   66|  41.9M|  acc = ixheaac_mult32x16in32_sat(b, c);
   67|       |
   68|  41.9M|  acc = ixheaac_add32_sat(a, acc);
   69|       |
   70|  41.9M|  return acc;
   71|  41.9M|}

ixheaacd_aac_showbits_32:
   94|  1.81M|                                 WORD32 *increment) {
   95|  1.81M|  UWORD8 *v = ptr_read_next;
   96|  1.81M|  UWORD32 b = 0;
   97|  1.81M|  WORD32 i;
   98|  1.81M|  WORD32 bumped = 0;
   99|       |
  100|  9.06M|  for (i = 0; i < 4; i++) {
  ------------------
  |  Branch (100:15): [True: 7.25M, False: 1.81M]
  ------------------
  101|  7.25M|    b = b << 8;
  102|  7.25M|    if (cnt_bits > 0) {
  ------------------
  |  Branch (102:9): [True: 7.24M, False: 2.97k]
  ------------------
  103|  7.24M|      b = b | *v;
  104|  7.24M|      v++;
  105|  7.24M|      bumped++;
  106|  7.24M|    }
  107|  7.25M|    cnt_bits -= 8;
  108|  7.25M|  }
  109|  1.81M|  if (increment != NULL) {
  ------------------
  |  Branch (109:7): [True: 1.21M, False: 597k]
  ------------------
  110|  1.21M|    *increment = bumped;
  111|  1.21M|  }
  112|  1.81M|  return b;
  113|  1.81M|}
ixheaacd_getscalefactorbandoffsets:
  117|   269k|    ia_aac_dec_tables_struct *ptr_aac_tables) {
  118|   269k|  if (ptr_ics_info->window_sequence != EIGHT_SHORT_SEQUENCE) {
  ------------------
  |  |  102|   269k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  |  Branch (118:7): [True: 210k, False: 58.6k]
  ------------------
  119|   210k|    return ptr_aac_tables->sfb_long_table;
  120|   210k|  } else {
  121|  58.6k|    return ptr_aac_tables->sfb_short_table;
  122|  58.6k|  }
  123|   269k|}
ixheaacd_getscalefactorbandwidth:
  127|  41.6k|    ia_aac_dec_tables_struct *ptr_aac_tables) {
  128|  41.6k|  if (ptr_ics_info->frame_length == 512) {
  ------------------
  |  Branch (128:7): [True: 12.8k, False: 28.8k]
  ------------------
  129|  12.8k|    return (
  130|  12.8k|        WORD8 *)(&ptr_aac_tables
  131|  12.8k|                      ->scale_fac_bands_512[ptr_ics_info->sampling_rate_index]
  132|  12.8k|                                           [0]);
  133|  28.8k|  } else if (ptr_ics_info->frame_length == 1024) {
  ------------------
  |  Branch (133:14): [True: 4.87k, False: 23.9k]
  ------------------
  134|  4.87k|    return (
  135|  4.87k|        WORD8 *)(&ptr_aac_tables
  136|  4.87k|                      ->scale_factor_bands_long[ptr_ics_info->sampling_rate_index]
  137|  4.87k|                                               [0]);
  138|  23.9k|  } else {
  139|  23.9k|    return (
  140|  23.9k|        WORD8 *)(&ptr_aac_tables
  141|  23.9k|                      ->scale_fac_bands_480[ptr_ics_info->sampling_rate_index]
  142|  23.9k|                                           [0]);
  143|  23.9k|  }
  144|  41.6k|}
ixheaacd_cblock_scale_spect_data:
  153|  41.6k|    WORD32 object_type, WORD32 aac_sf_data_resil_flag) {
  154|  41.6k|  WORD32 *ptr_spect_coeff = ptr_aac_dec_channel_info->ptr_spec_coeff;
  155|  41.6k|  WORD8 *ptr_sfb_width = (WORD8 *)(ixheaacd_getscalefactorbandwidth(
  156|  41.6k|      &(ptr_aac_dec_channel_info->str_ics_info), ptr_aac_tables));
  157|  41.6k|  WORD16 *ptr_scale_fac = ptr_aac_dec_channel_info->ptr_scale_factor;
  158|  41.6k|  WORD tot_bands = ptr_aac_dec_channel_info->str_ics_info.max_sfb;
  159|       |
  160|  41.6k|  WORD num_win_grp, group_len;
  161|  41.6k|  WORD32 *ptr_scale_table = ptr_aac_tables->pstr_block_tables->scale_table;
  162|  41.6k|  ia_ics_info_struct *ptr_ics_info = &ptr_aac_dec_channel_info->str_ics_info;
  163|       |
  164|  41.6k|  if (object_type == AOT_ER_AAC_LC)
  ------------------
  |  Branch (164:7): [True: 21.3k, False: 20.3k]
  ------------------
  165|  21.3k|    ptr_sfb_width = ptr_aac_tables->str_aac_sfb_info[ptr_ics_info->window_sequence]
  166|  21.3k|      .sfb_width;
  167|  96.0k|  for (num_win_grp = 0; num_win_grp < ptr_ics_info->num_window_groups;
  ------------------
  |  Branch (167:25): [True: 54.3k, False: 41.6k]
  ------------------
  168|  54.3k|      num_win_grp++) {
  169|  54.3k|    for (group_len = 0;
  170|   180k|        group_len < ptr_ics_info->window_group_length[num_win_grp];
  ------------------
  |  Branch (170:9): [True: 126k, False: 54.3k]
  ------------------
  171|   126k|        group_len++) {
  172|   126k|      (*ixheaacd_scale_factor_process)(
  173|   126k|          &ptr_spect_coeff[0], &ptr_scale_fac[0], tot_bands,
  174|   126k|          (WORD8 *)ptr_sfb_width, ptr_scale_table, total_channels,
  175|   126k|          object_type, aac_sf_data_resil_flag);
  176|       |
  177|   126k|      ptr_spect_coeff += MAX_BINS_SHORT;
  ------------------
  |  |   29|   126k|#define MAX_BINS_SHORT 128
  ------------------
  178|   126k|    }
  179|  54.3k|    ptr_scale_fac += MAX_SCALE_FACTOR_BANDS_SHORT;
  ------------------
  |  |   30|  54.3k|#define MAX_SCALE_FACTOR_BANDS_SHORT 16
  ------------------
  180|  54.3k|  }
  181|  41.6k|}
ixheaacd_read_pulse_data:
  185|  34.2k|                                ia_aac_dec_tables_struct *ptr_aac_tables) {
  186|  34.2k|  WORD32 i, total_offset;
  187|  34.2k|  WORD32 error_code = 0;
  188|       |
  189|  34.2k|  WORD32 value = ixheaacd_read_bits_buf(it_bit_buff, 8);
  190|  34.2k|  ptr_pulse_info->number_pulse = value >> 6;
  191|  34.2k|  ptr_pulse_info->pulse_start_band = value & 0x3F;
  192|       |
  193|  34.2k|  if (ptr_pulse_info->pulse_start_band >= 52) {
  ------------------
  |  Branch (193:7): [True: 125, False: 34.1k]
  ------------------
  194|    125|    return (WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_PULSEDATA_ERROR;
  ------------------
  |  |  108|    125|#define IA_XHEAAC_DEC_EXE_NONFATAL_PULSEDATA_ERROR 0x0000180D
  ------------------
  195|    125|  }
  196|       |
  197|  34.1k|  total_offset = ptr_aac_tables->str_aac_sfb_info[0]
  198|  34.1k|                     .sfb_index[ptr_pulse_info->pulse_start_band];
  199|       |
  200|   109k|  for (i = 0; i < ptr_pulse_info->number_pulse + 1; i++) {
  ------------------
  |  Branch (200:15): [True: 75.8k, False: 34.1k]
  ------------------
  201|  75.8k|    WORD32 value = ixheaacd_read_bits_buf(it_bit_buff, 9);
  202|  75.8k|    ptr_pulse_info->pulse_offset[i] = value >> 4;
  203|  75.8k|    ptr_pulse_info->pulse_amp[i] = value & 0xF;
  204|  75.8k|    total_offset += ptr_pulse_info->pulse_offset[i];
  205|       |
  206|  75.8k|    if (total_offset >= 1024) {
  ------------------
  |  Branch (206:9): [True: 26, False: 75.8k]
  ------------------
  207|     26|      error_code = (WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_PULSEDATA_ERROR;
  ------------------
  |  |  108|     26|#define IA_XHEAAC_DEC_EXE_NONFATAL_PULSEDATA_ERROR 0x0000180D
  ------------------
  208|     26|    }
  209|  75.8k|  }
  210|       |
  211|  34.1k|  return error_code;
  212|  34.2k|}
ixheaacd_ltp_decode:
  328|  9.58k|                                 WORD32 ch) {
  329|  9.58k|  IA_ERRORCODE retval = AAC_DEC_OK;
  ------------------
  |  |   23|  9.58k|#define AAC_DEC_OK IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR
  |  |  ------------------
  |  |  |  |   27|  9.58k|#define IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR 0x00000000
  |  |  ------------------
  ------------------
  330|       |
  331|  9.58k|  if (ptr_ics_info->predictor_data_present) {
  ------------------
  |  Branch (331:7): [True: 3.94k, False: 5.63k]
  ------------------
  332|  3.94k|    if (ch == 0) {
  ------------------
  |  Branch (332:9): [True: 1.98k, False: 1.96k]
  ------------------
  333|  1.98k|      ixheaacd_init_ltp_object(&(ptr_ics_info->ltp));
  334|  1.98k|      ptr_ics_info->ltp.data_present = ixheaacd_read_bits_buf(it_bit_buff, 1);
  335|  1.98k|      if (ptr_ics_info->ltp.data_present) {
  ------------------
  |  Branch (335:11): [True: 656, False: 1.32k]
  ------------------
  336|    656|        if ((retval = ixheaacd_ltp_data(object_type, ptr_ics_info,
  ------------------
  |  Branch (336:13): [True: 0, False: 656]
  ------------------
  337|    656|                                        &(ptr_ics_info->ltp), it_bit_buff,
  338|    656|                                        frame_size)) > 0) {
  339|      0|          return retval;
  340|      0|        }
  341|    656|      }
  342|  1.98k|    } else {
  343|  1.96k|      ixheaacd_init_ltp_object(&(ptr_ics_info->ltp2));
  344|  1.96k|      ptr_ics_info->ltp2.data_present = ixheaacd_read_bits_buf(it_bit_buff, 1);
  345|  1.96k|      if (ptr_ics_info->ltp2.data_present) {
  ------------------
  |  Branch (345:11): [True: 1.06k, False: 906]
  ------------------
  346|  1.06k|        if ((retval = ixheaacd_ltp_data(object_type, ptr_ics_info,
  ------------------
  |  Branch (346:13): [True: 0, False: 1.06k]
  ------------------
  347|  1.06k|                                        &(ptr_ics_info->ltp2), it_bit_buff,
  348|  1.06k|                                        frame_size)) > 0) {
  349|      0|          return retval;
  350|      0|        }
  351|  1.06k|      }
  352|  1.96k|    }
  353|  3.94k|  }
  354|  9.58k|  return retval;
  355|  9.58k|}
ixheaacd_ics_read:
  359|   225k|                         WORD32 common_window, WORD32 frame_size) {
  360|   225k|  WORD i;
  361|   225k|  WORD mask;
  362|   225k|  WORD value = 0;
  363|       |
  364|   225k|  if (object_type == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (364:7): [True: 57.8k, False: 167k]
  ------------------
  365|  57.8k|    ptr_ics_info->window_sequence = 0;
  366|  57.8k|    ptr_ics_info->window_shape = 1;
  367|   167k|  } else {
  368|   167k|    if (object_type != AOT_ER_AAC_LD)
  ------------------
  |  Branch (368:9): [True: 101k, False: 66.1k]
  ------------------
  369|   101k|    {
  370|   101k|      if (frame_size == 960)
  ------------------
  |  Branch (370:11): [True: 51.6k, False: 49.7k]
  ------------------
  371|  51.6k|        ptr_ics_info->frame_length = 960;
  372|  49.7k|      else
  373|  49.7k|        ptr_ics_info->frame_length = 1024;
  374|   101k|    }
  375|   167k|    value = ixheaacd_read_bits_buf(it_bit_buff, 4);
  376|   167k|    ptr_ics_info->window_sequence = (WORD16)((value & 0x6) >> 1);
  377|   167k|    ptr_ics_info->window_shape = (WORD16)((value & 0x1));
  378|   167k|  }
  379|       |
  380|   225k|  if (ptr_ics_info->window_sequence != EIGHT_SHORT_SEQUENCE) {
  ------------------
  |  |  102|   225k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  |  Branch (380:7): [True: 193k, False: 31.5k]
  ------------------
  381|   193k|    ptr_ics_info->num_swb_window = num_swb_window[0];
  382|       |
  383|   193k|    ptr_ics_info->num_window_groups = 1;
  384|   193k|    ptr_ics_info->window_group_length[0] = 1;
  385|       |
  386|   193k|    if (object_type == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (386:9): [True: 57.8k, False: 136k]
  ------------------
  387|  57.8k|      ptr_ics_info->max_sfb = ixheaacd_read_bits_buf(it_bit_buff, 6);
  388|  57.8k|      if (ptr_ics_info->max_sfb == 0) ptr_ics_info->num_swb_window = 0;
  ------------------
  |  Branch (388:11): [True: 17.1k, False: 40.7k]
  ------------------
  389|   136k|    } else {
  390|   136k|      value = ixheaacd_read_bits_buf(it_bit_buff, 7);
  391|   136k|      ptr_ics_info->max_sfb = (value & 0x7E) >> 1;
  392|   136k|    }
  393|       |
  394|   193k|    if ((object_type != AOT_ER_AAC_LD) && (object_type != AOT_AAC_LTP)) {
  ------------------
  |  Branch (394:9): [True: 137k, False: 55.9k]
  |  Branch (394:43): [True: 111k, False: 26.5k]
  ------------------
  395|   111k|      if (value & 1) {
  ------------------
  |  Branch (395:11): [True: 282, False: 111k]
  ------------------
  396|    282|        return (WORD16)(
  397|    282|            (WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_PREDICTION_DATA_PRESENT);
  ------------------
  |  |  106|    282|#define IA_XHEAAC_DEC_EXE_NONFATAL_PREDICTION_DATA_PRESENT 0x0000180B
  ------------------
  398|    282|      }
  399|       |
  400|   111k|    } else {
  401|  82.5k|      ptr_ics_info->predictor_data_present = value & 1;
  402|       |
  403|  82.5k|      if (ptr_ics_info->predictor_data_present) {
  ------------------
  |  Branch (403:11): [True: 52.2k, False: 30.3k]
  ------------------
  404|  52.2k|        WORD32 retval = AAC_DEC_OK;
  ------------------
  |  |   23|  52.2k|#define AAC_DEC_OK IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR
  |  |  ------------------
  |  |  |  |   27|  52.2k|#define IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR 0x00000000
  |  |  ------------------
  ------------------
  405|       |
  406|  52.2k|        ixheaacd_init_ltp_object(&(ptr_ics_info->ltp));
  407|  52.2k|        if (object_type < ER_OBJECT_START) {
  ------------------
  |  |   64|  52.2k|#define ER_OBJECT_START 17
  ------------------
  |  Branch (407:13): [True: 8.16k, False: 44.0k]
  ------------------
  408|  8.16k|          if ((ptr_ics_info->ltp.data_present =
  ------------------
  |  Branch (408:15): [True: 8.10k, False: 65]
  ------------------
  409|  8.16k|                   ixheaacd_read_bits_buf(it_bit_buff, 1)) &
  410|  8.16k|              1) {
  411|  8.10k|            if ((retval = ixheaacd_ltp_data(object_type, ptr_ics_info,
  ------------------
  |  Branch (411:17): [True: 0, False: 8.10k]
  ------------------
  412|  8.10k|                                            &(ptr_ics_info->ltp), it_bit_buff,
  413|  8.10k|                                            frame_size)) > 0) {
  414|      0|              return retval;
  415|      0|            }
  416|  8.10k|          }
  417|  8.16k|          if (common_window) {
  ------------------
  |  Branch (417:15): [True: 292, False: 7.87k]
  ------------------
  418|    292|            ixheaacd_init_ltp_object(&(ptr_ics_info->ltp2));
  419|    292|            if ((ptr_ics_info->ltp2.data_present =
  ------------------
  |  Branch (419:17): [True: 10, False: 282]
  ------------------
  420|    292|                     ixheaacd_read_bits_buf(it_bit_buff, 1)) &
  421|    292|                1) {
  422|     10|              if ((retval = ixheaacd_ltp_data(object_type, ptr_ics_info,
  ------------------
  |  Branch (422:19): [True: 0, False: 10]
  ------------------
  423|     10|                                              &(ptr_ics_info->ltp2),
  424|     10|                                              it_bit_buff, frame_size)) > 0) {
  425|      0|                return retval;
  426|      0|              }
  427|     10|            }
  428|    292|          }
  429|  8.16k|        }
  430|  52.2k|        if ((object_type == AOT_ER_AAC_ELD) || (object_type == AOT_ER_AAC_LD)) {
  ------------------
  |  Branch (430:13): [True: 8, False: 52.2k]
  |  Branch (430:48): [True: 44.0k, False: 8.16k]
  ------------------
  431|  44.0k|          if (!common_window && (object_type >= ER_OBJECT_START)) {
  ------------------
  |  |   64|  41.9k|#define ER_OBJECT_START 17
  ------------------
  |  Branch (431:15): [True: 41.9k, False: 2.12k]
  |  Branch (431:33): [True: 41.9k, False: 0]
  ------------------
  432|  41.9k|            if ((ptr_ics_info->ltp.data_present =
  ------------------
  |  Branch (432:17): [True: 35.1k, False: 6.84k]
  ------------------
  433|  41.9k|                     ixheaacd_read_bits_buf(it_bit_buff, 1)) &
  434|  41.9k|                1) {
  435|  35.1k|              if ((retval = ixheaacd_ltp_data(object_type, ptr_ics_info,
  ------------------
  |  Branch (435:19): [True: 5, False: 35.0k]
  ------------------
  436|  35.1k|                                              &(ptr_ics_info->ltp), it_bit_buff,
  437|  35.1k|                                              frame_size)) < 0) {
  438|      5|                return retval;
  439|      5|              }
  440|  35.1k|            }
  441|  41.9k|          }
  442|  44.0k|        }
  443|  52.2k|      }
  444|  82.5k|    }
  445|       |
  446|   193k|  } else {
  447|  31.5k|    WORD32 num_groups = 0, scale_factor_grouping;
  448|  31.5k|    ptr_ics_info->num_swb_window = num_swb_window[1];
  449|       |
  450|  31.5k|    value = ixheaacd_read_bits_buf(it_bit_buff, 11);
  451|  31.5k|    ptr_ics_info->max_sfb = (value & 0x780) >> 7;
  452|       |
  453|  31.5k|    scale_factor_grouping = (value & 0x7F);
  454|       |
  455|  31.5k|    mask = 0x40;
  456|   252k|    for (i = 0; i < 7; i++) {
  ------------------
  |  Branch (456:17): [True: 220k, False: 31.5k]
  ------------------
  457|   220k|      ptr_ics_info->window_group_length[i] = 1;
  458|       |
  459|   220k|      if (scale_factor_grouping & mask) {
  ------------------
  |  Branch (459:11): [True: 140k, False: 80.5k]
  ------------------
  460|   140k|        ptr_ics_info->window_group_length[num_groups] =
  461|   140k|            ptr_ics_info->window_group_length[num_groups] + 1;
  462|       |
  463|   140k|      } else {
  464|  80.5k|        num_groups = num_groups + 1;
  465|  80.5k|      }
  466|       |
  467|   220k|      mask = mask >> 1;
  468|   220k|    }
  469|       |
  470|  31.5k|    ptr_ics_info->window_group_length[7] = 1;
  471|  31.5k|    ptr_ics_info->num_window_groups = num_groups + 1;
  472|  31.5k|  }
  473|       |
  474|   225k|  if (ptr_ics_info->max_sfb > ptr_ics_info->num_swb_window) {
  ------------------
  |  Branch (474:7): [True: 24.9k, False: 200k]
  ------------------
  475|  24.9k|    return (WORD16)IA_XHEAAC_DEC_EXE_NONFATAL_EXCEEDS_SFB_TRANSMITTED;
  ------------------
  |  |  103|  24.9k|#define IA_XHEAAC_DEC_EXE_NONFATAL_EXCEEDS_SFB_TRANSMITTED 0x00001808
  ------------------
  476|  24.9k|  }
  477|       |
  478|   200k|  return AAC_DEC_OK;
  ------------------
  |  |   23|   200k|#define AAC_DEC_OK IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR
  |  |  ------------------
  |  |  |  |   27|   200k|#define IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR 0x00000000
  |  |  ------------------
  ------------------
  479|   225k|}
ixheaacd_individual_ch_stream:
  484|   198k|    ia_eld_specific_config_struct eld_specific_config, WORD32 ele_type) {
  485|   198k|  WORD16 error_code = AAC_DEC_OK;
  ------------------
  |  |   23|   198k|#define AAC_DEC_OK IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR
  |  |  ------------------
  |  |  |  |   27|   198k|#define IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR 0x00000000
  |  |  ------------------
  ------------------
  486|   198k|  WORD32 ch;
  487|   198k|  WORD32 crc_reg = 0;
  488|       |
  489|   412k|  for (ch = 0; ch < num_ch; ch++) {
  ------------------
  |  Branch (489:16): [True: 217k, False: 194k]
  ------------------
  490|   217k|    ia_aac_dec_channel_info_struct *ptr_aac_dec_ch_info =
  491|   217k|        aac_dec_handle->pstr_aac_dec_ch_info[ch];
  492|   217k|    ia_ics_info_struct *ptr_ics_info = &ptr_aac_dec_ch_info->str_ics_info;
  493|       |
  494|   217k|    if (ch == 1) {
  ------------------
  |  Branch (494:9): [True: 18.8k, False: 198k]
  ------------------
  495|  18.8k|      if (it_bit_buff->pstr_adts_crc_info->crc_active == 1 &&
  ------------------
  |  Branch (495:11): [True: 36, False: 18.7k]
  ------------------
  496|     36|          (it_bit_buff->pstr_adts_crc_info->no_reg < 7)) {
  ------------------
  |  Branch (496:11): [True: 29, False: 7]
  ------------------
  497|     29|        crc_reg =
  498|     29|            ixheaacd_adts_crc_start_reg(it_bit_buff->pstr_adts_crc_info,
  499|     29|                                        it_bit_buff, CRC_ADTS_RAW_IIND_ICS);
  ------------------
  |  |   27|     29|#define CRC_ADTS_RAW_IIND_ICS 128
  ------------------
  500|     29|      }
  501|  18.8k|    }
  502|   217k|    ptr_aac_dec_ch_info->global_gain =
  503|   217k|        (WORD16)ixheaacd_read_bits_buf(it_bit_buff, 8);
  504|       |
  505|   217k|    if (!(aac_dec_handle->pstr_aac_dec_ch_info[LEFT]->common_window)) {
  ------------------
  |  |   40|   217k|#define LEFT 0
  ------------------
  |  Branch (505:9): [True: 184k, False: 32.9k]
  ------------------
  506|   184k|      error_code = ixheaacd_ics_read(
  507|   184k|          it_bit_buff, ptr_ics_info, aac_dec_handle->num_swb_window,
  508|   184k|          object_type,
  509|   184k|          aac_dec_handle->pstr_aac_dec_ch_info[LEFT]->common_window,
  ------------------
  |  |   40|   184k|#define LEFT 0
  ------------------
  510|   184k|          aac_dec_handle->samples_per_frame);
  511|   184k|      if (ch == 1)
  ------------------
  |  Branch (511:11): [True: 2.69k, False: 181k]
  ------------------
  512|  2.69k|        aac_dec_handle->pstr_aac_dec_ch_info[ch - 1]->str_ics_info.ltp2.lag =
  513|  2.69k|            ptr_ics_info->ltp.lag;
  514|       |
  515|   184k|      if (error_code) {
  ------------------
  |  Branch (515:11): [True: 696, False: 183k]
  ------------------
  516|    696|        if (it_bit_buff->cnt_bits < 0) {
  ------------------
  |  Branch (516:13): [True: 0, False: 696]
  ------------------
  517|      0|          error_code = (WORD16)(
  518|      0|              (WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|      0|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  519|      0|        }
  520|    696|        return error_code;
  521|    696|      }
  522|   184k|    }
  523|       |
  524|   216k|    error_code = ixheaacd_read_block_data(
  525|   216k|        it_bit_buff, ptr_aac_dec_ch_info, aac_dec_handle->pstr_aac_tables,
  526|   216k|        total_channels, frame_size, object_type,
  527|   216k|        eld_specific_config.aac_spect_data_resil_flag,
  528|   216k|        eld_specific_config.aac_sect_data_resil_flag,
  529|   216k|        eld_specific_config.aac_sf_data_resil_flag, ele_type,
  530|   216k|        aac_dec_handle->pstr_aac_dec_overlap_info[ch]);
  531|   216k|    if (error_code) {
  ------------------
  |  Branch (531:9): [True: 2.66k, False: 213k]
  ------------------
  532|  2.66k|      if (it_bit_buff->cnt_bits < 0) {
  ------------------
  |  Branch (532:11): [True: 87, False: 2.57k]
  ------------------
  533|     87|        error_code = (WORD16)(
  534|     87|            (WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|     87|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  535|     87|      }
  536|       |
  537|  2.66k|      return error_code;
  538|  2.66k|    }
  539|       |
  540|   213k|    if (ch == 0) {
  ------------------
  |  Branch (540:9): [True: 194k, False: 19.4k]
  ------------------
  541|   194k|      if ((object_type == AOT_ER_AAC_LD) &&
  ------------------
  |  Branch (541:11): [True: 63.3k, False: 130k]
  ------------------
  542|  63.3k|          (aac_dec_handle->pstr_aac_dec_ch_info[LEFT]->common_window) &&
  ------------------
  |  |   40|  63.3k|#define LEFT 0
  ------------------
  |  Branch (542:11): [True: 4.78k, False: 58.5k]
  ------------------
  543|  4.78k|          (ele_type == ID_CPE)) {
  ------------------
  |  Branch (543:11): [True: 4.78k, False: 0]
  ------------------
  544|  4.78k|        IA_ERRORCODE temp =
  545|  4.78k|            ixheaacd_ltp_decode(it_bit_buff, ptr_ics_info, object_type,
  546|  4.78k|                                aac_dec_handle->samples_per_frame, 1);
  547|       |
  548|  4.78k|        if (temp != 0) {
  ------------------
  |  Branch (548:13): [True: 1, False: 4.78k]
  ------------------
  549|      1|          return temp;
  550|      1|        }
  551|  4.78k|        aac_dec_handle->pstr_aac_dec_ch_info[ch + 1]->str_ics_info.ltp.lag =
  552|  4.78k|            ptr_ics_info->ltp2.lag;
  553|  4.78k|      }
  554|   194k|    }
  555|   213k|    if (ch == 1) {
  ------------------
  |  Branch (555:9): [True: 18.5k, False: 195k]
  ------------------
  556|  18.5k|      if (it_bit_buff->pstr_adts_crc_info->crc_active == 1) {
  ------------------
  |  Branch (556:11): [True: 25, False: 18.5k]
  ------------------
  557|     25|        ixheaacd_adts_crc_end_reg(it_bit_buff->pstr_adts_crc_info, it_bit_buff,
  558|     25|                                  crc_reg);
  559|     25|      }
  560|  18.5k|    }
  561|   213k|  }
  562|       |
  563|   194k|  return error_code;
  564|   198k|}
ixheaacd_read_ms_data:
  568|  16.7k|    ia_aac_dec_channel_info_struct *ptr_aac_dec_ch_info) {
  569|  16.7k|  WORD32 num_win_group, sfb;
  570|  16.7k|  WORD32 ms_mask_present;
  571|  16.7k|  UWORD8 *ptr_ms_used = &ptr_aac_dec_ch_info->pstr_stereo_info->ms_used[0][0];
  572|  16.7k|  WORD32 num_window_groups =
  573|  16.7k|      ptr_aac_dec_ch_info->str_ics_info.num_window_groups;
  574|  16.7k|  WORD16 max_sfb = ptr_aac_dec_ch_info->str_ics_info.max_sfb;
  575|       |
  576|  16.7k|  ms_mask_present = ixheaacd_read_bits_buf(it_bit_buff, 2);
  577|       |
  578|  16.7k|  if (ms_mask_present < 1) {
  ------------------
  |  Branch (578:7): [True: 8.45k, False: 8.31k]
  ------------------
  579|  8.45k|    memset(ptr_ms_used, 0,
  580|  8.45k|           sizeof(UWORD8) * JOINT_STEREO_MAX_BANDS * JOINT_STEREO_MAX_GROUPS);
  ------------------
  |  |   31|  8.45k|#define JOINT_STEREO_MAX_BANDS 64
  ------------------
                         sizeof(UWORD8) * JOINT_STEREO_MAX_BANDS * JOINT_STEREO_MAX_GROUPS);
  ------------------
  |  |   30|  8.45k|#define JOINT_STEREO_MAX_GROUPS 8
  ------------------
  581|  8.45k|  }
  582|       |
  583|  8.31k|  else if (ms_mask_present == 1) {
  ------------------
  |  Branch (583:12): [True: 1.78k, False: 6.53k]
  ------------------
  584|  3.71k|    for (num_win_group = 0; num_win_group < num_window_groups;
  ------------------
  |  Branch (584:29): [True: 1.92k, False: 1.78k]
  ------------------
  585|  1.92k|         num_win_group++) {
  586|  7.50k|      for (sfb = 0; sfb < max_sfb; sfb++) {
  ------------------
  |  Branch (586:21): [True: 5.57k, False: 1.92k]
  ------------------
  587|  5.57k|        ptr_aac_dec_ch_info->pstr_stereo_info->ms_used[num_win_group][sfb] =
  588|  5.57k|            (UWORD8)ixheaacd_read_bits_buf(it_bit_buff, 1);
  589|  5.57k|      }
  590|  1.92k|    }
  591|       |
  592|  6.53k|  } else {
  593|  19.3k|    for (num_win_group = 0; num_win_group < num_window_groups;
  ------------------
  |  Branch (593:29): [True: 12.8k, False: 6.53k]
  ------------------
  594|  12.8k|         num_win_group++) {
  595|  12.8k|      ptr_ms_used =
  596|  12.8k|          &ptr_aac_dec_ch_info->pstr_stereo_info->ms_used[num_win_group][0];
  597|  12.8k|      memset(ptr_ms_used, 1, (max_sfb) * sizeof(UWORD8));
  598|  12.8k|    }
  599|  6.53k|  }
  600|  16.7k|}
ixheaacd_channel_pair_process:
  606|   194k|    WORD32 *out_data, void *self_ptr) {
  607|   194k|  WORD32 channel;
  608|   194k|  IA_ERRORCODE err = IA_NO_ERROR;
  ------------------
  |  |   23|   194k|#define IA_NO_ERROR 0x00000000
  ------------------
  609|   194k|  ia_aac_decoder_struct *self = self_ptr;
  610|   194k|  if (aac_spect_data_resil_flag &&
  ------------------
  |  Branch (610:7): [True: 41.5k, False: 152k]
  ------------------
  611|  41.5k|      ((object_type == AOT_ER_AAC_LD) || (object_type == AOT_ER_AAC_ELD) ||
  ------------------
  |  Branch (611:8): [True: 17.7k, False: 23.7k]
  |  Branch (611:42): [True: 2.41k, False: 21.3k]
  ------------------
  612|  41.5k|      (object_type == AOT_ER_AAC_LC))) {
  ------------------
  |  Branch (612:7): [True: 21.3k, False: 0]
  ------------------
  613|  83.1k|    for (channel = 0; channel < num_ch; channel++) {
  ------------------
  |  Branch (613:23): [True: 41.6k, False: 41.5k]
  ------------------
  614|  41.6k|      err = ixheaacd_cblock_inv_quant_spect_data(
  615|  41.6k|          ptr_aac_dec_channel_info[channel], ptr_aac_tables);
  616|  41.6k|      if (err) return err;
  ------------------
  |  Branch (616:11): [True: 0, False: 41.6k]
  ------------------
  617|  41.6k|      ixheaacd_cblock_scale_spect_data(ptr_aac_dec_channel_info[channel],
  618|  41.6k|                                       ptr_aac_tables, num_ch, object_type,
  619|  41.6k|                                       aac_sf_data_resil_flag);
  620|  41.6k|    }
  621|  41.5k|  }
  622|       |
  623|   194k|  if (num_ch > 1) {
  ------------------
  |  Branch (623:7): [True: 18.5k, False: 175k]
  ------------------
  624|  18.5k|    if (ptr_aac_dec_channel_info[LEFT]->common_window) {
  ------------------
  |  |   40|  18.5k|#define LEFT 0
  ------------------
  |  Branch (624:9): [True: 15.8k, False: 2.66k]
  ------------------
  625|  15.8k|      if (ptr_aac_dec_channel_info[LEFT]->str_pns_info.pns_active ||
  ------------------
  |  |   40|  15.8k|#define LEFT 0
  ------------------
  |  Branch (625:11): [True: 3.08k, False: 12.7k]
  ------------------
  626|  12.7k|          ptr_aac_dec_channel_info[RIGHT]->str_pns_info.pns_active) {
  ------------------
  |  |   41|  12.7k|#define RIGHT 1
  ------------------
  |  Branch (626:11): [True: 91, False: 12.6k]
  ------------------
  627|  3.17k|        ixheaacd_map_ms_mask_pns(ptr_aac_dec_channel_info);
  628|  3.17k|      }
  629|       |
  630|  15.8k|      ixheaacd_ms_stereo_process(ptr_aac_dec_channel_info, ptr_aac_tables);
  631|  15.8k|    }
  632|       |
  633|  18.5k|    ixheaacd_intensity_stereo_process(
  634|  18.5k|        ptr_aac_dec_channel_info, ptr_aac_tables, object_type,
  635|  18.5k|        aac_sf_data_resil_flag,
  636|  18.5k|        ptr_aac_dec_channel_info[LEFT]->str_ics_info.frame_length);
  ------------------
  |  |   40|  18.5k|#define LEFT 0
  ------------------
  637|  18.5k|  }
  638|       |
  639|   406k|  for (channel = 0; channel < num_ch; channel++) {
  ------------------
  |  Branch (639:21): [True: 212k, False: 194k]
  ------------------
  640|   212k|    WORD32 *p_spectrum = ptr_aac_dec_channel_info[channel]->ptr_spec_coeff;
  641|       |
  642|   212k|    if (total_channels > 2) {
  ------------------
  |  Branch (642:9): [True: 12.3k, False: 200k]
  ------------------
  643|  12.3k|      if (ptr_aac_dec_channel_info[channel]->str_ics_info.window_sequence !=
  ------------------
  |  Branch (643:11): [True: 9.38k, False: 3.00k]
  ------------------
  644|  12.3k|          EIGHT_SHORT_SEQUENCE) {
  ------------------
  |  |  102|  12.3k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  645|  9.38k|        WORD16 *band_offsets = ptr_aac_tables->sfb_long_table;
  646|  9.38k|        WORD32 no_spec_coeff = band_offsets[ptr_aac_dec_channel_info[channel]
  647|  9.38k|                                                ->str_ics_info.max_sfb];
  648|  9.38k|        ixheaacd_right_shift_block(p_spectrum, no_spec_coeff, 3);
  649|  9.38k|      } else {
  650|  3.00k|        ixheaacd_right_shift_block(p_spectrum, 1024, 3);
  651|  3.00k|      }
  652|  12.3k|    }
  653|       |
  654|   212k|    ixheaacd_pns_process(ptr_aac_dec_channel_info, channel, ptr_aac_tables);
  655|       |
  656|   212k|    if ((object_type == AOT_ER_AAC_LD) || (object_type == AOT_AAC_LTP)) {
  ------------------
  |  Branch (656:9): [True: 69.4k, False: 143k]
  |  Branch (656:43): [True: 28.9k, False: 114k]
  ------------------
  657|  98.3k|      {
  658|  98.3k|        if (channel == 0) {
  ------------------
  |  Branch (658:13): [True: 91.4k, False: 6.93k]
  ------------------
  659|  91.4k|          ltp_info *ltp1 =
  660|  91.4k|              &(ptr_aac_dec_channel_info[channel]->str_ics_info.ltp);
  661|  91.4k|          ixheaacd_lt_prediction(ptr_aac_dec_channel_info[channel], ltp1,
  662|  91.4k|                                 p_spectrum, ptr_aac_tables,
  663|  91.4k|                                 self->ptr_aac_dec_static_channel_info[LEFT]
  ------------------
  |  |   40|  91.4k|#define LEFT 0
  ------------------
  664|  91.4k|                                     ->overlap_add_data.win_shape,
  665|  91.4k|                                 self->sampling_rate_index, object_type,
  666|  91.4k|                                 self->samples_per_frame, in_data, out_data);
  667|       |
  668|  91.4k|        } else {
  669|  6.93k|          ltp_info *ltp2 =
  670|  6.93k|              (self->pstr_aac_dec_ch_info[0]->common_window)
  ------------------
  |  Branch (670:15): [True: 4.78k, False: 2.15k]
  ------------------
  671|  6.93k|                  ? &(ptr_aac_dec_channel_info[0]->str_ics_info.ltp2)
  672|  6.93k|                  :
  673|       |
  674|  6.93k|                  &(ptr_aac_dec_channel_info[1]->str_ics_info.ltp);
  675|  6.93k|          ixheaacd_lt_prediction(ptr_aac_dec_channel_info[channel], ltp2,
  676|  6.93k|                                 p_spectrum, ptr_aac_tables,
  677|  6.93k|                                 self->ptr_aac_dec_static_channel_info[RIGHT]
  ------------------
  |  |   41|  6.93k|#define RIGHT 1
  ------------------
  678|  6.93k|                                     ->overlap_add_data.win_shape,
  679|  6.93k|                                 self->sampling_rate_index, object_type,
  680|  6.93k|                                 self->samples_per_frame, in_data, out_data);
  681|  6.93k|        }
  682|  98.3k|      }
  683|  98.3k|    }
  684|       |
  685|   212k|    if (ptr_aac_dec_channel_info[channel]->str_tns_info.tns_data_present) {
  ------------------
  |  Branch (685:9): [True: 50.6k, False: 161k]
  ------------------
  686|  50.6k|      ixheaacd_aac_tns_process(ptr_aac_dec_channel_info[channel],
  687|  50.6k|                               total_channels, ptr_aac_tables, object_type, 1,
  688|       |                               NULL);
  689|  50.6k|    }
  690|   212k|  }
  691|   194k|  return err;
  692|   194k|}
ixheaacd_set_corr_info:
  695|  57.6k|    ia_aac_dec_channel_info_struct *ptr_aac_dec_channel_info, WORD16 pns_band) {
  696|  57.6k|  ia_pns_correlation_info_struct *ptr_corr_info =
  697|  57.6k|      ptr_aac_dec_channel_info->pstr_pns_corr_info;
  698|  57.6k|  ptr_corr_info->correlated[(pns_band >> PNS_BAND_FLAGS_SHIFT)] |=
  ------------------
  |  |   26|  57.6k|#define PNS_BAND_FLAGS_SHIFT 3
  ------------------
  699|  57.6k|      (1 << (pns_band & PNS_BAND_FLAGS_MASK));
  ------------------
  |  |   25|  57.6k|  ((WORD16)((((WORD16)1) << PNS_BAND_FLAGS_SHIFT) - 1))
  |  |  ------------------
  |  |  |  |   26|  57.6k|#define PNS_BAND_FLAGS_SHIFT 3
  |  |  ------------------
  ------------------
  700|  57.6k|}
ixheaacd_map_ms_mask_pns:
  703|  3.17k|    ia_aac_dec_channel_info_struct *ptr_aac_dec_channel_info[CHANNELS]) {
  704|  3.17k|  WORD32 num_win_group, sfb;
  705|       |
  706|  3.17k|  for (num_win_group = 0;
  707|  6.40k|       num_win_group <
  ------------------
  |  Branch (707:8): [True: 3.22k, False: 3.17k]
  ------------------
  708|  6.40k|       ptr_aac_dec_channel_info[LEFT]->str_ics_info.num_window_groups;
  ------------------
  |  |   40|  6.40k|#define LEFT 0
  ------------------
  709|  3.22k|       num_win_group++) {
  710|  72.0k|    for (sfb = 0; sfb < ptr_aac_dec_channel_info[LEFT]->str_ics_info.max_sfb;
  ------------------
  |  |   40|  72.0k|#define LEFT 0
  ------------------
  |  Branch (710:19): [True: 68.8k, False: 3.22k]
  ------------------
  711|  68.8k|         sfb++) {
  712|  68.8k|      if (ptr_aac_dec_channel_info[LEFT]
  ------------------
  |  |   40|  68.8k|#define LEFT 0
  ------------------
  |  Branch (712:11): [True: 57.6k, False: 11.1k]
  ------------------
  713|  68.8k|              ->pstr_stereo_info->ms_used[num_win_group][sfb]) {
  714|  57.6k|        WORD16 pns_band = (num_win_group << 4) + sfb;
  715|  57.6k|        ixheaacd_set_corr_info(ptr_aac_dec_channel_info[LEFT], pns_band);
  ------------------
  |  |   40|  57.6k|#define LEFT 0
  ------------------
  716|       |
  717|  57.6k|        if (ptr_aac_dec_channel_info[LEFT]->str_pns_info.pns_used[pns_band] &&
  ------------------
  |  |   40|  57.6k|#define LEFT 0
  ------------------
  |  Branch (717:13): [True: 32.8k, False: 24.8k]
  ------------------
  718|  32.8k|            ptr_aac_dec_channel_info[RIGHT]->str_pns_info.pns_used[pns_band]) {
  ------------------
  |  |   41|  32.8k|#define RIGHT 1
  ------------------
  |  Branch (718:13): [True: 16.0k, False: 16.7k]
  ------------------
  719|  16.0k|          ptr_aac_dec_channel_info[LEFT]
  ------------------
  |  |   40|  16.0k|#define LEFT 0
  ------------------
  720|  16.0k|              ->pstr_stereo_info->ms_used[num_win_group][sfb] ^= 1;
  721|  16.0k|        }
  722|  57.6k|      }
  723|  68.8k|    }
  724|  3.22k|  }
  725|  3.17k|}
ixheaacd_pulse_data_apply:
  729|   149k|                               const WORD16 *ptr_swb_offset, WORD object_type) {
  730|   149k|  WORD i;
  731|   149k|  WORD32 k;
  732|       |
  733|   149k|  memset(pulse_scratch, 0, sizeof(WORD32) * 256);
  734|       |
  735|   149k|  if (object_type != AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (735:7): [True: 109k, False: 39.5k]
  ------------------
  736|   109k|    if (ptr_pulse_info->pulse_data_present) {
  ------------------
  |  Branch (736:9): [True: 23.7k, False: 85.8k]
  ------------------
  737|  23.7k|      k = ptr_swb_offset[ptr_pulse_info->pulse_start_band];
  738|       |
  739|  75.9k|      for (i = 0; i <= ptr_pulse_info->number_pulse; i++) {
  ------------------
  |  Branch (739:19): [True: 52.2k, False: 23.7k]
  ------------------
  740|  52.2k|        k = k + ptr_pulse_info->pulse_offset[i];
  741|  52.2k|        pulse_scratch[k] = ptr_pulse_info->pulse_amp[i];
  742|  52.2k|      }
  743|  23.7k|    }
  744|   109k|  } else {
  745|  39.5k|    ptr_pulse_info->pulse_data_present = 0;
  746|  39.5k|  }
  747|   149k|}
ixheaacd_read_spectral_data:
  754|   213k|    WORD32 aac_sf_data_resil_flag) {
  755|   213k|  WORD sfb, max_sfb;
  756|   213k|  WORD num_win_grp, group_len, grp_offset;
  757|       |
  758|   213k|  WORD index;
  759|   213k|  WORD8 *ptr_code_book;
  760|   213k|  WORD16 *ptr_scale_factor;
  761|   213k|  WORD32 *ptr_spec_coef;
  762|   213k|  ia_ics_info_struct *ptr_ics_info = &ptr_aac_dec_channel_info->str_ics_info;
  763|   213k|  WORD16 *swb_offset;
  764|       |
  765|   213k|  WORD32 maximum_bins_short = ptr_ics_info->frame_length >> 3;
  766|       |
  767|   213k|  WORD32 *ptr_spec_coef_out;
  768|       |
  769|   213k|  ptr_code_book = ptr_aac_dec_channel_info->ptr_code_book;
  770|   213k|  ptr_scale_factor = ptr_aac_dec_channel_info->ptr_scale_factor;
  771|   213k|  ptr_spec_coef = ptr_aac_dec_channel_info->ptr_spec_coeff;
  772|   213k|  max_sfb = ptr_ics_info->max_sfb;
  773|       |
  774|   213k|  swb_offset =
  775|   213k|      ptr_aac_tables->str_aac_sfb_info[ptr_ics_info->window_sequence].sfb_index;
  776|       |
  777|   213k|  if (!aac_spect_data_resil_flag) {
  ------------------
  |  Branch (777:7): [True: 171k, False: 42.4k]
  ------------------
  778|   171k|    if (ptr_aac_dec_channel_info->str_ics_info.window_sequence !=
  ------------------
  |  Branch (778:9): [True: 149k, False: 22.3k]
  ------------------
  779|   171k|        EIGHT_SHORT_SEQUENCE) {
  ------------------
  |  |  102|   171k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  780|   149k|      WORD8 *ptr_scratch;
  781|       |
  782|   149k|      if (object_type == AOT_ER_AAC_ELD)
  ------------------
  |  Branch (782:11): [True: 39.5k, False: 109k]
  ------------------
  783|  39.5k|        ptr_scratch = (WORD8 *)ptr_aac_dec_channel_info->pulse_scratch;
  784|   109k|      else
  785|   109k|        ptr_scratch = (WORD8 *)ptr_aac_dec_channel_info->scratch_buf_ptr;
  786|       |
  787|   149k|      memset(ptr_spec_coef, 0, sizeof(WORD32) * 1024);
  788|       |
  789|   149k|      ixheaacd_pulse_data_apply(&ptr_aac_dec_channel_info->str_pulse_info,
  790|   149k|                                ptr_scratch, swb_offset, object_type);
  791|       |
  792|   149k|      ptr_spec_coef_out = &ptr_spec_coef[0];
  793|   342k|      for (sfb = 0; sfb < max_sfb;) {
  ------------------
  |  Branch (793:21): [True: 193k, False: 148k]
  ------------------
  794|   193k|        WORD ret_val;
  795|   193k|        WORD32 sfb_width;
  796|   193k|        WORD32 sect_cb = ptr_code_book[sfb];
  797|   193k|        WORD start = sfb;
  798|   193k|        if ((object_type == AOT_ER_AAC_ELD) || (object_type == AOT_ER_AAC_LD)
  ------------------
  |  Branch (798:13): [True: 43.8k, False: 149k]
  |  Branch (798:48): [True: 55.6k, False: 93.9k]
  ------------------
  799|   128k|            || (object_type == AOT_ER_AAC_LC)) {
  ------------------
  |  Branch (799:16): [True: 28.9k, False: 65.0k]
  ------------------
  800|   128k|          if ((sect_cb >= 16) && (sect_cb <= 31)) {
  ------------------
  |  Branch (800:15): [True: 45.9k, False: 82.4k]
  |  Branch (800:34): [True: 45.9k, False: 0]
  ------------------
  801|  45.9k|            ptr_code_book[sfb] = sect_cb = 11;
  802|  45.9k|          }
  803|   128k|        }
  804|  1.92M|        for (; sfb < max_sfb && (ptr_code_book[sfb] == sect_cb); sfb++)
  ------------------
  |  Branch (804:16): [True: 1.85M, False: 76.5k]
  |  Branch (804:33): [True: 1.73M, False: 116k]
  ------------------
  805|  1.73M|          ;
  806|       |
  807|   193k|        sfb_width = swb_offset[sfb] - swb_offset[start];
  808|       |
  809|   193k|        if (sect_cb > ZERO_HCB && (sect_cb < NOISE_HCB)) {
  ------------------
  |  |   33|   386k|#define ZERO_HCB 0
  ------------------
                      if (sect_cb > ZERO_HCB && (sect_cb < NOISE_HCB)) {
  ------------------
  |  |   38|   160k|#define NOISE_HCB 13
  ------------------
  |  Branch (809:13): [True: 160k, False: 32.8k]
  |  Branch (809:35): [True: 131k, False: 28.9k]
  ------------------
  810|   131k|          ret_val = ixheaacd_huffman_dec_word2(it_bit_buff, sect_cb, sfb_width,
  811|   131k|                                               ptr_aac_tables,
  812|   131k|                                               ptr_spec_coef_out, ptr_scratch);
  813|       |
  814|   131k|          if (ret_val != 0) {
  ------------------
  |  Branch (814:15): [True: 193, False: 131k]
  ------------------
  815|    193|            return (WORD16)(
  816|    193|                (WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_EXCEEDS_MAX_HUFFDEC_VAL);
  ------------------
  |  |  101|    193|#define IA_XHEAAC_DEC_EXE_NONFATAL_EXCEEDS_MAX_HUFFDEC_VAL 0x00001806
  ------------------
  817|    193|          }
  818|   131k|        }
  819|       |
  820|  61.8k|        else {
  821|  61.8k|          if (ptr_aac_dec_channel_info->str_pulse_info.pulse_data_present) {
  ------------------
  |  Branch (821:15): [True: 20.6k, False: 41.1k]
  ------------------
  822|  20.6k|            ixheaacd_inverse_quantize(
  823|  20.6k|                ptr_spec_coef_out, sfb_width,
  824|  20.6k|                (WORD32 *)
  825|  20.6k|                    ptr_aac_tables->pstr_block_tables->ixheaacd_pow_table_Q13,
  826|  20.6k|                ptr_scratch);
  827|  20.6k|          }
  828|  61.8k|        }
  829|   193k|        ptr_scratch += sfb_width;
  830|   193k|        ptr_spec_coef_out += sfb_width;
  831|   193k|      }
  832|       |
  833|   148k|      if ((object_type != AOT_ER_AAC_ELD) && (object_type != AOT_ER_AAC_LD))
  ------------------
  |  Branch (833:11): [True: 109k, False: 39.4k]
  |  Branch (833:46): [True: 69.3k, False: 40.0k]
  ------------------
  834|  69.3k|        index = 1024 - swb_offset[max_sfb];
  835|  79.5k|      else
  836|  79.5k|        index = frame_size - swb_offset[max_sfb];
  837|       |
  838|   148k|      if (index < 0) return -1;
  ------------------
  |  Branch (838:11): [True: 3, False: 148k]
  ------------------
  839|       |
  840|   148k|    } else {
  841|  22.3k|      memset(ptr_spec_coef, 0, sizeof(WORD32) * 1024);
  842|       |
  843|  22.3k|      grp_offset = 0;
  844|       |
  845|   131k|      for (num_win_grp = 0; num_win_grp < ptr_ics_info->num_window_groups;
  ------------------
  |  Branch (845:29): [True: 108k, False: 22.3k]
  ------------------
  846|   108k|           num_win_grp++) {
  847|   108k|        WORD grp_len = ptr_ics_info->window_group_length[num_win_grp];
  848|       |
  849|   108k|        if (maximum_bins_short == 120)
  ------------------
  |  Branch (849:13): [True: 28.0k, False: 80.9k]
  ------------------
  850|  28.0k|          ptr_spec_coef_out = &ptr_spec_coef[grp_offset * maximum_bins_short];
  851|  80.9k|        else
  852|  80.9k|          ptr_spec_coef_out = &ptr_spec_coef[grp_offset * MAX_BINS_SHORT];
  ------------------
  |  |   29|  80.9k|#define MAX_BINS_SHORT 128
  ------------------
  853|       |
  854|   108k|        WORD bands = num_win_grp * MAX_SCALE_FACTOR_BANDS_SHORT;
  ------------------
  |  |   30|   108k|#define MAX_SCALE_FACTOR_BANDS_SHORT 16
  ------------------
  855|   189k|        for (sfb = 0; sfb < max_sfb;) {
  ------------------
  |  Branch (855:23): [True: 80.0k, False: 108k]
  ------------------
  856|  80.0k|          WORD sect_cb = ptr_code_book[bands];
  857|  80.0k|          WORD start = sfb;
  858|  80.0k|          WORD ret_val;
  859|       |
  860|  80.0k|          if ((object_type == AOT_ER_AAC_ELD) || (object_type == AOT_ER_AAC_LD)
  ------------------
  |  Branch (860:15): [True: 0, False: 80.0k]
  |  Branch (860:50): [True: 0, False: 80.0k]
  ------------------
  861|  80.0k|              || (object_type == AOT_ER_AAC_LC)) {
  ------------------
  |  Branch (861:18): [True: 68.1k, False: 11.9k]
  ------------------
  862|  68.1k|            if ((sect_cb >= 16) && (sect_cb <= 31)) {
  ------------------
  |  Branch (862:17): [True: 50.8k, False: 17.2k]
  |  Branch (862:36): [True: 50.8k, False: 0]
  ------------------
  863|  50.8k|              ptr_code_book[bands] = sect_cb = 11;
  864|  50.8k|            }
  865|  68.1k|          }
  866|       |
  867|   255k|          for (; sfb < max_sfb && (ptr_code_book[bands] == sect_cb);
  ------------------
  |  Branch (867:18): [True: 241k, False: 14.6k]
  |  Branch (867:35): [True: 175k, False: 65.4k]
  ------------------
  868|   175k|               sfb++, bands++)
  869|   175k|            ;
  870|       |
  871|  80.0k|          if (sect_cb > ZERO_HCB && (sect_cb < NOISE_HCB)) {
  ------------------
  |  |   33|   160k|#define ZERO_HCB 0
  ------------------
                        if (sect_cb > ZERO_HCB && (sect_cb < NOISE_HCB)) {
  ------------------
  |  |   38|  75.3k|#define NOISE_HCB 13
  ------------------
  |  Branch (871:15): [True: 75.3k, False: 4.75k]
  |  Branch (871:37): [True: 64.5k, False: 10.7k]
  ------------------
  872|  64.5k|            ret_val = ixheaacd_decode_huffman(
  873|  64.5k|                it_bit_buff, sect_cb, ptr_spec_coef_out, (WORD16 *)swb_offset,
  874|  64.5k|                start, sfb, grp_len, ptr_aac_tables, maximum_bins_short);
  875|       |
  876|  64.5k|            if (ret_val != 0) {
  ------------------
  |  Branch (876:17): [True: 69, False: 64.4k]
  ------------------
  877|     69|              return (WORD16)(
  878|     69|                  (WORD32)
  879|     69|                      IA_XHEAAC_DEC_EXE_NONFATAL_EXCEEDS_MAX_HUFFDEC_VAL);
  ------------------
  |  |  101|     69|#define IA_XHEAAC_DEC_EXE_NONFATAL_EXCEEDS_MAX_HUFFDEC_VAL 0x00001806
  ------------------
  880|     69|            }
  881|  64.5k|          }
  882|  80.0k|        }
  883|   108k|        grp_offset = (grp_offset + grp_len);
  884|   108k|      }
  885|  22.3k|    }
  886|   171k|    {
  887|   171k|      WORD32 *ptr_scale_table;
  888|       |
  889|   171k|      if (maximum_bins_short != 120)
  ------------------
  |  Branch (889:11): [True: 135k, False: 35.7k]
  ------------------
  890|   135k|        ptr_scale_table = ptr_aac_tables->pstr_block_tables->scale_table;
  891|  35.7k|      else
  892|  35.7k|        ptr_scale_table = ptr_aac_tables->pstr_block_tables->scale_table_960;
  893|       |
  894|   171k|      WORD8 *ptr_sfb_width =
  895|   171k|          ptr_aac_tables->str_aac_sfb_info[ptr_ics_info->window_sequence]
  896|   171k|              .sfb_width;
  897|       |
  898|   428k|      for (num_win_grp = 0; num_win_grp < ptr_ics_info->num_window_groups;
  ------------------
  |  Branch (898:29): [True: 257k, False: 171k]
  ------------------
  899|   257k|           num_win_grp++) {
  900|   257k|        for (group_len = 0;
  901|   585k|             group_len < ptr_ics_info->window_group_length[num_win_grp];
  ------------------
  |  Branch (901:14): [True: 327k, False: 257k]
  ------------------
  902|   327k|             group_len++) {
  903|   327k|          (*ixheaacd_scale_factor_process)(
  904|   327k|              &ptr_spec_coef[0], &ptr_scale_factor[0], max_sfb,
  905|   327k|              (WORD8 *)ptr_sfb_width, ptr_scale_table, total_channels,
  906|   327k|              object_type, aac_sf_data_resil_flag);
  907|       |
  908|   327k|          if (maximum_bins_short == 120)
  ------------------
  |  Branch (908:15): [True: 70.6k, False: 256k]
  ------------------
  909|  70.6k|            ptr_spec_coef += maximum_bins_short;
  910|   256k|          else
  911|   256k|            ptr_spec_coef += MAX_BINS_SHORT;
  ------------------
  |  |   29|   256k|#define MAX_BINS_SHORT 128
  ------------------
  912|   327k|        }
  913|       |
  914|   257k|        ptr_scale_factor += MAX_SCALE_FACTOR_BANDS_SHORT;
  ------------------
  |  |   30|   257k|#define MAX_SCALE_FACTOR_BANDS_SHORT 16
  ------------------
  915|   257k|      }
  916|   171k|    }
  917|   171k|  } else {
  918|  42.4k|    ia_hcr_info_struct *pstr_hcr_info = &ptr_aac_dec_channel_info->str_hcr_info;
  919|  42.4k|    WORD32 error = 0;
  920|       |
  921|  42.4k|    memset(ptr_spec_coef, 0, sizeof(WORD32) * 1024);
  922|       |
  923|  42.4k|    if (ptr_aac_dec_channel_info->reorder_spect_data_len != 0) {
  ------------------
  |  Branch (923:9): [True: 31.2k, False: 11.1k]
  ------------------
  924|  31.2k|      error = ixheaacd_huff_code_reorder_init(
  925|  31.2k|          pstr_hcr_info, ptr_aac_dec_channel_info, ptr_aac_tables, it_bit_buff);
  926|       |
  927|  31.2k|      if (error != 0) {
  ------------------
  |  Branch (927:11): [True: 256, False: 31.0k]
  ------------------
  928|    256|        return IA_XHEAAC_DEC_EXE_NONFATAL_DECODE_FRAME_ERROR;
  ------------------
  |  |  102|    256|#define IA_XHEAAC_DEC_EXE_NONFATAL_DECODE_FRAME_ERROR 0x00001807
  ------------------
  929|    256|      }
  930|  31.0k|      error = ixheaacd_hcr_decoder(pstr_hcr_info, ptr_aac_dec_channel_info,
  931|  31.0k|                                   ptr_aac_tables, it_bit_buff);
  932|       |
  933|  31.0k|      if (error != 0) {
  ------------------
  |  Branch (933:11): [True: 25.2k, False: 5.79k]
  ------------------
  934|  25.2k|        ixheaacd_huff_mute_erroneous_lines(pstr_hcr_info);
  935|  25.2k|      }
  936|       |
  937|  31.0k|      if (it_bit_buff->cnt_bits <
  ------------------
  |  Branch (937:11): [True: 280, False: 30.7k]
  ------------------
  938|  31.0k|          ptr_aac_dec_channel_info->reorder_spect_data_len) {
  939|    280|        longjmp(*(it_bit_buff->xaac_jmp_buf),
  940|    280|                IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|    280|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  941|    280|      }
  942|       |
  943|  30.7k|      it_bit_buff->cnt_bits +=
  944|  30.7k|          -ptr_aac_dec_channel_info->reorder_spect_data_len;
  945|  30.7k|      it_bit_buff->ptr_read_next =
  946|  30.7k|          it_bit_buff->ptr_bit_buf_base +
  947|  30.7k|          ((it_bit_buff->size - it_bit_buff->cnt_bits) >> 3);
  948|  30.7k|      it_bit_buff->bit_pos = (it_bit_buff->size - it_bit_buff->cnt_bits) & 7;
  949|       |
  950|  30.7k|    } else {
  951|  11.1k|      it_bit_buff->ptr_read_next =
  952|  11.1k|          it_bit_buff->ptr_bit_buf_base +
  953|  11.1k|          ((it_bit_buff->size - it_bit_buff->cnt_bits) >> 3);
  954|  11.1k|      it_bit_buff->bit_pos = (it_bit_buff->size - it_bit_buff->cnt_bits) & 7;
  955|  11.1k|    }
  956|  42.4k|  }
  957|       |
  958|   213k|  return AAC_DEC_OK;
  ------------------
  |  |   23|   213k|#define AAC_DEC_OK IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR
  |  |  ------------------
  |  |  |  |   27|   213k|#define IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR 0x00000000
  |  |  ------------------
  ------------------
  959|   213k|}
ixheaacd_read_tns_data:
  963|  51.2k|    ia_aac_dec_channel_info_struct *ptr_aac_dec_channel_info) {
  964|  51.2k|  WORD win_size, window_per_frame;
  965|  51.2k|  WORD n_filt_bits, start_band_bits, order_bits;
  966|  51.2k|  WORD32 bottom;
  967|       |
  968|  51.2k|  ia_ics_info_struct *ptr_ics_info = &ptr_aac_dec_channel_info->str_ics_info;
  969|  51.2k|  ia_tns_info_aac_struct *ptr_tns_info =
  970|  51.2k|      &ptr_aac_dec_channel_info->str_tns_info;
  971|       |
  972|  51.2k|  if (ptr_ics_info->window_sequence != EIGHT_SHORT_SEQUENCE) {
  ------------------
  |  |  102|  51.2k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  |  Branch (972:7): [True: 35.7k, False: 15.5k]
  ------------------
  973|  35.7k|    n_filt_bits = 2;
  974|  35.7k|    start_band_bits = 6;
  975|  35.7k|    order_bits = 5;
  976|  35.7k|    window_per_frame = 1;
  977|       |
  978|  35.7k|  } else {
  979|  15.5k|    n_filt_bits = 1;
  980|  15.5k|    start_band_bits = 4;
  981|  15.5k|    order_bits = 3;
  982|  15.5k|    window_per_frame = 8;
  983|  15.5k|  }
  984|       |
  985|  51.2k|  bottom = ptr_ics_info->num_swb_window;
  986|       |
  987|   211k|  for (win_size = 0; win_size < window_per_frame; win_size++) {
  ------------------
  |  Branch (987:22): [True: 159k, False: 51.0k]
  ------------------
  988|   159k|    WORD n_filt;
  989|   159k|    WORD start_band, coef_res;
  990|   159k|    ptr_tns_info->n_filt[win_size] = n_filt =
  991|   159k|        (WORD16)ixheaacd_read_bits_buf(it_bit_buff, n_filt_bits);
  992|       |
  993|   159k|    if (n_filt) {
  ------------------
  |  Branch (993:9): [True: 63.4k, False: 96.4k]
  ------------------
  994|  63.4k|      WORD filt;
  995|  63.4k|      WORD top;
  996|       |
  997|  63.4k|      coef_res = ixheaacd_read_bits_buf(it_bit_buff, 1);
  998|       |
  999|  63.4k|      top = bottom;
 1000|   136k|      for (filt = 0; filt < n_filt; filt++) {
  ------------------
  |  Branch (1000:22): [True: 73.4k, False: 63.3k]
  ------------------
 1001|  73.4k|        WORD order;
 1002|  73.4k|        ia_filter_info_struct *filter =
 1003|  73.4k|            &ptr_tns_info->str_filter[win_size][filt];
 1004|       |
 1005|  73.4k|        start_band = ixheaacd_read_bits_buf(it_bit_buff, start_band_bits);
 1006|       |
 1007|  73.4k|        if (top < start_band) {
  ------------------
  |  Branch (1007:13): [True: 57.8k, False: 15.5k]
  ------------------
 1008|  57.8k|          top = start_band;
 1009|  57.8k|        }
 1010|  73.4k|        filter->start_band = top - start_band;
 1011|  73.4k|        filter->stop_band = top;
 1012|       |
 1013|  73.4k|        top = filter->start_band;
 1014|       |
 1015|  73.4k|        if (filter->start_band < 0) {
  ------------------
  |  Branch (1015:13): [True: 0, False: 73.4k]
  ------------------
 1016|      0|          filter->order = -1;
 1017|      0|          return (WORD16)((WORD32)IA_XHEAAC_DEC_EXE_FATAL_TNS_RANGE_ERROR);
  ------------------
  |  |  120|      0|#define IA_XHEAAC_DEC_EXE_FATAL_TNS_RANGE_ERROR 0xFFFF9801
  ------------------
 1018|      0|        }
 1019|       |
 1020|  73.4k|        filter->order = order = ixheaacd_read_bits_buf(it_bit_buff, order_bits);
 1021|       |
 1022|  73.4k|        if ((order - MAX_ORDER_LONG) > 0) {
  ------------------
  |  |   25|  73.4k|#define MAX_ORDER_LONG 12
  ------------------
  |  Branch (1022:13): [True: 176, False: 73.2k]
  ------------------
 1023|    176|          return (WORD16)(
 1024|    176|              (WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_TNS_ORDER_ERROR);
  ------------------
  |  |  105|    176|#define IA_XHEAAC_DEC_EXE_NONFATAL_TNS_ORDER_ERROR 0x0000180A
  ------------------
 1025|    176|        }
 1026|       |
 1027|  73.2k|        if (order) {
  ------------------
  |  Branch (1027:13): [True: 63.8k, False: 9.42k]
  ------------------
 1028|  63.8k|          WORD i;
 1029|  63.8k|          WORD32 coef, coef_compress;
 1030|  63.8k|          WORD resolution, shift;
 1031|       |
 1032|  63.8k|          filter->direction =
 1033|  63.8k|              (WORD8)(ixheaacd_read_bits_buf(it_bit_buff, 1) ? -1 : 1);
  ------------------
  |  Branch (1033:23): [True: 39.6k, False: 24.2k]
  ------------------
 1034|       |
 1035|  63.8k|          coef_compress = ixheaacd_read_bits_buf(it_bit_buff, 1);
 1036|       |
 1037|  63.8k|          filter->resolution = coef_res;
 1038|       |
 1039|  63.8k|          resolution = coef_res + 3 - coef_compress;
 1040|       |
 1041|  63.8k|          shift = 32 - resolution;
 1042|       |
 1043|   452k|          for (i = 0; i < order; i++) {
  ------------------
  |  Branch (1043:23): [True: 388k, False: 63.8k]
  ------------------
 1044|   388k|            coef = ixheaacd_read_bits_buf(it_bit_buff, resolution);
 1045|   388k|            coef = coef << shift;
 1046|   388k|            filter->coef[i] = (WORD8)(coef >> shift);
 1047|   388k|          }
 1048|  63.8k|        }
 1049|  73.2k|      }
 1050|  63.4k|    }
 1051|   159k|  }
 1052|  51.0k|  return AAC_DEC_OK;
  ------------------
  |  |   23|  51.0k|#define AAC_DEC_OK IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR
  |  |  ------------------
  |  |  |  |   27|  51.0k|#define IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR 0x00000000
  |  |  ------------------
  ------------------
 1053|  51.2k|}
ixheaacd_inv_quant:
 1057|  20.1k|{
 1058|  20.1k|  WORD32 q1;
 1059|  20.1k|  WORD32 temp;
 1060|  20.1k|  WORD32 q_abs;
 1061|  20.1k|  WORD16 interp;
 1062|  20.1k|  WORD32 shift;
 1063|       |
 1064|  20.1k|  q_abs = *px_quant;
 1065|       |
 1066|  20.1k|  if (q_abs > (8191 + 32))
  ------------------
  |  Branch (1066:7): [True: 246, False: 19.8k]
  ------------------
 1067|    246|    return IA_XHEAAC_DEC_EXE_NONFATAL_EXCEEDS_MAX_HUFFDEC_VAL;
  ------------------
  |  |  101|    246|#define IA_XHEAAC_DEC_EXE_NONFATAL_EXCEEDS_MAX_HUFFDEC_VAL 0x00001806
  ------------------
 1068|       |
 1069|  19.8k|  if (q_abs < 1024) {
  ------------------
  |  Branch (1069:7): [True: 15.1k, False: 4.73k]
  ------------------
 1070|  15.1k|    shift = 3;
 1071|  15.1k|  } else {
 1072|  4.73k|    shift = 6;
 1073|  4.73k|  }
 1074|       |
 1075|  19.8k|  q1 = (q_abs) >> shift;
 1076|       |
 1077|  19.8k|  interp = q_abs - (q1 << shift);
 1078|       |
 1079|  19.8k|  temp = ixheaacd_pow_table_Q13[q1 + 1] - ixheaacd_pow_table_Q13[q1];
 1080|       |
 1081|  19.8k|  temp = (WORD32)(temp * (WORD32)interp);
 1082|       |
 1083|  19.8k|  temp = temp + (ixheaacd_pow_table_Q13[q1] << shift);
 1084|       |
 1085|  19.8k|  if (shift == 3)
  ------------------
  |  Branch (1085:7): [True: 15.1k, False: 4.73k]
  ------------------
 1086|  15.1k|    temp = temp << 1;
 1087|  4.73k|  else
 1088|  4.73k|    temp = temp << 2;
 1089|       |
 1090|  19.8k|  *px_quant = temp;
 1091|       |
 1092|  19.8k|  return 0;
 1093|  20.1k|}
ixheaacd_cblock_inv_quant_spect_data:
 1107|  41.6k|    ia_aac_dec_tables_struct *ptr_aac_tables) {
 1108|  41.6k|  int window, group, grp_win, band;
 1109|  41.6k|  IA_ERRORCODE err = IA_NO_ERROR;
  ------------------
  |  |   23|  41.6k|#define IA_NO_ERROR 0x00000000
  ------------------
 1110|  41.6k|  int sf_bands_transmitted = ptr_aac_dec_channel_info->str_ics_info.max_sfb;
 1111|  41.6k|  WORD8 *ptr_code_book = ptr_aac_dec_channel_info->ptr_code_book;
 1112|  41.6k|  const WORD16 *band_offsets = (WORD16 *)ixheaacd_getscalefactorbandoffsets(
 1113|  41.6k|      &(ptr_aac_dec_channel_info->str_ics_info), ptr_aac_tables);
 1114|  41.6k|  WORD32 *ptr_pow_table_Q13 =
 1115|  41.6k|      (WORD32 *)ptr_aac_tables->pstr_block_tables->ixheaacd_pow_table_Q13;
 1116|       |
 1117|  41.6k|  for (window = 0, group = 0;
 1118|  96.0k|       group < ptr_aac_dec_channel_info->str_ics_info.num_window_groups;
  ------------------
  |  Branch (1118:8): [True: 54.3k, False: 41.6k]
  ------------------
 1119|  54.3k|       group++) {
 1120|  54.3k|    for (grp_win = 0;
 1121|   180k|         grp_win <
  ------------------
  |  Branch (1121:10): [True: 126k, False: 54.3k]
  ------------------
 1122|   180k|         ptr_aac_dec_channel_info->str_ics_info.window_group_length[group];
 1123|   126k|         grp_win++, window++) {
 1124|  1.76M|      for (band = 0; band < sf_bands_transmitted; band++) {
  ------------------
  |  Branch (1124:22): [True: 1.63M, False: 126k]
  ------------------
 1125|  1.63M|        WORD32 *ptr_spec_coef =
 1126|  1.63M|            SPEC(ptr_aac_dec_channel_info->ptr_spec_coeff, window,
  ------------------
  |  |   91|  1.63M|#define SPEC(ptr, w, gl) ((ptr) + ((w) * (gl)))
  ------------------
 1127|  1.63M|                 ptr_aac_dec_channel_info->granule_len) +
 1128|  1.63M|            band_offsets[band];
 1129|  1.63M|        int num_lines = band_offsets[band + 1] - band_offsets[band];
 1130|  1.63M|        int bnds = group * 16 + band;
 1131|  1.63M|        int i;
 1132|       |
 1133|  1.63M|        if ((ptr_code_book[bnds] == ZERO_HCB) ||
  ------------------
  |  |   33|  1.63M|#define ZERO_HCB 0
  ------------------
  |  Branch (1133:13): [True: 49.1k, False: 1.58M]
  ------------------
 1134|  1.58M|            (ptr_code_book[bnds] == INTENSITY_HCB) ||
  ------------------
  |  |   40|  1.58M|#define INTENSITY_HCB 15
  ------------------
  |  Branch (1134:13): [True: 243k, False: 1.34M]
  ------------------
 1135|  1.34M|            (ptr_code_book[bnds] == INTENSITY_HCB2))
  ------------------
  |  |   39|  1.34M|#define INTENSITY_HCB2 14
  ------------------
  |  Branch (1135:13): [True: 225k, False: 1.12M]
  ------------------
 1136|   518k|          continue;
 1137|       |
 1138|  1.12M|        if (ptr_code_book[bnds] == NOISE_HCB) {
  ------------------
  |  |   38|  1.12M|#define NOISE_HCB 13
  ------------------
  |  Branch (1138:13): [True: 143k, False: 977k]
  ------------------
 1139|   143k|          continue;
 1140|   143k|        }
 1141|       |
 1142|  13.5M|        for (i = 0; i < num_lines; i++) {
  ------------------
  |  Branch (1142:21): [True: 12.5M, False: 977k]
  ------------------
 1143|  12.5M|          WORD8 temp = 0;
 1144|  12.5M|          WORD32 out1 = ptr_spec_coef[i];
 1145|  12.5M|          if (out1 <= 0) {
  ------------------
  |  Branch (1145:15): [True: 10.1M, False: 2.36M]
  ------------------
 1146|  10.1M|            out1 = sub_d(temp, out1);
  ------------------
  |  |   24|  10.1M|#define sub_d(a, b) ((a) - (b))
  ------------------
 1147|  10.1M|            if (out1 > 127) {
  ------------------
  |  Branch (1147:17): [True: 3.26k, False: 10.1M]
  ------------------
 1148|  3.26k|              err = ixheaacd_inv_quant(&out1, ptr_pow_table_Q13);
 1149|  3.26k|              if (err) return err;
  ------------------
  |  Branch (1149:19): [True: 0, False: 3.26k]
  ------------------
 1150|  3.26k|            } else
 1151|  10.1M|              out1 = ptr_pow_table_Q13[out1];
 1152|  10.1M|            ptr_spec_coef[i] = -out1;
 1153|       |
 1154|  10.1M|          } else {
 1155|  2.36M|            if (out1 > 127) {
  ------------------
  |  Branch (1155:17): [True: 3.81k, False: 2.36M]
  ------------------
 1156|  3.81k|              err = ixheaacd_inv_quant(&out1, ptr_pow_table_Q13);
 1157|  3.81k|              if (err) return err;
  ------------------
  |  Branch (1157:19): [True: 0, False: 3.81k]
  ------------------
 1158|  3.81k|            } else
 1159|  2.36M|              out1 = ptr_pow_table_Q13[out1];
 1160|       |
 1161|  2.36M|            ptr_spec_coef[i] = out1;
 1162|  2.36M|          }
 1163|  12.5M|        }
 1164|   977k|      }
 1165|   126k|    }
 1166|  54.3k|  }
 1167|       |
 1168|  41.6k|  return AAC_DEC_OK;
  ------------------
  |  |   23|  41.6k|#define AAC_DEC_OK IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR
  |  |  ------------------
  |  |  |  |   27|  41.6k|#define IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR 0x00000000
  |  |  ------------------
  ------------------
 1169|  41.6k|}
ixheaacd_init_ltp_object:
 1171|  56.4k|void ixheaacd_init_ltp_object(ltp_info *ltp) {
 1172|  56.4k|  ltp->data_present = 0;
 1173|  56.4k|  ltp->last_band = 0;
 1174|       |
 1175|  56.4k|  ltp->lag_update = 0;
 1176|  56.4k|  ltp->coef = 0;
 1177|  56.4k|}
ixheaacd_ltp_data:
 1181|  44.9k|                         WORD32 frame_len) {
 1182|  44.9k|  UWORD8 sfb, w;
 1183|       |
 1184|  44.9k|  if (object_type == AOT_ER_AAC_LD) {
  ------------------
  |  Branch (1184:7): [True: 36.8k, False: 8.11k]
  ------------------
 1185|  36.8k|    ltp->lag_update = ixheaacd_read_bits_buf(it_bit_buf, 1);
 1186|       |
 1187|  36.8k|    if (ltp->lag_update) {
  ------------------
  |  Branch (1187:9): [True: 11.4k, False: 25.3k]
  ------------------
 1188|  11.4k|      ltp->lag = (UWORD16)ixheaacd_read_bits_buf(it_bit_buf, 10);
 1189|  11.4k|    }
 1190|  36.8k|  } else {
 1191|  8.11k|    ltp->lag = (UWORD16)ixheaacd_read_bits_buf(it_bit_buf, 11);
 1192|  8.11k|  }
 1193|       |
 1194|  44.9k|  if (ltp->lag > (frame_len << 1)) return -1;
  ------------------
  |  Branch (1194:7): [True: 6.00k, False: 38.9k]
  ------------------
 1195|       |
 1196|  38.9k|  ltp->coef = (UWORD8)ixheaacd_read_bits_buf(it_bit_buf, 3);
 1197|       |
 1198|  38.9k|  if (ics->window_sequence == EIGHT_SHORT_SEQUENCE) {
  ------------------
  |  |  102|  38.9k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  |  Branch (1198:7): [True: 0, False: 38.9k]
  ------------------
 1199|      0|    for (w = 0; w < 8; w++) {
  ------------------
  |  Branch (1199:17): [True: 0, False: 0]
  ------------------
 1200|      0|      if ((ltp->short_used[w] = ixheaacd_read_bits_buf(it_bit_buf, 1)) & 1) {
  ------------------
  |  Branch (1200:11): [True: 0, False: 0]
  ------------------
 1201|      0|        ltp->short_lag_present[w] = ixheaacd_read_bits_buf(it_bit_buf, 1);
 1202|      0|        if (ltp->short_lag_present[w]) {
  ------------------
  |  Branch (1202:13): [True: 0, False: 0]
  ------------------
 1203|      0|          ltp->short_lag[w] = (UWORD8)ixheaacd_read_bits_buf(it_bit_buf, 4);
 1204|      0|        }
 1205|      0|      }
 1206|      0|    }
 1207|  38.9k|  } else {
 1208|  38.9k|    ltp->last_band = (ics->max_sfb < MAX_LTP_SFB ? ics->max_sfb : MAX_LTP_SFB);
  ------------------
  |  |   24|  38.9k|#define MAX_LTP_SFB 40
  ------------------
                  ltp->last_band = (ics->max_sfb < MAX_LTP_SFB ? ics->max_sfb : MAX_LTP_SFB);
  ------------------
  |  |   24|    333|#define MAX_LTP_SFB 40
  ------------------
  |  Branch (1208:23): [True: 38.5k, False: 333]
  ------------------
 1209|       |
 1210|   848k|    for (sfb = 0; sfb < ltp->last_band; sfb++) {
  ------------------
  |  Branch (1210:19): [True: 809k, False: 38.9k]
  ------------------
 1211|   809k|      ltp->long_used[sfb] = ixheaacd_read_bits_buf(it_bit_buf, 1);
 1212|   809k|    }
 1213|  38.9k|  }
 1214|  38.9k|  if (ics->frame_length == 480) {
  ------------------
  |  Branch (1214:7): [True: 3.06k, False: 35.8k]
  ------------------
 1215|  3.06k|    if ((ics->sampling_rate_index > 5) &&
  ------------------
  |  Branch (1215:9): [True: 169, False: 2.89k]
  ------------------
 1216|    169|        (ltp->last_band > MAX_LTP_SFB_SR_FIVE_PLUS_480))
  ------------------
  |  |   25|    169|#define MAX_LTP_SFB_SR_FIVE_PLUS_480 31
  ------------------
  |  Branch (1216:9): [True: 120, False: 49]
  ------------------
 1217|    120|      ltp->last_band = MAX_LTP_SFB_SR_FIVE_PLUS_480;
  ------------------
  |  |   25|    120|#define MAX_LTP_SFB_SR_FIVE_PLUS_480 31
  ------------------
 1218|  2.94k|    else if ((ics->sampling_rate_index == 5) &&
  ------------------
  |  Branch (1218:14): [True: 1.83k, False: 1.11k]
  ------------------
 1219|  1.83k|             (ltp->last_band > MAX_LTP_SFB_SR_FIVE_480))
  ------------------
  |  |   26|  1.83k|#define MAX_LTP_SFB_SR_FIVE_480 38
  ------------------
  |  Branch (1219:14): [True: 62, False: 1.77k]
  ------------------
 1220|     62|      ltp->last_band = MAX_LTP_SFB_SR_FIVE_480;
  ------------------
  |  |   26|     62|#define MAX_LTP_SFB_SR_FIVE_480 38
  ------------------
 1221|  2.88k|    else if ((ics->sampling_rate_index < 5) &&
  ------------------
  |  Branch (1221:14): [True: 1.06k, False: 1.81k]
  ------------------
 1222|  1.06k|             (ltp->last_band > MAX_LTP_SFB_SR_FIVE_LESS_480))
  ------------------
  |  |   27|  1.06k|#define MAX_LTP_SFB_SR_FIVE_LESS_480 36
  ------------------
  |  Branch (1222:14): [True: 86, False: 980]
  ------------------
 1223|     86|      ltp->last_band = MAX_LTP_SFB_SR_FIVE_LESS_480;
  ------------------
  |  |   27|     86|#define MAX_LTP_SFB_SR_FIVE_LESS_480 36
  ------------------
 1224|  35.8k|  } else if (ics->frame_length == 512) {
  ------------------
  |  Branch (1224:14): [True: 24.7k, False: 11.1k]
  ------------------
 1225|  24.7k|    if ((ics->sampling_rate_index > 5) &&
  ------------------
  |  Branch (1225:9): [True: 978, False: 23.7k]
  ------------------
 1226|    978|        (ltp->last_band > MAX_LTP_SFB_SR_FIVE_PLUS_512))
  ------------------
  |  |   28|    978|#define MAX_LTP_SFB_SR_FIVE_PLUS_512 32
  ------------------
  |  Branch (1226:9): [True: 97, False: 881]
  ------------------
 1227|     97|      ltp->last_band = MAX_LTP_SFB_SR_FIVE_PLUS_512;
  ------------------
  |  |   28|     97|#define MAX_LTP_SFB_SR_FIVE_PLUS_512 32
  ------------------
 1228|  24.6k|    else if ((ics->sampling_rate_index == 5) &&
  ------------------
  |  Branch (1228:14): [True: 22.4k, False: 2.19k]
  ------------------
 1229|  22.4k|             (ltp->last_band > MAX_LTP_SFB_SR_FIVE_512))
  ------------------
  |  |   29|  22.4k|#define MAX_LTP_SFB_SR_FIVE_512 38
  ------------------
  |  Branch (1229:14): [True: 17, False: 22.4k]
  ------------------
 1230|     17|      ltp->last_band = MAX_LTP_SFB_SR_FIVE_512;
  ------------------
  |  |   29|     17|#define MAX_LTP_SFB_SR_FIVE_512 38
  ------------------
 1231|  24.6k|    else if ((ics->sampling_rate_index < 5) &&
  ------------------
  |  Branch (1231:14): [True: 1.31k, False: 23.3k]
  ------------------
 1232|  1.31k|             (ltp->last_band > MAX_LTP_SFB_SR_FIVE_LESS_512))
  ------------------
  |  |   30|  1.31k|#define MAX_LTP_SFB_SR_FIVE_LESS_512 37
  ------------------
  |  Branch (1232:14): [True: 10, False: 1.30k]
  ------------------
 1233|     10|      ltp->last_band = MAX_LTP_SFB_SR_FIVE_LESS_512;
  ------------------
  |  |   30|     10|#define MAX_LTP_SFB_SR_FIVE_LESS_512 37
  ------------------
 1234|  24.7k|  }
 1235|  38.9k|  return 0;
 1236|  44.9k|}
ixheaacd_channel.c:ixheaacd_read_block_data:
  222|   216k|{
  223|   216k|  FLAG gain_control_data_present;
  224|   216k|  WORD16 error_code = AAC_DEC_OK;
  ------------------
  |  |   23|   216k|#define AAC_DEC_OK IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR
  |  |  ------------------
  |  |  |  |   27|   216k|#define IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR 0x00000000
  |  |  ------------------
  ------------------
  225|       |
  226|   216k|  if (ptr_aac_dec_channel_info->str_ics_info.window_sequence ==
  ------------------
  |  Branch (226:7): [True: 34.8k, False: 181k]
  ------------------
  227|   216k|      EIGHT_SHORT_SEQUENCE) {
  ------------------
  |  |  102|   216k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  228|  34.8k|    memset(ptr_aac_dec_channel_info->ptr_scale_factor, 0,
  229|  34.8k|           MAX_WINDOWS * MAX_SCALE_FACTOR_BANDS_SHORT * 3);
  ------------------
  |  |   26|  34.8k|#define MAX_WINDOWS 8
  ------------------
                         MAX_WINDOWS * MAX_SCALE_FACTOR_BANDS_SHORT * 3);
  ------------------
  |  |   30|  34.8k|#define MAX_SCALE_FACTOR_BANDS_SHORT 16
  ------------------
  230|  34.8k|  }
  231|       |
  232|   216k|  error_code = ixheaacd_read_section_data(
  233|   216k|      it_bit_buff, ptr_aac_dec_channel_info, aac_spect_data_resil_flag,
  234|   216k|      aac_sect_data_resil_flag, ptr_aac_tables);
  235|       |
  236|   216k|  if (error_code) {
  ------------------
  |  Branch (236:7): [True: 1.26k, False: 214k]
  ------------------
  237|  1.26k|    return error_code;
  238|  1.26k|  }
  239|   214k|  if (aac_sf_data_resil_flag &&
  ------------------
  |  Branch (239:7): [True: 81.1k, False: 133k]
  ------------------
  240|  81.1k|      ((object_type == AOT_ER_AAC_ELD) || (object_type == AOT_ER_AAC_LD)))
  ------------------
  |  Branch (240:8): [True: 23.7k, False: 57.4k]
  |  Branch (240:43): [True: 31.9k, False: 25.4k]
  ------------------
  241|  55.7k|    ixheaacd_rvlc_read(it_bit_buff, ptr_aac_dec_channel_info);
  242|   159k|  else
  243|   159k|    ixheaacd_read_scale_factor_data(it_bit_buff, ptr_aac_dec_channel_info,
  244|   159k|                                    ptr_aac_tables, object_type);
  245|       |
  246|   214k|  error_code = 0;
  247|   214k|  if (object_type != AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (247:7): [True: 172k, False: 42.2k]
  ------------------
  248|   172k|    ptr_aac_dec_channel_info->str_pulse_info.pulse_data_present =
  249|   172k|        ixheaacd_read_bits_buf(it_bit_buff, 1);
  250|   172k|    if (ptr_aac_dec_channel_info->str_pulse_info.pulse_data_present) {
  ------------------
  |  Branch (250:9): [True: 34.2k, False: 138k]
  ------------------
  251|  34.2k|      error_code = ixheaacd_read_pulse_data(
  252|  34.2k|          it_bit_buff, &ptr_aac_dec_channel_info->str_pulse_info,
  253|  34.2k|          ptr_aac_tables);
  254|  34.2k|    }
  255|       |
  256|   172k|    if (error_code) {
  ------------------
  |  Branch (256:9): [True: 136, False: 172k]
  ------------------
  257|    136|      return error_code;
  258|    136|    }
  259|   172k|  }
  260|       |
  261|   214k|  ptr_aac_dec_channel_info->str_tns_info.tns_data_present =
  262|   214k|      (FLAG)ixheaacd_read_bits_buf(it_bit_buff, 1);
  263|       |
  264|   214k|  if (object_type < ER_OBJECT_START) {
  ------------------
  |  |   64|   214k|#define ER_OBJECT_START 17
  ------------------
  |  Branch (264:7): [True: 63.4k, False: 151k]
  ------------------
  265|  63.4k|    error_code = 0;
  266|  63.4k|    if (ptr_aac_dec_channel_info->str_tns_info.tns_data_present) {
  ------------------
  |  Branch (266:9): [True: 16.9k, False: 46.5k]
  ------------------
  267|  16.9k|      error_code =
  268|  16.9k|          ixheaacd_read_tns_data(it_bit_buff, ptr_aac_dec_channel_info);
  269|  16.9k|    }
  270|       |
  271|  63.4k|    if (error_code) {
  ------------------
  |  Branch (271:9): [True: 45, False: 63.4k]
  ------------------
  272|     45|      return error_code;
  273|     45|    }
  274|  63.4k|  }
  275|       |
  276|   214k|  if (object_type != AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (276:7): [True: 172k, False: 42.2k]
  ------------------
  277|   172k|    gain_control_data_present = ixheaacd_read_bits_buf(it_bit_buff, 1);
  278|       |
  279|   172k|    if (gain_control_data_present) {
  ------------------
  |  Branch (279:9): [True: 479, False: 171k]
  ------------------
  280|    479|      return (WORD16)(
  281|    479|          (WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_GAIN_CONTROL_DATA_PRESENT);
  ------------------
  |  |  104|    479|#define IA_XHEAAC_DEC_EXE_NONFATAL_GAIN_CONTROL_DATA_PRESENT 0x00001809
  ------------------
  282|    479|    }
  283|   172k|  }
  284|       |
  285|   214k|  if (object_type == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (285:7): [True: 42.1k, False: 172k]
  ------------------
  286|  42.1k|    if (ptr_aac_dec_channel_info->str_tns_info.tns_data_present)
  ------------------
  |  Branch (286:9): [True: 4.17k, False: 37.9k]
  ------------------
  287|  4.17k|      error_code =
  288|  4.17k|          ixheaacd_read_tns_data(it_bit_buff, ptr_aac_dec_channel_info);
  289|  42.1k|    if (error_code) return error_code;
  ------------------
  |  Branch (289:9): [True: 70, False: 42.0k]
  ------------------
  290|  42.1k|  }
  291|       |
  292|   214k|  if (aac_spect_data_resil_flag &&
  ------------------
  |  Branch (292:7): [True: 42.4k, False: 171k]
  ------------------
  293|  42.4k|      ((object_type == AOT_ER_AAC_ELD) || (object_type == AOT_ER_AAC_LD)
  ------------------
  |  Branch (293:8): [True: 2.52k, False: 39.9k]
  |  Branch (293:43): [True: 18.0k, False: 21.9k]
  ------------------
  294|  21.9k|      || (object_type == AOT_ER_AAC_LC)))
  ------------------
  |  Branch (294:10): [True: 21.9k, False: 0]
  ------------------
  295|  42.4k|    ixheaacd_hcr_read(it_bit_buff, ptr_aac_dec_channel_info, ele_type);
  296|       |
  297|   214k|  if (aac_sf_data_resil_flag &&
  ------------------
  |  Branch (297:7): [True: 80.9k, False: 133k]
  ------------------
  298|  80.9k|      ((object_type == AOT_ER_AAC_ELD) || (object_type == AOT_ER_AAC_LD))) {
  ------------------
  |  Branch (298:8): [True: 23.7k, False: 57.2k]
  |  Branch (298:43): [True: 31.9k, False: 25.3k]
  ------------------
  299|  55.6k|    error_code = ixheaacd_rvlc_dec(
  300|  55.6k|        ptr_aac_dec_channel_info, ptr_aac_dec_static_channel_info, it_bit_buff);
  301|  55.6k|    if (error_code) return error_code;
  ------------------
  |  Branch (301:9): [True: 87, False: 55.5k]
  ------------------
  302|       |
  303|  55.5k|    it_bit_buff->bit_pos = 7 - it_bit_buff->bit_pos;
  304|  55.5k|  }
  305|       |
  306|   214k|  if (object_type == AOT_ER_AAC_LD || object_type == AOT_ER_AAC_LC) {
  ------------------
  |  Branch (306:7): [True: 69.8k, False: 144k]
  |  Branch (306:39): [True: 39.0k, False: 105k]
  ------------------
  307|   108k|    if (ptr_aac_dec_channel_info->str_tns_info.tns_data_present)
  ------------------
  |  Branch (307:9): [True: 30.1k, False: 78.6k]
  ------------------
  308|  30.1k|      error_code =
  309|  30.1k|          ixheaacd_read_tns_data(it_bit_buff, ptr_aac_dec_channel_info);
  310|   108k|    if (error_code) return error_code;
  ------------------
  |  Branch (310:9): [True: 61, False: 108k]
  ------------------
  311|   108k|  }
  312|       |
  313|   214k|  { it_bit_buff->bit_pos = 7 - it_bit_buff->bit_pos; }
  314|       |
  315|   214k|  error_code = ixheaacd_read_spectral_data(
  316|   214k|      it_bit_buff, ptr_aac_dec_channel_info, ptr_aac_tables, total_channels,
  317|   214k|      frame_size, object_type, aac_spect_data_resil_flag,
  318|   214k|      aac_sf_data_resil_flag);
  319|       |
  320|   214k|  it_bit_buff->bit_pos = (7 - it_bit_buff->bit_pos);
  321|       |
  322|   214k|  return error_code;
  323|   214k|}

ixheaacd_allocate_mem_persistent:
   94|  8.55k|    WORD *persistent_used_total, WORD *sbr_persistent_start, WORD ps_enable) {
   95|  8.55k|  WORD persistent_used;
   96|  8.55k|  WORD8 **temp_persistent =
   97|  8.55k|      (WORD8 **)&(p_state_enhaacplus_dec->aac_persistent_mem_v);
   98|  8.55k|  *temp_persistent += *persistent_used_total;
   99|       |
  100|  8.55k|  persistent_used = ixheaacd_set_aac_persistent_buffers(
  101|  8.55k|      p_state_enhaacplus_dec->aac_persistent_mem_v, channels);
  102|       |
  103|  8.55k|  *persistent_used_total += persistent_used;
  104|       |
  105|  8.55k|  *sbr_persistent_start = *persistent_used_total;
  106|       |
  107|  8.55k|  p_state_enhaacplus_dec->sbr_persistent_mem_v =
  108|  8.55k|      (pVOID)((pWORD8)p_state_enhaacplus_dec->aac_persistent_mem_v +
  109|  8.55k|              IXHEAAC_GET_SIZE_ALIGNED(persistent_used, BYTE_ALIGN_8));
  ------------------
  |  |   87|  8.55k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  110|       |
  111|  8.55k|  persistent_used = ixheaacd_getsize_sbr_persistent();
  112|       |
  113|  8.55k|  ixheaacd_set_sbr_persistent_buffers(
  114|  8.55k|      p_state_enhaacplus_dec->sbr_persistent_mem_v, &persistent_used, channels,
  115|  8.55k|      ps_enable);
  116|       |
  117|  8.55k|  *persistent_used_total += persistent_used;
  118|       |
  119|  8.55k|  {
  120|  8.55k|    struct ia_aac_persistent_struct *aac_persistent_mem =
  121|  8.55k|        (struct ia_aac_persistent_struct *)
  122|  8.55k|            p_obj_enhaacplus_dec->p_state_aac->aac_persistent_mem_v;
  123|  8.55k|    aac_persistent_mem->str_aac_decoder.pstr_aac_tables =
  124|  8.55k|        &p_obj_enhaacplus_dec->aac_tables;
  125|  8.55k|    aac_persistent_mem->str_aac_decoder.pstr_common_tables =
  126|  8.55k|        p_obj_enhaacplus_dec->common_tables;
  127|  8.55k|  }
  128|       |
  129|  8.55k|  ixheaacd_set_sbr_persistent_table_pointer(
  130|  8.55k|      p_obj_enhaacplus_dec->p_state_aac->sbr_persistent_mem_v,
  131|  8.55k|      &p_obj_enhaacplus_dec->str_sbr_tables,
  132|  8.55k|      p_obj_enhaacplus_dec->common_tables);
  133|  8.55k|}
ixheaacd_create_bit_buf:
  137|   824k|                                           WORD32 bit_buf_size) {
  138|   824k|  it_bit_buff->ptr_bit_buf_base = ptr_bit_buf_base;
  139|   824k|  it_bit_buff->ptr_bit_buf_end = ptr_bit_buf_base + bit_buf_size - 1;
  140|       |
  141|   824k|  it_bit_buff->ptr_read_next = ptr_bit_buf_base;
  142|   824k|  it_bit_buff->bit_pos = 7;
  143|       |
  144|   824k|  it_bit_buff->cnt_bits = 0;
  145|   824k|  it_bit_buff->size = bit_buf_size << 3;
  146|       |
  147|   824k|  it_bit_buff->adts_header_present = 0;
  148|   824k|  it_bit_buff->protection_absent = 0;
  149|   824k|  it_bit_buff->pstr_adts_crc_info = &it_bit_buff->str_adts_crc_info;
  150|       |
  151|   824k|  it_bit_buff->max_size = it_bit_buff->size;
  152|       |
  153|   824k|  ixheaacd_adts_crc_open(it_bit_buff->pstr_adts_crc_info);
  154|       |
  155|   824k|  return it_bit_buff;
  156|   824k|}
ixheaacd_create_init_bit_buf:
  160|   260k|                                  WORD32 bit_buf_size) {
  161|   260k|  ixheaacd_create_bit_buf(it_bit_buff, ptr_bit_buf_base, bit_buf_size);
  162|   260k|  it_bit_buff->cnt_bits = (bit_buf_size << 3);
  163|   260k|  return;
  164|   260k|}
ixheaacd_read_bidirection:
  167|  1.75M|                               WORD32 ixheaacd_drc_offset) {
  168|  1.75M|  if (ixheaacd_drc_offset != 0) {
  ------------------
  |  Branch (168:7): [True: 1.75M, False: 2.15k]
  ------------------
  169|  1.75M|    WORD32 byte_offset;
  170|  1.75M|    if ((it_bit_buff->cnt_bits < 0) ||
  ------------------
  |  Branch (170:9): [True: 0, False: 1.75M]
  ------------------
  171|  1.75M|        (it_bit_buff->cnt_bits - ixheaacd_drc_offset < 0) ||
  ------------------
  |  Branch (171:9): [True: 10, False: 1.75M]
  ------------------
  172|  1.75M|        (it_bit_buff->cnt_bits - ixheaacd_drc_offset > it_bit_buff->size)) {
  ------------------
  |  Branch (172:9): [True: 0, False: 1.75M]
  ------------------
  173|     10|      longjmp(*(it_bit_buff->xaac_jmp_buf),
  174|     10|              IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|     10|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  175|     10|    }
  176|  1.75M|    it_bit_buff->cnt_bits = it_bit_buff->cnt_bits - ixheaacd_drc_offset;
  177|  1.75M|    it_bit_buff->bit_pos = it_bit_buff->bit_pos - ixheaacd_drc_offset;
  178|  1.75M|    byte_offset = it_bit_buff->bit_pos >> 3;
  179|  1.75M|    it_bit_buff->bit_pos = it_bit_buff->bit_pos - (byte_offset << 3);
  180|       |
  181|  1.75M|    if (byte_offset) {
  ------------------
  |  Branch (181:9): [True: 560k, False: 1.19M]
  ------------------
  182|   560k|      UWORD8 *ptr_read_next;
  183|       |
  184|   560k|      ptr_read_next = it_bit_buff->ptr_read_next;
  185|       |
  186|   560k|      ptr_read_next = ptr_read_next - (byte_offset);
  187|       |
  188|   560k|      it_bit_buff->ptr_read_next = ptr_read_next;
  189|   560k|    }
  190|  1.75M|  }
  191|  1.75M|}

ixheaacd_get_channel_mask:
  108|  7.42k|    ia_exhaacplus_dec_api_struct *p_obj_enhaacplus_dec) {
  109|  7.42k|  WORD ixheaacd_drc_offset = 0, channel_mask = 0;
  110|  7.42k|  WORD flag1 = 0, flag2 = 0;
  111|  7.42k|  WORD ch_idx;
  112|  7.42k|  WORD *ptr_slot_element = p_obj_enhaacplus_dec->aac_config.slot_element;
  113|  7.42k|  WORD *ptr_element_type = p_obj_enhaacplus_dec->aac_config.element_type;
  114|       |
  115|  7.42k|  memset(ptr_slot_element, 0, sizeof(WORD) * MAX_BS_ELEMENT);
  ------------------
  |  |   24|  7.42k|#define MAX_BS_ELEMENT (8 + MAX_CC_CHANNEL_NUM)
  |  |  ------------------
  |  |  |  |   23|  7.42k|#define MAX_CC_CHANNEL_NUM (2)
  |  |  ------------------
  ------------------
  116|       |
  117|  67.5k|  for (ch_idx = 0; ch_idx < MAX_BS_ELEMENT; ch_idx++) {
  ------------------
  |  |   24|  67.5k|#define MAX_BS_ELEMENT (8 + MAX_CC_CHANNEL_NUM)
  |  |  ------------------
  |  |  |  |   23|  67.5k|#define MAX_CC_CHANNEL_NUM (2)
  |  |  ------------------
  ------------------
  |  Branch (117:20): [True: 61.5k, False: 6.00k]
  ------------------
  118|  61.5k|    if (ptr_element_type[ch_idx] == 1) {
  ------------------
  |  Branch (118:9): [True: 1.41k, False: 60.1k]
  ------------------
  119|  1.41k|      channel_mask += 0x3;
  120|  1.41k|      ptr_slot_element[ch_idx] = ixheaacd_drc_offset;
  121|  1.41k|      ixheaacd_drc_offset += 2;
  122|  1.41k|      flag1 = ch_idx + 1;
  123|  1.41k|      break;
  124|  1.41k|    }
  125|  61.5k|  }
  126|       |
  127|  31.6k|  for (ch_idx = 0; ch_idx < MAX_BS_ELEMENT; ch_idx++) {
  ------------------
  |  |   24|  31.6k|#define MAX_BS_ELEMENT (8 + MAX_CC_CHANNEL_NUM)
  |  |  ------------------
  |  |  |  |   23|  31.6k|#define MAX_CC_CHANNEL_NUM (2)
  |  |  ------------------
  ------------------
  |  Branch (127:20): [True: 29.2k, False: 2.39k]
  ------------------
  128|  29.2k|    if (ptr_element_type[ch_idx] == 0) {
  ------------------
  |  Branch (128:9): [True: 5.02k, False: 24.1k]
  ------------------
  129|  5.02k|      channel_mask += 0x4;
  130|  5.02k|      ptr_slot_element[ch_idx] = ixheaacd_drc_offset;
  131|  5.02k|      ixheaacd_drc_offset += 1;
  132|  5.02k|      flag2 = ch_idx + 1;
  133|  5.02k|      break;
  134|  5.02k|    }
  135|  29.2k|  }
  136|  70.6k|  for (ch_idx = 0; ch_idx < MAX_BS_ELEMENT; ch_idx++) {
  ------------------
  |  |   24|  70.6k|#define MAX_BS_ELEMENT (8 + MAX_CC_CHANNEL_NUM)
  |  |  ------------------
  |  |  |  |   23|  70.6k|#define MAX_CC_CHANNEL_NUM (2)
  |  |  ------------------
  ------------------
  |  Branch (136:20): [True: 64.3k, False: 6.29k]
  ------------------
  137|  64.3k|    if (ptr_element_type[ch_idx] == 3) {
  ------------------
  |  Branch (137:9): [True: 1.12k, False: 63.1k]
  ------------------
  138|  1.12k|      channel_mask += 0x8;
  139|  1.12k|      ptr_slot_element[ch_idx] = ixheaacd_drc_offset;
  140|  1.12k|      ixheaacd_drc_offset += 1;
  141|  1.12k|      break;
  142|  1.12k|    }
  143|  64.3k|  }
  144|  79.7k|  for (ch_idx = flag1; ch_idx < MAX_BS_ELEMENT; ch_idx++) {
  ------------------
  |  |   24|  79.7k|#define MAX_BS_ELEMENT (8 + MAX_CC_CHANNEL_NUM)
  |  |  ------------------
  |  |  |  |   23|  79.7k|#define MAX_CC_CHANNEL_NUM (2)
  |  |  ------------------
  ------------------
  |  Branch (144:24): [True: 72.3k, False: 7.38k]
  ------------------
  145|  72.3k|    if (ptr_element_type[ch_idx] == 1) {
  ------------------
  |  Branch (145:9): [True: 43, False: 72.3k]
  ------------------
  146|     43|      channel_mask += 0x30;
  147|     43|      ptr_slot_element[ch_idx] = ixheaacd_drc_offset;
  148|     43|      ixheaacd_drc_offset += 2;
  149|     43|      flag1 = ch_idx + 1;
  150|     43|      break;
  151|     43|    }
  152|  72.3k|  }
  153|  73.4k|  for (ch_idx = flag2; ch_idx < MAX_BS_ELEMENT; ch_idx++) {
  ------------------
  |  |   24|  73.4k|#define MAX_BS_ELEMENT (8 + MAX_CC_CHANNEL_NUM)
  |  |  ------------------
  |  |  |  |   23|  73.4k|#define MAX_CC_CHANNEL_NUM (2)
  |  |  ------------------
  ------------------
  |  Branch (153:24): [True: 66.3k, False: 7.07k]
  ------------------
  154|  66.3k|    if (ptr_element_type[ch_idx] == 0) {
  ------------------
  |  Branch (154:9): [True: 350, False: 65.9k]
  ------------------
  155|    350|      channel_mask += 0x100;
  156|    350|      ptr_slot_element[ch_idx] = ixheaacd_drc_offset;
  157|    350|      ixheaacd_drc_offset += 1;
  158|    350|      break;
  159|    350|    }
  160|  66.3k|  }
  161|  79.9k|  for (ch_idx = flag1; ch_idx < MAX_BS_ELEMENT; ch_idx++) {
  ------------------
  |  |   24|  79.9k|#define MAX_BS_ELEMENT (8 + MAX_CC_CHANNEL_NUM)
  |  |  ------------------
  |  |  |  |   23|  79.9k|#define MAX_CC_CHANNEL_NUM (2)
  |  |  ------------------
  ------------------
  |  Branch (161:24): [True: 72.5k, False: 7.40k]
  ------------------
  162|  72.5k|    if (ptr_element_type[ch_idx] == 1) {
  ------------------
  |  Branch (162:9): [True: 15, False: 72.5k]
  ------------------
  163|     15|      {
  164|     15|        channel_mask += (0x40 + 0x80);
  165|     15|        ptr_slot_element[ch_idx] = ixheaacd_drc_offset;
  166|     15|        ixheaacd_drc_offset += 2;
  167|     15|        break;
  168|     15|      }
  169|     15|    }
  170|  72.5k|  }
  171|       |
  172|  7.42k|  return channel_mask;
  173|  7.42k|}
ixheaacd_read_data_stream_element:
  177|  15.0k|                                       ia_drc_dec_struct *drc_handle) {
  178|  15.0k|  ia_bit_buf_struct temp_bs = {0};
  179|  15.0k|  WORD32 count = ixheaacd_read_bits_buf(it_bit_buff, 13);
  180|  15.0k|  WORD32 cnt = (count & 0xff);
  181|  15.0k|  WORD32 start_pos = 0;
  182|       |
  183|  15.0k|  if (cnt == 255) {
  ------------------
  |  Branch (183:7): [True: 593, False: 14.4k]
  ------------------
  184|    593|    cnt += ixheaacd_read_bits_buf(it_bit_buff, 8);
  185|    593|  }
  186|       |
  187|  15.0k|  if ((count & 0x0100) >> 8) {
  ------------------
  |  Branch (187:7): [True: 11.5k, False: 3.46k]
  ------------------
  188|  11.5k|    ixheaacd_byte_align(it_bit_buff, byte_align_bits);
  189|  11.5k|  }
  190|       |
  191|  15.0k|  {
  192|  15.0k|    memcpy(&temp_bs, it_bit_buff, sizeof(ia_bit_buf_struct));
  193|  15.0k|    start_pos = temp_bs.cnt_bits;
  194|       |
  195|  15.0k|    if (ixheaacd_read_bits_buf(&temp_bs, 8) == DVB_ANC_DATA_SYNC_BYTE) {
  ------------------
  |  |   38|  15.0k|#define DVB_ANC_DATA_SYNC_BYTE (0xBC)
  ------------------
  |  Branch (195:9): [True: 82, False: 14.9k]
  ------------------
  196|     82|      int dmx_level_present, compression_present;
  197|     82|      int coarse_gain_present, fine_grain_present;
  198|       |
  199|     82|      ixheaacd_read_bits_buf(&temp_bs, 8);
  200|       |
  201|     82|      ixheaacd_read_bits_buf(&temp_bs, 3);
  202|     82|      dmx_level_present = ixheaacd_read_bits_buf(&temp_bs, 1);
  203|     82|      ixheaacd_read_bits_buf(&temp_bs, 1);
  204|     82|      compression_present = ixheaacd_read_bits_buf(&temp_bs, 1);
  205|     82|      coarse_gain_present = ixheaacd_read_bits_buf(&temp_bs, 1);
  206|     82|      fine_grain_present = ixheaacd_read_bits_buf(&temp_bs, 1);
  207|       |
  208|     82|      if (dmx_level_present) ixheaacd_read_bits_buf(&temp_bs, 8);
  ------------------
  |  Branch (208:11): [True: 68, False: 14]
  ------------------
  209|       |
  210|     82|      if (compression_present) ixheaacd_read_bits_buf(&temp_bs, 16);
  ------------------
  |  Branch (210:11): [True: 52, False: 30]
  ------------------
  211|       |
  212|     82|      if (coarse_gain_present) ixheaacd_read_bits_buf(&temp_bs, 16);
  ------------------
  |  Branch (212:11): [True: 42, False: 40]
  ------------------
  213|       |
  214|     82|      if (fine_grain_present) ixheaacd_read_bits_buf(&temp_bs, 16);
  ------------------
  |  Branch (214:11): [True: 45, False: 37]
  ------------------
  215|       |
  216|     82|      if (!drc_handle->dvb_anc_data_present && temp_bs.cnt_bits >= 0) {
  ------------------
  |  Branch (216:11): [True: 59, False: 23]
  |  Branch (216:48): [True: 59, False: 0]
  ------------------
  217|     59|        drc_handle->dvb_anc_data_pos = start_pos;
  218|     59|        drc_handle->dvb_anc_data_present = 1;
  219|     59|      }
  220|     82|    }
  221|  15.0k|  }
  222|       |
  223|  15.0k|  if (it_bit_buff->cnt_bits < (cnt << 3)) {
  ------------------
  |  Branch (223:7): [True: 113, False: 14.9k]
  ------------------
  224|    113|    longjmp(*(it_bit_buff->xaac_jmp_buf),
  225|    113|            IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|    113|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  226|    113|  }
  227|  14.9k|  it_bit_buff->ptr_read_next += cnt;
  228|  14.9k|  it_bit_buff->cnt_bits -= ((cnt) << 3);
  229|  14.9k|}
ixheaacd_read_fill_element:
  234|  10.8k|    WORD32 *mps_bytes) {
  235|  10.8k|  WORD32 count;
  236|  10.8k|  count = ixheaacd_read_bits_buf(it_bit_buff, 4);
  237|       |
  238|  10.8k|  if ((count - 15) == 0) {
  ------------------
  |  Branch (238:7): [True: 8, False: 10.8k]
  ------------------
  239|      8|    count = ixheaacd_read_bits_buf(it_bit_buff, 8);
  240|      8|    count = (count + 14);
  241|      8|  }
  242|       |
  243|  10.8k|  if (count > 0) {
  ------------------
  |  Branch (243:7): [True: 10.7k, False: 88]
  ------------------
  244|  10.7k|    WORD32 extension_type;
  245|       |
  246|  10.7k|    extension_type = ixheaacd_read_bits_buf(it_bit_buff, 4);
  247|       |
  248|  10.7k|    if (extension_type == EXT_DYNAMIC_RANGE) {
  ------------------
  |  |   23|  10.7k|#define EXT_DYNAMIC_RANGE 11
  ------------------
  |  Branch (248:9): [True: 12, False: 10.7k]
  ------------------
  249|     12|      ptr_drc_dec->drc_element_found = 1;
  250|     12|      count -=
  251|     12|          ixheaacd_dec_drc_read_element(ptr_drc_dec, drc_dummy, it_bit_buff);
  252|     12|    }
  253|  10.7k|    if (EXT_SAC_DATA == extension_type) {
  ------------------
  |  |   25|  10.7k|#define EXT_SAC_DATA 12
  ------------------
  |  Branch (253:9): [True: 10.4k, False: 289]
  ------------------
  254|  10.4k|      WORD32 anc_type, i;
  255|  10.4k|      anc_type = ixheaacd_read_bits_buf(it_bit_buff, 2);
  256|  10.4k|      *mps_header = anc_type;
  257|       |
  258|  10.4k|      ixheaacd_read_bits_buf(it_bit_buff, 1);
  259|       |
  260|  10.4k|      ixheaacd_read_bits_buf(it_bit_buff, 1);
  261|       |
  262|   104k|      for (i = 0; i < count - 1; i++) {
  ------------------
  |  Branch (262:19): [True: 94.1k, False: 10.4k]
  ------------------
  263|  94.1k|        mps_buffer[i] = ixheaacd_read_bits_buf(it_bit_buff, 8);
  264|  94.1k|      }
  265|       |
  266|  10.4k|      *mps_bytes = count - 1;
  267|  10.4k|    }
  268|    289|    else {
  269|    289|      ixheaacd_read_bits_buf(it_bit_buff, 4);
  270|       |
  271|    289|      if (it_bit_buff->cnt_bits < ((count - 1) << 3)) {
  ------------------
  |  Branch (271:11): [True: 22, False: 267]
  ------------------
  272|     22|        longjmp(*(it_bit_buff->xaac_jmp_buf),
  273|     22|                IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|     22|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  274|     22|      }
  275|    267|      it_bit_buff->ptr_read_next += count - 1;
  276|    267|      it_bit_buff->cnt_bits -= ((count - 1) << 3);
  277|    267|    }
  278|  10.7k|  }
  279|  10.8k|}
ixheaacd_get_element_index_tag:
  288|  58.2k|) {
  289|  58.2k|  WORD element_tag, j;
  290|  58.2k|  ia_aac_dec_state_struct *p_state_enhaacplus_dec =
  291|  58.2k|      p_obj_enhaacplus_dec->p_state_aac;
  292|       |
  293|  58.2k|  ia_bit_buf_struct *it_bit_buff = p_state_enhaacplus_dec->ptr_bit_stream;
  294|  58.2k|  WORD element_idx;
  295|  58.2k|  WORD element_type;
  296|       |
  297|  58.2k|  ia_aac_decoder_struct *aac_dec_handle =
  298|  58.2k|      p_state_enhaacplus_dec->pstr_aac_dec_info[ch_idx1];
  299|       |
  300|  58.2k|  *ch_idx = ch_idx1;
  301|       |
  302|  58.2k|  if (p_state_enhaacplus_dec->bs_format != LOAS_BSFORMAT) {
  ------------------
  |  |   29|  58.2k|#define LOAS_BSFORMAT 3
  ------------------
  |  Branch (302:7): [True: 30.7k, False: 27.5k]
  ------------------
  303|  30.7k|    if (ch_idx1 == 0) {
  ------------------
  |  Branch (303:9): [True: 29.3k, False: 1.35k]
  ------------------
  304|  29.3k|      ixheaacd_byte_align(it_bit_buff, &aac_dec_handle->byte_align_bits);
  305|  29.3k|    }
  306|  30.7k|  }
  307|  58.2k|  {
  308|  58.2k|    if (ch_idx1 == 0) {
  ------------------
  |  Branch (308:9): [True: 41.3k, False: 16.9k]
  ------------------
  309|  41.3k|      aac_dec_handle->byte_align_bits = it_bit_buff->cnt_bits;
  310|  41.3k|    }
  311|  58.2k|  }
  312|       |
  313|  58.2k|  if (it_bit_buff->cnt_bits < 3) {
  ------------------
  |  Branch (313:7): [True: 3, False: 58.2k]
  ------------------
  314|      3|    it_bit_buff->cnt_bits = -1;
  315|      3|    return (WORD16)(
  316|      3|        (WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|      3|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  317|      3|  }
  318|       |
  319|  58.2k|  element_tag = (WORD)ixheaacd_read_bits_buf(it_bit_buff, 7);
  320|  58.2k|  ixheaacd_read_bidirection(it_bit_buff, -7);
  321|       |
  322|  58.2k|  element_idx = (element_tag & 0xF);
  323|  58.2k|  element_type = (element_tag >> 4) & 0x7;
  324|       |
  325|  58.2k|  p_obj_enhaacplus_dec->aac_config.str_prog_config.alignment_bits =
  326|  58.2k|      it_bit_buff->bit_pos;
  327|       |
  328|  76.8k|  while (element_type == 4 || element_type == 5 || element_type == 6) {
  ------------------
  |  Branch (328:10): [True: 7.77k, False: 69.0k]
  |  Branch (328:31): [True: 246, False: 68.8k]
  |  Branch (328:52): [True: 10.8k, False: 57.9k]
  ------------------
  329|  18.6k|    WORD type = (WORD)ixheaacd_read_bits_buf(it_bit_buff, 3);
  330|       |
  331|  18.6k|    if (it_bit_buff->cnt_bits < 3) {
  ------------------
  |  Branch (331:9): [True: 0, False: 18.6k]
  ------------------
  332|      0|      it_bit_buff->cnt_bits = -1;
  333|      0|      return (WORD16)(
  334|      0|          (WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|      0|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  335|      0|    }
  336|       |
  337|  18.6k|    if (type == 4) {
  ------------------
  |  Branch (337:9): [True: 7.57k, False: 11.1k]
  ------------------
  338|  7.57k|      ixheaacd_read_data_stream_element(
  339|  7.57k|          it_bit_buff, &aac_dec_handle->byte_align_bits, pstr_drc_dec);
  340|  7.57k|    }
  341|  18.6k|    if (type == 5) {
  ------------------
  |  Branch (341:9): [True: 246, False: 18.4k]
  ------------------
  342|    246|      WORD32 error_code = 0;
  343|    246|      error_code = ixheaacd_decode_pce(
  344|    246|          it_bit_buff, &p_obj_enhaacplus_dec->aac_config.ui_pce_found_in_hdr,
  345|    246|          &p_obj_enhaacplus_dec->aac_config.str_prog_config);
  346|    246|      if (error_code != 0) {
  ------------------
  |  Branch (346:11): [True: 129, False: 117]
  ------------------
  347|    129|        if (error_code < 0) return error_code;
  ------------------
  |  Branch (347:13): [True: 30, False: 99]
  ------------------
  348|     99|        return IA_XHEAAC_DEC_EXE_NONFATAL_DECODE_FRAME_ERROR;
  ------------------
  |  |  102|     99|#define IA_XHEAAC_DEC_EXE_NONFATAL_DECODE_FRAME_ERROR 0x00001807
  ------------------
  349|    129|      }
  350|    246|    }
  351|  18.5k|    if (type == 6) {
  ------------------
  |  Branch (351:9): [True: 10.8k, False: 7.68k]
  ------------------
  352|  10.8k|      ixheaacd_read_fill_element(it_bit_buff, drc_dummy, pstr_drc_dec,
  353|  10.8k|                                 mps_buffer, mps_header, mps_bytes);
  354|  10.8k|    }
  355|       |
  356|  18.5k|    if (it_bit_buff->cnt_bits < 7) {
  ------------------
  |  Branch (356:9): [True: 12, False: 18.5k]
  ------------------
  357|     12|      it_bit_buff->cnt_bits = -1;
  358|     12|      return (WORD16)(
  359|     12|          (WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|     12|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  360|     12|    }
  361|       |
  362|  18.5k|    element_tag = (WORD)ixheaacd_aac_showbits_7(it_bit_buff);
  363|  18.5k|    element_idx = (element_tag & 0xF);
  364|  18.5k|    element_type = (element_tag >> 4) & 0x7;
  365|  18.5k|  }
  366|       |
  367|  58.1k|  if (total_elements == 2 && total_channels == 2 &&
  ------------------
  |  Branch (367:7): [True: 17.5k, False: 40.5k]
  |  Branch (367:30): [True: 17.3k, False: 233]
  ------------------
  368|  17.3k|      p_state_enhaacplus_dec->p_config->ui_pce_found_in_hdr == 2 &&
  ------------------
  |  Branch (368:7): [True: 744, False: 16.6k]
  ------------------
  369|    744|      ch_idx1 == 0) {
  ------------------
  |  Branch (369:7): [True: 475, False: 269]
  ------------------
  370|    475|    ixheaacd_fill_prog_config_slots(p_state_enhaacplus_dec);
  371|    475|  }
  372|       |
  373|  58.1k|  *channel = 1;
  374|  58.1k|  if (element_type == 1) {
  ------------------
  |  Branch (374:7): [True: 1.47k, False: 56.6k]
  ------------------
  375|  1.47k|    *channel = 2;
  376|  1.47k|  }
  377|       |
  378|  89.5k|  for (j = 0; j < total_elements; j++) {
  ------------------
  |  Branch (378:15): [True: 87.2k, False: 2.30k]
  ------------------
  379|  87.2k|    if (p_obj_enhaacplus_dec->aac_config.element_type[j] == element_type &&
  ------------------
  |  Branch (379:9): [True: 81.2k, False: 6.03k]
  ------------------
  380|  81.2k|        (element_idx == ele_idx_order[j]) && (element_used[j] == 0)) {
  ------------------
  |  Branch (380:9): [True: 72.7k, False: 8.47k]
  |  Branch (380:46): [True: 55.8k, False: 16.9k]
  ------------------
  381|  55.8k|      *ch_idx = j;
  382|  55.8k|      element_used[j] = 1;
  383|  55.8k|      break;
  384|  55.8k|    }
  385|  87.2k|  }
  386|       |
  387|  58.1k|  if (j == total_elements) {
  ------------------
  |  Branch (387:7): [True: 2.09k, False: 56.0k]
  ------------------
  388|  2.09k|    if (it_bit_buff->cnt_bits < 0) {
  ------------------
  |  Branch (388:9): [True: 0, False: 2.09k]
  ------------------
  389|      0|      return (WORD16)(
  390|      0|          (WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|      0|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  391|      0|    }
  392|       |
  393|  2.09k|    ixheaacd_read_bidirection(
  394|  2.09k|        it_bit_buff, (WORD16)(it_bit_buff->cnt_bits - it_bit_buff->size));
  395|  2.09k|    return IA_XHEAAC_DEC_EXE_NONFATAL_ELE_INSTANCE_TAG_NOT_FOUND;
  ------------------
  |  |  100|  2.09k|#define IA_XHEAAC_DEC_EXE_NONFATAL_ELE_INSTANCE_TAG_NOT_FOUND 0x00001805
  ------------------
  396|  2.09k|  } else
  397|  56.0k|    return 0;
  398|  58.1k|}
ixheaacd_common_lpfuncs.c:ixheaacd_aac_showbits_7:
   93|  18.3k|ixheaacd_aac_showbits_7(ia_bit_buf_struct *it_bit_buff) {
   94|  18.3k|  UWORD8 *v = it_bit_buff->ptr_read_next;
   95|  18.3k|  UWORD32 b = 0;
   96|  18.3k|  UWORD32 x;
   97|  18.3k|  b = ((WORD32)v[0] << 8);
   98|  18.3k|  if (it_bit_buff->bit_pos < 6) {
  ------------------
  |  Branch (98:7): [True: 10.7k, False: 7.60k]
  ------------------
   99|  10.7k|    b |= (WORD32)(v[1]);
  100|  10.7k|  }
  101|  18.3k|  x = (UWORD32)b << (15 + 8 - it_bit_buff->bit_pos);
  102|  18.3k|  x = (UWORD32)x >> (25);
  103|       |
  104|  18.3k|  return x;
  105|  18.3k|}

ixheaacd_decode_init:
  202|  5.01k|    ia_audio_specific_config_struct *pstr_stream_config) {
  203|  5.01k|  WORD32 i;
  204|  5.01k|  ia_exhaacplus_dec_api_struct *codec_handle =
  205|  5.01k|      (ia_exhaacplus_dec_api_struct *)handle;
  206|  5.01k|  ia_aac_dec_state_struct *aac_dec_handle = codec_handle->p_state_aac;
  207|  5.01k|  WORD32 fscale;
  208|       |
  209|  5.01k|  WORD32 ele_id = 0;
  210|       |
  211|  5.01k|  ia_usac_config_struct *ptr_usac_config =
  212|  5.01k|      &(pstr_stream_config->str_usac_config);
  213|  5.01k|  ia_usac_decoder_config_struct *ptr_usac_dec_config =
  214|  5.01k|      &(pstr_stream_config->str_usac_config.str_usac_dec_config);
  215|  5.01k|  WORD32 num_elements = ptr_usac_dec_config->num_elements;
  216|  5.01k|  WORD32 chan = 0;
  217|       |
  218|  5.01k|  usac_data->ec_flag = codec_handle->aac_config.ui_err_conceal;
  219|  5.01k|  usac_data->huffman_code_book_scl = aac_dec_handle->huffman_code_book_scl;
  220|  5.01k|  usac_data->huffman_code_book_scl_index =
  221|  5.01k|      aac_dec_handle->huffman_code_book_scl_index;
  222|       |
  223|  5.01k|  usac_data->tns_coeff3_32 =
  224|  5.01k|      aac_dec_handle->pstr_aac_tables->pstr_block_tables->tns_coeff3_32;
  225|  5.01k|  usac_data->tns_coeff4_32 =
  226|  5.01k|      aac_dec_handle->pstr_aac_tables->pstr_block_tables->tns_coeff4_32;
  227|  5.01k|  usac_data->tns_max_bands_tbl_usac =
  228|  5.01k|      &aac_dec_handle->pstr_aac_tables->pstr_block_tables
  229|  5.01k|           ->tns_max_bands_tbl_usac;
  230|  35.1k|  for (WORD32 ch = 0; ch < MAX_NUM_CHANNELS; ch++) {
  ------------------
  |  |  111|  35.1k|#define MAX_NUM_CHANNELS 6
  ------------------
  |  Branch (230:23): [True: 30.1k, False: 5.01k]
  ------------------
  231|  30.1k|    ixheaacd_usac_ec_init(&usac_data->str_error_concealment[ch], usac_data->core_mode);
  232|  30.1k|    memset(&usac_data->overlap_data_ptr[ch][0], 0, sizeof(usac_data->overlap_data_ptr[ch]));
  233|  30.1k|  }
  234|       |
  235|  45.3k|  for (i = 0; i < 11; i++) {
  ------------------
  |  Branch (235:15): [True: 43.3k, False: 2.03k]
  ------------------
  236|  43.3k|    if (ixheaacd_sampling_boundaries[i] <= sample_rate) break;
  ------------------
  |  Branch (236:9): [True: 2.98k, False: 40.3k]
  ------------------
  237|  43.3k|  }
  238|       |
  239|  5.01k|  if (i == (1 << LEN_SAMP_IDX)) return -1;
  ------------------
  |  Branch (239:7): [True: 0, False: 5.01k]
  ------------------
  240|  5.01k|  usac_data->sampling_rate_idx = i;
  241|       |
  242|  5.01k|  fscale = (WORD32)((double)sample_rate * (double)FSCALE_DENOM / 12800.0f);
  ------------------
  |  |   39|  5.01k|#define FSCALE_DENOM 12800
  ------------------
  243|       |
  244|  35.1k|  for (i = 0; i < MAX_NUM_CHANNELS; i++) {
  ------------------
  |  |  111|  35.1k|#define MAX_NUM_CHANNELS 6
  ------------------
  |  Branch (244:15): [True: 30.1k, False: 5.01k]
  ------------------
  245|  30.1k|    usac_data->window_shape_prev[i] = 0;
  246|  30.1k|    usac_data->window_shape[i] = 0;
  247|  30.1k|  }
  248|       |
  249|  5.01k|  ixheaacd_hufftab(&ixheaacd_book, ixheaacd_huff_book_scl,
  250|  5.01k|                   ixheaacd_book_scl_code_book, ixheaacd_book_scl_index, 1, 60,
  251|  5.01k|                   60, 1, 19);
  252|       |
  253|  5.01k|  usac_data->pstr_usac_winmap[0] = &usac_data->str_only_long_info;
  254|  5.01k|  usac_data->pstr_usac_winmap[1] = &usac_data->str_only_long_info;
  255|  5.01k|  usac_data->pstr_usac_winmap[2] = &usac_data->str_eight_short_info;
  256|  5.01k|  usac_data->pstr_usac_winmap[3] = &usac_data->str_only_long_info;
  257|  5.01k|  usac_data->pstr_usac_winmap[4] = &usac_data->str_only_long_info;
  258|       |
  259|  5.01k|  if ((usac_data->ccfl != 480) && (usac_data->ccfl != 512) &&
  ------------------
  |  Branch (259:7): [True: 5.01k, False: 0]
  |  Branch (259:35): [True: 5.01k, False: 0]
  ------------------
  260|  5.01k|      (usac_data->ccfl != 768) && (usac_data->ccfl != 960) &&
  ------------------
  |  Branch (260:7): [True: 3.35k, False: 1.66k]
  |  Branch (260:35): [True: 3.35k, False: 0]
  ------------------
  261|  3.35k|      (usac_data->ccfl != 1024))
  ------------------
  |  Branch (261:7): [True: 0, False: 3.35k]
  ------------------
  262|      0|    return -1;
  263|  5.01k|  ixheaacd_info_init(&ixheaacd_samp_rate_info[usac_data->sampling_rate_idx],
  264|  5.01k|                     usac_data->ccfl, usac_data->pstr_usac_winmap[0],
  265|  5.01k|                     usac_data->pstr_usac_winmap[2], usac_data->sfb_width_short,
  266|  5.01k|                     usac_data->sfb_width_long);
  267|       |
  268|  35.1k|  for (i = 0; i < MAX_NUM_CHANNELS; i++) {
  ------------------
  |  |  111|  35.1k|#define MAX_NUM_CHANNELS 6
  ------------------
  |  Branch (268:15): [True: 30.1k, False: 5.01k]
  ------------------
  269|  30.1k|    usac_data->str_tddec[i] = &usac_data->arr_str_tddec[i];
  270|  30.1k|    if (usac_data->ccfl == 768)
  ------------------
  |  Branch (270:9): [True: 9.99k, False: 20.1k]
  ------------------
  271|  9.99k|      usac_data->str_tddec[i]->fscale = pstr_stream_config->sampling_frequency;
  272|  20.1k|    else
  273|  20.1k|      usac_data->str_tddec[i]->fscale =
  274|  20.1k|          ((fscale)*usac_data->ccfl) / LEN_SUPERFRAME;
  ------------------
  |  |   25|  20.1k|#define LEN_SUPERFRAME 1024
  ------------------
  275|  30.1k|    usac_data->len_subfrm = usac_data->ccfl / 4;
  276|       |
  277|  30.1k|    {
  278|  30.1k|      WORD32 fac_length = usac_data->len_subfrm / 4;
  279|  30.1k|      if (fac_length & (fac_length - 1)) {
  ------------------
  |  Branch (279:11): [True: 9.99k, False: 20.1k]
  ------------------
  280|  9.99k|        if ((fac_length != 48) && (fac_length != 96) && (fac_length != 192) &&
  ------------------
  |  Branch (280:13): [True: 0, False: 9.99k]
  |  Branch (280:35): [True: 0, False: 0]
  |  Branch (280:57): [True: 0, False: 0]
  ------------------
  281|      0|            (fac_length != 384) && (fac_length != 768)) {
  ------------------
  |  Branch (281:13): [True: 0, False: 0]
  |  Branch (281:36): [True: 0, False: 0]
  ------------------
  282|      0|          return -1;
  283|      0|        }
  284|  9.99k|      }
  285|  30.1k|    }
  286|  30.1k|    usac_data->num_subfrm = (MAX_NUM_SUBFR * usac_data->ccfl) / LEN_SUPERFRAME;
  ------------------
  |  |   28|  30.1k|#define MAX_NUM_SUBFR 4
  ------------------
                  usac_data->num_subfrm = (MAX_NUM_SUBFR * usac_data->ccfl) / LEN_SUPERFRAME;
  ------------------
  |  |   25|  30.1k|#define LEN_SUPERFRAME 1024
  ------------------
  287|       |
  288|  30.1k|    ixheaacd_init_acelp_data(usac_data, usac_data->str_tddec[i]);
  289|       |
  290|  30.1k|    usac_data->str_tddec[i]->fd_synth =
  291|  30.1k|        &usac_data->str_tddec[i]->fd_synth_buf[LEN_FRAME];
  ------------------
  |  |   26|  30.1k|#define LEN_FRAME 256
  ------------------
  292|  30.1k|  }
  293|       |
  294|  16.9k|  for (ele_id = 0; ele_id < num_elements; ele_id++) {
  ------------------
  |  Branch (294:20): [True: 11.9k, False: 5.00k]
  ------------------
  295|  11.9k|    UWORD32 ele_type;
  296|  11.9k|    WORD32 stereo_config_index;
  297|       |
  298|  11.9k|    ia_usac_dec_element_config_struct *ptr_usac_ele_config =
  299|  11.9k|        &ptr_usac_config->str_usac_dec_config.str_usac_element_config[ele_id];
  300|       |
  301|  11.9k|    if (ptr_usac_ele_config) {
  ------------------
  |  Branch (301:9): [True: 11.9k, False: 0]
  ------------------
  302|  11.9k|      if (usac_data->tw_mdct[ele_id]) {
  ------------------
  |  Branch (302:11): [True: 13, False: 11.9k]
  ------------------
  303|     13|        if (usac_data->ec_flag) {
  ------------------
  |  Branch (303:13): [True: 0, False: 13]
  ------------------
  304|      0|          usac_data->tw_mdct[ele_id] = 0;
  305|      0|        } else
  306|     13|          return -1;
  307|     13|      }
  308|       |
  309|  11.9k|      usac_data->noise_filling_config[ele_id] = ptr_usac_ele_config->noise_filling;
  310|  11.9k|    }
  311|       |
  312|  11.9k|    ele_type = ptr_usac_config->str_usac_dec_config.usac_element_type[ele_id];
  313|       |
  314|  11.9k|    stereo_config_index = ptr_usac_ele_config->stereo_config_index;
  315|       |
  316|  11.9k|    switch (ele_type) {
  317|  1.94k|      case ID_USAC_SCE:
  ------------------
  |  |   27|  1.94k|#define ID_USAC_SCE 0
  ------------------
  |  Branch (317:7): [True: 1.94k, False: 9.96k]
  ------------------
  318|  2.12k|      case ID_USAC_LFE:
  ------------------
  |  |   29|  2.12k|#define ID_USAC_LFE 2
  ------------------
  |  Branch (318:7): [True: 187, False: 11.7k]
  ------------------
  319|       |
  320|  2.12k|        if ((chan + 1) > MAX_NUM_CHANNELS_USAC_LVL2) return -1;
  ------------------
  |  |  112|  2.12k|#define MAX_NUM_CHANNELS_USAC_LVL2 2
  ------------------
  |  Branch (320:13): [True: 0, False: 2.12k]
  ------------------
  321|  2.12k|        usac_data->seed_value[chan] = 0x3039;
  322|  2.12k|        chan++;
  323|       |
  324|  2.12k|        break;
  325|       |
  326|  2.45k|      case ID_USAC_CPE: {
  ------------------
  |  |   28|  2.45k|#define ID_USAC_CPE 1
  ------------------
  |  Branch (326:7): [True: 2.45k, False: 9.44k]
  ------------------
  327|  2.45k|        static const WORD32 frame_len_tbl[MAX_CORE_SBR_FRAME_LEN_IDX + 1] = {
  328|  2.45k|            -1, -1, 32, 32, 64};
  329|       |
  330|  2.45k|        if ((chan + 2) > MAX_NUM_CHANNELS_USAC_LVL2) return -1;
  ------------------
  |  |  112|  2.45k|#define MAX_NUM_CHANNELS_USAC_LVL2 2
  ------------------
  |  Branch (330:13): [True: 0, False: 2.45k]
  ------------------
  331|  2.45k|        usac_data->seed_value[chan] = 0x3039;
  332|  2.45k|        chan++;
  333|       |
  334|  2.45k|        usac_data->seed_value[chan] = 0x10932;
  335|  2.45k|        chan++;
  336|       |
  337|  2.45k|        if (stereo_config_index > 0) {
  ------------------
  |  Branch (337:13): [True: 1.26k, False: 1.18k]
  ------------------
  338|  1.26k|          WORD32 bs_frame_length =
  339|  1.26k|              frame_len_tbl[ptr_usac_config->core_sbr_framelength_index];
  340|  1.26k|          WORD32 bs_residual_coding = (stereo_config_index > 1) ? 1 : 0;
  ------------------
  |  Branch (340:39): [True: 827, False: 440]
  ------------------
  341|       |
  342|  1.26k|          ia_usac_dec_mps_config_struct *ptr_usac_mps212_config =
  343|  1.26k|              &(ptr_usac_config->str_usac_dec_config
  344|  1.26k|                    .str_usac_element_config[ele_id]
  345|  1.26k|                    .str_usac_mps212_config);
  346|  1.26k|          aac_dec_handle->mps_dec_handle.ec_flag = aac_dec_handle->ec_enable;
  347|       |
  348|  1.26k|          if (ixheaacd_mps_create(&aac_dec_handle->mps_dec_handle,
  ------------------
  |  Branch (348:15): [True: 1, False: 1.26k]
  ------------------
  349|  1.26k|                                  bs_frame_length, bs_residual_coding,
  350|  1.26k|                                  ptr_usac_mps212_config)) {
  351|      1|            return -1;
  352|      1|          }
  353|  1.26k|        }
  354|  2.45k|        break;
  355|  2.45k|      }
  356|       |
  357|  2.45k|      break;
  358|  7.32k|      case ID_USAC_EXT:
  ------------------
  |  |   30|  7.32k|#define ID_USAC_EXT 3
  ------------------
  |  Branch (358:7): [True: 7.32k, False: 4.58k]
  ------------------
  359|  7.32k|        break;
  360|      0|      default:
  ------------------
  |  Branch (360:7): [True: 0, False: 11.9k]
  ------------------
  361|      0|        return -1;
  362|      0|        break;
  363|  11.9k|    }
  364|  11.9k|  }
  365|       |
  366|  5.00k|  return 0;
  367|  5.01k|}
ixheaacd_dec_data_init:
  371|  5.01k|                              ia_usac_data_struct *usac_data) {
  372|  5.01k|  ia_audio_specific_config_struct *pstr_stream_config, *layer_config;
  373|  5.01k|  WORD32 err_code = 0;
  374|  5.01k|  WORD32 i_ch, i, ele_id;
  375|  5.01k|  WORD32 num_elements;
  376|       |
  377|  5.01k|  WORD32 out_frame_len, sbr_ratio_idx;
  378|       |
  379|  5.01k|  ia_usac_config_struct *ptr_usac_config =
  380|  5.01k|      &(pstr_frame_data->str_audio_specific_config.str_usac_config);
  381|       |
  382|  5.01k|  usac_data->last_frame_ok = 1;
  383|  5.01k|  usac_data->frame_ok = 1;
  384|  5.01k|  usac_data->window_shape_prev[0] = WIN_SEL_0;
  ------------------
  |  |   91|  5.01k|#define WIN_SEL_0 0
  ------------------
  385|  5.01k|  usac_data->window_shape_prev[1] = WIN_SEL_0;
  ------------------
  |  |   91|  5.01k|#define WIN_SEL_0 0
  ------------------
  386|       |
  387|  5.01k|  pstr_frame_data->str_layer.bit_rate =
  388|  5.01k|      pstr_frame_data->str_audio_specific_config.avg_bit_rate;
  389|  5.01k|  pstr_stream_config = &pstr_frame_data->str_audio_specific_config;
  390|  5.01k|  layer_config = &pstr_frame_data->str_audio_specific_config;
  391|       |
  392|  5.01k|  sbr_ratio_idx = ixheaacd_sbr_params(
  393|  5.01k|      ptr_usac_config->core_sbr_framelength_index, &out_frame_len,
  394|  5.01k|      &usac_data->ccfl, &usac_data->output_samples,
  395|  5.01k|      &pstr_frame_data->str_layer.sample_rate_layer,
  396|  5.01k|      &layer_config->samp_frequency_index);
  397|  5.01k|  if (!pstr_frame_data->str_layer.sample_rate_layer) {
  ------------------
  |  Branch (397:7): [True: 2, False: 5.01k]
  ------------------
  398|      2|    return -1;
  399|      2|  }
  400|  5.01k|  pstr_stream_config->sampling_frequency =
  401|  5.01k|      pstr_frame_data->str_layer.sample_rate_layer;
  402|  5.01k|  pstr_stream_config->samp_frequency_index = layer_config->samp_frequency_index;
  403|       |
  404|  5.01k|  num_elements = ptr_usac_config->str_usac_dec_config.num_elements;
  405|       |
  406|  16.9k|  for (ele_id = 0; ele_id < num_elements; ele_id++) {
  ------------------
  |  Branch (406:20): [True: 11.9k, False: 5.01k]
  ------------------
  407|  11.9k|    ia_usac_dec_element_config_struct *ptr_usac_ele_config =
  408|  11.9k|        &(ptr_usac_config->str_usac_dec_config.str_usac_element_config[ele_id]);
  409|       |
  410|  11.9k|    if (ptr_usac_ele_config) {
  ------------------
  |  Branch (410:9): [True: 11.9k, False: 0]
  ------------------
  411|  11.9k|      usac_data->tw_mdct[ele_id] = ptr_usac_ele_config->tw_mdct;
  412|  11.9k|    }
  413|       |
  414|  11.9k|    {
  415|  11.9k|      ia_usac_dec_mps_config_struct *ptr_usac_mps212_config =
  416|  11.9k|          &ptr_usac_ele_config->str_usac_mps212_config;
  417|  11.9k|      WORD32 stereo_config_index = ptr_usac_ele_config->stereo_config_index;
  418|       |
  419|  11.9k|      usac_data->mps_pseudo_lr[ele_id] =
  420|  11.9k|          (stereo_config_index > 1) ? ptr_usac_mps212_config->bs_pseudo_lr : 0;
  ------------------
  |  Branch (420:11): [True: 827, False: 11.0k]
  ------------------
  421|  11.9k|    }
  422|  11.9k|  }
  423|       |
  424|  5.01k|  usac_data->sbr_ratio_idx = sbr_ratio_idx;
  425|  5.01k|  usac_data->esbr_bit_str[0].no_elements = 0;
  426|  5.01k|  usac_data->esbr_bit_str[1].no_elements = 0;
  427|       |
  428|  5.01k|  if (usac_data->ccfl == 768)
  ------------------
  |  Branch (428:7): [True: 1.66k, False: 3.35k]
  ------------------
  429|  1.66k|    pstr_frame_data->str_layer.sample_rate_layer =
  430|  1.66k|        4 * pstr_frame_data->str_layer.sample_rate_layer / 3;
  431|       |
  432|  35.1k|  for (i = 0; i < MAX_NUM_CHANNELS; i++) {
  ------------------
  |  |  111|  35.1k|#define MAX_NUM_CHANNELS 6
  ------------------
  |  Branch (432:15): [True: 30.1k, False: 5.01k]
  ------------------
  433|  30.1k|    usac_data->coef_fix[i] = &usac_data->arr_coef_fix[i][0];
  434|  30.1k|    usac_data->coef[i] = &usac_data->arr_coef[i][0];
  435|  30.1k|    usac_data->coef_save[i] = &usac_data->arr_coef_save[i][0];
  436|  30.1k|    usac_data->factors[i] = &usac_data->arr_factors[i][0];
  437|  30.1k|    usac_data->group_dis[i] = &usac_data->arr_group_dis[i][0];
  438|  30.1k|    usac_data->pstr_tns[i] = &usac_data->arr_str_tns[i];
  439|  30.1k|    usac_data->tw_ratio[i] = &usac_data->arr_tw_ratio[i][0];
  440|  30.1k|    usac_data->ms_used[i] = &usac_data->arr_ms_used[i][0];
  441|  30.1k|    usac_data->window_shape_prev[i] = WIN_SEL_0;
  ------------------
  |  |   91|  30.1k|#define WIN_SEL_0 0
  ------------------
  442|       |
  443|  30.1k|    usac_data->seed_value[i] = 0x0;
  444|       |
  445|  30.1k|    usac_data->fac_data_present[i] = 0;
  446|  30.1k|  }
  447|       |
  448|  5.01k|  err_code =
  449|  5.01k|      ixheaacd_decode_init(handle, pstr_frame_data->str_layer.sample_rate_layer,
  450|  5.01k|                           usac_data, pstr_stream_config);
  451|  5.01k|  if (err_code != 0) return err_code;
  ------------------
  |  Branch (451:7): [True: 14, False: 5.00k]
  ------------------
  452|       |
  453|  35.0k|  for (i_ch = 0; i_ch < MAX_NUM_CHANNELS; i_ch++) {
  ------------------
  |  |  111|  35.0k|#define MAX_NUM_CHANNELS 6
  ------------------
  |  Branch (453:18): [True: 30.0k, False: 5.00k]
  ------------------
  454|  30.0k|    if (usac_data->tw_mdct[0] == 1) {
  ------------------
  |  Branch (454:9): [True: 0, False: 30.0k]
  ------------------
  455|      0|      WORD32 i;
  456|      0|      for (i = 0; i < 2 * usac_data->ccfl; i++) {
  ------------------
  |  Branch (456:19): [True: 0, False: 0]
  ------------------
  457|      0|        usac_data->warp_cont_mem[i_ch][i] = 1.0;
  458|      0|      }
  459|      0|      usac_data->warp_sum[i_ch][0] = usac_data->warp_sum[i_ch][1] =
  460|      0|          (FLOAT32)usac_data->ccfl;
  461|      0|    }
  462|  30.0k|  }
  463|  5.00k|  return err_code;
  464|  5.01k|}
ixheaacd_frm_data_init:
  497|  5.03k|{
  498|  5.03k|  WORD32 layer;
  499|  5.03k|  WORD32 track;
  500|  5.03k|  WORD32 num_dec_streams;
  501|  5.03k|  ia_frame_data_struct *pstr_frame_data;
  502|       |
  503|  5.03k|  WORD32 stream_count = 1;
  504|  5.03k|  WORD32 max_layer = -1;
  505|       |
  506|  5.03k|  memset(pstr_dec_data, 0, IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_dec_data_struct), BYTE_ALIGN_8));
  ------------------
  |  |   87|  5.03k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  507|  5.03k|  memset(&(pstr_dec_data->str_frame_data), 0,
  508|  5.03k|         sizeof(pstr_dec_data->str_frame_data));
  509|       |
  510|  5.03k|  pstr_frame_data = &(pstr_dec_data->str_frame_data);
  511|       |
  512|  5.03k|  if (max_layer < 0) max_layer = stream_count - 1;
  ------------------
  |  Branch (512:7): [True: 5.03k, False: 0]
  ------------------
  513|       |
  514|  5.03k|  ixheaacd_count_tracks_per_layer(&max_layer, &stream_count,
  515|  5.03k|                                  &pstr_frame_data->tracks_in_layer);
  516|       |
  517|  5.03k|  pstr_frame_data->scal_out_select = max_layer;
  518|       |
  519|  5.03k|  pstr_frame_data->stream_count = 0;
  520|       |
  521|  5.03k|  num_dec_streams = track = 0;
  522|  10.0k|  for (layer = 0; layer < (signed)pstr_frame_data->scal_out_select + 1;
  ------------------
  |  Branch (522:19): [True: 5.03k, False: 5.03k]
  ------------------
  523|  5.03k|       layer++) {
  524|  5.03k|    WORD32 j;
  525|  10.0k|    for (j = 0; j < 1; j++, num_dec_streams++) {
  ------------------
  |  Branch (525:17): [True: 5.03k, False: 5.03k]
  ------------------
  526|  5.03k|      pstr_frame_data->str_audio_specific_config = *pstr_audio_conf;
  527|  5.03k|      pstr_frame_data->str_layer.sample_rate_layer =
  528|  5.03k|          pstr_frame_data->str_audio_specific_config.sampling_frequency;
  529|  5.03k|      pstr_frame_data->str_layer.bit_rate =
  530|  5.03k|          pstr_frame_data->str_audio_specific_config.avg_bit_rate;
  531|  5.03k|    }
  532|       |
  533|  5.03k|    track += pstr_frame_data->tracks_in_layer;
  534|  5.03k|  }
  535|       |
  536|  5.03k|  pstr_frame_data->stream_count = num_dec_streams;
  537|       |
  538|  5.03k|  return num_dec_streams;
  539|  5.03k|}
ixheaacd_decode_create:
  543|  5.01k|                              WORD32 tracks_for_decoder) {
  544|  5.01k|  WORD32 stream;
  545|       |
  546|  5.01k|  WORD32 err = 0;
  547|  5.01k|  ia_frame_data_struct *pstr_frame_data;
  548|  5.01k|  WORD32 stream_count;
  549|  5.01k|  ia_aac_dec_state_struct *aac_dec_handle = handle->p_state_aac;
  550|  5.01k|  pstr_frame_data = &(pstr_dec_data->str_frame_data);
  551|  5.01k|  stream_count = pstr_frame_data->stream_count;
  552|  5.01k|  pstr_frame_data->stream_count = tracks_for_decoder;
  553|       |
  554|  10.0k|  for (stream = 0; stream < stream_count; stream++) {
  ------------------
  |  Branch (554:20): [True: 5.01k, False: 5.00k]
  ------------------
  555|  5.01k|    UWORD32 aot = pstr_frame_data->str_audio_specific_config.audio_object_type;
  556|       |
  557|  5.01k|    switch (aot) {
  558|  5.01k|      case AOT_USAC:
  ------------------
  |  Branch (558:7): [True: 5.01k, False: 0]
  ------------------
  559|       |
  560|  5.01k|        err = ixheaacd_dec_data_init(handle, pstr_frame_data,
  561|  5.01k|                                     &(pstr_dec_data->str_usac_data));
  562|       |
  563|  5.01k|        if (err != 0) {
  ------------------
  |  Branch (563:13): [True: 16, False: 5.00k]
  ------------------
  564|     16|          if (handle->aac_config.ui_err_conceal) {
  ------------------
  |  Branch (564:15): [True: 0, False: 16]
  ------------------
  565|      0|            pstr_dec_data->str_usac_data.frame_ok = 0;
  566|      0|          } else
  567|     16|            return err;
  568|     16|        }
  569|       |
  570|  5.00k|        pstr_dec_data->str_usac_data.sampling_rate = pstr_frame_data->str_layer.sample_rate_layer;
  571|       |
  572|  5.00k|        switch (pstr_dec_data->str_usac_data.sbr_ratio_idx) {
  573|  2.14k|          case 0:
  ------------------
  |  Branch (573:11): [True: 2.14k, False: 2.85k]
  ------------------
  574|  2.14k|            handle->aac_config.ui_sbr_mode = 0;
  575|  2.14k|            break;
  576|  1.98k|          case 1:
  ------------------
  |  Branch (576:11): [True: 1.98k, False: 3.01k]
  ------------------
  577|  1.98k|            handle->aac_config.ui_sbr_mode = 1;
  578|  1.98k|            break;
  579|    612|          case 2:
  ------------------
  |  Branch (579:11): [True: 612, False: 4.39k]
  ------------------
  580|    612|            handle->aac_config.ui_sbr_mode = 1;
  581|    612|            break;
  582|    261|          case 3:
  ------------------
  |  Branch (582:11): [True: 261, False: 4.74k]
  ------------------
  583|    261|            handle->aac_config.ui_sbr_mode = 3;
  584|    261|            break;
  585|       |
  586|      0|          default:
  ------------------
  |  Branch (586:11): [True: 0, False: 5.00k]
  ------------------
  587|      0|            handle->aac_config.ui_sbr_mode = 0;
  588|  5.00k|        }
  589|       |
  590|  5.00k|        if (!aac_dec_handle->peak_lim_init && !handle->aac_config.peak_limiter_off &&
  ------------------
  |  Branch (590:13): [True: 5.00k, False: 0]
  |  Branch (590:47): [True: 5.00k, False: 0]
  ------------------
  591|  5.00k|            handle->aac_config.ui_err_conceal) {
  ------------------
  |  Branch (591:13): [True: 0, False: 5.00k]
  ------------------
  592|      0|          memset(&aac_dec_handle->peak_limiter, 0, sizeof(ia_peak_limiter_struct));
  593|      0|          ixheaacd_peak_limiter_init(&aac_dec_handle->peak_limiter, MAX_NUM_CHANNELS,
  ------------------
  |  |  111|      0|#define MAX_NUM_CHANNELS 6
  ------------------
  594|      0|                                     pstr_dec_data->str_usac_data.sampling_rate,
  595|      0|                                     &aac_dec_handle->peak_limiter.buffer[0],
  596|      0|                                     &aac_dec_handle->delay_in_samples);
  597|      0|          aac_dec_handle->peak_lim_init++;
  598|      0|        }
  599|       |
  600|  5.00k|        break;
  601|       |
  602|      0|      default:
  ------------------
  |  Branch (602:7): [True: 0, False: 5.01k]
  ------------------
  603|       |
  604|      0|        break;
  605|  5.01k|    }
  606|  5.01k|  }
  607|       |
  608|  5.00k|  pstr_frame_data->scal_out_object_type =
  609|  5.00k|      pstr_frame_data->str_audio_specific_config.audio_object_type;
  610|  5.00k|  pstr_frame_data->scal_out_num_channels =
  611|  5.00k|      pstr_frame_data->str_audio_specific_config.channel_configuration;
  612|  5.00k|  pstr_frame_data->scal_out_sampling_frequency =
  613|  5.00k|      pstr_frame_data->str_audio_specific_config.sampling_frequency;
  614|       |
  615|  5.00k|  if (&(pstr_dec_data->str_usac_data) != NULL) {
  ------------------
  |  Branch (615:7): [True: 5.00k, False: 0]
  ------------------
  616|  5.00k|    ia_sbr_header_data_struct usac_def_header;
  617|  5.00k|    ia_audio_specific_config_struct *pstr_aud_spec_config =
  618|  5.00k|        &pstr_frame_data->str_audio_specific_config;
  619|  5.00k|    ia_usac_config_struct *ptr_usac_config =
  620|  5.00k|        &(pstr_frame_data->str_audio_specific_config.str_usac_config);
  621|       |
  622|  5.00k|    WORD32 inter_test_flag = 0;
  623|  5.00k|    WORD32 bs_pvc_flag = 0;
  624|  5.00k|    WORD32 harmonic_Sbr_flag = 0;
  625|       |
  626|  5.00k|    ia_usac_decoder_config_struct *ptr_usac_dec_config =
  627|  5.00k|        &ptr_usac_config->str_usac_dec_config;
  628|  5.00k|    WORD32 const num_ele = ptr_usac_dec_config->num_elements;
  629|  5.00k|    WORD32 elem_idx = 0;
  630|       |
  631|  5.00k|    memset(&usac_def_header, 0, sizeof(ia_sbr_header_data_struct));
  632|       |
  633|  16.8k|    for (elem_idx = 0; elem_idx < num_ele; elem_idx++) {
  ------------------
  |  Branch (633:24): [True: 11.8k, False: 5.00k]
  ------------------
  634|  11.8k|      UWORD32 usac_ele_type =
  635|  11.8k|          ptr_usac_config->str_usac_dec_config.usac_element_type[elem_idx];
  636|  11.8k|      ia_usac_dec_element_config_struct *ptr_usac_ele_config =
  637|  11.8k|          &ptr_usac_config->str_usac_dec_config
  638|  11.8k|               .str_usac_element_config[elem_idx];
  639|       |
  640|  11.8k|      ia_usac_dec_sbr_config_struct *ptr_usac_sbr_config =
  641|  11.8k|          &(ptr_usac_dec_config->str_usac_element_config[elem_idx]
  642|  11.8k|                .str_usac_sbr_config);
  643|       |
  644|  11.8k|      if (ptr_usac_sbr_config->bs_inter_tes) inter_test_flag = 1;
  ------------------
  |  Branch (644:11): [True: 1.26k, False: 10.6k]
  ------------------
  645|  11.8k|      if (ptr_usac_sbr_config->bs_pvc) bs_pvc_flag = 1;
  ------------------
  |  Branch (645:11): [True: 1.62k, False: 10.2k]
  ------------------
  646|  11.8k|      if (ptr_usac_sbr_config->harmonic_sbr) harmonic_Sbr_flag = 1;
  ------------------
  |  Branch (646:11): [True: 1.43k, False: 10.4k]
  ------------------
  647|       |
  648|  11.8k|      if ((usac_ele_type != ID_USAC_LFE) && (usac_ele_type != ID_USAC_EXT)) {
  ------------------
  |  |   29|  11.8k|#define ID_USAC_LFE 2
  ------------------
                    if ((usac_ele_type != ID_USAC_LFE) && (usac_ele_type != ID_USAC_EXT)) {
  ------------------
  |  |   30|  11.7k|#define ID_USAC_EXT 3
  ------------------
  |  Branch (648:11): [True: 11.7k, False: 180]
  |  Branch (648:45): [True: 4.39k, False: 7.32k]
  ------------------
  649|  4.39k|        ia_usac_dec_sbr_config_struct *ptr_usac_sbr_config =
  650|  4.39k|            &(ptr_usac_ele_config->str_usac_sbr_config);
  651|       |
  652|  4.39k|        usac_def_header.start_freq = ptr_usac_sbr_config->dflt_start_freq;
  653|  4.39k|        usac_def_header.stop_freq = ptr_usac_sbr_config->dflt_stop_freq;
  654|  4.39k|        usac_def_header.header_extra_1 =
  655|  4.39k|            ptr_usac_sbr_config->dflt_header_extra1;
  656|  4.39k|        usac_def_header.header_extra_2 =
  657|  4.39k|            ptr_usac_sbr_config->dflt_header_extra2;
  658|  4.39k|        usac_def_header.freq_scale = ptr_usac_sbr_config->dflt_freq_scale;
  659|  4.39k|        usac_def_header.alter_scale = ptr_usac_sbr_config->dflt_alter_scale;
  660|  4.39k|        usac_def_header.noise_bands = ptr_usac_sbr_config->dflt_noise_bands;
  661|  4.39k|        usac_def_header.limiter_bands = ptr_usac_sbr_config->dflt_limiter_bands;
  662|  4.39k|        usac_def_header.limiter_gains = ptr_usac_sbr_config->dflt_limiter_gains;
  663|  4.39k|        usac_def_header.interpol_freq = ptr_usac_sbr_config->dflt_interpol_freq;
  664|  4.39k|        usac_def_header.smoothing_mode =
  665|  4.39k|            ptr_usac_sbr_config->dflt_smoothing_mode;
  666|  4.39k|      }
  667|  11.8k|    }
  668|       |
  669|  5.00k|    pstr_dec_data->str_usac_data.down_samp_sbr = 0;
  670|       |
  671|  5.00k|    if (pstr_dec_data->str_usac_data.sbr_ratio_idx > 0) {
  ------------------
  |  Branch (671:9): [True: 2.85k, False: 2.14k]
  ------------------
  672|  2.85k|      if (pstr_aud_spec_config->ext_sampling_frequency ==
  ------------------
  |  Branch (672:11): [True: 0, False: 2.85k]
  ------------------
  673|  2.85k|          pstr_aud_spec_config->sampling_frequency) {
  674|      0|        pstr_dec_data->str_usac_data.down_samp_sbr = 1;
  675|      0|      }
  676|  2.85k|      if (pstr_dec_data->str_usac_data.down_samp_sbr == 0) {
  ------------------
  |  Branch (676:11): [True: 2.85k, False: 0]
  ------------------
  677|  2.85k|        if (pstr_dec_data->str_usac_data.sbr_ratio_idx == 3) {
  ------------------
  |  Branch (677:13): [True: 261, False: 2.59k]
  ------------------
  678|    261|          pstr_frame_data->scal_out_sampling_frequency =
  679|    261|              4 * pstr_frame_data->scal_out_sampling_frequency;
  680|  2.59k|        } else {
  681|  2.59k|          pstr_frame_data->scal_out_sampling_frequency =
  682|  2.59k|              2 * pstr_frame_data->scal_out_sampling_frequency;
  683|  2.59k|        }
  684|  2.85k|      }
  685|       |
  686|  2.85k|      {
  687|  2.85k|        void *sbr_persistent_mem_v = aac_dec_handle->sbr_persistent_mem_u;
  688|       |
  689|  2.85k|        pstr_dec_data->str_usac_data.pstr_esbr_dec = ixheaacd_init_sbr(
  690|  2.85k|            pstr_frame_data->str_layer.sample_rate_layer,
  691|  2.85k|            pstr_dec_data->str_usac_data.ccfl,
  692|  2.85k|            &pstr_dec_data->str_usac_data.down_samp_sbr, sbr_persistent_mem_v,
  693|  2.85k|            NULL, pstr_frame_data->scal_out_num_channels, 0,
  694|  2.85k|            pstr_dec_data->str_usac_data.sbr_ratio_idx,
  695|  2.85k|            pstr_dec_data->str_usac_data.output_samples, &harmonic_Sbr_flag,
  696|  2.85k|            (void *)&usac_def_header, aac_dec_handle->str_sbr_config,
  697|  2.85k|            pstr_dec_data->str_usac_data.audio_object_type, 0, 0);
  698|  2.85k|        pstr_dec_data->str_usac_data.sbr_scratch_mem_base =
  699|  2.85k|            aac_dec_handle->sbr_scratch_mem_u;
  700|  2.85k|        if (num_ele)
  ------------------
  |  Branch (700:13): [True: 2.85k, False: 0]
  ------------------
  701|  2.85k|          ixheaacd_setesbr_flags(sbr_persistent_mem_v, bs_pvc_flag,
  702|  2.85k|                                 harmonic_Sbr_flag, inter_test_flag);
  703|  2.85k|      }
  704|       |
  705|  2.85k|      if (pstr_dec_data->str_usac_data.pstr_esbr_dec == NULL) {
  ------------------
  |  Branch (705:11): [True: 0, False: 2.85k]
  ------------------
  706|      0|        return -1;
  707|  2.85k|      } else {
  708|  2.85k|        pstr_dec_data->str_usac_data.pstr_esbr_dec->xaac_jmp_buf =
  709|  2.85k|            &(aac_dec_handle->xaac_jmp_buf);
  710|  2.85k|      }
  711|  2.85k|    }
  712|  5.00k|  }
  713|  5.00k|  aac_dec_handle->decode_create_done = 1;
  714|  5.00k|  return 0;
  715|  5.00k|}
ixheaacd_create.c:ixheaacd_info_init:
  102|  5.01k|                               WORD16 *sfb_width_long) {
  103|  5.01k|  WORD32 i, j, k, n, ws;
  104|  5.01k|  const WORD16 *sfbands;
  105|  5.01k|  ia_sfb_info_struct *pstr_sfb_info_ip;
  106|       |
  107|  5.01k|  pstr_sfb_info_long->islong = 1;
  108|  5.01k|  pstr_sfb_info_long->max_win_len = 1;
  109|  5.01k|  pstr_sfb_info_long->samp_per_bk = block_size_samples;
  110|       |
  111|  5.01k|  switch (block_size_samples) {
  112|      0|    case 480:
  ------------------
  |  Branch (112:5): [True: 0, False: 5.01k]
  ------------------
  113|      0|      pstr_sfb_info_long->ptr_sfb_tbl = ptr_samp_info->ptr_sfb_480;
  114|      0|      pstr_sfb_info_long->sfb_per_sbk = ptr_samp_info->num_sfb_480;
  115|      0|      break;
  116|      0|    case 512:
  ------------------
  |  Branch (116:5): [True: 0, False: 5.01k]
  ------------------
  117|      0|      pstr_sfb_info_long->ptr_sfb_tbl = ptr_samp_info->ptr_sfb_512;
  118|      0|      pstr_sfb_info_long->sfb_per_sbk = ptr_samp_info->num_sfb_512;
  119|      0|      break;
  120|  1.66k|    case 768:
  ------------------
  |  Branch (120:5): [True: 1.66k, False: 3.35k]
  ------------------
  121|  1.66k|      pstr_sfb_info_long->sfb_per_sbk = ptr_samp_info->num_sfb_768;
  122|  1.66k|      pstr_sfb_info_long->ptr_sfb_tbl = ptr_samp_info->ptr_sfb_768;
  123|  1.66k|      break;
  124|      0|    case 960:
  ------------------
  |  Branch (124:5): [True: 0, False: 5.01k]
  ------------------
  125|      0|      pstr_sfb_info_long->ptr_sfb_tbl = ptr_samp_info->ptr_sfb_960;
  126|      0|      pstr_sfb_info_long->sfb_per_sbk = ptr_samp_info->num_sfb_960;
  127|      0|      break;
  128|  3.35k|    case 1024:
  ------------------
  |  Branch (128:5): [True: 3.35k, False: 1.66k]
  ------------------
  129|  3.35k|      pstr_sfb_info_long->sfb_per_sbk = ptr_samp_info->num_sfb_1024;
  130|  3.35k|      pstr_sfb_info_long->ptr_sfb_tbl = ptr_samp_info->ptr_sfb_1024;
  131|  3.35k|      break;
  132|      0|    default:
  ------------------
  |  Branch (132:5): [True: 0, False: 5.01k]
  ------------------
  133|      0|      assert(0);
  ------------------
  |  Branch (133:7): [Folded, False: 0]
  |  Branch (133:7): [Folded, False: 0]
  ------------------
  134|      0|      break;
  135|  5.01k|  }
  136|       |
  137|  5.01k|  pstr_sfb_info_long->sfb_width = sfb_width_long;
  138|  5.01k|  pstr_sfb_info_long->num_groups = 1;
  139|  5.01k|  pstr_sfb_info_long->group_len[0] = 1;
  140|       |
  141|   217k|  for (i = 0, j = 0, n = pstr_sfb_info_long->sfb_per_sbk; i < n; i++) {
  ------------------
  |  Branch (141:59): [True: 212k, False: 5.01k]
  ------------------
  142|   212k|    k = pstr_sfb_info_long->ptr_sfb_tbl[i];
  143|   212k|    pstr_sfb_info_long->sfb_width[i] = k - j;
  144|   212k|    j = k;
  145|   212k|  }
  146|       |
  147|  5.01k|  pstr_sfb_info_short->islong = 0;
  148|  5.01k|  pstr_sfb_info_short->max_win_len = NSHORT;
  149|  5.01k|  pstr_sfb_info_short->samp_per_bk = block_size_samples;
  150|       |
  151|  45.1k|  for (i = 0; i < pstr_sfb_info_short->max_win_len; i++) {
  ------------------
  |  Branch (151:15): [True: 40.1k, False: 5.01k]
  ------------------
  152|  40.1k|    switch (block_size_samples) {
  153|  13.3k|      case 768:
  ------------------
  |  Branch (153:7): [True: 13.3k, False: 26.8k]
  ------------------
  154|  13.3k|        pstr_sfb_info_short->ptr_sfb_tbl = ptr_samp_info->ptr_sfb_96;
  155|  13.3k|        pstr_sfb_info_short->sfb_per_sbk = ptr_samp_info->num_sfb_96;
  156|  13.3k|        break;
  157|      0|      case 960:
  ------------------
  |  Branch (157:7): [True: 0, False: 40.1k]
  ------------------
  158|      0|        pstr_sfb_info_short->ptr_sfb_tbl = ptr_samp_info->ptr_sfb_120;
  159|      0|        pstr_sfb_info_short->sfb_per_sbk = ptr_samp_info->num_sfb_120;
  160|      0|        break;
  161|  26.8k|      case 1024:
  ------------------
  |  Branch (161:7): [True: 26.8k, False: 13.3k]
  ------------------
  162|  26.8k|        pstr_sfb_info_short->ptr_sfb_tbl = ptr_samp_info->ptr_sfb_128;
  163|  26.8k|        pstr_sfb_info_short->sfb_per_sbk = ptr_samp_info->num_sfb_128;
  164|  26.8k|        break;
  165|      0|      default:
  ------------------
  |  Branch (165:7): [True: 0, False: 40.1k]
  ------------------
  166|      0|        assert(0);
  ------------------
  |  Branch (166:9): [Folded, False: 0]
  |  Branch (166:9): [Folded, False: 0]
  ------------------
  167|      0|        break;
  168|  40.1k|    }
  169|  40.1k|  }
  170|       |
  171|  5.01k|  pstr_sfb_info_short->sfb_width = sfb_width_short;
  172|  76.1k|  for (i = 0, j = 0, n = pstr_sfb_info_short->sfb_per_sbk; i < n; i++) {
  ------------------
  |  Branch (172:60): [True: 71.1k, False: 5.01k]
  ------------------
  173|  71.1k|    k = pstr_sfb_info_short->ptr_sfb_tbl[i];
  174|  71.1k|    pstr_sfb_info_short->sfb_width[i] = k - j;
  175|  71.1k|    j = k;
  176|  71.1k|  }
  177|       |
  178|  5.01k|  pstr_sfb_info_ip = pstr_sfb_info_long;
  179|  15.0k|  for (ws = 0; ws < 2; ws++) {
  ------------------
  |  Branch (179:16): [True: 10.0k, False: 5.01k]
  ------------------
  180|  10.0k|    pstr_sfb_info_ip->sfb_per_bk = 0;
  181|  10.0k|    k = 0;
  182|  10.0k|    n = 0;
  183|  55.1k|    for (i = 0; i < pstr_sfb_info_ip->max_win_len; i++) {
  ------------------
  |  Branch (183:17): [True: 45.1k, False: 10.0k]
  ------------------
  184|  45.1k|      pstr_sfb_info_ip->bins_per_sbk =
  185|  45.1k|          pstr_sfb_info_ip->samp_per_bk / pstr_sfb_info_ip->max_win_len;
  186|       |
  187|  45.1k|      pstr_sfb_info_ip->sfb_per_bk += pstr_sfb_info_ip->sfb_per_sbk;
  188|       |
  189|  45.1k|      sfbands = pstr_sfb_info_ip->ptr_sfb_tbl;
  190|   826k|      for (j = 0; j < pstr_sfb_info_ip->sfb_per_sbk; j++)
  ------------------
  |  Branch (190:19): [True: 781k, False: 45.1k]
  ------------------
  191|   781k|        pstr_sfb_info_ip->sfb_idx_tbl[j + k] = sfbands[j] + n;
  192|       |
  193|  45.1k|      n += pstr_sfb_info_ip->bins_per_sbk;
  194|  45.1k|      k += pstr_sfb_info_ip->sfb_per_sbk;
  195|  45.1k|    }
  196|  10.0k|    pstr_sfb_info_ip = pstr_sfb_info_short;
  197|  10.0k|  }
  198|  5.01k|}
ixheaacd_create.c:ixheaacd_count_tracks_per_layer:
  467|  5.03k|                                            int *tracks_in_layer) {
  468|  5.03k|  WORD32 stream;
  469|  5.03k|  WORD32 num_layer;
  470|  5.03k|  WORD32 num_streams;
  471|  5.03k|  WORD32 layer = 0;
  472|       |
  473|  5.03k|  if (stream_count == NULL)
  ------------------
  |  Branch (473:7): [True: 0, False: 5.03k]
  ------------------
  474|      0|    num_streams = 0;
  475|  5.03k|  else
  476|  5.03k|    num_streams = *stream_count;
  477|  5.03k|  if (max_layer == NULL)
  ------------------
  |  Branch (477:7): [True: 0, False: 5.03k]
  ------------------
  478|      0|    num_layer = num_streams;
  479|  5.03k|  else
  480|  5.03k|    num_layer = *max_layer;
  481|  5.03k|  if (num_layer < 0) num_layer = num_streams;
  ------------------
  |  Branch (481:7): [True: 0, False: 5.03k]
  ------------------
  482|       |
  483|  10.0k|  for (stream = 0; (layer <= num_layer) && (stream < num_streams);) {
  ------------------
  |  Branch (483:20): [True: 5.03k, False: 5.03k]
  |  Branch (483:44): [True: 5.03k, False: 0]
  ------------------
  484|  5.03k|    *tracks_in_layer = 1;
  485|  5.03k|    stream += 1;
  486|  5.03k|    layer++;
  487|  5.03k|    if (layer <= num_layer) *tracks_in_layer = 0;
  ------------------
  |  Branch (487:9): [True: 0, False: 5.03k]
  ------------------
  488|  5.03k|  }
  489|       |
  490|  5.03k|  if (max_layer) *max_layer = (layer - 1);
  ------------------
  |  Branch (490:7): [True: 5.03k, False: 0]
  ------------------
  491|  5.03k|  if (stream_count) *stream_count = stream;
  ------------------
  |  Branch (491:7): [True: 5.03k, False: 0]
  ------------------
  492|  5.03k|}

ixheaacd_samples_sat:
   84|   196k|                          WORD32 *out_bytes, WORD32 num_channel_out) {
   85|   196k|  WORD32 num;
   86|   196k|  WORD32 i;
   87|   196k|  WORD32 write_local;
   88|   196k|  FLOAT32 write_local_float;
   89|       |
   90|   196k|  WORD16 *out_buf = (WORD16 *)outbuffer;
   91|       |
   92|   196k|  num = num_channel_out * num_samples_out;
   93|       |
   94|   196k|  if (pcmsize == 16) {
  ------------------
  |  Branch (94:7): [True: 196k, False: 0]
  ------------------
   95|   758M|    for (i = 0; i < num; i++) {
  ------------------
  |  Branch (95:17): [True: 758M, False: 196k]
  ------------------
   96|   758M|      write_local_float =
   97|   758M|          (out_samples[i % num_channel_out][i / num_channel_out]);
   98|       |
   99|   758M|      if (write_local_float > 32767.0f) {
  ------------------
  |  Branch (99:11): [True: 25.7M, False: 732M]
  ------------------
  100|  25.7M|        write_local_float = 32767.0f;
  101|   732M|      } else if (write_local_float < -32768.0f) {
  ------------------
  |  Branch (101:18): [True: 29.2M, False: 703M]
  ------------------
  102|  29.2M|        write_local_float = -32768.0f;
  103|  29.2M|      }
  104|   758M|      out_buf[i] = (WORD16)write_local_float;
  105|   758M|    }
  106|       |
  107|   196k|    *out_bytes = num * sizeof(WORD16);
  108|   196k|  } else {
  109|      0|    WORD8 *out_24bit = (WORD8 *)out_buf;
  110|      0|    for (i = 0; i < num; i++) {
  ------------------
  |  Branch (110:17): [True: 0, False: 0]
  ------------------
  111|      0|      write_local_float =
  112|      0|          (out_samples[i % num_channel_out][i / num_channel_out] * 256);
  113|       |
  114|      0|      if (write_local_float > 8388607.0f) {
  ------------------
  |  Branch (114:11): [True: 0, False: 0]
  ------------------
  115|      0|        write_local_float = 8388607.0f;
  116|      0|      } else if (write_local_float < -8388608.0f) {
  ------------------
  |  Branch (116:18): [True: 0, False: 0]
  ------------------
  117|      0|        write_local_float = -8388608.0f;
  118|      0|      }
  119|      0|      write_local = (WORD32)write_local_float;
  120|       |
  121|      0|      *out_24bit++ = (WORD32)write_local & 0xff;
  122|      0|      *out_24bit++ = ((WORD32)write_local >> 8) & 0xff;
  123|      0|      *out_24bit++ = ((WORD32)write_local >> 16) & 0xff;
  124|      0|    }
  125|       |
  126|      0|    *out_bytes = num * 3 * sizeof(WORD8);
  127|      0|  }
  128|   196k|}
ixheaacd_samples_sat_mc:
  132|    119|    WORD32 num_channel_out, WORD32 ch_fac) {
  133|    119|  WORD32 num;
  134|    119|  WORD32 i;
  135|    119|  FLOAT32 write_local_float;
  136|       |
  137|    119|  WORD16* out_buf = (WORD16*)outbuffer;
  138|       |
  139|    119|  num = num_channel_out * num_samples_out;
  140|    119|  if (num_channel_out == 1) {
  ------------------
  |  Branch (140:7): [True: 85, False: 34]
  ------------------
  141|   174k|    for (i = 0; i < num; i++) {
  ------------------
  |  Branch (141:17): [True: 174k, False: 85]
  ------------------
  142|   174k|      write_local_float =
  143|   174k|          (out_samples[i % num_channel_out][i / num_channel_out]);
  144|       |
  145|   174k|      if (write_local_float > 32767.0f) {
  ------------------
  |  Branch (145:11): [True: 29, False: 174k]
  ------------------
  146|     29|        write_local_float = 32767.0f;
  147|   174k|      } else if (write_local_float < -32768.0f) {
  ------------------
  |  Branch (147:18): [True: 0, False: 174k]
  ------------------
  148|      0|        write_local_float = -32768.0f;
  149|      0|      }
  150|   174k|      out_buf[i * ch_fac] = (WORD16)write_local_float;
  151|   174k|    }
  152|     85|  } else if (num_channel_out == 2) {
  ------------------
  |  Branch (152:14): [True: 34, False: 0]
  ------------------
  153|  69.6k|    for (i = 0; i < num_samples_out; i++) {
  ------------------
  |  Branch (153:17): [True: 69.6k, False: 34]
  ------------------
  154|  69.6k|      write_local_float =
  155|  69.6k|          (out_samples[(2*i) % num_channel_out][(2 * i) / num_channel_out]);
  156|       |
  157|  69.6k|      if (write_local_float > 32767.0f) {
  ------------------
  |  Branch (157:11): [True: 0, False: 69.6k]
  ------------------
  158|      0|          write_local_float = 32767.0f;
  159|  69.6k|      } else if (write_local_float < -32768.0f) {
  ------------------
  |  Branch (159:18): [True: 0, False: 69.6k]
  ------------------
  160|      0|          write_local_float = -32768.0f;
  161|      0|      }
  162|  69.6k|      out_buf[i * ch_fac] = (WORD16)write_local_float;
  163|       |
  164|  69.6k|      write_local_float =
  165|  69.6k|          (out_samples[((2 * i) + 1) % num_channel_out][((2 * i) + 1) / num_channel_out]);
  166|       |
  167|  69.6k|      if (write_local_float > 32767.0f) {
  ------------------
  |  Branch (167:11): [True: 0, False: 69.6k]
  ------------------
  168|      0|          write_local_float = 32767.0f;
  169|  69.6k|      } else if (write_local_float < -32768.0f) {
  ------------------
  |  Branch (169:18): [True: 0, False: 69.6k]
  ------------------
  170|      0|          write_local_float = -32768.0f;
  171|      0|      }
  172|  69.6k|      out_buf[i * ch_fac + 1] = (WORD16)write_local_float;
  173|  69.6k|    }
  174|     34|  }
  175|    119|  *out_bytes = num * sizeof(WORD16);
  176|    119|}
ixheaacd_dec_main:
  303|   188k|                         WORD32 *num_channel_out) {
  304|   188k|  WORD32 err = 0;
  305|   188k|  ia_exhaacplus_dec_api_struct *handle =
  306|   188k|      (ia_exhaacplus_dec_api_struct *)temp_handle;
  307|   188k|  ia_aac_dec_state_struct *aac_dec_handle = handle->p_state_aac;
  308|       |
  309|   188k|  WORD32 tmp;
  310|   188k|  ia_audio_specific_config_struct *pstr_audio_specific_config =
  311|   188k|      (ia_audio_specific_config_struct *)
  312|   188k|          aac_dec_handle->ia_audio_specific_config;
  313|   188k|  WORD32 suitable_tracks = 1;
  314|   188k|  WORD32 num_samples_out;
  315|   188k|  ia_dec_data_struct *pstr_dec_data;
  316|   188k|  UWORD8 config[MAX_PREROLL_SIZE];
  317|   188k|  WORD32 config_len;
  318|   188k|  WORD32 delay;
  319|   188k|  WORD preroll_frame_offset[MAX_PREROLL_FRAME_OFFSET] = {0};
  320|   188k|  WORD preroll_units = -1;
  321|   188k|  WORD32 access_units = 0;
  322|   188k|  WORD32 bits_consumed = 0;
  323|       |
  324|   188k|  if (frames_done == 0) {
  ------------------
  |  Branch (324:7): [True: 5.00k, False: 183k]
  ------------------
  325|  5.00k|    if ((pstr_audio_specific_config->channel_configuration > 2) ||
  ------------------
  |  Branch (325:9): [True: 1, False: 5.00k]
  ------------------
  326|  5.00k|        (pstr_audio_specific_config->channel_configuration == 0)) {
  ------------------
  |  Branch (326:9): [True: 3, False: 4.99k]
  ------------------
  327|      4|      return -1;
  328|      4|    }
  329|       |
  330|  4.99k|    pstr_dec_data = (ia_dec_data_struct *)aac_dec_handle->pstr_dec_data;
  331|       |
  332|  4.99k|    tmp = pstr_audio_specific_config->channel_configuration;
  333|       |
  334|  4.99k|    suitable_tracks =
  335|  4.99k|        ixheaacd_frm_data_init(pstr_audio_specific_config, pstr_dec_data);
  336|       |
  337|  4.99k|    pstr_audio_specific_config->channel_configuration = tmp;
  338|       |
  339|  4.99k|    if (suitable_tracks <= 0) {
  ------------------
  |  Branch (339:9): [True: 0, False: 4.99k]
  ------------------
  340|      0|      return -1;
  341|      0|    }
  342|  4.99k|  }
  343|       |
  344|   188k|  {
  345|   188k|    WORD32 tot_out_bytes = 0;
  346|   188k|    jmp_buf local;
  347|   188k|    pstr_dec_data = (ia_dec_data_struct *)aac_dec_handle->pstr_dec_data;
  348|   188k|    pstr_dec_data->str_usac_data.frame_ok = 1;
  349|   188k|    pstr_dec_data->str_usac_data.ec_flag = aac_dec_handle->p_config->ui_err_conceal;
  350|   188k|    if (pstr_dec_data->str_usac_data.ec_flag) {
  ------------------
  |  Branch (350:9): [True: 0, False: 188k]
  ------------------
  351|      0|      err = setjmp(local);
  352|      0|    }
  353|       |
  354|   188k|    if (aac_dec_handle->p_config->ui_err_conceal) {
  ------------------
  |  Branch (354:9): [True: 0, False: 188k]
  ------------------
  355|      0|      if (err == 0) {
  ------------------
  |  Branch (355:11): [True: 0, False: 0]
  ------------------
  356|      0|        if (pstr_dec_data->dec_bit_buf.cnt_bits) {
  ------------------
  |  Branch (356:13): [True: 0, False: 0]
  ------------------
  357|      0|          aac_dec_handle->ui_in_bytes += (pstr_dec_data->dec_bit_buf.cnt_bits >> 3);
  358|      0|          if (aac_dec_handle->ui_in_bytes > IA_MAX_INP_BUFFER_SIZE) {
  ------------------
  |  |   44|      0|#define IA_MAX_INP_BUFFER_SIZE (8 * 1024 + 11)
  ------------------
  |  Branch (358:15): [True: 0, False: 0]
  ------------------
  359|      0|            aac_dec_handle->ui_in_bytes = 0;
  360|      0|          }
  361|      0|        }
  362|      0|      } else {
  363|      0|        pstr_dec_data->str_usac_data.frame_ok = 0;
  364|      0|      }
  365|      0|    }
  366|       |
  367|   188k|    if (frames_done == 0) {
  ------------------
  |  Branch (367:9): [True: 4.99k, False: 183k]
  ------------------
  368|  4.99k|      WORD32 delay;
  369|  4.99k|      pstr_dec_data->str_usac_data.first_frame = 1;
  370|  4.99k|      if (aac_dec_handle->decode_create_done == 0) {
  ------------------
  |  Branch (370:11): [True: 4.99k, False: 0]
  ------------------
  371|  4.99k|        delay = ixheaacd_decode_create(
  372|  4.99k|            handle, pstr_dec_data,
  373|  4.99k|            pstr_dec_data->str_frame_data.scal_out_select + 1);
  374|  4.99k|        if (delay == -1) return -1;
  ------------------
  |  Branch (374:13): [True: 9, False: 4.98k]
  ------------------
  375|  4.99k|      }
  376|  4.98k|      pstr_dec_data->dec_bit_buf.max_size =
  377|  4.98k|          handle->p_mem_info_aac[IA_MEMTYPE_INPUT].ui_size;
  ------------------
  |  |   55|  4.98k|#define IA_MEMTYPE_INPUT 0x02
  ------------------
  378|  4.98k|      *num_channel_out = pstr_dec_data->str_frame_data.scal_out_num_channels;
  379|  4.98k|      return 0;
  380|  4.99k|    }
  381|       |
  382|   183k|    pstr_dec_data->dec_bit_buf.ptr_bit_buf_base = (UWORD8 *)inbuffer;
  383|   183k|    pstr_dec_data->dec_bit_buf.size = aac_dec_handle->ui_in_bytes << 3;
  384|   183k|    pstr_dec_data->dec_bit_buf.ptr_bit_buf_end =
  385|   183k|        (UWORD8 *)inbuffer + aac_dec_handle->ui_in_bytes - 1;
  386|   183k|    pstr_dec_data->dec_bit_buf.ptr_read_next = (UWORD8 *)inbuffer;
  387|   183k|    pstr_dec_data->dec_bit_buf.bit_pos = 7;
  388|   183k|    pstr_dec_data->dec_bit_buf.cnt_bits = pstr_dec_data->dec_bit_buf.size;
  389|   183k|    pstr_dec_data->dec_bit_buf.xaac_jmp_buf = &(aac_dec_handle->xaac_jmp_buf);
  390|   183k|    if (pstr_dec_data->str_usac_data.ec_flag) {
  ------------------
  |  Branch (390:9): [True: 0, False: 183k]
  ------------------
  391|      0|      pstr_dec_data->xaac_jmp_buf = &local;
  392|      0|    }
  393|   183k|    pstr_dec_data->str_usac_data.usac_flag = aac_dec_handle->usac_flag;
  394|   183k|    pstr_dec_data->str_usac_data.esbr_hq = handle->aac_config.ui_hq_esbr;
  395|   183k|    pstr_dec_data->str_usac_data.enh_sbr = 1;
  396|   183k|    pstr_dec_data->str_usac_data.enh_sbr_ps = handle->aac_config.ui_enh_sbr_ps;
  397|   183k|    if (pstr_dec_data->dec_bit_buf.size > pstr_dec_data->dec_bit_buf.max_size)
  ------------------
  |  Branch (397:9): [True: 1.51k, False: 182k]
  ------------------
  398|  1.51k|      pstr_dec_data->dec_bit_buf.max_size = pstr_dec_data->dec_bit_buf.size;
  399|       |    /* audio pre roll frame parsing*/
  400|       |
  401|   183k|    if (aac_dec_handle->bs_format == LOAS_BSFORMAT && pstr_dec_data->str_usac_data.frame_ok) {
  ------------------
  |  |   29|   367k|#define LOAS_BSFORMAT 3
  ------------------
  |  Branch (401:9): [True: 182k, False: 1.57k]
  |  Branch (401:55): [True: 182k, False: 0]
  ------------------
  402|   182k|      WORD32 sync = ixheaacd_read_bits_buf(&pstr_dec_data->dec_bit_buf, 11);
  403|   182k|      if (sync == 0x2b7) {
  ------------------
  |  Branch (403:11): [True: 26.0k, False: 156k]
  ------------------
  404|  26.0k|        WORD32 result = ixheaacd_latm_audio_mux_element(
  405|  26.0k|          &pstr_dec_data->dec_bit_buf, &aac_dec_handle->latm_struct_element,
  406|  26.0k|          aac_dec_handle,
  407|  26.0k|          (ia_sampling_rate_info_struct *)&handle->aac_tables
  408|  26.0k|          .pstr_huffmann_tables->str_sample_rate_info[0]);
  409|  26.0k|        if (result < 0) {
  ------------------
  |  Branch (409:13): [True: 62, False: 26.0k]
  ------------------
  410|     62|          if (aac_dec_handle->p_config->ui_err_conceal)
  ------------------
  |  Branch (410:15): [True: 0, False: 62]
  ------------------
  411|      0|            pstr_dec_data->str_usac_data.frame_ok = 0;
  412|     62|          else
  413|     62|            return result;
  414|     62|        }
  415|  26.0k|      }
  416|   182k|      bits_consumed = pstr_dec_data->dec_bit_buf.size - pstr_dec_data->dec_bit_buf.cnt_bits;
  417|   182k|    }
  418|       |
  419|   183k|    do {
  420|   183k|      config_len = 0;
  421|   183k|      if (err == 0 || aac_dec_handle->p_config->ui_err_conceal == 0) {
  ------------------
  |  Branch (421:11): [True: 183k, False: 0]
  |  Branch (421:23): [True: 0, False: 0]
  ------------------
  422|   183k|        if (access_units == 0 &&
  ------------------
  |  Branch (422:13): [True: 183k, False: 15]
  ------------------
  423|   183k|            pstr_audio_specific_config->str_usac_config.str_usac_dec_config.preroll_flag) {
  ------------------
  |  Branch (423:13): [True: 19.8k, False: 164k]
  ------------------
  424|  19.8k|          config_len = ixheaacd_audio_preroll_parsing(
  425|  19.8k|              pstr_dec_data, &config[0], &preroll_units, &preroll_frame_offset[0], aac_dec_handle,
  426|  19.8k|              &aac_dec_handle->drc_config_changed, &aac_dec_handle->apply_crossfade);
  427|       |
  428|  19.8k|          if (config_len == IA_FATAL_ERROR) return IA_FATAL_ERROR;
  ------------------
  |  |   25|  19.8k|#define IA_FATAL_ERROR 0x80000000
  ------------------
                        if (config_len == IA_FATAL_ERROR) return IA_FATAL_ERROR;
  ------------------
  |  |   25|     37|#define IA_FATAL_ERROR 0x80000000
  ------------------
  |  Branch (428:15): [True: 37, False: 19.7k]
  ------------------
  429|  19.8k|        }
  430|       |
  431|   183k|        if (config_len != 0) {
  ------------------
  |  Branch (431:13): [True: 36, False: 183k]
  ------------------
  432|     36|          ia_bit_buf_struct config_bit_buf = {0};
  433|       |
  434|     36|          config_bit_buf.ptr_bit_buf_base = config;
  435|     36|          config_bit_buf.size = config_len << 3;
  436|     36|          config_bit_buf.ptr_read_next = config_bit_buf.ptr_bit_buf_base;
  437|     36|          config_bit_buf.ptr_bit_buf_end = (UWORD8 *)config + config_len;
  438|     36|          config_bit_buf.bit_pos = 7;
  439|     36|          config_bit_buf.cnt_bits = config_bit_buf.size;
  440|     36|          if (pstr_dec_data->str_usac_data.ec_flag) {
  ------------------
  |  Branch (440:15): [True: 0, False: 36]
  ------------------
  441|      0|            config_bit_buf.xaac_jmp_buf = &local;
  442|     36|          } else {
  443|     36|            config_bit_buf.xaac_jmp_buf = &(aac_dec_handle->xaac_jmp_buf);
  444|     36|          }
  445|       |
  446|     36|          suitable_tracks = ixheaacd_frm_data_init(pstr_audio_specific_config, pstr_dec_data);
  447|       |
  448|     36|          if (suitable_tracks <= 0) return -1;
  ------------------
  |  Branch (448:15): [True: 0, False: 36]
  ------------------
  449|       |
  450|     36|          aac_dec_handle->decode_create_done = 0;
  451|     36|          if (aac_dec_handle->p_config->ui_err_conceal) {
  ------------------
  |  Branch (451:15): [True: 0, False: 36]
  ------------------
  452|      0|            if (pstr_dec_data->str_usac_data.frame_ok == 1 && err == 0) {
  ------------------
  |  Branch (452:17): [True: 0, False: 0]
  |  Branch (452:63): [True: 0, False: 0]
  ------------------
  453|      0|              err = ixheaacd_config(
  454|      0|                  &config_bit_buf,
  455|      0|                  &(pstr_dec_data->str_frame_data.str_audio_specific_config.str_usac_config),
  456|      0|                  &(pstr_audio_specific_config->channel_configuration),
  457|      0|                  aac_dec_handle->p_config->ui_err_conceal);
  458|      0|              if (err != 0) {
  ------------------
  |  Branch (458:19): [True: 0, False: 0]
  ------------------
  459|      0|                if (frames_done == 0)
  ------------------
  |  Branch (459:21): [True: 0, False: 0]
  ------------------
  460|      0|                  return -1;
  461|      0|                else
  462|      0|                  pstr_dec_data->str_usac_data.frame_ok = 0;
  463|      0|              }
  464|      0|            }
  465|     36|          } else {
  466|     36|            err = ixheaacd_config(
  467|     36|                &config_bit_buf,
  468|     36|                &(pstr_dec_data->str_frame_data.str_audio_specific_config.str_usac_config),
  469|     36|                &(pstr_audio_specific_config->channel_configuration),
  470|     36|                aac_dec_handle->p_config->ui_err_conceal);
  471|     36|            if (err != 0) {
  ------------------
  |  Branch (471:17): [True: 13, False: 23]
  ------------------
  472|     13|              return err;
  473|     13|            }
  474|     36|          }
  475|       |
  476|     23|          pstr_dec_data->str_frame_data.str_audio_specific_config.sampling_frequency =
  477|     23|              pstr_dec_data->str_frame_data.str_audio_specific_config.str_usac_config
  478|     23|                  .usac_sampling_frequency;
  479|     23|          delay = ixheaacd_decode_create(handle, pstr_dec_data,
  480|     23|                                         pstr_dec_data->str_frame_data.scal_out_select + 1);
  481|     23|          if (delay == -1) return -1;
  ------------------
  |  Branch (481:15): [True: 7, False: 16]
  ------------------
  482|     16|          *num_channel_out = pstr_dec_data->str_frame_data.scal_out_num_channels;
  483|     16|        }
  484|   183k|      } else {
  485|     21|        pstr_dec_data->str_usac_data.frame_ok = 0;
  486|     21|      }
  487|       |
  488|   183k|      pstr_dec_data->dec_bit_buf.ptr_bit_buf_base = (UWORD8 *)inbuffer;
  489|   183k|      pstr_dec_data->dec_bit_buf.size = aac_dec_handle->ui_in_bytes << 3;
  490|   183k|      pstr_dec_data->dec_bit_buf.ptr_bit_buf_end =
  491|   183k|          (UWORD8 *)inbuffer + aac_dec_handle->ui_in_bytes - 1;
  492|   183k|      pstr_dec_data->dec_bit_buf.ptr_read_next = (UWORD8 *)inbuffer;
  493|   183k|      pstr_dec_data->dec_bit_buf.bit_pos = 7;
  494|   183k|      pstr_dec_data->dec_bit_buf.cnt_bits = pstr_dec_data->dec_bit_buf.size;
  495|   183k|      pstr_dec_data->dec_bit_buf.xaac_jmp_buf = &(aac_dec_handle->xaac_jmp_buf);
  496|       |
  497|   183k|      pstr_dec_data->str_usac_data.usac_flag = aac_dec_handle->usac_flag;
  498|   183k|      pstr_dec_data->str_usac_data.esbr_hq = handle->aac_config.ui_hq_esbr;
  499|   183k|      pstr_dec_data->str_usac_data.enh_sbr = 1;
  500|   183k|      pstr_dec_data->str_usac_data.enh_sbr_ps = handle->aac_config.ui_enh_sbr_ps;
  501|       |
  502|   183k|      if (preroll_frame_offset[access_units] &&
  ------------------
  |  Branch (502:11): [True: 17, False: 183k]
  ------------------
  503|     17|          ((pstr_dec_data->str_usac_data.ec_flag && pstr_dec_data->str_usac_data.frame_ok == 1) ||
  ------------------
  |  Branch (503:13): [True: 0, False: 17]
  |  Branch (503:53): [True: 0, False: 0]
  ------------------
  504|     17|           pstr_dec_data->str_usac_data.ec_flag == 0)) {
  ------------------
  |  Branch (504:12): [True: 17, False: 0]
  ------------------
  505|     17|        pstr_dec_data->dec_bit_buf.cnt_bits =
  506|     17|            pstr_dec_data->dec_bit_buf.size -
  507|     17|            preroll_frame_offset[access_units];
  508|     17|        pstr_dec_data->dec_bit_buf.bit_pos =
  509|     17|            7 - preroll_frame_offset[access_units] % 8;
  510|     17|        pstr_dec_data->dec_bit_buf.ptr_read_next =
  511|     17|            pstr_dec_data->dec_bit_buf.ptr_read_next +
  512|     17|            (preroll_frame_offset[access_units] / 8);
  513|   183k|      } else {
  514|   183k|        pstr_dec_data->dec_bit_buf.cnt_bits =
  515|   183k|          pstr_dec_data->dec_bit_buf.size -
  516|   183k|          (bits_consumed);
  517|   183k|        pstr_dec_data->dec_bit_buf.bit_pos =
  518|   183k|          7 - (bits_consumed) % 8;
  519|   183k|        pstr_dec_data->dec_bit_buf.ptr_read_next =
  520|   183k|          pstr_dec_data->dec_bit_buf.ptr_read_next +
  521|   183k|          (bits_consumed / 8);
  522|   183k|      }
  523|       |
  524|   183k|      if (pstr_dec_data->str_usac_data.ec_flag) {
  ------------------
  |  Branch (524:11): [True: 0, False: 183k]
  ------------------
  525|      0|        if (!aac_dec_handle->decode_create_done && pstr_dec_data->str_usac_data.frame_ok == 1 &&
  ------------------
  |  Branch (525:13): [True: 0, False: 0]
  |  Branch (525:52): [True: 0, False: 0]
  ------------------
  526|      0|            config_len != 0)
  ------------------
  |  Branch (526:13): [True: 0, False: 0]
  ------------------
  527|      0|          return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
  528|   183k|      } else {
  529|   183k|        if (!aac_dec_handle->decode_create_done) return IA_FATAL_ERROR;
  ------------------
  |  |   25|      1|#define IA_FATAL_ERROR 0x80000000
  ------------------
  |  Branch (529:13): [True: 1, False: 183k]
  ------------------
  530|   183k|      }
  531|       |
  532|   183k|      err =
  533|   183k|          ixheaacd_usac_process(pstr_dec_data, num_channel_out, aac_dec_handle);
  534|       |
  535|   183k|      switch (pstr_dec_data->str_usac_data.sbr_ratio_idx) {
  536|  36.2k|        case 0:
  ------------------
  |  Branch (536:9): [True: 36.2k, False: 147k]
  ------------------
  537|  36.2k|          handle->aac_config.ui_sbr_mode = 0;
  538|  36.2k|          break;
  539|   118k|        case 1:
  ------------------
  |  Branch (539:9): [True: 118k, False: 64.9k]
  ------------------
  540|   118k|          handle->aac_config.ui_sbr_mode = 1;
  541|   118k|          break;
  542|  12.2k|        case 2:
  ------------------
  |  Branch (542:9): [True: 12.2k, False: 171k]
  ------------------
  543|  12.2k|          handle->aac_config.ui_sbr_mode = 1;
  544|  12.2k|          break;
  545|  14.7k|        case 3:
  ------------------
  |  Branch (545:9): [True: 14.7k, False: 169k]
  ------------------
  546|  14.7k|          handle->aac_config.ui_sbr_mode = 3;
  547|  14.7k|          break;
  548|       |
  549|      0|        default:
  ------------------
  |  Branch (549:9): [True: 0, False: 183k]
  ------------------
  550|      0|          handle->aac_config.ui_sbr_mode = 0;
  551|   183k|      }
  552|       |
  553|   182k|      if (err == -1) return err;
  ------------------
  |  Branch (553:11): [True: 706, False: 181k]
  ------------------
  554|       |
  555|   181k|      num_samples_out = pstr_dec_data->str_usac_data.output_samples;
  556|   181k|      if (!handle->aac_config.peak_limiter_off && pstr_dec_data->str_usac_data.ec_flag) {
  ------------------
  |  Branch (556:11): [True: 181k, False: 0]
  |  Branch (556:51): [True: 0, False: 181k]
  ------------------
  557|      0|        aac_dec_handle->peak_limiter.num_channels = *num_channel_out;
  558|       |
  559|      0|        ixheaacd_peak_limiter_process_float(&aac_dec_handle->peak_limiter,
  560|      0|                                            pstr_dec_data->str_usac_data.time_sample_vector,
  561|      0|                                            num_samples_out);
  562|      0|      }
  563|       |
  564|   181k|      ixheaacd_samples_sat((WORD8 *)outbuffer + tot_out_bytes, num_samples_out,
  565|   181k|                           pcmsize,
  566|   181k|                           pstr_dec_data->str_usac_data.time_sample_vector,
  567|   181k|                           out_bytes, *num_channel_out);
  568|   181k|      {
  569|   181k|        WORD32 preroll_counter =
  570|   181k|            pstr_dec_data->str_frame_data.str_audio_specific_config
  571|   181k|                .str_usac_config.str_usac_dec_config.preroll_counter;
  572|       |
  573|   181k|        UWORD8 i;  // for looping index used for payload calculation
  574|   181k|        WORD32 payload_buffer_offset = 0;
  575|   181k|        WORD32 copy_bytes =
  576|   181k|            pstr_dec_data->str_frame_data.str_audio_specific_config
  577|   181k|                .str_usac_config.str_usac_dec_config
  578|   181k|                .usac_ext_gain_payload_len[preroll_counter] *
  579|   181k|            sizeof(WORD8);
  580|       |
  581|   181k|        pstr_audio_specific_config->str_usac_config.str_usac_dec_config
  582|   181k|            .usac_ext_gain_payload_len[preroll_counter] =
  583|   181k|            pstr_dec_data->str_frame_data.str_audio_specific_config
  584|   181k|                .str_usac_config.str_usac_dec_config
  585|   181k|                .usac_ext_gain_payload_len[preroll_counter];
  586|       |
  587|   181k|        for (i = 0; i < preroll_counter; i++)
  ------------------
  |  Branch (587:21): [True: 19, False: 181k]
  ------------------
  588|     19|          payload_buffer_offset +=
  589|     19|              pstr_dec_data->str_frame_data.str_audio_specific_config
  590|     19|                  .str_usac_config.str_usac_dec_config
  591|     19|                  .usac_ext_gain_payload_len[i] *
  592|     19|              sizeof(WORD8);
  593|       |
  594|   181k|        memcpy(pstr_audio_specific_config->str_usac_config.str_usac_dec_config
  595|   181k|                       .usac_ext_gain_payload_buf +
  596|   181k|                   payload_buffer_offset,
  597|   181k|               pstr_dec_data->str_frame_data.str_audio_specific_config
  598|   181k|                       .str_usac_config.str_usac_dec_config
  599|   181k|                       .usac_ext_gain_payload_buf +
  600|   181k|                   payload_buffer_offset,
  601|   181k|               copy_bytes);
  602|       |
  603|   181k|        pstr_audio_specific_config->str_usac_config.str_usac_dec_config
  604|   181k|            .preroll_bytes[preroll_counter] = *out_bytes;
  605|       |
  606|   181k|        preroll_counter++;
  607|       |
  608|   181k|        if (preroll_counter > (MAX_AUDIO_PREROLLS + 1)) return IA_FATAL_ERROR;
  ------------------
  |  |  249|   181k|#define MAX_AUDIO_PREROLLS 3
  ------------------
                      if (preroll_counter > (MAX_AUDIO_PREROLLS + 1)) return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
  |  Branch (608:13): [True: 0, False: 181k]
  ------------------
  609|       |
  610|   181k|        pstr_dec_data->str_frame_data.str_audio_specific_config.str_usac_config
  611|   181k|            .str_usac_dec_config.preroll_counter = preroll_counter;
  612|       |
  613|   181k|        ia_usac_decoder_config_struct *pstr_usac_dec_config_state =
  614|   181k|            &pstr_audio_specific_config->str_usac_config.str_usac_dec_config;
  615|   181k|        ia_usac_decoder_config_struct *pstr_usac_dec_config_dec_data =
  616|   181k|            &pstr_dec_data->str_frame_data.str_audio_specific_config.str_usac_config
  617|   181k|            .str_usac_dec_config;
  618|   181k|        pstr_usac_dec_config_state->num_config_extensions =
  619|   181k|            pstr_usac_dec_config_dec_data->num_config_extensions;
  620|   181k|        pstr_usac_dec_config_state->num_elements =
  621|   181k|            pstr_usac_dec_config_dec_data->num_elements;
  622|   181k|        memcpy(pstr_usac_dec_config_state->usac_cfg_ext_info_buf,
  623|   181k|            pstr_usac_dec_config_dec_data->usac_cfg_ext_info_buf,
  624|   181k|            sizeof(pstr_usac_dec_config_state->usac_cfg_ext_info_buf));
  625|   181k|        memcpy(pstr_usac_dec_config_state->usac_ext_ele_payload_present,
  626|   181k|            pstr_usac_dec_config_dec_data->usac_ext_ele_payload_present,
  627|   181k|            sizeof(pstr_usac_dec_config_dec_data->usac_ext_ele_payload_present));
  628|   181k|        memcpy(pstr_usac_dec_config_state->usac_ext_ele_payload_buf,
  629|   181k|            pstr_usac_dec_config_dec_data->usac_ext_ele_payload_buf,
  630|   181k|            sizeof(pstr_usac_dec_config_state->usac_ext_ele_payload_buf));
  631|   181k|      }
  632|       |
  633|      0|      access_units++;
  634|   181k|      preroll_units--;
  635|   181k|      tot_out_bytes += (*out_bytes);
  636|   181k|    } while (preroll_units >= 0);
  ------------------
  |  Branch (636:14): [True: 15, False: 181k]
  ------------------
  637|   181k|    *out_bytes = tot_out_bytes;
  638|   181k|  }
  639|       |
  640|   181k|  if (aac_dec_handle->bs_format == LOAS_BSFORMAT) {
  ------------------
  |  |   29|   181k|#define LOAS_BSFORMAT 3
  ------------------
  |  Branch (640:7): [True: 179k, False: 1.55k]
  ------------------
  641|   179k|    pstr_dec_data->dec_bit_buf.ptr_bit_buf_base = (UWORD8 *)inbuffer;
  642|   179k|    pstr_dec_data->dec_bit_buf.size = aac_dec_handle->ui_in_bytes << 3;
  643|   179k|    pstr_dec_data->dec_bit_buf.ptr_bit_buf_end =
  644|   179k|      (UWORD8 *)inbuffer + aac_dec_handle->ui_in_bytes - 1;
  645|   179k|    pstr_dec_data->dec_bit_buf.ptr_read_next = (UWORD8 *)inbuffer;
  646|   179k|    pstr_dec_data->dec_bit_buf.bit_pos = 7;
  647|   179k|    pstr_dec_data->dec_bit_buf.cnt_bits = pstr_dec_data->dec_bit_buf.size;
  648|   179k|    pstr_dec_data->dec_bit_buf.xaac_jmp_buf = &(aac_dec_handle->xaac_jmp_buf);
  649|       |
  650|   179k|    ixheaacd_read_bits_buf(&pstr_dec_data->dec_bit_buf, 11);
  651|   179k|    aac_dec_handle->i_bytes_consumed =
  652|   179k|        ixheaacd_read_bits_buf(&pstr_dec_data->dec_bit_buf, 13) + 3;
  653|   179k|  }
  654|       |
  655|   181k|  return err;
  656|   183k|}
ixheaacd_decode_main.c:ixheaacd_audio_preroll_parsing:
  182|  19.8k|    WORD32 *config_changed, WORD32 *apply_crossfade) {
  183|  19.8k|  ia_bit_buf_struct *temp_buff =
  184|  19.8k|      (ia_bit_buf_struct *)&(pstr_dec_data->dec_bit_buf);
  185|       |
  186|  19.8k|  WORD32 ext_ele_present = 0;
  187|  19.8k|  WORD32 ext_ele_use_dflt_len = 0;
  188|  19.8k|  WORD32 ext_ele_payload_len = 0;
  189|  19.8k|  WORD32 num_pre_roll_frames = 0;
  190|       |
  191|  19.8k|  WORD32 frame_idx = 0;
  192|  19.8k|  WORD32 temp = 0;
  193|       |
  194|  19.8k|  WORD32 config_len = 0;
  195|  19.8k|  WORD32 loop;
  196|       |
  197|  19.8k|  if (pstr_dec_data->str_frame_data.str_audio_specific_config.str_usac_config
  ------------------
  |  Branch (197:7): [True: 19.1k, False: 657]
  ------------------
  198|  19.8k|          .str_usac_dec_config.usac_element_type[0] == ID_USAC_EXT) {
  ------------------
  |  |   30|  19.8k|#define ID_USAC_EXT 3
  ------------------
  199|  19.1k|    temp = ixheaacd_show_bits_buf(temp_buff, 3);
  200|  19.1k|    ext_ele_present = (temp >> 1) & 0x1;
  201|       |
  202|  19.1k|    if (ext_ele_present) {
  ------------------
  |  Branch (202:9): [True: 1.13k, False: 18.0k]
  ------------------
  203|  1.13k|      ext_ele_use_dflt_len = temp & 0x1;
  204|  1.13k|      if (ext_ele_use_dflt_len != 0) return 0;
  ------------------
  |  Branch (204:11): [True: 883, False: 247]
  ------------------
  205|       |
  206|    247|      ixheaacd_read_bits_buf(temp_buff, 3);
  207|       |
  208|    247|      ext_ele_payload_len = ixheaacd_read_bits_buf(temp_buff, 8);
  209|       |
  210|    247|      if (ext_ele_payload_len == 255) {
  ------------------
  |  Branch (210:11): [True: 3, False: 244]
  ------------------
  211|      3|        WORD32 val_add = 0;
  212|      3|        val_add = ixheaacd_read_bits_buf(temp_buff, 16);
  213|      3|        ext_ele_payload_len =
  214|      3|            (UWORD32)((WORD32)ext_ele_payload_len + val_add - 2);
  215|      3|      }
  216|       |
  217|    247|      config_len = ixheaacd_read_bits_buf(temp_buff, 4);
  218|    247|      if (config_len == 15) {
  ------------------
  |  Branch (218:11): [True: 26, False: 221]
  ------------------
  219|     26|        WORD32 val_add = 0;
  220|     26|        val_add = ixheaacd_read_bits_buf(temp_buff, 4);
  221|     26|        config_len += val_add;
  222|     26|        if (val_add == 15) {
  ------------------
  |  Branch (222:13): [True: 3, False: 23]
  ------------------
  223|      3|          WORD32 val_add1 = 0;
  224|      3|          val_add1 = ixheaacd_read_bits_buf(temp_buff, 8);
  225|      3|          config_len += val_add1;
  226|      3|        }
  227|     26|      }
  228|       |
  229|  1.61k|      for (loop = 0; loop < config_len; loop++)
  ------------------
  |  Branch (229:22): [True: 1.37k, False: 247]
  ------------------
  230|  1.37k|        conf_buf[loop] = ixheaacd_read_bits_buf(temp_buff, 8);
  231|       |
  232|    247|      if (aac_dec_handle->preroll_config_present == 1) {
  ------------------
  |  Branch (232:11): [True: 139, False: 108]
  ------------------
  233|    139|        if (!(memcmp(aac_dec_handle->preroll_config_prev, conf_buf,
  ------------------
  |  Branch (233:13): [True: 118, False: 21]
  ------------------
  234|    139|                     sizeof(UWORD8) * config_len))) {
  235|    118|          config_len = 0;
  236|    118|        }
  237|    139|        if (memcmp(aac_dec_handle->preroll_config_prev, conf_buf,
  ------------------
  |  Branch (237:13): [True: 21, False: 118]
  ------------------
  238|    139|                   sizeof(UWORD8) * config_len) != 0) {
  239|     21|          *config_changed = 1;
  240|    118|        } else {
  241|    118|          *config_changed = 0;
  242|    118|        }
  243|    139|      }
  244|    247|      aac_dec_handle->preroll_config_present = 1;
  245|    247|      memcpy(aac_dec_handle->preroll_config_prev, conf_buf,
  246|    247|             sizeof(UWORD8) * config_len);
  247|       |
  248|    247|      *apply_crossfade = ixheaacd_read_bits_buf(temp_buff, 1);
  249|    247|      ixheaacd_read_bits_buf(temp_buff, 1);
  250|       |
  251|    247|      num_pre_roll_frames = ixheaacd_read_bits_buf(temp_buff, 2);
  252|    247|      if (num_pre_roll_frames == 3) {
  ------------------
  |  Branch (252:11): [True: 21, False: 226]
  ------------------
  253|     21|        WORD32 val_add = 0;
  254|     21|        val_add = ixheaacd_read_bits_buf(temp_buff, 4);
  255|     21|        num_pre_roll_frames += val_add;
  256|     21|      }
  257|       |
  258|    247|      if (num_pre_roll_frames > MAX_AUDIO_PREROLLS) {
  ------------------
  |  |  249|    247|#define MAX_AUDIO_PREROLLS 3
  ------------------
  |  Branch (258:11): [True: 4, False: 243]
  ------------------
  259|      4|        if (pstr_dec_data->str_usac_data.ec_flag) {
  ------------------
  |  Branch (259:13): [True: 0, False: 4]
  ------------------
  260|      0|          num_pre_roll_frames = 0;
  261|      0|          longjmp(*(pstr_dec_data->xaac_jmp_buf),
  262|      0|                  IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|      0|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  263|      4|        } else {
  264|      4|          return IA_FATAL_ERROR;
  ------------------
  |  |   25|      4|#define IA_FATAL_ERROR 0x80000000
  ------------------
  265|      4|        }
  266|      4|      }
  267|       |
  268|    468|      for (frame_idx = 0; frame_idx < num_pre_roll_frames; frame_idx++) {
  ------------------
  |  Branch (268:27): [True: 258, False: 210]
  ------------------
  269|    258|        WORD32 au_len = 0;
  270|    258|        au_len = ixheaacd_read_bits_buf(temp_buff, 16);
  271|    258|        if (au_len == 65535) {
  ------------------
  |  Branch (271:13): [True: 5, False: 253]
  ------------------
  272|      5|          WORD32 val_add = ixheaacd_read_bits_buf(temp_buff, 16);
  273|      5|          au_len += val_add;
  274|      5|        }
  275|    258|        if (config_len != 0) {
  ------------------
  |  Branch (275:13): [True: 57, False: 201]
  ------------------
  276|     57|          preroll_frame_offset[frame_idx] =
  277|     57|              temp_buff->size - temp_buff->cnt_bits;
  278|     57|        }
  279|    258|        temp_buff->ptr_read_next += au_len;
  280|    258|        temp_buff->cnt_bits -= au_len * 8;
  281|    258|        if (temp_buff->cnt_bits < 0) {
  ------------------
  |  Branch (281:13): [True: 33, False: 225]
  ------------------
  282|     33|          if (pstr_dec_data->str_usac_data.ec_flag) {
  ------------------
  |  Branch (282:15): [True: 0, False: 33]
  ------------------
  283|      0|            temp_buff->cnt_bits = 0;
  284|      0|            longjmp(*(pstr_dec_data->xaac_jmp_buf),
  285|      0|                    IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|      0|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  286|     33|          } else {
  287|     33|            return IA_FATAL_ERROR;
  ------------------
  |  |   25|     33|#define IA_FATAL_ERROR 0x80000000
  ------------------
  288|     33|          }
  289|     33|        }
  290|    258|      }
  291|    243|    }
  292|  19.1k|  }
  293|  18.8k|  if (config_len == 0)
  ------------------
  |  Branch (293:7): [True: 18.8k, False: 41]
  ------------------
  294|  18.8k|    *preroll_units = 0;
  295|     41|  else
  296|     41|    *preroll_units = num_pre_roll_frames;
  297|       |
  298|  18.8k|  return config_len;
  299|  19.8k|}

ixheaacd_drc_map_channels:
  485|   193k|                                 WORD32 num_channels, WORD32 frame_size) {
  486|   193k|  WORD32 i, element;
  487|   193k|  WORD32 num_drc_elements;
  488|   193k|  ixheaac_drc_bs_data_struct *ptr_bs_data;
  489|       |
  490|   193k|  num_drc_elements = pstr_drc_dec->num_drc_elements;
  491|       |
  492|   193k|  if (num_drc_elements == 0) {
  ------------------
  |  Branch (492:7): [True: 192k, False: 594]
  ------------------
  493|   192k|    return IA_NO_ERROR;
  ------------------
  |  |   23|   192k|#define IA_NO_ERROR 0x00000000
  ------------------
  494|   192k|  }
  495|       |
  496|    594|  if (num_drc_elements == 1) {
  ------------------
  |  Branch (496:7): [True: 452, False: 142]
  ------------------
  497|    452|  }
  498|       |
  499|    594|  if (num_drc_elements > 1) {
  ------------------
  |  Branch (499:7): [True: 142, False: 452]
  ------------------
  500|    283|    for (i = 0; i < num_channels; i++) {
  ------------------
  |  Branch (500:17): [True: 144, False: 139]
  ------------------
  501|    144|      WORD32 drc_on = 0;
  502|       |
  503|    647|      for (element = 0; element < num_drc_elements; element++) {
  ------------------
  |  Branch (503:25): [True: 503, False: 144]
  ------------------
  504|    503|        ptr_bs_data = &pstr_drc_dec->str_drc_bs_data[element];
  505|    503|        if (ptr_bs_data->b_channel_on[i]) drc_on++;
  ------------------
  |  Branch (505:13): [True: 66, False: 437]
  ------------------
  506|    503|      }
  507|       |
  508|    144|      if (drc_on > 1) {
  ------------------
  |  Branch (508:11): [True: 3, False: 141]
  ------------------
  509|      3|        return IA_XHEAAC_DEC_EXE_FATAL_INVALID_DRC_DATA;
  ------------------
  |  |  122|      3|#define IA_XHEAAC_DEC_EXE_FATAL_INVALID_DRC_DATA 0xFFFF9803
  ------------------
  510|      3|      }
  511|    144|    }
  512|    142|  }
  513|       |
  514|  1.52k|  for (element = 0; element < num_drc_elements; element++) {
  ------------------
  |  Branch (514:21): [True: 935, False: 591]
  ------------------
  515|    935|    ptr_bs_data = &pstr_drc_dec->str_drc_bs_data[element];
  516|    935|    if (ptr_bs_data->prog_ref_level_present)
  ------------------
  |  Branch (516:9): [True: 210, False: 725]
  ------------------
  517|    210|      pstr_drc_dec->prog_ref_level = ptr_bs_data->prog_ref_level;
  518|       |
  519|  1.90k|    for (i = 0; i < num_channels; i++) {
  ------------------
  |  Branch (519:17): [True: 971, False: 935]
  ------------------
  520|    971|      if (!ptr_bs_data->b_channel_on[i]) continue;
  ------------------
  |  Branch (520:11): [True: 489, False: 482]
  ------------------
  521|       |
  522|    482|      ixheaacd_copy_drc_data(&pstr_drc_dec->str_drc_channel_data[i],
  523|    482|                             &pstr_drc_dec->str_drc_bs_data[element],
  524|    482|                             frame_size);
  525|    482|    }
  526|    935|  }
  527|    591|  return IA_NO_ERROR;
  ------------------
  |  |   23|    591|#define IA_NO_ERROR 0x00000000
  ------------------
  528|    594|}
ixheaacd_drc_dec_create:
  531|  8.61k|                             WORD16 drc_ref_level, WORD16 drc_def_level) {
  532|  8.61k|  WORD32 j, k;
  533|  8.61k|  WORD32 ch;
  534|       |
  535|  8.61k|  pstr_drc_dec->sbr_allowed = 1;
  536|  8.61k|  pstr_drc_dec->sbr_found = 0;
  537|       |
  538|  8.61k|  pstr_drc_dec->drc_element_found = 0;
  539|       |
  540|  8.61k|  pstr_drc_dec->max_audio_channels = MAX_BS_ELEMENT;
  ------------------
  |  |   24|  8.61k|#define MAX_BS_ELEMENT (8 + MAX_CC_CHANNEL_NUM)
  |  |  ------------------
  |  |  |  |   23|  8.61k|#define MAX_CC_CHANNEL_NUM (2)
  |  |  ------------------
  ------------------
  541|  8.61k|  pstr_drc_dec->drc_ref_level = drc_ref_level;
  542|  8.61k|  pstr_drc_dec->drc_def_level = drc_def_level;
  543|       |
  544|  8.61k|  pstr_drc_dec->num_drc_elements = 0;
  545|  8.61k|  pstr_drc_dec->target_ref_level = 108;
  546|  8.61k|  pstr_drc_dec->prog_ref_level = 108;
  547|  8.61k|  pstr_drc_dec->cut_factor = 0;
  548|  8.61k|  pstr_drc_dec->boost_factor = 0;
  549|  8.61k|  pstr_drc_dec->drc_on = 0;
  550|  8.61k|  pstr_drc_dec->drc_dig_norm = 1;
  551|  8.61k|  pstr_drc_dec->pres_mode = -1;
  552|       |
  553|  8.61k|  pstr_drc_dec->length_history = 2;
  554|  8.61k|  if (pstr_drc_dec->sbr_allowed) pstr_drc_dec->length_history++;
  ------------------
  |  Branch (554:7): [True: 8.61k, False: 0]
  ------------------
  555|       |
  556|  94.7k|  for (ch = 0; ch < MAX_BS_ELEMENT; ch++) {
  ------------------
  |  |   24|  94.7k|#define MAX_BS_ELEMENT (8 + MAX_CC_CHANNEL_NUM)
  |  |  ------------------
  |  |  |  |   23|  94.7k|#define MAX_CC_CHANNEL_NUM (2)
  |  |  ------------------
  ------------------
  |  Branch (556:16): [True: 86.1k, False: 8.61k]
  ------------------
  557|  86.1k|    ixheaac_drc_data_struct *pstr_drc_data =
  558|  86.1k|        (ixheaac_drc_data_struct *)&pstr_drc_dec->str_drc_channel_data[ch];
  559|  86.1k|    pstr_drc_dec->drc_channel_next_index[ch] = 0;
  560|  86.1k|    pstr_drc_dec->state = 0;
  561|       |
  562|  5.59M|    for (j = 0; j < 64; j++) {
  ------------------
  |  Branch (562:17): [True: 5.51M, False: 86.1k]
  ------------------
  563|   358M|      for (k = 0; k < 64; k++) {
  ------------------
  |  Branch (563:19): [True: 352M, False: 5.51M]
  ------------------
  564|   352M|        pstr_drc_data->drc_factors_sbr[j][k] = DRC_SBR_ONE_Q25;
  ------------------
  |  |   89|   352M|#define DRC_SBR_ONE_Q25 (1 << 25)
  ------------------
  565|   352M|        pstr_drc_data->drc_factors_sbr_lat[j][k] = DRC_SBR_ONE_Q25;
  ------------------
  |  |   89|   352M|#define DRC_SBR_ONE_Q25 (1 << 25)
  ------------------
  566|   352M|      }
  567|  5.51M|    }
  568|  1.46M|    for (j = 0; j < MAX_DRC_BANDS; j++) pstr_drc_data->drc_fac[j] = 0;
  ------------------
  |  |   24|  1.46M|#define MAX_DRC_BANDS 16
  ------------------
  |  Branch (568:17): [True: 1.37M, False: 86.1k]
  ------------------
  569|       |
  570|  86.1k|    pstr_drc_data->n_mdct_bands[0] = FRAME_SIZE;
  ------------------
  |  |   25|  86.1k|#define FRAME_SIZE 1024
  ------------------
  571|  86.1k|    pstr_drc_data->drc_exp = 1;
  572|  86.1k|    pstr_drc_data->short_block = 0;
  573|  86.1k|    pstr_drc_data->drc_interp_scheme = 0;
  574|  86.1k|    pstr_drc_data->n_drc_bands = 1;
  575|  86.1k|    pstr_drc_data->new_prog_ref_level = 0;
  576|  86.1k|    pstr_drc_data->new_drc_fac = 0;
  577|  86.1k|  }
  578|  8.61k|}
ixheaacd_dec_drc_read_element:
  773|    447|                                     ia_bit_buf_struct *it_bit_buf) {
  774|    447|  WORD32 bits_read = 0;
  775|    447|  if (pstr_drc_dec->num_drc_elements < pstr_drc_dec->max_audio_channels) {
  ------------------
  |  Branch (775:7): [True: 447, False: 0]
  ------------------
  776|    447|    bits_read = ixheaacd_drc_element_read(
  777|    447|        it_bit_buf, &pstr_drc_dec->str_drc_bs_data[pstr_drc_dec->num_drc_elements]);
  778|       |
  779|    447|    if (pstr_drc_dec->dvb_anc_data_present) {
  ------------------
  |  Branch (779:9): [True: 46, False: 401]
  ------------------
  780|     46|      ixheaacd_drc_read_compression(
  781|     46|          it_bit_buf, pstr_drc_dec, pstr_drc_dec->dvb_anc_data_pos);
  782|     46|    }
  783|    447|    pstr_drc_dec->num_drc_elements++;
  784|       |
  785|    447|  } else {
  786|      0|    ixheaac_drc_bs_data_struct drc_ele_dummy;
  787|       |
  788|      0|    bits_read = ixheaacd_drc_element_read(it_bit_buf, &drc_ele_dummy);
  789|      0|    if (pstr_drc_dec->dvb_anc_data_present) {
  ------------------
  |  Branch (789:9): [True: 0, False: 0]
  ------------------
  790|      0|      ixheaacd_drc_read_compression(
  791|      0|          it_bit_buf, drc_dummy, pstr_drc_dec->dvb_anc_data_pos);
  792|      0|    }
  793|      0|  }
  794|       |
  795|    447|  pstr_drc_dec->dvb_anc_data_present = 0;
  796|       |
  797|    447|  return bits_read;
  798|    447|}
ixheaacd_get_div_value_24:
  805|   681k|WORD32 ixheaacd_get_div_value_24(WORD32 value) {
  806|   681k|  WORD32 ret;
  807|   681k|  WORD64 temp;
  808|       |
  809|   681k|  temp = (WORD64)value * 44739243;
  810|       |
  811|   681k|  ret = (WORD32)((temp + 22369621) >> 30);
  812|       |
  813|   681k|  return ret;
  814|   681k|}
ixheaacd_get_div_value_2400:
  816|   257k|WORD32 ixheaacd_get_div_value_2400(WORD32 value) {
  817|   257k|  WORD32 ret;
  818|   257k|  WORD64 temp;
  819|       |
  820|   257k|  temp = (WORD64)value * 447392;
  821|       |
  822|   257k|  ret = (WORD32)((temp + 223696) >> 30);
  823|       |
  824|   257k|  return ret;
  825|   257k|}
ixheaacd_drc_apply:
  881|   211k|                        WORD32 frame_size, WORD32 esbr_flag, WORD32 audio_object_type) {
  882|   211k|  WORD32 drc_band, spec_pos, start_pos, end_pos;
  883|   211k|  WORD32 low_hi, drc_norm, drc_freq_fac;
  884|   211k|  WORD32 drc_fac, div_val, mod_val, ret_val, offset_value;
  885|   211k|  const WORD32 *table;
  886|   211k|  ixheaac_drc_data_struct *pstr_drc_data;
  887|   211k|  WORD32 num_qmf_sub_sample = (frame_size >> 5);
  888|   211k|  WORD32 num_qmf_sub_sample_by_2 = (frame_size >> 6);
  889|   211k|  WORD32 diff_ref_level;
  890|       |
  891|   211k|  WORD32 *drc_sbr_factors[64];
  892|   211k|  WORD32 qmf_start_pos, qmf_stop_pos, qmf_start, i, j;
  893|   211k|  WORD32 prev_frame_drc_sbr_factors[64];
  894|   211k|  WORD32 *ptr_drc_fac;
  895|       |
  896|   211k|  if ((audio_object_type != AOT_ER_AAC_ELD) && (audio_object_type != AOT_ER_AAC_LD)
  ------------------
  |  Branch (896:7): [True: 170k, False: 41.7k]
  |  Branch (896:48): [True: 100k, False: 69.3k]
  ------------------
  897|   100k|      && esbr_flag)
  ------------------
  |  Branch (897:10): [True: 100k, False: 0]
  ------------------
  898|   100k|  {
  899|  6.55M|    for (i = 0; i < SBR_QMF_SUB_SAMPLES; i++)
  ------------------
  |  |   28|  6.55M|#define SBR_QMF_SUB_SAMPLES 64
  ------------------
  |  Branch (899:17): [True: 6.45M, False: 100k]
  ------------------
  900|  6.45M|    {
  901|   419M|      for (j = 0; j < SBR_QMF_SUB_BANDS; j++)
  ------------------
  |  |   29|   419M|#define SBR_QMF_SUB_BANDS 64
  ------------------
  |  Branch (901:19): [True: 413M, False: 6.45M]
  ------------------
  902|   413M|      {
  903|   413M|        pstr_drc_dec->str_drc_channel_data[channel].drc_factors_sbr[i][j] =
  904|   413M|          pstr_drc_dec->str_drc_channel_data[channel].drc_factors_sbr_lat[i][j];
  905|   413M|      }
  906|  6.45M|    }
  907|  3.32M|    for (j = 0; j < 32; j++)
  ------------------
  |  Branch (907:17): [True: 3.22M, False: 100k]
  ------------------
  908|  3.22M|    {
  909|  3.22M|      memcpy(pstr_drc_dec->str_drc_channel_data[channel].drc_factors_sbr_lat[j],
  910|  3.22M|             pstr_drc_dec->str_drc_channel_data[channel].drc_factors_sbr_lat[j + 32],
  911|  3.22M|             SBR_QMF_SUB_BANDS * sizeof(WORD32));
  ------------------
  |  |   29|  3.22M|#define SBR_QMF_SUB_BANDS 64
  ------------------
  912|  3.22M|    }
  913|   100k|    ptr_drc_fac =
  914|   100k|      &pstr_drc_dec->str_drc_channel_data[channel].drc_factors_sbr_lat[0][0];
  915|   111k|  } else {
  916|   111k|    ptr_drc_fac =
  917|   111k|      &pstr_drc_dec->str_drc_channel_data[channel].drc_factors_sbr[0][0];
  918|   111k|  }
  919|  13.7M|  for (i = 0; i < 64; i++) {
  ------------------
  |  Branch (919:15): [True: 13.5M, False: 211k]
  ------------------
  920|  13.5M|    drc_sbr_factors[i] = ptr_drc_fac;
  921|  13.5M|    ptr_drc_fac += 64;
  922|  13.5M|  }
  923|       |
  924|   211k|  memcpy(prev_frame_drc_sbr_factors,
  925|   211k|         drc_sbr_factors[2 * num_qmf_sub_sample - 1], 64 * sizeof(WORD32));
  926|       |
  927|   211k|  pstr_drc_data = &pstr_drc_dec->str_drc_channel_data[channel];
  928|   211k|  if (!pstr_drc_dec->drc_on) return;
  ------------------
  |  Branch (928:7): [True: 0, False: 211k]
  ------------------
  929|       |
  930|   211k|  if (pstr_drc_dec->drc_dig_norm) {
  ------------------
  |  Branch (930:7): [True: 211k, False: 0]
  ------------------
  931|   211k|    diff_ref_level =
  932|   211k|        pstr_drc_dec->target_ref_level - pstr_drc_dec->prog_ref_level;
  933|       |
  934|   211k|    if (diff_ref_level < 0) {
  ------------------
  |  Branch (934:9): [True: 3.25k, False: 208k]
  ------------------
  935|  3.25k|      diff_ref_level = -diff_ref_level;
  936|  3.25k|      table = ixheaacd_drc_pow_tbl_2_q29;
  937|  3.25k|      div_val = ixheaacd_get_div_value_24(diff_ref_level);
  938|  3.25k|      drc_norm = 1 << (25 + div_val);
  939|  3.25k|      mod_val = diff_ref_level - (div_val * 24);
  940|  3.25k|      diff_ref_level = mod_val * 1000;
  941|       |
  942|   208k|    } else {
  943|   208k|      table = ixheaacd_drc_pow_tbl_1_2_q29;
  944|   208k|      div_val = ixheaacd_get_div_value_24(diff_ref_level);
  945|   208k|      drc_norm = 1 << (25 - div_val);
  946|   208k|      mod_val = diff_ref_level - (div_val * 24);
  947|   208k|      diff_ref_level = mod_val * 1000;
  948|   208k|    }
  949|   211k|    ret_val = ixheaacd_get_div_value_24(diff_ref_level);
  950|   211k|    drc_norm = ixheaacd_mult32x16in32_shift29(drc_norm, table[ret_val]);
  951|       |
  952|   211k|  } else {
  953|      0|    drc_norm = (1 << 25);
  954|      0|  }
  955|       |
  956|   211k|  start_pos = 0;
  957|   469k|  for (drc_band = 0; drc_band < pstr_drc_data->n_drc_bands; drc_band++) {
  ------------------
  |  Branch (957:22): [True: 257k, False: 211k]
  ------------------
  958|   257k|    if ((pstr_drc_dec->str_drc_bs_data[0].drc_data_type == DVB_DRC_ANC_DATA) &&
  ------------------
  |  Branch (958:9): [True: 46, False: 257k]
  ------------------
  959|     46|        (pstr_drc_dec->heavy_mode)) {
  ------------------
  |  Branch (959:9): [True: 16, False: 30]
  ------------------
  960|     16|      WORD32 val_x, val_y;
  961|     16|      float compression_factor;
  962|     16|      float temp;
  963|     16|      val_x = ((UWORD8)pstr_drc_data->drc_fac_dvb[drc_band]) >> 4;
  964|     16|      val_y = ((UWORD8)pstr_drc_data->drc_fac_dvb[drc_band]) & 0x0F;
  965|       |
  966|     16|      compression_factor = (FLOAT32)(48.164 - 6.0206 * val_x - 0.4014 * val_y);
  967|       |
  968|     16|      temp = (FLOAT32)(pow(10, (float)compression_factor / 20.0));
  969|     16|      drc_freq_fac = (WORD32)(temp * 33554431.0f);
  970|       |
  971|   257k|    } else {
  972|   257k|      if (pstr_drc_data->drc_fac[drc_band] < 0) {
  ------------------
  |  Branch (972:11): [True: 47.7k, False: 210k]
  ------------------
  973|  47.7k|        low_hi = pstr_drc_dec->cut_factor;
  974|   210k|      } else {
  975|   210k|        low_hi = pstr_drc_dec->boost_factor;
  976|   210k|      }
  977|       |
  978|   257k|      {
  979|   257k|        drc_fac =
  980|   257k|            pstr_drc_dec->str_drc_channel_data[channel].drc_fac[drc_band] *
  981|   257k|            low_hi;
  982|   257k|        if (drc_fac < 0) {
  ------------------
  |  Branch (982:13): [True: 0, False: 257k]
  ------------------
  983|      0|          drc_fac *= -1;
  984|      0|          table = ixheaacd_drc_pow_tbl_1_2_q29;
  985|       |
  986|      0|          div_val = ixheaacd_get_div_value_2400(drc_fac);
  987|      0|          drc_freq_fac = 1 << (25 - div_val);
  988|       |
  989|      0|          mod_val = drc_fac - (div_val * 2400);
  990|      0|          drc_fac = mod_val * 10;
  991|   257k|        } else {
  992|   257k|          table = ixheaacd_drc_pow_tbl_2_q29;
  993|       |
  994|   257k|          div_val = ixheaacd_get_div_value_2400(drc_fac);
  995|   257k|          drc_freq_fac = 1 << (25 + div_val);
  996|       |
  997|   257k|          mod_val = drc_fac - (div_val * 2400);
  998|   257k|          drc_fac = mod_val * 10;
  999|   257k|        }
 1000|       |
 1001|   257k|        ret_val = ixheaacd_get_div_value_24(drc_fac);
 1002|       |
 1003|   257k|        drc_freq_fac =
 1004|   257k|            ixheaacd_mult32x16in32_shift29(drc_freq_fac, table[ret_val]);
 1005|       |
 1006|   257k|        drc_freq_fac = ixheaacd_mult32x16in32_shift25(drc_freq_fac, drc_norm);
 1007|   257k|      }
 1008|   257k|    }
 1009|       |
 1010|   257k|    end_pos = pstr_drc_data->n_mdct_bands[drc_band];
 1011|       |
 1012|   257k|    if (!pstr_drc_dec->sbr_found) {
  ------------------
  |  Branch (1012:9): [True: 174k, False: 83.8k]
  ------------------
 1013|   176M|      for (spec_pos = start_pos; spec_pos < end_pos; spec_pos++) {
  ------------------
  |  Branch (1013:34): [True: 176M, False: 174k]
  ------------------
 1014|   176M|        ptr_spectral_coef[spec_pos] = ixheaacd_mult32x16in32_shift25(
 1015|   176M|            ptr_spectral_coef[spec_pos], drc_freq_fac);
 1016|   176M|      }
 1017|   174k|    }
 1018|       |
 1019|   257k|    if (pstr_drc_dec->sbr_found) {
  ------------------
  |  Branch (1019:9): [True: 83.8k, False: 174k]
  ------------------
 1020|  83.8k|      if (win_seq != EIGHT_SHORT_SEQUENCE) {
  ------------------
  |  |  102|  83.8k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  |  Branch (1020:11): [True: 82.6k, False: 1.13k]
  ------------------
 1021|  82.6k|        if (960 == frame_size) {
  ------------------
  |  Branch (1021:13): [True: 54.6k, False: 28.0k]
  ------------------
 1022|  54.6k|          qmf_start = ixheaacd_div_by_30(start_pos);
 1023|  54.6k|          offset_value = 1;
 1024|  54.6k|        } else {
 1025|  28.0k|          qmf_start = start_pos >> 5;
 1026|  28.0k|          offset_value = 0;
 1027|  28.0k|        }
 1028|       |
 1029|  3.54M|        for (j = -num_qmf_sub_sample_by_2; j < num_qmf_sub_sample; j++) {
  ------------------
  |  Branch (1029:44): [True: 3.45M, False: 82.6k]
  ------------------
 1030|  3.45M|          WORD32 alpha_val = 0;
 1031|       |
 1032|  3.45M|          if (j + num_qmf_sub_sample_by_2 < num_qmf_sub_sample) {
  ------------------
  |  Branch (1032:15): [True: 2.30M, False: 1.15M]
  ------------------
 1033|  2.30M|            if (pstr_drc_data->drc_interp_scheme == 0) {
  ------------------
  |  Branch (1033:17): [True: 913k, False: 1.39M]
  ------------------
 1034|   913k|              alpha_val = (j + num_qmf_sub_sample_by_2);
 1035|  59.3M|              for (i = qmf_start; i < 64; i++) {
  ------------------
  |  Branch (1035:35): [True: 58.4M, False: 913k]
  ------------------
 1036|  58.4M|                WORD64 temp_drc = (WORD64)alpha_val * drc_freq_fac +
 1037|  58.4M|                                  (num_qmf_sub_sample - alpha_val) *
 1038|  58.4M|                                      (WORD64)prev_frame_drc_sbr_factors[i];
 1039|       |
 1040|  58.4M|                if (frame_size == 512) {
  ------------------
  |  Branch (1040:21): [True: 5.73M, False: 52.6M]
  ------------------
 1041|  5.73M|                  drc_sbr_factors[num_qmf_sub_sample + j][i] =
 1042|  5.73M|                      (WORD32)(temp_drc >> 4);
 1043|  52.6M|                } else if (frame_size == 480) {
  ------------------
  |  Branch (1043:28): [True: 7.80M, False: 44.8M]
  ------------------
 1044|  7.80M|                  drc_sbr_factors[num_qmf_sub_sample + j][i] =
 1045|  7.80M|                      ixheaacd_div_by_15(temp_drc);
 1046|  44.8M|                } else {
 1047|  44.8M|                  drc_sbr_factors[num_qmf_sub_sample + j][i] =
 1048|  44.8M|                      (WORD32)(temp_drc >> 5);
 1049|  44.8M|                }
 1050|       |
 1051|  58.4M|                if (960 == frame_size) {
  ------------------
  |  Branch (1051:21): [True: 16.4M, False: 42.0M]
  ------------------
 1052|  16.4M|                  drc_sbr_factors[num_qmf_sub_sample + j][i] =
 1053|  16.4M|                      ixheaacd_div_by_30(
 1054|  16.4M|                          drc_sbr_factors[num_qmf_sub_sample + j][i]);
 1055|  16.4M|                }
 1056|  58.4M|              }
 1057|       |
 1058|  1.39M|            } else {
 1059|  1.39M|              if (j + num_qmf_sub_sample_by_2 >=
  ------------------
  |  Branch (1059:19): [True: 1.39M, False: 3.14k]
  ------------------
 1060|  1.39M|                  ixheaacd_drc_offset[offset_value]
 1061|  1.39M|                                     [pstr_drc_data->drc_interp_scheme - 1]) {
 1062|  1.39M|                alpha_val = 1;
 1063|  72.3M|                for (i = qmf_start; i < 64; i++) {
  ------------------
  |  Branch (1063:37): [True: 70.9M, False: 1.39M]
  ------------------
 1064|  70.9M|                  drc_sbr_factors[num_qmf_sub_sample + j][i] = drc_freq_fac;
 1065|  70.9M|                }
 1066|  1.39M|              } else {
 1067|  3.14k|                alpha_val = 0;
 1068|   195k|                for (i = qmf_start; i < 64; i++) {
  ------------------
  |  Branch (1068:37): [True: 192k, False: 3.14k]
  ------------------
 1069|   192k|                  drc_sbr_factors[num_qmf_sub_sample + j][i] =
 1070|   192k|                      prev_frame_drc_sbr_factors[i];
 1071|   192k|                }
 1072|  3.14k|              }
 1073|  1.39M|            }
 1074|  2.30M|          } else {
 1075|  1.15M|            alpha_val = 1;
 1076|  65.6M|            for (i = qmf_start; i < 64; i++) {
  ------------------
  |  Branch (1076:33): [True: 64.5M, False: 1.15M]
  ------------------
 1077|  64.5M|              drc_sbr_factors[num_qmf_sub_sample + j][i] = drc_freq_fac;
 1078|  64.5M|            }
 1079|  1.15M|          }
 1080|  3.45M|        }
 1081|  82.6k|      } else {
 1082|  1.13k|        qmf_start_pos = ixheaacd_drc_floor(start_pos, frame_size);
 1083|       |
 1084|  1.13k|        qmf_stop_pos = ixheaacd_drc_ceil(end_pos, frame_size);
 1085|       |
 1086|  1.13k|        qmf_start = ixheaacd_drc_get_bottom_qmf(start_pos, frame_size);
 1087|  21.3k|        for (j = qmf_start_pos; j < qmf_stop_pos; j++) {
  ------------------
  |  Branch (1087:33): [True: 20.2k, False: 1.13k]
  ------------------
 1088|  20.2k|          if (j > qmf_start_pos && ((j & 0x03) == 0)) {
  ------------------
  |  Branch (1088:15): [True: 19.3k, False: 893]
  |  Branch (1088:36): [True: 4.24k, False: 15.0k]
  ------------------
 1089|  4.24k|            qmf_start = 0;
 1090|  4.24k|          }
 1091|  1.29M|          for (i = qmf_start; i < 64; i++) {
  ------------------
  |  Branch (1091:31): [True: 1.27M, False: 20.2k]
  ------------------
 1092|  1.27M|            drc_sbr_factors[num_qmf_sub_sample + j][i] = drc_freq_fac;
 1093|  1.27M|          }
 1094|  20.2k|        }
 1095|  1.13k|      }
 1096|  83.8k|    }
 1097|       |
 1098|   257k|    start_pos = end_pos;
 1099|   257k|  }
 1100|       |
 1101|   211k|  if (win_seq != EIGHT_SHORT_SEQUENCE) {
  ------------------
  |  |  102|   211k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  |  Branch (1101:7): [True: 177k, False: 34.1k]
  ------------------
 1102|   177k|    pstr_drc_data->prev_interp_scheme = pstr_drc_data->drc_interp_scheme;
 1103|   177k|  } else {
 1104|  34.1k|    pstr_drc_data->prev_interp_scheme = 8;
 1105|  34.1k|  }
 1106|   211k|}
ixheaacd_drc_freq_dec.c:ixheaacd_copy_drc_data:
  462|    482|                                   WORD32 frame_size) {
  463|    482|  WORD32 band_num;
  464|       |
  465|    482|  ch_data->n_drc_bands = ptr_bs_data->drc_num_bands;
  466|       |
  467|    482|  if (ch_data->n_drc_bands == 1) {
  ------------------
  |  Branch (467:7): [True: 146, False: 336]
  ------------------
  468|    146|    ch_data->n_mdct_bands[0] = frame_size;
  469|    146|    ch_data->drc_fac[0] = ptr_bs_data->dyn_rng_dlbl[0];
  470|    146|    ch_data->drc_fac_dvb[0] = ptr_bs_data->dyn_rng_dlbl_dvb[0];
  471|       |
  472|    336|  } else {
  473|  3.91k|    for (band_num = 0; band_num < ptr_bs_data->drc_num_bands; band_num++) {
  ------------------
  |  Branch (473:24): [True: 3.58k, False: 336]
  ------------------
  474|  3.58k|      ch_data->n_mdct_bands[band_num] =
  475|  3.58k|          (ptr_bs_data->drc_band_top[band_num] + 1) * MUL_DRC_BAND;
  ------------------
  |  |  436|  3.58k|#define MUL_DRC_BAND 4
  ------------------
  476|  3.58k|      ch_data->drc_fac[band_num] = ptr_bs_data->dyn_rng_dlbl[band_num];
  477|  3.58k|      ch_data->drc_fac_dvb[band_num] = ptr_bs_data->dyn_rng_dlbl_dvb[band_num];
  478|  3.58k|    }
  479|    336|  }
  480|       |
  481|    482|  ch_data->drc_interp_scheme = ptr_bs_data->drc_interpolation_scheme;
  482|    482|}
ixheaacd_drc_freq_dec.c:ixheaacd_drc_element_read:
  610|    447|    ia_bit_buf_struct *it_bit_buf, ixheaac_drc_bs_data_struct *pstr_bs_data) {
  611|    447|  WORD32 ich, idrc, nbyte = 1;
  612|    447|  WORD32 pce_tag_present, drc_bands_present;
  613|    447|  WORD32 excluded_chns_present;
  614|    447|  UWORD8 drc_band_incr;
  615|    447|  WORD8 max_dyn_rng_dlbl = -128;
  616|       |
  617|    447|  pstr_bs_data->drc_num_bands = 1;
  618|       |
  619|    447|  pce_tag_present = ixheaacd_read_bits_buf(it_bit_buf, 1);
  620|    447|  if (pce_tag_present) {
  ------------------
  |  Branch (620:7): [True: 228, False: 219]
  ------------------
  621|    228|    ixheaacd_read_bits_buf(it_bit_buf, 4);/*pce_instance_tag*/
  622|    228|    ixheaacd_read_bits_buf(it_bit_buf, 4);/*drc_tag_reserved_bits*/
  623|    228|    nbyte++;
  624|    228|  }
  625|       |
  626|  4.00k|  for (ich = 0; ich < MAX_AUDIO_CHANNELS; ich++) {
  ------------------
  |  |   26|  4.00k|#define MAX_AUDIO_CHANNELS 8
  ------------------
  |  Branch (626:17): [True: 3.56k, False: 447]
  ------------------
  627|  3.56k|    pstr_bs_data->b_channel_on[ich] = 1;
  628|  3.56k|  }
  629|       |
  630|    447|  excluded_chns_present = ixheaacd_read_bits_buf(it_bit_buf, 1);
  631|    447|  if (excluded_chns_present) {
  ------------------
  |  Branch (631:7): [True: 294, False: 153]
  ------------------
  632|    294|    nbyte += ixheaacd_drc_excluded_channels(it_bit_buf, MAX_AUDIO_CHANNELS,
  ------------------
  |  |   26|    294|#define MAX_AUDIO_CHANNELS 8
  ------------------
  633|    294|                                            pstr_bs_data->b_channel_on);
  634|    294|  }
  635|       |
  636|    447|  drc_bands_present = ixheaacd_read_bits_buf(it_bit_buf, 1);
  637|    447|  if (drc_bands_present) {
  ------------------
  |  Branch (637:7): [True: 222, False: 225]
  ------------------
  638|    222|    drc_band_incr = ixheaacd_read_bits_buf(it_bit_buf, 4);
  639|    222|    pstr_bs_data->drc_interpolation_scheme = ixheaacd_read_bits_buf(it_bit_buf, 4);
  640|    222|    nbyte++;
  641|       |
  642|    222|    pstr_bs_data->drc_num_bands += drc_band_incr;
  643|  2.64k|    for (idrc = 0; idrc < pstr_bs_data->drc_num_bands; idrc++) {
  ------------------
  |  Branch (643:20): [True: 2.42k, False: 222]
  ------------------
  644|  2.42k|      pstr_bs_data->drc_band_top[idrc] = ixheaacd_read_bits_buf(it_bit_buf, 8);
  645|  2.42k|      nbyte++;
  646|  2.42k|    }
  647|    225|  } else {
  648|    225|    pstr_bs_data->drc_band_top[0] = FRAME_SIZE / 4 - 1;
  ------------------
  |  |   25|    225|#define FRAME_SIZE 1024
  ------------------
  649|    225|    pstr_bs_data->drc_interpolation_scheme = 0;
  650|    225|  }
  651|       |
  652|    447|  pstr_bs_data->prog_ref_level_present = ixheaacd_read_bits_buf(it_bit_buf, 1);
  653|    447|  if (pstr_bs_data->prog_ref_level_present) {
  ------------------
  |  Branch (653:7): [True: 160, False: 287]
  ------------------
  654|    160|    pstr_bs_data->prog_ref_level = ixheaacd_read_bits_buf(it_bit_buf, 7);
  655|       |
  656|    160|    ixheaacd_read_bits_buf(it_bit_buf, 1);/*prog_ref_level_reserved_bits*/
  657|    160|    nbyte++;
  658|    160|  }
  659|       |
  660|  3.06k|  for (idrc = 0; idrc < pstr_bs_data->drc_num_bands; idrc++) {
  ------------------
  |  Branch (660:18): [True: 2.62k, False: 447]
  ------------------
  661|  2.62k|    WORD32 sign = ixheaacd_read_bits_buf(it_bit_buf, 1);
  662|  2.62k|    pstr_bs_data->dyn_rng_dlbl[idrc] = ixheaacd_read_bits_buf(it_bit_buf, 7);
  663|  2.62k|    if (sign)
  ------------------
  |  Branch (663:9): [True: 1.81k, False: 803]
  ------------------
  664|  1.81k|      pstr_bs_data->dyn_rng_dlbl[idrc] = -pstr_bs_data->dyn_rng_dlbl[idrc];
  665|  2.62k|    max_dyn_rng_dlbl = max(max_dyn_rng_dlbl, pstr_bs_data->dyn_rng_dlbl[idrc]);
  ------------------
  |  |   74|  2.62k|#define max(a, b) (((a) > (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (74:20): [True: 723, False: 1.89k]
  |  |  ------------------
  ------------------
  666|       |
  667|  2.62k|    nbyte++;
  668|  2.62k|  }
  669|    447|  pstr_bs_data->max_dyn_rng_dlbl = max_dyn_rng_dlbl;
  670|       |
  671|    447|  return nbyte;
  672|    447|}
ixheaacd_drc_freq_dec.c:ixheaacd_drc_excluded_channels:
  581|    294|                                             WORD32 nch, UWORD8 *b_channel_on) {
  582|    294|  WORD32 ich, nbyte = 0;
  583|    294|  WORD32 num_excl_chan;
  584|    294|  UWORD8 exclude_mask;
  585|       |
  586|    294|  num_excl_chan = 7;
  587|  2.35k|  for (ich = 0; ich < 7; ich++) {
  ------------------
  |  Branch (587:17): [True: 2.05k, False: 294]
  ------------------
  588|  2.05k|    exclude_mask = ixheaacd_read_bits_buf(it_bit_buf, 1);
  589|  2.05k|    if (ich < nch) {
  ------------------
  |  Branch (589:9): [True: 2.05k, False: 0]
  ------------------
  590|  2.05k|      b_channel_on[ich] = !exclude_mask;
  591|  2.05k|    }
  592|  2.05k|  }
  593|    294|  nbyte++;
  594|       |
  595|    708|  while (ixheaacd_read_bits_buf(it_bit_buf, 1)) {
  ------------------
  |  Branch (595:10): [True: 414, False: 294]
  ------------------
  596|  3.28k|    for (ich = num_excl_chan; ich < num_excl_chan + 7; ich++) {
  ------------------
  |  Branch (596:31): [True: 2.87k, False: 414]
  ------------------
  597|  2.87k|      exclude_mask = ixheaacd_read_bits_buf(it_bit_buf, 1);
  598|  2.87k|      if (ich < nch) {
  ------------------
  |  Branch (598:11): [True: 173, False: 2.70k]
  ------------------
  599|    173|        b_channel_on[ich] = !exclude_mask;
  600|    173|      }
  601|  2.87k|    }
  602|    414|    nbyte++;
  603|    414|    num_excl_chan += 7;
  604|    414|  }
  605|       |
  606|    294|  return nbyte;
  607|    294|}
ixheaacd_drc_freq_dec.c:ixheaacd_drc_read_compression:
  676|     46|                                         WORD32 bs_pos) {
  677|     46|  WORD32 bit_count = 0;
  678|     46|  WORD32 dmx_lvl_present, ext_present, compression_present;
  679|     46|  WORD32 coarse_gain_present, fine_grain_present;
  680|     46|  ia_bit_buf_struct local_bs = {0};
  681|     46|  WORD32 bytes = 0, bits = 0;
  682|       |
  683|     46|  memcpy(&local_bs, it_bit_buf, sizeof(ia_bit_buf_struct));
  684|       |
  685|     46|  if (local_bs.size < bs_pos) {
  ------------------
  |  Branch (685:7): [True: 1, False: 45]
  ------------------
  686|      1|    longjmp(*(local_bs.xaac_jmp_buf),
  687|      1|            IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|      1|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  688|      1|  }
  689|     45|  bytes = (local_bs.size - bs_pos) >> 3;
  690|     45|  bits = (local_bs.size - bs_pos) % 8;
  691|       |
  692|     45|  local_bs.cnt_bits = bs_pos;
  693|     45|  local_bs.ptr_read_next = local_bs.ptr_bit_buf_base;
  694|     45|  local_bs.ptr_read_next += bytes;
  695|     45|  local_bs.bit_pos = 7 - bits;
  696|       |
  697|     45|  if (ixheaacd_read_bits_buf(&local_bs, 8) != DVB_ANC_DATA_SYNC_BYTE) {
  ------------------
  |  |   38|     45|#define DVB_ANC_DATA_SYNC_BYTE (0xBC)
  ------------------
  |  Branch (697:7): [True: 0, False: 45]
  ------------------
  698|      0|    return 0;
  699|      0|  }
  700|       |
  701|     45|  if (ixheaacd_read_bits_buf(&local_bs, 2) != 3) return 0;
  ------------------
  |  Branch (701:7): [True: 3, False: 42]
  ------------------
  702|       |
  703|     42|  ixheaacd_read_bits_buf(&local_bs, 2);
  704|     42|  pstr_drc_dec->pres_mode = ixheaacd_read_bits_buf(&local_bs, 2);
  705|     42|  ixheaacd_read_bits_buf(&local_bs, 1);
  706|     42|  if (ixheaacd_read_bits_buf(&local_bs, 1) != 0) return 0;
  ------------------
  |  Branch (706:7): [True: 6, False: 36]
  ------------------
  707|       |
  708|     36|  if (ixheaacd_read_bits_buf(&local_bs, 3) != 0) return 0;
  ------------------
  |  Branch (708:7): [True: 3, False: 33]
  ------------------
  709|       |
  710|     33|  dmx_lvl_present = ixheaacd_read_bits_buf(&local_bs, 1);
  711|     33|  ext_present = ixheaacd_read_bits_buf(&local_bs, 1);
  712|     33|  compression_present = ixheaacd_read_bits_buf(&local_bs, 1);
  713|     33|  coarse_gain_present = ixheaacd_read_bits_buf(&local_bs, 1);
  714|     33|  fine_grain_present = ixheaacd_read_bits_buf(&local_bs, 1);
  715|     33|  bit_count += 24;
  716|       |
  717|     33|  if (dmx_lvl_present) {
  ------------------
  |  Branch (717:7): [True: 33, False: 0]
  ------------------
  718|     33|    ixheaacd_read_bits_buf(&local_bs, 8);
  719|     33|    bit_count += 8;
  720|     33|  }
  721|       |
  722|     33|  if (compression_present) {
  ------------------
  |  Branch (722:7): [True: 23, False: 10]
  ------------------
  723|     23|    UWORD8 compression_on, compression_val;
  724|       |
  725|     23|    if (ixheaacd_read_bits_buf(&local_bs, 7) != 0) return 0;
  ------------------
  |  Branch (725:9): [True: 3, False: 20]
  ------------------
  726|       |
  727|     20|    compression_on = (UWORD8)ixheaacd_read_bits_buf(&local_bs, 1);
  728|     20|    compression_val = (UWORD8)ixheaacd_read_bits_buf(&local_bs, 8);
  729|     20|    bit_count += 16;
  730|       |
  731|     20|    if (compression_on) {
  ------------------
  |  Branch (731:9): [True: 7, False: 13]
  ------------------
  732|      7|      pstr_drc_dec->str_drc_bs_data[0].drc_num_bands = 1;
  733|      7|      pstr_drc_dec->str_drc_bs_data[0].dyn_rng_dlbl_dvb[0] = compression_val;
  734|      7|      pstr_drc_dec->str_drc_bs_data[0].drc_band_top[0] = (1024 >> 2) - 1;
  735|      7|      pstr_drc_dec->drc_ref_level = -1;
  736|      7|      pstr_drc_dec->str_drc_bs_data[0].drc_data_type = DVB_DRC_ANC_DATA;
  737|     13|    } else {
  738|     13|      pstr_drc_dec->str_drc_bs_data[0].drc_num_bands = 1;
  739|     13|      pstr_drc_dec->str_drc_bs_data[0].dyn_rng_dlbl_dvb[0] = (WORD8)0x80;
  740|     13|      pstr_drc_dec->str_drc_bs_data[0].drc_band_top[0] = (1024 >> 2) - 1;
  741|     13|      pstr_drc_dec->str_drc_bs_data[0].drc_data_type = DVB_DRC_ANC_DATA;
  742|       |
  743|     13|      if (compression_val != 0) return 0;
  ------------------
  |  Branch (743:11): [True: 5, False: 8]
  ------------------
  744|     13|    }
  745|     20|  }
  746|       |
  747|     25|  if (coarse_gain_present) {
  ------------------
  |  Branch (747:7): [True: 10, False: 15]
  ------------------
  748|     10|    ixheaacd_read_bits_buf(&local_bs, 16);
  749|     10|    bit_count += 16;
  750|     10|  }
  751|     25|  if (fine_grain_present) {
  ------------------
  |  Branch (751:7): [True: 10, False: 15]
  ------------------
  752|     10|    ixheaacd_read_bits_buf(&local_bs, 16);
  753|     10|    bit_count += 16;
  754|     10|  }
  755|       |
  756|     25|  if (ext_present) {
  ------------------
  |  Branch (756:7): [True: 10, False: 15]
  ------------------
  757|     10|    WORD32 ext_bits = 8;
  758|       |
  759|     10|    ixheaacd_read_bits_buf(&local_bs, 1);
  760|     10|    if (ixheaacd_read_bits_buf(&local_bs, 1)) ext_bits += 8;
  ------------------
  |  Branch (760:9): [True: 7, False: 3]
  ------------------
  761|     10|    if (ixheaacd_read_bits_buf(&local_bs, 1)) ext_bits += 16;
  ------------------
  |  Branch (761:9): [True: 2, False: 8]
  ------------------
  762|     10|    if (ixheaacd_read_bits_buf(&local_bs, 1)) ext_bits += 8;
  ------------------
  |  Branch (762:9): [True: 6, False: 4]
  ------------------
  763|       |
  764|     10|    ixheaacd_read_bits_buf(&local_bs, ext_bits - 4);
  765|     10|    bit_count += ext_bits;
  766|     10|  }
  767|       |
  768|     25|  return (bit_count);
  769|     33|}
ixheaacd_drc_freq_dec.c:ixheaacd_mult32x16in32_shift29:
   92|   469k|                                                             WORD32 b) {
   93|   469k|  WORD32 result;
   94|   469k|  WORD64 temp_result;
   95|       |
   96|   469k|  temp_result = (WORD64)a * (WORD64)b;
   97|       |
   98|   469k|  result = (WORD32)(temp_result >> 29);
   99|       |
  100|   469k|  return (result);
  101|   469k|}
ixheaacd_drc_freq_dec.c:ixheaacd_mult32x16in32_shift25:
  104|   176M|                                                             WORD32 b) {
  105|   176M|  WORD32 result;
  106|   176M|  WORD64 temp_result;
  107|       |
  108|   176M|  temp_result = (WORD64)a * (WORD64)b;
  109|       |
  110|   176M|  temp_result = temp_result >> 25;
  111|       |
  112|   176M|  if (temp_result >= MAX_32)
  ------------------
  |  |   60|   176M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (112:7): [True: 596k, False: 176M]
  ------------------
  113|   596k|    result = MAX_32;
  ------------------
  |  |   60|   596k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  114|   176M|  else if (temp_result < MIN_32)
  ------------------
  |  |   61|   176M|#define MIN_32 (WORD32)0x80000000L
  ------------------
  |  Branch (114:12): [True: 518, False: 176M]
  ------------------
  115|    518|    result = MIN_32;
  ------------------
  |  |   61|    518|#define MIN_32 (WORD32)0x80000000L
  ------------------
  116|   176M|  else
  117|   176M|    result = (WORD32)temp_result;
  118|       |
  119|   176M|  return (result);
  120|   176M|}
ixheaacd_drc_freq_dec.c:ixheaacd_div_by_30:
  438|  16.4M|static PLATFORM_INLINE WORD32 ixheaacd_div_by_30(WORD32 op) {
  439|  16.4M|  WORD32 ret;
  440|  16.4M|  WORD64 temp;
  441|       |
  442|  16.4M|  temp = (WORD64)op * 35791394;
  443|       |
  444|  16.4M|  ret = (WORD32)((temp + 17895697) >> 30);
  445|       |
  446|  16.4M|  return ret;
  447|  16.4M|}
ixheaacd_drc_freq_dec.c:ixheaacd_div_by_15:
  449|  7.80M|static PLATFORM_INLINE WORD32 ixheaacd_div_by_15(WORD64 op) {
  450|  7.80M|  WORD32 ret;
  451|  7.80M|  WORD64 temp;
  452|       |
  453|  7.80M|  temp = (WORD64)op * 71582788;
  454|       |
  455|  7.80M|  ret = (WORD32)((temp + 134217728) >> 30);
  456|       |
  457|  7.80M|  return ret;
  458|  7.80M|}
ixheaacd_drc_freq_dec.c:ixheaacd_drc_floor:
  838|  1.13k|static WORD32 ixheaacd_drc_floor(WORD32 bottom, WORD32 frame_size) {
  839|  1.13k|  WORD32 ret_val;
  840|  1.13k|  if (960 == frame_size) {
  ------------------
  |  Branch (840:7): [True: 216, False: 915]
  ------------------
  841|    216|    ret_val = ixheaacd_drc_div_120_floor(bottom);
  842|    216|    ret_val *= 30;
  843|    216|    ret_val = ret_val >> 3;
  844|    915|  } else {
  845|    915|    ret_val = bottom >> 7;
  846|    915|    ret_val = ret_val << 2;
  847|    915|  }
  848|  1.13k|  return ret_val;
  849|  1.13k|}
ixheaacd_drc_freq_dec.c:ixheaacd_drc_div_120_floor:
  827|    648|static WORD32 ixheaacd_drc_div_120_floor(WORD32 value) {
  828|    648|  WORD32 ret_val;
  829|    648|  WORD64 temp;
  830|       |
  831|    648|  temp = (WORD64)value * 8947849;
  832|       |
  833|    648|  ret_val = (WORD32)(temp >> 30);
  834|       |
  835|    648|  return ret_val;
  836|    648|}
ixheaacd_drc_freq_dec.c:ixheaacd_drc_ceil:
  851|  1.13k|static WORD32 ixheaacd_drc_ceil(WORD32 top, WORD32 frame_size) {
  852|  1.13k|  WORD32 ret_val;
  853|  1.13k|  if (960 == frame_size) {
  ------------------
  |  Branch (853:7): [True: 216, False: 915]
  ------------------
  854|    216|    top += 119;
  855|    216|    ret_val = ixheaacd_drc_div_120_floor(top);
  856|    216|    ret_val *= 30;
  857|    216|    ret_val = ret_val >> 3;
  858|    915|  } else {
  859|    915|    top += 127;
  860|    915|    ret_val = top >> 7;
  861|    915|    ret_val = ret_val << 2;
  862|    915|  }
  863|  1.13k|  return ret_val;
  864|  1.13k|}
ixheaacd_drc_freq_dec.c:ixheaacd_drc_get_bottom_qmf:
  866|  1.13k|static WORD32 ixheaacd_drc_get_bottom_qmf(WORD32 bottom, WORD32 frame_size) {
  867|  1.13k|  WORD32 ret_val;
  868|  1.13k|  if (960 == frame_size) {
  ------------------
  |  Branch (868:7): [True: 216, False: 915]
  ------------------
  869|    216|    ret_val = bottom % 120;
  870|    216|    ret_val = ret_val << 5;
  871|    216|    ret_val = ixheaacd_drc_div_120_floor(ret_val);
  872|    915|  } else {
  873|    915|    ret_val = bottom & 0x7F;
  874|    915|    ret_val = ret_val >> 2;
  875|    915|  }
  876|  1.13k|  return ret_val;
  877|  1.13k|};

ixheaacd_noiselimiting:
  234|  66.1k|                            ixheaacd_misc_tables *pstr_common_tables) {
  235|  66.1k|  WORD32 c, k;
  236|  66.1k|  WORD32 temp_val;
  237|  66.1k|  WORD16 limit_gain_mant = *ptr_limit_gain_table++;
  238|  66.1k|  WORD16 limit_gain_exp = *ptr_limit_gain_table;
  239|   278k|  for (c = 0; c < pstr_freq_band_data->num_lf_bands; c++) {
  ------------------
  |  Branch (239:15): [True: 212k, False: 66.1k]
  ------------------
  240|   212k|    WORD16 max_gain_mant;
  241|   212k|    WORD16 sum_orig_mant, sum_orig_exp;
  242|   212k|    WORD16 max_gain_exp;
  243|   212k|    WORD32 max_temp;
  244|   212k|    WORD32 start_band = 0;
  245|   212k|    WORD32 stop_band = 0;
  246|       |
  247|   212k|    if ((pstr_freq_band_data->freq_band_tbl_lim[c] > skip_bands)) {
  ------------------
  |  Branch (247:9): [True: 146k, False: 65.8k]
  ------------------
  248|   146k|      start_band = (pstr_freq_band_data->freq_band_tbl_lim[c] - skip_bands);
  249|   146k|    }
  250|       |
  251|   212k|    if ((pstr_freq_band_data->freq_band_tbl_lim[c + 1] > skip_bands)) {
  ------------------
  |  Branch (251:9): [True: 212k, False: 0]
  ------------------
  252|   212k|      stop_band = (pstr_freq_band_data->freq_band_tbl_lim[c + 1] - skip_bands);
  253|   212k|    }
  254|       |
  255|   212k|    if ((start_band < stop_band)) {
  ------------------
  |  Branch (255:9): [True: 212k, False: 0]
  ------------------
  256|   212k|      ixheaacd_avggain_calc(ptr_enrg_orig, nrg_est, start_band, stop_band,
  257|   212k|                            &sum_orig_mant, &sum_orig_exp, &max_gain_mant,
  258|   212k|                            &max_gain_exp, pstr_common_tables, 0);
  259|       |
  260|   212k|      max_temp = ixheaac_mult16x16in32_shl(max_gain_mant, limit_gain_mant);
  261|   212k|      max_gain_exp = (max_gain_exp + limit_gain_exp);
  262|       |
  263|   212k|      temp_val = ixheaac_norm32(max_temp);
  264|       |
  265|   212k|      max_gain_exp = (WORD16)(max_gain_exp - temp_val);
  266|   212k|      max_gain_mant = (WORD16)((max_temp << temp_val) >> 16);
  267|       |
  268|   212k|      if ((max_gain_exp >= MAX_GAIN_EXP)) {
  ------------------
  |  |   63|   212k|#define MAX_GAIN_EXP 34
  ------------------
  |  Branch (268:11): [True: 65.8k, False: 146k]
  ------------------
  269|  65.8k|        max_gain_mant = 0x3000;
  270|  65.8k|        max_gain_exp = MAX_GAIN_EXP;
  ------------------
  |  |   63|  65.8k|#define MAX_GAIN_EXP 34
  ------------------
  271|  65.8k|      }
  272|       |
  273|   212k|      {
  274|   212k|        WORD16 *ptr_nrg_gain = &nrg_gain[2 * start_band];
  275|   212k|        WORD16 *p_noise_level = &noise_level_mant[2 * start_band];
  276|       |
  277|  1.56M|        for (k = stop_band - start_band; k != 0; k--) {
  ------------------
  |  Branch (277:42): [True: 1.34M, False: 212k]
  ------------------
  278|  1.34M|          WORD16 noise_amp_mant;
  279|  1.34M|          WORD16 noise_amp_exp;
  280|       |
  281|  1.34M|          WORD16 t_gain_mant = *(ptr_nrg_gain);
  282|  1.34M|          WORD16 t_gain_exp = *(ptr_nrg_gain + 1);
  283|       |
  284|  1.34M|          if (((t_gain_exp > max_gain_exp)) ||
  ------------------
  |  Branch (284:15): [True: 176k, False: 1.17M]
  ------------------
  285|  1.17M|              ((t_gain_exp == max_gain_exp) && (t_gain_mant > max_gain_mant))) {
  ------------------
  |  Branch (285:16): [True: 77.9k, False: 1.09M]
  |  Branch (285:48): [True: 41.1k, False: 36.8k]
  ------------------
  286|   217k|            noise_amp_exp =
  287|   217k|                ixheaacd_fix_mant_div(max_gain_mant, t_gain_mant,
  288|   217k|                                      &noise_amp_mant, pstr_common_tables);
  289|   217k|            noise_amp_exp += (max_gain_exp - t_gain_exp) + 1;
  290|       |
  291|   217k|            *p_noise_level = ixheaac_extract16h(ixheaac_shl32_dir_sat_limit(
  292|   217k|                ixheaac_mult16x16in32_shl(*p_noise_level, noise_amp_mant),
  293|   217k|                noise_amp_exp));
  294|       |
  295|   217k|            *ptr_nrg_gain = max_gain_mant;
  296|   217k|            *(ptr_nrg_gain + 1) = max_gain_exp;
  297|   217k|          }
  298|  1.34M|          ptr_nrg_gain += 2;
  299|  1.34M|          p_noise_level += 2;
  300|  1.34M|        }
  301|   212k|      }
  302|       |
  303|   212k|      {
  304|   212k|        WORD16 boost_gain_mant;
  305|   212k|        WORD16 boost_gain_exp;
  306|   212k|        WORD16 accu_m;
  307|   212k|        WORD16 accu_e;
  308|   212k|        WORD32 accu_m_t;
  309|   212k|        WORD32 accu_e_t;
  310|   212k|        WORD16 *ptr_nrg_gain = &nrg_gain[2 * start_band];
  311|   212k|        WORD16 *ptr_enrg_est_buf = &nrg_est[2 * start_band];
  312|   212k|        WORD16 *p_noise_level = &noise_level_mant[2 * start_band];
  313|   212k|        WORD16 *p_nrg_sine = &nrg_sine[2 * start_band];
  314|       |
  315|   212k|        accu_m_t = 0;
  316|   212k|        accu_e_t = 0;
  317|       |
  318|  1.56M|        for (k = stop_band - start_band; k != 0; k--) {
  ------------------
  |  Branch (318:42): [True: 1.34M, False: 212k]
  ------------------
  319|  1.34M|          WORD32 tmp_mant, tmp_e;
  320|       |
  321|  1.34M|          tmp_mant = *ptr_nrg_gain++;
  322|  1.34M|          tmp_e = *ptr_nrg_gain++;
  323|  1.34M|          tmp_mant = (tmp_mant * (*ptr_enrg_est_buf++));
  324|  1.34M|          tmp_e = (tmp_e + (*ptr_enrg_est_buf++));
  325|  1.34M|          tmp_mant = tmp_mant >> 15;
  326|  1.34M|          {
  327|  1.34M|            WORD32 exp_diff;
  328|  1.34M|            exp_diff = tmp_e - accu_e_t;
  329|  1.34M|            if (exp_diff >= 0) {
  ------------------
  |  Branch (329:17): [True: 633k, False: 715k]
  ------------------
  330|   633k|              accu_m_t = tmp_mant + ixheaac_shr32(accu_m_t, exp_diff);
  331|   633k|              accu_e_t = tmp_e;
  332|   715k|            } else {
  333|   715k|              exp_diff = -exp_diff;
  334|   715k|              accu_m_t = ixheaac_shr32(tmp_mant, exp_diff) + accu_m_t;
  335|   715k|            }
  336|  1.34M|          }
  337|       |
  338|  1.34M|          if (p_nrg_sine[0] != 0) {
  ------------------
  |  Branch (338:15): [True: 48.8k, False: 1.30M]
  ------------------
  339|  48.8k|            WORD32 exp_diff = p_nrg_sine[1] - accu_e_t;
  340|  48.8k|            if (exp_diff >= 0) {
  ------------------
  |  Branch (340:17): [True: 19.2k, False: 29.5k]
  ------------------
  341|  19.2k|              accu_m_t = p_nrg_sine[0] + ixheaac_shr32(accu_m_t, exp_diff);
  342|  19.2k|              accu_e_t = p_nrg_sine[1];
  343|  29.5k|            } else {
  344|  29.5k|              exp_diff = -exp_diff;
  345|  29.5k|              accu_m_t = accu_m_t + ixheaac_shr32(p_nrg_sine[0], exp_diff);
  346|  29.5k|            }
  347|       |
  348|  1.30M|          } else {
  349|  1.30M|            if (noise_absc_flag == 0) {
  ------------------
  |  Branch (349:17): [True: 1.19M, False: 108k]
  ------------------
  350|  1.19M|              WORD32 exp_diff = p_noise_level[1] - accu_e_t;
  351|  1.19M|              if (exp_diff >= 0) {
  ------------------
  |  Branch (351:19): [True: 450k, False: 741k]
  ------------------
  352|   450k|                accu_m_t =
  353|   450k|                    p_noise_level[0] + ixheaac_shr32(accu_m_t, exp_diff);
  354|   450k|                accu_e_t = p_noise_level[1];
  355|   741k|              } else {
  356|   741k|                exp_diff = -exp_diff;
  357|   741k|                accu_m_t =
  358|   741k|                    accu_m_t + ixheaac_shr32(p_noise_level[0], exp_diff);
  359|   741k|              }
  360|  1.19M|            }
  361|  1.30M|          }
  362|  1.34M|          p_noise_level += 2;
  363|  1.34M|          p_nrg_sine += 2;
  364|  1.34M|        }
  365|       |
  366|   212k|        {
  367|   212k|          WORD32 norm_val;
  368|   212k|          norm_val = 16 - ixheaac_norm32(accu_m_t);
  369|   212k|          if (norm_val > 0) {
  ------------------
  |  Branch (369:15): [True: 91.3k, False: 120k]
  ------------------
  370|  91.3k|            accu_m_t >>= norm_val;
  371|  91.3k|            accu_e_t += norm_val;
  372|  91.3k|          }
  373|   212k|        }
  374|       |
  375|   212k|        accu_m = (WORD16)accu_m_t;
  376|   212k|        accu_e = (WORD16)accu_e_t;
  377|       |
  378|   212k|        boost_gain_exp = ixheaacd_fix_mant_div(
  379|   212k|            sum_orig_mant, accu_m, &boost_gain_mant, pstr_common_tables);
  380|       |
  381|   212k|        boost_gain_exp += (sum_orig_exp - accu_e) + 1;
  382|       |
  383|   212k|        if ((boost_gain_exp > 2) ||
  ------------------
  |  Branch (383:13): [True: 33.2k, False: 178k]
  ------------------
  384|   178k|            ((boost_gain_exp == 2) && (boost_gain_mant > 0x5061))) {
  ------------------
  |  Branch (384:14): [True: 19.7k, False: 159k]
  |  Branch (384:39): [True: 8.16k, False: 11.5k]
  ------------------
  385|  41.4k|          boost_gain_mant = 0x5061;
  386|  41.4k|          boost_gain_exp = 2;
  387|  41.4k|        }
  388|       |
  389|   212k|        ptr_nrg_gain = &nrg_gain[2 * start_band];
  390|   212k|        p_noise_level = &noise_level_mant[2 * start_band];
  391|   212k|        p_nrg_sine = &nrg_sine[2 * start_band];
  392|       |
  393|  1.56M|        for (k = stop_band - start_band; k != 0; k--) {
  ------------------
  |  Branch (393:42): [True: 1.34M, False: 212k]
  ------------------
  394|  1.34M|          WORD16 temp1, temp2, temp3;
  395|       |
  396|  1.34M|          temp1 = *ptr_nrg_gain;
  397|  1.34M|          temp2 = *p_nrg_sine;
  398|  1.34M|          temp3 = *p_noise_level;
  399|       |
  400|  1.34M|          temp1 = ixheaac_mult16_shl(temp1, boost_gain_mant);
  401|  1.34M|          temp2 = ixheaac_mult16_shl(temp2, boost_gain_mant);
  402|  1.34M|          temp3 = ixheaac_mult16_shl(temp3, boost_gain_mant);
  403|  1.34M|          *ptr_nrg_gain++ = temp1;
  404|  1.34M|          *p_nrg_sine++ = temp2;
  405|  1.34M|          *p_noise_level++ = temp3;
  406|       |
  407|  1.34M|          temp1 = *ptr_nrg_gain;
  408|  1.34M|          temp2 = *p_nrg_sine;
  409|  1.34M|          temp3 = *p_noise_level;
  410|       |
  411|  1.34M|          temp1 = (temp1 + boost_gain_exp);
  412|  1.34M|          temp2 = (temp2 + boost_gain_exp);
  413|  1.34M|          temp3 = (temp3 + boost_gain_exp);
  414|  1.34M|          *ptr_nrg_gain++ = (temp1);
  415|  1.34M|          *p_nrg_sine++ = (temp2);
  416|  1.34M|          *p_noise_level++ = (temp3);
  417|  1.34M|        }
  418|   212k|      }
  419|   212k|    }
  420|   212k|  }
  421|  66.1k|}
ixheaacd_conv_ergtoamplitude_dec:
  453|  66.1k|                                      WORD16 *sqrt_table) {
  454|  66.1k|  WORD32 k;
  455|  1.42M|  for (k = 0; k < bands; k++) {
  ------------------
  |  Branch (455:15): [True: 1.35M, False: 66.1k]
  ------------------
  456|  1.35M|    WORD32 shift;
  457|       |
  458|  1.35M|    ixheaacd_fix_mant_exp_sqrt(&nrg_sine[2 * k], sqrt_table);
  459|  1.35M|    ixheaacd_fix_mant_exp_sqrt(&nrg_gain[2 * k], sqrt_table);
  460|  1.35M|    ixheaacd_fix_mant_exp_sqrt(&noise_level_mant[2 * k], sqrt_table);
  461|       |
  462|  1.35M|    shift = (noise_e - noise_level_mant[2 * k + 1]);
  463|       |
  464|  1.35M|    shift = (shift - 4);
  465|  1.35M|    if (shift > 0) {
  ------------------
  |  Branch (465:9): [True: 1.35M, False: 2.17k]
  ------------------
  466|  1.35M|      if (shift > 31) {
  ------------------
  |  Branch (466:11): [True: 20.5k, False: 1.33M]
  ------------------
  467|  20.5k|        shift = 31;
  468|  20.5k|      }
  469|  1.35M|      noise_level_mant[2 * k] = (noise_level_mant[2 * k] >> shift);
  470|  1.35M|    } else {
  471|  2.17k|      if (shift < -31) {
  ------------------
  |  Branch (471:11): [True: 0, False: 2.17k]
  ------------------
  472|      0|        shift = -31;
  473|      0|      }
  474|  2.17k|      noise_level_mant[2 * k] = (noise_level_mant[2 * k] << -shift);
  475|  2.17k|    }
  476|  1.35M|  }
  477|  66.1k|}
ixheaacd_calc_subband_gains:
  625|  66.1k|                                 ixheaacd_misc_tables *pstr_common_tables) {
  626|  66.1k|  WORD16 *ptr_freq_band_tbl = pstr_freq_band_data->freq_band_table[freq_res];
  627|  66.1k|  WORD32 ui_noise = pstr_freq_band_data->freq_band_tbl_noise[1];
  628|  66.1k|  WORD32 nb_idx = 0;
  629|  66.1k|  WORD16 tmp_noise_mant;
  630|  66.1k|  WORD16 tmp_noise_exp;
  631|  66.1k|  WORD8 *ptr_sine_mapped = sine_mapped_matrix;
  632|  66.1k|  WORD32 sub_band_start = pstr_freq_band_data->sub_band_start;
  633|  66.1k|  WORD32 skip_bands = (ptr_frame_data->max_qmf_subband_aac - sub_band_start);
  634|  66.1k|  WORD8 *ptr_sine_mapped_1 = &sine_mapped_matrix[skip_bands];
  635|  66.1k|  WORD32 k, c = 0, j;
  636|       |
  637|  66.1k|  WORD16 *ptr_env_sf_arr = &ptr_frame_data->int_env_sf_arr[mvalue];
  638|  66.1k|  WORD8 *ptr_alias_red_buf =
  639|  66.1k|      &alias_red_buf[ptr_freq_band_tbl[0] - sub_band_start];
  640|       |
  641|  66.1k|  tmp_noise_mant = (WORD16)(ptr_noise_floor[nb_idx] & MASK_M);
  ------------------
  |  |   27|  66.1k|#define MASK_M (((1 << (SHORT_BITS - EXP_BITS)) - 1) << EXP_BITS)
  |  |  ------------------
  |  |  |  |   23|  66.1k|#define SHORT_BITS 16
  |  |  ------------------
  |  |               #define MASK_M (((1 << (SHORT_BITS - EXP_BITS)) - 1) << EXP_BITS)
  |  |  ------------------
  |  |  |  |   25|  66.1k|#define EXP_BITS 6
  |  |  ------------------
  |  |               #define MASK_M (((1 << (SHORT_BITS - EXP_BITS)) - 1) << EXP_BITS)
  |  |  ------------------
  |  |  |  |   25|  66.1k|#define EXP_BITS 6
  |  |  ------------------
  ------------------
  642|  66.1k|  tmp_noise_exp =
  643|  66.1k|      (WORD16)(ptr_noise_floor[nb_idx] & MASK_FOR_EXP) - NOISE_EXP_OFFSET;
  ------------------
  |  |   28|  66.1k|#define MASK_FOR_EXP ((1 << EXP_BITS) - 1)
  |  |  ------------------
  |  |  |  |   25|  66.1k|#define EXP_BITS 6
  |  |  ------------------
  ------------------
                    (WORD16)(ptr_noise_floor[nb_idx] & MASK_FOR_EXP) - NOISE_EXP_OFFSET;
  ------------------
  |  |   33|  66.1k|#define NOISE_EXP_OFFSET 38
  ------------------
  644|       |
  645|   772k|  for (j = 0; j < num_sf_bands; j++) {
  ------------------
  |  Branch (645:15): [True: 706k, False: 66.1k]
  ------------------
  646|   706k|    WORD8 sine_present_flag;
  647|   706k|    WORD16 tmp_nrg_ref_exp, tmp_nrg_ref_mant;
  648|   706k|    WORD16 li = *ptr_freq_band_tbl++;
  649|   706k|    WORD16 ui = *ptr_freq_band_tbl;
  650|   706k|    WORD16 env_sf_val = *ptr_env_sf_arr++;
  651|       |
  652|   706k|    tmp_nrg_ref_exp =
  653|   706k|        (WORD16)((env_sf_val & (WORD16)MASK_FOR_EXP) - NRG_EXP_OFFSET);
  ------------------
  |  |   28|   706k|#define MASK_FOR_EXP ((1 << EXP_BITS) - 1)
  |  |  ------------------
  |  |  |  |   25|   706k|#define EXP_BITS 6
  |  |  ------------------
  ------------------
                      (WORD16)((env_sf_val & (WORD16)MASK_FOR_EXP) - NRG_EXP_OFFSET);
  ------------------
  |  |   32|   706k|#define NRG_EXP_OFFSET 16
  ------------------
  654|   706k|    tmp_nrg_ref_mant = (WORD16)(env_sf_val & MASK_M);
  ------------------
  |  |   27|   706k|#define MASK_M (((1 << (SHORT_BITS - EXP_BITS)) - 1) << EXP_BITS)
  |  |  ------------------
  |  |  |  |   23|   706k|#define SHORT_BITS 16
  |  |  ------------------
  |  |               #define MASK_M (((1 << (SHORT_BITS - EXP_BITS)) - 1) << EXP_BITS)
  |  |  ------------------
  |  |  |  |   25|   706k|#define EXP_BITS 6
  |  |  ------------------
  |  |               #define MASK_M (((1 << (SHORT_BITS - EXP_BITS)) - 1) << EXP_BITS)
  |  |  ------------------
  |  |  |  |   25|   706k|#define EXP_BITS 6
  |  |  ------------------
  ------------------
  655|       |
  656|   706k|    sine_present_flag = 0;
  657|  2.06M|    for (k = li; k < ui; k++) {
  ------------------
  |  Branch (657:18): [True: 1.35M, False: 706k]
  ------------------
  658|  1.35M|      if ((env >= *ptr_sine_mapped++)) sine_present_flag = 1;
  ------------------
  |  Branch (658:11): [True: 48.9k, False: 1.31M]
  ------------------
  659|  1.35M|    }
  660|  2.06M|    for (k = li; k < ui; k++) {
  ------------------
  |  Branch (660:18): [True: 1.35M, False: 706k]
  ------------------
  661|  1.35M|      *ptr_alias_red_buf++ = !sine_present_flag;
  662|       |
  663|  1.35M|      if ((k >= ui_noise)) {
  ------------------
  |  Branch (663:11): [True: 83.4k, False: 1.27M]
  ------------------
  664|  83.4k|        nb_idx++;
  665|  83.4k|        ui_noise = pstr_freq_band_data->freq_band_tbl_noise[nb_idx + 1];
  666|  83.4k|        tmp_noise_mant = (WORD16)(ptr_noise_floor[nb_idx] & MASK_M);
  ------------------
  |  |   27|  83.4k|#define MASK_M (((1 << (SHORT_BITS - EXP_BITS)) - 1) << EXP_BITS)
  |  |  ------------------
  |  |  |  |   23|  83.4k|#define SHORT_BITS 16
  |  |  ------------------
  |  |               #define MASK_M (((1 << (SHORT_BITS - EXP_BITS)) - 1) << EXP_BITS)
  |  |  ------------------
  |  |  |  |   25|  83.4k|#define EXP_BITS 6
  |  |  ------------------
  |  |               #define MASK_M (((1 << (SHORT_BITS - EXP_BITS)) - 1) << EXP_BITS)
  |  |  ------------------
  |  |  |  |   25|  83.4k|#define EXP_BITS 6
  |  |  ------------------
  ------------------
  667|  83.4k|        tmp_noise_exp =
  668|  83.4k|            (WORD16)(ptr_noise_floor[nb_idx] & MASK_FOR_EXP) - NOISE_EXP_OFFSET;
  ------------------
  |  |   28|  83.4k|#define MASK_FOR_EXP ((1 << EXP_BITS) - 1)
  |  |  ------------------
  |  |  |  |   25|  83.4k|#define EXP_BITS 6
  |  |  ------------------
  ------------------
                          (WORD16)(ptr_noise_floor[nb_idx] & MASK_FOR_EXP) - NOISE_EXP_OFFSET;
  ------------------
  |  |   33|  83.4k|#define NOISE_EXP_OFFSET 38
  ------------------
  669|  83.4k|      }
  670|       |
  671|  1.35M|      if ((k >= ptr_frame_data->max_qmf_subband_aac)) {
  ------------------
  |  Branch (671:11): [True: 1.35M, False: 0]
  ------------------
  672|  1.35M|        ptr_enrg_orig[2 * c] = tmp_nrg_ref_mant;
  673|  1.35M|        ptr_enrg_orig[2 * c + 1] = tmp_nrg_ref_exp;
  674|  1.35M|        nrg_sine[2 * c] = 0;
  675|  1.35M|        nrg_sine[2 * c + 1] = 0;
  676|       |
  677|  1.35M|        ixheaacd_subbandgain_calc(
  678|  1.35M|            tmp_nrg_ref_mant, tmp_noise_mant, nrg_est[2 * c],
  679|  1.35M|            nrg_est[2 * c + 1], tmp_noise_exp, tmp_nrg_ref_exp,
  680|  1.35M|            sine_present_flag,
  681|  1.35M|            (env >= ptr_sine_mapped_1[c]) ? (FLAG)1 : (FLAG)0, noise_absc_flag,
  ------------------
  |  Branch (681:13): [True: 48.9k, False: 1.31M]
  ------------------
  682|  1.35M|            &nrg_gain[2 * c], &noise_level_mant[2 * c], &nrg_sine[2 * c],
  683|  1.35M|            pstr_common_tables);
  684|  1.35M|        c++;
  685|  1.35M|      }
  686|  1.35M|    }
  687|   706k|  }
  688|  66.1k|}
ixheaacd_calc_sbrenvelope:
  702|  46.3k|    WORD32 audio_object_type) {
  703|  46.3k|  WORD32 i, j, m;
  704|  46.3k|  WORD32 noise_floor_idx;
  705|  46.3k|  WORD32 start_pos, end_pos;
  706|  46.3k|  WORD32 freq_res;
  707|  46.3k|  WORD32 num_env = ptr_frame_data->str_frame_info_details.num_env;
  708|  46.3k|  WORD16 *ptr_border_vec = ptr_frame_data->str_frame_info_details.border_vec;
  709|  46.3k|  IA_ERRORCODE err_code = IA_NO_ERROR;
  ------------------
  |  |   23|  46.3k|#define IA_NO_ERROR 0x00000000
  ------------------
  710|  46.3k|  WORD16 *ptr_noise_floor;
  711|  46.3k|  ia_freq_band_data_struct *pstr_freq_band_data =
  712|  46.3k|      ptr_header_data->pstr_freq_band_data;
  713|       |
  714|  46.3k|  FLAG noise_absc_flag;
  715|  46.3k|  WORD32 smooth_length;
  716|       |
  717|  46.3k|  const WORD16 *num_sf_bands = pstr_freq_band_data->num_sf_bands;
  718|  46.3k|  const WORD32 num_nf_bands = pstr_freq_band_data->num_nf_bands;
  719|       |
  720|  46.3k|  WORD32 sub_band_start = pstr_freq_band_data->sub_band_start;
  721|  46.3k|  WORD32 sub_band_end = pstr_freq_band_data->sub_band_end;
  722|       |
  723|  46.3k|  WORD16 num_timeslots = ptr_header_data->num_time_slots;
  724|  46.3k|  WORD16 max_cols = ptr_header_data->num_time_slots * 2;
  725|       |
  726|  46.3k|  WORD32 num_sub_bands;
  727|  46.3k|  WORD32 skip_bands;
  728|  46.3k|  WORD32 bands;
  729|       |
  730|  46.3k|  WORD num_cols;
  731|  46.3k|  WORD32 first_start;
  732|       |
  733|  46.3k|  WORD16 *ptr_sbr_lim_gain;
  734|  46.3k|  WORD32 max_sfb_nrg_exp;
  735|       |
  736|  46.3k|  WORD16 *ptr_enrg_orig;
  737|       |
  738|  46.3k|  WORD32 input_e;
  739|  46.3k|  WORD32 ov_adj_e;
  740|  46.3k|  WORD32 adj_e;
  741|  46.3k|  WORD32 output_e;
  742|  46.3k|  WORD32 final_e;
  743|  46.3k|  WORD16 noise_e;
  744|  46.3k|  WORD16 lb_scale;
  745|       |
  746|  46.3k|  WORD16 nrg_est[2 * MAX_FREQ_COEFFS];
  747|       |
  748|  46.3k|  WORD16 nrg_gain[2 * MAX_FREQ_COEFFS];
  749|  46.3k|  WORD16 noise_level_mant[2 * MAX_FREQ_COEFFS];
  750|  46.3k|  WORD16 nrg_sine[2 * MAX_FREQ_COEFFS];
  751|       |
  752|  46.3k|  WORD8 sine_mapped_matrix[MAX_FREQ_COEFFS];
  753|  46.3k|  WORD8 alias_red_buf[64];
  754|       |
  755|  46.3k|  ptr_noise_floor = ptr_frame_data->int_noise_floor;
  756|       |
  757|  46.3k|  ptr_enrg_orig =
  758|  46.3k|      (WORD16 *)((WORD8 *)ptr_frame_data +
  759|  46.3k|                 ALIGN_SIZE64(sizeof(ia_sbr_frame_info_data_struct)));
  ------------------
  |  |  690|  46.3k|#define ALIGN_SIZE64(x) ((((x) + 7) >> 3) << 3)
  ------------------
  760|       |
  761|  46.3k|  num_env = ptr_frame_data->str_frame_info_details.num_env;
  762|  46.3k|  ptr_border_vec = ptr_frame_data->str_frame_info_details.border_vec;
  763|  46.3k|  num_sub_bands = (sub_band_end - sub_band_start);
  764|  46.3k|  skip_bands = (ptr_frame_data->max_qmf_subband_aac - sub_band_start);
  765|       |
  766|  46.3k|  ixheaacd_map_sineflags(
  767|  46.3k|      pstr_freq_band_data->freq_band_table[HIGH],
  ------------------
  |  |   28|  46.3k|#define HIGH 1
  ------------------
  768|  46.3k|      pstr_freq_band_data->num_sf_bands[HIGH], ptr_frame_data->add_harmonics,
  ------------------
  |  |   28|  46.3k|#define HIGH 1
  ------------------
  769|  46.3k|      ptr_sbr_calc_env->harm_flags_prev,
  770|  46.3k|      ptr_frame_data->str_frame_info_details.transient_env, sine_mapped_matrix);
  771|       |
  772|  46.3k|  adj_e = 0;
  773|  46.3k|  {
  774|  46.3k|    WORD16 max_noise;
  775|  46.3k|    WORD32 first_band;
  776|       |
  777|  46.3k|    if (ptr_frame_data_prev->max_qmf_subband_aac >
  ------------------
  |  Branch (777:9): [True: 3.70k, False: 42.6k]
  ------------------
  778|  46.3k|        ptr_frame_data->max_qmf_subband_aac)
  779|  3.70k|      first_band = (ptr_frame_data_prev->max_qmf_subband_aac - sub_band_start);
  780|  42.6k|    else
  781|  42.6k|      first_band = (ptr_frame_data->max_qmf_subband_aac - sub_band_start);
  782|       |
  783|  46.3k|    max_noise = 0;
  784|   990k|    for (i = first_band; i < num_sub_bands; i++) {
  ------------------
  |  Branch (784:26): [True: 944k, False: 46.3k]
  ------------------
  785|   944k|      if (ptr_sbr_calc_env->filt_buf_noise_m[i] > max_noise) {
  ------------------
  |  Branch (785:11): [True: 69.3k, False: 874k]
  ------------------
  786|  69.3k|        max_noise = ptr_sbr_calc_env->filt_buf_noise_m[i];
  787|  69.3k|      }
  788|   944k|    }
  789|  46.3k|    adj_e = ((ptr_sbr_calc_env->filt_buf_noise_e - ixheaac_norm32(max_noise)) -
  790|  46.3k|             16);
  791|  46.3k|  }
  792|       |
  793|  46.3k|  final_e = 0;
  794|  46.3k|  {
  795|  46.3k|    WORD16 *ptr_env_sf_buf = ptr_frame_data->int_env_sf_arr;
  796|   112k|    for (i = 0; i < num_env; i++) {
  ------------------
  |  Branch (796:17): [True: 66.1k, False: 46.3k]
  ------------------
  797|  66.1k|      WORD32 temp_val;
  798|       |
  799|  66.1k|      max_sfb_nrg_exp = NRG_EXP_OFFSET - SHORT_BITS;
  ------------------
  |  |   32|  66.1k|#define NRG_EXP_OFFSET 16
  ------------------
                    max_sfb_nrg_exp = NRG_EXP_OFFSET - SHORT_BITS;
  ------------------
  |  |   23|  66.1k|#define SHORT_BITS 16
  ------------------
  800|       |
  801|  66.1k|      freq_res = ptr_frame_data->str_frame_info_details.freq_res[i];
  802|       |
  803|   772k|      for (j = 0; j < num_sf_bands[freq_res]; j++) {
  ------------------
  |  Branch (803:19): [True: 706k, False: 66.1k]
  ------------------
  804|   706k|        temp_val = ((*ptr_env_sf_buf++ & MASK_FOR_EXP));
  ------------------
  |  |   28|   706k|#define MASK_FOR_EXP ((1 << EXP_BITS) - 1)
  |  |  ------------------
  |  |  |  |   25|   706k|#define EXP_BITS 6
  |  |  ------------------
  ------------------
  805|       |
  806|   706k|        if ((temp_val > max_sfb_nrg_exp)) {
  ------------------
  |  Branch (806:13): [True: 100k, False: 605k]
  ------------------
  807|   100k|          max_sfb_nrg_exp = temp_val;
  808|   100k|        }
  809|   706k|      }
  810|       |
  811|  66.1k|      max_sfb_nrg_exp = (max_sfb_nrg_exp - NRG_EXP_OFFSET);
  ------------------
  |  |   32|  66.1k|#define NRG_EXP_OFFSET 16
  ------------------
  812|       |
  813|  66.1k|      temp_val = ((max_sfb_nrg_exp + 13) >> 1);
  814|       |
  815|  66.1k|      if (num_timeslots != 15) {
  ------------------
  |  Branch (815:11): [True: 43.0k, False: 23.0k]
  ------------------
  816|  43.0k|        if ((ptr_border_vec[i] < SBR_TIME_SLOTS)) {
  ------------------
  |  |   84|  43.0k|#define SBR_TIME_SLOTS (MAX_COLS / SBR_TIME_STEP)
  |  |  ------------------
  |  |  |  |   69|  43.0k|#define MAX_COLS (MAX_FRAME_SIZE / NO_ANALYSIS_CHANNELS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  43.0k|#define MAX_FRAME_SIZE 1024
  |  |  |  |  ------------------
  |  |  |  |               #define MAX_COLS (MAX_FRAME_SIZE / NO_ANALYSIS_CHANNELS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   35|  43.0k|#define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|  43.0k|#define NO_SYNTHESIS_CHANNELS 64
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   23|  43.0k|#define SBR_UPSAMPLE_FAC 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SBR_TIME_SLOTS (MAX_COLS / SBR_TIME_STEP)
  |  |  ------------------
  |  |  |  |   59|  43.0k|#define SBR_TIME_STEP 2
  |  |  ------------------
  ------------------
  |  Branch (816:13): [True: 43.0k, False: 0]
  ------------------
  817|  43.0k|          if ((temp_val > adj_e)) {
  ------------------
  |  Branch (817:15): [True: 33.2k, False: 9.82k]
  ------------------
  818|  33.2k|            adj_e = (WORD16)temp_val;
  819|  33.2k|          }
  820|  43.0k|        }
  821|       |
  822|  43.0k|        if ((ptr_border_vec[i + 1] > SBR_TIME_SLOTS)) {
  ------------------
  |  |   84|  43.0k|#define SBR_TIME_SLOTS (MAX_COLS / SBR_TIME_STEP)
  |  |  ------------------
  |  |  |  |   69|  43.0k|#define MAX_COLS (MAX_FRAME_SIZE / NO_ANALYSIS_CHANNELS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  43.0k|#define MAX_FRAME_SIZE 1024
  |  |  |  |  ------------------
  |  |  |  |               #define MAX_COLS (MAX_FRAME_SIZE / NO_ANALYSIS_CHANNELS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   35|  43.0k|#define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|  43.0k|#define NO_SYNTHESIS_CHANNELS 64
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   23|  43.0k|#define SBR_UPSAMPLE_FAC 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SBR_TIME_SLOTS (MAX_COLS / SBR_TIME_STEP)
  |  |  ------------------
  |  |  |  |   59|  43.0k|#define SBR_TIME_STEP 2
  |  |  ------------------
  ------------------
  |  Branch (822:13): [True: 0, False: 43.0k]
  ------------------
  823|      0|          if ((temp_val > final_e)) {
  ------------------
  |  Branch (823:15): [True: 0, False: 0]
  ------------------
  824|      0|            final_e = (WORD16)temp_val;
  825|      0|          }
  826|      0|        }
  827|  43.0k|      } else {
  828|  23.0k|        if ((ptr_border_vec[i] < num_timeslots)) {
  ------------------
  |  Branch (828:13): [True: 23.0k, False: 0]
  ------------------
  829|  23.0k|          if ((temp_val > adj_e)) {
  ------------------
  |  Branch (829:15): [True: 19.5k, False: 3.54k]
  ------------------
  830|  19.5k|            adj_e = (WORD16)temp_val;
  831|  19.5k|          }
  832|  23.0k|        }
  833|       |
  834|  23.0k|        if ((ptr_border_vec[i + 1] > num_timeslots)) {
  ------------------
  |  Branch (834:13): [True: 0, False: 23.0k]
  ------------------
  835|      0|          if ((temp_val > final_e)) {
  ------------------
  |  Branch (835:15): [True: 0, False: 0]
  ------------------
  836|      0|            final_e = (WORD16)temp_val;
  837|      0|          }
  838|      0|        }
  839|  23.0k|      }
  840|  66.1k|    }
  841|  46.3k|  }
  842|       |
  843|  46.3k|  m = 0;
  844|  46.3k|  noise_floor_idx = 0;
  845|       |
  846|   112k|  for (i = 0; i < num_env; i++) {
  ------------------
  |  Branch (846:15): [True: 66.1k, False: 46.3k]
  ------------------
  847|  66.1k|    if (audio_object_type == AOT_ER_AAC_ELD ||
  ------------------
  |  Branch (847:9): [True: 66.1k, False: 0]
  ------------------
  848|  66.1k|        audio_object_type == AOT_ER_AAC_LD) {
  ------------------
  |  Branch (848:9): [True: 0, False: 0]
  ------------------
  849|  66.1k|      start_pos = ptr_border_vec[i];
  850|  66.1k|      end_pos = ptr_border_vec[i + 1];
  851|  66.1k|    } else {
  852|      0|      start_pos = SBR_TIME_STEP * ptr_border_vec[i];
  ------------------
  |  |   59|      0|#define SBR_TIME_STEP 2
  ------------------
  853|      0|      end_pos = SBR_TIME_STEP * ptr_border_vec[i + 1];
  ------------------
  |  |   59|      0|#define SBR_TIME_STEP 2
  ------------------
  854|      0|    }
  855|  66.1k|    if ((start_pos >= MAX_ENV_COLS) || (end_pos > MAX_ENV_COLS))
  ------------------
  |  |   71|  66.1k|#define MAX_ENV_COLS (MAX_COLS + MAX_OV_COLS)
  |  |  ------------------
  |  |  |  |   69|  66.1k|#define MAX_COLS (MAX_FRAME_SIZE / NO_ANALYSIS_CHANNELS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  66.1k|#define MAX_FRAME_SIZE 1024
  |  |  |  |  ------------------
  |  |  |  |               #define MAX_COLS (MAX_FRAME_SIZE / NO_ANALYSIS_CHANNELS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   35|  66.1k|#define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|  66.1k|#define NO_SYNTHESIS_CHANNELS 64
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   23|  66.1k|#define SBR_UPSAMPLE_FAC 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define MAX_ENV_COLS (MAX_COLS + MAX_OV_COLS)
  |  |  ------------------
  |  |  |  |   70|  66.1k|#define MAX_OV_COLS 6
  |  |  ------------------
  ------------------
                  if ((start_pos >= MAX_ENV_COLS) || (end_pos > MAX_ENV_COLS))
  ------------------
  |  |   71|  66.1k|#define MAX_ENV_COLS (MAX_COLS + MAX_OV_COLS)
  |  |  ------------------
  |  |  |  |   69|  66.1k|#define MAX_COLS (MAX_FRAME_SIZE / NO_ANALYSIS_CHANNELS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  66.1k|#define MAX_FRAME_SIZE 1024
  |  |  |  |  ------------------
  |  |  |  |               #define MAX_COLS (MAX_FRAME_SIZE / NO_ANALYSIS_CHANNELS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   35|  66.1k|#define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|  66.1k|#define NO_SYNTHESIS_CHANNELS 64
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   23|  66.1k|#define SBR_UPSAMPLE_FAC 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define MAX_ENV_COLS (MAX_COLS + MAX_OV_COLS)
  |  |  ------------------
  |  |  |  |   70|  66.1k|#define MAX_OV_COLS 6
  |  |  ------------------
  ------------------
  |  Branch (855:9): [True: 0, False: 66.1k]
  |  Branch (855:40): [True: 0, False: 66.1k]
  ------------------
  856|      0|      return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
  857|  66.1k|    freq_res = ptr_frame_data->str_frame_info_details.freq_res[i];
  858|       |
  859|  66.1k|    if (noise_floor_idx >= MAX_NOISE_ENVELOPES) return IA_FATAL_ERROR;
  ------------------
  |  |   44|  66.1k|#define MAX_NOISE_ENVELOPES 2
  ------------------
                  if (noise_floor_idx >= MAX_NOISE_ENVELOPES) return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
  |  Branch (859:9): [True: 0, False: 66.1k]
  ------------------
  860|       |
  861|  66.1k|    if (ptr_border_vec[i] ==
  ------------------
  |  Branch (861:9): [True: 8.78k, False: 57.3k]
  ------------------
  862|  66.1k|        ptr_frame_data->str_frame_info_details
  863|  66.1k|            .noise_border_vec[noise_floor_idx + 1]) {
  864|  8.78k|      ptr_noise_floor += num_nf_bands;
  865|  8.78k|      noise_floor_idx++;
  866|  8.78k|    }
  867|       |
  868|  66.1k|    if ((i == ptr_frame_data->str_frame_info_details.transient_env) ||
  ------------------
  |  Branch (868:9): [True: 6.15k, False: 59.9k]
  ------------------
  869|  59.9k|        (i == ptr_sbr_calc_env->tansient_env_prev)) {
  ------------------
  |  Branch (869:9): [True: 0, False: 59.9k]
  ------------------
  870|  6.15k|      noise_absc_flag = 1;
  871|  6.15k|      smooth_length = 0;
  872|  59.9k|    } else {
  873|  59.9k|      noise_absc_flag = 0;
  874|  59.9k|      smooth_length = ((1 - ptr_header_data->smoothing_mode) << 2);
  875|  59.9k|    }
  876|       |
  877|  66.1k|    input_e = 15 - ptr_sbr_scale_fac->hb_scale;
  878|       |
  879|  66.1k|    if (ptr_header_data->interpol_freq) {
  ------------------
  |  Branch (879:9): [True: 38.9k, False: 27.2k]
  ------------------
  880|  38.9k|      (*ixheaacd_enery_calc_per_subband)(
  881|  38.9k|          start_pos, end_pos, ptr_frame_data->max_qmf_subband_aac, sub_band_end,
  882|  38.9k|          input_e, nrg_est, low_pow_flag, ptr_sbr_tables, ptr_qmf_matrix);
  883|  38.9k|    } else {
  884|  27.2k|      ixheaacd_enery_calc_persfb(
  885|  27.2k|          anal_buf_real_mant, anal_buf_imag_mant, num_sf_bands[freq_res],
  886|  27.2k|          pstr_freq_band_data->freq_band_table[freq_res], start_pos, end_pos,
  887|  27.2k|          ptr_frame_data->max_qmf_subband_aac, input_e, nrg_est, low_pow_flag,
  888|  27.2k|          ptr_sbr_tables);
  889|  27.2k|    }
  890|       |
  891|  66.1k|    if (pstr_freq_band_data->freq_band_table[freq_res][0] < pstr_freq_band_data->sub_band_start) {
  ------------------
  |  Branch (891:9): [True: 0, False: 66.1k]
  ------------------
  892|      0|      pstr_freq_band_data->sub_band_start = pstr_freq_band_data->freq_band_table[freq_res][0];
  893|      0|      return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
  894|      0|    }
  895|       |
  896|  66.1k|    ixheaacd_calc_subband_gains(
  897|  66.1k|        pstr_freq_band_data, ptr_frame_data, freq_res, ptr_noise_floor,
  898|  66.1k|        num_sf_bands[freq_res], m, i, sine_mapped_matrix, alias_red_buf,
  899|  66.1k|        ptr_enrg_orig, nrg_sine, nrg_est, nrg_gain, noise_level_mant,
  900|  66.1k|        noise_absc_flag, pstr_common_tables);
  901|       |
  902|  66.1k|    m += num_sf_bands[freq_res];
  903|       |
  904|  66.1k|    ptr_sbr_lim_gain =
  905|  66.1k|        &ptr_sbr_tables->env_calc_tables_ptr
  906|  66.1k|             ->sbr_lim_gains_m[2 * ptr_header_data->limiter_gains];
  907|  66.1k|    ixheaacd_noiselimiting(pstr_freq_band_data, skip_bands, ptr_enrg_orig,
  908|  66.1k|                           nrg_est, nrg_gain, noise_level_mant, nrg_sine,
  909|  66.1k|                           ptr_sbr_lim_gain, noise_absc_flag,
  910|  66.1k|                           pstr_common_tables);
  911|       |
  912|  66.1k|    if (low_pow_flag) {
  ------------------
  |  Branch (912:9): [True: 0, False: 66.1k]
  ------------------
  913|      0|      ixheaacd_alias_reduction(deg_patched + sub_band_start, nrg_gain, nrg_est,
  914|      0|                               alias_red_buf, num_sub_bands,
  915|      0|                               pstr_common_tables);
  916|      0|    }
  917|       |
  918|  66.1k|    if (max_cols != 30) {
  ------------------
  |  Branch (918:9): [True: 43.0k, False: 23.0k]
  ------------------
  919|  43.0k|      if ((start_pos < MAX_COLS)) {
  ------------------
  |  |   69|  43.0k|#define MAX_COLS (MAX_FRAME_SIZE / NO_ANALYSIS_CHANNELS)
  |  |  ------------------
  |  |  |  |   30|  43.0k|#define MAX_FRAME_SIZE 1024
  |  |  ------------------
  |  |               #define MAX_COLS (MAX_FRAME_SIZE / NO_ANALYSIS_CHANNELS)
  |  |  ------------------
  |  |  |  |   35|  43.0k|#define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  43.0k|#define NO_SYNTHESIS_CHANNELS 64
  |  |  |  |  ------------------
  |  |  |  |               #define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|  43.0k|#define SBR_UPSAMPLE_FAC 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (919:11): [True: 43.0k, False: 0]
  ------------------
  920|  43.0k|        noise_e = adj_e;
  921|  43.0k|      } else {
  922|      0|        noise_e = final_e;
  923|      0|      }
  924|  43.0k|    } else {
  925|  23.0k|      if ((start_pos < max_cols)) {
  ------------------
  |  Branch (925:11): [True: 23.0k, False: 0]
  ------------------
  926|  23.0k|        noise_e = adj_e;
  927|  23.0k|      } else {
  928|      0|        noise_e = final_e;
  929|      0|      }
  930|  23.0k|    }
  931|       |
  932|  66.1k|    bands = num_sub_bands - skip_bands;
  933|       |
  934|  66.1k|    if (low_pow_flag) {
  ------------------
  |  Branch (934:9): [True: 0, False: 66.1k]
  ------------------
  935|      0|      (*ixheaacd_conv_ergtoamplitudelp)(
  936|      0|          bands, noise_e, nrg_sine, nrg_gain, noise_level_mant,
  937|      0|          (WORD16 *)pstr_common_tables->sqrt_table);
  938|      0|    } else
  939|       |
  940|  66.1k|    {
  941|  66.1k|      (*ixheaacd_conv_ergtoamplitude)(bands, noise_e, nrg_sine, nrg_gain,
  942|  66.1k|                                      noise_level_mant,
  943|  66.1k|                                      (WORD16 *)pstr_common_tables->sqrt_table);
  944|  66.1k|    }
  945|       |
  946|  66.1k|    lb_scale = ixheaac_sub16(15, ptr_sbr_scale_fac->lb_scale);
  947|       |
  948|  66.1k|    ixheaacd_adapt_noise_gain_calc(
  949|  66.1k|        ptr_sbr_calc_env, noise_e, num_sub_bands, skip_bands, nrg_gain,
  950|  66.1k|        noise_level_mant, nrg_sine, start_pos, end_pos, input_e, adj_e, final_e,
  951|  66.1k|        ptr_frame_data->max_qmf_subband_aac, lb_scale, noise_absc_flag,
  952|  66.1k|        smooth_length, anal_buf_real_mant, anal_buf_imag_mant, low_pow_flag,
  953|  66.1k|        ptr_sbr_tables, max_cols);
  954|  66.1k|  }
  955|       |
  956|  46.3k|  first_start = ptr_border_vec[0] * SBR_TIME_STEP;
  ------------------
  |  |   59|  46.3k|#define SBR_TIME_STEP 2
  ------------------
  957|  46.3k|  {
  958|  46.3k|    WORD32 ov_reserve, reserve;
  959|       |
  960|  46.3k|    ov_reserve = reserve = 0;
  961|       |
  962|  46.3k|    if (audio_object_type != AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (962:9): [True: 0, False: 46.3k]
  ------------------
  963|      0|      if (ptr_header_data->channel_mode == PS_STEREO) {
  ------------------
  |  |   29|      0|#define PS_STEREO 3
  ------------------
  |  Branch (963:11): [True: 0, False: 0]
  ------------------
  964|      0|        ov_reserve = (*ixheaacd_ixheaacd_expsubbandsamples)(
  965|      0|            anal_buf_real_mant, anal_buf_imag_mant,
  966|      0|            ptr_frame_data->max_qmf_subband_aac, sub_band_end, 0, first_start,
  967|      0|            low_pow_flag);
  968|       |
  969|      0|        if (max_cols != 30) {
  ------------------
  |  Branch (969:13): [True: 0, False: 0]
  ------------------
  970|      0|          reserve = (*ixheaacd_ixheaacd_expsubbandsamples)(
  971|      0|            anal_buf_real_mant, anal_buf_imag_mant,
  972|      0|            ptr_frame_data->max_qmf_subband_aac, sub_band_end, first_start,
  973|      0|            MAX_COLS, low_pow_flag);
  ------------------
  |  |   69|      0|#define MAX_COLS (MAX_FRAME_SIZE / NO_ANALYSIS_CHANNELS)
  |  |  ------------------
  |  |  |  |   30|      0|#define MAX_FRAME_SIZE 1024
  |  |  ------------------
  |  |               #define MAX_COLS (MAX_FRAME_SIZE / NO_ANALYSIS_CHANNELS)
  |  |  ------------------
  |  |  |  |   35|      0|#define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  |  |  ------------------
  |  |  |  |  |  |   34|      0|#define NO_SYNTHESIS_CHANNELS 64
  |  |  |  |  ------------------
  |  |  |  |               #define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|      0|#define SBR_UPSAMPLE_FAC 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  974|      0|        } else {
  975|      0|          reserve = (*ixheaacd_ixheaacd_expsubbandsamples)(
  976|      0|            anal_buf_real_mant, anal_buf_imag_mant,
  977|      0|            ptr_frame_data->max_qmf_subband_aac, sub_band_end, first_start,
  978|      0|            max_cols, low_pow_flag);
  979|      0|        }
  980|      0|      }
  981|      0|    }
  982|       |
  983|  46.3k|    output_e = 0;
  984|       |
  985|  46.3k|    ov_adj_e = 15 - ptr_sbr_scale_fac->ov_hb_scale;
  986|       |
  987|  46.3k|    if (((ov_adj_e - ov_reserve) > (adj_e - reserve)))
  ------------------
  |  Branch (987:9): [True: 135, False: 46.2k]
  ------------------
  988|    135|      output_e = (ov_adj_e - ov_reserve);
  989|  46.2k|    else
  990|  46.2k|      output_e = (adj_e - reserve);
  991|       |
  992|  46.3k|    (*ixheaacd_adjust_scale)(anal_buf_real_mant, anal_buf_imag_mant,
  993|  46.3k|                             ptr_frame_data->max_qmf_subband_aac, sub_band_end,
  994|  46.3k|                             0, first_start, (ov_adj_e - output_e),
  995|  46.3k|                             low_pow_flag);
  996|       |
  997|  46.3k|    num_cols = (ptr_header_data->num_time_slots * ptr_header_data->time_step);
  998|       |
  999|  46.3k|    (*ixheaacd_adjust_scale)(anal_buf_real_mant, anal_buf_imag_mant,
 1000|  46.3k|                             ptr_frame_data->max_qmf_subband_aac, sub_band_end,
 1001|  46.3k|                             first_start, num_cols, (adj_e - output_e),
 1002|  46.3k|                             low_pow_flag);
 1003|  46.3k|  }
 1004|       |
 1005|  46.3k|  ptr_sbr_scale_fac->hb_scale = (WORD16)(15 - output_e);
 1006|       |
 1007|  46.3k|  ptr_sbr_scale_fac->ov_hb_scale = (WORD16)(15 - final_e);
 1008|       |
 1009|  46.3k|  if (ptr_frame_data->str_frame_info_details.transient_env == num_env) {
  ------------------
  |  Branch (1009:7): [True: 0, False: 46.3k]
  ------------------
 1010|      0|    ptr_sbr_calc_env->tansient_env_prev = 0;
 1011|  46.3k|  } else {
 1012|  46.3k|    ptr_sbr_calc_env->tansient_env_prev = -1;
 1013|  46.3k|  }
 1014|  46.3k|  return err_code;
 1015|  46.3k|}
ixheaacd_equalize_filt_buff_exp:
 1018|  53.7k|                                     WORD32 subbands) {
 1019|  53.7k|  WORD32 band;
 1020|  53.7k|  WORD32 diff;
 1021|  53.7k|  WORD32 gain_m, gain_e;
 1022|  53.7k|  WORD32 filt_buf_mant, filt_buf_exp;
 1023|       |
 1024|  1.11M|  for (band = subbands - 1; band >= 0; band--) {
  ------------------
  |  Branch (1024:29): [True: 1.06M, False: 53.7k]
  ------------------
 1025|  1.06M|    filt_buf_exp = *(ptr_filt_buf + 1);
 1026|  1.06M|    gain_e = *(nrg_gain + 1);
 1027|  1.06M|    filt_buf_mant = *ptr_filt_buf;
 1028|  1.06M|    gain_m = *nrg_gain;
 1029|  1.06M|    diff = (gain_e - filt_buf_exp);
 1030|       |
 1031|  1.06M|    if (diff >= 0) {
  ------------------
  |  Branch (1031:9): [True: 530k, False: 531k]
  ------------------
 1032|   530k|      *(ptr_filt_buf + 1) = (WORD16)(gain_e);
 1033|       |
 1034|   530k|      *ptr_filt_buf = (WORD16)(*ptr_filt_buf >> diff);
 1035|   531k|    } else {
 1036|   531k|      WORD32 reserve;
 1037|   531k|      reserve = (ixheaac_norm32(filt_buf_mant) - 16);
 1038|       |
 1039|   531k|      if ((diff + reserve) >= 0) {
  ------------------
  |  Branch (1039:11): [True: 173k, False: 357k]
  ------------------
 1040|   173k|        *ptr_filt_buf = (WORD16)(filt_buf_mant << -diff);
 1041|   173k|        *(ptr_filt_buf + 1) = (WORD16)(filt_buf_exp + diff);
 1042|   357k|      } else {
 1043|   357k|        WORD32 shift;
 1044|       |
 1045|   357k|        *ptr_filt_buf = (WORD16)(filt_buf_mant << reserve);
 1046|       |
 1047|   357k|        *(ptr_filt_buf + 1) = (WORD16)(filt_buf_exp - reserve);
 1048|       |
 1049|   357k|        shift = -(reserve + diff);
 1050|       |
 1051|   357k|        *nrg_gain = (WORD16)(gain_m >> shift);
 1052|   357k|        *(nrg_gain + 1) = (WORD16)(*(nrg_gain + 1) + shift);
 1053|   357k|      }
 1054|   531k|    }
 1055|  1.06M|    nrg_gain += 2;
 1056|  1.06M|    ptr_filt_buf += 2;
 1057|  1.06M|  }
 1058|  53.7k|}
ixheaacd_filt_buf_update:
 1064|  66.1k|                                                     WORD32 num_sub_bands) {
 1065|  66.1k|  WORD32 k;
 1066|  66.1k|  WORD32 temp1, temp2;
 1067|       |
 1068|  1.42M|  for (k = num_sub_bands - 1; k >= 0; k--) {
  ------------------
  |  Branch (1068:31): [True: 1.35M, False: 66.1k]
  ------------------
 1069|  1.35M|    temp1 = *nrg_gain;
 1070|  1.35M|    nrg_gain += 2;
 1071|  1.35M|    temp2 = *noise_level_mant;
 1072|  1.35M|    noise_level_mant += 2;
 1073|       |
 1074|  1.35M|    *ptr_filt_buf = temp1;
 1075|  1.35M|    ptr_filt_buf += 2;
 1076|  1.35M|    *ptr_filt_buf_noise++ = temp2;
 1077|  1.35M|  }
 1078|  66.1k|}
ixheaacd_noise_level_rescaling:
 1082|   723k|                                    WORD32 ixheaacd_drc_offset) {
 1083|   723k|  WORD32 k;
 1084|       |
 1085|   723k|  if (diff > 0) {
  ------------------
  |  Branch (1085:7): [True: 8.82k, False: 714k]
  ------------------
 1086|   178k|    for (k = num_sub_bands - 1; k >= 0; k--) {
  ------------------
  |  Branch (1086:33): [True: 169k, False: 8.82k]
  ------------------
 1087|   169k|      *noise_level_mant = *noise_level_mant >> diff;
 1088|   169k|      noise_level_mant += ixheaacd_drc_offset;
 1089|   169k|    }
 1090|   714k|  } else if (diff < 0) {
  ------------------
  |  Branch (1090:14): [True: 6.45k, False: 708k]
  ------------------
 1091|  6.45k|    diff = -diff;
 1092|   133k|    for (k = num_sub_bands - 1; k >= 0; k--) {
  ------------------
  |  Branch (1092:33): [True: 127k, False: 6.45k]
  ------------------
 1093|   127k|      *noise_level_mant = *noise_level_mant << diff;
 1094|   127k|      noise_level_mant += ixheaacd_drc_offset;
 1095|   127k|    }
 1096|  6.45k|  }
 1097|   723k|}
ixheaacd_adjust_scale_dec:
 1102|   360k|                               FLAG low_pow_flag) {
 1103|   360k|  WORD32 k, l;
 1104|       |
 1105|   360k|  if (shift != 0) {
  ------------------
  |  Branch (1105:7): [True: 265k, False: 95.0k]
  ------------------
 1106|   265k|    WORD32 num_sub_bands = (sub_band_end - sub_band_start);
 1107|       |
 1108|   265k|    shift = ixheaac_min32(shift, 31);
 1109|   265k|    shift = ixheaac_max32(shift, -31);
 1110|       |
 1111|   265k|    if (low_pow_flag) {
  ------------------
  |  Branch (1111:9): [True: 0, False: 265k]
  ------------------
 1112|      0|      if (shift > 0) {
  ------------------
  |  Branch (1112:11): [True: 0, False: 0]
  ------------------
 1113|      0|        for (l = start_pos; l < next_pos; l++) {
  ------------------
  |  Branch (1113:29): [True: 0, False: 0]
  ------------------
 1114|      0|          WORD32 *ptr = re[l] + sub_band_start;
 1115|      0|          for (k = num_sub_bands - 1; k >= 0; k--) {
  ------------------
  |  Branch (1115:39): [True: 0, False: 0]
  ------------------
 1116|      0|            *ptr = (*ptr << shift);
 1117|      0|            ptr++;
 1118|      0|          }
 1119|      0|        }
 1120|      0|      } else {
 1121|      0|        shift = -shift;
 1122|      0|        for (l = start_pos; l < next_pos; l++) {
  ------------------
  |  Branch (1122:29): [True: 0, False: 0]
  ------------------
 1123|      0|          WORD32 *ptr = re[l] + sub_band_start;
 1124|      0|          for (k = num_sub_bands - 1; k >= 0; k--) {
  ------------------
  |  Branch (1124:39): [True: 0, False: 0]
  ------------------
 1125|      0|            *ptr = (*ptr >> shift);
 1126|      0|            ptr++;
 1127|      0|          }
 1128|      0|        }
 1129|      0|      }
 1130|   265k|    } else {
 1131|   265k|      if (shift > 0) {
  ------------------
  |  Branch (1131:11): [True: 80.6k, False: 185k]
  ------------------
 1132|   902k|        for (l = start_pos; l < next_pos; l++) {
  ------------------
  |  Branch (1132:29): [True: 821k, False: 80.6k]
  ------------------
 1133|   821k|          WORD32 *ptr = re[l] + sub_band_start;
 1134|   821k|          WORD32 *pti = im[l] + sub_band_start;
 1135|  15.3M|          for (k = num_sub_bands; k > 0; k--) {
  ------------------
  |  Branch (1135:35): [True: 14.5M, False: 821k]
  ------------------
 1136|  14.5M|            *ptr = (*ptr << shift);
 1137|  14.5M|            *pti = (*pti << shift);
 1138|  14.5M|            pti++;
 1139|  14.5M|            ptr++;
 1140|  14.5M|          }
 1141|   821k|        }
 1142|   185k|      } else {
 1143|   185k|        shift = -shift;
 1144|  1.77M|        for (l = start_pos; l < next_pos; l++) {
  ------------------
  |  Branch (1144:29): [True: 1.59M, False: 185k]
  ------------------
 1145|  1.59M|          WORD32 *ptr = re[l] + sub_band_start;
 1146|  1.59M|          WORD32 *pti = im[l] + sub_band_start;
 1147|  32.3M|          for (k = num_sub_bands; k > 0; k--) {
  ------------------
  |  Branch (1147:35): [True: 30.7M, False: 1.59M]
  ------------------
 1148|  30.7M|            *ptr = (*ptr >> shift);
 1149|  30.7M|            *pti = (*pti >> shift);
 1150|  30.7M|            ptr++;
 1151|  30.7M|            pti++;
 1152|  30.7M|          }
 1153|  1.59M|        }
 1154|   185k|      }
 1155|   265k|    }
 1156|   265k|  }
 1157|   360k|}
ixheaacd_expsubbandsamples_dec:
 1162|   439k|                                      WORD32 next_pos, FLAG low_pow_flag) {
 1163|   439k|  WORD32 l, k;
 1164|   439k|  WORD16 max_shift;
 1165|       |
 1166|   439k|  WORD32 value;
 1167|   439k|  WORD32 max_abs;
 1168|   439k|  WORD32 num_sub_bands;
 1169|       |
 1170|   439k|  WORD32 *ptr_real;
 1171|   439k|  WORD32 *ptr_imag;
 1172|       |
 1173|   439k|  max_abs = 1;
 1174|   439k|  num_sub_bands = (sub_band_end - sub_band_start);
 1175|       |
 1176|   439k|  if (low_pow_flag) {
  ------------------
  |  Branch (1176:7): [True: 0, False: 439k]
  ------------------
 1177|      0|    for (l = start_pos; l < next_pos; l++) {
  ------------------
  |  Branch (1177:25): [True: 0, False: 0]
  ------------------
 1178|      0|      WORD32 temp_real;
 1179|      0|      ptr_real = re[l] + sub_band_start;
 1180|      0|      temp_real = *ptr_real++;
 1181|      0|      for (k = num_sub_bands; k > 0; k--) {
  ------------------
  |  Branch (1181:31): [True: 0, False: 0]
  ------------------
 1182|      0|        value = ixheaac_abs32_nrm(temp_real);
 1183|      0|        max_abs |= value;
 1184|      0|        temp_real = *ptr_real++;
 1185|      0|      }
 1186|      0|    }
 1187|      0|    max_shift = ixheaac_pnorm32(max_abs);
 1188|   439k|  } else {
 1189|  4.14M|    for (l = start_pos; l < next_pos; l++) {
  ------------------
  |  Branch (1189:25): [True: 3.70M, False: 439k]
  ------------------
 1190|  3.70M|      ptr_real = re[l] + sub_band_start;
 1191|  3.70M|      ptr_imag = im[l] + sub_band_start;
 1192|       |
 1193|  24.2M|      for (k = num_sub_bands; k > 0; k--) {
  ------------------
  |  Branch (1193:31): [True: 20.5M, False: 3.70M]
  ------------------
 1194|  20.5M|        WORD32 temp_real = *ptr_real++;
 1195|  20.5M|        WORD32 tempIm = *ptr_imag++;
 1196|       |
 1197|  20.5M|        temp_real = ixheaac_abs32_nrm(temp_real);
 1198|  20.5M|        max_abs |= temp_real;
 1199|  20.5M|        tempIm = ixheaac_abs32_nrm(tempIm);
 1200|  20.5M|        max_abs |= tempIm;
 1201|  20.5M|      }
 1202|  3.70M|    }
 1203|   439k|    max_shift = ixheaac_pnorm32(max_abs);
 1204|   439k|  }
 1205|       |
 1206|   439k|  return max_shift;
 1207|   439k|}
ixheaacd_enery_calc_per_subband_dec:
 1216|  38.9k|                                         WORD32 *ptr_qmf_matrix) {
 1217|  38.9k|  WORD16 temp;
 1218|  38.9k|  WORD16 inv_width;
 1219|  38.9k|  WORD16 sum_m;
 1220|  38.9k|  WORD32 accu;
 1221|  38.9k|  WORD32 k, l;
 1222|  38.9k|  WORD32 pre_shift_val;
 1223|  38.9k|  WORD32 shift;
 1224|  38.9k|  WORD32 *p_real;
 1225|  38.9k|  WORD32 max_shift_gap = SHIFT_BEFORE_SQUARE;
  ------------------
  |  | 1209|  38.9k|#define SHIFT_BEFORE_SQUARE 4
  ------------------
 1226|  38.9k|  WORD32 extra_shift = 0;
 1227|  38.9k|  WORD32 num_cols = next_pos - start_pos;
 1228|       |
 1229|  38.9k|  if (low_pow_flag) {
  ------------------
  |  Branch (1229:7): [True: 0, False: 38.9k]
  ------------------
 1230|      0|    max_shift_gap -= 1;
 1231|      0|    p_real = ptr_qmf_matrix + sub_band_start + (start_pos << 6);
 1232|      0|    extra_shift++;
 1233|  38.9k|  } else {
 1234|  38.9k|    p_real = ptr_qmf_matrix + sub_band_start + (start_pos << 7);
 1235|  38.9k|    num_cols = num_cols << 1;
 1236|  38.9k|  }
 1237|  38.9k|  inv_width = ptr_sbr_tables->env_calc_tables_ptr
 1238|  38.9k|                  ->sbr_inv_int_table[(next_pos - start_pos)];
 1239|  38.9k|  frame_exp = (frame_exp << 1);
 1240|       |
 1241|  38.9k|  {
 1242|  38.9k|    WORD32 *ptr;
 1243|   850k|    for (k = sub_band_start; k < sub_band_end; k++) {
  ------------------
  |  Branch (1243:30): [True: 811k, False: 38.9k]
  ------------------
 1244|   811k|      WORD32 max_val = 1;
 1245|       |
 1246|   811k|      ptr = p_real;
 1247|       |
 1248|  10.9M|      for (l = num_cols; l != 0; l -= 2) {
  ------------------
  |  Branch (1248:26): [True: 10.1M, False: 811k]
  ------------------
 1249|  10.1M|        WORD32 value = ixheaac_abs32_nrm(*ptr);
 1250|  10.1M|        ptr += 64;
 1251|  10.1M|        max_val = ixheaac_max32(value, max_val);
 1252|  10.1M|        value = ixheaac_abs32_nrm(*ptr);
 1253|  10.1M|        ptr += 64;
 1254|  10.1M|        max_val = ixheaac_max32(value, max_val);
 1255|  10.1M|      }
 1256|   811k|      pre_shift_val = (ixheaac_pnorm32(max_val) - max_shift_gap);
 1257|       |
 1258|   811k|      accu = 0L;
 1259|   811k|      shift = 16 - pre_shift_val;
 1260|   811k|      ptr = p_real;
 1261|       |
 1262|   811k|      if (shift > 0)
  ------------------
  |  Branch (1262:11): [True: 514k, False: 297k]
  ------------------
 1263|  7.66M|        for (l = num_cols; l != 0; l -= 2) {
  ------------------
  |  Branch (1263:28): [True: 7.14M, False: 514k]
  ------------------
 1264|  7.14M|          temp = (WORD16)((*(ptr) >> shift));
 1265|  7.14M|          ptr += 64;
 1266|  7.14M|          accu += (temp * temp);
 1267|  7.14M|          temp = (WORD16)((*(ptr) >> shift));
 1268|  7.14M|          ptr += 64;
 1269|  7.14M|          accu += (temp * temp);
 1270|  7.14M|        }
 1271|   297k|      else
 1272|  3.31M|        for (l = num_cols; l != 0; l -= 2) {
  ------------------
  |  Branch (1272:28): [True: 3.01M, False: 297k]
  ------------------
 1273|  3.01M|          temp = (WORD16)((*(ptr) << (-shift)));
 1274|  3.01M|          ptr += 64;
 1275|  3.01M|          accu += (temp * temp);
 1276|  3.01M|          temp = (WORD16)((*(ptr) << (-shift)));
 1277|  3.01M|          ptr += 64;
 1278|  3.01M|          accu += (temp * temp);
 1279|  3.01M|        }
 1280|       |
 1281|   811k|      if (accu != 0L) {
  ------------------
  |  Branch (1281:11): [True: 516k, False: 295k]
  ------------------
 1282|   516k|        shift = -(ixheaac_pnorm32(accu));
 1283|   516k|        sum_m = (WORD16)(ixheaac_shr32_dir_sat_limit(accu, (16 + shift)));
 1284|   516k|        *nrg_est++ = ixheaac_mult16_shl_sat(sum_m, inv_width);
 1285|   516k|        shift = (shift - (pre_shift_val << 1));
 1286|   516k|        shift += extra_shift;
 1287|   516k|        *nrg_est++ = (WORD16)(frame_exp + shift + 1);
 1288|   516k|      } else {
 1289|   295k|        *nrg_est++ = 0;
 1290|   295k|        *nrg_est++ = 0;
 1291|   295k|      }
 1292|       |
 1293|   811k|      p_real++;
 1294|   811k|    }
 1295|  38.9k|  }
 1296|  38.9k|}
ixheaacd_enery_calc_persfb:
 1303|  27.2k|                                ia_sbr_tables_struct *ptr_sbr_tables) {
 1304|  27.2k|  WORD16 inv_width;
 1305|  27.2k|  WORD32 pre_shift_val;
 1306|  27.2k|  WORD32 shift;
 1307|  27.2k|  WORD32 sum_e;
 1308|  27.2k|  WORD16 sum_m;
 1309|       |
 1310|  27.2k|  WORD32 j, k, l;
 1311|  27.2k|  WORD32 li, ui;
 1312|  27.2k|  WORD32 accu_line;
 1313|  27.2k|  WORD32 accumulate;
 1314|  27.2k|  WORD32 extra_shift = 10;
 1315|       |
 1316|  27.2k|  inv_width = ptr_sbr_tables->env_calc_tables_ptr
 1317|  27.2k|                  ->sbr_inv_int_table[(next_pos - start_pos)];
 1318|       |
 1319|  27.2k|  frame_exp = (frame_exp << 1);
 1320|       |
 1321|  27.2k|  if (low_pow_flag) extra_shift++;
  ------------------
  |  Branch (1321:7): [True: 0, False: 27.2k]
  ------------------
 1322|       |
 1323|   357k|  for (j = 0; j < num_sf_bands; j++) {
  ------------------
  |  Branch (1323:15): [True: 330k, False: 27.2k]
  ------------------
 1324|   330k|    li = freq_band_table[j];
 1325|       |
 1326|   330k|    if ((li >= max_qmf_subband_aac)) {
  ------------------
  |  Branch (1326:9): [True: 330k, False: 0]
  ------------------
 1327|   330k|      ui = freq_band_table[j + 1];
 1328|       |
 1329|   330k|      pre_shift_val = (*ixheaacd_ixheaacd_expsubbandsamples)(
 1330|   330k|          anal_buf_real, anal_buf_imag, li, ui, start_pos, next_pos,
 1331|   330k|          low_pow_flag);
 1332|       |
 1333|   330k|      pre_shift_val = (pre_shift_val - SHIFT_BEFORE_SQUARE);
  ------------------
  |  | 1209|   330k|#define SHIFT_BEFORE_SQUARE 4
  ------------------
 1334|       |
 1335|   330k|      accumulate = 0;
 1336|       |
 1337|   878k|      for (k = li; k < ui; k++) {
  ------------------
  |  Branch (1337:20): [True: 547k, False: 330k]
  ------------------
 1338|   547k|        WORD32 pre_shift1 = (16 - pre_shift_val);
 1339|   547k|        accu_line = 0L;
 1340|   547k|        pre_shift1 = min(pre_shift1, 31);
  ------------------
  |  |   75|   547k|#define min(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (75:20): [True: 547k, False: 0]
  |  |  ------------------
  ------------------
 1341|   547k|        {
 1342|   547k|          WORD32 *ptr = &anal_buf_real[start_pos][k];
 1343|   547k|          WORD32 inc = !low_pow_flag;
 1344|  10.4M|          for (l = (next_pos - start_pos) << inc; l != 0; l--) {
  ------------------
  |  Branch (1344:51): [True: 9.85M, False: 547k]
  ------------------
 1345|  9.85M|            WORD16 temp;
 1346|  9.85M|            temp = ixheaac_extract16l(ixheaac_shr32_dir(*ptr, pre_shift1));
 1347|  9.85M|            ptr += 64;
 1348|  9.85M|            accu_line = ixheaac_mac16x16in32_sat(accu_line, temp, temp);
 1349|  9.85M|          }
 1350|   547k|        }
 1351|   547k|        accumulate =
 1352|   547k|            ixheaac_add32_sat(accumulate, ixheaac_shr32(accu_line, 9));
 1353|   547k|      }
 1354|       |
 1355|   330k|      shift = ixheaac_pnorm32(accumulate);
 1356|       |
 1357|   330k|      sum_m = ixheaac_extract16l(
 1358|   330k|          ixheaac_shr32_dir_sat_limit(accumulate, (16 - shift)));
 1359|       |
 1360|   330k|      if (sum_m == 0) {
  ------------------
  |  Branch (1360:11): [True: 141k, False: 189k]
  ------------------
 1361|   141k|        sum_e = 0;
 1362|   189k|      } else {
 1363|   189k|        sum_m = ixheaac_mult16_shl_sat(sum_m, inv_width);
 1364|       |
 1365|   189k|        sum_m = ixheaac_mult16_shl_sat(
 1366|   189k|            sum_m,
 1367|   189k|            ptr_sbr_tables->env_calc_tables_ptr->sbr_inv_int_table[ui - li]);
 1368|       |
 1369|   189k|        sum_e = ((frame_exp + extra_shift) - shift);
 1370|       |
 1371|   189k|        sum_e = (sum_e - (pre_shift_val << 1));
 1372|   189k|      }
 1373|       |
 1374|   878k|      for (k = li; k < ui; k++) {
  ------------------
  |  Branch (1374:20): [True: 547k, False: 330k]
  ------------------
 1375|   547k|        *nrg_est++ = sum_m;
 1376|   547k|        *nrg_est++ = (WORD16)sum_e;
 1377|   547k|      }
 1378|   330k|    }
 1379|   330k|  }
 1380|  27.2k|}
ixheaacd_subbandgain_calc:
 1389|  1.35M|                               ixheaacd_misc_tables *pstr_common_tables) {
 1390|  1.35M|  WORD16 var1_mant;
 1391|  1.35M|  WORD16 var1_exp;
 1392|  1.35M|  WORD16 var2_mant;
 1393|  1.35M|  WORD16 var2_exp;
 1394|  1.35M|  WORD16 var3_mant;
 1395|  1.35M|  WORD16 var3_exp;
 1396|  1.35M|  WORD32 temp;
 1397|       |
 1398|  1.35M|  if (nrg_est_mant == 0) {
  ------------------
  |  Branch (1398:7): [True: 486k, False: 872k]
  ------------------
 1399|   486k|    nrg_est_mant = 0x4000;
 1400|   486k|    nrg_est_exp = 1;
 1401|   486k|  }
 1402|       |
 1403|  1.35M|  var1_mant = ixheaac_mult16_shl_sat(e_orig_mant_matrix, tmp_noise_mant);
 1404|  1.35M|  var1_exp = (nrg_ref_exp + tmp_noise_exp);
 1405|       |
 1406|  1.35M|  {
 1407|  1.35M|    WORD32 accu, exp_diff;
 1408|       |
 1409|  1.35M|    exp_diff = tmp_noise_exp - 1;
 1410|       |
 1411|  1.35M|    if (exp_diff >= 0) {
  ------------------
  |  Branch (1411:9): [True: 720k, False: 638k]
  ------------------
 1412|   720k|      accu = tmp_noise_mant + ixheaac_shr32(0x4000, exp_diff);
 1413|   720k|      var2_exp = tmp_noise_exp;
 1414|   720k|    } else {
 1415|   638k|      exp_diff = -exp_diff;
 1416|   638k|      accu = ixheaac_shr32((WORD32)tmp_noise_mant, exp_diff) + 0x4000;
 1417|   638k|      var2_exp = 1;
 1418|   638k|    }
 1419|  1.35M|    if (ixheaac_abs32(accu) >= 0x8000) {
  ------------------
  |  Branch (1419:9): [True: 44.3k, False: 1.31M]
  ------------------
 1420|  44.3k|      accu = accu >> 1;
 1421|  44.3k|      var2_exp++;
 1422|  44.3k|    }
 1423|  1.35M|    var2_mant = (WORD16)(accu);
 1424|  1.35M|  }
 1425|       |
 1426|  1.35M|  temp = ixheaacd_fix_mant_div(var1_mant, var2_mant, ptr_noise_floor_mant,
 1427|  1.35M|                               pstr_common_tables);
 1428|  1.35M|  *(ptr_noise_floor_mant + 1) = temp + (var1_exp - var2_exp) + 1;
 1429|       |
 1430|  1.35M|  if (sine_present_flag || !noise_absc_flag) {
  ------------------
  |  Branch (1430:7): [True: 88.7k, False: 1.27M]
  |  Branch (1430:28): [True: 1.17M, False: 99.0k]
  ------------------
 1431|  1.26M|    var3_mant = ixheaac_mult16_shl_sat(var2_mant, nrg_est_mant);
 1432|  1.26M|    var3_exp = (var2_exp + nrg_est_exp);
 1433|  1.26M|  } else {
 1434|  99.0k|    var3_mant = nrg_est_mant;
 1435|  99.0k|    var3_exp = nrg_est_exp;
 1436|  99.0k|  }
 1437|       |
 1438|  1.35M|  if (sine_present_flag == 0) {
  ------------------
  |  Branch (1438:7): [True: 1.27M, False: 88.7k]
  ------------------
 1439|  1.27M|    var1_mant = e_orig_mant_matrix;
 1440|  1.27M|    var1_exp = nrg_ref_exp;
 1441|  1.27M|  }
 1442|       |
 1443|  1.35M|  temp = ixheaacd_fix_mant_div(var1_mant, var3_mant, ptr_nrg_gain_mant,
 1444|  1.35M|                               pstr_common_tables);
 1445|  1.35M|  *(ptr_nrg_gain_mant + 1) = temp + (var1_exp - var3_exp) + 1;
 1446|       |
 1447|  1.35M|  if (sine_present_flag && sine_mapped_matrix) {
  ------------------
  |  Branch (1447:7): [True: 88.7k, False: 1.27M]
  |  Branch (1447:28): [True: 48.9k, False: 39.7k]
  ------------------
 1448|  48.9k|    temp = ixheaacd_fix_mant_div(e_orig_mant_matrix, var2_mant, ptr_nrg_sine_m,
 1449|  48.9k|                                 pstr_common_tables);
 1450|  48.9k|    *(ptr_nrg_sine_m + 1) = temp + (nrg_ref_exp - var2_exp) + 1;
 1451|  48.9k|  }
 1452|  1.35M|}
ixheaacd_avggain_calc:
 1459|   212k|                           WORD32 flag) {
 1460|   212k|  WORD16 sum_orig_mant;
 1461|   212k|  WORD16 sum_orig_exp;
 1462|   212k|  WORD16 sum_est_mant;
 1463|   212k|  WORD16 sum_est_exp;
 1464|       |
 1465|   212k|  WORD32 accu_sum_orig_mant;
 1466|   212k|  WORD32 accu_sum_orig_exp;
 1467|   212k|  WORD32 accu_sum_est_mant;
 1468|   212k|  WORD32 accu_sum_est_exp;
 1469|       |
 1470|   212k|  WORD32 k, temp;
 1471|   212k|  WORD16 *ptr_enrg_orig_buf;
 1472|   212k|  WORD16 *ptr_enrg_est_buf;
 1473|       |
 1474|   212k|  {
 1475|   212k|    accu_sum_orig_mant = 0;
 1476|   212k|    accu_sum_orig_exp = 0;
 1477|       |
 1478|   212k|    accu_sum_est_mant = 0;
 1479|   212k|    accu_sum_est_exp = 0;
 1480|   212k|  }
 1481|       |
 1482|   212k|  ptr_enrg_orig_buf = &ptr_enrg_orig[sub_band_start << 1];
 1483|   212k|  ptr_enrg_est_buf = &nrg_est[sub_band_start << 1];
 1484|       |
 1485|  1.56M|  for (k = sub_band_end - sub_band_start; k != 0; k--) {
  ------------------
  |  Branch (1485:43): [True: 1.34M, False: 212k]
  ------------------
 1486|  1.34M|    WORD16 tmp_mant, tmp_e;
 1487|  1.34M|    WORD16 tmp2_m, tmp2_e;
 1488|       |
 1489|  1.34M|    tmp_mant = *ptr_enrg_orig_buf++;
 1490|  1.34M|    tmp_e = *ptr_enrg_orig_buf++;
 1491|  1.34M|    tmp2_m = *ptr_enrg_est_buf++;
 1492|  1.34M|    tmp2_e = *ptr_enrg_est_buf++;
 1493|  1.34M|    {
 1494|  1.34M|      WORD32 exp_diff;
 1495|  1.34M|      exp_diff = tmp_e - accu_sum_orig_exp;
 1496|  1.34M|      if (exp_diff >= 0) {
  ------------------
  |  Branch (1496:11): [True: 1.02M, False: 323k]
  ------------------
 1497|  1.02M|        accu_sum_orig_mant =
 1498|  1.02M|            tmp_mant + ixheaac_shr32(accu_sum_orig_mant, exp_diff);
 1499|  1.02M|        accu_sum_orig_exp = tmp_e;
 1500|  1.02M|      } else {
 1501|   323k|        exp_diff = -exp_diff;
 1502|   323k|        accu_sum_orig_mant =
 1503|   323k|            ixheaac_shr32(tmp_mant, exp_diff) + accu_sum_orig_mant;
 1504|   323k|      }
 1505|  1.34M|    }
 1506|  1.34M|    if (flag) {
  ------------------
  |  Branch (1506:9): [True: 0, False: 1.34M]
  ------------------
 1507|      0|      tmp_mant = (tmp_mant * tmp2_m) >> 16;
 1508|      0|      tmp_e = (tmp_e + tmp2_e + 1);
 1509|       |
 1510|  1.34M|    } else {
 1511|  1.34M|      tmp_mant = tmp2_m;
 1512|  1.34M|      tmp_e = tmp2_e;
 1513|  1.34M|    }
 1514|       |
 1515|  1.34M|    {
 1516|  1.34M|      WORD32 exp_diff;
 1517|  1.34M|      exp_diff = tmp_e - accu_sum_est_exp;
 1518|  1.34M|      if (exp_diff >= 0) {
  ------------------
  |  Branch (1518:11): [True: 1.00M, False: 341k]
  ------------------
 1519|  1.00M|        accu_sum_est_mant =
 1520|  1.00M|            tmp_mant + ixheaac_shr32(accu_sum_est_mant, exp_diff);
 1521|  1.00M|        accu_sum_est_exp = tmp_e;
 1522|  1.00M|      } else {
 1523|   341k|        exp_diff = -exp_diff;
 1524|   341k|        accu_sum_est_mant =
 1525|   341k|            ixheaac_shr32(tmp_mant, exp_diff) + accu_sum_est_mant;
 1526|   341k|      }
 1527|  1.34M|    }
 1528|  1.34M|  }
 1529|   212k|  {
 1530|   212k|    WORD32 norm_val;
 1531|   212k|    norm_val = 16 - ixheaac_pnorm32(accu_sum_orig_mant);
 1532|   212k|    if (norm_val > 0) {
  ------------------
  |  Branch (1532:9): [True: 177k, False: 34.8k]
  ------------------
 1533|   177k|      accu_sum_orig_mant >>= norm_val;
 1534|   177k|      accu_sum_orig_exp += norm_val;
 1535|   177k|    }
 1536|   212k|    norm_val = 16 - ixheaac_pnorm32(accu_sum_est_mant);
 1537|   212k|    if (norm_val > 0) {
  ------------------
  |  Branch (1537:9): [True: 1.49k, False: 210k]
  ------------------
 1538|  1.49k|      accu_sum_est_mant >>= norm_val;
 1539|  1.49k|      accu_sum_est_exp += norm_val;
 1540|  1.49k|    }
 1541|   212k|  }
 1542|       |
 1543|   212k|  if (!flag) {
  ------------------
  |  Branch (1543:7): [True: 212k, False: 0]
  ------------------
 1544|   212k|    sum_orig_mant = (WORD16)accu_sum_orig_mant;
 1545|   212k|    sum_orig_exp = (WORD16)accu_sum_orig_exp;
 1546|   212k|    sum_est_mant = (WORD16)accu_sum_est_mant;
 1547|   212k|    sum_est_exp = (WORD16)accu_sum_est_exp;
 1548|   212k|  } else {
 1549|      0|    sum_est_mant = (WORD16)accu_sum_orig_mant;
 1550|      0|    sum_est_exp = (WORD16)accu_sum_orig_exp;
 1551|      0|    sum_orig_mant = (WORD16)accu_sum_est_mant;
 1552|      0|    sum_orig_exp = (WORD16)accu_sum_est_exp;
 1553|      0|  }
 1554|       |
 1555|   212k|  {
 1556|   212k|    temp = ixheaacd_fix_mant_div(sum_orig_mant, sum_est_mant, ptr_avg_gain_mant,
 1557|   212k|                                 pstr_common_tables);
 1558|   212k|    *ptr_avg_gain_exp = temp + (sum_orig_exp - sum_est_exp) + 1;
 1559|   212k|    *ptr_enrg_orig_mant = sum_orig_mant;
 1560|   212k|    *ptr_sum_ref_exp = sum_orig_exp;
 1561|   212k|  }
 1562|   212k|}
ixheaacd_harm_idx_zerotwo:
 1765|   362k|                               WORD32 harm_index) {
 1766|   362k|  WORD32 k;
 1767|   362k|  WORD32 signal_real, sig_imag;
 1768|   362k|  WORD32 shift;
 1769|   362k|  WORD32 sine_level;
 1770|   362k|  ptr_gain_buf++;
 1771|       |
 1772|  7.92M|  for (k = 0; k < num_sub_bands; k++) {
  ------------------
  |  Branch (1772:15): [True: 7.55M, False: 362k]
  ------------------
 1773|  7.55M|    signal_real = ixheaac_mult32x16in32(*ptr_real_buf, smoothed_gain[0]);
 1774|  7.55M|    sig_imag = ixheaac_mult32x16in32(*ptr_imag, smoothed_gain[0]);
 1775|       |
 1776|  7.55M|    shift = ixheaac_sub16(*ptr_gain_buf, scale_change);
 1777|  7.55M|    ptr_gain_buf += 2;
 1778|       |
 1779|  7.55M|    if (shift > 0) {
  ------------------
  |  Branch (1779:9): [True: 1.85M, False: 5.70M]
  ------------------
 1780|  1.85M|      signal_real = ixheaac_shl32(signal_real, shift);
 1781|  1.85M|      sig_imag = ixheaac_shl32(sig_imag, shift);
 1782|  5.70M|    } else {
 1783|  5.70M|      shift = -shift;
 1784|  5.70M|      signal_real = ixheaac_shr32(signal_real, shift);
 1785|  5.70M|      sig_imag = ixheaac_shr32(sig_imag, shift);
 1786|  5.70M|    }
 1787|       |
 1788|  7.55M|    ptr_rand_ph++;
 1789|       |
 1790|  7.55M|    if (*ptr_sine_level_buf != 0) {
  ------------------
  |  Branch (1790:9): [True: 140k, False: 7.41M]
  ------------------
 1791|   140k|      WORD32 tmp = ixheaac_sub16(ptr_sine_level_buf[1], noise_e);
 1792|       |
 1793|   140k|      if (tmp > 0)
  ------------------
  |  Branch (1793:11): [True: 125k, False: 15.2k]
  ------------------
 1794|   125k|        sine_level = ixheaac_shl32(ptr_sine_level_buf[0], tmp);
 1795|  15.2k|      else
 1796|  15.2k|        sine_level = ixheaac_shr32(ptr_sine_level_buf[0], tmp);
 1797|       |
 1798|   140k|      if (harm_index == 0)
  ------------------
  |  Branch (1798:11): [True: 69.5k, False: 71.1k]
  ------------------
 1799|  69.5k|        *ptr_real_buf = ixheaac_add32_sat(signal_real, sine_level);
 1800|  71.1k|      else
 1801|  71.1k|        *ptr_real_buf = ixheaac_sub32_sat(signal_real, sine_level);
 1802|       |
 1803|   140k|      *ptr_imag = sig_imag;
 1804|  7.41M|    } else {
 1805|  7.41M|      if (!noise_absc_flag) {
  ------------------
  |  Branch (1805:11): [True: 7.21M, False: 206k]
  ------------------
 1806|  7.21M|        WORD32 random = *ptr_rand_ph;
 1807|  7.21M|        WORD16 noise = smoothed_noise[0];
 1808|       |
 1809|  7.21M|        *ptr_real_buf = ixheaac_mac16x16in32_shl_sat(
 1810|  7.21M|            signal_real, ixheaac_extract16h(random), noise);
 1811|  7.21M|        *ptr_imag = ixheaac_mac16x16in32_shl_sat(
 1812|  7.21M|            sig_imag, ixheaac_extract16l(random), noise);
 1813|  7.21M|      } else {
 1814|   206k|        *ptr_real_buf = signal_real;
 1815|   206k|        *ptr_imag = sig_imag;
 1816|   206k|      }
 1817|  7.41M|    }
 1818|       |
 1819|  7.55M|    smoothed_noise += factor;
 1820|  7.55M|    smoothed_gain += 2;
 1821|  7.55M|    ptr_sine_level_buf += 2;
 1822|  7.55M|    ptr_real_buf++;
 1823|  7.55M|    ptr_imag++;
 1824|  7.55M|  }
 1825|   362k|}
ixheaacd_harm_idx_onethree:
 1833|   361k|                                WORD32 freq_inv_flag, WORD32 harm_index) {
 1834|   361k|  WORD32 k;
 1835|   361k|  WORD32 signal_real, sig_imag;
 1836|   361k|  WORD32 shift;
 1837|   361k|  WORD32 sine_level;
 1838|       |
 1839|   361k|  ptr_gain_buf++;
 1840|       |
 1841|   361k|  if (harm_index == 1) freq_inv_flag = !freq_inv_flag;
  ------------------
  |  Branch (1841:7): [True: 181k, False: 179k]
  ------------------
 1842|       |
 1843|  7.89M|  for (k = 0; k < num_sub_bands; k++) {
  ------------------
  |  Branch (1843:15): [True: 7.52M, False: 361k]
  ------------------
 1844|  7.52M|    signal_real = ixheaac_mult32x16in32(*ptr_real_buf, smoothed_gain[0]);
 1845|  7.52M|    sig_imag = ixheaac_mult32x16in32(*ptr_imag, smoothed_gain[0]);
 1846|       |
 1847|  7.52M|    shift = ixheaac_sub16(*ptr_gain_buf, scale_change);
 1848|  7.52M|    ptr_gain_buf += 2;
 1849|       |
 1850|  7.52M|    if (shift > 0) {
  ------------------
  |  Branch (1850:9): [True: 1.86M, False: 5.66M]
  ------------------
 1851|  1.86M|      signal_real = ixheaac_shl32(signal_real, shift);
 1852|  1.86M|      sig_imag = ixheaac_shl32(sig_imag, shift);
 1853|  5.66M|    } else {
 1854|  5.66M|      shift = -shift;
 1855|  5.66M|      signal_real = ixheaac_shr32(signal_real, shift);
 1856|  5.66M|      sig_imag = ixheaac_shr32(sig_imag, shift);
 1857|  5.66M|    }
 1858|       |
 1859|  7.52M|    ptr_rand_ph++;
 1860|       |
 1861|  7.52M|    if (*ptr_sine_level_buf != 0) {
  ------------------
  |  Branch (1861:9): [True: 140k, False: 7.38M]
  ------------------
 1862|   140k|      WORD32 tmp = ixheaac_sub16(ptr_sine_level_buf[1], noise_e);
 1863|       |
 1864|   140k|      if (tmp > 0)
  ------------------
  |  Branch (1864:11): [True: 125k, False: 15.7k]
  ------------------
 1865|   125k|        sine_level = ixheaac_shl32(ptr_sine_level_buf[0], tmp);
 1866|  15.7k|      else
 1867|  15.7k|        sine_level = ixheaac_shr32(ptr_sine_level_buf[0], -tmp);
 1868|       |
 1869|   140k|      *ptr_real_buf = signal_real;
 1870|       |
 1871|   140k|      if (freq_inv_flag) {
  ------------------
  |  Branch (1871:11): [True: 70.3k, False: 70.4k]
  ------------------
 1872|  70.3k|        *ptr_imag = ixheaac_add32_sat(sig_imag, sine_level);
 1873|  70.4k|      } else {
 1874|  70.4k|        *ptr_imag = ixheaac_sub32_sat(sig_imag, sine_level);
 1875|  70.4k|      }
 1876|       |
 1877|  7.38M|    } else {
 1878|  7.38M|      if (!noise_absc_flag) {
  ------------------
  |  Branch (1878:11): [True: 7.18M, False: 207k]
  ------------------
 1879|  7.18M|        WORD32 random = *ptr_rand_ph;
 1880|  7.18M|        WORD16 noise = smoothed_noise[0];
 1881|       |
 1882|  7.18M|        *ptr_real_buf = ixheaac_mac16x16in32_shl_sat(
 1883|  7.18M|            signal_real, ixheaac_extract16h(random), noise);
 1884|  7.18M|        *ptr_imag = ixheaac_mac16x16in32_shl_sat(
 1885|  7.18M|            sig_imag, ixheaac_extract16l(random), noise);
 1886|  7.18M|      } else {
 1887|   207k|        *ptr_real_buf = signal_real;
 1888|   207k|        *ptr_imag = sig_imag;
 1889|   207k|      }
 1890|  7.38M|    }
 1891|       |
 1892|  7.52M|    freq_inv_flag = (!freq_inv_flag);
 1893|  7.52M|    smoothed_gain += 2;
 1894|  7.52M|    smoothed_noise += factor;
 1895|  7.52M|    ptr_sine_level_buf += 2;
 1896|  7.52M|    ptr_real_buf++;
 1897|  7.52M|    ptr_imag++;
 1898|  7.52M|  }
 1899|   361k|}
ixheaacd_env_calc.c:ixheaacd_adapt_noise_gain_calc:
  487|  66.1k|    ia_sbr_tables_struct *ptr_sbr_tables, WORD16 max_cols) {
  488|  66.1k|  WORD32 l, k;
  489|  66.1k|  WORD32 scale_change;
  490|  66.1k|  WORD32 bands = num_sub_bands - skip_bands;
  491|  66.1k|  WORD16 *ptr_filt_buf;
  492|  66.1k|  WORD16 *ptr_filt_buf_noise;
  493|  66.1k|  WORD16 *ptr_gain = &nrg_gain[0];
  494|       |
  495|  66.1k|  if (ptr_sbr_calc_env->start_up) {
  ------------------
  |  Branch (495:7): [True: 12.3k, False: 53.7k]
  ------------------
  496|  12.3k|    WORD16 *ptr_noise = noise_level_mant;
  497|  12.3k|    ptr_sbr_calc_env->start_up = 0;
  498|       |
  499|  12.3k|    ptr_sbr_calc_env->filt_buf_noise_e = noise_e;
  500|  12.3k|    ptr_filt_buf = &ptr_sbr_calc_env->filt_buf_me[skip_bands * 2];
  501|  12.3k|    ptr_filt_buf_noise = &ptr_sbr_calc_env->filt_buf_noise_m[skip_bands];
  502|       |
  503|   310k|    for (k = bands; k != 0; k--) {
  ------------------
  |  Branch (503:21): [True: 298k, False: 12.3k]
  ------------------
  504|   298k|      WORD16 temp1 = *ptr_gain++;
  505|   298k|      WORD16 temp2 = *ptr_gain++;
  506|   298k|      WORD16 temp3 = *ptr_noise;
  507|   298k|      ptr_noise += 2;
  508|       |
  509|   298k|      *ptr_filt_buf++ = temp1;
  510|   298k|      *ptr_filt_buf++ = temp2;
  511|   298k|      *ptr_filt_buf_noise++ = temp3;
  512|   298k|    }
  513|  53.7k|  } else {
  514|  53.7k|    ixheaacd_equalize_filt_buff_exp(
  515|  53.7k|        &ptr_sbr_calc_env->filt_buf_me[2 * skip_bands], nrg_gain, bands);
  516|  53.7k|  }
  517|       |
  518|   789k|  for (l = start_pos; l < end_pos; l++) {
  ------------------
  |  Branch (518:23): [True: 723k, False: 66.1k]
  ------------------
  519|       |
  520|   723k|    if (max_cols != 30) {
  ------------------
  |  Branch (520:9): [True: 448k, False: 275k]
  ------------------
  521|   448k|      if ((l < MAX_COLS)) {
  ------------------
  |  |   69|   448k|#define MAX_COLS (MAX_FRAME_SIZE / NO_ANALYSIS_CHANNELS)
  |  |  ------------------
  |  |  |  |   30|   448k|#define MAX_FRAME_SIZE 1024
  |  |  ------------------
  |  |               #define MAX_COLS (MAX_FRAME_SIZE / NO_ANALYSIS_CHANNELS)
  |  |  ------------------
  |  |  |  |   35|   448k|#define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  |  |  ------------------
  |  |  |  |  |  |   34|   448k|#define NO_SYNTHESIS_CHANNELS 64
  |  |  |  |  ------------------
  |  |  |  |               #define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|   448k|#define SBR_UPSAMPLE_FAC 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (521:11): [True: 448k, False: 0]
  ------------------
  522|   448k|        scale_change = (adj_e - input_e);
  523|   448k|      } else {
  524|      0|        scale_change = (final_e - input_e);
  525|       |
  526|      0|        if (((l == MAX_COLS)) && ((start_pos < MAX_COLS))) {
  ------------------
  |  |   69|      0|#define MAX_COLS (MAX_FRAME_SIZE / NO_ANALYSIS_CHANNELS)
  |  |  ------------------
  |  |  |  |   30|      0|#define MAX_FRAME_SIZE 1024
  |  |  ------------------
  |  |               #define MAX_COLS (MAX_FRAME_SIZE / NO_ANALYSIS_CHANNELS)
  |  |  ------------------
  |  |  |  |   35|      0|#define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  |  |  ------------------
  |  |  |  |  |  |   34|      0|#define NO_SYNTHESIS_CHANNELS 64
  |  |  |  |  ------------------
  |  |  |  |               #define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|      0|#define SBR_UPSAMPLE_FAC 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      if (((l == MAX_COLS)) && ((start_pos < MAX_COLS))) {
  ------------------
  |  |   69|      0|#define MAX_COLS (MAX_FRAME_SIZE / NO_ANALYSIS_CHANNELS)
  |  |  ------------------
  |  |  |  |   30|      0|#define MAX_FRAME_SIZE 1024
  |  |  ------------------
  |  |               #define MAX_COLS (MAX_FRAME_SIZE / NO_ANALYSIS_CHANNELS)
  |  |  ------------------
  |  |  |  |   35|      0|#define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  |  |  ------------------
  |  |  |  |  |  |   34|      0|#define NO_SYNTHESIS_CHANNELS 64
  |  |  |  |  ------------------
  |  |  |  |               #define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|      0|#define SBR_UPSAMPLE_FAC 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (526:13): [True: 0, False: 0]
  |  Branch (526:34): [True: 0, False: 0]
  ------------------
  527|      0|          WORD32 diff = final_e - noise_e;
  528|      0|          noise_e = final_e;
  529|      0|          ixheaacd_noise_level_rescaling(noise_level_mant, diff, bands, 2);
  530|      0|        }
  531|      0|      }
  532|   448k|    } else {
  533|   275k|      if ((l < max_cols)) {
  ------------------
  |  Branch (533:11): [True: 275k, False: 0]
  ------------------
  534|   275k|        scale_change = (adj_e - input_e);
  535|   275k|      } else {
  536|      0|        scale_change = (final_e - input_e);
  537|       |
  538|      0|        if (((l == max_cols)) && ((start_pos < max_cols))) {
  ------------------
  |  Branch (538:13): [True: 0, False: 0]
  |  Branch (538:34): [True: 0, False: 0]
  ------------------
  539|      0|          WORD32 diff = final_e - noise_e;
  540|      0|          noise_e = final_e;
  541|      0|          ixheaacd_noise_level_rescaling(noise_level_mant, diff, bands, 2);
  542|      0|        }
  543|      0|      }
  544|   275k|    }
  545|       |
  546|   723k|    ixheaacd_noise_level_rescaling(ptr_sbr_calc_env->filt_buf_noise_m,
  547|   723k|                                   ptr_sbr_calc_env->filt_buf_noise_e - noise_e,
  548|   723k|                                   num_sub_bands, 1);
  549|       |
  550|   723k|    ptr_sbr_calc_env->filt_buf_noise_e = noise_e;
  551|       |
  552|   723k|    {
  553|   723k|      WORD32 *anal_buf_real_m_l;
  554|   723k|      anal_buf_real_m_l = anal_buf_real_mant[l];
  555|       |
  556|   723k|      if (low_pow_flag) {
  ------------------
  |  Branch (556:11): [True: 0, False: 723k]
  ------------------
  557|      0|        WORD32 index = ptr_sbr_calc_env->ph_index;
  558|      0|        WORD32 harm_index = ptr_sbr_calc_env->harm_index;
  559|      0|        WORD32 freq_inv_flag = (sub_band_start & 1);
  560|      0|        WORD32 *ptr_real_buf = &anal_buf_real_m_l[sub_band_start];
  561|       |
  562|      0|        const WORD32 *ptr_rand_ph = &ptr_sbr_tables->sbr_rand_ph[index + 1];
  563|       |
  564|      0|        ptr_sbr_calc_env->ph_index =
  565|      0|            (WORD16)((index + num_sub_bands) & (SBR_NF_NO_RANDOM_VAL - 1));
  ------------------
  |  |   24|      0|#define SBR_NF_NO_RANDOM_VAL 512
  ------------------
  566|      0|        ptr_sbr_calc_env->harm_index = (WORD16)(((harm_index + 1)) & 3);
  567|       |
  568|      0|        if (!(harm_index & 0x1)) {
  ------------------
  |  Branch (568:13): [True: 0, False: 0]
  ------------------
  569|      0|          (*ixheaacd_harm_idx_zerotwolp)(
  570|      0|              ptr_real_buf, nrg_gain, scale_change, nrg_sine, ptr_rand_ph,
  571|      0|              noise_level_mant, num_sub_bands, noise_absc_flag, harm_index);
  572|      0|        } else {
  573|      0|          WORD32 noise = (noise_e - 16) - lb_scale;
  574|       |
  575|      0|          freq_inv_flag = (!freq_inv_flag);
  576|      0|          freq_inv_flag = (freq_inv_flag << 1) - 1;
  577|       |
  578|      0|          if (harm_index == 3) freq_inv_flag = -freq_inv_flag;
  ------------------
  |  Branch (578:15): [True: 0, False: 0]
  ------------------
  579|       |
  580|      0|          ixheaacd_harm_idx_onethreelp(ptr_real_buf, nrg_gain, scale_change,
  581|      0|                                       nrg_sine, ptr_rand_ph, noise_level_mant,
  582|      0|                                       num_sub_bands, noise_absc_flag,
  583|      0|                                       freq_inv_flag, noise, sub_band_start);
  584|      0|        }
  585|       |
  586|   723k|      } else {
  587|   723k|        WORD16 smooth_ratio;
  588|   723k|        WORD32 *anal_buf_imag_m_l;
  589|   723k|        anal_buf_imag_m_l = anal_buf_imag_mant[l];
  590|       |
  591|   723k|        if (((l - start_pos) < smooth_length)) {
  ------------------
  |  Branch (591:13): [True: 97.0k, False: 626k]
  ------------------
  592|  97.0k|          smooth_ratio = ptr_sbr_tables->env_calc_tables_ptr
  593|  97.0k|                             ->sbr_smooth_filter[(l - start_pos)];
  594|   626k|        } else {
  595|   626k|          smooth_ratio = 0;
  596|   626k|        }
  597|       |
  598|   723k|        ixheaacd_adj_timeslot(
  599|   723k|            &anal_buf_real_m_l[sub_band_start],
  600|   723k|            &anal_buf_imag_m_l[sub_band_start],
  601|   723k|            &ptr_sbr_calc_env->filt_buf_me[2 * skip_bands],
  602|   723k|            &ptr_sbr_calc_env->filt_buf_noise_m[skip_bands], nrg_gain,
  603|   723k|            noise_level_mant, nrg_sine, (WORD16)(noise_e - 16),
  604|   723k|            &ptr_sbr_calc_env->harm_index, (WORD16)sub_band_start,
  605|   723k|            (WORD16)(bands), (WORD16)scale_change, smooth_ratio,
  606|   723k|            noise_absc_flag, &ptr_sbr_calc_env->ph_index, ptr_sbr_tables);
  607|   723k|      }
  608|   723k|    }
  609|   723k|  }
  610|       |
  611|  66.1k|  ixheaacd_filt_buf_update(ptr_sbr_calc_env->filt_buf_me + 2 * skip_bands,
  612|  66.1k|                           ptr_sbr_calc_env->filt_buf_noise_m + skip_bands,
  613|  66.1k|                           nrg_gain, noise_level_mant, bands);
  614|  66.1k|}

ixheaacd_map_res_energy:
   90|  1.63M|                             WORD32 res) {
   91|  1.63M|  if (res == LOW) {
  ------------------
  |  |   27|  1.63M|#define LOW 0
  ------------------
  |  Branch (91:7): [True: 769k, False: 863k]
  ------------------
   92|   769k|    if (ixheaacd_drc_offset >= 0) {
  ------------------
  |  Branch (92:9): [True: 769k, False: 0]
  ------------------
   93|   769k|      if (index < ixheaacd_drc_offset) {
  ------------------
  |  Branch (93:11): [True: 30.4k, False: 739k]
  ------------------
   94|  30.4k|        prev_data[index] = curr_val;
   95|   739k|      } else {
   96|   739k|        WORD32 index_2;
   97|   739k|        index_2 = ((index + index) - ixheaacd_drc_offset);
   98|   739k|        prev_data[index_2] = curr_val;
   99|   739k|        prev_data[index_2 + 1] = curr_val;
  100|   739k|      }
  101|   769k|    } else {
  102|      0|      ixheaacd_drc_offset = -(ixheaacd_drc_offset);
  103|       |
  104|      0|      if (index < ixheaacd_drc_offset) {
  ------------------
  |  Branch (104:11): [True: 0, False: 0]
  ------------------
  105|      0|        WORD32 index_3;
  106|      0|        index_3 = ((index + index) + index);
  107|      0|        prev_data[index_3] = curr_val;
  108|      0|        prev_data[index_3 + 1] = curr_val;
  109|      0|        prev_data[index_3 + 2] = curr_val;
  110|      0|      } else {
  111|      0|        WORD32 index_2;
  112|      0|        index_2 = ((index + index) + ixheaacd_drc_offset);
  113|      0|        prev_data[index_2] = curr_val;
  114|      0|        prev_data[index_2 + 1] = curr_val;
  115|      0|      }
  116|      0|    }
  117|   863k|  } else {
  118|   863k|    prev_data[index] = curr_val;
  119|   863k|  }
  120|  1.63M|}
ixheaacd_process_del_cod_env_data:
  125|   187k|    ia_sbr_prev_frame_data_struct *ptr_prev_data) {
  126|   187k|  WORD32 i, dtdf_dir, num_sf_bands, band, freq_res;
  127|   187k|  WORD16 temp_val;
  128|   187k|  WORD16 *ptr_prev_env_sf = ptr_prev_data->sfb_nrg_prev;
  129|   187k|  WORD16 *ptr_env_sf = ptr_sbr_data->int_env_sf_arr;
  130|       |
  131|   187k|  FLOAT32 *ptr_env_sf_float = ptr_sbr_data->flt_env_sf_arr;
  132|       |
  133|   187k|  WORD32 ixheaacd_drc_offset;
  134|       |
  135|   187k|  ixheaacd_drc_offset =
  136|   187k|      ((ptr_header_data->pstr_freq_band_data->num_sf_bands[LOW] << 1) -
  ------------------
  |  |   27|   187k|#define LOW 0
  ------------------
  137|   187k|       ptr_header_data->pstr_freq_band_data->num_sf_bands[HIGH]);
  ------------------
  |  |   28|   187k|#define HIGH 1
  ------------------
  138|       |
  139|   527k|  for (i = 0; i < ptr_sbr_data->str_frame_info_details.num_env; i++) {
  ------------------
  |  Branch (139:15): [True: 340k, False: 187k]
  ------------------
  140|   340k|    dtdf_dir = ptr_sbr_data->del_cod_dir_arr[i];
  141|   340k|    freq_res = ptr_sbr_data->str_frame_info_details.freq_res[i];
  142|       |
  143|   340k|    num_sf_bands = ptr_header_data->pstr_freq_band_data->num_sf_bands[freq_res];
  144|   340k|    band = num_sf_bands;
  145|       |
  146|   340k|    if (dtdf_dir == DTDF_DIR_FREQ) {
  ------------------
  |  |   31|   340k|#define DTDF_DIR_FREQ 0
  ------------------
  |  Branch (146:9): [True: 177k, False: 162k]
  ------------------
  147|   177k|      ixheaacd_map_res_energy(*ptr_env_sf, ptr_prev_env_sf, ixheaacd_drc_offset,
  148|   177k|                              0, freq_res);
  149|   177k|      ptr_env_sf++;
  150|       |
  151|   177k|      ptr_env_sf_float++;
  152|       |
  153|  1.63M|      for (band = 1; band < num_sf_bands; band++) {
  ------------------
  |  Branch (153:22): [True: 1.45M, False: 177k]
  ------------------
  154|  1.45M|        *ptr_env_sf = *ptr_env_sf + *(ptr_env_sf - 1);
  155|  1.45M|        ixheaacd_map_res_energy(*ptr_env_sf, ptr_prev_env_sf,
  156|  1.45M|                                ixheaacd_drc_offset, band, freq_res);
  157|       |
  158|  1.45M|        *ptr_env_sf_float = (FLOAT32)(*ptr_env_sf);
  159|  1.45M|        ptr_env_sf_float++;
  160|       |
  161|  1.45M|        ptr_env_sf++;
  162|  1.45M|      }
  163|       |
  164|   177k|    } else {
  165|   162k|      if (freq_res == LOW) {
  ------------------
  |  |   27|   162k|#define LOW 0
  ------------------
  |  Branch (165:11): [True: 47.5k, False: 114k]
  ------------------
  166|  47.5k|        if (ixheaacd_drc_offset < 0) {
  ------------------
  |  Branch (166:13): [True: 0, False: 47.5k]
  ------------------
  167|      0|          WORD32 tar, index_3;
  168|      0|          ixheaacd_drc_offset = -ixheaacd_drc_offset;
  169|      0|          tar = ixheaac_min32(ixheaacd_drc_offset, band);
  170|       |
  171|      0|          for (band = 0; band < tar; band++) {
  ------------------
  |  Branch (171:26): [True: 0, False: 0]
  ------------------
  172|      0|            index_3 = ((band + band) + band);
  173|      0|            temp_val = add16_m(*ptr_env_sf, ptr_prev_env_sf[index_3]);
  ------------------
  |  |   47|      0|#define add16_m(a, b) ((a) + (b))
  ------------------
  174|       |
  175|      0|            ptr_prev_env_sf[index_3] = temp_val;
  176|      0|            ptr_prev_env_sf[index_3 + 1] = temp_val;
  177|      0|            ptr_prev_env_sf[index_3 + 2] = temp_val;
  178|      0|            *ptr_env_sf++ = temp_val;
  179|       |
  180|      0|            *ptr_env_sf_float = (FLOAT32)temp_val;
  181|      0|            ptr_env_sf_float++;
  182|      0|          }
  183|       |
  184|      0|          for (; band < num_sf_bands; band++) {
  ------------------
  |  Branch (184:18): [True: 0, False: 0]
  ------------------
  185|      0|            index_3 = (band << 1) + ixheaacd_drc_offset;
  186|      0|            temp_val = add16_m(*ptr_env_sf, ptr_prev_env_sf[index_3]);
  ------------------
  |  |   47|      0|#define add16_m(a, b) ((a) + (b))
  ------------------
  187|      0|            ptr_prev_env_sf[index_3] = temp_val;
  188|      0|            ptr_prev_env_sf[index_3 + 1] = temp_val;
  189|      0|            *ptr_env_sf++ = temp_val;
  190|      0|            *ptr_env_sf_float = (FLOAT32)temp_val;
  191|      0|            ptr_env_sf_float++;
  192|      0|          }
  193|  47.5k|        } else {
  194|  47.5k|          WORD32 tar, index_2;
  195|  47.5k|          WORD16 *ptr2 = ptr_prev_env_sf;
  196|  47.5k|          tar = ixheaac_min32(ixheaacd_drc_offset, band);
  197|  60.6k|          for (band = 0; band < tar; band++) {
  ------------------
  |  Branch (197:26): [True: 13.1k, False: 47.5k]
  ------------------
  198|  13.1k|            *ptr_env_sf = add16_m(*ptr_env_sf, *ptr2);
  ------------------
  |  |   47|  13.1k|#define add16_m(a, b) ((a) + (b))
  ------------------
  199|  13.1k|            *ptr2 = *ptr_env_sf;
  200|       |
  201|  13.1k|            *ptr_env_sf_float = (FLOAT32)(*ptr_env_sf);
  202|  13.1k|            ptr_env_sf_float++;
  203|       |
  204|  13.1k|            ptr2++;
  205|  13.1k|            ptr_env_sf++;
  206|  13.1k|          }
  207|       |
  208|   309k|          for (; band < num_sf_bands; band++) {
  ------------------
  |  Branch (208:18): [True: 261k, False: 47.5k]
  ------------------
  209|   261k|            index_2 = (band < ixheaacd_drc_offset)
  ------------------
  |  Branch (209:23): [True: 0, False: 261k]
  ------------------
  210|   261k|                          ? band
  211|   261k|                          : ((band << 1) - ixheaacd_drc_offset);
  212|   261k|            temp_val = add16_m(*ptr_env_sf, ptr_prev_env_sf[index_2]);
  ------------------
  |  |   47|   261k|#define add16_m(a, b) ((a) + (b))
  ------------------
  213|   261k|            ptr_prev_env_sf[index_2] = temp_val;
  214|   261k|            ptr_prev_env_sf[index_2 + 1] = temp_val;
  215|   261k|            *ptr_env_sf++ = temp_val;
  216|       |
  217|   261k|            *ptr_env_sf_float = (FLOAT32)temp_val;
  218|   261k|            ptr_env_sf_float++;
  219|   261k|          }
  220|  47.5k|        }
  221|       |
  222|   114k|      } else {
  223|   114k|        WORD16 *ptr2 = ptr_prev_env_sf;
  224|  1.36M|        for (band = num_sf_bands - 1; band >= 0; band--) {
  ------------------
  |  Branch (224:39): [True: 1.24M, False: 114k]
  ------------------
  225|  1.24M|          *ptr_env_sf = add16_m(*ptr_env_sf, *ptr2);
  ------------------
  |  |   47|  1.24M|#define add16_m(a, b) ((a) + (b))
  ------------------
  226|  1.24M|          *ptr2 = *ptr_env_sf;
  227|  1.24M|          *ptr_env_sf_float = (FLOAT32)(*ptr_env_sf);
  228|  1.24M|          ptr_env_sf_float++;
  229|  1.24M|          ptr2++;
  230|  1.24M|          ptr_env_sf++;
  231|  1.24M|        }
  232|   114k|        band = num_sf_bands;
  233|   114k|      }
  234|   162k|    }
  235|   340k|  }
  236|   187k|}
ixheaacd_check_env_data:
  289|  25.6k|                               ia_sbr_prev_frame_data_struct *ptr_prev_data) {
  290|  25.6k|  WORD16 *ptr_evn_sf = ptr_sbr_data->int_env_sf_arr;
  291|  25.6k|  FLOAT32 *ptr_evn_sf_float = ptr_sbr_data->flt_env_sf_arr;
  292|  25.6k|  WORD16 *ptr_prev_evn_sf = ptr_prev_data->sfb_nrg_prev;
  293|  25.6k|  WORD32 i;
  294|  25.6k|  FLAG error_code = 0;
  295|  25.6k|  WORD16 sbr_max_env_sf;
  296|  25.6k|  WORD32 amp_res = ptr_sbr_data->amp_res;
  297|       |
  298|  25.6k|  sbr_max_env_sf = (SBR_ENV_SF_MAX_VAL_1_5 >> amp_res);
  ------------------
  |  |  200|  25.6k|#define SBR_ENV_SF_MAX_VAL_1_5 70
  ------------------
  299|       |
  300|   678k|  for (i = 0; i < ptr_sbr_data->num_env_sfac; i++) {
  ------------------
  |  Branch (300:15): [True: 653k, False: 25.6k]
  ------------------
  301|   653k|    if (ptr_evn_sf[i] > sbr_max_env_sf) {
  ------------------
  |  Branch (301:9): [True: 105k, False: 547k]
  ------------------
  302|   105k|      error_code = 1;
  303|   105k|    }
  304|   653k|    if (ptr_evn_sf[i] < 0) {
  ------------------
  |  Branch (304:9): [True: 126k, False: 526k]
  ------------------
  305|   126k|      ptr_evn_sf[i] = 0;
  306|   126k|      ptr_evn_sf_float[i] = 0;
  307|   126k|    }
  308|   653k|  }
  309|       |
  310|   344k|  for (i = 0; i < ptr_header_data->pstr_freq_band_data->num_sf_bands[HIGH];
  ------------------
  |  |   28|   344k|#define HIGH 1
  ------------------
  |  Branch (310:15): [True: 318k, False: 25.6k]
  ------------------
  311|   318k|       i++) {
  312|   318k|    if (ptr_prev_evn_sf[i] < 0) {
  ------------------
  |  Branch (312:9): [True: 42.7k, False: 276k]
  ------------------
  313|  42.7k|      ptr_prev_evn_sf[i] = 0;
  314|   276k|    } else {
  315|   276k|      if (ptr_prev_evn_sf[i] > sbr_max_env_sf)
  ------------------
  |  Branch (315:11): [True: 56.3k, False: 219k]
  ------------------
  316|  56.3k|        ptr_prev_evn_sf[i] = sbr_max_env_sf;
  317|   276k|    }
  318|   318k|  }
  319|  25.6k|  return (WORD16)(error_code);
  320|  25.6k|}
ixheaacd_dequant_env_data:
  323|  53.6k|                               WORD32 amp_res) {
  324|  53.6k|  WORD32 i;
  325|  53.6k|  WORD32 num_env_sf = ptr_sbr_data->num_env_sfac;
  326|  53.6k|  WORD32 mantissa;
  327|  53.6k|  WORD32 amp_res_1;
  328|  53.6k|  WORD32 exponent;
  329|  53.6k|  WORD32 exp_add = (7 + NRG_EXP_OFFSET);
  ------------------
  |  |   32|  53.6k|#define NRG_EXP_OFFSET 16
  ------------------
  330|  53.6k|  WORD16 *ptr_env_sf = ptr_sbr_data->int_env_sf_arr;
  331|  53.6k|  const WORD32 mant_arr[2] = {0x4000, 0x5a80};
  332|       |
  333|  53.6k|  amp_res_1 = (1 - amp_res);
  334|       |
  335|   858k|  for (i = num_env_sf - 1; i >= 0; i--) {
  ------------------
  |  Branch (335:28): [True: 804k, False: 53.6k]
  ------------------
  336|   804k|    exponent = *ptr_env_sf;
  337|   804k|    mantissa = mant_arr[(exponent & amp_res_1)];
  338|   804k|    exponent = (exponent >> amp_res_1);
  339|   804k|    exponent = (exponent + exp_add);
  340|   804k|    *ptr_env_sf++ = (WORD16)(mantissa | (exponent & MASK_FOR_EXP));
  ------------------
  |  |   28|   804k|#define MASK_FOR_EXP ((1 << EXP_BITS) - 1)
  |  |  ------------------
  |  |  |  |   25|   804k|#define EXP_BITS 6
  |  |  ------------------
  ------------------
  341|   804k|  }
  342|  53.6k|}
ixheaacd_add_arr:
  378|   376k|VOID ixheaacd_add_arr(WORD16 *ptr1, WORD16 *ptr2, WORD32 num) {
  379|   376k|  WORD32 i;
  380|  1.08M|  for (i = num - 1; i >= 0; i--) {
  ------------------
  |  Branch (380:21): [True: 705k, False: 376k]
  ------------------
  381|   705k|    *ptr2 = (*ptr2 + *ptr1);
  382|   705k|    ptr2++;
  383|   705k|    ptr1++;
  384|   705k|  }
  385|   376k|}
ixheaacd_add_farr:
  387|   376k|VOID ixheaacd_add_farr(FLOAT32 *ptr1, FLOAT32 *ptr2, WORD32 num) {
  388|   376k|  WORD32 i;
  389|  1.08M|  for (i = num - 1; i >= 0; i--) {
  ------------------
  |  Branch (389:21): [True: 705k, False: 376k]
  ------------------
  390|   705k|    *ptr2 = (*ptr2 + *ptr1);
  391|   705k|    ptr2++;
  392|   705k|    ptr1++;
  393|   705k|  }
  394|   376k|}
ixheaacd_calc_noise_floor:
  400|   259k|    WORD32 audio_object_type) {
  401|   259k|  WORD32 i;
  402|   259k|  WORD32 num_nf_bands;
  403|   259k|  WORD32 num_noise_env;
  404|   259k|  WORD32 ixheaacd_drc_offset;
  405|   259k|  WORD16 *ptr_noise_floor = ptr_sbr_data->int_noise_floor;
  406|       |
  407|   259k|  WORD16 *ptr_prev_noise_floor = ptr_prev_data->prev_noise_level;
  408|   259k|  WORD16 *ptr1, *ptr2;
  409|   259k|  FLOAT32 *f_ptr1, *f_ptr2;
  410|   259k|  WORD32 num;
  411|   259k|  FLOAT32 *ptr_noise_floor_float = ptr_sbr_data->flt_noise_floor;
  412|       |
  413|   259k|  num_nf_bands = ptr_header_data->pstr_freq_band_data->num_nf_bands;
  414|   259k|  num_noise_env = ptr_sbr_data->str_frame_info_details.num_noise_env;
  415|       |
  416|   259k|  if (ptr_sbr_data->del_cod_dir_noise_arr[0] == DTDF_DIR_FREQ) {
  ------------------
  |  |   31|   259k|#define DTDF_DIR_FREQ 0
  ------------------
  |  Branch (416:7): [True: 173k, False: 85.8k]
  ------------------
  417|   173k|    ptr1 = ptr_noise_floor++;
  418|   173k|    ptr2 = ptr_noise_floor;
  419|   173k|    num = num_nf_bands - 1;
  420|   173k|    f_ptr1 = &ptr_noise_floor_float[0];
  421|   173k|    f_ptr2 = &ptr_noise_floor_float[1];
  422|   173k|  } else {
  423|  85.8k|    ptr1 = ptr_prev_noise_floor;
  424|  85.8k|    ptr2 = ptr_sbr_data->int_noise_floor;
  425|  85.8k|    f_ptr1 = &ptr_sbr_data->prev_noise_level[0];
  426|  85.8k|    f_ptr2 = &ptr_noise_floor_float[0];
  427|  85.8k|    num = num_nf_bands;
  428|  85.8k|  }
  429|       |
  430|   259k|  ixheaacd_add_arr(ptr1, ptr2, num);
  431|   259k|  ixheaacd_add_farr(f_ptr1, f_ptr2, num);
  432|       |
  433|   259k|  if (num_noise_env > 1) {
  ------------------
  |  Branch (433:7): [True: 116k, False: 143k]
  ------------------
  434|   116k|    if (ptr_sbr_data->del_cod_dir_noise_arr[1] == DTDF_DIR_FREQ) {
  ------------------
  |  |   31|   116k|#define DTDF_DIR_FREQ 0
  ------------------
  |  Branch (434:9): [True: 78.0k, False: 38.3k]
  ------------------
  435|  78.0k|      ptr1 = &ptr_sbr_data->int_noise_floor[num_nf_bands];
  436|  78.0k|      ptr2 = &ptr_sbr_data->int_noise_floor[(num_nf_bands + 1)];
  437|  78.0k|      f_ptr1 = &ptr_sbr_data->flt_noise_floor[num_nf_bands];
  438|  78.0k|      f_ptr2 = &ptr_sbr_data->flt_noise_floor[(num_nf_bands + 1)];
  439|  78.0k|      num = num_nf_bands - 1;
  440|  78.0k|    } else {
  441|  38.3k|      ptr1 = &ptr_sbr_data->int_noise_floor[0];
  442|  38.3k|      ptr2 = &ptr_sbr_data->int_noise_floor[num_nf_bands];
  443|  38.3k|      f_ptr1 = &ptr_sbr_data->flt_noise_floor[0];
  444|  38.3k|      f_ptr2 = &ptr_sbr_data->flt_noise_floor[num_nf_bands];
  445|  38.3k|      num = num_nf_bands;
  446|  38.3k|    }
  447|   116k|    ixheaacd_add_arr(ptr1, ptr2, num);
  448|   116k|    ixheaacd_add_farr(f_ptr1, f_ptr2, num);
  449|   116k|  }
  450|       |
  451|   259k|  ixheaacd_limit_noise_floor_fac(ptr_header_data, ptr_sbr_data);
  452|       |
  453|   259k|  ixheaacd_drc_offset = num_nf_bands * (num_noise_env - 1);
  454|   259k|  if (ixheaacd_drc_offset < 0 || ixheaacd_drc_offset >= MAX_NUM_NOISE_VALUES)
  ------------------
  |  |   46|   259k|#define MAX_NUM_NOISE_VALUES (MAX_NOISE_ENVELOPES * MAX_NOISE_COEFFS)
  |  |  ------------------
  |  |  |  |   44|   259k|#define MAX_NOISE_ENVELOPES 2
  |  |  ------------------
  |  |               #define MAX_NUM_NOISE_VALUES (MAX_NOISE_ENVELOPES * MAX_NOISE_COEFFS)
  |  |  ------------------
  |  |  |  |   45|   259k|#define MAX_NOISE_COEFFS 5
  |  |  ------------------
  ------------------
  |  Branch (454:7): [True: 18, False: 259k]
  |  Branch (454:34): [True: 0, False: 259k]
  ------------------
  455|     18|    return IA_FATAL_ERROR;
  ------------------
  |  |   25|     18|#define IA_FATAL_ERROR 0x80000000
  ------------------
  456|   259k|  ptr1 = &ptr_sbr_data->int_noise_floor[ixheaacd_drc_offset];
  457|   259k|  ptr2 = ptr_prev_noise_floor;
  458|       |
  459|   259k|  memcpy(ptr2, ptr1, sizeof(WORD16) * (num_nf_bands));
  460|   259k|  if (!ptr_header_data->usac_flag) {
  ------------------
  |  Branch (460:7): [True: 60.8k, False: 198k]
  ------------------
  461|   183k|    for (i = 0; i < num_nf_bands; i++) {
  ------------------
  |  Branch (461:17): [True: 122k, False: 60.8k]
  ------------------
  462|   122k|      ptr_sbr_data->prev_noise_level[i] = ptr_prev_noise_floor[i];
  463|   122k|    }
  464|  60.8k|  }
  465|   259k|  if (audio_object_type != AOT_ER_AAC_ELD && ptr_header_data->enh_sbr) {
  ------------------
  |  Branch (465:7): [True: 209k, False: 50.4k]
  |  Branch (465:46): [True: 209k, False: 0]
  ------------------
  466|   209k|    WORD32 noise_floor_exp, tot_nf_bands;
  467|       |
  468|   209k|    tot_nf_bands = (num_nf_bands * num_noise_env);
  469|   209k|    ptr_noise_floor = &ptr_sbr_data->int_noise_floor[0];
  470|       |
  471|  1.02M|    for (i = 0; i < tot_nf_bands; i++) {
  ------------------
  |  Branch (471:17): [True: 817k, False: 209k]
  ------------------
  472|   817k|      noise_floor_exp =
  473|   817k|          (NOISE_FLOOR_OFFSET_INT + 1 + NOISE_EXP_OFFSET - *ptr_noise_floor);
  ------------------
  |  |   25|   817k|#define NOISE_FLOOR_OFFSET_INT 6
  ------------------
                        (NOISE_FLOOR_OFFSET_INT + 1 + NOISE_EXP_OFFSET - *ptr_noise_floor);
  ------------------
  |  |   33|   817k|#define NOISE_EXP_OFFSET 38
  ------------------
  474|       |
  475|   817k|      *ptr_noise_floor_float++ = *ptr_noise_floor;
  476|   817k|      *ptr_noise_floor++ = (WORD16)(0x4000 + (noise_floor_exp & MASK_FOR_EXP));
  ------------------
  |  |   28|   817k|#define MASK_FOR_EXP ((1 << EXP_BITS) - 1)
  |  |  ------------------
  |  |  |  |   25|   817k|#define EXP_BITS 6
  |  |  ------------------
  ------------------
  477|   817k|    }
  478|   209k|  } else {
  479|  50.4k|    if (ptr_sbr_data->coupling_mode != COUPLING_BAL) {
  ------------------
  |  |   40|  50.4k|#define COUPLING_BAL 2
  ------------------
  |  Branch (479:9): [True: 42.1k, False: 8.30k]
  ------------------
  480|  42.1k|      WORD32 noise_floor_exp, tot_nf_bands;
  481|       |
  482|  42.1k|      tot_nf_bands = (num_nf_bands * num_noise_env);
  483|  42.1k|      ptr_noise_floor = &ptr_sbr_data->int_noise_floor[0];
  484|       |
  485|   151k|      for (i = 0; i < tot_nf_bands; i++) {
  ------------------
  |  Branch (485:19): [True: 109k, False: 42.1k]
  ------------------
  486|   109k|        noise_floor_exp =
  487|   109k|            (NOISE_FLOOR_OFFSET_INT + 1 + NOISE_EXP_OFFSET - *ptr_noise_floor);
  ------------------
  |  |   25|   109k|#define NOISE_FLOOR_OFFSET_INT 6
  ------------------
                          (NOISE_FLOOR_OFFSET_INT + 1 + NOISE_EXP_OFFSET - *ptr_noise_floor);
  ------------------
  |  |   33|   109k|#define NOISE_EXP_OFFSET 38
  ------------------
  488|   109k|        *ptr_noise_floor_float++ = *ptr_noise_floor;
  489|   109k|        *ptr_noise_floor++ = (WORD16)(0x4000 + (noise_floor_exp & MASK_FOR_EXP));
  ------------------
  |  |   28|   109k|#define MASK_FOR_EXP ((1 << EXP_BITS) - 1)
  |  |  ------------------
  |  |  |  |   25|   109k|#define EXP_BITS 6
  |  |  ------------------
  ------------------
  490|   109k|      }
  491|  42.1k|    }
  492|  50.4k|  }
  493|   259k|  return IA_NO_ERROR;
  ------------------
  |  |   23|   259k|#define IA_NO_ERROR 0x00000000
  ------------------
  494|   259k|}
ixheaacd_dec_sbrdata_for_pvc:
  500|  82.1k|    WORD32 audio_object_type) {
  501|  82.1k|  WORD32 err = 0;
  502|  82.1k|  err = ixheaacd_calc_noise_floor(ptr_header_data, ptr_sbr_data, ptr_prev_data,
  503|  82.1k|                                  audio_object_type);
  504|  82.1k|  if (err) return err;
  ------------------
  |  Branch (504:7): [True: 0, False: 82.1k]
  ------------------
  505|       |
  506|  82.1k|  if (!ptr_sbr_data->coupling_mode) {
  ------------------
  |  Branch (506:7): [True: 78.7k, False: 3.34k]
  ------------------
  507|  78.7k|    ptr_sbr_data->num_noise_sfac =
  508|  78.7k|        ptr_header_data->pstr_freq_band_data->num_nf_bands *
  509|  78.7k|        ptr_sbr_data->str_frame_info_details.num_noise_env;
  510|  78.7k|    ixheaacd_dequant_pvc_env_data(ptr_sbr_data->num_noise_sfac,
  511|  78.7k|                                  ptr_sbr_data->flt_noise_floor);
  512|  78.7k|  }
  513|  82.1k|  return IA_NO_ERROR;
  ------------------
  |  |   23|  82.1k|#define IA_NO_ERROR 0x00000000
  ------------------
  514|  82.1k|}
ixheaacd_sbr_env_dequant_coup_fix:
  520|  24.9k|    ixheaacd_misc_tables *pstr_common_tables) {
  521|  24.9k|  WORD32 i;
  522|  24.9k|  WORD32 num_env_sf = ptr_data_left->num_env_sfac;
  523|  24.9k|  WORD16 temp_left_mant, temp_right_mant, temp_right_plus1_mant, new_left_mant,
  524|  24.9k|      new_right_mant;
  525|  24.9k|  WORD16 temp_left_exp, temp_right_exp, temp_rightplus1_exp, new_left_exp,
  526|  24.9k|      new_right_exp;
  527|  24.9k|  WORD32 i_end;
  528|  24.9k|  WORD16 *r_data = ptr_data_right->int_env_sf_arr;
  529|  24.9k|  WORD16 *l_data = ptr_data_left->int_env_sf_arr;
  530|       |
  531|   671k|  for (i = 0; i < num_env_sf; i++) {
  ------------------
  |  Branch (531:15): [True: 646k, False: 24.9k]
  ------------------
  532|   646k|    temp_right_mant = (WORD16)(*r_data & MASK_M);
  ------------------
  |  |   27|   646k|#define MASK_M (((1 << (SHORT_BITS - EXP_BITS)) - 1) << EXP_BITS)
  |  |  ------------------
  |  |  |  |   23|   646k|#define SHORT_BITS 16
  |  |  ------------------
  |  |               #define MASK_M (((1 << (SHORT_BITS - EXP_BITS)) - 1) << EXP_BITS)
  |  |  ------------------
  |  |  |  |   25|   646k|#define EXP_BITS 6
  |  |  ------------------
  |  |               #define MASK_M (((1 << (SHORT_BITS - EXP_BITS)) - 1) << EXP_BITS)
  |  |  ------------------
  |  |  |  |   25|   646k|#define EXP_BITS 6
  |  |  ------------------
  ------------------
  533|   646k|    temp_right_exp = (WORD16)(*r_data & MASK_FOR_EXP);
  ------------------
  |  |   28|   646k|#define MASK_FOR_EXP ((1 << EXP_BITS) - 1)
  |  |  ------------------
  |  |  |  |   25|   646k|#define EXP_BITS 6
  |  |  ------------------
  ------------------
  534|       |
  535|   646k|    temp_right_exp = sub16_m(temp_right_exp, add16_m(18, NRG_EXP_OFFSET));
  ------------------
  |  |   48|   646k|#define sub16_m(a, b) ((a) - (b))
  ------------------
  536|   646k|    temp_left_mant = (WORD16)(*l_data & MASK_M);
  ------------------
  |  |   27|   646k|#define MASK_M (((1 << (SHORT_BITS - EXP_BITS)) - 1) << EXP_BITS)
  |  |  ------------------
  |  |  |  |   23|   646k|#define SHORT_BITS 16
  |  |  ------------------
  |  |               #define MASK_M (((1 << (SHORT_BITS - EXP_BITS)) - 1) << EXP_BITS)
  |  |  ------------------
  |  |  |  |   25|   646k|#define EXP_BITS 6
  |  |  ------------------
  |  |               #define MASK_M (((1 << (SHORT_BITS - EXP_BITS)) - 1) << EXP_BITS)
  |  |  ------------------
  |  |  |  |   25|   646k|#define EXP_BITS 6
  |  |  ------------------
  ------------------
  537|   646k|    temp_left_exp = (WORD16)(*l_data & MASK_FOR_EXP);
  ------------------
  |  |   28|   646k|#define MASK_FOR_EXP ((1 << EXP_BITS) - 1)
  |  |  ------------------
  |  |  |  |   25|   646k|#define EXP_BITS 6
  |  |  ------------------
  ------------------
  538|       |
  539|   646k|    temp_left_exp = sub16_m(temp_left_exp, NRG_EXP_OFFSET);
  ------------------
  |  |   48|   646k|#define sub16_m(a, b) ((a) - (b))
  ------------------
  540|       |
  541|   646k|    ixheaacd_fix_mant_exp_add(temp_right_mant, temp_right_exp, 0x4000, 1,
  542|   646k|                              &temp_right_plus1_mant, &temp_rightplus1_exp);
  543|       |
  544|   646k|    new_right_exp = ixheaacd_fix_mant_div(temp_left_mant, temp_right_plus1_mant,
  545|   646k|                                          &new_right_mant, pstr_common_tables);
  546|       |
  547|   646k|    new_right_exp += temp_left_exp - temp_rightplus1_exp + 2;
  548|       |
  549|   646k|    new_left_mant = ixheaac_mult16_shl(temp_right_mant, new_right_mant);
  550|       |
  551|   646k|    new_left_exp = add16_m(temp_right_exp, new_right_exp);
  ------------------
  |  |   47|   646k|#define add16_m(a, b) ((a) + (b))
  ------------------
  552|       |
  553|   646k|    *r_data++ = (WORD16)(((new_right_mant + ROUNDING) & MASK_M) +
  ------------------
  |  |   31|   646k|#define ROUNDING (1 << (EXP_BITS - 1))
  |  |  ------------------
  |  |  |  |   25|   646k|#define EXP_BITS 6
  |  |  ------------------
  ------------------
                  *r_data++ = (WORD16)(((new_right_mant + ROUNDING) & MASK_M) +
  ------------------
  |  |   27|   646k|#define MASK_M (((1 << (SHORT_BITS - EXP_BITS)) - 1) << EXP_BITS)
  |  |  ------------------
  |  |  |  |   23|   646k|#define SHORT_BITS 16
  |  |  ------------------
  |  |               #define MASK_M (((1 << (SHORT_BITS - EXP_BITS)) - 1) << EXP_BITS)
  |  |  ------------------
  |  |  |  |   25|   646k|#define EXP_BITS 6
  |  |  ------------------
  |  |               #define MASK_M (((1 << (SHORT_BITS - EXP_BITS)) - 1) << EXP_BITS)
  |  |  ------------------
  |  |  |  |   25|   646k|#define EXP_BITS 6
  |  |  ------------------
  ------------------
  554|   646k|                         ((new_right_exp + NRG_EXP_OFFSET) & MASK_FOR_EXP));
  ------------------
  |  |   32|   646k|#define NRG_EXP_OFFSET 16
  ------------------
                                       ((new_right_exp + NRG_EXP_OFFSET) & MASK_FOR_EXP));
  ------------------
  |  |   28|   646k|#define MASK_FOR_EXP ((1 << EXP_BITS) - 1)
  |  |  ------------------
  |  |  |  |   25|   646k|#define EXP_BITS 6
  |  |  ------------------
  ------------------
  555|   646k|    *l_data++ = (WORD16)(((new_left_mant + ROUNDING) & MASK_M) +
  ------------------
  |  |   31|   646k|#define ROUNDING (1 << (EXP_BITS - 1))
  |  |  ------------------
  |  |  |  |   25|   646k|#define EXP_BITS 6
  |  |  ------------------
  ------------------
                  *l_data++ = (WORD16)(((new_left_mant + ROUNDING) & MASK_M) +
  ------------------
  |  |   27|   646k|#define MASK_M (((1 << (SHORT_BITS - EXP_BITS)) - 1) << EXP_BITS)
  |  |  ------------------
  |  |  |  |   23|   646k|#define SHORT_BITS 16
  |  |  ------------------
  |  |               #define MASK_M (((1 << (SHORT_BITS - EXP_BITS)) - 1) << EXP_BITS)
  |  |  ------------------
  |  |  |  |   25|   646k|#define EXP_BITS 6
  |  |  ------------------
  |  |               #define MASK_M (((1 << (SHORT_BITS - EXP_BITS)) - 1) << EXP_BITS)
  |  |  ------------------
  |  |  |  |   25|   646k|#define EXP_BITS 6
  |  |  ------------------
  ------------------
  556|   646k|                         ((new_left_exp + NRG_EXP_OFFSET) & MASK_FOR_EXP));
  ------------------
  |  |   32|   646k|#define NRG_EXP_OFFSET 16
  ------------------
                                       ((new_left_exp + NRG_EXP_OFFSET) & MASK_FOR_EXP));
  ------------------
  |  |   28|   646k|#define MASK_FOR_EXP ((1 << EXP_BITS) - 1)
  |  |  ------------------
  |  |  |  |   25|   646k|#define EXP_BITS 6
  |  |  ------------------
  ------------------
  557|   646k|  }
  558|       |
  559|  24.9k|  i_end = ptr_header_data->pstr_freq_band_data->num_nf_bands *
  560|  24.9k|          ptr_data_left->str_frame_info_details.num_noise_env;
  561|  24.9k|  r_data = ptr_data_right->int_noise_floor;
  562|  24.9k|  l_data = ptr_data_left->int_noise_floor;
  563|       |
  564|   112k|  for (i = i_end - 1; i >= 0; i--) {
  ------------------
  |  Branch (564:23): [True: 88.0k, False: 24.9k]
  ------------------
  565|  88.0k|    temp_left_exp =
  566|  88.0k|        sub16_m((WORD16)(*l_data & (WORD16)MASK_FOR_EXP), NOISE_EXP_OFFSET);
  ------------------
  |  |   48|  88.0k|#define sub16_m(a, b) ((a) - (b))
  ------------------
  567|  88.0k|    temp_right_exp = sub16_m(*r_data, 12);
  ------------------
  |  |   48|  88.0k|#define sub16_m(a, b) ((a) - (b))
  ------------------
  568|       |
  569|  88.0k|    ixheaacd_fix_mant_exp_add(0x4000, ixheaac_add16(1, temp_right_exp), 0x4000,
  570|  88.0k|                              1, &temp_right_plus1_mant, &temp_rightplus1_exp);
  571|       |
  572|  88.0k|    new_right_exp = ixheaacd_fix_mant_div(0x4000, temp_right_plus1_mant,
  573|  88.0k|                                          &new_right_mant, pstr_common_tables);
  574|       |
  575|  88.0k|    new_right_exp += temp_left_exp - temp_rightplus1_exp + 2;
  576|       |
  577|  88.0k|    new_left_mant = new_right_mant;
  578|  88.0k|    new_left_exp = add16_m(new_right_exp, temp_right_exp);
  ------------------
  |  |   47|  88.0k|#define add16_m(a, b) ((a) + (b))
  ------------------
  579|  88.0k|    *r_data++ = (WORD16)(((new_right_mant + ROUNDING) & MASK_M) +
  ------------------
  |  |   31|  88.0k|#define ROUNDING (1 << (EXP_BITS - 1))
  |  |  ------------------
  |  |  |  |   25|  88.0k|#define EXP_BITS 6
  |  |  ------------------
  ------------------
                  *r_data++ = (WORD16)(((new_right_mant + ROUNDING) & MASK_M) +
  ------------------
  |  |   27|  88.0k|#define MASK_M (((1 << (SHORT_BITS - EXP_BITS)) - 1) << EXP_BITS)
  |  |  ------------------
  |  |  |  |   23|  88.0k|#define SHORT_BITS 16
  |  |  ------------------
  |  |               #define MASK_M (((1 << (SHORT_BITS - EXP_BITS)) - 1) << EXP_BITS)
  |  |  ------------------
  |  |  |  |   25|  88.0k|#define EXP_BITS 6
  |  |  ------------------
  |  |               #define MASK_M (((1 << (SHORT_BITS - EXP_BITS)) - 1) << EXP_BITS)
  |  |  ------------------
  |  |  |  |   25|  88.0k|#define EXP_BITS 6
  |  |  ------------------
  ------------------
  580|  88.0k|                         ((new_right_exp + NOISE_EXP_OFFSET) & MASK_FOR_EXP));
  ------------------
  |  |   33|  88.0k|#define NOISE_EXP_OFFSET 38
  ------------------
                                       ((new_right_exp + NOISE_EXP_OFFSET) & MASK_FOR_EXP));
  ------------------
  |  |   28|  88.0k|#define MASK_FOR_EXP ((1 << EXP_BITS) - 1)
  |  |  ------------------
  |  |  |  |   25|  88.0k|#define EXP_BITS 6
  |  |  ------------------
  ------------------
  581|  88.0k|    *l_data++ = (WORD16)(((new_left_mant + ROUNDING) & MASK_M) +
  ------------------
  |  |   31|  88.0k|#define ROUNDING (1 << (EXP_BITS - 1))
  |  |  ------------------
  |  |  |  |   25|  88.0k|#define EXP_BITS 6
  |  |  ------------------
  ------------------
                  *l_data++ = (WORD16)(((new_left_mant + ROUNDING) & MASK_M) +
  ------------------
  |  |   27|  88.0k|#define MASK_M (((1 << (SHORT_BITS - EXP_BITS)) - 1) << EXP_BITS)
  |  |  ------------------
  |  |  |  |   23|  88.0k|#define SHORT_BITS 16
  |  |  ------------------
  |  |               #define MASK_M (((1 << (SHORT_BITS - EXP_BITS)) - 1) << EXP_BITS)
  |  |  ------------------
  |  |  |  |   25|  88.0k|#define EXP_BITS 6
  |  |  ------------------
  |  |               #define MASK_M (((1 << (SHORT_BITS - EXP_BITS)) - 1) << EXP_BITS)
  |  |  ------------------
  |  |  |  |   25|  88.0k|#define EXP_BITS 6
  |  |  ------------------
  ------------------
  582|  88.0k|                         ((new_left_exp + NOISE_EXP_OFFSET) & MASK_FOR_EXP));
  ------------------
  |  |   33|  88.0k|#define NOISE_EXP_OFFSET 38
  ------------------
                                       ((new_left_exp + NOISE_EXP_OFFSET) & MASK_FOR_EXP));
  ------------------
  |  |   28|  88.0k|#define MASK_FOR_EXP ((1 << EXP_BITS) - 1)
  |  |  ------------------
  |  |  |  |   25|  88.0k|#define EXP_BITS 6
  |  |  ------------------
  ------------------
  583|  88.0k|  }
  584|  24.9k|}
ixheaacd_sbr_env_dequant_coup:
  588|  24.9k|    ia_sbr_frame_info_data_struct *ptr_data_ch_1) {
  589|  24.9k|  FLOAT32 *ptr_env_sf_left = ptr_data_ch_0->flt_env_sf_arr;
  590|  24.9k|  FLOAT32 *ptr_env_sf_right = ptr_data_ch_1->flt_env_sf_arr;
  591|  24.9k|  FLOAT32 *ptr_noise_floor_left = ptr_data_ch_0->flt_noise_floor;
  592|  24.9k|  FLOAT32 *ptr_noise_floor_right = ptr_data_ch_1->flt_noise_floor;
  593|  24.9k|  WORD32 num_env_sf = ptr_data_ch_0->num_env_sfac;
  594|  24.9k|  WORD32 num_noise_fac = ptr_data_ch_0->num_noise_sfac;
  595|  24.9k|  WORD32 amp_res = ptr_data_ch_0->amp_res;
  596|       |
  597|  24.9k|  WORD32 i;
  598|  24.9k|  FLOAT32 temp_l, temp_r;
  599|  24.9k|  const FLOAT32 pan_offset[2] = {24.0f, 12.0f};
  600|  24.9k|  const FLOAT32 a_arr[2] = {0.5f, 1.0f};
  601|       |
  602|  24.9k|  FLOAT32 a = a_arr[amp_res];
  603|       |
  604|   671k|  for (i = 0; i < num_env_sf; i++) {
  ------------------
  |  Branch (604:15): [True: 646k, False: 24.9k]
  ------------------
  605|   646k|    temp_l = ptr_env_sf_left[i];
  606|   646k|    temp_r = ptr_env_sf_right[i];
  607|       |
  608|   646k|    ptr_env_sf_left[i] =
  609|   646k|        (FLOAT32)(64 * (pow(2, temp_l * a + 1) /
  610|   646k|                        (1 + pow(2, (pan_offset[amp_res] - temp_r) * a))));
  611|   646k|    ptr_env_sf_right[i] =
  612|   646k|        (FLOAT32)(64 * (pow(2, temp_l * a + 1) /
  613|   646k|                        (1 + pow(2, (temp_r - pan_offset[amp_res]) * a))));
  614|   646k|  }
  615|       |
  616|   112k|  for (i = 0; i < num_noise_fac; i++) {
  ------------------
  |  Branch (616:15): [True: 88.0k, False: 24.9k]
  ------------------
  617|  88.0k|    temp_l = ptr_noise_floor_left[i];
  618|  88.0k|    temp_r = ptr_noise_floor_right[i];
  619|       |
  620|  88.0k|    ptr_noise_floor_left[i] =
  621|  88.0k|        (FLOAT32)(pow(2, NOISE_FLOOR_OFFSET - temp_l + 1) /
  ------------------
  |  |   92|  88.0k|#define NOISE_FLOOR_OFFSET 6.0f
  ------------------
  622|  88.0k|                  (1 + pow(2, pan_offset[1] - temp_r)));
  623|  88.0k|    ptr_noise_floor_right[i] =
  624|  88.0k|        (FLOAT32)(pow(2, NOISE_FLOOR_OFFSET - temp_l + 1) /
  ------------------
  |  |   92|  88.0k|#define NOISE_FLOOR_OFFSET 6.0f
  ------------------
  625|  88.0k|                  (1 + pow(2, temp_r - pan_offset[1])));
  626|  88.0k|  }
  627|  24.9k|}
ixheaacd_dec_sbrdata:
  635|   117k|                                  WORD32 audio_object_type, WORD32 ec_flag) {
  636|   117k|  FLAG error_code;
  637|   117k|  WORD32 err = 0;
  638|   117k|  WORD16 temp_sfb_nrg_prev[MAX_FREQ_COEFFS];
  639|   117k|  WORD32 usac_flag = ptr_header_data_ch_0->usac_flag |
  640|   117k|                     ptr_header_data_ch_0->enh_sbr;
  641|       |
  642|   117k|  if (ec_flag) {
  ------------------
  |  Branch (642:7): [True: 0, False: 117k]
  ------------------
  643|      0|    memcpy(temp_sfb_nrg_prev, ptr_prev_data_ch_0->sfb_nrg_prev, MAX_FREQ_COEFFS * sizeof(WORD16));
  ------------------
  |  |   51|      0|#define MAX_FREQ_COEFFS 56
  ------------------
  644|      0|  }
  645|       |
  646|   117k|  err = ixheaacd_dec_envelope(ptr_header_data_ch_0, ptr_sbr_data_ch_0, ptr_prev_data_ch_0,
  647|   117k|                              ptr_prev_data_ch_1, ptr_common_tables, audio_object_type, ec_flag);
  648|       |
  649|   117k|  if (err) return err;
  ------------------
  |  Branch (649:7): [True: 0, False: 117k]
  ------------------
  650|       |
  651|   117k|  err = ixheaacd_calc_noise_floor(ptr_header_data_ch_0, ptr_sbr_data_ch_0,
  652|   117k|                                  ptr_prev_data_ch_0, audio_object_type);
  653|   117k|  if (err) return err;
  ------------------
  |  Branch (653:7): [True: 17, False: 117k]
  ------------------
  654|   117k|  if ((!ptr_sbr_data_ch_0->coupling_mode &&
  ------------------
  |  Branch (654:8): [True: 93.5k, False: 24.3k]
  ------------------
  655|  93.5k|     ((usac_flag) && (audio_object_type != AOT_ER_AAC_ELD))) || ldmps_present) {
  ------------------
  |  Branch (655:7): [True: 93.5k, False: 0]
  |  Branch (655:22): [True: 72.9k, False: 20.5k]
  |  Branch (655:65): [True: 2.36k, False: 42.4k]
  ------------------
  656|  75.3k|    ptr_sbr_data_ch_0->num_noise_sfac =
  657|  75.3k|        ptr_header_data_ch_0->pstr_freq_band_data->num_nf_bands *
  658|  75.3k|        ptr_sbr_data_ch_0->str_frame_info_details.num_noise_env;
  659|       |
  660|  75.3k|    ixheaacd_dequant_esbr_env_data(
  661|  75.3k|        ptr_sbr_data_ch_0->flt_env_sf_arr, ptr_sbr_data_ch_0->num_env_sfac,
  662|  75.3k|        ptr_sbr_data_ch_0->num_noise_sfac, ptr_sbr_data_ch_0->amp_res,
  663|  75.3k|        ptr_sbr_data_ch_0->flt_noise_floor);
  664|  75.3k|  }
  665|       |
  666|   117k|  if (ptr_sbr_data_ch_1 != NULL) {
  ------------------
  |  Branch (666:7): [True: 59.8k, False: 57.9k]
  ------------------
  667|  59.8k|    error_code = ptr_header_data_ch_0->err_flag;
  668|  59.8k|    err =
  669|  59.8k|        ixheaacd_dec_envelope(ptr_header_data_ch_1, ptr_sbr_data_ch_1, ptr_prev_data_ch_1,
  670|  59.8k|                              ptr_prev_data_ch_0, ptr_common_tables, audio_object_type, ec_flag);
  671|       |
  672|  59.8k|    if (err) return err;
  ------------------
  |  Branch (672:9): [True: 0, False: 59.8k]
  ------------------
  673|       |
  674|  59.8k|    err = ixheaacd_calc_noise_floor(ptr_header_data_ch_1, ptr_sbr_data_ch_1,
  675|  59.8k|                                    ptr_prev_data_ch_1, audio_object_type);
  676|       |
  677|  59.8k|    if (err) return err;
  ------------------
  |  Branch (677:9): [True: 1, False: 59.8k]
  ------------------
  678|       |
  679|  59.8k|    if (!ptr_sbr_data_ch_1->coupling_mode &&
  ------------------
  |  Branch (679:9): [True: 34.9k, False: 24.9k]
  ------------------
  680|  34.9k|        ((usac_flag) && (audio_object_type != AOT_ER_AAC_ELD))) {
  ------------------
  |  Branch (680:10): [True: 34.9k, False: 0]
  |  Branch (680:25): [True: 20.9k, False: 13.9k]
  ------------------
  681|  20.9k|      ptr_sbr_data_ch_1->num_noise_sfac =
  682|  20.9k|          ptr_header_data_ch_1->pstr_freq_band_data->num_nf_bands *
  683|  20.9k|          ptr_sbr_data_ch_1->str_frame_info_details.num_noise_env;
  684|       |
  685|  20.9k|      ixheaacd_dequant_esbr_env_data(
  686|  20.9k|          ptr_sbr_data_ch_1->flt_env_sf_arr, ptr_sbr_data_ch_1->num_env_sfac,
  687|  20.9k|          ptr_sbr_data_ch_1->num_noise_sfac, ptr_sbr_data_ch_1->amp_res,
  688|  20.9k|          ptr_sbr_data_ch_1->flt_noise_floor);
  689|  20.9k|    }
  690|  59.8k|    if (ec_flag) {
  ------------------
  |  Branch (690:9): [True: 0, False: 59.8k]
  ------------------
  691|      0|      if ((!ptr_header_data_ch_0->usac_flag) || (audio_object_type == AOT_ER_AAC_ELD)) {
  ------------------
  |  Branch (691:11): [True: 0, False: 0]
  |  Branch (691:49): [True: 0, False: 0]
  ------------------
  692|      0|        if (!error_code && ptr_header_data_ch_0->err_flag) {
  ------------------
  |  Branch (692:13): [True: 0, False: 0]
  |  Branch (692:28): [True: 0, False: 0]
  ------------------
  693|      0|          memcpy(ptr_prev_data_ch_0->sfb_nrg_prev, temp_sfb_nrg_prev,
  694|      0|                 MAX_FREQ_COEFFS * sizeof(WORD16));
  ------------------
  |  |   51|      0|#define MAX_FREQ_COEFFS 56
  ------------------
  695|      0|          err = ixheaacd_dec_envelope(ptr_header_data_ch_0, ptr_sbr_data_ch_0, ptr_prev_data_ch_0,
  696|      0|                                      ptr_prev_data_ch_1, ptr_common_tables, audio_object_type,
  697|      0|                                      ec_flag);
  698|       |
  699|      0|          if (err) return err;
  ------------------
  |  Branch (699:15): [True: 0, False: 0]
  ------------------
  700|      0|        }
  701|      0|      }
  702|  59.8k|    } else {
  703|  59.8k|      if ((!usac_flag) || (audio_object_type == AOT_ER_AAC_ELD)) {
  ------------------
  |  Branch (703:11): [True: 0, False: 59.8k]
  |  Branch (703:27): [True: 22.2k, False: 37.5k]
  ------------------
  704|  22.2k|        if (!error_code && ptr_header_data_ch_0->err_flag) {
  ------------------
  |  Branch (704:13): [True: 9.49k, False: 12.7k]
  |  Branch (704:28): [True: 3.14k, False: 6.35k]
  ------------------
  705|  3.14k|          err = ixheaacd_dec_envelope(ptr_header_data_ch_0, ptr_sbr_data_ch_0, ptr_prev_data_ch_0,
  706|  3.14k|                                      ptr_prev_data_ch_1, ptr_common_tables, audio_object_type,
  707|  3.14k|                                      ec_flag);
  708|       |
  709|  3.14k|          if (err) return err;
  ------------------
  |  Branch (709:15): [True: 0, False: 3.14k]
  ------------------
  710|  3.14k|        }
  711|  22.2k|      }
  712|  59.8k|    }
  713|       |
  714|  59.8k|    if (ptr_sbr_data_ch_0->coupling_mode) {
  ------------------
  |  Branch (714:9): [True: 24.9k, False: 34.9k]
  ------------------
  715|  24.9k|      ptr_sbr_data_ch_0->num_noise_sfac =
  716|  24.9k|          ptr_header_data_ch_1->pstr_freq_band_data->num_nf_bands *
  717|  24.9k|          ptr_sbr_data_ch_1->str_frame_info_details.num_noise_env;
  718|  24.9k|      ixheaacd_sbr_env_dequant_coup_fix(ptr_header_data_ch_0, ptr_sbr_data_ch_0,
  719|  24.9k|                                        ptr_sbr_data_ch_1, ptr_common_tables);
  720|       |
  721|  24.9k|      ixheaacd_sbr_env_dequant_coup(ptr_sbr_data_ch_0, ptr_sbr_data_ch_1);
  722|  24.9k|    }
  723|  59.8k|  }
  724|       |
  725|   117k|  return 0;
  726|   117k|}
ixheaacd_dec_envelope:
  732|   187k|                                   WORD32 audio_object_type, WORD32 ec_flag) {
  733|   187k|  FLAG error_code;
  734|   187k|  WORD32 err;
  735|   187k|  WORD16 env_sf_local_arr[MAX_FREQ_COEFFS];
  736|   187k|  WORD32 enh_sbr = ptr_header_data->enh_sbr;
  737|   187k|  WORD32 usac_flag = enh_sbr | ptr_header_data->usac_flag;
  738|   187k|  WORD32 temp_1 =
  739|   187k|      ptr_prev_data_ch_0->end_position - ptr_header_data->num_time_slots;
  740|       |
  741|   187k|  if (temp_1 < 0) return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
  |  Branch (741:7): [True: 0, False: 187k]
  ------------------
  742|   187k|  temp_1 = ptr_sbr_data->str_frame_info_details.border_vec[0] - temp_1;
  743|       |
  744|   187k|  if ((!ptr_header_data->err_flag_prev) && (!ptr_header_data->err_flag) &&
  ------------------
  |  Branch (744:7): [True: 124k, False: 63.4k]
  |  Branch (744:44): [True: 115k, False: 8.48k]
  ------------------
  745|   115k|      (temp_1 != 0)) {
  ------------------
  |  Branch (745:7): [True: 8.29k, False: 107k]
  ------------------
  746|  8.29k|    if (ptr_sbr_data->del_cod_dir_arr[0] == DTDF_DIR_TIME) {
  ------------------
  |  |   30|  8.29k|#define DTDF_DIR_TIME 1
  ------------------
  |  Branch (746:9): [True: 1.40k, False: 6.89k]
  ------------------
  747|  1.40k|      ptr_header_data->err_flag = 1;
  748|  6.89k|    } else {
  749|  6.89k|      ptr_header_data->err_flag_prev = 1;
  750|  6.89k|    }
  751|  8.29k|  }
  752|   187k|  if (ec_flag) {
  ------------------
  |  Branch (752:7): [True: 0, False: 187k]
  ------------------
  753|      0|    if (ptr_header_data->err_flag_prev && (!ptr_header_data->err_flag)) {
  ------------------
  |  Branch (753:9): [True: 0, False: 0]
  |  Branch (753:43): [True: 0, False: 0]
  ------------------
  754|      0|      if (ptr_sbr_data->del_cod_dir_arr[0] != 0) {
  ------------------
  |  Branch (754:11): [True: 0, False: 0]
  ------------------
  755|      0|        ptr_header_data->err_flag = 1;
  756|      0|      }
  757|      0|    }
  758|      0|  }
  759|   187k|  if (ec_flag && ptr_header_data->err_flag &&
  ------------------
  |  Branch (759:7): [True: 0, False: 187k]
  |  Branch (759:18): [True: 0, False: 0]
  ------------------
  760|      0|      ((!ptr_header_data->usac_flag) || (audio_object_type == AOT_ER_AAC_ELD))) {
  ------------------
  |  Branch (760:8): [True: 0, False: 0]
  |  Branch (760:41): [True: 0, False: 0]
  ------------------
  761|      0|    ixheaacd_lean_sbrconcealment(ptr_header_data, ptr_sbr_data, ptr_prev_data_ch_0);
  762|       |
  763|      0|    ixheaacd_process_del_cod_env_data(ptr_header_data, ptr_sbr_data, ptr_prev_data_ch_0);
  764|   187k|  } else if (ptr_header_data->err_flag &&
  ------------------
  |  Branch (764:14): [True: 59.2k, False: 128k]
  ------------------
  765|  59.2k|             ((!usac_flag) || (audio_object_type == AOT_ER_AAC_ELD))) {
  ------------------
  |  Branch (765:15): [True: 0, False: 59.2k]
  |  Branch (765:31): [True: 34.9k, False: 24.2k]
  ------------------
  766|  34.9k|    ixheaacd_lean_sbrconcealment(ptr_header_data, ptr_sbr_data, ptr_prev_data_ch_0);
  767|       |
  768|  34.9k|    ixheaacd_process_del_cod_env_data(ptr_header_data, ptr_sbr_data, ptr_prev_data_ch_0);
  769|   152k|  } else {
  770|   152k|    WORD32 num = ptr_header_data->pstr_freq_band_data->num_sf_bands[HIGH];
  ------------------
  |  |   28|   152k|#define HIGH 1
  ------------------
  771|   152k|    if (ptr_header_data->err_flag_prev && ((!usac_flag) ||
  ------------------
  |  Branch (771:9): [True: 42.8k, False: 110k]
  |  Branch (771:44): [True: 0, False: 42.8k]
  ------------------
  772|  42.8k|        (audio_object_type == AOT_ER_AAC_ELD))) {
  ------------------
  |  Branch (772:9): [True: 9.19k, False: 33.6k]
  ------------------
  773|  9.19k|      WORD16 *ptr1, *ptr2;
  774|  9.19k|      WORD32 i;
  775|       |
  776|  9.19k|      err = ixheaacd_wrong_timing_compensate(ptr_header_data, ptr_sbr_data,
  777|  9.19k|                                             ptr_prev_data_ch_0,
  778|  9.19k|                                             pstr_common_tables);
  779|       |
  780|  9.19k|      if (err) return err;
  ------------------
  |  Branch (780:11): [True: 0, False: 9.19k]
  ------------------
  781|       |
  782|  9.19k|      if (ptr_sbr_data->coupling_mode !=
  ------------------
  |  Branch (782:11): [True: 2.65k, False: 6.53k]
  ------------------
  783|  9.19k|          (WORD16)ptr_prev_data_ch_0->coupling_mode) {
  784|  2.65k|        if (ptr_prev_data_ch_0->coupling_mode == COUPLING_BAL) {
  ------------------
  |  |   40|  2.65k|#define COUPLING_BAL 2
  ------------------
  |  Branch (784:13): [True: 250, False: 2.40k]
  ------------------
  785|    250|          memcpy(ptr_prev_data_ch_0->sfb_nrg_prev,
  786|    250|                 ptr_prev_data_ch_1->sfb_nrg_prev, sizeof(WORD16) * num);
  787|  2.40k|        } else {
  788|  2.40k|          if (ptr_sbr_data->coupling_mode == COUPLING_LEVEL) {
  ------------------
  |  |   39|  2.40k|#define COUPLING_LEVEL 1
  ------------------
  |  Branch (788:15): [True: 1.26k, False: 1.13k]
  ------------------
  789|  1.26k|            ptr1 = ptr_prev_data_ch_0->sfb_nrg_prev;
  790|  1.26k|            ptr2 = ptr_prev_data_ch_1->sfb_nrg_prev;
  791|       |
  792|  15.5k|            for (i = 0; i < num; i++) {
  ------------------
  |  Branch (792:25): [True: 14.3k, False: 1.26k]
  ------------------
  793|  14.3k|              *ptr1 = (add16_m(*ptr1, *ptr2) >> 1);
  ------------------
  |  |   47|  14.3k|#define add16_m(a, b) ((a) + (b))
  ------------------
  794|  14.3k|              ptr2++;
  795|  14.3k|              ptr1++;
  796|  14.3k|            }
  797|  1.26k|          } else {
  798|  1.13k|            if (ptr_sbr_data->coupling_mode == COUPLING_BAL) {
  ------------------
  |  |   40|  1.13k|#define COUPLING_BAL 2
  ------------------
  |  Branch (798:17): [True: 788, False: 349]
  ------------------
  799|    788|              memset(ptr_prev_data_ch_0->sfb_nrg_prev, SBR_ENERGY_PAN_OFFSET,
  ------------------
  |  |  199|    788|#define SBR_ENERGY_PAN_OFFSET 12
  ------------------
  800|    788|                     sizeof(WORD16) * num);
  801|    788|            }
  802|  1.13k|          }
  803|  2.40k|        }
  804|  2.65k|      }
  805|  9.19k|    }
  806|       |
  807|   152k|    memcpy(env_sf_local_arr, ptr_prev_data_ch_0->sfb_nrg_prev,
  808|   152k|           sizeof(WORD16) * MAX_FREQ_COEFFS);
  ------------------
  |  |   51|   152k|#define MAX_FREQ_COEFFS 56
  ------------------
  809|       |
  810|   152k|    ixheaacd_process_del_cod_env_data(ptr_header_data, ptr_sbr_data,
  811|   152k|                                      ptr_prev_data_ch_0);
  812|       |
  813|   152k|    if ((!usac_flag)||(audio_object_type == AOT_ER_AAC_ELD)) {
  ------------------
  |  Branch (813:9): [True: 0, False: 152k]
  |  Branch (813:23): [True: 25.6k, False: 127k]
  ------------------
  814|  25.6k|      error_code = ixheaacd_check_env_data(ptr_header_data, ptr_sbr_data,
  815|  25.6k|                                           ptr_prev_data_ch_0);
  816|       |
  817|  25.6k|      if (error_code) {
  ------------------
  |  Branch (817:11): [True: 6.99k, False: 18.7k]
  ------------------
  818|  6.99k|        ptr_header_data->err_flag = 1;
  819|       |
  820|  6.99k|        memcpy(ptr_prev_data_ch_0->sfb_nrg_prev, env_sf_local_arr,
  821|  6.99k|               sizeof(WORD16) * MAX_FREQ_COEFFS);
  ------------------
  |  |   51|  6.99k|#define MAX_FREQ_COEFFS 56
  ------------------
  822|       |
  823|  6.99k|        err = ixheaacd_dec_envelope(ptr_header_data, ptr_sbr_data, ptr_prev_data_ch_0,
  824|  6.99k|                                    ptr_prev_data_ch_1, pstr_common_tables, audio_object_type,
  825|  6.99k|                                    ec_flag);
  826|       |
  827|  6.99k|        if (err) return err;
  ------------------
  |  Branch (827:13): [True: 0, False: 6.99k]
  ------------------
  828|  6.99k|        return 0;
  829|  6.99k|      }
  830|  25.6k|    }
  831|   152k|  }
  832|   180k|  if (ec_flag) {
  ------------------
  |  Branch (832:7): [True: 0, False: 180k]
  ------------------
  833|      0|    if ((!ptr_header_data->usac_flag) || (audio_object_type == AOT_ER_AAC_ELD)) {
  ------------------
  |  Branch (833:9): [True: 0, False: 0]
  |  Branch (833:42): [True: 0, False: 0]
  ------------------
  834|      0|      ixheaacd_dequant_env_data(ptr_sbr_data, ptr_sbr_data->amp_res);
  835|      0|    }
  836|   180k|  } else {
  837|   180k|    if ((!usac_flag) || (audio_object_type == AOT_ER_AAC_ELD)) {
  ------------------
  |  Branch (837:9): [True: 0, False: 180k]
  |  Branch (837:25): [True: 53.6k, False: 127k]
  ------------------
  838|  53.6k|      ixheaacd_dequant_env_data(ptr_sbr_data, ptr_sbr_data->amp_res);
  839|  53.6k|    }
  840|   180k|  }
  841|       |
  842|   180k|  return 0;
  843|   187k|}
ixheaacd_adj_timeslot:
  853|   723k|                           ia_sbr_tables_struct *ptr_sbr_tables) {
  854|   723k|  WORD16 k;
  855|   723k|  WORD16 *ptr_smoothed_gain, *ptr_smoothed_noise;
  856|   723k|  WORD16 direct_ratio;
  857|   723k|  WORD32 index = *ptr_phase_index;
  858|   723k|  WORD32 harm_idx = *ptr_harm_index;
  859|   723k|  WORD32 freq_inv_flag;
  860|   723k|  const WORD32 *ptr_rand_ph_buf;
  861|   723k|  WORD32 factor = 0;
  862|       |
  863|   723k|  direct_ratio = ixheaac_sub16_sat(0x7fff, smooth_ratio);
  864|   723k|  freq_inv_flag = (sub_band_start & 1);
  865|       |
  866|   723k|  scale_change = scale_change - 1;
  867|       |
  868|   723k|  ptr_rand_ph_buf = &ptr_sbr_tables->sbr_rand_ph[index];
  869|   723k|  *ptr_phase_index =
  870|   723k|      (WORD16)((index + num_sub_bands) & (SBR_NF_NO_RANDOM_VAL - 1));
  ------------------
  |  |   24|   723k|#define SBR_NF_NO_RANDOM_VAL 512
  ------------------
  871|       |
  872|   723k|  if (smooth_ratio) {
  ------------------
  |  Branch (872:7): [True: 97.0k, False: 626k]
  ------------------
  873|  97.0k|    WORD16 *ptr_filt_buf_local = &ptr_filt_buf[0];
  874|  97.0k|    WORD16 *ptr_gain_buf_local = &ptr_gain_buf[0];
  875|  97.0k|    WORD16 *ptr_filt_noise_local = &ptr_filt_buf_noise[0];
  876|  97.0k|    WORD16 *ptr_noise_floor_local = &ptr_noise_floor[0];
  877|       |
  878|  97.0k|    WORD16 tmp, tmp1;
  879|       |
  880|  1.93M|    for (k = 0; k < num_sub_bands; k++) {
  ------------------
  |  Branch (880:17): [True: 1.84M, False: 97.0k]
  ------------------
  881|  1.84M|      tmp = add16_m(mult16x16_16(smooth_ratio, *ptr_filt_buf_local),
  ------------------
  |  |   47|  1.84M|#define add16_m(a, b) ((a) + (b))
  ------------------
  882|  1.84M|                    mult16x16_16(direct_ratio, *ptr_gain_buf_local++));
  883|       |
  884|  1.84M|      ptr_gain_buf_local++;
  885|       |
  886|  1.84M|      tmp1 = add16_m(mult16x16_16(smooth_ratio, *ptr_filt_noise_local),
  ------------------
  |  |   47|  1.84M|#define add16_m(a, b) ((a) + (b))
  ------------------
  887|  1.84M|                     mult16x16_16(direct_ratio, *ptr_noise_floor_local++));
  888|       |
  889|  1.84M|      ptr_noise_floor_local++;
  890|       |
  891|  1.84M|      *ptr_filt_buf_local++ = tmp << 1;
  892|  1.84M|      ptr_filt_buf_local++;
  893|  1.84M|      *ptr_filt_noise_local++ = tmp1 << 1;
  894|  1.84M|    }
  895|  97.0k|    ptr_smoothed_gain = ptr_filt_buf;
  896|  97.0k|    ptr_smoothed_noise = ptr_filt_buf_noise;
  897|  97.0k|    factor = 1;
  898|   626k|  } else {
  899|   626k|    ptr_smoothed_gain = ptr_gain_buf;
  900|   626k|    ptr_smoothed_noise = ptr_noise_floor;
  901|   626k|    factor = 2;
  902|   626k|  }
  903|       |
  904|   723k|  switch (harm_idx) {
  ------------------
  |  Branch (904:11): [True: 723k, False: 0]
  ------------------
  905|   181k|    case 0:
  ------------------
  |  Branch (905:5): [True: 181k, False: 542k]
  ------------------
  906|   362k|    case 2:
  ------------------
  |  Branch (906:5): [True: 180k, False: 542k]
  ------------------
  907|   362k|      ixheaacd_harm_idx_zerotwo(num_noise_flg, num_sub_bands, ptr_buf_real,
  908|   362k|                                ptr_buf_imag, ptr_smoothed_gain,
  909|   362k|                                ptr_smoothed_noise, factor, ptr_gain_buf,
  910|   362k|                                scale_change, ptr_rand_ph_buf, ptr_sine_lvl_buf,
  911|   362k|                                noise_floor_exp, harm_idx);
  912|   362k|      break;
  913|   181k|    case 1:
  ------------------
  |  Branch (913:5): [True: 181k, False: 542k]
  ------------------
  914|   361k|    case 3:
  ------------------
  |  Branch (914:5): [True: 179k, False: 543k]
  ------------------
  915|   361k|      ixheaacd_harm_idx_onethree(
  916|   361k|          num_noise_flg, num_sub_bands, ptr_buf_real, ptr_buf_imag,
  917|   361k|          ptr_smoothed_gain, ptr_smoothed_noise, factor, ptr_gain_buf,
  918|   361k|          scale_change, ptr_rand_ph_buf, ptr_sine_lvl_buf, noise_floor_exp,
  919|   361k|          freq_inv_flag, harm_idx);
  920|   361k|      break;
  921|   723k|  }
  922|   723k|  *ptr_harm_index = (WORD16)((harm_idx + 1) & 3);
  923|   723k|}
ixheaacd_env_dec.c:ixheaacd_limit_noise_floor_fac:
  346|   259k|                               ia_sbr_frame_info_data_struct *ptr_sbr_data) {
  347|   259k|  WORD32 i, tot_nf_bands;
  348|   259k|  WORD32 value;
  349|   259k|  WORD32 num_nf_bands;
  350|   259k|  WORD16 *ptr_noise_floor;
  351|   259k|  FLOAT32 *ptr_noise_floor_flt;
  352|       |
  353|   259k|  num_nf_bands = ptr_header_data->pstr_freq_band_data->num_nf_bands;
  354|       |
  355|   259k|  tot_nf_bands =
  356|   259k|      ptr_sbr_data->str_frame_info_details.num_noise_env * num_nf_bands;
  357|       |
  358|   259k|  ptr_noise_floor = ptr_sbr_data->int_noise_floor;
  359|       |
  360|   259k|  ptr_noise_floor_flt = &ptr_sbr_data->flt_noise_floor[0];
  361|       |
  362|  1.21M|  for (i = tot_nf_bands - 1; i >= 0; i--) {
  ------------------
  |  Branch (362:30): [True: 954k, False: 259k]
  ------------------
  363|   954k|    value = *ptr_noise_floor;
  364|   954k|    if (value > MAX_NOISE_FLOOR_FAC_VAL) {
  ------------------
  |  |  201|   954k|#define MAX_NOISE_FLOOR_FAC_VAL 35
  ------------------
  |  Branch (364:9): [True: 25.5k, False: 928k]
  ------------------
  365|  25.5k|      *ptr_noise_floor = MAX_NOISE_FLOOR_FAC_VAL;
  ------------------
  |  |  201|  25.5k|#define MAX_NOISE_FLOOR_FAC_VAL 35
  ------------------
  366|  25.5k|      *ptr_noise_floor_flt = MAX_NOISE_FLOOR_FAC_VAL;
  ------------------
  |  |  201|  25.5k|#define MAX_NOISE_FLOOR_FAC_VAL 35
  ------------------
  367|   928k|    } else {
  368|   928k|      if (value < MIN_NOISE_FLOOR_FAC_VAL) {
  ------------------
  |  |  202|   928k|#define MIN_NOISE_FLOOR_FAC_VAL 0
  ------------------
  |  Branch (368:11): [True: 24.6k, False: 903k]
  ------------------
  369|  24.6k|        *ptr_noise_floor = MIN_NOISE_FLOOR_FAC_VAL;
  ------------------
  |  |  202|  24.6k|#define MIN_NOISE_FLOOR_FAC_VAL 0
  ------------------
  370|  24.6k|        *ptr_noise_floor_flt = MIN_NOISE_FLOOR_FAC_VAL;
  ------------------
  |  |  202|  24.6k|#define MIN_NOISE_FLOOR_FAC_VAL 0
  ------------------
  371|  24.6k|      }
  372|   928k|    }
  373|   954k|    ptr_noise_floor++;
  374|   954k|    ptr_noise_floor_flt++;
  375|   954k|  }
  376|   259k|}
ixheaacd_env_dec.c:ixheaacd_dequant_pvc_env_data:
   75|  78.7k|                                          FLOAT32 *ptr_noise_floor) {
   76|  78.7k|  WORD32 i;
   77|       |
   78|   489k|  for (i = 0; i < num_noise_fac; i++) {
  ------------------
  |  Branch (78:15): [True: 410k, False: 78.7k]
  ------------------
   79|   410k|    FLOAT32 temp = ptr_noise_floor[i];
   80|       |
   81|   410k|    temp = NOISE_FLOOR_OFFSET - temp;
  ------------------
  |  |   92|   410k|#define NOISE_FLOOR_OFFSET 6.0f
  ------------------
   82|   410k|    temp = (FLOAT32)pow(2.0f, temp);
   83|       |
   84|   410k|    ptr_noise_floor[i] = temp;
   85|   410k|  }
   86|  78.7k|}
ixheaacd_env_dec.c:ixheaacd_dequant_esbr_env_data:
   55|  96.3k|                                           FLOAT32 *ptr_noise_floor) {
   56|  96.3k|  WORD32 i;
   57|  96.3k|  const FLOAT32 array[2] = {0.5f, 1.0f};
   58|  96.3k|  FLOAT32 a_flt = array[amp_res];
   59|       |
   60|  1.21M|  for (i = 0; i < num_env_sf; i++) {
  ------------------
  |  Branch (60:15): [True: 1.11M, False: 96.3k]
  ------------------
   61|  1.11M|    ptr_env_sf[i] = (FLOAT32)(pow(2, ptr_env_sf[i] * a_flt) * 64);
   62|  1.11M|  }
   63|       |
   64|   375k|  for (i = 0; i < num_noise_fac; i++) {
  ------------------
  |  Branch (64:15): [True: 279k, False: 96.3k]
  ------------------
   65|   279k|    FLOAT32 temp = ptr_noise_floor[i];
   66|       |
   67|   279k|    temp = NOISE_FLOOR_OFFSET - temp;
  ------------------
  |  |   92|   279k|#define NOISE_FLOOR_OFFSET 6.0f
  ------------------
   68|   279k|    temp = (FLOAT32)pow(2.0f, temp);
   69|       |
   70|   279k|    ptr_noise_floor[i] = temp;
   71|   279k|  }
   72|  96.3k|}
ixheaacd_env_dec.c:ixheaacd_wrong_timing_compensate:
  242|  9.19k|                                 ixheaacd_misc_tables *pstr_common_tables) {
  243|  9.19k|  WORD32 i, num_env_sf;
  244|  9.19k|  ia_frame_info_struct *p_frame_info = &ptr_sbr_data->str_frame_info_details;
  245|  9.19k|  WORD16 *num_sf_bands = ptr_header_data->pstr_freq_band_data->num_sf_bands;
  246|  9.19k|  WORD32 start_pos_est;
  247|  9.19k|  WORD32 ref_len, new_len, shift;
  248|  9.19k|  WORD16 delta_exp;
  249|       |
  250|  9.19k|  start_pos_est =
  251|  9.19k|      (ptr_prev_data->end_position - ptr_header_data->num_time_slots);
  252|       |
  253|  9.19k|  ref_len = (p_frame_info->border_vec[1] - p_frame_info->border_vec[0]);
  254|       |
  255|  9.19k|  new_len = (p_frame_info->border_vec[1] - start_pos_est);
  256|       |
  257|  9.19k|  if (new_len <= 0) {
  ------------------
  |  Branch (257:7): [True: 316, False: 8.87k]
  ------------------
  258|    316|    new_len = ref_len;
  259|    316|    start_pos_est = p_frame_info->border_vec[0];
  260|    316|  }
  261|       |
  262|  9.19k|  delta_exp = pstr_common_tables->log_dual_is_table[ref_len];
  263|  9.19k|  delta_exp -= pstr_common_tables->log_dual_is_table[new_len];
  264|       |
  265|  9.19k|  shift = (SHORT_BITS - ENV_EXP_FRACT - 3 - ptr_sbr_data->amp_res);
  ------------------
  |  |   23|  9.19k|#define SHORT_BITS 16
  ------------------
                shift = (SHORT_BITS - ENV_EXP_FRACT - 3 - ptr_sbr_data->amp_res);
  ------------------
  |  |   23|  9.19k|#define ENV_EXP_FRACT 0
  ------------------
  266|  9.19k|  delta_exp = ixheaac_shr16(delta_exp, (WORD16)shift);
  267|  9.19k|  p_frame_info->border_vec[0] = start_pos_est;
  268|  9.19k|  p_frame_info->noise_border_vec[0] = start_pos_est;
  269|       |
  270|  9.19k|  if (start_pos_est < 0) return -1;
  ------------------
  |  Branch (270:7): [True: 0, False: 9.19k]
  ------------------
  271|       |
  272|  9.19k|  if (ptr_sbr_data->coupling_mode != COUPLING_BAL) {
  ------------------
  |  |   40|  9.19k|#define COUPLING_BAL 2
  ------------------
  |  Branch (272:7): [True: 6.79k, False: 2.39k]
  ------------------
  273|  6.79k|    num_env_sf =
  274|  6.79k|        ((p_frame_info->freq_res[0]) ? num_sf_bands[HIGH] : num_sf_bands[LOW]);
  ------------------
  |  |   28|    954|#define HIGH 1
  ------------------
                      ((p_frame_info->freq_res[0]) ? num_sf_bands[HIGH] : num_sf_bands[LOW]);
  ------------------
  |  |   27|  5.84k|#define LOW 0
  ------------------
  |  Branch (274:10): [True: 954, False: 5.84k]
  ------------------
  275|       |
  276|  54.6k|    for (i = 0; i < num_env_sf; i++) {
  ------------------
  |  Branch (276:17): [True: 47.8k, False: 6.79k]
  ------------------
  277|  47.8k|      ptr_sbr_data->int_env_sf_arr[i] =
  278|  47.8k|          add16_m(ptr_sbr_data->int_env_sf_arr[i], delta_exp);
  ------------------
  |  |   47|  47.8k|#define add16_m(a, b) ((a) + (b))
  ------------------
  279|  47.8k|      ptr_sbr_data->flt_env_sf_arr[i] =
  280|  47.8k|          (FLOAT32)(ptr_sbr_data->int_env_sf_arr[i]);
  281|  47.8k|    }
  282|  6.79k|  }
  283|       |
  284|  9.19k|  return 0;
  285|  9.19k|}

ixheaacd_cnt_leading_ones:
   76|  18.2M|WORD32 ixheaacd_cnt_leading_ones(WORD32 a) {
   77|  18.2M|  WORD32 count = 0;
   78|       |
   79|  37.7M|  while (a) {
  ------------------
  |  Branch (79:10): [True: 35.1M, False: 2.60M]
  ------------------
   80|  35.1M|    if (a & 0x80000000)
  ------------------
  |  Branch (80:9): [True: 19.5M, False: 15.6M]
  ------------------
   81|  19.5M|      count++;
   82|  15.6M|    else
   83|  15.6M|      break;
   84|  19.5M|    a = a << 1;
   85|  19.5M|  }
   86|  18.2M|  return count;
   87|  18.2M|}
ixheaacd_huffman_decode:
   90|  14.9M|                             const UWORD32 *idx_table) {
   91|  14.9M|  UWORD32 temp = 0;
   92|  14.9M|  UWORD32 temp1 = 0;
   93|  14.9M|  WORD32 found = 0;
   94|  14.9M|  UWORD32 mask = 0x80000000;
   95|       |
   96|  14.9M|  WORD32 clo;
   97|  14.9M|  WORD32 MAX_LEN;
   98|  14.9M|  WORD32 ixheaacd_drc_offset = 0;
   99|  14.9M|  WORD32 length;
  100|  14.9M|  UWORD32 cwrd;
  101|  14.9M|  WORD32 len_end;
  102|       |
  103|  14.9M|  MAX_LEN = input_table[0];
  104|  14.9M|  mask = mask - (1 << (31 - MAX_LEN));
  105|  14.9M|  mask = mask << 1;
  106|  14.9M|  temp = (UWORD32)(it_bit_buff & mask);
  107|       |
  108|  14.9M|  len_end = input_table[0];
  109|  14.9M|  clo = ixheaacd_cnt_leading_ones(temp);
  110|  16.2M|  do {
  111|  16.2M|    ixheaacd_drc_offset = (idx_table[clo] >> 20) & 0xff;
  112|  16.2M|    length = input_table[ixheaacd_drc_offset + 1] & 0x1f;
  113|  16.2M|    cwrd = idx_table[clo] & 0xfffff;
  114|  16.2M|    temp1 = temp >> (32 - length);
  115|  16.2M|    if (temp1 <= cwrd) {
  ------------------
  |  Branch (115:9): [True: 14.9M, False: 1.31M]
  ------------------
  116|  14.9M|      ixheaacd_drc_offset = ixheaacd_drc_offset - (cwrd - temp1);
  117|  14.9M|      found = 1;
  118|  14.9M|    } else {
  119|  1.31M|      len_end = len_end + ((idx_table[clo] >> 28) & 0xf);
  120|  1.31M|      clo = len_end;
  121|  1.31M|    }
  122|  16.2M|  } while (!found);
  ------------------
  |  Branch (122:12): [True: 1.31M, False: 14.9M]
  ------------------
  123|  14.9M|  *h_index = input_table[ixheaacd_drc_offset + 1] >> 5;
  124|  14.9M|  *len = length;
  125|  14.9M|}
ixheaacd_ssc_huff_dec:
  326|  51.1k|                             ia_bit_buf_struct *it_bit_buff) {
  327|  51.1k|  WORD32 index;
  328|  51.1k|  WORD32 value, bit;
  329|  51.1k|  WORD16 cw;
  330|  51.1k|  index = 0;
  331|       |
  332|   155k|  while (index >= 0) {
  ------------------
  |  Branch (332:10): [True: 103k, False: 51.1k]
  ------------------
  333|   103k|    cw = t_huff[index];
  334|       |
  335|   103k|    bit = ixheaacd_read_bits_buf(it_bit_buff, 1);
  336|       |
  337|   103k|    if (bit) {
  ------------------
  |  Branch (337:9): [True: 38.2k, False: 65.6k]
  ------------------
  338|  38.2k|      WORD sign = (cw & 0x0080);
  339|  38.2k|      if (sign) {
  ------------------
  |  Branch (339:11): [True: 18.3k, False: 19.9k]
  ------------------
  340|  18.3k|        index = (cw | 0xffffff80);
  341|  19.9k|      } else {
  342|  19.9k|        index = (cw & 0x007f);
  343|  19.9k|      }
  344|  65.6k|    } else {
  345|  65.6k|      index = (cw >> 8);
  346|  65.6k|    }
  347|   103k|  }
  348|       |
  349|  51.1k|  value = (index + 64);
  350|       |
  351|  51.1k|  return (value);
  352|  51.1k|}
ixheaacd_sbr_read_header_data:
  356|   169k|    FLAG stereo_flag, ia_sbr_header_data_struct *pstr_sbr_dflt_header) {
  357|   169k|  ia_sbr_header_data_struct prev_header_info;
  358|   169k|  prev_header_info.start_freq = 0;
  359|   169k|  prev_header_info.noise_bands = 0;
  360|   169k|  FLAG header_extra_1 = 0, header_extra_2 = 0;
  361|   169k|  WORD32 tmp;
  362|   169k|  WORD32 usac_independency_flag = pstr_sbr_header->usac_independency_flag;
  363|   169k|  WORD32 use_dflt_hdr = 0;
  364|   169k|  WORD32 header_present = 1;
  365|   169k|  WORD32 usac_flag = pstr_sbr_header->usac_flag;
  366|       |
  367|   169k|  if (!usac_flag) {
  ------------------
  |  Branch (367:7): [True: 8.58k, False: 160k]
  ------------------
  368|  8.58k|    memcpy(&prev_header_info, pstr_sbr_header,
  369|  8.58k|           sizeof(ia_sbr_header_data_struct));
  370|       |
  371|  8.58k|    tmp = ixheaacd_read_bits_buf(
  372|  8.58k|        it_bit_buff, SBR_AMPLITUDE_RESOLUTION_BITS + SBR_BEGIN_SAMP_FREQ_BITS +
  ------------------
  |  |   44|  8.58k|#define SBR_AMPLITUDE_RESOLUTION_BITS 1
  ------------------
                      it_bit_buff, SBR_AMPLITUDE_RESOLUTION_BITS + SBR_BEGIN_SAMP_FREQ_BITS +
  ------------------
  |  |   45|  8.58k|#define SBR_BEGIN_SAMP_FREQ_BITS 4
  ------------------
  373|  8.58k|                         SBR_END_SAMP_FREQ_BITS + SBR_CROSS_OVER_BND_BITS);
  ------------------
  |  |   46|  8.58k|#define SBR_END_SAMP_FREQ_BITS 4
  ------------------
                                       SBR_END_SAMP_FREQ_BITS + SBR_CROSS_OVER_BND_BITS);
  ------------------
  |  |   47|  8.58k|#define SBR_CROSS_OVER_BND_BITS 3
  ------------------
  374|       |
  375|  8.58k|    pstr_sbr_header->amp_res = (WORD16)(
  376|  8.58k|        (tmp & 0x0800) >> (SBR_BEGIN_SAMP_FREQ_BITS + SBR_END_SAMP_FREQ_BITS +
  ------------------
  |  |   45|  8.58k|#define SBR_BEGIN_SAMP_FREQ_BITS 4
  ------------------
                      (tmp & 0x0800) >> (SBR_BEGIN_SAMP_FREQ_BITS + SBR_END_SAMP_FREQ_BITS +
  ------------------
  |  |   46|  8.58k|#define SBR_END_SAMP_FREQ_BITS 4
  ------------------
  377|  8.58k|                           SBR_CROSS_OVER_BND_BITS));
  ------------------
  |  |   47|  8.58k|#define SBR_CROSS_OVER_BND_BITS 3
  ------------------
  378|       |
  379|  8.58k|    pstr_sbr_header->start_freq = (WORD16)(
  380|  8.58k|        (tmp & 0x0780) >> (SBR_END_SAMP_FREQ_BITS + SBR_CROSS_OVER_BND_BITS));
  ------------------
  |  |   46|  8.58k|#define SBR_END_SAMP_FREQ_BITS 4
  ------------------
                      (tmp & 0x0780) >> (SBR_END_SAMP_FREQ_BITS + SBR_CROSS_OVER_BND_BITS));
  ------------------
  |  |   47|  8.58k|#define SBR_CROSS_OVER_BND_BITS 3
  ------------------
  381|       |
  382|  8.58k|    pstr_sbr_header->stop_freq =
  383|  8.58k|        (WORD16)((tmp & 0x078) >> (SBR_CROSS_OVER_BND_BITS));
  ------------------
  |  |   47|  8.58k|#define SBR_CROSS_OVER_BND_BITS 3
  ------------------
  384|       |
  385|  8.58k|    pstr_sbr_header->xover_band = (WORD16)((tmp & 0x07));
  386|       |
  387|  8.58k|    tmp = ixheaacd_read_bits_buf(
  388|  8.58k|        it_bit_buff,
  389|  8.58k|        SBR_HDR_RESERV_BITS + SBR_HDR_EXTR_1_BITS + SBR_HDR_EXTR_2_BITS);
  ------------------
  |  |   68|  8.58k|#define SBR_HDR_RESERV_BITS 2
  ------------------
                      SBR_HDR_RESERV_BITS + SBR_HDR_EXTR_1_BITS + SBR_HDR_EXTR_2_BITS);
  ------------------
  |  |   56|  8.58k|#define SBR_HDR_EXTR_1_BITS 1
  ------------------
                      SBR_HDR_RESERV_BITS + SBR_HDR_EXTR_1_BITS + SBR_HDR_EXTR_2_BITS);
  ------------------
  |  |   57|  8.58k|#define SBR_HDR_EXTR_2_BITS 1
  ------------------
  390|  8.58k|    header_extra_1 = (FLAG)((tmp & 0x02) >> (SBR_HDR_EXTR_2_BITS));
  ------------------
  |  |   57|  8.58k|#define SBR_HDR_EXTR_2_BITS 1
  ------------------
  391|  8.58k|    header_extra_2 = (FLAG)((tmp & 0x01));
  392|  8.58k|    if (stereo_flag) {
  ------------------
  |  Branch (392:9): [True: 5.76k, False: 2.82k]
  ------------------
  393|  5.76k|      pstr_sbr_header->channel_mode = SBR_STEREO;
  ------------------
  |  |   28|  5.76k|#define SBR_STEREO 2
  ------------------
  394|  5.76k|    } else {
  395|  2.82k|      pstr_sbr_header->channel_mode = SBR_MONO;
  ------------------
  |  |   27|  2.82k|#define SBR_MONO 1
  ------------------
  396|  2.82k|    }
  397|   160k|  } else {
  398|   160k|    WORD32 info_present = 0;
  399|   160k|    if (pstr_sbr_header->sync_state == SBR_ACTIVE) {
  ------------------
  |  |   25|   160k|#define SBR_ACTIVE 2
  ------------------
  |  Branch (399:9): [True: 153k, False: 7.55k]
  ------------------
  400|   153k|      memcpy(&prev_header_info, pstr_sbr_header,
  401|   153k|             sizeof(ia_sbr_header_data_struct));
  402|   153k|    }
  403|   160k|    if (usac_independency_flag) {
  ------------------
  |  Branch (403:9): [True: 3.82k, False: 156k]
  ------------------
  404|  3.82k|      header_present = 1;
  405|  3.82k|      info_present = 1;
  406|   156k|    } else {
  407|   156k|      info_present = ixheaacd_read_bits_buf(it_bit_buff, 1);
  408|   156k|      if (info_present) {
  ------------------
  |  Branch (408:11): [True: 50.7k, False: 106k]
  ------------------
  409|  50.7k|        header_present = ixheaacd_read_bits_buf(it_bit_buff, 1);
  410|   106k|      } else {
  411|   106k|        header_present = 0;
  412|   106k|      }
  413|   156k|    }
  414|       |
  415|   160k|    if (info_present) {
  ------------------
  |  Branch (415:9): [True: 54.6k, False: 106k]
  ------------------
  416|  54.6k|      tmp = ixheaacd_read_bits_buf(it_bit_buff, SBR_AMPLITUDE_RESOLUTION_BITS +
  ------------------
  |  |   44|  54.6k|#define SBR_AMPLITUDE_RESOLUTION_BITS 1
  ------------------
  417|  54.6k|                                                    ESBR_CROSS_OVER_BND_BITS +
  ------------------
  |  |   49|  54.6k|#define ESBR_CROSS_OVER_BND_BITS 4
  ------------------
  418|  54.6k|                                                    ESBR_PRE_FLAT_BITS);
  ------------------
  |  |   50|  54.6k|#define ESBR_PRE_FLAT_BITS 1
  ------------------
  419|  54.6k|      pstr_sbr_header->amp_res = (WORD16)(
  420|  54.6k|          (tmp & 0x0020) >> (ESBR_CROSS_OVER_BND_BITS + ESBR_PRE_FLAT_BITS));
  ------------------
  |  |   49|  54.6k|#define ESBR_CROSS_OVER_BND_BITS 4
  ------------------
                        (tmp & 0x0020) >> (ESBR_CROSS_OVER_BND_BITS + ESBR_PRE_FLAT_BITS));
  ------------------
  |  |   50|  54.6k|#define ESBR_PRE_FLAT_BITS 1
  ------------------
  421|  54.6k|      pstr_sbr_header->xover_band =
  422|  54.6k|          (WORD16)((tmp & 0x001E) >> (ESBR_PRE_FLAT_BITS));
  ------------------
  |  |   50|  54.6k|#define ESBR_PRE_FLAT_BITS 1
  ------------------
  423|  54.6k|      pstr_sbr_header->pre_proc_flag = (WORD16)((tmp & 0x001));
  424|  54.6k|      if (pstr_sbr_header->pvc_flag) {
  ------------------
  |  Branch (424:11): [True: 30.7k, False: 23.8k]
  ------------------
  425|  30.7k|        pstr_sbr_header->pvc_mode =
  426|  30.7k|            ixheaacd_read_bits_buf(it_bit_buff, ESBR_PVC_MODE_BITS);
  ------------------
  |  |   51|  30.7k|#define ESBR_PVC_MODE_BITS 2
  ------------------
  427|  30.7k|      } else {
  428|  23.8k|        pstr_sbr_header->pvc_mode = 0;
  429|  23.8k|      }
  430|  54.6k|    }
  431|       |
  432|   160k|    if (header_present) {
  ------------------
  |  Branch (432:9): [True: 15.9k, False: 144k]
  ------------------
  433|  15.9k|      use_dflt_hdr = ixheaacd_read_bits_buf(it_bit_buff, 1);
  434|  15.9k|      if (use_dflt_hdr) {
  ------------------
  |  Branch (434:11): [True: 11.8k, False: 4.07k]
  ------------------
  435|  11.8k|        pstr_sbr_header->start_freq = pstr_sbr_dflt_header->start_freq;
  436|  11.8k|        pstr_sbr_header->stop_freq = pstr_sbr_dflt_header->stop_freq;
  437|  11.8k|        pstr_sbr_header->header_extra_1 = pstr_sbr_dflt_header->header_extra_1;
  438|  11.8k|        pstr_sbr_header->header_extra_2 = pstr_sbr_dflt_header->header_extra_2;
  439|  11.8k|        pstr_sbr_header->freq_scale = pstr_sbr_dflt_header->freq_scale;
  440|  11.8k|        pstr_sbr_header->alter_scale = pstr_sbr_dflt_header->alter_scale;
  441|  11.8k|        pstr_sbr_header->noise_bands = pstr_sbr_dflt_header->noise_bands;
  442|  11.8k|        pstr_sbr_header->limiter_bands = pstr_sbr_dflt_header->limiter_bands;
  443|  11.8k|        pstr_sbr_header->limiter_gains = pstr_sbr_dflt_header->limiter_gains;
  444|  11.8k|        pstr_sbr_header->interpol_freq = pstr_sbr_dflt_header->interpol_freq;
  445|  11.8k|        pstr_sbr_header->smoothing_mode = pstr_sbr_dflt_header->smoothing_mode;
  446|  11.8k|      } else {
  447|  4.07k|        tmp = ixheaacd_read_bits_buf(
  448|  4.07k|            it_bit_buff, SBR_BEGIN_SAMP_FREQ_BITS + SBR_END_SAMP_FREQ_BITS +
  ------------------
  |  |   45|  4.07k|#define SBR_BEGIN_SAMP_FREQ_BITS 4
  ------------------
                          it_bit_buff, SBR_BEGIN_SAMP_FREQ_BITS + SBR_END_SAMP_FREQ_BITS +
  ------------------
  |  |   46|  4.07k|#define SBR_END_SAMP_FREQ_BITS 4
  ------------------
  449|  4.07k|                             SBR_HDR_EXTR_1_BITS + SBR_HDR_EXTR_2_BITS);
  ------------------
  |  |   56|  4.07k|#define SBR_HDR_EXTR_1_BITS 1
  ------------------
                                           SBR_HDR_EXTR_1_BITS + SBR_HDR_EXTR_2_BITS);
  ------------------
  |  |   57|  4.07k|#define SBR_HDR_EXTR_2_BITS 1
  ------------------
  450|  4.07k|        pstr_sbr_header->start_freq =
  451|  4.07k|            (tmp & 0x03C0) >> (SBR_END_SAMP_FREQ_BITS + SBR_HDR_EXTR_1_BITS +
  ------------------
  |  |   46|  4.07k|#define SBR_END_SAMP_FREQ_BITS 4
  ------------------
                          (tmp & 0x03C0) >> (SBR_END_SAMP_FREQ_BITS + SBR_HDR_EXTR_1_BITS +
  ------------------
  |  |   56|  4.07k|#define SBR_HDR_EXTR_1_BITS 1
  ------------------
  452|  4.07k|                               SBR_HDR_EXTR_2_BITS);
  ------------------
  |  |   57|  4.07k|#define SBR_HDR_EXTR_2_BITS 1
  ------------------
  453|  4.07k|        pstr_sbr_header->stop_freq =
  454|  4.07k|            (tmp & 0x003C) >> (SBR_HDR_EXTR_1_BITS + SBR_HDR_EXTR_2_BITS);
  ------------------
  |  |   56|  4.07k|#define SBR_HDR_EXTR_1_BITS 1
  ------------------
                          (tmp & 0x003C) >> (SBR_HDR_EXTR_1_BITS + SBR_HDR_EXTR_2_BITS);
  ------------------
  |  |   57|  4.07k|#define SBR_HDR_EXTR_2_BITS 1
  ------------------
  455|  4.07k|        pstr_sbr_header->header_extra_1 =
  456|  4.07k|            (tmp & 0x0002) >> (SBR_HDR_EXTR_2_BITS);
  ------------------
  |  |   57|  4.07k|#define SBR_HDR_EXTR_2_BITS 1
  ------------------
  457|  4.07k|        pstr_sbr_header->header_extra_2 = (tmp & 0x0001);
  458|  4.07k|        header_extra_1 = pstr_sbr_header->header_extra_1;
  459|  4.07k|        header_extra_2 = pstr_sbr_header->header_extra_2;
  460|  4.07k|      }
  461|  15.9k|    }
  462|   160k|  }
  463|       |
  464|   169k|  if (!use_dflt_hdr && header_present) {
  ------------------
  |  Branch (464:7): [True: 157k, False: 11.9k]
  |  Branch (464:24): [True: 12.6k, False: 144k]
  ------------------
  465|  12.6k|    if (header_extra_1) {
  ------------------
  |  Branch (465:9): [True: 4.47k, False: 8.17k]
  ------------------
  466|  4.47k|      tmp = ixheaacd_read_bits_buf(
  467|  4.47k|          it_bit_buff,
  468|  4.47k|          SBR_SAMP_FREQ_LVL_BITS + SBR_CHANGE_LVL_BITS + SBR_NOISE_BND_BITS);
  ------------------
  |  |   59|  4.47k|#define SBR_SAMP_FREQ_LVL_BITS 2
  ------------------
                        SBR_SAMP_FREQ_LVL_BITS + SBR_CHANGE_LVL_BITS + SBR_NOISE_BND_BITS);
  ------------------
  |  |   60|  4.47k|#define SBR_CHANGE_LVL_BITS 1
  ------------------
                        SBR_SAMP_FREQ_LVL_BITS + SBR_CHANGE_LVL_BITS + SBR_NOISE_BND_BITS);
  ------------------
  |  |   61|  4.47k|#define SBR_NOISE_BND_BITS 2
  ------------------
  469|  4.47k|      pstr_sbr_header->freq_scale =
  470|  4.47k|          (WORD16)((tmp & 0x018) >> (SBR_CHANGE_LVL_BITS + SBR_NOISE_BND_BITS));
  ------------------
  |  |   60|  4.47k|#define SBR_CHANGE_LVL_BITS 1
  ------------------
                        (WORD16)((tmp & 0x018) >> (SBR_CHANGE_LVL_BITS + SBR_NOISE_BND_BITS));
  ------------------
  |  |   61|  4.47k|#define SBR_NOISE_BND_BITS 2
  ------------------
  471|  4.47k|      pstr_sbr_header->alter_scale =
  472|  4.47k|          (WORD16)((tmp & 0x04) >> (SBR_NOISE_BND_BITS));
  ------------------
  |  |   61|  4.47k|#define SBR_NOISE_BND_BITS 2
  ------------------
  473|  4.47k|      pstr_sbr_header->noise_bands = (WORD16)((tmp & 0x03));
  474|  8.17k|    } else {
  475|  8.17k|      pstr_sbr_header->freq_scale = SBR_SAMP_FEQ_LVL_DEF;
  ------------------
  |  |   35|  8.17k|#define SBR_SAMP_FEQ_LVL_DEF 2
  ------------------
  476|  8.17k|      pstr_sbr_header->alter_scale = SBR_CHANGE_LVL_DEF;
  ------------------
  |  |   36|  8.17k|#define SBR_CHANGE_LVL_DEF 1
  ------------------
  477|  8.17k|      pstr_sbr_header->noise_bands = SBR_NOISE_BND_DEF;
  ------------------
  |  |   37|  8.17k|#define SBR_NOISE_BND_DEF 2
  ------------------
  478|  8.17k|    }
  479|       |
  480|  12.6k|    if (header_extra_2) {
  ------------------
  |  Branch (480:9): [True: 5.07k, False: 7.57k]
  ------------------
  481|  5.07k|      tmp = ixheaacd_read_bits_buf(
  482|  5.07k|          it_bit_buff, SBR_BND_LIMIT_BITS + SBR_GAIN_LIMIT_BITS +
  ------------------
  |  |   63|  5.07k|#define SBR_BND_LIMIT_BITS 2
  ------------------
                        it_bit_buff, SBR_BND_LIMIT_BITS + SBR_GAIN_LIMIT_BITS +
  ------------------
  |  |   64|  5.07k|#define SBR_GAIN_LIMIT_BITS 2
  ------------------
  483|  5.07k|                           SBR_INTERPOL_SAMP_FREQ_BITS + SBR_SMOOTH_LEN_BITS);
  ------------------
  |  |   65|  5.07k|#define SBR_INTERPOL_SAMP_FREQ_BITS 1
  ------------------
                                         SBR_INTERPOL_SAMP_FREQ_BITS + SBR_SMOOTH_LEN_BITS);
  ------------------
  |  |   66|  5.07k|#define SBR_SMOOTH_LEN_BITS 1
  ------------------
  484|  5.07k|      pstr_sbr_header->limiter_bands = (WORD16)(
  485|  5.07k|          (tmp & 0x030) >> (SBR_GAIN_LIMIT_BITS + SBR_INTERPOL_SAMP_FREQ_BITS +
  ------------------
  |  |   64|  5.07k|#define SBR_GAIN_LIMIT_BITS 2
  ------------------
                        (tmp & 0x030) >> (SBR_GAIN_LIMIT_BITS + SBR_INTERPOL_SAMP_FREQ_BITS +
  ------------------
  |  |   65|  5.07k|#define SBR_INTERPOL_SAMP_FREQ_BITS 1
  ------------------
  486|  5.07k|                            SBR_SMOOTH_LEN_BITS));
  ------------------
  |  |   66|  5.07k|#define SBR_SMOOTH_LEN_BITS 1
  ------------------
  487|  5.07k|      pstr_sbr_header->limiter_gains = (WORD16)(
  488|  5.07k|          (tmp & 0x0c) >> (SBR_INTERPOL_SAMP_FREQ_BITS + SBR_SMOOTH_LEN_BITS));
  ------------------
  |  |   65|  5.07k|#define SBR_INTERPOL_SAMP_FREQ_BITS 1
  ------------------
                        (tmp & 0x0c) >> (SBR_INTERPOL_SAMP_FREQ_BITS + SBR_SMOOTH_LEN_BITS));
  ------------------
  |  |   66|  5.07k|#define SBR_SMOOTH_LEN_BITS 1
  ------------------
  489|  5.07k|      pstr_sbr_header->interpol_freq =
  490|  5.07k|          (WORD16)((tmp & 0x02) >> (SBR_SMOOTH_LEN_BITS));
  ------------------
  |  |   66|  5.07k|#define SBR_SMOOTH_LEN_BITS 1
  ------------------
  491|  5.07k|      pstr_sbr_header->smoothing_mode = (WORD16)((tmp & 0x01));
  492|  7.57k|    } else {
  493|  7.57k|      pstr_sbr_header->limiter_bands = SBR_BND_LIMIT_DEF;
  ------------------
  |  |   39|  7.57k|#define SBR_BND_LIMIT_DEF 2
  ------------------
  494|  7.57k|      pstr_sbr_header->limiter_gains = SBR_GAIN_LIMIT_DEF;
  ------------------
  |  |   40|  7.57k|#define SBR_GAIN_LIMIT_DEF 2
  ------------------
  495|  7.57k|      pstr_sbr_header->interpol_freq = SBR_INTERPOL_SAMP_FEQ_DEF;
  ------------------
  |  |   41|  7.57k|#define SBR_INTERPOL_SAMP_FEQ_DEF 1
  ------------------
  496|  7.57k|      pstr_sbr_header->smoothing_mode = SBR_SMOOTH_LEN_DEF;
  ------------------
  |  |   42|  7.57k|#define SBR_SMOOTH_LEN_DEF 1
  ------------------
  497|  7.57k|    }
  498|  12.6k|  }
  499|       |
  500|   169k|  if ((pstr_sbr_header->sync_state != SBR_ACTIVE) ||
  ------------------
  |  |   25|   169k|#define SBR_ACTIVE 2
  ------------------
  |  Branch (500:7): [True: 8.86k, False: 160k]
  ------------------
  501|   160k|      (prev_header_info.start_freq != pstr_sbr_header->start_freq) ||
  ------------------
  |  Branch (501:7): [True: 5.28k, False: 155k]
  ------------------
  502|   155k|      (prev_header_info.stop_freq != pstr_sbr_header->stop_freq) ||
  ------------------
  |  Branch (502:7): [True: 1.73k, False: 153k]
  ------------------
  503|   153k|      (prev_header_info.xover_band != pstr_sbr_header->xover_band) ||
  ------------------
  |  Branch (503:7): [True: 22.8k, False: 130k]
  ------------------
  504|   130k|      (prev_header_info.freq_scale != pstr_sbr_header->freq_scale) ||
  ------------------
  |  Branch (504:7): [True: 178, False: 130k]
  ------------------
  505|   130k|      (prev_header_info.alter_scale != pstr_sbr_header->alter_scale) ||
  ------------------
  |  Branch (505:7): [True: 23, False: 130k]
  ------------------
  506|   130k|      (prev_header_info.noise_bands != pstr_sbr_header->noise_bands)) {
  ------------------
  |  Branch (506:7): [True: 100, False: 130k]
  ------------------
  507|  39.0k|    return SBR_RESET;
  ------------------
  |  |   31|  39.0k|#define SBR_RESET 1
  ------------------
  508|  39.0k|  }
  509|       |
  510|   130k|  return 0;
  511|   169k|}
ixheaacd_sbr_read_pvc_sce:
  802|  65.5k|                                 ia_sbr_header_data_struct *ptr_header_data) {
  803|  65.5k|  WORD32 i;
  804|  65.5k|  WORD32 err_code = 0;
  805|  65.5k|  ia_env_extr_tables_struct *env_extr_tables_ptr =
  806|  65.5k|      ptr_sbr_tables->env_extr_tables_ptr;
  807|  65.5k|  WORD32 usac_independency_flag = ptr_frame_data->usac_independency_flag;
  808|       |
  809|  65.5k|  if (hbe_flag) {
  ------------------
  |  Branch (809:7): [True: 43.1k, False: 22.4k]
  ------------------
  810|  43.1k|    ptr_frame_data->sbr_patching_mode =
  811|  43.1k|        ixheaacd_read_bits_buf(it_bit_buff, ESBR_PATCHING_MODE_BITS);
  ------------------
  |  |  164|  43.1k|#define ESBR_PATCHING_MODE_BITS 1
  ------------------
  812|       |
  813|  43.1k|    if (ptr_frame_data->sbr_patching_mode == 0) {
  ------------------
  |  Branch (813:9): [True: 29.3k, False: 13.7k]
  ------------------
  814|  29.3k|      ptr_frame_data->over_sampling_flag =
  815|  29.3k|          ixheaacd_read_bits_buf(it_bit_buff, ESBR_OVERSAMPLING_FLAG_BITS);
  ------------------
  |  |  165|  29.3k|#define ESBR_OVERSAMPLING_FLAG_BITS 1
  ------------------
  816|  29.3k|      if (ixheaacd_read_bits_buf(it_bit_buff, ESBR_PITCHIN_FLAG_BITS))
  ------------------
  |  |  166|  29.3k|#define ESBR_PITCHIN_FLAG_BITS 1
  ------------------
  |  Branch (816:11): [True: 4.99k, False: 24.3k]
  ------------------
  817|  4.99k|        ptr_frame_data->pitch_in_bins =
  818|  4.99k|            ixheaacd_read_bits_buf(it_bit_buff, ESBR_PITCHIN_BINS_BITS);
  ------------------
  |  |  167|  4.99k|#define ESBR_PITCHIN_BINS_BITS 7
  ------------------
  819|  24.3k|      else
  820|  24.3k|        ptr_frame_data->pitch_in_bins = 0;
  821|  29.3k|    } else {
  822|  13.7k|      ptr_frame_data->over_sampling_flag = ptr_frame_data->pitch_in_bins = 0;
  823|  13.7k|    }
  824|  43.1k|  }
  825|       |
  826|  65.5k|  err_code = ixheaacd_pvc_time_freq_grid_info(it_bit_buff, ptr_frame_data);
  827|  65.5k|  if (err_code) return err_code;
  ------------------
  |  Branch (827:7): [True: 18, False: 65.5k]
  ------------------
  828|       |
  829|  65.5k|  ptr_pvc_data->prev_sbr_mode = PVC_SBR;
  830|       |
  831|  65.5k|  ixheaacd_pvc_env_dtdf_data(ptr_frame_data, it_bit_buff);
  832|       |
  833|   288k|  for (i = 0; i < ptr_header_data->pstr_freq_band_data->num_nf_bands; i++) {
  ------------------
  |  Branch (833:15): [True: 222k, False: 65.5k]
  ------------------
  834|   222k|    ptr_frame_data->sbr_invf_mode_prev[i] = ptr_frame_data->sbr_invf_mode[i];
  835|   222k|    ptr_frame_data->sbr_invf_mode[i] =
  836|   222k|        ixheaacd_read_bits_buf(it_bit_buff, ESBR_INVF_MODE_BITS);
  ------------------
  |  |  170|   222k|#define ESBR_INVF_MODE_BITS 2
  ------------------
  837|   222k|  }
  838|       |
  839|  65.5k|  ptr_pvc_data->pvc_mode = ptr_header_data->pvc_mode;
  840|       |
  841|  65.5k|  err_code = ixheaacd_read_esbr_pvc_envelope(ptr_pvc_data, it_bit_buff,
  842|  65.5k|                                             usac_independency_flag);
  843|  65.5k|  if (err_code) return err_code;
  ------------------
  |  Branch (843:7): [True: 30, False: 65.5k]
  ------------------
  844|       |
  845|  65.5k|  ixheaacd_read_sbr_noise_floor_data(ptr_header_data, ptr_frame_data,
  846|  65.5k|                                     it_bit_buff, env_extr_tables_ptr);
  847|       |
  848|  65.5k|  memset(ptr_frame_data->add_harmonics, 0,
  849|  65.5k|         ptr_header_data->pstr_freq_band_data->num_sf_bands[HIGH] *
  ------------------
  |  |   28|  65.5k|#define HIGH 1
  ------------------
  850|  65.5k|             sizeof(WORD32));
  851|  65.5k|  ptr_frame_data->pvc_mode = ptr_header_data->pvc_mode;
  852|       |
  853|  65.5k|  ixheaacd_read_sbr_addi_data(ptr_frame_data, ptr_header_data, it_bit_buff);
  854|       |
  855|  65.5k|  ptr_frame_data->coupling_mode = COUPLING_OFF;
  ------------------
  |  |   38|  65.5k|#define COUPLING_OFF 0
  ------------------
  856|       |
  857|  65.5k|  return err_code;
  858|  65.5k|}
ixheaacd_sbr_read_sce:
  864|  55.6k|                                   WORD32 ec_flag) {
  865|  55.6k|  WORD32 bit;
  866|  55.6k|  WORD32 i;
  867|  55.6k|  WORD32 hbe_flag = ptr_header_data->hbe_flag;
  868|  55.6k|  WORD32 num_if_bands = ptr_header_data->pstr_freq_band_data->num_if_bands;
  869|  55.6k|  WORD32 usac_flag = ptr_header_data->usac_flag;
  870|  55.6k|  ia_env_extr_tables_struct *env_extr_tables_ptr =
  871|  55.6k|      ptr_sbr_tables->env_extr_tables_ptr;
  872|  55.6k|  IA_ERRORCODE err = IA_NO_ERROR;
  ------------------
  |  |   23|  55.6k|#define IA_NO_ERROR 0x00000000
  ------------------
  873|       |
  874|  55.6k|  ptr_frame_data->coupling_mode = COUPLING_OFF;
  ------------------
  |  |   38|  55.6k|#define COUPLING_OFF 0
  ------------------
  875|       |
  876|  55.6k|  if (!usac_flag) {
  ------------------
  |  Branch (876:7): [True: 10.4k, False: 45.1k]
  ------------------
  877|  10.4k|    bit = ixheaacd_read_bits_buf(it_bit_buff, 1);
  878|       |
  879|  10.4k|    if (bit) ixheaacd_read_bits_buf(it_bit_buff, SBR_SCE_RESERV_BITS);
  ------------------
  |  |   69|  5.55k|#define SBR_SCE_RESERV_BITS 4
  ------------------
  |  Branch (879:9): [True: 5.55k, False: 4.89k]
  ------------------
  880|  10.4k|    if (audio_object_type == AOT_ER_AAC_ELD ||
  ------------------
  |  Branch (880:9): [True: 4.81k, False: 5.62k]
  ------------------
  881|  5.62k|        audio_object_type == AOT_ER_AAC_LD) {
  ------------------
  |  Branch (881:9): [True: 0, False: 5.62k]
  ------------------
  882|  4.81k|      if (ptr_frame_data->eld_sbr_flag == 1) {
  ------------------
  |  Branch (882:11): [True: 4.81k, False: 0]
  ------------------
  883|  4.81k|        err = ixheaacd_extract_frame_info_ld(it_bit_buff, ptr_frame_data);
  884|  4.81k|        if (err) return err;
  ------------------
  |  Branch (884:13): [True: 1, False: 4.81k]
  ------------------
  885|  4.81k|      }
  886|  5.62k|    } else {
  887|  5.62k|      if (!ixheaacd_sbr_time_freq_grid_info(it_bit_buff, ptr_frame_data,
  ------------------
  |  Branch (887:11): [True: 153, False: 5.47k]
  ------------------
  888|  5.62k|                                            env_extr_tables_ptr,
  889|  5.62k|                                            ptr_header_data->num_time_slots))
  890|       |
  891|    153|        return 0;
  892|  5.62k|    }
  893|  10.2k|    if (!ixheaacd_validate_frame_info(&ptr_frame_data->str_frame_info_details,
  ------------------
  |  Branch (893:9): [True: 39, False: 10.2k]
  ------------------
  894|  10.2k|                                      ptr_header_data->num_time_slots,
  895|  10.2k|                                      audio_object_type))
  896|     39|      return 0;
  897|       |
  898|  45.1k|  } else {
  899|  45.1k|    if (hbe_flag) {
  ------------------
  |  Branch (899:9): [True: 31.9k, False: 13.1k]
  ------------------
  900|  31.9k|      ptr_frame_data->sbr_patching_mode =
  901|  31.9k|          ixheaacd_read_bits_buf(it_bit_buff, ESBR_PATCHING_MODE_BITS);
  ------------------
  |  |  164|  31.9k|#define ESBR_PATCHING_MODE_BITS 1
  ------------------
  902|  31.9k|      if (ptr_frame_data->sbr_patching_mode == 0) {
  ------------------
  |  Branch (902:11): [True: 16.3k, False: 15.6k]
  ------------------
  903|  16.3k|        ptr_frame_data->over_sampling_flag =
  904|  16.3k|            ixheaacd_read_bits_buf(it_bit_buff, ESBR_OVERSAMPLING_FLAG_BITS);
  ------------------
  |  |  165|  16.3k|#define ESBR_OVERSAMPLING_FLAG_BITS 1
  ------------------
  905|  16.3k|        if (ixheaacd_read_bits_buf(it_bit_buff, ESBR_PITCHIN_FLAG_BITS))
  ------------------
  |  |  166|  16.3k|#define ESBR_PITCHIN_FLAG_BITS 1
  ------------------
  |  Branch (905:13): [True: 2.10k, False: 14.2k]
  ------------------
  906|  2.10k|          ptr_frame_data->pitch_in_bins =
  907|  2.10k|              ixheaacd_read_bits_buf(it_bit_buff, ESBR_PITCHIN_BINS_BITS);
  ------------------
  |  |  167|  2.10k|#define ESBR_PITCHIN_BINS_BITS 7
  ------------------
  908|  14.2k|        else
  909|  14.2k|          ptr_frame_data->pitch_in_bins = 0;
  910|  16.3k|      } else {
  911|  15.6k|        ptr_frame_data->over_sampling_flag = ptr_frame_data->pitch_in_bins = 0;
  912|  15.6k|      }
  913|  31.9k|    }
  914|  45.1k|    ptr_frame_data->num_time_slots = ptr_header_data->num_time_slots;
  915|  45.1k|    if (!ixheaacd_sbr_time_freq_grid_info(it_bit_buff, ptr_frame_data,
  ------------------
  |  Branch (915:9): [True: 30, False: 45.1k]
  ------------------
  916|  45.1k|                                          env_extr_tables_ptr,
  917|  45.1k|                                          ptr_header_data->num_time_slots))
  918|     30|      return 0;
  919|       |
  920|  45.1k|    if (!ixheaacd_validate_frame_info(&ptr_frame_data->str_frame_info_details,
  ------------------
  |  Branch (920:9): [True: 24, False: 45.1k]
  ------------------
  921|  45.1k|                                      ptr_header_data->num_time_slots,
  922|  45.1k|                                      audio_object_type))
  923|     24|      return 0;
  924|       |
  925|  45.1k|    ptr_frame_data->prev_sbr_mode = ORIG_SBR;
  926|  45.1k|  }
  927|       |
  928|  55.3k|  ixheaacd_sbr_env_dtdf_data(ptr_frame_data, it_bit_buff,
  929|  55.3k|                             ptr_header_data->usac_flag);
  930|       |
  931|  55.3k|  if (ptr_frame_data->del_cod_dir_arr[0] == DTDF_DIR_FREQ) {
  ------------------
  |  |   31|  55.3k|#define DTDF_DIR_FREQ 0
  ------------------
  |  Branch (931:7): [True: 38.9k, False: 16.4k]
  ------------------
  932|  38.9k|    ptr_header_data->err_flag = 0;
  933|  38.9k|  }
  934|       |
  935|   184k|  for (i = 0; i < num_if_bands; i++) {
  ------------------
  |  Branch (935:15): [True: 129k, False: 55.3k]
  ------------------
  936|   129k|    ptr_frame_data->sbr_invf_mode_prev[i] = ptr_frame_data->sbr_invf_mode[i];
  937|   129k|    ptr_frame_data->sbr_invf_mode[i] =
  938|   129k|        ixheaacd_read_bits_buf(it_bit_buff, SBR_INVERSE_FILT_MODE_BITS);
  ------------------
  |  |   73|   129k|#define SBR_INVERSE_FILT_MODE_BITS 2
  ------------------
  939|   129k|  }
  940|       |
  941|  55.3k|  if (!ixheaacd_read_sbr_env_data(ptr_header_data, ptr_frame_data, it_bit_buff,
  ------------------
  |  Branch (941:7): [True: 0, False: 55.3k]
  ------------------
  942|  55.3k|                                  env_extr_tables_ptr, audio_object_type))
  943|      0|    return 0;
  944|       |
  945|  55.3k|  ixheaacd_read_sbr_noise_floor_data(ptr_header_data, ptr_frame_data,
  946|  55.3k|                                     it_bit_buff, env_extr_tables_ptr);
  947|       |
  948|  55.3k|  if (usac_flag) {
  ------------------
  |  Branch (948:7): [True: 45.0k, False: 10.3k]
  ------------------
  949|  45.0k|    memset(
  950|  45.0k|        ptr_frame_data->add_harmonics, 0,
  951|  45.0k|        ptr_header_data->pstr_freq_band_data->num_sf_bands[1] * sizeof(WORD32));
  952|  45.0k|    ptr_frame_data->coupling_mode = COUPLING_OFF;
  ------------------
  |  |   38|  45.0k|#define COUPLING_OFF 0
  ------------------
  953|  45.0k|  }
  954|       |
  955|  55.3k|  bit = (FLAG)ixheaacd_read_bits_buf(it_bit_buff, 1);
  956|  55.3k|  if (bit) {
  ------------------
  |  Branch (956:7): [True: 15.0k, False: 40.2k]
  ------------------
  957|  15.0k|    ixheaacd_sbr_sin_coding_data(ptr_header_data, ptr_frame_data, it_bit_buff);
  958|  40.2k|  } else {
  959|  40.2k|    memset(ptr_frame_data->add_harmonics, 0, sizeof(FLAG) * MAX_FREQ_COEFFS);
  ------------------
  |  |   51|  40.2k|#define MAX_FREQ_COEFFS 56
  ------------------
  960|  40.2k|  }
  961|       |
  962|  55.3k|  if (!usac_flag) {
  ------------------
  |  Branch (962:7): [True: 10.2k, False: 45.1k]
  ------------------
  963|  10.2k|    IA_ERRORCODE err =
  964|  10.2k|        ixheaacd_read_extn_data(ptr_header_data, ptr_ps_dec, it_bit_buff,
  965|  10.2k|                                ptr_sbr_tables->ps_tables_ptr, ptr_frame_data, SBR_ID_SCE);
  966|  10.2k|    if (err == IA_FATAL_ERROR) {
  ------------------
  |  |   25|  10.2k|#define IA_FATAL_ERROR 0x80000000
  ------------------
  |  Branch (966:9): [True: 2, False: 10.2k]
  ------------------
  967|      2|      if (ec_flag)
  ------------------
  |  Branch (967:11): [True: 0, False: 2]
  ------------------
  968|      0|        return 0;
  969|      2|      else
  970|      2|        return err;
  971|      2|    }
  972|  10.2k|  }
  973|       |
  974|  55.3k|  return 1;
  975|  55.3k|}
ixheaacd_sbr_read_cpe:
  981|  70.7k|    WORD audio_object_type) {
  982|  70.7k|  WORD32 i, k, bit, num_ch = 2;
  983|  70.7k|  WORD32 num_if_bands = ptr_header_data->pstr_freq_band_data->num_if_bands;
  984|  70.7k|  WORD32 hbe_flag = ptr_header_data->hbe_flag;
  985|  70.7k|  WORD32 usac_flag = ptr_header_data->usac_flag;
  986|  70.7k|  IA_ERRORCODE err = IA_NO_ERROR;
  ------------------
  |  |   23|  70.7k|#define IA_NO_ERROR 0x00000000
  ------------------
  987|  70.7k|  ia_env_extr_tables_struct *env_extr_tables_ptr =
  988|  70.7k|      ptr_sbr_tables->env_extr_tables_ptr;
  989|  70.7k|  bit = ixheaacd_read_bits_buf(it_bit_buff, 1);
  990|       |
  991|  70.7k|  if (usac_flag) {
  ------------------
  |  Branch (991:7): [True: 49.8k, False: 20.8k]
  ------------------
  992|  49.8k|    if (bit) {
  ------------------
  |  Branch (992:9): [True: 19.9k, False: 29.9k]
  ------------------
  993|  19.9k|      if (hbe_flag) {
  ------------------
  |  Branch (993:11): [True: 9.74k, False: 10.2k]
  ------------------
  994|  9.74k|        ptr_frame_data[0]->sbr_patching_mode =
  995|  9.74k|            ptr_frame_data[1]->sbr_patching_mode =
  996|  9.74k|                ixheaacd_read_bits_buf(it_bit_buff, ESBR_PATCHING_MODE_BITS);
  ------------------
  |  |  164|  9.74k|#define ESBR_PATCHING_MODE_BITS 1
  ------------------
  997|  9.74k|        if (ptr_frame_data[0]->sbr_patching_mode == 0) {
  ------------------
  |  Branch (997:13): [True: 6.14k, False: 3.59k]
  ------------------
  998|  6.14k|          ptr_frame_data[0]->over_sampling_flag =
  999|  6.14k|              ptr_frame_data[1]->over_sampling_flag = ixheaacd_read_bits_buf(
 1000|  6.14k|                  it_bit_buff, ESBR_OVERSAMPLING_FLAG_BITS);
  ------------------
  |  |  165|  6.14k|#define ESBR_OVERSAMPLING_FLAG_BITS 1
  ------------------
 1001|  6.14k|          if (ixheaacd_read_bits_buf(it_bit_buff, ESBR_PITCHIN_FLAG_BITS))
  ------------------
  |  |  166|  6.14k|#define ESBR_PITCHIN_FLAG_BITS 1
  ------------------
  |  Branch (1001:15): [True: 417, False: 5.73k]
  ------------------
 1002|    417|            ptr_frame_data[0]->pitch_in_bins =
 1003|    417|                ptr_frame_data[1]->pitch_in_bins =
 1004|    417|                    ixheaacd_read_bits_buf(it_bit_buff, ESBR_PITCHIN_BINS_BITS);
  ------------------
  |  |  167|    417|#define ESBR_PITCHIN_BINS_BITS 7
  ------------------
 1005|  5.73k|          else
 1006|  5.73k|            ptr_frame_data[0]->pitch_in_bins =
 1007|  5.73k|                ptr_frame_data[1]->pitch_in_bins = 0;
 1008|  6.14k|        } else {
 1009|  3.59k|          ptr_frame_data[0]->over_sampling_flag = 0;
 1010|  3.59k|          ptr_frame_data[1]->over_sampling_flag = 0;
 1011|  3.59k|          ptr_frame_data[0]->pitch_in_bins = 0;
 1012|  3.59k|          ptr_frame_data[1]->pitch_in_bins = 0;
 1013|  3.59k|        }
 1014|  9.74k|      }
 1015|  19.9k|      ptr_frame_data[0]->coupling_mode = COUPLING_LEVEL;
  ------------------
  |  |   39|  19.9k|#define COUPLING_LEVEL 1
  ------------------
 1016|  19.9k|      ptr_frame_data[1]->coupling_mode = COUPLING_BAL;
  ------------------
  |  |   40|  19.9k|#define COUPLING_BAL 2
  ------------------
 1017|  29.9k|    } else {
 1018|  29.9k|      if (hbe_flag) {
  ------------------
  |  Branch (1018:11): [True: 19.4k, False: 10.4k]
  ------------------
 1019|  19.4k|        ptr_frame_data[0]->sbr_patching_mode =
 1020|  19.4k|            ixheaacd_read_bits_buf(it_bit_buff, ESBR_PATCHING_MODE_BITS);
  ------------------
  |  |  164|  19.4k|#define ESBR_PATCHING_MODE_BITS 1
  ------------------
 1021|  19.4k|        if (ptr_frame_data[0]->sbr_patching_mode == 0) {
  ------------------
  |  Branch (1021:13): [True: 14.2k, False: 5.19k]
  ------------------
 1022|  14.2k|          ptr_frame_data[0]->over_sampling_flag =
 1023|  14.2k|              ixheaacd_read_bits_buf(it_bit_buff, ESBR_OVERSAMPLING_FLAG_BITS);
  ------------------
  |  |  165|  14.2k|#define ESBR_OVERSAMPLING_FLAG_BITS 1
  ------------------
 1024|  14.2k|          if (ixheaacd_read_bits_buf(it_bit_buff, ESBR_PITCHIN_FLAG_BITS))
  ------------------
  |  |  166|  14.2k|#define ESBR_PITCHIN_FLAG_BITS 1
  ------------------
  |  Branch (1024:15): [True: 3.94k, False: 10.3k]
  ------------------
 1025|  3.94k|            ptr_frame_data[0]->pitch_in_bins =
 1026|  3.94k|                ixheaacd_read_bits_buf(it_bit_buff, ESBR_PITCHIN_BINS_BITS);
  ------------------
  |  |  167|  3.94k|#define ESBR_PITCHIN_BINS_BITS 7
  ------------------
 1027|  10.3k|          else
 1028|  10.3k|            ptr_frame_data[0]->pitch_in_bins = 0;
 1029|  14.2k|        } else {
 1030|  5.19k|          ptr_frame_data[0]->over_sampling_flag = 0;
 1031|  5.19k|          ptr_frame_data[0]->pitch_in_bins = 0;
 1032|  5.19k|        }
 1033|  19.4k|        ptr_frame_data[1]->sbr_patching_mode =
 1034|  19.4k|            ixheaacd_read_bits_buf(it_bit_buff, ESBR_PATCHING_MODE_BITS);
  ------------------
  |  |  164|  19.4k|#define ESBR_PATCHING_MODE_BITS 1
  ------------------
 1035|  19.4k|        if (ptr_frame_data[1]->sbr_patching_mode == 0) {
  ------------------
  |  Branch (1035:13): [True: 10.8k, False: 8.64k]
  ------------------
 1036|  10.8k|          ptr_frame_data[1]->over_sampling_flag =
 1037|  10.8k|              ixheaacd_read_bits_buf(it_bit_buff, ESBR_OVERSAMPLING_FLAG_BITS);
  ------------------
  |  |  165|  10.8k|#define ESBR_OVERSAMPLING_FLAG_BITS 1
  ------------------
 1038|  10.8k|          if (ixheaacd_read_bits_buf(it_bit_buff, ESBR_PITCHIN_FLAG_BITS))
  ------------------
  |  |  166|  10.8k|#define ESBR_PITCHIN_FLAG_BITS 1
  ------------------
  |  Branch (1038:15): [True: 4.27k, False: 6.56k]
  ------------------
 1039|  4.27k|            ptr_frame_data[1]->pitch_in_bins =
 1040|  4.27k|                ixheaacd_read_bits_buf(it_bit_buff, ESBR_PITCHIN_BINS_BITS);
  ------------------
  |  |  167|  4.27k|#define ESBR_PITCHIN_BINS_BITS 7
  ------------------
 1041|  6.56k|          else
 1042|  6.56k|            ptr_frame_data[1]->pitch_in_bins = 0;
 1043|  10.8k|        } else {
 1044|  8.64k|          ptr_frame_data[1]->over_sampling_flag =
 1045|  8.64k|              ptr_frame_data[1]->pitch_in_bins = 0;
 1046|  8.64k|        }
 1047|  19.4k|      }
 1048|       |
 1049|  29.9k|      ptr_frame_data[0]->coupling_mode = COUPLING_OFF;
  ------------------
  |  |   38|  29.9k|#define COUPLING_OFF 0
  ------------------
 1050|  29.9k|      ptr_frame_data[1]->coupling_mode = COUPLING_OFF;
  ------------------
  |  |   38|  29.9k|#define COUPLING_OFF 0
  ------------------
 1051|  29.9k|    }
 1052|  49.8k|  } else {
 1053|  20.8k|    if (bit) {
  ------------------
  |  Branch (1053:9): [True: 6.09k, False: 14.7k]
  ------------------
 1054|  6.09k|      ixheaacd_read_bits_buf(it_bit_buff,
 1055|  6.09k|                             SBR_SCE_RESERV_BITS + SBR_SCE_RESERV_BITS);
  ------------------
  |  |   69|  6.09k|#define SBR_SCE_RESERV_BITS 4
  ------------------
                                           SBR_SCE_RESERV_BITS + SBR_SCE_RESERV_BITS);
  ------------------
  |  |   69|  6.09k|#define SBR_SCE_RESERV_BITS 4
  ------------------
 1056|  6.09k|    }
 1057|  20.8k|    if ((audio_object_type != AOT_ER_AAC_ELD) &&
  ------------------
  |  Branch (1057:9): [True: 37, False: 20.8k]
  ------------------
 1058|     37|        (ptr_header_data->channel_mode != SBR_STEREO)) {
  ------------------
  |  |   28|     37|#define SBR_STEREO 2
  ------------------
  |  Branch (1058:9): [True: 0, False: 37]
  ------------------
 1059|      0|      ptr_header_data->sync_state = UPSAMPLING;
  ------------------
  |  |   24|      0|#define UPSAMPLING 1
  ------------------
 1060|      0|      return 0;
 1061|      0|    }
 1062|       |
 1063|  20.8k|    bit = ixheaacd_read_bits_buf(it_bit_buff, SBR_COUPLNG_MODE_BITS);
  ------------------
  |  |   71|  20.8k|#define SBR_COUPLNG_MODE_BITS 1
  ------------------
 1064|       |
 1065|  20.8k|    if (bit) {
  ------------------
  |  Branch (1065:9): [True: 6.60k, False: 14.2k]
  ------------------
 1066|  6.60k|      ptr_frame_data[0]->coupling_mode = COUPLING_LEVEL;
  ------------------
  |  |   39|  6.60k|#define COUPLING_LEVEL 1
  ------------------
 1067|  6.60k|      ptr_frame_data[1]->coupling_mode = COUPLING_BAL;
  ------------------
  |  |   40|  6.60k|#define COUPLING_BAL 2
  ------------------
 1068|  14.2k|    } else {
 1069|  14.2k|      ptr_frame_data[0]->coupling_mode = COUPLING_OFF;
  ------------------
  |  |   38|  14.2k|#define COUPLING_OFF 0
  ------------------
 1070|  14.2k|      ptr_frame_data[1]->coupling_mode = COUPLING_OFF;
  ------------------
  |  |   38|  14.2k|#define COUPLING_OFF 0
  ------------------
 1071|  14.2k|    }
 1072|  20.8k|  }
 1073|       |
 1074|   185k|  for (i = 0; i < num_ch; i++) {
  ------------------
  |  Branch (1074:15): [True: 114k, False: 70.7k]
  ------------------
 1075|   114k|    ptr_frame_data[i]->num_time_slots = ptr_header_data->num_time_slots;
 1076|   114k|    if (audio_object_type == AOT_ER_AAC_ELD ||
  ------------------
  |  Branch (1076:9): [True: 35.1k, False: 79.8k]
  ------------------
 1077|  79.8k|        audio_object_type == AOT_ER_AAC_LD) {
  ------------------
  |  Branch (1077:9): [True: 0, False: 79.8k]
  ------------------
 1078|  35.1k|      if (ptr_frame_data[i]->eld_sbr_flag == 1) {
  ------------------
  |  Branch (1078:11): [True: 35.1k, False: 0]
  ------------------
 1079|  35.1k|        err = ixheaacd_extract_frame_info_ld(it_bit_buff, ptr_frame_data[i]);
 1080|  35.1k|        if (err) return err;
  ------------------
  |  Branch (1080:13): [True: 4, False: 35.1k]
  ------------------
 1081|  35.1k|      }
 1082|  79.8k|    } else {
 1083|  79.8k|      if (!ixheaacd_sbr_time_freq_grid_info(it_bit_buff, ptr_frame_data[i],
  ------------------
  |  Branch (1083:11): [True: 33, False: 79.8k]
  ------------------
 1084|  79.8k|                                            env_extr_tables_ptr,
 1085|  79.8k|                                            ptr_header_data->num_time_slots))
 1086|     33|        return 0;
 1087|  79.8k|    }
 1088|       |
 1089|   114k|    if (!ixheaacd_validate_frame_info(
  ------------------
  |  Branch (1089:9): [True: 29, False: 114k]
  ------------------
 1090|   114k|            &ptr_frame_data[i]->str_frame_info_details,
 1091|   114k|            ptr_header_data->num_time_slots, audio_object_type))
 1092|     29|      return 0;
 1093|       |
 1094|   114k|    if (ptr_frame_data[0]->coupling_mode) {
  ------------------
  |  Branch (1094:9): [True: 26.5k, False: 88.3k]
  ------------------
 1095|  26.5k|      memcpy(&ptr_frame_data[1]->str_frame_info_details,
 1096|  26.5k|             &ptr_frame_data[0]->str_frame_info_details,
 1097|  26.5k|             sizeof(ia_frame_info_struct));
 1098|  26.5k|      if (audio_object_type == AOT_ER_AAC_ELD ||
  ------------------
  |  Branch (1098:11): [True: 6.59k, False: 19.9k]
  ------------------
 1099|  19.9k|          audio_object_type == AOT_ER_AAC_LD) {
  ------------------
  |  Branch (1099:11): [True: 0, False: 19.9k]
  ------------------
 1100|  6.59k|        ptr_frame_data[1]->amp_res = ptr_frame_data[0]->amp_res;
 1101|  6.59k|      }
 1102|  26.5k|      num_ch = 1;
 1103|  26.5k|    }
 1104|   114k|  }
 1105|       |
 1106|  70.7k|  if (ptr_frame_data[0]->coupling_mode && usac_flag) {
  ------------------
  |  Branch (1106:7): [True: 26.5k, False: 44.1k]
  |  Branch (1106:43): [True: 19.9k, False: 6.60k]
  ------------------
 1107|  19.9k|    ixheaacd_sbr_env_dtdf_data(ptr_frame_data[0], it_bit_buff,
 1108|  19.9k|                               ptr_header_data->usac_flag);
 1109|  19.9k|    ixheaacd_sbr_env_dtdf_data(ptr_frame_data[1], it_bit_buff,
 1110|  19.9k|                               ptr_header_data->usac_flag);
 1111|       |
 1112|  64.2k|    for (i = 0; i < ptr_header_data->pstr_freq_band_data->num_if_bands; i++) {
  ------------------
  |  Branch (1112:17): [True: 44.2k, False: 19.9k]
  ------------------
 1113|  44.2k|      ptr_frame_data[0]->sbr_invf_mode_prev[i] =
 1114|  44.2k|          ptr_frame_data[0]->sbr_invf_mode[i];
 1115|  44.2k|      ptr_frame_data[1]->sbr_invf_mode_prev[i] =
 1116|  44.2k|          ptr_frame_data[1]->sbr_invf_mode[i];
 1117|       |
 1118|  44.2k|      ptr_frame_data[0]->sbr_invf_mode[i] =
 1119|  44.2k|          ixheaacd_read_bits_buf(it_bit_buff, ESBR_INVF_MODE_BITS);
  ------------------
  |  |  170|  44.2k|#define ESBR_INVF_MODE_BITS 2
  ------------------
 1120|  44.2k|      ptr_frame_data[1]->sbr_invf_mode[i] = ptr_frame_data[0]->sbr_invf_mode[i];
 1121|  44.2k|    }
 1122|       |
 1123|  19.9k|    if (!ixheaacd_read_sbr_env_data(ptr_header_data, ptr_frame_data[0],
  ------------------
  |  Branch (1123:9): [True: 0, False: 19.9k]
  ------------------
 1124|  19.9k|                                    it_bit_buff, env_extr_tables_ptr,
 1125|  19.9k|                                    audio_object_type)) {
 1126|      0|      return 0;
 1127|      0|    }
 1128|  19.9k|    ixheaacd_read_sbr_noise_floor_data(ptr_header_data, ptr_frame_data[0],
 1129|  19.9k|                                       it_bit_buff, env_extr_tables_ptr);
 1130|       |
 1131|  19.9k|    if (!ixheaacd_read_sbr_env_data(ptr_header_data, ptr_frame_data[1],
  ------------------
  |  Branch (1131:9): [True: 0, False: 19.9k]
  ------------------
 1132|  19.9k|                                    it_bit_buff, env_extr_tables_ptr,
 1133|  19.9k|                                    audio_object_type)) {
 1134|      0|      return 0;
 1135|      0|    }
 1136|  19.9k|    ixheaacd_read_sbr_noise_floor_data(ptr_header_data, ptr_frame_data[1],
 1137|  19.9k|                                       it_bit_buff, env_extr_tables_ptr);
 1138|       |
 1139|  19.9k|    memset(
 1140|  19.9k|        ptr_frame_data[0]->add_harmonics, 0,
 1141|  19.9k|        ptr_header_data->pstr_freq_band_data->num_sf_bands[1] * sizeof(WORD32));
 1142|  19.9k|    memset(
 1143|  19.9k|        ptr_frame_data[1]->add_harmonics, 0,
 1144|  19.9k|        ptr_header_data->pstr_freq_band_data->num_sf_bands[1] * sizeof(WORD32));
 1145|       |
 1146|  50.7k|  } else {
 1147|  50.7k|    ixheaacd_sbr_env_dtdf_data(ptr_frame_data[0], it_bit_buff,
 1148|  50.7k|                               ptr_header_data->usac_flag);
 1149|  50.7k|    ixheaacd_sbr_env_dtdf_data(ptr_frame_data[1], it_bit_buff,
 1150|  50.7k|                               ptr_header_data->usac_flag);
 1151|       |
 1152|  50.7k|    if ((ptr_frame_data[0]->del_cod_dir_arr[0] == DTDF_DIR_FREQ) &&
  ------------------
  |  |   31|  50.7k|#define DTDF_DIR_FREQ 0
  ------------------
  |  Branch (1152:9): [True: 31.5k, False: 19.2k]
  ------------------
 1153|  31.5k|        (ptr_frame_data[1]->del_cod_dir_arr[0] == DTDF_DIR_FREQ)) {
  ------------------
  |  |   31|  31.5k|#define DTDF_DIR_FREQ 0
  ------------------
  |  Branch (1153:9): [True: 22.9k, False: 8.58k]
  ------------------
 1154|  22.9k|      ptr_header_data->err_flag = 0;
 1155|  22.9k|    }
 1156|       |
 1157|   145k|    for (k = 0; k < num_ch; k++) {
  ------------------
  |  Branch (1157:17): [True: 94.9k, False: 50.7k]
  ------------------
 1158|   320k|      for (i = 0; i < num_if_bands; i++) {
  ------------------
  |  Branch (1158:19): [True: 225k, False: 94.9k]
  ------------------
 1159|   225k|        ptr_frame_data[k]->sbr_invf_mode_prev[i] =
 1160|   225k|            ptr_frame_data[k]->sbr_invf_mode[i];
 1161|   225k|        ptr_frame_data[k]->sbr_invf_mode[i] = ixheaacd_read_bits_buf(
 1162|   225k|            it_bit_buff, SBR_INVERSE_FILT_MODE_BITS);
  ------------------
  |  |   73|   225k|#define SBR_INVERSE_FILT_MODE_BITS 2
  ------------------
 1163|   225k|      }
 1164|  94.9k|    }
 1165|       |
 1166|  50.7k|    if (ptr_frame_data[0]->coupling_mode) {
  ------------------
  |  Branch (1166:9): [True: 6.60k, False: 44.1k]
  ------------------
 1167|  6.60k|      memcpy(ptr_frame_data[1]->sbr_invf_mode_prev, ptr_frame_data[1]->sbr_invf_mode,
 1168|  6.60k|             sizeof(ptr_frame_data[1]->sbr_invf_mode_prev[0]) * num_if_bands);
 1169|  6.60k|      memcpy(ptr_frame_data[1]->sbr_invf_mode, ptr_frame_data[0]->sbr_invf_mode,
 1170|  6.60k|             sizeof(WORD32) * num_if_bands);
 1171|       |
 1172|  6.60k|      if (!ixheaacd_read_sbr_env_data(ptr_header_data, ptr_frame_data[0],
  ------------------
  |  Branch (1172:11): [True: 0, False: 6.60k]
  ------------------
 1173|  6.60k|                                      it_bit_buff, env_extr_tables_ptr,
 1174|  6.60k|                                      audio_object_type)) {
 1175|      0|        return 0;
 1176|      0|      }
 1177|       |
 1178|  6.60k|      ixheaacd_read_sbr_noise_floor_data(ptr_header_data, ptr_frame_data[0],
 1179|  6.60k|                                         it_bit_buff, env_extr_tables_ptr);
 1180|       |
 1181|  6.60k|      if (!ixheaacd_read_sbr_env_data(ptr_header_data, ptr_frame_data[1],
  ------------------
  |  Branch (1181:11): [True: 0, False: 6.60k]
  ------------------
 1182|  6.60k|                                      it_bit_buff, env_extr_tables_ptr,
 1183|  6.60k|                                      audio_object_type)) {
 1184|      0|        return 0;
 1185|      0|      }
 1186|  44.1k|    } else {
 1187|  44.1k|      if (!ixheaacd_read_sbr_env_data(ptr_header_data, ptr_frame_data[0],
  ------------------
  |  Branch (1187:11): [True: 0, False: 44.1k]
  ------------------
 1188|  44.1k|                                      it_bit_buff, env_extr_tables_ptr,
 1189|  44.1k|                                      audio_object_type))
 1190|      0|        return 0;
 1191|       |
 1192|  44.1k|      if (!ixheaacd_read_sbr_env_data(ptr_header_data, ptr_frame_data[1],
  ------------------
  |  Branch (1192:11): [True: 0, False: 44.1k]
  ------------------
 1193|  44.1k|                                      it_bit_buff, env_extr_tables_ptr,
 1194|  44.1k|                                      audio_object_type))
 1195|      0|        return 0;
 1196|       |
 1197|  44.1k|      ixheaacd_read_sbr_noise_floor_data(ptr_header_data, ptr_frame_data[0],
 1198|  44.1k|                                         it_bit_buff, env_extr_tables_ptr);
 1199|  44.1k|    }
 1200|  50.7k|    ixheaacd_read_sbr_noise_floor_data(ptr_header_data, ptr_frame_data[1],
 1201|  50.7k|                                       it_bit_buff, env_extr_tables_ptr);
 1202|  50.7k|  }
 1203|       |
 1204|  70.7k|  bit = (FLAG)ixheaacd_read_bits_buf(it_bit_buff, 1);
 1205|  70.7k|  if (bit) {
  ------------------
  |  Branch (1205:7): [True: 20.2k, False: 50.4k]
  ------------------
 1206|  20.2k|    ixheaacd_sbr_sin_coding_data(ptr_header_data, ptr_frame_data[0],
 1207|  20.2k|                                 it_bit_buff);
 1208|  50.4k|  } else {
 1209|  50.4k|    memset(ptr_frame_data[0]->add_harmonics, 0, sizeof(FLAG) * MAX_FREQ_COEFFS);
  ------------------
  |  |   51|  50.4k|#define MAX_FREQ_COEFFS 56
  ------------------
 1210|  50.4k|  }
 1211|       |
 1212|  70.7k|  bit = (FLAG)ixheaacd_read_bits_buf(it_bit_buff, 1);
 1213|  70.7k|  if (bit) {
  ------------------
  |  Branch (1213:7): [True: 20.5k, False: 50.1k]
  ------------------
 1214|  20.5k|    ixheaacd_sbr_sin_coding_data(ptr_header_data, ptr_frame_data[1],
 1215|  20.5k|                                 it_bit_buff);
 1216|  50.1k|  } else {
 1217|  50.1k|    memset(ptr_frame_data[1]->add_harmonics, 0, sizeof(FLAG) * MAX_FREQ_COEFFS);
  ------------------
  |  |   51|  50.1k|#define MAX_FREQ_COEFFS 56
  ------------------
 1218|  50.1k|  }
 1219|       |
 1220|  70.7k|  if (!usac_flag) {
  ------------------
  |  Branch (1220:7): [True: 20.6k, False: 50.0k]
  ------------------
 1221|  20.6k|    IA_ERRORCODE err =
 1222|  20.6k|        ixheaacd_read_extn_data(ptr_header_data, NULL, it_bit_buff, ptr_sbr_tables->ps_tables_ptr,
 1223|  20.6k|                                (VOID *)ptr_frame_data, SBR_ID_CPE);
 1224|  20.6k|    if (err == IA_FATAL_ERROR) {
  ------------------
  |  |   25|  20.6k|#define IA_FATAL_ERROR 0x80000000
  ------------------
  |  Branch (1224:9): [True: 0, False: 20.6k]
  ------------------
 1225|      0|      return err;
 1226|      0|    }
 1227|  20.6k|  }
 1228|  70.7k|  return 1;
 1229|  70.7k|}
ixheaacd_sbr_env_dtdf_data:
 1233|   196k|                                WORD32 usac_flag) {
 1234|   196k|  WORD32 i;
 1235|   196k|  WORD32 num_env = ptr_frame_data->str_frame_info_details.num_env;
 1236|   196k|  WORD32 num_noise_env = ptr_frame_data->str_frame_info_details.num_noise_env;
 1237|   196k|  WORD16 *p_coding_dir_vec = ptr_frame_data->del_cod_dir_arr;
 1238|   196k|  WORD16 *p_coding_dir_noise_vec = ptr_frame_data->del_cod_dir_noise_arr;
 1239|   196k|  WORD32 usac_independency_flag = ptr_frame_data->usac_independency_flag;
 1240|       |
 1241|   196k|  if (usac_flag) {
  ------------------
  |  Branch (1241:7): [True: 144k, False: 51.9k]
  ------------------
 1242|   144k|    if (usac_independency_flag) {
  ------------------
  |  Branch (1242:9): [True: 3.49k, False: 141k]
  ------------------
 1243|  3.49k|      *p_coding_dir_vec = 0;
 1244|  3.49k|      p_coding_dir_vec++;
 1245|   141k|    } else {
 1246|   141k|      *p_coding_dir_vec =
 1247|   141k|          (WORD16)ixheaacd_read_bits_buf(it_bit_buff, SBR_DEL_COD_DIR_BITS);
  ------------------
  |  |   80|   141k|#define SBR_DEL_COD_DIR_BITS 1
  ------------------
 1248|   141k|      p_coding_dir_vec++;
 1249|   141k|    }
 1250|   262k|    for (i = num_env - 1; i >= 1; i--) {
  ------------------
  |  Branch (1250:27): [True: 118k, False: 144k]
  ------------------
 1251|   118k|      *p_coding_dir_vec++ =
 1252|   118k|          (WORD16)ixheaacd_read_bits_buf(it_bit_buff, SBR_DEL_COD_DIR_BITS);
  ------------------
  |  |   80|   118k|#define SBR_DEL_COD_DIR_BITS 1
  ------------------
 1253|   118k|    }
 1254|   144k|    if (usac_independency_flag) {
  ------------------
  |  Branch (1254:9): [True: 3.49k, False: 141k]
  ------------------
 1255|  3.49k|      *p_coding_dir_noise_vec = 0;
 1256|  3.49k|      p_coding_dir_noise_vec++;
 1257|   141k|    } else {
 1258|   141k|      *p_coding_dir_noise_vec =
 1259|   141k|          (WORD16)ixheaacd_read_bits_buf(it_bit_buff, SBR_DEL_COD_DIR_BITS);
  ------------------
  |  |   80|   141k|#define SBR_DEL_COD_DIR_BITS 1
  ------------------
 1260|   141k|      p_coding_dir_noise_vec++;
 1261|   141k|    }
 1262|   207k|    for (i = num_noise_env - 1; i >= 1; i--) {
  ------------------
  |  Branch (1262:33): [True: 62.6k, False: 144k]
  ------------------
 1263|  62.6k|      *p_coding_dir_noise_vec++ =
 1264|  62.6k|          (WORD16)ixheaacd_read_bits_buf(it_bit_buff, SBR_DEL_COD_DIR_BITS);
  ------------------
  |  |   80|  62.6k|#define SBR_DEL_COD_DIR_BITS 1
  ------------------
 1265|  62.6k|    }
 1266|   144k|  } else {
 1267|   194k|    for (i = num_env - 1; i >= 0; i--) {
  ------------------
  |  Branch (1267:27): [True: 143k, False: 51.9k]
  ------------------
 1268|   143k|      *p_coding_dir_vec++ =
 1269|   143k|          (WORD16)ixheaacd_read_bits_buf(it_bit_buff, SBR_DEL_COD_DIR_BITS);
  ------------------
  |  |   80|   143k|#define SBR_DEL_COD_DIR_BITS 1
  ------------------
 1270|   143k|    }
 1271|       |
 1272|   138k|    for (i = num_noise_env - 1; i >= 0; i--) {
  ------------------
  |  Branch (1272:33): [True: 86.8k, False: 51.9k]
  ------------------
 1273|  86.8k|      *p_coding_dir_noise_vec++ =
 1274|  86.8k|          (WORD16)ixheaacd_read_bits_buf(it_bit_buff, SBR_DEL_COD_DIR_BITS);
  ------------------
  |  |   80|  86.8k|#define SBR_DEL_COD_DIR_BITS 1
  ------------------
 1275|  86.8k|    }
 1276|  51.9k|  }
 1277|   196k|}
ixheaacd_read_env_data:
 1286|   458k|                            WORD32 lav, WORD32 usac_flag) {
 1287|   458k|  WORD32 j, i, ixheaacd_drc_offset = 0,
 1288|   458k|               coupling_mode = ptr_frame_data->coupling_mode, delta, bits,
 1289|   458k|               shift;
 1290|   458k|  WORD16 *p_coding_dir_vec, *p_sbr_sf;
 1291|   458k|  WORD16 index, length;
 1292|   458k|  WORD32 readword;
 1293|   458k|  FLOAT32 *p_sbr_sf_float;
 1294|       |
 1295|   458k|  if (num_noise_env) {
  ------------------
  |  Branch (1295:7): [True: 261k, False: 196k]
  ------------------
 1296|   261k|    p_coding_dir_vec = ptr_frame_data->del_cod_dir_noise_arr;
 1297|   261k|    p_sbr_sf = ptr_frame_data->int_noise_floor;
 1298|   261k|    p_sbr_sf_float = ptr_frame_data->flt_noise_floor;
 1299|   261k|  } else {
 1300|   196k|    p_coding_dir_vec = ptr_frame_data->del_cod_dir_arr;
 1301|   196k|    p_sbr_sf = ptr_frame_data->int_env_sf_arr;
 1302|   196k|    p_sbr_sf_float = ptr_frame_data->flt_env_sf_arr;
 1303|   196k|  }
 1304|       |
 1305|   458k|  if (coupling_mode == COUPLING_BAL) {
  ------------------
  |  |   40|   458k|#define COUPLING_BAL 2
  ------------------
  |  Branch (1305:7): [True: 53.0k, False: 405k]
  ------------------
 1306|  53.0k|    bits = start_bits_balance;
 1307|  53.0k|    shift = env_data_tbl_comp_factor;
 1308|       |
 1309|   405k|  } else {
 1310|   405k|    bits = start_bits;
 1311|   405k|    shift = 0;
 1312|   405k|  }
 1313|       |
 1314|  1.26M|  for (j = 0; j < num_env; j++) {
  ------------------
  |  Branch (1314:15): [True: 806k, False: 458k]
  ------------------
 1315|   806k|    ia_huffman_data_type h;
 1316|   806k|    const WORD32 *idx_tab;
 1317|   806k|    WORD32 dtdf_dir_flag = p_coding_dir_vec[j];
 1318|       |
 1319|   806k|    if (dtdf_dir_flag == DTDF_DIR_FREQ) {
  ------------------
  |  |   31|   806k|#define DTDF_DIR_FREQ 0
  ------------------
  |  Branch (1319:9): [True: 524k, False: 281k]
  ------------------
 1320|   524k|      p_sbr_sf[ixheaacd_drc_offset] =
 1321|   524k|          (WORD16)(ixheaacd_read_bits_buf(it_bit_buff, bits) << shift);
 1322|   524k|      p_sbr_sf_float[ixheaacd_drc_offset] = p_sbr_sf[ixheaacd_drc_offset];
 1323|   524k|      h = hcb_f;
 1324|   524k|      idx_tab = idx_f;
 1325|   524k|    } else {
 1326|   281k|      h = hcb_t;
 1327|   281k|      idx_tab = idx_t;
 1328|   281k|    }
 1329|       |
 1330|  5.19M|    for (i = (1 - dtdf_dir_flag); i < no_band[j]; i++) {
  ------------------
  |  Branch (1330:35): [True: 4.39M, False: 806k]
  ------------------
 1331|  4.39M|      if (it_bit_buff->cnt_bits < 20) {
  ------------------
  |  Branch (1331:11): [True: 2.23k, False: 4.38M]
  ------------------
 1332|  2.23k|        readword = ixheaacd_show_bits_buf(it_bit_buff, it_bit_buff->cnt_bits);
 1333|  2.23k|        readword = readword << (32 - it_bit_buff->cnt_bits);
 1334|  4.38M|      } else {
 1335|  4.38M|        readword = ixheaacd_show_bits_buf(it_bit_buff, 20);
 1336|  4.38M|        readword = readword << 12;
 1337|  4.38M|      }
 1338|  4.39M|      ixheaacd_huffman_decode(readword, &index, &length, (const UWORD16 *)h,
 1339|  4.39M|                              (const UWORD32 *)idx_tab);
 1340|  4.39M|      delta = index - lav;
 1341|  4.39M|      ixheaacd_read_bits_buf(it_bit_buff, length);
 1342|  4.39M|      p_sbr_sf[ixheaacd_drc_offset + i] =
 1343|  4.39M|          (WORD16)(delta << env_data_tbl_comp_factor);
 1344|  4.39M|      p_sbr_sf_float[ixheaacd_drc_offset + i] =
 1345|  4.39M|          p_sbr_sf[ixheaacd_drc_offset + i];
 1346|  4.39M|    }
 1347|   806k|    if (usac_flag && (num_noise_env == 0)) {
  ------------------
  |  Branch (1347:9): [True: 577k, False: 229k]
  |  Branch (1347:22): [True: 262k, False: 314k]
  ------------------
 1348|   262k|      ptr_frame_data->inter_temp_shape_mode[j] = 0;
 1349|   262k|      if (ptr_frame_data->inter_tes_flag) {
  ------------------
  |  Branch (1349:11): [True: 51.7k, False: 210k]
  ------------------
 1350|  51.7k|        WORD32 flag = ixheaacd_read_bits_buf(it_bit_buff, 1);
 1351|  51.7k|        if (flag) {
  ------------------
  |  Branch (1351:13): [True: 10.6k, False: 41.0k]
  ------------------
 1352|  10.6k|          ptr_frame_data->inter_temp_shape_mode[j] =
 1353|  10.6k|              ixheaacd_read_bits_buf(it_bit_buff, 2);
 1354|  10.6k|        }
 1355|  51.7k|      }
 1356|   262k|    }
 1357|   806k|    ixheaacd_drc_offset += (no_band[j]);
 1358|   806k|  }
 1359|   458k|}
ixheaacd_read_sbr_noise_floor_data:
 1365|   261k|    ia_env_extr_tables_struct *env_extr_tables_ptr) {
 1366|   261k|  WORD32 i;
 1367|   261k|  WORD32 coupling_mode;
 1368|   261k|  WORD16 num_noise_bands[MAX_NOISE_ENVELOPES];
 1369|   261k|  ia_huffman_data_type hcb_noise_env;
 1370|   261k|  ia_huffman_data_type hcb_noise;
 1371|   261k|  WORD32 *idx_noise_env;
 1372|   261k|  WORD32 *idx_noise;
 1373|   261k|  WORD32 lav;
 1374|   261k|  WORD32 env_data_tbl_comp_factor;
 1375|       |
 1376|   261k|  WORD32 start_bits;
 1377|   261k|  WORD32 start_bits_balance;
 1378|   261k|  WORD32 num_noise_env = ptr_frame_data->str_frame_info_details.num_noise_env;
 1379|       |
 1380|   662k|  for (i = 0; i < num_noise_env; i++)
  ------------------
  |  Branch (1380:15): [True: 400k, False: 261k]
  ------------------
 1381|   400k|    num_noise_bands[i] = ptr_header_data->pstr_freq_band_data->num_nf_bands;
 1382|       |
 1383|   261k|  start_bits = SBR_BEGIN_NOISE_BITS_AMPLITUDE_RESOLUTION_3_0;
  ------------------
  |  |   86|   261k|#define SBR_BEGIN_NOISE_BITS_AMPLITUDE_RESOLUTION_3_0 5
  ------------------
 1384|   261k|  start_bits_balance = SBR_BEGIN_NOISE_BITS_BALNCE_AMPLITUDE_RESOLUTION_3_0;
  ------------------
  |  |   87|   261k|#define SBR_BEGIN_NOISE_BITS_BALNCE_AMPLITUDE_RESOLUTION_3_0 5
  ------------------
 1385|       |
 1386|   261k|  coupling_mode = ptr_frame_data->coupling_mode;
 1387|       |
 1388|   261k|  if (coupling_mode == COUPLING_BAL) {
  ------------------
  |  |   40|   261k|#define COUPLING_BAL 2
  ------------------
  |  Branch (1388:7): [True: 26.4k, False: 235k]
  ------------------
 1389|  26.4k|    lav = 12;
 1390|  26.4k|    hcb_noise = (ia_huffman_data_type)&env_extr_tables_ptr
 1391|  26.4k|                    ->ixheaacd_t_huffman_noise_bal_3_0db_inp_table;
 1392|  26.4k|    idx_noise =
 1393|  26.4k|        env_extr_tables_ptr->ixheaacd_t_huffman_noise_bal_3_0db_idx_table;
 1394|  26.4k|    hcb_noise_env = (ia_huffman_data_type)&env_extr_tables_ptr
 1395|  26.4k|                        ->ixheaacd_f_huffman_env_bal_3_0db_inp_table;
 1396|  26.4k|    idx_noise_env =
 1397|  26.4k|        env_extr_tables_ptr->ixheaacd_f_huffman_env_bal_3_0db_idx_table;
 1398|  26.4k|    env_data_tbl_comp_factor = 1;
 1399|   235k|  } else {
 1400|   235k|    lav = 31;
 1401|   235k|    hcb_noise = (ia_huffman_data_type)&env_extr_tables_ptr
 1402|   235k|                    ->ixheaacd_t_huffman_noise_3_0db_inp_table;
 1403|   235k|    idx_noise = env_extr_tables_ptr->ixheaacd_t_huffman_noise_3_0db_idx_table;
 1404|   235k|    hcb_noise_env = (ia_huffman_data_type)&env_extr_tables_ptr
 1405|   235k|                        ->ixheaacd_f_huffman_env_3_0db_inp_table;
 1406|   235k|    idx_noise_env = env_extr_tables_ptr->ixheaacd_f_huffman_env_3_0db_idx_table;
 1407|   235k|    env_data_tbl_comp_factor = 0;
 1408|   235k|  }
 1409|       |
 1410|   261k|  ixheaacd_read_env_data(ptr_frame_data, it_bit_buff, hcb_noise, hcb_noise_env,
 1411|   261k|                         idx_noise, idx_noise_env, &num_noise_bands[0],
 1412|   261k|                         num_noise_env, env_data_tbl_comp_factor, start_bits,
 1413|   261k|                         start_bits_balance, 1, lav,
 1414|   261k|                         ptr_header_data->usac_flag);
 1415|   261k|}
ixheaacd_read_sbr_env_data:
 1421|   196k|    ia_env_extr_tables_struct *env_extr_tables_ptr, WORD audio_object_type) {
 1422|   196k|  WORD32 coupling_mode = ptr_frame_data->coupling_mode;
 1423|   196k|  WORD32 *idx_t, *idx_f;
 1424|   196k|  WORD32 lav;
 1425|   196k|  WORD32 i;
 1426|   196k|  WORD16 no_band[MAX_ENVELOPES];
 1427|   196k|  WORD32 amp_res, num_env, env_data_tbl_comp_factor, start_bits,
 1428|   196k|      start_bits_balance;
 1429|   196k|  WORD16 *p_freq_res = ptr_frame_data->str_frame_info_details.freq_res;
 1430|   196k|  WORD16 *p_num_sf_bands = ptr_header_data->pstr_freq_band_data->num_sf_bands;
 1431|   196k|  ia_huffman_data_type hcb_t, hcb_f;
 1432|       |
 1433|   196k|  amp_res = ptr_header_data->amp_res;
 1434|   196k|  num_env = ptr_frame_data->str_frame_info_details.num_env;
 1435|       |
 1436|   196k|  ptr_frame_data->num_env_sfac = 0;
 1437|       |
 1438|   196k|  if ((ptr_frame_data->str_frame_info_details.frame_class == FIXFIX) &&
  ------------------
  |  |  225|   196k|#define FIXFIX 0
  ------------------
  |  Branch (1438:7): [True: 125k, False: 71.4k]
  ------------------
 1439|   125k|      (num_env == 1)) {
  ------------------
  |  Branch (1439:7): [True: 74.0k, False: 51.2k]
  ------------------
 1440|  74.0k|    if (audio_object_type != AOT_ER_AAC_ELD &&
  ------------------
  |  Branch (1440:9): [True: 58.6k, False: 15.3k]
  ------------------
 1441|  58.6k|        audio_object_type != AOT_ER_AAC_LD) {
  ------------------
  |  Branch (1441:9): [True: 58.6k, False: 0]
  ------------------
 1442|  58.6k|      amp_res = SBR_AMPLITUDE_RESOLUTION_1_5;
  ------------------
  |  |   23|  58.6k|#define SBR_AMPLITUDE_RESOLUTION_1_5 0
  ------------------
 1443|  58.6k|    } else {
 1444|  15.3k|      amp_res = ptr_frame_data->amp_res;
 1445|  15.3k|    }
 1446|  74.0k|  }
 1447|   196k|  ptr_frame_data->amp_res = amp_res;
 1448|       |
 1449|   196k|  if (amp_res == SBR_AMPLITUDE_RESOLUTION_3_0) {
  ------------------
  |  |   24|   196k|#define SBR_AMPLITUDE_RESOLUTION_3_0 1
  ------------------
  |  Branch (1449:7): [True: 53.0k, False: 143k]
  ------------------
 1450|  53.0k|    start_bits = SBR_BEGIN_ENVN_BITS_AMPLITUDE_RESOLUTION_3_0;
  ------------------
  |  |   84|  53.0k|#define SBR_BEGIN_ENVN_BITS_AMPLITUDE_RESOLUTION_3_0 6
  ------------------
 1451|  53.0k|    start_bits_balance = SBR_BEGIN_ENVN_BITS_BALNCE_AMPLITUDE_RESOLUTION_3_0;
  ------------------
  |  |   85|  53.0k|#define SBR_BEGIN_ENVN_BITS_BALNCE_AMPLITUDE_RESOLUTION_3_0 5
  ------------------
 1452|   143k|  } else {
 1453|   143k|    start_bits = SBR_BEGIN_ENVN_BITS_AMPLITUDE_RESOLUTION_1_5;
  ------------------
  |  |   89|   143k|#define SBR_BEGIN_ENVN_BITS_AMPLITUDE_RESOLUTION_1_5 7
  ------------------
 1454|   143k|    start_bits_balance = SBR_BEGIN_ENVN_BITS_BALNCE_AMPLITUDE_RESOLUTION_1_5;
  ------------------
  |  |   90|   143k|#define SBR_BEGIN_ENVN_BITS_BALNCE_AMPLITUDE_RESOLUTION_1_5 6
  ------------------
 1455|   143k|  }
 1456|       |
 1457|   602k|  for (i = 0; i < num_env; i++) {
  ------------------
  |  Branch (1457:15): [True: 405k, False: 196k]
  ------------------
 1458|   405k|    no_band[i] = p_num_sf_bands[*p_freq_res++];
 1459|   405k|    ptr_frame_data->num_env_sfac =
 1460|   405k|        ixheaac_add16(ptr_frame_data->num_env_sfac, no_band[i]);
 1461|   405k|  }
 1462|       |
 1463|   196k|  if (ptr_frame_data->num_env_sfac > MAX_NUM_ENVELOPE_VALUES) return 0;
  ------------------
  |  |   61|   196k|#define MAX_NUM_ENVELOPE_VALUES (MAX_ENVELOPES * MAX_FREQ_COEFFS)
  |  |  ------------------
  |  |  |  |   50|   196k|#define MAX_ENVELOPES 8
  |  |  ------------------
  |  |               #define MAX_NUM_ENVELOPE_VALUES (MAX_ENVELOPES * MAX_FREQ_COEFFS)
  |  |  ------------------
  |  |  |  |   51|   196k|#define MAX_FREQ_COEFFS 56
  |  |  ------------------
  ------------------
  |  Branch (1463:7): [True: 0, False: 196k]
  ------------------
 1464|       |
 1465|   196k|  if (coupling_mode == COUPLING_BAL) {
  ------------------
  |  |   40|   196k|#define COUPLING_BAL 2
  ------------------
  |  Branch (1465:7): [True: 26.5k, False: 170k]
  ------------------
 1466|  26.5k|    env_data_tbl_comp_factor = 1;
 1467|       |
 1468|  26.5k|    if (amp_res == SBR_AMPLITUDE_RESOLUTION_1_5) {
  ------------------
  |  |   23|  26.5k|#define SBR_AMPLITUDE_RESOLUTION_1_5 0
  ------------------
  |  Branch (1468:9): [True: 17.1k, False: 9.34k]
  ------------------
 1469|  17.1k|      lav = 24;
 1470|  17.1k|      hcb_t = (ia_huffman_data_type)&env_extr_tables_ptr
 1471|  17.1k|                  ->ixheaacd_t_huffman_env_bal_1_5db_inp_table;
 1472|  17.1k|      idx_t = env_extr_tables_ptr->ixheaacd_t_huffman_env_bal_1_5db_idx_table;
 1473|  17.1k|      hcb_f = (ia_huffman_data_type)&env_extr_tables_ptr
 1474|  17.1k|                  ->ixheaacd_f_huffman_env_bal_1_5db_inp_table;
 1475|  17.1k|      idx_f = env_extr_tables_ptr->ixheaacd_f_huffman_env_bal_1_5db_idx_table;
 1476|  17.1k|    } else {
 1477|  9.34k|      lav = 12;
 1478|  9.34k|      hcb_t = (ia_huffman_data_type)&env_extr_tables_ptr
 1479|  9.34k|                  ->ixheaacd_t_huffman_env_bal_3_0db_inp_table;
 1480|  9.34k|      idx_t = env_extr_tables_ptr->ixheaacd_t_huffman_env_bal_3_0db_idx_table;
 1481|  9.34k|      hcb_f = (ia_huffman_data_type)&env_extr_tables_ptr
 1482|  9.34k|                  ->ixheaacd_f_huffman_env_bal_3_0db_inp_table;
 1483|  9.34k|      idx_f = env_extr_tables_ptr->ixheaacd_f_huffman_env_bal_3_0db_idx_table;
 1484|  9.34k|    }
 1485|   170k|  } else {
 1486|   170k|    env_data_tbl_comp_factor = 0;
 1487|       |
 1488|   170k|    if (amp_res == SBR_AMPLITUDE_RESOLUTION_1_5) {
  ------------------
  |  |   23|   170k|#define SBR_AMPLITUDE_RESOLUTION_1_5 0
  ------------------
  |  Branch (1488:9): [True: 126k, False: 43.6k]
  ------------------
 1489|   126k|      lav = 60;
 1490|   126k|      hcb_t = (ia_huffman_data_type)&env_extr_tables_ptr
 1491|   126k|                  ->ixheaacd_t_huffman_env_1_5db_inp_table;
 1492|   126k|      idx_t = env_extr_tables_ptr->ixheaacd_t_huffman_env_1_5db_idx_table;
 1493|   126k|      hcb_f = (ia_huffman_data_type)&env_extr_tables_ptr
 1494|   126k|                  ->ixheaacd_f_huffman_env_1_5db_inp_table;
 1495|   126k|      idx_f = env_extr_tables_ptr->ixheaacd_f_huffman_env_1_5db_idx_table;
 1496|   126k|    } else {
 1497|  43.6k|      lav = 31;
 1498|  43.6k|      hcb_t = (ia_huffman_data_type)&env_extr_tables_ptr
 1499|  43.6k|                  ->ixheaacd_t_huffman_env_3_0db_inp_table;
 1500|  43.6k|      idx_t = env_extr_tables_ptr->ixheaacd_t_huffman_env_3_0db_idx_table;
 1501|  43.6k|      hcb_f = (ia_huffman_data_type)&env_extr_tables_ptr
 1502|  43.6k|                  ->ixheaacd_f_huffman_env_3_0db_inp_table;
 1503|  43.6k|      idx_f = env_extr_tables_ptr->ixheaacd_f_huffman_env_3_0db_idx_table;
 1504|  43.6k|    }
 1505|   170k|  }
 1506|       |
 1507|   196k|  ixheaacd_read_env_data(ptr_frame_data, it_bit_buff, hcb_t, hcb_f, idx_t,
 1508|   196k|                         idx_f, &no_band[0], num_env, env_data_tbl_comp_factor,
 1509|   196k|                         start_bits, start_bits_balance, 0, lav,
 1510|   196k|                         ptr_header_data->usac_flag);
 1511|       |
 1512|   196k|  return 1;
 1513|   196k|}
ixheaacd_extract_frame_info_ld:
 1517|  39.9k|    ia_sbr_frame_info_data_struct *h_frame_data) {
 1518|  39.9k|  int abs_bord_lead = 0, num_rel_lead = 0, bs_num_env = 0,
 1519|  39.9k|      frame_class, temp, env, k, abs_bord_trail = 0, middle_bord = 0,
 1520|  39.9k|      bs_num_noise, transient_env_temp = 0, bs_transient_position = 0;
 1521|       |
 1522|  39.9k|  IA_ERRORCODE err = IA_NO_ERROR;
  ------------------
  |  |   23|  39.9k|#define IA_NO_ERROR 0x00000000
  ------------------
 1523|  39.9k|  WORD16 time_border[MAX_ENVELOPES + 1];
 1524|  39.9k|  WORD16 time_border_noise[2 + 1];
 1525|  39.9k|  WORD16 f[MAX_ENVELOPES + 1];
 1526|  39.9k|  int rel_bord_lead[7] = {0};
 1527|       |
 1528|  39.9k|  ia_frame_info_struct *v_frame_info = &h_frame_data->str_frame_info_details;
 1529|       |
 1530|  39.9k|  int numTimeSlots = h_frame_data->num_time_slots;
 1531|       |
 1532|  39.9k|  v_frame_info->frame_class = frame_class =
 1533|  39.9k|      ixheaacd_read_bits_buf(it_bit_buff, SBRLD_CLA_BITS);
  ------------------
  |  |  214|  39.9k|#define SBRLD_CLA_BITS 1
  ------------------
 1534|       |
 1535|  39.9k|  switch (frame_class) {
  ------------------
  |  Branch (1535:11): [True: 39.9k, False: 2]
  ------------------
 1536|  27.1k|    case FIXFIX:
  ------------------
  |  |  225|  27.1k|#define FIXFIX 0
  ------------------
  |  Branch (1536:5): [True: 27.1k, False: 12.7k]
  ------------------
 1537|  27.1k|      temp = ixheaacd_read_bits_buf(it_bit_buff, SBR_ENV_BITS);
  ------------------
  |  |  222|  27.1k|#define SBR_ENV_BITS 2
  ------------------
 1538|  27.1k|      bs_num_env = 1 << temp;
 1539|       |
 1540|  27.1k|      if (bs_num_env == 1)
  ------------------
  |  Branch (1540:11): [True: 14.6k, False: 12.5k]
  ------------------
 1541|  14.6k|        h_frame_data->amp_res =
 1542|  14.6k|            ixheaacd_read_bits_buf(it_bit_buff, SBR_AMPLITUDE_RESOLUTION_BITS);
  ------------------
  |  |   44|  14.6k|#define SBR_AMPLITUDE_RESOLUTION_BITS 1
  ------------------
 1543|       |
 1544|  27.1k|      f[0] = ixheaacd_read_bits_buf(it_bit_buff, SBR_RES_BITS);
  ------------------
  |  |  220|  27.1k|#define SBR_RES_BITS 1
  ------------------
 1545|       |
 1546|  71.1k|      for (env = 1; env < bs_num_env; env++) f[env] = f[0];
  ------------------
  |  Branch (1546:21): [True: 44.0k, False: 27.1k]
  ------------------
 1547|  27.1k|      break;
 1548|  12.7k|    case LD_TRAN:
  ------------------
  |  |  208|  12.7k|#define LD_TRAN 1
  ------------------
  |  Branch (1548:5): [True: 12.7k, False: 27.1k]
  ------------------
 1549|  12.7k|      bs_transient_position =
 1550|  12.7k|          ixheaacd_read_bits_buf(it_bit_buff, SBR_TRAN_BITS);
  ------------------
  |  |  213|  12.7k|#define SBR_TRAN_BITS 4
  ------------------
 1551|  12.7k|      v_frame_info->frame_class = 0;
 1552|  12.7k|      if ((numTimeSlots != 16) && (bs_transient_position >= LD_ENV_TBL_480)) {
  ------------------
  |  |  211|  4.31k|#define LD_ENV_TBL_480 15
  ------------------
  |  Branch (1552:11): [True: 4.31k, False: 8.47k]
  |  Branch (1552:35): [True: 5, False: 4.30k]
  ------------------
 1553|      5|        return -1;
 1554|      5|      }
 1555|  12.7k|      bs_num_env = (numTimeSlots == 16)
  ------------------
  |  Branch (1555:20): [True: 8.47k, False: 4.30k]
  ------------------
 1556|  12.7k|                       ? ixheaacd_ld_env_table_512[bs_transient_position]
 1557|  8.47k|                                                  [SBR_ENVT_NUMENV]
  ------------------
  |  |  215|  8.47k|#define SBR_ENVT_NUMENV 0
  ------------------
 1558|  12.7k|                       : ixheaacd_ld_env_table_480[bs_transient_position]
 1559|  4.30k|                                                  [SBR_ENVT_NUMENV];
  ------------------
  |  |  215|  4.30k|#define SBR_ENVT_NUMENV 0
  ------------------
 1560|  47.0k|      for (env = 0; env < bs_num_env; env++)
  ------------------
  |  Branch (1560:21): [True: 34.2k, False: 12.7k]
  ------------------
 1561|  34.2k|        f[env] = ixheaacd_read_bits_buf(it_bit_buff, SBR_RES_BITS);
  ------------------
  |  |  220|  34.2k|#define SBR_RES_BITS 1
  ------------------
 1562|  12.7k|      break;
 1563|  39.9k|  }
 1564|       |
 1565|  39.9k|  switch (frame_class) {
 1566|  27.1k|    case FIXFIX:
  ------------------
  |  |  225|  27.1k|#define FIXFIX 0
  ------------------
  |  Branch (1566:5): [True: 27.1k, False: 12.7k]
  ------------------
 1567|  27.1k|      abs_bord_lead = 0;
 1568|  27.1k|      abs_bord_trail = numTimeSlots;
 1569|  27.1k|      num_rel_lead = bs_num_env - 1;
 1570|       |
 1571|  71.1k|      for (k = 0; k < num_rel_lead; k++) {
  ------------------
  |  Branch (1571:19): [True: 44.0k, False: 27.1k]
  ------------------
 1572|  44.0k|        rel_bord_lead[k] = ixheaacd_ld_env_table_time_slot[num_rel_lead - 1];
 1573|  44.0k|      }
 1574|       |
 1575|  27.1k|      time_border[0] = abs_bord_lead;
 1576|  27.1k|      time_border[bs_num_env] = abs_bord_trail;
 1577|  71.1k|      for (env = 1; env <= num_rel_lead; env++) {
  ------------------
  |  Branch (1577:21): [True: 44.0k, False: 27.1k]
  ------------------
 1578|  44.0k|        time_border[env] = abs_bord_lead;
 1579|   192k|        for (k = 0; k <= env - 1; k++) time_border[env] += rel_bord_lead[k];
  ------------------
  |  Branch (1579:21): [True: 148k, False: 44.0k]
  ------------------
 1580|  44.0k|      }
 1581|  27.1k|      break;
 1582|       |
 1583|  12.7k|    case LD_TRAN:
  ------------------
  |  |  208|  12.7k|#define LD_TRAN 1
  ------------------
  |  Branch (1583:5): [True: 12.7k, False: 27.1k]
  ------------------
 1584|  12.7k|      time_border[0] = 0;
 1585|  12.7k|      time_border[bs_num_env] = numTimeSlots;
 1586|  34.2k|      for (k = 1; k < bs_num_env; k++)
  ------------------
  |  Branch (1586:19): [True: 21.4k, False: 12.7k]
  ------------------
 1587|  21.4k|        time_border[k] =
 1588|  21.4k|            (numTimeSlots == 16)
  ------------------
  |  Branch (1588:13): [True: 15.0k, False: 6.38k]
  ------------------
 1589|  21.4k|                ? ixheaacd_ld_env_table_512[bs_transient_position][k]
 1590|  21.4k|                : ixheaacd_ld_env_table_480[bs_transient_position][k];
 1591|  12.7k|      break;
 1592|       |
 1593|      0|    default:
  ------------------
  |  Branch (1593:5): [True: 0, False: 39.9k]
  ------------------
 1594|      0|      time_border[0] = 0;
 1595|       |
 1596|      0|      break;
 1597|  39.9k|  };
 1598|       |
 1599|  39.9k|  switch (frame_class) {
  ------------------
  |  Branch (1599:11): [True: 39.9k, False: 0]
  ------------------
 1600|  27.1k|    case FIXFIX:
  ------------------
  |  |  225|  27.1k|#define FIXFIX 0
  ------------------
  |  Branch (1600:5): [True: 27.1k, False: 12.7k]
  ------------------
 1601|  27.1k|      middle_bord = bs_num_env / 2;
 1602|  27.1k|      break;
 1603|  12.7k|    case LD_TRAN:
  ------------------
  |  |  208|  12.7k|#define LD_TRAN 1
  ------------------
  |  Branch (1603:5): [True: 12.7k, False: 27.1k]
  ------------------
 1604|  12.7k|      middle_bord = 1;
 1605|  12.7k|      break;
 1606|  39.9k|  };
 1607|       |
 1608|  39.9k|  time_border_noise[0] = time_border[0];
 1609|  39.9k|  if (bs_num_env > 1) {
  ------------------
  |  Branch (1609:7): [True: 25.2k, False: 14.6k]
  ------------------
 1610|  25.2k|    time_border_noise[1] = time_border[middle_bord];
 1611|  25.2k|    time_border_noise[2] = time_border[bs_num_env];
 1612|  25.2k|    bs_num_noise = 2;
 1613|  25.2k|  } else {
 1614|  14.6k|    time_border_noise[1] = time_border[bs_num_env];
 1615|  14.6k|    bs_num_noise = 1;
 1616|  14.6k|  }
 1617|       |
 1618|  39.9k|  switch (frame_class) {
  ------------------
  |  Branch (1618:11): [True: 39.9k, False: 0]
  ------------------
 1619|  27.1k|    case FIXFIX:
  ------------------
  |  |  225|  27.1k|#define FIXFIX 0
  ------------------
  |  Branch (1619:5): [True: 27.1k, False: 12.7k]
  ------------------
 1620|  27.1k|      transient_env_temp = -1;
 1621|  27.1k|      break;
 1622|  12.7k|    case LD_TRAN:
  ------------------
  |  |  208|  12.7k|#define LD_TRAN 1
  ------------------
  |  Branch (1622:5): [True: 12.7k, False: 27.1k]
  ------------------
 1623|  12.7k|      transient_env_temp =
 1624|  12.7k|          (numTimeSlots == 16)
  ------------------
  |  Branch (1624:11): [True: 8.47k, False: 4.30k]
  ------------------
 1625|  12.7k|              ? ixheaacd_ld_env_table_512[bs_transient_position]
 1626|  8.47k|                                         [SBR_ENVT_TRANIDX]
  ------------------
  |  |  216|  8.47k|#define SBR_ENVT_TRANIDX 3
  ------------------
 1627|  12.7k|              : ixheaacd_ld_env_table_480[bs_transient_position]
 1628|  4.30k|                                         [SBR_ENVT_TRANIDX];
  ------------------
  |  |  216|  4.30k|#define SBR_ENVT_TRANIDX 3
  ------------------
 1629|  12.7k|      break;
 1630|  39.9k|  };
 1631|       |
 1632|  39.9k|  v_frame_info->num_env = bs_num_env;
 1633|  39.9k|  memcpy(v_frame_info->border_vec, time_border,
 1634|  39.9k|         (bs_num_env + 1) * sizeof(WORD16));
 1635|  39.9k|  memcpy(v_frame_info->freq_res, f, bs_num_env * sizeof(WORD16));
 1636|  39.9k|  v_frame_info->transient_env = transient_env_temp;
 1637|  39.9k|  v_frame_info->num_noise_env = bs_num_noise;
 1638|  39.9k|  memcpy(v_frame_info->noise_border_vec, time_border_noise,
 1639|  39.9k|         (bs_num_noise + 1) * sizeof(WORD16));
 1640|       |
 1641|  39.9k|  return err;
 1642|  39.9k|}
ixheaacd_pvc_time_freq_grid_info:
 1646|  65.5k|    ia_sbr_frame_info_data_struct *ptr_frame_data) {
 1647|  65.5k|  WORD32 bs_num_env = 0, bs_num_noise = 0;
 1648|  65.5k|  WORD32 time_border[MAX_ENVELOPES + 1];
 1649|  65.5k|  WORD32 time_border_noise[2 + 1];
 1650|  65.5k|  WORD32 pvc_time_border[MAX_ENVELOPES + 1];
 1651|  65.5k|  WORD32 pvc_time_border_noise[2 + 1];
 1652|  65.5k|  WORD32 bs_freq_res[MAX_ENVELOPES + 1];
 1653|  65.5k|  WORD32 var_len;
 1654|  65.5k|  ia_frame_info_struct *p_frame_info = &ptr_frame_data->str_frame_info_details;
 1655|  65.5k|  ia_frame_info_struct *pvc_frame_info = &ptr_frame_data->str_pvc_frame_info;
 1656|  65.5k|  WORD32 i;
 1657|  65.5k|  WORD32 prev_sbr_mode = ptr_frame_data->prev_sbr_mode;
 1658|       |
 1659|  65.5k|  WORD32 tmp;
 1660|  65.5k|  WORD32 bs_noise_pos;
 1661|  65.5k|  bs_noise_pos = ixheaacd_read_bits_buf(it_bit_buff, 4);
 1662|       |
 1663|  65.5k|  tmp = ixheaacd_read_bits_buf(it_bit_buff, 1);
 1664|  65.5k|  if (tmp == 0) {
  ------------------
  |  Branch (1664:7): [True: 56.0k, False: 9.51k]
  ------------------
 1665|  56.0k|    ptr_frame_data->var_len = 0;
 1666|  56.0k|  } else {
 1667|  9.51k|    tmp = ixheaacd_read_bits_buf(it_bit_buff, 2);
 1668|  9.51k|    ptr_frame_data->var_len = tmp + 1;
 1669|  9.51k|    if (ptr_frame_data->var_len > 3) {
  ------------------
  |  Branch (1669:9): [True: 18, False: 9.50k]
  ------------------
 1670|     18|      return -1;
 1671|     18|    }
 1672|  9.51k|  }
 1673|  65.5k|  var_len = ptr_frame_data->var_len;
 1674|       |
 1675|  65.5k|  if (p_frame_info->num_env > 0) {
  ------------------
  |  Branch (1675:7): [True: 65.2k, False: 333]
  ------------------
 1676|  65.2k|    time_border[0] = p_frame_info->border_vec[p_frame_info->num_env] - 16;
 1677|  65.2k|  } else {
 1678|    333|    time_border[0] = 0;
 1679|    333|  }
 1680|  65.5k|  if (time_border[0] < 0) return -1;
  ------------------
  |  Branch (1680:7): [True: 0, False: 65.5k]
  ------------------
 1681|  65.5k|  pvc_time_border[0] = 0;
 1682|  65.5k|  bs_freq_res[0] = 0;
 1683|       |
 1684|  65.5k|  if (ptr_frame_data->prev_sbr_mode == 0) {
  ------------------
  |  Branch (1684:7): [True: 332, False: 65.2k]
  ------------------
 1685|    332|    pvc_time_border[0] = time_border[0];
 1686|    332|  }
 1687|       |
 1688|  65.5k|  if (bs_noise_pos == 0) {
  ------------------
  |  Branch (1688:7): [True: 23.8k, False: 41.7k]
  ------------------
 1689|  23.8k|    time_border[1] = 16 + var_len;
 1690|  23.8k|    pvc_time_border[1] = 16;
 1691|  23.8k|    bs_num_noise = 1;
 1692|  23.8k|    bs_num_env = 1;
 1693|  41.7k|  } else {
 1694|  41.7k|    time_border[1] = bs_noise_pos;
 1695|  41.7k|    pvc_time_border[1] = bs_noise_pos;
 1696|  41.7k|    time_border[2] = 16 + var_len;
 1697|  41.7k|    pvc_time_border[2] = 16;
 1698|  41.7k|    bs_freq_res[1] = 0;
 1699|  41.7k|    bs_num_noise = 2;
 1700|  41.7k|    bs_num_env = 2;
 1701|  41.7k|  }
 1702|       |
 1703|   262k|  for (i = 0; i < 3; i++) {
  ------------------
  |  Branch (1703:15): [True: 196k, False: 65.5k]
  ------------------
 1704|   196k|    time_border_noise[i] = time_border[i];
 1705|   196k|    pvc_time_border_noise[i] = pvc_time_border[i];
 1706|   196k|  }
 1707|       |
 1708|  65.5k|  if (prev_sbr_mode == ORIG_SBR) {
  ------------------
  |  Branch (1708:7): [True: 1.11k, False: 64.4k]
  ------------------
 1709|  1.11k|    pvc_time_border[0] = time_border[0];
 1710|  1.11k|    pvc_time_border_noise[0] = time_border[0];
 1711|  1.11k|  }
 1712|       |
 1713|  65.5k|  pvc_frame_info->num_env = bs_num_env;
 1714|   238k|  for (i = 0; i < (bs_num_env + 1); i++) {
  ------------------
  |  Branch (1714:15): [True: 172k, False: 65.5k]
  ------------------
 1715|   172k|    pvc_frame_info->border_vec[i] = pvc_time_border[i];
 1716|   172k|  }
 1717|   172k|  for (i = 0; i < (bs_num_env); i++) {
  ------------------
  |  Branch (1717:15): [True: 107k, False: 65.5k]
  ------------------
 1718|   107k|    pvc_frame_info->freq_res[i] = bs_freq_res[i];
 1719|   107k|  }
 1720|  65.5k|  pvc_frame_info->transient_env = -1;
 1721|  65.5k|  pvc_frame_info->num_noise_env = bs_num_noise;
 1722|   238k|  for (i = 0; i < (bs_num_noise + 1); i++) {
  ------------------
  |  Branch (1722:15): [True: 172k, False: 65.5k]
  ------------------
 1723|   172k|    pvc_frame_info->noise_border_vec[i] = pvc_time_border_noise[i];
 1724|   172k|  }
 1725|  65.5k|  p_frame_info->num_env = bs_num_env;
 1726|   238k|  for (i = 0; i < (bs_num_env + 1); i++) {
  ------------------
  |  Branch (1726:15): [True: 172k, False: 65.5k]
  ------------------
 1727|   172k|    p_frame_info->border_vec[i] = time_border[i];
 1728|   172k|  }
 1729|   172k|  for (i = 0; i < (bs_num_env); i++) {
  ------------------
  |  Branch (1729:15): [True: 107k, False: 65.5k]
  ------------------
 1730|   107k|    p_frame_info->freq_res[i] = bs_freq_res[i];
 1731|   107k|  }
 1732|  65.5k|  p_frame_info->transient_env = -1;
 1733|  65.5k|  p_frame_info->num_noise_env = bs_num_noise;
 1734|   238k|  for (i = 0; i < (bs_num_noise + 1); i++) {
  ------------------
  |  Branch (1734:15): [True: 172k, False: 65.5k]
  ------------------
 1735|   172k|    p_frame_info->noise_border_vec[i] = time_border_noise[i];
 1736|   172k|  }
 1737|  65.5k|  return 0;
 1738|  65.5k|}
ixheaacd_sbr_time_freq_grid_info:
 1743|   130k|    ia_env_extr_tables_struct *env_extr_tables_ptr, WORD16 number_of_time_slots) {
 1744|   130k|  WORD32 i, k, bs_num_rel = 0;
 1745|   130k|  WORD32 bs_pointer_bits = 0, bs_num_env = 0, border, bs_pointer,
 1746|   130k|         bs_var_bord = 0, temp = 0;
 1747|   130k|  WORD32 freq_res_0 = 0, frame_class;
 1748|   130k|  WORD32 abs_bord_lead, abs_bord_trail, num_rel_trail, num_rel_lead;
 1749|   130k|  static const WORD32 pointer_bits_array[7] = {1, 2, 2, 3, 3, 3, 3};
 1750|   130k|  ia_frame_info_struct *p_fixfix_tab;
 1751|   130k|  ia_frame_info_struct *p_frame_info = &ptr_frame_data->str_frame_info_details;
 1752|       |
 1753|   130k|  frame_class = ixheaacd_read_bits_buf(it_bit_buff, SBR_FRAME_CLASS_BITS);
  ------------------
  |  |  139|   130k|#define SBR_FRAME_CLASS_BITS 2
  ------------------
 1754|   130k|  p_frame_info->frame_class = frame_class;
 1755|       |
 1756|   130k|  switch (frame_class) {
  ------------------
  |  Branch (1756:11): [True: 130k, False: 1]
  ------------------
 1757|  69.6k|    case FIXFIX:
  ------------------
  |  |  225|  69.6k|#define FIXFIX 0
  ------------------
  |  Branch (1757:5): [True: 69.6k, False: 60.9k]
  ------------------
 1758|  69.6k|      temp =
 1759|  69.6k|          ixheaacd_read_bits_buf(it_bit_buff, SBR_ENV_BITS + SBR_FRQ_RES_BITS);
  ------------------
  |  |  222|  69.6k|#define SBR_ENV_BITS 2
  ------------------
                        ixheaacd_read_bits_buf(it_bit_buff, SBR_ENV_BITS + SBR_FRQ_RES_BITS);
  ------------------
  |  |  141|  69.6k|#define SBR_FRQ_RES_BITS 1
  ------------------
 1760|  69.6k|      bs_num_env = (temp & 0x6) >> SBR_FRQ_RES_BITS;
  ------------------
  |  |  141|  69.6k|#define SBR_FRQ_RES_BITS 1
  ------------------
 1761|       |
 1762|  69.6k|      if (number_of_time_slots != 15) {
  ------------------
  |  Branch (1762:11): [True: 69.6k, False: 3]
  ------------------
 1763|  69.6k|        p_fixfix_tab = &env_extr_tables_ptr->sbr_frame_info1_2_4_16[bs_num_env];
 1764|  69.6k|      } else {
 1765|      3|        if (bs_num_env > 2) return 0;
  ------------------
  |  Branch (1765:13): [True: 0, False: 3]
  ------------------
 1766|      3|        p_fixfix_tab = &env_extr_tables_ptr->sbr_frame_info1_2_4_16[bs_num_env + 4];
 1767|      3|      }
 1768|       |
 1769|  69.6k|      memcpy(p_frame_info, p_fixfix_tab, sizeof(ia_frame_info_struct));
 1770|  69.6k|      bs_num_env = (1 << bs_num_env);
 1771|  69.6k|      freq_res_0 = temp & 0x1;
 1772|       |
 1773|  69.6k|      if (!freq_res_0) {
  ------------------
  |  Branch (1773:11): [True: 55.2k, False: 14.4k]
  ------------------
 1774|  55.2k|        memset(&p_frame_info->freq_res[0], 0, sizeof(WORD16) * bs_num_env);
 1775|  55.2k|      }
 1776|  69.6k|      break;
 1777|  28.3k|    case FIXVAR:
  ------------------
  |  |  226|  28.3k|#define FIXVAR 1
  ------------------
  |  Branch (1777:5): [True: 28.3k, False: 102k]
  ------------------
 1778|  28.3k|      bs_var_bord =
 1779|  28.3k|          ixheaacd_read_bits_buf(it_bit_buff, SBR_VAR_BORD_BITS + SBR_NUM_BITS);
  ------------------
  |  |  140|  28.3k|#define SBR_VAR_BORD_BITS 2
  ------------------
                        ixheaacd_read_bits_buf(it_bit_buff, SBR_VAR_BORD_BITS + SBR_NUM_BITS);
  ------------------
  |  |  223|  28.3k|#define SBR_NUM_BITS 2
  ------------------
 1780|  28.3k|      bs_num_rel = bs_var_bord & 3;
 1781|  28.3k|      bs_var_bord = bs_var_bord >> SBR_NUM_BITS;
  ------------------
  |  |  223|  28.3k|#define SBR_NUM_BITS 2
  ------------------
 1782|  28.3k|      bs_num_env = bs_num_rel + 1;
 1783|  28.3k|      p_frame_info->border_vec[0] = 0;
 1784|       |
 1785|  28.3k|      if (number_of_time_slots != 15) {
  ------------------
  |  Branch (1785:11): [True: 28.3k, False: 2]
  ------------------
 1786|  28.3k|        border = bs_var_bord + SBR_TIME_SLOTS;
  ------------------
  |  |   84|  28.3k|#define SBR_TIME_SLOTS (MAX_COLS / SBR_TIME_STEP)
  |  |  ------------------
  |  |  |  |   69|  28.3k|#define MAX_COLS (MAX_FRAME_SIZE / NO_ANALYSIS_CHANNELS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  28.3k|#define MAX_FRAME_SIZE 1024
  |  |  |  |  ------------------
  |  |  |  |               #define MAX_COLS (MAX_FRAME_SIZE / NO_ANALYSIS_CHANNELS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   35|  28.3k|#define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|  28.3k|#define NO_SYNTHESIS_CHANNELS 64
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   23|  28.3k|#define SBR_UPSAMPLE_FAC 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SBR_TIME_SLOTS (MAX_COLS / SBR_TIME_STEP)
  |  |  ------------------
  |  |  |  |   59|  28.3k|#define SBR_TIME_STEP 2
  |  |  ------------------
  ------------------
 1787|  28.3k|      } else {
 1788|      2|        border = bs_var_bord + number_of_time_slots;
 1789|      2|      }
 1790|       |
 1791|  28.3k|      p_frame_info->border_vec[bs_num_env] = border;
 1792|  63.3k|      for (k = bs_num_rel; k > 0; k--) {
  ------------------
  |  Branch (1792:28): [True: 34.9k, False: 28.3k]
  ------------------
 1793|  34.9k|        temp = ixheaacd_read_bits_buf(it_bit_buff, SBR_REL_BITS);
  ------------------
  |  |  221|  34.9k|#define SBR_REL_BITS 2
  ------------------
 1794|  34.9k|        border = border - ((temp << 1) + 2);
 1795|  34.9k|        if (border < 0) border = 0;
  ------------------
  |  Branch (1795:13): [True: 184, False: 34.7k]
  ------------------
 1796|  34.9k|        p_frame_info->border_vec[k] = border;
 1797|  34.9k|      }
 1798|       |
 1799|  28.3k|      bs_pointer_bits = pointer_bits_array[bs_num_rel];
 1800|  28.3k|      bs_pointer = ixheaacd_read_bits_buf(it_bit_buff, bs_pointer_bits);
 1801|       |
 1802|  28.3k|      if ((bs_pointer - (bs_num_rel + 1)) > 0) return 0;
  ------------------
  |  Branch (1802:11): [True: 153, False: 28.2k]
  ------------------
 1803|       |
 1804|  91.0k|      for (k = bs_num_rel; k >= 0; k--) {
  ------------------
  |  Branch (1804:28): [True: 62.7k, False: 28.2k]
  ------------------
 1805|  62.7k|        p_frame_info->freq_res[k] =
 1806|  62.7k|            ixheaacd_read_bits_buf(it_bit_buff, SBR_FRQ_RES_BITS);
  ------------------
  |  |  141|  62.7k|#define SBR_FRQ_RES_BITS 1
  ------------------
 1807|  62.7k|      }
 1808|  28.2k|      if (bs_pointer) {
  ------------------
  |  Branch (1808:11): [True: 10.1k, False: 18.1k]
  ------------------
 1809|  10.1k|        p_frame_info->transient_env = bs_num_env + 1 - bs_pointer;
 1810|  18.1k|      } else {
 1811|  18.1k|        p_frame_info->transient_env = -1;
 1812|  18.1k|      }
 1813|  28.2k|      if ((bs_pointer == 0) || (bs_pointer == 1))
  ------------------
  |  Branch (1813:11): [True: 18.1k, False: 10.1k]
  |  Branch (1813:32): [True: 6.08k, False: 4.04k]
  ------------------
 1814|  24.1k|        p_frame_info->noise_border_vec[1] =
 1815|  24.1k|            p_frame_info->border_vec[bs_num_rel];
 1816|  4.05k|      else
 1817|  4.05k|        p_frame_info->noise_border_vec[1] =
 1818|  4.05k|            p_frame_info->border_vec[p_frame_info->transient_env];
 1819|       |
 1820|  28.2k|      break;
 1821|       |
 1822|  26.3k|    case VARFIX:
  ------------------
  |  |  227|  26.3k|#define VARFIX 2
  ------------------
  |  Branch (1822:5): [True: 26.3k, False: 104k]
  ------------------
 1823|  26.3k|      bs_var_bord =
 1824|  26.3k|          ixheaacd_read_bits_buf(it_bit_buff, SBR_VAR_BORD_BITS + SBR_NUM_BITS);
  ------------------
  |  |  140|  26.3k|#define SBR_VAR_BORD_BITS 2
  ------------------
                        ixheaacd_read_bits_buf(it_bit_buff, SBR_VAR_BORD_BITS + SBR_NUM_BITS);
  ------------------
  |  |  223|  26.3k|#define SBR_NUM_BITS 2
  ------------------
 1825|  26.3k|      bs_num_rel = bs_var_bord & 3;
 1826|  26.3k|      bs_var_bord = bs_var_bord >> SBR_NUM_BITS;
  ------------------
  |  |  223|  26.3k|#define SBR_NUM_BITS 2
  ------------------
 1827|  26.3k|      bs_num_env = bs_num_rel + 1;
 1828|       |
 1829|  26.3k|      border = bs_var_bord;
 1830|  26.3k|      p_frame_info->border_vec[0] = border;
 1831|  43.5k|      for (k = 1; k <= bs_num_rel; k++) {
  ------------------
  |  Branch (1831:19): [True: 17.2k, False: 26.3k]
  ------------------
 1832|  17.2k|        temp = ixheaacd_read_bits_buf(it_bit_buff, SBR_REL_BITS);
  ------------------
  |  |  221|  17.2k|#define SBR_REL_BITS 2
  ------------------
 1833|  17.2k|        border = border + ((temp << 1) + 2);
 1834|       |
 1835|  17.2k|        if (number_of_time_slots != 15) {
  ------------------
  |  Branch (1835:13): [True: 17.2k, False: 0]
  ------------------
 1836|  17.2k|          if (border > SBR_TIME_SLOTS) border = SBR_TIME_SLOTS;
  ------------------
  |  |   84|  17.2k|#define SBR_TIME_SLOTS (MAX_COLS / SBR_TIME_STEP)
  |  |  ------------------
  |  |  |  |   69|  17.2k|#define MAX_COLS (MAX_FRAME_SIZE / NO_ANALYSIS_CHANNELS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  17.2k|#define MAX_FRAME_SIZE 1024
  |  |  |  |  ------------------
  |  |  |  |               #define MAX_COLS (MAX_FRAME_SIZE / NO_ANALYSIS_CHANNELS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   35|  17.2k|#define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|  17.2k|#define NO_SYNTHESIS_CHANNELS 64
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   23|  17.2k|#define SBR_UPSAMPLE_FAC 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SBR_TIME_SLOTS (MAX_COLS / SBR_TIME_STEP)
  |  |  ------------------
  |  |  |  |   59|  17.2k|#define SBR_TIME_STEP 2
  |  |  ------------------
  ------------------
                        if (border > SBR_TIME_SLOTS) border = SBR_TIME_SLOTS;
  ------------------
  |  |   84|     65|#define SBR_TIME_SLOTS (MAX_COLS / SBR_TIME_STEP)
  |  |  ------------------
  |  |  |  |   69|     65|#define MAX_COLS (MAX_FRAME_SIZE / NO_ANALYSIS_CHANNELS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|     65|#define MAX_FRAME_SIZE 1024
  |  |  |  |  ------------------
  |  |  |  |               #define MAX_COLS (MAX_FRAME_SIZE / NO_ANALYSIS_CHANNELS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   35|     65|#define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|     65|#define NO_SYNTHESIS_CHANNELS 64
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   23|     65|#define SBR_UPSAMPLE_FAC 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SBR_TIME_SLOTS (MAX_COLS / SBR_TIME_STEP)
  |  |  ------------------
  |  |  |  |   59|     65|#define SBR_TIME_STEP 2
  |  |  ------------------
  ------------------
  |  Branch (1836:15): [True: 65, False: 17.1k]
  ------------------
 1837|  17.2k|        } else {
 1838|      0|          if (border > number_of_time_slots) border = number_of_time_slots;
  ------------------
  |  Branch (1838:15): [True: 0, False: 0]
  ------------------
 1839|      0|        }
 1840|       |
 1841|  17.2k|        p_frame_info->border_vec[k] = border;
 1842|  17.2k|      }
 1843|       |
 1844|  26.3k|      if (number_of_time_slots != 15) {
  ------------------
  |  Branch (1844:11): [True: 26.3k, False: 1]
  ------------------
 1845|  26.3k|        p_frame_info->border_vec[k] = SBR_TIME_SLOTS;
  ------------------
  |  |   84|  26.3k|#define SBR_TIME_SLOTS (MAX_COLS / SBR_TIME_STEP)
  |  |  ------------------
  |  |  |  |   69|  26.3k|#define MAX_COLS (MAX_FRAME_SIZE / NO_ANALYSIS_CHANNELS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  26.3k|#define MAX_FRAME_SIZE 1024
  |  |  |  |  ------------------
  |  |  |  |               #define MAX_COLS (MAX_FRAME_SIZE / NO_ANALYSIS_CHANNELS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   35|  26.3k|#define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|  26.3k|#define NO_SYNTHESIS_CHANNELS 64
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   23|  26.3k|#define SBR_UPSAMPLE_FAC 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SBR_TIME_SLOTS (MAX_COLS / SBR_TIME_STEP)
  |  |  ------------------
  |  |  |  |   59|  26.3k|#define SBR_TIME_STEP 2
  |  |  ------------------
  ------------------
 1846|  26.3k|      } else {
 1847|      1|        p_frame_info->border_vec[k] = number_of_time_slots;
 1848|      1|      }
 1849|       |
 1850|  26.3k|      bs_pointer_bits = pointer_bits_array[bs_num_rel];
 1851|       |
 1852|  26.3k|      bs_pointer = ixheaacd_read_bits_buf(it_bit_buff, bs_pointer_bits);
 1853|       |
 1854|  26.3k|      if ((bs_pointer - (bs_num_rel + 1)) > 0) return 0;
  ------------------
  |  Branch (1854:11): [True: 12, False: 26.3k]
  ------------------
 1855|       |
 1856|  26.3k|      if (bs_pointer == 0 || (bs_pointer - 1) == 0) {
  ------------------
  |  Branch (1856:11): [True: 12.8k, False: 13.4k]
  |  Branch (1856:30): [True: 3.91k, False: 9.58k]
  ------------------
 1857|  16.7k|        p_frame_info->transient_env = -1;
 1858|  16.7k|      } else {
 1859|  9.58k|        p_frame_info->transient_env = bs_pointer - 1;
 1860|  9.58k|      }
 1861|       |
 1862|  69.9k|      for (k = 0; k <= bs_num_rel; k++) {
  ------------------
  |  Branch (1862:19): [True: 43.5k, False: 26.3k]
  ------------------
 1863|  43.5k|        p_frame_info->freq_res[k] =
 1864|  43.5k|            ixheaacd_read_bits_buf(it_bit_buff, SBR_FRQ_RES_BITS);
  ------------------
  |  |  141|  43.5k|#define SBR_FRQ_RES_BITS 1
  ------------------
 1865|  43.5k|      }
 1866|       |
 1867|  26.3k|      switch (bs_pointer) {
 1868|  12.8k|        case 0:
  ------------------
  |  Branch (1868:9): [True: 12.8k, False: 13.4k]
  ------------------
 1869|  12.8k|          p_frame_info->noise_border_vec[1] = p_frame_info->border_vec[1];
 1870|  12.8k|          break;
 1871|  3.91k|        case 1:
  ------------------
  |  Branch (1871:9): [True: 3.91k, False: 22.4k]
  ------------------
 1872|  3.91k|          p_frame_info->noise_border_vec[1] =
 1873|  3.91k|              p_frame_info->border_vec[bs_num_rel];
 1874|  3.91k|          break;
 1875|  9.58k|        default:
  ------------------
  |  Branch (1875:9): [True: 9.58k, False: 16.7k]
  ------------------
 1876|  9.58k|          p_frame_info->noise_border_vec[1] =
 1877|  9.58k|              p_frame_info->border_vec[(WORD32)p_frame_info->transient_env];
 1878|  9.58k|          break;
 1879|  26.3k|      }
 1880|       |
 1881|  26.3k|      break;
 1882|       |
 1883|  26.3k|    case VARVAR:
  ------------------
  |  |  228|  6.19k|#define VARVAR 3
  ------------------
  |  Branch (1883:5): [True: 6.19k, False: 124k]
  ------------------
 1884|  6.19k|      abs_bord_lead = ixheaacd_read_bits_buf(
 1885|  6.19k|          it_bit_buff, 2 * SBR_VAR_BORD_BITS + 2 * SBR_NUM_BITS);
  ------------------
  |  |  140|  6.19k|#define SBR_VAR_BORD_BITS 2
  ------------------
                        it_bit_buff, 2 * SBR_VAR_BORD_BITS + 2 * SBR_NUM_BITS);
  ------------------
  |  |  223|  6.19k|#define SBR_NUM_BITS 2
  ------------------
 1886|       |
 1887|  6.19k|      if (number_of_time_slots != 15) {
  ------------------
  |  Branch (1887:11): [True: 6.18k, False: 2]
  ------------------
 1888|  6.18k|        abs_bord_trail =
 1889|  6.18k|          (((abs_bord_lead & 0x30) >> (2 * SBR_NUM_BITS)) + SBR_TIME_SLOTS);
  ------------------
  |  |  223|  6.18k|#define SBR_NUM_BITS 2
  ------------------
                        (((abs_bord_lead & 0x30) >> (2 * SBR_NUM_BITS)) + SBR_TIME_SLOTS);
  ------------------
  |  |   84|  6.18k|#define SBR_TIME_SLOTS (MAX_COLS / SBR_TIME_STEP)
  |  |  ------------------
  |  |  |  |   69|  6.18k|#define MAX_COLS (MAX_FRAME_SIZE / NO_ANALYSIS_CHANNELS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  6.18k|#define MAX_FRAME_SIZE 1024
  |  |  |  |  ------------------
  |  |  |  |               #define MAX_COLS (MAX_FRAME_SIZE / NO_ANALYSIS_CHANNELS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   35|  6.18k|#define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|  6.18k|#define NO_SYNTHESIS_CHANNELS 64
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   23|  6.18k|#define SBR_UPSAMPLE_FAC 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SBR_TIME_SLOTS (MAX_COLS / SBR_TIME_STEP)
  |  |  ------------------
  |  |  |  |   59|  6.18k|#define SBR_TIME_STEP 2
  |  |  ------------------
  ------------------
 1890|  6.18k|      } else {
 1891|      2|        abs_bord_trail =
 1892|      2|          (((abs_bord_lead & 0x30) >> (2 * SBR_NUM_BITS)) + number_of_time_slots);
  ------------------
  |  |  223|      2|#define SBR_NUM_BITS 2
  ------------------
 1893|      2|      }
 1894|       |
 1895|  6.19k|      num_rel_trail = ((abs_bord_lead & 0xc) >> SBR_NUM_BITS);
  ------------------
  |  |  223|  6.19k|#define SBR_NUM_BITS 2
  ------------------
 1896|  6.19k|      num_rel_lead = (abs_bord_lead & 0x3);
 1897|  6.19k|      abs_bord_lead = abs_bord_lead >> (SBR_VAR_BORD_BITS + 2 * SBR_NUM_BITS);
  ------------------
  |  |  140|  6.19k|#define SBR_VAR_BORD_BITS 2
  ------------------
                    abs_bord_lead = abs_bord_lead >> (SBR_VAR_BORD_BITS + 2 * SBR_NUM_BITS);
  ------------------
  |  |  223|  6.19k|#define SBR_NUM_BITS 2
  ------------------
 1898|  6.19k|      bs_num_env = ((num_rel_trail + num_rel_lead) + 1);
 1899|  6.19k|      border = abs_bord_lead;
 1900|  6.19k|      p_frame_info->border_vec[0] = border;
 1901|       |
 1902|  16.8k|      for (k = 1; k <= num_rel_trail; k++) {
  ------------------
  |  Branch (1902:19): [True: 10.6k, False: 6.19k]
  ------------------
 1903|  10.6k|        temp = ixheaacd_read_bits_buf(it_bit_buff, SBR_REL_BITS);
  ------------------
  |  |  221|  10.6k|#define SBR_REL_BITS 2
  ------------------
 1904|  10.6k|        border = border + ((temp << 1) + 2);
 1905|  10.6k|        p_frame_info->border_vec[k] = border;
 1906|  10.6k|      }
 1907|       |
 1908|  6.19k|      border = abs_bord_trail;
 1909|  6.19k|      i = bs_num_env;
 1910|       |
 1911|  6.19k|      p_frame_info->border_vec[i] = border;
 1912|       |
 1913|  16.7k|      for (k = 0; k < num_rel_lead; k++) {
  ------------------
  |  Branch (1913:19): [True: 10.5k, False: 6.19k]
  ------------------
 1914|  10.5k|        temp = ixheaacd_read_bits_buf(it_bit_buff, SBR_REL_BITS);
  ------------------
  |  |  221|  10.5k|#define SBR_REL_BITS 2
  ------------------
 1915|  10.5k|        border = border - ((temp << 1) + 2);
 1916|  10.5k|        i--;
 1917|  10.5k|        p_frame_info->border_vec[i] = border;
 1918|  10.5k|      }
 1919|  6.19k|      bs_pointer_bits = pointer_bits_array[num_rel_trail + num_rel_lead];
 1920|       |
 1921|  6.19k|      bs_pointer = ixheaacd_read_bits_buf(it_bit_buff, bs_pointer_bits);
 1922|  6.19k|      if ((bs_pointer - ((num_rel_trail + num_rel_lead) + 1)) > 0) return 0;
  ------------------
  |  Branch (1922:11): [True: 51, False: 6.13k]
  ------------------
 1923|       |
 1924|  6.13k|      if (bs_pointer) {
  ------------------
  |  Branch (1924:11): [True: 2.91k, False: 3.22k]
  ------------------
 1925|  2.91k|        p_frame_info->transient_env = bs_num_env + 1 - bs_pointer;
 1926|  3.22k|      } else {
 1927|  3.22k|        p_frame_info->transient_env = -1;
 1928|  3.22k|      }
 1929|       |
 1930|  33.3k|      for (k = 0; k < bs_num_env; k++) {
  ------------------
  |  Branch (1930:19): [True: 27.2k, False: 6.13k]
  ------------------
 1931|  27.2k|        p_frame_info->freq_res[k] =
 1932|  27.2k|            ixheaacd_read_bits_buf(it_bit_buff, SBR_FRQ_RES_BITS);
  ------------------
  |  |  141|  27.2k|#define SBR_FRQ_RES_BITS 1
  ------------------
 1933|  27.2k|      }
 1934|  6.13k|      p_frame_info->noise_border_vec[0] = abs_bord_lead;
 1935|  6.13k|      if (bs_num_env == 1) {
  ------------------
  |  Branch (1935:11): [True: 616, False: 5.52k]
  ------------------
 1936|    616|        p_frame_info->noise_border_vec[1] = abs_bord_trail;
 1937|  5.52k|      } else {
 1938|  5.52k|        if (bs_pointer == 0 || (bs_pointer - 1) == 0)
  ------------------
  |  Branch (1938:13): [True: 2.87k, False: 2.65k]
  |  Branch (1938:32): [True: 170, False: 2.48k]
  ------------------
 1939|  3.04k|          p_frame_info->noise_border_vec[1] =
 1940|  3.04k|              p_frame_info->border_vec[bs_num_env - 1];
 1941|  2.48k|        else
 1942|  2.48k|          p_frame_info->noise_border_vec[1] =
 1943|  2.48k|              p_frame_info->border_vec[(WORD32)p_frame_info->transient_env];
 1944|       |
 1945|  5.52k|        p_frame_info->noise_border_vec[2] = abs_bord_trail;
 1946|  5.52k|      }
 1947|  6.13k|      break;
 1948|   130k|  }
 1949|   130k|  p_frame_info->num_env = bs_num_env;
 1950|       |
 1951|   130k|  if (bs_num_env == 1)
  ------------------
  |  Branch (1951:7): [True: 78.3k, False: 52.0k]
  ------------------
 1952|  78.3k|    p_frame_info->num_noise_env = 1;
 1953|  52.0k|  else
 1954|  52.0k|    p_frame_info->num_noise_env = 2;
 1955|       |
 1956|   130k|  if (frame_class == VARFIX || frame_class == FIXVAR) {
  ------------------
  |  |  227|   260k|#define VARFIX 2
  ------------------
                if (frame_class == VARFIX || frame_class == FIXVAR) {
  ------------------
  |  |  226|   104k|#define FIXVAR 1
  ------------------
  |  Branch (1956:7): [True: 26.3k, False: 104k]
  |  Branch (1956:32): [True: 28.2k, False: 75.8k]
  ------------------
 1957|  54.5k|    p_frame_info->noise_border_vec[0] = p_frame_info->border_vec[0];
 1958|  54.5k|    p_frame_info->noise_border_vec[p_frame_info->num_noise_env] =
 1959|  54.5k|        p_frame_info->border_vec[bs_num_env];
 1960|  54.5k|  }
 1961|   130k|  return 1;
 1962|   130k|}
ixheaacd_env_extr.c:ixheaacd_pvc_env_dtdf_data:
  250|  65.5k|    ia_bit_buf_struct *it_bit_buff) {
  251|  65.5k|  WORD32 i;
  252|  65.5k|  WORD32 usac_independency_flag = ptr_frame_data->usac_independency_flag;
  253|  65.5k|  WORD32 bs_num_noise = ptr_frame_data->str_frame_info_details.num_noise_env;
  254|       |
  255|  65.5k|  if (usac_independency_flag) {
  ------------------
  |  Branch (255:7): [True: 768, False: 64.8k]
  ------------------
  256|    768|    ptr_frame_data->del_cod_dir_noise_arr[0] = 0;
  257|  64.8k|  } else {
  258|  64.8k|    ptr_frame_data->del_cod_dir_noise_arr[0] =
  259|  64.8k|        ixheaacd_read_bits_buf(it_bit_buff, ESBR_DOMAIN_BITS);
  ------------------
  |  |  172|  64.8k|#define ESBR_DOMAIN_BITS 1
  ------------------
  260|  64.8k|  }
  261|       |
  262|   107k|  for (i = 1; i < bs_num_noise; i++) {
  ------------------
  |  Branch (262:15): [True: 41.7k, False: 65.5k]
  ------------------
  263|  41.7k|    ptr_frame_data->del_cod_dir_noise_arr[i] =
  264|  41.7k|        ixheaacd_read_bits_buf(it_bit_buff, ESBR_DOMAIN_BITS);
  ------------------
  |  |  172|  41.7k|#define ESBR_DOMAIN_BITS 1
  ------------------
  265|  41.7k|  }
  266|  65.5k|}
ixheaacd_env_extr.c:ixheaacd_read_esbr_pvc_envelope:
  129|  65.5k|                                              WORD32 indepFlag) {
  130|  65.5k|  WORD32 i, j, k;
  131|  65.5k|  WORD32 fixed_length = 0, num_grid_info = 0, grid_info;
  132|  65.5k|  UWORD8 div_mode, ns_mode;
  133|  65.5k|  UWORD16 pvc_id[PVC_NUM_TIME_SLOTS + 1];
  134|  65.5k|  UWORD8 num_length;
  135|  65.5k|  UWORD8 length;
  136|  65.5k|  UWORD8 reuse_pvc_id;
  137|  65.5k|  WORD32 sum_length = 0;
  138|  65.5k|  WORD32 length_bits = 4;
  139|  65.5k|  UWORD8 pvc_id_bits = PVC_ID_BITS;
  ------------------
  |  |  186|  65.5k|#define PVC_ID_BITS 7
  ------------------
  140|  65.5k|  IA_ERRORCODE err = IA_NO_ERROR;
  ------------------
  |  |   23|  65.5k|#define IA_NO_ERROR 0x00000000
  ------------------
  141|       |
  142|  65.5k|  div_mode = (UWORD8)ixheaacd_read_bits_buf(it_bit_buff, PVC_DIV_MODE_BITS);
  ------------------
  |  |  182|  65.5k|#define PVC_DIV_MODE_BITS 3
  ------------------
  143|  65.5k|  ns_mode = (UWORD8)ixheaacd_read_bits_buf(it_bit_buff, PVC_NS_MODE_BITS);
  ------------------
  |  |  183|  65.5k|#define PVC_NS_MODE_BITS 1
  ------------------
  144|       |
  145|  65.5k|  if (ptr_pvc_data->pvc_mode == 3) {
  ------------------
  |  Branch (145:7): [True: 772, False: 64.7k]
  ------------------
  146|    772|    pvc_id_bits = 0;
  147|    772|  }
  148|       |
  149|  65.5k|  if (div_mode <= 3) {
  ------------------
  |  Branch (149:7): [True: 44.3k, False: 21.1k]
  ------------------
  150|  44.3k|    num_length = div_mode;
  151|  44.3k|    if (indepFlag) {
  ------------------
  |  Branch (151:9): [True: 435, False: 43.9k]
  ------------------
  152|    435|      reuse_pvc_id = 0;
  153|  43.9k|    } else {
  154|  43.9k|      reuse_pvc_id =
  155|  43.9k|          (UWORD8)ixheaacd_read_bits_buf(it_bit_buff, PVC_REUSE_PVC_ID_BITS);
  ------------------
  |  |  185|  43.9k|#define PVC_REUSE_PVC_ID_BITS 1
  ------------------
  156|  43.9k|    }
  157|  44.3k|    if (reuse_pvc_id == 1) {
  ------------------
  |  Branch (157:9): [True: 6.26k, False: 38.1k]
  ------------------
  158|  6.26k|      pvc_id[0] = ptr_pvc_data->prev_pvc_id;
  159|  38.1k|    } else {
  160|  38.1k|      pvc_id[0] = (UWORD16)ixheaacd_read_bits_buf(it_bit_buff, pvc_id_bits);
  161|  38.1k|    }
  162|       |
  163|  44.3k|    k = 1;
  164|  44.3k|    if (num_length) {
  ------------------
  |  Branch (164:9): [True: 13.4k, False: 30.9k]
  ------------------
  165|  13.4k|      sum_length = 0;
  166|  36.2k|      for (i = 0; i < num_length; i++) {
  ------------------
  |  Branch (166:19): [True: 22.7k, False: 13.4k]
  ------------------
  167|  22.7k|        if (sum_length >= 13) {
  ------------------
  |  Branch (167:13): [True: 909, False: 21.8k]
  ------------------
  168|    909|          length_bits = 1;
  169|  21.8k|        } else if (sum_length >= 11) {
  ------------------
  |  Branch (169:20): [True: 53, False: 21.8k]
  ------------------
  170|     53|          length_bits = 2;
  171|  21.8k|        } else if (sum_length >= 7) {
  ------------------
  |  Branch (171:20): [True: 383, False: 21.4k]
  ------------------
  172|    383|          length_bits = 3;
  173|  21.4k|        } else {
  174|  21.4k|          length_bits = 4;
  175|  21.4k|        }
  176|  22.7k|        length = (UWORD8)ixheaacd_read_bits_buf(it_bit_buff, length_bits);
  177|  22.7k|        length += 1;
  178|  22.7k|        sum_length += length;
  179|  22.7k|        if ((k + length - 1) > PVC_NUM_TIME_SLOTS) {
  ------------------
  |  |  177|  22.7k|#define PVC_NUM_TIME_SLOTS 16
  ------------------
  |  Branch (179:13): [True: 30, False: 22.7k]
  ------------------
  180|     30|          return -1;
  181|     30|        }
  182|  98.9k|        for (j = 1; j < length; j++, k++) {
  ------------------
  |  Branch (182:21): [True: 76.2k, False: 22.7k]
  ------------------
  183|  76.2k|          pvc_id[k] = pvc_id[k - 1];
  184|  76.2k|        }
  185|  22.7k|        pvc_id[k++] = (UWORD16)ixheaacd_read_bits_buf(it_bit_buff, pvc_id_bits);
  186|  22.7k|      }
  187|  13.4k|    }
  188|       |
  189|   611k|    for (; k < 16; k++) {
  ------------------
  |  Branch (189:12): [True: 567k, False: 44.3k]
  ------------------
  190|   567k|      pvc_id[k] = pvc_id[k - 1];
  191|   567k|    }
  192|       |
  193|  44.3k|  } else {
  194|  21.1k|    switch (div_mode) {
  195|  10.2k|      case 4:
  ------------------
  |  Branch (195:7): [True: 10.2k, False: 10.8k]
  ------------------
  196|  10.2k|        num_grid_info = 2;
  197|  10.2k|        fixed_length = 8;
  198|  10.2k|        break;
  199|  9.92k|      case 5:
  ------------------
  |  Branch (199:7): [True: 9.92k, False: 11.2k]
  ------------------
  200|  9.92k|        num_grid_info = 4;
  201|  9.92k|        fixed_length = 4;
  202|  9.92k|        break;
  203|    253|      case 6:
  ------------------
  |  Branch (203:7): [True: 253, False: 20.9k]
  ------------------
  204|    253|        num_grid_info = 8;
  205|    253|        fixed_length = 2;
  206|    253|        break;
  207|    693|      case 7:
  ------------------
  |  Branch (207:7): [True: 693, False: 20.4k]
  ------------------
  208|    693|        num_grid_info = 16;
  209|    693|        fixed_length = 1;
  210|    693|        break;
  211|      0|      default:;
  ------------------
  |  Branch (211:7): [True: 0, False: 21.1k]
  ------------------
  212|  21.1k|    }
  213|  21.1k|    if (indepFlag) {
  ------------------
  |  Branch (213:9): [True: 330, False: 20.8k]
  ------------------
  214|    330|      grid_info = 1;
  215|  20.8k|    } else {
  216|  20.8k|      grid_info = ixheaacd_read_bits_buf(it_bit_buff, PVC_GRID_INFO_BITS);
  ------------------
  |  |  184|  20.8k|#define PVC_GRID_INFO_BITS 1
  ------------------
  217|  20.8k|    }
  218|  21.1k|    if (grid_info) {
  ------------------
  |  Branch (218:9): [True: 5.58k, False: 15.5k]
  ------------------
  219|  5.58k|      pvc_id[0] = (UWORD16)ixheaacd_read_bits_buf(it_bit_buff, pvc_id_bits);
  220|  15.5k|    } else {
  221|  15.5k|      pvc_id[0] = ptr_pvc_data->prev_pvc_id;
  222|  15.5k|    }
  223|   123k|    for (j = 1, k = 1; j < fixed_length; j++, k++) {
  ------------------
  |  Branch (223:24): [True: 102k, False: 21.1k]
  ------------------
  224|   102k|      pvc_id[k] = pvc_id[k - 1];
  225|   102k|    }
  226|       |
  227|  73.3k|    for (i = 1; i < num_grid_info; i++) {
  ------------------
  |  Branch (227:17): [True: 52.1k, False: 21.1k]
  ------------------
  228|  52.1k|      grid_info = ixheaacd_read_bits_buf(it_bit_buff, PVC_GRID_INFO_BITS);
  ------------------
  |  |  184|  52.1k|#define PVC_GRID_INFO_BITS 1
  ------------------
  229|  52.1k|      if (grid_info == 1) {
  ------------------
  |  Branch (229:11): [True: 33.2k, False: 18.9k]
  ------------------
  230|  33.2k|        pvc_id[k++] = (UWORD16)ixheaacd_read_bits_buf(it_bit_buff, pvc_id_bits);
  231|  33.2k|      } else {
  232|  18.9k|        pvc_id[k] = pvc_id[k - 1];
  233|  18.9k|        k++;
  234|  18.9k|      }
  235|   215k|      for (j = 1; j < fixed_length; j++, k++) {
  ------------------
  |  Branch (235:19): [True: 163k, False: 52.1k]
  ------------------
  236|   163k|        pvc_id[k] = pvc_id[k - 1];
  237|   163k|      }
  238|  52.1k|    }
  239|  21.1k|  }
  240|  65.5k|  ptr_pvc_data->div_mode = div_mode;
  241|  65.5k|  ptr_pvc_data->ns_mode = ns_mode;
  242|  1.11M|  for (i = 0; i < PVC_NUM_TIME_SLOTS; i++) {
  ------------------
  |  |  177|  1.11M|#define PVC_NUM_TIME_SLOTS 16
  ------------------
  |  Branch (242:15): [True: 1.04M, False: 65.5k]
  ------------------
  243|  1.04M|    ptr_pvc_data->pvc_id[i] = pvc_id[i];
  244|  1.04M|  }
  245|  65.5k|  return err;
  246|  65.5k|}
ixheaacd_env_extr.c:ixheaacd_read_sbr_addi_data:
  271|  65.4k|    ia_bit_buf_struct *it_bit_buff) {
  272|  65.4k|  WORD32 i;
  273|       |
  274|  65.4k|  WORD32 flag = ixheaacd_read_bits_buf(it_bit_buff, 1);
  275|       |
  276|  65.4k|  ptr_frame_data->sin_start_for_cur_top =
  277|  65.4k|      ptr_frame_data->sin_start_for_next_top;
  278|  65.4k|  ptr_frame_data->sin_len_for_cur_top = ptr_frame_data->sin_len_for_next_top;
  279|  65.4k|  ptr_frame_data->sin_start_for_next_top = 0;
  280|  65.4k|  ptr_frame_data->sin_len_for_next_top = 0;
  281|       |
  282|  65.4k|  if (flag) {
  ------------------
  |  Branch (282:7): [True: 17.3k, False: 48.1k]
  ------------------
  283|   283k|    for (i = 0; i < ptr_header_data->pstr_freq_band_data->num_sf_bands[HIGH];
  ------------------
  |  |   28|   283k|#define HIGH 1
  ------------------
  |  Branch (283:17): [True: 265k, False: 17.3k]
  ------------------
  284|   265k|         i++) {
  285|   265k|      ptr_frame_data->add_harmonics[i] = ixheaacd_read_bits_buf(it_bit_buff, 1);
  286|   265k|    }
  287|  17.3k|    if (ptr_frame_data->pvc_mode != 0) {
  ------------------
  |  Branch (287:9): [True: 17.3k, False: 1]
  ------------------
  288|  17.3k|      ptr_frame_data->sine_position = ESC_SIN_POS;
  ------------------
  |  |  195|  17.3k|#define ESC_SIN_POS 31
  ------------------
  289|       |
  290|  17.3k|      ptr_frame_data->bs_sin_pos_present =
  291|  17.3k|          ixheaacd_read_bits_buf(it_bit_buff, 1);
  292|       |
  293|  17.3k|      if (ptr_frame_data->bs_sin_pos_present == 1) {
  ------------------
  |  Branch (293:11): [True: 5.30k, False: 12.0k]
  ------------------
  294|  5.30k|        ptr_frame_data->sine_position = ixheaacd_read_bits_buf(it_bit_buff, 5);
  295|  5.30k|      }
  296|  17.3k|      if (ptr_frame_data->var_len > 0) {
  ------------------
  |  Branch (296:11): [True: 4.21k, False: 13.1k]
  ------------------
  297|  4.21k|        if (ptr_frame_data->sine_position > 16) {
  ------------------
  |  Branch (297:13): [True: 1.23k, False: 2.98k]
  ------------------
  298|  1.23k|          if (ptr_frame_data->sine_position == 31) {
  ------------------
  |  Branch (298:15): [True: 1.05k, False: 180]
  ------------------
  299|  1.05k|            ptr_frame_data->sin_start_for_next_top = 0;
  300|  1.05k|            ptr_frame_data->sin_len_for_next_top = ptr_frame_data->var_len;
  301|  1.05k|          } else {
  302|    180|            if ((ptr_frame_data->var_len + 16) ==
  ------------------
  |  Branch (302:17): [True: 2, False: 178]
  ------------------
  303|    180|                ptr_frame_data->sine_position) {
  304|      2|              ptr_frame_data->sin_start_for_next_top = 0;
  305|      2|              ptr_frame_data->sin_len_for_next_top = ptr_frame_data->var_len;
  306|    178|            } else {
  307|    178|              ptr_frame_data->sin_start_for_next_top =
  308|    178|                  ptr_frame_data->sine_position - 16;
  309|    178|              ptr_frame_data->sin_len_for_next_top = ptr_frame_data->var_len;
  310|    178|            }
  311|    180|          }
  312|  2.98k|        } else {
  313|  2.98k|          ptr_frame_data->sin_start_for_next_top = 0;
  314|  2.98k|          ptr_frame_data->sin_len_for_next_top = ptr_frame_data->var_len;
  315|  2.98k|        }
  316|  13.1k|      } else {
  317|  13.1k|        ptr_frame_data->sin_start_for_next_top = 0;
  318|  13.1k|        ptr_frame_data->sin_len_for_next_top = 0;
  319|  13.1k|      }
  320|  17.3k|    }
  321|  17.3k|  }
  322|  65.4k|  return;
  323|  65.4k|}
ixheaacd_env_extr.c:ixheaacd_validate_frame_info:
  532|   170k|    WORD audio_object_type) {
  533|   170k|  WORD32 i, j;
  534|       |
  535|   170k|  WORD32 start_pos, end_pos, transient_env, start_pos_noise, end_pos_noise,
  536|   170k|      num_env_sf, num_noise_env;
  537|       |
  538|   170k|  num_env_sf = pstr_frame_info->num_env;
  539|   170k|  num_noise_env = pstr_frame_info->num_noise_env;
  540|       |
  541|   170k|  if ((num_env_sf < 1) || (num_env_sf > MAX_ENVELOPES)) return 0;
  ------------------
  |  |   50|   170k|#define MAX_ENVELOPES 8
  ------------------
  |  Branch (541:7): [True: 0, False: 170k]
  |  Branch (541:27): [True: 0, False: 170k]
  ------------------
  542|       |
  543|   170k|  if (num_noise_env > MAX_NOISE_ENVELOPES) return 0;
  ------------------
  |  |   44|   170k|#define MAX_NOISE_ENVELOPES 2
  ------------------
  |  Branch (543:7): [True: 0, False: 170k]
  ------------------
  544|       |
  545|   170k|  start_pos = pstr_frame_info->border_vec[0];
  546|   170k|  end_pos = pstr_frame_info->border_vec[num_env_sf];
  547|   170k|  transient_env = pstr_frame_info->transient_env;
  548|       |
  549|   170k|  if (transient_env > num_env_sf) return 0;
  ------------------
  |  Branch (549:7): [True: 0, False: 170k]
  ------------------
  550|       |
  551|   170k|  start_pos_noise = pstr_frame_info->noise_border_vec[0];
  552|   170k|  end_pos_noise = pstr_frame_info->noise_border_vec[num_noise_env];
  553|       |
  554|   170k|  if ((start_pos < 0) || (start_pos >= end_pos)) return 0;
  ------------------
  |  Branch (554:7): [True: 0, False: 170k]
  |  Branch (554:26): [True: 0, False: 170k]
  ------------------
  555|       |
  556|   170k|  if (start_pos > SBR_OV_SLOTS) return 0;
  ------------------
  |  |   85|   170k|#define SBR_OV_SLOTS (MAX_OV_COLS / SBR_TIME_STEP)
  |  |  ------------------
  |  |  |  |   70|   170k|#define MAX_OV_COLS 6
  |  |  ------------------
  |  |               #define SBR_OV_SLOTS (MAX_OV_COLS / SBR_TIME_STEP)
  |  |  ------------------
  |  |  |  |   59|   170k|#define SBR_TIME_STEP 2
  |  |  ------------------
  ------------------
  |  Branch (556:7): [True: 0, False: 170k]
  ------------------
  557|   170k|  if (audio_object_type != AOT_ER_AAC_ELD &&
  ------------------
  |  Branch (557:7): [True: 130k, False: 39.9k]
  ------------------
  558|   130k|      audio_object_type != AOT_ER_AAC_LD) {
  ------------------
  |  Branch (558:7): [True: 130k, False: 0]
  ------------------
  559|   130k|    if (num_time_slots != 15) {
  ------------------
  |  Branch (559:9): [True: 130k, False: 0]
  ------------------
  560|   130k|      if (end_pos < SBR_TIME_SLOTS) return 0;
  ------------------
  |  |   84|   130k|#define SBR_TIME_SLOTS (MAX_COLS / SBR_TIME_STEP)
  |  |  ------------------
  |  |  |  |   69|   130k|#define MAX_COLS (MAX_FRAME_SIZE / NO_ANALYSIS_CHANNELS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|   130k|#define MAX_FRAME_SIZE 1024
  |  |  |  |  ------------------
  |  |  |  |               #define MAX_COLS (MAX_FRAME_SIZE / NO_ANALYSIS_CHANNELS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   35|   130k|#define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|   130k|#define NO_SYNTHESIS_CHANNELS 64
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   23|   130k|#define SBR_UPSAMPLE_FAC 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SBR_TIME_SLOTS (MAX_COLS / SBR_TIME_STEP)
  |  |  ------------------
  |  |  |  |   59|   130k|#define SBR_TIME_STEP 2
  |  |  ------------------
  ------------------
  |  Branch (560:11): [True: 0, False: 130k]
  ------------------
  561|   130k|    } else {
  562|      0|      if (end_pos < num_time_slots) return 0;
  ------------------
  |  Branch (562:11): [True: 0, False: 0]
  ------------------
  563|      0|    }
  564|   130k|  } else {
  565|  39.9k|    if (end_pos < num_time_slots) return 0;
  ------------------
  |  Branch (565:9): [True: 0, False: 39.9k]
  ------------------
  566|  39.9k|  }
  567|       |
  568|   170k|  if (num_time_slots != 15) {
  ------------------
  |  Branch (568:7): [True: 156k, False: 14.1k]
  ------------------
  569|   156k|    if (end_pos > add_d(SBR_TIME_SLOTS, SBR_OV_SLOTS)) return 0;
  ------------------
  |  |   23|   156k|#define add_d(a, b) ((a) + (b))
  ------------------
  |  Branch (569:9): [True: 0, False: 156k]
  ------------------
  570|   156k|  } else {
  571|  14.1k|    if (end_pos > add_d(num_time_slots, SBR_OV_SLOTS)) return 0;
  ------------------
  |  |   23|  14.1k|#define add_d(a, b) ((a) + (b))
  ------------------
  |  Branch (571:9): [True: 0, False: 14.1k]
  ------------------
  572|  14.1k|  }
  573|       |
  574|   513k|  for (i = 0; i < num_env_sf; i++) {
  ------------------
  |  Branch (574:15): [True: 342k, False: 170k]
  ------------------
  575|   342k|    if (pstr_frame_info->border_vec[i] > pstr_frame_info->border_vec[i + 1])
  ------------------
  |  Branch (575:9): [True: 92, False: 342k]
  ------------------
  576|     92|      return 0;
  577|   342k|  }
  578|       |
  579|   170k|  if ((num_env_sf == 1) && (num_noise_env > 1)) return 0;
  ------------------
  |  Branch (579:7): [True: 92.9k, False: 77.3k]
  |  Branch (579:28): [True: 0, False: 92.9k]
  ------------------
  580|       |
  581|   170k|  if ((start_pos != start_pos_noise) || (end_pos != end_pos_noise)) return 0;
  ------------------
  |  Branch (581:7): [True: 0, False: 170k]
  |  Branch (581:41): [True: 0, False: 170k]
  ------------------
  582|       |
  583|   417k|  for (i = 0; i < num_noise_env; i++) {
  ------------------
  |  Branch (583:15): [True: 247k, False: 170k]
  ------------------
  584|   247k|    start_pos_noise = pstr_frame_info->noise_border_vec[i];
  585|       |
  586|   357k|    for (j = 0; j < num_env_sf; j++) {
  ------------------
  |  Branch (586:17): [True: 357k, False: 0]
  ------------------
  587|   357k|      if (pstr_frame_info->border_vec[j] == start_pos_noise) break;
  ------------------
  |  Branch (587:11): [True: 247k, False: 109k]
  ------------------
  588|   357k|    }
  589|   247k|    if (j == num_env_sf) return 0;
  ------------------
  |  Branch (589:9): [True: 0, False: 247k]
  ------------------
  590|   247k|  }
  591|       |
  592|   170k|  return 1;
  593|   170k|}
ixheaacd_env_extr.c:ixheaacd_sbr_sin_coding_data:
  516|  55.8k|    ia_bit_buf_struct *it_bit_buff) {
  517|  55.8k|  FLAG *p_add_harmonic = ptr_frame_data->add_harmonics;
  518|  55.8k|  WORD32 i;
  519|       |
  520|  55.8k|  i = ptr_header_data->pstr_freq_band_data->num_sf_bands[HIGH];
  ------------------
  |  |   28|  55.8k|#define HIGH 1
  ------------------
  521|   698k|  do {
  522|   698k|    *p_add_harmonic++ =
  523|   698k|        (FLAG)ixheaacd_read_bits_buf(it_bit_buff, SBR_ADD_SINE_FLAG_BITS);
  ------------------
  |  |   82|   698k|#define SBR_ADD_SINE_FLAG_BITS 1
  ------------------
  524|   698k|    i--;
  525|   698k|  } while (i != 0);
  ------------------
  |  Branch (525:12): [True: 642k, False: 55.8k]
  ------------------
  526|       |
  527|  55.8k|  return;
  528|  55.8k|}
ixheaacd_env_extr.c:ixheaacd_read_extn_data:
  720|  30.9k|                                            VOID *p_frame_data, WORD32 ele_id) {
  721|  30.9k|  WORD i;
  722|  30.9k|  WORD extended_data;
  723|  30.9k|  WORD no_bits_left;
  724|       |
  725|  30.9k|  extended_data = ixheaacd_read_bits_buf(it_bit_buff, SBR_ENLARGED_DATA_BITS);
  ------------------
  |  |   75|  30.9k|#define SBR_ENLARGED_DATA_BITS 1
  ------------------
  726|       |
  727|  30.9k|  if (extended_data) {
  ------------------
  |  Branch (727:7): [True: 8.85k, False: 22.0k]
  ------------------
  728|  8.85k|    WORD cnt;
  729|  8.85k|    FLAG ps_read;
  730|       |
  731|  8.85k|    ps_read = 0;
  732|       |
  733|  8.85k|    cnt = ixheaacd_read_bits_buf(it_bit_buff, SBR_CONT_SIZE_BITS);
  ------------------
  |  |   76|  8.85k|#define SBR_CONT_SIZE_BITS 4
  ------------------
  734|       |
  735|  8.85k|    if (cnt == ((1 << SBR_CONT_SIZE_BITS) - 1)) {
  ------------------
  |  |   76|  8.85k|#define SBR_CONT_SIZE_BITS 4
  ------------------
  |  Branch (735:9): [True: 778, False: 8.08k]
  ------------------
  736|    778|      cnt = (cnt + ixheaacd_read_bits_buf(it_bit_buff, SBR_CONT_ESC_CNT_BITS));
  ------------------
  |  |   77|    778|#define SBR_CONT_ESC_CNT_BITS 8
  ------------------
  737|    778|    }
  738|       |
  739|  8.85k|    no_bits_left = (cnt << 3);
  740|       |
  741|  8.85k|    ptr_header_data->hbe_flag = !ptr_header_data->usac_flag;
  742|  8.85k|    ptr_header_data->sbr_ratio_idx = SBR_UPSAMPLE_IDX_2_1;
  ------------------
  |  |   26|  8.85k|#define SBR_UPSAMPLE_IDX_2_1 1
  ------------------
  743|       |
  744|  22.3k|    while (no_bits_left > 7) {
  ------------------
  |  Branch (744:12): [True: 15.6k, False: 6.69k]
  ------------------
  745|  15.6k|      WORD extension_id = ixheaacd_read_bits_buf(it_bit_buff, SBR_CONT_ID_BITS);
  ------------------
  |  |   78|  15.6k|#define SBR_CONT_ID_BITS 2
  ------------------
  746|       |
  747|  15.6k|      if (extension_id == EXTENSION_ID_ENHSBR_CODING && !ptr_header_data->enh_sbr)
  ------------------
  |  |   25|  31.3k|#define EXTENSION_ID_ENHSBR_CODING 3
  ------------------
  |  Branch (747:11): [True: 4.65k, False: 11.0k]
  |  Branch (747:57): [True: 0, False: 4.65k]
  ------------------
  748|      0|      {
  749|      0|        extension_id = -1;
  750|      0|      }
  751|  15.6k|      no_bits_left = (no_bits_left - SBR_CONT_ID_BITS);
  ------------------
  |  |   78|  15.6k|#define SBR_CONT_ID_BITS 2
  ------------------
  752|       |
  753|  15.6k|      switch (extension_id) {
  754|  5.72k|        case EXTENSION_ID_PS_CODING:
  ------------------
  |  |   23|  5.72k|#define EXTENSION_ID_PS_CODING 2
  ------------------
  |  Branch (754:9): [True: 5.72k, False: 9.93k]
  ------------------
  755|       |
  756|  5.72k|          if (ptr_ps_dec == NULL) {
  ------------------
  |  Branch (756:15): [True: 1.63k, False: 4.09k]
  ------------------
  757|  1.63k|            return 0;
  758|  1.63k|          }
  759|       |
  760|  4.09k|          if (!(ptr_ps_dec->force_mono || ps_read)) {
  ------------------
  |  Branch (760:17): [True: 0, False: 4.09k]
  |  Branch (760:43): [True: 1.39k, False: 2.70k]
  ------------------
  761|  2.70k|            IA_ERRORCODE ret_val = ixheaacd_read_ps_data(ptr_ps_dec, it_bit_buff,
  762|  2.70k|                                                         (WORD16)no_bits_left, ps_tables_ptr);
  763|  2.70k|            if (ret_val == IA_FATAL_ERROR) {
  ------------------
  |  |   25|  2.70k|#define IA_FATAL_ERROR 0x80000000
  ------------------
  |  Branch (763:17): [True: 2, False: 2.70k]
  ------------------
  764|      2|              return ret_val;
  765|  2.70k|            } else {
  766|  2.70k|              no_bits_left = no_bits_left - ret_val;
  767|  2.70k|            }
  768|       |
  769|  2.70k|            if (no_bits_left < 0) return 0;
  ------------------
  |  Branch (769:17): [True: 401, False: 2.29k]
  ------------------
  770|  2.29k|            ptr_header_data->channel_mode = PS_STEREO;
  ------------------
  |  |   29|  2.29k|#define PS_STEREO 3
  ------------------
  771|  2.29k|            ps_read = 1;
  772|  2.29k|            break;
  773|  2.70k|          }
  774|  6.04k|        case EXTENSION_ID_ENHSBR_CODING: {
  ------------------
  |  |   25|  6.04k|#define EXTENSION_ID_ENHSBR_CODING 3
  ------------------
  |  Branch (774:9): [True: 4.65k, False: 11.0k]
  ------------------
  775|  6.04k|          no_bits_left =
  776|  6.04k|              (no_bits_left - ixheaacd_read_enh_sbr_data(ptr_header_data, it_bit_buff,
  777|  6.04k|                  p_frame_data, ele_id));
  778|       |
  779|  6.04k|          ptr_header_data->hbe_flag = 1;
  780|  6.04k|          ptr_header_data->sbr_ratio_idx = SBR_UPSAMPLE_IDX_2_1;
  ------------------
  |  |   26|  6.04k|#define SBR_UPSAMPLE_IDX_2_1 1
  ------------------
  781|  6.04k|          break;
  782|  4.09k|        }
  783|  5.27k|        default:
  ------------------
  |  Branch (783:9): [True: 5.27k, False: 10.3k]
  ------------------
  784|  5.27k|          cnt = (no_bits_left >> 3);
  785|   131k|          for (i = cnt - 1; i >= 0; i--) ixheaacd_read_bits_buf(it_bit_buff, 8);
  ------------------
  |  Branch (785:29): [True: 126k, False: 5.27k]
  ------------------
  786|  5.27k|          no_bits_left = (no_bits_left - (cnt << 3));
  787|  5.27k|          break;
  788|  15.6k|      }
  789|  15.6k|    }
  790|       |
  791|  6.69k|    if (no_bits_left < 0) return 0;
  ------------------
  |  Branch (791:9): [True: 59, False: 6.63k]
  ------------------
  792|  6.63k|    ixheaacd_read_bits_buf(it_bit_buff, no_bits_left);
  793|  6.63k|  }
  794|  28.6k|  return 0;
  795|  30.9k|}
ixheaacd_env_extr.c:ixheaacd_read_enh_sbr_data:
  599|  6.04k|    WORD32 ele_id) {
  600|  6.04k|  WORD32 tmp = 0;
  601|  6.04k|  WORD16 num_bits_read = 0;
  602|  6.04k|  tmp = ixheaacd_read_bits_buf(it_bit_buff, ESBR_PRE_FLAT_BITS);
  ------------------
  |  |   50|  6.04k|#define ESBR_PRE_FLAT_BITS 1
  ------------------
  603|  6.04k|  ptr_header_data->pre_proc_flag = tmp;
  604|  6.04k|  num_bits_read += ESBR_PRE_FLAT_BITS;
  ------------------
  |  |   50|  6.04k|#define ESBR_PRE_FLAT_BITS 1
  ------------------
  605|       |
  606|  6.04k|  if (ele_id == SBR_ID_SCE) {
  ------------------
  |  Branch (606:7): [True: 2.70k, False: 3.33k]
  ------------------
  607|  2.70k|    ia_sbr_frame_info_data_struct *ptr_frame_data =
  608|  2.70k|        (ia_sbr_frame_info_data_struct *)p_frame_data;
  609|       |
  610|  2.70k|    tmp = ixheaacd_read_bits_buf(it_bit_buff, ESBR_PATCHING_MODE_BITS);
  ------------------
  |  |  164|  2.70k|#define ESBR_PATCHING_MODE_BITS 1
  ------------------
  611|  2.70k|    ptr_frame_data->sbr_patching_mode = tmp;
  612|  2.70k|    num_bits_read += ESBR_PATCHING_MODE_BITS;
  ------------------
  |  |  164|  2.70k|#define ESBR_PATCHING_MODE_BITS 1
  ------------------
  613|       |
  614|  2.70k|    if (tmp == 0) {
  ------------------
  |  Branch (614:9): [True: 1.49k, False: 1.21k]
  ------------------
  615|  1.49k|      tmp = ixheaacd_read_bits_buf(it_bit_buff, ESBR_OVERSAMPLING_FLAG_BITS);
  ------------------
  |  |  165|  1.49k|#define ESBR_OVERSAMPLING_FLAG_BITS 1
  ------------------
  616|  1.49k|      ptr_frame_data->over_sampling_flag = tmp;
  617|  1.49k|      num_bits_read += ESBR_OVERSAMPLING_FLAG_BITS;
  ------------------
  |  |  165|  1.49k|#define ESBR_OVERSAMPLING_FLAG_BITS 1
  ------------------
  618|       |
  619|  1.49k|      tmp = ixheaacd_read_bits_buf(it_bit_buff, ESBR_PITCHIN_FLAG_BITS);
  ------------------
  |  |  166|  1.49k|#define ESBR_PITCHIN_FLAG_BITS 1
  ------------------
  620|  1.49k|      num_bits_read += ESBR_PITCHIN_FLAG_BITS;
  ------------------
  |  |  166|  1.49k|#define ESBR_PITCHIN_FLAG_BITS 1
  ------------------
  621|       |
  622|  1.49k|      if (tmp) {
  ------------------
  |  Branch (622:11): [True: 142, False: 1.35k]
  ------------------
  623|    142|        tmp =
  624|    142|           ixheaacd_read_bits_buf(it_bit_buff, ESBR_PITCHIN_BINS_BITS);
  ------------------
  |  |  167|    142|#define ESBR_PITCHIN_BINS_BITS 7
  ------------------
  625|    142|        ptr_frame_data->pitch_in_bins = tmp;
  626|    142|        num_bits_read += ESBR_PITCHIN_BINS_BITS;
  ------------------
  |  |  167|    142|#define ESBR_PITCHIN_BINS_BITS 7
  ------------------
  627|  1.35k|      } else {
  628|  1.35k|        ptr_frame_data->pitch_in_bins = 0;
  629|  1.35k|      }
  630|  1.49k|    } else {
  631|  1.21k|      ptr_frame_data->over_sampling_flag = 0;
  632|  1.21k|      ptr_frame_data->pitch_in_bins = 0;
  633|  1.21k|    }
  634|  3.33k|  } else if (ele_id == SBR_ID_CPE) {
  ------------------
  |  Branch (634:14): [True: 3.33k, False: 0]
  ------------------
  635|  3.33k|    ia_sbr_frame_info_data_struct **ptr_frame_data =
  636|  3.33k|        (ia_sbr_frame_info_data_struct **)p_frame_data;
  637|  3.33k|    if (ptr_frame_data[0]->coupling_mode) {
  ------------------
  |  Branch (637:9): [True: 1.28k, False: 2.05k]
  ------------------
  638|  1.28k|      ptr_frame_data[0]->sbr_patching_mode =
  639|  1.28k|          ptr_frame_data[1]->sbr_patching_mode =
  640|  1.28k|          ixheaacd_read_bits_buf(it_bit_buff, ESBR_PATCHING_MODE_BITS);
  ------------------
  |  |  164|  1.28k|#define ESBR_PATCHING_MODE_BITS 1
  ------------------
  641|  1.28k|      num_bits_read += ESBR_PATCHING_MODE_BITS;
  ------------------
  |  |  164|  1.28k|#define ESBR_PATCHING_MODE_BITS 1
  ------------------
  642|       |
  643|  1.28k|      if (ptr_frame_data[0]->sbr_patching_mode == 0) {
  ------------------
  |  Branch (643:11): [True: 441, False: 843]
  ------------------
  644|    441|        ptr_frame_data[0]->over_sampling_flag =
  645|    441|            ptr_frame_data[1]->over_sampling_flag =
  646|    441|            ixheaacd_read_bits_buf(it_bit_buff, ESBR_OVERSAMPLING_FLAG_BITS);
  ------------------
  |  |  165|    441|#define ESBR_OVERSAMPLING_FLAG_BITS 1
  ------------------
  647|    441|        num_bits_read += ESBR_OVERSAMPLING_FLAG_BITS;
  ------------------
  |  |  165|    441|#define ESBR_OVERSAMPLING_FLAG_BITS 1
  ------------------
  648|    441|        num_bits_read += ESBR_PITCHIN_FLAG_BITS;
  ------------------
  |  |  166|    441|#define ESBR_PITCHIN_FLAG_BITS 1
  ------------------
  649|    441|        if (ixheaacd_read_bits_buf(it_bit_buff, ESBR_PITCHIN_FLAG_BITS)) {
  ------------------
  |  |  166|    441|#define ESBR_PITCHIN_FLAG_BITS 1
  ------------------
  |  Branch (649:13): [True: 30, False: 411]
  ------------------
  650|     30|          ptr_frame_data[0]->pitch_in_bins =
  651|     30|          ptr_frame_data[1]->pitch_in_bins =
  652|     30|              ixheaacd_read_bits_buf(it_bit_buff, ESBR_PITCHIN_BINS_BITS);
  ------------------
  |  |  167|     30|#define ESBR_PITCHIN_BINS_BITS 7
  ------------------
  653|     30|          num_bits_read += ESBR_PITCHIN_BINS_BITS;
  ------------------
  |  |  167|     30|#define ESBR_PITCHIN_BINS_BITS 7
  ------------------
  654|    411|        } else {
  655|    411|          ptr_frame_data[0]->pitch_in_bins = 0;
  656|    411|          ptr_frame_data[1]->pitch_in_bins = 0;
  657|    411|        }
  658|    843|      } else {
  659|    843|        ptr_frame_data[0]->over_sampling_flag = 0;
  660|    843|        ptr_frame_data[0]->pitch_in_bins = 0;
  661|       |
  662|    843|        ptr_frame_data[1]->over_sampling_flag = 0;
  663|    843|        ptr_frame_data[1]->pitch_in_bins = 0;
  664|    843|      }
  665|  2.05k|    } else {
  666|  2.05k|      ptr_frame_data[0]->sbr_patching_mode =
  667|  2.05k|          ixheaacd_read_bits_buf(it_bit_buff, ESBR_PATCHING_MODE_BITS);
  ------------------
  |  |  164|  2.05k|#define ESBR_PATCHING_MODE_BITS 1
  ------------------
  668|  2.05k|      num_bits_read += ESBR_PATCHING_MODE_BITS;
  ------------------
  |  |  164|  2.05k|#define ESBR_PATCHING_MODE_BITS 1
  ------------------
  669|       |
  670|  2.05k|      if (ptr_frame_data[0]->sbr_patching_mode == 0) {
  ------------------
  |  Branch (670:11): [True: 637, False: 1.41k]
  ------------------
  671|    637|        ptr_frame_data[0]->over_sampling_flag =
  672|    637|            ixheaacd_read_bits_buf(it_bit_buff, ESBR_OVERSAMPLING_FLAG_BITS);
  ------------------
  |  |  165|    637|#define ESBR_OVERSAMPLING_FLAG_BITS 1
  ------------------
  673|    637|        num_bits_read += ESBR_OVERSAMPLING_FLAG_BITS;
  ------------------
  |  |  165|    637|#define ESBR_OVERSAMPLING_FLAG_BITS 1
  ------------------
  674|    637|        num_bits_read += ESBR_PITCHIN_FLAG_BITS;
  ------------------
  |  |  166|    637|#define ESBR_PITCHIN_FLAG_BITS 1
  ------------------
  675|    637|        if (ixheaacd_read_bits_buf(it_bit_buff, ESBR_PITCHIN_FLAG_BITS)) {
  ------------------
  |  |  166|    637|#define ESBR_PITCHIN_FLAG_BITS 1
  ------------------
  |  Branch (675:13): [True: 49, False: 588]
  ------------------
  676|     49|          ptr_frame_data[0]->pitch_in_bins =
  677|     49|              ixheaacd_read_bits_buf(it_bit_buff, ESBR_PITCHIN_BINS_BITS);
  ------------------
  |  |  167|     49|#define ESBR_PITCHIN_BINS_BITS 7
  ------------------
  678|     49|          num_bits_read += ESBR_PITCHIN_BINS_BITS;
  ------------------
  |  |  167|     49|#define ESBR_PITCHIN_BINS_BITS 7
  ------------------
  679|    588|        } else {
  680|    588|          ptr_frame_data[0]->pitch_in_bins = 0;
  681|    588|        }
  682|  1.41k|      } else {
  683|  1.41k|        ptr_frame_data[0]->over_sampling_flag = 0;
  684|  1.41k|        ptr_frame_data[0]->pitch_in_bins = 0;
  685|  1.41k|      }
  686|       |
  687|  2.05k|      ptr_frame_data[1]->sbr_patching_mode =
  688|  2.05k|          ixheaacd_read_bits_buf(it_bit_buff, ESBR_PATCHING_MODE_BITS);
  ------------------
  |  |  164|  2.05k|#define ESBR_PATCHING_MODE_BITS 1
  ------------------
  689|  2.05k|      num_bits_read += ESBR_PATCHING_MODE_BITS;
  ------------------
  |  |  164|  2.05k|#define ESBR_PATCHING_MODE_BITS 1
  ------------------
  690|       |
  691|  2.05k|      if (ptr_frame_data[1]->sbr_patching_mode == 0) {
  ------------------
  |  Branch (691:11): [True: 1.14k, False: 914]
  ------------------
  692|  1.14k|        ptr_frame_data[1]->over_sampling_flag =
  693|  1.14k|            ixheaacd_read_bits_buf(it_bit_buff, ESBR_OVERSAMPLING_FLAG_BITS);
  ------------------
  |  |  165|  1.14k|#define ESBR_OVERSAMPLING_FLAG_BITS 1
  ------------------
  694|  1.14k|        num_bits_read += ESBR_OVERSAMPLING_FLAG_BITS;
  ------------------
  |  |  165|  1.14k|#define ESBR_OVERSAMPLING_FLAG_BITS 1
  ------------------
  695|  1.14k|        num_bits_read += ESBR_PITCHIN_FLAG_BITS;
  ------------------
  |  |  166|  1.14k|#define ESBR_PITCHIN_FLAG_BITS 1
  ------------------
  696|  1.14k|        if (ixheaacd_read_bits_buf(it_bit_buff, ESBR_PITCHIN_FLAG_BITS)) {
  ------------------
  |  |  166|  1.14k|#define ESBR_PITCHIN_FLAG_BITS 1
  ------------------
  |  Branch (696:13): [True: 223, False: 917]
  ------------------
  697|    223|          ptr_frame_data[1]->pitch_in_bins =
  698|    223|              ixheaacd_read_bits_buf(it_bit_buff, ESBR_PITCHIN_BINS_BITS);
  ------------------
  |  |  167|    223|#define ESBR_PITCHIN_BINS_BITS 7
  ------------------
  699|    223|          num_bits_read += ESBR_PITCHIN_BINS_BITS;
  ------------------
  |  |  167|    223|#define ESBR_PITCHIN_BINS_BITS 7
  ------------------
  700|    917|        } else {
  701|    917|          ptr_frame_data[1]->pitch_in_bins = 0;
  702|    917|        }
  703|  1.14k|      } else {
  704|    914|        ptr_frame_data[1]->over_sampling_flag =
  705|    914|            ptr_frame_data[1]->pitch_in_bins = 0;
  706|    914|      }
  707|  2.05k|    }
  708|  3.33k|  }
  709|  6.04k|  if (num_bits_read < 6) {
  ------------------
  |  Branch (709:7): [True: 5.18k, False: 862]
  ------------------
  710|  5.18k|    ixheaacd_read_bits_buf(it_bit_buff, 6 - num_bits_read);
  711|  5.18k|    num_bits_read = 6;
  712|  5.18k|  }
  713|  6.04k|  return num_bits_read;
  714|  6.04k|}

ixheaacd_shellsort:
   48|  1.35M|VOID ixheaacd_shellsort(WORD32 *in, WORD32 n) {
   49|  1.35M|  WORD32 i, j, v;
   50|  1.35M|  WORD32 inc = 1;
   51|       |
   52|  1.35M|  do
   53|  2.91M|    inc = 3 * inc + 1;
   54|  2.91M|  while (inc <= n);
  ------------------
  |  Branch (54:10): [True: 1.55M, False: 1.35M]
  ------------------
   55|       |
   56|  2.91M|  do {
   57|  2.91M|    inc = inc / 3;
   58|  22.5M|    for (i = inc + 1; i <= n; i++) {
  ------------------
  |  Branch (58:23): [True: 19.5M, False: 2.91M]
  ------------------
   59|  19.5M|      v = in[i - 1];
   60|  19.5M|      j = i;
   61|  26.1M|      while (in[j - inc - 1] > v) {
  ------------------
  |  Branch (61:14): [True: 7.25M, False: 18.9M]
  ------------------
   62|  7.25M|        in[j - 1] = in[j - inc - 1];
   63|  7.25M|        j -= inc;
   64|  7.25M|        if (j <= inc) break;
  ------------------
  |  Branch (64:13): [True: 673k, False: 6.57M]
  ------------------
   65|  7.25M|      }
   66|  19.5M|      in[j - 1] = v;
   67|  19.5M|    }
   68|  2.91M|  } while (inc > 1);
  ------------------
  |  Branch (68:12): [True: 1.55M, False: 1.35M]
  ------------------
   69|  1.35M|}
ixheaacd_sbr_env_calc:
   75|   222k|                             WORD32 ec_flag) {
   76|   222k|  IA_ERRORCODE err_code = IA_NO_ERROR;
  ------------------
  |  |   23|   222k|#define IA_NO_ERROR 0x00000000
  ------------------
   77|   222k|  WORD8 harmonics[64];
   78|   222k|  FLOAT32(*env_tmp)[48];
   79|   222k|  FLOAT32(*noise_level_pvc)[48];
   80|   222k|  FLOAT32(*nrg_est_pvc)[48];
   81|   222k|  FLOAT32(*nrg_ref_pvc)[48];
   82|   222k|  FLOAT32(*nrg_gain_pvc)[48];
   83|   222k|  FLOAT32(*nrg_tone_pvc)[48];
   84|       |
   85|   222k|  WORD32 n, c, li, ui, i, j, k = 0, l, m = 0, kk = 0, o, next = -1, ui2, flag,
   86|   222k|                             tmp, noise_absc_flag, smooth_length;
   87|   222k|  WORD32 upsamp_4_flag = frame_data->pstr_sbr_header->is_usf_4;
   88|       |
   89|   222k|  FLOAT32 *ptr_real_buf, *ptr_imag_buf, nrg = 0, p_ref, p_est, avg_gain, g_max,
   90|   222k|                                        p_adj, boost_gain, sb_gain, sb_noise,
   91|   222k|                                        temp[64];
   92|       |
   93|   222k|  WORD32 t;
   94|   222k|  WORD32 start_pos = 0;
   95|   222k|  WORD32 end_pos = 0;
   96|       |
   97|   222k|  WORD32 slot_idx;
   98|       |
   99|   222k|  FLOAT32 *prev_env_noise_level = frame_data->prev_noise_level;
  100|   222k|  FLOAT32 *nrg_tone = scratch_buff;
  101|   222k|  FLOAT32 *noise_level = scratch_buff + 64;
  102|   222k|  FLOAT32 *nrg_est = scratch_buff + 128;
  103|   222k|  FLOAT32 *nrg_ref = scratch_buff + 192;
  104|   222k|  FLOAT32 *nrg_gain = scratch_buff + 256;
  105|       |
  106|   222k|  const FLOAT32 *smooth_filt;
  107|       |
  108|   222k|  FLOAT32 *sfb_nrg = frame_data->flt_env_sf_arr;
  109|   222k|  FLOAT32 *noise_floor = frame_data->flt_noise_floor;
  110|   222k|  ia_frame_info_struct *p_frame_info = &frame_data->str_frame_info_details;
  111|       |
  112|   222k|  ia_frame_info_struct *pvc_frame_info = &frame_data->str_pvc_frame_info;
  113|   222k|  WORD32 smoothing_length = frame_data->pstr_sbr_header->smoothing_mode ? 0 : 4;
  ------------------
  |  Branch (113:29): [True: 201k, False: 20.8k]
  ------------------
  114|   222k|  WORD32 int_mode = frame_data->pstr_sbr_header->interpol_freq;
  115|   222k|  WORD32 limiter_band = frame_data->pstr_sbr_header->limiter_bands;
  116|   222k|  WORD32 limiter_gains = frame_data->pstr_sbr_header->limiter_gains;
  117|   222k|  WORD32 *add_harmonics = frame_data->add_harmonics;
  118|   222k|  WORD32 sub_band_start =
  119|   222k|      frame_data->pstr_sbr_header->pstr_freq_band_data->sub_band_start;
  120|   222k|  WORD32 sub_band_end =
  121|   222k|      frame_data->pstr_sbr_header->pstr_freq_band_data->sub_band_end;
  122|   222k|  WORD32 reset = frame_data->reset_flag;
  123|   222k|  WORD32 num_subbands = sub_band_end - sub_band_start;
  124|   222k|  WORD32 bs_num_env = p_frame_info->num_env;
  125|   222k|  WORD32 trans_env = p_frame_info->transient_env;
  126|   222k|  WORD32 sbr_mode = frame_data->sbr_mode;
  127|   222k|  WORD32 prev_sbr_mode = frame_data->prev_sbr_mode;
  128|       |
  129|   222k|  WORD16 *freq_band_table[2];
  130|   222k|  const WORD16 *num_sf_bands =
  131|   222k|      frame_data->pstr_sbr_header->pstr_freq_band_data->num_sf_bands;
  132|   222k|  WORD16 *freq_band_table_noise =
  133|   222k|      frame_data->pstr_sbr_header->pstr_freq_band_data->freq_band_tbl_noise;
  134|   222k|  WORD32 num_nf_bands =
  135|   222k|      frame_data->pstr_sbr_header->pstr_freq_band_data->num_nf_bands;
  136|       |
  137|   222k|  WORD32 harm_index = frame_data->harm_index;
  138|   222k|  WORD32 phase_index = frame_data->phase_index;
  139|   222k|  WORD32 esbr_start_up = frame_data->pstr_sbr_header->esbr_start_up;
  140|   222k|  WORD32 esbr_start_up_pvc = frame_data->pstr_sbr_header->esbr_start_up_pvc;
  141|   222k|  WORD8(*harm_flag_prev)[64] = &frame_data->harm_flag_prev;
  142|   222k|  FLOAT32(*e_gain)[5][64] = &frame_data->e_gain;
  143|   222k|  FLOAT32(*noise_buf)[5][64] = &frame_data->noise_buf;
  144|   222k|  WORD32(*lim_table)[4][12 + 1] = &frame_data->lim_table;
  145|   222k|  WORD32(*gate_mode)[4] = &frame_data->gate_mode;
  146|   222k|  WORD32 freq_inv = 1;
  147|       |
  148|   222k|  WORD8(*harm_flag_varlen_prev)[64] = &frame_data->harm_flag_varlen_prev;
  149|   222k|  WORD8(*harm_flag_varlen)[64] = &frame_data->harm_flag_varlen;
  150|   222k|  WORD32 band_loop_end;
  151|       |
  152|   222k|  WORD32 rate = upsamp_4_flag ? 4 : 2;
  ------------------
  |  Branch (152:17): [True: 21.8k, False: 200k]
  ------------------
  153|   222k|  FLOAT64 guard = 1e-17;
  154|       |
  155|   222k|  if (ldmps_present == 1) rate = 1;
  ------------------
  |  Branch (155:7): [True: 4.06k, False: 218k]
  ------------------
  156|       |
  157|   222k|  env_tmp = frame_data->env_tmp;
  158|   222k|  noise_level_pvc = frame_data->noise_level_pvc;
  159|   222k|  nrg_est_pvc = frame_data->nrg_est_pvc;
  160|   222k|  nrg_ref_pvc = frame_data->nrg_ref_pvc;
  161|   222k|  nrg_gain_pvc = frame_data->nrg_gain_pvc;
  162|   222k|  nrg_tone_pvc = frame_data->nrg_tone_pvc;
  163|       |
  164|   222k|  freq_band_table[0] =
  165|   222k|      frame_data->pstr_sbr_header->pstr_freq_band_data->freq_band_table[0];
  166|   222k|  freq_band_table[1] =
  167|   222k|      frame_data->pstr_sbr_header->pstr_freq_band_data->freq_band_table[1];
  168|       |
  169|   222k|  if (reset || (ldmps_present == 1)) {
  ------------------
  |  Branch (169:7): [True: 38.6k, False: 183k]
  |  Branch (169:16): [True: 3.52k, False: 180k]
  ------------------
  170|  42.1k|    esbr_start_up = 1;
  171|  42.1k|    esbr_start_up_pvc = 1;
  172|  42.1k|    if (reset) phase_index = 0;
  ------------------
  |  Branch (172:9): [True: 38.6k, False: 3.52k]
  ------------------
  173|  42.1k|    if (ixheaacd_createlimiterbands(
  ------------------
  |  Branch (173:9): [True: 1, False: 42.1k]
  ------------------
  174|  42.1k|            (*lim_table), (*gate_mode),
  175|  42.1k|            frame_data->pstr_sbr_header->pstr_freq_band_data->freq_band_tbl_lo, num_sf_bands[LOW],
  ------------------
  |  |   27|  42.1k|#define LOW 0
  ------------------
  176|  42.1k|            x_over_qmf, frame_data->sbr_patching_mode, upsamp_4_flag, &frame_data->patch_param,
  177|  42.1k|            ec_flag))
  178|      1|      return IA_FATAL_ERROR;
  ------------------
  |  |   25|      1|#define IA_FATAL_ERROR 0x80000000
  ------------------
  179|  42.1k|  }
  180|       |
  181|   222k|  if (frame_data->sbr_patching_mode != frame_data->prev_sbr_patching_mode) {
  ------------------
  |  Branch (181:7): [True: 36.1k, False: 186k]
  ------------------
  182|  36.1k|    if (ixheaacd_createlimiterbands(
  ------------------
  |  Branch (182:9): [True: 0, False: 36.1k]
  ------------------
  183|  36.1k|            (*lim_table), (*gate_mode),
  184|  36.1k|            frame_data->pstr_sbr_header->pstr_freq_band_data->freq_band_tbl_lo, num_sf_bands[LOW],
  ------------------
  |  |   27|  36.1k|#define LOW 0
  ------------------
  185|  36.1k|            x_over_qmf, frame_data->sbr_patching_mode, upsamp_4_flag, &frame_data->patch_param,
  186|  36.1k|            ec_flag))
  187|      0|      return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
  188|       |
  189|  36.1k|    frame_data->prev_sbr_patching_mode = frame_data->sbr_patching_mode;
  190|  36.1k|  }
  191|       |
  192|   222k|  memset(harmonics, 0, 64 * sizeof(WORD8));
  193|       |
  194|   222k|  if (sbr_mode == PVC_SBR) {
  ------------------
  |  Branch (194:7): [True: 63.3k, False: 159k]
  ------------------
  195|   998k|    for (i = 0; i < num_sf_bands[HIGH]; i++) {
  ------------------
  |  |   28|   998k|#define HIGH 1
  ------------------
  |  Branch (195:17): [True: 934k, False: 63.3k]
  ------------------
  196|   934k|      li =
  197|   934k|          frame_data->pstr_sbr_header->pstr_freq_band_data->freq_band_tbl_hi[i];
  198|   934k|      ui = frame_data->pstr_sbr_header->pstr_freq_band_data
  199|   934k|               ->freq_band_tbl_hi[i + 1];
  200|   934k|      tmp = ((ui + li) - (sub_band_start << 1)) >> 1;
  201|       |
  202|   934k|      if ((tmp >= 64) || (tmp < 0)) {
  ------------------
  |  Branch (202:11): [True: 0, False: 934k]
  |  Branch (202:26): [True: 0, False: 934k]
  ------------------
  203|      0|        if (ec_flag)
  ------------------
  |  Branch (203:13): [True: 0, False: 0]
  ------------------
  204|      0|          tmp = 0;
  205|      0|        else
  206|      0|          return -1;
  207|      0|      }
  208|       |
  209|   934k|      harmonics[tmp] = add_harmonics[i];
  210|   934k|    }
  211|       |
  212|  76.1k|    for (t = 0; t < p_frame_info->border_vec[0]; t++) {
  ------------------
  |  Branch (212:17): [True: 12.7k, False: 63.3k]
  ------------------
  213|   828k|      for (c = 0; c < 64; c++) {
  ------------------
  |  Branch (213:19): [True: 815k, False: 12.7k]
  ------------------
  214|   815k|        frame_data->qmapped_pvc[c][t] = frame_data->qmapped_pvc[c][t + 16];
  215|   815k|      }
  216|  12.7k|    }
  217|       |
  218|   168k|    for (i = 0; i < bs_num_env; i++) {
  ------------------
  |  Branch (218:17): [True: 105k, False: 63.3k]
  ------------------
  219|   105k|      if (kk > MAX_NOISE_ENVELOPES) {
  ------------------
  |  |   44|   105k|#define MAX_NOISE_ENVELOPES 2
  ------------------
  |  Branch (219:11): [True: 0, False: 105k]
  ------------------
  220|      0|        if (ec_flag)
  ------------------
  |  Branch (220:13): [True: 0, False: 0]
  ------------------
  221|      0|          kk = MAX_NOISE_ENVELOPES;
  ------------------
  |  |   44|      0|#define MAX_NOISE_ENVELOPES 2
  ------------------
  222|      0|        else
  223|      0|          return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
  224|      0|      }
  225|   105k|      if (p_frame_info->border_vec[i] == p_frame_info->noise_border_vec[kk]) kk++, next++;
  ------------------
  |  Branch (225:11): [True: 105k, False: 0]
  ------------------
  226|       |
  227|   105k|      start_pos = p_frame_info->border_vec[i];
  228|   105k|      end_pos = p_frame_info->border_vec[i + 1];
  229|   105k|      if ((start_pos < 0) || (end_pos > MAX_FREQ_COEFFS_SBR)) {
  ------------------
  |  |   55|   105k|#define MAX_FREQ_COEFFS_SBR 48
  ------------------
  |  Branch (229:11): [True: 0, False: 105k]
  |  Branch (229:30): [True: 0, False: 105k]
  ------------------
  230|      0|        if (ec_flag) {
  ------------------
  |  Branch (230:13): [True: 0, False: 0]
  ------------------
  231|      0|          start_pos = 0;
  232|      0|          end_pos = MAX_FREQ_COEFFS_SBR;
  ------------------
  |  |   55|      0|#define MAX_FREQ_COEFFS_SBR 48
  ------------------
  233|      0|        } else
  234|      0|          return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
  235|      0|      }
  236|       |
  237|  1.12M|      for (t = start_pos; t < end_pos; t++) {
  ------------------
  |  Branch (237:27): [True: 1.01M, False: 105k]
  ------------------
  238|  1.01M|        band_loop_end = num_sf_bands[p_frame_info->freq_res[i]];
  239|       |
  240|  8.58M|        for (c = 0, o = 0, j = 0; j < band_loop_end; j++) {
  ------------------
  |  Branch (240:35): [True: 7.57M, False: 1.01M]
  ------------------
  241|  7.57M|          li = freq_band_table[p_frame_info->freq_res[i]][j];
  242|  7.57M|          ui = freq_band_table[p_frame_info->freq_res[i]][j + 1];
  243|  7.57M|          ui2 = frame_data->pstr_sbr_header->pstr_freq_band_data
  244|  7.57M|                    ->freq_band_tbl_noise[o + 1];
  245|       |
  246|  37.1M|          for (k = 0; k < ui - li; k++) {
  ------------------
  |  Branch (246:23): [True: 29.6M, False: 7.57M]
  ------------------
  247|  29.6M|            o = (k + li >= ui2) ? o + 1 : o;
  ------------------
  |  Branch (247:17): [True: 2.48M, False: 27.1M]
  ------------------
  248|  29.6M|            if (o >= MAX_NOISE_COEFFS) {
  ------------------
  |  |   45|  29.6M|#define MAX_NOISE_COEFFS 5
  ------------------
  |  Branch (248:17): [True: 0, False: 29.6M]
  ------------------
  249|      0|              if (ec_flag)
  ------------------
  |  Branch (249:19): [True: 0, False: 0]
  ------------------
  250|      0|                o = MAX_NOISE_COEFFS - 1;
  ------------------
  |  |   45|      0|#define MAX_NOISE_COEFFS 5
  ------------------
  251|      0|              else
  252|      0|                return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
  253|      0|            }
  254|  29.6M|            ui2 = freq_band_table_noise[o + 1];
  255|       |
  256|  29.6M|            frame_data->qmapped_pvc[c][t] =
  257|  29.6M|                noise_floor[next * num_nf_bands + o];
  258|  29.6M|            c++;
  259|  29.6M|          }
  260|  7.57M|        }
  261|  1.01M|      }
  262|   105k|    }
  263|       |
  264|  63.3k|    kk = 0;
  265|  63.3k|    next = -1;
  266|       |
  267|   168k|    for (i = 0; i < bs_num_env; i++) {
  ------------------
  |  Branch (267:17): [True: 105k, False: 63.3k]
  ------------------
  268|   105k|      if (kk > MAX_NOISE_ENVELOPES) {
  ------------------
  |  |   44|   105k|#define MAX_NOISE_ENVELOPES 2
  ------------------
  |  Branch (268:11): [True: 0, False: 105k]
  ------------------
  269|      0|        if (ec_flag)
  ------------------
  |  Branch (269:13): [True: 0, False: 0]
  ------------------
  270|      0|          kk = MAX_NOISE_ENVELOPES;
  ------------------
  |  |   44|      0|#define MAX_NOISE_ENVELOPES 2
  ------------------
  271|      0|        else
  272|      0|          return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
  273|      0|      }
  274|   105k|      if (p_frame_info->border_vec[i] == p_frame_info->noise_border_vec[kk]) kk++, next++;
  ------------------
  |  Branch (274:11): [True: 105k, False: 0]
  ------------------
  275|       |
  276|   105k|      start_pos = pvc_frame_info->border_vec[i];
  277|   105k|      end_pos = pvc_frame_info->border_vec[i + 1];
  278|   105k|      if ((start_pos < 0) || (end_pos > MAX_FREQ_COEFFS_SBR)) {
  ------------------
  |  |   55|   105k|#define MAX_FREQ_COEFFS_SBR 48
  ------------------
  |  Branch (278:11): [True: 0, False: 105k]
  |  Branch (278:30): [True: 0, False: 105k]
  ------------------
  279|      0|        if (ec_flag) {
  ------------------
  |  Branch (279:13): [True: 0, False: 0]
  ------------------
  280|      0|          start_pos = 0;
  281|      0|          end_pos = MAX_FREQ_COEFFS_SBR;
  ------------------
  |  |   55|      0|#define MAX_FREQ_COEFFS_SBR 48
  ------------------
  282|      0|        } else
  283|      0|          return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
  284|      0|      }
  285|  1.11M|      for (t = start_pos; t < end_pos; t++) {
  ------------------
  |  Branch (285:27): [True: 1.01M, False: 105k]
  ------------------
  286|  65.8M|        for (c = 0; c < 64; c++) {
  ------------------
  |  Branch (286:21): [True: 64.8M, False: 1.01M]
  ------------------
  287|  64.8M|          env_tmp[c][t] = env_out[64 * t + c];
  288|  64.8M|        }
  289|  1.01M|      }
  290|       |
  291|   105k|      noise_absc_flag =
  292|   105k|          (i == trans_env || i == frame_data->env_short_flag_prev) ? 1 : 0;
  ------------------
  |  Branch (292:12): [True: 0, False: 105k]
  |  Branch (292:30): [True: 337, False: 104k]
  ------------------
  293|       |
  294|   105k|      if (prev_sbr_mode == ORIG_SBR) noise_absc_flag = 0;
  ------------------
  |  Branch (294:11): [True: 1.78k, False: 103k]
  ------------------
  295|       |
  296|   105k|      smooth_length = (noise_absc_flag ? 0 : smoothing_length);
  ------------------
  |  Branch (296:24): [True: 321, False: 104k]
  ------------------
  297|   105k|      smooth_filt = *ixheaac_fir_table[smooth_length];
  298|       |
  299|   112k|      for (t = start_pos; t < frame_data->sin_len_for_cur_top; t++) {
  ------------------
  |  Branch (299:27): [True: 7.58k, False: 105k]
  ------------------
  300|  7.58k|        band_loop_end =
  301|  7.58k|            num_sf_bands[frame_data->str_frame_info_prev
  302|  7.58k|                             .freq_res[frame_data->var_len_id_prev]];
  303|       |
  304|  64.3k|        for (c = 0, o = 0, j = 0; j < band_loop_end; j++) {
  ------------------
  |  Branch (304:35): [True: 56.7k, False: 7.58k]
  ------------------
  305|  56.7k|          double tmp;
  306|       |
  307|  56.7k|          li = freq_band_table[frame_data->str_frame_info_prev
  308|  56.7k|                                   .freq_res[frame_data->var_len_id_prev]][j];
  309|  56.7k|          ui = freq_band_table[frame_data->str_frame_info_prev
  310|  56.7k|                                   .freq_res[frame_data->var_len_id_prev]]
  311|  56.7k|                              [j + 1];
  312|  56.7k|          ui2 = frame_data->pstr_sbr_header->pstr_freq_band_data
  313|  56.7k|                    ->freq_band_tbl_noise[o + 1];
  314|       |
  315|   271k|          for (flag = 0, k = li; k < ui; k++) {
  ------------------
  |  Branch (315:34): [True: 214k, False: 56.7k]
  ------------------
  316|   214k|            flag = ((*harm_flag_varlen)[c] &&
  ------------------
  |  Branch (316:21): [True: 36.0k, False: 178k]
  ------------------
  317|  36.0k|                    (t >= frame_data->sin_start_for_cur_top ||
  ------------------
  |  Branch (317:22): [True: 32.1k, False: 3.89k]
  ------------------
  318|  3.89k|                     (*harm_flag_varlen_prev)[c + sub_band_start]))
  ------------------
  |  Branch (318:22): [True: 2.98k, False: 915]
  ------------------
  319|   214k|                       ? 1
  320|   214k|                       : flag;
  321|       |
  322|   214k|            nrg_ref_pvc[c][t] = env_tmp[k][t];
  323|   646k|            for (nrg = 0, l = 0; l < rate; l++) {
  ------------------
  |  Branch (323:34): [True: 431k, False: 214k]
  ------------------
  324|   431k|              nrg +=
  325|   431k|                  (input_real[rate * t + l][k] * input_real[rate * t + l][k]) +
  326|   431k|                  (input_imag[rate * t + l][k] * input_imag[rate * t + l][k]);
  327|   431k|            }
  328|   214k|            nrg_est_pvc[c][t] = nrg / rate;
  329|   214k|            c++;
  330|   214k|          }
  331|       |
  332|  56.7k|          if (!int_mode && ui != li) {
  ------------------
  |  Branch (332:15): [True: 9.38k, False: 47.3k]
  |  Branch (332:28): [True: 9.33k, False: 57]
  ------------------
  333|  52.3k|            for (nrg = 0, k = c - (ui - li); k < c; k++) {
  ------------------
  |  Branch (333:46): [True: 43.0k, False: 9.33k]
  ------------------
  334|  43.0k|              nrg += nrg_est_pvc[k][t];
  335|  43.0k|            }
  336|  9.33k|            nrg /= (ui - li);
  337|  47.4k|          } else {
  338|  47.4k|            nrg = 0;
  339|  47.4k|          }
  340|  56.7k|          c -= (ui - li);
  341|       |
  342|   271k|          for (k = 0; k < ui - li; k++) {
  ------------------
  |  Branch (342:23): [True: 214k, False: 56.7k]
  ------------------
  343|   214k|            o = (k + li >= ui2) ? o + 1 : o;
  ------------------
  |  Branch (343:17): [True: 13.2k, False: 201k]
  ------------------
  344|   214k|            if (o >= MAX_NOISE_COEFFS) {
  ------------------
  |  |   45|   214k|#define MAX_NOISE_COEFFS 5
  ------------------
  |  Branch (344:17): [True: 0, False: 214k]
  ------------------
  345|      0|              if (ec_flag)
  ------------------
  |  Branch (345:19): [True: 0, False: 0]
  ------------------
  346|      0|                o = MAX_NOISE_COEFFS - 1;
  ------------------
  |  |   45|      0|#define MAX_NOISE_COEFFS 5
  ------------------
  347|      0|              else
  348|      0|                return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
  349|      0|            }
  350|   214k|            ui2 = freq_band_table_noise[o + 1];
  351|   214k|            nrg_est_pvc[c][t] = (!int_mode) ? nrg : nrg_est_pvc[c][t];
  ------------------
  |  Branch (351:33): [True: 43.0k, False: 171k]
  ------------------
  352|   214k|            nrg_tone_pvc[c][t] = 0.0f;
  353|       |
  354|   214k|            tmp = frame_data->qmapped_pvc[c][t] /
  355|   214k|                  (1 + frame_data->qmapped_pvc[c][t] + guard);
  356|       |
  357|   214k|            if (flag) {
  ------------------
  |  Branch (357:17): [True: 127k, False: 86.9k]
  ------------------
  358|   127k|              nrg_gain_pvc[c][t] = (FLOAT32)sqrt(nrg_ref_pvc[c][t] * tmp /
  359|   127k|                                                 (nrg_est_pvc[c][t] + 1));
  360|       |
  361|   127k|              nrg_tone_pvc[c][t] = (FLOAT32)(
  362|   127k|                  (harmonics[c] && (t >= frame_data->sine_position ||
  ------------------
  |  Branch (362:20): [True: 12.9k, False: 115k]
  |  Branch (362:37): [True: 3.88k, False: 9.02k]
  ------------------
  363|  9.02k|                                    (*harm_flag_prev)[c + sub_band_start]))
  ------------------
  |  Branch (363:37): [True: 7.14k, False: 1.87k]
  ------------------
  364|   127k|                      ? sqrt(nrg_ref_pvc[c][t] * tmp /
  365|  11.0k|                             (frame_data->qmapped_pvc[c][t] + guard))
  366|   127k|                      : nrg_tone_pvc[c][t]);
  367|       |
  368|   127k|              nrg_tone_pvc[c][t] =
  369|   127k|                  (FLOAT32)(((*harm_flag_varlen)[c] &&
  ------------------
  |  Branch (369:30): [True: 35.2k, False: 92.6k]
  ------------------
  370|  35.2k|                             (t >= frame_data->sin_start_for_cur_top ||
  ------------------
  |  Branch (370:31): [True: 32.1k, False: 3.10k]
  ------------------
  371|  3.10k|                              (*harm_flag_varlen_prev)[c + sub_band_start]))
  ------------------
  |  Branch (371:31): [True: 2.98k, False: 123]
  ------------------
  372|   127k|                                ? sqrt(nrg_ref_pvc[c][t] * tmp /
  373|  35.1k|                                       (prev_env_noise_level[o] + guard))
  374|   127k|                                : nrg_tone_pvc[c][t]);
  375|       |
  376|   127k|            } else {
  377|  86.9k|              if (noise_absc_flag) {
  ------------------
  |  Branch (377:19): [True: 0, False: 86.9k]
  ------------------
  378|      0|                nrg_gain_pvc[c][t] =
  379|      0|                    (FLOAT32)sqrt(nrg_ref_pvc[c][t] / (nrg_est_pvc[c][t] + 1));
  380|  86.9k|              } else {
  381|  86.9k|                nrg_gain_pvc[c][t] = (FLOAT32)sqrt(
  382|  86.9k|                    nrg_ref_pvc[c][t] * tmp /
  383|  86.9k|                    ((nrg_est_pvc[c][t] + 1) * (frame_data->qmapped_pvc[c][t] + guard)));
  384|  86.9k|              }
  385|  86.9k|            }
  386|       |
  387|   214k|            noise_level_pvc[c][t] = (FLOAT32)sqrt(nrg_ref_pvc[c][t] * tmp);
  388|   214k|            c++;
  389|   214k|          }
  390|  56.7k|        }
  391|       |
  392|  33.7k|        for (c = 0; c < (*gate_mode)[limiter_band]; c++) {
  ------------------
  |  Branch (392:21): [True: 26.2k, False: 7.58k]
  ------------------
  393|  26.2k|          p_ref = p_est = 0.0f;
  394|  26.2k|          p_adj = 0;
  395|  26.2k|          for (k = (*lim_table)[limiter_band][c];
  396|   240k|               k < (*lim_table)[limiter_band][c + 1]; k++) {
  ------------------
  |  Branch (396:16): [True: 214k, False: 26.2k]
  ------------------
  397|   214k|            p_ref += nrg_ref_pvc[k][t];
  398|   214k|            p_est += nrg_est_pvc[k][t];
  399|   214k|          }
  400|  26.2k|          avg_gain = (FLOAT32)sqrt((p_ref + EPS) / (p_est + EPS));
  ------------------
  |  |  154|  26.2k|#define EPS 1e-12f
  ------------------
                        avg_gain = (FLOAT32)sqrt((p_ref + EPS) / (p_est + EPS));
  ------------------
  |  |  154|  26.2k|#define EPS 1e-12f
  ------------------
  401|  26.2k|          g_max = avg_gain * ixheaac_g_lim_gains[limiter_gains];
  402|  26.2k|          g_max > 1.0e5f ? g_max = 1.0e5f : 0;
  ------------------
  |  Branch (402:11): [True: 2.16k, False: 24.0k]
  ------------------
  403|  26.2k|          for (k = (*lim_table)[limiter_band][c];
  404|   240k|               k < (*lim_table)[limiter_band][c + 1]; k++) {
  ------------------
  |  Branch (404:16): [True: 214k, False: 26.2k]
  ------------------
  405|   214k|            if (g_max <= nrg_gain_pvc[k][t]) {
  ------------------
  |  Branch (405:17): [True: 49.2k, False: 165k]
  ------------------
  406|  49.2k|              noise_level_pvc[k][t] =
  407|  49.2k|                  (FLOAT32)(noise_level_pvc[k][t] * (g_max / (nrg_gain_pvc[k][t] + guard)));
  408|  49.2k|              nrg_gain_pvc[k][t] = g_max;
  409|  49.2k|            }
  410|       |
  411|   214k|            p_adj +=
  412|   214k|                nrg_gain_pvc[k][t] * nrg_gain_pvc[k][t] * nrg_est_pvc[k][t];
  413|       |
  414|   214k|            if (nrg_tone_pvc[k][t]) {
  ------------------
  |  Branch (414:17): [True: 35.1k, False: 179k]
  ------------------
  415|  35.1k|              p_adj += nrg_tone_pvc[k][t] * nrg_tone_pvc[k][t];
  416|   179k|            } else if (!noise_absc_flag) {
  ------------------
  |  Branch (416:24): [True: 179k, False: 0]
  ------------------
  417|   179k|              p_adj += noise_level_pvc[k][t] * noise_level_pvc[k][t];
  418|   179k|            }
  419|   214k|          }
  420|  26.2k|          boost_gain = (FLOAT32)sqrt((p_ref + EPS) / (p_adj + EPS));
  ------------------
  |  |  154|  26.2k|#define EPS 1e-12f
  ------------------
                        boost_gain = (FLOAT32)sqrt((p_ref + EPS) / (p_adj + EPS));
  ------------------
  |  |  154|  26.2k|#define EPS 1e-12f
  ------------------
  421|  26.2k|          boost_gain = boost_gain > 1.584893192f ? 1.584893192f : boost_gain;
  ------------------
  |  Branch (421:24): [True: 6.91k, False: 19.3k]
  ------------------
  422|       |
  423|  26.2k|          for (k = (*lim_table)[limiter_band][c];
  424|   240k|               k < (*lim_table)[limiter_band][c + 1]; k++) {
  ------------------
  |  Branch (424:16): [True: 214k, False: 26.2k]
  ------------------
  425|   214k|            nrg_gain_pvc[k][t] *= boost_gain;
  426|   214k|            noise_level_pvc[k][t] *= boost_gain;
  427|   214k|            nrg_tone_pvc[k][t] *= boost_gain;
  428|   214k|          }
  429|  26.2k|        }
  430|  7.58k|      }
  431|       |
  432|  1.11M|      for (; t < end_pos; t++) {
  ------------------
  |  Branch (432:14): [True: 1.00M, False: 105k]
  ------------------
  433|  1.00M|        band_loop_end = num_sf_bands[pvc_frame_info->freq_res[i]];
  434|       |
  435|  8.51M|        for (c = 0, o = 0, j = 0; j < band_loop_end; j++) {
  ------------------
  |  Branch (435:35): [True: 7.50M, False: 1.00M]
  ------------------
  436|  7.50M|          double tmp;
  437|       |
  438|  7.50M|          li = freq_band_table[pvc_frame_info->freq_res[i]][j];
  439|  7.50M|          ui = freq_band_table[pvc_frame_info->freq_res[i]][j + 1];
  440|  7.50M|          ui2 = frame_data->pstr_sbr_header->pstr_freq_band_data
  441|  7.50M|                    ->freq_band_tbl_noise[o + 1];
  442|       |
  443|  36.8M|          for (flag = 0, k = li; k < ui; k++) {
  ------------------
  |  Branch (443:34): [True: 29.3M, False: 7.50M]
  ------------------
  444|  29.3M|            flag = (harmonics[c] && (t >= frame_data->sine_position ||
  ------------------
  |  Branch (444:21): [True: 1.25M, False: 28.1M]
  |  Branch (444:38): [True: 215k, False: 1.03M]
  ------------------
  445|  1.03M|                                     (*harm_flag_prev)[c + sub_band_start]))
  ------------------
  |  Branch (445:38): [True: 410k, False: 627k]
  ------------------
  446|  29.3M|                       ? 1
  447|  29.3M|                       : flag;
  448|       |
  449|  29.3M|            nrg_ref_pvc[c][t] = env_tmp[k][t];
  450|  91.9M|            for (nrg = 0, l = 0; l < rate; l++) {
  ------------------
  |  Branch (450:34): [True: 62.5M, False: 29.3M]
  ------------------
  451|  62.5M|              nrg +=
  452|  62.5M|                  (input_real[rate * t + l][k] * input_real[rate * t + l][k]) +
  453|  62.5M|                  (input_imag[rate * t + l][k] * input_imag[rate * t + l][k]);
  454|  62.5M|            }
  455|  29.3M|            nrg_est_pvc[c][t] = nrg / rate;
  456|  29.3M|            c++;
  457|  29.3M|          }
  458|       |
  459|  7.50M|          if (!int_mode && ui != li) {
  ------------------
  |  Branch (459:15): [True: 1.05M, False: 6.44M]
  |  Branch (459:28): [True: 1.04M, False: 9.47k]
  ------------------
  460|  6.72M|            for (nrg = 0, k = c - (ui - li); k < c; k++) {
  ------------------
  |  Branch (460:46): [True: 5.68M, False: 1.04M]
  ------------------
  461|  5.68M|              nrg += nrg_est_pvc[k][t];
  462|  5.68M|            }
  463|  1.04M|            nrg /= (ui - li);
  464|  6.45M|          } else {
  465|  6.45M|            nrg = 0;
  466|  6.45M|          }
  467|  7.50M|          c -= (ui - li);
  468|       |
  469|  36.8M|          for (k = 0; k < ui - li; k++) {
  ------------------
  |  Branch (469:23): [True: 29.3M, False: 7.50M]
  ------------------
  470|  29.3M|            o = (k + li >= ui2) ? o + 1 : o;
  ------------------
  |  Branch (470:17): [True: 2.46M, False: 26.9M]
  ------------------
  471|  29.3M|            if (o >= MAX_NOISE_COEFFS) {
  ------------------
  |  |   45|  29.3M|#define MAX_NOISE_COEFFS 5
  ------------------
  |  Branch (471:17): [True: 0, False: 29.3M]
  ------------------
  472|      0|              if (ec_flag)
  ------------------
  |  Branch (472:19): [True: 0, False: 0]
  ------------------
  473|      0|                o = MAX_NOISE_COEFFS - 1;
  ------------------
  |  |   45|      0|#define MAX_NOISE_COEFFS 5
  ------------------
  474|      0|              else
  475|      0|                return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
  476|      0|            }
  477|  29.3M|            ui2 = freq_band_table_noise[o + 1];
  478|  29.3M|            nrg_est_pvc[c][t] = (!int_mode) ? nrg : nrg_est_pvc[c][t];
  ------------------
  |  Branch (478:33): [True: 5.68M, False: 23.7M]
  ------------------
  479|  29.3M|            nrg_tone_pvc[c][t] = 0.0f;
  480|       |
  481|  29.3M|            tmp = frame_data->qmapped_pvc[c][t] /
  482|  29.3M|                  (1 + frame_data->qmapped_pvc[c][t] + guard);
  483|       |
  484|  29.3M|            if (flag) {
  ------------------
  |  Branch (484:17): [True: 1.99M, False: 27.3M]
  ------------------
  485|  1.99M|              nrg_gain_pvc[c][t] = (FLOAT32)sqrt(nrg_ref_pvc[c][t] * tmp /
  486|  1.99M|                                                 (nrg_est_pvc[c][t] + 1));
  487|       |
  488|  1.99M|              nrg_tone_pvc[c][t] = (FLOAT32)(
  489|  1.99M|                  (harmonics[c] && (t >= frame_data->sine_position ||
  ------------------
  |  Branch (489:20): [True: 630k, False: 1.36M]
  |  Branch (489:37): [True: 215k, False: 415k]
  ------------------
  490|   415k|                                    (*harm_flag_prev)[c + sub_band_start]))
  ------------------
  |  Branch (490:37): [True: 410k, False: 5.25k]
  ------------------
  491|  1.99M|                      ? sqrt(nrg_ref_pvc[c][t] * tmp /
  492|   625k|                             (frame_data->qmapped_pvc[c][t] + guard))
  493|  1.99M|                      : nrg_tone_pvc[c][t]);
  494|  27.3M|            } else {
  495|  27.3M|              if (noise_absc_flag) {
  ------------------
  |  Branch (495:19): [True: 46.1k, False: 27.3M]
  ------------------
  496|  46.1k|                nrg_gain_pvc[c][t] =
  497|  46.1k|                    (FLOAT32)sqrt(nrg_ref_pvc[c][t] / (nrg_est_pvc[c][t] + 1));
  498|  27.3M|              } else {
  499|  27.3M|                nrg_gain_pvc[c][t] = (FLOAT32)sqrt(
  500|  27.3M|                    nrg_ref_pvc[c][t] * tmp /
  501|  27.3M|                    ((nrg_est_pvc[c][t] + 1) * (frame_data->qmapped_pvc[c][t] + guard)));
  502|  27.3M|              }
  503|  27.3M|            }
  504|       |
  505|  29.3M|            noise_level_pvc[c][t] = (FLOAT32)sqrt(nrg_ref_pvc[c][t] * tmp);
  506|  29.3M|            c++;
  507|  29.3M|          }
  508|  7.50M|        }
  509|       |
  510|  5.21M|        for (c = 0; c < (*gate_mode)[limiter_band]; c++) {
  ------------------
  |  Branch (510:21): [True: 4.20M, False: 1.00M]
  ------------------
  511|  4.20M|          p_ref = p_est = 0.0f;
  512|  4.20M|          p_adj = 0;
  513|  4.20M|          for (k = (*lim_table)[limiter_band][c];
  514|  33.4M|               k < (*lim_table)[limiter_band][c + 1]; k++) {
  ------------------
  |  Branch (514:16): [True: 29.2M, False: 4.20M]
  ------------------
  515|  29.2M|            p_ref += nrg_ref_pvc[k][t];
  516|  29.2M|            p_est += nrg_est_pvc[k][t];
  517|  29.2M|          }
  518|  4.20M|          avg_gain = (FLOAT32)sqrt((p_ref + EPS) / (p_est + EPS));
  ------------------
  |  |  154|  4.20M|#define EPS 1e-12f
  ------------------
                        avg_gain = (FLOAT32)sqrt((p_ref + EPS) / (p_est + EPS));
  ------------------
  |  |  154|  4.20M|#define EPS 1e-12f
  ------------------
  519|  4.20M|          g_max = avg_gain * ixheaac_g_lim_gains[limiter_gains];
  520|  4.20M|          g_max > 1.0e5f ? g_max = 1.0e5f : 0;
  ------------------
  |  Branch (520:11): [True: 1.73M, False: 2.47M]
  ------------------
  521|       |
  522|  4.20M|          for (k = (*lim_table)[limiter_band][c];
  523|  33.4M|               k < (*lim_table)[limiter_band][c + 1]; k++) {
  ------------------
  |  Branch (523:16): [True: 29.2M, False: 4.20M]
  ------------------
  524|  29.2M|            if (g_max <= nrg_gain_pvc[k][t]) {
  ------------------
  |  Branch (524:17): [True: 3.01M, False: 26.2M]
  ------------------
  525|  3.01M|              noise_level_pvc[k][t] =
  526|  3.01M|                  (FLOAT32)(noise_level_pvc[k][t] *
  527|  3.01M|                            (g_max / (nrg_gain_pvc[k][t] + guard)));
  528|  3.01M|              nrg_gain_pvc[k][t] = g_max;
  529|  3.01M|            }
  530|       |
  531|  29.2M|            p_adj +=
  532|  29.2M|                nrg_gain_pvc[k][t] * nrg_gain_pvc[k][t] * nrg_est_pvc[k][t];
  533|       |
  534|  29.2M|            if (nrg_tone_pvc[k][t]) {
  ------------------
  |  Branch (534:17): [True: 625k, False: 28.6M]
  ------------------
  535|   625k|              p_adj += nrg_tone_pvc[k][t] * nrg_tone_pvc[k][t];
  536|  28.6M|            } else if (!noise_absc_flag) {
  ------------------
  |  Branch (536:24): [True: 28.6M, False: 44.3k]
  ------------------
  537|  28.6M|              p_adj += noise_level_pvc[k][t] * noise_level_pvc[k][t];
  538|  28.6M|            }
  539|  29.2M|          }
  540|       |
  541|  4.20M|          boost_gain = (FLOAT32)sqrt((p_ref + EPS) / (p_adj + EPS));
  ------------------
  |  |  154|  4.20M|#define EPS 1e-12f
  ------------------
                        boost_gain = (FLOAT32)sqrt((p_ref + EPS) / (p_adj + EPS));
  ------------------
  |  |  154|  4.20M|#define EPS 1e-12f
  ------------------
  542|  4.20M|          boost_gain = boost_gain > 1.584893192f ? 1.584893192f : boost_gain;
  ------------------
  |  Branch (542:24): [True: 535k, False: 3.67M]
  ------------------
  543|       |
  544|  4.20M|          for (k = (*lim_table)[limiter_band][c];
  545|  33.4M|               k < (*lim_table)[limiter_band][c + 1]; k++) {
  ------------------
  |  Branch (545:16): [True: 29.2M, False: 4.20M]
  ------------------
  546|  29.2M|            nrg_gain_pvc[k][t] *= boost_gain;
  547|  29.2M|            noise_level_pvc[k][t] *= boost_gain;
  548|  29.2M|            nrg_tone_pvc[k][t] *= boost_gain;
  549|  29.2M|          }
  550|  4.20M|        }
  551|  1.00M|      }
  552|       |
  553|   105k|      if (esbr_start_up_pvc) {
  ------------------
  |  Branch (553:11): [True: 9.20k, False: 95.8k]
  ------------------
  554|  46.0k|        for (n = 0; n < 4; n++) {
  ------------------
  |  Branch (554:21): [True: 36.8k, False: 9.20k]
  ------------------
  555|  1.14M|          for (c = 0; c < num_subbands; c++) {
  ------------------
  |  Branch (555:23): [True: 1.10M, False: 36.8k]
  ------------------
  556|  1.10M|            (*e_gain)[n][c] = nrg_gain_pvc[c][start_pos];
  557|  1.10M|            (*noise_buf)[n][c] = noise_level_pvc[c][start_pos];
  558|  1.10M|          }
  559|  36.8k|        }
  560|  9.20k|        esbr_start_up_pvc = 0;
  561|  9.20k|        esbr_start_up = 0;
  562|  9.20k|      }
  563|   105k|      for (l = rate * pvc_frame_info->border_vec[i];
  564|  2.33M|           l < rate * pvc_frame_info->border_vec[1 + i]; l++) {
  ------------------
  |  Branch (564:12): [True: 2.23M, False: 105k]
  ------------------
  565|  2.23M|        ptr_real_buf = *(input_real + l) + sub_band_start;
  566|  2.23M|        ptr_imag_buf = *(input_imag + l) + sub_band_start;
  567|       |
  568|  2.23M|        slot_idx = (WORD32)l / rate;
  569|  2.23M|        if (sub_band_start & 1) {
  ------------------
  |  Branch (569:13): [True: 685k, False: 1.54M]
  ------------------
  570|   685k|          freq_inv = -1;
  571|  1.54M|        } else {
  572|  1.54M|          freq_inv = 1;
  573|  1.54M|        }
  574|       |
  575|  65.1M|        for (k = 0; k < num_subbands; k++) {
  ------------------
  |  Branch (575:21): [True: 62.9M, False: 2.23M]
  ------------------
  576|  62.9M|          (*e_gain)[4][k] = nrg_gain_pvc[k][slot_idx];
  577|  62.9M|          (*noise_buf)[4][k] = noise_level_pvc[k][slot_idx];
  578|  62.9M|          c = 0, sb_gain = 0, sb_noise = 0;
  579|   173M|          for (n = 4 - smooth_length; n <= 4; n++) {
  ------------------
  |  Branch (579:39): [True: 110M, False: 62.9M]
  ------------------
  580|   110M|            sb_gain += (*e_gain)[n][k] * smooth_filt[c];
  581|   110M|            sb_noise += (*noise_buf)[n][k] * smooth_filt[c++];
  582|   110M|          }
  583|  62.9M|          phase_index = (phase_index + 1) & 511;
  584|  62.9M|          sb_noise = (nrg_tone_pvc[k][slot_idx] != 0 || noise_absc_flag)
  ------------------
  |  Branch (584:23): [True: 1.39M, False: 61.5M]
  |  Branch (584:57): [True: 99.0k, False: 61.4M]
  ------------------
  585|  62.9M|                         ? 0
  586|  62.9M|                         : sb_noise;
  587|       |
  588|  62.9M|          *ptr_real_buf =
  589|  62.9M|              *ptr_real_buf * sb_gain +
  590|  62.9M|              sb_noise * ixheaac_random_phase[phase_index][0] +
  591|  62.9M|              nrg_tone_pvc[k][slot_idx] * ixheaac_hphase_tbl[0][harm_index];
  592|  62.9M|          *ptr_imag_buf = *ptr_imag_buf * sb_gain +
  593|  62.9M|                          sb_noise * ixheaac_random_phase[phase_index][1] +
  594|  62.9M|                          nrg_tone_pvc[k][slot_idx] * freq_inv *
  595|  62.9M|                              ixheaac_hphase_tbl[1][harm_index];
  596|       |
  597|  62.9M|          ptr_real_buf++;
  598|  62.9M|          ptr_imag_buf++;
  599|  62.9M|          freq_inv = -freq_inv;
  600|  62.9M|        }
  601|       |
  602|  2.23M|        harm_index = (harm_index + 1) & 3;
  603|       |
  604|  2.23M|        memcpy(temp, (*e_gain)[0], 64 * sizeof(FLOAT32));
  605|  11.1M|        for (n = 0; n < 4; n++) {
  ------------------
  |  Branch (605:21): [True: 8.93M, False: 2.23M]
  ------------------
  606|  8.93M|          memcpy((*e_gain)[n], (*e_gain)[n + 1], 64 * sizeof(FLOAT32));
  607|  8.93M|        }
  608|  2.23M|        memcpy((*e_gain)[4], temp, 64 * sizeof(FLOAT32));
  609|       |
  610|  2.23M|        memcpy(temp, (*noise_buf)[0], 64 * sizeof(FLOAT32));
  611|  11.1M|        for (n = 0; n < 4; n++) {
  ------------------
  |  Branch (611:21): [True: 8.93M, False: 2.23M]
  ------------------
  612|  8.93M|          memcpy((*noise_buf)[n], (*noise_buf)[n + 1], 64 * sizeof(FLOAT32));
  613|  8.93M|        }
  614|  2.23M|        memcpy((*noise_buf)[4], temp, 64 * sizeof(FLOAT32));
  615|  2.23M|      }
  616|   105k|    }
  617|   159k|  } else {
  618|  2.36M|    for (i = 0; i < num_sf_bands[HIGH]; i++) {
  ------------------
  |  |   28|  2.36M|#define HIGH 1
  ------------------
  |  Branch (618:17): [True: 2.20M, False: 159k]
  ------------------
  619|  2.20M|      li =
  620|  2.20M|          frame_data->pstr_sbr_header->pstr_freq_band_data->freq_band_tbl_hi[i];
  621|  2.20M|      ui = frame_data->pstr_sbr_header->pstr_freq_band_data
  622|  2.20M|               ->freq_band_tbl_hi[i + 1];
  623|  2.20M|      tmp = ((ui + li) - (sub_band_start << 1)) >> 1;
  624|  2.20M|      if ((tmp >= 64) || (tmp < 0)) return -1;
  ------------------
  |  Branch (624:11): [True: 0, False: 2.20M]
  |  Branch (624:26): [True: 0, False: 2.20M]
  ------------------
  625|       |
  626|  2.20M|      harmonics[tmp] = add_harmonics[i];
  627|  2.20M|    }
  628|       |
  629|   458k|    for (i = 0; i < bs_num_env; i++) {
  ------------------
  |  Branch (629:17): [True: 299k, False: 159k]
  ------------------
  630|   299k|      if (kk > MAX_NOISE_ENVELOPES) {
  ------------------
  |  |   44|   299k|#define MAX_NOISE_ENVELOPES 2
  ------------------
  |  Branch (630:11): [True: 8, False: 299k]
  ------------------
  631|      8|        if (ec_flag)
  ------------------
  |  Branch (631:13): [True: 0, False: 8]
  ------------------
  632|      0|          kk = MAX_NOISE_ENVELOPES;
  ------------------
  |  |   44|      0|#define MAX_NOISE_ENVELOPES 2
  ------------------
  633|      8|        else
  634|      8|          return IA_FATAL_ERROR;
  ------------------
  |  |   25|      8|#define IA_FATAL_ERROR 0x80000000
  ------------------
  635|      8|      }
  636|       |
  637|   299k|      if (p_frame_info->border_vec[i] == p_frame_info->noise_border_vec[kk])
  ------------------
  |  Branch (637:11): [True: 228k, False: 71.3k]
  ------------------
  638|   228k|        kk++, next++;
  639|       |
  640|   299k|      noise_absc_flag =
  641|   299k|          (i == trans_env || i == frame_data->env_short_flag_prev) ? 1 : 0;
  ------------------
  |  Branch (641:12): [True: 23.4k, False: 276k]
  |  Branch (641:30): [True: 11.0k, False: 265k]
  ------------------
  642|       |
  643|   299k|      smooth_length = (noise_absc_flag ? 0 : smoothing_length);
  ------------------
  |  Branch (643:24): [True: 34.5k, False: 265k]
  ------------------
  644|   299k|      smooth_filt = *ixheaac_fir_table[smooth_length];
  645|       |
  646|   299k|      if (sbr_mode == ORIG_SBR) {
  ------------------
  |  Branch (646:11): [True: 299k, False: 196]
  ------------------
  647|  3.03M|        for (c = 0, o = 0, j = 0; j < num_sf_bands[p_frame_info->freq_res[i]];
  ------------------
  |  Branch (647:35): [True: 2.74M, False: 299k]
  ------------------
  648|  2.74M|             j++) {
  649|  2.74M|          double tmp;
  650|  2.74M|          li = freq_band_table[p_frame_info->freq_res[i]][j];
  651|  2.74M|          ui = freq_band_table[p_frame_info->freq_res[i]][j + 1];
  652|  2.74M|          ui2 = frame_data->pstr_sbr_header->pstr_freq_band_data
  653|  2.74M|                    ->freq_band_tbl_noise[o + 1];
  654|       |
  655|  2.74M|          if (p_frame_info->border_vec[i] >= p_frame_info->border_vec[i + 1]) {
  ------------------
  |  Branch (655:15): [True: 40.0k, False: 2.70M]
  ------------------
  656|   141k|            for (flag = 0, k = li; k < ui; k++) {
  ------------------
  |  Branch (656:36): [True: 101k, False: 40.0k]
  ------------------
  657|   101k|              flag = (harmonics[c] &&
  ------------------
  |  Branch (657:23): [True: 1.24k, False: 100k]
  ------------------
  658|  1.24k|                (i >= trans_env || (*harm_flag_prev)[c + sub_band_start]))
  ------------------
  |  Branch (658:18): [True: 1.04k, False: 199]
  |  Branch (658:36): [True: 67, False: 132]
  ------------------
  659|   101k|                ? 1
  660|   101k|                : flag;
  661|   101k|              nrg_est[c++] = 0;
  662|   101k|            }
  663|  2.70M|          } else {
  664|  8.89M|            for (flag = 0, k = li; k < ui; k++) {
  ------------------
  |  Branch (664:36): [True: 6.19M, False: 2.70M]
  ------------------
  665|  6.19M|              for (nrg = 0, l = rate * p_frame_info->border_vec[i];
  666|   130M|                l < rate * p_frame_info->border_vec[i + 1]; l++) {
  ------------------
  |  Branch (666:17): [True: 124M, False: 6.19M]
  ------------------
  667|   124M|                nrg += (input_real[l][k] * input_real[l][k]) +
  668|   124M|                  (input_imag[l][k] * input_imag[l][k]);
  669|   124M|              }
  670|  6.19M|              flag = (harmonics[c] &&
  ------------------
  |  Branch (670:23): [True: 451k, False: 5.74M]
  ------------------
  671|   451k|                (i >= trans_env || (*harm_flag_prev)[c + sub_band_start]))
  ------------------
  |  Branch (671:18): [True: 346k, False: 105k]
  |  Branch (671:36): [True: 65.5k, False: 40.0k]
  ------------------
  672|  6.19M|                ? 1
  673|  6.19M|                : flag;
  674|  6.19M|              nrg_est[c++] = nrg / (rate * p_frame_info->border_vec[i + 1] -
  675|  6.19M|                rate * p_frame_info->border_vec[i]);
  676|  6.19M|            }
  677|  2.70M|          }
  678|  2.74M|          if (!int_mode && ui != li) {
  ------------------
  |  Branch (678:15): [True: 121k, False: 2.61M]
  |  Branch (678:28): [True: 121k, False: 396]
  ------------------
  679|   532k|            for (nrg = 0, k = c - (ui - li); k < c; k++) {
  ------------------
  |  Branch (679:46): [True: 411k, False: 121k]
  ------------------
  680|   411k|              nrg += nrg_est[k];
  681|   411k|            }
  682|   121k|            nrg /= (ui - li);
  683|  2.61M|          } else {
  684|  2.61M|            nrg = 0;
  685|  2.61M|          }
  686|  2.74M|          c -= (ui - li);
  687|       |
  688|  9.03M|          for (k = 0; k < ui - li; k++) {
  ------------------
  |  Branch (688:23): [True: 6.29M, False: 2.74M]
  ------------------
  689|  6.29M|            o = (k + li >= ui2) ? o + 1 : o;
  ------------------
  |  Branch (689:17): [True: 327k, False: 5.97M]
  ------------------
  690|  6.29M|            if (o >= MAX_NOISE_COEFFS) {
  ------------------
  |  |   45|  6.29M|#define MAX_NOISE_COEFFS 5
  ------------------
  |  Branch (690:17): [True: 0, False: 6.29M]
  ------------------
  691|      0|              if (ec_flag)
  ------------------
  |  Branch (691:19): [True: 0, False: 0]
  ------------------
  692|      0|                o = MAX_NOISE_COEFFS - 1;
  ------------------
  |  |   45|      0|#define MAX_NOISE_COEFFS 5
  ------------------
  693|      0|              else
  694|      0|                return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
  695|      0|            }
  696|  6.29M|            ui2 = frame_data->pstr_sbr_header->pstr_freq_band_data
  697|  6.29M|                      ->freq_band_tbl_noise[o + 1];
  698|  6.29M|            nrg_ref[c] = sfb_nrg[m];
  699|  6.29M|            nrg_est[c] = (!int_mode) ? nrg : nrg_est[c];
  ------------------
  |  Branch (699:26): [True: 411k, False: 5.88M]
  ------------------
  700|  6.29M|            nrg_tone[c] = 0;
  701|  6.29M|            tmp = noise_floor[next * num_nf_bands + o] /
  702|  6.29M|                  (1 + noise_floor[next * num_nf_bands + o] + guard);
  703|  6.29M|            if (flag) {
  ------------------
  |  Branch (703:17): [True: 774k, False: 5.52M]
  ------------------
  704|   774k|              nrg_gain[c] = (FLOAT32)sqrt(nrg_ref[c] * tmp / (nrg_est[c] + 1));
  705|   774k|              nrg_tone[c] = (FLOAT32)(
  706|   774k|                  (harmonics[c] &&
  ------------------
  |  Branch (706:20): [True: 414k, False: 360k]
  ------------------
  707|   414k|                   (i >= trans_env || (*harm_flag_prev)[c + sub_band_start]))
  ------------------
  |  Branch (707:21): [True: 347k, False: 66.8k]
  |  Branch (707:39): [True: 65.6k, False: 1.16k]
  ------------------
  708|   774k|                      ? sqrt(nrg_ref[c] * tmp /
  709|   413k|                             ABS(noise_floor[next * num_nf_bands + o] + guard))
  ------------------
  |  |   46|   413k|#define ABS(A) fabs(A)
  ------------------
  710|   774k|                      : nrg_tone[c]);
  711|  5.52M|            } else {
  712|  5.52M|              if (noise_absc_flag)
  ------------------
  |  Branch (712:19): [True: 455k, False: 5.06M]
  ------------------
  713|   455k|                nrg_gain[c] = (FLOAT32)sqrt(nrg_ref[c] / (nrg_est[c] + 1));
  714|  5.06M|              else
  715|  5.06M|                nrg_gain[c] = (FLOAT32)sqrt(
  716|  5.06M|                    nrg_ref[c] * tmp /
  717|  5.06M|                    ((nrg_est[c] + 1) *
  718|  5.06M|                     ABS(noise_floor[next * num_nf_bands + o] + guard)));
  ------------------
  |  |   46|  5.06M|#define ABS(A) fabs(A)
  ------------------
  719|  5.52M|            }
  720|  6.29M|            noise_level[c] = (FLOAT32)sqrt(nrg_ref[c] * tmp);
  721|  6.29M|            c++;
  722|  6.29M|          }
  723|  2.74M|          m++;
  724|  2.74M|        }
  725|       |
  726|  1.16M|        for (c = 0; c < (*gate_mode)[limiter_band]; c++) {
  ------------------
  |  Branch (726:21): [True: 869k, False: 299k]
  ------------------
  727|   869k|          p_ref = p_est = 0;
  728|   869k|          for (k = (*lim_table)[limiter_band][c];
  729|  7.16M|               k < (*lim_table)[limiter_band][c + 1]; k++) {
  ------------------
  |  Branch (729:16): [True: 6.29M, False: 869k]
  ------------------
  730|  6.29M|            p_ref += nrg_ref[k];
  731|  6.29M|            p_est += nrg_est[k];
  732|  6.29M|          }
  733|   869k|          avg_gain = (FLOAT32)sqrt((p_ref + EPS) / (p_est + EPS));
  ------------------
  |  |  154|   869k|#define EPS 1e-12f
  ------------------
                        avg_gain = (FLOAT32)sqrt((p_ref + EPS) / (p_est + EPS));
  ------------------
  |  |  154|   869k|#define EPS 1e-12f
  ------------------
  734|   869k|          g_max = avg_gain * ixheaac_g_lim_gains[limiter_gains];
  735|   869k|          g_max > 1.0e5f ? g_max = 1.0e5f : 0;
  ------------------
  |  Branch (735:11): [True: 287k, False: 582k]
  ------------------
  736|   869k|          for (k = (*lim_table)[limiter_band][c];
  737|  7.16M|               k < (*lim_table)[limiter_band][c + 1]; k++) {
  ------------------
  |  Branch (737:16): [True: 6.29M, False: 869k]
  ------------------
  738|  6.29M|            if (g_max <= nrg_gain[k]) {
  ------------------
  |  Branch (738:17): [True: 863k, False: 5.43M]
  ------------------
  739|   863k|              noise_level[k] = (FLOAT32)(noise_level[k] * (g_max / (nrg_gain[k] + guard)));
  740|   863k|              nrg_gain[k] = g_max;
  741|   863k|            }
  742|  6.29M|          }
  743|   869k|          p_adj = 0;
  744|   869k|          for (k = (*lim_table)[limiter_band][c];
  745|  7.16M|               k < (*lim_table)[limiter_band][c + 1]; k++) {
  ------------------
  |  Branch (745:16): [True: 6.29M, False: 869k]
  ------------------
  746|  6.29M|            p_adj += nrg_gain[k] * nrg_gain[k] * nrg_est[k];
  747|  6.29M|            if (nrg_tone[k])
  ------------------
  |  Branch (747:17): [True: 382k, False: 5.91M]
  ------------------
  748|   382k|              p_adj += nrg_tone[k] * nrg_tone[k];
  749|  5.91M|            else if (!noise_absc_flag)
  ------------------
  |  Branch (749:22): [True: 5.37M, False: 538k]
  ------------------
  750|  5.37M|              p_adj += noise_level[k] * noise_level[k];
  751|  6.29M|          }
  752|   869k|          boost_gain = (FLOAT32)sqrt((p_ref + EPS) / (p_adj + EPS));
  ------------------
  |  |  154|   869k|#define EPS 1e-12f
  ------------------
                        boost_gain = (FLOAT32)sqrt((p_ref + EPS) / (p_adj + EPS));
  ------------------
  |  |  154|   869k|#define EPS 1e-12f
  ------------------
  753|   869k|          boost_gain = boost_gain > 1.584893192f ? 1.584893192f : boost_gain;
  ------------------
  |  Branch (753:24): [True: 167k, False: 702k]
  ------------------
  754|   869k|          for (k = (*lim_table)[limiter_band][c];
  755|  7.16M|               k < (*lim_table)[limiter_band][c + 1]; k++) {
  ------------------
  |  Branch (755:16): [True: 6.29M, False: 869k]
  ------------------
  756|  6.29M|            nrg_gain[k] *= boost_gain;
  757|  6.29M|            noise_level[k] *= boost_gain;
  758|  6.29M|            nrg_tone[k] *= boost_gain;
  759|  6.29M|          }
  760|   869k|        }
  761|       |
  762|   299k|        if (esbr_start_up && (ldmps_present != 1)) {
  ------------------
  |  Branch (762:13): [True: 33.3k, False: 266k]
  |  Branch (762:30): [True: 28.8k, False: 4.50k]
  ------------------
  763|   144k|          for (n = 0; n < 4; n++) {
  ------------------
  |  Branch (763:23): [True: 115k, False: 28.8k]
  ------------------
  764|   115k|            memcpy((*e_gain)[n], nrg_gain, num_subbands * sizeof(FLOAT32));
  765|   115k|            memcpy((*noise_buf)[n], noise_level,
  766|   115k|                   num_subbands * sizeof(FLOAT32));
  767|   115k|          }
  768|  28.8k|          esbr_start_up = 0;
  769|  28.8k|          esbr_start_up_pvc = 0;
  770|  28.8k|        }
  771|       |
  772|   299k|        for (l = rate * p_frame_info->border_vec[i];
  773|  5.80M|             l < rate * p_frame_info->border_vec[i + 1]; l++) {
  ------------------
  |  Branch (773:14): [True: 5.50M, False: 299k]
  ------------------
  774|  5.50M|          ptr_real_buf = *(input_real + l) + sub_band_start;
  775|  5.50M|          ptr_imag_buf = *(input_imag + l) + sub_band_start;
  776|       |
  777|  5.50M|          freq_inv = 1;
  778|  5.50M|          if ((ldmps_present == 1) && (sub_band_start & 1)) freq_inv = -1;
  ------------------
  |  Branch (778:15): [True: 64.0k, False: 5.43M]
  |  Branch (778:39): [True: 38.3k, False: 25.7k]
  ------------------
  779|       |
  780|   130M|          for (k = 0; k < num_subbands; k++) {
  ------------------
  |  Branch (780:23): [True: 124M, False: 5.50M]
  ------------------
  781|   124M|            (*e_gain)[4][k] = nrg_gain[k];
  782|   124M|            (*noise_buf)[4][k] = noise_level[k];
  783|   124M|            c = 0, sb_gain = 0, sb_noise = 0;
  784|   282M|            for (n = 4 - smooth_length; n <= 4; n++) {
  ------------------
  |  Branch (784:41): [True: 157M, False: 124M]
  ------------------
  785|   157M|              sb_gain += (*e_gain)[n][k] * smooth_filt[c];
  786|   157M|              sb_noise += (*noise_buf)[n][k] * smooth_filt[c++];
  787|   157M|            }
  788|       |
  789|   124M|            phase_index = (phase_index + 1) & 511;
  790|   124M|            sb_noise = (nrg_tone[k] != 0 || noise_absc_flag) ? 0 : sb_noise;
  ------------------
  |  Branch (790:25): [True: 27.3M, False: 97.1M]
  |  Branch (790:45): [True: 8.68M, False: 88.4M]
  ------------------
  791|       |
  792|   124M|            if (ldmps_present == 1) {
  ------------------
  |  Branch (792:17): [True: 1.73M, False: 122M]
  ------------------
  793|  1.73M|              *ptr_real_buf = *ptr_real_buf * sb_gain +
  794|  1.73M|                              sb_noise * ixheaac_random_phase[phase_index][0] +
  795|  1.73M|                              nrg_tone[k] * ixheaac_hphase_tbl[0][harm_index];
  796|  1.73M|              *ptr_imag_buf =
  797|  1.73M|                  *ptr_imag_buf * sb_gain +
  798|  1.73M|                  sb_noise * ixheaac_random_phase[phase_index][1] +
  799|  1.73M|                  nrg_tone[k] * freq_inv * ixheaac_hphase_tbl[1][harm_index];
  800|       |
  801|  1.73M|              freq_inv = -freq_inv;
  802|   122M|            } else {
  803|   122M|                *ptr_real_buf = *ptr_real_buf * sb_gain +
  804|   122M|                            sb_noise * ixheaac_random_phase[phase_index][0];
  805|   122M|                *ptr_imag_buf = *ptr_imag_buf * sb_gain +
  806|   122M|                            sb_noise * ixheaac_random_phase[phase_index][1];
  807|   122M|            }
  808|       |
  809|   124M|            ptr_real_buf++;
  810|   124M|            ptr_imag_buf++;
  811|   124M|          }
  812|  5.50M|          if (ldmps_present == 1) harm_index = (harm_index + 1) & 3;
  ------------------
  |  Branch (812:15): [True: 64.0k, False: 5.43M]
  ------------------
  813|       |
  814|  5.50M|          memcpy(temp, (*e_gain)[0], 64 * sizeof(FLOAT32));
  815|  27.5M|          for (n = 0; n < 4; n++)
  ------------------
  |  Branch (815:23): [True: 22.0M, False: 5.50M]
  ------------------
  816|  22.0M|            memcpy((*e_gain)[n], (*e_gain)[n + 1], 64 * sizeof(FLOAT32));
  817|  5.50M|          memcpy((*e_gain)[4], temp, 64 * sizeof(FLOAT32));
  818|  5.50M|          memcpy(temp, (*noise_buf)[0], 64 * sizeof(FLOAT32));
  819|  27.5M|          for (n = 0; n < 4; n++)
  ------------------
  |  Branch (819:23): [True: 22.0M, False: 5.50M]
  ------------------
  820|  22.0M|            memcpy((*noise_buf)[n], (*noise_buf)[n + 1], 64 * sizeof(FLOAT32));
  821|  5.50M|          memcpy((*noise_buf)[4], temp, 64 * sizeof(FLOAT32));
  822|  5.50M|        }
  823|       |
  824|   299k|        if (ldmps_present != 1) {
  ------------------
  |  Branch (824:13): [True: 295k, False: 4.50k]
  ------------------
  825|   295k|          err_code = ixheaacd_apply_inter_tes(
  826|   295k|              *(input_real1 + rate * p_frame_info->border_vec[i]),
  827|   295k|              *(input_imag1 + rate * p_frame_info->border_vec[i]),
  828|   295k|              *(input_real + rate * p_frame_info->border_vec[i]),
  829|   295k|              *(input_imag + rate * p_frame_info->border_vec[i]),
  830|   295k|              rate * p_frame_info->border_vec[i + 1] - rate * p_frame_info->border_vec[i],
  831|   295k|              sub_band_start, num_subbands, frame_data->inter_temp_shape_mode[i]);
  832|   295k|          if (err_code != 0) {
  ------------------
  |  Branch (832:15): [True: 0, False: 295k]
  ------------------
  833|      0|            return err_code;
  834|      0|          }
  835|       |
  836|   295k|        for (l = rate * p_frame_info->border_vec[i];
  837|  5.73M|             l < rate * p_frame_info->border_vec[i + 1]; l++) {
  ------------------
  |  Branch (837:14): [True: 5.43M, False: 295k]
  ------------------
  838|  5.43M|          ptr_real_buf = *(input_real + l) + sub_band_start;
  839|  5.43M|          ptr_imag_buf = *(input_imag + l) + sub_band_start;
  840|  5.43M|          if (sub_band_start & 1) {
  ------------------
  |  Branch (840:15): [True: 2.40M, False: 3.02M]
  ------------------
  841|  2.40M|            freq_inv = -1;
  842|  3.02M|          } else {
  843|  3.02M|            freq_inv = 1;
  844|  3.02M|          }
  845|   128M|          for (k = 0; k < num_subbands; k++) {
  ------------------
  |  Branch (845:23): [True: 122M, False: 5.43M]
  ------------------
  846|   122M|            *ptr_real_buf += nrg_tone[k] * ixheaac_hphase_tbl[0][harm_index];
  847|   122M|            *ptr_imag_buf +=
  848|   122M|                nrg_tone[k] * freq_inv * ixheaac_hphase_tbl[1][harm_index];
  849|       |
  850|   122M|            ptr_real_buf++;
  851|   122M|            ptr_imag_buf++;
  852|   122M|            freq_inv = -freq_inv;
  853|   122M|          }
  854|  5.43M|          harm_index = (harm_index + 1) & 3;
  855|  5.43M|        }
  856|   295k|      }
  857|   299k|    }
  858|   299k|  }
  859|   159k|}
  860|       |
  861|  14.4M|  for (i = 0; i < 64; i++) {
  ------------------
  |  Branch (861:15): [True: 14.2M, False: 222k]
  ------------------
  862|  14.2M|    (*harm_flag_varlen_prev)[i] = (*harm_flag_prev)[i];
  863|  14.2M|    (*harm_flag_varlen)[i] = harmonics[i];
  864|  14.2M|  }
  865|       |
  866|   222k|  memcpy(&((*harm_flag_prev)[0]) + sub_band_start, harmonics,
  867|   222k|         (64 - sub_band_start) * sizeof(WORD8));
  868|       |
  869|   222k|  if (trans_env == bs_num_env) {
  ------------------
  |  Branch (869:7): [True: 7.63k, False: 214k]
  ------------------
  870|  7.63k|    frame_data->env_short_flag_prev = 0;
  871|   214k|  } else {
  872|   214k|    frame_data->env_short_flag_prev = -1;
  873|   214k|  }
  874|       |
  875|   222k|  if (ldmps_present != 1) {
  ------------------
  |  Branch (875:7): [True: 218k, False: 4.06k]
  ------------------
  876|   218k|  memcpy((VOID *)&frame_data->str_frame_info_prev,
  877|   218k|         (VOID *)&frame_data->str_frame_info_details,
  878|   218k|         sizeof(ia_frame_info_struct));
  879|       |
  880|   218k|  if (frame_data->str_frame_info_details.num_env == 1) {
  ------------------
  |  Branch (880:7): [True: 107k, False: 110k]
  ------------------
  881|   107k|    frame_data->var_len_id_prev = 0;
  882|   110k|  } else if (frame_data->str_frame_info_details.num_env == 2) {
  ------------------
  |  Branch (882:14): [True: 66.3k, False: 44.4k]
  ------------------
  883|  66.3k|    frame_data->var_len_id_prev = 1;
  884|  66.3k|  }
  885|       |
  886|   218k|  if ((frame_data->str_frame_info_details.num_noise_env < 1) ||
  ------------------
  |  Branch (886:7): [True: 0, False: 218k]
  ------------------
  887|   218k|        (frame_data->str_frame_info_details.num_noise_env > 2)) {
  ------------------
  |  Branch (887:9): [True: 0, False: 218k]
  ------------------
  888|      0|      if (ec_flag)
  ------------------
  |  Branch (888:11): [True: 0, False: 0]
  ------------------
  889|      0|        frame_data->str_frame_info_details.num_noise_env = 1;
  890|      0|      else
  891|      0|        return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
  892|      0|    }
  893|       |
  894|   796k|  for (i = 0; i < num_nf_bands; i++) {
  ------------------
  |  Branch (894:15): [True: 578k, False: 218k]
  ------------------
  895|   578k|    prev_env_noise_level[i] =
  896|   578k|        frame_data->flt_noise_floor
  897|   578k|            [(frame_data->str_frame_info_details.num_noise_env - 1) *
  898|   578k|                 num_nf_bands +
  899|   578k|             i];
  900|   578k|  }
  901|   218k|}
  902|       |
  903|   222k|  frame_data->harm_index = harm_index;
  904|   222k|  frame_data->phase_index = phase_index;
  905|   222k|  frame_data->pstr_sbr_header->esbr_start_up = esbr_start_up;
  906|   222k|  frame_data->pstr_sbr_header->esbr_start_up_pvc = esbr_start_up_pvc;
  907|   222k|  return 0;
  908|   222k|}
ixheaacd_createlimiterbands:
  915|  78.3k|                                         WORD32 ec_flag) {
  916|  78.3k|  WORD32 i, j, k, is_patch_border[2];
  917|  78.3k|  WORD32 patch_borders[MAX_NUM_PATCHES + 1];
  918|  78.3k|  WORD32 temp_limiter_band_calc[32 + MAX_NUM_PATCHES + 1];
  919|       |
  920|  78.3k|  double num_octave;
  921|  78.3k|  WORD32 num_patches;
  922|       |
  923|  78.3k|  WORD32 sub_band_start = freq_band_tbl[0];
  924|  78.3k|  WORD32 sub_band_end = freq_band_tbl[ixheaacd_num_bands];
  925|       |
  926|  78.3k|  const double log2 = log(2.0);
  927|  78.3k|  const double limbnd_per_oct[4] = {0, 1.2, 2.0, 3.0};
  928|       |
  929|  78.3k|  if (!b_patching_mode && (x_over_qmf != NULL)) {
  ------------------
  |  Branch (929:7): [True: 45.6k, False: 32.7k]
  |  Branch (929:27): [True: 28.2k, False: 17.3k]
  ------------------
  930|  28.2k|    num_patches = 0;
  931|  28.2k|    if (upsamp_4_flag) {
  ------------------
  |  Branch (931:9): [True: 5.19k, False: 23.0k]
  ------------------
  932|  31.1k|      for (i = 1; i < MAX_NUM_PATCHES; i++)
  ------------------
  |  |   23|  31.1k|#define MAX_NUM_PATCHES 6
  ------------------
  |  Branch (932:19): [True: 25.9k, False: 5.19k]
  ------------------
  933|  25.9k|        if (x_over_qmf[i] != 0) num_patches++;
  ------------------
  |  Branch (933:13): [True: 8.99k, False: 16.9k]
  ------------------
  934|  23.0k|    } else {
  935|  92.1k|      for (i = 1; i < 4; i++)
  ------------------
  |  Branch (935:19): [True: 69.0k, False: 23.0k]
  ------------------
  936|  69.0k|        if (x_over_qmf[i] != 0) num_patches++;
  ------------------
  |  Branch (936:13): [True: 57.9k, False: 11.1k]
  ------------------
  937|  23.0k|    }
  938|  95.1k|    for (i = 0; i < num_patches; i++) {
  ------------------
  |  Branch (938:17): [True: 66.8k, False: 28.2k]
  ------------------
  939|  66.8k|      patch_borders[i] = x_over_qmf[i] - sub_band_start;
  940|  66.8k|    }
  941|  50.0k|  } else {
  942|  50.0k|    num_patches = patch_param->num_patches;
  943|   195k|    for (i = 0; i < num_patches; i++) {
  ------------------
  |  Branch (943:17): [True: 145k, False: 50.0k]
  ------------------
  944|   145k|      patch_borders[i] = patch_param->start_subband[i] - sub_band_start;
  945|   145k|    }
  946|  50.0k|  }
  947|  78.3k|  patch_borders[i] = sub_band_end - sub_band_start;
  948|       |
  949|  78.3k|  lim_table[0][0] = freq_band_tbl[0] - sub_band_start;
  950|  78.3k|  lim_table[0][1] = freq_band_tbl[ixheaacd_num_bands] - sub_band_start;
  951|  78.3k|  gate_mode[0] = 1;
  952|       |
  953|   313k|  for (i = 1; i < 4; i++) {
  ------------------
  |  Branch (953:15): [True: 234k, False: 78.3k]
  ------------------
  954|  2.14M|    for (k = 0; k <= ixheaacd_num_bands; k++) {
  ------------------
  |  Branch (954:17): [True: 1.90M, False: 234k]
  ------------------
  955|  1.90M|      temp_limiter_band_calc[k] = freq_band_tbl[k] - sub_band_start;
  956|  1.90M|    }
  957|       |
  958|   638k|    for (k = 1; k < num_patches; k++) {
  ------------------
  |  Branch (958:17): [True: 403k, False: 234k]
  ------------------
  959|   403k|      temp_limiter_band_calc[ixheaacd_num_bands + k] = patch_borders[k];
  960|   403k|    }
  961|       |
  962|   234k|    gate_mode[i] = ixheaacd_num_bands + num_patches - 1;
  963|   234k|    ixheaacd_shellsort(temp_limiter_band_calc, gate_mode[i] + 1);
  964|       |
  965|  2.31M|    for (j = 1; j <= gate_mode[i]; j++) {
  ------------------
  |  Branch (965:17): [True: 2.07M, False: 234k]
  ------------------
  966|  2.07M|      num_octave = log((double)(temp_limiter_band_calc[j] + sub_band_start) /
  967|  2.07M|                       (temp_limiter_band_calc[j - 1] + sub_band_start)) /
  968|  2.07M|                   log2;
  969|       |
  970|  2.07M|      if (num_octave * limbnd_per_oct[i] < 0.49) {
  ------------------
  |  Branch (970:11): [True: 1.23M, False: 837k]
  ------------------
  971|  1.23M|        if (temp_limiter_band_calc[j] == temp_limiter_band_calc[j - 1]) {
  ------------------
  |  Branch (971:13): [True: 255k, False: 984k]
  ------------------
  972|   255k|          temp_limiter_band_calc[j] = sub_band_end;
  973|   255k|          ixheaacd_shellsort(temp_limiter_band_calc, gate_mode[i] + 1);
  974|   255k|          gate_mode[i]--;
  975|   255k|          j--;
  976|   255k|          continue;
  977|   255k|        }
  978|       |
  979|   984k|        is_patch_border[0] = is_patch_border[1] = 0;
  980|       |
  981|  3.03M|        for (k = 0; k <= num_patches; k++) {
  ------------------
  |  Branch (981:21): [True: 2.62M, False: 413k]
  ------------------
  982|  2.62M|          if (temp_limiter_band_calc[j - 1] == patch_borders[k]) {
  ------------------
  |  Branch (982:15): [True: 570k, False: 2.05M]
  ------------------
  983|   570k|            is_patch_border[0] = 1;
  984|   570k|            break;
  985|   570k|          }
  986|  2.62M|        }
  987|       |
  988|  4.16M|        for (k = 0; k <= num_patches; k++) {
  ------------------
  |  Branch (988:21): [True: 3.46M, False: 697k]
  ------------------
  989|  3.46M|          if (temp_limiter_band_calc[j] == patch_borders[k]) {
  ------------------
  |  Branch (989:15): [True: 286k, False: 3.18M]
  ------------------
  990|   286k|            is_patch_border[1] = 1;
  991|   286k|            break;
  992|   286k|          }
  993|  3.46M|        }
  994|       |
  995|   984k|        if (!is_patch_border[1]) {
  ------------------
  |  Branch (995:13): [True: 697k, False: 286k]
  ------------------
  996|   697k|          temp_limiter_band_calc[j] = sub_band_end;
  997|   697k|          ixheaacd_shellsort(temp_limiter_band_calc, gate_mode[i] + 1);
  998|   697k|          gate_mode[i]--;
  999|   697k|          j--;
 1000|   697k|        } else if (!is_patch_border[0]) {
  ------------------
  |  Branch (1000:20): [True: 171k, False: 114k]
  ------------------
 1001|   171k|          temp_limiter_band_calc[j - 1] = sub_band_end;
 1002|   171k|          ixheaacd_shellsort(temp_limiter_band_calc, gate_mode[i] + 1);
 1003|   171k|          gate_mode[i]--;
 1004|   171k|          j--;
 1005|   171k|        }
 1006|   984k|      }
 1007|  2.07M|    }
 1008|   234k|    if (gate_mode[i] > 12) {
  ------------------
  |  Branch (1008:9): [True: 1, False: 234k]
  ------------------
 1009|      1|      if (ec_flag)
  ------------------
  |  Branch (1009:11): [True: 0, False: 1]
  ------------------
 1010|      0|        gate_mode[i] = 12;
 1011|      1|      else
 1012|      1|        return IA_FATAL_ERROR;
  ------------------
  |  |   25|      1|#define IA_FATAL_ERROR 0x80000000
  ------------------
 1013|      1|    }
 1014|  1.42M|    for (k = 0; k <= gate_mode[i]; k++) {
  ------------------
  |  Branch (1014:17): [True: 1.18M, False: 234k]
  ------------------
 1015|  1.18M|      lim_table[i][k] = temp_limiter_band_calc[k];
 1016|  1.18M|    }
 1017|   234k|  }
 1018|  78.3k|  return IA_NO_ERROR;
  ------------------
  |  |   23|  78.3k|#define IA_NO_ERROR 0x00000000
  ------------------
 1019|  78.3k|}
ixheaacd_apply_inter_tes:
 1024|   295k|                                WORD32 num_subband, WORD32 gamma_idx) {
 1025|   295k|  WORD32 sub_band_end = sub_band_start + num_subband;
 1026|   295k|  FLOAT32 subsample_power_high[TIMESLOT_BUFFER_SIZE],
 1027|   295k|      subsample_power_low[TIMESLOT_BUFFER_SIZE];
 1028|   295k|  FLOAT32 total_power_high = 0.0f;
 1029|   295k|  FLOAT32 total_power_low = 0.0f, total_power_high_after = 1.0e-6f;
 1030|   295k|  FLOAT32 gain[TIMESLOT_BUFFER_SIZE];
 1031|   295k|  FLOAT32 gain_adj, gain_adj_2;
 1032|   295k|  FLOAT32 gamma = ixheaac_q_gamma_table[gamma_idx];
 1033|   295k|  WORD32 i, j;
 1034|       |
 1035|   295k|  if (num_sample > TIMESLOT_BUFFER_SIZE)
  ------------------
  |  |   95|   295k|#define TIMESLOT_BUFFER_SIZE 78
  ------------------
  |  Branch (1035:7): [True: 0, False: 295k]
  ------------------
 1036|      0|  {
 1037|      0|    return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
 1038|      0|  }
 1039|   295k|  if (gamma > 0) {
  ------------------
  |  Branch (1039:7): [True: 7.91k, False: 287k]
  ------------------
 1040|   146k|    for (i = 0; i < num_sample; i++) {
  ------------------
  |  Branch (1040:17): [True: 138k, False: 7.91k]
  ------------------
 1041|   138k|      memcpy(&qmf_real[64 * i], &qmf_real1[64 * i],
 1042|   138k|             sub_band_start * sizeof(FLOAT32));
 1043|   138k|      memcpy(&qmf_imag[64 * i], &qmf_imag1[64 * i],
 1044|   138k|             sub_band_start * sizeof(FLOAT32));
 1045|   138k|    }
 1046|       |
 1047|   146k|    for (i = 0; i < num_sample; i++) {
  ------------------
  |  Branch (1047:17): [True: 138k, False: 7.91k]
  ------------------
 1048|   138k|      subsample_power_low[i] = 0.0f;
 1049|  2.63M|      for (j = 0; j < sub_band_start; j++) {
  ------------------
  |  Branch (1049:19): [True: 2.49M, False: 138k]
  ------------------
 1050|  2.49M|        subsample_power_low[i] += qmf_real[64 * i + j] * qmf_real[64 * i + j];
 1051|  2.49M|        subsample_power_low[i] += qmf_imag[64 * i + j] * qmf_imag[64 * i + j];
 1052|  2.49M|      }
 1053|   138k|      subsample_power_high[i] = 0.0f;
 1054|  4.25M|      for (j = sub_band_start; j < sub_band_end; j++) {
  ------------------
  |  Branch (1054:32): [True: 4.11M, False: 138k]
  ------------------
 1055|  4.11M|        subsample_power_high[i] += qmf_real[64 * i + j] * qmf_real[64 * i + j];
 1056|  4.11M|        subsample_power_high[i] += qmf_imag[64 * i + j] * qmf_imag[64 * i + j];
 1057|  4.11M|      }
 1058|   138k|      total_power_low += subsample_power_low[i];
 1059|   138k|      total_power_high += subsample_power_high[i];
 1060|   138k|    }
 1061|       |
 1062|   146k|    for (i = 0; i < num_sample; i++) {
  ------------------
  |  Branch (1062:17): [True: 138k, False: 7.91k]
  ------------------
 1063|   138k|      gain[i] = (FLOAT32)(sqrt(subsample_power_low[i] * num_sample /
 1064|   138k|                               (total_power_low + 1.0e-6f)));
 1065|   138k|    }
 1066|       |
 1067|   146k|    for (i = 0; i < num_sample; i++) {
  ------------------
  |  Branch (1067:17): [True: 138k, False: 7.91k]
  ------------------
 1068|   138k|      gain[i] = (FLOAT32)(1.0f + gamma * (gain[i] - 1.0f));
 1069|   138k|    }
 1070|       |
 1071|   146k|    for (i = 0; i < num_sample; i++) {
  ------------------
  |  Branch (1071:17): [True: 138k, False: 7.91k]
  ------------------
 1072|   138k|      if (gain[i] < 0.2f) {
  ------------------
  |  Branch (1072:11): [True: 92.8k, False: 45.2k]
  ------------------
 1073|  92.8k|        gain[i] = 0.2f;
 1074|  92.8k|      }
 1075|       |
 1076|   138k|      subsample_power_high[i] *= gain[i] * gain[i];
 1077|   138k|      total_power_high_after += subsample_power_high[i];
 1078|   138k|    }
 1079|       |
 1080|  7.91k|    gain_adj_2 = total_power_high / total_power_high_after;
 1081|  7.91k|    gain_adj = (FLOAT32)(sqrt(gain_adj_2));
 1082|       |
 1083|   146k|    for (i = 0; i < num_sample; i++) {
  ------------------
  |  Branch (1083:17): [True: 138k, False: 7.91k]
  ------------------
 1084|   138k|      gain[i] *= gain_adj;
 1085|       |
 1086|  4.25M|      for (j = sub_band_start; j < sub_band_end; j++) {
  ------------------
  |  Branch (1086:32): [True: 4.11M, False: 138k]
  ------------------
 1087|  4.11M|        qmf_real[64 * i + j] *= gain[i];
 1088|  4.11M|        qmf_imag[64 * i + j] *= gain[i];
 1089|  4.11M|      }
 1090|   138k|    }
 1091|  7.91k|  }
 1092|   295k|  return 0;
 1093|   295k|}

ixheaacd_complex_anal_filt:
   48|   237k|WORD32 ixheaacd_complex_anal_filt(ia_esbr_hbe_txposer_struct *ptr_hbe_txposer) {
   49|   237k|  WORD32 idx;
   50|   237k|  WORD32 anal_size = 2 * ptr_hbe_txposer->synth_size;
   51|   237k|  WORD32 N = (10 * anal_size);
   52|   237k|  WORD32 no_bins = ptr_hbe_txposer->no_bins >> 1;
   53|       |
   54|   237k|  if (ptr_hbe_txposer->esbr_hq != 0) {
  ------------------
  |  Branch (54:7): [True: 0, False: 237k]
  ------------------
   55|      0|    anal_size = 2 * ptr_hbe_txposer->analy_size;
   56|      0|    no_bins = ptr_hbe_txposer->no_bins;
   57|      0|  }
   58|       |
   59|  4.55M|  for (idx = 0; idx < no_bins; idx++) {
  ------------------
  |  Branch (59:17): [True: 4.32M, False: 237k]
  ------------------
   60|  4.32M|    WORD32 i, j, k, l;
   61|  4.32M|    FLOAT32 window_output[640];
   62|  4.32M|    FLOAT32 u[128], u_in[256], u_out[256];
   63|  4.32M|    FLOAT32 accu_r, accu_i;
   64|  4.32M|    const FLOAT32 *inp_signal;
   65|  4.32M|    FLOAT32 *anal_buf;
   66|       |
   67|  4.32M|    FLOAT32 *analy_cos_sin_tab = ptr_hbe_txposer->analy_cos_sin_tab;
   68|  4.32M|    const FLOAT32 *interp_window_coeff = ptr_hbe_txposer->analy_wind_coeff;
   69|  4.32M|    FLOAT32 *x = ptr_hbe_txposer->analy_buf;
   70|  4.32M|    if (ptr_hbe_txposer->esbr_hq != 0) {
  ------------------
  |  Branch (70:9): [True: 0, False: 4.32M]
  ------------------
   71|      0|      memset(ptr_hbe_txposer->qmf_in_buf[idx], 0,
   72|      0|          TWICE_QMF_SYNTH_CHANNELS_NUM * sizeof(FLOAT32));
  ------------------
  |  |  110|      0|#define TWICE_QMF_SYNTH_CHANNELS_NUM 128
  ------------------
   73|      0|      inp_signal = ptr_hbe_txposer->ptr_output_buf +
   74|      0|          idx * ptr_hbe_txposer->analy_size + 1;
   75|      0|      anal_buf = &ptr_hbe_txposer->qmf_in_buf[idx]
   76|      0|          [4 * ptr_hbe_txposer->a_start];
   77|  4.32M|    } else {
   78|  4.32M|    memset(ptr_hbe_txposer->qmf_in_buf[idx + HBE_OPER_WIN_LEN - 1], 0,
  ------------------
  |  |  108|  4.32M|#define HBE_OPER_WIN_LEN (13)
  ------------------
   79|  4.32M|           TWICE_QMF_SYNTH_CHANNELS_NUM * sizeof(FLOAT32));
  ------------------
  |  |  110|  4.32M|#define TWICE_QMF_SYNTH_CHANNELS_NUM 128
  ------------------
   80|       |
   81|  4.32M|    inp_signal = ptr_hbe_txposer->ptr_input_buf +
   82|  4.32M|                 idx * 2 * ptr_hbe_txposer->synth_size + 1;
   83|  4.32M|    anal_buf = &ptr_hbe_txposer->qmf_in_buf[idx + HBE_OPER_WIN_LEN - 1]
  ------------------
  |  |  108|  4.32M|#define HBE_OPER_WIN_LEN (13)
  ------------------
   84|  4.32M|                                           [4 * ptr_hbe_txposer->k_start];
   85|  4.32M|    }
   86|       |
   87|   895M|    for (i = N - 1; i >= anal_size; i--) {
  ------------------
  |  Branch (87:21): [True: 890M, False: 4.32M]
  ------------------
   88|   890M|      x[i] = x[i - anal_size];
   89|   890M|    }
   90|       |
   91|   103M|    for (i = anal_size - 1; i >= 0; i--) {
  ------------------
  |  Branch (91:29): [True: 98.9M, False: 4.32M]
  ------------------
   92|  98.9M|      x[i] = inp_signal[anal_size - 1 - i];
   93|  98.9M|    }
   94|       |
   95|   994M|    for (i = 0; i < N; i++) {
  ------------------
  |  Branch (95:17): [True: 989M, False: 4.32M]
  ------------------
   96|   989M|      window_output[i] = x[i] * interp_window_coeff[i];
   97|   989M|    }
   98|       |
   99|   202M|    for (i = 0; i < 2 * anal_size; i++) {
  ------------------
  |  Branch (99:17): [True: 197M, False: 4.32M]
  ------------------
  100|   197M|      accu_r = 0.0;
  101|  1.18G|      for (j = 0; j < 5; j++) {
  ------------------
  |  Branch (101:19): [True: 989M, False: 197M]
  ------------------
  102|   989M|        accu_r = accu_r + window_output[i + j * 2 * anal_size];
  103|   989M|      }
  104|   197M|      u[i] = accu_r;
  105|   197M|    }
  106|  4.32M|    if (anal_size == 40 || anal_size == 56) {
  ------------------
  |  Branch (106:9): [True: 451k, False: 3.86M]
  |  Branch (106:28): [True: 0, False: 3.86M]
  ------------------
  107|  18.0M|      for (i = 1; i < anal_size; i++) {
  ------------------
  |  Branch (107:19): [True: 17.5M, False: 451k]
  ------------------
  108|  17.5M|        FLOAT32 temp1 = u[i] + u[2 * anal_size - i];
  109|  17.5M|        FLOAT32 temp2 = u[i] - u[2 * anal_size - i];
  110|  17.5M|        u[i] = temp1;
  111|  17.5M|        u[2 * anal_size - i] = temp2;
  112|  17.5M|      }
  113|       |
  114|  18.4M|      for (k = 0; k < anal_size; k++) {
  ------------------
  |  Branch (114:19): [True: 18.0M, False: 451k]
  ------------------
  115|  18.0M|        accu_r = u[anal_size];
  116|  18.0M|        if (k & 1)
  ------------------
  |  Branch (116:13): [True: 9.02M, False: 9.02M]
  ------------------
  117|  9.02M|          accu_i = u[0];
  118|  9.02M|        else
  119|  9.02M|          accu_i = -u[0];
  120|   721M|        for (l = 1; l < anal_size; l++) {
  ------------------
  |  Branch (120:21): [True: 703M, False: 18.0M]
  ------------------
  121|   703M|          accu_r = accu_r + u[0 + l] * analy_cos_sin_tab[2 * l + 0];
  122|   703M|          accu_i = accu_i + u[2 * anal_size - l] * analy_cos_sin_tab[2 * l + 1];
  123|   703M|        }
  124|  18.0M|        analy_cos_sin_tab += (2 * anal_size);
  125|  18.0M|        *anal_buf++ = (FLOAT32)accu_r;
  126|  18.0M|        *anal_buf++ = (FLOAT32)accu_i;
  127|  18.0M|      }
  128|  3.86M|    } else {
  129|  3.86M|      FLOAT32 *ptr_u = u_in;
  130|  3.86M|      FLOAT32 *ptr_v = u_out;
  131|   165M|      for (k = 0; k < anal_size * 2; k++) {
  ------------------
  |  Branch (131:19): [True: 161M, False: 3.86M]
  ------------------
  132|   161M|        *ptr_u++ = ((*analy_cos_sin_tab++) * u[k]);
  133|   161M|        *ptr_u++ = ((*analy_cos_sin_tab++) * u[k]);
  134|   161M|      }
  135|  3.86M|      if (ptr_hbe_txposer->ixheaacd_cmplx_anal_fft != NULL)
  ------------------
  |  Branch (135:11): [True: 3.86M, False: 0]
  ------------------
  136|  3.86M|        (*(ptr_hbe_txposer->ixheaacd_cmplx_anal_fft))(u_in, u_out,
  137|  3.86M|                                                      anal_size * 2);
  138|      0|      else
  139|      0|        return -1;
  140|       |
  141|  44.3M|      for (k = 0; k < anal_size / 2; k++) {
  ------------------
  |  Branch (141:19): [True: 40.4M, False: 3.86M]
  ------------------
  142|  40.4M|        *(anal_buf + 1) = -*ptr_v++;
  143|  40.4M|        *anal_buf = *ptr_v++;
  144|       |
  145|  40.4M|        anal_buf += 2;
  146|       |
  147|  40.4M|        *(anal_buf + 1) = *ptr_v++;
  148|  40.4M|        *anal_buf = -*ptr_v++;
  149|       |
  150|  40.4M|        anal_buf += 2;
  151|  40.4M|      }
  152|  3.86M|    }
  153|  4.32M|  }
  154|   237k|  return 0;
  155|   237k|}
ixheaacd_real_synth_filt:
  159|   237k|                                FLOAT32 qmf_buf_imag[][64]) {
  160|   237k|  WORD32 i, j, k, l, idx;
  161|   237k|  FLOAT32 g[640];
  162|   237k|  FLOAT32 w[640];
  163|   237k|  FLOAT32 synth_out[128];
  164|   237k|  FLOAT32 accu_r;
  165|   237k|  WORD32 synth_size = ptr_hbe_txposer->synth_size;
  166|   237k|  FLOAT32 *ptr_cos_tab_trans_qmf =
  167|   237k|      (FLOAT32 *)&ixheaac_cos_table_trans_qmf[0][0] +
  168|   237k|      ptr_hbe_txposer->k_start * 32;
  169|   237k|  FLOAT32 *buffer = ptr_hbe_txposer->synth_buf;
  170|   237k|  FLOAT32 *ptr_inp_buf = ptr_hbe_txposer->ptr_input_buf + ptr_hbe_txposer->ana_fft_size[0];
  171|       |
  172|  8.87M|  for (idx = 0; idx < num_columns; idx++) {
  ------------------
  |  Branch (172:17): [True: 8.64M, False: 237k]
  ------------------
  173|  8.64M|    FLOAT32 loc_qmf_buf[64];
  174|  8.64M|    FLOAT32 *synth_buf_r = loc_qmf_buf;
  175|  8.64M|    FLOAT32 *out_buf;
  176|  8.64M|    if (ptr_hbe_txposer->esbr_hq == 1) {
  ------------------
  |  Branch (176:9): [True: 0, False: 8.64M]
  ------------------
  177|      0|        out_buf = ptr_inp_buf +
  178|      0|                  (idx - 1) * ptr_hbe_txposer->synth_size;
  179|  8.64M|    } else {
  180|  8.64M|      out_buf = ptr_hbe_txposer->ptr_input_buf +
  181|  8.64M|                       (idx + 1) * ptr_hbe_txposer->synth_size;
  182|  8.64M|    }
  183|  8.64M|    FLOAT32 *synth_cos_tab = ptr_hbe_txposer->synth_cos_tab;
  184|  8.64M|    const FLOAT32 *interp_window_coeff = ptr_hbe_txposer->synth_wind_coeff;
  185|  8.64M|    if (ptr_hbe_txposer->k_start < 0) return -1;
  ------------------
  |  Branch (185:9): [True: 0, False: 8.64M]
  ------------------
  186|   107M|    for (k = 0; k < synth_size; k++) {
  ------------------
  |  Branch (186:17): [True: 98.9M, False: 8.64M]
  ------------------
  187|  98.9M|      WORD32 ki = ptr_hbe_txposer->k_start + k;
  188|  98.9M|      synth_buf_r[k] = (FLOAT32)(
  189|  98.9M|          ptr_cos_tab_trans_qmf[(k << 1) + 0] * qmf_buf_real[idx][ki] +
  190|  98.9M|          ptr_cos_tab_trans_qmf[(k << 1) + 1] * qmf_buf_imag[idx][ki]);
  191|       |
  192|  98.9M|      synth_buf_r[k + ptr_hbe_txposer->synth_size] = 0;
  193|  98.9M|    }
  194|       |
  195|  1.79G|    for (l = (20 * synth_size - 1); l >= 2 * synth_size; l--) {
  ------------------
  |  Branch (195:37): [True: 1.78G, False: 8.64M]
  ------------------
  196|  1.78G|      buffer[l] = buffer[l - 2 * synth_size];
  197|  1.78G|    }
  198|       |
  199|  8.64M|    if (synth_size == 20) {
  ------------------
  |  Branch (199:9): [True: 902k, False: 7.73M]
  ------------------
  200|   902k|      FLOAT32 *psynth_cos_tab = synth_cos_tab;
  201|       |
  202|  19.8M|      for (l = 0; l < (synth_size + 1); l++) {
  ------------------
  |  Branch (202:19): [True: 18.9M, False: 902k]
  ------------------
  203|  18.9M|        accu_r = 0.0;
  204|   397M|        for (k = 0; k < synth_size; k++) {
  ------------------
  |  Branch (204:21): [True: 378M, False: 18.9M]
  ------------------
  205|   378M|          accu_r += synth_buf_r[k] * psynth_cos_tab[k];
  206|   378M|        }
  207|  18.9M|        buffer[0 + l] = accu_r;
  208|  18.9M|        buffer[synth_size - l] = accu_r;
  209|  18.9M|        psynth_cos_tab = psynth_cos_tab + synth_size;
  210|  18.9M|      }
  211|  9.02M|      for (l = (synth_size + 1); l < (2 * synth_size - synth_size / 2); l++) {
  ------------------
  |  Branch (211:34): [True: 8.12M, False: 902k]
  ------------------
  212|  8.12M|        accu_r = 0.0;
  213|   170M|        for (k = 0; k < synth_size; k++) {
  ------------------
  |  Branch (213:21): [True: 162M, False: 8.12M]
  ------------------
  214|   162M|          accu_r += synth_buf_r[k] * psynth_cos_tab[k];
  215|   162M|        }
  216|  8.12M|        buffer[0 + l] = accu_r;
  217|  8.12M|        buffer[3 * synth_size - l] = -accu_r;
  218|  8.12M|        psynth_cos_tab = psynth_cos_tab + synth_size;
  219|  8.12M|      }
  220|   902k|      accu_r = 0.0;
  221|  18.9M|      for (k = 0; k < synth_size; k++) {
  ------------------
  |  Branch (221:19): [True: 18.0M, False: 902k]
  ------------------
  222|  18.0M|        accu_r += synth_buf_r[k] * psynth_cos_tab[k];
  223|  18.0M|      }
  224|   902k|      buffer[3 * synth_size >> 1] = accu_r;
  225|  7.73M|    } else {
  226|  7.73M|      FLOAT32 tmp;
  227|  7.73M|      FLOAT32 *ptr_u = synth_out;
  228|  7.73M|      WORD32 kmax = (synth_size >> 1);
  229|  7.73M|      FLOAT32 *syn_buf = &buffer[kmax];
  230|  7.73M|      kmax += synth_size;
  231|       |
  232|  7.73M|      if (ptr_hbe_txposer->ixheaacd_real_synth_fft != NULL)
  ------------------
  |  Branch (232:11): [True: 7.73M, False: 4]
  ------------------
  233|  7.73M|        (*(ptr_hbe_txposer->ixheaacd_real_synth_fft))(synth_buf_r, synth_out,
  234|  7.73M|                                                      synth_size * 2);
  235|      4|      else
  236|      4|        return -1;
  237|       |
  238|   129M|      for (k = 0; k < kmax; k++) {
  ------------------
  |  Branch (238:19): [True: 121M, False: 7.73M]
  ------------------
  239|   121M|        tmp = ((*ptr_u++) * (*synth_cos_tab++));
  240|   121M|        tmp -= ((*ptr_u++) * (*synth_cos_tab++));
  241|   121M|        *syn_buf++ = tmp;
  242|   121M|      }
  243|       |
  244|  7.73M|      syn_buf = &buffer[0];
  245|  7.73M|      kmax -= synth_size;
  246|       |
  247|  48.2M|      for (k = 0; k < kmax; k++) {
  ------------------
  |  Branch (247:19): [True: 40.4M, False: 7.73M]
  ------------------
  248|  40.4M|        tmp = ((*ptr_u++) * (*synth_cos_tab++));
  249|  40.4M|        tmp -= ((*ptr_u++) * (*synth_cos_tab++));
  250|  40.4M|        *syn_buf++ = tmp;
  251|  40.4M|      }
  252|  7.73M|    }
  253|       |
  254|  51.8M|    for (i = 0; i < 5; i++) {
  ------------------
  |  Branch (254:17): [True: 43.2M, False: 8.64M]
  ------------------
  255|  43.2M|      memcpy(&g[(2 * i + 0) * synth_size], &buffer[(4 * i + 0) * synth_size],
  256|  43.2M|             sizeof(FLOAT32) * synth_size);
  257|  43.2M|      memcpy(&g[(2 * i + 1) * synth_size], &buffer[(4 * i + 3) * synth_size],
  258|  43.2M|             sizeof(FLOAT32) * synth_size);
  259|  43.2M|    }
  260|       |
  261|   998M|    for (k = 0; k < 10 * synth_size; k++) {
  ------------------
  |  Branch (261:17): [True: 989M, False: 8.64M]
  ------------------
  262|   989M|      w[k] = g[k] * interp_window_coeff[k];
  263|   989M|    }
  264|       |
  265|   107M|    for (i = 0; i < synth_size; i++) {
  ------------------
  |  Branch (265:17): [True: 98.9M, False: 8.64M]
  ------------------
  266|  98.9M|      accu_r = 0.0;
  267|  1.08G|      for (j = 0; j < 10; j++) {
  ------------------
  |  Branch (267:19): [True: 989M, False: 98.9M]
  ------------------
  268|   989M|        accu_r = accu_r + w[synth_size * j + i];
  269|   989M|      }
  270|  98.9M|      out_buf[i] = (FLOAT32)accu_r;
  271|  98.9M|    }
  272|  8.64M|  }
  273|   237k|  return 0;
  274|   237k|}

ixheaacd_usac_cplx_save_prev:
  150|  70.9k|                                  WORD32 *r_spec_prev) {
  151|  70.9k|  WORD32 ixheaacd_drc_offset;
  152|       |
  153|  70.9k|  ixheaacd_drc_offset = info->samp_per_bk - info->bins_per_sbk;
  154|       |
  155|  70.9k|  memcpy(l_spec_prev + ixheaacd_drc_offset, l_spec + ixheaacd_drc_offset,
  156|  70.9k|         sizeof(WORD32) * info->bins_per_sbk);
  157|  70.9k|  memcpy(r_spec_prev + ixheaacd_drc_offset, r_spec + ixheaacd_drc_offset,
  158|  70.9k|         sizeof(WORD32) * info->bins_per_sbk);
  159|  70.9k|}
ixheaacd_ms_stereo:
  320|  9.00k|                        WORD32 *l_spec, WORD32 chn, WORD32 nband) {
  321|  9.00k|  WORD32 temp_r, temp_l;
  322|  9.00k|  WORD32 sfb, k, grp, grp_len;
  323|  9.00k|  ia_sfb_info_struct *ptr_sfb_info = usac_data->pstr_sfb_info[chn];
  324|  9.00k|  UWORD8 *ms_used = usac_data->ms_used[chn];
  325|  9.00k|  WORD32 ixheaacd_drc_offset = 0;
  326|       |
  327|  22.2k|  for (grp = 0; grp < ptr_sfb_info->num_groups; grp++) {
  ------------------
  |  Branch (327:17): [True: 13.2k, False: 9.00k]
  ------------------
  328|  29.7k|    for (grp_len = 0; grp_len < ptr_sfb_info->group_len[grp]; grp_len++) {
  ------------------
  |  Branch (328:23): [True: 16.4k, False: 13.2k]
  ------------------
  329|  16.4k|      ixheaacd_drc_offset = 0;
  330|  86.2k|      for (sfb = 0; sfb < nband; sfb++) {
  ------------------
  |  Branch (330:21): [True: 69.7k, False: 16.4k]
  ------------------
  331|  69.7k|        ixheaacd_drc_offset += ptr_sfb_info->sfb_width[sfb];
  332|  69.7k|        if (ms_used[sfb]) {
  ------------------
  |  Branch (332:13): [True: 54.1k, False: 15.6k]
  ------------------
  333|   694k|          for (k = 0; k < ptr_sfb_info->sfb_width[sfb]; k++) {
  ------------------
  |  Branch (333:23): [True: 640k, False: 54.1k]
  ------------------
  334|   640k|            temp_r = *r_spec;
  335|   640k|            temp_l = *l_spec;
  336|   640k|            *l_spec = ixheaac_add32_sat(temp_r, temp_l);
  337|   640k|            *r_spec = ixheaac_sub32_sat(temp_l, temp_r);
  338|   640k|            r_spec++;
  339|   640k|            l_spec++;
  340|   640k|          }
  341|  54.1k|        } else {
  342|  15.6k|          r_spec += ptr_sfb_info->sfb_width[sfb];
  343|  15.6k|          l_spec += ptr_sfb_info->sfb_width[sfb];
  344|  15.6k|        }
  345|  69.7k|      }
  346|       |
  347|  16.4k|      l_spec = l_spec + ptr_sfb_info->bins_per_sbk - ixheaacd_drc_offset;
  348|  16.4k|      r_spec = r_spec + ptr_sfb_info->bins_per_sbk - ixheaacd_drc_offset;
  349|  16.4k|    }
  350|       |
  351|  13.2k|    ms_used += ptr_sfb_info->sfb_per_sbk;
  352|  13.2k|  }
  353|  9.00k|}
ixheaacd_ics_info:
  601|   196k|{
  602|   196k|  WORD32 win;
  603|   196k|  WORD32 mask = 0x40;
  604|       |
  605|   196k|  UWORD8 *scf_group_ptr = usac_data->group_dis[chn];
  606|       |
  607|   196k|  win = ixheaacd_read_bits_buf(it_bit_buff, 2);
  608|       |
  609|   196k|  win = usac_data->window_sequence[chn] =
  610|   196k|      ixheaacd_win_seq_select(win, window_sequence_last);
  611|   196k|  if (win == -1) return -1;
  ------------------
  |  Branch (611:7): [True: 0, False: 196k]
  ------------------
  612|       |
  613|   196k|  usac_data->pstr_sfb_info[chn] =
  614|   196k|      usac_data->pstr_usac_winmap[usac_data->window_sequence[chn]];
  615|       |
  616|   196k|  usac_data->window_shape[chn] = ixheaacd_read_bits_buf(it_bit_buff, 1);
  617|       |
  618|   196k|  if (usac_data->pstr_usac_winmap[win]->islong) {
  ------------------
  |  Branch (618:7): [True: 137k, False: 58.5k]
  ------------------
  619|   137k|    *max_sfb = ixheaacd_read_bits_buf(it_bit_buff, 6);
  620|   137k|    *scf_group_ptr = 1;
  621|   137k|  } else {
  622|  58.5k|    WORD32 i, scale_factor_grouping;
  623|       |
  624|  58.5k|    *max_sfb = ixheaacd_read_bits_buf(it_bit_buff, 4);
  625|       |
  626|  58.5k|    scale_factor_grouping = ixheaacd_read_bits_buf(it_bit_buff, 7);
  627|       |
  628|   468k|    for (i = 1; i < 8; i++) {
  ------------------
  |  Branch (628:17): [True: 409k, False: 58.5k]
  ------------------
  629|   409k|      if (!(scale_factor_grouping & mask)) *scf_group_ptr++ = i;
  ------------------
  |  Branch (629:11): [True: 273k, False: 136k]
  ------------------
  630|       |
  631|   409k|      mask = mask >> 1;
  632|   409k|    }
  633|  58.5k|    *scf_group_ptr++ = i;
  634|       |
  635|  58.5k|    ixheaacd_calc_grp_offset(usac_data->pstr_usac_winmap[win],
  636|  58.5k|                             &usac_data->group_dis[chn][0]);
  637|  58.5k|  }
  638|       |
  639|   196k|  if (*max_sfb > usac_data->pstr_sfb_info[chn]->sfb_per_sbk) {
  ------------------
  |  Branch (639:7): [True: 266, False: 195k]
  ------------------
  640|    266|    *max_sfb = usac_data->pstr_sfb_info[chn]->sfb_per_sbk;
  641|    266|    return -1;
  642|    266|  }
  643|       |
  644|   195k|  return 0;
  645|   196k|}
ixheaacd_core_coder_data:
  650|   199k|                                WORD32 nr_core_coder_channels) {
  651|   199k|  WORD32 err_code = 0;
  652|   199k|  WORD32 k = 0, ch = 0, chn = 0, left = 0, right = 0;
  653|       |
  654|   199k|  ia_usac_tmp_core_coder_struct str_tmp_core_coder = {0};
  655|   199k|  ia_usac_tmp_core_coder_struct *pstr_core_coder = &str_tmp_core_coder;
  656|   199k|  ia_td_frame_data_struct td_frame;
  657|   199k|  jmp_buf local;
  658|       |
  659|   199k|  if (usac_data->ec_flag) {
  ------------------
  |  Branch (659:7): [True: 0, False: 199k]
  ------------------
  660|      0|    err_code = setjmp(local);
  661|      0|    it_bit_buff->xaac_jmp_buf = &local;
  662|      0|  }
  663|   199k|  if (err_code == 0 &&
  ------------------
  |  Branch (663:7): [True: 199k, False: 0]
  ------------------
  664|   199k|      ((usac_data->ec_flag == 0) || (usac_data->frame_ok == 1 && usac_data->ec_flag == 1))) {
  ------------------
  |  Branch (664:8): [True: 199k, False: 0]
  |  Branch (664:38): [True: 0, False: 0]
  |  Branch (664:66): [True: 0, False: 0]
  ------------------
  665|   199k|    memset(&td_frame, 0, sizeof(td_frame));
  666|   199k|    pstr_core_coder->tns_on_lr = 0;
  667|   199k|    pstr_core_coder->pred_dir = 0;
  668|   199k|    if (id != ID_USAC_LFE) {
  ------------------
  |  |   29|   199k|#define ID_USAC_LFE 2
  ------------------
  |  Branch (668:9): [True: 197k, False: 1.65k]
  ------------------
  669|   501k|      for (ch = 0; ch < nr_core_coder_channels; ch++)
  ------------------
  |  Branch (669:20): [True: 304k, False: 197k]
  ------------------
  670|   304k|        pstr_core_coder->core_mode[ch] = ixheaacd_read_bits_buf(it_bit_buff, 1);
  671|   197k|    } else {
  672|  3.30k|      for (ch = 0; ch < nr_core_coder_channels; ch++) pstr_core_coder->core_mode[ch] = 0;
  ------------------
  |  Branch (672:20): [True: 1.65k, False: 1.65k]
  ------------------
  673|  1.65k|    }
  674|       |
  675|   199k|    if (nr_core_coder_channels == 2 && pstr_core_coder->core_mode[0] == 0 &&
  ------------------
  |  Branch (675:9): [True: 106k, False: 92.4k]
  |  Branch (675:40): [True: 88.4k, False: 18.2k]
  ------------------
  676|  88.4k|        pstr_core_coder->core_mode[1] == 0) {
  ------------------
  |  Branch (676:9): [True: 71.4k, False: 16.9k]
  ------------------
  677|  71.4k|      pstr_core_coder->tns_active = ixheaacd_read_bits_buf(it_bit_buff, 1);
  678|  71.4k|      pstr_core_coder->common_window = ixheaacd_read_bits_buf(it_bit_buff, 1);
  679|       |
  680|  71.4k|      if (pstr_core_coder->common_window) {
  ------------------
  |  Branch (680:11): [True: 34.2k, False: 37.2k]
  ------------------
  681|  34.2k|        left = chan_offset;
  682|  34.2k|        right = chan_offset + 1;
  683|       |
  684|  34.2k|        err_code = ixheaacd_ics_info(usac_data, left, &pstr_core_coder->max_sfb[left],
  685|  34.2k|                                     it_bit_buff, usac_data->window_sequence_last[left]);
  686|       |
  687|  34.2k|        if (err_code == -1) {
  ------------------
  |  Branch (687:13): [True: 12, False: 34.2k]
  ------------------
  688|     12|          if (usac_data->ec_flag) {
  ------------------
  |  Branch (688:15): [True: 0, False: 12]
  ------------------
  689|      0|            memcpy(usac_data->max_sfb, pstr_core_coder->max_sfb,
  690|      0|                   sizeof(pstr_core_coder->max_sfb));
  691|      0|            longjmp(*(it_bit_buff->xaac_jmp_buf),
  692|      0|                    IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|      0|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  693|     12|          } else {
  694|     12|            return err_code;
  695|     12|          }
  696|     12|        }
  697|       |
  698|  34.2k|        pstr_core_coder->common_max_sfb = ixheaacd_read_bits_buf(it_bit_buff, 1);
  699|       |
  700|  34.2k|        if (pstr_core_coder->common_max_sfb == 0) {
  ------------------
  |  Branch (700:13): [True: 11.6k, False: 22.6k]
  ------------------
  701|  11.6k|          if (usac_data->window_sequence[left] == EIGHT_SHORT_SEQUENCE)
  ------------------
  |  |  102|  11.6k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  |  Branch (701:15): [True: 9.96k, False: 1.64k]
  ------------------
  702|  9.96k|            pstr_core_coder->max_sfb[right] = ixheaacd_read_bits_buf(it_bit_buff, 4);
  703|  1.64k|          else
  704|  1.64k|            pstr_core_coder->max_sfb[right] = ixheaacd_read_bits_buf(it_bit_buff, 6);
  705|  22.6k|        } else {
  706|  22.6k|          pstr_core_coder->max_sfb[right] = pstr_core_coder->max_sfb[left];
  707|  22.6k|        }
  708|       |
  709|  34.2k|        pstr_core_coder->max_sfb_ste =
  710|  34.2k|            max(pstr_core_coder->max_sfb[left], pstr_core_coder->max_sfb[right]);
  ------------------
  |  |   74|  34.2k|#define max(a, b) (((a) > (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (74:20): [True: 1.79k, False: 32.4k]
  |  |  ------------------
  ------------------
  711|       |
  712|  34.2k|        usac_data->window_sequence[right] = usac_data->window_sequence[left];
  713|  34.2k|        usac_data->window_shape[right] = usac_data->window_shape[left];
  714|  34.2k|        memcpy(&usac_data->group_dis[right][0], &usac_data->group_dis[left][0], 8);
  715|  34.2k|        usac_data->pstr_sfb_info[right] = usac_data->pstr_sfb_info[left];
  716|  34.2k|        if (pstr_core_coder->max_sfb[right] > usac_data->pstr_sfb_info[right]->sfb_per_sbk)
  ------------------
  |  Branch (716:13): [True: 767, False: 33.5k]
  ------------------
  717|    767|          pstr_core_coder->max_sfb[right] = usac_data->pstr_sfb_info[right]->sfb_per_sbk;
  718|       |
  719|  34.2k|        pstr_core_coder->ms_mask_present[0] =
  720|  34.2k|            ixheaacd_read_ms_mask(usac_data, pstr_core_coder, it_bit_buff, left);
  721|  37.2k|      } else {
  722|  37.2k|        left = chan_offset;
  723|  37.2k|        right = chan_offset + 1;
  724|       |
  725|  37.2k|        pstr_core_coder->ms_mask_present[0] = 0;
  726|  37.2k|        pstr_core_coder->ms_mask_present[1] = 0;
  727|       |
  728|  5.09M|        for (k = 0; k < SFB_NUM_MAX; k++) {
  ------------------
  |  |  114|  5.09M|#define SFB_NUM_MAX ((NSFB_SHORT + 1) * MAX_SHORT_IN_LONG_BLOCK)
  |  |  ------------------
  |  |  |  |  107|  5.09M|#define NSFB_SHORT 16
  |  |  ------------------
  |  |               #define SFB_NUM_MAX ((NSFB_SHORT + 1) * MAX_SHORT_IN_LONG_BLOCK)
  |  |  ------------------
  |  |  |  |  108|  5.09M|#define MAX_SHORT_IN_LONG_BLOCK 8
  |  |  ------------------
  ------------------
  |  Branch (728:21): [True: 5.06M, False: 37.2k]
  ------------------
  729|  5.06M|          usac_data->alpha_q_re_prev[k] = 0;
  730|  5.06M|          usac_data->alpha_q_im_prev[k] = 0;
  731|  5.06M|        }
  732|  37.2k|      }
  733|       |
  734|  71.4k|      if (usac_data->tw_mdct[elem_idx] == 1) {
  ------------------
  |  Branch (734:11): [True: 0, False: 71.4k]
  ------------------
  735|      0|        pstr_core_coder->common_tw = ixheaacd_read_bits_buf(it_bit_buff, 1);
  736|       |
  737|      0|        if (pstr_core_coder->common_tw == 1) {
  ------------------
  |  Branch (737:13): [True: 0, False: 0]
  ------------------
  738|      0|          usac_data->tw_data_present[left] = ixheaacd_read_bits_buf(it_bit_buff, 1);
  739|      0|          usac_data->tw_data_present[right] = usac_data->tw_data_present[left];
  740|      0|          if (usac_data->tw_data_present[left]) {
  ------------------
  |  Branch (740:15): [True: 0, False: 0]
  ------------------
  741|      0|            for (k = 0; k < NUM_TW_NODES; k++) {
  ------------------
  |  |   95|      0|#define NUM_TW_NODES 16
  ------------------
  |  Branch (741:25): [True: 0, False: 0]
  ------------------
  742|      0|              usac_data->tw_ratio[left][k] = ixheaacd_read_bits_buf(it_bit_buff, 3);
  743|      0|              usac_data->tw_ratio[right][k] = usac_data->tw_ratio[left][k];
  744|      0|            }
  745|      0|          }
  746|      0|        }
  747|      0|      }
  748|       |
  749|  71.4k|      if (pstr_core_coder->tns_active) {
  ------------------
  |  Branch (749:11): [True: 17.8k, False: 53.5k]
  ------------------
  750|  17.8k|        if (pstr_core_coder->common_window) {
  ------------------
  |  Branch (750:13): [True: 16.7k, False: 1.18k]
  ------------------
  751|  16.7k|          pstr_core_coder->common_tns = ixheaacd_read_bits_buf(it_bit_buff, 1);
  752|       |
  753|  16.7k|        } else {
  754|  1.18k|          pstr_core_coder->common_tns = 0;
  755|  1.18k|        }
  756|       |
  757|  17.8k|        pstr_core_coder->tns_on_lr = ixheaacd_read_bits_buf(it_bit_buff, 1);
  758|       |
  759|  17.8k|        if (pstr_core_coder->common_tns) {
  ------------------
  |  Branch (759:13): [True: 3.64k, False: 14.2k]
  ------------------
  760|  3.64k|          ixheaacd_read_tns_u(usac_data->pstr_sfb_info[0], &usac_data->pstr_tns[left][0],
  761|  3.64k|                              it_bit_buff);
  762|  3.64k|          memcpy(&usac_data->pstr_tns[right][0], &usac_data->pstr_tns[left][0],
  763|  3.64k|                 sizeof(ia_tns_frame_info_struct));
  764|       |
  765|  3.64k|          pstr_core_coder->tns_data_present[0] = 2;
  766|  3.64k|          pstr_core_coder->tns_data_present[1] = 2;
  767|  14.2k|        } else {
  768|  14.2k|          pstr_core_coder->tns_present_both = ixheaacd_read_bits_buf(it_bit_buff, 1);
  769|       |
  770|  14.2k|          if (pstr_core_coder->tns_present_both) {
  ------------------
  |  Branch (770:15): [True: 11.6k, False: 2.56k]
  ------------------
  771|  11.6k|            pstr_core_coder->tns_data_present[0] = 1;
  772|  11.6k|            pstr_core_coder->tns_data_present[1] = 1;
  773|  11.6k|          } else {
  774|  2.56k|            pstr_core_coder->tns_data_present[1] = ixheaacd_read_bits_buf(it_bit_buff, 1);
  775|  2.56k|            pstr_core_coder->tns_data_present[0] = 1 - pstr_core_coder->tns_data_present[1];
  776|  2.56k|          }
  777|  14.2k|        }
  778|  53.5k|      } else {
  779|  53.5k|        pstr_core_coder->common_tns = 0;
  780|  53.5k|        pstr_core_coder->tns_data_present[0] = 0;
  781|  53.5k|        pstr_core_coder->tns_data_present[1] = 0;
  782|  53.5k|      }
  783|       |
  784|   127k|    } else {
  785|   127k|      pstr_core_coder->common_window = 0;
  786|   127k|      pstr_core_coder->common_tw = 0;
  787|   127k|      left = chan_offset;
  788|   127k|      right = chan_offset;
  789|   127k|      if (nr_core_coder_channels == 2) right = chan_offset + 1;
  ------------------
  |  Branch (789:11): [True: 35.2k, False: 92.4k]
  ------------------
  790|   127k|    }
  791|       |
  792|   504k|    for (ch = 0, chn = chan_offset; ch < nr_core_coder_channels; ch++, chn++) {
  ------------------
  |  Branch (792:37): [True: 305k, False: 198k]
  ------------------
  793|   305k|      if (pstr_core_coder->core_mode[chn] == CORE_MODE_LPD &&
  ------------------
  |  |   98|   610k|#define CORE_MODE_LPD 1
  ------------------
  |  Branch (793:11): [True: 56.6k, False: 248k]
  ------------------
  794|  56.6k|          usac_data->td_frame_prev[chn] == CORE_MODE_FD && usac_data->ec_flag) {
  ------------------
  |  |   97|   362k|#define CORE_MODE_FD 0
  ------------------
  |  Branch (794:11): [True: 11.3k, False: 45.2k]
  |  Branch (794:60): [True: 0, False: 11.3k]
  ------------------
  795|      0|        memcpy(usac_data->coef_fix[chn], usac_data->str_error_concealment[chn].spectral_coeff,
  796|      0|               sizeof(usac_data->str_error_concealment[chn].spectral_coeff));
  797|      0|        memcpy(usac_data->spec_scale[chn], usac_data->str_error_concealment[chn].q_spec_coeff,
  798|      0|               sizeof(usac_data->spec_scale[chn]));
  799|      0|        err_code = ixheaacd_fd_frm_dec(usac_data, chn);
  800|      0|        if (err_code == -1) return err_code;
  ------------------
  |  Branch (800:13): [True: 0, False: 0]
  ------------------
  801|      0|        for (k = 0; k < usac_data->ccfl; k++) {
  ------------------
  |  Branch (801:21): [True: 0, False: 0]
  ------------------
  802|      0|          usac_data->time_sample_vector[chn][k] = (FLOAT32)(
  803|      0|              (FLOAT32)usac_data->output_data_ptr[chn][k] * (FLOAT32)(ONE_BY_TWO_POW_15));
  ------------------
  |  |  146|      0|#define ONE_BY_TWO_POW_15 0.000030517578125
  ------------------
  804|      0|        }
  805|      0|        memcpy(usac_data->time_sample_vector_prev[chn], usac_data->time_sample_vector[chn],
  806|      0|               usac_data->ccfl * sizeof(usac_data->time_sample_vector_prev[chn][0]));
  807|       |
  808|      0|        usac_data->window_sequence[ch] = usac_data->str_error_concealment[ch].win_seq;
  809|      0|        usac_data->window_shape[ch] = usac_data->str_error_concealment[ch].win_shape;
  810|      0|        usac_data->window_shape_prev[ch] = usac_data->window_shape[ch];
  811|      0|        usac_data->window_sequence_last[ch] = usac_data->window_sequence[ch];
  812|      0|      }
  813|   305k|      if (pstr_core_coder->core_mode[ch] == 1) {
  ------------------
  |  Branch (813:11): [True: 75.0k, False: 230k]
  ------------------
  814|  75.0k|        err_code = ixheaacd_tw_buff_update(usac_data, chn, usac_data->str_tddec[chn]);
  815|  75.0k|        if (err_code == -1) return err_code;
  ------------------
  |  Branch (815:13): [True: 0, False: 75.0k]
  ------------------
  816|       |
  817|  75.0k|        if (!usac_data->td_frame_prev[chn]) {
  ------------------
  |  Branch (817:13): [True: 15.3k, False: 59.6k]
  ------------------
  818|  15.3k|          ixheaacd_fix2flt_data(usac_data, usac_data->str_tddec[chn], chn);
  819|  15.3k|        }
  820|       |
  821|  69.7M|        for (k = 0; k < usac_data->ccfl; k++) {
  ------------------
  |  Branch (821:21): [True: 69.6M, False: 75.0k]
  ------------------
  822|  69.6M|          usac_data->time_sample_vector[chn][k] = (FLOAT32)(
  823|  69.6M|              (FLOAT32)usac_data->output_data_ptr[chn][k] * (FLOAT32)(ONE_BY_TWO_POW_15));
  ------------------
  |  |  146|  69.6M|#define ONE_BY_TWO_POW_15 0.000030517578125
  ------------------
  824|  69.6M|        }
  825|  75.0k|        usac_data->present_chan = chn;
  826|  75.0k|        err_code = ixheaacd_lpd_channel_stream(usac_data, &td_frame, it_bit_buff,
  827|  75.0k|                                               usac_data->time_sample_vector[chn]);
  828|  75.0k|        if (err_code == -1) return err_code;
  ------------------
  |  Branch (828:13): [True: 20, False: 75.0k]
  ------------------
  829|  75.0k|        if (usac_data->ec_flag) {
  ------------------
  |  Branch (829:13): [True: 0, False: 75.0k]
  ------------------
  830|      0|          it_bit_buff->xaac_jmp_buf = &local;
  831|      0|        }
  832|  75.0k|        if (usac_data->ec_flag && usac_data->frame_ok) {
  ------------------
  |  Branch (832:13): [True: 0, False: 75.0k]
  |  Branch (832:35): [True: 0, False: 0]
  ------------------
  833|      0|          memcpy(&usac_data->td_frame_data_prev[chn], &td_frame, sizeof(td_frame));
  834|      0|          usac_data->core_mode = CORE_MODE_LPD;
  ------------------
  |  |   98|      0|#define CORE_MODE_LPD 1
  ------------------
  835|      0|        }
  836|  69.2M|        for (k = 0; k < usac_data->ccfl; k++) {
  ------------------
  |  Branch (836:21): [True: 69.1M, False: 75.0k]
  ------------------
  837|  69.1M|          usac_data->output_data_ptr[chn][k] =
  838|  69.1M|              (WORD32)(usac_data->time_sample_vector[chn][k] * (FLOAT32)((WORD64)1 << 15));
  839|  69.1M|        }
  840|       |
  841|  75.0k|        usac_data->window_shape[chn] = WIN_SEL_0;
  ------------------
  |  |   91|  75.0k|#define WIN_SEL_0 0
  ------------------
  842|       |
  843|  75.0k|        ixheaacd_td_frm_dec(usac_data, chn, td_frame.mod[0]);
  844|       |
  845|  75.0k|        usac_data->window_shape_prev[chn] = usac_data->window_shape[chn];
  846|  75.0k|        usac_data->window_sequence_last[chn] = EIGHT_SHORT_SEQUENCE;
  ------------------
  |  |  102|  75.0k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  847|       |
  848|   230k|      } else {
  849|   230k|        memset(usac_data->coef_fix[chn], 0, LN2 * sizeof(*usac_data->coef_fix[0]));
  850|       |
  851|   230k|        if (usac_data->str_tddec[chn] && usac_data->td_frame_prev[chn]) {
  ------------------
  |  Branch (851:13): [True: 230k, False: 0]
  |  Branch (851:42): [True: 13.5k, False: 216k]
  ------------------
  852|  13.5k|          if (usac_data->ec_flag) {
  ------------------
  |  Branch (852:15): [True: 0, False: 13.5k]
  ------------------
  853|      0|            memcpy(usac_data->time_sample_vector[chn], usac_data->time_sample_vector_prev[chn],
  854|      0|                   usac_data->ccfl * sizeof(usac_data->time_sample_vector[chn][0]));
  855|      0|          }
  856|  13.5k|          ixheaacd_lpd_dec_update(usac_data->str_tddec[chn], usac_data, chn);
  857|  13.5k|        }
  858|       |
  859|   230k|        if (id != ID_USAC_LFE) {
  ------------------
  |  |   29|   230k|#define ID_USAC_LFE 2
  ------------------
  |  Branch (859:13): [True: 228k, False: 1.65k]
  ------------------
  860|   228k|          if ((nr_core_coder_channels == 1) ||
  ------------------
  |  Branch (860:15): [True: 67.3k, False: 161k]
  ------------------
  861|   161k|              (pstr_core_coder->core_mode[0] != pstr_core_coder->core_mode[1]))
  ------------------
  |  Branch (861:15): [True: 18.6k, False: 142k]
  ------------------
  862|  85.9k|            pstr_core_coder->tns_data_present[ch] = ixheaacd_read_bits_buf(it_bit_buff, 1);
  863|   228k|        }
  864|       |
  865|   230k|        err_code = ixheaacd_fd_channel_stream(
  866|   230k|            usac_data, pstr_core_coder, &pstr_core_coder->max_sfb[ch],
  867|   230k|            usac_data->window_sequence_last[chn], chn, usac_data->noise_filling_config[elem_idx],
  868|   230k|            ch, it_bit_buff);
  869|   230k|        if (err_code == -1) return err_code;
  ------------------
  |  Branch (869:13): [True: 255, False: 230k]
  ------------------
  870|   230k|      }
  871|   305k|    }
  872|       |
  873|   198k|    if (pstr_core_coder->core_mode[0] == CORE_MODE_FD &&
  ------------------
  |  |   97|   397k|#define CORE_MODE_FD 0
  ------------------
  |  Branch (873:9): [True: 156k, False: 42.4k]
  ------------------
  874|   156k|        pstr_core_coder->core_mode[1] == CORE_MODE_FD && nr_core_coder_channels == 2) {
  ------------------
  |  |   97|   355k|#define CORE_MODE_FD 0
  ------------------
  |  Branch (874:9): [True: 139k, False: 16.8k]
  |  Branch (874:58): [True: 70.9k, False: 68.6k]
  ------------------
  875|  70.9k|      ixheaacd_cplx_prev_mdct_dmx(usac_data->pstr_sfb_info[left], usac_data->coef_save[left],
  876|  70.9k|                                  usac_data->coef_save[right], usac_data->dmx_re_prev,
  877|  70.9k|                                  pstr_core_coder->pred_dir);
  878|  70.9k|    }
  879|       |
  880|   198k|    if (pstr_core_coder->tns_on_lr == 0 && (id != ID_USAC_LFE)) {
  ------------------
  |  |   29|   183k|#define ID_USAC_LFE 2
  ------------------
  |  Branch (880:9): [True: 183k, False: 15.5k]
  |  Branch (880:44): [True: 181k, False: 1.61k]
  ------------------
  881|   454k|      for (ch = 0, chn = left; chn <= right; ch++, chn++) {
  ------------------
  |  Branch (881:32): [True: 273k, False: 181k]
  ------------------
  882|   273k|        if (pstr_core_coder->core_mode[ch] == CORE_MODE_FD) {
  ------------------
  |  |   97|   273k|#define CORE_MODE_FD 0
  ------------------
  |  Branch (882:13): [True: 198k, False: 74.2k]
  ------------------
  883|   198k|          err_code = ixheaacd_tns_apply(usac_data, usac_data->coef_fix[chn],
  884|   198k|                                        pstr_core_coder->max_sfb[ch],
  885|   198k|                                        usac_data->pstr_sfb_info[chn], usac_data->pstr_tns[chn]);
  886|   198k|          if (err_code) return err_code;
  ------------------
  |  Branch (886:15): [True: 0, False: 198k]
  ------------------
  887|   198k|        }
  888|   273k|      }
  889|   181k|    }
  890|       |
  891|   198k|    if (nr_core_coder_channels == 2 && pstr_core_coder->core_mode[0] == 0 &&
  ------------------
  |  Branch (891:9): [True: 105k, False: 93.1k]
  |  Branch (891:40): [True: 87.8k, False: 17.9k]
  ------------------
  892|  87.8k|        pstr_core_coder->core_mode[1] == 0) {
  ------------------
  |  Branch (892:9): [True: 70.9k, False: 16.8k]
  ------------------
  893|  70.9k|      if (pstr_core_coder->ms_mask_present[0] == 3) {
  ------------------
  |  Branch (893:11): [True: 13.9k, False: 56.9k]
  ------------------
  894|  13.9k|        ixheaacd_cplx_pred_upmixing(usac_data, usac_data->coef_fix[left],
  895|  13.9k|                                    usac_data->coef_fix[right], pstr_core_coder, left);
  896|       |
  897|  56.9k|      } else if (pstr_core_coder->ms_mask_present[0] > 0) {
  ------------------
  |  Branch (897:18): [True: 9.00k, False: 47.9k]
  ------------------
  898|  9.00k|        ixheaacd_ms_stereo(usac_data, usac_data->coef_fix[right], usac_data->coef_fix[left], left,
  899|  9.00k|                           pstr_core_coder->max_sfb[right] > pstr_core_coder->max_sfb[left]
  ------------------
  |  Branch (899:28): [True: 87, False: 8.91k]
  ------------------
  900|  9.00k|                               ? pstr_core_coder->max_sfb[right]
  901|  9.00k|                               : pstr_core_coder->max_sfb[left]);
  902|  9.00k|      }
  903|       |
  904|  70.9k|      if (pstr_core_coder->tns_on_lr) {
  ------------------
  |  Branch (904:11): [True: 14.2k, False: 56.7k]
  ------------------
  905|  42.7k|        for (ch = 0, chn = left; chn <= right; ch++, chn++) {
  ------------------
  |  Branch (905:34): [True: 28.4k, False: 14.2k]
  ------------------
  906|  28.4k|          if (pstr_core_coder->core_mode[ch] == CORE_MODE_FD) {
  ------------------
  |  |   97|  28.4k|#define CORE_MODE_FD 0
  ------------------
  |  Branch (906:15): [True: 28.4k, False: 0]
  ------------------
  907|  28.4k|            err_code = ixheaacd_tns_apply(
  908|  28.4k|                usac_data, usac_data->coef_fix[chn], pstr_core_coder->max_sfb[ch],
  909|  28.4k|                usac_data->pstr_sfb_info[chn], usac_data->pstr_tns[chn]);
  910|  28.4k|            if (err_code) return err_code;
  ------------------
  |  Branch (910:17): [True: 0, False: 28.4k]
  ------------------
  911|  28.4k|          }
  912|  28.4k|        }
  913|  14.2k|      }
  914|       |
  915|  70.9k|      ixheaacd_usac_cplx_save_prev(usac_data->pstr_sfb_info[left], usac_data->coef_fix[left],
  916|  70.9k|                                   usac_data->coef_fix[right], usac_data->coef_save[left],
  917|  70.9k|                                   usac_data->coef_save[right]);
  918|  70.9k|    }
  919|   198k|    if (usac_data->ec_flag) {
  ------------------
  |  Branch (919:9): [True: 0, False: 198k]
  ------------------
  920|      0|      for (chn = left; chn <= right; chn++) {
  ------------------
  |  Branch (920:24): [True: 0, False: 0]
  ------------------
  921|      0|        if (pstr_core_coder->core_mode[chn] == CORE_MODE_FD &&
  ------------------
  |  |   97|      0|#define CORE_MODE_FD 0
  ------------------
  |  Branch (921:13): [True: 0, False: 0]
  ------------------
  922|      0|            usac_data->td_frame_prev[chn] == CORE_MODE_LPD) {
  ------------------
  |  |   98|      0|#define CORE_MODE_LPD 1
  ------------------
  |  Branch (922:13): [True: 0, False: 0]
  ------------------
  923|      0|          memcpy(usac_data->str_error_concealment[chn].spectral_coeff, usac_data->coef_fix[chn],
  924|      0|                 sizeof(usac_data->str_error_concealment[chn].spectral_coeff));
  925|      0|          memcpy(usac_data->str_error_concealment[chn].q_spec_coeff, usac_data->spec_scale[chn],
  926|      0|                 sizeof(usac_data->spec_scale[chn]));
  927|      0|          usac_data->str_error_concealment[chn].win_seq = usac_data->window_sequence[chn];
  928|      0|          usac_data->str_error_concealment[chn].win_shape = usac_data->window_shape[chn];
  929|      0|          usac_data->str_error_concealment[chn].win_shape_prev =
  930|      0|              usac_data->window_shape_prev[chn];
  931|      0|          usac_data->str_error_concealment[chn].td_frame_prev = usac_data->td_frame_prev[chn];
  932|      0|          usac_data->str_error_concealment[chn].fac_data_present =
  933|      0|              usac_data->fac_data_present[chn];
  934|      0|        }
  935|      0|      }
  936|      0|      if (usac_data->frame_ok && usac_data->ec_flag) {
  ------------------
  |  Branch (936:11): [True: 0, False: 0]
  |  Branch (936:34): [True: 0, False: 0]
  ------------------
  937|      0|        memcpy(usac_data->max_sfb, pstr_core_coder->max_sfb, sizeof(pstr_core_coder->max_sfb));
  938|      0|      }
  939|      0|    }
  940|   198k|  } else {
  941|      0|    left = chan_offset;
  942|      0|    right = chan_offset;
  943|      0|    if (nr_core_coder_channels == 2) right = chan_offset + 1;
  ------------------
  |  Branch (943:9): [True: 0, False: 0]
  ------------------
  944|      0|    if (usac_data->ec_flag == 1) {
  ------------------
  |  Branch (944:9): [True: 0, False: 0]
  ------------------
  945|      0|      WORD32 err = 0;
  946|      0|      usac_data->frame_ok = 0;
  947|      0|      for (ch = left; ch <= right; ch++) {
  ------------------
  |  Branch (947:23): [True: 0, False: 0]
  ------------------
  948|      0|        if (usac_data->td_frame_prev[ch] == CORE_MODE_LPD) {
  ------------------
  |  |   98|      0|#define CORE_MODE_LPD 1
  ------------------
  |  Branch (948:13): [True: 0, False: 0]
  ------------------
  949|      0|          usac_data->fac_data_present[ch] = 0;
  950|      0|          usac_data->str_error_concealment[ch].pstr_ec_scratch =
  951|      0|              (ia_ec_scratch_str *)&usac_data->str_error_concealment[ch].str_ec_scratch;
  952|      0|          usac_data->core_mode = usac_data->td_frame_prev[ch];
  953|      0|          usac_data->present_chan = ch;
  954|      0|          ixheaacd_usac_apply_ec(usac_data, NULL, ch);
  955|      0|          err = ixheaacd_lpd_dec(usac_data, usac_data->str_tddec[ch],
  956|      0|                                 &usac_data->td_frame_data_prev[ch],
  957|      0|                                 usac_data->time_sample_vector[ch], usac_data->first_lpd_flag, 0,
  958|      0|                                 usac_data->bpf_control_info);
  959|       |
  960|      0|          if (err) return err;
  ------------------
  |  Branch (960:15): [True: 0, False: 0]
  ------------------
  961|       |
  962|      0|          for (k = 0; k < usac_data->ccfl; k++) {
  ------------------
  |  Branch (962:23): [True: 0, False: 0]
  ------------------
  963|      0|            usac_data->output_data_ptr[ch][k] =
  964|      0|                (WORD32)(usac_data->time_sample_vector[ch][k] * (FLOAT32)((WORD64)1 << 15));
  965|      0|          }
  966|       |
  967|      0|          usac_data->window_shape[ch] = WIN_SEL_0;
  ------------------
  |  |   91|      0|#define WIN_SEL_0 0
  ------------------
  968|      0|          usac_data->window_shape_prev[ch] = usac_data->window_shape[ch];
  969|      0|          usac_data->window_sequence_last[ch] = EIGHT_SHORT_SEQUENCE;
  ------------------
  |  |  102|      0|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  970|      0|        } else {
  971|      0|          pstr_core_coder->core_mode[ch] = CORE_MODE_FD;
  ------------------
  |  |   97|      0|#define CORE_MODE_FD 0
  ------------------
  972|      0|        }
  973|      0|      }
  974|      0|    }
  975|      0|  }
  976|       |
  977|   502k|  for (ch = left; ch <= right; ch++) {
  ------------------
  |  Branch (977:19): [True: 303k, False: 198k]
  ------------------
  978|   303k|    FLOAT32 *ptr_scratch =
  979|   303k|        (FLOAT32 *)usac_data->str_error_concealment[ch].str_ec_scratch.spec_coeff;
  980|   303k|    if ((pstr_core_coder->core_mode[ch] != CORE_MODE_LPD &&
  ------------------
  |  |   98|   606k|#define CORE_MODE_LPD 1
  ------------------
  |  Branch (980:10): [True: 247k, False: 55.9k]
  ------------------
  981|   247k|         usac_data->td_frame_prev[ch] != CORE_MODE_LPD && usac_data->ec_flag) ||
  ------------------
  |  |   98|   550k|#define CORE_MODE_LPD 1
  ------------------
  |  Branch (981:10): [True: 219k, False: 27.8k]
  |  Branch (981:59): [True: 0, False: 219k]
  ------------------
  982|   303k|        (pstr_core_coder->core_mode[ch] == CORE_MODE_FD && usac_data->ec_flag == 0)) {
  ------------------
  |  |   97|   606k|#define CORE_MODE_FD 0
  ------------------
  |  Branch (982:10): [True: 247k, False: 55.9k]
  |  Branch (982:60): [True: 247k, False: 0]
  ------------------
  983|   247k|      if (usac_data->tw_mdct[elem_idx]) {
  ------------------
  |  Branch (983:11): [True: 0, False: 247k]
  ------------------
  984|      0|        err_code = -1;
  985|      0|        return err_code;
  986|       |
  987|   247k|      } else {
  988|   247k|        if (usac_data->frame_ok == 0) {
  ------------------
  |  Branch (988:13): [True: 0, False: 247k]
  ------------------
  989|      0|          usac_data->fac_data_present[ch] = 0;
  990|      0|        }
  991|   247k|        err_code = ixheaacd_fd_frm_dec(usac_data, ch);
  992|   247k|        if (err_code == -1) return err_code;
  ------------------
  |  Branch (992:13): [True: 78, False: 247k]
  ------------------
  993|   247k|        if (usac_data->ec_flag) {
  ------------------
  |  Branch (993:13): [True: 0, False: 247k]
  ------------------
  994|      0|          if (usac_data->str_error_concealment[ch].fade_idx < MAX_FADE_FRAMES) {
  ------------------
  |  |   30|      0|#define MAX_FADE_FRAMES (8)
  ------------------
  |  Branch (994:15): [True: 0, False: 0]
  ------------------
  995|      0|            FLOAT32 fade_fac = (FLOAT32)(ONE_BY_TWO_POW_15)*ia_ec_fade_factors
  ------------------
  |  |  146|      0|#define ONE_BY_TWO_POW_15 0.000030517578125
  ------------------
  996|      0|                [usac_data->str_error_concealment[ch].fade_idx];
  997|      0|            for (k = 0; k < usac_data->ccfl; k++) {
  ------------------
  |  Branch (997:25): [True: 0, False: 0]
  ------------------
  998|      0|              usac_data->time_sample_vector[ch][k] =
  999|      0|                  (FLOAT32)((FLOAT32)usac_data->output_data_ptr[ch][k] * fade_fac);
 1000|      0|            }
 1001|      0|          } else {
 1002|      0|            memset(&usac_data->time_sample_vector[ch][0], 0,
 1003|      0|                   usac_data->ccfl * sizeof(usac_data->time_sample_vector[ch][0]));
 1004|      0|          }
 1005|   247k|        } else {
 1006|   249M|          for (k = 0; k < usac_data->ccfl; k++) {
  ------------------
  |  Branch (1006:23): [True: 248M, False: 247k]
  ------------------
 1007|   248M|            usac_data->time_sample_vector[ch][k] =
 1008|   248M|                (FLOAT32)((FLOAT32)usac_data->output_data_ptr[ch][k] *
 1009|   248M|                          (FLOAT32)(ONE_BY_TWO_POW_15));
  ------------------
  |  |  146|   248M|#define ONE_BY_TWO_POW_15 0.000030517578125
  ------------------
 1010|   248M|          }
 1011|   247k|        }
 1012|   247k|      }
 1013|   247k|      usac_data->window_shape_prev[ch] = usac_data->window_shape[ch];
 1014|   247k|      usac_data->window_sequence_last[ch] = usac_data->window_sequence[ch];
 1015|   247k|    } else {
 1016|  55.9k|      if (usac_data->ec_flag) {
  ------------------
  |  Branch (1016:11): [True: 0, False: 55.9k]
  ------------------
 1017|      0|        usac_data->str_error_concealment[ch].prev_frame_ok[0] =
 1018|      0|            usac_data->str_error_concealment[ch].prev_frame_ok[1];
 1019|      0|        usac_data->str_error_concealment[ch].prev_frame_ok[1] = usac_data->frame_ok;
 1020|       |
 1021|      0|        if (usac_data->str_error_concealment[ch].fade_idx < MAX_FADE_FRAMES) {
  ------------------
  |  |   30|      0|#define MAX_FADE_FRAMES (8)
  ------------------
  |  Branch (1021:13): [True: 0, False: 0]
  ------------------
 1022|      0|          FLOAT32 fade_fac =
 1023|      0|              (FLOAT32)(ONE_BY_TWO_POW_15)*ia_ec_fade_factors[usac_data->str_error_concealment[ch]
  ------------------
  |  |  146|      0|#define ONE_BY_TWO_POW_15 0.000030517578125
  ------------------
 1024|      0|                                                                  .fade_idx];
 1025|      0|          for (k = 0; k < usac_data->ccfl; k++) {
  ------------------
  |  Branch (1025:23): [True: 0, False: 0]
  ------------------
 1026|      0|            usac_data->time_sample_vector[ch][k] =
 1027|      0|                (FLOAT32)((FLOAT32)usac_data->output_data_ptr[ch][k] * fade_fac);
 1028|      0|          }
 1029|      0|        } else {
 1030|      0|          memset(&usac_data->time_sample_vector[ch][0], 0,
 1031|      0|                 usac_data->ccfl * sizeof(usac_data->time_sample_vector[ch][0]));
 1032|      0|        }
 1033|       |
 1034|      0|        memcpy(ptr_scratch, usac_data->time_sample_vector[ch],
 1035|      0|               usac_data->ccfl * sizeof(ptr_scratch[0]));
 1036|      0|        memcpy(usac_data->time_sample_vector[ch], usac_data->time_sample_vector_prev[ch],
 1037|      0|               usac_data->ccfl * sizeof(usac_data->time_sample_vector[ch][0]));
 1038|      0|        memcpy(usac_data->time_sample_vector_prev[ch], ptr_scratch,
 1039|      0|               usac_data->ccfl * sizeof(ptr_scratch[0]));
 1040|  55.9k|      } else {
 1041|  51.1M|        for (k = 0; k < usac_data->ccfl; k++) {
  ------------------
  |  Branch (1041:21): [True: 51.1M, False: 55.9k]
  ------------------
 1042|  51.1M|          usac_data->time_sample_vector[ch][k] =
 1043|  51.1M|              (FLOAT32)((FLOAT32)usac_data->output_data_ptr[ch][k] *
 1044|  51.1M|                        (FLOAT32)(ONE_BY_TWO_POW_15));
  ------------------
  |  |  146|  51.1M|#define ONE_BY_TWO_POW_15 0.000030517578125
  ------------------
 1045|  51.1M|        }
 1046|  55.9k|      }
 1047|  55.9k|    }
 1048|   303k|    if (usac_data->ec_flag) {
  ------------------
  |  Branch (1048:9): [True: 0, False: 303k]
  ------------------
 1049|      0|      usac_data->window_sequence[ch] = usac_data->str_error_concealment[ch].win_seq;
 1050|      0|      usac_data->window_shape[ch] = usac_data->str_error_concealment[ch].win_shape;
 1051|      0|      if (usac_data->first_frame == 0) {
  ------------------
  |  Branch (1051:11): [True: 0, False: 0]
  ------------------
 1052|      0|        usac_data->window_shape_prev[ch] = usac_data->window_shape[ch];
 1053|      0|        usac_data->window_sequence_last[ch] = usac_data->window_sequence[ch];
 1054|      0|      }
 1055|      0|    }
 1056|   303k|  }
 1057|   198k|  if (usac_data->ec_flag) {
  ------------------
  |  Branch (1057:7): [True: 0, False: 198k]
  ------------------
 1058|      0|    usac_data->first_frame = 0;
 1059|      0|    if (usac_data->frame_ok == 1) {
  ------------------
  |  Branch (1059:9): [True: 0, False: 0]
  ------------------
 1060|      0|      for (ch = 0, chn = left; chn <= right; chn++, ch++)
  ------------------
  |  Branch (1060:32): [True: 0, False: 0]
  ------------------
 1061|      0|        usac_data->td_frame_prev[chn] = pstr_core_coder->core_mode[ch];
 1062|      0|    }
 1063|   198k|  } else {
 1064|   501k|    for (ch = 0, chn = left; chn <= right; chn++, ch++)
  ------------------
  |  Branch (1064:30): [True: 303k, False: 198k]
  ------------------
 1065|   303k|      usac_data->td_frame_prev[chn] = pstr_core_coder->core_mode[ch];
 1066|   198k|  }
 1067|       |
 1068|   198k|  return 0;
 1069|   198k|}
ixheaacd_ext_ch_ele.c:ixheaacd_read_ms_mask:
  271|  34.2k|    ia_bit_buf_struct *it_bit_buff, WORD32 chn) {
  272|  34.2k|  WORD32 g, sfb;
  273|  34.2k|  WORD32 ms_mask_present;
  274|       |
  275|  34.2k|  UWORD8 *sfb_group = usac_data->group_dis[chn];
  276|  34.2k|  UWORD8 max_sfb = pstr_core_coder->max_sfb_ste;
  277|  34.2k|  UWORD8 *ms_used = usac_data->ms_used[chn];
  278|  34.2k|  ia_sfb_info_struct *info = usac_data->pstr_sfb_info[chn];
  279|       |
  280|  34.2k|  ms_mask_present = ixheaacd_read_bits_buf(it_bit_buff, 2);
  281|       |
  282|  34.2k|  switch (ms_mask_present) {
  ------------------
  |  Branch (282:11): [True: 34.2k, False: 0]
  ------------------
  283|  11.0k|    case 0:
  ------------------
  |  Branch (283:5): [True: 11.0k, False: 23.1k]
  ------------------
  284|       |
  285|  11.0k|      break;
  286|       |
  287|    714|    case 1:
  ------------------
  |  Branch (287:5): [True: 714, False: 33.5k]
  ------------------
  288|  3.77k|      for (g = 0; g < info->max_win_len; g = *sfb_group++) {
  ------------------
  |  Branch (288:19): [True: 3.05k, False: 714]
  ------------------
  289|  20.5k|        for (sfb = 0; sfb < max_sfb; sfb++) {
  ------------------
  |  Branch (289:23): [True: 17.4k, False: 3.05k]
  ------------------
  290|  17.4k|          *ms_used = ixheaacd_read_bits_buf(it_bit_buff, 1);
  291|  17.4k|          ms_used++;
  292|  17.4k|        }
  293|  32.6k|        for (; sfb < info->sfb_per_sbk; sfb++) {
  ------------------
  |  Branch (293:16): [True: 29.5k, False: 3.05k]
  ------------------
  294|  29.5k|          *ms_used = 0;
  295|  29.5k|          ms_used++;
  296|  29.5k|        }
  297|  3.05k|      }
  298|       |
  299|    714|      break;
  300|  8.31k|    case 2:
  ------------------
  |  Branch (300:5): [True: 8.31k, False: 25.9k]
  ------------------
  301|  18.5k|      for (g = 0; g < info->max_win_len; g = *sfb_group++)
  ------------------
  |  Branch (301:19): [True: 10.2k, False: 8.31k]
  ------------------
  302|   380k|        for (sfb = 0; sfb < info->sfb_per_sbk; sfb++) *ms_used++ = 1;
  ------------------
  |  Branch (302:23): [True: 370k, False: 10.2k]
  ------------------
  303|  8.31k|      break;
  304|       |
  305|  14.1k|    case 3:
  ------------------
  |  Branch (305:5): [True: 14.1k, False: 20.1k]
  ------------------
  306|       |
  307|  14.1k|      ixheaacd_cplx_pred_data(usac_data, pstr_core_coder, info->num_groups,
  308|  14.1k|                              it_bit_buff);
  309|  14.1k|      return 3;
  310|  34.2k|  }
  311|       |
  312|  2.75M|  for (sfb = 0; sfb < SFB_NUM_MAX; sfb++) {
  ------------------
  |  |  114|  2.75M|#define SFB_NUM_MAX ((NSFB_SHORT + 1) * MAX_SHORT_IN_LONG_BLOCK)
  |  |  ------------------
  |  |  |  |  107|  2.75M|#define NSFB_SHORT 16
  |  |  ------------------
  |  |               #define SFB_NUM_MAX ((NSFB_SHORT + 1) * MAX_SHORT_IN_LONG_BLOCK)
  |  |  ------------------
  |  |  |  |  108|  2.75M|#define MAX_SHORT_IN_LONG_BLOCK 8
  |  |  ------------------
  ------------------
  |  Branch (312:17): [True: 2.73M, False: 20.1k]
  ------------------
  313|  2.73M|    usac_data->alpha_q_re_prev[sfb] = 0;
  314|  2.73M|    usac_data->alpha_q_im_prev[sfb] = 0;
  315|  2.73M|  }
  316|  20.1k|  return ms_mask_present;
  317|  34.2k|}
ixheaacd_ext_ch_ele.c:ixheaacd_cplx_pred_data:
  164|  14.1k|    ia_bit_buf_struct *it_bit_buff) {
  165|  14.1k|  ia_huff_code_book_struct *ptr_huff_code_book = &ixheaacd_book;
  166|  14.1k|  const ia_huff_code_word_struct *ptr_huff_code_word =
  167|  14.1k|      ptr_huff_code_book->pstr_huff_code_word;
  168|  14.1k|  WORD32 cplx_pred_all;
  169|  14.1k|  WORD32 delta_code_time;
  170|  14.1k|  WORD32 g, sfb;
  171|  14.1k|  WORD32 dpcm_alpha, last_alpha_q_re, last_alpha_q_im;
  172|  14.1k|  UWORD8 max_sfb_ste = pstr_core_coder->max_sfb_ste;
  173|       |
  174|  14.1k|  WORD32(*alpha_q_re)[SFB_NUM_MAX] = usac_data->alpha_q_re;
  175|  14.1k|  WORD32(*alpha_q_im)[SFB_NUM_MAX] = usac_data->alpha_q_im;
  176|  14.1k|  WORD32 *alpha_q_re_prev = usac_data->alpha_q_re_prev;
  177|  14.1k|  WORD32 *alpha_q_im_prev = usac_data->alpha_q_im_prev;
  178|  14.1k|  UWORD8(*cplx_pred_used)[SFB_NUM_MAX] = usac_data->cplx_pred_used;
  179|       |
  180|  14.1k|  cplx_pred_all = ixheaacd_read_bits_buf(it_bit_buff, 1);
  181|       |
  182|  14.1k|  if (cplx_pred_all == 0) {
  ------------------
  |  Branch (182:7): [True: 9.18k, False: 4.98k]
  ------------------
  183|  59.2k|    for (g = 0; g < num_window_groups; g++) {
  ------------------
  |  Branch (183:17): [True: 50.0k, False: 9.18k]
  ------------------
  184|   138k|      for (sfb = 0; sfb < max_sfb_ste; sfb += SFB_PER_PRED_BAND) {
  ------------------
  |  |  120|  88.1k|#define SFB_PER_PRED_BAND 2
  ------------------
  |  Branch (184:21): [True: 88.1k, False: 50.0k]
  ------------------
  185|  88.1k|        cplx_pred_used[g][sfb] = ixheaacd_read_bits_buf(it_bit_buff, 1);
  186|       |
  187|  88.1k|        if (sfb + 1 < max_sfb_ste)
  ------------------
  |  Branch (187:13): [True: 38.6k, False: 49.5k]
  ------------------
  188|  38.6k|          cplx_pred_used[g][sfb + 1] = cplx_pred_used[g][sfb];
  189|  88.1k|      }
  190|  6.72M|      for (sfb = max_sfb_ste; sfb < SFB_NUM_MAX; sfb++)
  ------------------
  |  |  114|  6.72M|#define SFB_NUM_MAX ((NSFB_SHORT + 1) * MAX_SHORT_IN_LONG_BLOCK)
  |  |  ------------------
  |  |  |  |  107|  6.72M|#define NSFB_SHORT 16
  |  |  ------------------
  |  |               #define SFB_NUM_MAX ((NSFB_SHORT + 1) * MAX_SHORT_IN_LONG_BLOCK)
  |  |  ------------------
  |  |  |  |  108|  6.72M|#define MAX_SHORT_IN_LONG_BLOCK 8
  |  |  ------------------
  ------------------
  |  Branch (190:31): [True: 6.67M, False: 50.0k]
  ------------------
  191|  6.67M|        cplx_pred_used[g][sfb] = 0;
  192|  50.0k|    }
  193|  9.18k|  } else {
  194|  13.7k|    for (g = 0; g < num_window_groups; g++) {
  ------------------
  |  Branch (194:17): [True: 8.72k, False: 4.98k]
  ------------------
  195|  90.2k|      for (sfb = 0; sfb < max_sfb_ste; sfb++) cplx_pred_used[g][sfb] = 1;
  ------------------
  |  Branch (195:21): [True: 81.4k, False: 8.72k]
  ------------------
  196|       |
  197|  1.11M|      for (sfb = max_sfb_ste; sfb < SFB_NUM_MAX; sfb++)
  ------------------
  |  |  114|  1.11M|#define SFB_NUM_MAX ((NSFB_SHORT + 1) * MAX_SHORT_IN_LONG_BLOCK)
  |  |  ------------------
  |  |  |  |  107|  1.11M|#define NSFB_SHORT 16
  |  |  ------------------
  |  |               #define SFB_NUM_MAX ((NSFB_SHORT + 1) * MAX_SHORT_IN_LONG_BLOCK)
  |  |  ------------------
  |  |  |  |  108|  1.11M|#define MAX_SHORT_IN_LONG_BLOCK 8
  |  |  ------------------
  ------------------
  |  Branch (197:31): [True: 1.10M, False: 8.72k]
  ------------------
  198|  1.10M|        cplx_pred_used[g][sfb] = 0;
  199|  8.72k|    }
  200|  4.98k|  }
  201|       |
  202|  14.1k|  pstr_core_coder->pred_dir = ixheaacd_read_bits_buf(it_bit_buff, 1);
  203|       |
  204|  14.1k|  pstr_core_coder->complex_coef = ixheaacd_read_bits_buf(it_bit_buff, 1);
  205|       |
  206|  14.1k|  if (pstr_core_coder->complex_coef) {
  ------------------
  |  Branch (206:7): [True: 6.93k, False: 7.23k]
  ------------------
  207|  6.93k|    if (usac_data->usac_independency_flg)
  ------------------
  |  Branch (207:9): [True: 6.29k, False: 632]
  ------------------
  208|  6.29k|      pstr_core_coder->use_prev_frame = 0;
  209|    632|    else
  210|    632|      pstr_core_coder->use_prev_frame = ixheaacd_read_bits_buf(it_bit_buff, 1);
  211|  6.93k|  }
  212|       |
  213|  14.1k|  if (usac_data->usac_independency_flg)
  ------------------
  |  Branch (213:7): [True: 7.20k, False: 6.96k]
  ------------------
  214|  7.20k|    delta_code_time = 0;
  215|  6.96k|  else
  216|  6.96k|    delta_code_time = ixheaacd_read_bits_buf(it_bit_buff, 1);
  217|       |
  218|  72.9k|  for (g = 0; g < num_window_groups; g++) {
  ------------------
  |  Branch (218:15): [True: 58.7k, False: 14.1k]
  ------------------
  219|   191k|    for (sfb = 0; sfb < max_sfb_ste; sfb += SFB_PER_PRED_BAND) {
  ------------------
  |  |  120|   132k|#define SFB_PER_PRED_BAND 2
  ------------------
  |  Branch (219:19): [True: 132k, False: 58.7k]
  ------------------
  220|   132k|      if (delta_code_time == 1) {
  ------------------
  |  Branch (220:11): [True: 1.21k, False: 131k]
  ------------------
  221|  1.21k|        last_alpha_q_re = alpha_q_re_prev[sfb];
  222|  1.21k|        last_alpha_q_im = alpha_q_im_prev[sfb];
  223|   131k|      } else {
  224|   131k|        if (sfb > 0) {
  ------------------
  |  Branch (224:13): [True: 73.6k, False: 57.8k]
  ------------------
  225|  73.6k|          last_alpha_q_re = alpha_q_re[g][sfb - 1];
  226|  73.6k|          last_alpha_q_im = alpha_q_im[g][sfb - 1];
  227|  73.6k|        } else {
  228|  57.8k|          last_alpha_q_re = last_alpha_q_im = 0;
  229|  57.8k|        }
  230|   131k|      }
  231|       |
  232|   132k|      if (cplx_pred_used[g][sfb] == 1) {
  ------------------
  |  Branch (232:11): [True: 86.5k, False: 46.1k]
  ------------------
  233|  86.5k|        dpcm_alpha =
  234|  86.5k|            -ixheaacd_huff_codeword(ptr_huff_code_word, 0, it_bit_buff) + 60;
  235|  86.5k|        alpha_q_re[g][sfb] = dpcm_alpha + last_alpha_q_re;
  236|       |
  237|  86.5k|        if (pstr_core_coder->complex_coef) {
  ------------------
  |  Branch (237:13): [True: 61.8k, False: 24.7k]
  ------------------
  238|  61.8k|          dpcm_alpha =
  239|  61.8k|              -ixheaacd_huff_codeword(ptr_huff_code_word, 0, it_bit_buff) + 60;
  240|  61.8k|          alpha_q_im[g][sfb] = dpcm_alpha + last_alpha_q_im;
  241|  61.8k|        } else {
  242|  24.7k|          alpha_q_im[g][sfb] = 0;
  243|  24.7k|        }
  244|  86.5k|      } else {
  245|  46.1k|        alpha_q_re[g][sfb] = 0;
  246|  46.1k|        alpha_q_im[g][sfb] = 0;
  247|  46.1k|      }
  248|       |
  249|   132k|      if ((sfb + 1) < max_sfb_ste) {
  ------------------
  |  Branch (249:11): [True: 75.4k, False: 57.2k]
  ------------------
  250|  75.4k|        alpha_q_re[g][sfb + 1] = alpha_q_re[g][sfb];
  251|  75.4k|        alpha_q_im[g][sfb + 1] = alpha_q_im[g][sfb];
  252|  75.4k|      }
  253|       |
  254|   132k|      alpha_q_re_prev[sfb] = alpha_q_re[g][sfb];
  255|   132k|      alpha_q_im_prev[sfb] = alpha_q_im[g][sfb];
  256|   132k|    }
  257|  7.83M|    for (sfb = max_sfb_ste; sfb < SFB_NUM_MAX; sfb++) {
  ------------------
  |  |  114|  7.83M|#define SFB_NUM_MAX ((NSFB_SHORT + 1) * MAX_SHORT_IN_LONG_BLOCK)
  |  |  ------------------
  |  |  |  |  107|  7.83M|#define NSFB_SHORT 16
  |  |  ------------------
  |  |               #define SFB_NUM_MAX ((NSFB_SHORT + 1) * MAX_SHORT_IN_LONG_BLOCK)
  |  |  ------------------
  |  |  |  |  108|  7.83M|#define MAX_SHORT_IN_LONG_BLOCK 8
  |  |  ------------------
  ------------------
  |  Branch (257:29): [True: 7.78M, False: 58.7k]
  ------------------
  258|  7.78M|      alpha_q_re[g][sfb] = 0;
  259|  7.78M|      alpha_q_im[g][sfb] = 0;
  260|  7.78M|      alpha_q_re_prev[sfb] = 0;
  261|  7.78M|      alpha_q_im_prev[sfb] = 0;
  262|  7.78M|    }
  263|  58.7k|  }
  264|       |
  265|  14.1k|  return;
  266|  14.1k|}
ixheaacd_ext_ch_ele.c:ixheaacd_cplx_prev_mdct_dmx:
  582|  70.9k|                                        WORD32 *dmx_re_prev, WORD32 pred_dir) {
  583|  70.9k|  WORD32 offs, i;
  584|  70.9k|  WORD32 factor = 1;
  585|  70.9k|  if (pred_dir) factor = -1;
  ------------------
  |  Branch (585:7): [True: 13.2k, False: 57.7k]
  ------------------
  586|       |
  587|  70.9k|  offs = pstr_sfb_info->samp_per_bk - pstr_sfb_info->bins_per_sbk;
  588|       |
  589|  44.2M|  for (i = 0; i < pstr_sfb_info->bins_per_sbk; i++)
  ------------------
  |  Branch (589:15): [True: 44.1M, False: 70.9k]
  ------------------
  590|  44.1M|    dmx_re_prev[i] = (WORD32)(((WORD64)l_spec[i + offs] +
  591|  44.1M|                               ((WORD64)factor * (WORD64)r_spec[i + offs])) >>
  592|  44.1M|                              1);
  593|  70.9k|}
ixheaacd_ext_ch_ele.c:ixheaacd_cplx_pred_upmixing:
  480|  13.9k|    ia_usac_tmp_core_coder_struct *pstr_core_coder, WORD32 chn) {
  481|  13.9k|  ia_sfb_info_struct *pstr_sfb_info = usac_data->pstr_sfb_info[chn];
  482|  13.9k|  WORD32 *dmx_re = &usac_data->scratch_buffer[0];
  483|  13.9k|  WORD32 *dmx_im = &usac_data->x_ac_dec[0];
  484|       |
  485|  13.9k|  WORD32 grp, sfb, grp_len, i = 0, k;
  486|  13.9k|  WORD32 *dmx_re_prev = usac_data->dmx_re_prev;
  487|  13.9k|  WORD32(*alpha_q_re)[SFB_NUM_MAX] = usac_data->alpha_q_re;
  488|  13.9k|  WORD32(*alpha_q_im)[SFB_NUM_MAX] = usac_data->alpha_q_im;
  489|       |
  490|  13.9k|  UWORD8(*cplx_pred_used)[SFB_NUM_MAX] = usac_data->cplx_pred_used;
  491|       |
  492|  13.9k|  WORD32 alpha_q_re_temp;
  493|  13.9k|  WORD32 alpha_q_im_temp;
  494|  13.9k|  WORD32 factor = 1;
  495|       |
  496|  13.9k|  if (pstr_core_coder->pred_dir) factor = -1;
  ------------------
  |  Branch (496:7): [True: 13.2k, False: 724]
  ------------------
  497|       |
  498|  72.2k|  for (grp = 0; grp < pstr_sfb_info->num_groups; grp++) {
  ------------------
  |  Branch (498:17): [True: 58.2k, False: 13.9k]
  ------------------
  499|   168k|    for (grp_len = 0; grp_len < pstr_sfb_info->group_len[grp]; grp_len++) {
  ------------------
  |  Branch (499:23): [True: 109k, False: 58.2k]
  ------------------
  500|  1.76M|      for (sfb = 0; sfb < pstr_sfb_info->sfb_per_sbk; sfb++) {
  ------------------
  |  Branch (500:21): [True: 1.65M, False: 109k]
  ------------------
  501|  1.65M|        if (cplx_pred_used[grp][sfb] == 1) {
  ------------------
  |  Branch (501:13): [True: 608k, False: 1.04M]
  ------------------
  502|   608k|          memcpy(&dmx_re[i], &l_spec[i],
  503|   608k|                 pstr_sfb_info->sfb_width[sfb] * sizeof(WORD32));
  504|   608k|          i += pstr_sfb_info->sfb_width[sfb];
  505|   608k|        }
  506|       |
  507|  1.04M|        else {
  508|  10.6M|          for (k = 0; k < pstr_sfb_info->sfb_width[sfb]; k++, i++) {
  ------------------
  |  Branch (508:23): [True: 9.62M, False: 1.04M]
  ------------------
  509|  9.62M|            dmx_re[i] = (WORD32)(
  510|  9.62M|                ((WORD64)l_spec[i] + ((WORD64)factor * (WORD64)r_spec[i])) >>
  511|  9.62M|                1);
  512|  9.62M|          }
  513|  1.04M|        }
  514|  1.65M|      }
  515|   109k|    }
  516|  58.2k|  }
  517|       |
  518|  13.9k|  memset(dmx_im, 0, sizeof(WORD32) * BLOCK_LEN_LONG);
  ------------------
  |  |   68|  13.9k|#define BLOCK_LEN_LONG 1024
  ------------------
  519|       |
  520|  13.9k|  if (pstr_core_coder->complex_coef) {
  ------------------
  |  Branch (520:7): [True: 6.76k, False: 7.21k]
  ------------------
  521|  6.76k|    WORD32 *p_dmx_re_prev =
  522|  6.76k|        pstr_core_coder->use_prev_frame ? dmx_re_prev : NULL;
  ------------------
  |  Branch (522:9): [True: 517, False: 6.24k]
  ------------------
  523|  6.76k|    ixheaacd_estimate_dmx_im(dmx_re, p_dmx_re_prev, dmx_im, pstr_sfb_info,
  524|  6.76k|                             usac_data->window_sequence[chn],
  525|  6.76k|                             usac_data->window_shape[chn],
  526|  6.76k|                             usac_data->window_shape_prev[chn]);
  527|       |
  528|  23.1k|    for (grp = 0, i = 0; grp < pstr_sfb_info->num_groups; grp++) {
  ------------------
  |  Branch (528:26): [True: 16.3k, False: 6.76k]
  ------------------
  529|  69.0k|      for (grp_len = 0; grp_len < pstr_sfb_info->group_len[grp]; grp_len++) {
  ------------------
  |  Branch (529:25): [True: 52.6k, False: 16.3k]
  ------------------
  530|   847k|        for (sfb = 0; sfb < pstr_sfb_info->sfb_per_sbk; sfb++) {
  ------------------
  |  Branch (530:23): [True: 794k, False: 52.6k]
  ------------------
  531|   794k|          alpha_q_re_temp = ixheaac_sat64_32(ixheaac_mult32x32in64(alpha_q_re[grp][sfb], 1677722));
  532|   794k|          alpha_q_im_temp = ixheaac_sat64_32(ixheaac_mult32x32in64(alpha_q_im[grp][sfb], 1677722));
  533|   794k|          if (cplx_pred_used[grp][sfb]) {
  ------------------
  |  Branch (533:15): [True: 552k, False: 241k]
  ------------------
  534|  4.91M|            for (k = 0; k < pstr_sfb_info->sfb_width[sfb]; k++, i++) {
  ------------------
  |  Branch (534:25): [True: 4.36M, False: 552k]
  ------------------
  535|  4.36M|              WORD32 mid_side = ixheaac_sub32_sat(
  536|  4.36M|                  ixheaac_sub32_sat(r_spec[i],
  537|  4.36M|                                     (WORD32)((WORD64)ixheaac_mult32x32in64(
  538|  4.36M|                                                  alpha_q_re_temp, l_spec[i]) >>
  539|  4.36M|                                              24)),
  540|  4.36M|                  (WORD32)((WORD64)ixheaac_mult32x32in64(alpha_q_im_temp,
  541|  4.36M|                                                          dmx_im[i]) >>
  542|  4.36M|                           24));
  543|  4.36M|              r_spec[i] = ixheaac_sat64_32((WORD64)factor) *
  544|  4.36M|                          (WORD64)(ixheaac_sub32_sat(l_spec[i], mid_side));
  545|  4.36M|              l_spec[i] = ixheaac_add32_sat(l_spec[i], mid_side);
  546|  4.36M|            }
  547|   552k|          } else {
  548|   241k|            i += pstr_sfb_info->sfb_width[sfb];
  549|   241k|          }
  550|   794k|        }
  551|  52.6k|      }
  552|  16.3k|    }
  553|  7.21k|  } else {
  554|  49.0k|    for (grp = 0, i = 0; grp < pstr_sfb_info->num_groups; grp++) {
  ------------------
  |  Branch (554:26): [True: 41.8k, False: 7.21k]
  ------------------
  555|  99.1k|      for (grp_len = 0; grp_len < pstr_sfb_info->group_len[grp]; grp_len++) {
  ------------------
  |  Branch (555:25): [True: 57.2k, False: 41.8k]
  ------------------
  556|   917k|        for (sfb = 0; sfb < pstr_sfb_info->sfb_per_sbk; sfb++) {
  ------------------
  |  Branch (556:23): [True: 860k, False: 57.2k]
  ------------------
  557|   860k|          alpha_q_re_temp = ixheaac_sat64_32(ixheaac_mult32x32in64(alpha_q_re[grp][sfb], 1677722));
  558|   860k|          if (cplx_pred_used[grp][sfb]) {
  ------------------
  |  Branch (558:15): [True: 55.3k, False: 804k]
  ------------------
  559|   373k|            for (k = 0; k < pstr_sfb_info->sfb_width[sfb]; k++, i++) {
  ------------------
  |  Branch (559:25): [True: 317k, False: 55.3k]
  ------------------
  560|   317k|              WORD32 mid_side = ixheaac_sub32_sat(
  561|   317k|                  r_spec[i], (WORD32)((WORD64)ixheaac_mult32x32in64(
  562|   317k|                                          alpha_q_re_temp, l_spec[i]) >>
  563|   317k|                                      24));
  564|       |
  565|   317k|              r_spec[i] = ixheaac_sat64_32((WORD64)factor) *
  566|   317k|                          (WORD64)(ixheaac_sub32_sat(l_spec[i], mid_side));
  567|   317k|              l_spec[i] = ixheaac_add32_sat(l_spec[i], mid_side);
  568|   317k|            }
  569|   804k|          } else {
  570|   804k|            i += pstr_sfb_info->sfb_width[sfb];
  571|   804k|          }
  572|   860k|        }
  573|  57.2k|      }
  574|  41.8k|    }
  575|  7.21k|  }
  576|       |
  577|  13.9k|  return;
  578|  13.9k|}
ixheaacd_ext_ch_ele.c:ixheaacd_estimate_dmx_im:
  429|  6.76k|                                     const WORD32 prev_w_shape) {
  430|  6.76k|  WORD32 i;
  431|  6.76k|  const WORD16 *mdst_fcoeff_curr, *mdst_fcoeff_prev;
  432|       |
  433|  6.76k|  switch (window) {
  434|     51|    case ONLY_LONG_SEQUENCE:
  ------------------
  |  |  100|     51|#define ONLY_LONG_SEQUENCE 0
  ------------------
  |  Branch (434:5): [True: 51, False: 6.70k]
  ------------------
  435|  6.60k|    case EIGHT_SHORT_SEQUENCE:
  ------------------
  |  |  102|  6.60k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  |  Branch (435:5): [True: 6.55k, False: 205]
  ------------------
  436|  6.60k|      mdst_fcoeff_curr =
  437|  6.60k|          ixheaacd_mdst_fcoeff_longshort_curr[prev_w_shape][w_shape];
  438|  6.60k|      mdst_fcoeff_prev = ixheaacd_mdst_fcoeff_l_s_start_left_prev[prev_w_shape];
  439|  6.60k|      break;
  440|     20|    case LONG_START_SEQUENCE:
  ------------------
  |  |  101|     20|#define LONG_START_SEQUENCE 1
  ------------------
  |  Branch (440:5): [True: 20, False: 6.74k]
  ------------------
  441|     20|      mdst_fcoeff_curr = ixheaacd_mdst_fcoeff_start_curr[prev_w_shape][w_shape];
  442|     20|      mdst_fcoeff_prev = ixheaacd_mdst_fcoeff_l_s_start_left_prev[prev_w_shape];
  443|     20|      break;
  444|     40|    case LONG_STOP_SEQUENCE:
  ------------------
  |  |  103|     40|#define LONG_STOP_SEQUENCE 3
  ------------------
  |  Branch (444:5): [True: 40, False: 6.72k]
  ------------------
  445|     40|      mdst_fcoeff_curr = ixheaacd_mdst_fcoeff_stop_cur[prev_w_shape][w_shape];
  446|     40|      mdst_fcoeff_prev =
  447|     40|          ixheaacd_mdst_fcoeff_stop_stopstart_left_prev[prev_w_shape];
  448|     40|      break;
  449|     94|    case STOP_START_SEQUENCE:
  ------------------
  |  |  104|     94|#define STOP_START_SEQUENCE 4
  ------------------
  |  Branch (449:5): [True: 94, False: 6.66k]
  ------------------
  450|     94|      mdst_fcoeff_curr =
  451|     94|          ixheaacd_mdst_fcoeff_stopstart_cur[prev_w_shape][w_shape];
  452|     94|      mdst_fcoeff_prev =
  453|     94|          ixheaacd_mdst_fcoeff_stop_stopstart_left_prev[prev_w_shape];
  454|     94|      break;
  455|      0|    default:
  ------------------
  |  Branch (455:5): [True: 0, False: 6.76k]
  ------------------
  456|      0|      mdst_fcoeff_curr =
  457|      0|          ixheaacd_mdst_fcoeff_stopstart_cur[prev_w_shape][w_shape];
  458|      0|      mdst_fcoeff_prev =
  459|      0|          ixheaacd_mdst_fcoeff_stop_stopstart_left_prev[prev_w_shape];
  460|      0|      break;
  461|  6.76k|  }
  462|       |
  463|  59.4k|  for (i = 0; i < pstr_sfb_info->max_win_len; i++) {
  ------------------
  |  Branch (463:15): [True: 52.6k, False: 6.76k]
  ------------------
  464|  52.6k|    ixheaacd_filter_and_add(dmx_re, pstr_sfb_info->bins_per_sbk,
  465|  52.6k|                            mdst_fcoeff_curr, dmx_im, 1, 1);
  466|       |
  467|  52.6k|    if (dmx_re_prev)
  ------------------
  |  Branch (467:9): [True: 46.4k, False: 6.24k]
  ------------------
  468|  46.4k|      ixheaacd_filter_and_add(dmx_re_prev, pstr_sfb_info->bins_per_sbk,
  469|  46.4k|                              mdst_fcoeff_prev, dmx_im, -1, 1);
  470|       |
  471|  52.6k|    dmx_re_prev = dmx_re;
  472|  52.6k|    dmx_re += pstr_sfb_info->bins_per_sbk;
  473|  52.6k|    dmx_im += pstr_sfb_info->bins_per_sbk;
  474|  52.6k|  }
  475|  6.76k|  return;
  476|  6.76k|}
ixheaacd_ext_ch_ele.c:ixheaacd_filter_and_add:
  358|  99.0k|                                    const WORD32 factor_odd) {
  359|  99.0k|  WORD32 i;
  360|  99.0k|  WORD64 sum;
  361|       |
  362|  99.0k|  sum = ixheaac_mult32x32in64(in[2], filter[0]);
  363|  99.0k|  sum = ixheaac_mac32x32in64(sum, in[1], filter[1]);
  364|  99.0k|  sum = ixheaac_mac32x32in64(sum, in[0], filter[2]);
  365|  99.0k|  sum = ixheaac_mac32x32in64_n(sum, &in[0], &filter[3], 4);
  366|  99.0k|  *out = ixheaac_add32_sat(
  367|  99.0k|      *out, ixheaac_sat64_32((((WORD64)sum * (WORD64)factor_even) >> 15)));
  368|  99.0k|  out++;
  369|       |
  370|  99.0k|  sum = ixheaac_mult32x32in64(in[1], filter[0]);
  371|  99.0k|  sum = ixheaac_mac32x32in64(sum, in[0], filter[1]);
  372|  99.0k|  sum = ixheaac_mac32x32in64_n(sum, &in[0], &filter[2], 5);
  373|  99.0k|  *out = ixheaac_add32_sat(
  374|  99.0k|      *out, ixheaac_sat64_32((((WORD64)sum * (WORD64)factor_odd) >> 15)));
  375|  99.0k|  out++;
  376|       |
  377|  99.0k|  sum = ixheaac_mult32x32in64(in[0], filter[0]);
  378|  99.0k|  sum = ixheaac_mac32x32in64_n(sum, &in[0], &filter[1], 6);
  379|  99.0k|  *out = ixheaac_add32_sat(
  380|  99.0k|      *out, ixheaac_sat64_32((((WORD64)sum * (WORD64)factor_even) >> 15)));
  381|  99.0k|  out++;
  382|       |
  383|  6.24M|  for (i = 3; i < length - 4; i += 2) {
  ------------------
  |  Branch (383:15): [True: 6.14M, False: 99.0k]
  ------------------
  384|  6.14M|    sum = 0;
  385|  6.14M|    sum = ixheaac_mac32x32in64_7(&in[i - 3], filter);
  386|  6.14M|    *out = ixheaac_add32_sat(
  387|  6.14M|        *out, ixheaac_sat64_32((((WORD64)sum * (WORD64)factor_odd) >> 15)));
  388|  6.14M|    out++;
  389|       |
  390|  6.14M|    sum = 0;
  391|  6.14M|    sum = ixheaac_mac32x32in64_7(&in[i - 2], filter);
  392|  6.14M|    *out = ixheaac_add32_sat(
  393|  6.14M|        *out, ixheaac_sat64_32((((WORD64)sum * (WORD64)factor_even) >> 15)));
  394|  6.14M|    out++;
  395|  6.14M|  }
  396|  99.0k|  i = length - 3;
  397|  99.0k|  sum = 0;
  398|  99.0k|  sum = ixheaac_mac32x32in64_n(sum, &in[i - 3], filter, 6);
  399|  99.0k|  sum = ixheaac_mac32x32in64(sum, in[i + 2], filter[6]);
  400|  99.0k|  *out = ixheaac_add32_sat(
  401|  99.0k|      *out, ixheaac_sat64_32((((WORD64)sum * (WORD64)factor_odd) >> 15)));
  402|       |
  403|  99.0k|  out++;
  404|  99.0k|  i = length - 2;
  405|  99.0k|  sum = 0;
  406|  99.0k|  sum = ixheaac_mac32x32in64_n(sum, &in[i - 3], filter, 5);
  407|  99.0k|  sum = ixheaac_mac32x32in64(sum, in[i + 1], filter[5]);
  408|  99.0k|  sum = ixheaac_mac32x32in64(sum, in[i], filter[6]);
  409|       |
  410|  99.0k|  *out = ixheaac_add32_sat(
  411|  99.0k|      *out, ixheaac_sat64_32((((WORD64)sum * (WORD64)factor_even) >> 15)));
  412|  99.0k|  out++;
  413|       |
  414|  99.0k|  i = length - 1;
  415|  99.0k|  sum = 0;
  416|  99.0k|  sum = ixheaac_mac32x32in64_n(sum, &in[i - 3], filter, 4);
  417|  99.0k|  sum = ixheaac_mac32x32in64(sum, in[i], filter[4]);
  418|  99.0k|  sum = ixheaac_mac32x32in64(sum, in[i - 1], filter[5]);
  419|  99.0k|  sum = ixheaac_mac32x32in64(sum, in[i - 2], filter[6]);
  420|       |
  421|  99.0k|  *out = ixheaac_add32_sat(
  422|  99.0k|      *out, ixheaac_sat64_32((((WORD64)sum * (WORD64)factor_odd) >> 15)));
  423|  99.0k|}

ixheaacd_mps_synth_calc_fft:
   83|  5.92M|                                 WORD32 npoints) {
   84|  5.92M|  WORD32 i, j, k;
   85|  5.92M|  FLOAT32 y[64], z[64];
   86|  5.92M|  FLOAT32 *ptr_y = y, *ptr_z = z;
   87|  5.92M|  const FLOAT32 *ptr_w = ixheaacd_twiddle_table_fft_flt;
   88|       |
   89|  53.3M|  for (i = 0; i < npoints; i += 4) {
  ------------------
  |  Branch (89:15): [True: 47.4M, False: 5.92M]
  ------------------
   90|  47.4M|    FLOAT32 x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;
   91|  47.4M|    FLOAT32 *inp = ptr_xr;
   92|  47.4M|    FLOAT32 tmk;
   93|       |
   94|  47.4M|    WORD32 h2 = ixheaacd_mps_dig_rev[i >> 2];
   95|       |
   96|  47.4M|    inp += (h2);
   97|       |
   98|  47.4M|    x0r = *inp;
   99|  47.4M|    x0i = *(inp + 1);
  100|  47.4M|    inp += 16;
  101|       |
  102|  47.4M|    x1r = *inp;
  103|  47.4M|    x1i = *(inp + 1);
  104|  47.4M|    inp += 16;
  105|       |
  106|  47.4M|    x2r = *inp;
  107|  47.4M|    x2i = *(inp + 1);
  108|  47.4M|    inp += 16;
  109|       |
  110|  47.4M|    x3r = *inp;
  111|  47.4M|    x3i = *(inp + 1);
  112|       |
  113|  47.4M|    x0r = x0r + x2r;
  114|  47.4M|    x0i = x0i + x2i;
  115|       |
  116|  47.4M|    tmk = x0r - x2r;
  117|  47.4M|    x2r = tmk - x2r;
  118|  47.4M|    tmk = x0i - x2i;
  119|  47.4M|    x2i = tmk - x2i;
  120|       |
  121|  47.4M|    x1r = x1r + x3r;
  122|  47.4M|    x1i = x1i + x3i;
  123|       |
  124|  47.4M|    tmk = x1r - x3r;
  125|  47.4M|    x3r = tmk - x3r;
  126|  47.4M|    tmk = x1i - x3i;
  127|  47.4M|    x3i = tmk - x3i;
  128|       |
  129|  47.4M|    x0r = x0r + x1r;
  130|  47.4M|    x0i = x0i + x1i;
  131|       |
  132|  47.4M|    tmk = x0r - x1r;
  133|  47.4M|    x1r = tmk - x1r;
  134|  47.4M|    tmk = x0i - x1i;
  135|  47.4M|    x1i = tmk - x1i;
  136|       |
  137|  47.4M|    x2r = x2r + x3i;
  138|  47.4M|    x2i = x2i - x3r;
  139|       |
  140|  47.4M|    tmk = x2r - x3i;
  141|  47.4M|    x3i = tmk - x3i;
  142|  47.4M|    tmk = x2i + x3r;
  143|  47.4M|    x3r = tmk + x3r;
  144|       |
  145|  47.4M|    *ptr_y++ = x0r;
  146|  47.4M|    *ptr_y++ = x0i;
  147|  47.4M|    *ptr_y++ = x2r;
  148|  47.4M|    *ptr_y++ = x2i;
  149|  47.4M|    *ptr_y++ = x1r;
  150|  47.4M|    *ptr_y++ = x1i;
  151|  47.4M|    *ptr_y++ = x3i;
  152|  47.4M|    *ptr_y++ = x3r;
  153|       |
  154|  47.4M|    inp = ptr_xi;
  155|       |
  156|  47.4M|    inp += (h2);
  157|       |
  158|  47.4M|    x0r = *inp;
  159|  47.4M|    x0i = *(inp + 1);
  160|  47.4M|    inp += 16;
  161|       |
  162|  47.4M|    x1r = *inp;
  163|  47.4M|    x1i = *(inp + 1);
  164|  47.4M|    inp += 16;
  165|       |
  166|  47.4M|    x2r = *inp;
  167|  47.4M|    x2i = *(inp + 1);
  168|  47.4M|    inp += 16;
  169|       |
  170|  47.4M|    x3r = *inp;
  171|  47.4M|    x3i = *(inp + 1);
  172|       |
  173|  47.4M|    x0r = x0r + x2r;
  174|  47.4M|    x0i = x0i + x2i;
  175|       |
  176|  47.4M|    tmk = x0r - x2r;
  177|  47.4M|    x2r = tmk - x2r;
  178|  47.4M|    tmk = x0i - x2i;
  179|  47.4M|    x2i = tmk - x2i;
  180|       |
  181|  47.4M|    x1r = x1r + x3r;
  182|  47.4M|    x1i = x1i + x3i;
  183|       |
  184|  47.4M|    tmk = x1r - x3r;
  185|  47.4M|    x3r = tmk - x3r;
  186|  47.4M|    tmk = x1i - x3i;
  187|  47.4M|    x3i = tmk - x3i;
  188|       |
  189|  47.4M|    x0r = x0r + x1r;
  190|  47.4M|    x0i = x0i + x1i;
  191|       |
  192|  47.4M|    tmk = x0r - x1r;
  193|  47.4M|    x1r = tmk - x1r;
  194|  47.4M|    tmk = x0i - x1i;
  195|  47.4M|    x1i = tmk - x1i;
  196|       |
  197|  47.4M|    x2r = x2r + x3i;
  198|  47.4M|    x2i = x2i - x3r;
  199|       |
  200|  47.4M|    tmk = x2r - x3i;
  201|  47.4M|    x3i = tmk - x3i;
  202|  47.4M|    tmk = x2i + x3r;
  203|  47.4M|    x3r = tmk + x3r;
  204|       |
  205|  47.4M|    *ptr_z++ = x0r;
  206|  47.4M|    *ptr_z++ = x0i;
  207|  47.4M|    *ptr_z++ = x2r;
  208|  47.4M|    *ptr_z++ = x2i;
  209|  47.4M|    *ptr_z++ = x1r;
  210|  47.4M|    *ptr_z++ = x1i;
  211|  47.4M|    *ptr_z++ = x3i;
  212|  47.4M|    *ptr_z++ = x3r;
  213|  47.4M|  }
  214|  5.92M|  ptr_y -= 64;
  215|  5.92M|  ptr_z -= 64;
  216|  5.92M|  {
  217|  5.92M|    FLOAT32 *data_r = ptr_y;
  218|  5.92M|    FLOAT32 *data_i = ptr_z;
  219|  17.7M|    for (k = 2; k != 0; k--) {
  ------------------
  |  Branch (219:17): [True: 11.8M, False: 5.92M]
  ------------------
  220|  11.8M|      FLOAT32 x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;
  221|       |
  222|  11.8M|      x0r = (*data_r);
  223|  11.8M|      x0i = (*(data_r + 1));
  224|  11.8M|      data_r += 8;
  225|       |
  226|  11.8M|      x1r = (*data_r);
  227|  11.8M|      x1i = (*(data_r + 1));
  228|  11.8M|      data_r += 8;
  229|       |
  230|  11.8M|      x2r = (*data_r);
  231|  11.8M|      x2i = (*(data_r + 1));
  232|  11.8M|      data_r += 8;
  233|       |
  234|  11.8M|      x3r = (*data_r);
  235|  11.8M|      x3i = (*(data_r + 1));
  236|  11.8M|      data_r -= 24;
  237|       |
  238|  11.8M|      x0r = x0r + x2r;
  239|  11.8M|      x0i = x0i + x2i;
  240|  11.8M|      x2r = x0r - (x2r * 2);
  241|  11.8M|      x2i = x0i - (x2i * 2);
  242|  11.8M|      x1r = x1r + x3r;
  243|  11.8M|      x1i = x1i + x3i;
  244|  11.8M|      x3r = x1r - (x3r * 2);
  245|  11.8M|      x3i = x1i - (x3i * 2);
  246|       |
  247|  11.8M|      x0r = x0r + x1r;
  248|  11.8M|      x0i = x0i + x1i;
  249|  11.8M|      x1r = x0r - (x1r * 2);
  250|  11.8M|      x1i = x0i - (x1i * 2);
  251|  11.8M|      x2r = x2r + x3i;
  252|  11.8M|      x2i = x2i - x3r;
  253|  11.8M|      x3i = x2r - (x3i * 2);
  254|  11.8M|      x3r = x2i + (x3r * 2);
  255|       |
  256|  11.8M|      *data_r = x0r;
  257|  11.8M|      *(data_r + 1) = x0i;
  258|  11.8M|      data_r += 8;
  259|       |
  260|  11.8M|      *data_r = x2r;
  261|  11.8M|      *(data_r + 1) = x2i;
  262|  11.8M|      data_r += 8;
  263|       |
  264|  11.8M|      *data_r = x1r;
  265|  11.8M|      *(data_r + 1) = x1i;
  266|  11.8M|      data_r += 8;
  267|       |
  268|  11.8M|      *data_r = x3i;
  269|  11.8M|      *(data_r + 1) = x3r;
  270|  11.8M|      data_r += 8;
  271|       |
  272|  11.8M|      x0r = (*data_i);
  273|  11.8M|      x0i = (*(data_i + 1));
  274|  11.8M|      data_i += 8;
  275|       |
  276|  11.8M|      x1r = (*data_i);
  277|  11.8M|      x1i = (*(data_i + 1));
  278|  11.8M|      data_i += 8;
  279|       |
  280|  11.8M|      x2r = (*data_i);
  281|  11.8M|      x2i = (*(data_i + 1));
  282|  11.8M|      data_i += 8;
  283|       |
  284|  11.8M|      x3r = (*data_i);
  285|  11.8M|      x3i = (*(data_i + 1));
  286|  11.8M|      data_i -= 24;
  287|       |
  288|  11.8M|      x0r = x0r + x2r;
  289|  11.8M|      x0i = x0i + x2i;
  290|  11.8M|      x2r = x0r - (x2r * 2);
  291|  11.8M|      x2i = x0i - (x2i * 2);
  292|  11.8M|      x1r = x1r + x3r;
  293|  11.8M|      x1i = x1i + x3i;
  294|  11.8M|      x3r = x1r - (x3r * 2);
  295|  11.8M|      x3i = x1i - (x3i * 2);
  296|       |
  297|  11.8M|      x0r = x0r + x1r;
  298|  11.8M|      x0i = x0i + x1i;
  299|  11.8M|      x1r = x0r - (x1r * 2);
  300|  11.8M|      x1i = x0i - (x1i * 2);
  301|  11.8M|      x2r = x2r + x3i;
  302|  11.8M|      x2i = x2i - x3r;
  303|  11.8M|      x3i = x2r - (x3i * 2);
  304|  11.8M|      x3r = x2i + (x3r * 2);
  305|       |
  306|  11.8M|      *data_i = x0r;
  307|  11.8M|      *(data_i + 1) = x0i;
  308|  11.8M|      data_i += 8;
  309|       |
  310|  11.8M|      *data_i = x2r;
  311|  11.8M|      *(data_i + 1) = x2i;
  312|  11.8M|      data_i += 8;
  313|       |
  314|  11.8M|      *data_i = x1r;
  315|  11.8M|      *(data_i + 1) = x1i;
  316|  11.8M|      data_i += 8;
  317|       |
  318|  11.8M|      *data_i = x3i;
  319|  11.8M|      *(data_i + 1) = x3r;
  320|  11.8M|      data_i += 8;
  321|  11.8M|    }
  322|  5.92M|    data_r = ptr_y + 2;
  323|  5.92M|    data_i = ptr_z + 2;
  324|       |
  325|  17.7M|    for (k = 2; k != 0; k--) {
  ------------------
  |  Branch (325:17): [True: 11.8M, False: 5.92M]
  ------------------
  326|  11.8M|      FLOAT32 tmp;
  327|  11.8M|      FLOAT32 x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;
  328|       |
  329|  11.8M|      data_r += 8;
  330|       |
  331|  11.8M|      x1r = *data_r;
  332|  11.8M|      x1i = *(data_r + 1);
  333|  11.8M|      data_r += 8;
  334|       |
  335|  11.8M|      x2r = *data_r;
  336|  11.8M|      x2i = *(data_r + 1);
  337|  11.8M|      data_r += 8;
  338|       |
  339|  11.8M|      x3r = *data_r;
  340|  11.8M|      x3i = *(data_r + 1);
  341|  11.8M|      data_r -= 24;
  342|       |
  343|  11.8M|      tmp = (FLOAT32)(ixheaacd_mult32X32float((FLOAT32)x1r, 0.923880f) -
  344|  11.8M|                      ixheaacd_mult32X32float((FLOAT32)x1i, -0.382683f));
  345|  11.8M|      x1i = (FLOAT32)ixheaacd_mac32X32float(ixheaacd_mult32X32float((FLOAT32)x1r, -0.382683f),
  346|  11.8M|                                   (FLOAT32)x1i, 0.923880f);
  347|  11.8M|      x1r = tmp;
  348|       |
  349|  11.8M|      tmp = (FLOAT32)(ixheaacd_mult32X32float((FLOAT32)x2r, 0.707107f) -
  350|  11.8M|                      ixheaacd_mult32X32float((FLOAT32)x2i, -0.707107f));
  351|  11.8M|      x2i = (FLOAT32)ixheaacd_mac32X32float(ixheaacd_mult32X32float((FLOAT32)x2r, -0.707107f),
  352|  11.8M|                                   (FLOAT32)x2i, 0.707107f);
  353|  11.8M|      x2r = tmp;
  354|       |
  355|  11.8M|      tmp = (FLOAT32)(ixheaacd_mult32X32float((FLOAT32)x3r, 0.382683f) -
  356|  11.8M|                      ixheaacd_mult32X32float((FLOAT32)x3i, -0.923880f));
  357|  11.8M|      x3i = (FLOAT32)ixheaacd_mac32X32float(ixheaacd_mult32X32float((FLOAT32)x3r, -0.923880f),
  358|  11.8M|                                   (FLOAT32)x3i, 0.382683f);
  359|  11.8M|      x3r = tmp;
  360|       |
  361|  11.8M|      x0r = (*data_r);
  362|  11.8M|      x0i = (*(data_r + 1));
  363|       |
  364|  11.8M|      x0r = x0r + (x2r);
  365|  11.8M|      x0i = x0i + (x2i);
  366|  11.8M|      x2r = x0r - (x2r * 2);
  367|  11.8M|      x2i = x0i - (x2i * 2);
  368|  11.8M|      x1r = x1r + x3r;
  369|  11.8M|      x1i = x1i + x3i;
  370|  11.8M|      x3r = x1r - (x3r * 2);
  371|  11.8M|      x3i = x1i - (x3i * 2);
  372|       |
  373|  11.8M|      x0r = x0r + (x1r);
  374|  11.8M|      x0i = x0i + (x1i);
  375|  11.8M|      x1r = x0r - (x1r * 2);
  376|  11.8M|      x1i = x0i - (x1i * 2);
  377|  11.8M|      x2r = x2r + (x3i);
  378|  11.8M|      x2i = x2i - (x3r);
  379|  11.8M|      x3i = x2r - (x3i * 2);
  380|  11.8M|      x3r = x2i + (x3r * 2);
  381|       |
  382|  11.8M|      *data_r = x0r;
  383|  11.8M|      *(data_r + 1) = x0i;
  384|  11.8M|      data_r += 8;
  385|       |
  386|  11.8M|      *data_r = x2r;
  387|  11.8M|      *(data_r + 1) = x2i;
  388|  11.8M|      data_r += 8;
  389|       |
  390|  11.8M|      *data_r = x1r;
  391|  11.8M|      *(data_r + 1) = x1i;
  392|  11.8M|      data_r += 8;
  393|       |
  394|  11.8M|      *data_r = x3i;
  395|  11.8M|      *(data_r + 1) = x3r;
  396|  11.8M|      data_r += 8;
  397|  11.8M|      data_i += 8;
  398|       |
  399|  11.8M|      x1r = *data_i;
  400|  11.8M|      x1i = *(data_i + 1);
  401|  11.8M|      data_i += 8;
  402|       |
  403|  11.8M|      x2r = *data_i;
  404|  11.8M|      x2i = *(data_i + 1);
  405|  11.8M|      data_i += 8;
  406|       |
  407|  11.8M|      x3r = *data_i;
  408|  11.8M|      x3i = *(data_i + 1);
  409|  11.8M|      data_i -= 24;
  410|       |
  411|  11.8M|      tmp = (FLOAT32)(ixheaacd_mult32X32float((FLOAT32)x1r, 0.923880f) -
  412|  11.8M|                      ixheaacd_mult32X32float((FLOAT32)x1i, -0.382683f));
  413|  11.8M|      x1i = (FLOAT32)ixheaacd_mac32X32float(ixheaacd_mult32X32float((FLOAT32)x1r, -0.382683f),
  414|  11.8M|                                   (FLOAT32)x1i, 0.923880f);
  415|  11.8M|      x1r = tmp;
  416|       |
  417|  11.8M|      tmp = (FLOAT32)(ixheaacd_mult32X32float((FLOAT32)x2r, 0.707107f) -
  418|  11.8M|                      ixheaacd_mult32X32float((FLOAT32)x2i, -0.707107f));
  419|  11.8M|      x2i = (FLOAT32)ixheaacd_mac32X32float(ixheaacd_mult32X32float((FLOAT32)x2r, -0.707107f),
  420|  11.8M|                                   (FLOAT32)x2i, 0.707107f);
  421|  11.8M|      x2r = tmp;
  422|       |
  423|  11.8M|      tmp = (FLOAT32)(ixheaacd_mult32X32float((FLOAT32)x3r, 0.382683f) -
  424|  11.8M|                      ixheaacd_mult32X32float((FLOAT32)x3i, -0.923880f));
  425|  11.8M|      x3i = (FLOAT32)ixheaacd_mac32X32float(ixheaacd_mult32X32float((FLOAT32)x3r, -0.923880f),
  426|  11.8M|                                   (FLOAT32)x3i, 0.382683f);
  427|  11.8M|      x3r = tmp;
  428|       |
  429|  11.8M|      x0r = (*data_i);
  430|  11.8M|      x0i = (*(data_i + 1));
  431|       |
  432|  11.8M|      x0r = x0r + (x2r);
  433|  11.8M|      x0i = x0i + (x2i);
  434|  11.8M|      x2r = x0r - (x2r * 2);
  435|  11.8M|      x2i = x0i - (x2i * 2);
  436|  11.8M|      x1r = x1r + x3r;
  437|  11.8M|      x1i = x1i + x3i;
  438|  11.8M|      x3r = x1r - (x3r * 2);
  439|  11.8M|      x3i = x1i - (x3i * 2);
  440|       |
  441|  11.8M|      x0r = x0r + (x1r);
  442|  11.8M|      x0i = x0i + (x1i);
  443|  11.8M|      x1r = x0r - (x1r * 2);
  444|  11.8M|      x1i = x0i - (x1i * 2);
  445|  11.8M|      x2r = x2r + (x3i);
  446|  11.8M|      x2i = x2i - (x3r);
  447|  11.8M|      x3i = x2r - (x3i * 2);
  448|  11.8M|      x3r = x2i + (x3r * 2);
  449|       |
  450|  11.8M|      *data_i = x0r;
  451|  11.8M|      *(data_i + 1) = x0i;
  452|  11.8M|      data_i += 8;
  453|       |
  454|  11.8M|      *data_i = x2r;
  455|  11.8M|      *(data_i + 1) = x2i;
  456|  11.8M|      data_i += 8;
  457|       |
  458|  11.8M|      *data_i = x1r;
  459|  11.8M|      *(data_i + 1) = x1i;
  460|  11.8M|      data_i += 8;
  461|       |
  462|  11.8M|      *data_i = x3i;
  463|  11.8M|      *(data_i + 1) = x3r;
  464|  11.8M|      data_i += 8;
  465|  11.8M|    }
  466|  5.92M|    data_r -= 62;
  467|  5.92M|    data_i -= 62;
  468|  17.7M|    for (k = 2; k != 0; k--) {
  ------------------
  |  Branch (468:17): [True: 11.8M, False: 5.92M]
  ------------------
  469|  11.8M|      FLOAT32 tmp;
  470|  11.8M|      FLOAT32 x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;
  471|       |
  472|  11.8M|      data_r += 8;
  473|       |
  474|  11.8M|      x1r = *data_r;
  475|  11.8M|      x1i = *(data_r + 1);
  476|  11.8M|      data_r += 8;
  477|       |
  478|  11.8M|      x2r = *data_r;
  479|  11.8M|      x2i = *(data_r + 1);
  480|  11.8M|      data_r += 8;
  481|       |
  482|  11.8M|      x3r = *data_r;
  483|  11.8M|      x3i = *(data_r + 1);
  484|  11.8M|      data_r -= 24;
  485|       |
  486|  11.8M|      tmp = (FLOAT32)(ixheaacd_mult32X32float((FLOAT32)x1r, 0.707107f) -
  487|  11.8M|                      ixheaacd_mult32X32float((FLOAT32)x1i, -0.707107f));
  488|  11.8M|      x1i = (FLOAT32)ixheaacd_mac32X32float(ixheaacd_mult32X32float((FLOAT32)x1r, -0.707107f),
  489|  11.8M|                                   (FLOAT32)x1i, 0.707107f);
  490|  11.8M|      x1r = tmp;
  491|       |
  492|  11.8M|      tmp = x2i;
  493|  11.8M|      x2i = -x2r;
  494|  11.8M|      x2r = tmp;
  495|       |
  496|  11.8M|      tmp = (FLOAT32)(ixheaacd_mult32X32float((FLOAT32)x3r, -0.707107f) +
  497|  11.8M|                      ixheaacd_mult32X32float((FLOAT32)x3i, 0.707107f));
  498|  11.8M|      x3i = (FLOAT32)(-ixheaacd_mult32X32float((FLOAT32)x3r, 0.707107f) +
  499|  11.8M|                      ixheaacd_mult32X32float((FLOAT32)x3i, -0.707107f));
  500|  11.8M|      x3r = tmp;
  501|       |
  502|  11.8M|      x0r = (*data_r);
  503|  11.8M|      x0i = (*(data_r + 1));
  504|       |
  505|  11.8M|      x0r = x0r + (x2r);
  506|  11.8M|      x0i = x0i + (x2i);
  507|  11.8M|      x2r = x0r - (x2r * 2);
  508|  11.8M|      x2i = x0i - (x2i * 2);
  509|  11.8M|      x1r = x1r + x3r;
  510|  11.8M|      x1i = x1i + x3i;
  511|  11.8M|      x3r = x1r - (x3r * 2);
  512|  11.8M|      x3i = x1i - (x3i * 2);
  513|       |
  514|  11.8M|      x0r = x0r + (x1r);
  515|  11.8M|      x0i = x0i + (x1i);
  516|  11.8M|      x1r = x0r - (x1r * 2);
  517|  11.8M|      x1i = x0i - (x1i * 2);
  518|  11.8M|      x2r = x2r + (x3i);
  519|  11.8M|      x2i = x2i - (x3r);
  520|  11.8M|      x3i = x2r - (x3i * 2);
  521|  11.8M|      x3r = x2i + (x3r * 2);
  522|       |
  523|  11.8M|      *data_r = x0r;
  524|  11.8M|      *(data_r + 1) = x0i;
  525|  11.8M|      data_r += 8;
  526|       |
  527|  11.8M|      *data_r = x2r;
  528|  11.8M|      *(data_r + 1) = x2i;
  529|  11.8M|      data_r += 8;
  530|       |
  531|  11.8M|      *data_r = x1r;
  532|  11.8M|      *(data_r + 1) = x1i;
  533|  11.8M|      data_r += 8;
  534|       |
  535|  11.8M|      *data_r = x3i;
  536|  11.8M|      *(data_r + 1) = x3r;
  537|  11.8M|      data_r += 8;
  538|  11.8M|      data_i += 8;
  539|       |
  540|  11.8M|      x1r = *data_i;
  541|  11.8M|      x1i = *(data_i + 1);
  542|  11.8M|      data_i += 8;
  543|       |
  544|  11.8M|      x2r = *data_i;
  545|  11.8M|      x2i = *(data_i + 1);
  546|  11.8M|      data_i += 8;
  547|       |
  548|  11.8M|      x3r = *data_i;
  549|  11.8M|      x3i = *(data_i + 1);
  550|  11.8M|      data_i -= 24;
  551|       |
  552|  11.8M|      tmp = (FLOAT32)(ixheaacd_mult32X32float((FLOAT32)x1r, 0.707107f) -
  553|  11.8M|                      ixheaacd_mult32X32float((FLOAT32)x1i, -0.707107f));
  554|  11.8M|      x1i = (FLOAT32)ixheaacd_mac32X32float(ixheaacd_mult32X32float((FLOAT32)x1r, -0.707107f),
  555|  11.8M|                                   (FLOAT32)x1i, 0.707107f);
  556|  11.8M|      x1r = tmp;
  557|       |
  558|  11.8M|      tmp = x2i;
  559|  11.8M|      x2i = -x2r;
  560|  11.8M|      x2r = tmp;
  561|       |
  562|  11.8M|      tmp = (FLOAT32)(ixheaacd_mult32X32float((FLOAT32)x3r, -0.707107f) +
  563|  11.8M|                      ixheaacd_mult32X32float((FLOAT32)x3i, 0.707107f));
  564|  11.8M|      x3i = (FLOAT32)(-ixheaacd_mult32X32float((FLOAT32)x3r, 0.707107f) +
  565|  11.8M|                      ixheaacd_mult32X32float((FLOAT32)x3i, -0.707107f));
  566|  11.8M|      x3r = tmp;
  567|       |
  568|  11.8M|      x0r = (*data_i);
  569|  11.8M|      x0i = (*(data_i + 1));
  570|       |
  571|  11.8M|      x0r = x0r + (x2r);
  572|  11.8M|      x0i = x0i + (x2i);
  573|  11.8M|      x2r = x0r - (x2r * 2);
  574|  11.8M|      x2i = x0i - (x2i * 2);
  575|  11.8M|      x1r = x1r + x3r;
  576|  11.8M|      x1i = x1i + x3i;
  577|  11.8M|      x3r = x1r - (x3r * 2);
  578|  11.8M|      x3i = x1i - (x3i * 2);
  579|       |
  580|  11.8M|      x0r = x0r + (x1r);
  581|  11.8M|      x0i = x0i + (x1i);
  582|  11.8M|      x1r = x0r - (x1r * 2);
  583|  11.8M|      x1i = x0i - (x1i * 2);
  584|  11.8M|      x2r = x2r + (x3i);
  585|  11.8M|      x2i = x2i - (x3r);
  586|  11.8M|      x3i = x2r - (x3i * 2);
  587|  11.8M|      x3r = x2i + (x3r * 2);
  588|       |
  589|  11.8M|      *data_i = x0r;
  590|  11.8M|      *(data_i + 1) = x0i;
  591|  11.8M|      data_i += 8;
  592|       |
  593|  11.8M|      *data_i = x2r;
  594|  11.8M|      *(data_i + 1) = x2i;
  595|  11.8M|      data_i += 8;
  596|       |
  597|  11.8M|      *data_i = x1r;
  598|  11.8M|      *(data_i + 1) = x1i;
  599|  11.8M|      data_i += 8;
  600|       |
  601|  11.8M|      *data_i = x3i;
  602|  11.8M|      *(data_i + 1) = x3r;
  603|  11.8M|      data_i += 8;
  604|  11.8M|    }
  605|  5.92M|    data_r -= 62;
  606|  5.92M|    data_i -= 62;
  607|  17.7M|    for (k = 2; k != 0; k--) {
  ------------------
  |  Branch (607:17): [True: 11.8M, False: 5.92M]
  ------------------
  608|  11.8M|      FLOAT32 tmp;
  609|  11.8M|      FLOAT32 x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;
  610|       |
  611|  11.8M|      data_r += 8;
  612|       |
  613|  11.8M|      x1r = *data_r;
  614|  11.8M|      x1i = *(data_r + 1);
  615|  11.8M|      data_r += 8;
  616|       |
  617|  11.8M|      x2r = *data_r;
  618|  11.8M|      x2i = *(data_r + 1);
  619|  11.8M|      data_r += 8;
  620|       |
  621|  11.8M|      x3r = *data_r;
  622|  11.8M|      x3i = *(data_r + 1);
  623|  11.8M|      data_r -= 24;
  624|       |
  625|  11.8M|      tmp = (FLOAT32)(ixheaacd_mult32X32float((FLOAT32)x1r, 0.382683f) -
  626|  11.8M|                      ixheaacd_mult32X32float((FLOAT32)x1i, -0.923880f));
  627|  11.8M|      x1i = (FLOAT32)ixheaacd_mac32X32float(ixheaacd_mult32X32float((FLOAT32)x1r, -0.923880f),
  628|  11.8M|                                   (FLOAT32)x1i, 0.382683f);
  629|  11.8M|      x1r = tmp;
  630|       |
  631|  11.8M|      tmp = (FLOAT32)(ixheaacd_mult32X32float((FLOAT32)x2r, -0.707107f) +
  632|  11.8M|                      ixheaacd_mult32X32float((FLOAT32)x2i, 0.707107f));
  633|  11.8M|      x2i = (FLOAT32)(-ixheaacd_mult32X32float((FLOAT32)x2r, 0.707107f) +
  634|  11.8M|                      ixheaacd_mult32X32float((FLOAT32)x2i, -0.707107f));
  635|  11.8M|      x2r = tmp;
  636|       |
  637|  11.8M|      tmp = (FLOAT32)(-ixheaacd_mult32X32float((FLOAT32)x3r, 0.923880f) +
  638|  11.8M|                      ixheaacd_mult32X32float((FLOAT32)x3i, -0.382683f));
  639|  11.8M|      x3i = (FLOAT32)ixheaacd_mac32X32float(ixheaacd_mult32X32float((FLOAT32)x3r, -0.382683f),
  640|  11.8M|                                   (FLOAT32)x3i, 0.923880f);
  641|  11.8M|      x3r = tmp;
  642|       |
  643|  11.8M|      x0r = (*data_r);
  644|  11.8M|      x0i = (*(data_r + 1));
  645|       |
  646|  11.8M|      x0r = x0r + (x2r);
  647|  11.8M|      x0i = x0i + (x2i);
  648|  11.8M|      x2r = x0r - (x2r * 2);
  649|  11.8M|      x2i = x0i - (x2i * 2);
  650|  11.8M|      x1r = x1r + x3r;
  651|  11.8M|      x1i = x1i - x3i;
  652|  11.8M|      x3r = x1r - (x3r * 2);
  653|  11.8M|      x3i = x1i + (x3i * 2);
  654|       |
  655|  11.8M|      x0r = x0r + (x1r);
  656|  11.8M|      x0i = x0i + (x1i);
  657|  11.8M|      x1r = x0r - (x1r * 2);
  658|  11.8M|      x1i = x0i - (x1i * 2);
  659|  11.8M|      x2r = x2r + (x3i);
  660|  11.8M|      x2i = x2i - (x3r);
  661|  11.8M|      x3i = x2r - (x3i * 2);
  662|  11.8M|      x3r = x2i + (x3r * 2);
  663|       |
  664|  11.8M|      *data_r = x0r;
  665|  11.8M|      *(data_r + 1) = x0i;
  666|  11.8M|      data_r += 8;
  667|       |
  668|  11.8M|      *data_r = x2r;
  669|  11.8M|      *(data_r + 1) = x2i;
  670|  11.8M|      data_r += 8;
  671|       |
  672|  11.8M|      *data_r = x1r;
  673|  11.8M|      *(data_r + 1) = x1i;
  674|  11.8M|      data_r += 8;
  675|       |
  676|  11.8M|      *data_r = x3i;
  677|  11.8M|      *(data_r + 1) = x3r;
  678|  11.8M|      data_r += 8;
  679|  11.8M|      data_i += 8;
  680|       |
  681|  11.8M|      x1r = *data_i;
  682|  11.8M|      x1i = *(data_i + 1);
  683|  11.8M|      data_i += 8;
  684|       |
  685|  11.8M|      x2r = *data_i;
  686|  11.8M|      x2i = *(data_i + 1);
  687|  11.8M|      data_i += 8;
  688|       |
  689|  11.8M|      x3r = *data_i;
  690|  11.8M|      x3i = *(data_i + 1);
  691|  11.8M|      data_i -= 24;
  692|       |
  693|  11.8M|      tmp = (FLOAT32)(ixheaacd_mult32X32float((FLOAT32)x1r, 0.382683f) -
  694|  11.8M|                      ixheaacd_mult32X32float((FLOAT32)x1i, -0.923880f));
  695|  11.8M|      x1i = (FLOAT32)ixheaacd_mac32X32float(ixheaacd_mult32X32float((FLOAT32)x1r, -0.923880f),
  696|  11.8M|                                   (FLOAT32)x1i, 0.382683f);
  697|  11.8M|      x1r = tmp;
  698|       |
  699|  11.8M|      tmp = (FLOAT32)(ixheaacd_mult32X32float((FLOAT32)x2r, -0.707107f) +
  700|  11.8M|                      ixheaacd_mult32X32float((FLOAT32)x2i, 0.707107f));
  701|  11.8M|      x2i = (FLOAT32)(-ixheaacd_mult32X32float((FLOAT32)x2r, 0.707107f) +
  702|  11.8M|                      ixheaacd_mult32X32float((FLOAT32)x2i, -0.707107f));
  703|  11.8M|      x2r = tmp;
  704|       |
  705|  11.8M|      tmp = (FLOAT32)(-ixheaacd_mult32X32float((FLOAT32)x3r, 0.923880f) +
  706|  11.8M|                      ixheaacd_mult32X32float((FLOAT32)x3i, -0.382683f));
  707|  11.8M|      x3i = (FLOAT32)ixheaacd_mac32X32float(ixheaacd_mult32X32float((FLOAT32)x3r, -0.382683f),
  708|  11.8M|                                   (FLOAT32)x3i, 0.923880f);
  709|  11.8M|      x3r = tmp;
  710|       |
  711|  11.8M|      x0r = (*data_i);
  712|  11.8M|      x0i = (*(data_i + 1));
  713|       |
  714|  11.8M|      x0r = x0r + (x2r);
  715|  11.8M|      x0i = x0i + (x2i);
  716|  11.8M|      x2r = x0r - (x2r * 2);
  717|  11.8M|      x2i = x0i - (x2i * 2);
  718|  11.8M|      x1r = x1r + x3r;
  719|  11.8M|      x1i = x1i - x3i;
  720|  11.8M|      x3r = x1r - (x3r * 2);
  721|  11.8M|      x3i = x1i + (x3i * 2);
  722|       |
  723|  11.8M|      x0r = x0r + (x1r);
  724|  11.8M|      x0i = x0i + (x1i);
  725|  11.8M|      x1r = x0r - (x1r * 2);
  726|  11.8M|      x1i = x0i - (x1i * 2);
  727|  11.8M|      x2r = x2r + (x3i);
  728|  11.8M|      x2i = x2i - (x3r);
  729|  11.8M|      x3i = x2r - (x3i * 2);
  730|  11.8M|      x3r = x2i + (x3r * 2);
  731|       |
  732|  11.8M|      *data_i = x0r;
  733|  11.8M|      *(data_i + 1) = x0i;
  734|  11.8M|      data_i += 8;
  735|       |
  736|  11.8M|      *data_i = x2r;
  737|  11.8M|      *(data_i + 1) = x2i;
  738|  11.8M|      data_i += 8;
  739|       |
  740|  11.8M|      *data_i = x1r;
  741|  11.8M|      *(data_i + 1) = x1i;
  742|  11.8M|      data_i += 8;
  743|       |
  744|  11.8M|      *data_i = x3i;
  745|  11.8M|      *(data_i + 1) = x3r;
  746|  11.8M|      data_i += 8;
  747|  11.8M|    }
  748|  5.92M|    data_r -= 62;
  749|  5.92M|    data_i -= 62;
  750|  5.92M|  }
  751|  5.92M|  {
  752|  5.92M|    const FLOAT32 *twiddles = ptr_w;
  753|  5.92M|    FLOAT32 x0r, x0i, x1r, x1i;
  754|  53.3M|    for (j = 8; j != 0; j--) {
  ------------------
  |  Branch (754:17): [True: 47.4M, False: 5.92M]
  ------------------
  755|  47.4M|      FLOAT32 W1 = *twiddles;
  756|  47.4M|      twiddles++;
  757|  47.4M|      FLOAT32 W4 = *twiddles;
  758|  47.4M|      twiddles++;
  759|  47.4M|      FLOAT32 tmp;
  760|       |
  761|  47.4M|      x0r = *ptr_y;
  762|  47.4M|      x0i = *(ptr_y + 1);
  763|  47.4M|      ptr_y += 32;
  764|  47.4M|      ptr_xr += 32;
  765|       |
  766|  47.4M|      x1r = *ptr_y;
  767|  47.4M|      x1i = *(ptr_y + 1);
  768|       |
  769|  47.4M|      tmp = (FLOAT32)(ixheaacd_mult32X32float((FLOAT32)x1r, W1) -
  770|  47.4M|                      ixheaacd_mult32X32float((FLOAT32)x1i, W4));
  771|  47.4M|      x1i = (FLOAT32)ixheaacd_mac32X32float(ixheaacd_mult32X32float((FLOAT32)x1r, W4),
  772|  47.4M|                                   (FLOAT32)x1i, W1);
  773|  47.4M|      x1r = tmp;
  774|       |
  775|  47.4M|      *ptr_xr = (x0r) - (x1r);
  776|  47.4M|      *(ptr_xr + 1) = (x0i) - (x1i);
  777|  47.4M|      ptr_y -= 32;
  778|  47.4M|      ptr_xr -= 32;
  779|       |
  780|  47.4M|      *ptr_xr = (x0r) + (x1r);
  781|  47.4M|      *(ptr_xr + 1) = (x0i) + (x1i);
  782|  47.4M|      ptr_y += 2;
  783|  47.4M|      ptr_xr += 2;
  784|       |
  785|  47.4M|      x0r = *ptr_z;
  786|  47.4M|      x0i = *(ptr_z + 1);
  787|  47.4M|      ptr_z += 32;
  788|  47.4M|      ptr_xi += 32;
  789|       |
  790|  47.4M|      x1r = *ptr_z;
  791|  47.4M|      x1i = *(ptr_z + 1);
  792|       |
  793|  47.4M|      tmp = (FLOAT32)(ixheaacd_mult32X32float((FLOAT32)x1r, W1) -
  794|  47.4M|                      ixheaacd_mult32X32float((FLOAT32)x1i, W4));
  795|  47.4M|      x1i = (FLOAT32)ixheaacd_mac32X32float(ixheaacd_mult32X32float((FLOAT32)x1r, W4),
  796|  47.4M|                                   (FLOAT32)x1i, W1);
  797|  47.4M|      x1r = tmp;
  798|       |
  799|  47.4M|      *ptr_xi = (x0r) - (x1r);
  800|  47.4M|      *(ptr_xi + 1) = (x0i) - (x1i);
  801|  47.4M|      ptr_z -= 32;
  802|  47.4M|      ptr_xi -= 32;
  803|       |
  804|  47.4M|      *ptr_xi = (x0r) + (x1r);
  805|  47.4M|      *(ptr_xi + 1) = (x0i) + (x1i);
  806|  47.4M|      ptr_z += 2;
  807|  47.4M|      ptr_xi += 2;
  808|  47.4M|    }
  809|  5.92M|    twiddles = ptr_w;
  810|  53.3M|    for (j = 8; j != 0; j--) {
  ------------------
  |  Branch (810:17): [True: 47.4M, False: 5.92M]
  ------------------
  811|  47.4M|      FLOAT32 W1 = *twiddles;
  812|  47.4M|      twiddles++;
  813|  47.4M|      FLOAT32 W4 = *twiddles;
  814|  47.4M|      twiddles++;
  815|  47.4M|      FLOAT32 tmp;
  816|       |
  817|  47.4M|      x0r = *ptr_y;
  818|  47.4M|      x0i = *(ptr_y + 1);
  819|  47.4M|      ptr_y += 32;
  820|  47.4M|      ptr_xr += 32;
  821|       |
  822|  47.4M|      x1r = *ptr_y;
  823|  47.4M|      x1i = *(ptr_y + 1);
  824|       |
  825|  47.4M|      tmp = (FLOAT32)(ixheaacd_mult32X32float((FLOAT32)x1r, W4) +
  826|  47.4M|                      ixheaacd_mult32X32float((FLOAT32)x1i, W1));
  827|  47.4M|      x1i = (FLOAT32)(-ixheaacd_mult32X32float((FLOAT32)x1r, W1) +
  828|  47.4M|                      ixheaacd_mult32X32float((FLOAT32)x1i, W4));
  829|  47.4M|      x1r = tmp;
  830|       |
  831|  47.4M|      *ptr_xr = (x0r) - (x1r);
  832|  47.4M|      *(ptr_xr + 1) = (x0i) - (x1i);
  833|  47.4M|      ptr_y -= 32;
  834|  47.4M|      ptr_xr -= 32;
  835|       |
  836|  47.4M|      *ptr_xr = (x0r) + (x1r);
  837|  47.4M|      *(ptr_xr + 1) = (x0i) + (x1i);
  838|  47.4M|      ptr_y += 2;
  839|  47.4M|      ptr_xr += 2;
  840|       |
  841|  47.4M|      x0r = *ptr_z;
  842|  47.4M|      x0i = *(ptr_z + 1);
  843|  47.4M|      ptr_z += 32;
  844|  47.4M|      ptr_xi += 32;
  845|       |
  846|  47.4M|      x1r = *ptr_z;
  847|  47.4M|      x1i = *(ptr_z + 1);
  848|       |
  849|  47.4M|      tmp = (FLOAT32)(ixheaacd_mult32X32float((FLOAT32)x1r, W4) +
  850|  47.4M|                      ixheaacd_mult32X32float((FLOAT32)x1i, W1));
  851|  47.4M|      x1i = (FLOAT32)(-ixheaacd_mult32X32float((FLOAT32)x1r, W1) +
  852|  47.4M|                      ixheaacd_mult32X32float((FLOAT32)x1i, W4));
  853|  47.4M|      x1r = tmp;
  854|       |
  855|  47.4M|      *ptr_xi = (x0r) - (x1r);
  856|  47.4M|      *(ptr_xi + 1) = (x0i) - (x1i);
  857|  47.4M|      ptr_z -= 32;
  858|  47.4M|      ptr_xi -= 32;
  859|       |
  860|  47.4M|      *ptr_xi = (x0r) + (x1r);
  861|  47.4M|      *(ptr_xi + 1) = (x0i) + (x1i);
  862|  47.4M|      ptr_z += 2;
  863|  47.4M|      ptr_xi += 2;
  864|  47.4M|    }
  865|  5.92M|  }
  866|  5.92M|}
ixheaacd_mps_complex_fft:
  868|  21.2k|VOID ixheaacd_mps_complex_fft(FLOAT32 *xr, FLOAT32 *xi, WORD32 nlength) {
  869|  21.2k|  WORD32 i, j, k, n_stages, h2;
  870|  21.2k|  FLOAT32 x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;
  871|  21.2k|  WORD32 del, nodespacing, in_loop_cnt;
  872|  21.2k|  WORD32 dig_rev_shift;
  873|  21.2k|  WORD32 not_power_4;
  874|  21.2k|  FLOAT32 ptr_x[256];
  875|  21.2k|  FLOAT32 y[256];
  876|  21.2k|  WORD32 npoints = nlength;
  877|  21.2k|  FLOAT32 *ptr_y = y;
  878|  21.2k|  const FLOAT32 *ptr_w;
  879|  21.2k|  dig_rev_shift = ixheaac_norm32(npoints) + 1 - 16;
  880|  21.2k|  n_stages = 30 - ixheaac_norm32(npoints);
  881|  21.2k|  not_power_4 = n_stages & 1;
  882|       |
  883|  21.2k|  n_stages = n_stages >> 1;
  884|       |
  885|       |
  886|  1.38M|  for (i = 0; i<nlength; i++)
  ------------------
  |  Branch (886:15): [True: 1.36M, False: 21.2k]
  ------------------
  887|  1.36M|  {
  888|  1.36M|    ptr_x[2 * i] = xr[i];
  889|  1.36M|    ptr_x[2 * i + 1] = xi[i];
  890|  1.36M|  }
  891|       |
  892|  21.2k|  ptr_w = ixheaacd_twiddle_table_fft;
  893|       |
  894|   361k|  for (i = 0; i<npoints; i += 4)
  ------------------
  |  Branch (894:15): [True: 340k, False: 21.2k]
  ------------------
  895|   340k|  {
  896|   340k|    FLOAT32 *inp = ptr_x;
  897|       |
  898|   340k|    DIG_REV(i, dig_rev_shift, h2);
  ------------------
  |  |   40|   340k|  do {                                                      \
  |  |   41|   340k|    unsigned _ = (i);                                       \
  |  |   42|   340k|    _ = ((_ & 0x33333333) << 2) | ((_ & ~0x33333333) >> 2); \
  |  |   43|   340k|    _ = ((_ & 0x0F0F0F0F) << 4) | ((_ & ~0x0F0F0F0F) >> 4); \
  |  |   44|   340k|    _ = ((_ & 0x00FF00FF) << 8) | ((_ & ~0x00FF00FF) >> 8); \
  |  |   45|   340k|    (j) = _ >> (m);                                         \
  |  |   46|   340k|  } while (0)
  |  |  ------------------
  |  |  |  Branch (46:12): [Folded, False: 340k]
  |  |  ------------------
  ------------------
  899|   340k|    if (not_power_4)
  ------------------
  |  Branch (899:9): [True: 0, False: 340k]
  ------------------
  900|      0|    {
  901|      0|      h2 += 1;
  902|      0|      h2 &= ~1;
  903|      0|    }
  904|   340k|    inp += (h2);
  905|       |
  906|   340k|    x0r = *inp;
  907|   340k|    x0i = *(inp + 1);
  908|   340k|    inp += (npoints >> 1);
  909|       |
  910|   340k|    x1r = *inp;
  911|   340k|    x1i = *(inp + 1);
  912|   340k|    inp += (npoints >> 1);
  913|       |
  914|   340k|    x2r = *inp;
  915|   340k|    x2i = *(inp + 1);
  916|   340k|    inp += (npoints >> 1);
  917|       |
  918|   340k|    x3r = *inp;
  919|   340k|    x3i = *(inp + 1);
  920|       |
  921|   340k|    x0r = x0r + x2r;
  922|   340k|    x0i = x0i + x2i;
  923|   340k|    x2r = x0r - (x2r * 2);
  924|   340k|    x2i = x0i - (x2i * 2);
  925|   340k|    x1r = x1r + x3r;
  926|   340k|    x1i = x1i + x3i;
  927|   340k|    x3r = x1r - (x3r * 2);
  928|   340k|    x3i = x1i - (x3i * 2);
  929|       |
  930|   340k|    x0r = x0r + x1r;
  931|   340k|    x0i = x0i + x1i;
  932|   340k|    x1r = x0r - (x1r * 2);
  933|   340k|    x1i = x0i - (x1i * 2);
  934|   340k|    x2r = x2r + x3i;
  935|   340k|    x2i = x2i - x3r;
  936|   340k|    x3i = x2r - (x3i * 2);
  937|   340k|    x3r = x2i + (x3r * 2);
  938|       |
  939|   340k|    *ptr_y++ = x0r;
  940|   340k|    *ptr_y++ = x0i;
  941|   340k|    *ptr_y++ = x2r;
  942|   340k|    *ptr_y++ = x2i;
  943|   340k|    *ptr_y++ = x1r;
  944|   340k|    *ptr_y++ = x1i;
  945|   340k|    *ptr_y++ = x3i;
  946|   340k|    *ptr_y++ = x3r;
  947|   340k|  }
  948|  21.2k|  ptr_y -= 2 * npoints;
  949|  21.2k|  del = 4;
  950|  21.2k|  nodespacing = 64;
  951|  21.2k|  in_loop_cnt = npoints >> 4;
  952|  63.8k|  for (i = n_stages - 1; i>0; i--)
  ------------------
  |  Branch (952:26): [True: 42.5k, False: 21.2k]
  ------------------
  953|  42.5k|  {
  954|  42.5k|    const FLOAT32 *twiddles = ptr_w;
  955|  42.5k|    FLOAT32 *data = ptr_y;
  956|  42.5k|    FLOAT32 w1h, w2h, w3h, w1l, w2l, w3l;
  957|  42.5k|    WORD32 sec_loop_cnt;
  958|       |
  959|   148k|    for (k = in_loop_cnt; k != 0; k--)
  ------------------
  |  Branch (959:27): [True: 106k, False: 42.5k]
  ------------------
  960|   106k|    {
  961|   106k|      x0r = (*data);
  962|   106k|      x0i = (*(data + 1));
  963|   106k|      data += (del << 1);
  964|       |
  965|   106k|      x1r = (*data);
  966|   106k|      x1i = (*(data + 1));
  967|   106k|      data += (del << 1);
  968|       |
  969|   106k|      x2r = (*data);
  970|   106k|      x2i = (*(data + 1));
  971|   106k|      data += (del << 1);
  972|       |
  973|   106k|      x3r = (*data);
  974|   106k|      x3i = (*(data + 1));
  975|   106k|      data -= 3 * (del << 1);
  976|       |
  977|   106k|      x0r = x0r + x2r;
  978|   106k|      x0i = x0i + x2i;
  979|   106k|      x2r = x0r - (x2r * 2);
  980|   106k|      x2i = x0i - (x2i * 2);
  981|   106k|      x1r = x1r + x3r;
  982|   106k|      x1i = x1i + x3i;
  983|   106k|      x3r = x1r - (x3r * 2);
  984|   106k|      x3i = x1i - (x3i * 2);
  985|       |
  986|   106k|      x0r = x0r + x1r;
  987|   106k|      x0i = x0i + x1i;
  988|   106k|      x1r = x0r - (x1r * 2);
  989|   106k|      x1i = x0i - (x1i * 2);
  990|   106k|      x2r = x2r + x3i;
  991|   106k|      x2i = x2i - x3r;
  992|   106k|      x3i = x2r - (x3i * 2);
  993|   106k|      x3r = x2i + (x3r * 2);
  994|       |
  995|   106k|      *data = x0r;
  996|   106k|      *(data + 1) = x0i;
  997|   106k|      data += (del << 1);
  998|       |
  999|   106k|      *data = x2r;
 1000|   106k|      *(data + 1) = x2i;
 1001|   106k|      data += (del << 1);
 1002|       |
 1003|   106k|      *data = x1r;
 1004|   106k|      *(data + 1) = x1i;
 1005|   106k|      data += (del << 1);
 1006|       |
 1007|   106k|      *data = x3i;
 1008|   106k|      *(data + 1) = x3r;
 1009|   106k|      data += (del << 1);
 1010|   106k|    }
 1011|  42.5k|    data = ptr_y + 2;
 1012|       |
 1013|  42.5k|    sec_loop_cnt = (nodespacing * del);
 1014|  42.5k|    sec_loop_cnt = (sec_loop_cnt / 4) + (sec_loop_cnt / 8) - (sec_loop_cnt / 16) \
 1015|  42.5k|            + (sec_loop_cnt / 32) - (sec_loop_cnt / 64) + (sec_loop_cnt / 128) \
 1016|  42.5k|            - (sec_loop_cnt / 256);
 1017|  42.5k|    j = nodespacing;
 1018|       |
 1019|   170k|    for (j = nodespacing; j <= sec_loop_cnt; j += nodespacing)
  ------------------
  |  Branch (1019:27): [True: 127k, False: 42.5k]
  ------------------
 1020|   127k|    {
 1021|   127k|      w1h = *(twiddles + 2 * j);
 1022|   127k|      w1l = *(twiddles + 2 * j + 1);
 1023|   127k|      w2h = *(twiddles + 2 * (j << 1));
 1024|   127k|      w2l = *(twiddles + 2 * (j << 1) + 1);
 1025|   127k|      w3h = *(twiddles + 2 * j + 2 * (j << 1));
 1026|   127k|      w3l = *(twiddles + 2 * j + 2 * (j << 1) + 1);
 1027|       |
 1028|   319k|      for (k = in_loop_cnt; k != 0; k--)
  ------------------
  |  Branch (1028:29): [True: 191k, False: 127k]
  ------------------
 1029|   191k|      {
 1030|   191k|        FLOAT32 tmp;
 1031|   191k|        FLOAT32 x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;
 1032|       |
 1033|   191k|        data += (del << 1);
 1034|       |
 1035|   191k|        x1r = *data;
 1036|   191k|        x1i = *(data + 1);
 1037|   191k|        data += (del << 1);
 1038|       |
 1039|   191k|        x2r = *data;
 1040|   191k|        x2i = *(data + 1);
 1041|   191k|        data += (del << 1);
 1042|       |
 1043|   191k|        x3r = *data;
 1044|   191k|        x3i = *(data + 1);
 1045|   191k|        data -= 3 * (del << 1);
 1046|       |
 1047|   191k|        tmp = (ixheaacd_mult32X32float(x1r, w1l) - ixheaacd_mult32X32float(x1i, w1h));
 1048|   191k|        x1i = ixheaacd_mac32X32float(ixheaacd_mult32X32float(x1r, w1h), x1i, w1l);
 1049|   191k|        x1r = tmp;
 1050|       |
 1051|   191k|        tmp = (ixheaacd_mult32X32float(x2r, w2l) - ixheaacd_mult32X32float(x2i, w2h));
 1052|   191k|        x2i = ixheaacd_mac32X32float(ixheaacd_mult32X32float(x2r, w2h), x2i, w2l);
 1053|   191k|        x2r = tmp;
 1054|       |
 1055|   191k|        tmp = (ixheaacd_mult32X32float(x3r, w3l) - ixheaacd_mult32X32float(x3i, w3h));
 1056|   191k|        x3i = ixheaacd_mac32X32float(ixheaacd_mult32X32float(x3r, w3h), x3i, w3l);
 1057|   191k|        x3r = tmp;
 1058|       |
 1059|   191k|        x0r = (*data);
 1060|   191k|        x0i = (*(data + 1));
 1061|       |
 1062|   191k|        x0r = x0r + (x2r);
 1063|   191k|        x0i = x0i + (x2i);
 1064|   191k|        x2r = x0r - (x2r * 2);
 1065|   191k|        x2i = x0i - (x2i * 2);
 1066|   191k|        x1r = x1r + x3r;
 1067|   191k|        x1i = x1i + x3i;
 1068|   191k|        x3r = x1r - (x3r * 2);
 1069|   191k|        x3i = x1i - (x3i * 2);
 1070|       |
 1071|   191k|        x0r = x0r + (x1r);
 1072|   191k|        x0i = x0i + (x1i);
 1073|   191k|        x1r = x0r - (x1r * 2);
 1074|   191k|        x1i = x0i - (x1i * 2);
 1075|   191k|        x2r = x2r + (x3i);
 1076|   191k|        x2i = x2i - (x3r);
 1077|   191k|        x3i = x2r - (x3i * 2);
 1078|   191k|        x3r = x2i + (x3r * 2);
 1079|       |
 1080|   191k|        *data = x0r;
 1081|   191k|        *(data + 1) = x0i;
 1082|   191k|        data += (del << 1);
 1083|       |
 1084|   191k|        *data = x2r;
 1085|   191k|        *(data + 1) = x2i;
 1086|   191k|        data += (del << 1);
 1087|       |
 1088|   191k|        *data = x1r;
 1089|   191k|        *(data + 1) = x1i;
 1090|   191k|        data += (del << 1);
 1091|       |
 1092|   191k|        *data = x3i;
 1093|   191k|        *(data + 1) = x3r;
 1094|   191k|        data += (del << 1);
 1095|   191k|      }
 1096|   127k|      data -= 2 * npoints;
 1097|   127k|      data += 2;
 1098|   127k|    }
 1099|   127k|    for (; j <= (nodespacing * del) >> 1; j += nodespacing)
  ------------------
  |  Branch (1099:12): [True: 85.1k, False: 42.5k]
  ------------------
 1100|  85.1k|    {
 1101|  85.1k|      w1h = *(twiddles + 2 * j);
 1102|  85.1k|      w2h = *(twiddles + 2 * (j << 1));
 1103|  85.1k|      w3h = *(twiddles + 2 * j + 2 * (j << 1) - 512);
 1104|  85.1k|      w1l = *(twiddles + 2 * j + 1);
 1105|  85.1k|      w2l = *(twiddles + 2 * (j << 1) + 1);
 1106|  85.1k|      w3l = *(twiddles + 2 * j + 2 * (j << 1) - 511);
 1107|       |
 1108|   234k|      for (k = in_loop_cnt; k != 0; k--)
  ------------------
  |  Branch (1108:29): [True: 148k, False: 85.1k]
  ------------------
 1109|   148k|      {
 1110|   148k|        FLOAT32 tmp;
 1111|   148k|        FLOAT32 x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;
 1112|       |
 1113|   148k|        data += (del << 1);
 1114|       |
 1115|   148k|        x1r = *data;
 1116|   148k|        x1i = *(data + 1);
 1117|   148k|        data += (del << 1);
 1118|       |
 1119|   148k|        x2r = *data;
 1120|   148k|        x2i = *(data + 1);
 1121|   148k|        data += (del << 1);
 1122|       |
 1123|   148k|        x3r = *data;
 1124|   148k|        x3i = *(data + 1);
 1125|   148k|        data -= 3 * (del << 1);
 1126|       |
 1127|   148k|        tmp = (ixheaacd_mult32X32float(x1r, w1l) - ixheaacd_mult32X32float(x1i, w1h));
 1128|   148k|        x1i = ixheaacd_mac32X32float(ixheaacd_mult32X32float(x1r, w1h), x1i, w1l);
 1129|   148k|        x1r = tmp;
 1130|       |
 1131|   148k|        tmp = (ixheaacd_mult32X32float(x2r, w2l) - ixheaacd_mult32X32float(x2i, w2h));
 1132|   148k|        x2i = ixheaacd_mac32X32float(ixheaacd_mult32X32float(x2r, w2h), x2i, w2l);
 1133|   148k|        x2r = tmp;
 1134|       |
 1135|   148k|        tmp = (ixheaacd_mult32X32float(x3r, w3h) + ixheaacd_mult32X32float(x3i, w3l));
 1136|   148k|        x3i = -ixheaacd_mult32X32float(x3r, w3l) + ixheaacd_mult32X32float(x3i, w3h);
 1137|   148k|        x3r = tmp;
 1138|       |
 1139|   148k|        x0r = (*data);
 1140|   148k|        x0i = (*(data + 1));
 1141|       |
 1142|   148k|        x0r = x0r + (x2r);
 1143|   148k|        x0i = x0i + (x2i);
 1144|   148k|        x2r = x0r - (x2r * 2);
 1145|   148k|        x2i = x0i - (x2i * 2);
 1146|   148k|        x1r = x1r + x3r;
 1147|   148k|        x1i = x1i + x3i;
 1148|   148k|        x3r = x1r - (x3r * 2);
 1149|   148k|        x3i = x1i - (x3i * 2);
 1150|       |
 1151|   148k|        x0r = x0r + (x1r);
 1152|   148k|        x0i = x0i + (x1i);
 1153|   148k|        x1r = x0r - (x1r * 2);
 1154|   148k|        x1i = x0i - (x1i * 2);
 1155|   148k|        x2r = x2r + (x3i);
 1156|   148k|        x2i = x2i - (x3r);
 1157|   148k|        x3i = x2r - (x3i * 2);
 1158|   148k|        x3r = x2i + (x3r * 2);
 1159|       |
 1160|   148k|        *data = x0r;
 1161|   148k|        *(data + 1) = x0i;
 1162|   148k|        data += (del << 1);
 1163|       |
 1164|   148k|        *data = x2r;
 1165|   148k|        *(data + 1) = x2i;
 1166|   148k|        data += (del << 1);
 1167|       |
 1168|   148k|        *data = x1r;
 1169|   148k|        *(data + 1) = x1i;
 1170|   148k|        data += (del << 1);
 1171|       |
 1172|   148k|        *data = x3i;
 1173|   148k|        *(data + 1) = x3r;
 1174|   148k|        data += (del << 1);
 1175|   148k|      }
 1176|  85.1k|      data -= 2 * npoints;
 1177|  85.1k|      data += 2;
 1178|  85.1k|    }
 1179|  85.1k|    for (; j <= sec_loop_cnt * 2; j += nodespacing)
  ------------------
  |  Branch (1179:12): [True: 42.5k, False: 42.5k]
  ------------------
 1180|  42.5k|    {
 1181|  42.5k|      w1h = *(twiddles + 2 * j);
 1182|  42.5k|      w2h = *(twiddles + 2 * (j << 1) - 512);
 1183|  42.5k|      w3h = *(twiddles + 2 * j + 2 * (j << 1) - 512);
 1184|  42.5k|      w1l = *(twiddles + 2 * j + 1);
 1185|  42.5k|      w2l = *(twiddles + 2 * (j << 1) - 511);
 1186|  42.5k|      w3l = *(twiddles + 2 * j + 2 * (j << 1) - 511);
 1187|       |
 1188|  85.1k|      for (k = in_loop_cnt; k != 0; k--)
  ------------------
  |  Branch (1188:29): [True: 42.5k, False: 42.5k]
  ------------------
 1189|  42.5k|      {
 1190|  42.5k|        FLOAT32 tmp;
 1191|  42.5k|        FLOAT32 x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;
 1192|       |
 1193|  42.5k|        data += (del << 1);
 1194|       |
 1195|  42.5k|        x1r = *data;
 1196|  42.5k|        x1i = *(data + 1);
 1197|  42.5k|        data += (del << 1);
 1198|       |
 1199|  42.5k|        x2r = *data;
 1200|  42.5k|        x2i = *(data + 1);
 1201|  42.5k|        data += (del << 1);
 1202|       |
 1203|  42.5k|        x3r = *data;
 1204|  42.5k|        x3i = *(data + 1);
 1205|  42.5k|        data -= 3 * (del << 1);
 1206|       |
 1207|  42.5k|        tmp = (ixheaacd_mult32X32float(x1r, w1l) - ixheaacd_mult32X32float(x1i, w1h));
 1208|  42.5k|        x1i = ixheaacd_mac32X32float(ixheaacd_mult32X32float(x1r, w1h), x1i, w1l);
 1209|  42.5k|        x1r = tmp;
 1210|       |
 1211|  42.5k|        tmp = (ixheaacd_mult32X32float(x2r, w2h) + ixheaacd_mult32X32float(x2i, w2l));
 1212|  42.5k|        x2i = -ixheaacd_mult32X32float(x2r, w2l) + ixheaacd_mult32X32float(x2i, w2h);
 1213|  42.5k|        x2r = tmp;
 1214|       |
 1215|  42.5k|        tmp = (ixheaacd_mult32X32float(x3r, w3h) + ixheaacd_mult32X32float(x3i, w3l));
 1216|  42.5k|        x3i = -ixheaacd_mult32X32float(x3r, w3l) + ixheaacd_mult32X32float(x3i, w3h);
 1217|  42.5k|        x3r = tmp;
 1218|       |
 1219|  42.5k|        x0r = (*data);
 1220|  42.5k|        x0i = (*(data + 1));
 1221|       |
 1222|  42.5k|        x0r = x0r + (x2r);
 1223|  42.5k|        x0i = x0i + (x2i);
 1224|  42.5k|        x2r = x0r - (x2r * 2);
 1225|  42.5k|        x2i = x0i - (x2i * 2);
 1226|  42.5k|        x1r = x1r + x3r;
 1227|  42.5k|        x1i = x1i + x3i;
 1228|  42.5k|        x3r = x1r - (x3r * 2);
 1229|  42.5k|        x3i = x1i - (x3i * 2);
 1230|       |
 1231|  42.5k|        x0r = x0r + (x1r);
 1232|  42.5k|        x0i = x0i + (x1i);
 1233|  42.5k|        x1r = x0r - (x1r * 2);
 1234|  42.5k|        x1i = x0i - (x1i * 2);
 1235|  42.5k|        x2r = x2r + (x3i);
 1236|  42.5k|        x2i = x2i - (x3r);
 1237|  42.5k|        x3i = x2r - (x3i * 2);
 1238|  42.5k|        x3r = x2i + (x3r * 2);
 1239|       |
 1240|  42.5k|        *data = x0r;
 1241|  42.5k|        *(data + 1) = x0i;
 1242|  42.5k|        data += (del << 1);
 1243|       |
 1244|  42.5k|        *data = x2r;
 1245|  42.5k|        *(data + 1) = x2i;
 1246|  42.5k|        data += (del << 1);
 1247|       |
 1248|  42.5k|        *data = x1r;
 1249|  42.5k|        *(data + 1) = x1i;
 1250|  42.5k|        data += (del << 1);
 1251|       |
 1252|  42.5k|        *data = x3i;
 1253|  42.5k|        *(data + 1) = x3r;
 1254|  42.5k|        data += (del << 1);
 1255|  42.5k|      }
 1256|  42.5k|      data -= 2 * npoints;
 1257|  42.5k|      data += 2;
 1258|  42.5k|    }
 1259|   170k|    for (; j<nodespacing * del; j += nodespacing)
  ------------------
  |  Branch (1259:12): [True: 127k, False: 42.5k]
  ------------------
 1260|   127k|    {
 1261|   127k|      w1h = *(twiddles + 2 * j);
 1262|   127k|      w2h = *(twiddles + 2 * (j << 1) - 512);
 1263|   127k|      w3h = *(twiddles + 2 * j + 2 * (j << 1) - 1024);
 1264|   127k|      w1l = *(twiddles + 2 * j + 1);
 1265|   127k|      w2l = *(twiddles + 2 * (j << 1) - 511);
 1266|   127k|      w3l = *(twiddles + 2 * j + 2 * (j << 1) - 1023);
 1267|       |
 1268|   319k|      for (k = in_loop_cnt; k != 0; k--)
  ------------------
  |  Branch (1268:29): [True: 191k, False: 127k]
  ------------------
 1269|   191k|      {
 1270|   191k|        FLOAT32 tmp;
 1271|   191k|        FLOAT32 x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;
 1272|       |
 1273|   191k|        data += (del << 1);
 1274|       |
 1275|   191k|        x1r = *data;
 1276|   191k|        x1i = *(data + 1);
 1277|   191k|        data += (del << 1);
 1278|       |
 1279|   191k|        x2r = *data;
 1280|   191k|        x2i = *(data + 1);
 1281|   191k|        data += (del << 1);
 1282|       |
 1283|   191k|        x3r = *data;
 1284|   191k|        x3i = *(data + 1);
 1285|   191k|        data -= 3 * (del << 1);
 1286|       |
 1287|   191k|        tmp = (ixheaacd_mult32X32float(x1r, w1l) - ixheaacd_mult32X32float(x1i, w1h));
 1288|   191k|        x1i = ixheaacd_mac32X32float(ixheaacd_mult32X32float(x1r, w1h), x1i, w1l);
 1289|   191k|        x1r = tmp;
 1290|       |
 1291|   191k|        tmp = (ixheaacd_mult32X32float(x2r, w2h) + ixheaacd_mult32X32float(x2i, w2l));
 1292|   191k|        x2i = -ixheaacd_mult32X32float(x2r, w2l) + ixheaacd_mult32X32float(x2i, w2h);
 1293|   191k|        x2r = tmp;
 1294|       |
 1295|   191k|        tmp = (-ixheaacd_mult32X32float(x3r, w3l) + ixheaacd_mult32X32float(x3i, w3h));
 1296|   191k|        x3i = ixheaacd_mac32X32float(ixheaacd_mult32X32float(x3r, w3h), x3i, w3l);
 1297|   191k|        x3r = tmp;
 1298|       |
 1299|   191k|        x0r = (*data);
 1300|   191k|        x0i = (*(data + 1));
 1301|       |
 1302|   191k|        x0r = x0r + (x2r);
 1303|   191k|        x0i = x0i + (x2i);
 1304|   191k|        x2r = x0r - (x2r * 2);
 1305|   191k|        x2i = x0i - (x2i * 2);
 1306|   191k|        x1r = x1r + x3r;
 1307|   191k|        x1i = x1i - x3i;
 1308|   191k|        x3r = x1r - (x3r * 2);
 1309|   191k|        x3i = x1i + (x3i * 2);
 1310|       |
 1311|   191k|        x0r = x0r + (x1r);
 1312|   191k|        x0i = x0i + (x1i);
 1313|   191k|        x1r = x0r - (x1r * 2);
 1314|   191k|        x1i = x0i - (x1i * 2);
 1315|   191k|        x2r = x2r + (x3i);
 1316|   191k|        x2i = x2i - (x3r);
 1317|   191k|        x3i = x2r - (x3i * 2);
 1318|   191k|        x3r = x2i + (x3r * 2);
 1319|       |
 1320|   191k|        *data = x0r;
 1321|   191k|        *(data + 1) = x0i;
 1322|   191k|        data += (del << 1);
 1323|       |
 1324|   191k|        *data = x2r;
 1325|   191k|        *(data + 1) = x2i;
 1326|   191k|        data += (del << 1);
 1327|       |
 1328|   191k|        *data = x1r;
 1329|   191k|        *(data + 1) = x1i;
 1330|   191k|        data += (del << 1);
 1331|       |
 1332|   191k|        *data = x3i;
 1333|   191k|        *(data + 1) = x3r;
 1334|   191k|        data += (del << 1);
 1335|   191k|      }
 1336|   127k|      data -= 2 * npoints;
 1337|   127k|      data += 2;
 1338|   127k|    }
 1339|  42.5k|    nodespacing >>= 2;
 1340|  42.5k|    del <<= 2;
 1341|  42.5k|    in_loop_cnt >>= 2;
 1342|  42.5k|  }
 1343|  21.2k|  if (not_power_4)
  ------------------
  |  Branch (1343:7): [True: 0, False: 21.2k]
  ------------------
 1344|      0|  {
 1345|      0|    const FLOAT32 *twiddles = ptr_w;
 1346|      0|    nodespacing <<= 1;
 1347|       |
 1348|      0|    for (j = del / 2; j != 0; j--)
  ------------------
  |  Branch (1348:23): [True: 0, False: 0]
  ------------------
 1349|      0|    {
 1350|      0|      FLOAT32 w1h = *twiddles;
 1351|      0|      FLOAT32 w1l = *(twiddles + 1);
 1352|      0|      FLOAT32 tmp;
 1353|      0|      twiddles += nodespacing * 2;
 1354|       |
 1355|      0|      x0r = *ptr_y;
 1356|      0|      x0i = *(ptr_y + 1);
 1357|      0|      ptr_y += (del << 1);
 1358|       |
 1359|      0|      x1r = *ptr_y;
 1360|      0|      x1i = *(ptr_y + 1);
 1361|       |
 1362|      0|      tmp = (ixheaacd_mult32X32float(x1r, w1l) - ixheaacd_mult32X32float(x1i, w1h));
 1363|      0|      x1i = ixheaacd_mac32X32float(ixheaacd_mult32X32float(x1r, w1h), x1i, w1l);
 1364|      0|      x1r = tmp;
 1365|       |
 1366|      0|      *ptr_y = (x0r) - (x1r);
 1367|      0|      *(ptr_y + 1) = (x0i) - (x1i);
 1368|      0|      ptr_y -= (del << 1);
 1369|       |
 1370|      0|      *ptr_y = (x0r) + (x1r);
 1371|      0|      *(ptr_y + 1) = (x0i) + (x1i);
 1372|      0|      ptr_y += 2;
 1373|      0|    }
 1374|      0|    twiddles = ptr_w;
 1375|      0|    for (j = del / 2; j != 0; j--)
  ------------------
  |  Branch (1375:23): [True: 0, False: 0]
  ------------------
 1376|      0|    {
 1377|      0|      FLOAT32 w1h = *twiddles;
 1378|      0|      FLOAT32 w1l = *(twiddles + 1);
 1379|      0|      FLOAT32 tmp;
 1380|      0|      twiddles += nodespacing * 2;
 1381|       |
 1382|      0|      x0r = *ptr_y;
 1383|      0|      x0i = *(ptr_y + 1);
 1384|      0|      ptr_y += (del << 1);
 1385|       |
 1386|      0|      x1r = *ptr_y;
 1387|      0|      x1i = *(ptr_y + 1);
 1388|       |
 1389|      0|      tmp = (ixheaacd_mult32X32float(x1r, w1h) + ixheaacd_mult32X32float(x1i, w1l));
 1390|      0|      x1i = -ixheaacd_mult32X32float(x1r, w1l) + ixheaacd_mult32X32float(x1i, w1h);
 1391|      0|      x1r = tmp;
 1392|       |
 1393|      0|      *ptr_y = (x0r) - (x1r);
 1394|      0|      *(ptr_y + 1) = (x0i) - (x1i);
 1395|      0|      ptr_y -= (del << 1);
 1396|       |
 1397|      0|      *ptr_y = (x0r) + (x1r);
 1398|      0|      *(ptr_y + 1) = (x0i) + (x1i);
 1399|      0|      ptr_y += 2;
 1400|      0|    }
 1401|      0|  }
 1402|       |
 1403|  1.38M|  for (i = 0; i<nlength; i++)
  ------------------
  |  Branch (1403:15): [True: 1.36M, False: 21.2k]
  ------------------
 1404|  1.36M|  {
 1405|  1.36M|    xr[i] = y[2 * i];
 1406|  1.36M|    xi[i] = y[2 * i + 1];
 1407|  1.36M|  }
 1408|       |
 1409|  21.2k|  return;
 1410|  21.2k|}
ixheaacd_complex_fft_p2_dec:
 1413|  8.97M|                                 WORD32 fft_mode, WORD32 *preshift) {
 1414|  8.97M|  WORD32 i, j, k, n_stages;
 1415|  8.97M|  WORD32 h2, x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;
 1416|  8.97M|  WORD32 del, nodespacing, in_loop_cnt;
 1417|  8.97M|  WORD32 not_power_4;
 1418|  8.97M|  WORD32 npts, shift;
 1419|  8.97M|  WORD32 dig_rev_shift;
 1420|  8.97M|  WORD32 ptr_x[1024];
 1421|  8.97M|  WORD32 y[1024];
 1422|  8.97M|  WORD32 npoints = nlength;
 1423|  8.97M|  WORD32 n = 0;
 1424|  8.97M|  WORD32 *ptr_y = y;
 1425|  8.97M|  const WORD32 *ptr_w;
 1426|  8.97M|  dig_rev_shift = ixheaac_norm32(npoints) + 1 - 16;
 1427|  8.97M|  n_stages = 30 - ixheaac_norm32(npoints);
 1428|  8.97M|  not_power_4 = n_stages & 1;
 1429|       |
 1430|  8.97M|  n_stages = n_stages >> 1;
 1431|       |
 1432|  8.97M|  npts = npoints;
 1433|  37.7M|  while (npts >> 1) {
  ------------------
  |  Branch (1433:10): [True: 28.8M, False: 8.97M]
  ------------------
 1434|  28.8M|    n++;
 1435|  28.8M|    npts = npts >> 1;
 1436|  28.8M|  }
 1437|       |
 1438|  8.97M|  if (n % 2 == 0)
  ------------------
  |  Branch (1438:7): [True: 4.57M, False: 4.40M]
  ------------------
 1439|  4.57M|    shift = ((n + 4)) / 2;
 1440|  4.40M|  else
 1441|  4.40M|    shift = ((n + 3) / 2);
 1442|       |
 1443|   230M|  for (i = 0; i < nlength; i++) {
  ------------------
  |  Branch (1443:15): [True: 221M, False: 8.97M]
  ------------------
 1444|   221M|    ptr_x[2 * i] = (xr[i] / (1 << (shift)));
 1445|   221M|    ptr_x[2 * i + 1] = (xi[i] / (1 << (shift)));
 1446|   221M|  }
 1447|       |
 1448|  8.97M|  if (fft_mode == -1) {
  ------------------
  |  Branch (1448:7): [True: 8.02M, False: 951k]
  ------------------
 1449|  8.02M|    ptr_w = ixheaacd_twiddle_table_fft_32x32;
 1450|       |
 1451|  32.2M|    for (i = 0; i < npoints; i += 4) {
  ------------------
  |  Branch (1451:17): [True: 24.2M, False: 8.02M]
  ------------------
 1452|  24.2M|      WORD32 *inp = ptr_x;
 1453|       |
 1454|  24.2M|      DIG_REV(i, dig_rev_shift, h2);
  ------------------
  |  |   40|  24.2M|  do {                                                      \
  |  |   41|  24.2M|    unsigned _ = (i);                                       \
  |  |   42|  24.2M|    _ = ((_ & 0x33333333) << 2) | ((_ & ~0x33333333) >> 2); \
  |  |   43|  24.2M|    _ = ((_ & 0x0F0F0F0F) << 4) | ((_ & ~0x0F0F0F0F) >> 4); \
  |  |   44|  24.2M|    _ = ((_ & 0x00FF00FF) << 8) | ((_ & ~0x00FF00FF) >> 8); \
  |  |   45|  24.2M|    (j) = _ >> (m);                                         \
  |  |   46|  24.2M|  } while (0)
  |  |  ------------------
  |  |  |  Branch (46:12): [Folded, False: 24.2M]
  |  |  ------------------
  ------------------
 1455|  24.2M|      if (not_power_4) {
  ------------------
  |  Branch (1455:11): [True: 15.9M, False: 8.32M]
  ------------------
 1456|  15.9M|        h2 += 1;
 1457|  15.9M|        h2 &= ~1;
 1458|  15.9M|      }
 1459|  24.2M|      inp += (h2);
 1460|       |
 1461|  24.2M|      x0r = *inp;
 1462|  24.2M|      x0i = *(inp + 1);
 1463|  24.2M|      inp += (npoints >> 1);
 1464|       |
 1465|  24.2M|      x1r = *inp;
 1466|  24.2M|      x1i = *(inp + 1);
 1467|  24.2M|      inp += (npoints >> 1);
 1468|       |
 1469|  24.2M|      x2r = *inp;
 1470|  24.2M|      x2i = *(inp + 1);
 1471|  24.2M|      inp += (npoints >> 1);
 1472|       |
 1473|  24.2M|      x3r = *inp;
 1474|  24.2M|      x3i = *(inp + 1);
 1475|       |
 1476|  24.2M|      x0r = ixheaac_add32_sat(x0r, x2r);
 1477|  24.2M|      x0i = ixheaac_add32_sat(x0i, x2i);
 1478|  24.2M|      x2r = ixheaac_sub32_sat(x0r, ixheaac_shl32_sat(x2r, 1));
 1479|  24.2M|      x2i = ixheaac_sub32_sat(x0i, ixheaac_shl32_sat(x2i, 1));
 1480|  24.2M|      x1r = ixheaac_add32_sat(x1r, x3r);
 1481|  24.2M|      x1i = ixheaac_add32_sat(x1i, x3i);
 1482|  24.2M|      x3r = ixheaac_sub32_sat(x1r, ixheaac_shl32_sat(x3r, 1));
 1483|  24.2M|      x3i = ixheaac_sub32_sat(x1i, ixheaac_shl32_sat(x3i, 1));
 1484|       |
 1485|  24.2M|      x0r = ixheaac_add32_sat(x0r, x1r);
 1486|  24.2M|      x0i = ixheaac_add32_sat(x0i, x1i);
 1487|  24.2M|      x1r = ixheaac_sub32_sat(x0r, ixheaac_shl32_sat(x1r, 1));
 1488|  24.2M|      x1i = ixheaac_sub32_sat(x0i, ixheaac_shl32_sat(x1i, 1));
 1489|  24.2M|      x2r = ixheaac_add32_sat(x2r, x3i);
 1490|  24.2M|      x2i = ixheaac_sub32_sat(x2i, x3r);
 1491|  24.2M|      x3i = ixheaac_sub32_sat(x2r, ixheaac_shl32_sat(x3i, 1));
 1492|  24.2M|      x3r = ixheaac_add32_sat(x2i, ixheaac_shl32_sat(x3r, 1));
 1493|       |
 1494|  24.2M|      *ptr_y++ = x0r;
 1495|  24.2M|      *ptr_y++ = x0i;
 1496|  24.2M|      *ptr_y++ = x2r;
 1497|  24.2M|      *ptr_y++ = x2i;
 1498|  24.2M|      *ptr_y++ = x1r;
 1499|  24.2M|      *ptr_y++ = x1i;
 1500|  24.2M|      *ptr_y++ = x3i;
 1501|  24.2M|      *ptr_y++ = x3r;
 1502|  24.2M|    }
 1503|  8.02M|    ptr_y -= 2 * npoints;
 1504|  8.02M|    del = 4;
 1505|  8.02M|    nodespacing = 64;
 1506|  8.02M|    in_loop_cnt = npoints >> 4;
 1507|  9.28M|    for (i = n_stages - 1; i > 0; i--) {
  ------------------
  |  Branch (1507:28): [True: 1.26M, False: 8.02M]
  ------------------
 1508|  1.26M|      const WORD32 *twiddles = ptr_w;
 1509|  1.26M|      WORD32 *data = ptr_y;
 1510|  1.26M|      WORD32 w1h, w2h, w3h, w1l, w2l, w3l;
 1511|  1.26M|      WORD32 sec_loop_cnt;
 1512|       |
 1513|  5.26M|      for (k = in_loop_cnt; k != 0; k--) {
  ------------------
  |  Branch (1513:29): [True: 3.99M, False: 1.26M]
  ------------------
 1514|  3.99M|        x0r = (*data);
 1515|  3.99M|        x0i = (*(data + 1));
 1516|  3.99M|        data += (del << 1);
 1517|       |
 1518|  3.99M|        x1r = (*data);
 1519|  3.99M|        x1i = (*(data + 1));
 1520|  3.99M|        data += (del << 1);
 1521|       |
 1522|  3.99M|        x2r = (*data);
 1523|  3.99M|        x2i = (*(data + 1));
 1524|  3.99M|        data += (del << 1);
 1525|       |
 1526|  3.99M|        x3r = (*data);
 1527|  3.99M|        x3i = (*(data + 1));
 1528|  3.99M|        data -= 3 * (del << 1);
 1529|       |
 1530|  3.99M|        x0r = ixheaac_add32_sat(x0r, x2r);
 1531|  3.99M|        x0i = ixheaac_add32_sat(x0i, x2i);
 1532|  3.99M|        x2r = ixheaac_sub32_sat(x0r, ixheaac_shl32_sat(x2r, 1));
 1533|  3.99M|        x2i = ixheaac_sub32_sat(x0i, ixheaac_shl32_sat(x2i, 1));
 1534|  3.99M|        x1r = ixheaac_add32_sat(x1r, x3r);
 1535|  3.99M|        x1i = ixheaac_add32_sat(x1i, x3i);
 1536|  3.99M|        x3r = ixheaac_sub32_sat(x1r, ixheaac_shl32_sat(x3r, 1));
 1537|  3.99M|        x3i = ixheaac_sub32_sat(x1i, ixheaac_shl32_sat(x3i, 1));
 1538|       |
 1539|  3.99M|        x0r = ixheaac_add32_sat(x0r, x1r);
 1540|  3.99M|        x0i = ixheaac_add32_sat(x0i, x1i);
 1541|  3.99M|        x1r = ixheaac_sub32_sat(x0r, ixheaac_shl32_sat(x1r, 1));
 1542|  3.99M|        x1i = ixheaac_sub32_sat(x0i, ixheaac_shl32_sat(x1i, 1));
 1543|  3.99M|        x2r = ixheaac_add32_sat(x2r, x3i);
 1544|  3.99M|        x2i = ixheaac_sub32_sat(x2i, x3r);
 1545|  3.99M|        x3i = ixheaac_sub32_sat(x2r, ixheaac_shl32_sat(x3i, 1));
 1546|  3.99M|        x3r = ixheaac_add32_sat(x2i, ixheaac_shl32_sat(x3r, 1));
 1547|       |
 1548|  3.99M|        *data = x0r;
 1549|  3.99M|        *(data + 1) = x0i;
 1550|  3.99M|        data += (del << 1);
 1551|       |
 1552|  3.99M|        *data = x2r;
 1553|  3.99M|        *(data + 1) = x2i;
 1554|  3.99M|        data += (del << 1);
 1555|       |
 1556|  3.99M|        *data = x1r;
 1557|  3.99M|        *(data + 1) = x1i;
 1558|  3.99M|        data += (del << 1);
 1559|       |
 1560|  3.99M|        *data = x3i;
 1561|  3.99M|        *(data + 1) = x3r;
 1562|  3.99M|        data += (del << 1);
 1563|  3.99M|      }
 1564|  1.26M|      data = ptr_y + 2;
 1565|       |
 1566|  1.26M|      sec_loop_cnt = (nodespacing * del);
 1567|  1.26M|      sec_loop_cnt = (sec_loop_cnt / 4) + (sec_loop_cnt / 8) -
 1568|  1.26M|                     (sec_loop_cnt / 16) + (sec_loop_cnt / 32) -
 1569|  1.26M|                     (sec_loop_cnt / 64) + (sec_loop_cnt / 128) -
 1570|  1.26M|                     (sec_loop_cnt / 256);
 1571|  1.26M|      j = nodespacing;
 1572|       |
 1573|  4.51M|      for (j = nodespacing; j <= sec_loop_cnt; j += nodespacing) {
  ------------------
  |  Branch (1573:29): [True: 3.24M, False: 1.26M]
  ------------------
 1574|  3.24M|        w1h = *(twiddles + 2 * j);
 1575|  3.24M|        w1l = *(twiddles + 2 * j + 1);
 1576|  3.24M|        w2h = *(twiddles + 2 * (j << 1));
 1577|  3.24M|        w2l = *(twiddles + 2 * (j << 1) + 1);
 1578|  3.24M|        w3h = *(twiddles + 2 * j + 2 * (j << 1));
 1579|  3.24M|        w3l = *(twiddles + 2 * j + 2 * (j << 1) + 1);
 1580|       |
 1581|  10.2M|        for (k = in_loop_cnt; k != 0; k--) {
  ------------------
  |  Branch (1581:31): [True: 6.96M, False: 3.24M]
  ------------------
 1582|  6.96M|          WORD32 tmp;
 1583|  6.96M|          WORD32 x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;
 1584|       |
 1585|  6.96M|          data += (del << 1);
 1586|       |
 1587|  6.96M|          x1r = *data;
 1588|  6.96M|          x1i = *(data + 1);
 1589|  6.96M|          data += (del << 1);
 1590|       |
 1591|  6.96M|          x2r = *data;
 1592|  6.96M|          x2i = *(data + 1);
 1593|  6.96M|          data += (del << 1);
 1594|       |
 1595|  6.96M|          x3r = *data;
 1596|  6.96M|          x3i = *(data + 1);
 1597|  6.96M|          data -= 3 * (del << 1);
 1598|       |
 1599|  6.96M|          tmp = ixheaac_sub32_sat(ixheaacd_mult32_sat(x1r, w1l),
 1600|  6.96M|                                   ixheaacd_mult32_sat(x1i, w1h));
 1601|  6.96M|          x1i = ixheaacd_mac32_sat(ixheaacd_mult32_sat(x1r, w1h), x1i, w1l);
 1602|  6.96M|          x1r = tmp;
 1603|       |
 1604|  6.96M|          tmp = ixheaac_sub32_sat(ixheaacd_mult32_sat(x2r, w2l),
 1605|  6.96M|                                   ixheaacd_mult32_sat(x2i, w2h));
 1606|  6.96M|          x2i = ixheaacd_mac32_sat(ixheaacd_mult32_sat(x2r, w2h), x2i, w2l);
 1607|  6.96M|          x2r = tmp;
 1608|       |
 1609|  6.96M|          tmp = ixheaac_sub32_sat(ixheaacd_mult32_sat(x3r, w3l),
 1610|  6.96M|                                   ixheaacd_mult32_sat(x3i, w3h));
 1611|  6.96M|          x3i = ixheaacd_mac32_sat(ixheaacd_mult32_sat(x3r, w3h), x3i, w3l);
 1612|  6.96M|          x3r = tmp;
 1613|       |
 1614|  6.96M|          x0r = (*data);
 1615|  6.96M|          x0i = (*(data + 1));
 1616|       |
 1617|  6.96M|          x0r = ixheaac_add32_sat(x0r, x2r);
 1618|  6.96M|          x0i = ixheaac_add32_sat(x0i, x2i);
 1619|  6.96M|          x2r = ixheaac_sub32_sat(x0r, ixheaac_shl32_sat(x2r, 1));
 1620|  6.96M|          x2i = ixheaac_sub32_sat(x0i, ixheaac_shl32_sat(x2i, 1));
 1621|  6.96M|          x1r = ixheaac_add32_sat(x1r, x3r);
 1622|  6.96M|          x1i = ixheaac_add32_sat(x1i, x3i);
 1623|  6.96M|          x3r = ixheaac_sub32_sat(x1r, ixheaac_shl32_sat(x3r, 1));
 1624|  6.96M|          x3i = ixheaac_sub32_sat(x1i, ixheaac_shl32_sat(x3i, 1));
 1625|       |
 1626|  6.96M|          x0r = ixheaac_add32_sat(x0r, x1r);
 1627|  6.96M|          x0i = ixheaac_add32_sat(x0i, x1i);
 1628|  6.96M|          x1r = ixheaac_sub32_sat(x0r, ixheaac_shl32_sat(x1r, 1));
 1629|  6.96M|          x1i = ixheaac_sub32_sat(x0i, ixheaac_shl32_sat(x1i, 1));
 1630|  6.96M|          x2r = ixheaac_add32_sat(x2r, x3i);
 1631|  6.96M|          x2i = ixheaac_sub32_sat(x2i, x3r);
 1632|  6.96M|          x3i = ixheaac_sub32_sat(x2r, ixheaac_shl32_sat(x3i, 1));
 1633|  6.96M|          x3r = ixheaac_add32_sat(x2i, ixheaac_shl32_sat(x3r, 1));
 1634|       |
 1635|  6.96M|          *data = x0r;
 1636|  6.96M|          *(data + 1) = x0i;
 1637|  6.96M|          data += (del << 1);
 1638|       |
 1639|  6.96M|          *data = x2r;
 1640|  6.96M|          *(data + 1) = x2i;
 1641|  6.96M|          data += (del << 1);
 1642|       |
 1643|  6.96M|          *data = x1r;
 1644|  6.96M|          *(data + 1) = x1i;
 1645|  6.96M|          data += (del << 1);
 1646|       |
 1647|  6.96M|          *data = x3i;
 1648|  6.96M|          *(data + 1) = x3r;
 1649|  6.96M|          data += (del << 1);
 1650|  6.96M|        }
 1651|  3.24M|        data -= 2 * npoints;
 1652|  3.24M|        data += 2;
 1653|  3.24M|      }
 1654|  3.52M|      for (; j <= (nodespacing * del) >> 1; j += nodespacing) {
  ------------------
  |  Branch (1654:14): [True: 2.25M, False: 1.26M]
  ------------------
 1655|  2.25M|        w1h = *(twiddles + 2 * j);
 1656|  2.25M|        w2h = *(twiddles + 2 * (j << 1));
 1657|  2.25M|        w3h = *(twiddles + 2 * j + 2 * (j << 1) - 512);
 1658|  2.25M|        w1l = *(twiddles + 2 * j + 1);
 1659|  2.25M|        w2l = *(twiddles + 2 * (j << 1) + 1);
 1660|  2.25M|        w3l = *(twiddles + 2 * j + 2 * (j << 1) - 511);
 1661|       |
 1662|  7.73M|        for (k = in_loop_cnt; k != 0; k--) {
  ------------------
  |  Branch (1662:31): [True: 5.47M, False: 2.25M]
  ------------------
 1663|  5.47M|          WORD32 tmp;
 1664|  5.47M|          WORD32 x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;
 1665|  5.47M|          data += (del << 1);
 1666|       |
 1667|  5.47M|          x1r = *data;
 1668|  5.47M|          x1i = *(data + 1);
 1669|  5.47M|          data += (del << 1);
 1670|       |
 1671|  5.47M|          x2r = *data;
 1672|  5.47M|          x2i = *(data + 1);
 1673|  5.47M|          data += (del << 1);
 1674|       |
 1675|  5.47M|          x3r = *data;
 1676|  5.47M|          x3i = *(data + 1);
 1677|  5.47M|          data -= 3 * (del << 1);
 1678|       |
 1679|  5.47M|          tmp = ixheaac_sub32_sat(ixheaacd_mult32_sat(x1r, w1l),
 1680|  5.47M|                                   ixheaacd_mult32_sat(x1i, w1h));
 1681|  5.47M|          x1i = ixheaacd_mac32_sat(ixheaacd_mult32_sat(x1r, w1h), x1i, w1l);
 1682|  5.47M|          x1r = tmp;
 1683|       |
 1684|  5.47M|          tmp = ixheaac_sub32_sat(ixheaacd_mult32_sat(x2r, w2l),
 1685|  5.47M|                                   ixheaacd_mult32_sat(x2i, w2h));
 1686|  5.47M|          x2i = ixheaacd_mac32_sat(ixheaacd_mult32_sat(x2r, w2h), x2i, w2l);
 1687|  5.47M|          x2r = tmp;
 1688|       |
 1689|  5.47M|          tmp = ixheaac_add32_sat(ixheaacd_mult32_sat(x3r, w3h),
 1690|  5.47M|                                   ixheaacd_mult32_sat(x3i, w3l));
 1691|  5.47M|          x3i = ixheaac_sub32_sat(ixheaacd_mult32_sat(x3i, w3h),
 1692|  5.47M|                                   ixheaacd_mult32_sat(x3r, w3l));
 1693|  5.47M|          x3r = tmp;
 1694|       |
 1695|  5.47M|          x0r = (*data);
 1696|  5.47M|          x0i = (*(data + 1));
 1697|       |
 1698|  5.47M|          x0r = ixheaac_add32_sat(x0r, x2r);
 1699|  5.47M|          x0i = ixheaac_add32_sat(x0i, x2i);
 1700|  5.47M|          x2r = ixheaac_sub32_sat(x0r, ixheaac_shl32_sat(x2r, 1));
 1701|  5.47M|          x2i = ixheaac_sub32_sat(x0i, ixheaac_shl32_sat(x2i, 1));
 1702|  5.47M|          x1r = ixheaac_add32_sat(x1r, x3r);
 1703|  5.47M|          x1i = ixheaac_add32_sat(x1i, x3i);
 1704|  5.47M|          x3r = ixheaac_sub32_sat(x1r, ixheaac_shl32_sat(x3r, 1));
 1705|  5.47M|          x3i = ixheaac_sub32_sat(x1i, ixheaac_shl32_sat(x3i, 1));
 1706|       |
 1707|  5.47M|          x0r = ixheaac_add32_sat(x0r, x1r);
 1708|  5.47M|          x0i = ixheaac_add32_sat(x0i, x1i);
 1709|  5.47M|          x1r = ixheaac_sub32_sat(x0r, ixheaac_shl32_sat(x1r, 1));
 1710|  5.47M|          x1i = ixheaac_sub32_sat(x0i, ixheaac_shl32_sat(x1i, 1));
 1711|  5.47M|          x2r = ixheaac_add32_sat(x2r, x3i);
 1712|  5.47M|          x2i = ixheaac_sub32_sat(x2i, x3r);
 1713|  5.47M|          x3i = ixheaac_sub32_sat(x2r, ixheaac_shl32_sat(x3i, 1));
 1714|  5.47M|          x3r = ixheaac_add32_sat(x2i, ixheaac_shl32_sat(x3r, 1));
 1715|       |
 1716|  5.47M|          *data = x0r;
 1717|  5.47M|          *(data + 1) = x0i;
 1718|  5.47M|          data += (del << 1);
 1719|       |
 1720|  5.47M|          *data = x2r;
 1721|  5.47M|          *(data + 1) = x2i;
 1722|  5.47M|          data += (del << 1);
 1723|       |
 1724|  5.47M|          *data = x1r;
 1725|  5.47M|          *(data + 1) = x1i;
 1726|  5.47M|          data += (del << 1);
 1727|       |
 1728|  5.47M|          *data = x3i;
 1729|  5.47M|          *(data + 1) = x3r;
 1730|  5.47M|          data += (del << 1);
 1731|  5.47M|        }
 1732|  2.25M|        data -= 2 * npoints;
 1733|  2.25M|        data += 2;
 1734|  2.25M|      }
 1735|  2.25M|      for (; j <= sec_loop_cnt * 2; j += nodespacing) {
  ------------------
  |  Branch (1735:14): [True: 990k, False: 1.26M]
  ------------------
 1736|   990k|        w1h = *(twiddles + 2 * j);
 1737|   990k|        w2h = *(twiddles + 2 * (j << 1) - 512);
 1738|   990k|        w3h = *(twiddles + 2 * j + 2 * (j << 1) - 512);
 1739|   990k|        w1l = *(twiddles + 2 * j + 1);
 1740|   990k|        w2l = *(twiddles + 2 * (j << 1) - 511);
 1741|   990k|        w3l = *(twiddles + 2 * j + 2 * (j << 1) - 511);
 1742|       |
 1743|  2.47M|        for (k = in_loop_cnt; k != 0; k--) {
  ------------------
  |  Branch (1743:31): [True: 1.48M, False: 990k]
  ------------------
 1744|  1.48M|          WORD32 tmp;
 1745|  1.48M|          WORD32 x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;
 1746|       |
 1747|  1.48M|          data += (del << 1);
 1748|       |
 1749|  1.48M|          x1r = *data;
 1750|  1.48M|          x1i = *(data + 1);
 1751|  1.48M|          data += (del << 1);
 1752|       |
 1753|  1.48M|          x2r = *data;
 1754|  1.48M|          x2i = *(data + 1);
 1755|  1.48M|          data += (del << 1);
 1756|       |
 1757|  1.48M|          x3r = *data;
 1758|  1.48M|          x3i = *(data + 1);
 1759|  1.48M|          data -= 3 * (del << 1);
 1760|       |
 1761|  1.48M|          tmp = ixheaac_sub32_sat(ixheaacd_mult32_sat(x1r, w1l),
 1762|  1.48M|                                   ixheaacd_mult32_sat(x1i, w1h));
 1763|  1.48M|          x1i = ixheaacd_mac32_sat(ixheaacd_mult32_sat(x1r, w1h), x1i, w1l);
 1764|  1.48M|          x1r = tmp;
 1765|       |
 1766|  1.48M|          tmp = ixheaac_add32_sat(ixheaacd_mult32_sat(x2r, w2h),
 1767|  1.48M|                                   ixheaacd_mult32_sat(x2i, w2l));
 1768|  1.48M|          x2i = ixheaac_sub32_sat(ixheaacd_mult32_sat(x2i, w2h),
 1769|  1.48M|                                   ixheaacd_mult32_sat(x2r, w2l));
 1770|  1.48M|          x2r = tmp;
 1771|       |
 1772|  1.48M|          tmp = ixheaac_add32_sat(ixheaacd_mult32_sat(x3r, w3h),
 1773|  1.48M|                                   ixheaacd_mult32_sat(x3i, w3l));
 1774|  1.48M|          x3i = ixheaac_sub32_sat(ixheaacd_mult32_sat(x3i, w3h),
 1775|  1.48M|                                   ixheaacd_mult32_sat(x3r, w3l));
 1776|  1.48M|          x3r = tmp;
 1777|       |
 1778|  1.48M|          x0r = (*data);
 1779|  1.48M|          x0i = (*(data + 1));
 1780|       |
 1781|  1.48M|          x0r = ixheaac_add32_sat(x0r, x2r);
 1782|  1.48M|          x0i = ixheaac_add32_sat(x0i, x2i);
 1783|  1.48M|          x2r = ixheaac_sub32_sat(x0r, ixheaac_shl32_sat(x2r, 1));
 1784|  1.48M|          x2i = ixheaac_sub32_sat(x0i, ixheaac_shl32_sat(x2i, 1));
 1785|  1.48M|          x1r = ixheaac_add32_sat(x1r, x3r);
 1786|  1.48M|          x1i = ixheaac_add32_sat(x1i, x3i);
 1787|  1.48M|          x3r = ixheaac_sub32_sat(x1r, ixheaac_shl32_sat(x3r, 1));
 1788|  1.48M|          x3i = ixheaac_sub32_sat(x1i, ixheaac_shl32_sat(x3i, 1));
 1789|       |
 1790|  1.48M|          x0r = ixheaac_add32_sat(x0r, x1r);
 1791|  1.48M|          x0i = ixheaac_add32_sat(x0i, x1i);
 1792|  1.48M|          x1r = ixheaac_sub32_sat(x0r, ixheaac_shl32_sat(x1r, 1));
 1793|  1.48M|          x1i = ixheaac_sub32_sat(x0i, ixheaac_shl32_sat(x1i, 1));
 1794|  1.48M|          x2r = ixheaac_add32_sat(x2r, x3i);
 1795|  1.48M|          x2i = ixheaac_sub32_sat(x2i, x3r);
 1796|  1.48M|          x3i = ixheaac_sub32_sat(x2r, ixheaac_shl32_sat(x3i, 1));
 1797|  1.48M|          x3r = ixheaac_add32_sat(x2i, ixheaac_shl32_sat(x3r, 1));
 1798|       |
 1799|  1.48M|          *data = x0r;
 1800|  1.48M|          *(data + 1) = x0i;
 1801|  1.48M|          data += (del << 1);
 1802|       |
 1803|  1.48M|          *data = x2r;
 1804|  1.48M|          *(data + 1) = x2i;
 1805|  1.48M|          data += (del << 1);
 1806|       |
 1807|  1.48M|          *data = x1r;
 1808|  1.48M|          *(data + 1) = x1i;
 1809|  1.48M|          data += (del << 1);
 1810|       |
 1811|  1.48M|          *data = x3i;
 1812|  1.48M|          *(data + 1) = x3r;
 1813|  1.48M|          data += (del << 1);
 1814|  1.48M|        }
 1815|   990k|        data -= 2 * npoints;
 1816|   990k|        data += 2;
 1817|   990k|      }
 1818|  4.51M|      for (; j < nodespacing * del; j += nodespacing) {
  ------------------
  |  Branch (1818:14): [True: 3.24M, False: 1.26M]
  ------------------
 1819|  3.24M|        w1h = *(twiddles + 2 * j);
 1820|  3.24M|        w2h = *(twiddles + 2 * (j << 1) - 512);
 1821|  3.24M|        w3h = *(twiddles + 2 * j + 2 * (j << 1) - 1024);
 1822|  3.24M|        w1l = *(twiddles + 2 * j + 1);
 1823|  3.24M|        w2l = *(twiddles + 2 * (j << 1) - 511);
 1824|  3.24M|        w3l = *(twiddles + 2 * j + 2 * (j << 1) - 1023);
 1825|       |
 1826|  10.2M|        for (k = in_loop_cnt; k != 0; k--) {
  ------------------
  |  Branch (1826:31): [True: 6.96M, False: 3.24M]
  ------------------
 1827|  6.96M|          WORD32 tmp;
 1828|  6.96M|          WORD32 x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;
 1829|       |
 1830|  6.96M|          data += (del << 1);
 1831|       |
 1832|  6.96M|          x1r = *data;
 1833|  6.96M|          x1i = *(data + 1);
 1834|  6.96M|          data += (del << 1);
 1835|       |
 1836|  6.96M|          x2r = *data;
 1837|  6.96M|          x2i = *(data + 1);
 1838|  6.96M|          data += (del << 1);
 1839|       |
 1840|  6.96M|          x3r = *data;
 1841|  6.96M|          x3i = *(data + 1);
 1842|  6.96M|          data -= 3 * (del << 1);
 1843|       |
 1844|  6.96M|          tmp = ixheaac_sub32_sat(ixheaacd_mult32_sat(x1r, w1l),
 1845|  6.96M|                                   ixheaacd_mult32_sat(x1i, w1h));
 1846|  6.96M|          x1i = ixheaacd_mac32_sat(ixheaacd_mult32_sat(x1r, w1h), x1i, w1l);
 1847|  6.96M|          x1r = tmp;
 1848|       |
 1849|  6.96M|          tmp = ixheaac_add32_sat(ixheaacd_mult32_sat(x2r, w2h),
 1850|  6.96M|                                   ixheaacd_mult32_sat(x2i, w2l));
 1851|  6.96M|          x2i = ixheaac_sub32_sat(ixheaacd_mult32_sat(x2i, w2h),
 1852|  6.96M|                                   ixheaacd_mult32_sat(x2r, w2l));
 1853|  6.96M|          x2r = tmp;
 1854|       |
 1855|  6.96M|          tmp = ixheaac_sub32_sat(ixheaacd_mult32_sat(x3i, w3h),
 1856|  6.96M|                                   ixheaacd_mult32_sat(x3r, w3l));
 1857|  6.96M|          x3i = ixheaacd_mac32_sat(ixheaacd_mult32_sat(x3r, w3h), x3i, w3l);
 1858|  6.96M|          x3r = tmp;
 1859|       |
 1860|  6.96M|          x0r = (*data);
 1861|  6.96M|          x0i = (*(data + 1));
 1862|       |
 1863|  6.96M|          x0r = ixheaac_add32_sat(x0r, x2r);
 1864|  6.96M|          x0i = ixheaac_add32_sat(x0i, x2i);
 1865|  6.96M|          x2r = ixheaac_sub32_sat(x0r, ixheaac_shl32_sat(x2r, 1));
 1866|  6.96M|          x2i = ixheaac_sub32_sat(x0i, ixheaac_shl32_sat(x2i, 1));
 1867|  6.96M|          x1r = ixheaac_add32_sat(x1r, x3r);
 1868|  6.96M|          x1i = ixheaac_sub32_sat(x1i, x3i);
 1869|  6.96M|          x3r = ixheaac_sub32_sat(x1r, ixheaac_shl32_sat(x3r, 1));
 1870|  6.96M|          x3i = ixheaac_add32_sat(x1i, ixheaac_shl32_sat(x3i, 1));
 1871|       |
 1872|  6.96M|          x0r = ixheaac_add32_sat(x0r, x1r);
 1873|  6.96M|          x0i = ixheaac_add32_sat(x0i, x1i);
 1874|  6.96M|          x1r = ixheaac_sub32_sat(x0r, ixheaac_shl32_sat(x1r, 1));
 1875|  6.96M|          x1i = ixheaac_sub32_sat(x0i, ixheaac_shl32_sat(x1i, 1));
 1876|  6.96M|          x2r = ixheaac_add32_sat(x2r, x3i);
 1877|  6.96M|          x2i = ixheaac_sub32_sat(x2i, x3r);
 1878|  6.96M|          x3i = ixheaac_sub32_sat(x2r, ixheaac_shl32_sat(x3i, 1));
 1879|  6.96M|          x3r = ixheaac_add32_sat(x2i, ixheaac_shl32_sat(x3r, 1));
 1880|       |
 1881|  6.96M|          *data = x0r;
 1882|  6.96M|          *(data + 1) = x0i;
 1883|  6.96M|          data += (del << 1);
 1884|       |
 1885|  6.96M|          *data = x2r;
 1886|  6.96M|          *(data + 1) = x2i;
 1887|  6.96M|          data += (del << 1);
 1888|       |
 1889|  6.96M|          *data = x1r;
 1890|  6.96M|          *(data + 1) = x1i;
 1891|  6.96M|          data += (del << 1);
 1892|       |
 1893|  6.96M|          *data = x3i;
 1894|  6.96M|          *(data + 1) = x3r;
 1895|  6.96M|          data += (del << 1);
 1896|  6.96M|        }
 1897|  3.24M|        data -= 2 * npoints;
 1898|  3.24M|        data += 2;
 1899|  3.24M|      }
 1900|  1.26M|      nodespacing >>= 2;
 1901|  1.26M|      del <<= 2;
 1902|  1.26M|      in_loop_cnt >>= 2;
 1903|  1.26M|    }
 1904|  8.02M|    if (not_power_4) {
  ------------------
  |  Branch (1904:9): [True: 4.21M, False: 3.80M]
  ------------------
 1905|  4.21M|      const WORD32 *twiddles = ptr_w;
 1906|  4.21M|      nodespacing <<= 1;
 1907|  4.21M|      shift += 1;
 1908|       |
 1909|  20.1M|      for (j = del / 2; j != 0; j--) {
  ------------------
  |  Branch (1909:25): [True: 15.9M, False: 4.21M]
  ------------------
 1910|  15.9M|        WORD32 w1h = *twiddles;
 1911|  15.9M|        WORD32 w1l = *(twiddles + 1);
 1912|  15.9M|        WORD32 tmp;
 1913|  15.9M|        twiddles += nodespacing * 2;
 1914|       |
 1915|  15.9M|        x0r = *ptr_y;
 1916|  15.9M|        x0i = *(ptr_y + 1);
 1917|  15.9M|        ptr_y += (del << 1);
 1918|       |
 1919|  15.9M|        x1r = *ptr_y;
 1920|  15.9M|        x1i = *(ptr_y + 1);
 1921|       |
 1922|  15.9M|        tmp = ixheaac_sub32_sat(ixheaacd_mult32_sat(x1r, w1l),
 1923|  15.9M|                                 ixheaacd_mult32_sat(x1i, w1h));
 1924|  15.9M|        x1i = ixheaacd_mac32_sat(ixheaacd_mult32_sat(x1r, w1h), x1i, w1l);
 1925|  15.9M|        x1r = tmp;
 1926|       |
 1927|  15.9M|        *ptr_y = (x0r) / 2 - (x1r) / 2;
 1928|  15.9M|        *(ptr_y + 1) = (x0i) / 2 - (x1i) / 2;
 1929|  15.9M|        ptr_y -= (del << 1);
 1930|       |
 1931|  15.9M|        *ptr_y = (x0r) / 2 + (x1r) / 2;
 1932|  15.9M|        *(ptr_y + 1) = (x0i) / 2 + (x1i) / 2;
 1933|  15.9M|        ptr_y += 2;
 1934|  15.9M|      }
 1935|  4.21M|      twiddles = ptr_w;
 1936|  20.1M|      for (j = del / 2; j != 0; j--) {
  ------------------
  |  Branch (1936:25): [True: 15.9M, False: 4.21M]
  ------------------
 1937|  15.9M|        WORD32 w1h = *twiddles;
 1938|  15.9M|        WORD32 w1l = *(twiddles + 1);
 1939|  15.9M|        WORD32 tmp;
 1940|  15.9M|        twiddles += nodespacing * 2;
 1941|       |
 1942|  15.9M|        x0r = *ptr_y;
 1943|  15.9M|        x0i = *(ptr_y + 1);
 1944|  15.9M|        ptr_y += (del << 1);
 1945|       |
 1946|  15.9M|        x1r = *ptr_y;
 1947|  15.9M|        x1i = *(ptr_y + 1);
 1948|       |
 1949|  15.9M|        tmp = ixheaac_add32_sat(ixheaacd_mult32_sat(x1r, w1h),
 1950|  15.9M|                                 ixheaacd_mult32_sat(x1i, w1l));
 1951|  15.9M|        x1i = ixheaac_sub32_sat(ixheaacd_mult32_sat(x1i, w1h),
 1952|  15.9M|                                 ixheaacd_mult32_sat(x1r, w1l));
 1953|  15.9M|        x1r = tmp;
 1954|       |
 1955|  15.9M|        *ptr_y = (x0r) / 2 - (x1r) / 2;
 1956|  15.9M|        *(ptr_y + 1) = (x0i) / 2 - (x1i) / 2;
 1957|  15.9M|        ptr_y -= (del << 1);
 1958|       |
 1959|  15.9M|        *ptr_y = (x0r) / 2 + (x1r) / 2;
 1960|  15.9M|        *(ptr_y + 1) = (x0i) / 2 + (x1i) / 2;
 1961|  15.9M|        ptr_y += 2;
 1962|  15.9M|      }
 1963|  4.21M|    }
 1964|  8.02M|  }
 1965|       |
 1966|   951k|  else {
 1967|   951k|    ptr_w = ixheaacd_twiddle_table_fft_32x32;
 1968|       |
 1969|  32.0M|    for (i = 0; i < npoints; i += 4) {
  ------------------
  |  Branch (1969:17): [True: 31.1M, False: 951k]
  ------------------
 1970|  31.1M|      WORD32 *inp = ptr_x;
 1971|       |
 1972|  31.1M|      DIG_REV(i, dig_rev_shift, h2);
  ------------------
  |  |   40|  31.1M|  do {                                                      \
  |  |   41|  31.1M|    unsigned _ = (i);                                       \
  |  |   42|  31.1M|    _ = ((_ & 0x33333333) << 2) | ((_ & ~0x33333333) >> 2); \
  |  |   43|  31.1M|    _ = ((_ & 0x0F0F0F0F) << 4) | ((_ & ~0x0F0F0F0F) >> 4); \
  |  |   44|  31.1M|    _ = ((_ & 0x00FF00FF) << 8) | ((_ & ~0x00FF00FF) >> 8); \
  |  |   45|  31.1M|    (j) = _ >> (m);                                         \
  |  |   46|  31.1M|  } while (0)
  |  |  ------------------
  |  |  |  Branch (46:12): [Folded, False: 31.1M]
  |  |  ------------------
  ------------------
 1973|  31.1M|      if (not_power_4) {
  ------------------
  |  Branch (1973:11): [True: 19.8M, False: 11.2M]
  ------------------
 1974|  19.8M|        h2 += 1;
 1975|  19.8M|        h2 &= ~1;
 1976|  19.8M|      }
 1977|  31.1M|      inp += (h2);
 1978|       |
 1979|  31.1M|      x0r = *inp;
 1980|  31.1M|      x0i = *(inp + 1);
 1981|  31.1M|      inp += (npoints >> 1);
 1982|       |
 1983|  31.1M|      x1r = *inp;
 1984|  31.1M|      x1i = *(inp + 1);
 1985|  31.1M|      inp += (npoints >> 1);
 1986|       |
 1987|  31.1M|      x2r = *inp;
 1988|  31.1M|      x2i = *(inp + 1);
 1989|  31.1M|      inp += (npoints >> 1);
 1990|       |
 1991|  31.1M|      x3r = *inp;
 1992|  31.1M|      x3i = *(inp + 1);
 1993|       |
 1994|  31.1M|      x0r = ixheaac_add32_sat(x0r, x2r);
 1995|  31.1M|      x0i = ixheaac_add32_sat(x0i, x2i);
 1996|  31.1M|      x2r = ixheaac_sub32_sat(x0r, ixheaac_shl32_sat(x2r, 1));
 1997|  31.1M|      x2i = ixheaac_sub32_sat(x0i, ixheaac_shl32_sat(x2i, 1));
 1998|  31.1M|      x1r = ixheaac_add32_sat(x1r, x3r);
 1999|  31.1M|      x1i = ixheaac_add32_sat(x1i, x3i);
 2000|  31.1M|      x3r = ixheaac_sub32_sat(x1r, ixheaac_shl32_sat(x3r, 1));
 2001|  31.1M|      x3i = ixheaac_sub32_sat(x1i, ixheaac_shl32_sat(x3i, 1));
 2002|       |
 2003|  31.1M|      x0r = ixheaac_add32_sat(x0r, x1r);
 2004|  31.1M|      x0i = ixheaac_add32_sat(x0i, x1i);
 2005|  31.1M|      x1r = ixheaac_sub32_sat(x0r, ixheaac_shl32_sat(x1r, 1));
 2006|  31.1M|      x1i = ixheaac_sub32_sat(x0i, ixheaac_shl32_sat(x1i, 1));
 2007|  31.1M|      x2r = ixheaac_sub32_sat(x2r, x3i);
 2008|  31.1M|      x2i = ixheaac_add32_sat(x2i, x3r);
 2009|  31.1M|      x3i = ixheaac_add32_sat(x2r, ixheaac_shl32_sat(x3i, 1));
 2010|  31.1M|      x3r = ixheaac_sub32_sat(x2i, ixheaac_shl32_sat(x3r, 1));
 2011|       |
 2012|  31.1M|      *ptr_y++ = x0r;
 2013|  31.1M|      *ptr_y++ = x0i;
 2014|  31.1M|      *ptr_y++ = x2r;
 2015|  31.1M|      *ptr_y++ = x2i;
 2016|  31.1M|      *ptr_y++ = x1r;
 2017|  31.1M|      *ptr_y++ = x1i;
 2018|  31.1M|      *ptr_y++ = x3i;
 2019|  31.1M|      *ptr_y++ = x3r;
 2020|  31.1M|    }
 2021|   951k|    ptr_y -= 2 * npoints;
 2022|   951k|    del = 4;
 2023|   951k|    nodespacing = 64;
 2024|   951k|    in_loop_cnt = npoints >> 4;
 2025|  2.91M|    for (i = n_stages - 1; i > 0; i--) {
  ------------------
  |  Branch (2025:28): [True: 1.96M, False: 951k]
  ------------------
 2026|  1.96M|      const WORD32 *twiddles = ptr_w;
 2027|  1.96M|      WORD32 *data = ptr_y;
 2028|  1.96M|      WORD32 w1h, w2h, w3h, w1l, w2l, w3l;
 2029|  1.96M|      WORD32 sec_loop_cnt;
 2030|       |
 2031|  11.9M|      for (k = in_loop_cnt; k != 0; k--) {
  ------------------
  |  Branch (2031:29): [True: 9.99M, False: 1.96M]
  ------------------
 2032|  9.99M|        x0r = (*data);
 2033|  9.99M|        x0i = (*(data + 1));
 2034|  9.99M|        data += (del << 1);
 2035|       |
 2036|  9.99M|        x1r = (*data);
 2037|  9.99M|        x1i = (*(data + 1));
 2038|  9.99M|        data += (del << 1);
 2039|       |
 2040|  9.99M|        x2r = (*data);
 2041|  9.99M|        x2i = (*(data + 1));
 2042|  9.99M|        data += (del << 1);
 2043|       |
 2044|  9.99M|        x3r = (*data);
 2045|  9.99M|        x3i = (*(data + 1));
 2046|  9.99M|        data -= 3 * (del << 1);
 2047|       |
 2048|  9.99M|        x0r = ixheaac_add32_sat(x0r, x2r);
 2049|  9.99M|        x0i = ixheaac_add32_sat(x0i, x2i);
 2050|  9.99M|        x2r = ixheaac_sub32_sat(x0r, ixheaac_shl32_sat(x2r, 1));
 2051|  9.99M|        x2i = ixheaac_sub32_sat(x0i, ixheaac_shl32_sat(x2i, 1));
 2052|  9.99M|        x1r = ixheaac_add32_sat(x1r, x3r);
 2053|  9.99M|        x1i = ixheaac_add32_sat(x1i, x3i);
 2054|  9.99M|        x3r = ixheaac_sub32_sat(x1r, ixheaac_shl32_sat(x3r, 1));
 2055|  9.99M|        x3i = ixheaac_sub32_sat(x1i, ixheaac_shl32_sat(x3i, 1));
 2056|       |
 2057|  9.99M|        x0r = ixheaac_add32_sat(x0r, x1r);
 2058|  9.99M|        x0i = ixheaac_add32_sat(x0i, x1i);
 2059|  9.99M|        x1r = ixheaac_sub32_sat(x0r, ixheaac_shl32_sat(x1r, 1));
 2060|  9.99M|        x1i = ixheaac_sub32_sat(x0i, ixheaac_shl32_sat(x1i, 1));
 2061|  9.99M|        x2r = ixheaac_sub32_sat(x2r, x3i);
 2062|  9.99M|        x2i = ixheaac_add32_sat(x2i, x3r);
 2063|  9.99M|        x3i = ixheaac_add32_sat(x2r, ixheaac_shl32_sat(x3i, 1));
 2064|  9.99M|        x3r = ixheaac_sub32_sat(x2i, ixheaac_shl32_sat(x3r, 1));
 2065|       |
 2066|  9.99M|        *data = x0r;
 2067|  9.99M|        *(data + 1) = x0i;
 2068|  9.99M|        data += (del << 1);
 2069|       |
 2070|  9.99M|        *data = x2r;
 2071|  9.99M|        *(data + 1) = x2i;
 2072|  9.99M|        data += (del << 1);
 2073|       |
 2074|  9.99M|        *data = x1r;
 2075|  9.99M|        *(data + 1) = x1i;
 2076|  9.99M|        data += (del << 1);
 2077|       |
 2078|  9.99M|        *data = x3i;
 2079|  9.99M|        *(data + 1) = x3r;
 2080|  9.99M|        data += (del << 1);
 2081|  9.99M|      }
 2082|  1.96M|      data = ptr_y + 2;
 2083|       |
 2084|  1.96M|      sec_loop_cnt = (nodespacing * del);
 2085|  1.96M|      sec_loop_cnt = (sec_loop_cnt / 4) + (sec_loop_cnt / 8) -
 2086|  1.96M|                     (sec_loop_cnt / 16) + (sec_loop_cnt / 32) -
 2087|  1.96M|                     (sec_loop_cnt / 64) + (sec_loop_cnt / 128) -
 2088|  1.96M|                     (sec_loop_cnt / 256);
 2089|  1.96M|      j = nodespacing;
 2090|       |
 2091|  10.3M|      for (j = nodespacing; j <= sec_loop_cnt; j += nodespacing) {
  ------------------
  |  Branch (2091:29): [True: 8.34M, False: 1.96M]
  ------------------
 2092|  8.34M|        w1h = *(twiddles + 2 * j);
 2093|  8.34M|        w2h = *(twiddles + 2 * (j << 1));
 2094|  8.34M|        w3h = *(twiddles + 2 * j + 2 * (j << 1));
 2095|  8.34M|        w1l = *(twiddles + 2 * j + 1);
 2096|  8.34M|        w2l = *(twiddles + 2 * (j << 1) + 1);
 2097|  8.34M|        w3l = *(twiddles + 2 * j + 2 * (j << 1) + 1);
 2098|       |
 2099|  31.8M|        for (k = in_loop_cnt; k != 0; k--) {
  ------------------
  |  Branch (2099:31): [True: 23.5M, False: 8.34M]
  ------------------
 2100|  23.5M|          WORD32 tmp;
 2101|  23.5M|          WORD32 x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;
 2102|       |
 2103|  23.5M|          data += (del << 1);
 2104|       |
 2105|  23.5M|          x1r = *data;
 2106|  23.5M|          x1i = *(data + 1);
 2107|  23.5M|          data += (del << 1);
 2108|       |
 2109|  23.5M|          x2r = *data;
 2110|  23.5M|          x2i = *(data + 1);
 2111|  23.5M|          data += (del << 1);
 2112|       |
 2113|  23.5M|          x3r = *data;
 2114|  23.5M|          x3i = *(data + 1);
 2115|  23.5M|          data -= 3 * (del << 1);
 2116|       |
 2117|  23.5M|          tmp = ixheaac_add32_sat(ixheaacd_mult32_sat(x1r, w1l),
 2118|  23.5M|                                   ixheaacd_mult32_sat(x1i, w1h));
 2119|  23.5M|          x1i = ixheaacd_mac32_sat(-ixheaacd_mult32_sat(x1r, w1h), x1i, w1l);
 2120|  23.5M|          x1r = tmp;
 2121|       |
 2122|  23.5M|          tmp = ixheaac_add32_sat(ixheaacd_mult32_sat(x2r, w2l),
 2123|  23.5M|                                   ixheaacd_mult32_sat(x2i, w2h));
 2124|  23.5M|          x2i = ixheaacd_mac32_sat(-ixheaacd_mult32_sat(x2r, w2h), x2i, w2l);
 2125|  23.5M|          x2r = tmp;
 2126|       |
 2127|  23.5M|          tmp = ixheaac_add32_sat(ixheaacd_mult32_sat(x3r, w3l),
 2128|  23.5M|                                   ixheaacd_mult32_sat(x3i, w3h));
 2129|  23.5M|          x3i = ixheaacd_mac32_sat(-ixheaacd_mult32_sat(x3r, w3h), x3i, w3l);
 2130|  23.5M|          x3r = tmp;
 2131|       |
 2132|  23.5M|          x0r = (*data);
 2133|  23.5M|          x0i = (*(data + 1));
 2134|       |
 2135|  23.5M|          x0r = ixheaac_add32_sat(x0r, x2r);
 2136|  23.5M|          x0i = ixheaac_add32_sat(x0i, x2i);
 2137|  23.5M|          x2r = ixheaac_sub32_sat(x0r, ixheaac_shl32_sat(x2r, 1));
 2138|  23.5M|          x2i = ixheaac_sub32_sat(x0i, ixheaac_shl32_sat(x2i, 1));
 2139|  23.5M|          x1r = ixheaac_add32_sat(x1r, x3r);
 2140|  23.5M|          x1i = ixheaac_add32_sat(x1i, x3i);
 2141|  23.5M|          x3r = ixheaac_sub32_sat(x1r, ixheaac_shl32_sat(x3r, 1));
 2142|  23.5M|          x3i = ixheaac_sub32_sat(x1i, ixheaac_shl32_sat(x3i, 1));
 2143|       |
 2144|  23.5M|          x0r = ixheaac_add32_sat(x0r, x1r);
 2145|  23.5M|          x0i = ixheaac_add32_sat(x0i, x1i);
 2146|  23.5M|          x1r = ixheaac_sub32_sat(x0r, ixheaac_shl32_sat(x1r, 1));
 2147|  23.5M|          x1i = ixheaac_sub32_sat(x0i, ixheaac_shl32_sat(x1i, 1));
 2148|  23.5M|          x2r = ixheaac_sub32_sat(x2r, x3i);
 2149|  23.5M|          x2i = ixheaac_add32_sat(x2i, x3r);
 2150|  23.5M|          x3i = ixheaac_add32_sat(x2r, ixheaac_shl32_sat(x3i, 1));
 2151|  23.5M|          x3r = ixheaac_sub32_sat(x2i, ixheaac_shl32_sat(x3r, 1));
 2152|       |
 2153|  23.5M|          *data = x0r;
 2154|  23.5M|          *(data + 1) = x0i;
 2155|  23.5M|          data += (del << 1);
 2156|       |
 2157|  23.5M|          *data = x2r;
 2158|  23.5M|          *(data + 1) = x2i;
 2159|  23.5M|          data += (del << 1);
 2160|       |
 2161|  23.5M|          *data = x1r;
 2162|  23.5M|          *(data + 1) = x1i;
 2163|  23.5M|          data += (del << 1);
 2164|       |
 2165|  23.5M|          *data = x3i;
 2166|  23.5M|          *(data + 1) = x3r;
 2167|  23.5M|          data += (del << 1);
 2168|  23.5M|        }
 2169|  8.34M|        data -= 2 * npoints;
 2170|  8.34M|        data += 2;
 2171|  8.34M|      }
 2172|  7.11M|      for (; j <= (nodespacing * del) >> 1; j += nodespacing) {
  ------------------
  |  Branch (2172:14): [True: 5.15M, False: 1.96M]
  ------------------
 2173|  5.15M|        w1h = *(twiddles + 2 * j);
 2174|  5.15M|        w2h = *(twiddles + 2 * (j << 1));
 2175|  5.15M|        w3h = *(twiddles + 2 * j + 2 * (j << 1) - 512);
 2176|  5.15M|        w1l = *(twiddles + 2 * j + 1);
 2177|  5.15M|        w2l = *(twiddles + 2 * (j << 1) + 1);
 2178|  5.15M|        w3l = *(twiddles + 2 * j + 2 * (j << 1) - 511);
 2179|       |
 2180|  21.9M|        for (k = in_loop_cnt; k != 0; k--) {
  ------------------
  |  Branch (2180:31): [True: 16.7M, False: 5.15M]
  ------------------
 2181|  16.7M|          WORD32 tmp;
 2182|  16.7M|          WORD32 x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;
 2183|       |
 2184|  16.7M|          data += (del << 1);
 2185|       |
 2186|  16.7M|          x1r = *data;
 2187|  16.7M|          x1i = *(data + 1);
 2188|  16.7M|          data += (del << 1);
 2189|       |
 2190|  16.7M|          x2r = *data;
 2191|  16.7M|          x2i = *(data + 1);
 2192|  16.7M|          data += (del << 1);
 2193|       |
 2194|  16.7M|          x3r = *data;
 2195|  16.7M|          x3i = *(data + 1);
 2196|  16.7M|          data -= 3 * (del << 1);
 2197|       |
 2198|  16.7M|          tmp = ixheaac_add32_sat(ixheaacd_mult32_sat(x1r, w1l),
 2199|  16.7M|                                   ixheaacd_mult32_sat(x1i, w1h));
 2200|  16.7M|          x1i = ixheaacd_mac32_sat(-ixheaacd_mult32_sat(x1r, w1h), x1i, w1l);
 2201|  16.7M|          x1r = tmp;
 2202|       |
 2203|  16.7M|          tmp = ixheaac_add32_sat(ixheaacd_mult32_sat(x2r, w2l),
 2204|  16.7M|                                   ixheaacd_mult32_sat(x2i, w2h));
 2205|  16.7M|          x2i = ixheaacd_mac32_sat(-ixheaacd_mult32_sat(x2r, w2h), x2i, w2l);
 2206|  16.7M|          x2r = tmp;
 2207|       |
 2208|  16.7M|          tmp = ixheaac_sub32_sat(ixheaacd_mult32_sat(x3r, w3h),
 2209|  16.7M|                                   ixheaacd_mult32_sat(x3i, w3l));
 2210|  16.7M|          x3i = ixheaac_add32_sat(ixheaacd_mult32_sat(x3r, w3l),
 2211|  16.7M|                                   ixheaacd_mult32_sat(x3i, w3h));
 2212|  16.7M|          x3r = tmp;
 2213|       |
 2214|  16.7M|          x0r = (*data);
 2215|  16.7M|          x0i = (*(data + 1));
 2216|       |
 2217|  16.7M|          x0r = ixheaac_add32_sat(x0r, x2r);
 2218|  16.7M|          x0i = ixheaac_add32_sat(x0i, x2i);
 2219|  16.7M|          x2r = ixheaac_sub32_sat(x0r, ixheaac_shl32_sat(x2r, 1));
 2220|  16.7M|          x2i = ixheaac_sub32_sat(x0i, ixheaac_shl32_sat(x2i, 1));
 2221|  16.7M|          x1r = ixheaac_add32_sat(x1r, x3r);
 2222|  16.7M|          x1i = ixheaac_add32_sat(x1i, x3i);
 2223|  16.7M|          x3r = ixheaac_sub32_sat(x1r, ixheaac_shl32_sat(x3r, 1));
 2224|  16.7M|          x3i = ixheaac_sub32_sat(x1i, ixheaac_shl32_sat(x3i, 1));
 2225|       |
 2226|  16.7M|          x0r = ixheaac_add32_sat(x0r, x1r);
 2227|  16.7M|          x0i = ixheaac_add32_sat(x0i, x1i);
 2228|  16.7M|          x1r = ixheaac_sub32_sat(x0r, ixheaac_shl32_sat(x1r, 1));
 2229|  16.7M|          x1i = ixheaac_sub32_sat(x0i, ixheaac_shl32_sat(x1i, 1));
 2230|  16.7M|          x2r = ixheaac_sub32_sat(x2r, x3i);
 2231|  16.7M|          x2i = ixheaac_add32_sat(x2i, x3r);
 2232|  16.7M|          x3i = ixheaac_add32_sat(x2r, ixheaac_shl32_sat(x3i, 1));
 2233|  16.7M|          x3r = ixheaac_sub32_sat(x2i, ixheaac_shl32_sat(x3r, 1));
 2234|       |
 2235|  16.7M|          *data = x0r;
 2236|  16.7M|          *(data + 1) = x0i;
 2237|  16.7M|          data += (del << 1);
 2238|       |
 2239|  16.7M|          *data = x2r;
 2240|  16.7M|          *(data + 1) = x2i;
 2241|  16.7M|          data += (del << 1);
 2242|       |
 2243|  16.7M|          *data = x1r;
 2244|  16.7M|          *(data + 1) = x1i;
 2245|  16.7M|          data += (del << 1);
 2246|       |
 2247|  16.7M|          *data = x3i;
 2248|  16.7M|          *(data + 1) = x3r;
 2249|  16.7M|          data += (del << 1);
 2250|  16.7M|        }
 2251|  5.15M|        data -= 2 * npoints;
 2252|  5.15M|        data += 2;
 2253|  5.15M|      }
 2254|  5.15M|      for (; j <= sec_loop_cnt * 2; j += nodespacing) {
  ------------------
  |  Branch (2254:14): [True: 3.18M, False: 1.96M]
  ------------------
 2255|  3.18M|        w1h = *(twiddles + 2 * j);
 2256|  3.18M|        w2h = *(twiddles + 2 * (j << 1) - 512);
 2257|  3.18M|        w3h = *(twiddles + 2 * j + 2 * (j << 1) - 512);
 2258|  3.18M|        w1l = *(twiddles + 2 * j + 1);
 2259|  3.18M|        w2l = *(twiddles + 2 * (j << 1) - 511);
 2260|  3.18M|        w3l = *(twiddles + 2 * j + 2 * (j << 1) - 511);
 2261|       |
 2262|  9.94M|        for (k = in_loop_cnt; k != 0; k--) {
  ------------------
  |  Branch (2262:31): [True: 6.75M, False: 3.18M]
  ------------------
 2263|  6.75M|          WORD32 tmp;
 2264|  6.75M|          WORD32 x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;
 2265|       |
 2266|  6.75M|          data += (del << 1);
 2267|       |
 2268|  6.75M|          x1r = *data;
 2269|  6.75M|          x1i = *(data + 1);
 2270|  6.75M|          data += (del << 1);
 2271|       |
 2272|  6.75M|          x2r = *data;
 2273|  6.75M|          x2i = *(data + 1);
 2274|  6.75M|          data += (del << 1);
 2275|       |
 2276|  6.75M|          x3r = *data;
 2277|  6.75M|          x3i = *(data + 1);
 2278|  6.75M|          data -= 3 * (del << 1);
 2279|       |
 2280|  6.75M|          tmp = ixheaac_add32_sat(ixheaacd_mult32_sat(x1r, w1l),
 2281|  6.75M|                                   ixheaacd_mult32_sat(x1i, w1h));
 2282|  6.75M|          x1i = ixheaacd_mac32_sat(-ixheaacd_mult32_sat(x1r, w1h), x1i, w1l);
 2283|  6.75M|          x1r = tmp;
 2284|       |
 2285|  6.75M|          tmp = ixheaac_sub32_sat(ixheaacd_mult32_sat(x2r, w2h),
 2286|  6.75M|                                   ixheaacd_mult32_sat(x2i, w2l));
 2287|  6.75M|          x2i = ixheaac_add32_sat(ixheaacd_mult32_sat(x2r, w2l),
 2288|  6.75M|                                   ixheaacd_mult32_sat(x2i, w2h));
 2289|  6.75M|          x2r = tmp;
 2290|       |
 2291|  6.75M|          tmp = ixheaac_sub32_sat(ixheaacd_mult32_sat(x3r, w3h),
 2292|  6.75M|                                   ixheaacd_mult32_sat(x3i, w3l));
 2293|  6.75M|          x3i = ixheaac_add32_sat(ixheaacd_mult32_sat(x3r, w3l),
 2294|  6.75M|                                   ixheaacd_mult32_sat(x3i, w3h));
 2295|  6.75M|          x3r = tmp;
 2296|       |
 2297|  6.75M|          x0r = (*data);
 2298|  6.75M|          x0i = (*(data + 1));
 2299|       |
 2300|  6.75M|          x0r = ixheaac_add32_sat(x0r, x2r);
 2301|  6.75M|          x0i = ixheaac_add32_sat(x0i, x2i);
 2302|  6.75M|          x2r = ixheaac_sub32_sat(x0r, ixheaac_shl32_sat(x2r, 1));
 2303|  6.75M|          x2i = ixheaac_sub32_sat(x0i, ixheaac_shl32_sat(x2i, 1));
 2304|  6.75M|          x1r = ixheaac_add32_sat(x1r, x3r);
 2305|  6.75M|          x1i = ixheaac_add32_sat(x1i, x3i);
 2306|  6.75M|          x3r = ixheaac_sub32_sat(x1r, ixheaac_shl32_sat(x3r, 1));
 2307|  6.75M|          x3i = ixheaac_sub32_sat(x1i, ixheaac_shl32_sat(x3i, 1));
 2308|       |
 2309|  6.75M|          x0r = ixheaac_add32_sat(x0r, x1r);
 2310|  6.75M|          x0i = ixheaac_add32_sat(x0i, x1i);
 2311|  6.75M|          x1r = ixheaac_sub32_sat(x0r, ixheaac_shl32_sat(x1r, 1));
 2312|  6.75M|          x1i = ixheaac_sub32_sat(x0i, ixheaac_shl32_sat(x1i, 1));
 2313|  6.75M|          x2r = ixheaac_sub32_sat(x2r, x3i);
 2314|  6.75M|          x2i = ixheaac_add32_sat(x2i, x3r);
 2315|  6.75M|          x3i = ixheaac_add32_sat(x2r, ixheaac_shl32_sat(x3i, 1));
 2316|  6.75M|          x3r = ixheaac_sub32_sat(x2i, ixheaac_shl32_sat(x3r, 1));
 2317|       |
 2318|  6.75M|          *data = x0r;
 2319|  6.75M|          *(data + 1) = x0i;
 2320|  6.75M|          data += (del << 1);
 2321|       |
 2322|  6.75M|          *data = x2r;
 2323|  6.75M|          *(data + 1) = x2i;
 2324|  6.75M|          data += (del << 1);
 2325|       |
 2326|  6.75M|          *data = x1r;
 2327|  6.75M|          *(data + 1) = x1i;
 2328|  6.75M|          data += (del << 1);
 2329|       |
 2330|  6.75M|          *data = x3i;
 2331|  6.75M|          *(data + 1) = x3r;
 2332|  6.75M|          data += (del << 1);
 2333|  6.75M|        }
 2334|  3.18M|        data -= 2 * npoints;
 2335|  3.18M|        data += 2;
 2336|  3.18M|      }
 2337|  10.3M|      for (; j < nodespacing * del; j += nodespacing) {
  ------------------
  |  Branch (2337:14): [True: 8.34M, False: 1.96M]
  ------------------
 2338|  8.34M|        w1h = *(twiddles + 2 * j);
 2339|  8.34M|        w2h = *(twiddles + 2 * (j << 1) - 512);
 2340|  8.34M|        w3h = *(twiddles + 2 * j + 2 * (j << 1) - 1024);
 2341|  8.34M|        w1l = *(twiddles + 2 * j + 1);
 2342|  8.34M|        w2l = *(twiddles + 2 * (j << 1) - 511);
 2343|  8.34M|        w3l = *(twiddles + 2 * j + 2 * (j << 1) - 1023);
 2344|       |
 2345|  31.8M|        for (k = in_loop_cnt; k != 0; k--) {
  ------------------
  |  Branch (2345:31): [True: 23.5M, False: 8.34M]
  ------------------
 2346|  23.5M|          WORD32 tmp;
 2347|  23.5M|          WORD32 x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;
 2348|       |
 2349|  23.5M|          data += (del << 1);
 2350|       |
 2351|  23.5M|          x1r = *data;
 2352|  23.5M|          x1i = *(data + 1);
 2353|  23.5M|          data += (del << 1);
 2354|       |
 2355|  23.5M|          x2r = *data;
 2356|  23.5M|          x2i = *(data + 1);
 2357|  23.5M|          data += (del << 1);
 2358|       |
 2359|  23.5M|          x3r = *data;
 2360|  23.5M|          x3i = *(data + 1);
 2361|  23.5M|          data -= 3 * (del << 1);
 2362|       |
 2363|  23.5M|          tmp = ixheaac_add32_sat(ixheaacd_mult32_sat(x1r, w1l),
 2364|  23.5M|                                   ixheaacd_mult32_sat(x1i, w1h));
 2365|  23.5M|          x1i = ixheaacd_mac32_sat(-ixheaacd_mult32_sat(x1r, w1h), x1i, w1l);
 2366|  23.5M|          x1r = tmp;
 2367|       |
 2368|  23.5M|          tmp = ixheaac_sub32_sat(ixheaacd_mult32_sat(x2r, w2h),
 2369|  23.5M|                                   ixheaacd_mult32_sat(x2i, w2l));
 2370|  23.5M|          x2i = ixheaac_add32_sat(ixheaacd_mult32_sat(x2r, w2l),
 2371|  23.5M|                                   ixheaacd_mult32_sat(x2i, w2h));
 2372|  23.5M|          x2r = tmp;
 2373|       |
 2374|  23.5M|          tmp = -ixheaac_add32_sat(ixheaacd_mult32_sat(x3r, w3l),
 2375|  23.5M|                                    ixheaacd_mult32_sat(x3i, w3h));
 2376|  23.5M|          x3i = ixheaacd_mac32_sat(-ixheaacd_mult32_sat(x3r, w3h), x3i, w3l);
 2377|  23.5M|          x3r = tmp;
 2378|       |
 2379|  23.5M|          x0r = (*data);
 2380|  23.5M|          x0i = (*(data + 1));
 2381|       |
 2382|  23.5M|          x0r = ixheaac_add32_sat(x0r, x2r);
 2383|  23.5M|          x0i = ixheaac_add32_sat(x0i, x2i);
 2384|  23.5M|          x2r = ixheaac_sub32_sat(x0r, ixheaac_shl32_sat(x2r, 1));
 2385|  23.5M|          x2i = ixheaac_sub32_sat(x0i, ixheaac_shl32_sat(x2i, 1));
 2386|  23.5M|          x1r = ixheaac_add32_sat(x1r, x3r);
 2387|  23.5M|          x1i = ixheaac_sub32_sat(x1i, x3i);
 2388|  23.5M|          x3r = ixheaac_sub32_sat(x1r, ixheaac_shl32_sat(x3r, 1));
 2389|  23.5M|          x3i = ixheaac_add32_sat(x1i, ixheaac_shl32_sat(x3i, 1));
 2390|       |
 2391|  23.5M|          x0r = ixheaac_add32_sat(x0r, x1r);
 2392|  23.5M|          x0i = ixheaac_add32_sat(x0i, x1i);
 2393|  23.5M|          x1r = ixheaac_sub32_sat(x0r, ixheaac_shl32_sat(x1r, 1));
 2394|  23.5M|          x1i = ixheaac_sub32_sat(x0i, ixheaac_shl32_sat(x1i, 1));
 2395|  23.5M|          x2r = ixheaac_sub32_sat(x2r, x3i);
 2396|  23.5M|          x2i = ixheaac_add32_sat(x2i, x3r);
 2397|  23.5M|          x3i = ixheaac_add32_sat(x2r, ixheaac_shl32_sat(x3i, 1));
 2398|  23.5M|          x3r = ixheaac_sub32_sat(x2i, ixheaac_shl32_sat(x3r, 1));
 2399|       |
 2400|  23.5M|          *data = x0r;
 2401|  23.5M|          *(data + 1) = x0i;
 2402|  23.5M|          data += (del << 1);
 2403|       |
 2404|  23.5M|          *data = x2r;
 2405|  23.5M|          *(data + 1) = x2i;
 2406|  23.5M|          data += (del << 1);
 2407|       |
 2408|  23.5M|          *data = x1r;
 2409|  23.5M|          *(data + 1) = x1i;
 2410|  23.5M|          data += (del << 1);
 2411|       |
 2412|  23.5M|          *data = x3i;
 2413|  23.5M|          *(data + 1) = x3r;
 2414|  23.5M|          data += (del << 1);
 2415|  23.5M|        }
 2416|  8.34M|        data -= 2 * npoints;
 2417|  8.34M|        data += 2;
 2418|  8.34M|      }
 2419|  1.96M|      nodespacing >>= 2;
 2420|  1.96M|      del <<= 2;
 2421|  1.96M|      in_loop_cnt >>= 2;
 2422|  1.96M|    }
 2423|   951k|    if (not_power_4) {
  ------------------
  |  Branch (2423:9): [True: 184k, False: 766k]
  ------------------
 2424|   184k|      const WORD32 *twiddles = ptr_w;
 2425|   184k|      nodespacing <<= 1;
 2426|   184k|      shift += 1;
 2427|  20.0M|      for (j = del / 2; j != 0; j--) {
  ------------------
  |  Branch (2427:25): [True: 19.8M, False: 184k]
  ------------------
 2428|  19.8M|        WORD32 w1h = *twiddles;
 2429|  19.8M|        WORD32 w1l = *(twiddles + 1);
 2430|       |
 2431|  19.8M|        WORD32 tmp;
 2432|  19.8M|        twiddles += nodespacing * 2;
 2433|       |
 2434|  19.8M|        x0r = *ptr_y;
 2435|  19.8M|        x0i = *(ptr_y + 1);
 2436|  19.8M|        ptr_y += (del << 1);
 2437|       |
 2438|  19.8M|        x1r = *ptr_y;
 2439|  19.8M|        x1i = *(ptr_y + 1);
 2440|       |
 2441|  19.8M|        tmp = ixheaac_add32_sat(ixheaacd_mult32_sat(x1r, w1l),
 2442|  19.8M|                                 ixheaacd_mult32_sat(x1i, w1h));
 2443|  19.8M|        x1i = ixheaacd_mac32_sat(-ixheaacd_mult32_sat(x1r, w1h), x1i, w1l);
 2444|  19.8M|        x1r = tmp;
 2445|       |
 2446|  19.8M|        *ptr_y = (x0r) / 2 - (x1r) / 2;
 2447|  19.8M|        *(ptr_y + 1) = (x0i) / 2 - (x1i) / 2;
 2448|  19.8M|        ptr_y -= (del << 1);
 2449|       |
 2450|  19.8M|        *ptr_y = (x0r) / 2 + (x1r) / 2;
 2451|  19.8M|        *(ptr_y + 1) = (x0i) / 2 + (x1i) / 2;
 2452|  19.8M|        ptr_y += 2;
 2453|  19.8M|      }
 2454|   184k|      twiddles = ptr_w;
 2455|  20.0M|      for (j = del / 2; j != 0; j--) {
  ------------------
  |  Branch (2455:25): [True: 19.8M, False: 184k]
  ------------------
 2456|  19.8M|        WORD32 w1h = *twiddles;
 2457|  19.8M|        WORD32 w1l = *(twiddles + 1);
 2458|  19.8M|        WORD32 tmp;
 2459|  19.8M|        twiddles += nodespacing * 2;
 2460|       |
 2461|  19.8M|        x0r = *ptr_y;
 2462|  19.8M|        x0i = *(ptr_y + 1);
 2463|  19.8M|        ptr_y += (del << 1);
 2464|       |
 2465|  19.8M|        x1r = *ptr_y;
 2466|  19.8M|        x1i = *(ptr_y + 1);
 2467|       |
 2468|  19.8M|        tmp = ixheaac_sub32_sat(ixheaacd_mult32_sat(x1r, w1h),
 2469|  19.8M|                                 ixheaacd_mult32_sat(x1i, w1l));
 2470|  19.8M|        x1i = ixheaac_add32_sat(ixheaacd_mult32_sat(x1r, w1l),
 2471|  19.8M|                                 ixheaacd_mult32_sat(x1i, w1h));
 2472|  19.8M|        x1r = tmp;
 2473|       |
 2474|  19.8M|        *ptr_y = (x0r) / 2 - (x1r) / 2;
 2475|  19.8M|        *(ptr_y + 1) = (x0i) / 2 - (x1i) / 2;
 2476|  19.8M|        ptr_y -= (del << 1);
 2477|       |
 2478|  19.8M|        *ptr_y = (x0r) / 2 + (x1r) / 2;
 2479|  19.8M|        *(ptr_y + 1) = (x0i) / 2 + (x1i) / 2;
 2480|  19.8M|        ptr_y += 2;
 2481|  19.8M|      }
 2482|   184k|    }
 2483|   951k|  }
 2484|       |
 2485|   230M|  for (i = 0; i < nlength; i++) {
  ------------------
  |  Branch (2485:15): [True: 221M, False: 8.97M]
  ------------------
 2486|   221M|    xr[i] = y[2 * i];
 2487|   221M|    xi[i] = y[2 * i + 1];
 2488|   221M|  }
 2489|       |
 2490|  8.97M|  *preshift = shift - *preshift;
 2491|  8.97M|  return;
 2492|  8.97M|}
ixheaacd_complex_fft_p3:
 2532|  1.35M|                             WORD32 fft_mode, WORD32 *preshift) {
 2533|  1.35M|  WORD32 i, j;
 2534|  1.35M|  WORD32 shift = 0;
 2535|  1.35M|  WORD32 xr_3[384];
 2536|  1.35M|  WORD32 xi_3[384];
 2537|  1.35M|  WORD32 x[1024];
 2538|  1.35M|  WORD32 y[1024];
 2539|  1.35M|  WORD32 cnfac, npts;
 2540|  1.35M|  WORD32 mpass = nlength;
 2541|  1.35M|  WORD32 n = 0;
 2542|  1.35M|  WORD32 *ptr_x = x;
 2543|  1.35M|  WORD32 *ptr_y = y;
 2544|       |
 2545|  1.35M|  cnfac = 0;
 2546|  2.70M|  while (mpass % 3 == 0) {
  ------------------
  |  Branch (2546:10): [True: 1.35M, False: 1.35M]
  ------------------
 2547|  1.35M|    mpass /= 3;
 2548|  1.35M|    cnfac++;
 2549|  1.35M|  }
 2550|  1.35M|  npts = mpass;
 2551|       |
 2552|  5.40M|  for (i = 0; i < 3 * cnfac; i++) {
  ------------------
  |  Branch (2552:15): [True: 4.05M, False: 1.35M]
  ------------------
 2553|  38.3M|    for (j = 0; j < mpass; j++) {
  ------------------
  |  Branch (2553:17): [True: 34.2M, False: 4.05M]
  ------------------
 2554|  34.2M|      xr_3[j] = xr[3 * j + i];
 2555|  34.2M|      xi_3[j] = xi[3 * j + i];
 2556|  34.2M|    }
 2557|       |
 2558|  4.05M|    (*ixheaacd_complex_fft_p2)(xr_3, xi_3, mpass, fft_mode, &shift);
 2559|       |
 2560|  38.3M|    for (j = 0; j < mpass; j++) {
  ------------------
  |  Branch (2560:17): [True: 34.2M, False: 4.05M]
  ------------------
 2561|  34.2M|      xr[3 * j + i] = xr_3[j];
 2562|  34.2M|      xi[3 * j + i] = xi_3[j];
 2563|  34.2M|    }
 2564|  4.05M|  }
 2565|       |
 2566|  4.61M|  while (npts >> 1) {
  ------------------
  |  Branch (2566:10): [True: 3.26M, False: 1.35M]
  ------------------
 2567|  3.26M|    n++;
 2568|  3.26M|    npts = npts >> 1;
 2569|  3.26M|  }
 2570|       |
 2571|  1.35M|  if (n % 2 == 0)
  ------------------
  |  Branch (2571:7): [True: 1.23M, False: 112k]
  ------------------
 2572|  1.23M|    shift = ((n + 4)) / 2;
 2573|   112k|  else
 2574|   112k|    shift = ((n + 5) / 2);
 2575|       |
 2576|  1.35M|  *preshift = shift - *preshift + 1;
 2577|       |
 2578|  35.6M|  for (i = 0; i < nlength; i++) {
  ------------------
  |  Branch (2578:15): [True: 34.2M, False: 1.35M]
  ------------------
 2579|  34.2M|    ptr_x[2 * i] = (xr[i] >> 1);
 2580|  34.2M|    ptr_x[2 * i + 1] = (xi[i] >> 1);
 2581|  34.2M|  }
 2582|       |
 2583|  1.35M|  {
 2584|  1.35M|    const WORD32 *w1r, *w1i;
 2585|  1.35M|    WORD32 tmp;
 2586|  1.35M|    w1r = ixheaacd_twiddle_table_3pr;
 2587|  1.35M|    w1i = ixheaacd_twiddle_table_3pi;
 2588|       |
 2589|  1.35M|    if (fft_mode < 0) {
  ------------------
  |  Branch (2589:9): [True: 1.30M, False: 41.2k]
  ------------------
 2590|  10.6M|      for (i = 0; i < nlength; i += 3) {
  ------------------
  |  Branch (2590:19): [True: 9.31M, False: 1.30M]
  ------------------
 2591|  9.31M|        w1r++;
 2592|  9.31M|        w1i++;
 2593|       |
 2594|  9.31M|        tmp = ixheaac_sub32_sat(ixheaacd_mult32_sat(ptr_x[2 * i + 2], (*w1r)),
 2595|  9.31M|                                 ixheaacd_mult32_sat(ptr_x[2 * i + 3], (*w1i)));
 2596|  9.31M|        ptr_x[2 * i + 3] =
 2597|  9.31M|            ixheaac_add32_sat(ixheaacd_mult32_sat(ptr_x[2 * i + 2], (*w1i)),
 2598|  9.31M|                               ixheaacd_mult32_sat(ptr_x[2 * i + 3], (*w1r)));
 2599|  9.31M|        ptr_x[2 * i + 2] = tmp;
 2600|       |
 2601|  9.31M|        w1r++;
 2602|  9.31M|        w1i++;
 2603|       |
 2604|  9.31M|        tmp = ixheaac_sub32_sat(ixheaacd_mult32_sat(ptr_x[2 * i + 4], (*w1r)),
 2605|  9.31M|                                 ixheaacd_mult32_sat(ptr_x[2 * i + 5], (*w1i)));
 2606|  9.31M|        ptr_x[2 * i + 5] =
 2607|  9.31M|            ixheaac_add32_sat(ixheaacd_mult32_sat(ptr_x[2 * i + 4], (*w1i)),
 2608|  9.31M|                               ixheaacd_mult32_sat(ptr_x[2 * i + 5], (*w1r)));
 2609|  9.31M|        ptr_x[2 * i + 4] = tmp;
 2610|       |
 2611|  9.31M|        w1r += 3 * (128 / mpass - 1) + 1;
 2612|  9.31M|        w1i += 3 * (128 / mpass - 1) + 1;
 2613|  9.31M|      }
 2614|  1.30M|    }
 2615|       |
 2616|  41.2k|    else {
 2617|  2.15M|      for (i = 0; i < nlength; i += 3) {
  ------------------
  |  Branch (2617:19): [True: 2.11M, False: 41.2k]
  ------------------
 2618|  2.11M|        w1r++;
 2619|  2.11M|        w1i++;
 2620|       |
 2621|  2.11M|        tmp = ixheaac_add32_sat(ixheaacd_mult32_sat(ptr_x[2 * i + 2], (*w1r)),
 2622|  2.11M|                                 ixheaacd_mult32_sat(ptr_x[2 * i + 3], (*w1i)));
 2623|  2.11M|        ptr_x[2 * i + 3] =
 2624|  2.11M|            ixheaac_sub32_sat(ixheaacd_mult32_sat(ptr_x[2 * i + 3], (*w1r)),
 2625|  2.11M|                               ixheaacd_mult32_sat(ptr_x[2 * i + 2], (*w1i)));
 2626|  2.11M|        ptr_x[2 * i + 2] = tmp;
 2627|       |
 2628|  2.11M|        w1r++;
 2629|  2.11M|        w1i++;
 2630|       |
 2631|  2.11M|        tmp = ixheaac_add32_sat(ixheaacd_mult32_sat(ptr_x[2 * i + 4], (*w1r)),
 2632|  2.11M|                                 ixheaacd_mult32_sat(ptr_x[2 * i + 5], (*w1i)));
 2633|  2.11M|        ptr_x[2 * i + 5] =
 2634|  2.11M|            ixheaac_sub32_sat(ixheaacd_mult32_sat(ptr_x[2 * i + 5], (*w1r)),
 2635|  2.11M|                               ixheaacd_mult32_sat(ptr_x[2 * i + 4], (*w1i)));
 2636|  2.11M|        ptr_x[2 * i + 4] = tmp;
 2637|       |
 2638|  2.11M|        w1r += 3 * (128 / mpass - 1) + 1;
 2639|  2.11M|        w1i += 3 * (128 / mpass - 1) + 1;
 2640|  2.11M|      }
 2641|  41.2k|    }
 2642|  1.35M|  }
 2643|       |
 2644|  12.7M|  for (i = 0; i < mpass; i++) {
  ------------------
  |  Branch (2644:15): [True: 11.4M, False: 1.35M]
  ------------------
 2645|  11.4M|    ixheaacd_complex_3point_fft(ptr_x, ptr_y, fft_mode);
 2646|       |
 2647|  11.4M|    ptr_x = ptr_x + 6;
 2648|  11.4M|    ptr_y = ptr_y + 6;
 2649|  11.4M|  }
 2650|       |
 2651|  1.35M|  ptr_y = y;
 2652|  12.7M|  for (i = 0; i < mpass; i++) {
  ------------------
  |  Branch (2652:15): [True: 11.4M, False: 1.35M]
  ------------------
 2653|  11.4M|    xr[i] = *ptr_y++;
 2654|  11.4M|    xi[i] = *ptr_y++;
 2655|  11.4M|    xr[mpass + i] = *ptr_y++;
 2656|  11.4M|    xi[mpass + i] = *ptr_y++;
 2657|  11.4M|    xr[2 * mpass + i] = *ptr_y++;
 2658|  11.4M|    xi[2 * mpass + i] = *ptr_y++;
 2659|  11.4M|  }
 2660|       |
 2661|  1.35M|  return;
 2662|  1.35M|}
ixheaacd_complex_fft:
 2665|  1.39M|                          WORD32 *preshift) {
 2666|  1.39M|  if (nlength & (nlength - 1)) {
  ------------------
  |  Branch (2666:7): [True: 199k, False: 1.19M]
  ------------------
 2667|   199k|    ixheaacd_complex_fft_p3(data_r, data_i, nlength, fft_mode, preshift);
 2668|   199k|  } else
 2669|  1.19M|    (*ixheaacd_complex_fft_p2)(data_r, data_i, nlength, fft_mode, preshift);
 2670|       |
 2671|  1.39M|  return;
 2672|  1.39M|}
ixheaacd_fft.c:ixheaacd_mult32X32float:
   66|  1.28G|static PLATFORM_INLINE FLOAT32 ixheaacd_mult32X32float(FLOAT32 a, FLOAT32 b) {
   67|  1.28G|  FLOAT32 result;
   68|       |
   69|  1.28G|  result = a * b;
   70|       |
   71|  1.28G|  return result;
   72|  1.28G|}
ixheaacd_fft.c:ixheaacd_mac32X32float:
   74|   238M|static PLATFORM_INLINE FLOAT32 ixheaacd_mac32X32float(FLOAT32 a, FLOAT32 b, FLOAT32 c) {
   75|   238M|  FLOAT32 result;
   76|       |
   77|   238M|  result = a + b * c;
   78|       |
   79|   238M|  return result;
   80|   238M|}
ixheaacd_fft.c:ixheaacd_mult32_sat:
   48|  1.47G|static PLATFORM_INLINE WORD32 ixheaacd_mult32_sat(WORD32 a, WORD32 b) {
   49|  1.47G|  WORD32 result;
   50|  1.47G|  WORD64 temp_result;
   51|       |
   52|  1.47G|  temp_result = (WORD64)a * (WORD64)b;
   53|  1.47G|  result = ixheaac_sat64_32(temp_result >> 31);
   54|       |
   55|  1.47G|  return (result);
   56|  1.47G|}
ixheaacd_fft.c:ixheaacd_mac32_sat:
   58|   240M|static PLATFORM_INLINE WORD32 ixheaacd_mac32_sat(WORD32 a, WORD32 b, WORD32 c) {
   59|   240M|  WORD32 result;
   60|       |
   61|   240M|  result = ixheaac_add32_sat(a, ixheaacd_mult32_sat(b, c));
   62|       |
   63|   240M|  return (result);
   64|   240M|}
ixheaacd_fft.c:ixheaacd_complex_3point_fft:
 2495|  11.4M|                                                        WORD32 sign_dir) {
 2496|  11.4M|  WORD32 add_r, sub_r;
 2497|  11.4M|  WORD32 add_i, sub_i;
 2498|  11.4M|  WORD32 temp_real, temp_imag, temp;
 2499|       |
 2500|  11.4M|  WORD32 p1, p2, p3, p4;
 2501|       |
 2502|  11.4M|  WORD32 sinmu;
 2503|  11.4M|  sinmu = -1859775393 * sign_dir;
 2504|       |
 2505|  11.4M|  temp_real = ixheaac_add32_sat(inp[0], inp[2]);
 2506|  11.4M|  temp_imag = ixheaac_add32_sat(inp[1], inp[3]);
 2507|       |
 2508|  11.4M|  add_r = ixheaac_add32_sat(inp[2], inp[4]);
 2509|  11.4M|  add_i = ixheaac_add32_sat(inp[3], inp[5]);
 2510|       |
 2511|  11.4M|  sub_r = ixheaac_sub32_sat(inp[2], inp[4]);
 2512|  11.4M|  sub_i = ixheaac_sub32_sat(inp[3], inp[5]);
 2513|       |
 2514|  11.4M|  p1 = add_r >> 1;
 2515|  11.4M|  p4 = add_i >> 1;
 2516|  11.4M|  p2 = ixheaac_mult32_shl(sub_i, sinmu);
 2517|  11.4M|  p3 = ixheaac_mult32_shl(sub_r, sinmu);
 2518|       |
 2519|  11.4M|  temp = ixheaac_sub32(inp[0], p1);
 2520|       |
 2521|  11.4M|  op[0] = ixheaac_add32_sat(temp_real, inp[4]);
 2522|  11.4M|  op[1] = ixheaac_add32_sat(temp_imag, inp[5]);
 2523|  11.4M|  op[2] = ixheaac_add32_sat(temp, p2);
 2524|  11.4M|  op[3] = ixheaac_sub32_sat(ixheaac_sub32_sat(inp[1], p3), p4);
 2525|  11.4M|  op[4] = ixheaac_sub32_sat(temp, p2);
 2526|  11.4M|  op[5] = ixheaac_sub32_sat(ixheaac_add32_sat(inp[1], p3), p4);
 2527|       |
 2528|  11.4M|  return;
 2529|  11.4M|}

ixheaacd_aac_shellsort:
   78|   133k|VOID ixheaacd_aac_shellsort(WORD16 *in, WORD32 n) {
   79|   133k|  WORD32 i, j;
   80|   133k|  WORD32 inc;
   81|   133k|  WORD32 v, w;
   82|       |
   83|   133k|  inc = 1;
   84|       |
   85|   299k|  do {
   86|   299k|    inc = (((inc << 1) + inc) + 1);
   87|   299k|  } while (inc <= n);
  ------------------
  |  Branch (87:12): [True: 166k, False: 133k]
  ------------------
   88|       |
   89|   299k|  do {
   90|   299k|    inc = (ixheaacd_int_div(inc, 3));
   91|  2.14M|    for (i = inc; i < n; i++) {
  ------------------
  |  Branch (91:19): [True: 1.84M, False: 299k]
  ------------------
   92|  1.84M|      v = in[i];
   93|  1.84M|      j = i;
   94|       |
   95|  2.14M|      while ((w = in[(j - inc)]) > v) {
  ------------------
  |  Branch (95:14): [True: 351k, False: 1.79M]
  ------------------
   96|   351k|        in[j] = w;
   97|   351k|        j = (j - inc);
   98|       |
   99|   351k|        if (j < inc) break;
  ------------------
  |  Branch (99:13): [True: 46.2k, False: 305k]
  ------------------
  100|   351k|      }
  101|  1.84M|      in[j] = v;
  102|  1.84M|    }
  103|       |
  104|   299k|  } while (inc > 1);
  ------------------
  |  Branch (104:12): [True: 166k, False: 133k]
  ------------------
  105|   133k|}
ixheaacd_calc_start_band:
  109|  43.4k|                         FLOAT32 upsamp_fac) {
  110|  43.4k|  WORD32 k0_min;
  111|       |
  112|  43.4k|  if (upsamp_fac == 4) {
  ------------------
  |  Branch (112:7): [True: 2.06k, False: 41.3k]
  ------------------
  113|  2.06k|    if (fs_mapped < 32000) {
  ------------------
  |  Branch (113:9): [True: 1.86k, False: 200]
  ------------------
  114|  1.86k|      k0_min = (WORD32)(((FLOAT32)(3000 * 2 * 32) / fs_mapped) + 0.5);
  115|  1.86k|    } else {
  116|    200|      if (fs_mapped < 64000) {
  ------------------
  |  Branch (116:11): [True: 200, False: 0]
  ------------------
  117|    200|        k0_min = (WORD32)(((FLOAT32)(4000 * 2 * 32) / fs_mapped) + 0.5);
  118|    200|      } else {
  119|      0|        k0_min = (WORD32)(((FLOAT32)(5000 * 2 * 32) / fs_mapped) + 0.5);
  120|      0|      }
  121|    200|    }
  122|  41.3k|  } else {
  123|  41.3k|    if (fs_mapped < 32000) {
  ------------------
  |  Branch (123:9): [True: 14.7k, False: 26.5k]
  ------------------
  124|  14.7k|      k0_min = (WORD32)(((FLOAT32)(3000 * 2 * 64) / fs_mapped) + 0.5);
  125|  26.5k|    } else {
  126|  26.5k|      if (fs_mapped < 64000) {
  ------------------
  |  Branch (126:11): [True: 17.3k, False: 9.21k]
  ------------------
  127|  17.3k|        k0_min = (WORD32)(((FLOAT32)(4000 * 2 * 64) / fs_mapped) + 0.5);
  128|  17.3k|      } else {
  129|  9.21k|        k0_min = (WORD32)(((FLOAT32)(5000 * 2 * 64) / fs_mapped) + 0.5);
  130|  9.21k|      }
  131|  26.5k|    }
  132|  41.3k|  }
  133|       |
  134|  43.4k|  switch (fs_mapped) {
  135|  12.9k|    case 16000: {
  ------------------
  |  Branch (135:5): [True: 12.9k, False: 30.4k]
  ------------------
  136|  12.9k|      WORD32 v_offset[] = {-8, -7, -6, -5, -4, -3, -2, -1,
  137|  12.9k|                           0,  1,  2,  3,  4,  5,  6,  7};
  138|  12.9k|      return (k0_min + v_offset[start_freq]);
  139|      0|    } break;
  140|  2.91k|    case 22050: {
  ------------------
  |  Branch (140:5): [True: 2.91k, False: 40.4k]
  ------------------
  141|  2.91k|      WORD32 v_offset[] = {-5, -4, -3, -2, -1, 0, 1,  2,
  142|  2.91k|                           3,  4,  5,  6,  7,  9, 11, 13};
  143|  2.91k|      return (k0_min + v_offset[start_freq]);
  144|      0|    } break;
  145|    780|    case 24000: {
  ------------------
  |  Branch (145:5): [True: 780, False: 42.6k]
  ------------------
  146|    780|      WORD32 v_offset[] = {-5, -3, -2, -1, 0, 1,  2,  3,
  147|    780|                           4,  5,  6,  7,  9, 11, 13, 16};
  148|    780|      return (k0_min + v_offset[start_freq]);
  149|      0|    } break;
  150|  9.60k|    case 32000: {
  ------------------
  |  Branch (150:5): [True: 9.60k, False: 33.8k]
  ------------------
  151|  9.60k|      WORD32 v_offset[] = {-6, -4, -2, -1, 0, 1,  2,  3,
  152|  9.60k|                           4,  5,  6,  7,  9, 11, 13, 16};
  153|  9.60k|      return (k0_min + v_offset[start_freq]);
  154|      0|    } break;
  155|    360|    case 40000: {
  ------------------
  |  Branch (155:5): [True: 360, False: 43.0k]
  ------------------
  156|    360|      WORD32 v_offset[] = {-1, 0, 1, 2,  3,  4,  5,  6,
  157|    360|                           7,  8, 9, 11, 13, 15, 17, 19};
  158|    360|      return (k0_min + v_offset[start_freq]);
  159|      0|    } break;
  160|    413|    case 44100:
  ------------------
  |  Branch (160:5): [True: 413, False: 42.9k]
  ------------------
  161|  7.58k|    case 48000:
  ------------------
  |  Branch (161:5): [True: 7.17k, False: 36.2k]
  ------------------
  162|  15.2k|    case 64000: {
  ------------------
  |  Branch (162:5): [True: 7.68k, False: 35.7k]
  ------------------
  163|  15.2k|      WORD32 v_offset[] = {-4, -2, -1, 0, 1,  2,  3,  4,
  164|  15.2k|                           5,  6,  7,  9, 11, 13, 16, 20};
  165|  15.2k|      return (k0_min + v_offset[start_freq]);
  166|  7.58k|    } break;
  167|    708|    case 88200:
  ------------------
  |  Branch (167:5): [True: 708, False: 42.7k]
  ------------------
  168|  1.52k|    case 96000: {
  ------------------
  |  Branch (168:5): [True: 820, False: 42.5k]
  ------------------
  169|  1.52k|      WORD32 v_offset[] = {-2, -1, 0, 1,  2,  3,  4,  5,
  170|  1.52k|                           6,  7,  9, 11, 13, 16, 20, 24};
  171|  1.52k|      return (k0_min + v_offset[start_freq]);
  172|    708|    } break;
  173|       |
  174|      0|    default: {
  ------------------
  |  Branch (174:5): [True: 0, False: 43.4k]
  ------------------
  175|      0|      WORD32 v_offset[] = {0, 1,  2,  3,  4,  5,  6,  7,
  176|      0|                           9, 11, 13, 16, 20, 24, 28, 33};
  177|      0|      return (k0_min + v_offset[start_freq]);
  178|    708|    }
  179|  43.4k|  }
  180|  43.4k|}
ixheaacd_calc_stop_band:
  183|  35.1k|ixheaacd_calc_stop_band(WORD32 fs, const WORD32 stop_freq, FLOAT32 upsamp_fac) {
  184|  35.1k|  WORD32 result, i;
  185|  35.1k|  WORD16 arr_stop_freq[14];
  186|  35.1k|  WORD32 k1_min;
  187|  35.1k|  WORD16 arr_diff_stop_freq[13];
  188|       |
  189|  35.1k|  if (upsamp_fac == 4) {
  ------------------
  |  Branch (189:7): [True: 619, False: 34.5k]
  ------------------
  190|    619|    fs = fs / 2;
  191|    619|    if (fs < 32000) {
  ------------------
  |  Branch (191:9): [True: 420, False: 199]
  ------------------
  192|    420|      k1_min = (WORD32)(((FLOAT32)(6000 * 2 * 32) / fs) + 0.5);
  193|    420|    } else {
  194|    199|      if (fs < 64000) {
  ------------------
  |  Branch (194:11): [True: 199, False: 0]
  ------------------
  195|    199|        k1_min = (WORD32)(((FLOAT32)(8000 * 2 * 32) / fs) + 0.5);
  196|    199|      } else {
  197|      0|        k1_min = (WORD32)(((FLOAT32)(10000 * 2 * 32) / fs) + 0.5);
  198|      0|      }
  199|    199|    }
  200|  34.5k|  } else {
  201|  34.5k|    if (fs < 32000) {
  ------------------
  |  Branch (201:9): [True: 10.0k, False: 24.4k]
  ------------------
  202|  10.0k|      k1_min = (WORD32)(((FLOAT32)(6000 * 2 * 64) / fs) + 0.5);
  203|  24.4k|    } else {
  204|  24.4k|      if (fs < 64000) {
  ------------------
  |  Branch (204:11): [True: 20.8k, False: 3.62k]
  ------------------
  205|  20.8k|        k1_min = (WORD32)(((FLOAT32)(8000 * 2 * 64) / fs) + 0.5);
  206|  20.8k|      } else {
  207|  3.62k|        k1_min = (WORD32)(((FLOAT32)(10000 * 2 * 64) / fs) + 0.5);
  208|  3.62k|      }
  209|  24.4k|    }
  210|  34.5k|  }
  211|       |
  212|       |  /*Calculate stop frequency vector*/
  213|   526k|  for (i = 0; i <= 13; i++) {
  ------------------
  |  Branch (213:15): [True: 491k, False: 35.1k]
  ------------------
  214|   491k|    arr_stop_freq[i] = (WORD32)(k1_min * pow(64.0 / k1_min, i / 13.0) + 0.5);
  215|   491k|  }
  216|       |
  217|       |  /*Ensure increasing bandwidth */
  218|   491k|  for (i = 0; i <= 12; i++) {
  ------------------
  |  Branch (218:15): [True: 456k, False: 35.1k]
  ------------------
  219|   456k|    arr_diff_stop_freq[i] = arr_stop_freq[i + 1] - arr_stop_freq[i];
  220|   456k|  }
  221|       |
  222|  35.1k|  ixheaacd_aac_shellsort(&arr_diff_stop_freq[0],
  223|  35.1k|                         13); /*Sort bandwidth changes */
  224|       |
  225|  35.1k|  result = k1_min;
  226|   154k|  for (i = 0; i < stop_freq; i++) {
  ------------------
  |  Branch (226:15): [True: 119k, False: 35.1k]
  ------------------
  227|   119k|    result = ixheaac_add32_sat(result, arr_diff_stop_freq[i]);
  228|   119k|  }
  229|       |
  230|  35.1k|  return (result);
  231|  35.1k|}
ixheaacd_calc_k0_k2_bands:
  236|  43.4k|                                       WORD16 *ptr_k2) {
  237|  43.4k|  IA_ERRORCODE err_code = IA_NO_ERROR;
  ------------------
  |  |   23|  43.4k|#define IA_NO_ERROR 0x00000000
  ------------------
  238|       |
  239|  43.4k|  WORD32 fs_mapped = 0;
  240|  43.4k|  WORD32 fs = samp_freq;
  241|       |
  242|  43.4k|  if (upsamp_fac == 4) {
  ------------------
  |  Branch (242:7): [True: 2.06k, False: 41.3k]
  ------------------
  243|  2.06k|    fs = fs / 2;
  244|  2.06k|  }
  245|       |
  246|  43.4k|  if (fs >= 0 && fs < 18783) {
  ------------------
  |  Branch (246:7): [True: 43.4k, False: 0]
  |  Branch (246:18): [True: 12.9k, False: 30.4k]
  ------------------
  247|  12.9k|    fs_mapped = 16000;
  248|  30.4k|  } else if (fs >= 18783 && fs < 23004) {
  ------------------
  |  Branch (248:14): [True: 30.4k, False: 0]
  |  Branch (248:29): [True: 2.91k, False: 27.5k]
  ------------------
  249|  2.91k|    fs_mapped = 22050;
  250|  27.5k|  } else if (fs >= 23004 && fs < 27713) {
  ------------------
  |  Branch (250:14): [True: 27.5k, False: 0]
  |  Branch (250:29): [True: 780, False: 26.7k]
  ------------------
  251|    780|    fs_mapped = 24000;
  252|  26.7k|  } else if (fs >= 27713 && fs < 35777) {
  ------------------
  |  Branch (252:14): [True: 26.7k, False: 0]
  |  Branch (252:29): [True: 9.60k, False: 17.1k]
  ------------------
  253|  9.60k|    fs_mapped = 32000;
  254|  17.1k|  } else if (fs >= 35777 && fs < 42000) {
  ------------------
  |  Branch (254:14): [True: 17.1k, False: 0]
  |  Branch (254:29): [True: 360, False: 16.8k]
  ------------------
  255|    360|    fs_mapped = 40000;
  256|  16.8k|  } else if (fs >= 42000 && fs < 46009) {
  ------------------
  |  Branch (256:14): [True: 16.8k, False: 0]
  |  Branch (256:29): [True: 413, False: 16.3k]
  ------------------
  257|    413|    fs_mapped = 44100;
  258|  16.3k|  } else if (fs >= 46009 && fs < 55426) {
  ------------------
  |  Branch (258:14): [True: 16.3k, False: 0]
  |  Branch (258:29): [True: 7.17k, False: 9.21k]
  ------------------
  259|  7.17k|    fs_mapped = 48000;
  260|  9.21k|  } else if (fs >= 55426 && fs < 75132) {
  ------------------
  |  Branch (260:14): [True: 9.21k, False: 0]
  |  Branch (260:29): [True: 7.68k, False: 1.52k]
  ------------------
  261|  7.68k|    fs_mapped = 64000;
  262|  7.68k|  } else if (fs >= 75132 && fs < 92017) {
  ------------------
  |  Branch (262:14): [True: 1.52k, False: 0]
  |  Branch (262:29): [True: 708, False: 820]
  ------------------
  263|    708|    fs_mapped = 88200;
  264|    820|  } else if (fs >= 92017) {
  ------------------
  |  Branch (264:14): [True: 820, False: 0]
  ------------------
  265|    820|    fs_mapped = 96000;
  266|    820|  } else {
  267|      0|    return -1;
  268|      0|  }
  269|       |
  270|       |  /* Update start_freq struct */
  271|  43.4k|  *ptr_k0 = ixheaacd_calc_start_band(fs_mapped, start_freq, upsamp_fac);
  272|       |
  273|       |  /*Update stop_freq struct */
  274|  43.4k|  if (stop_freq < 14) {
  ------------------
  |  Branch (274:7): [True: 35.1k, False: 8.29k]
  ------------------
  275|  35.1k|    *ptr_k2 = ixheaacd_calc_stop_band(samp_freq, stop_freq, upsamp_fac);
  276|  35.1k|  } else if (stop_freq == 14) {
  ------------------
  |  Branch (276:14): [True: 5.68k, False: 2.60k]
  ------------------
  277|  5.68k|    *ptr_k2 = 2 * (*ptr_k0);
  278|  5.68k|  } else {
  279|  2.60k|    *ptr_k2 = 3 * (*ptr_k0);
  280|  2.60k|  }
  281|       |
  282|       |  /* limit to Nyqvist */
  283|  43.4k|  if (*ptr_k2 > 64) {
  ------------------
  |  Branch (283:7): [True: 7.02k, False: 36.3k]
  ------------------
  284|  7.02k|    *ptr_k2 = 64;
  285|  7.02k|  }
  286|  43.4k|  return err_code;
  287|  43.4k|}
ixheaacd_calc_master_frq_bnd_tbl:
  292|  43.4k|    ixheaacd_misc_tables *pstr_common_tables) {
  293|  43.4k|  WORD32 k;
  294|  43.4k|  WORD32 fs = ptr_header_data->out_sampling_freq;
  295|  43.4k|  WORD16 bands;
  296|  43.4k|  WORD16 k0 = 0, k2 = 0, k1;
  297|  43.4k|  WORD32 k2_achived;
  298|  43.4k|  WORD32 k2_diff;
  299|  43.4k|  WORD32 incr;
  300|  43.4k|  WORD32 dk;
  301|  43.4k|  WORD16 vec_dk[MAX_OCTAVE + MAX_SECOND_REGION];
  302|  43.4k|  WORD16 *vec_dk0 = &vec_dk[0];
  303|  43.4k|  WORD16 *vec_dk1 = &vec_dk[MAX_OCTAVE];
  ------------------
  |  |  196|  43.4k|#define MAX_OCTAVE 29
  ------------------
  304|  43.4k|  WORD16 upsamp_fac = ptr_header_data->upsamp_fac;
  305|  43.4k|  WORD16 *f_master_tbl = pstr_freq_band_data->f_master_tbl;
  306|  43.4k|  WORD16 num_mf_bands;
  307|  43.4k|  IA_ERRORCODE err_code = IA_NO_ERROR;
  ------------------
  |  |   23|  43.4k|#define IA_NO_ERROR 0x00000000
  ------------------
  308|       |
  309|  43.4k|  k1 = 0;
  310|  43.4k|  incr = 0;
  311|  43.4k|  dk = 0;
  312|       |
  313|  43.4k|  err_code = ixheaacd_calc_k0_k2_bands(fs, ptr_header_data->start_freq,
  314|  43.4k|                                       ptr_header_data->stop_freq, upsamp_fac,
  315|  43.4k|                                       &k0, &k2);
  316|  43.4k|  if (err_code) return err_code;
  ------------------
  |  Branch (316:7): [True: 0, False: 43.4k]
  ------------------
  317|       |
  318|  43.4k|  if (k2 > NO_SYNTHESIS_CHANNELS) {
  ------------------
  |  |   34|  43.4k|#define NO_SYNTHESIS_CHANNELS 64
  ------------------
  |  Branch (318:7): [True: 0, False: 43.4k]
  ------------------
  319|      0|    k2 = NO_SYNTHESIS_CHANNELS;
  ------------------
  |  |   34|      0|#define NO_SYNTHESIS_CHANNELS 64
  ------------------
  320|      0|  }
  321|  43.4k|  if (upsamp_fac == 4) {
  ------------------
  |  Branch (321:7): [True: 2.06k, False: 41.3k]
  ------------------
  322|  2.06k|    if ((sub_d(k2, k0) > MAX_FREQ_COEFFS) || (k2 <= k0)) {
  ------------------
  |  |   24|  2.06k|#define sub_d(a, b) ((a) - (b))
  ------------------
                  if ((sub_d(k2, k0) > MAX_FREQ_COEFFS) || (k2 <= k0)) {
  ------------------
  |  |   51|  2.06k|#define MAX_FREQ_COEFFS 56
  ------------------
  |  Branch (322:9): [True: 1, False: 2.06k]
  |  Branch (322:46): [True: 3, False: 2.06k]
  ------------------
  323|      4|      return -1;
  324|      4|    }
  325|  2.06k|    if ((2 * fs == 44100) && (sub_d(k2, k0) > MAX_FREQ_COEFFS)) {
  ------------------
  |  |   24|      0|#define sub_d(a, b) ((a) - (b))
  ------------------
                  if ((2 * fs == 44100) && (sub_d(k2, k0) > MAX_FREQ_COEFFS)) {
  ------------------
  |  |   51|      0|#define MAX_FREQ_COEFFS 56
  ------------------
  |  Branch (325:9): [True: 0, False: 2.06k]
  |  Branch (325:30): [True: 0, False: 0]
  ------------------
  326|      0|      return -1;
  327|      0|    }
  328|  2.06k|    if ((2 * fs >= 48000) && (sub_d(k2, k0) > MAX_FREQ_COEFFS)) {
  ------------------
  |  |   24|    608|#define sub_d(a, b) ((a) - (b))
  ------------------
                  if ((2 * fs >= 48000) && (sub_d(k2, k0) > MAX_FREQ_COEFFS)) {
  ------------------
  |  |   51|    608|#define MAX_FREQ_COEFFS 56
  ------------------
  |  Branch (328:9): [True: 608, False: 1.45k]
  |  Branch (328:30): [True: 0, False: 608]
  ------------------
  329|      0|      return -1;
  330|      0|    }
  331|  41.3k|  } else {
  332|  41.3k|    if ((sub_d(k2, k0) > MAX_FREQ_COEFFS_SBR) || (k2 <= k0)) {
  ------------------
  |  |   24|  41.3k|#define sub_d(a, b) ((a) - (b))
  ------------------
                  if ((sub_d(k2, k0) > MAX_FREQ_COEFFS_SBR) || (k2 <= k0)) {
  ------------------
  |  |   55|  41.3k|#define MAX_FREQ_COEFFS_SBR 48
  ------------------
  |  Branch (332:9): [True: 16, False: 41.3k]
  |  Branch (332:50): [True: 28, False: 41.3k]
  ------------------
  333|     44|      return -1;
  334|     44|    }
  335|  41.3k|    if ((fs == 44100) && (sub_d(k2, k0) > MAX_FREQ_COEFFS_FS44100)) {
  ------------------
  |  |   24|    214|#define sub_d(a, b) ((a) - (b))
  ------------------
                  if ((fs == 44100) && (sub_d(k2, k0) > MAX_FREQ_COEFFS_FS44100)) {
  ------------------
  |  |   53|    214|#define MAX_FREQ_COEFFS_FS44100 35
  ------------------
  |  Branch (335:9): [True: 214, False: 41.0k]
  |  Branch (335:26): [True: 9, False: 205]
  ------------------
  336|      9|      return -1;
  337|      9|    }
  338|  41.2k|    if ((fs >= 48000) && (sub_d(k2, k0) > MAX_FREQ_COEFFS_FS48000)) {
  ------------------
  |  |   24|  16.3k|#define sub_d(a, b) ((a) - (b))
  ------------------
                  if ((fs >= 48000) && (sub_d(k2, k0) > MAX_FREQ_COEFFS_FS48000)) {
  ------------------
  |  |   54|  16.3k|#define MAX_FREQ_COEFFS_FS48000 32
  ------------------
  |  Branch (338:9): [True: 16.3k, False: 24.9k]
  |  Branch (338:26): [True: 21, False: 16.3k]
  ------------------
  339|     21|      return -1;
  340|     21|    }
  341|  41.2k|  }
  342|       |
  343|  43.3k|  if (ptr_header_data->freq_scale == 0) {
  ------------------
  |  Branch (343:7): [True: 6.98k, False: 36.3k]
  ------------------
  344|  6.98k|    WORD16 num_bands;
  345|  6.98k|    if (ptr_header_data->alter_scale == 0) {
  ------------------
  |  Branch (345:9): [True: 6.44k, False: 533]
  ------------------
  346|  6.44k|      dk = 1;
  347|  6.44k|      num_bands = (WORD16)(k2 - k0);
  348|  6.44k|      num_bands = num_bands - (num_bands & 0x1);
  349|  6.44k|    } else {
  350|    533|      dk = 2;
  351|    533|      num_bands = (WORD16)((k2 - k0) + 2) >> 2;
  352|    533|      num_bands = num_bands << 1;
  353|    533|    }
  354|  6.98k|    if (num_bands < 1) {
  ------------------
  |  Branch (354:9): [True: 1, False: 6.97k]
  ------------------
  355|      1|      return -1;
  356|      1|    }
  357|  6.97k|    k2_achived = k0 + (num_bands << (dk - 1));
  358|       |
  359|  6.97k|    k2_diff = k2 - k2_achived;
  360|       |
  361|   170k|    for (k = 0; k < num_bands; k++) {
  ------------------
  |  Branch (361:17): [True: 163k, False: 6.97k]
  ------------------
  362|   163k|      vec_dk[k] = dk;
  363|   163k|    }
  364|       |
  365|  6.97k|    if (k2_diff < 0) {
  ------------------
  |  Branch (365:9): [True: 388, False: 6.59k]
  ------------------
  366|    388|      incr = 1;
  367|    388|      k = 0;
  368|    388|    }
  369|  6.97k|    if (k2_diff > 0) {
  ------------------
  |  Branch (369:9): [True: 3.82k, False: 3.15k]
  ------------------
  370|  3.82k|      incr = -1;
  371|  3.82k|      k = sub_d(num_bands, 1);
  ------------------
  |  |   24|  3.82k|#define sub_d(a, b) ((a) - (b))
  ------------------
  372|  3.82k|    }
  373|  11.5k|    while (k2_diff != 0) {
  ------------------
  |  Branch (373:12): [True: 4.57k, False: 6.97k]
  ------------------
  374|  4.57k|      vec_dk[k] = vec_dk[k] - incr;
  375|  4.57k|      k = (WORD16)(k + incr);
  376|  4.57k|      k2_diff = k2_diff + incr;
  377|  4.57k|    }
  378|  6.97k|    f_master_tbl[0] = k0;
  379|   170k|    for (k = 1; k <= num_bands; k++)
  ------------------
  |  Branch (379:17): [True: 163k, False: 6.97k]
  ------------------
  380|   163k|      f_master_tbl[k] = f_master_tbl[k - 1] + vec_dk[k - 1];
  381|  6.97k|    num_mf_bands = num_bands;
  382|  36.3k|  } else {
  383|  36.3k|    WORD32 num_bands0;
  384|  36.3k|    WORD32 num_bands1;
  385|       |
  386|  36.3k|    switch (ptr_header_data->freq_scale) {
  387|  2.39k|      case 1:
  ------------------
  |  Branch (387:7): [True: 2.39k, False: 33.9k]
  ------------------
  388|  2.39k|        bands = 12;
  389|  2.39k|        break;
  390|  32.0k|      case 2:
  ------------------
  |  Branch (390:7): [True: 32.0k, False: 4.34k]
  ------------------
  391|  32.0k|        bands = 10;
  392|  32.0k|        break;
  393|  1.94k|      case 3:
  ------------------
  |  Branch (393:7): [True: 1.94k, False: 34.4k]
  ------------------
  394|  1.94k|        bands = 8;
  395|  1.94k|        break;
  396|      0|      default:
  ------------------
  |  Branch (396:7): [True: 0, False: 36.3k]
  ------------------
  397|      0|        bands = 8;
  398|  36.3k|    };
  399|       |
  400|  36.3k|    if ((upsamp_fac == 4) && (k0 < bands)) {
  ------------------
  |  Branch (400:9): [True: 1.98k, False: 34.3k]
  |  Branch (400:30): [True: 1.75k, False: 228]
  ------------------
  401|  1.75k|      bands = ((WORD32)(k0 - (k0 & 1)));
  402|  1.75k|    }
  403|       |
  404|  36.3k|    if ((WORD32)(10000 * k2) > (WORD32)(22449 * k0)) {
  ------------------
  |  Branch (404:9): [True: 30.2k, False: 6.12k]
  ------------------
  405|  30.2k|      k1 = k0 << 1;
  406|       |
  407|  30.2k|      num_bands0 = bands;
  408|       |
  409|  30.2k|      num_bands1 = pstr_common_tables->log_dual_is_table[k2] -
  410|  30.2k|                   pstr_common_tables->log_dual_is_table[k1];
  411|  30.2k|      num_bands1 = bands * num_bands1;
  412|       |
  413|  30.2k|      if (ptr_header_data->alter_scale) {
  ------------------
  |  Branch (413:11): [True: 27.9k, False: 2.29k]
  ------------------
  414|  27.9k|        num_bands1 = (WORD32)(((WORD64)num_bands1 * (0x6276)) >> 15);
  415|  27.9k|      }
  416|  30.2k|      num_bands1 = num_bands1 + 0x1000;
  417|       |
  418|  30.2k|      num_bands1 = num_bands1 >> 13;
  419|  30.2k|      num_bands1 = num_bands1 << 1;
  420|       |
  421|  30.2k|      if (num_bands0 < 1) {
  ------------------
  |  Branch (421:11): [True: 1, False: 30.2k]
  ------------------
  422|      1|        return -1;
  423|      1|      }
  424|       |
  425|  30.2k|      if (num_bands1 < 1) {
  ------------------
  |  Branch (425:11): [True: 1, False: 30.2k]
  ------------------
  426|      1|        return -1;
  427|      1|      }
  428|       |
  429|  30.2k|      ixheaacd_calc_bands(vec_dk0, k0, k1, (WORD16)num_bands0);
  430|       |
  431|  30.2k|      ixheaacd_aac_shellsort(vec_dk0, num_bands0);
  432|       |
  433|  30.2k|      f_master_tbl[0] = k0;
  434|       |
  435|   322k|      for (k = 1; k <= num_bands0; k++)
  ------------------
  |  Branch (435:19): [True: 292k, False: 30.2k]
  ------------------
  436|   292k|        f_master_tbl[k] = f_master_tbl[k - 1] + vec_dk0[k - 1];
  437|       |
  438|  30.2k|      ixheaacd_calc_bands(vec_dk1, k1, k2, (WORD16)num_bands1);
  439|  30.2k|      ixheaacd_aac_shellsort(vec_dk1, num_bands1);
  440|       |
  441|  30.2k|      if (vec_dk1[0] < vec_dk0[num_bands0 - 1]) {
  ------------------
  |  Branch (441:11): [True: 1.90k, False: 28.3k]
  ------------------
  442|  1.90k|        WORD16 change = vec_dk0[num_bands0 - 1] - vec_dk1[0];
  443|  1.90k|        WORD16 temp = vec_dk1[num_bands1 - 1] - vec_dk1[0];
  444|  1.90k|        temp = temp >> 1;
  445|  1.90k|        if (change > temp) {
  ------------------
  |  Branch (445:13): [True: 310, False: 1.59k]
  ------------------
  446|    310|          change = temp;
  447|    310|        }
  448|  1.90k|        vec_dk1[0] = vec_dk1[0] + change;
  449|  1.90k|        vec_dk1[num_bands1 - 1] = vec_dk1[num_bands1 - 1] - change;
  450|  1.90k|        ixheaacd_aac_shellsort(vec_dk1, num_bands1);
  451|  1.90k|      }
  452|       |
  453|  30.2k|      f_master_tbl[num_bands0] = k1;
  454|   212k|      for (k = 1; k <= num_bands1; k++)
  ------------------
  |  Branch (454:19): [True: 182k, False: 30.2k]
  ------------------
  455|   182k|        f_master_tbl[num_bands0 + k] =
  456|   182k|            f_master_tbl[num_bands0 + k - 1] + vec_dk1[k - 1];
  457|  30.2k|      num_mf_bands = add_d(num_bands0, num_bands1);
  ------------------
  |  |   23|  30.2k|#define add_d(a, b) ((a) + (b))
  ------------------
  458|  30.2k|    } else {
  459|  6.12k|      k1 = k2;
  460|       |
  461|  6.12k|      num_bands0 = pstr_common_tables->log_dual_is_table[k1] -
  462|  6.12k|                   pstr_common_tables->log_dual_is_table[k0];
  463|       |
  464|  6.12k|      num_bands0 = bands * num_bands0;
  465|       |
  466|  6.12k|      num_bands0 = num_bands0 + 0x1000;
  467|       |
  468|  6.12k|      num_bands0 = num_bands0 >> 13;
  469|  6.12k|      num_bands0 = num_bands0 << 1;
  470|       |
  471|  6.12k|      if (num_bands0 < 1) {
  ------------------
  |  Branch (471:11): [True: 7, False: 6.12k]
  ------------------
  472|      7|        return -1;
  473|      7|      }
  474|  6.12k|      ixheaacd_calc_bands(vec_dk0, k0, k1, (WORD16)num_bands0);
  475|  6.12k|      ixheaacd_aac_shellsort(vec_dk0, num_bands0);
  476|       |
  477|  6.12k|      if (vec_dk0[0] == 0) {
  ------------------
  |  Branch (477:11): [True: 20, False: 6.10k]
  ------------------
  478|     20|        return -1;
  479|     20|      }
  480|       |
  481|  6.10k|      f_master_tbl[0] = k0;
  482|  53.1k|      for (k = 1; k <= num_bands0; k++)
  ------------------
  |  Branch (482:19): [True: 47.0k, False: 6.10k]
  ------------------
  483|  47.0k|        f_master_tbl[k] = f_master_tbl[k - 1] + vec_dk0[k - 1];
  484|       |
  485|  6.10k|      num_mf_bands = num_bands0;
  486|  6.10k|    }
  487|  36.3k|  }
  488|  43.3k|  if (num_mf_bands < 1) {
  ------------------
  |  Branch (488:7): [True: 0, False: 43.3k]
  ------------------
  489|      0|    return -1;
  490|      0|  }
  491|  43.3k|  pstr_freq_band_data->num_mf_bands = num_mf_bands;
  492|       |
  493|  43.3k|  if (upsamp_fac == 4) {
  ------------------
  |  Branch (493:7): [True: 2.05k, False: 41.2k]
  ------------------
  494|  18.2k|    for (k = 1; k < num_mf_bands; k++) {
  ------------------
  |  Branch (494:17): [True: 16.1k, False: 2.05k]
  ------------------
  495|  16.1k|      if (!(f_master_tbl[k] - f_master_tbl[k - 1] <= k0 - 2)) {
  ------------------
  |  Branch (495:11): [True: 5, False: 16.1k]
  ------------------
  496|      5|        return -1;
  497|      5|      }
  498|  16.1k|    }
  499|  2.05k|  }
  500|       |
  501|  43.2k|  return 0;
  502|  43.3k|}
ixheaacd_calc_bands:
  549|  66.5k|                         WORD16 num_bands) {
  550|  66.5k|  WORD32 i;
  551|  66.5k|  WORD32 previous;
  552|  66.5k|  WORD32 current;
  553|  66.5k|  WORD32 temp, exact;
  554|  66.5k|  WORD16 bandfactor = ixheaacd_calc_freq_ratio(start, stop, num_bands);
  555|       |
  556|  66.5k|  previous = stop;
  557|  66.5k|  exact = ixheaac_shl32_sat(ixheaac_deposit16l_in32(stop), INT_BITS - 8);
  ------------------
  |  |   24|  66.5k|#define INT_BITS 32
  ------------------
  558|       |
  559|   588k|  for (i = num_bands - 1; i >= 0; i--) {
  ------------------
  |  Branch (559:27): [True: 522k, False: 66.5k]
  ------------------
  560|   522k|    exact = ixheaac_mult16x16in32(ixheaac_extract16h(exact), bandfactor);
  561|       |
  562|   522k|    temp = ixheaac_add32_sat(exact, 0x00400000);
  563|   522k|    exact = exact << 1;
  564|       |
  565|   522k|    current = ixheaac_extract16l(ixheaac_shr32(temp, (INT_BITS - 9)));
  ------------------
  |  |   24|   522k|#define INT_BITS 32
  ------------------
  566|       |
  567|   522k|    diff[i] = sub_d(previous, current);
  ------------------
  |  |   24|   522k|#define sub_d(a, b) ((a) - (b))
  ------------------
  568|   522k|    previous = current;
  569|   522k|  }
  570|  66.5k|}
ixheaacd_derive_noise_freq_bnd_tbl:
  616|  43.1k|    ia_freq_band_data_struct *pstr_freq_band_data) {
  617|  43.1k|  WORD16 k2, kx;
  618|  43.1k|  WORD32 temp;
  619|  43.1k|  WORD32 num_lf_bands = pstr_freq_band_data->num_sf_bands[LOW];
  ------------------
  |  |   27|  43.1k|#define LOW 0
  ------------------
  620|  43.1k|  WORD32 num_hf_bands = pstr_freq_band_data->num_sf_bands[HIGH];
  ------------------
  |  |   28|  43.1k|#define HIGH 1
  ------------------
  621|  43.1k|  k2 = pstr_freq_band_data->freq_band_table[HIGH][num_hf_bands];
  ------------------
  |  |   28|  43.1k|#define HIGH 1
  ------------------
  622|  43.1k|  kx = pstr_freq_band_data->freq_band_table[HIGH][0];
  ------------------
  |  |   28|  43.1k|#define HIGH 1
  ------------------
  623|       |
  624|  43.1k|  if (ptr_header_data->noise_bands == 0) {
  ------------------
  |  Branch (624:7): [True: 3.76k, False: 39.3k]
  ------------------
  625|  3.76k|    temp = 1;
  626|  39.3k|  } else {
  627|  39.3k|    temp = pstr_common_tables->log_dual_is_table[k2] -
  628|  39.3k|           pstr_common_tables->log_dual_is_table[kx];
  629|  39.3k|    temp = temp * ptr_header_data->noise_bands;
  630|  39.3k|    temp = temp + 0x800;
  631|  39.3k|    temp = temp >> 12;
  632|  39.3k|    if (temp == 0) {
  ------------------
  |  Branch (632:9): [True: 2.78k, False: 36.5k]
  ------------------
  633|  2.78k|      temp = 1;
  634|  2.78k|    }
  635|  39.3k|  }
  636|  43.1k|  if (temp > MAX_NOISE_COEFFS) {
  ------------------
  |  |   45|  43.1k|#define MAX_NOISE_COEFFS 5
  ------------------
  |  Branch (636:7): [True: 9, False: 43.0k]
  ------------------
  637|      9|    return -1;
  638|      9|  }
  639|  43.0k|  pstr_freq_band_data->num_nf_bands = temp;
  640|  43.0k|  pstr_freq_band_data->num_if_bands = pstr_freq_band_data->num_nf_bands;
  641|  43.0k|  {
  642|  43.0k|    WORD16 i_k, k;
  643|  43.0k|    WORD16 num, den;
  644|  43.0k|    WORD16 *f_noise_tbl = pstr_freq_band_data->freq_band_tbl_noise;
  645|  43.0k|    WORD16 *f_low_tbl = pstr_freq_band_data->freq_band_table[LOW];
  ------------------
  |  |   27|  43.0k|#define LOW 0
  ------------------
  646|  43.0k|    WORD32 num_nf_bands = pstr_freq_band_data->num_nf_bands;
  647|       |
  648|  43.0k|    num = num_lf_bands;
  649|  43.0k|    den = num_nf_bands;
  650|       |
  651|  43.0k|    k = 0;
  652|  43.0k|    *f_noise_tbl = f_low_tbl[0];
  653|  43.0k|    f_noise_tbl++;
  654|  43.0k|    k++;
  655|  43.0k|    i_k = 0;
  656|       |
  657|   144k|    for (; k <= num_nf_bands; k++) {
  ------------------
  |  Branch (657:12): [True: 101k, False: 43.0k]
  ------------------
  658|   101k|      i_k = i_k + (WORD16)ixheaacd_int_div(num, den);
  659|   101k|      *f_noise_tbl = f_low_tbl[i_k];
  660|   101k|      num = num_lf_bands - i_k;
  661|   101k|      den = den - 1;
  662|   101k|      f_noise_tbl++;
  663|   101k|    }
  664|  43.0k|  }
  665|  43.0k|  return 0;
  666|  43.1k|}
ixheaacd_calc_frq_bnd_tbls:
  669|  43.4k|                                  ixheaacd_misc_tables *pstr_common_tables) {
  670|  43.4k|  WORD32 err;
  671|  43.4k|  WORD16 num_lf_bands, lsb, usb;
  672|  43.4k|  ia_freq_band_data_struct *pstr_freq_band_data =
  673|  43.4k|      ptr_header_data->pstr_freq_band_data;
  674|       |
  675|  43.4k|  err = ixheaacd_calc_master_frq_bnd_tbl(pstr_freq_band_data, ptr_header_data,
  676|  43.4k|                                         pstr_common_tables);
  677|       |
  678|  43.4k|  if (err ||
  ------------------
  |  Branch (678:7): [True: 113, False: 43.2k]
  ------------------
  679|  43.2k|      (ptr_header_data->xover_band > pstr_freq_band_data->num_mf_bands)) {
  ------------------
  |  Branch (679:7): [True: 53, False: 43.2k]
  ------------------
  680|    166|    return -1;
  681|    166|  }
  682|       |
  683|  43.2k|  ixheaacd_derive_hi_lo_freq_bnd_tbls(pstr_freq_band_data, ptr_header_data);
  684|       |
  685|  43.2k|  num_lf_bands = pstr_freq_band_data->num_sf_bands[LOW];
  ------------------
  |  |   27|  43.2k|#define LOW 0
  ------------------
  686|       |
  687|  43.2k|  if ((num_lf_bands <= 0) ||
  ------------------
  |  Branch (687:7): [True: 13, False: 43.2k]
  ------------------
  688|  43.2k|      (num_lf_bands > ixheaac_shr16(MAX_FREQ_COEFFS, 1))) {
  ------------------
  |  |   51|  43.2k|#define MAX_FREQ_COEFFS 56
  ------------------
  |  Branch (688:7): [True: 0, False: 43.2k]
  ------------------
  689|     13|    return -1;
  690|     13|  }
  691|       |
  692|  43.2k|  lsb = pstr_freq_band_data->freq_band_table[LOW][0];
  ------------------
  |  |   27|  43.2k|#define LOW 0
  ------------------
  693|  43.2k|  usb = pstr_freq_band_data->freq_band_table[LOW][num_lf_bands];
  ------------------
  |  |   27|  43.2k|#define LOW 0
  ------------------
  694|       |
  695|  43.2k|  pstr_freq_band_data->sub_band_start = lsb;
  696|       |
  697|  43.2k|  ptr_header_data->status = 1;
  698|       |
  699|  43.2k|  if ((lsb > ((ptr_header_data->sbr_ratio_idx == SBR_UPSAMPLE_IDX_4_1) ? 16 : 32)) ||
  ------------------
  |  |   28|  43.2k|#define SBR_UPSAMPLE_IDX_4_1 3
  ------------------
  |  Branch (699:7): [True: 125, False: 43.1k]
  |  Branch (699:15): [True: 2.05k, False: 41.1k]
  ------------------
  700|  43.1k|      (lsb >= usb)) {
  ------------------
  |  Branch (700:7): [True: 0, False: 43.1k]
  ------------------
  701|    125|    return -1;
  702|    125|  }
  703|       |
  704|  43.1k|  if (ixheaacd_derive_noise_freq_bnd_tbl(ptr_header_data, pstr_common_tables,
  ------------------
  |  Branch (704:7): [True: 9, False: 43.0k]
  ------------------
  705|  43.1k|                                         pstr_freq_band_data)) {
  706|      9|    return -1;
  707|      9|  }
  708|       |
  709|  43.0k|  pstr_freq_band_data->sub_band_start = lsb;
  710|  43.0k|  pstr_freq_band_data->sub_band_end = usb;
  711|       |
  712|  43.0k|  return 0;
  713|  43.1k|}
ixheaacd_freq_sca.c:ixheaacd_int_div:
   60|   401k|static WORD32 ixheaacd_int_div(WORD32 num, WORD32 den) {
   61|   401k|  if (den != 0) {
  ------------------
  |  Branch (61:7): [True: 401k, False: 0]
  ------------------
   62|   401k|    WORD32 result = 0;
   63|   401k|    WORD32 temp = 0;
   64|   912k|    while (den <= num) {
  ------------------
  |  Branch (64:12): [True: 510k, False: 401k]
  ------------------
   65|   510k|      temp = 0;
   66|  1.07M|      while (num >= (den << (temp + 1))) {
  ------------------
  |  Branch (66:14): [True: 564k, False: 510k]
  ------------------
   67|   564k|        temp++;
   68|   564k|      }
   69|   510k|      result = result + (1 << temp);
   70|   510k|      num = num - (den * (1 << temp));
   71|   510k|    }
   72|   401k|    return result;
   73|   401k|  } else {
   74|      0|    return 0;
   75|      0|  }
   76|   401k|}
ixheaacd_freq_sca.c:ixheaacd_calc_freq_ratio:
  505|  66.5k|                                       WORD16 num_bands) {
  506|  66.5k|  WORD32 bandfactor;
  507|  66.5k|  WORD32 step;
  508|  66.5k|  WORD32 direction;
  509|  66.5k|  WORD32 start;
  510|  66.5k|  WORD32 stop;
  511|  66.5k|  WORD32 temp;
  512|  66.5k|  WORD32 j, i;
  513|       |
  514|  66.5k|  bandfactor = 0x3f000000L;
  515|  66.5k|  step = 0x20000000L;
  516|  66.5k|  direction = 1;
  517|  66.5k|  start = ixheaac_shl32(ixheaac_deposit16l_in32(k_start), INT_BITS - 8);
  ------------------
  |  |   24|  66.5k|#define INT_BITS 32
  ------------------
  518|  66.5k|  stop = ixheaac_shl32(ixheaac_deposit16l_in32(k_stop), INT_BITS - 8);
  ------------------
  |  |   24|  66.5k|#define INT_BITS 32
  ------------------
  519|       |
  520|  66.5k|  i = 0;
  521|       |
  522|  3.05M|  do {
  523|  3.05M|    i = i + 1;
  524|  3.05M|    temp = stop;
  525|       |
  526|  26.9M|    for (j = 0; j < num_bands; j++)
  ------------------
  |  Branch (526:17): [True: 23.8M, False: 3.05M]
  ------------------
  527|  23.8M|      temp = ixheaac_mult16x16in32_shl(ixheaac_extract16h(temp),
  528|  23.8M|                                        ixheaac_extract16h(bandfactor));
  529|       |
  530|  3.05M|    if (temp < start) {
  ------------------
  |  Branch (530:9): [True: 1.84M, False: 1.20M]
  ------------------
  531|  1.84M|      if (direction == 0) step = ixheaac_shr32(step, 1);
  ------------------
  |  Branch (531:11): [True: 998k, False: 843k]
  ------------------
  532|  1.84M|      direction = 1;
  533|  1.84M|      bandfactor = ixheaac_add32_sat(bandfactor, step);
  534|  1.84M|    } else {
  535|  1.20M|      if (direction == 1) step = ixheaac_shr32(step, 1);
  ------------------
  |  Branch (535:11): [True: 998k, False: 210k]
  ------------------
  536|  1.20M|      direction = 0;
  537|  1.20M|      bandfactor = ixheaac_sub32_sat(bandfactor, step);
  538|  1.20M|    }
  539|       |
  540|  3.05M|    if (i > 100) {
  ------------------
  |  Branch (540:9): [True: 0, False: 3.05M]
  ------------------
  541|      0|      step = 0;
  542|      0|    }
  543|  3.05M|  } while (step > 0);
  ------------------
  |  Branch (543:12): [True: 2.98M, False: 66.5k]
  ------------------
  544|       |
  545|  66.5k|  return ixheaac_extract16h(bandfactor);
  546|  66.5k|}
ixheaacd_freq_sca.c:ixheaacd_derive_hi_lo_freq_bnd_tbls:
  574|  43.2k|    ia_sbr_header_data_struct *ptr_header_data) {
  575|  43.2k|  WORD16 k;
  576|  43.2k|  WORD16 xover_band = ptr_header_data->xover_band;
  577|  43.2k|  WORD16 *f_master_tbl = pstr_freq_band_data->f_master_tbl + xover_band;
  578|  43.2k|  WORD16 *f_low_tbl = pstr_freq_band_data->freq_band_table[LOW];
  ------------------
  |  |   27|  43.2k|#define LOW 0
  ------------------
  579|  43.2k|  WORD16 *f_high_tbl = pstr_freq_band_data->freq_band_table[HIGH];
  ------------------
  |  |   28|  43.2k|#define HIGH 1
  ------------------
  580|  43.2k|  WORD16 num_mf_bands = pstr_freq_band_data->num_mf_bands;
  581|  43.2k|  WORD16 num_lf_bands, num_hf_bands;
  582|  43.2k|  num_hf_bands = num_mf_bands - xover_band;
  583|  43.2k|  k = 0;
  584|  43.2k|  *f_low_tbl = *f_high_tbl = *f_master_tbl;
  585|  43.2k|  f_low_tbl++;
  586|  43.2k|  f_high_tbl++;
  587|  43.2k|  f_master_tbl++;
  588|  43.2k|  k++;
  589|  43.2k|  if ((num_hf_bands & 1)) {
  ------------------
  |  Branch (589:7): [True: 18.8k, False: 24.3k]
  ------------------
  590|  18.8k|    *f_low_tbl = *f_high_tbl = *f_master_tbl;
  591|  18.8k|    f_high_tbl++;
  592|  18.8k|    f_master_tbl++;
  593|  18.8k|    f_low_tbl++;
  594|  18.8k|    k++;
  595|  18.8k|  }
  596|   297k|  for (; k <= num_hf_bands; k++) {
  ------------------
  |  Branch (596:10): [True: 254k, False: 43.2k]
  ------------------
  597|   254k|    *f_high_tbl = *f_master_tbl;
  598|   254k|    f_high_tbl++;
  599|   254k|    f_master_tbl++;
  600|   254k|    k++;
  601|       |
  602|   254k|    *f_low_tbl = *f_high_tbl = *f_master_tbl;
  603|   254k|    f_high_tbl++;
  604|   254k|    f_master_tbl++;
  605|   254k|    f_low_tbl++;
  606|   254k|  }
  607|  43.2k|  num_lf_bands = ((num_hf_bands + 1) >> 1);
  608|       |
  609|  43.2k|  pstr_freq_band_data->num_sf_bands[LOW] = num_lf_bands;
  ------------------
  |  |   27|  43.2k|#define LOW 0
  ------------------
  610|  43.2k|  pstr_freq_band_data->num_sf_bands[HIGH] = num_hf_bands;
  ------------------
  |  |   28|  43.2k|#define HIGH 1
  ------------------
  611|  43.2k|}

ixheaacd_fwd_alias_cancel_tool:
   98|  16.5k|    WORD32 fac_length, FLOAT32 *lp_filt_coeff, WORD32 gain) {
   99|  16.5k|  WORD32 i;
  100|  16.5k|  FLOAT32 lp_filt_coeff_a[ORDER + 1];
  101|  16.5k|  WORD32 qshift = 0;
  102|       |
  103|  16.5k|  WORD32 *x_in = pstr_td_frame_data->fac_data;
  104|  16.5k|  WORD32 *ptr_scratch = &usac_data->scratch_buffer[0];
  105|  16.5k|  WORD32 *fac_signal = &usac_data->x_ac_dec[16];
  106|  16.5k|  FLOAT32 fac_signal_flt[128 + 16];
  107|  16.5k|  FLOAT32 *ptr_fac_signal_flt = &fac_signal_flt[16];
  108|  16.5k|  WORD32 *ptr_overlap_buf =
  109|  16.5k|      &(usac_data->overlap_data_ptr[usac_data->present_chan]
  110|  16.5k|                                   [(usac_data->ccfl / 2) - fac_length]);
  111|       |
  112|  16.5k|  memset(fac_signal - 16, 0, ORDER * sizeof(WORD32));
  ------------------
  |  |   30|  16.5k|#define ORDER 16
  ------------------
  113|       |
  114|  16.5k|  ixheaacd_acelp_mdct(x_in, fac_signal, &qshift, fac_length, ptr_scratch);
  115|       |
  116|  16.5k|  ixheaacd_lpc_coeff_wt_apply(lp_filt_coeff, lp_filt_coeff_a);
  117|       |
  118|  1.75M|  for (i = 0; i < fac_length; i++)
  ------------------
  |  Branch (118:15): [True: 1.74M, False: 16.5k]
  ------------------
  119|  1.74M|    ptr_fac_signal_flt[i] =
  120|  1.74M|        (FLOAT32)((FLOAT32)fac_signal[i] / (1 << (16 - qshift)));
  121|       |
  122|  16.5k|  memset(ptr_fac_signal_flt - 16, 0, 16 * sizeof(FLOAT32));
  123|       |
  124|  16.5k|  ixheaacd_synthesis_tool_float1(lp_filt_coeff_a, ptr_fac_signal_flt,
  125|  16.5k|                                 fac_length);
  126|       |
  127|  1.75M|  for (i = 0; i < fac_length; i++)
  ------------------
  |  Branch (127:15): [True: 1.74M, False: 16.5k]
  ------------------
  128|  1.74M|    fac_signal[i] = (WORD32)(ptr_fac_signal_flt[i] * (1 << (16 - qshift)));
  129|       |
  130|  1.75M|  for (i = 0; i < fac_length; i++)
  ------------------
  |  Branch (130:15): [True: 1.74M, False: 16.5k]
  ------------------
  131|  1.74M|    ptr_overlap_buf[i] = ixheaac_add32_sat(
  132|  1.74M|        ptr_overlap_buf[i],
  133|  1.74M|        (WORD32)ixheaac_mul32_sh(fac_signal[i], gain, (WORD8)(16 - qshift)));
  134|       |
  135|  16.5k|  return;
  136|  16.5k|}
ixheaacd_fr_alias_cnx_fix:
  142|  79.2k|                                 WORD32 *ptr_scratch) {
  143|  79.2k|  WORD32 i;
  144|  79.2k|  const WORD32 *sine_window;
  145|  79.2k|  WORD32 fac_window[2 * FAC_LENGTH];
  146|  79.2k|  WORD32 lp_filt_coeff_a[ORDER + 1];
  147|       |
  148|  79.2k|  if (fac_length == 48) {
  ------------------
  |  Branch (148:7): [True: 293, False: 78.9k]
  ------------------
  149|    293|    sine_window = ixheaacd_sine_win_96;
  150|  78.9k|  } else if (fac_length == 64) {
  ------------------
  |  Branch (150:14): [True: 4.27k, False: 74.6k]
  ------------------
  151|  4.27k|    sine_window = ixheaacd_sine_win_128;
  152|  74.6k|  } else if (fac_length == 96) {
  ------------------
  |  Branch (152:14): [True: 402, False: 74.2k]
  ------------------
  153|    402|    sine_window = ixheaacd_sine_win_192;
  154|  74.2k|  } else {
  155|  74.2k|    sine_window = ixheaacd_sine_win_256;
  156|  74.2k|  }
  157|       |
  158|  79.2k|  if (lp_filt_coeff != NULL && fac_data_out != NULL) {
  ------------------
  |  Branch (158:7): [True: 79.2k, False: 0]
  |  Branch (158:32): [True: 79.2k, False: 0]
  ------------------
  159|  79.2k|    memset(fac_data_out - 16, 0, ORDER * sizeof(WORD32));
  ------------------
  |  |   30|  79.2k|#define ORDER 16
  ------------------
  160|  79.2k|    ixheaacd_acelp_mdct(x_in, fac_data_out, preshift, fac_length,
  161|  79.2k|                              ptr_scratch);
  162|       |
  163|  79.2k|    ixheaacd_weighted_synthesis_filter(lp_filt_coeff, lp_filt_coeff_a);
  164|       |
  165|  79.2k|    memset(fac_data_out + fac_length, 0, fac_length * sizeof(WORD32));
  166|       |
  167|  79.2k|    ixheaacd_synthesis_tool(lp_filt_coeff_a, fac_data_out, 2 * fac_length,
  168|  79.2k|                            qshift2, preshift);
  169|       |
  170|  79.2k|    if (izir != NULL) {
  ------------------
  |  Branch (170:9): [True: 79.2k, False: 0]
  ------------------
  171|  9.91M|      for (i = 0; i < fac_length; i++) {
  ------------------
  |  Branch (171:19): [True: 9.83M, False: 79.2k]
  ------------------
  172|  9.83M|        fac_window[i] = ixheaacd_mult32_m(
  173|  9.83M|            sine_window[i], sine_window[(2 * fac_length) - 1 - i]);
  174|  9.83M|        fac_window[fac_length + i] =
  175|  9.83M|            2147483647 - ixheaacd_mult32_m(sine_window[fac_length + i],
  176|  9.83M|                                           sine_window[fac_length + i]);
  177|  9.83M|      }
  178|  9.91M|      for (i = 0; i < fac_length; i++) {
  ------------------
  |  Branch (178:19): [True: 9.83M, False: 79.2k]
  ------------------
  179|  9.83M|        WORD32 temp1;
  180|  9.83M|        WORD32 temp2;
  181|       |
  182|  9.83M|        temp1 = ixheaac_mul32_sh(
  183|  9.83M|            izir[1 + (len / 2) + i], fac_window[fac_length + i],
  184|  9.83M|            (char)((qshift3 - *qshift1 + 31 + (WORD8)(*preshift))));
  185|       |
  186|  9.83M|        temp2 = ixheaac_mul32_sh(
  187|  9.83M|            izir[1 + (len / 2) - 1 - i], fac_window[fac_length - 1 - i],
  188|  9.83M|            (char)((qshift3 - *qshift1 + 31 + (WORD8)(*preshift))));
  189|       |
  190|  9.83M|        fac_data_out[i] =
  191|  9.83M|            ixheaac_add32_sat3((fac_data_out[i] / 2), temp1, temp2);
  192|       |
  193|  9.83M|        fac_data_out[fac_length + i] = (fac_data_out[fac_length + i] / 2);
  194|  9.83M|      }
  195|  79.2k|    }
  196|  79.2k|  }
  197|       |
  198|  79.2k|  return;
  199|  79.2k|}
ixheaacd_fwd_alias_cnx.c:ixheaacd_weighted_synthesis_filter:
   60|  79.2k|static VOID ixheaacd_weighted_synthesis_filter(WORD32 *a, WORD32 *ap) {
   61|  79.2k|  WORD32 f;
   62|  79.2k|  WORD32 i;
   63|  79.2k|  ap[0] = a[0];
   64|  79.2k|  f = IGAMMA1;
  ------------------
  |  |   64|  79.2k|#define IGAMMA1 1975684956
  ------------------
   65|  1.34M|  for (i = 1; i <= ORDER; i++) {
  ------------------
  |  |   30|  1.34M|#define ORDER 16
  ------------------
  |  Branch (65:15): [True: 1.26M, False: 79.2k]
  ------------------
   66|  1.26M|    ap[i] = ixheaacd_mult32_m(f, a[i]);
   67|  1.26M|    f = ixheaacd_mult32_m(f, IGAMMA1);
  ------------------
  |  |   64|  1.26M|#define IGAMMA1 1975684956
  ------------------
   68|  1.26M|  }
   69|  79.2k|  return;
   70|  79.2k|}
ixheaacd_fwd_alias_cnx.c:ixheaacd_synthesis_tool:
   73|  79.2k|                                    WORD32 qshift, WORD32 *preshift) {
   74|  79.2k|  WORD32 s;
   75|  79.2k|  WORD32 i, j;
   76|       |
   77|  19.7M|  for (i = 0; i < l; i++) {
  ------------------
  |  Branch (77:15): [True: 19.6M, False: 79.2k]
  ------------------
   78|  19.6M|    s = x[i];
   79|  98.3M|    for (j = 1; j <= ORDER; j += 4) {
  ------------------
  |  |   30|  98.3M|#define ORDER 16
  ------------------
  |  Branch (79:17): [True: 78.6M, False: 19.6M]
  ------------------
   80|  78.6M|      s = ixheaac_sub32_sat(
   81|  78.6M|          s, ixheaac_mul32_sh(a[j], x[i - j], (WORD8)(qshift)));
   82|  78.6M|      s = ixheaac_sub32_sat(
   83|  78.6M|          s, ixheaac_mul32_sh(a[j + 1], x[i - (j + 1)], (WORD8)(qshift)));
   84|  78.6M|      s = ixheaac_sub32_sat(
   85|  78.6M|          s, ixheaac_mul32_sh(a[j + 2], x[i - (j + 2)], (WORD8)(qshift)));
   86|  78.6M|      s = ixheaac_sub32_sat(
   87|  78.6M|          s, ixheaac_mul32_sh(a[j + 3], x[i - (j + 3)], (WORD8)(qshift)));
   88|  78.6M|    }
   89|  19.6M|    x[i] = s;
   90|  19.6M|  }
   91|       |
   92|  79.2k|  (*preshift)++;
   93|  79.2k|  return;
   94|  79.2k|}
ixheaacd_fwd_alias_cnx.c:ixheaacd_mult32_m:
   50|  22.2M|static PLATFORM_INLINE WORD32 ixheaacd_mult32_m(WORD32 a, WORD32 b) {
   51|  22.2M|  WORD32 result;
   52|  22.2M|  WORD64 temp_result;
   53|       |
   54|  22.2M|  temp_result = (WORD64)a * (WORD64)b;
   55|  22.2M|  result = (WORD32)(temp_result >> 31);
   56|       |
   57|  22.2M|  return (result);
   58|  22.2M|}

ixheaacd_qmf_hbe_data_reinit:
  104|  61.8k|                                    WORD16 *p_num_sfb, WORD32 upsamp_4_flag) {
  105|  61.8k|  WORD32 synth_size, sfb, patch, stop_patch;
  106|       |
  107|  61.8k|  if (ptr_hbe_txposer != NULL) {
  ------------------
  |  Branch (107:7): [True: 61.8k, False: 0]
  ------------------
  108|  61.8k|    ptr_hbe_txposer->start_band = p_freq_band_tab[LOW][0];
  ------------------
  |  |   27|  61.8k|#define LOW 0
  ------------------
  109|  61.8k|    ptr_hbe_txposer->end_band = p_freq_band_tab[LOW][p_num_sfb[LOW]];
  ------------------
  |  |   27|  61.8k|#define LOW 0
  ------------------
                  ptr_hbe_txposer->end_band = p_freq_band_tab[LOW][p_num_sfb[LOW]];
  ------------------
  |  |   27|  61.8k|#define LOW 0
  ------------------
  110|       |
  111|  61.8k|    ptr_hbe_txposer->synth_size =
  112|  61.8k|        4 * ((ptr_hbe_txposer->start_band + 4) / 8 + 1);
  113|  61.8k|    ptr_hbe_txposer->k_start =
  114|  61.8k|        ixheaac_start_subband2kL_tbl[ptr_hbe_txposer->start_band];
  115|       |
  116|  61.8k|    ptr_hbe_txposer->upsamp_4_flag = upsamp_4_flag;
  117|  61.8k|    ptr_hbe_txposer->esbr_hq = 0;
  118|       |
  119|  61.8k|    if (upsamp_4_flag) {
  ------------------
  |  Branch (119:9): [True: 3.99k, False: 57.8k]
  ------------------
  120|  3.99k|      if (ptr_hbe_txposer->k_start + ptr_hbe_txposer->synth_size > 16)
  ------------------
  |  Branch (120:11): [True: 166, False: 3.82k]
  ------------------
  121|    166|        ptr_hbe_txposer->k_start = 16 - ptr_hbe_txposer->synth_size;
  122|  57.8k|    } else if (ptr_hbe_txposer->core_frame_length == 768) {
  ------------------
  |  Branch (122:16): [True: 2.21k, False: 55.6k]
  ------------------
  123|  2.21k|      if (ptr_hbe_txposer->k_start + ptr_hbe_txposer->synth_size > 24)
  ------------------
  |  Branch (123:11): [True: 1.15k, False: 1.06k]
  ------------------
  124|  1.15k|        ptr_hbe_txposer->k_start = 24 - ptr_hbe_txposer->synth_size;
  125|  2.21k|    }
  126|       |
  127|  61.8k|    memset(ptr_hbe_txposer->synth_buf, 0, 1280 * sizeof(FLOAT32));
  128|  61.8k|    synth_size = ptr_hbe_txposer->synth_size;
  129|  61.8k|    ptr_hbe_txposer->synth_buf_offset = 18 * synth_size;
  130|  61.8k|    switch (synth_size) {
  131|     90|      case 4:
  ------------------
  |  Branch (131:7): [True: 90, False: 61.7k]
  ------------------
  132|     90|        ptr_hbe_txposer->synth_cos_tab =
  133|     90|            (FLOAT32 *)ixheaac_synth_cos_table_kl_4;
  134|     90|        ptr_hbe_txposer->analy_cos_sin_tab =
  135|     90|            (FLOAT32 *)ixheaac_analy_cos_sin_table_kl_8;
  136|     90|        ptr_hbe_txposer->ixheaacd_real_synth_fft = &ixheaac_real_synth_fft_p2;
  137|     90|        ptr_hbe_txposer->ixheaacd_cmplx_anal_fft = &ixheaac_cmplx_anal_fft_p2;
  138|     90|        break;
  139|  11.2k|      case 8:
  ------------------
  |  Branch (139:7): [True: 11.2k, False: 50.6k]
  ------------------
  140|  11.2k|        ptr_hbe_txposer->synth_cos_tab =
  141|  11.2k|            (FLOAT32 *)ixheaac_synth_cos_table_kl_8;
  142|  11.2k|        ptr_hbe_txposer->analy_cos_sin_tab =
  143|  11.2k|            (FLOAT32 *)ixheaac_analy_cos_sin_table_kl_16;
  144|  11.2k|        ptr_hbe_txposer->ixheaacd_real_synth_fft = &ixheaac_real_synth_fft_p2;
  145|  11.2k|        ptr_hbe_txposer->ixheaacd_cmplx_anal_fft = &ixheaac_cmplx_anal_fft_p2;
  146|  11.2k|        break;
  147|  18.2k|      case 12:
  ------------------
  |  Branch (147:7): [True: 18.2k, False: 43.6k]
  ------------------
  148|  18.2k|        ptr_hbe_txposer->synth_cos_tab =
  149|  18.2k|            (FLOAT32 *)ixheaac_synth_cos_table_kl_12;
  150|  18.2k|        ptr_hbe_txposer->analy_cos_sin_tab =
  151|  18.2k|            (FLOAT32 *)ixheaac_analy_cos_sin_table_kl_24;
  152|  18.2k|        ptr_hbe_txposer->ixheaacd_real_synth_fft = &ixheaac_real_synth_fft_p3;
  153|  18.2k|        ptr_hbe_txposer->ixheaacd_cmplx_anal_fft = &ixheaac_cmplx_anal_fft_p3;
  154|  18.2k|        break;
  155|  7.03k|      case 16:
  ------------------
  |  Branch (155:7): [True: 7.03k, False: 54.8k]
  ------------------
  156|  7.03k|        ptr_hbe_txposer->synth_cos_tab =
  157|  7.03k|            (FLOAT32 *)ixheaac_synth_cos_table_kl_16;
  158|  7.03k|        ptr_hbe_txposer->analy_cos_sin_tab =
  159|  7.03k|            (FLOAT32 *)ixheaac_analy_cos_sin_table_kl_32;
  160|  7.03k|        ptr_hbe_txposer->ixheaacd_real_synth_fft = &ixheaac_real_synth_fft_p2;
  161|  7.03k|        ptr_hbe_txposer->ixheaacd_cmplx_anal_fft = &ixheaac_cmplx_anal_fft_p2;
  162|  7.03k|        break;
  163|  25.2k|      case 20:
  ------------------
  |  Branch (163:7): [True: 25.2k, False: 36.5k]
  ------------------
  164|  25.2k|        ptr_hbe_txposer->synth_cos_tab =
  165|  25.2k|            (FLOAT32 *)ixheaac_synth_cos_table_kl_20;
  166|  25.2k|        ptr_hbe_txposer->analy_cos_sin_tab =
  167|  25.2k|            (FLOAT32 *)ixheaac_analy_cos_sin_table_kl_40;
  168|  25.2k|        break;
  169|      0|      default:
  ------------------
  |  Branch (169:7): [True: 0, False: 61.8k]
  ------------------
  170|      0|        ptr_hbe_txposer->synth_cos_tab =
  171|      0|            (FLOAT32 *)ixheaac_synth_cos_table_kl_4;
  172|      0|        ptr_hbe_txposer->analy_cos_sin_tab =
  173|      0|            (FLOAT32 *)ixheaac_analy_cos_sin_table_kl_8;
  174|      0|        ptr_hbe_txposer->ixheaacd_real_synth_fft = &ixheaac_real_synth_fft_p2;
  175|      0|        ptr_hbe_txposer->ixheaacd_cmplx_anal_fft = &ixheaac_cmplx_anal_fft_p2;
  176|  61.8k|    }
  177|       |
  178|  61.8k|    ptr_hbe_txposer->synth_wind_coeff = ixheaacd_map_prot_filter(synth_size);
  179|       |
  180|  61.8k|    memset(ptr_hbe_txposer->analy_buf, 0, 640 * sizeof(FLOAT32));
  181|  61.8k|    synth_size = 2 * ptr_hbe_txposer->synth_size;
  182|  61.8k|    ptr_hbe_txposer->analy_wind_coeff = ixheaacd_map_prot_filter(synth_size);
  183|       |
  184|  61.8k|    memset(ptr_hbe_txposer->x_over_qmf, 0, MAX_NUM_PATCHES * sizeof(WORD32));
  ------------------
  |  |   23|  61.8k|#define MAX_NUM_PATCHES 6
  ------------------
  185|  61.8k|    sfb = 0;
  186|  61.8k|    if (upsamp_4_flag) {
  ------------------
  |  Branch (186:9): [True: 3.99k, False: 57.8k]
  ------------------
  187|  3.99k|      stop_patch = MAX_NUM_PATCHES;
  ------------------
  |  |   23|  3.99k|#define MAX_NUM_PATCHES 6
  ------------------
  188|  3.99k|      ptr_hbe_txposer->max_stretch = MAX_STRETCH;
  ------------------
  |  |  157|  3.99k|#define MAX_STRETCH 4
  ------------------
  189|  57.8k|    } else {
  190|  57.8k|      stop_patch = MAX_STRETCH;
  ------------------
  |  |  157|  57.8k|#define MAX_STRETCH 4
  ------------------
  191|  57.8k|    }
  192|       |
  193|   176k|    for (patch = 1; patch <= stop_patch; patch++) {
  ------------------
  |  Branch (193:21): [True: 171k, False: 4.14k]
  ------------------
  194|   653k|      while (sfb <= p_num_sfb[LOW] &&
  ------------------
  |  |   27|   653k|#define LOW 0
  ------------------
  |  Branch (194:14): [True: 595k, False: 57.7k]
  ------------------
  195|   595k|             p_freq_band_tab[LOW][sfb] <= patch * ptr_hbe_txposer->start_band)
  ------------------
  |  |   27|   595k|#define LOW 0
  ------------------
  |  Branch (195:14): [True: 481k, False: 114k]
  ------------------
  196|   481k|        sfb++;
  197|   171k|      if (sfb <= p_num_sfb[LOW]) {
  ------------------
  |  |   27|   171k|#define LOW 0
  ------------------
  |  Branch (197:11): [True: 114k, False: 57.7k]
  ------------------
  198|   114k|        if ((patch * ptr_hbe_txposer->start_band -
  ------------------
  |  Branch (198:13): [True: 100k, False: 13.9k]
  ------------------
  199|   114k|             p_freq_band_tab[LOW][sfb - 1]) <= 3) {
  ------------------
  |  |   27|   114k|#define LOW 0
  ------------------
  200|   100k|          ptr_hbe_txposer->x_over_qmf[patch - 1] =
  201|   100k|              p_freq_band_tab[LOW][sfb - 1];
  ------------------
  |  |   27|   100k|#define LOW 0
  ------------------
  202|   100k|        } else {
  203|  13.9k|          WORD32 sfb = 0;
  204|   179k|          while (sfb <= p_num_sfb[HIGH] &&
  ------------------
  |  |   28|   179k|#define HIGH 1
  ------------------
  |  Branch (204:18): [True: 179k, False: 0]
  ------------------
  205|   179k|                 p_freq_band_tab[HIGH][sfb] <=
  ------------------
  |  |   28|   179k|#define HIGH 1
  ------------------
  |  Branch (205:18): [True: 165k, False: 13.9k]
  ------------------
  206|   179k|                     patch * ptr_hbe_txposer->start_band)
  207|   165k|            sfb++;
  208|  13.9k|          ptr_hbe_txposer->x_over_qmf[patch - 1] =
  209|  13.9k|              p_freq_band_tab[HIGH][sfb - 1];
  ------------------
  |  |   28|  13.9k|#define HIGH 1
  ------------------
  210|  13.9k|        }
  211|   114k|      } else {
  212|  57.7k|        ptr_hbe_txposer->x_over_qmf[patch - 1] = ptr_hbe_txposer->end_band;
  213|  57.7k|        ptr_hbe_txposer->max_stretch = min(patch, MAX_STRETCH);
  ------------------
  |  |   75|  57.7k|#define min(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (75:20): [True: 45.0k, False: 12.6k]
  |  |  ------------------
  ------------------
  214|  57.7k|        break;
  215|  57.7k|      }
  216|   171k|    }
  217|  61.8k|    if (ptr_hbe_txposer->k_start < 0) {
  ------------------
  |  Branch (217:9): [True: 0, False: 61.8k]
  ------------------
  218|      0|      return -1;
  219|      0|    }
  220|  61.8k|  }
  221|  61.8k|  return 0;
  222|  61.8k|}
ixheaacd_qmf_hbe_apply:
  230|   237k|                              ia_sbr_header_data_struct *ptr_header_data) {
  231|   237k|  WORD32 i, qmf_band_idx;
  232|   237k|  WORD32 qmf_voc_columns = ptr_hbe_txposer->no_bins / 2;
  233|   237k|  WORD32 err_code = 0;
  234|       |
  235|   237k|  memcpy(ptr_hbe_txposer->ptr_input_buf,
  236|   237k|         ptr_hbe_txposer->ptr_input_buf +
  237|   237k|             ptr_hbe_txposer->no_bins * ptr_hbe_txposer->synth_size,
  238|   237k|         ptr_hbe_txposer->synth_size * sizeof(FLOAT32));
  239|       |
  240|   237k|  if (ptr_hbe_txposer->ixheaacd_cmplx_anal_fft == NULL) {
  ------------------
  |  Branch (240:7): [True: 16.0k, False: 221k]
  ------------------
  241|  16.0k|    WORD32 err = ixheaacd_qmf_hbe_data_reinit(
  242|  16.0k|        ptr_hbe_txposer,
  243|  16.0k|        ptr_header_data->pstr_freq_band_data->freq_band_table,
  244|  16.0k|        ptr_header_data->pstr_freq_band_data->num_sf_bands,
  245|  16.0k|        ptr_header_data->is_usf_4);
  246|  16.0k|    if (err)
  ------------------
  |  Branch (246:9): [True: 0, False: 16.0k]
  ------------------
  247|      0|      return err;
  248|  16.0k|  }
  249|       |
  250|   237k|  err_code = ixheaacd_real_synth_filt(ptr_hbe_txposer, num_columns,
  251|   237k|                                      qmf_buf_real, qmf_buf_imag);
  252|   237k|  if (err_code) return err_code;
  ------------------
  |  Branch (252:7): [True: 4, False: 237k]
  ------------------
  253|       |
  254|  3.08M|  for (i = 0; i < HBE_OPER_WIN_LEN - 1; i++) {
  ------------------
  |  |  108|  3.08M|#define HBE_OPER_WIN_LEN (13)
  ------------------
  |  Branch (254:15): [True: 2.84M, False: 237k]
  ------------------
  255|  2.84M|    memcpy(ptr_hbe_txposer->qmf_in_buf[i],
  256|  2.84M|           ptr_hbe_txposer->qmf_in_buf[i + qmf_voc_columns],
  257|  2.84M|           TWICE_QMF_SYNTH_CHANNELS_NUM * sizeof(FLOAT32));
  ------------------
  |  |  110|  2.84M|#define TWICE_QMF_SYNTH_CHANNELS_NUM 128
  ------------------
  258|  2.84M|  }
  259|       |
  260|   237k|  err_code = ixheaacd_complex_anal_filt(ptr_hbe_txposer);
  261|   237k|  if (err_code) return err_code;
  ------------------
  |  Branch (261:7): [True: 0, False: 237k]
  ------------------
  262|       |
  263|  8.87M|  for (i = 0; i < (ptr_hbe_txposer->hbe_qmf_out_len - ptr_hbe_txposer->no_bins);
  ------------------
  |  Branch (263:15): [True: 8.64M, False: 237k]
  ------------------
  264|  8.64M|       i++) {
  265|  8.64M|    memcpy(ptr_hbe_txposer->qmf_out_buf[i],
  266|  8.64M|           ptr_hbe_txposer->qmf_out_buf[i + ptr_hbe_txposer->no_bins],
  267|  8.64M|           TWICE_QMF_SYNTH_CHANNELS_NUM * sizeof(FLOAT32));
  ------------------
  |  |  110|  8.64M|#define TWICE_QMF_SYNTH_CHANNELS_NUM 128
  ------------------
  268|  8.64M|  }
  269|       |
  270|  8.87M|  for (; i < ptr_hbe_txposer->hbe_qmf_out_len; i++) {
  ------------------
  |  Branch (270:10): [True: 8.64M, False: 237k]
  ------------------
  271|  8.64M|    memset(ptr_hbe_txposer->qmf_out_buf[i], 0,
  272|  8.64M|           TWICE_QMF_SYNTH_CHANNELS_NUM * sizeof(FLOAT32));
  ------------------
  |  |  110|  8.64M|#define TWICE_QMF_SYNTH_CHANNELS_NUM 128
  ------------------
  273|  8.64M|  }
  274|       |
  275|   237k|  err_code = ixheaacd_hbe_post_anal_process(ptr_hbe_txposer, pitch_in_bins,
  276|   237k|                                            ptr_hbe_txposer->upsamp_4_flag);
  277|   237k|  if (err_code) return err_code;
  ------------------
  |  Branch (277:7): [True: 0, False: 237k]
  ------------------
  278|       |
  279|  8.87M|  for (i = 0; i < ptr_hbe_txposer->no_bins; i++) {
  ------------------
  |  Branch (279:15): [True: 8.64M, False: 237k]
  ------------------
  280|  8.64M|    for (qmf_band_idx = ptr_hbe_txposer->start_band;
  281|   198M|         qmf_band_idx < ptr_hbe_txposer->end_band; qmf_band_idx++) {
  ------------------
  |  Branch (281:10): [True: 190M, False: 8.64M]
  ------------------
  282|   190M|      pv_qmf_buf_real[i][qmf_band_idx] =
  283|   190M|          (FLOAT32)(ptr_hbe_txposer->qmf_out_buf[i][2 * qmf_band_idx] *
  284|   190M|                        ixheaac_phase_vocoder_cos_table[qmf_band_idx] -
  285|   190M|                    ptr_hbe_txposer->qmf_out_buf[i][2 * qmf_band_idx + 1] *
  286|   190M|                        ixheaac_phase_vocoder_sin_table[qmf_band_idx]);
  287|       |
  288|   190M|      pv_qmf_buf_imag[i][qmf_band_idx] =
  289|   190M|          (FLOAT32)(ptr_hbe_txposer->qmf_out_buf[i][2 * qmf_band_idx] *
  290|   190M|                        ixheaac_phase_vocoder_sin_table[qmf_band_idx] +
  291|   190M|                    ptr_hbe_txposer->qmf_out_buf[i][2 * qmf_band_idx + 1] *
  292|   190M|                        ixheaac_phase_vocoder_cos_table[qmf_band_idx]);
  293|   190M|    }
  294|  8.64M|  }
  295|   237k|  return 0;
  296|   237k|}
ixheaacd_norm_qmf_in_buf_4:
  299|  88.3k|                                WORD32 qmf_band_idx) {
  300|  88.3k|  WORD32 i;
  301|  88.3k|  FLOAT32 *in_buf = &ptr_hbe_txposer->qmf_in_buf[0][2 * qmf_band_idx];
  302|  88.3k|  FLOAT32 *norm_buf = &ptr_hbe_txposer->norm_qmf_in_buf[0][2 * qmf_band_idx];
  303|       |
  304|  2.55M|  for (; qmf_band_idx <= ptr_hbe_txposer->x_over_qmf[3]; qmf_band_idx++) {
  ------------------
  |  Branch (304:10): [True: 2.47M, False: 88.3k]
  ------------------
  305|  88.3M|    for (i = 0; i < ptr_hbe_txposer->hbe_qmf_in_len; i++) {
  ------------------
  |  Branch (305:17): [True: 85.8M, False: 2.47M]
  ------------------
  306|  85.8M|      FLOAT32 mag_scaling_fac = 0.0f;
  307|  85.8M|      FLOAT32 x_r, x_i, temp;
  308|  85.8M|      FLOAT64 base = 1e-17;
  309|  85.8M|      x_r = in_buf[0];
  310|  85.8M|      x_i = in_buf[1];
  311|       |
  312|  85.8M|      temp = x_r * x_r;
  313|  85.8M|      base = base + temp;
  314|  85.8M|      temp = x_i * x_i;
  315|  85.8M|      base = base + temp;
  316|       |
  317|  85.8M|      temp = (FLOAT32)sqrt(sqrt(base));
  318|  85.8M|      mag_scaling_fac = temp * (FLOAT32)(sqrt(temp));
  319|       |
  320|  85.8M|      mag_scaling_fac = 1 / mag_scaling_fac;
  321|       |
  322|  85.8M|      x_r *= mag_scaling_fac;
  323|  85.8M|      x_i *= mag_scaling_fac;
  324|       |
  325|  85.8M|      norm_buf[0] = x_r;
  326|  85.8M|      norm_buf[1] = x_i;
  327|       |
  328|  85.8M|      in_buf += 128;
  329|  85.8M|      norm_buf += 128;
  330|  85.8M|    }
  331|       |
  332|  2.47M|    in_buf -= (128 * (ptr_hbe_txposer->hbe_qmf_in_len) - 2);
  333|  2.47M|    norm_buf -= (128 * (ptr_hbe_txposer->hbe_qmf_in_len) - 2);
  334|  2.47M|  }
  335|  88.3k|}
ixheaacd_norm_qmf_in_buf_2:
  338|   221k|                                WORD32 qmf_band_idx) {
  339|   221k|  WORD32 i;
  340|   221k|  FLOAT32 *in_buf = &ptr_hbe_txposer->qmf_in_buf[0][2 * qmf_band_idx];
  341|   221k|  FLOAT32 *norm_buf = &ptr_hbe_txposer->norm_qmf_in_buf[0][2 * qmf_band_idx];
  342|       |
  343|  3.02M|  for (; qmf_band_idx <= ptr_hbe_txposer->x_over_qmf[1]; qmf_band_idx++) {
  ------------------
  |  Branch (343:10): [True: 2.80M, False: 221k]
  ------------------
  344|  99.3M|    for (i = 0; i < ptr_hbe_txposer->hbe_qmf_in_len; i++) {
  ------------------
  |  Branch (344:17): [True: 96.5M, False: 2.80M]
  ------------------
  345|  96.5M|      FLOAT32 mag_scaling_fac = 0.0f;
  346|  96.5M|      FLOAT32 x_r, x_i, temp;
  347|  96.5M|      FLOAT64 base = 1e-17;
  348|  96.5M|      x_r = in_buf[0];
  349|  96.5M|      x_i = in_buf[1];
  350|       |
  351|  96.5M|      temp = x_r * x_r;
  352|  96.5M|      base = base + temp;
  353|  96.5M|      temp = x_i * x_i;
  354|  96.5M|      base = base + x_i * x_i;
  355|       |
  356|  96.5M|      mag_scaling_fac = (FLOAT32)(1.0f / base);
  357|  96.5M|      mag_scaling_fac = (FLOAT32)sqrt(sqrt(mag_scaling_fac));
  358|       |
  359|  96.5M|      x_r *= mag_scaling_fac;
  360|  96.5M|      x_i *= mag_scaling_fac;
  361|       |
  362|  96.5M|      norm_buf[0] = x_r;
  363|  96.5M|      norm_buf[1] = x_i;
  364|       |
  365|  96.5M|      in_buf += 128;
  366|  96.5M|      norm_buf += 128;
  367|  96.5M|    }
  368|       |
  369|  2.80M|    in_buf -= (128 * (ptr_hbe_txposer->hbe_qmf_in_len) - 2);
  370|  2.80M|    norm_buf -= (128 * (ptr_hbe_txposer->hbe_qmf_in_len) - 2);
  371|  2.80M|  }
  372|   221k|}
ixheaacd_hbe_xprod_proc_3:
  376|  1.22M|                               FLOAT32 p, WORD32 pitch_in_bins_idx) {
  377|  1.22M|  WORD32 tr, n1, n2, max_trans_fac, max_n1, max_n2;
  378|  1.22M|  WORD32 k, addrshift;
  379|  1.22M|  WORD32 inp_band_idx = 2 * qmf_band_idx / 3;
  380|       |
  381|  1.22M|  FLOAT64 temp_fac;
  382|  1.22M|  FLOAT32 max_mag_value;
  383|  1.22M|  FLOAT32 mag_zero_band, mag_n1_band, mag_n2_band, temp;
  384|  1.22M|  FLOAT32 temp_r, temp_i;
  385|  1.22M|  FLOAT32 mag_cmplx_gain = 1.8856f;
  386|       |
  387|  1.22M|  FLOAT32 *qmf_in_buf_ri =
  388|  1.22M|      ptr_hbe_txposer->qmf_in_buf[qmf_col_idx + HBE_ZERO_BAND_IDX];
  ------------------
  |  |  204|  1.22M|#define HBE_ZERO_BAND_IDX 6
  ------------------
  389|       |
  390|  1.22M|  mag_zero_band =
  391|  1.22M|      qmf_in_buf_ri[2 * inp_band_idx] * qmf_in_buf_ri[2 * inp_band_idx] +
  392|  1.22M|      qmf_in_buf_ri[2 * inp_band_idx + 1] * qmf_in_buf_ri[2 * inp_band_idx + 1];
  393|  1.22M|  max_mag_value = 0;
  394|  1.22M|  max_n1 = max_n2 = max_trans_fac = 0;
  395|       |
  396|  3.67M|  for (tr = 1; tr < 3; tr++) {
  ------------------
  |  Branch (396:16): [True: 2.44M, False: 1.22M]
  ------------------
  397|  2.44M|    temp_fac = (2.0f * qmf_band_idx + 1 - tr * p) * 0.3333334;
  398|       |
  399|  2.44M|    n1 = (WORD32)(temp_fac);
  400|  2.44M|    n2 = (WORD32)(temp_fac + p);
  401|       |
  402|  2.44M|    mag_n1_band = qmf_in_buf_ri[2 * n1] * qmf_in_buf_ri[2 * n1] +
  403|  2.44M|                  qmf_in_buf_ri[2 * n1 + 1] * qmf_in_buf_ri[2 * n1 + 1];
  404|  2.44M|    mag_n2_band = qmf_in_buf_ri[2 * n2] * qmf_in_buf_ri[2 * n2] +
  405|  2.44M|                  qmf_in_buf_ri[2 * n2 + 1] * qmf_in_buf_ri[2 * n2 + 1];
  406|  2.44M|    temp = min(mag_n1_band, mag_n2_band);
  ------------------
  |  |   75|  2.44M|#define min(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (75:20): [True: 837k, False: 1.61M]
  |  |  ------------------
  ------------------
  407|       |
  408|  2.44M|    if (temp > max_mag_value) {
  ------------------
  |  Branch (408:9): [True: 1.52M, False: 926k]
  ------------------
  409|  1.52M|      max_mag_value = temp;
  410|  1.52M|      max_trans_fac = tr;
  411|  1.52M|      max_n1 = n1;
  412|  1.52M|      max_n2 = n2;
  413|  1.52M|    }
  414|  2.44M|  }
  415|       |
  416|  1.22M|  if (max_mag_value > mag_zero_band && max_n1 >= 0 &&
  ------------------
  |  Branch (416:7): [True: 387k, False: 837k]
  |  Branch (416:40): [True: 387k, False: 0]
  ------------------
  417|   387k|      max_n2 < NO_QMF_SYNTH_CHANNELS) {
  ------------------
  |  |  109|   387k|#define NO_QMF_SYNTH_CHANNELS 64
  ------------------
  |  Branch (417:7): [True: 387k, False: 0]
  ------------------
  418|   387k|    FLOAT32 vec_y_r[2], vec_y_i[2], vec_o_r[2], vec_o_i[2];
  419|   387k|    FLOAT32 coeff_real[2], coeff_imag[2];
  420|   387k|    FLOAT32 d1, d2;
  421|   387k|    WORD32 mid_trans_fac, idx;
  422|   387k|    FLOAT64 base = 1e-17;
  423|   387k|    FLOAT32 mag_scaling_fac = 0;
  424|   387k|    FLOAT32 x_zero_band_r;
  425|   387k|    FLOAT32 x_zero_band_i;
  426|       |
  427|   387k|    x_zero_band_r = 0;
  428|   387k|    x_zero_band_i = 0;
  429|   387k|    mid_trans_fac = 3 - max_trans_fac;
  430|   387k|    if (max_trans_fac == 1) {
  ------------------
  |  Branch (430:9): [True: 168k, False: 219k]
  ------------------
  431|   168k|      WORD32 idx;
  432|   168k|      d1 = 0;
  433|   168k|      d2 = 1.5;
  434|   168k|      x_zero_band_r = qmf_in_buf_ri[2 * max_n1];
  435|   168k|      x_zero_band_i = qmf_in_buf_ri[2 * max_n1 + 1];
  436|       |
  437|   168k|      idx = max_n2 & 3;
  438|   168k|      idx = (idx + 1) & 3;
  439|   168k|      coeff_real[0] = ixheaac_hbe_post_anal_proc_interp_coeff[idx][0];
  440|   168k|      coeff_imag[0] = ixheaac_hbe_post_anal_proc_interp_coeff[idx][1];
  441|       |
  442|   168k|      coeff_real[1] = coeff_real[0];
  443|   168k|      coeff_imag[1] = -coeff_imag[0];
  444|       |
  445|   168k|      vec_y_r[1] = qmf_in_buf_ri[2 * max_n2];
  446|   168k|      vec_y_i[1] = qmf_in_buf_ri[2 * max_n2 + 1];
  447|       |
  448|   168k|      addrshift = -2;
  449|   168k|      temp_r = ptr_hbe_txposer->qmf_in_buf[qmf_col_idx + addrshift +
  450|   168k|                                           HBE_ZERO_BAND_IDX][2 * max_n2];
  ------------------
  |  |  204|   168k|#define HBE_ZERO_BAND_IDX 6
  ------------------
  451|   168k|      temp_i = ptr_hbe_txposer->qmf_in_buf[qmf_col_idx + addrshift +
  452|   168k|                                           HBE_ZERO_BAND_IDX][2 * max_n2 + 1];
  ------------------
  |  |  204|   168k|#define HBE_ZERO_BAND_IDX 6
  ------------------
  453|       |
  454|   168k|      vec_y_r[0] = coeff_real[1] * temp_r - coeff_imag[1] * temp_i;
  455|   168k|      vec_y_i[0] = coeff_imag[1] * temp_r + coeff_real[1] * temp_i;
  456|       |
  457|   168k|      temp_r = ptr_hbe_txposer->qmf_in_buf[qmf_col_idx + addrshift + 1 +
  458|   168k|                                           HBE_ZERO_BAND_IDX][2 * max_n2];
  ------------------
  |  |  204|   168k|#define HBE_ZERO_BAND_IDX 6
  ------------------
  459|   168k|      temp_i = ptr_hbe_txposer->qmf_in_buf[qmf_col_idx + addrshift + 1 +
  460|   168k|                                           HBE_ZERO_BAND_IDX][2 * max_n2 + 1];
  ------------------
  |  |  204|   168k|#define HBE_ZERO_BAND_IDX 6
  ------------------
  461|       |
  462|   168k|      vec_y_r[0] += coeff_real[0] * temp_r - coeff_imag[0] * temp_i;
  463|   168k|      vec_y_i[0] += coeff_imag[0] * temp_r + coeff_real[0] * temp_i;
  464|       |
  465|   219k|    } else {
  466|   219k|      WORD32 idx;
  467|   219k|      d1 = 1.5;
  468|   219k|      d2 = 0;
  469|   219k|      mid_trans_fac = max_trans_fac;
  470|   219k|      max_trans_fac = 3 - max_trans_fac;
  471|       |
  472|   219k|      x_zero_band_r = qmf_in_buf_ri[2 * max_n2];
  473|   219k|      x_zero_band_i = qmf_in_buf_ri[2 * max_n2 + 1];
  474|       |
  475|   219k|      idx = (max_n1 & 3);
  476|   219k|      idx = (idx + 1) & 3;
  477|   219k|      coeff_real[0] = ixheaac_hbe_post_anal_proc_interp_coeff[idx][0];
  478|   219k|      coeff_imag[0] = ixheaac_hbe_post_anal_proc_interp_coeff[idx][1];
  479|       |
  480|   219k|      coeff_real[1] = coeff_real[0];
  481|   219k|      coeff_imag[1] = -coeff_imag[0];
  482|       |
  483|   219k|      vec_y_r[1] = qmf_in_buf_ri[2 * max_n1];
  484|   219k|      vec_y_i[1] = qmf_in_buf_ri[2 * max_n1 + 1];
  485|       |
  486|   219k|      addrshift = -2;
  487|       |
  488|   219k|      temp_r = ptr_hbe_txposer->qmf_in_buf[qmf_col_idx + addrshift +
  489|   219k|                                           HBE_ZERO_BAND_IDX][2 * max_n1];
  ------------------
  |  |  204|   219k|#define HBE_ZERO_BAND_IDX 6
  ------------------
  490|   219k|      temp_i = ptr_hbe_txposer->qmf_in_buf[qmf_col_idx + addrshift +
  491|   219k|                                           HBE_ZERO_BAND_IDX][2 * max_n1 + 1];
  ------------------
  |  |  204|   219k|#define HBE_ZERO_BAND_IDX 6
  ------------------
  492|       |
  493|   219k|      vec_y_r[0] = coeff_real[1] * temp_r - coeff_imag[1] * temp_i;
  494|   219k|      vec_y_i[0] = coeff_imag[1] * temp_r + coeff_real[1] * temp_i;
  495|       |
  496|   219k|      temp_r = ptr_hbe_txposer->qmf_in_buf[qmf_col_idx + addrshift + 1 +
  497|   219k|                                           HBE_ZERO_BAND_IDX][2 * max_n1];
  ------------------
  |  |  204|   219k|#define HBE_ZERO_BAND_IDX 6
  ------------------
  498|   219k|      temp_i = ptr_hbe_txposer->qmf_in_buf[qmf_col_idx + addrshift + 1 +
  499|   219k|                                           HBE_ZERO_BAND_IDX][2 * max_n1 + 1];
  ------------------
  |  |  204|   219k|#define HBE_ZERO_BAND_IDX 6
  ------------------
  500|       |
  501|   219k|      vec_y_r[0] += coeff_real[0] * temp_r - coeff_imag[0] * temp_i;
  502|   219k|      vec_y_i[0] += coeff_imag[0] * temp_r + coeff_real[0] * temp_i;
  503|   219k|    }
  504|       |
  505|   387k|    base = 1e-17;
  506|   387k|    base = base + x_zero_band_r * x_zero_band_r;
  507|   387k|    base = base + x_zero_band_i * x_zero_band_i;
  508|   387k|    mag_scaling_fac = (FLOAT32)(ixheaac_cbrt_calc((FLOAT32)base));
  ------------------
  |  |   25|   387k|#define ixheaac_cbrt_calc(a) cbrt(1.0f / a)
  ------------------
  509|   387k|    x_zero_band_r *= mag_scaling_fac;
  510|   387k|    x_zero_band_i *= mag_scaling_fac;
  511|  1.16M|    for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (511:17): [True: 774k, False: 387k]
  ------------------
  512|   774k|      base = 1e-17;
  513|   774k|      base = base + vec_y_r[k] * vec_y_r[k];
  514|   774k|      base = base + vec_y_i[k] * vec_y_i[k];
  515|   774k|      mag_scaling_fac = (FLOAT32)(ixheaac_cbrt_calc((FLOAT32)base));
  ------------------
  |  |   25|   774k|#define ixheaac_cbrt_calc(a) cbrt(1.0f / a)
  ------------------
  516|   774k|      vec_y_r[k] *= mag_scaling_fac;
  517|   774k|      vec_y_i[k] *= mag_scaling_fac;
  518|   774k|    }
  519|       |
  520|   387k|    temp_r = x_zero_band_r;
  521|   387k|    temp_i = x_zero_band_i;
  522|   774k|    for (idx = 0; idx < mid_trans_fac - 1; idx++) {
  ------------------
  |  Branch (522:19): [True: 387k, False: 387k]
  ------------------
  523|   387k|      FLOAT32 tmp = x_zero_band_r;
  524|   387k|      x_zero_band_r = x_zero_band_r * temp_r - x_zero_band_i * temp_i;
  525|   387k|      x_zero_band_i = tmp * temp_i + x_zero_band_i * temp_r;
  526|   387k|    }
  527|       |
  528|  1.16M|    for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (528:17): [True: 774k, False: 387k]
  ------------------
  529|   774k|      temp_r = vec_y_r[k];
  530|   774k|      temp_i = vec_y_i[k];
  531|   774k|      for (idx = 0; idx < max_trans_fac - 1; idx++) {
  ------------------
  |  Branch (531:21): [True: 0, False: 774k]
  ------------------
  532|      0|        FLOAT32 tmp = vec_y_r[k];
  533|      0|        vec_y_r[k] = vec_y_r[k] * temp_r - vec_y_i[k] * temp_i;
  534|      0|        vec_y_i[k] = tmp * temp_i + vec_y_i[k] * temp_r;
  535|      0|      }
  536|   774k|    }
  537|       |
  538|  1.16M|    for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (538:17): [True: 774k, False: 387k]
  ------------------
  539|   774k|      vec_o_r[k] = vec_y_r[k] * x_zero_band_r - vec_y_i[k] * x_zero_band_i;
  540|   774k|      vec_o_i[k] = vec_y_r[k] * x_zero_band_i + vec_y_i[k] * x_zero_band_r;
  541|   774k|    }
  542|       |
  543|   387k|    {
  544|   387k|      FLOAT32 cos_theta =
  545|   387k|          ixheaac_hbe_x_prod_cos_table_trans_3[(pitch_in_bins_idx << 1) + 0];
  546|   387k|      FLOAT32 sin_theta =
  547|   387k|          ixheaac_hbe_x_prod_cos_table_trans_3[(pitch_in_bins_idx << 1) + 1];
  548|   387k|      if (d2 < d1) {
  ------------------
  |  Branch (548:11): [True: 219k, False: 168k]
  ------------------
  549|   219k|        sin_theta = -sin_theta;
  550|   219k|      }
  551|   387k|      temp_r = vec_o_r[0];
  552|   387k|      temp_i = vec_o_i[0];
  553|   387k|      vec_o_r[0] = (FLOAT32)(cos_theta * temp_r - sin_theta * temp_i);
  554|   387k|      vec_o_i[0] = (FLOAT32)(cos_theta * temp_i + sin_theta * temp_r);
  555|   387k|    }
  556|       |
  557|  1.16M|    for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (557:17): [True: 774k, False: 387k]
  ------------------
  558|   774k|      ptr_hbe_txposer->qmf_out_buf[qmf_col_idx * 2 + (k + HBE_ZERO_BAND_IDX -
  ------------------
  |  |  204|   774k|#define HBE_ZERO_BAND_IDX 6
  ------------------
  559|   774k|                                                      1)][2 * qmf_band_idx] +=
  560|   774k|          (FLOAT32)(mag_cmplx_gain * vec_o_r[k]);
  561|   774k|      ptr_hbe_txposer
  562|   774k|          ->qmf_out_buf[qmf_col_idx * 2 + (k + HBE_ZERO_BAND_IDX - 1)]
  ------------------
  |  |  204|   774k|#define HBE_ZERO_BAND_IDX 6
  ------------------
  563|   774k|                       [2 * qmf_band_idx + 1] +=
  564|   774k|          (FLOAT32)(mag_cmplx_gain * vec_o_i[k]);
  565|   774k|    }
  566|   387k|  }
  567|  1.22M|}
ixheaacd_hbe_xprod_proc_4:
  571|   791k|                               FLOAT32 p, WORD32 pitch_in_bins_idx) {
  572|   791k|  WORD32 k;
  573|   791k|  WORD32 inp_band_idx = qmf_band_idx >> 1;
  574|   791k|  WORD32 tr, n1, n2, max_trans_fac, max_n1, max_n2;
  575|       |
  576|   791k|  FLOAT64 temp_fac;
  577|   791k|  FLOAT32 max_mag_value, mag_zero_band, mag_n1_band, mag_n2_band, temp;
  578|   791k|  FLOAT32 temp_r, temp_i;
  579|   791k|  FLOAT32 mag_cmplx_gain = 2.0f;
  580|       |
  581|   791k|  FLOAT32 *qmf_in_buf_ri =
  582|   791k|      ptr_hbe_txposer->qmf_in_buf[qmf_col_idx + HBE_ZERO_BAND_IDX];
  ------------------
  |  |  204|   791k|#define HBE_ZERO_BAND_IDX 6
  ------------------
  583|       |
  584|   791k|  mag_zero_band =
  585|   791k|      qmf_in_buf_ri[2 * inp_band_idx] * qmf_in_buf_ri[2 * inp_band_idx] +
  586|   791k|      qmf_in_buf_ri[2 * inp_band_idx + 1] * qmf_in_buf_ri[2 * inp_band_idx + 1];
  587|       |
  588|   791k|  max_mag_value = 0;
  589|   791k|  max_n1 = max_n2 = max_trans_fac = 0;
  590|       |
  591|  3.16M|  for (tr = 1; tr < 4; tr++) {
  ------------------
  |  Branch (591:16): [True: 2.37M, False: 791k]
  ------------------
  592|  2.37M|    temp_fac = (2.0 * qmf_band_idx + 1 - tr * p) * 0.25;
  593|  2.37M|    n1 = ((WORD32)(temp_fac)) << 1;
  594|  2.37M|    n2 = ((WORD32)(temp_fac + p)) << 1;
  595|       |
  596|  2.37M|    mag_n1_band = qmf_in_buf_ri[n1] * qmf_in_buf_ri[n1] +
  597|  2.37M|                  qmf_in_buf_ri[n1 + 1] * qmf_in_buf_ri[n1 + 1];
  598|  2.37M|    mag_n2_band = qmf_in_buf_ri[n2] * qmf_in_buf_ri[n2] +
  599|  2.37M|                  qmf_in_buf_ri[n2 + 1] * qmf_in_buf_ri[n2 + 1];
  600|       |
  601|  2.37M|    temp = min(mag_n1_band, mag_n2_band);
  ------------------
  |  |   75|  2.37M|#define min(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (75:20): [True: 720k, False: 1.65M]
  |  |  ------------------
  ------------------
  602|       |
  603|  2.37M|    if (temp > max_mag_value) {
  ------------------
  |  Branch (603:9): [True: 1.10M, False: 1.26M]
  ------------------
  604|  1.10M|      max_mag_value = temp;
  605|  1.10M|      max_trans_fac = tr;
  606|  1.10M|      max_n1 = n1;
  607|  1.10M|      max_n2 = n2;
  608|  1.10M|    }
  609|  2.37M|  }
  610|   791k|  if (max_mag_value > mag_zero_band && max_n1 >= 0 &&
  ------------------
  |  Branch (610:7): [True: 271k, False: 519k]
  |  Branch (610:40): [True: 271k, False: 0]
  ------------------
  611|   271k|      max_n2 < TWICE_QMF_SYNTH_CHANNELS_NUM) {
  ------------------
  |  |  110|   271k|#define TWICE_QMF_SYNTH_CHANNELS_NUM 128
  ------------------
  |  Branch (611:7): [True: 271k, False: 0]
  ------------------
  612|   271k|    FLOAT32 vec_y_r[2], vec_y_i[2], vec_o_r[2], vec_o_i[2];
  613|   271k|    FLOAT32 d1, d2;
  614|   271k|    WORD32 mid_trans_fac, idx;
  615|   271k|    FLOAT32 x_zero_band_r;
  616|   271k|    FLOAT32 x_zero_band_i;
  617|   271k|    FLOAT64 base = 1e-17;
  618|   271k|    FLOAT32 mag_scaling_fac = 0.0f;
  619|       |
  620|   271k|    x_zero_band_r = 0;
  621|   271k|    x_zero_band_i = 0;
  622|   271k|    mid_trans_fac = 4 - max_trans_fac;
  623|       |
  624|   271k|    if (max_trans_fac == 1) {
  ------------------
  |  Branch (624:9): [True: 80.0k, False: 191k]
  ------------------
  625|  80.0k|      d1 = 0;
  626|  80.0k|      d2 = 2;
  627|  80.0k|      x_zero_band_r = qmf_in_buf_ri[max_n1];
  628|  80.0k|      x_zero_band_i = qmf_in_buf_ri[max_n1 + 1];
  629|   240k|      for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (629:19): [True: 160k, False: 80.0k]
  ------------------
  630|   160k|        vec_y_r[k] =
  631|   160k|            ptr_hbe_txposer->qmf_in_buf[qmf_col_idx + HBE_ZERO_BAND_IDX +
  ------------------
  |  |  204|   160k|#define HBE_ZERO_BAND_IDX 6
  ------------------
  632|   160k|                                        2 * (k - 1)][max_n2];
  633|   160k|        vec_y_i[k] =
  634|   160k|            ptr_hbe_txposer->qmf_in_buf[qmf_col_idx + HBE_ZERO_BAND_IDX +
  ------------------
  |  |  204|   160k|#define HBE_ZERO_BAND_IDX 6
  ------------------
  635|   160k|                                        2 * (k - 1)][max_n2 + 1];
  636|   160k|      }
  637|   191k|    } else if (max_trans_fac == 2) {
  ------------------
  |  Branch (637:16): [True: 96.3k, False: 95.0k]
  ------------------
  638|  96.3k|      d1 = 0;
  639|  96.3k|      d2 = 1;
  640|  96.3k|      x_zero_band_r = qmf_in_buf_ri[max_n1];
  641|  96.3k|      x_zero_band_i = qmf_in_buf_ri[max_n1 + 1];
  642|   289k|      for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (642:19): [True: 192k, False: 96.3k]
  ------------------
  643|   192k|        vec_y_r[k] =
  644|   192k|            ptr_hbe_txposer
  645|   192k|                ->qmf_in_buf[qmf_col_idx + HBE_ZERO_BAND_IDX + (k - 1)][max_n2];
  ------------------
  |  |  204|   192k|#define HBE_ZERO_BAND_IDX 6
  ------------------
  646|   192k|        vec_y_i[k] =
  647|   192k|            ptr_hbe_txposer->qmf_in_buf[qmf_col_idx + HBE_ZERO_BAND_IDX +
  ------------------
  |  |  204|   192k|#define HBE_ZERO_BAND_IDX 6
  ------------------
  648|   192k|                                        (k - 1)][max_n2 + 1];
  649|   192k|      }
  650|  96.3k|    } else {
  651|  95.0k|      d1 = 2;
  652|  95.0k|      d2 = 0;
  653|  95.0k|      mid_trans_fac = max_trans_fac;
  654|  95.0k|      max_trans_fac = 4 - max_trans_fac;
  655|  95.0k|      x_zero_band_r = qmf_in_buf_ri[max_n2];
  656|  95.0k|      x_zero_band_i = qmf_in_buf_ri[max_n2 + 1];
  657|   285k|      for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (657:19): [True: 190k, False: 95.0k]
  ------------------
  658|   190k|        vec_y_r[k] =
  659|   190k|            ptr_hbe_txposer->qmf_in_buf[qmf_col_idx + HBE_ZERO_BAND_IDX +
  ------------------
  |  |  204|   190k|#define HBE_ZERO_BAND_IDX 6
  ------------------
  660|   190k|                                        2 * (k - 1)][max_n1];
  661|   190k|        vec_y_i[k] =
  662|   190k|            ptr_hbe_txposer->qmf_in_buf[qmf_col_idx + HBE_ZERO_BAND_IDX +
  ------------------
  |  |  204|   190k|#define HBE_ZERO_BAND_IDX 6
  ------------------
  663|   190k|                                        2 * (k - 1)][max_n1 + 1];
  664|   190k|      }
  665|  95.0k|    }
  666|       |
  667|   271k|    base = 1e-17;
  668|   271k|    base = base + x_zero_band_r * x_zero_band_r;
  669|   271k|    base = base + x_zero_band_i * x_zero_band_i;
  670|   271k|    {
  671|   271k|      temp = (FLOAT32)sqrt(sqrt(base));
  672|   271k|      mag_scaling_fac = temp * (FLOAT32)(sqrt(temp));
  673|   271k|      mag_scaling_fac = 1 / mag_scaling_fac;
  674|   271k|    }
  675|       |
  676|   271k|    x_zero_band_r *= mag_scaling_fac;
  677|   271k|    x_zero_band_i *= mag_scaling_fac;
  678|   814k|    for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (678:17): [True: 542k, False: 271k]
  ------------------
  679|   542k|      base = 1e-17;
  680|   542k|      base = base + vec_y_r[k] * vec_y_r[k];
  681|   542k|      base = base + vec_y_i[k] * vec_y_i[k];
  682|   542k|      {
  683|   542k|        temp = (FLOAT32)sqrt(sqrt(base));
  684|   542k|        mag_scaling_fac = temp * (FLOAT32)(sqrt(temp));
  685|       |
  686|   542k|        mag_scaling_fac = 1 / mag_scaling_fac;
  687|   542k|      }
  688|   542k|      vec_y_r[k] *= mag_scaling_fac;
  689|   542k|      vec_y_i[k] *= mag_scaling_fac;
  690|   542k|    }
  691|       |
  692|   271k|    temp_r = x_zero_band_r;
  693|   271k|    temp_i = x_zero_band_i;
  694|   717k|    for (idx = 0; idx < mid_trans_fac - 1; idx++) {
  ------------------
  |  Branch (694:19): [True: 446k, False: 271k]
  ------------------
  695|   446k|      FLOAT32 tmp = x_zero_band_r;
  696|   446k|      x_zero_band_r = x_zero_band_r * temp_r - x_zero_band_i * temp_i;
  697|   446k|      x_zero_band_i = tmp * temp_i + x_zero_band_i * temp_r;
  698|   446k|    }
  699|       |
  700|   814k|    for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (700:17): [True: 542k, False: 271k]
  ------------------
  701|   542k|      temp_r = vec_y_r[k];
  702|   542k|      temp_i = vec_y_i[k];
  703|   735k|      for (idx = 0; idx < max_trans_fac - 1; idx++) {
  ------------------
  |  Branch (703:21): [True: 192k, False: 542k]
  ------------------
  704|   192k|        FLOAT32 tmp = vec_y_r[k];
  705|   192k|        vec_y_r[k] = vec_y_r[k] * temp_r - vec_y_i[k] * temp_i;
  706|   192k|        vec_y_i[k] = tmp * temp_i + vec_y_i[k] * temp_r;
  707|   192k|      }
  708|   542k|    }
  709|       |
  710|   814k|    for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (710:17): [True: 542k, False: 271k]
  ------------------
  711|   542k|      vec_o_r[k] = vec_y_r[k] * x_zero_band_r - vec_y_i[k] * x_zero_band_i;
  712|   542k|      vec_o_i[k] = vec_y_r[k] * x_zero_band_i + vec_y_i[k] * x_zero_band_r;
  713|   542k|    }
  714|       |
  715|   271k|    {
  716|   271k|      FLOAT32 cos_theta;
  717|   271k|      FLOAT32 sin_theta;
  718|       |
  719|   271k|      if (d2 == 1) {
  ------------------
  |  Branch (719:11): [True: 96.3k, False: 175k]
  ------------------
  720|  96.3k|        cos_theta =
  721|  96.3k|            ixheaac_hbe_x_prod_cos_table_trans_4_1[(pitch_in_bins_idx << 1) +
  722|  96.3k|                                                    0];
  723|  96.3k|        sin_theta =
  724|  96.3k|            ixheaac_hbe_x_prod_cos_table_trans_4_1[(pitch_in_bins_idx << 1) +
  725|  96.3k|                                                    1];
  726|   175k|      } else {
  727|   175k|        cos_theta =
  728|   175k|            ixheaac_hbe_x_prod_cos_table_trans_4[(pitch_in_bins_idx << 1) + 0];
  729|   175k|        sin_theta =
  730|   175k|            ixheaac_hbe_x_prod_cos_table_trans_4[(pitch_in_bins_idx << 1) + 1];
  731|   175k|        if (d2 < d1) {
  ------------------
  |  Branch (731:13): [True: 95.0k, False: 80.0k]
  ------------------
  732|  95.0k|          sin_theta = -sin_theta;
  733|  95.0k|        }
  734|   175k|      }
  735|   271k|      temp_r = vec_o_r[0];
  736|   271k|      temp_i = vec_o_i[0];
  737|   271k|      vec_o_r[0] = (FLOAT32)(cos_theta * temp_r - sin_theta * temp_i);
  738|   271k|      vec_o_i[0] = (FLOAT32)(cos_theta * temp_i + sin_theta * temp_r);
  739|   271k|    }
  740|       |
  741|   814k|    for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (741:17): [True: 542k, False: 271k]
  ------------------
  742|   542k|      ptr_hbe_txposer->qmf_out_buf[qmf_col_idx * 2 + (k + HBE_ZERO_BAND_IDX -
  ------------------
  |  |  204|   542k|#define HBE_ZERO_BAND_IDX 6
  ------------------
  743|   542k|                                                      1)][2 * qmf_band_idx] +=
  744|   542k|          (FLOAT32)(mag_cmplx_gain * vec_o_r[k]);
  745|   542k|      ptr_hbe_txposer
  746|   542k|          ->qmf_out_buf[qmf_col_idx * 2 + (k + HBE_ZERO_BAND_IDX - 1)]
  ------------------
  |  |  204|   542k|#define HBE_ZERO_BAND_IDX 6
  ------------------
  747|   542k|                       [2 * qmf_band_idx + 1] +=
  748|   542k|          (FLOAT32)(mag_cmplx_gain * vec_o_i[k]);
  749|   542k|    }
  750|   271k|  }
  751|   791k|}
ixheaacd_hbe_post_anal_prod2:
  754|   211k|                                  WORD32 qmf_voc_columns, WORD32 qmf_band_idx) {
  755|   211k|  WORD32 i;
  756|   211k|  FLOAT32 *norm_ptr = &ptr_hbe_txposer->norm_qmf_in_buf[1][2 * qmf_band_idx];
  757|   211k|  FLOAT32 *out_ptr = &ptr_hbe_txposer->qmf_out_buf[1][2 * qmf_band_idx];
  758|   211k|  FLOAT32 *x_norm_ptr =
  759|   211k|      &ptr_hbe_txposer->norm_qmf_in_buf[HBE_ZERO_BAND_IDX][2 * qmf_band_idx];
  ------------------
  |  |  204|   211k|#define HBE_ZERO_BAND_IDX 6
  ------------------
  760|       |
  761|   211k|  ixheaacd_norm_qmf_in_buf_2(ptr_hbe_txposer, qmf_band_idx);
  762|       |
  763|  2.67M|  for (; qmf_band_idx < ptr_hbe_txposer->x_over_qmf[1]; qmf_band_idx++) {
  ------------------
  |  Branch (763:10): [True: 2.45M, False: 211k]
  ------------------
  764|  44.6M|    for (i = 0; i < qmf_voc_columns; i++) {
  ------------------
  |  Branch (764:17): [True: 42.1M, False: 2.45M]
  ------------------
  765|  42.1M|      WORD32 k;
  766|  42.1M|      FLOAT32 x_zero_band_r, x_zero_band_i;
  767|       |
  768|  42.1M|      x_zero_band_r = *x_norm_ptr++;
  769|  42.1M|      x_zero_band_i = *x_norm_ptr++;
  770|       |
  771|   464M|      for (k = 0; k < HBE_OPER_BLK_LEN_2; k++) {
  ------------------
  |  |  127|   464M|#define HBE_OPER_BLK_LEN_2 10
  ------------------
  |  Branch (771:19): [True: 421M, False: 42.1M]
  ------------------
  772|   421M|        register FLOAT32 tmp_r, tmp_i;
  773|   421M|        tmp_r = *norm_ptr++;
  774|   421M|        tmp_i = *norm_ptr++;
  775|       |
  776|   421M|        *out_ptr++ +=
  777|   421M|            ((tmp_r * x_zero_band_r - tmp_i * x_zero_band_i) * 0.3333333f);
  778|       |
  779|   421M|        *out_ptr++ +=
  780|   421M|            ((tmp_r * x_zero_band_i + tmp_i * x_zero_band_r) * 0.3333333f);
  781|       |
  782|   421M|        norm_ptr += 126;
  783|   421M|        out_ptr += 126;
  784|   421M|      }
  785|       |
  786|  42.1M|      norm_ptr -= 128 * 9;
  787|  42.1M|      out_ptr -= 128 * 8;
  788|  42.1M|      x_norm_ptr += 126;
  789|  42.1M|    }
  790|  2.45M|    out_ptr -= (128 * 2 * qmf_voc_columns) - 2;
  791|  2.45M|    norm_ptr -= (128 * qmf_voc_columns) - 2;
  792|  2.45M|    x_norm_ptr -= (128 * qmf_voc_columns) - 2;
  793|  2.45M|  }
  794|   211k|}
ixheaacd_hbe_post_anal_prod3:
  797|   132k|                                  WORD32 qmf_voc_columns, WORD32 qmf_band_idx) {
  798|   132k|  WORD32 i, inp_band_idx, rem;
  799|       |
  800|   132k|  FLOAT32 *out_buf = &ptr_hbe_txposer->qmf_out_buf[2][2 * qmf_band_idx];
  801|       |
  802|  1.41M|  for (; qmf_band_idx < ptr_hbe_txposer->x_over_qmf[2]; qmf_band_idx++) {
  ------------------
  |  Branch (802:10): [True: 1.28M, False: 132k]
  ------------------
  803|  1.28M|    FLOAT32 temp_r, temp_i;
  804|  1.28M|    FLOAT32 temp_r1, temp_i1;
  805|  1.28M|    const FLOAT32 *ptr_sel, *ptr_sel1;
  806|       |
  807|  1.28M|    inp_band_idx = (2 * qmf_band_idx) / 3;
  808|  1.28M|    ptr_sel = &ixheaac_sel_case[(inp_band_idx + 1) & 3][0];
  809|  1.28M|    ptr_sel1 = &ixheaac_sel_case[((inp_band_idx + 1) & 3) + 1][0];
  810|  1.28M|    rem = 2 * qmf_band_idx - 3 * inp_band_idx;
  811|       |
  812|  1.28M|    if (rem == 0 || rem == 1) {
  ------------------
  |  Branch (812:9): [True: 440k, False: 846k]
  |  Branch (812:21): [True: 424k, False: 421k]
  ------------------
  813|   865k|      FLOAT32 *in_buf = &ptr_hbe_txposer->qmf_in_buf[0][2 * inp_band_idx];
  814|       |
  815|  15.9M|      for (i = 0; i < qmf_voc_columns; i += 1) {
  ------------------
  |  Branch (815:19): [True: 15.0M, False: 865k]
  ------------------
  816|  15.0M|        WORD32 k;
  817|  15.0M|        FLOAT32 vec_x[2 * HBE_OPER_WIN_LEN];
  818|  15.0M|        FLOAT32 *ptr_vec_x = &vec_x[0];
  819|  15.0M|        FLOAT32 x_zero_band_r, x_zero_band_i;
  820|       |
  821|  15.0M|        FLOAT32 mag_scaling_fac;
  822|       |
  823|  75.3M|        for (k = 0; k < (HBE_OPER_BLK_LEN_3); k += 2) {
  ------------------
  |  |  128|  75.3M|#define HBE_OPER_BLK_LEN_3 8
  ------------------
  |  Branch (823:21): [True: 60.2M, False: 15.0M]
  ------------------
  824|  60.2M|          FLOAT64 base1;
  825|  60.2M|          FLOAT64 base = 1e-17;
  826|       |
  827|  60.2M|          temp_r = in_buf[0];
  828|  60.2M|          temp_i = in_buf[1];
  829|       |
  830|  60.2M|          in_buf += 256;
  831|       |
  832|  60.2M|          base1 = base + temp_r * temp_r;
  833|  60.2M|          base1 = base1 + temp_i * temp_i;
  834|       |
  835|  60.2M|          mag_scaling_fac = (FLOAT32)(ixheaac_cbrt_calc((FLOAT32)base1));
  ------------------
  |  |   25|  60.2M|#define ixheaac_cbrt_calc(a) cbrt(1.0f / a)
  ------------------
  836|       |
  837|  60.2M|          ptr_vec_x[0] = temp_r * mag_scaling_fac;
  838|  60.2M|          ptr_vec_x[1] = temp_i * mag_scaling_fac;
  839|       |
  840|  60.2M|          temp_r = in_buf[0];
  841|  60.2M|          temp_i = in_buf[1];
  842|       |
  843|  60.2M|          in_buf -= 128;
  844|       |
  845|  60.2M|          temp_r1 = ptr_sel[0] * temp_r + ptr_sel[1] * temp_i;
  846|  60.2M|          temp_i1 = ptr_sel[2] * temp_r + ptr_sel[3] * temp_i;
  847|       |
  848|  60.2M|          temp_r = in_buf[0];
  849|  60.2M|          temp_i = in_buf[1];
  850|       |
  851|  60.2M|          temp_r1 += ptr_sel[4] * temp_r + ptr_sel[5] * temp_i;
  852|  60.2M|          temp_i1 += ptr_sel[6] * temp_r + ptr_sel[7] * temp_i;
  853|       |
  854|  60.2M|          temp_r1 *= 0.3984033437f;
  855|  60.2M|          temp_i1 *= 0.3984033437f;
  856|       |
  857|  60.2M|          base1 = base + temp_r1 * temp_r1;
  858|  60.2M|          base1 = base1 + temp_i1 * temp_i1;
  859|  60.2M|          mag_scaling_fac = (FLOAT32)(ixheaac_cbrt_calc((FLOAT32)base1));
  ------------------
  |  |   25|  60.2M|#define ixheaac_cbrt_calc(a) cbrt(1.0f / a)
  ------------------
  860|       |
  861|  60.2M|          ptr_vec_x[2] = temp_r1 * mag_scaling_fac;
  862|  60.2M|          ptr_vec_x[3] = temp_i1 * mag_scaling_fac;
  863|       |
  864|  60.2M|          ptr_vec_x += 4;
  865|  60.2M|          in_buf += 256;
  866|  60.2M|        }
  867|  15.0M|        ptr_vec_x = &vec_x[0];
  868|  15.0M|        temp_r = vec_x[2 * (HBE_ZERO_BAND_IDX - 2)];
  ------------------
  |  |  204|  15.0M|#define HBE_ZERO_BAND_IDX 6
  ------------------
  869|  15.0M|        temp_i = vec_x[(2 * (HBE_ZERO_BAND_IDX - 2)) + 1];
  ------------------
  |  |  204|  15.0M|#define HBE_ZERO_BAND_IDX 6
  ------------------
  870|       |
  871|  15.0M|        x_zero_band_r = temp_r * temp_r - temp_i * temp_i;
  872|  15.0M|        x_zero_band_i = temp_r * temp_i + temp_i * temp_r;
  873|       |
  874|   135M|        for (k = 0; k < (HBE_OPER_BLK_LEN_3); k++) {
  ------------------
  |  |  128|   135M|#define HBE_OPER_BLK_LEN_3 8
  ------------------
  |  Branch (874:21): [True: 120M, False: 15.0M]
  ------------------
  875|   120M|          temp_r = ptr_vec_x[0] * x_zero_band_r - ptr_vec_x[1] * x_zero_band_i;
  876|   120M|          temp_i = ptr_vec_x[0] * x_zero_band_i + ptr_vec_x[1] * x_zero_band_r;
  877|       |
  878|   120M|          out_buf[0] += (temp_r * 0.4714045f);
  879|   120M|          out_buf[1] += (temp_i * 0.4714045f);
  880|       |
  881|   120M|          ptr_vec_x += 2;
  882|   120M|          out_buf += 128;
  883|   120M|        }
  884|       |
  885|  15.0M|        in_buf -= 128 * 11;
  886|  15.0M|        out_buf -= 128 * 6;
  887|  15.0M|      }
  888|   865k|    } else {
  889|   421k|      FLOAT32 *in_buf = &ptr_hbe_txposer->qmf_in_buf[0][2 * inp_band_idx];
  890|   421k|      FLOAT32 *in_buf1 =
  891|   421k|          &ptr_hbe_txposer->qmf_in_buf[0][2 * (inp_band_idx + 1)];
  892|       |
  893|  7.76M|      for (i = 0; i < qmf_voc_columns; i++) {
  ------------------
  |  Branch (893:19): [True: 7.34M, False: 421k]
  ------------------
  894|  7.34M|        WORD32 k;
  895|  7.34M|        FLOAT32 vec_x[2 * HBE_OPER_WIN_LEN];
  896|  7.34M|        FLOAT32 vec_x_cap[2 * HBE_OPER_WIN_LEN];
  897|       |
  898|  7.34M|        FLOAT32 x_zero_band_r, x_zero_band_i;
  899|  7.34M|        FLOAT32 *ptr_vec_x = &vec_x[0];
  900|  7.34M|        FLOAT32 *ptr_vec_x_cap = &vec_x_cap[0];
  901|       |
  902|  7.34M|        FLOAT32 mag_scaling_fac;
  903|       |
  904|  36.7M|        for (k = 0; k < (HBE_OPER_BLK_LEN_3); k += 2) {
  ------------------
  |  |  128|  36.7M|#define HBE_OPER_BLK_LEN_3 8
  ------------------
  |  Branch (904:21): [True: 29.3M, False: 7.34M]
  ------------------
  905|  29.3M|          FLOAT32 tmp_vr, tmp_vi;
  906|  29.3M|          FLOAT32 tmp_cr, tmp_ci;
  907|  29.3M|          FLOAT64 base1;
  908|  29.3M|          FLOAT64 base = 1e-17;
  909|       |
  910|  29.3M|          temp_r1 = in_buf[0];
  911|  29.3M|          temp_i1 = in_buf[1];
  912|  29.3M|          temp_r = in_buf1[0];
  913|  29.3M|          temp_i = in_buf1[1];
  914|       |
  915|  29.3M|          base1 = base + temp_r * temp_r;
  916|  29.3M|          base1 = base1 + temp_i * temp_i;
  917|       |
  918|  29.3M|          mag_scaling_fac = (FLOAT32)(ixheaac_cbrt_calc((FLOAT32)base1));
  ------------------
  |  |   25|  29.3M|#define ixheaac_cbrt_calc(a) cbrt(1.0f / a)
  ------------------
  919|       |
  920|  29.3M|          ptr_vec_x[0] = temp_r * mag_scaling_fac;
  921|  29.3M|          ptr_vec_x[1] = temp_i * mag_scaling_fac;
  922|       |
  923|  29.3M|          base1 = base + temp_r1 * temp_r1;
  924|  29.3M|          base1 = base1 + temp_i1 * temp_i1;
  925|       |
  926|  29.3M|          mag_scaling_fac = (FLOAT32)(ixheaac_cbrt_calc((FLOAT32)base1));
  ------------------
  |  |   25|  29.3M|#define ixheaac_cbrt_calc(a) cbrt(1.0f / a)
  ------------------
  927|       |
  928|  29.3M|          ptr_vec_x_cap[0] = temp_r1 * mag_scaling_fac;
  929|  29.3M|          ptr_vec_x_cap[1] = temp_i1 * mag_scaling_fac;
  930|       |
  931|  29.3M|          in_buf += 256;
  932|       |
  933|  29.3M|          temp_r = in_buf[0];
  934|  29.3M|          temp_i = in_buf[1];
  935|       |
  936|  29.3M|          temp_r1 = ptr_sel[0] * temp_r + ptr_sel[1] * temp_i;
  937|  29.3M|          temp_i1 = ptr_sel[2] * temp_r + ptr_sel[3] * temp_i;
  938|       |
  939|  29.3M|          in_buf -= 128;
  940|       |
  941|  29.3M|          temp_r = in_buf[0];
  942|  29.3M|          temp_i = in_buf[1];
  943|       |
  944|  29.3M|          tmp_cr = temp_r1 + ptr_sel[4] * temp_r + ptr_sel[5] * temp_i;
  945|  29.3M|          tmp_ci = temp_i1 + ptr_sel[6] * temp_r + ptr_sel[7] * temp_i;
  946|       |
  947|  29.3M|          in_buf1 += 256;
  948|       |
  949|  29.3M|          temp_r = in_buf1[0];
  950|  29.3M|          temp_i = in_buf1[1];
  951|       |
  952|  29.3M|          temp_r1 = ptr_sel1[0] * temp_r + ptr_sel1[1] * temp_i;
  953|  29.3M|          temp_i1 = ptr_sel1[2] * temp_r + ptr_sel1[3] * temp_i;
  954|       |
  955|  29.3M|          in_buf1 -= 128;
  956|       |
  957|  29.3M|          temp_r = in_buf1[0];
  958|  29.3M|          temp_i = in_buf1[1];
  959|       |
  960|  29.3M|          tmp_vr = temp_r1 + ptr_sel1[4] * temp_r + ptr_sel1[5] * temp_i;
  961|  29.3M|          tmp_vi = temp_i1 + ptr_sel1[6] * temp_r + ptr_sel1[7] * temp_i;
  962|       |
  963|  29.3M|          tmp_cr *= 0.3984033437f;
  964|  29.3M|          tmp_ci *= 0.3984033437f;
  965|       |
  966|  29.3M|          tmp_vr *= 0.3984033437f;
  967|  29.3M|          tmp_vi *= 0.3984033437f;
  968|       |
  969|  29.3M|          base1 = base + tmp_vr * tmp_vr;
  970|  29.3M|          base1 = base1 + tmp_vi * tmp_vi;
  971|       |
  972|  29.3M|          mag_scaling_fac = (FLOAT32)(ixheaac_cbrt_calc((FLOAT32)base1));
  ------------------
  |  |   25|  29.3M|#define ixheaac_cbrt_calc(a) cbrt(1.0f / a)
  ------------------
  973|       |
  974|  29.3M|          ptr_vec_x[2] = tmp_vr * mag_scaling_fac;
  975|  29.3M|          ptr_vec_x[3] = tmp_vi * mag_scaling_fac;
  976|       |
  977|  29.3M|          base1 = base + tmp_cr * tmp_cr;
  978|  29.3M|          base1 = base1 + tmp_ci * tmp_ci;
  979|       |
  980|  29.3M|          mag_scaling_fac = (FLOAT32)(ixheaac_cbrt_calc((FLOAT32)base1));
  ------------------
  |  |   25|  29.3M|#define ixheaac_cbrt_calc(a) cbrt(1.0f / a)
  ------------------
  981|       |
  982|  29.3M|          ptr_vec_x_cap[2] = tmp_cr * mag_scaling_fac;
  983|  29.3M|          ptr_vec_x_cap[3] = tmp_ci * mag_scaling_fac;
  984|       |
  985|  29.3M|          in_buf += 256;
  986|  29.3M|          in_buf1 += 256;
  987|  29.3M|          ptr_vec_x += 4;
  988|  29.3M|          ptr_vec_x_cap += 4;
  989|  29.3M|        }
  990|  7.34M|        ptr_vec_x = &vec_x[0];
  991|  7.34M|        ptr_vec_x_cap = &vec_x_cap[0];
  992|       |
  993|  7.34M|        temp_r = vec_x_cap[2 * (HBE_ZERO_BAND_IDX - 2)];
  ------------------
  |  |  204|  7.34M|#define HBE_ZERO_BAND_IDX 6
  ------------------
  994|  7.34M|        temp_i = vec_x_cap[2 * (HBE_ZERO_BAND_IDX - 2) + 1];
  ------------------
  |  |  204|  7.34M|#define HBE_ZERO_BAND_IDX 6
  ------------------
  995|  7.34M|        temp_r1 = vec_x[2 * (HBE_ZERO_BAND_IDX - 2)];
  ------------------
  |  |  204|  7.34M|#define HBE_ZERO_BAND_IDX 6
  ------------------
  996|  7.34M|        temp_i1 = vec_x[2 * (HBE_ZERO_BAND_IDX - 2) + 1];
  ------------------
  |  |  204|  7.34M|#define HBE_ZERO_BAND_IDX 6
  ------------------
  997|       |
  998|  7.34M|        x_zero_band_r = temp_r * temp_r - temp_i * temp_i;
  999|  7.34M|        x_zero_band_i = temp_r * temp_i + temp_i * temp_r;
 1000|       |
 1001|  7.34M|        temp_r = temp_r1 * temp_r1 - temp_i1 * temp_i1;
 1002|  7.34M|        temp_i = temp_r1 * temp_i1 + temp_i1 * temp_r1;
 1003|       |
 1004|  66.1M|        for (k = 0; k < (HBE_OPER_BLK_LEN_3); k++) {
  ------------------
  |  |  128|  66.1M|#define HBE_OPER_BLK_LEN_3 8
  ------------------
  |  Branch (1004:21): [True: 58.7M, False: 7.34M]
  ------------------
 1005|  58.7M|          temp_r1 = ptr_vec_x[0] * x_zero_band_r - ptr_vec_x[1] * x_zero_band_i;
 1006|  58.7M|          temp_i1 = ptr_vec_x[0] * x_zero_band_i + ptr_vec_x[1] * x_zero_band_r;
 1007|       |
 1008|  58.7M|          temp_r1 += ptr_vec_x_cap[0] * temp_r - ptr_vec_x_cap[1] * temp_i;
 1009|  58.7M|          temp_i1 += ptr_vec_x_cap[0] * temp_i + ptr_vec_x_cap[1] * temp_r;
 1010|       |
 1011|  58.7M|          out_buf[0] += (temp_r1 * 0.23570225f);
 1012|  58.7M|          out_buf[1] += (temp_i1 * 0.23570225f);
 1013|       |
 1014|  58.7M|          out_buf += 128;
 1015|  58.7M|          ptr_vec_x += 2;
 1016|  58.7M|          ptr_vec_x_cap += 2;
 1017|  58.7M|        }
 1018|       |
 1019|  7.34M|        in_buf -= 128 * 11;
 1020|  7.34M|        in_buf1 -= 128 * 11;
 1021|  7.34M|        out_buf -= 128 * 6;
 1022|  7.34M|      }
 1023|   421k|    }
 1024|       |
 1025|  1.28M|    out_buf -= (256 * qmf_voc_columns) - 2;
 1026|  1.28M|  }
 1027|   132k|}
ixheaacd_hbe_post_anal_prod4:
 1030|  82.6k|                                  WORD32 qmf_voc_columns, WORD32 qmf_band_idx) {
 1031|  82.6k|  WORD32 i, inp_band_idx;
 1032|  82.6k|  FLOAT32 *out_ptr = &ptr_hbe_txposer->qmf_out_buf[3][2 * qmf_band_idx];
 1033|       |
 1034|  82.6k|  ixheaacd_norm_qmf_in_buf_4(ptr_hbe_txposer, ((qmf_band_idx >> 1) - 1));
 1035|       |
 1036|   792k|  for (; qmf_band_idx < ptr_hbe_txposer->x_over_qmf[3]; qmf_band_idx++) {
  ------------------
  |  Branch (1036:10): [True: 709k, False: 82.6k]
  ------------------
 1037|   709k|    WORD32 ip_idx;
 1038|   709k|    FLOAT32 temp, temp_r, temp_i;
 1039|   709k|    FLOAT32 *norm_ptr, *x_norm_ptr;
 1040|   709k|    inp_band_idx = qmf_band_idx >> 1;
 1041|   709k|    ip_idx = (qmf_band_idx & 1) ? (inp_band_idx + 1) : (inp_band_idx - 1);
  ------------------
  |  Branch (1041:14): [True: 368k, False: 341k]
  ------------------
 1042|       |
 1043|   709k|    norm_ptr = &ptr_hbe_txposer->norm_qmf_in_buf[0][2 * ip_idx];
 1044|   709k|    x_norm_ptr =
 1045|   709k|        &ptr_hbe_txposer->norm_qmf_in_buf[HBE_ZERO_BAND_IDX][2 * inp_band_idx];
  ------------------
  |  |  204|   709k|#define HBE_ZERO_BAND_IDX 6
  ------------------
 1046|       |
 1047|  13.0M|    for (i = 0; i < qmf_voc_columns; i++) {
  ------------------
  |  Branch (1047:17): [True: 12.3M, False: 709k]
  ------------------
 1048|  12.3M|      WORD32 k;
 1049|  12.3M|      FLOAT32 x_zero_band_r, x_zero_band_i;
 1050|       |
 1051|  12.3M|      temp_r = x_zero_band_r = *x_norm_ptr++;
 1052|  12.3M|      temp_i = x_zero_band_i = *x_norm_ptr++;
 1053|       |
 1054|  12.3M|      temp = x_zero_band_r * x_zero_band_r - x_zero_band_i * x_zero_band_i;
 1055|  12.3M|      x_zero_band_i =
 1056|  12.3M|          x_zero_band_r * x_zero_band_i + x_zero_band_i * x_zero_band_r;
 1057|       |
 1058|  12.3M|      x_zero_band_r = temp_r * temp - temp_i * x_zero_band_i;
 1059|  12.3M|      x_zero_band_i = temp_r * x_zero_band_i + temp_i * temp;
 1060|       |
 1061|  86.3M|      for (k = 0; k < HBE_OPER_BLK_LEN_4; k++) {
  ------------------
  |  |  129|  86.3M|#define HBE_OPER_BLK_LEN_4 6
  ------------------
  |  Branch (1061:19): [True: 74.0M, False: 12.3M]
  ------------------
 1062|  74.0M|        temp = *norm_ptr++;
 1063|  74.0M|        temp_i = *norm_ptr++;
 1064|       |
 1065|  74.0M|        temp_r = temp * x_zero_band_r - temp_i * x_zero_band_i;
 1066|  74.0M|        temp_i = temp * x_zero_band_i + temp_i * x_zero_band_r;
 1067|       |
 1068|  74.0M|        *out_ptr++ += (temp_r * 0.6666667f);
 1069|  74.0M|        *out_ptr++ += (temp_i * 0.6666667f);
 1070|       |
 1071|  74.0M|        norm_ptr += 254;
 1072|  74.0M|        out_ptr += 126;
 1073|  74.0M|      }
 1074|       |
 1075|  12.3M|      norm_ptr -= 128 * 11;
 1076|  12.3M|      out_ptr -= 128 * 4;
 1077|  12.3M|      x_norm_ptr += 126;
 1078|  12.3M|    }
 1079|       |
 1080|   709k|    out_ptr -= (128 * 2 * qmf_voc_columns) - 2;
 1081|   709k|  }
 1082|  82.6k|}
ixheaacd_hbe_post_anal_xprod2:
 1086|  9.57k|                                   FLOAT32 p, FLOAT32 *cos_sin_theta) {
 1087|  9.57k|  WORD32 i;
 1088|  9.57k|  FLOAT32 *norm_ptr = &ptr_hbe_txposer->norm_qmf_in_buf[1][2 * qmf_band_idx];
 1089|  9.57k|  FLOAT32 *out_ptr = &ptr_hbe_txposer->qmf_out_buf[1][2 * qmf_band_idx];
 1090|  9.57k|  FLOAT32 *x_norm_ptr =
 1091|  9.57k|      &ptr_hbe_txposer->norm_qmf_in_buf[HBE_ZERO_BAND_IDX][2 * qmf_band_idx];
  ------------------
  |  |  204|  9.57k|#define HBE_ZERO_BAND_IDX 6
  ------------------
 1092|       |
 1093|  9.57k|  ixheaacd_norm_qmf_in_buf_2(ptr_hbe_txposer, qmf_band_idx);
 1094|       |
 1095|   128k|  for (; qmf_band_idx < ptr_hbe_txposer->x_over_qmf[1]; qmf_band_idx++) {
  ------------------
  |  Branch (1095:10): [True: 119k, False: 9.57k]
  ------------------
 1096|   119k|    WORD32 n1, n2;
 1097|   119k|    FLOAT64 temp_fac;
 1098|   119k|    FLOAT32 mag_cmplx_gain = 1.666666667f;
 1099|   119k|    temp_fac = (2.0 * qmf_band_idx + 1 - p) * 0.5;
 1100|   119k|    n1 = ((WORD32)(temp_fac)) << 1;
 1101|   119k|    n2 = ((WORD32)(temp_fac + p)) << 1;
 1102|       |
 1103|  2.11M|    for (i = 0; i < qmf_voc_columns; i++) {
  ------------------
  |  Branch (1103:17): [True: 1.99M, False: 119k]
  ------------------
 1104|  1.99M|      WORD32 k;
 1105|  1.99M|      FLOAT32 x_zero_band_r, x_zero_band_i;
 1106|       |
 1107|  1.99M|      x_zero_band_r = *x_norm_ptr++;
 1108|  1.99M|      x_zero_band_i = *x_norm_ptr++;
 1109|       |
 1110|  21.9M|      for (k = 1; k < (HBE_OPER_BLK_LEN_2 + 1); k++) {
  ------------------
  |  |  127|  21.9M|#define HBE_OPER_BLK_LEN_2 10
  ------------------
  |  Branch (1110:19): [True: 19.9M, False: 1.99M]
  ------------------
 1111|  19.9M|        register FLOAT32 tmp_r, tmp_i;
 1112|  19.9M|        tmp_r = *norm_ptr++;
 1113|  19.9M|        tmp_i = *norm_ptr++;
 1114|       |
 1115|  19.9M|        *out_ptr++ +=
 1116|  19.9M|            ((tmp_r * x_zero_band_r - tmp_i * x_zero_band_i) * 0.3333333f);
 1117|       |
 1118|  19.9M|        *out_ptr++ +=
 1119|  19.9M|            ((tmp_r * x_zero_band_i + tmp_i * x_zero_band_r) * 0.3333333f);
 1120|       |
 1121|  19.9M|        norm_ptr += 126;
 1122|  19.9M|        out_ptr += 126;
 1123|  19.9M|      }
 1124|  1.99M|      norm_ptr -= 128 * 9;
 1125|  1.99M|      out_ptr -= 128 * 8;
 1126|  1.99M|      x_norm_ptr += 126;
 1127|       |
 1128|  1.99M|      {
 1129|  1.99M|        WORD32 max_trans_fac, max_n1, max_n2;
 1130|  1.99M|        FLOAT32 max_mag_value;
 1131|  1.99M|        FLOAT32 mag_zero_band, mag_n1_band, mag_n2_band, temp;
 1132|       |
 1133|  1.99M|        FLOAT32 *qmf_in_buf_ri =
 1134|  1.99M|            ptr_hbe_txposer->qmf_in_buf[i + HBE_ZERO_BAND_IDX];
  ------------------
  |  |  204|  1.99M|#define HBE_ZERO_BAND_IDX 6
  ------------------
 1135|       |
 1136|  1.99M|        mag_zero_band =
 1137|  1.99M|            qmf_in_buf_ri[2 * qmf_band_idx] * qmf_in_buf_ri[2 * qmf_band_idx] +
 1138|  1.99M|            qmf_in_buf_ri[2 * qmf_band_idx + 1] *
 1139|  1.99M|                qmf_in_buf_ri[2 * qmf_band_idx + 1];
 1140|       |
 1141|  1.99M|        mag_n1_band = qmf_in_buf_ri[n1] * qmf_in_buf_ri[n1] +
 1142|  1.99M|                      qmf_in_buf_ri[n1 + 1] * qmf_in_buf_ri[n1 + 1];
 1143|  1.99M|        mag_n2_band = qmf_in_buf_ri[n2] * qmf_in_buf_ri[n2] +
 1144|  1.99M|                      qmf_in_buf_ri[n2 + 1] * qmf_in_buf_ri[n2 + 1];
 1145|       |
 1146|  1.99M|        temp = min(mag_n1_band, mag_n2_band);
  ------------------
  |  |   75|  1.99M|#define min(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (75:20): [True: 682k, False: 1.31M]
  |  |  ------------------
  ------------------
 1147|       |
 1148|  1.99M|        max_mag_value = 0;
 1149|  1.99M|        max_trans_fac = 0;
 1150|  1.99M|        max_n1 = 0;
 1151|  1.99M|        max_n2 = 0;
 1152|       |
 1153|  1.99M|        if (temp > 0) {
  ------------------
  |  Branch (1153:13): [True: 1.68M, False: 313k]
  ------------------
 1154|  1.68M|          max_mag_value = temp;
 1155|  1.68M|          max_trans_fac = 1;
 1156|  1.68M|          max_n1 = n1;
 1157|  1.68M|          max_n2 = n2;
 1158|  1.68M|        }
 1159|       |
 1160|  1.99M|        if (max_mag_value > mag_zero_band && max_n1 >= 0 &&
  ------------------
  |  Branch (1160:13): [True: 466k, False: 1.52M]
  |  Branch (1160:46): [True: 466k, False: 0]
  ------------------
 1161|   466k|            max_n2 < TWICE_QMF_SYNTH_CHANNELS_NUM) {
  ------------------
  |  |  110|   466k|#define TWICE_QMF_SYNTH_CHANNELS_NUM 128
  ------------------
  |  Branch (1161:13): [True: 466k, False: 0]
  ------------------
 1162|   466k|          FLOAT32 vec_y_r[2], vec_y_i[2];
 1163|   466k|          FLOAT32 temp_r, temp_i, tmp_r1;
 1164|   466k|          WORD32 mid_trans_fac, idx;
 1165|   466k|          FLOAT64 base;
 1166|   466k|          WORD32 k;
 1167|   466k|          FLOAT32 mag_scaling_fac = 0.0f;
 1168|   466k|          FLOAT32 x_zero_band_r = 0;
 1169|   466k|          FLOAT32 x_zero_band_i = 0;
 1170|       |
 1171|   466k|          mid_trans_fac = 2 - max_trans_fac;
 1172|       |
 1173|   466k|          x_zero_band_r = qmf_in_buf_ri[max_n1];
 1174|   466k|          x_zero_band_i = qmf_in_buf_ri[max_n1 + 1];
 1175|   466k|          base = 1e-17;
 1176|   466k|          base = base + x_zero_band_r * x_zero_band_r;
 1177|   466k|          base = base + x_zero_band_i * x_zero_band_i;
 1178|       |
 1179|   466k|          mag_scaling_fac = (FLOAT32)(1.0f / base);
 1180|   466k|          mag_scaling_fac = (FLOAT32)sqrt(sqrt(mag_scaling_fac));
 1181|       |
 1182|   466k|          x_zero_band_r *= mag_scaling_fac;
 1183|   466k|          x_zero_band_i *= mag_scaling_fac;
 1184|       |
 1185|   466k|          temp_r = x_zero_band_r;
 1186|   466k|          temp_i = x_zero_band_i;
 1187|   466k|          for (idx = 0; idx < mid_trans_fac - 1; idx++) {
  ------------------
  |  Branch (1187:25): [True: 0, False: 466k]
  ------------------
 1188|      0|            FLOAT32 tmp = x_zero_band_r;
 1189|      0|            x_zero_band_r = x_zero_band_r * temp_r - x_zero_band_i * temp_i;
 1190|      0|            x_zero_band_i = tmp * temp_i + x_zero_band_i * temp_r;
 1191|      0|          }
 1192|       |
 1193|  1.39M|          for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (1193:23): [True: 932k, False: 466k]
  ------------------
 1194|   932k|            temp_r = ptr_hbe_txposer
 1195|   932k|                         ->qmf_in_buf[i + HBE_ZERO_BAND_IDX - 1 + k][max_n2];
  ------------------
  |  |  204|   932k|#define HBE_ZERO_BAND_IDX 6
  ------------------
 1196|   932k|            temp_i =
 1197|   932k|                ptr_hbe_txposer
 1198|   932k|                    ->qmf_in_buf[i + HBE_ZERO_BAND_IDX - 1 + k][max_n2 + 1];
  ------------------
  |  |  204|   932k|#define HBE_ZERO_BAND_IDX 6
  ------------------
 1199|       |
 1200|   932k|            base = 1e-17;
 1201|   932k|            base = base + temp_r * temp_r;
 1202|   932k|            base = base + temp_i * temp_i;
 1203|       |
 1204|   932k|            mag_scaling_fac = (FLOAT32)(1.0f / base);
 1205|   932k|            mag_scaling_fac = (FLOAT32)sqrt(sqrt(mag_scaling_fac));
 1206|       |
 1207|   932k|            temp_r *= mag_scaling_fac;
 1208|   932k|            temp_i *= mag_scaling_fac;
 1209|       |
 1210|   932k|            vec_y_r[k] = temp_r;
 1211|   932k|            vec_y_i[k] = temp_i;
 1212|   932k|          }
 1213|       |
 1214|   466k|          temp_r = vec_y_r[0] * x_zero_band_r - vec_y_i[0] * x_zero_band_i;
 1215|   466k|          temp_i = vec_y_r[0] * x_zero_band_i + vec_y_i[0] * x_zero_band_r;
 1216|       |
 1217|   466k|          tmp_r1 =
 1218|   466k|              (FLOAT32)(cos_sin_theta[0] * temp_r - cos_sin_theta[1] * temp_i);
 1219|   466k|          temp_i =
 1220|   466k|              (FLOAT32)(cos_sin_theta[0] * temp_i + cos_sin_theta[1] * temp_r);
 1221|       |
 1222|   466k|          ptr_hbe_txposer->qmf_out_buf[i * 2 + (HBE_ZERO_BAND_IDX - 1)]
  ------------------
  |  |  204|   466k|#define HBE_ZERO_BAND_IDX 6
  ------------------
 1223|   466k|                                      [2 * qmf_band_idx] +=
 1224|   466k|              (FLOAT32)(mag_cmplx_gain * tmp_r1);
 1225|       |
 1226|   466k|          ptr_hbe_txposer->qmf_out_buf[i * 2 + (HBE_ZERO_BAND_IDX - 1)]
  ------------------
  |  |  204|   466k|#define HBE_ZERO_BAND_IDX 6
  ------------------
 1227|   466k|                                      [2 * qmf_band_idx + 1] +=
 1228|   466k|              (FLOAT32)(mag_cmplx_gain * temp_i);
 1229|       |
 1230|   466k|          temp_r = vec_y_r[1] * x_zero_band_r - vec_y_i[1] * x_zero_band_i;
 1231|   466k|          temp_i = vec_y_r[1] * x_zero_band_i + vec_y_i[1] * x_zero_band_r;
 1232|       |
 1233|   466k|          ptr_hbe_txposer->qmf_out_buf[i * 2 + (1 + HBE_ZERO_BAND_IDX - 1)]
  ------------------
  |  |  204|   466k|#define HBE_ZERO_BAND_IDX 6
  ------------------
 1234|   466k|                                      [2 * qmf_band_idx] +=
 1235|   466k|              (FLOAT32)(mag_cmplx_gain * temp_r);
 1236|       |
 1237|   466k|          ptr_hbe_txposer->qmf_out_buf[i * 2 + (1 + HBE_ZERO_BAND_IDX - 1)]
  ------------------
  |  |  204|   466k|#define HBE_ZERO_BAND_IDX 6
  ------------------
 1238|   466k|                                      [2 * qmf_band_idx + 1] +=
 1239|   466k|              (FLOAT32)(mag_cmplx_gain * temp_i);
 1240|   466k|        }
 1241|  1.99M|      }
 1242|  1.99M|    }
 1243|       |
 1244|   119k|    out_ptr -= (128 * 2 * qmf_voc_columns) - 2;
 1245|   119k|    norm_ptr -= (128 * qmf_voc_columns) - 2;
 1246|   119k|    x_norm_ptr -= (128 * qmf_voc_columns) - 2;
 1247|   119k|  }
 1248|  9.57k|}
ixheaacd_hbe_post_anal_xprod3:
 1252|  7.73k|                                   FLOAT32 p, WORD32 pitch_in_bins_idx) {
 1253|  7.73k|  WORD32 i, inp_band_idx, rem;
 1254|       |
 1255|  7.73k|  FLOAT32 *out_buf = &ptr_hbe_txposer->qmf_out_buf[2][2 * qmf_band_idx];
 1256|       |
 1257|  79.6k|  for (; qmf_band_idx < ptr_hbe_txposer->x_over_qmf[2]; qmf_band_idx++) {
  ------------------
  |  Branch (1257:10): [True: 71.9k, False: 7.73k]
  ------------------
 1258|  71.9k|    FLOAT32 temp_r, temp_i;
 1259|  71.9k|    FLOAT32 temp_r1, temp_i1;
 1260|  71.9k|    const FLOAT32 *ptr_sel, *ptr_sel1;
 1261|       |
 1262|  71.9k|    inp_band_idx = (2 * qmf_band_idx) / 3;
 1263|  71.9k|    ptr_sel = &ixheaac_sel_case[(inp_band_idx + 1) & 3][0];
 1264|  71.9k|    ptr_sel1 = &ixheaac_sel_case[((inp_band_idx + 1) & 3) + 1][0];
 1265|  71.9k|    rem = 2 * qmf_band_idx - 3 * inp_band_idx;
 1266|       |
 1267|  71.9k|    if (rem == 0 || rem == 1) {
  ------------------
  |  Branch (1267:9): [True: 23.7k, False: 48.2k]
  |  Branch (1267:21): [True: 24.6k, False: 23.5k]
  ------------------
 1268|  48.3k|      FLOAT32 *in_buf = &ptr_hbe_txposer->qmf_in_buf[0][2 * inp_band_idx];
 1269|       |
 1270|   868k|      for (i = 0; i < qmf_voc_columns; i += 1) {
  ------------------
  |  Branch (1270:19): [True: 819k, False: 48.3k]
  ------------------
 1271|   819k|        WORD32 k;
 1272|   819k|        FLOAT32 vec_x[2 * HBE_OPER_WIN_LEN];
 1273|   819k|        FLOAT32 *ptr_vec_x = &vec_x[0];
 1274|   819k|        FLOAT32 x_zero_band_r, x_zero_band_i;
 1275|       |
 1276|   819k|        FLOAT32 mag_scaling_fac;
 1277|       |
 1278|  4.09M|        for (k = 0; k < (HBE_OPER_BLK_LEN_3); k += 2) {
  ------------------
  |  |  128|  4.09M|#define HBE_OPER_BLK_LEN_3 8
  ------------------
  |  Branch (1278:21): [True: 3.27M, False: 819k]
  ------------------
 1279|  3.27M|          FLOAT64 base1;
 1280|  3.27M|          FLOAT64 base = 1e-17;
 1281|       |
 1282|  3.27M|          temp_r = in_buf[0];
 1283|  3.27M|          temp_i = in_buf[1];
 1284|       |
 1285|  3.27M|          in_buf += 256;
 1286|       |
 1287|  3.27M|          base1 = base + temp_r * temp_r;
 1288|  3.27M|          base1 = base1 + temp_i * temp_i;
 1289|       |
 1290|  3.27M|          mag_scaling_fac = (FLOAT32)(ixheaac_cbrt_calc((FLOAT32)base1));
  ------------------
  |  |   25|  3.27M|#define ixheaac_cbrt_calc(a) cbrt(1.0f / a)
  ------------------
 1291|       |
 1292|  3.27M|          ptr_vec_x[0] = temp_r * mag_scaling_fac;
 1293|  3.27M|          ptr_vec_x[1] = temp_i * mag_scaling_fac;
 1294|       |
 1295|  3.27M|          temp_r = in_buf[0];
 1296|  3.27M|          temp_i = in_buf[1];
 1297|       |
 1298|  3.27M|          in_buf -= 128;
 1299|       |
 1300|  3.27M|          temp_r1 = ptr_sel[0] * temp_r + ptr_sel[1] * temp_i;
 1301|  3.27M|          temp_i1 = ptr_sel[2] * temp_r + ptr_sel[3] * temp_i;
 1302|       |
 1303|  3.27M|          temp_r = in_buf[0];
 1304|  3.27M|          temp_i = in_buf[1];
 1305|       |
 1306|  3.27M|          temp_r1 += ptr_sel[4] * temp_r + ptr_sel[5] * temp_i;
 1307|  3.27M|          temp_i1 += ptr_sel[6] * temp_r + ptr_sel[7] * temp_i;
 1308|       |
 1309|  3.27M|          temp_r1 *= 0.3984033437f;
 1310|  3.27M|          temp_i1 *= 0.3984033437f;
 1311|       |
 1312|  3.27M|          base1 = base + temp_r1 * temp_r1;
 1313|  3.27M|          base1 = base1 + temp_i1 * temp_i1;
 1314|  3.27M|          mag_scaling_fac = (FLOAT32)(ixheaac_cbrt_calc((FLOAT32)base1));
  ------------------
  |  |   25|  3.27M|#define ixheaac_cbrt_calc(a) cbrt(1.0f / a)
  ------------------
 1315|       |
 1316|  3.27M|          ptr_vec_x[2] = temp_r1 * mag_scaling_fac;
 1317|  3.27M|          ptr_vec_x[3] = temp_i1 * mag_scaling_fac;
 1318|       |
 1319|  3.27M|          ptr_vec_x += 4;
 1320|  3.27M|          in_buf += 256;
 1321|  3.27M|        }
 1322|   819k|        ptr_vec_x = &vec_x[0];
 1323|   819k|        temp_r = vec_x[2 * (HBE_ZERO_BAND_IDX - 2)];
  ------------------
  |  |  204|   819k|#define HBE_ZERO_BAND_IDX 6
  ------------------
 1324|   819k|        temp_i = vec_x[(2 * (HBE_ZERO_BAND_IDX - 2)) + 1];
  ------------------
  |  |  204|   819k|#define HBE_ZERO_BAND_IDX 6
  ------------------
 1325|       |
 1326|   819k|        x_zero_band_r = temp_r * temp_r - temp_i * temp_i;
 1327|   819k|        x_zero_band_i = temp_r * temp_i + temp_i * temp_r;
 1328|       |
 1329|  7.37M|        for (k = 0; k < (HBE_OPER_BLK_LEN_3); k++) {
  ------------------
  |  |  128|  7.37M|#define HBE_OPER_BLK_LEN_3 8
  ------------------
  |  Branch (1329:21): [True: 6.55M, False: 819k]
  ------------------
 1330|  6.55M|          temp_r = ptr_vec_x[0] * x_zero_band_r - ptr_vec_x[1] * x_zero_band_i;
 1331|  6.55M|          temp_i = ptr_vec_x[0] * x_zero_band_i + ptr_vec_x[1] * x_zero_band_r;
 1332|       |
 1333|  6.55M|          out_buf[0] += (temp_r * 0.4714045f);
 1334|  6.55M|          out_buf[1] += (temp_i * 0.4714045f);
 1335|       |
 1336|  6.55M|          ptr_vec_x += 2;
 1337|  6.55M|          out_buf += 128;
 1338|  6.55M|        }
 1339|       |
 1340|   819k|        ixheaacd_hbe_xprod_proc_3(ptr_hbe_txposer, qmf_band_idx, i, p,
 1341|   819k|                                  pitch_in_bins_idx);
 1342|       |
 1343|   819k|        in_buf -= 128 * 11;
 1344|   819k|        out_buf -= 128 * 6;
 1345|   819k|      }
 1346|  48.3k|    } else {
 1347|  23.5k|      FLOAT32 *in_buf = &ptr_hbe_txposer->qmf_in_buf[0][2 * inp_band_idx];
 1348|  23.5k|      FLOAT32 *in_buf1 =
 1349|  23.5k|          &ptr_hbe_txposer->qmf_in_buf[0][2 * (inp_band_idx + 1)];
 1350|       |
 1351|   427k|      for (i = 0; i < qmf_voc_columns; i++) {
  ------------------
  |  Branch (1351:19): [True: 404k, False: 23.5k]
  ------------------
 1352|   404k|        WORD32 k;
 1353|   404k|        FLOAT32 vec_x[2 * HBE_OPER_WIN_LEN];
 1354|   404k|        FLOAT32 vec_x_cap[2 * HBE_OPER_WIN_LEN];
 1355|       |
 1356|   404k|        FLOAT32 x_zero_band_r, x_zero_band_i;
 1357|   404k|        FLOAT32 *ptr_vec_x = &vec_x[0];
 1358|   404k|        FLOAT32 *ptr_vec_x_cap = &vec_x_cap[0];
 1359|       |
 1360|   404k|        FLOAT32 mag_scaling_fac;
 1361|       |
 1362|  2.02M|        for (k = 0; k < (HBE_OPER_BLK_LEN_3); k += 2) {
  ------------------
  |  |  128|  2.02M|#define HBE_OPER_BLK_LEN_3 8
  ------------------
  |  Branch (1362:21): [True: 1.61M, False: 404k]
  ------------------
 1363|  1.61M|          FLOAT32 tmp_vr, tmp_vi;
 1364|  1.61M|          FLOAT32 tmp_cr, tmp_ci;
 1365|  1.61M|          FLOAT64 base1;
 1366|  1.61M|          FLOAT64 base = 1e-17;
 1367|       |
 1368|  1.61M|          temp_r1 = in_buf[0];
 1369|  1.61M|          temp_i1 = in_buf[1];
 1370|  1.61M|          temp_r = in_buf1[0];
 1371|  1.61M|          temp_i = in_buf1[1];
 1372|       |
 1373|  1.61M|          base1 = base + temp_r * temp_r;
 1374|  1.61M|          base1 = base1 + temp_i * temp_i;
 1375|       |
 1376|  1.61M|          mag_scaling_fac = (FLOAT32)(ixheaac_cbrt_calc((FLOAT32)base1));
  ------------------
  |  |   25|  1.61M|#define ixheaac_cbrt_calc(a) cbrt(1.0f / a)
  ------------------
 1377|       |
 1378|  1.61M|          ptr_vec_x[0] = temp_r * mag_scaling_fac;
 1379|  1.61M|          ptr_vec_x[1] = temp_i * mag_scaling_fac;
 1380|       |
 1381|  1.61M|          base1 = base + temp_r1 * temp_r1;
 1382|  1.61M|          base1 = base1 + temp_i1 * temp_i1;
 1383|       |
 1384|  1.61M|          mag_scaling_fac = (FLOAT32)(ixheaac_cbrt_calc((FLOAT32)base1));
  ------------------
  |  |   25|  1.61M|#define ixheaac_cbrt_calc(a) cbrt(1.0f / a)
  ------------------
 1385|       |
 1386|  1.61M|          ptr_vec_x_cap[0] = temp_r1 * mag_scaling_fac;
 1387|  1.61M|          ptr_vec_x_cap[1] = temp_i1 * mag_scaling_fac;
 1388|       |
 1389|  1.61M|          in_buf += 256;
 1390|       |
 1391|  1.61M|          temp_r = in_buf[0];
 1392|  1.61M|          temp_i = in_buf[1];
 1393|       |
 1394|  1.61M|          temp_r1 = ptr_sel[0] * temp_r + ptr_sel[1] * temp_i;
 1395|  1.61M|          temp_i1 = ptr_sel[2] * temp_r + ptr_sel[3] * temp_i;
 1396|       |
 1397|  1.61M|          in_buf -= 128;
 1398|       |
 1399|  1.61M|          temp_r = in_buf[0];
 1400|  1.61M|          temp_i = in_buf[1];
 1401|       |
 1402|  1.61M|          tmp_cr = temp_r1 + ptr_sel[4] * temp_r + ptr_sel[5] * temp_i;
 1403|  1.61M|          tmp_ci = temp_i1 + ptr_sel[6] * temp_r + ptr_sel[7] * temp_i;
 1404|       |
 1405|  1.61M|          in_buf1 += 256;
 1406|       |
 1407|  1.61M|          temp_r = in_buf1[0];
 1408|  1.61M|          temp_i = in_buf1[1];
 1409|       |
 1410|  1.61M|          temp_r1 = ptr_sel1[0] * temp_r + ptr_sel1[1] * temp_i;
 1411|  1.61M|          temp_i1 = ptr_sel1[2] * temp_r + ptr_sel1[3] * temp_i;
 1412|       |
 1413|  1.61M|          in_buf1 -= 128;
 1414|       |
 1415|  1.61M|          temp_r = in_buf1[0];
 1416|  1.61M|          temp_i = in_buf1[1];
 1417|       |
 1418|  1.61M|          tmp_vr = temp_r1 + ptr_sel1[4] * temp_r + ptr_sel1[5] * temp_i;
 1419|  1.61M|          tmp_vi = temp_i1 + ptr_sel1[6] * temp_r + ptr_sel1[7] * temp_i;
 1420|       |
 1421|  1.61M|          tmp_cr *= 0.3984033437f;
 1422|  1.61M|          tmp_ci *= 0.3984033437f;
 1423|       |
 1424|  1.61M|          tmp_vr *= 0.3984033437f;
 1425|  1.61M|          tmp_vi *= 0.3984033437f;
 1426|       |
 1427|  1.61M|          base1 = base + tmp_vr * tmp_vr;
 1428|  1.61M|          base1 = base1 + tmp_vi * tmp_vi;
 1429|       |
 1430|  1.61M|          mag_scaling_fac = (FLOAT32)(ixheaac_cbrt_calc((FLOAT32)base1));
  ------------------
  |  |   25|  1.61M|#define ixheaac_cbrt_calc(a) cbrt(1.0f / a)
  ------------------
 1431|       |
 1432|  1.61M|          ptr_vec_x[2] = tmp_vr * mag_scaling_fac;
 1433|  1.61M|          ptr_vec_x[3] = tmp_vi * mag_scaling_fac;
 1434|       |
 1435|  1.61M|          base1 = base + tmp_cr * tmp_cr;
 1436|  1.61M|          base1 = base1 + tmp_ci * tmp_ci;
 1437|       |
 1438|  1.61M|          mag_scaling_fac = (FLOAT32)(ixheaac_cbrt_calc((FLOAT32)base1));
  ------------------
  |  |   25|  1.61M|#define ixheaac_cbrt_calc(a) cbrt(1.0f / a)
  ------------------
 1439|       |
 1440|  1.61M|          ptr_vec_x_cap[2] = tmp_cr * mag_scaling_fac;
 1441|  1.61M|          ptr_vec_x_cap[3] = tmp_ci * mag_scaling_fac;
 1442|       |
 1443|  1.61M|          in_buf += 256;
 1444|  1.61M|          in_buf1 += 256;
 1445|  1.61M|          ptr_vec_x += 4;
 1446|  1.61M|          ptr_vec_x_cap += 4;
 1447|  1.61M|        }
 1448|   404k|        ptr_vec_x = &vec_x[0];
 1449|   404k|        ptr_vec_x_cap = &vec_x_cap[0];
 1450|       |
 1451|   404k|        temp_r = vec_x_cap[2 * (HBE_ZERO_BAND_IDX - 2)];
  ------------------
  |  |  204|   404k|#define HBE_ZERO_BAND_IDX 6
  ------------------
 1452|   404k|        temp_i = vec_x_cap[2 * (HBE_ZERO_BAND_IDX - 2) + 1];
  ------------------
  |  |  204|   404k|#define HBE_ZERO_BAND_IDX 6
  ------------------
 1453|   404k|        temp_r1 = vec_x[2 * (HBE_ZERO_BAND_IDX - 2)];
  ------------------
  |  |  204|   404k|#define HBE_ZERO_BAND_IDX 6
  ------------------
 1454|   404k|        temp_i1 = vec_x[2 * (HBE_ZERO_BAND_IDX - 2) + 1];
  ------------------
  |  |  204|   404k|#define HBE_ZERO_BAND_IDX 6
  ------------------
 1455|       |
 1456|   404k|        x_zero_band_r = temp_r * temp_r - temp_i * temp_i;
 1457|   404k|        x_zero_band_i = temp_r * temp_i + temp_i * temp_r;
 1458|       |
 1459|   404k|        temp_r = temp_r1 * temp_r1 - temp_i1 * temp_i1;
 1460|   404k|        temp_i = temp_r1 * temp_i1 + temp_i1 * temp_r1;
 1461|       |
 1462|  3.63M|        for (k = 0; k < (HBE_OPER_BLK_LEN_3); k++) {
  ------------------
  |  |  128|  3.63M|#define HBE_OPER_BLK_LEN_3 8
  ------------------
  |  Branch (1462:21): [True: 3.23M, False: 404k]
  ------------------
 1463|  3.23M|          temp_r1 = ptr_vec_x[0] * x_zero_band_r - ptr_vec_x[1] * x_zero_band_i;
 1464|  3.23M|          temp_i1 = ptr_vec_x[0] * x_zero_band_i + ptr_vec_x[1] * x_zero_band_r;
 1465|       |
 1466|  3.23M|          temp_r1 += ptr_vec_x_cap[0] * temp_r - ptr_vec_x_cap[1] * temp_i;
 1467|  3.23M|          temp_i1 += ptr_vec_x_cap[0] * temp_i + ptr_vec_x_cap[1] * temp_r;
 1468|       |
 1469|  3.23M|          out_buf[0] += (temp_r1 * 0.23570225f);
 1470|  3.23M|          out_buf[1] += (temp_i1 * 0.23570225f);
 1471|       |
 1472|  3.23M|          out_buf += 128;
 1473|  3.23M|          ptr_vec_x += 2;
 1474|  3.23M|          ptr_vec_x_cap += 2;
 1475|  3.23M|        }
 1476|       |
 1477|   404k|        ixheaacd_hbe_xprod_proc_3(ptr_hbe_txposer, qmf_band_idx, i, p,
 1478|   404k|                                  pitch_in_bins_idx);
 1479|       |
 1480|   404k|        in_buf -= 128 * 11;
 1481|   404k|        in_buf1 -= 128 * 11;
 1482|   404k|        out_buf -= 128 * 6;
 1483|   404k|      }
 1484|  23.5k|    }
 1485|       |
 1486|  71.9k|    out_buf -= (256 * qmf_voc_columns) - 2;
 1487|  71.9k|  }
 1488|  7.73k|}
ixheaacd_hbe_post_anal_xprod4:
 1492|  5.73k|                                   FLOAT32 p, WORD32 pitch_in_bins_idx) {
 1493|  5.73k|  WORD32 i, inp_band_idx;
 1494|  5.73k|  FLOAT32 *out_ptr = &ptr_hbe_txposer->qmf_out_buf[3][2 * qmf_band_idx];
 1495|       |
 1496|  5.73k|  ixheaacd_norm_qmf_in_buf_4(ptr_hbe_txposer, ((qmf_band_idx >> 1) - 1));
 1497|       |
 1498|  53.9k|  for (; qmf_band_idx < ptr_hbe_txposer->x_over_qmf[3]; qmf_band_idx++) {
  ------------------
  |  Branch (1498:10): [True: 48.1k, False: 5.73k]
  ------------------
 1499|  48.1k|    WORD32 ip_idx;
 1500|  48.1k|    FLOAT32 temp, temp_r, temp_i;
 1501|  48.1k|    FLOAT32 *norm_ptr, *x_norm_ptr;
 1502|  48.1k|    inp_band_idx = qmf_band_idx >> 1;
 1503|  48.1k|    ip_idx = (qmf_band_idx & 1) ? (inp_band_idx + 1) : (inp_band_idx - 1);
  ------------------
  |  Branch (1503:14): [True: 25.6k, False: 22.5k]
  ------------------
 1504|       |
 1505|  48.1k|    norm_ptr = &ptr_hbe_txposer->norm_qmf_in_buf[0][2 * ip_idx];
 1506|  48.1k|    x_norm_ptr =
 1507|  48.1k|        &ptr_hbe_txposer->norm_qmf_in_buf[HBE_ZERO_BAND_IDX][2 * inp_band_idx];
  ------------------
  |  |  204|  48.1k|#define HBE_ZERO_BAND_IDX 6
  ------------------
 1508|       |
 1509|   839k|    for (i = 0; i < qmf_voc_columns; i++) {
  ------------------
  |  Branch (1509:17): [True: 791k, False: 48.1k]
  ------------------
 1510|   791k|      WORD32 k;
 1511|   791k|      FLOAT32 x_zero_band_r, x_zero_band_i;
 1512|       |
 1513|   791k|      temp_r = x_zero_band_r = *x_norm_ptr++;
 1514|   791k|      temp_i = x_zero_band_i = *x_norm_ptr++;
 1515|       |
 1516|   791k|      temp = x_zero_band_r * x_zero_band_r - x_zero_band_i * x_zero_band_i;
 1517|   791k|      x_zero_band_i =
 1518|   791k|          x_zero_band_r * x_zero_band_i + x_zero_band_i * x_zero_band_r;
 1519|       |
 1520|   791k|      x_zero_band_r = temp_r * temp - temp_i * x_zero_band_i;
 1521|   791k|      x_zero_band_i = temp_r * x_zero_band_i + temp_i * temp;
 1522|       |
 1523|  5.53M|      for (k = 0; k < HBE_OPER_BLK_LEN_4; k++) {
  ------------------
  |  |  129|  5.53M|#define HBE_OPER_BLK_LEN_4 6
  ------------------
  |  Branch (1523:19): [True: 4.74M, False: 791k]
  ------------------
 1524|  4.74M|        temp = *norm_ptr++;
 1525|  4.74M|        temp_i = *norm_ptr++;
 1526|       |
 1527|  4.74M|        temp_r = temp * x_zero_band_r - temp_i * x_zero_band_i;
 1528|  4.74M|        temp_i = temp * x_zero_band_i + temp_i * x_zero_band_r;
 1529|       |
 1530|  4.74M|        *out_ptr++ += (temp_r * 0.6666667f);
 1531|  4.74M|        *out_ptr++ += (temp_i * 0.6666667f);
 1532|       |
 1533|  4.74M|        norm_ptr += 254;
 1534|  4.74M|        out_ptr += 126;
 1535|  4.74M|      }
 1536|       |
 1537|   791k|      norm_ptr -= 128 * 11;
 1538|   791k|      out_ptr -= 128 * 4;
 1539|   791k|      x_norm_ptr += 126;
 1540|       |
 1541|   791k|      ixheaacd_hbe_xprod_proc_4(ptr_hbe_txposer, qmf_band_idx, i, p,
 1542|   791k|                                pitch_in_bins_idx);
 1543|   791k|    }
 1544|       |
 1545|  48.1k|    out_ptr -= (128 * 2 * qmf_voc_columns) - 2;
 1546|  48.1k|  }
 1547|  5.73k|}
ixheaacd_hbe_post_anal_process:
 1551|   237k|    WORD32 sbr_upsamp_4_flg) {
 1552|   237k|  FLOAT32 p;
 1553|   237k|  WORD32 trans_fac;
 1554|   237k|  WORD32 qmf_voc_columns = ptr_hbe_txposer->no_bins / 2;
 1555|   237k|  FLOAT32 cos_sin_theta[2];
 1556|       |
 1557|   237k|  p = (sbr_upsamp_4_flg) ? (FLOAT32)(pitch_in_bins * 0.04166666666666)
  ------------------
  |  Branch (1557:7): [True: 32.7k, False: 204k]
  ------------------
 1558|   237k|                         : (FLOAT32)(pitch_in_bins * 0.08333333333333);
 1559|       |
 1560|   237k|  if (p < SBR_CONST_PMIN) {
  ------------------
  |  |   69|   237k|#define SBR_CONST_PMIN 1.0f
  ------------------
  |  Branch (1560:7): [True: 227k, False: 10.1k]
  ------------------
 1561|   227k|    trans_fac = 2;
 1562|   227k|    if (trans_fac <= ptr_hbe_txposer->max_stretch)
  ------------------
  |  Branch (1562:9): [True: 211k, False: 15.1k]
  ------------------
 1563|   211k|      ixheaacd_hbe_post_anal_prod2(ptr_hbe_txposer, qmf_voc_columns,
 1564|   211k|                                   ptr_hbe_txposer->x_over_qmf[0]);
 1565|       |
 1566|   227k|    trans_fac = 3;
 1567|   227k|    if (trans_fac <= ptr_hbe_txposer->max_stretch)
  ------------------
  |  Branch (1567:9): [True: 132k, False: 94.8k]
  ------------------
 1568|   132k|      ixheaacd_hbe_post_anal_prod3(ptr_hbe_txposer, qmf_voc_columns,
 1569|   132k|                                   ptr_hbe_txposer->x_over_qmf[1]);
 1570|       |
 1571|   227k|    trans_fac = 4;
 1572|   227k|    if (trans_fac <= ptr_hbe_txposer->max_stretch) {
  ------------------
  |  Branch (1572:9): [True: 82.6k, False: 144k]
  ------------------
 1573|  82.6k|      if (ptr_hbe_txposer->x_over_qmf[2] <= 1) return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
  |  Branch (1573:11): [True: 0, False: 82.6k]
  ------------------
 1574|  82.6k|      ixheaacd_hbe_post_anal_prod4(ptr_hbe_txposer, qmf_voc_columns,
 1575|  82.6k|                                   ptr_hbe_txposer->x_over_qmf[2]);
 1576|  82.6k|    }
 1577|       |
 1578|   227k|  } else {
 1579|  10.1k|    trans_fac = 2;
 1580|  10.1k|    if (trans_fac <= ptr_hbe_txposer->max_stretch) {
  ------------------
  |  Branch (1580:9): [True: 9.57k, False: 587]
  ------------------
 1581|  9.57k|      cos_sin_theta[0] = ixheaac_hbe_x_prod_cos_table_trans_2
 1582|  9.57k|          [((pitch_in_bins + sbr_upsamp_4_flg * 128) << 1) + 0];
 1583|  9.57k|      cos_sin_theta[1] = ixheaac_hbe_x_prod_cos_table_trans_2
 1584|  9.57k|          [((pitch_in_bins + sbr_upsamp_4_flg * 128) << 1) + 1];
 1585|       |
 1586|  9.57k|      ixheaacd_hbe_post_anal_xprod2(ptr_hbe_txposer, qmf_voc_columns,
 1587|  9.57k|                                    ptr_hbe_txposer->x_over_qmf[0], p,
 1588|  9.57k|                                    cos_sin_theta);
 1589|  9.57k|    }
 1590|       |
 1591|  10.1k|    trans_fac = 3;
 1592|  10.1k|    if (trans_fac <= ptr_hbe_txposer->max_stretch)
  ------------------
  |  Branch (1592:9): [True: 7.73k, False: 2.42k]
  ------------------
 1593|  7.73k|      ixheaacd_hbe_post_anal_xprod3(ptr_hbe_txposer, qmf_voc_columns,
 1594|  7.73k|                                    ptr_hbe_txposer->x_over_qmf[1], p,
 1595|  7.73k|                                    (pitch_in_bins + sbr_upsamp_4_flg * 128));
 1596|       |
 1597|  10.1k|    trans_fac = 4;
 1598|  10.1k|    if (trans_fac <= ptr_hbe_txposer->max_stretch) {
  ------------------
  |  Branch (1598:9): [True: 5.73k, False: 4.41k]
  ------------------
 1599|  5.73k|      if (ptr_hbe_txposer->x_over_qmf[2] <= 1) return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
  |  Branch (1599:11): [True: 0, False: 5.73k]
  ------------------
 1600|  5.73k|      ixheaacd_hbe_post_anal_xprod4(ptr_hbe_txposer, qmf_voc_columns,
 1601|  5.73k|                                    ptr_hbe_txposer->x_over_qmf[2], p,
 1602|  5.73k|                                    (pitch_in_bins + sbr_upsamp_4_flg * 128));
 1603|  5.73k|    }
 1604|  10.1k|  }
 1605|   237k|  return IA_NO_ERROR;
  ------------------
  |  |   23|   237k|#define IA_NO_ERROR 0x00000000
  ------------------
 1606|   237k|}
ixheaacd_hbe_trans.c:ixheaacd_map_prot_filter:
   71|   123k|static FLOAT32 *ixheaacd_map_prot_filter(WORD32 filt_length) {
   72|   123k|  switch (filt_length) {
   73|     90|    case 4:
  ------------------
  |  Branch (73:5): [True: 90, False: 123k]
  ------------------
   74|     90|      return (FLOAT32 *)&ixheaac_sub_samp_qmf_window_coeff[0];
   75|      0|      break;
   76|  11.3k|    case 8:
  ------------------
  |  Branch (76:5): [True: 11.3k, False: 112k]
  ------------------
   77|  11.3k|      return (FLOAT32 *)&ixheaac_sub_samp_qmf_window_coeff[40];
   78|      0|      break;
   79|  18.2k|    case 12:
  ------------------
  |  Branch (79:5): [True: 18.2k, False: 105k]
  ------------------
   80|  18.2k|      return (FLOAT32 *)&ixheaac_sub_samp_qmf_window_coeff[120];
   81|      0|      break;
   82|  18.2k|    case 16:
  ------------------
  |  Branch (82:5): [True: 18.2k, False: 105k]
  ------------------
   83|  18.2k|      return (FLOAT32 *)&ixheaac_sub_samp_qmf_window_coeff[240];
   84|      0|      break;
   85|  25.2k|    case 20:
  ------------------
  |  Branch (85:5): [True: 25.2k, False: 98.4k]
  ------------------
   86|  25.2k|      return (FLOAT32 *)&ixheaac_sub_samp_qmf_window_coeff[400];
   87|      0|      break;
   88|  18.2k|    case 24:
  ------------------
  |  Branch (88:5): [True: 18.2k, False: 105k]
  ------------------
   89|  18.2k|      return (FLOAT32 *)&ixheaac_sub_samp_qmf_window_coeff[600];
   90|      0|      break;
   91|  7.03k|    case 32:
  ------------------
  |  Branch (91:5): [True: 7.03k, False: 116k]
  ------------------
   92|  7.03k|      return (FLOAT32 *)&ixheaac_sub_samp_qmf_window_coeff[840];
   93|      0|      break;
   94|  25.2k|    case 40:
  ------------------
  |  Branch (94:5): [True: 25.2k, False: 98.4k]
  ------------------
   95|  25.2k|      return (FLOAT32 *)&ixheaac_sub_samp_qmf_window_coeff[1160];
   96|      0|      break;
   97|      0|    default:
  ------------------
  |  Branch (97:5): [True: 0, False: 123k]
  ------------------
   98|      0|      return (FLOAT32 *)&ixheaac_sub_samp_qmf_window_coeff[0];
   99|   123k|  }
  100|   123k|}

ixheaacd_read_pce_channel_info:
  118|  9.39k|                                      struct ia_bit_buf_struct *it_bit_buff) {
  119|  9.39k|  WORD32 num_ch = 0, i, tmp;
  120|  28.5k|  for (i = 0; i < ch; i++) {
  ------------------
  |  Branch (120:15): [True: 19.1k, False: 9.39k]
  ------------------
  121|  19.1k|    tmp = ixheaacd_read_bits_buf(it_bit_buff, 5);
  122|  19.1k|    ptr_is_cpe[i] = (tmp & 0x10) >> 4;
  123|       |
  124|  19.1k|    if (ptr_is_cpe[i]) {
  ------------------
  |  Branch (124:9): [True: 4.56k, False: 14.5k]
  ------------------
  125|  4.56k|      num_ch += 2;
  126|  14.5k|    } else {
  127|  14.5k|      num_ch++;
  128|  14.5k|    }
  129|       |
  130|  19.1k|    ptr_tag_select[i] = (tmp & 0xF);
  131|  19.1k|  }
  132|  9.39k|  return num_ch;
  133|  9.39k|}
ixheaacd_read_pce_mixdown_data:
  137|  9.40k|                                    WORD32 mix_down_element_no) {
  138|  9.40k|  WORD32 mix_down_flag = ixheaacd_read_bits_buf(it_bit_buff, mix_down_present);
  139|  9.40k|  if (mix_down_flag == 1) {
  ------------------
  |  Branch (139:7): [True: 3.67k, False: 5.72k]
  ------------------
  140|  3.67k|    ixheaacd_read_bits_buf(it_bit_buff, mix_down_element_no);
  141|  3.67k|  }
  142|  9.40k|}
ixheaacd_skip_bits:
  145|  9.11k|                        WORD32 num_element) {
  146|  9.11k|  WORD32 i;
  147|   113k|  for (i = 0; i < num_element; i++) {
  ------------------
  |  Branch (147:15): [True: 104k, False: 9.11k]
  ------------------
  148|   104k|    ixheaacd_read_bits_buf(it_bit_buff, bits);
  149|   104k|  }
  150|  9.11k|}
ixheaacd_read_prog_config_element:
  154|  16.0k|    struct ia_bit_buf_struct *it_bit_buff) {
  155|  16.0k|  WORD32 i, tmp;
  156|  16.0k|  WORD count = 0, num_ch = 0;
  157|       |
  158|  16.0k|  tmp = ixheaacd_read_bits_buf(it_bit_buff, 6);
  159|       |
  160|  16.0k|  ptr_config_element->element_instance_tag = (tmp >> 2);
  161|  16.0k|  ptr_config_element->object_type = tmp & 0x3;
  162|       |
  163|  16.0k|  if ((ptr_config_element->object_type + 1) != 2
  ------------------
  |  Branch (163:7): [True: 4.46k, False: 11.5k]
  ------------------
  164|       |
  165|  4.46k|      && (ptr_config_element->object_type + 1) != 4
  ------------------
  |  Branch (165:10): [True: 2.05k, False: 2.41k]
  ------------------
  166|       |
  167|  16.0k|      ) {
  168|  2.05k|    return IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL;
  ------------------
  |  |   83|  2.05k|#define IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL 0xFFFF9000
  ------------------
  169|  2.05k|  }
  170|       |
  171|  13.9k|  ptr_config_element->samp_freq_index = ixheaacd_read_bits_buf(it_bit_buff, 4);
  172|  13.9k|  if (ptr_config_element->samp_freq_index > 11) {
  ------------------
  |  Branch (172:7): [True: 9.82k, False: 4.15k]
  ------------------
  173|  9.82k|    return IA_XHEAAC_DEC_EXE_NONFATAL_DECODE_FRAME_ERROR;
  ------------------
  |  |  102|  9.82k|#define IA_XHEAAC_DEC_EXE_NONFATAL_DECODE_FRAME_ERROR 0x00001807
  ------------------
  174|  9.82k|  }
  175|       |
  176|  4.15k|  tmp = ixheaacd_read_bits_buf(it_bit_buff, 21);
  177|       |
  178|  4.15k|  count += ptr_config_element->num_front_channel_elements = (tmp >> 17);
  179|  4.15k|  count += ptr_config_element->num_side_channel_elements =
  180|  4.15k|      (tmp & 0x1E000) >> 13;
  181|  4.15k|  count += ptr_config_element->num_back_channel_elements = (tmp & 0x1E00) >> 9;
  182|  4.15k|  count += ptr_config_element->num_lfe_channel_elements = (tmp & 0x180) >> 7;
  183|  4.15k|  ptr_config_element->num_assoc_data_elements = (tmp & 0x70) >> 4;
  184|  4.15k|  count += ptr_config_element->num_valid_cc_elements = tmp & 0xF;
  185|       |
  186|  4.15k|  if (count > MAX_BS_ELEMENT) {
  ------------------
  |  |   24|  4.15k|#define MAX_BS_ELEMENT (8 + MAX_CC_CHANNEL_NUM)
  |  |  ------------------
  |  |  |  |   23|  4.15k|#define MAX_CC_CHANNEL_NUM (2)
  |  |  ------------------
  ------------------
  |  Branch (186:7): [True: 1.00k, False: 3.15k]
  ------------------
  187|  1.00k|    return IA_XHEAAC_DEC_INIT_FATAL_STREAM_CHAN_GT_MAX;
  ------------------
  |  |   85|  1.00k|#define IA_XHEAAC_DEC_INIT_FATAL_STREAM_CHAN_GT_MAX 0xFFFF9002
  ------------------
  188|  1.00k|  }
  189|       |
  190|  3.15k|  ixheaacd_read_pce_mixdown_data(it_bit_buff, 1, 4);
  191|  3.15k|  ixheaacd_read_pce_mixdown_data(it_bit_buff, 1, 4);
  192|  3.15k|  ixheaacd_read_pce_mixdown_data(it_bit_buff, 1, 3);
  193|       |
  194|  3.15k|  num_ch += ixheaacd_read_pce_channel_info(
  195|  3.15k|      ptr_config_element->num_front_channel_elements,
  196|  3.15k|      ptr_config_element->front_element_is_cpe,
  197|  3.15k|      ptr_config_element->front_element_tag_select, it_bit_buff);
  198|       |
  199|  3.15k|  num_ch += ixheaacd_read_pce_channel_info(
  200|  3.15k|      ptr_config_element->num_side_channel_elements,
  201|  3.15k|      ptr_config_element->side_element_is_cpe,
  202|  3.15k|      ptr_config_element->side_element_tag_select, it_bit_buff);
  203|       |
  204|  3.15k|  num_ch += ixheaacd_read_pce_channel_info(
  205|  3.15k|      ptr_config_element->num_back_channel_elements,
  206|  3.15k|      ptr_config_element->back_element_is_cpe,
  207|  3.15k|      ptr_config_element->back_element_tag_select, it_bit_buff);
  208|       |
  209|  3.15k|  num_ch += ptr_config_element->num_lfe_channel_elements;
  210|       |
  211|  5.50k|  for (i = 0; i < (ptr_config_element->num_lfe_channel_elements); i++) {
  ------------------
  |  Branch (211:15): [True: 2.35k, False: 3.15k]
  ------------------
  212|  2.35k|    ptr_config_element->lfe_element_tag_select[i] =
  213|  2.35k|        ixheaacd_read_bits_buf(it_bit_buff, 4);
  214|  2.35k|  }
  215|       |
  216|  3.15k|  ptr_config_element->channels = num_ch;
  217|       |
  218|  10.2k|  for (i = 0; i < (ptr_config_element->num_assoc_data_elements); i++) {
  ------------------
  |  Branch (218:15): [True: 7.12k, False: 3.15k]
  ------------------
  219|  7.12k|    ixheaacd_read_bits_buf(it_bit_buff, 4);
  220|  7.12k|  }
  221|       |
  222|  3.15k|  ixheaacd_skip_bits(it_bit_buff, 5, ptr_config_element->num_valid_cc_elements);
  223|       |
  224|  3.15k|  {
  225|  3.15k|    WORD32 bits_to_read = ptr_config_element->alignment_bits;
  226|  3.15k|    if (bits_to_read <= it_bit_buff->bit_pos) {
  ------------------
  |  Branch (226:9): [True: 144, False: 3.00k]
  ------------------
  227|    144|      bits_to_read = it_bit_buff->bit_pos - bits_to_read;
  228|  3.00k|    } else {
  229|  3.00k|      bits_to_read = 8 - (bits_to_read) + it_bit_buff->bit_pos;
  230|  3.00k|    }
  231|  3.15k|    tmp = ixheaacd_read_bits_buf(it_bit_buff, bits_to_read);
  232|  3.15k|  }
  233|  3.15k|  tmp = ixheaacd_read_bits_buf(it_bit_buff, 8);
  234|       |
  235|  3.15k|  ixheaacd_skip_bits(it_bit_buff, 8, tmp);
  236|       |
  237|  3.15k|  return 0;
  238|  4.15k|}
ixheaacd_decode_pce:
  242|    361|                         ia_program_config_struct *ptr_prog_config) {
  243|    361|  WORD32 error_code = 0;
  244|       |
  245|    361|  if (*ui_pce_found_in_hdr == 1 || *ui_pce_found_in_hdr == 3) {
  ------------------
  |  Branch (245:7): [True: 64, False: 297]
  |  Branch (245:36): [True: 18, False: 279]
  ------------------
  246|     82|    ia_program_config_struct ptr_config_element = {0};
  247|     82|    ptr_config_element.alignment_bits = ptr_prog_config->alignment_bits;
  248|     82|    error_code =
  249|     82|        ixheaacd_read_prog_config_element(&ptr_config_element, it_bit_buff);
  250|     82|    *ui_pce_found_in_hdr = 3;
  251|    279|  } else {
  252|    279|    error_code =
  253|    279|        ixheaacd_read_prog_config_element(ptr_prog_config, it_bit_buff);
  254|    279|    *ui_pce_found_in_hdr = 2;
  255|    279|  }
  256|    361|  return error_code;
  257|    361|}
ixheaacd_find_syncword:
  297|   132k|                              struct ia_bit_buf_struct *it_bit_buff) {
  298|   132k|  adts->sync_word = (WORD16)ixheaacd_read_bits_buf(it_bit_buff, 12);
  299|   132k|  if (adts->sync_word == 0xFFF) {
  ------------------
  |  Branch (299:7): [True: 131k, False: 874]
  ------------------
  300|   131k|    return 0;
  301|   131k|  }
  302|       |
  303|  1.07M|  while (1) {
  ------------------
  |  Branch (303:10): [True: 1.07M, Folded]
  ------------------
  304|  1.07M|    ixheaacd_read_bidirection(it_bit_buff, -4);
  305|  1.07M|    if (it_bit_buff->cnt_bits < 12) {
  ------------------
  |  Branch (305:9): [True: 287, False: 1.07M]
  ------------------
  306|    287|      return IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL;
  ------------------
  |  |   83|    287|#define IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL 0xFFFF9000
  ------------------
  307|    287|    }
  308|  1.07M|    adts->sync_word = (WORD16)ixheaacd_read_bits_buf(it_bit_buff, 12);
  309|  1.07M|    if (adts->sync_word == 0xFFF) {
  ------------------
  |  Branch (309:9): [True: 491, False: 1.07M]
  ------------------
  310|    491|      ixheaacd_read_bidirection(it_bit_buff, -12);
  311|    491|      return IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL;
  ------------------
  |  |   83|    491|#define IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL 0xFFFF9000
  ------------------
  312|    491|    }
  313|  1.07M|  }
  314|    874|}
ixheaacd_adtsframe:
  317|  99.9k|                          struct ia_bit_buf_struct *it_bit_buff) {
  318|  99.9k|  WORD32 tmp;
  319|  99.9k|  IA_ERRORCODE err = IA_NO_ERROR;
  ------------------
  |  |   23|  99.9k|#define IA_NO_ERROR 0x00000000
  ------------------
  320|  99.9k|  WORD32 crc_reg;
  321|  99.9k|  ia_adts_crc_info_struct *ptr_adts_crc_info = it_bit_buff->pstr_adts_crc_info;
  322|  99.9k|  ptr_adts_crc_info->crc_active = 1;
  323|  99.9k|  ptr_adts_crc_info->no_reg = 0;
  324|  99.9k|  ixheaacd_read_bidirection(it_bit_buff, -12);
  325|  99.9k|  crc_reg = ixheaacd_adts_crc_start_reg(ptr_adts_crc_info, it_bit_buff,
  326|  99.9k|                                        CRC_ADTS_HEADER_LEN);
  ------------------
  |  |   25|  99.9k|#define CRC_ADTS_HEADER_LEN 56
  ------------------
  327|  99.9k|  err = ixheaacd_find_syncword(adts, it_bit_buff);
  328|  99.9k|  if (err) return err;
  ------------------
  |  Branch (328:7): [True: 0, False: 99.9k]
  ------------------
  329|       |
  330|  99.9k|  tmp = ixheaacd_read_bits_buf(it_bit_buff, 10);
  331|       |
  332|  99.9k|  adts->id = (tmp & 0x200) >> 9;
  333|  99.9k|  adts->layer = (tmp & 0x180) >> 7;
  334|  99.9k|  adts->protection_absent = (tmp & 0x40) >> 6;
  335|  99.9k|  adts->profile = (tmp & 0x30) >> 4;
  336|  99.9k|  { adts->profile++; }
  337|  99.9k|  adts->samp_freq_index = (tmp & 0xF);
  338|       |
  339|  99.9k|  if (((adts->profile != AAC_LC_PROFILE)) || (adts->samp_freq_index > 11))
  ------------------
  |  |  101|  99.9k|#define AAC_LC_PROFILE (2)
  ------------------
  |  Branch (339:7): [True: 50.8k, False: 49.0k]
  |  Branch (339:46): [True: 1.20k, False: 47.8k]
  ------------------
  340|       |
  341|  52.0k|  {
  342|  52.0k|    return IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL;
  ------------------
  |  |   83|  52.0k|#define IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL 0xFFFF9000
  ------------------
  343|  52.0k|  }
  344|       |
  345|  47.9k|  tmp = ixheaacd_read_bits_buf(it_bit_buff, 21);
  346|       |
  347|  47.9k|  adts->channel_configuration = (WORD32)(tmp & 0xE0000) >> 17;
  348|       |
  349|  47.9k|  adts->aac_frame_length = (tmp & 0x1FFF);
  350|       |
  351|  47.9k|  tmp = ixheaacd_read_bits_buf(it_bit_buff, 13);
  352|       |
  353|  47.9k|  adts->no_raw_data_blocks = (tmp & 0x3);
  354|       |
  355|  47.9k|  ixheaacd_adts_crc_end_reg(ptr_adts_crc_info, it_bit_buff, crc_reg);
  356|       |
  357|  47.9k|  if (adts->protection_absent == 0) {
  ------------------
  |  Branch (357:7): [True: 1.93k, False: 45.9k]
  ------------------
  358|  1.93k|    ixheaacd_skip_bits(it_bit_buff, 16, adts->no_raw_data_blocks);
  359|  1.93k|    adts->crc_check = ixheaacd_read_bits_buf(it_bit_buff, 16);
  360|       |
  361|  1.93k|    ptr_adts_crc_info->crc_active = 1;
  362|  1.93k|    ptr_adts_crc_info->file_value = adts->crc_check;
  363|  1.93k|  } else
  364|  45.9k|    ptr_adts_crc_info->crc_active = 0;
  365|       |
  366|  47.9k|  ixheaacd_aac_bytealign(it_bit_buff);
  367|  47.9k|  return 0;
  368|  99.9k|}
ixheaacd_get_samp_rate:
  373|   147k|    ia_audio_specific_config_struct *pstr_audio_specific_config) {
  374|   147k|  WORD32 index;
  375|   147k|  WORD32 sampling_rate;
  376|   147k|  index = ixheaacd_read_bits_buf(it_bit_buff, 4);
  377|   147k|  pstr_audio_specific_config->samp_frequency_index = index;
  378|       |
  379|   147k|  if (index == 0x0F) {
  ------------------
  |  Branch (379:7): [True: 602, False: 146k]
  ------------------
  380|    602|    sampling_rate = ixheaacd_read_bits_buf(it_bit_buff, 24);
  381|       |
  382|    602|    if (pstr_audio_specific_config->audio_object_type != AOT_USAC) {
  ------------------
  |  Branch (382:9): [True: 422, False: 180]
  ------------------
  383|    422|      if (sampling_rate < 9391)
  ------------------
  |  Branch (383:11): [True: 12, False: 410]
  ------------------
  384|     12|        sampling_rate = 8000;
  385|    410|      else if ((sampling_rate >= 9391) && (sampling_rate < 11502))
  ------------------
  |  Branch (385:16): [True: 410, False: 0]
  |  Branch (385:43): [True: 13, False: 397]
  ------------------
  386|     13|        sampling_rate = 11025;
  387|    397|      else if ((sampling_rate >= 11502) && (sampling_rate < 13856))
  ------------------
  |  Branch (387:16): [True: 397, False: 0]
  |  Branch (387:44): [True: 18, False: 379]
  ------------------
  388|     18|        sampling_rate = 12000;
  389|    379|      else if ((sampling_rate >= 13856) && (sampling_rate < 18783))
  ------------------
  |  Branch (389:16): [True: 379, False: 0]
  |  Branch (389:44): [True: 7, False: 372]
  ------------------
  390|      7|        sampling_rate = 16000;
  391|    372|      else if ((sampling_rate >= 18783) && (sampling_rate < 23004))
  ------------------
  |  Branch (391:16): [True: 372, False: 0]
  |  Branch (391:44): [True: 18, False: 354]
  ------------------
  392|     18|        sampling_rate = 22050;
  393|    354|      else if ((sampling_rate >= 23004) && (sampling_rate < 27713))
  ------------------
  |  Branch (393:16): [True: 354, False: 0]
  |  Branch (393:44): [True: 20, False: 334]
  ------------------
  394|     20|        sampling_rate = 24000;
  395|    334|      else if ((sampling_rate >= 27713) && (sampling_rate < 37566))
  ------------------
  |  Branch (395:16): [True: 334, False: 0]
  |  Branch (395:44): [True: 14, False: 320]
  ------------------
  396|     14|        sampling_rate = 32000;
  397|    320|      else if ((sampling_rate >= 37566) && (sampling_rate < 46009))
  ------------------
  |  Branch (397:16): [True: 320, False: 0]
  |  Branch (397:44): [True: 18, False: 302]
  ------------------
  398|     18|        sampling_rate = 44100;
  399|    302|      else if ((sampling_rate >= 46009) && (sampling_rate < 55426))
  ------------------
  |  Branch (399:16): [True: 302, False: 0]
  |  Branch (399:44): [True: 18, False: 284]
  ------------------
  400|     18|        sampling_rate = 48000;
  401|    284|      else if ((sampling_rate >= 55426) && (sampling_rate < 75132))
  ------------------
  |  Branch (401:16): [True: 284, False: 0]
  |  Branch (401:44): [True: 16, False: 268]
  ------------------
  402|     16|        sampling_rate = 64000;
  403|    268|      else if ((sampling_rate >= 75132) && (sampling_rate < 92017))
  ------------------
  |  Branch (403:16): [True: 268, False: 0]
  |  Branch (403:44): [True: 19, False: 249]
  ------------------
  404|     19|        sampling_rate = 88200;
  405|    249|      else if (sampling_rate >= 92017)
  ------------------
  |  Branch (405:16): [True: 249, False: 0]
  ------------------
  406|    249|        sampling_rate = 96000;
  407|    422|    }
  408|    602|    return sampling_rate;
  409|   146k|  } else if ((index > 12) && (index < 15)) {
  ------------------
  |  Branch (409:14): [True: 9, False: 146k]
  |  Branch (409:30): [True: 9, False: 0]
  ------------------
  410|      9|    return -1;
  411|   146k|  } else {
  412|   146k|    return ((pstr_samp_rate_info[index].sampling_frequency));
  413|   146k|  }
  414|   147k|}
ixheaacd_eld_sbr_header:
  457|  16.3k|                               ia_sbr_header_data_struct *pstr_sbr_config) {
  458|  16.3k|  int num_sbr_header, el, bit_cnt = 0;
  459|  16.3k|  switch (channels) {
  460|    947|    default:
  ------------------
  |  Branch (460:5): [True: 947, False: 15.3k]
  ------------------
  461|    947|      num_sbr_header = 0;
  462|    947|      break;
  463|    175|    case 1:
  ------------------
  |  Branch (463:5): [True: 175, False: 16.1k]
  ------------------
  464|  7.09k|    case 2:
  ------------------
  |  Branch (464:5): [True: 6.91k, False: 9.39k]
  ------------------
  465|  7.09k|      num_sbr_header = 1;
  466|  7.09k|      break;
  467|  7.34k|    case 3:
  ------------------
  |  Branch (467:5): [True: 7.34k, False: 8.96k]
  ------------------
  468|  7.34k|      num_sbr_header = 2;
  469|  7.34k|      break;
  470|      2|    case 4:
  ------------------
  |  Branch (470:5): [True: 2, False: 16.3k]
  ------------------
  471|      4|    case 5:
  ------------------
  |  Branch (471:5): [True: 2, False: 16.3k]
  ------------------
  472|      8|    case 6:
  ------------------
  |  Branch (472:5): [True: 4, False: 16.3k]
  ------------------
  473|      8|      num_sbr_header = 3;
  474|      8|      break;
  475|    917|    case 7:
  ------------------
  |  Branch (475:5): [True: 917, False: 15.3k]
  ------------------
  476|    917|      num_sbr_header = 4;
  477|    917|      break;
  478|  16.3k|  }
  479|  41.7k|  for (el = 0; el < num_sbr_header; el++) {
  ------------------
  |  Branch (479:16): [True: 25.4k, False: 16.3k]
  ------------------
  480|  25.4k|    bit_cnt = ixheaacd_get_ld_sbr_header(it_bit_buff, pstr_sbr_config);
  481|  25.4k|  }
  482|  16.3k|  return (bit_cnt);
  483|  16.3k|}
ixheaacd_ga_hdr_dec:
  488|   147k|                           struct ia_bit_buf_struct *it_bit_buff) {
  489|   147k|  WORD32 tmp;
  490|   147k|  WORD32 cnt_bits = it_bit_buff->cnt_bits;
  491|   147k|  UWORD32 aot_init;
  492|   147k|  UWORD32 tmp_aot;
  493|       |
  494|   147k|  ia_audio_specific_config_struct *pstr_audio_specific_config;
  495|       |
  496|   147k|  memset(aac_state_struct->ia_audio_specific_config, 0,
  497|   147k|         sizeof(ia_audio_specific_config_struct));
  498|       |
  499|   147k|  memset(&(aac_state_struct->eld_specific_config), 0,
  500|   147k|         sizeof(ia_eld_specific_config_struct));
  501|       |
  502|   147k|  pstr_audio_specific_config = aac_state_struct->ia_audio_specific_config;
  503|       |
  504|   147k|  aac_state_struct->p_config->str_prog_config.alignment_bits =
  505|   147k|      it_bit_buff->bit_pos;
  506|       |
  507|   147k|  aot_init = aac_state_struct->audio_object_type;
  508|   147k|  aac_state_struct->frame_length = FRAME_SIZE;
  ------------------
  |  |   25|   147k|#define FRAME_SIZE 1024
  ------------------
  509|       |
  510|   147k|  tmp_aot = ixheaacd_read_bits_buf(it_bit_buff, 5);
  511|       |
  512|   147k|  if (tmp_aot == 31) {
  ------------------
  |  Branch (512:7): [True: 42.3k, False: 104k]
  ------------------
  513|  42.3k|    tmp = ixheaacd_read_bits_buf(it_bit_buff, 6);
  514|  42.3k|    tmp_aot = 32 + tmp;
  515|  42.3k|  }
  516|       |
  517|   147k|  if (aac_state_struct->header_dec_done || aac_state_struct->ui_init_done) {
  ------------------
  |  Branch (517:7): [True: 3.69k, False: 143k]
  |  Branch (517:44): [True: 133k, False: 9.92k]
  ------------------
  518|   137k|    if (tmp_aot != aot_init && tmp_aot != AOT_SBR && tmp_aot != AOT_PS)
  ------------------
  |  Branch (518:9): [True: 142, False: 137k]
  |  Branch (518:32): [True: 137, False: 5]
  |  Branch (518:54): [True: 124, False: 13]
  ------------------
  519|    124|      return IA_FATAL_ERROR;
  ------------------
  |  |   25|    124|#define IA_FATAL_ERROR 0x80000000
  ------------------
  520|   137k|  }
  521|       |
  522|   147k|  pstr_audio_specific_config->audio_object_type =
  523|   147k|      aac_state_struct->audio_object_type = tmp_aot;
  524|       |
  525|   147k|  tmp = ixheaacd_get_samp_rate(it_bit_buff, pstr_samp_rate_info,
  526|   147k|                               pstr_audio_specific_config);
  527|   147k|  pstr_audio_specific_config->sampling_frequency = tmp;
  528|       |
  529|   147k|  if (tmp == -1) {
  ------------------
  |  Branch (529:7): [True: 2, False: 147k]
  ------------------
  530|      2|    *bytes_consumed = 1;
  531|      2|    return IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL;
  ------------------
  |  |   83|      2|#define IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL 0xFFFF9000
  ------------------
  532|      2|  } else
  533|   147k|    aac_state_struct->sampling_rate = tmp;
  534|   147k|  aac_state_struct->p_config->ui_samp_freq = tmp;
  535|       |
  536|   147k|  aac_state_struct->ch_config = ixheaacd_read_bits_buf(it_bit_buff, 4);
  537|       |
  538|   147k|  if (aac_state_struct->audio_object_type == AOT_USAC &&
  ------------------
  |  Branch (538:7): [True: 24.0k, False: 123k]
  ------------------
  539|  24.0k|      ((aac_state_struct->ch_config >= 3) && (aac_state_struct->ch_config != 8))) {
  ------------------
  |  Branch (539:8): [True: 80, False: 23.9k]
  |  Branch (539:46): [True: 4, False: 76]
  ------------------
  540|      4|    return IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL;
  ------------------
  |  |   83|      4|#define IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL 0xFFFF9000
  ------------------
  541|      4|  }
  542|       |
  543|   147k|  pstr_audio_specific_config->channel_configuration =
  544|   147k|      aac_state_struct->ch_config;
  545|       |
  546|   147k|  if (aac_state_struct->audio_object_type == AOT_SBR ||
  ------------------
  |  Branch (546:7): [True: 119, False: 147k]
  ------------------
  547|   147k|      aac_state_struct->audio_object_type == AOT_PS) {
  ------------------
  |  Branch (547:7): [True: 26, False: 147k]
  ------------------
  548|    101|    tmp = ixheaacd_get_samp_rate(it_bit_buff, pstr_samp_rate_info,
  549|    101|                                 pstr_audio_specific_config);
  550|    101|    aac_state_struct->sbr_present_flag = 1;
  551|    101|    if (tmp == -1) {
  ------------------
  |  Branch (551:9): [True: 6, False: 95]
  ------------------
  552|      6|      *bytes_consumed = 1;
  553|      6|      return IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL;
  ------------------
  |  |   83|      6|#define IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL 0xFFFF9000
  ------------------
  554|      6|    } else
  555|     95|      aac_state_struct->extension_samp_rate = tmp;
  556|       |
  557|     95|    aac_state_struct->audio_object_type =
  558|     95|        ixheaacd_read_bits_buf(it_bit_buff, 5);
  559|     95|  }
  560|       |
  561|   147k|  if (aac_state_struct->header_dec_done || aac_state_struct->ui_init_done) {
  ------------------
  |  Branch (561:7): [True: 3.74k, False: 143k]
  |  Branch (561:44): [True: 133k, False: 9.87k]
  ------------------
  562|   137k|    if (aac_state_struct->audio_object_type != aot_init) return IA_FATAL_ERROR;
  ------------------
  |  |   25|      6|#define IA_FATAL_ERROR 0x80000000
  ------------------
  |  Branch (562:9): [True: 6, False: 137k]
  ------------------
  563|   137k|  }
  564|       |
  565|   147k|  if (((aac_state_struct->audio_object_type >= AOT_AAC_MAIN &&
  ------------------
  |  Branch (565:9): [True: 147k, False: 64]
  ------------------
  566|   147k|        aac_state_struct->audio_object_type <= AOT_AAC_LTP) ||
  ------------------
  |  Branch (566:9): [True: 12.2k, False: 134k]
  ------------------
  567|   134k|       aac_state_struct->audio_object_type == AOT_AAC_SCAL ||
  ------------------
  |  Branch (567:8): [True: 136, False: 134k]
  ------------------
  568|   134k|       aac_state_struct->audio_object_type == AOT_TWIN_VQ ||
  ------------------
  |  Branch (568:8): [True: 73, False: 134k]
  ------------------
  569|   134k|       aac_state_struct->audio_object_type == AOT_ER_AAC_LD ||
  ------------------
  |  Branch (569:8): [True: 60.3k, False: 74.2k]
  ------------------
  570|  74.2k|       aac_state_struct->audio_object_type == AOT_ER_AAC_ELD ||
  ------------------
  |  Branch (570:8): [True: 18.1k, False: 56.1k]
  ------------------
  571|  56.1k|       aac_state_struct->audio_object_type == AOT_ER_AAC_SCAL ||
  ------------------
  |  Branch (571:8): [True: 102, False: 56.0k]
  ------------------
  572|  56.0k|       aac_state_struct->audio_object_type == AOT_ER_AAC_LC) &&
  ------------------
  |  Branch (572:8): [True: 31.8k, False: 24.1k]
  ------------------
  573|   122k|      aac_state_struct->audio_object_type != AOT_USAC)
  ------------------
  |  Branch (573:7): [True: 122k, False: 0]
  ------------------
  574|       |
  575|   122k|  {
  576|   122k|    aac_state_struct->usac_flag = 0;
  577|       |
  578|   122k|    aac_state_struct->frame_len_flag = ixheaacd_read_bits_buf(it_bit_buff, 1);
  579|   122k|    if (aac_state_struct->audio_object_type != AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (579:9): [True: 104k, False: 18.1k]
  ------------------
  580|   104k|      aac_state_struct->depends_on_core_coder =
  581|   104k|          ixheaacd_read_bits_buf(it_bit_buff, 1);
  582|   104k|      aac_state_struct->extension_flag = ixheaacd_read_bits_buf(it_bit_buff, 1);
  583|       |
  584|   104k|      if (aac_state_struct->ch_config == 0) {
  ------------------
  |  Branch (584:11): [True: 9.67k, False: 95.0k]
  ------------------
  585|  9.67k|        WORD32 error_code;
  586|  9.67k|        error_code = ixheaacd_read_prog_config_element(
  587|  9.67k|            &aac_state_struct->p_config->str_prog_config, it_bit_buff);
  588|  9.67k|        if (error_code != 0) {
  ------------------
  |  Branch (588:13): [True: 9.40k, False: 278]
  ------------------
  589|  9.40k|          *bytes_consumed = 1;
  590|  9.40k|          return error_code;
  591|  9.40k|        }
  592|    278|        aac_state_struct->p_config->ui_pce_found_in_hdr = 1;
  593|    278|      }
  594|   104k|    }
  595|   113k|    if (aac_state_struct->audio_object_type == AOT_ER_AAC_ELD ||
  ------------------
  |  Branch (595:9): [True: 18.2k, False: 95.3k]
  ------------------
  596|  95.3k|        aac_state_struct->audio_object_type == AOT_ER_AAC_LD ||
  ------------------
  |  Branch (596:9): [True: 51.2k, False: 44.0k]
  ------------------
  597|  44.0k|        aac_state_struct->audio_object_type == AOT_ER_AAC_LC ||
  ------------------
  |  Branch (597:9): [True: 31.8k, False: 12.1k]
  ------------------
  598|   101k|        aac_state_struct->audio_object_type == AOT_ER_AAC_SCAL) {
  ------------------
  |  Branch (598:9): [True: 2, False: 12.1k]
  ------------------
  599|   101k|      aac_state_struct->eld_specific_config.aac_sect_data_resil_flag = 0;
  600|   101k|      aac_state_struct->eld_specific_config.aac_sf_data_resil_flag = 0;
  601|   101k|      aac_state_struct->eld_specific_config.aac_spect_data_resil_flag = 0;
  602|   101k|      aac_state_struct->eld_specific_config.ep_config = 0;
  603|   101k|      if ((aac_state_struct->extension_flag == 1) ||
  ------------------
  |  Branch (603:11): [True: 81.1k, False: 20.1k]
  ------------------
  604|  99.3k|          aac_state_struct->audio_object_type == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (604:11): [True: 18.1k, False: 1.97k]
  ------------------
  605|  99.3k|        if (aac_state_struct->audio_object_type >= ER_OBJECT_START) {
  ------------------
  |  |   64|  99.3k|#define ER_OBJECT_START 17
  ------------------
  |  Branch (605:13): [True: 99.3k, False: 0]
  ------------------
  606|  99.3k|          aac_state_struct->eld_specific_config.aac_sect_data_resil_flag =
  607|  99.3k|              ixheaacd_read_bits_buf(it_bit_buff, 1);
  608|  99.3k|          aac_state_struct->eld_specific_config.aac_sf_data_resil_flag =
  609|  99.3k|              ixheaacd_read_bits_buf(it_bit_buff, 1);
  610|  99.3k|          aac_state_struct->eld_specific_config.aac_spect_data_resil_flag =
  611|  99.3k|              ixheaacd_read_bits_buf(it_bit_buff, 1);
  612|  99.3k|          if (aac_state_struct->audio_object_type == AOT_ER_AAC_LD)
  ------------------
  |  Branch (612:15): [True: 51.1k, False: 48.1k]
  ------------------
  613|  51.1k|            aac_state_struct->eld_specific_config.ep_config =
  614|  51.1k|                ixheaacd_read_bits_buf(it_bit_buff, 2);
  615|  99.3k|          if (aac_state_struct->audio_object_type == AOT_ER_AAC_ELD)
  ------------------
  |  Branch (615:15): [True: 18.1k, False: 81.1k]
  ------------------
  616|  18.1k|            aac_state_struct->eld_specific_config.ld_sbr_flag_present =
  617|  18.1k|                ixheaacd_read_bits_buf(it_bit_buff, 1);
  618|  99.3k|        }
  619|  99.3k|      }
  620|   101k|    }
  621|   113k|  }
  622|   137k|  if (pstr_audio_specific_config->audio_object_type == AOT_USAC) {
  ------------------
  |  Branch (622:7): [True: 24.0k, False: 113k]
  ------------------
  623|  24.0k|    {
  624|  24.0k|      pstr_audio_specific_config->sbr_present_flag = 0;
  625|  24.0k|      pstr_audio_specific_config->ext_audio_object_type = 0;
  626|  24.0k|    }
  627|       |
  628|  24.0k|    {
  629|  24.0k|      {
  630|  24.0k|        SIZE_T tmp = 0xf;
  ------------------
  |  |   28|  24.0k|#define SIZE_T size_t
  ------------------
  631|  24.0k|        UWORD32 i;
  632|  24.0k|        WORD32 err = 0;
  633|       |
  634|  24.0k|        aac_state_struct->usac_flag = 1;
  635|       |
  636|  24.0k|        ixheaacd_conf_default(&(pstr_audio_specific_config->str_usac_config));
  637|  24.0k|        err = ixheaacd_config(it_bit_buff, &(pstr_audio_specific_config->str_usac_config),
  638|  24.0k|                              &(pstr_audio_specific_config->channel_configuration),
  639|  24.0k|                              aac_state_struct->ec_enable);
  640|  24.0k|        if (err != 0) return err;
  ------------------
  |  Branch (640:13): [True: 88, False: 23.9k]
  ------------------
  641|       |
  642|  23.9k|        pstr_audio_specific_config->sampling_frequency =
  643|  23.9k|            pstr_audio_specific_config->str_usac_config.usac_sampling_frequency;
  644|       |
  645|  23.9k|        if (pstr_audio_specific_config->audio_object_type == AOT_USAC) {
  ------------------
  |  Branch (645:13): [True: 23.8k, False: 67]
  ------------------
  646|  23.8k|          pstr_audio_specific_config->sbr_present_flag = 1;
  647|  23.8k|          pstr_audio_specific_config->ext_audio_object_type = AOT_SBR;
  648|  23.8k|          pstr_audio_specific_config->ext_sampling_frequency =
  649|  23.8k|              pstr_audio_specific_config->sampling_frequency;
  650|  23.8k|          pstr_audio_specific_config->ext_samp_frequency_index =
  651|  23.8k|              pstr_audio_specific_config->samp_frequency_index;
  652|       |
  653|   274k|          for (i = 0; i < sizeof(ixheaacd_sampl_freq_idx_table) /
  ------------------
  |  Branch (653:23): [True: 272k, False: 1.89k]
  ------------------
  654|   274k|                              sizeof(ixheaacd_sampl_freq_idx_table[0]);
  655|   272k|               i++) {
  656|   272k|            if (ixheaacd_sampl_freq_idx_table[i] ==
  ------------------
  |  Branch (656:17): [True: 21.9k, False: 250k]
  ------------------
  657|   272k|                (int)(pstr_audio_specific_config->sampling_frequency)) {
  658|  21.9k|              tmp = i;
  659|  21.9k|              break;
  660|  21.9k|            }
  661|   272k|          }
  662|  23.8k|          pstr_audio_specific_config->samp_frequency_index = (UINT32)tmp;
  663|  23.8k|        } else {
  664|     67|          pstr_audio_specific_config->sbr_present_flag = 0;
  665|     67|        }
  666|  23.9k|      }
  667|  23.9k|    }
  668|       |
  669|  23.9k|    if (aac_state_struct->bs_format != LOAS_BSFORMAT) {
  ------------------
  |  |   29|  23.9k|#define LOAS_BSFORMAT 3
  ------------------
  |  Branch (669:9): [True: 1.09k, False: 22.8k]
  ------------------
  670|  1.09k|      ixheaacd_skip_bits_buf(it_bit_buff, it_bit_buff->cnt_bits);
  671|       |
  672|  1.09k|      if ((SIZE_T)it_bit_buff->ptr_read_next ==
  ------------------
  |  Branch (672:11): [True: 0, False: 1.09k]
  ------------------
  673|  1.09k|          (SIZE_T)it_bit_buff->ptr_bit_buf_base) {
  674|      0|        *bytes_consumed = ((WORD32)it_bit_buff->size) >> 3;
  675|  1.09k|      } else {
  676|  1.09k|        *bytes_consumed = (WORD32)((((((SIZE_T)it_bit_buff->ptr_read_next -
  677|  1.09k|                              (SIZE_T)it_bit_buff->ptr_bit_buf_base))
  678|  1.09k|                            << 3) +
  679|  1.09k|                            7 - it_bit_buff->bit_pos + 7) >>
  680|  1.09k|                            3);
  681|  1.09k|      }
  682|  1.09k|    }
  683|  23.9k|    return 0;
  684|  24.0k|  }
  685|       |
  686|   113k|  aac_state_struct->frame_length = FRAME_SIZE;
  ------------------
  |  |   25|   113k|#define FRAME_SIZE 1024
  ------------------
  687|   113k|  if (aac_state_struct->frame_len_flag)
  ------------------
  |  Branch (687:7): [True: 56.6k, False: 57.0k]
  ------------------
  688|  56.6k|    aac_state_struct->frame_length = FRAME_SIZE_SMALL;
  ------------------
  |  |   26|  56.6k|#define FRAME_SIZE_SMALL 960
  ------------------
  689|       |
  690|   113k|  if (aac_state_struct->extension_flag)
  ------------------
  |  Branch (690:7): [True: 81.4k, False: 32.2k]
  ------------------
  691|  81.4k|    aac_state_struct->extension_flag_3 = ixheaacd_read_bits_buf(it_bit_buff, 1);
  692|       |
  693|   113k|  if (aac_state_struct->audio_object_type == AOT_ER_AAC_LD)
  ------------------
  |  Branch (693:7): [True: 51.2k, False: 62.4k]
  ------------------
  694|  51.2k|    aac_state_struct->frame_length >>= 1;
  695|       |
  696|   113k|  if (aac_state_struct->audio_object_type == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (696:7): [True: 18.1k, False: 95.5k]
  ------------------
  697|  18.1k|    aac_state_struct->frame_length >>= 1;
  698|  18.1k|    if (aac_state_struct->eld_specific_config.ld_sbr_flag_present) {
  ------------------
  |  Branch (698:9): [True: 16.3k, False: 1.88k]
  ------------------
  699|  16.3k|      aac_state_struct->eld_specific_config.ld_sbr_samp_rate =
  700|  16.3k|          ixheaacd_read_bits_buf(it_bit_buff, 1);
  701|  16.3k|      aac_state_struct->eld_specific_config.ld_sbr_crc_flag =
  702|  16.3k|          ixheaacd_read_bits_buf(it_bit_buff, 1);
  703|       |
  704|  16.3k|      ixheaacd_eld_sbr_header(it_bit_buff, aac_state_struct->ch_config,
  705|  16.3k|                              &aac_state_struct->str_sbr_config);
  706|       |
  707|  16.3k|      aac_state_struct->dwnsmp_signal =
  708|  16.3k|          !aac_state_struct->eld_specific_config.ld_sbr_samp_rate;
  709|  16.3k|    }
  710|       |
  711|  18.1k|    {
  712|  18.1k|      UWORD16 len, eld_ext_type;
  713|  18.1k|      WORD32 err;
  714|  18.1k|      UWORD16 cnt;
  715|       |
  716|  18.1k|      if (ixheaacd_show_bits_buf(it_bit_buff, 4) != ELDEXT_TERM) {
  ------------------
  |  |   96|  18.1k|#define ELDEXT_TERM 0
  ------------------
  |  Branch (716:11): [True: 9.92k, False: 8.26k]
  ------------------
  717|  9.92k|        while ((eld_ext_type = ixheaacd_read_bits_buf(it_bit_buff, 4)) !=
  ------------------
  |  Branch (717:16): [True: 9.92k, False: 0]
  ------------------
  718|  9.92k|               ELDEXT_TERM) {
  ------------------
  |  |   96|  9.92k|#define ELDEXT_TERM 0
  ------------------
  719|  9.92k|          len = ixheaacd_read_bits_buf(it_bit_buff, 4);
  720|  9.92k|          if (len == 15) {
  ------------------
  |  Branch (720:15): [True: 85, False: 9.84k]
  ------------------
  721|     85|            len += ixheaacd_read_bits_buf(it_bit_buff, 8);
  722|     85|          }
  723|  9.92k|          if (len == 15 + 255) {
  ------------------
  |  Branch (723:15): [True: 14, False: 9.91k]
  ------------------
  724|     14|            len += ixheaacd_read_bits_buf(it_bit_buff, 16);
  725|     14|          }
  726|       |
  727|  9.92k|          switch (eld_ext_type) {
  728|    624|            case ELDEXT_SAOC:
  ------------------
  |  |   95|    624|#define ELDEXT_SAOC 1
  ------------------
  |  Branch (728:13): [True: 624, False: 9.30k]
  ------------------
  729|    624|              break;
  730|  1.21k|            case ELDEXT_LDSAC:
  ------------------
  |  |   97|  1.21k|#define ELDEXT_LDSAC 2
  ------------------
  |  Branch (730:13): [True: 1.21k, False: 8.71k]
  ------------------
  731|  1.21k|              aac_state_struct->ldmps_present = 1;
  732|  1.21k|              aac_state_struct->mps_dec_handle.ldmps_config.ldmps_present_flag =
  733|  1.21k|                  1;
  734|  1.21k|              aac_state_struct->mps_dec_handle.object_type =
  735|  1.21k|                  aac_state_struct->audio_object_type;
  736|  1.21k|              aac_state_struct->mps_dec_handle.ec_flag = aac_state_struct->ec_enable;
  737|  1.21k|              err = ixheaacd_ld_spatial_specific_config(
  738|  1.21k|                  &(aac_state_struct->mps_dec_handle.ldmps_config), it_bit_buff);
  739|  1.21k|              if (err) return err;
  ------------------
  |  Branch (739:19): [True: 17, False: 1.19k]
  ------------------
  740|       |
  741|  1.19k|              if (ixheaacd_mps_create(
  ------------------
  |  Branch (741:19): [True: 18, False: 1.18k]
  ------------------
  742|  1.19k|                      &aac_state_struct->mps_dec_handle,
  743|  1.19k|                      aac_state_struct->mps_dec_handle.ldmps_config
  744|  1.19k|                          .bs_frame_length,
  745|  1.19k|                      0, &(aac_state_struct->mps_dec_handle.ldmps_config))) {
  746|     18|                return -1;
  747|     18|              }
  748|  1.18k|              break;
  749|  8.08k|            default:
  ------------------
  |  Branch (749:13): [True: 8.08k, False: 1.84k]
  ------------------
  750|  17.2k|              for (cnt = 0; cnt < len; cnt++) {
  ------------------
  |  Branch (750:29): [True: 9.17k, False: 8.08k]
  ------------------
  751|  9.17k|                ixheaacd_read_bits_buf(it_bit_buff, 8);
  752|  9.17k|              }
  753|       |
  754|  8.08k|              break;
  755|  9.92k|          }
  756|  9.64k|          break;
  757|  9.92k|        }
  758|  9.92k|      }
  759|  18.1k|    }
  760|  17.9k|    if (!((aac_state_struct->ldmps_present == 1) &&
  ------------------
  |  Branch (760:11): [True: 6.77k, False: 11.1k]
  ------------------
  761|  6.77k|          !(it_bit_buff->cnt_bits >= 1)))
  ------------------
  |  Branch (761:11): [True: 10, False: 6.76k]
  ------------------
  762|  17.8k|    ixheaacd_read_bits_buf(it_bit_buff, 1);
  763|  17.9k|  }
  764|   113k|  if (!((aac_state_struct->ldmps_present == 1) && !(it_bit_buff->cnt_bits > 0))) {
  ------------------
  |  Branch (764:9): [True: 6.78k, False: 106k]
  |  Branch (764:51): [True: 10, False: 6.77k]
  ------------------
  765|   113k|    if (aac_state_struct->audio_object_type == AOT_ER_AAC_ELD ||
  ------------------
  |  Branch (765:9): [True: 17.8k, False: 95.4k]
  ------------------
  766|  95.4k|        aac_state_struct->audio_object_type == AOT_ER_AAC_LC ||
  ------------------
  |  Branch (766:9): [True: 31.8k, False: 63.5k]
  ------------------
  767|  63.5k|        aac_state_struct->audio_object_type == AOT_ER_AAC_SCAL) {
  ------------------
  |  Branch (767:9): [True: 2, False: 63.5k]
  ------------------
  768|  49.7k|      WORD32 ep_config = ixheaacd_read_bits_buf(it_bit_buff, 2);
  769|  49.7k|      if (ep_config == 2 || ep_config == 3) {
  ------------------
  |  Branch (769:11): [True: 77, False: 49.6k]
  |  Branch (769:29): [True: 193, False: 49.4k]
  ------------------
  770|    268|      }
  771|  49.7k|      if (ep_config == 3) {
  ------------------
  |  Branch (771:11): [True: 193, False: 49.5k]
  ------------------
  772|    193|        WORD32 direct_map = ixheaacd_read_bits_buf(it_bit_buff, 1);
  773|    193|        if (!direct_map) {
  ------------------
  |  Branch (773:13): [True: 10, False: 183]
  ------------------
  774|     10|        }
  775|    193|      }
  776|  49.7k|    }
  777|       |
  778|   113k|    tmp = (header_len * 8) - it_bit_buff->cnt_bits;
  779|       |
  780|   113k|    if (aac_state_struct->audio_object_type != AOT_SBR &&
  ------------------
  |  Branch (780:9): [True: 113k, False: 7]
  ------------------
  781|   113k|        (it_bit_buff->cnt_bits >= 16)) {
  ------------------
  |  Branch (781:9): [True: 113k, False: 97]
  ------------------
  782|   113k|      tmp = ixheaacd_read_bits_buf(it_bit_buff, 11);
  783|       |
  784|   113k|      if (tmp == 0x2b7) {
  ------------------
  |  Branch (784:11): [True: 49, False: 113k]
  ------------------
  785|     49|        tmp = ixheaacd_read_bits_buf(it_bit_buff, 5);
  786|       |
  787|     49|        if (tmp == AOT_SBR) {
  ------------------
  |  Branch (787:13): [True: 39, False: 10]
  ------------------
  788|     39|          WORD32 sbr_present_flag = ixheaacd_read_bits_buf(it_bit_buff, 1);
  789|     39|          if (sbr_present_flag) {
  ------------------
  |  Branch (789:15): [True: 33, False: 6]
  ------------------
  790|     33|            tmp = ixheaacd_get_samp_rate(it_bit_buff, pstr_samp_rate_info,
  791|     33|                                         pstr_audio_specific_config);
  792|     33|            if (tmp == -1) {
  ------------------
  |  Branch (792:17): [True: 1, False: 32]
  ------------------
  793|      1|              *bytes_consumed = 1;
  794|      1|              return IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL;
  ------------------
  |  |   83|      1|#define IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL 0xFFFF9000
  ------------------
  795|      1|            } else
  796|     32|              aac_state_struct->extension_samp_rate = tmp;
  797|       |
  798|     32|            if (it_bit_buff->cnt_bits >= 12) {
  ------------------
  |  Branch (798:17): [True: 11, False: 21]
  ------------------
  799|     11|              tmp = ixheaacd_read_bits_buf(it_bit_buff, 11);
  800|     11|              if (tmp == 0x548) {
  ------------------
  |  Branch (800:19): [True: 0, False: 11]
  ------------------
  801|      0|                tmp = ixheaacd_read_bits_buf(it_bit_buff, 1);
  802|      0|              }
  803|     11|            }
  804|     32|          }
  805|     39|        }
  806|   113k|      } else if (aac_state_struct->bs_format == LOAS_BSFORMAT) {
  ------------------
  |  |   29|   113k|#define LOAS_BSFORMAT 3
  ------------------
  |  Branch (806:18): [True: 113k, False: 80]
  ------------------
  807|   113k|        ixheaacd_read_bidirection(it_bit_buff, -11);
  808|   113k|      }
  809|   113k|    }
  810|   113k|  }
  811|       |
  812|   113k|  if (aac_state_struct->audio_object_type != AOT_AAC_LC &&
  ------------------
  |  Branch (812:7): [True: 113k, False: 149]
  ------------------
  813|   113k|      aac_state_struct->audio_object_type != AOT_SBR &&
  ------------------
  |  Branch (813:7): [True: 113k, False: 5]
  ------------------
  814|   113k|      aac_state_struct->audio_object_type != AOT_PS &&
  ------------------
  |  Branch (814:7): [True: 113k, False: 8]
  ------------------
  815|   113k|      aac_state_struct->audio_object_type != AOT_ER_AAC_LC &&
  ------------------
  |  Branch (815:7): [True: 81.4k, False: 31.8k]
  ------------------
  816|  81.4k|      aac_state_struct->audio_object_type != AOT_ER_AAC_LD &&
  ------------------
  |  Branch (816:7): [True: 30.1k, False: 51.2k]
  ------------------
  817|  30.1k|      aac_state_struct->audio_object_type != AOT_ER_AAC_ELD &&
  ------------------
  |  Branch (817:7): [True: 12.2k, False: 17.8k]
  ------------------
  818|  12.2k|      aac_state_struct->audio_object_type != AOT_AAC_LTP) {
  ------------------
  |  Branch (818:7): [True: 100, False: 12.1k]
  ------------------
  819|    100|    *bytes_consumed = 1;
  820|    100|    return IA_XHEAAC_DEC_INIT_FATAL_AUDIOOBJECTTYPE_NOT_SUPPORTED;
  ------------------
  |  |   86|    100|#define IA_XHEAAC_DEC_INIT_FATAL_AUDIOOBJECTTYPE_NOT_SUPPORTED 0xFFFF9003
  ------------------
  821|   113k|  } else {
  822|   113k|    if (aac_state_struct->bs_format == LOAS_BSFORMAT) {
  ------------------
  |  |   29|   113k|#define LOAS_BSFORMAT 3
  ------------------
  |  Branch (822:9): [True: 113k, False: 230]
  ------------------
  823|   113k|      *bytes_consumed = (cnt_bits - it_bit_buff->cnt_bits) >> 3;
  824|   113k|      if (it_bit_buff->bit_pos < 7) *bytes_consumed += 1;
  ------------------
  |  Branch (824:11): [True: 100k, False: 12.3k]
  ------------------
  825|       |
  826|   113k|    } else
  827|    230|      *bytes_consumed = header_len;
  828|       |
  829|   113k|    return 0;
  830|   113k|  }
  831|   113k|}
ixheaacd_check_if_adts:
  835|  99.9k|                              WORD32 usr_max_ch) {
  836|  99.9k|  WORD32 max_frm_len_per_ch, result = 0;
  837|       |
  838|  99.9k|  result = ixheaacd_adtsframe(adts, it_bit_buff);
  839|       |
  840|  99.9k|  max_frm_len_per_ch = ixheaac_mult32(768, (adts->no_raw_data_blocks + 1));
  841|       |
  842|  99.9k|  if (adts->channel_configuration != 0)
  ------------------
  |  Branch (842:7): [True: 69.6k, False: 30.3k]
  ------------------
  843|  69.6k|    max_frm_len_per_ch =
  844|  69.6k|        ixheaac_mult32(max_frm_len_per_ch, adts->channel_configuration);
  845|  30.3k|  else
  846|  30.3k|    max_frm_len_per_ch = max_frm_len_per_ch * usr_max_ch;
  847|       |
  848|  99.9k|  return ((result != 0) || (adts->aac_frame_length < 8) || (adts->layer != 0) ||
  ------------------
  |  Branch (848:11): [True: 52.1k, False: 47.8k]
  |  Branch (848:28): [True: 605, False: 47.2k]
  |  Branch (848:60): [True: 3.67k, False: 43.5k]
  ------------------
  849|  43.5k|          (adts->profile != AAC_LC_PROFILE));
  ------------------
  |  |  101|  43.5k|#define AAC_LC_PROFILE (2)
  ------------------
  |  Branch (849:11): [True: 0, False: 43.5k]
  ------------------
  850|  99.9k|}
ixheaacd_latm_header_decode:
  855|  7.99k|    ia_sampling_rate_info_struct *pstr_samp_rate_info) {
  856|  7.99k|  WORD32 sync;
  857|  7.99k|  IA_ERRORCODE result;
  858|  7.99k|  WORD32 next_sync, audio_mux_len_bytes_last;
  859|  7.99k|  WORD32 audio_mux_len_bits_last;
  860|  7.99k|  WORD32 sync_status = aac_state_struct->sync_status;
  861|  7.99k|  WORD32 bit_count = aac_state_struct->bit_count;
  862|  7.99k|  WORD32 cnt_bits = it_bit_buff->cnt_bits;
  863|       |
  864|  7.99k|  *bytes_consumed = 0;
  865|       |
  866|  7.99k|  aac_state_struct->bs_format = LOAS_BSFORMAT;
  ------------------
  |  |   29|  7.99k|#define LOAS_BSFORMAT 3
  ------------------
  867|       |
  868|  7.99k|  if (sync_status == 0) {
  ------------------
  |  Branch (868:7): [True: 7.99k, False: 0]
  ------------------
  869|  24.4k|    do {
  870|  24.4k|      sync = ixheaacd_read_bits_buf(it_bit_buff, 11);
  871|  24.4k|      bit_count += 11;
  872|  10.0M|      while (sync != 0x2B7) {
  ------------------
  |  Branch (872:14): [True: 10.0M, False: 24.3k]
  ------------------
  873|  10.0M|        sync = ((sync & 0x3ff) << 1) | ixheaacd_read_bits_buf(it_bit_buff, 1);
  874|  10.0M|        bit_count += 1;
  875|  10.0M|        if (it_bit_buff->cnt_bits < 13) {
  ------------------
  |  Branch (875:13): [True: 15, False: 10.0M]
  ------------------
  876|     15|          ixheaacd_read_bidirection(it_bit_buff, -11);
  877|     15|          *bytes_consumed = (cnt_bits - it_bit_buff->cnt_bits) / 8;
  878|     15|          return (IA_XHEAAC_DEC_INIT_NONFATAL_HEADER_NOT_AT_START);
  ------------------
  |  |   76|     15|#define IA_XHEAAC_DEC_INIT_NONFATAL_HEADER_NOT_AT_START 0x00001000
  ------------------
  879|     15|        }
  880|  10.0M|      }
  881|       |
  882|  24.3k|      audio_mux_len_bytes_last = ixheaacd_read_bits_buf(it_bit_buff, 13);
  883|  24.3k|      bit_count += 13;
  884|  24.3k|      audio_mux_len_bits_last = audio_mux_len_bytes_last << 3;
  885|  24.3k|      if (it_bit_buff->cnt_bits >= (audio_mux_len_bits_last + 11)) {
  ------------------
  |  Branch (885:11): [True: 24.3k, False: 75]
  ------------------
  886|  24.3k|        ixheaacd_read_bidirection(it_bit_buff, audio_mux_len_bits_last);
  887|  24.3k|        bit_count += audio_mux_len_bits_last;
  888|       |
  889|  24.3k|        next_sync = ixheaacd_read_bits_buf(it_bit_buff, 11);
  890|  24.3k|        bit_count += 11;
  891|       |
  892|  24.3k|        if (next_sync == 0x2B7) {
  ------------------
  |  Branch (892:13): [True: 7.90k, False: 16.4k]
  ------------------
  893|  7.90k|          ixheaacd_read_bidirection(it_bit_buff,
  894|  7.90k|                                    -(11 + audio_mux_len_bits_last + 13 + 11));
  895|  7.90k|          bit_count -= 11 + audio_mux_len_bits_last + 13 + 11;
  896|  7.90k|          break;
  897|  16.4k|        } else {
  898|  16.4k|          ixheaacd_read_bidirection(it_bit_buff,
  899|  16.4k|                                    -(audio_mux_len_bits_last + 24 + 11 - 1));
  900|  16.4k|          bit_count -= audio_mux_len_bits_last + 24 + 11 - 1;
  901|  16.4k|        }
  902|       |
  903|  24.3k|      } else {
  904|     75|        if (it_bit_buff->cnt_bits != audio_mux_len_bits_last) {
  ------------------
  |  Branch (904:13): [True: 16, False: 59]
  ------------------
  905|     16|          ixheaacd_read_bidirection(it_bit_buff, -(13 + 11));
  906|     16|          bit_count -= (13 + 11);
  907|     16|          *bytes_consumed = (cnt_bits - it_bit_buff->cnt_bits) / 8;
  908|     16|          return IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES;
  ------------------
  |  |   98|     16|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  909|     59|        } else {
  910|     59|          ixheaacd_read_bidirection(it_bit_buff, -(13 + 11));
  911|     59|          bit_count -= (13 + 11);
  912|     59|          break;
  913|     59|        }
  914|     75|      }
  915|  24.3k|    } while (1);
  ------------------
  |  Branch (915:14): [True: 16.4k, Folded]
  ------------------
  916|       |
  917|  7.96k|    do {
  918|  7.96k|      WORD32 audio_mux_len_bytes_last;
  919|  7.96k|      WORD32 use_same_stream_mux;
  920|       |
  921|  7.96k|      sync = ixheaacd_read_bits_buf(it_bit_buff, 11);
  922|  7.96k|      bit_count += 11;
  923|       |
  924|  7.96k|      if (sync != 0x2b7) {
  ------------------
  |  Branch (924:11): [True: 0, False: 7.96k]
  ------------------
  925|      0|        ixheaacd_read_bidirection(it_bit_buff, -25);
  926|      0|        bit_count -= 11;
  927|      0|        *bytes_consumed = (cnt_bits - it_bit_buff->cnt_bits) / 8;
  928|      0|        return IA_XHEAAC_DEC_INIT_NONFATAL_HEADER_NOT_AT_START;
  ------------------
  |  |   76|      0|#define IA_XHEAAC_DEC_INIT_NONFATAL_HEADER_NOT_AT_START 0x00001000
  ------------------
  929|      0|      }
  930|       |
  931|  7.96k|      audio_mux_len_bytes_last = ixheaacd_read_bits_buf(it_bit_buff, 13);
  932|  7.96k|      bit_count += 13;
  933|       |
  934|  7.96k|      use_same_stream_mux = ixheaacd_read_bits_buf(it_bit_buff, 1);
  935|  7.96k|      bit_count += 1;
  936|       |
  937|  7.96k|      if (!use_same_stream_mux) {
  ------------------
  |  Branch (937:11): [True: 7.95k, False: 3]
  ------------------
  938|  7.95k|        ixheaacd_read_bidirection(it_bit_buff, -25);
  939|  7.95k|        bit_count -= 25;
  940|  7.95k|        sync_status = 1;
  941|  7.95k|        aac_state_struct->sync_status = sync_status;
  942|  7.95k|        break;
  943|  7.95k|      } else {
  944|      3|        ixheaacd_read_bidirection(it_bit_buff, -25);
  945|      3|        bit_count -= 25;
  946|      3|        aac_state_struct->bit_count = bit_count;
  947|      3|        *bytes_consumed = 1;
  948|      3|        return IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES;
  ------------------
  |  |   98|      3|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  949|      3|      }
  950|       |
  951|       |
  952|      0|      ixheaacd_read_bidirection(it_bit_buff, audio_mux_len_bytes_last * 8 - 1);
  953|      0|      bit_count += audio_mux_len_bytes_last * 8 - 1;
  954|       |
  955|      0|    } while (sync_status == 0);
  ------------------
  |  Branch (955:14): [True: 0, False: 0]
  ------------------
  956|       |
  957|  7.95k|    *bytes_consumed = (cnt_bits - it_bit_buff->cnt_bits) / 8;
  958|  7.95k|    {
  959|  7.95k|      ixheaacd_latm_struct latm_struct_element;
  960|  7.95k|      WORD32 sync;
  961|  7.95k|      memset(&latm_struct_element, 0, sizeof(ixheaacd_latm_struct));
  962|       |
  963|  7.95k|      sync = ixheaacd_read_bits_buf(it_bit_buff, 11);
  964|  7.95k|      if (sync == 0x2b7) {
  ------------------
  |  Branch (964:11): [True: 7.95k, False: 0]
  ------------------
  965|  7.95k|        result = ixheaacd_latm_audio_mux_element(
  966|  7.95k|            it_bit_buff, &latm_struct_element, aac_state_struct,
  967|  7.95k|            pstr_samp_rate_info);
  968|  7.95k|        if (result != 0) {
  ------------------
  |  Branch (968:13): [True: 357, False: 7.60k]
  ------------------
  969|    357|          sync_status = 0;
  970|    357|          aac_state_struct->sync_status = sync_status;
  971|       |
  972|    357|          *bytes_consumed += 1;
  973|    357|          return result;
  974|    357|        }
  975|  7.95k|      }
  976|  7.95k|    }
  977|  7.95k|  }
  978|  7.60k|  return IA_NO_ERROR;
  ------------------
  |  |   23|  7.60k|#define IA_NO_ERROR 0x00000000
  ------------------
  979|  7.99k|}
ixheaacd_aac_headerdecode:
  984|  14.2k|    const ia_aac_dec_huffman_tables_struct *pstr_huffmann_tables) {
  985|  14.2k|  struct ia_bit_buf_struct it_bit_buff = {0}, *handle_bit_buff;
  986|  14.2k|  ia_adif_header_struct adif = {0};
  987|  14.2k|  ia_adts_header_struct adts = {0};
  988|  14.2k|  WORD32 result;
  989|  14.2k|  WORD32 header_len;
  990|  14.2k|  WORD32 sync = 0;
  991|       |
  992|  14.2k|  WORD32 disable_sync = p_obj_exhaacplus_dec->aac_config.ui_disable_sync;
  993|  14.2k|  WORD32 is_ga_header = p_obj_exhaacplus_dec->aac_config.ui_mp4_flag;
  994|       |
  995|  14.2k|  WORD32 loas_present = p_obj_exhaacplus_dec->aac_config.loas_present;
  996|       |
  997|  14.2k|  ia_aac_dec_state_struct *aac_state_struct =
  998|  14.2k|      p_obj_exhaacplus_dec->pp_mem_aac[IA_ENHAACPLUS_DEC_PERSIST_IDX];
  ------------------
  |  |   32|  14.2k|#define IA_ENHAACPLUS_DEC_PERSIST_IDX (0)
  ------------------
  999|  14.2k|  WORD32 usr_max_ch = aac_state_struct->p_config->ui_max_channels;
 1000|       |
 1001|  14.2k|  ia_sampling_rate_info_struct *pstr_samp_rate_info =
 1002|  14.2k|      (ia_sampling_rate_info_struct *)&pstr_huffmann_tables
 1003|  14.2k|          ->str_sample_rate_info[0];
 1004|       |
 1005|  14.2k|  if (buffer == 0) {
  ------------------
  |  Branch (1005:7): [True: 0, False: 14.2k]
  ------------------
 1006|      0|    return IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL;
  ------------------
  |  |   83|      0|#define IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL 0xFFFF9000
  ------------------
 1007|      0|  }
 1008|       |
 1009|  14.2k|  header_len = aac_state_struct->ui_in_bytes;
 1010|       |
 1011|  14.2k|  handle_bit_buff = ixheaacd_create_bit_buf(&it_bit_buff, (UWORD8 *)buffer,
 1012|  14.2k|                                            (WORD16)header_len);
 1013|  14.2k|  handle_bit_buff->cnt_bits += (header_len << 3);
 1014|  14.2k|  handle_bit_buff->xaac_jmp_buf = &aac_state_struct->xaac_jmp_buf;
 1015|       |
 1016|  14.2k|  if (is_ga_header == 1) {
  ------------------
  |  Branch (1016:7): [True: 1.67k, False: 12.5k]
  ------------------
 1017|  1.67k|    return ixheaacd_ga_hdr_dec(aac_state_struct, header_len, bytes_consumed,
 1018|  1.67k|                               pstr_samp_rate_info, handle_bit_buff);
 1019|  12.5k|  } else if (loas_present) {
  ------------------
  |  Branch (1019:14): [True: 0, False: 12.5k]
  ------------------
 1020|      0|    return ixheaacd_latm_header_decode(aac_state_struct, &it_bit_buff,
 1021|      0|                                       bytes_consumed, pstr_samp_rate_info);
 1022|      0|  }
 1023|       |
 1024|  12.5k|  else {
 1025|  12.5k|    WORD32 header_found = 0;
 1026|  12.5k|    WORD32 bytes_taken = -1;
 1027|  12.5k|    WORD32 prev_offset = 0;
 1028|  12.5k|    WORD32 run_once = 1;
 1029|  12.5k|    if (disable_sync == 0) run_once = 0;
  ------------------
  |  Branch (1029:9): [True: 12.5k, False: 0]
  ------------------
 1030|       |
 1031|   527k|    do {
 1032|   527k|      bytes_taken++;
 1033|   527k|      buffer += (bytes_taken - prev_offset);
 1034|       |
 1035|   527k|      prev_offset = bytes_taken;
 1036|       |
 1037|   527k|      handle_bit_buff = ixheaacd_create_bit_buf(
 1038|   527k|          &it_bit_buff, (UWORD8 *)buffer, (WORD16)(header_len - bytes_taken));
 1039|   527k|      handle_bit_buff->cnt_bits += (8 * (header_len - bytes_taken));
 1040|       |
 1041|   527k|      handle_bit_buff->pstr_adts_crc_info = &handle_bit_buff->str_adts_crc_info;
 1042|   527k|      ixheaacd_adts_crc_open(handle_bit_buff->pstr_adts_crc_info);
 1043|       |
 1044|   527k|      aac_state_struct->ldmps_present = 0;
 1045|   527k|      aac_state_struct->latm_initialized = 0;
 1046|   527k|      memset(&aac_state_struct->mps_dec_handle, 0,
 1047|   527k|             sizeof(aac_state_struct->mps_dec_handle));
 1048|   527k|      memset(&aac_state_struct->eld_specific_config, 0,
 1049|   527k|             sizeof(aac_state_struct->eld_specific_config));
 1050|       |
 1051|   527k|      if ((buffer[0] == 'A') && (buffer[1] == 'D') && (buffer[2] == 'I') &&
  ------------------
  |  Branch (1051:11): [True: 8.40k, False: 519k]
  |  Branch (1051:33): [True: 6.14k, False: 2.26k]
  |  Branch (1051:55): [True: 4.79k, False: 1.35k]
  ------------------
 1052|  4.79k|          (buffer[3] == 'F')) {
  ------------------
  |  Branch (1052:11): [True: 3.34k, False: 1.44k]
  ------------------
 1053|  3.34k|        adif.prog_config_present = 0;
 1054|  3.34k|        result = ixheaacd_get_adif_header(&adif, handle_bit_buff);
 1055|  3.34k|        if (result == 0) {
  ------------------
  |  Branch (1055:13): [True: 1, False: 3.34k]
  ------------------
 1056|      1|          if (adif.prog_config_present == 1) {
  ------------------
  |  Branch (1056:15): [True: 1, False: 0]
  ------------------
 1057|      1|            aac_state_struct->p_config->ui_pce_found_in_hdr = 1;
 1058|      1|            aac_state_struct->p_config->str_prog_config = adif.str_prog_config;
 1059|      1|          }
 1060|      1|          aac_state_struct->s_adif_hdr_present = 1;
 1061|      1|          aac_state_struct->audio_object_type =
 1062|      1|              adif.str_prog_config.object_type;
 1063|      1|          aac_state_struct->sampling_rate =
 1064|      1|              pstr_samp_rate_info[adif.str_prog_config.samp_freq_index]
 1065|      1|                  .sampling_frequency;
 1066|      1|          aac_state_struct->ch_config = adif.str_prog_config.channels;
 1067|      1|          bytes_taken +=
 1068|      1|              ((handle_bit_buff->size - handle_bit_buff->cnt_bits) >> 3);
 1069|       |
 1070|      1|          header_found = 1;
 1071|      1|          aac_state_struct->frame_length = FRAME_SIZE;
  ------------------
  |  |   25|      1|#define FRAME_SIZE 1024
  ------------------
 1072|      1|          if (aac_state_struct->audio_object_type == AOT_ER_AAC_LD)
  ------------------
  |  Branch (1072:15): [True: 0, False: 1]
  ------------------
 1073|      0|            aac_state_struct->frame_length >>= 1;
 1074|      1|        }
 1075|  3.34k|      }
 1076|       |
 1077|   524k|      else if ((sync = ixheaacd_read_bits_buf(&it_bit_buff, 12)) == 0xfff) {
  ------------------
  |  Branch (1077:16): [True: 67.2k, False: 456k]
  ------------------
 1078|  67.2k|        result = ixheaacd_check_if_adts(&adts, handle_bit_buff, usr_max_ch);
 1079|  67.2k|        if (result != 0) {
  ------------------
  |  Branch (1079:13): [True: 55.3k, False: 11.9k]
  ------------------
 1080|  55.3k|          continue;
 1081|  55.3k|        }
 1082|       |
 1083|  11.9k|        if ((adts.aac_frame_length + ADTS_HEADER_LENGTH) <
  ------------------
  |  |  103|  11.9k|#define ADTS_HEADER_LENGTH 7
  ------------------
  |  Branch (1083:13): [True: 7.13k, False: 4.79k]
  ------------------
 1084|  11.9k|            (header_len - bytes_taken)) {
 1085|  7.13k|          ia_adts_header_struct adts_loc = {0};
 1086|       |
 1087|  7.13k|          ixheaacd_create_init_bit_buf(
 1088|  7.13k|              &it_bit_buff, (UWORD8 *)(buffer + adts.aac_frame_length),
 1089|  7.13k|              (WORD16)(header_len - bytes_taken - adts.aac_frame_length));
 1090|       |
 1091|  7.13k|          handle_bit_buff = &it_bit_buff;
 1092|       |
 1093|  7.13k|          adts_loc.sync_word =
 1094|  7.13k|              (WORD16)ixheaacd_read_bits_buf(handle_bit_buff, 12);
 1095|       |
 1096|  7.13k|          if (adts_loc.sync_word != 0xFFF) {
  ------------------
  |  Branch (1096:15): [True: 6.01k, False: 1.12k]
  ------------------
 1097|  6.01k|            continue;
 1098|  6.01k|          }
 1099|       |
 1100|  1.12k|          result =
 1101|  1.12k|              ixheaacd_check_if_adts(&adts_loc, handle_bit_buff, usr_max_ch);
 1102|  1.12k|          if ((result != 0) ||
  ------------------
  |  Branch (1102:15): [True: 840, False: 284]
  ------------------
 1103|    284|              (adts.samp_freq_index != adts_loc.samp_freq_index) ||
  ------------------
  |  Branch (1103:15): [True: 225, False: 59]
  ------------------
 1104|  1.11k|              (adts.channel_configuration != adts_loc.channel_configuration)) {
  ------------------
  |  Branch (1104:15): [True: 52, False: 7]
  ------------------
 1105|  1.11k|            continue;
 1106|  1.11k|          }
 1107|  1.12k|        }
 1108|       |
 1109|  4.79k|        {
 1110|  4.79k|          WORD32 obj_type;
 1111|  4.79k|          obj_type = adts.profile;
 1112|       |
 1113|  4.79k|          aac_state_struct->audio_object_type = obj_type;
 1114|  4.79k|          aac_state_struct->sampling_rate =
 1115|  4.79k|              ((pstr_samp_rate_info[adts.samp_freq_index].sampling_frequency));
 1116|  4.79k|          aac_state_struct->ch_config = adts.channel_configuration;
 1117|  4.79k|          aac_state_struct->s_adts_hdr_present = 1;
 1118|  4.79k|          header_found = 1;
 1119|  4.79k|          aac_state_struct->bs_format = ADTS_BSFORMAT;
  ------------------
  |  |   28|  4.79k|#define ADTS_BSFORMAT 2
  ------------------
 1120|  4.79k|          aac_state_struct->frame_length = FRAME_SIZE;
  ------------------
  |  |   25|  4.79k|#define FRAME_SIZE 1024
  ------------------
 1121|  4.79k|          if (aac_state_struct->audio_object_type == AOT_ER_AAC_LD)
  ------------------
  |  Branch (1121:15): [True: 0, False: 4.79k]
  ------------------
 1122|      0|            aac_state_struct->frame_length >>= 1;
 1123|  4.79k|        }
 1124|   456k|      } else if (0x2b7 == (sync >> 1)) {
  ------------------
  |  Branch (1124:18): [True: 7.99k, False: 448k]
  ------------------
 1125|  7.99k|        ixheaacd_read_bidirection(&it_bit_buff, -12);
 1126|  7.99k|        result =
 1127|  7.99k|            ixheaacd_latm_header_decode(aac_state_struct, &it_bit_buff,
 1128|  7.99k|                                        bytes_consumed, pstr_samp_rate_info);
 1129|  7.99k|        if (result != 0) {
  ------------------
  |  Branch (1129:13): [True: 391, False: 7.60k]
  ------------------
 1130|    391|          if ((result == (WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES) ||
  ------------------
  |  |   98|    391|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  |  Branch (1130:15): [True: 19, False: 372]
  ------------------
 1131|    372|              (result < 0)) {
  ------------------
  |  Branch (1131:15): [True: 29, False: 343]
  ------------------
 1132|     48|            bytes_taken += *bytes_consumed;
 1133|     48|            *bytes_consumed = bytes_taken;
 1134|     48|            return result;
 1135|     48|          } else
 1136|    343|            bytes_taken += *bytes_consumed - 1;
 1137|    343|          continue;
 1138|    391|        }
 1139|  7.60k|        header_found = 1;
 1140|  7.60k|        aac_state_struct->bs_format = LOAS_BSFORMAT;
  ------------------
  |  |   29|  7.60k|#define LOAS_BSFORMAT 3
  ------------------
 1141|  7.60k|        bytes_taken += *bytes_consumed;
 1142|  7.60k|      }
 1143|       |
 1144|   527k|    } while ((header_found == 0 && ((bytes_taken + 1) < (header_len - 68))) &&
  ------------------
  |  Branch (1144:15): [True: 514k, False: 12.4k]
  |  Branch (1144:36): [True: 514k, False: 96]
  ------------------
 1145|   514k|             run_once != 1);
  ------------------
  |  Branch (1145:14): [True: 514k, False: 0]
  ------------------
 1146|       |
 1147|  12.5k|    if (header_found == 0 && disable_sync == 1) {
  ------------------
  |  Branch (1147:9): [True: 96, False: 12.4k]
  |  Branch (1147:30): [True: 0, False: 96]
  ------------------
 1148|      0|      WORD32 err_code;
 1149|      0|      ixheaacd_read_bidirection(&it_bit_buff, -12);
 1150|      0|      err_code =
 1151|      0|          ixheaacd_ga_hdr_dec(aac_state_struct, header_len, bytes_consumed,
 1152|      0|                              pstr_samp_rate_info, handle_bit_buff);
 1153|       |
 1154|      0|      if (err_code == 0) p_obj_exhaacplus_dec->aac_config.ui_mp4_flag = 1;
  ------------------
  |  Branch (1154:11): [True: 0, False: 0]
  ------------------
 1155|      0|      return err_code;
 1156|      0|    }
 1157|       |
 1158|  12.5k|    switch (aac_state_struct->audio_object_type) {
 1159|      3|        case AOT_AAC_MAIN:
  ------------------
  |  Branch (1159:9): [True: 3, False: 12.5k]
  ------------------
 1160|  4.80k|        case AOT_AAC_LC:
  ------------------
  |  Branch (1160:9): [True: 4.80k, False: 7.71k]
  ------------------
 1161|  4.80k|        case AOT_AAC_SSR:
  ------------------
  |  Branch (1161:9): [True: 1, False: 12.5k]
  ------------------
 1162|  5.07k|        case AOT_AAC_LTP:
  ------------------
  |  Branch (1162:9): [True: 269, False: 12.2k]
  ------------------
 1163|  5.08k|        case AOT_AAC_SCAL:
  ------------------
  |  Branch (1163:9): [True: 7, False: 12.5k]
  ------------------
 1164|  5.08k|        case AOT_TWIN_VQ:
  ------------------
  |  Branch (1164:9): [True: 4, False: 12.5k]
  ------------------
 1165|  6.03k|        case AOT_ER_AAC_LD:
  ------------------
  |  Branch (1165:9): [True: 950, False: 11.5k]
  ------------------
 1166|  7.81k|        case AOT_ER_AAC_ELD:
  ------------------
  |  Branch (1166:9): [True: 1.78k, False: 10.7k]
  ------------------
 1167|  8.50k|        case AOT_ER_AAC_LC:
  ------------------
  |  Branch (1167:9): [True: 685, False: 11.8k]
  ------------------
 1168|  12.4k|        case AOT_USAC:
  ------------------
  |  Branch (1168:9): [True: 3.90k, False: 8.61k]
  ------------------
 1169|  12.4k|          break;
 1170|     82|        default:
  ------------------
  |  Branch (1170:9): [True: 82, False: 12.4k]
  ------------------
 1171|     82|          return IA_XHEAAC_DEC_INIT_FATAL_AUDIOOBJECTTYPE_NOT_SUPPORTED;
  ------------------
  |  |   86|     82|#define IA_XHEAAC_DEC_INIT_FATAL_AUDIOOBJECTTYPE_NOT_SUPPORTED 0xFFFF9003
  ------------------
 1172|  12.5k|      }
 1173|       |
 1174|  12.4k|    if (aac_state_struct->audio_object_type != AOT_USAC)
  ------------------
  |  Branch (1174:9): [True: 8.50k, False: 3.90k]
  ------------------
 1175|  8.50k|      aac_state_struct->usac_flag = 0;
 1176|  12.4k|    *bytes_consumed = bytes_taken;
 1177|       |
 1178|  12.4k|    if ((handle_bit_buff->cnt_bits < 0) &&
  ------------------
  |  Branch (1178:9): [True: 0, False: 12.4k]
  ------------------
 1179|      0|        (handle_bit_buff->size <
  ------------------
  |  Branch (1179:9): [True: 0, False: 0]
  ------------------
 1180|      0|         (usr_max_ch * (IA_ENHAACPLUS_DEC_INP_BUF_SIZE << 3)))) {
  ------------------
  |  |   42|      0|#define IA_ENHAACPLUS_DEC_INP_BUF_SIZE (6144 / 8)
  ------------------
 1181|      0|      return (WORD16)(
 1182|      0|          (WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|      0|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
 1183|      0|    }
 1184|       |
 1185|  12.4k|    if (header_found == 0) {
  ------------------
  |  Branch (1185:9): [True: 14, False: 12.3k]
  ------------------
 1186|     14|      *bytes_consumed = bytes_taken + 1;
 1187|     14|      return IA_XHEAAC_DEC_INIT_NONFATAL_HEADER_NOT_AT_START;
  ------------------
  |  |   76|     14|#define IA_XHEAAC_DEC_INIT_NONFATAL_HEADER_NOT_AT_START 0x00001000
  ------------------
 1188|  12.3k|    } else {
 1189|  12.3k|      return 0;
 1190|  12.3k|    }
 1191|  12.4k|  }
 1192|  14.2k|}
ixheaacd_headerdecode.c:ixheaacd_aac_bytealign:
  106|  47.8k|ixheaacd_aac_bytealign(struct ia_bit_buf_struct *it_bit_buff) {
  107|  47.8k|  WORD16 num_bit;
  108|  47.8k|  num_bit = (it_bit_buff->bit_pos + 1);
  109|  47.8k|  if (num_bit != 8) {
  ------------------
  |  Branch (109:7): [True: 0, False: 47.8k]
  ------------------
  110|      0|    it_bit_buff->bit_pos = 7;
  111|      0|    it_bit_buff->cnt_bits -= num_bit;
  112|      0|    it_bit_buff->ptr_read_next += 1;
  113|      0|  }
  114|  47.8k|}
ixheaacd_headerdecode.c:ixheaacd_get_ld_sbr_header:
  417|  25.4k|    ia_sbr_header_data_struct *sbr_header_data) {
  418|  25.4k|  WORD32 header_extra_1, header_extra_2;
  419|  25.4k|  UWORD32 tmp, bit_cnt = 0;
  420|       |
  421|  25.4k|  tmp = ixheaacd_read_bits_buf(it_bit_buff, 16);
  422|  25.4k|  bit_cnt += 16;
  423|       |
  424|  25.4k|  sbr_header_data->amp_res = (tmp & 0x8000) >> 15;
  425|  25.4k|  sbr_header_data->start_freq = (tmp & 0x7800) >> 11;
  426|  25.4k|  sbr_header_data->stop_freq = (tmp & 0x780) >> 7;
  427|  25.4k|  sbr_header_data->xover_band = (tmp & 0x70) >> 4;
  428|  25.4k|  header_extra_1 = (tmp & 0x0002) >> 1;
  429|  25.4k|  header_extra_2 = (tmp & 0x0001);
  430|       |
  431|  25.4k|  if (header_extra_1) {
  ------------------
  |  Branch (431:7): [True: 3.19k, False: 22.2k]
  ------------------
  432|  3.19k|    sbr_header_data->freq_scale = ixheaacd_read_bits_buf(it_bit_buff, 2);
  433|  3.19k|    sbr_header_data->alter_scale = ixheaacd_read_bits_buf(it_bit_buff, 1);
  434|  3.19k|    sbr_header_data->noise_bands = ixheaacd_read_bits_buf(it_bit_buff, 2);
  435|  22.2k|  } else {
  436|  22.2k|    sbr_header_data->freq_scale = 2;
  437|  22.2k|    sbr_header_data->alter_scale = 1;
  438|  22.2k|    sbr_header_data->noise_bands = 2;
  439|  22.2k|  }
  440|       |
  441|  25.4k|  if (header_extra_2) {
  ------------------
  |  Branch (441:7): [True: 1.82k, False: 23.6k]
  ------------------
  442|  1.82k|    sbr_header_data->limiter_bands = ixheaacd_read_bits_buf(it_bit_buff, 2);
  443|  1.82k|    sbr_header_data->limiter_gains = ixheaacd_read_bits_buf(it_bit_buff, 2);
  444|  1.82k|    sbr_header_data->interpol_freq = ixheaacd_read_bits_buf(it_bit_buff, 1);
  445|  1.82k|    sbr_header_data->smoothing_mode = ixheaacd_read_bits_buf(it_bit_buff, 1);
  446|  23.6k|  } else {
  447|  23.6k|    sbr_header_data->limiter_bands = 2;
  448|  23.6k|    sbr_header_data->limiter_gains = 2;
  449|  23.6k|    sbr_header_data->interpol_freq = 1;
  450|  23.6k|    sbr_header_data->smoothing_mode = 1;
  451|  23.6k|  }
  452|       |
  453|  25.4k|  return (bit_cnt);
  454|  25.4k|}
ixheaacd_headerdecode.c:ixheaacd_get_adif_header:
  260|  3.34k|    ia_adif_header_struct *adif, struct ia_bit_buf_struct *it_bit_buff) {
  261|  3.34k|  WORD32 i;
  262|  3.34k|  WORD32 ret_val = 0, tmp;
  263|       |
  264|  3.34k|  ixheaacd_read_bits_buf(it_bit_buff, 16);
  265|  3.34k|  tmp = ixheaacd_read_bits_buf(it_bit_buff, 17);
  266|       |
  267|  3.34k|  if (tmp & 0x1) {
  ------------------
  |  Branch (267:7): [True: 940, False: 2.40k]
  ------------------
  268|    940|    ixheaacd_skip_bits(it_bit_buff, 8, 9);
  269|    940|  }
  270|       |
  271|  3.34k|  tmp = ixheaacd_read_bits_buf(it_bit_buff, 3);
  272|       |
  273|  3.34k|  adif->bit_stream_type = (tmp & 0x1);
  274|       |
  275|  3.34k|  ixheaacd_read_bits_buf(it_bit_buff, 23);
  276|       |
  277|  3.34k|  tmp = ixheaacd_read_bits_buf(it_bit_buff, 4);
  278|       |
  279|  6.01k|  for (i = 0; i <= tmp; i++) {
  ------------------
  |  Branch (279:15): [True: 5.98k, False: 24]
  ------------------
  280|  5.98k|    if (adif->bit_stream_type == 0) {
  ------------------
  |  Branch (280:9): [True: 5.59k, False: 391]
  ------------------
  281|  5.59k|      ixheaacd_read_bits_buf(it_bit_buff, 20);
  282|  5.59k|    }
  283|       |
  284|  5.98k|    adif->prog_config_present = 1;
  285|  5.98k|    adif->str_prog_config.alignment_bits = 7;
  286|  5.98k|    ret_val =
  287|  5.98k|        ixheaacd_read_prog_config_element(&adif->str_prog_config, it_bit_buff);
  288|  5.98k|    if (ret_val) {
  ------------------
  |  Branch (288:9): [True: 3.31k, False: 2.67k]
  ------------------
  289|  3.31k|      return ret_val;
  290|  3.31k|    }
  291|  5.98k|  }
  292|       |
  293|     24|  return 0;
  294|  3.34k|}

ixheaacd_huff_code_reorder_tbl_init:
  101|   275k|VOID ixheaacd_huff_code_reorder_tbl_init(ia_hcr_info_struct *ptr_hcr_info) {
  102|   275k|  ptr_hcr_info->codebook_pairs.ptr_min_cb_pair_tbl =
  103|   275k|      ixheaacd_min_huff_cb_pair_tbl;
  104|   275k|  ptr_hcr_info->codebook_pairs.ptr_max_cb_pair_tbl =
  105|   275k|      ixheaacd_max_huff_cb_pair_table;
  106|   275k|  ptr_hcr_info->table_info.ptr_max_cw_len_tbl = ixheaacd_max_huff_cw_len_table;
  107|   275k|  ptr_hcr_info->table_info.ptr_cb_dimension_tbl = ixheaacd_huff_cb_dim_table;
  108|   275k|  ptr_hcr_info->table_info.ptr_cb_dim_shift_tbl =
  109|   275k|      ixheaacd_huff_cb_dim_shift_table;
  110|   275k|  ptr_hcr_info->table_info.ptr_cb_sign_tbl = ixheaacd_huff_cb_sign_table;
  111|   275k|  ptr_hcr_info->table_info.ptr_cb_priority = ixheaacd_huff_cb_priority_table;
  112|   275k|  ptr_hcr_info->table_info.ptr_lav_tbl = ixheaacd_huff_reord_lav_table;
  113|   275k|}
ixheaacd_huff_mute_erroneous_lines:
  115|  25.2k|VOID ixheaacd_huff_mute_erroneous_lines(ia_hcr_info_struct *ptr_hcr_info) {
  116|  25.2k|  WORD32 c;
  117|  25.2k|  WORD32 *ptr_long = ptr_hcr_info->str_dec_io.ptr_quant_spec_coeff_base;
  118|       |
  119|  25.8M|  for (c = 0; c < 1024; c++) {
  ------------------
  |  Branch (119:15): [True: 25.8M, False: 25.2k]
  ------------------
  120|  25.8M|    if (ptr_long[c] == (WORD32)8192) {
  ------------------
  |  Branch (120:9): [True: 58.9k, False: 25.7M]
  ------------------
  121|  58.9k|      ptr_long[c] = 0;
  122|  58.9k|    }
  123|  25.8M|  }
  124|  25.2k|}
ixheaacd_huff_code_reorder_init:
  268|  31.2k|    ia_aac_dec_tables_struct *ptr_aac_tables, ia_bit_buf_struct *itt_bit_buff) {
  269|  31.2k|  ia_ics_info_struct *ptr_ics_info = &ptr_aac_dec_channel_info->str_ics_info;
  270|  31.2k|  WORD16 *ptr_num_sect_lines;
  271|  31.2k|  UWORD8 *ptr_cb;
  272|  31.2k|  WORD16 num_sect;
  273|  31.2k|  WORD8 cb;
  274|  31.2k|  WORD32 num_line;
  275|  31.2k|  WORD32 i;
  276|       |
  277|  31.2k|  ptr_hcr_info->str_dec_io.reordered_spec_data_len =
  278|  31.2k|      ptr_aac_dec_channel_info->reorder_spect_data_len;
  279|  31.2k|  ptr_hcr_info->str_dec_io.longest_cw_len =
  280|  31.2k|      ptr_aac_dec_channel_info->longest_cw_len;
  281|  31.2k|  ptr_hcr_info->str_dec_io.ptr_quant_spec_coeff_base =
  282|  31.2k|      ptr_aac_dec_channel_info->ptr_spec_coeff;
  283|  31.2k|  ptr_hcr_info->str_dec_io.quant_spec_coeff_idx = 0;
  284|  31.2k|  ptr_hcr_info->str_dec_io.ptr_cb = ptr_aac_dec_channel_info->cb4_hcr_arr;
  285|  31.2k|  ptr_hcr_info->str_dec_io.ptr_num_line_in_sect =
  286|  31.2k|      ptr_aac_dec_channel_info->num_line_in_sec4_hcr_arr;
  287|  31.2k|  ptr_hcr_info->str_dec_io.num_sect = ptr_aac_dec_channel_info->number_sect;
  288|  31.2k|  ptr_hcr_info->str_dec_io.err_log = 0;
  289|  31.2k|  ptr_hcr_info->str_non_pcw_side_info.ptr_result_base =
  290|  31.2k|      ptr_aac_dec_channel_info->ptr_spec_coeff;
  291|       |
  292|  31.2k|  ptr_hcr_info->str_dec_io.bit_str_idx =
  293|  31.2k|      itt_bit_buff->size - itt_bit_buff->cnt_bits;
  294|  31.2k|  itt_bit_buff->byte_ptr = (UWORD8 *)ptr_aac_dec_channel_info->scratch_buf_ptr;
  295|  31.2k|  itt_bit_buff->ptr_start = (UWORD8 *)ptr_aac_dec_channel_info->scratch_buf_ptr;
  296|       |
  297|  31.2k|  if (ptr_aac_dec_channel_info->str_ics_info.window_sequence ==
  ------------------
  |  Branch (297:7): [True: 11.7k, False: 19.5k]
  ------------------
  298|  31.2k|      EIGHT_SHORT_SEQUENCE) {
  ------------------
  |  |  102|  31.2k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  299|  11.7k|    WORD16 band;
  300|  11.7k|    WORD16 max_band;
  301|  11.7k|    WORD8 group;
  302|  11.7k|    WORD8 win_group_len;
  303|  11.7k|    WORD8 window;
  304|  11.7k|    WORD8 num_unit_in_band;
  305|  11.7k|    WORD8 cnt_unit_in_band;
  306|  11.7k|    WORD8 grp_win;
  307|  11.7k|    WORD8 cb_prev;
  308|       |
  309|  11.7k|    WORD8 *ptr_code_book;
  310|  11.7k|    const WORD16 *band_offsets;
  311|  11.7k|    WORD16 num_groups;
  312|       |
  313|  11.7k|    ptr_code_book = ptr_aac_dec_channel_info->ptr_code_book;
  314|  11.7k|    ptr_num_sect_lines = ptr_hcr_info->str_dec_io.ptr_num_line_in_sect;
  315|  11.7k|    ptr_cb = ptr_hcr_info->str_dec_io.ptr_cb;
  316|  11.7k|    band_offsets = (WORD16 *)ixheaacd_getscalefactorbandoffsets(ptr_ics_info,
  317|  11.7k|                                                                ptr_aac_tables);
  318|  11.7k|    num_groups = ptr_ics_info->num_window_groups;
  319|       |
  320|  11.7k|    num_line = 0;
  321|  11.7k|    num_sect = 0;
  322|  11.7k|    cb = ptr_code_book[0];
  323|  11.7k|    cb_prev = ptr_code_book[0];
  324|       |
  325|  11.7k|    *ptr_cb++ = cb_prev;
  326|       |
  327|  11.7k|    max_band = ptr_ics_info->max_sfb;
  328|   103k|    for (band = 0; band < max_band; band++) {
  ------------------
  |  Branch (328:20): [True: 91.2k, False: 11.7k]
  ------------------
  329|  91.2k|      num_unit_in_band = ((band_offsets[band + 1] - band_offsets[band]) >> 2);
  330|   262k|      for (cnt_unit_in_band = num_unit_in_band; cnt_unit_in_band != 0;
  ------------------
  |  Branch (330:49): [True: 171k, False: 91.2k]
  ------------------
  331|   171k|           cnt_unit_in_band--) {
  332|   582k|        for (window = 0, group = 0; group < num_groups; group++) {
  ------------------
  |  Branch (332:37): [True: 411k, False: 171k]
  ------------------
  333|   411k|          win_group_len = ptr_ics_info->window_group_length[group];
  334|  1.78M|          for (grp_win = win_group_len; grp_win != 0; grp_win--, window++) {
  ------------------
  |  Branch (334:41): [True: 1.36M, False: 411k]
  ------------------
  335|  1.36M|            cb = ptr_code_book[group * 16 + band];
  336|  1.36M|            if (cb != cb_prev) {
  ------------------
  |  Branch (336:17): [True: 323k, False: 1.04M]
  ------------------
  337|   323k|              ixheaacd_validate_hcr_sideinfo(cb, num_line,
  338|   323k|                                             &ptr_hcr_info->str_dec_io.err_log);
  339|   323k|              if (ptr_hcr_info->str_dec_io.err_log != 0) {
  ------------------
  |  Branch (339:19): [True: 0, False: 323k]
  ------------------
  340|      0|                return (ptr_hcr_info->str_dec_io.err_log);
  341|      0|              }
  342|   323k|              *ptr_cb++ = cb;
  343|   323k|              *ptr_num_sect_lines++ = num_line;
  344|   323k|              num_sect++;
  345|       |
  346|   323k|              cb_prev = cb;
  347|   323k|              num_line = LINES_PER_UNIT;
  ------------------
  |  |  154|   323k|#define LINES_PER_UNIT 4
  ------------------
  348|  1.04M|            } else {
  349|  1.04M|              num_line += LINES_PER_UNIT;
  ------------------
  |  |  154|  1.04M|#define LINES_PER_UNIT 4
  ------------------
  350|  1.04M|            }
  351|  1.36M|          }
  352|   411k|        }
  353|   171k|      }
  354|  91.2k|    }
  355|       |
  356|  11.7k|    num_sect++;
  357|       |
  358|  11.7k|    ixheaacd_validate_hcr_sideinfo(cb, num_line,
  359|  11.7k|                                   &ptr_hcr_info->str_dec_io.err_log);
  360|  11.7k|    if (num_sect <= 0 || num_sect > 1024 / 2) {
  ------------------
  |  Branch (360:9): [True: 0, False: 11.7k]
  |  Branch (360:26): [True: 0, False: 11.7k]
  ------------------
  361|      0|      ptr_hcr_info->str_dec_io.err_log |= (ERROR_POS << 7);
  ------------------
  |  |  185|      0|#define ERROR_POS 0x00000001
  ------------------
  362|      0|    }
  363|  11.7k|    ixheaacd_validate_hcr_lengths(
  364|  11.7k|        ptr_hcr_info->str_dec_io.longest_cw_len,
  365|  11.7k|        ptr_hcr_info->str_dec_io.reordered_spec_data_len,
  366|  11.7k|        &ptr_hcr_info->str_dec_io.err_log);
  367|  11.7k|    if (ptr_hcr_info->str_dec_io.err_log != 0) {
  ------------------
  |  Branch (367:9): [True: 13, False: 11.7k]
  ------------------
  368|     13|      return (ptr_hcr_info->str_dec_io.err_log);
  369|     13|    }
  370|       |
  371|  11.7k|    *ptr_cb = cb;
  372|  11.7k|    *ptr_num_sect_lines = num_line;
  373|  11.7k|    ptr_hcr_info->str_dec_io.num_sect = num_sect;
  374|       |
  375|  19.5k|  } else {
  376|  19.5k|    ixheaacd_validate_hcr_lengths(
  377|  19.5k|        ptr_hcr_info->str_dec_io.longest_cw_len,
  378|  19.5k|        ptr_hcr_info->str_dec_io.reordered_spec_data_len,
  379|  19.5k|        &ptr_hcr_info->str_dec_io.err_log);
  380|  19.5k|    num_sect = ptr_hcr_info->str_dec_io.num_sect;
  381|  19.5k|    ptr_num_sect_lines = ptr_hcr_info->str_dec_io.ptr_num_line_in_sect;
  382|  19.5k|    ptr_cb = ptr_hcr_info->str_dec_io.ptr_cb;
  383|  19.5k|    if (num_sect <= 0 || num_sect > 64) {
  ------------------
  |  Branch (383:9): [True: 57, False: 19.5k]
  |  Branch (383:26): [True: 46, False: 19.4k]
  ------------------
  384|    103|      ptr_hcr_info->str_dec_io.err_log |= (ERROR_POS << 6);
  ------------------
  |  |  185|    103|#define ERROR_POS 0x00000001
  ------------------
  385|    103|      num_sect = 0;
  386|    103|    }
  387|       |
  388|   120k|    for (i = num_sect; i != 0; i--) {
  ------------------
  |  Branch (388:24): [True: 101k, False: 19.5k]
  ------------------
  389|   101k|      cb = *ptr_cb++;
  390|       |
  391|   101k|      if (cb < ZERO_HCB || cb >= MAX_CB_CHECK || cb == (ESC_HCB + 1)) {
  ------------------
  |  |   33|   202k|#define ZERO_HCB 0
  ------------------
                    if (cb < ZERO_HCB || cb >= MAX_CB_CHECK || cb == (ESC_HCB + 1)) {
  ------------------
  |  |  172|   202k|#define MAX_CB_CHECK 32
  ------------------
                    if (cb < ZERO_HCB || cb >= MAX_CB_CHECK || cb == (ESC_HCB + 1)) {
  ------------------
  |  |   37|   101k|#define ESC_HCB 11
  ------------------
  |  Branch (391:11): [True: 0, False: 101k]
  |  Branch (391:28): [True: 0, False: 101k]
  |  Branch (391:50): [True: 0, False: 101k]
  ------------------
  392|      0|        ptr_hcr_info->str_dec_io.err_log |= (ERROR_POS << 2);
  ------------------
  |  |  185|      0|#define ERROR_POS 0x00000001
  ------------------
  393|      0|      }
  394|       |
  395|   101k|      num_line = *ptr_num_sect_lines++;
  396|       |
  397|   101k|      if ((num_line <= 0) || (num_line > 1024)) {
  ------------------
  |  Branch (397:11): [True: 72, False: 101k]
  |  Branch (397:30): [True: 0, False: 101k]
  ------------------
  398|     72|        ptr_hcr_info->str_dec_io.err_log |= (ERROR_POS << 3);
  ------------------
  |  |  185|     72|#define ERROR_POS 0x00000001
  ------------------
  399|     72|      }
  400|   101k|    }
  401|  19.5k|    if (ptr_hcr_info->str_dec_io.err_log != 0) {
  ------------------
  |  Branch (401:9): [True: 243, False: 19.3k]
  ------------------
  402|    243|      return (ptr_hcr_info->str_dec_io.err_log);
  403|    243|    }
  404|  19.5k|  }
  405|       |
  406|  31.0k|  ptr_cb = ptr_hcr_info->str_dec_io.ptr_cb;
  407|   465k|  for (i = 0; i < num_sect; i++) {
  ------------------
  |  Branch (407:15): [True: 434k, False: 31.0k]
  ------------------
  408|   434k|    if ((*ptr_cb == NOISE_HCB) || (*ptr_cb == INTENSITY_HCB2) ||
  ------------------
  |  |   38|   434k|#define NOISE_HCB 13
  ------------------
                  if ((*ptr_cb == NOISE_HCB) || (*ptr_cb == INTENSITY_HCB2) ||
  ------------------
  |  |   39|   409k|#define INTENSITY_HCB2 14
  ------------------
  |  Branch (408:9): [True: 24.5k, False: 409k]
  |  Branch (408:35): [True: 18.3k, False: 391k]
  ------------------
  409|   391k|        (*ptr_cb == INTENSITY_HCB)) {
  ------------------
  |  |   40|   391k|#define INTENSITY_HCB 15
  ------------------
  |  Branch (409:9): [True: 36.1k, False: 355k]
  ------------------
  410|  79.0k|      *ptr_cb = 0;
  411|  79.0k|    }
  412|   434k|    ptr_cb++;
  413|   434k|  }
  414|       |
  415|  31.0k|  return (ptr_hcr_info->str_dec_io.err_log);
  416|  31.2k|}
ixheaacd_toggle_read_dir:
 1287|   101k|UWORD8 ixheaacd_toggle_read_dir(UWORD8 read_direction) {
 1288|   101k|  if (read_direction == FROM_LEFT_TO_RIGHT) {
  ------------------
  |  |  160|   101k|#define FROM_LEFT_TO_RIGHT 0
  ------------------
  |  Branch (1288:7): [True: 46.3k, False: 55.1k]
  ------------------
 1289|  46.3k|    return FROM_RIGHT_TO_LEFT;
  ------------------
  |  |  161|  46.3k|#define FROM_RIGHT_TO_LEFT 1
  ------------------
 1290|  55.1k|  } else {
 1291|  55.1k|    return FROM_LEFT_TO_RIGHT;
  ------------------
  |  |  160|  55.1k|#define FROM_LEFT_TO_RIGHT 0
  ------------------
 1292|  55.1k|  }
 1293|   101k|}
ixheaacd_decode_non_pcw:
 1695|  15.7k|                             ia_aac_dec_tables_struct *ptr_aac_tables) {
 1696|  15.7k|  UWORD32 num_valid_segment;
 1697|  15.7k|  WORD32 cw_offset;
 1698|  15.7k|  WORD32 trial;
 1699|  15.7k|  WORD32 num_segment;
 1700|  15.7k|  WORD32 num_code_word;
 1701|  15.7k|  UWORD8 num_set;
 1702|  15.7k|  UWORD8 current_set;
 1703|  15.7k|  WORD32 code_word_set;
 1704|  15.7k|  WORD32 loop1, loop2;
 1705|       |
 1706|  15.7k|  num_segment = ptr_hcr_info->str_segment_info.num_segment;
 1707|       |
 1708|  15.7k|  num_valid_segment = ixheaacd_init_segment_bit_field(
 1709|  15.7k|      num_segment, ptr_hcr_info->str_segment_info.p_remaining_bits_in_seg);
 1710|       |
 1711|  15.7k|  if (num_valid_segment != 0) {
  ------------------
  |  Branch (1711:7): [True: 15.0k, False: 740]
  ------------------
 1712|  15.0k|    num_code_word = ptr_hcr_info->sect_info.num_code_word;
 1713|  15.0k|    num_set = ((num_code_word - 1) / num_segment) + 1;
 1714|       |
 1715|  15.0k|    ptr_hcr_info->str_segment_info.read_direction = FROM_RIGHT_TO_LEFT;
  ------------------
  |  |  161|  15.0k|#define FROM_RIGHT_TO_LEFT 1
  ------------------
 1716|       |
 1717|   116k|    for (current_set = 1; current_set < num_set; current_set++) {
  ------------------
  |  Branch (1717:27): [True: 101k, False: 15.0k]
  ------------------
 1718|   101k|      num_code_word -= num_segment;
 1719|   101k|      if (num_code_word < num_segment) {
  ------------------
  |  Branch (1719:11): [True: 9.33k, False: 92.3k]
  ------------------
 1720|  9.33k|        code_word_set = num_code_word;
 1721|  92.3k|      } else {
 1722|  92.3k|        code_word_set = num_segment;
 1723|  92.3k|      }
 1724|       |
 1725|   101k|      ixheaacd_nonpcw_sideinfo_init(ptr_hcr_info);
 1726|       |
 1727|   101k|      cw_offset = num_segment * current_set;
 1728|       |
 1729|   101k|      ixheaacd_decode_hcr_non_pcw(itt_bit_buff, ptr_hcr_info, ptr_aac_tables,
 1730|   101k|                                  &cw_offset, code_word_set, 0);
 1731|       |
 1732|  1.55M|      for (trial = 1; trial < num_segment; trial++) {
  ------------------
  |  Branch (1732:23): [True: 1.45M, False: 101k]
  ------------------
 1733|  1.45M|        cw_offset = num_segment * current_set;
 1734|       |
 1735|  1.45M|        loop1 = min(num_segment, trial + code_word_set);
  ------------------
  |  |   75|  1.45M|#define min(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (75:20): [True: 1.16M, False: 295k]
  |  |  ------------------
  ------------------
 1736|  1.45M|        loop2 = max(0, trial + code_word_set - num_segment);
  ------------------
  |  |   74|  1.45M|#define max(a, b) (((a) > (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (74:20): [True: 286k, False: 1.17M]
  |  |  ------------------
  ------------------
 1737|       |
 1738|  1.45M|        ixheaacd_decode_hcr_non_pcw(itt_bit_buff, ptr_hcr_info, ptr_aac_tables,
 1739|  1.45M|                                    &cw_offset, loop1, trial);
 1740|       |
 1741|  1.45M|        ixheaacd_decode_hcr_non_pcw(itt_bit_buff, ptr_hcr_info, ptr_aac_tables,
 1742|  1.45M|                                    &cw_offset, loop2, 0);
 1743|  1.45M|      }
 1744|       |
 1745|   101k|      ptr_hcr_info->str_segment_info.read_direction = ixheaacd_toggle_read_dir(
 1746|   101k|          ptr_hcr_info->str_segment_info.read_direction);
 1747|   101k|    }
 1748|  15.0k|  }
 1749|  15.7k|}
ixheaacd_hcr_decoder:
 1846|  31.0k|    ia_aac_dec_tables_struct *ptr_aac_tables, ia_bit_buf_struct *itt_bit_buff) {
 1847|  31.0k|  WORD32 ptr_tmp1, ptr_tmp2, ptr_tmp3, ptr_tmp4;
 1848|  31.0k|  WORD32 ptr_tmp5;
 1849|       |
 1850|  31.0k|  WORD32 bit_cnt_offset;
 1851|  31.0k|  UWORD32 save_bit_cnt = itt_bit_buff->cnt_bits;
 1852|       |
 1853|  31.0k|  ixheaacd_huff_calc_num_cwd(ptr_hcr_info);
 1854|       |
 1855|  31.0k|  ixheaacd_huff_sort_sect_cb_cwd(ptr_hcr_info);
 1856|       |
 1857|  31.0k|  if (ixheaacd_hcr_prepare_segmentation_grid(ptr_hcr_info) != 0)
  ------------------
  |  Branch (1857:7): [True: 3.51k, False: 27.5k]
  ------------------
 1858|  3.51k|    return (ptr_hcr_info->str_dec_io.err_log);
 1859|       |
 1860|  27.5k|  ixheaacd_huff_ext_sect_info(ptr_hcr_info);
 1861|       |
 1862|  27.5k|  if ((ptr_hcr_info->str_dec_io.err_log & HCR_FATAL_PCW_ERROR_MASK) != 0) {
  ------------------
  |  |  186|  27.5k|#define HCR_FATAL_PCW_ERROR_MASK 0x100E01FC
  ------------------
  |  Branch (1862:7): [True: 31, False: 27.4k]
  ------------------
 1863|     31|    return (ptr_hcr_info->str_dec_io.err_log);
 1864|     31|  }
 1865|       |
 1866|  27.4k|  ixheaacd_calc_num_ext_sorted_sect_sets(
 1867|  27.4k|      ptr_hcr_info->str_segment_info.num_segment,
 1868|  27.4k|      ptr_hcr_info->sect_info.ptr_num_ext_sorted_cw_in_sect,
 1869|  27.4k|      ptr_hcr_info->sect_info.num_ext_sorted_cw_in_sect_idx,
 1870|  27.4k|      ptr_hcr_info->sect_info.ptr_num_ext_sorted_sect_in_sets,
 1871|  27.4k|      ptr_hcr_info->sect_info.num_ext_sorted_sect_in_sets_idx);
 1872|       |
 1873|  27.4k|  ptr_tmp1 = ptr_hcr_info->sect_info.num_ext_sorted_cw_in_sect_idx;
 1874|  27.4k|  ptr_tmp2 = ptr_hcr_info->sect_info.ext_sorted_cw_idx;
 1875|  27.4k|  ptr_tmp3 = ptr_hcr_info->sect_info.num_ext_sorted_sect_in_sets_idx;
 1876|  27.4k|  ptr_tmp4 = ptr_hcr_info->str_dec_io.quant_spec_coeff_idx;
 1877|  27.4k|  ptr_tmp5 = ptr_hcr_info->sect_info.ext_sorted_sect_max_cb_len_idx;
 1878|       |
 1879|  27.4k|  ixheaacd_decode_pcw(itt_bit_buff, ptr_hcr_info, ptr_aac_tables);
 1880|       |
 1881|  27.4k|  if ((ptr_hcr_info->str_dec_io.err_log & HCR_FATAL_PCW_ERROR_MASK) == 0) {
  ------------------
  |  |  186|  27.4k|#define HCR_FATAL_PCW_ERROR_MASK 0x100E01FC
  ------------------
  |  Branch (1881:7): [True: 15.7k, False: 11.7k]
  ------------------
 1882|  15.7k|    ixheaacd_decode_non_pcw(itt_bit_buff, ptr_hcr_info, ptr_aac_tables);
 1883|  15.7k|  }
 1884|       |
 1885|  27.4k|  ixheaacd_err_detect_segmentation_final(ptr_hcr_info);
 1886|       |
 1887|  27.4k|  ptr_hcr_info->sect_info.num_ext_sorted_cw_in_sect_idx = ptr_tmp1;
 1888|  27.4k|  ptr_hcr_info->sect_info.ext_sorted_cw_idx = ptr_tmp2;
 1889|  27.4k|  ptr_hcr_info->sect_info.num_ext_sorted_sect_in_sets_idx = ptr_tmp3;
 1890|  27.4k|  ptr_hcr_info->str_dec_io.quant_spec_coeff_idx = ptr_tmp4;
 1891|  27.4k|  ptr_hcr_info->sect_info.ext_sorted_sect_max_cb_len_idx = ptr_tmp5;
 1892|       |
 1893|  27.4k|  ixheaacd_hcr_reorder_quantized_spec_coeff(ptr_hcr_info,
 1894|  27.4k|                                            ptr_aac_dec_channel_info);
 1895|       |
 1896|  27.4k|  bit_cnt_offset = (WORD32)itt_bit_buff->cnt_bits - (WORD32)save_bit_cnt;
 1897|  27.4k|  if (bit_cnt_offset) {
  ------------------
  |  Branch (1897:7): [True: 26.9k, False: 515]
  ------------------
 1898|  26.9k|    itt_bit_buff->cnt_bits += -bit_cnt_offset;
 1899|  26.9k|    itt_bit_buff->ptr_read_next =
 1900|  26.9k|        itt_bit_buff->ptr_bit_buf_base +
 1901|  26.9k|        ((itt_bit_buff->size - itt_bit_buff->cnt_bits) >> 3);
 1902|  26.9k|    itt_bit_buff->bit_pos = (itt_bit_buff->size - itt_bit_buff->cnt_bits) & 7;
 1903|  26.9k|  }
 1904|       |
 1905|  27.4k|  return (ptr_hcr_info->str_dec_io.err_log);
 1906|  27.5k|}
ixheaacd_huff_code_reorder.c:ixheaacd_validate_hcr_sideinfo:
  248|   334k|                                           UWORD32 *error_word) {
  249|   334k|  if (cb < ZERO_HCB || cb >= MAX_CB_CHECK || cb == (ESC_HCB + 1)) {
  ------------------
  |  |   33|   669k|#define ZERO_HCB 0
  ------------------
                if (cb < ZERO_HCB || cb >= MAX_CB_CHECK || cb == (ESC_HCB + 1)) {
  ------------------
  |  |  172|   669k|#define MAX_CB_CHECK 32
  ------------------
                if (cb < ZERO_HCB || cb >= MAX_CB_CHECK || cb == (ESC_HCB + 1)) {
  ------------------
  |  |   37|   334k|#define ESC_HCB 11
  ------------------
  |  Branch (249:7): [True: 0, False: 334k]
  |  Branch (249:24): [True: 0, False: 334k]
  |  Branch (249:46): [True: 0, False: 334k]
  ------------------
  250|      0|    *error_word |= (ERROR_POS << 4);
  ------------------
  |  |  185|      0|#define ERROR_POS 0x00000001
  ------------------
  251|      0|  }
  252|   334k|  if (num_line < 0 || num_line > 1024) {
  ------------------
  |  Branch (252:7): [True: 0, False: 334k]
  |  Branch (252:23): [True: 0, False: 334k]
  ------------------
  253|      0|    *error_word |= (ERROR_POS << 5);
  ------------------
  |  |  185|      0|#define ERROR_POS 0x00000001
  ------------------
  254|      0|  }
  255|   334k|}
ixheaacd_huff_code_reorder.c:ixheaacd_validate_hcr_lengths:
  259|  31.2k|                                          UWORD32 *error_word) {
  260|  31.2k|  if (reordered_spec_data_len < longest_cw_len) {
  ------------------
  |  Branch (260:7): [True: 155, False: 31.1k]
  ------------------
  261|    155|    *error_word |= (ERROR_POS << 8);
  ------------------
  |  |  185|    155|#define ERROR_POS 0x00000001
  ------------------
  262|    155|  }
  263|  31.2k|}
ixheaacd_huff_code_reorder.c:ixheaacd_init_segment_bit_field:
 1274|  15.7k|                                               WORD8 *p_remaining_bits_in_seg) {
 1275|  15.7k|  WORD16 i;
 1276|  15.7k|  WORD16 num_valid_segment = 0;
 1277|       |
 1278|  1.09M|  for (i = 0; i < num_segment; i++) {
  ------------------
  |  Branch (1278:15): [True: 1.08M, False: 15.7k]
  ------------------
 1279|  1.08M|    if (p_remaining_bits_in_seg[i] != 0) {
  ------------------
  |  Branch (1279:9): [True: 1.04M, False: 32.5k]
  ------------------
 1280|  1.04M|      num_valid_segment += 1;
 1281|  1.04M|    }
 1282|  1.08M|  }
 1283|       |
 1284|  15.7k|  return num_valid_segment;
 1285|  15.7k|}
ixheaacd_huff_code_reorder.c:ixheaacd_nonpcw_sideinfo_init:
  152|   101k|static VOID ixheaacd_nonpcw_sideinfo_init(ia_hcr_info_struct *ptr_hcr_info) {
  153|   101k|  UWORD16 i, k;
  154|   101k|  UWORD8 cb_dim;
  155|   101k|  UWORD8 *ptr_cb = ptr_hcr_info->str_non_pcw_side_info.ptr_cb;
  156|   101k|  UWORD16 *res_ptr_idx = ptr_hcr_info->str_non_pcw_side_info.res_ptr_idx;
  157|   101k|  UWORD16 *ptr_num_ext_sorted_cw_in_sect =
  158|   101k|      ptr_hcr_info->sect_info.ptr_num_ext_sorted_cw_in_sect;
  159|   101k|  WORD32 num_ext_sorted_cw_in_sect_idx =
  160|   101k|      ptr_hcr_info->sect_info.num_ext_sorted_cw_in_sect_idx;
  161|   101k|  UWORD8 *ptr_ext_sorted_cw = ptr_hcr_info->sect_info.ptr_ext_sorted_cw;
  162|   101k|  WORD32 ext_sorted_cw_idx = ptr_hcr_info->sect_info.ext_sorted_cw_idx;
  163|   101k|  UWORD16 *ptr_num_ext_sorted_sect_in_sets =
  164|   101k|      ptr_hcr_info->sect_info.ptr_num_ext_sorted_sect_in_sets;
  165|   101k|  WORD32 num_ext_sorted_sect_in_sets_idx =
  166|   101k|      ptr_hcr_info->sect_info.num_ext_sorted_sect_in_sets_idx;
  167|   101k|  WORD32 quant_spec_coeff_idx = ptr_hcr_info->str_dec_io.quant_spec_coeff_idx;
  168|   101k|  const UWORD8 *ptr_cb_dimension_tbl =
  169|   101k|      ptr_hcr_info->table_info.ptr_cb_dimension_tbl;
  170|   101k|  WORD32 loop_idx = 0;
  171|       |
  172|   101k|  for (i = ptr_num_ext_sorted_sect_in_sets[num_ext_sorted_sect_in_sets_idx];
  173|  4.40M|       i != 0; i--) {
  ------------------
  |  Branch (173:8): [True: 4.34M, False: 56.7k]
  ------------------
  174|  4.34M|    cb_dim = ptr_cb_dimension_tbl[ptr_ext_sorted_cw[ext_sorted_cw_idx]];
  175|       |
  176|  4.34M|    for (k = ptr_num_ext_sorted_cw_in_sect[num_ext_sorted_cw_in_sect_idx];
  177|  12.7M|         k != 0; k--) {
  ------------------
  |  Branch (177:10): [True: 8.41M, False: 4.31M]
  ------------------
  178|  8.41M|      loop_idx++;
  179|  8.41M|      if (loop_idx > 256) {
  ------------------
  |  Branch (179:11): [True: 27.1k, False: 8.38M]
  ------------------
  180|  27.1k|        return;
  181|  27.1k|      }
  182|  8.38M|      *ptr_cb++ = ptr_ext_sorted_cw[ext_sorted_cw_idx];
  183|  8.38M|      *res_ptr_idx++ = quant_spec_coeff_idx;
  184|  8.38M|      quant_spec_coeff_idx += cb_dim;
  185|  8.38M|      if (quant_spec_coeff_idx >= 1024) {
  ------------------
  |  Branch (185:11): [True: 275, False: 8.38M]
  ------------------
  186|    275|        return;
  187|    275|      }
  188|  8.38M|    }
  189|  4.31M|    num_ext_sorted_cw_in_sect_idx++;
  190|  4.31M|    ext_sorted_cw_idx++;
  191|  4.31M|    if (num_ext_sorted_cw_in_sect_idx >= (MAX_SFB_HCR + MAX_HCR_SETS) ||
  ------------------
  |  |  156|  4.31M|#define MAX_SFB_HCR (((1024 / 8) / LINES_PER_UNIT) * 8)
  |  |  ------------------
  |  |  |  |  154|  4.31M|#define LINES_PER_UNIT 4
  |  |  ------------------
  ------------------
                  if (num_ext_sorted_cw_in_sect_idx >= (MAX_SFB_HCR + MAX_HCR_SETS) ||
  ------------------
  |  |  164|  4.31M|#define MAX_HCR_SETS 14
  ------------------
  |  Branch (191:9): [True: 17.5k, False: 4.30M]
  ------------------
  192|  4.30M|        ext_sorted_cw_idx >= (MAX_SFB_HCR + MAX_HCR_SETS)) {
  ------------------
  |  |  156|  4.30M|#define MAX_SFB_HCR (((1024 / 8) / LINES_PER_UNIT) * 8)
  |  |  ------------------
  |  |  |  |  154|  4.30M|#define LINES_PER_UNIT 4
  |  |  ------------------
  ------------------
                      ext_sorted_cw_idx >= (MAX_SFB_HCR + MAX_HCR_SETS)) {
  ------------------
  |  |  164|  4.30M|#define MAX_HCR_SETS 14
  ------------------
  |  Branch (192:9): [True: 0, False: 4.30M]
  ------------------
  193|  17.5k|      return;
  194|  17.5k|    }
  195|  4.31M|  }
  196|  56.7k|  num_ext_sorted_sect_in_sets_idx++;
  197|  56.7k|  if (num_ext_sorted_cw_in_sect_idx >= (MAX_SFB_HCR + MAX_HCR_SETS)) {
  ------------------
  |  |  156|  56.7k|#define MAX_SFB_HCR (((1024 / 8) / LINES_PER_UNIT) * 8)
  |  |  ------------------
  |  |  |  |  154|  56.7k|#define LINES_PER_UNIT 4
  |  |  ------------------
  ------------------
                if (num_ext_sorted_cw_in_sect_idx >= (MAX_SFB_HCR + MAX_HCR_SETS)) {
  ------------------
  |  |  164|  56.7k|#define MAX_HCR_SETS 14
  ------------------
  |  Branch (197:7): [True: 0, False: 56.7k]
  ------------------
  198|      0|    return;
  199|      0|  }
  200|       |
  201|  56.7k|  ptr_hcr_info->sect_info.num_ext_sorted_cw_in_sect_idx =
  202|  56.7k|      num_ext_sorted_cw_in_sect_idx;
  203|  56.7k|  ptr_hcr_info->sect_info.ext_sorted_cw_idx = ext_sorted_cw_idx;
  204|  56.7k|  ptr_hcr_info->sect_info.num_ext_sorted_sect_in_sets_idx =
  205|  56.7k|      num_ext_sorted_sect_in_sets_idx;
  206|  56.7k|  ptr_hcr_info->sect_info.num_ext_sorted_cw_in_sect_idx =
  207|  56.7k|      num_ext_sorted_cw_in_sect_idx;
  208|  56.7k|  ptr_hcr_info->str_dec_io.quant_spec_coeff_idx = quant_spec_coeff_idx;
  209|  56.7k|}
ixheaacd_huff_code_reorder.c:ixheaacd_decode_hcr_non_pcw:
 1476|  3.01M|    WORD32 start) {
 1477|  3.01M|  WORD16 codeword_len = 0;
 1478|  3.01M|  WORD8 seg_bits_left;
 1479|  3.01M|  UWORD8 tot_bits_to_save, code_bits_to_save, extra_code_bits;
 1480|  3.01M|  WORD32 segment_offset = 0;
 1481|  3.01M|  WORD8 *p_remaining_bits_in_seg =
 1482|  3.01M|      ptr_hcr_info->str_segment_info.p_remaining_bits_in_seg;
 1483|  3.01M|  WORD32 num_segment = ptr_hcr_info->str_segment_info.num_segment;
 1484|       |
 1485|  83.3M|  for (segment_offset = start; segment_offset < trial;
  ------------------
  |  Branch (1485:32): [True: 80.3M, False: 3.01M]
  ------------------
 1486|  80.3M|       segment_offset++, *cw_offset += 1) {
 1487|  80.3M|    if (p_remaining_bits_in_seg[segment_offset] &&
  ------------------
  |  Branch (1487:9): [True: 43.3M, False: 36.9M]
  ------------------
 1488|  43.3M|        !ptr_hcr_info->str_segment_info.is_decoded[*cw_offset]) {
  ------------------
  |  Branch (1488:9): [True: 947k, False: 42.4M]
  ------------------
 1489|   947k|      {
 1490|   947k|        UWORD32 i_qsc;
 1491|   947k|        WORD8 current_seg_bits = p_remaining_bits_in_seg[segment_offset];
 1492|       |
 1493|   947k|        itt_bit_buff->byte_ptr = itt_bit_buff->ptr_start;
 1494|   947k|        itt_bit_buff->valid_bits = 0;
 1495|   947k|        itt_bit_buff->byte = 0;
 1496|   947k|        itt_bit_buff->bit_count = 0;
 1497|   947k|        itt_bit_buff->write_bit_count = 0;
 1498|       |
 1499|   947k|        if (ptr_hcr_info->str_segment_info.p_num_bits[*cw_offset]) {
  ------------------
  |  Branch (1499:13): [True: 220k, False: 727k]
  ------------------
 1500|   220k|          extra_code_bits = max(
  ------------------
  |  |   74|   220k|#define max(a, b) (((a) > (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (74:20): [True: 444, False: 219k]
  |  |  ------------------
  ------------------
 1501|   220k|              ptr_hcr_info->str_segment_info.p_num_bits[*cw_offset] - 32, 0);
 1502|   220k|          code_bits_to_save =
 1503|   220k|              min(ptr_hcr_info->str_segment_info.p_num_bits[*cw_offset], 32);
  ------------------
  |  |   75|   220k|#define min(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (75:20): [True: 219k, False: 849]
  |  |  ------------------
  ------------------
 1504|       |
 1505|   220k|          ixheaacd_write_bit(
 1506|   220k|              itt_bit_buff,
 1507|   220k|              ptr_hcr_info->str_segment_info.code_extra[*cw_offset],
 1508|   220k|              extra_code_bits);
 1509|   220k|          ixheaacd_write_bit(itt_bit_buff,
 1510|   220k|                             ptr_hcr_info->str_segment_info.code[*cw_offset],
 1511|   220k|                             code_bits_to_save);
 1512|   220k|        }
 1513|   947k|        {
 1514|   947k|          UWORD32 bit;
 1515|   947k|          WORD32 read_bit_offset;
 1516|       |
 1517|   947k|          if (ptr_hcr_info->str_segment_info.read_direction ==
  ------------------
  |  Branch (1517:15): [True: 349k, False: 597k]
  ------------------
 1518|   947k|              FROM_LEFT_TO_RIGHT) {
  ------------------
  |  |  160|   947k|#define FROM_LEFT_TO_RIGHT 0
  ------------------
 1519|   349k|            read_bit_offset =
 1520|   349k|                ptr_hcr_info->str_segment_info.arr_seg_start_l[segment_offset] -
 1521|   349k|                (itt_bit_buff->size - itt_bit_buff->cnt_bits);
 1522|   349k|            if (read_bit_offset) {
  ------------------
  |  Branch (1522:17): [True: 349k, False: 0]
  ------------------
 1523|   349k|              itt_bit_buff->cnt_bits += -read_bit_offset;
 1524|   349k|            }
 1525|   349k|            itt_bit_buff->ptr_read_next =
 1526|   349k|                itt_bit_buff->ptr_bit_buf_base +
 1527|   349k|                ((itt_bit_buff->size - itt_bit_buff->cnt_bits) >> 3);
 1528|   349k|            itt_bit_buff->bit_pos =
 1529|   349k|                ((itt_bit_buff->size - itt_bit_buff->cnt_bits) & 7);
 1530|       |
 1531|  4.31M|            for (; p_remaining_bits_in_seg[segment_offset] > 0;
  ------------------
  |  Branch (1531:20): [True: 3.96M, False: 349k]
  ------------------
 1532|  3.96M|                 p_remaining_bits_in_seg[segment_offset] -= 1) {
 1533|  3.96M|              bit = ixheaacd_aac_read_bit_rev(itt_bit_buff);
 1534|  3.96M|              ptr_hcr_info->str_segment_info.arr_seg_start_l[segment_offset] +=
 1535|  3.96M|                  1;
 1536|       |
 1537|  3.96M|              ixheaacd_write_bit(itt_bit_buff, bit, 1);
 1538|  3.96M|            }
 1539|       |
 1540|   597k|          } else {
 1541|   597k|            read_bit_offset =
 1542|   597k|                ptr_hcr_info->str_segment_info.arr_seg_start_r[segment_offset] -
 1543|   597k|                (itt_bit_buff->size - itt_bit_buff->cnt_bits);
 1544|   597k|            if (read_bit_offset) {
  ------------------
  |  Branch (1544:17): [True: 597k, False: 66]
  ------------------
 1545|   597k|              itt_bit_buff->cnt_bits += -read_bit_offset;
 1546|   597k|            }
 1547|   597k|            itt_bit_buff->ptr_read_next =
 1548|   597k|                itt_bit_buff->ptr_bit_buf_base +
 1549|   597k|                ((itt_bit_buff->size - itt_bit_buff->cnt_bits) >> 3);
 1550|   597k|            itt_bit_buff->bit_pos =
 1551|   597k|                ((itt_bit_buff->size - itt_bit_buff->cnt_bits) & 7);
 1552|       |
 1553|  9.75M|            for (; p_remaining_bits_in_seg[segment_offset] > 0;
  ------------------
  |  Branch (1553:20): [True: 9.15M, False: 597k]
  ------------------
 1554|  9.15M|                 p_remaining_bits_in_seg[segment_offset] -= 1) {
 1555|  9.15M|              bit = ixheaacd_aac_read_bit(itt_bit_buff);
 1556|  9.15M|              ptr_hcr_info->str_segment_info.arr_seg_start_r[segment_offset] -=
 1557|  9.15M|                  1;
 1558|  9.15M|              ixheaacd_write_bit(itt_bit_buff, bit, 1);
 1559|  9.15M|            }
 1560|   597k|          }
 1561|   947k|        }
 1562|       |
 1563|   947k|        ixheaacd_write_bit(itt_bit_buff, 0, 32 - itt_bit_buff->bit_count % 32);
 1564|   947k|        itt_bit_buff->valid_bits = 8;
 1565|   947k|        itt_bit_buff->byte_ptr = itt_bit_buff->ptr_start;
 1566|   947k|        itt_bit_buff->byte = *itt_bit_buff->ptr_start;
 1567|       |
 1568|   947k|        if (current_seg_bits) {
  ------------------
  |  Branch (1568:13): [True: 947k, False: 211]
  ------------------
 1569|   947k|          i_qsc = ptr_hcr_info->str_non_pcw_side_info
 1570|   947k|                      .res_ptr_idx[*cw_offset % num_segment];
 1571|       |
 1572|   947k|          if (ptr_hcr_info->str_non_pcw_side_info
  ------------------
  |  Branch (1572:15): [True: 128k, False: 818k]
  ------------------
 1573|   947k|                  .ptr_cb[*cw_offset % num_segment] <= 4) {
 1574|   128k|            WORD32 tbl_sign = 0;
 1575|   128k|            const UWORD16 *cb_table =
 1576|   128k|                (UWORD16
 1577|   128k|                     *)(ptr_aac_tables
 1578|   128k|                            ->code_book[ptr_hcr_info->str_non_pcw_side_info
 1579|   128k|                                            .ptr_cb[*cw_offset % num_segment]]);
 1580|   128k|            const UWORD32 *idx_table =
 1581|   128k|                (UWORD32 *)(ptr_aac_tables->index_table
 1582|   128k|                                [ptr_hcr_info->str_non_pcw_side_info
 1583|   128k|                                     .ptr_cb[*cw_offset % num_segment]]);
 1584|       |
 1585|   128k|            if (ptr_hcr_info->str_non_pcw_side_info
  ------------------
  |  Branch (1585:17): [True: 86.2k, False: 42.6k]
  ------------------
 1586|   128k|                    .ptr_cb[*cw_offset % num_segment] > 2) {
 1587|  86.2k|              tbl_sign = 1;
 1588|  86.2k|            }
 1589|       |
 1590|   128k|            codeword_len = ixheaacd_huff_dec_quad_hcr_non_pcw(
 1591|   128k|                itt_bit_buff,
 1592|   128k|                &ptr_hcr_info->str_non_pcw_side_info.ptr_result_base[i_qsc],
 1593|   128k|                cb_table, tbl_sign, idx_table);
 1594|       |
 1595|   128k|            seg_bits_left =
 1596|   128k|                current_seg_bits - codeword_len +
 1597|   128k|                ptr_hcr_info->str_segment_info.p_num_bits[*cw_offset];
 1598|       |
 1599|   128k|          }
 1600|       |
 1601|   818k|          else if (ptr_hcr_info->str_non_pcw_side_info
  ------------------
  |  Branch (1601:20): [True: 216k, False: 602k]
  ------------------
 1602|   818k|                       .ptr_cb[*cw_offset % num_segment] < 11) {
 1603|   216k|            WORD32 tbl_sign = 0;
 1604|   216k|            WORD32 huff_mode = 9;
 1605|       |
 1606|   216k|            const UWORD16 *cb_table =
 1607|   216k|                (UWORD16
 1608|   216k|                     *)(ptr_aac_tables
 1609|   216k|                            ->code_book[ptr_hcr_info->str_non_pcw_side_info
 1610|   216k|                                            .ptr_cb[*cw_offset % num_segment]]);
 1611|   216k|            const UWORD32 *idx_table =
 1612|   216k|                (UWORD32 *)(ptr_aac_tables->index_table
 1613|   216k|                                [ptr_hcr_info->str_non_pcw_side_info
 1614|   216k|                                     .ptr_cb[*cw_offset % num_segment]]);
 1615|       |
 1616|   216k|            if (ptr_hcr_info->str_non_pcw_side_info
  ------------------
  |  Branch (1616:17): [True: 109k, False: 106k]
  ------------------
 1617|   216k|                    .ptr_cb[*cw_offset % num_segment] > 6) {
 1618|   109k|              if (ptr_hcr_info->str_non_pcw_side_info
  ------------------
  |  Branch (1618:19): [True: 103k, False: 5.80k]
  ------------------
 1619|   109k|                      .ptr_cb[*cw_offset % num_segment] > 8)
 1620|   103k|                huff_mode = 13;
 1621|  5.80k|              else
 1622|  5.80k|                huff_mode = 8;
 1623|   109k|              tbl_sign = 1;
 1624|   109k|            }
 1625|   216k|            codeword_len = ixheaacd_huff_dec_pair_hcr_non_pcw(
 1626|   216k|                itt_bit_buff,
 1627|   216k|                &ptr_hcr_info->str_non_pcw_side_info.ptr_result_base[i_qsc],
 1628|   216k|                cb_table, tbl_sign, idx_table, huff_mode);
 1629|       |
 1630|   216k|            seg_bits_left =
 1631|   216k|                current_seg_bits - codeword_len +
 1632|   216k|                ptr_hcr_info->str_segment_info.p_num_bits[*cw_offset];
 1633|   216k|          }
 1634|   947k|          if (ptr_hcr_info->str_non_pcw_side_info
  ------------------
  |  Branch (1634:15): [True: 602k, False: 345k]
  ------------------
 1635|   947k|                  .ptr_cb[*cw_offset % num_segment] >= 11) {
 1636|   602k|            const UWORD32 *idx_table =
 1637|   602k|                ptr_aac_tables->pstr_huffmann_tables->idx_table_hf11;
 1638|   602k|            const UWORD16 *cb_table =
 1639|   602k|                ptr_aac_tables->pstr_huffmann_tables->input_table_cb11;
 1640|       |
 1641|   602k|            codeword_len = ixheaacd_huff_dec_word_hcr_non_pcw(
 1642|   602k|                itt_bit_buff,
 1643|   602k|                &ptr_hcr_info->str_non_pcw_side_info.ptr_result_base[i_qsc],
 1644|   602k|                cb_table, idx_table);
 1645|       |
 1646|   602k|            seg_bits_left =
 1647|   602k|                current_seg_bits - codeword_len +
 1648|   602k|                ptr_hcr_info->str_segment_info.p_num_bits[*cw_offset];
 1649|   602k|          }
 1650|   947k|          if (seg_bits_left < 0) {
  ------------------
  |  Branch (1650:15): [True: 238k, False: 708k]
  ------------------
 1651|   238k|            tot_bits_to_save =
 1652|   238k|                current_seg_bits +
 1653|   238k|                ptr_hcr_info->str_segment_info.p_num_bits[*cw_offset];
 1654|   238k|            extra_code_bits = max(tot_bits_to_save - 32, 0);
  ------------------
  |  |   74|   238k|#define max(a, b) (((a) > (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (74:20): [True: 11.9k, False: 226k]
  |  |  ------------------
  ------------------
 1655|   238k|            code_bits_to_save = min(tot_bits_to_save, 32);
  ------------------
  |  |   75|   238k|#define min(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (75:20): [True: 226k, False: 12.4k]
  |  |  ------------------
  ------------------
 1656|       |
 1657|   238k|            ptr_hcr_info->str_segment_info.code_extra[*cw_offset] =
 1658|   238k|                ixheaacd_read_bit(itt_bit_buff, extra_code_bits);
 1659|   238k|            ptr_hcr_info->str_segment_info.code[*cw_offset] =
 1660|   238k|                ixheaacd_read_bit(itt_bit_buff, code_bits_to_save);
 1661|   238k|            ptr_hcr_info->str_segment_info.p_num_bits[*cw_offset] =
 1662|   238k|                tot_bits_to_save;
 1663|       |
 1664|   238k|            p_remaining_bits_in_seg[segment_offset] = 0;
 1665|   238k|            if (p_remaining_bits_in_seg[segment_offset] < 0)
  ------------------
  |  Branch (1665:17): [True: 0, False: 238k]
  ------------------
 1666|      0|              p_remaining_bits_in_seg[segment_offset] = 0;
 1667|   708k|          } else {
 1668|   708k|            p_remaining_bits_in_seg[segment_offset] =
 1669|   708k|                current_seg_bits -
 1670|   708k|                (codeword_len -
 1671|   708k|                 ptr_hcr_info->str_segment_info.p_num_bits[*cw_offset]);
 1672|   708k|            ptr_hcr_info->str_segment_info.p_num_bits[*cw_offset] = 0;
 1673|   708k|            ptr_hcr_info->str_segment_info.is_decoded[*cw_offset] = 1;
 1674|   708k|            if (p_remaining_bits_in_seg[segment_offset] < 0)
  ------------------
  |  Branch (1674:17): [True: 0, False: 708k]
  ------------------
 1675|      0|              p_remaining_bits_in_seg[segment_offset] = 0;
 1676|   708k|          }
 1677|       |
 1678|   947k|          if (p_remaining_bits_in_seg[segment_offset] > 0) {
  ------------------
  |  Branch (1678:15): [True: 669k, False: 277k]
  ------------------
 1679|   669k|            if (ptr_hcr_info->str_segment_info.read_direction ==
  ------------------
  |  Branch (1679:17): [True: 223k, False: 446k]
  ------------------
 1680|   669k|                FROM_LEFT_TO_RIGHT)
  ------------------
  |  |  160|   669k|#define FROM_LEFT_TO_RIGHT 0
  ------------------
 1681|   223k|              ptr_hcr_info->str_segment_info.arr_seg_start_l[segment_offset] -=
 1682|   223k|                  (p_remaining_bits_in_seg[segment_offset]);
 1683|   446k|            else
 1684|   446k|              ptr_hcr_info->str_segment_info.arr_seg_start_r[segment_offset] +=
 1685|   446k|                  (p_remaining_bits_in_seg[segment_offset]);
 1686|   669k|          }
 1687|   947k|        }
 1688|   947k|      }
 1689|   947k|    }
 1690|  80.3M|  }
 1691|  3.01M|}
ixheaacd_huff_code_reorder.c:ixheaacd_huff_dec_quad_hcr_non_pcw:
 1297|   128k|    const UWORD16 *code_book_tbl, WORD32 tbl_sign, const UWORD32 *idx_table) {
 1298|   128k|  WORD16 index, length;
 1299|   128k|  WORD16 cw_len;
 1300|   128k|  WORD32 read_word;
 1301|       |
 1302|   128k|  read_word = ixheaacd_aac_showbits_32(itt_bit_buff->byte_ptr,
 1303|   128k|                                       itt_bit_buff->bit_count, NULL);
 1304|   128k|  ixheaacd_huffman_decode(read_word, &index, &length, code_book_tbl, idx_table);
 1305|   128k|  cw_len = length;
 1306|   128k|  if (tbl_sign) {
  ------------------
  |  Branch (1306:7): [True: 86.2k, False: 42.6k]
  ------------------
 1307|  86.2k|    WORD32 temp_word;
 1308|  86.2k|    WORD32 w, x, y, z;
 1309|  86.2k|    temp_word = read_word << length;
 1310|  86.2k|    w = index / 27;
 1311|  86.2k|    index = index - w * 27;
 1312|  86.2k|    x = index / 9;
 1313|  86.2k|    index = index - x * 9;
 1314|  86.2k|    y = index / 3;
 1315|  86.2k|    z = index - y * 3;
 1316|  86.2k|    if (w) {
  ------------------
  |  Branch (1316:9): [True: 57.8k, False: 28.4k]
  ------------------
 1317|  57.8k|      if (temp_word & 0x80000000) w = -w;
  ------------------
  |  Branch (1317:11): [True: 17.7k, False: 40.0k]
  ------------------
 1318|  57.8k|      temp_word <<= 1;
 1319|  57.8k|      cw_len++;
 1320|  57.8k|    }
 1321|  86.2k|    *spec_coef++ = w;
 1322|       |
 1323|  86.2k|    if (x) {
  ------------------
  |  Branch (1323:9): [True: 53.6k, False: 32.6k]
  ------------------
 1324|  53.6k|      if (temp_word & 0x80000000) x = -x;
  ------------------
  |  Branch (1324:11): [True: 14.3k, False: 39.3k]
  ------------------
 1325|  53.6k|      temp_word <<= 1;
 1326|  53.6k|      cw_len++;
 1327|  53.6k|    }
 1328|  86.2k|    *spec_coef++ = x;
 1329|  86.2k|    if (y) {
  ------------------
  |  Branch (1329:9): [True: 61.4k, False: 24.8k]
  ------------------
 1330|  61.4k|      if (temp_word & 0x80000000) y = -y;
  ------------------
  |  Branch (1330:11): [True: 17.9k, False: 43.5k]
  ------------------
 1331|  61.4k|      temp_word <<= 1;
 1332|  61.4k|      cw_len++;
 1333|  61.4k|    }
 1334|  86.2k|    *spec_coef++ = y;
 1335|  86.2k|    if (z) {
  ------------------
  |  Branch (1335:9): [True: 62.7k, False: 23.5k]
  ------------------
 1336|  62.7k|      if (temp_word & 0x80000000) z = -z;
  ------------------
  |  Branch (1336:11): [True: 15.2k, False: 47.4k]
  ------------------
 1337|  62.7k|      temp_word <<= 1;
 1338|  62.7k|      cw_len++;
 1339|  62.7k|    }
 1340|  86.2k|    *spec_coef++ = z;
 1341|       |
 1342|  86.2k|  }
 1343|       |
 1344|  42.6k|  else {
 1345|  42.6k|    WORD32 w, x, y, z;
 1346|       |
 1347|  42.6k|    w = index / 27 - 1;
 1348|  42.6k|    index = index - (w + 1) * 27;
 1349|  42.6k|    x = index / 9 - 1;
 1350|  42.6k|    index = index - (x + 1) * 9;
 1351|  42.6k|    y = index / 3 - 1;
 1352|  42.6k|    z = index - ((y + 1) * 3) - 1;
 1353|  42.6k|    *spec_coef++ = w;
 1354|  42.6k|    *spec_coef++ = x;
 1355|  42.6k|    *spec_coef++ = y;
 1356|  42.6k|    *spec_coef++ = z;
 1357|  42.6k|  }
 1358|       |
 1359|   128k|  return cw_len;
 1360|   128k|}
ixheaacd_huff_code_reorder.c:ixheaacd_huff_dec_pair_hcr_non_pcw:
  747|   216k|{
  748|   216k|  WORD16 index, length;
  749|   216k|  WORD32 y, z;
  750|   216k|  WORD32 read_word1;
  751|   216k|  WORD32 read_word;
  752|       |
  753|   216k|  read_word = ixheaacd_aac_showbits_32(itt_bit_buff->byte_ptr,
  754|   216k|                                       itt_bit_buff->bit_count, NULL);
  755|       |
  756|   216k|  ixheaacd_huffman_decode(read_word, &index, &length, code_book_tbl, idx_table);
  757|   216k|  read_word1 = read_word << length;
  758|   216k|  if (tbl_sign) {
  ------------------
  |  Branch (758:7): [True: 109k, False: 106k]
  ------------------
  759|   109k|    WORD32 temp_word;
  760|   109k|    temp_word = read_word1;
  761|   109k|    y = index / huff_mode;
  762|   109k|    z = index - huff_mode * y;
  763|       |
  764|   109k|    if (y) {
  ------------------
  |  Branch (764:9): [True: 42.9k, False: 66.2k]
  ------------------
  765|  42.9k|      if (temp_word & 0x80000000) y = -y;
  ------------------
  |  Branch (765:11): [True: 11.6k, False: 31.2k]
  ------------------
  766|       |
  767|  42.9k|      temp_word = temp_word << 1;
  768|  42.9k|      length++;
  769|  42.9k|    }
  770|   109k|    *spec_coef++ = y;
  771|       |
  772|   109k|    if (z) {
  ------------------
  |  Branch (772:9): [True: 37.2k, False: 71.9k]
  ------------------
  773|  37.2k|      if (temp_word & 0x80000000) {
  ------------------
  |  Branch (773:11): [True: 10.3k, False: 26.8k]
  ------------------
  774|  10.3k|        z = -z;
  775|  10.3k|      }
  776|  37.2k|      temp_word <<= 1;
  777|  37.2k|      length++;
  778|  37.2k|    }
  779|   109k|    *spec_coef++ = z;
  780|   109k|  } else {
  781|   106k|    y = (index / huff_mode) - 4;
  782|   106k|    z = index - ((y + 4) * huff_mode) - 4;
  783|       |
  784|   106k|    *spec_coef++ = y;
  785|   106k|    *spec_coef++ = z;
  786|   106k|  }
  787|       |
  788|   216k|  return length;
  789|   216k|}
ixheaacd_huff_code_reorder.c:ixheaacd_huff_dec_word_hcr_non_pcw:
 1364|   602k|    const UWORD16 *code_book_tbl, const UWORD32 *idx_table) {
 1365|   602k|  WORD32 sp1, sp2;
 1366|   602k|  WORD32 flush_cw;
 1367|   602k|  WORD32 i, value, norm_val, off;
 1368|   602k|  WORD32 out1, out2;
 1369|   602k|  UWORD16 cw_len;
 1370|       |
 1371|   602k|  WORD16 index;
 1372|   602k|  WORD32 length;
 1373|       |
 1374|   602k|  WORD32 read_word;
 1375|   602k|  WORD32 increment;
 1376|   602k|  UWORD8 *ptr_read_next;
 1377|       |
 1378|   602k|  read_word = ixheaacd_aac_showbits_32(itt_bit_buff->byte_ptr,
 1379|   602k|                                       itt_bit_buff->bit_count, &increment);
 1380|       |
 1381|   602k|  ptr_read_next = itt_bit_buff->byte_ptr;
 1382|   602k|  ptr_read_next += increment;
 1383|       |
 1384|   602k|  ixheaacd_huff_sfb_table(read_word, &index, &length, code_book_tbl, idx_table);
 1385|   602k|  cw_len = length;
 1386|       |
 1387|   602k|  ixheaacd_aac_read_byte_corr1(&ptr_read_next, &length, &read_word, NULL);
 1388|       |
 1389|   602k|  out1 = index / 17;
 1390|   602k|  out2 = index - out1 * 17;
 1391|   602k|  flush_cw = read_word << length;
 1392|       |
 1393|   602k|  sp1 = out1;
 1394|   602k|  sp2 = out2;
 1395|       |
 1396|   602k|  if (out1) {
  ------------------
  |  Branch (1396:7): [True: 467k, False: 134k]
  ------------------
 1397|   467k|    if (flush_cw & 0x80000000) {
  ------------------
  |  Branch (1397:9): [True: 186k, False: 281k]
  ------------------
 1398|   186k|      out1 = -out1;
 1399|   186k|    }
 1400|   467k|    flush_cw = (WORD32)flush_cw << 1;
 1401|   467k|    length++;
 1402|   467k|    cw_len++;
 1403|   467k|  }
 1404|       |
 1405|   602k|  if (out2) {
  ------------------
  |  Branch (1405:7): [True: 466k, False: 135k]
  ------------------
 1406|   466k|    if (flush_cw & 0x80000000) {
  ------------------
  |  Branch (1406:9): [True: 162k, False: 303k]
  ------------------
 1407|   162k|      out2 = -out2;
 1408|   162k|    }
 1409|   466k|    length++;
 1410|   466k|    cw_len++;
 1411|   466k|  }
 1412|       |
 1413|   602k|  ixheaacd_aac_read_byte_corr1(&ptr_read_next, &length, &read_word, NULL);
 1414|       |
 1415|   602k|  if (sp1 == 16) {
  ------------------
  |  Branch (1415:7): [True: 102k, False: 499k]
  ------------------
 1416|   102k|    i = 4;
 1417|   102k|    value = ixheaac_extu(read_word, length, 23);
 1418|   102k|    value = value | 0xfffffe00;
 1419|   102k|    norm_val = ixheaac_norm32(value);
 1420|       |
 1421|   102k|    i += (norm_val - 22);
 1422|   102k|    length += (norm_val - 21);
 1423|   102k|    cw_len += (norm_val - 21);
 1424|       |
 1425|   102k|    ixheaacd_aac_read_byte_corr1(&ptr_read_next, &length, &read_word, NULL);
 1426|       |
 1427|   102k|    off = ixheaac_extu(read_word, length, 32 - i);
 1428|   102k|    length += i;
 1429|   102k|    cw_len += i;
 1430|       |
 1431|   102k|    ixheaacd_aac_read_byte_corr1(&ptr_read_next, &length, &read_word, NULL);
 1432|       |
 1433|   102k|    i = off + ((WORD32)1 << i);
 1434|       |
 1435|   102k|    if (out1 < 0)
  ------------------
  |  Branch (1435:9): [True: 31.6k, False: 70.6k]
  ------------------
 1436|  31.6k|      *spec_coef++ = -i;
 1437|  70.6k|    else
 1438|  70.6k|      *spec_coef++ = i;
 1439|   499k|  } else {
 1440|   499k|    *spec_coef++ = out1;
 1441|   499k|  }
 1442|       |
 1443|   602k|  if (sp2 == 16) {
  ------------------
  |  Branch (1443:7): [True: 83.3k, False: 518k]
  ------------------
 1444|  83.3k|    i = 4;
 1445|  83.3k|    value = ixheaac_extu(read_word, length, 23);
 1446|  83.3k|    value = value | 0xfffffe00;
 1447|  83.3k|    norm_val = ixheaac_norm32(value);
 1448|       |
 1449|  83.3k|    i += (norm_val - 22);
 1450|  83.3k|    length += (norm_val - 21);
 1451|  83.3k|    cw_len += (norm_val - 21);
 1452|       |
 1453|  83.3k|    ixheaacd_aac_read_byte_corr1(&ptr_read_next, &length, &read_word, NULL);
 1454|       |
 1455|  83.3k|    off = ixheaac_extu(read_word, length, 32 - i);
 1456|  83.3k|    length += i;
 1457|  83.3k|    cw_len += i;
 1458|       |
 1459|  83.3k|    ixheaacd_aac_read_byte_corr1(&ptr_read_next, &length, &read_word, NULL);
 1460|  83.3k|    i = off + ((WORD32)1 << i);
 1461|       |
 1462|  83.3k|    if (out2 < 0)
  ------------------
  |  Branch (1462:9): [True: 29.0k, False: 54.3k]
  ------------------
 1463|  29.0k|      *spec_coef++ = -i;
 1464|  54.3k|    else
 1465|  54.3k|      *spec_coef++ = i;
 1466|   518k|  } else {
 1467|   518k|    *spec_coef++ = out2;
 1468|   518k|  }
 1469|       |
 1470|   602k|  return cw_len;
 1471|   602k|}
ixheaacd_huff_code_reorder.c:ixheaacd_huff_calc_num_cwd:
  418|  31.0k|static VOID ixheaacd_huff_calc_num_cwd(ia_hcr_info_struct *ptr_hcr_info) {
  419|  31.0k|  WORD32 sect_idx;
  420|  31.0k|  UWORD32 num_code_word;
  421|       |
  422|  31.0k|  UWORD32 num_sect = ptr_hcr_info->str_dec_io.num_sect;
  423|  31.0k|  UWORD8 *ptr_cb = ptr_hcr_info->str_dec_io.ptr_cb;
  424|  31.0k|  WORD16 *ptr_num_line_in_sect = ptr_hcr_info->str_dec_io.ptr_num_line_in_sect;
  425|  31.0k|  const UWORD8 *ptr_cb_dim_shift_tbl =
  426|  31.0k|      ptr_hcr_info->table_info.ptr_cb_dim_shift_tbl;
  427|  31.0k|  UWORD16 *ptr_num_cw_in_sect = ptr_hcr_info->sect_info.ptr_num_cw_in_sect;
  428|       |
  429|  31.0k|  num_code_word = 0;
  430|   465k|  for (sect_idx = num_sect; sect_idx != 0; sect_idx--) {
  ------------------
  |  Branch (430:29): [True: 434k, False: 31.0k]
  ------------------
  431|   434k|    *ptr_num_cw_in_sect =
  432|   434k|        *ptr_num_line_in_sect++ >> ptr_cb_dim_shift_tbl[*ptr_cb];
  433|   434k|    if (*ptr_cb != 0) {
  ------------------
  |  Branch (433:9): [True: 344k, False: 89.5k]
  ------------------
  434|   344k|      num_code_word += *ptr_num_cw_in_sect;
  435|   344k|    }
  436|   434k|    ptr_num_cw_in_sect++;
  437|   434k|    ptr_cb++;
  438|   434k|  }
  439|  31.0k|  ptr_hcr_info->sect_info.num_code_word = num_code_word;
  440|  31.0k|}
ixheaacd_huff_code_reorder.c:ixheaacd_huff_sort_sect_cb_cwd:
  442|  31.0k|static VOID ixheaacd_huff_sort_sect_cb_cwd(ia_hcr_info_struct *ptr_hcr_info) {
  443|  31.0k|  UWORD32 i, j, k;
  444|  31.0k|  UWORD8 temp;
  445|  31.0k|  UWORD32 counter;
  446|  31.0k|  UWORD32 start_offset;
  447|  31.0k|  UWORD32 num_zero_sect;
  448|  31.0k|  UWORD8 *ptr_dest;
  449|  31.0k|  UWORD32 num_sect_dec;
  450|       |
  451|  31.0k|  UWORD32 num_sect = ptr_hcr_info->str_dec_io.num_sect;
  452|  31.0k|  UWORD8 *ptr_cb = ptr_hcr_info->str_dec_io.ptr_cb;
  453|  31.0k|  UWORD8 *ptr_sorted_cb = ptr_hcr_info->sect_info.ptr_sorted_cb;
  454|  31.0k|  UWORD16 *ptr_num_cw_in_sect = ptr_hcr_info->sect_info.ptr_num_cw_in_sect;
  455|  31.0k|  UWORD16 *ptr_num_sorted_cw_in_sect =
  456|  31.0k|      ptr_hcr_info->sect_info.ptr_num_sorted_cw_in_sect;
  457|  31.0k|  UWORD8 *ptr_cb_switch = ptr_hcr_info->sect_info.ptr_cb_switch;
  458|  31.0k|  UWORD16 *ptr_reorder_offset = ptr_hcr_info->sect_info.ptr_reorder_offset;
  459|  31.0k|  const UWORD8 *ptr_cb_priority = ptr_hcr_info->table_info.ptr_cb_priority;
  460|  31.0k|  const UWORD8 *ptr_min_cb_pair_tbl =
  461|  31.0k|      ptr_hcr_info->codebook_pairs.ptr_min_cb_pair_tbl;
  462|  31.0k|  const UWORD8 *ptr_max_cb_pair_tbl =
  463|  31.0k|      ptr_hcr_info->codebook_pairs.ptr_max_cb_pair_tbl;
  464|  31.0k|  const UWORD8 *ptr_cb_dim_shift_tbl =
  465|  31.0k|      ptr_hcr_info->table_info.ptr_cb_dim_shift_tbl;
  466|       |
  467|  31.0k|  UWORD32 search_start_idx = 0;
  468|       |
  469|  31.0k|  ptr_dest = ptr_sorted_cb;
  470|  31.0k|  num_zero_sect = 0;
  471|   465k|  for (i = num_sect; i != 0; i--) {
  ------------------
  |  Branch (471:22): [True: 434k, False: 31.0k]
  ------------------
  472|   434k|    if (ptr_cb_priority[*ptr_cb] == 0) {
  ------------------
  |  Branch (472:9): [True: 89.5k, False: 344k]
  ------------------
  473|  89.5k|      num_zero_sect += 1;
  474|  89.5k|    }
  475|   434k|    *ptr_dest++ = ptr_cb_priority[*ptr_cb++];
  476|   434k|  }
  477|  31.0k|  ptr_hcr_info->sect_info.num_sorted_section = num_sect - num_zero_sect;
  478|  31.0k|  ptr_cb = ptr_hcr_info->str_dec_io.ptr_cb;
  479|       |
  480|  31.0k|  num_sect_dec = num_sect - 1;
  481|  31.0k|  if (num_sect_dec > 0) {
  ------------------
  |  Branch (481:7): [True: 23.8k, False: 7.23k]
  ------------------
  482|  23.8k|    counter = num_sect_dec;
  483|   427k|    for (j = num_sect_dec; j != 0; j--) {
  ------------------
  |  Branch (483:28): [True: 403k, False: 23.8k]
  ------------------
  484|  8.86M|      for (i = 0; i < counter; i++) {
  ------------------
  |  Branch (484:19): [True: 8.46M, False: 403k]
  ------------------
  485|  8.46M|        if (ptr_sorted_cb[i + 1] > ptr_sorted_cb[i]) {
  ------------------
  |  Branch (485:13): [True: 3.27M, False: 5.18M]
  ------------------
  486|  3.27M|          temp = ptr_sorted_cb[i];
  487|  3.27M|          ptr_sorted_cb[i] = ptr_sorted_cb[i + 1];
  488|  3.27M|          ptr_sorted_cb[i + 1] = temp;
  489|  3.27M|        }
  490|  8.46M|      }
  491|   403k|      counter -= 1;
  492|   403k|    }
  493|  23.8k|  }
  494|       |
  495|   465k|  for (i = num_sect; i != 0; i--) {
  ------------------
  |  Branch (495:22): [True: 434k, False: 31.0k]
  ------------------
  496|   434k|    *ptr_cb_switch++ = 0;
  497|   434k|  }
  498|  31.0k|  ptr_cb_switch = ptr_hcr_info->sect_info.ptr_cb_switch;
  499|       |
  500|   465k|  for (j = 0; j < num_sect; j++) {
  ------------------
  |  Branch (500:15): [True: 434k, False: 31.0k]
  ------------------
  501|  6.46M|    for (i = search_start_idx; i < num_sect; i++) {
  ------------------
  |  Branch (501:32): [True: 6.46M, False: 0]
  ------------------
  502|  6.46M|      if (ptr_cb_switch[i] == 0 &&
  ------------------
  |  Branch (502:11): [True: 3.71M, False: 2.75M]
  ------------------
  503|  3.71M|          (ptr_min_cb_pair_tbl[ptr_sorted_cb[j]] == ptr_cb[i] ||
  ------------------
  |  Branch (503:12): [True: 392k, False: 3.31M]
  ------------------
  504|  3.31M|           ptr_max_cb_pair_tbl[ptr_sorted_cb[j]] == ptr_cb[i])) {
  ------------------
  |  Branch (504:12): [True: 41.5k, False: 3.27M]
  ------------------
  505|   434k|        ptr_cb_switch[i] = 1;
  506|   434k|        ptr_sorted_cb[j] = ptr_cb[i];
  507|   434k|        ptr_num_sorted_cw_in_sect[j] = ptr_num_cw_in_sect[i];
  508|       |
  509|   434k|        start_offset = 0;
  510|  8.89M|        for (k = 0; k < i; k++) {
  ------------------
  |  Branch (510:21): [True: 8.46M, False: 434k]
  ------------------
  511|  8.46M|          start_offset += ptr_num_cw_in_sect[k]
  512|  8.46M|                          << ptr_cb_dim_shift_tbl[ptr_cb[k]];
  513|  8.46M|        }
  514|   434k|        ptr_reorder_offset[j] = start_offset;
  515|       |
  516|   434k|        if (i == search_start_idx) {
  ------------------
  |  Branch (516:13): [True: 149k, False: 285k]
  ------------------
  517|   149k|          UWORD32 k = i;
  518|   583k|          while (ptr_cb_switch[k++] == 1) search_start_idx++;
  ------------------
  |  Branch (518:18): [True: 434k, False: 149k]
  ------------------
  519|   149k|        }
  520|   434k|        break;
  521|   434k|      }
  522|  6.46M|    }
  523|   434k|  }
  524|  31.0k|}
ixheaacd_huff_code_reorder.c:ixheaacd_hcr_prepare_segmentation_grid:
  587|  31.0k|    ia_hcr_info_struct *ptr_hcr_info) {
  588|  31.0k|  UWORD16 i, j;
  589|  31.0k|  UWORD16 num_segment = 0;
  590|  31.0k|  UWORD16 segment_start = 0;
  591|  31.0k|  UWORD8 segment_width;
  592|  31.0k|  UWORD8 last_segment_width;
  593|  31.0k|  UWORD8 sorted_code_book;
  594|  31.0k|  UWORD8 end_flag = 0;
  595|  31.0k|  UWORD16 intermediate_result;
  596|       |
  597|  31.0k|  WORD8 longest_cw_len = ptr_hcr_info->str_dec_io.longest_cw_len;
  598|  31.0k|  WORD16 reordered_spec_data_len =
  599|  31.0k|      ptr_hcr_info->str_dec_io.reordered_spec_data_len;
  600|  31.0k|  UWORD32 num_sorted_section = ptr_hcr_info->sect_info.num_sorted_section;
  601|  31.0k|  UWORD8 *ptr_sorted_cb = ptr_hcr_info->sect_info.ptr_sorted_cb;
  602|  31.0k|  UWORD16 *ptr_num_sorted_cw_in_sect =
  603|  31.0k|      ptr_hcr_info->sect_info.ptr_num_sorted_cw_in_sect;
  604|  31.0k|  UWORD16 *arr_seg_start_l = ptr_hcr_info->str_segment_info.arr_seg_start_l;
  605|  31.0k|  UWORD16 *arr_seg_start_r = ptr_hcr_info->str_segment_info.arr_seg_start_r;
  606|  31.0k|  WORD8 *p_remaining_bits_in_seg =
  607|  31.0k|      ptr_hcr_info->str_segment_info.p_remaining_bits_in_seg;
  608|  31.0k|  UWORD16 bit_str_idx = ptr_hcr_info->str_dec_io.bit_str_idx;
  609|  31.0k|  const UWORD8 *ptr_max_cw_len_tbl =
  610|  31.0k|      ptr_hcr_info->table_info.ptr_max_cw_len_tbl;
  611|       |
  612|   190k|  for (i = num_sorted_section; i != 0; i--) {
  ------------------
  |  Branch (612:32): [True: 172k, False: 18.5k]
  ------------------
  613|   172k|    sorted_code_book = *ptr_sorted_cb++;
  614|   172k|    segment_width = min(ptr_max_cw_len_tbl[sorted_code_book], longest_cw_len);
  ------------------
  |  |   75|   172k|#define min(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (75:20): [True: 37.5k, False: 134k]
  |  |  ------------------
  ------------------
  615|       |
  616|  4.61M|    for (j = *ptr_num_sorted_cw_in_sect; j != 0; j--) {
  ------------------
  |  Branch (616:42): [True: 4.45M, False: 159k]
  ------------------
  617|  4.45M|      intermediate_result = bit_str_idx + segment_start;
  618|  4.45M|      if ((segment_start + segment_width) <= reordered_spec_data_len) {
  ------------------
  |  Branch (618:11): [True: 4.44M, False: 12.5k]
  ------------------
  619|  4.44M|        *arr_seg_start_l++ = intermediate_result;
  620|  4.44M|        *arr_seg_start_r++ = intermediate_result + segment_width - 1;
  621|  4.44M|        *p_remaining_bits_in_seg++ = segment_width;
  622|  4.44M|        segment_start += segment_width;
  623|  4.44M|        num_segment += 1;
  624|  4.44M|      } else {
  625|  12.5k|        arr_seg_start_l--;
  626|  12.5k|        arr_seg_start_r--;
  627|  12.5k|        p_remaining_bits_in_seg--;
  628|  12.5k|        segment_start = *arr_seg_start_l - bit_str_idx;
  629|       |
  630|  12.5k|        last_segment_width = reordered_spec_data_len - segment_start;
  631|  12.5k|        *p_remaining_bits_in_seg = last_segment_width;
  632|  12.5k|        *arr_seg_start_r = bit_str_idx + segment_start + last_segment_width - 1;
  633|  12.5k|        end_flag = 1;
  634|  12.5k|        break;
  635|  12.5k|      }
  636|  4.45M|    }
  637|   172k|    ptr_num_sorted_cw_in_sect++;
  638|   172k|    if (end_flag != 0) {
  ------------------
  |  Branch (638:9): [True: 12.5k, False: 159k]
  ------------------
  639|  12.5k|      break;
  640|  12.5k|    }
  641|   172k|  }
  642|       |
  643|  31.0k|  if (num_segment == 0) ptr_hcr_info->str_dec_io.err_log |= (ERROR_POS << 9);
  ------------------
  |  |  185|  3.51k|#define ERROR_POS 0x00000001
  ------------------
  |  Branch (643:7): [True: 3.51k, False: 27.5k]
  ------------------
  644|       |
  645|  31.0k|  ptr_hcr_info->str_segment_info.num_segment = num_segment;
  646|       |
  647|  31.0k|  return (ptr_hcr_info->str_dec_io.err_log);
  648|  31.0k|}
ixheaacd_huff_code_reorder.c:ixheaacd_huff_ext_sect_info:
  526|  27.5k|static VOID ixheaacd_huff_ext_sect_info(ia_hcr_info_struct *ptr_hcr_info) {
  527|  27.5k|  UWORD32 srt_sec_cnt = 0;
  528|  27.5k|  UWORD32 x_srt_sc_cnt = 0;
  529|  27.5k|  UWORD32 remain_num_cw_sort_sec;
  530|  27.5k|  UWORD32 in_segment_remain_num_cw;
  531|       |
  532|  27.5k|  UWORD32 num_sorted_section = ptr_hcr_info->sect_info.num_sorted_section;
  533|  27.5k|  UWORD8 *ptr_sorted_cb = ptr_hcr_info->sect_info.ptr_sorted_cb;
  534|  27.5k|  UWORD16 *ptr_num_sorted_cw_in_sect =
  535|  27.5k|      ptr_hcr_info->sect_info.ptr_num_sorted_cw_in_sect;
  536|  27.5k|  UWORD8 *ptr_extended_sorted_code_book =
  537|  27.5k|      ptr_hcr_info->sect_info.ptr_ext_sorted_cw;
  538|  27.5k|  UWORD16 *ptr_num_ext_sort_cw_sect =
  539|  27.5k|      ptr_hcr_info->sect_info.ptr_num_ext_sorted_cw_in_sect;
  540|  27.5k|  UWORD32 num_segment = ptr_hcr_info->str_segment_info.num_segment;
  541|  27.5k|  UWORD8 *ptr_ext_sorted_sect_max_cb_len =
  542|  27.5k|      ptr_hcr_info->sect_info.ptr_ext_sorted_sect_max_cb_len;
  543|  27.5k|  WORD8 longest_cw_len = ptr_hcr_info->str_dec_io.longest_cw_len;
  544|  27.5k|  const UWORD8 *ptr_max_cw_len_tbl =
  545|  27.5k|      ptr_hcr_info->table_info.ptr_max_cw_len_tbl;
  546|       |
  547|  27.5k|  remain_num_cw_sort_sec = ptr_num_sorted_cw_in_sect[srt_sec_cnt];
  548|  27.5k|  in_segment_remain_num_cw = num_segment;
  549|       |
  550|   508k|  while (srt_sec_cnt < num_sorted_section) {
  ------------------
  |  Branch (550:10): [True: 480k, False: 27.4k]
  ------------------
  551|   480k|    if (in_segment_remain_num_cw < remain_num_cw_sort_sec) {
  ------------------
  |  Branch (551:9): [True: 135k, False: 344k]
  ------------------
  552|   135k|      ptr_num_ext_sort_cw_sect[x_srt_sc_cnt] = in_segment_remain_num_cw;
  553|   135k|      ptr_extended_sorted_code_book[x_srt_sc_cnt] = ptr_sorted_cb[srt_sec_cnt];
  554|       |
  555|   135k|      remain_num_cw_sort_sec -= in_segment_remain_num_cw;
  556|   135k|      in_segment_remain_num_cw = num_segment;
  557|   344k|    } else if (in_segment_remain_num_cw == remain_num_cw_sort_sec) {
  ------------------
  |  Branch (557:16): [True: 41.0k, False: 303k]
  ------------------
  558|  41.0k|      ptr_num_ext_sort_cw_sect[x_srt_sc_cnt] = in_segment_remain_num_cw;
  559|  41.0k|      ptr_extended_sorted_code_book[x_srt_sc_cnt] = ptr_sorted_cb[srt_sec_cnt];
  560|       |
  561|  41.0k|      srt_sec_cnt++;
  562|  41.0k|      remain_num_cw_sort_sec = ptr_num_sorted_cw_in_sect[srt_sec_cnt];
  563|  41.0k|      in_segment_remain_num_cw = num_segment;
  564|   303k|    } else {
  565|   303k|      ptr_num_ext_sort_cw_sect[x_srt_sc_cnt] = remain_num_cw_sort_sec;
  566|   303k|      ptr_extended_sorted_code_book[x_srt_sc_cnt] = ptr_sorted_cb[srt_sec_cnt];
  567|       |
  568|   303k|      in_segment_remain_num_cw -= remain_num_cw_sort_sec;
  569|   303k|      srt_sec_cnt++;
  570|   303k|      remain_num_cw_sort_sec = ptr_num_sorted_cw_in_sect[srt_sec_cnt];
  571|   303k|    }
  572|   480k|    ptr_ext_sorted_sect_max_cb_len[x_srt_sc_cnt] =
  573|   480k|        min(ptr_max_cw_len_tbl[ptr_extended_sorted_code_book[x_srt_sc_cnt]],
  ------------------
  |  |   75|   480k|#define min(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (75:20): [True: 207k, False: 273k]
  |  |  ------------------
  ------------------
  574|   480k|            longest_cw_len);
  575|       |
  576|   480k|    x_srt_sc_cnt += 1;
  577|       |
  578|   480k|    if (x_srt_sc_cnt >= (MAX_SFB_HCR + MAX_HCR_SETS)) {
  ------------------
  |  |  156|   480k|#define MAX_SFB_HCR (((1024 / 8) / LINES_PER_UNIT) * 8)
  |  |  ------------------
  |  |  |  |  154|   480k|#define LINES_PER_UNIT 4
  |  |  ------------------
  ------------------
                  if (x_srt_sc_cnt >= (MAX_SFB_HCR + MAX_HCR_SETS)) {
  ------------------
  |  |  164|   480k|#define MAX_HCR_SETS 14
  ------------------
  |  Branch (578:9): [True: 31, False: 480k]
  ------------------
  579|     31|      ptr_hcr_info->str_dec_io.err_log |= (ERROR_POS << 28);
  ------------------
  |  |  185|     31|#define ERROR_POS 0x00000001
  ------------------
  580|     31|      return;
  581|     31|    }
  582|   480k|  }
  583|  27.4k|  ptr_num_ext_sort_cw_sect[x_srt_sc_cnt] = 0;
  584|  27.4k|}
ixheaacd_huff_code_reorder.c:ixheaacd_calc_num_ext_sorted_sect_sets:
  215|  27.4k|    WORD32 num_ext_sorted_sect_in_sets_idx) {
  216|  27.4k|  UWORD16 counter = 0;
  217|  27.4k|  UWORD32 cw_sum = 0;
  218|  27.4k|  UWORD16 *ptr_num_ext_sort_cw_in_sect = ptr_num_ext_sorted_cw_in_sect;
  219|  27.4k|  UWORD16 *ptr_num_ext_sort_sect_in_sets = ptr_num_ext_sorted_sect_in_sets;
  220|       |
  221|   389k|  while (ptr_num_ext_sort_cw_in_sect[num_ext_sorted_cw_in_sect_idx] != 0) {
  ------------------
  |  Branch (221:10): [True: 363k, False: 25.4k]
  ------------------
  222|   363k|    cw_sum += ptr_num_ext_sort_cw_in_sect[num_ext_sorted_cw_in_sect_idx];
  223|   363k|    num_ext_sorted_cw_in_sect_idx++;
  224|   363k|    if (num_ext_sorted_cw_in_sect_idx >= (MAX_SFB_HCR + MAX_HCR_SETS)) {
  ------------------
  |  |  156|   363k|#define MAX_SFB_HCR (((1024 / 8) / LINES_PER_UNIT) * 8)
  |  |  ------------------
  |  |  |  |  154|   363k|#define LINES_PER_UNIT 4
  |  |  ------------------
  ------------------
                  if (num_ext_sorted_cw_in_sect_idx >= (MAX_SFB_HCR + MAX_HCR_SETS)) {
  ------------------
  |  |  164|   363k|#define MAX_HCR_SETS 14
  ------------------
  |  Branch (224:9): [True: 0, False: 363k]
  ------------------
  225|      0|      return;
  226|      0|    }
  227|   363k|    if (cw_sum > num_segment) {
  ------------------
  |  Branch (227:9): [True: 0, False: 363k]
  ------------------
  228|      0|      return;
  229|      0|    }
  230|   363k|    counter++;
  231|   363k|    if (counter > 256) {
  ------------------
  |  Branch (231:9): [True: 0, False: 363k]
  ------------------
  232|      0|      return;
  233|      0|    }
  234|   363k|    if (cw_sum == num_segment) {
  ------------------
  |  Branch (234:9): [True: 84.6k, False: 279k]
  ------------------
  235|  84.6k|      ptr_num_ext_sort_sect_in_sets[num_ext_sorted_sect_in_sets_idx] = counter;
  236|  84.6k|      num_ext_sorted_sect_in_sets_idx++;
  237|  84.6k|      if (num_ext_sorted_sect_in_sets_idx >= MAX_HCR_SETS) {
  ------------------
  |  |  164|  84.6k|#define MAX_HCR_SETS 14
  ------------------
  |  Branch (237:11): [True: 2.01k, False: 82.6k]
  ------------------
  238|  2.01k|        return;
  239|  2.01k|      }
  240|  82.6k|      counter = 0;
  241|  82.6k|      cw_sum = 0;
  242|  82.6k|    }
  243|   363k|  }
  244|  25.4k|  ptr_num_ext_sort_sect_in_sets[num_ext_sorted_sect_in_sets_idx] = counter;
  245|  25.4k|}
ixheaacd_huff_code_reorder.c:ixheaacd_decode_pcw:
 1088|  27.4k|                                ia_aac_dec_tables_struct *ptr_aac_tables) {
 1089|  27.4k|  UWORD16 ext_sort_sec;
 1090|  27.4k|  UWORD16 cur_ext_sort_cw_sec;
 1091|  27.4k|  UWORD8 codebook;
 1092|  27.4k|  UWORD8 dimension;
 1093|  27.4k|  WORD32 increment;
 1094|       |
 1095|  27.4k|  WORD32 num_ext_sorted_cw_in_sect_idx =
 1096|  27.4k|      ptr_hcr_info->sect_info.num_ext_sorted_cw_in_sect_idx;
 1097|  27.4k|  UWORD8 *ptr_ext_sorted_cw = ptr_hcr_info->sect_info.ptr_ext_sorted_cw;
 1098|  27.4k|  WORD32 ext_sorted_cw_idx = ptr_hcr_info->sect_info.ext_sorted_cw_idx;
 1099|  27.4k|  UWORD16 *ptr_num_ext_sorted_sect_in_sets =
 1100|  27.4k|      ptr_hcr_info->sect_info.ptr_num_ext_sorted_sect_in_sets;
 1101|  27.4k|  WORD32 num_ext_sorted_sect_in_sets_idx =
 1102|  27.4k|      ptr_hcr_info->sect_info.num_ext_sorted_sect_in_sets_idx;
 1103|  27.4k|  WORD32 *ptr_quant_spec_coeff =
 1104|  27.4k|      ptr_hcr_info->str_dec_io.ptr_quant_spec_coeff_base;
 1105|  27.4k|  UWORD16 *arr_seg_start_l = ptr_hcr_info->str_segment_info.arr_seg_start_l;
 1106|  27.4k|  WORD8 *p_remaining_bits_in_seg =
 1107|  27.4k|      ptr_hcr_info->str_segment_info.p_remaining_bits_in_seg;
 1108|  27.4k|  UWORD8 *ptr_ext_sorted_sect_max_cb_len =
 1109|  27.4k|      ptr_hcr_info->sect_info.ptr_ext_sorted_sect_max_cb_len;
 1110|  27.4k|  WORD32 ext_sorted_sect_max_cb_len_idx =
 1111|  27.4k|      ptr_hcr_info->sect_info.ext_sorted_sect_max_cb_len_idx;
 1112|  27.4k|  UWORD8 max_allowed_cw_len;
 1113|  27.4k|  WORD32 num_decoded_bits;
 1114|  27.4k|  const UWORD8 *ptr_cb_dimension_tbl =
 1115|  27.4k|      ptr_hcr_info->table_info.ptr_cb_dimension_tbl;
 1116|       |
 1117|  27.4k|  WORD32 read_word = ixheaacd_aac_showbits_32(
 1118|  27.4k|      itt_bit_buff->ptr_read_next, itt_bit_buff->cnt_bits, &increment);
 1119|  27.4k|  WORD32 read_bits = itt_bit_buff->cnt_bits;
 1120|       |
 1121|  27.4k|  itt_bit_buff->ptr_read_next += increment;
 1122|       |
 1123|  27.4k|  for (ext_sort_sec =
 1124|  27.4k|           ptr_num_ext_sorted_sect_in_sets[num_ext_sorted_sect_in_sets_idx];
 1125|   197k|       ext_sort_sec != 0; ext_sort_sec--) {
  ------------------
  |  Branch (1125:8): [True: 170k, False: 27.4k]
  ------------------
 1126|   170k|    codebook = ptr_ext_sorted_cw[ext_sorted_cw_idx];
 1127|   170k|    if (codebook <= 0) return;
  ------------------
  |  Branch (1127:9): [True: 0, False: 170k]
  ------------------
 1128|       |
 1129|   170k|    ext_sorted_cw_idx++;
 1130|   170k|    if (ext_sorted_cw_idx >= (MAX_SFB_HCR + MAX_HCR_SETS)) {
  ------------------
  |  |  156|   170k|#define MAX_SFB_HCR (((1024 / 8) / LINES_PER_UNIT) * 8)
  |  |  ------------------
  |  |  |  |  154|   170k|#define LINES_PER_UNIT 4
  |  |  ------------------
  ------------------
                  if (ext_sorted_cw_idx >= (MAX_SFB_HCR + MAX_HCR_SETS)) {
  ------------------
  |  |  164|   170k|#define MAX_HCR_SETS 14
  ------------------
  |  Branch (1130:9): [True: 0, False: 170k]
  ------------------
 1131|      0|      return;
 1132|      0|    }
 1133|   170k|    dimension = ptr_cb_dimension_tbl[codebook];
 1134|   170k|    max_allowed_cw_len =
 1135|   170k|        ptr_ext_sorted_sect_max_cb_len[ext_sorted_sect_max_cb_len_idx];
 1136|   170k|    ext_sorted_sect_max_cb_len_idx++;
 1137|   170k|    if (ext_sorted_sect_max_cb_len_idx >= (MAX_SFB_HCR + MAX_HCR_SETS)) {
  ------------------
  |  |  156|   170k|#define MAX_SFB_HCR (((1024 / 8) / LINES_PER_UNIT) * 8)
  |  |  ------------------
  |  |  |  |  154|   170k|#define LINES_PER_UNIT 4
  |  |  ------------------
  ------------------
                  if (ext_sorted_sect_max_cb_len_idx >= (MAX_SFB_HCR + MAX_HCR_SETS)) {
  ------------------
  |  |  164|   170k|#define MAX_HCR_SETS 14
  ------------------
  |  Branch (1137:9): [True: 0, False: 170k]
  ------------------
 1138|      0|      return;
 1139|      0|    }
 1140|       |
 1141|   170k|    if (codebook <= 4) {
  ------------------
  |  Branch (1141:9): [True: 13.7k, False: 156k]
  ------------------
 1142|  13.7k|      WORD32 tbl_sign = 0;
 1143|  13.7k|      const UWORD16 *cb_table =
 1144|  13.7k|          (UWORD16 *)(ptr_aac_tables->code_book[codebook]);
 1145|  13.7k|      const UWORD32 *idx_table =
 1146|  13.7k|          (UWORD32 *)(ptr_aac_tables->index_table[codebook]);
 1147|       |
 1148|  13.7k|      if (codebook > 2) {
  ------------------
  |  Branch (1148:11): [True: 3.88k, False: 9.83k]
  ------------------
 1149|  3.88k|        tbl_sign = 1;
 1150|  3.88k|      }
 1151|       |
 1152|  13.7k|      {
 1153|  13.7k|        num_decoded_bits = 0;
 1154|  13.7k|        cur_ext_sort_cw_sec =
 1155|  13.7k|            ptr_hcr_info->sect_info
 1156|  13.7k|                .ptr_num_ext_sorted_cw_in_sect[num_ext_sorted_cw_in_sect_idx];
 1157|       |
 1158|  13.7k|        arr_seg_start_l = ixheaacd_huff_dec_quad_hcr_pcw(
 1159|  13.7k|            ptr_hcr_info, itt_bit_buff, cur_ext_sort_cw_sec, cb_table, tbl_sign,
 1160|  13.7k|            idx_table, &read_word, &read_bits, arr_seg_start_l,
 1161|  13.7k|            p_remaining_bits_in_seg, &num_decoded_bits);
 1162|       |
 1163|  13.7k|        p_remaining_bits_in_seg += cur_ext_sort_cw_sec;
 1164|       |
 1165|  13.7k|        if (cur_ext_sort_cw_sec * max_allowed_cw_len < num_decoded_bits) {
  ------------------
  |  Branch (1165:13): [True: 5.03k, False: 8.68k]
  ------------------
 1166|  5.03k|          ptr_hcr_info->str_dec_io.err_log |= (ERROR_POS << 19);
  ------------------
  |  |  185|  5.03k|#define ERROR_POS 0x00000001
  ------------------
 1167|  5.03k|        }
 1168|       |
 1169|  13.7k|        if (1 ==
  ------------------
  |  Branch (1169:13): [True: 0, False: 13.7k]
  ------------------
 1170|  13.7k|            ixheaacd_err_detect_pcw_segment(
 1171|  13.7k|                *p_remaining_bits_in_seg, ptr_hcr_info, PCW,
 1172|  13.7k|                ptr_quant_spec_coeff +
 1173|  13.7k|                    ptr_hcr_info->str_dec_io.quant_spec_coeff_idx - dimension,
 1174|  13.7k|                dimension)) {
 1175|      0|          return;
 1176|      0|        }
 1177|  13.7k|      }
 1178|   156k|    } else if (codebook < 11) {
  ------------------
  |  Branch (1178:16): [True: 29.6k, False: 126k]
  ------------------
 1179|  29.6k|      {
 1180|  29.6k|        WORD32 tbl_sign = 0;
 1181|  29.6k|        WORD32 huff_mode = 9;
 1182|  29.6k|        const UWORD16 *cb_table =
 1183|  29.6k|            (UWORD16 *)(ptr_aac_tables->code_book[codebook]);
 1184|  29.6k|        const UWORD32 *idx_table =
 1185|  29.6k|            (UWORD32 *)(ptr_aac_tables->index_table[codebook]);
 1186|  29.6k|        num_decoded_bits = 0;
 1187|       |
 1188|  29.6k|        if (codebook > 6) {
  ------------------
  |  Branch (1188:13): [True: 16.4k, False: 13.2k]
  ------------------
 1189|  16.4k|          if (codebook > 8)
  ------------------
  |  Branch (1189:15): [True: 12.8k, False: 3.52k]
  ------------------
 1190|  12.8k|            huff_mode = 13;
 1191|  3.52k|          else
 1192|  3.52k|            huff_mode = 8;
 1193|  16.4k|          tbl_sign = 1;
 1194|  16.4k|        }
 1195|       |
 1196|  29.6k|        cur_ext_sort_cw_sec =
 1197|  29.6k|            ptr_hcr_info->sect_info
 1198|  29.6k|                .ptr_num_ext_sorted_cw_in_sect[num_ext_sorted_cw_in_sect_idx];
 1199|       |
 1200|  29.6k|        arr_seg_start_l = ixheaacd_huff_dec_pair_hcr_pcw(
 1201|  29.6k|            ptr_hcr_info, itt_bit_buff, cur_ext_sort_cw_sec, cb_table,
 1202|  29.6k|            &read_word, tbl_sign, idx_table, arr_seg_start_l, &read_bits,
 1203|  29.6k|            huff_mode, p_remaining_bits_in_seg, &num_decoded_bits);
 1204|       |
 1205|  29.6k|        p_remaining_bits_in_seg += cur_ext_sort_cw_sec;
 1206|       |
 1207|  29.6k|        if (cur_ext_sort_cw_sec * max_allowed_cw_len < num_decoded_bits) {
  ------------------
  |  Branch (1207:13): [True: 11.8k, False: 17.8k]
  ------------------
 1208|  11.8k|          ptr_hcr_info->str_dec_io.err_log |= (ERROR_POS << 18);
  ------------------
  |  |  185|  11.8k|#define ERROR_POS 0x00000001
  ------------------
 1209|  11.8k|        }
 1210|       |
 1211|  29.6k|        if (1 ==
  ------------------
  |  Branch (1211:13): [True: 0, False: 29.6k]
  ------------------
 1212|  29.6k|            ixheaacd_err_detect_pcw_segment(
 1213|  29.6k|                *p_remaining_bits_in_seg, ptr_hcr_info, PCW_SIGN,
 1214|  29.6k|                ptr_quant_spec_coeff +
 1215|  29.6k|                    ptr_hcr_info->str_dec_io.quant_spec_coeff_idx - dimension,
 1216|  29.6k|                dimension)) {
 1217|      0|          return;
 1218|      0|        }
 1219|  29.6k|      }
 1220|   126k|    } else if ((codebook >= 11)) {
  ------------------
  |  Branch (1220:16): [True: 126k, False: 0]
  ------------------
 1221|   126k|      const UWORD32 *idx_table =
 1222|   126k|          ptr_aac_tables->pstr_huffmann_tables->idx_table_hf11;
 1223|   126k|      const UWORD16 *cb_table =
 1224|   126k|          ptr_aac_tables->pstr_huffmann_tables->input_table_cb11;
 1225|   126k|      num_decoded_bits = 0;
 1226|       |
 1227|   126k|      cur_ext_sort_cw_sec =
 1228|   126k|          ptr_hcr_info->sect_info
 1229|   126k|              .ptr_num_ext_sorted_cw_in_sect[num_ext_sorted_cw_in_sect_idx];
 1230|       |
 1231|   126k|      arr_seg_start_l = ixheaacd_huff_dec_word_hcr_pcw(
 1232|   126k|          ptr_hcr_info, itt_bit_buff, cur_ext_sort_cw_sec, cb_table, &read_word,
 1233|   126k|          idx_table, arr_seg_start_l, &read_bits, p_remaining_bits_in_seg,
 1234|   126k|          &num_decoded_bits);
 1235|       |
 1236|   126k|      p_remaining_bits_in_seg += cur_ext_sort_cw_sec;
 1237|       |
 1238|   126k|      if (cur_ext_sort_cw_sec * max_allowed_cw_len < num_decoded_bits) {
  ------------------
  |  Branch (1238:11): [True: 61.9k, False: 64.8k]
  ------------------
 1239|  61.9k|        ptr_hcr_info->str_dec_io.err_log |= (ERROR_POS << 17);
  ------------------
  |  |  185|  61.9k|#define ERROR_POS 0x00000001
  ------------------
 1240|  61.9k|      }
 1241|       |
 1242|   126k|      if (1 == ixheaacd_err_detect_pcw_segment(
  ------------------
  |  Branch (1242:11): [True: 0, False: 126k]
  ------------------
 1243|   126k|                   *p_remaining_bits_in_seg, ptr_hcr_info, PCW_ESC_SIGN,
 1244|   126k|                   ptr_quant_spec_coeff +
 1245|   126k|                       ptr_hcr_info->str_dec_io.quant_spec_coeff_idx - 2,
 1246|   126k|                   2)) {
 1247|      0|        return;
 1248|      0|      }
 1249|   126k|    }
 1250|       |
 1251|   170k|    num_ext_sorted_cw_in_sect_idx++;
 1252|   170k|    if (num_ext_sorted_cw_in_sect_idx >= MAX_SFB_HCR + MAX_HCR_SETS) {
  ------------------
  |  |  156|   170k|#define MAX_SFB_HCR (((1024 / 8) / LINES_PER_UNIT) * 8)
  |  |  ------------------
  |  |  |  |  154|   170k|#define LINES_PER_UNIT 4
  |  |  ------------------
  ------------------
                  if (num_ext_sorted_cw_in_sect_idx >= MAX_SFB_HCR + MAX_HCR_SETS) {
  ------------------
  |  |  164|   170k|#define MAX_HCR_SETS 14
  ------------------
  |  Branch (1252:9): [True: 0, False: 170k]
  ------------------
 1253|      0|      return;
 1254|      0|    }
 1255|   170k|  }
 1256|       |
 1257|  27.4k|  num_ext_sorted_sect_in_sets_idx++;
 1258|  27.4k|  if (num_ext_sorted_sect_in_sets_idx >= MAX_HCR_SETS) {
  ------------------
  |  |  164|  27.4k|#define MAX_HCR_SETS 14
  ------------------
  |  Branch (1258:7): [True: 0, False: 27.4k]
  ------------------
 1259|      0|    return;
 1260|      0|  }
 1261|       |
 1262|  27.4k|  itt_bit_buff->cnt_bits = read_bits;
 1263|       |
 1264|  27.4k|  ptr_hcr_info->sect_info.num_ext_sorted_cw_in_sect_idx =
 1265|  27.4k|      num_ext_sorted_cw_in_sect_idx;
 1266|  27.4k|  ptr_hcr_info->sect_info.ext_sorted_cw_idx = ext_sorted_cw_idx;
 1267|  27.4k|  ptr_hcr_info->sect_info.num_ext_sorted_sect_in_sets_idx =
 1268|  27.4k|      num_ext_sorted_sect_in_sets_idx;
 1269|  27.4k|  ptr_hcr_info->sect_info.ext_sorted_sect_max_cb_len_idx =
 1270|  27.4k|      ext_sorted_sect_max_cb_len_idx;
 1271|  27.4k|}
ixheaacd_huff_code_reorder.c:ixheaacd_huff_dec_quad_hcr_pcw:
  796|  13.7k|    WORD32 *ptr_num_decoded_bits) {
  797|  13.7k|  WORD16 index, length;
  798|       |
  799|  13.7k|  UWORD8 *ptr_read_next = it_bit_buff->ptr_read_next;
  800|  13.7k|  WORD32 spec_index = ptr_hcr_info->str_dec_io.quant_spec_coeff_idx;
  801|  13.7k|  WORD32 *spec_coef =
  802|  13.7k|      ptr_hcr_info->str_dec_io.ptr_quant_spec_coeff_base + spec_index;
  803|  13.7k|  WORD32 *bit_pos = &it_bit_buff->bit_pos;
  804|       |
  805|  43.9k|  do {
  806|  43.9k|    UWORD32 read_word1;
  807|       |
  808|  43.9k|    WORD32 read_bit_offset =
  809|  43.9k|        *arr_seg_start_l - (it_bit_buff->size - *read_bits);
  810|       |
  811|  43.9k|    if (read_bit_offset) {
  ------------------
  |  Branch (811:9): [True: 36.5k, False: 7.34k]
  ------------------
  812|  36.5k|      *read_bits -= read_bit_offset;
  813|  36.5k|      *bit_pos += read_bit_offset;
  814|  36.5k|      ixheaacd_aac_read_byte_corr(&ptr_read_next, bit_pos, read_word,
  815|  36.5k|                                  it_bit_buff->ptr_bit_buf_end);
  816|  36.5k|    }
  817|  43.9k|    *bit_pos = max(0, *bit_pos);
  ------------------
  |  |   74|  43.9k|#define max(a, b) (((a) > (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (74:20): [True: 4.72k, False: 39.2k]
  |  |  ------------------
  ------------------
  818|  43.9k|    read_word1 = *read_word << *bit_pos;
  819|  43.9k|    ixheaacd_huffman_decode(read_word1, &index, &length, code_book_tbl,
  820|  43.9k|                            idx_table);
  821|  43.9k|    *bit_pos += length;
  822|  43.9k|    *p_remaining_bits_in_seg -= length;
  823|  43.9k|    *read_bits -= length;
  824|  43.9k|    *ptr_num_decoded_bits += length;
  825|  43.9k|    *arr_seg_start_l += length;
  826|  43.9k|    ixheaacd_aac_read_byte_corr(&ptr_read_next, bit_pos, read_word,
  827|  43.9k|                                it_bit_buff->ptr_bit_buf_end);
  828|  43.9k|    if (tbl_sign) {
  ------------------
  |  Branch (828:9): [True: 18.3k, False: 25.5k]
  ------------------
  829|  18.3k|      WORD32 temp_word;
  830|  18.3k|      WORD32 w, x, y, z;
  831|  18.3k|      temp_word = *read_word << *bit_pos;
  832|  18.3k|      w = index / 27;
  833|  18.3k|      index = index - w * 27;
  834|  18.3k|      x = index / 9;
  835|  18.3k|      index = index - x * 9;
  836|  18.3k|      y = index / 3;
  837|  18.3k|      z = index - y * 3;
  838|  18.3k|      if (w) {
  ------------------
  |  Branch (838:11): [True: 11.2k, False: 7.12k]
  ------------------
  839|  11.2k|        if (temp_word & 0x80000000) w = -w;
  ------------------
  |  Branch (839:13): [True: 4.10k, False: 7.10k]
  ------------------
  840|  11.2k|        temp_word <<= 1;
  841|  11.2k|        *bit_pos += 1;
  842|  11.2k|        *p_remaining_bits_in_seg -= 1;
  843|  11.2k|        *read_bits -= 1;
  844|  11.2k|        *ptr_num_decoded_bits += 1;
  845|  11.2k|        *arr_seg_start_l += 1;
  846|  11.2k|      }
  847|  18.3k|      *spec_coef++ = w;
  848|  18.3k|      spec_index++;
  849|       |
  850|  18.3k|      if (x) {
  ------------------
  |  Branch (850:11): [True: 8.68k, False: 9.65k]
  ------------------
  851|  8.68k|        if (temp_word & 0x80000000) x = -x;
  ------------------
  |  Branch (851:13): [True: 2.79k, False: 5.89k]
  ------------------
  852|  8.68k|        temp_word <<= 1;
  853|  8.68k|        *bit_pos += 1;
  854|  8.68k|        *p_remaining_bits_in_seg -= 1;
  855|  8.68k|        *read_bits -= 1;
  856|  8.68k|        *ptr_num_decoded_bits += 1;
  857|  8.68k|        *arr_seg_start_l += 1;
  858|  8.68k|      }
  859|  18.3k|      *spec_coef++ = x;
  860|  18.3k|      spec_index++;
  861|  18.3k|      if (y) {
  ------------------
  |  Branch (861:11): [True: 11.9k, False: 6.36k]
  ------------------
  862|  11.9k|        if (temp_word & 0x80000000) y = -y;
  ------------------
  |  Branch (862:13): [True: 5.63k, False: 6.33k]
  ------------------
  863|  11.9k|        temp_word <<= 1;
  864|  11.9k|        *bit_pos += 1;
  865|  11.9k|        *p_remaining_bits_in_seg -= 1;
  866|  11.9k|        *read_bits -= 1;
  867|  11.9k|        *ptr_num_decoded_bits += 1;
  868|  11.9k|        *arr_seg_start_l += 1;
  869|  11.9k|      }
  870|  18.3k|      *spec_coef++ = y;
  871|  18.3k|      spec_index++;
  872|  18.3k|      if (z) {
  ------------------
  |  Branch (872:11): [True: 10.9k, False: 7.38k]
  ------------------
  873|  10.9k|        if (temp_word & 0x80000000) z = -z;
  ------------------
  |  Branch (873:13): [True: 3.77k, False: 7.17k]
  ------------------
  874|  10.9k|        temp_word <<= 1;
  875|  10.9k|        *bit_pos += 1;
  876|  10.9k|        *p_remaining_bits_in_seg -= 1;
  877|  10.9k|        *read_bits -= 1;
  878|  10.9k|        *ptr_num_decoded_bits += 1;
  879|  10.9k|        *arr_seg_start_l += 1;
  880|  10.9k|      }
  881|  18.3k|      *spec_coef++ = z;
  882|  18.3k|      spec_index++;
  883|       |
  884|  18.3k|    }
  885|       |
  886|  25.5k|    else {
  887|  25.5k|      WORD32 w, x, y, z;
  888|       |
  889|  25.5k|      w = index / 27 - 1;
  890|  25.5k|      index = index - (w + 1) * 27;
  891|  25.5k|      x = index / 9 - 1;
  892|  25.5k|      index = index - (x + 1) * 9;
  893|  25.5k|      y = index / 3 - 1;
  894|  25.5k|      z = index - ((y + 1) * 3) - 1;
  895|  25.5k|      *spec_coef++ = w;
  896|       |
  897|  25.5k|      *spec_coef++ = x;
  898|       |
  899|  25.5k|      *spec_coef++ = y;
  900|       |
  901|  25.5k|      *spec_coef++ = z;
  902|  25.5k|      spec_index += 4;
  903|  25.5k|    }
  904|       |
  905|  43.9k|    ixheaacd_aac_read_byte_corr(&ptr_read_next, bit_pos, read_word,
  906|  43.9k|                                it_bit_buff->ptr_bit_buf_end);
  907|  43.9k|    arr_seg_start_l++;
  908|  43.9k|    p_remaining_bits_in_seg++;
  909|  43.9k|    no_bands--;
  910|  43.9k|  } while (no_bands != 0);
  ------------------
  |  Branch (910:12): [True: 30.1k, False: 13.7k]
  ------------------
  911|       |
  912|  13.7k|  it_bit_buff->ptr_read_next = ptr_read_next;
  913|  13.7k|  ptr_hcr_info->str_dec_io.quant_spec_coeff_idx = spec_index;
  914|       |
  915|  13.7k|  return arr_seg_start_l;
  916|  13.7k|}
ixheaacd_huff_code_reorder.c:ixheaacd_err_detect_pcw_segment:
  130|   170k|                                              UWORD8 dimension) {
  131|   170k|  WORD8 i;
  132|   170k|  if (remaining_bits_in_segment < 0) {
  ------------------
  |  Branch (132:7): [True: 0, False: 170k]
  ------------------
  133|      0|    switch (kind) {
  ------------------
  |  Branch (133:13): [True: 0, False: 0]
  ------------------
  134|      0|      case PCW:
  ------------------
  |  Branch (134:7): [True: 0, False: 0]
  ------------------
  135|      0|        ptr_hcr_info->str_dec_io.err_log |= (ERROR_POS << 31);
  ------------------
  |  |  185|      0|#define ERROR_POS 0x00000001
  ------------------
  136|      0|        break;
  137|      0|      case PCW_SIGN:
  ------------------
  |  Branch (137:7): [True: 0, False: 0]
  ------------------
  138|      0|        ptr_hcr_info->str_dec_io.err_log |= (ERROR_POS << 30);
  ------------------
  |  |  185|      0|#define ERROR_POS 0x00000001
  ------------------
  139|      0|        break;
  140|      0|      case PCW_ESC_SIGN:
  ------------------
  |  Branch (140:7): [True: 0, False: 0]
  ------------------
  141|      0|        ptr_hcr_info->str_dec_io.err_log |= (ERROR_POS << 29);
  ------------------
  |  |  185|      0|#define ERROR_POS 0x00000001
  ------------------
  142|      0|        break;
  143|      0|    }
  144|      0|    for (i = dimension; i != 0; i--) {
  ------------------
  |  Branch (144:25): [True: 0, False: 0]
  ------------------
  145|      0|      *qsc_base_of_cw++ = (WORD32)8192;
  146|      0|    }
  147|      0|    return 1;
  148|      0|  }
  149|   170k|  return 0;
  150|   170k|}
ixheaacd_huff_code_reorder.c:ixheaacd_huff_dec_pair_hcr_pcw:
  657|  29.6k|{
  658|  29.6k|  WORD32 spec_index = ptr_hcr_info->str_dec_io.quant_spec_coeff_idx;
  659|  29.6k|  WORD32 *spec_coef =
  660|  29.6k|      ptr_hcr_info->str_dec_io.ptr_quant_spec_coeff_base + spec_index;
  661|  29.6k|  WORD16 index, length;
  662|  29.6k|  WORD32 y, z;
  663|  29.6k|  UWORD8 *ptr_read_next = it_bit_buff->ptr_read_next;
  664|  29.6k|  WORD32 *bit_pos = &it_bit_buff->bit_pos;
  665|       |
  666|  3.42M|  do {
  667|  3.42M|    UWORD32 read_word1;
  668|       |
  669|  3.42M|    WORD32 read_bit_offset =
  670|  3.42M|        *arr_seg_start_l - (it_bit_buff->size - *read_bits);
  671|       |
  672|  3.42M|    if (read_bit_offset) {
  ------------------
  |  Branch (672:9): [True: 3.32M, False: 108k]
  ------------------
  673|  3.32M|      *read_bits -= read_bit_offset;
  674|  3.32M|      *bit_pos += read_bit_offset;
  675|  3.32M|      ixheaacd_aac_read_byte_corr(&ptr_read_next, bit_pos, read_word,
  676|  3.32M|                                  it_bit_buff->ptr_bit_buf_end);
  677|  3.32M|    }
  678|  3.42M|    *bit_pos = max(0, *bit_pos);
  ------------------
  |  |   74|  3.42M|#define max(a, b) (((a) > (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (74:20): [True: 150k, False: 3.27M]
  |  |  ------------------
  ------------------
  679|  3.42M|    read_word1 = *read_word << *bit_pos;
  680|  3.42M|    ixheaacd_huffman_decode(read_word1, &index, &length, code_book_tbl,
  681|  3.42M|                            idx_table);
  682|  3.42M|    *bit_pos += length;
  683|  3.42M|    *ptr_num_decoded_bits += length;
  684|  3.42M|    *p_remaining_bits_in_seg -= length;
  685|  3.42M|    *arr_seg_start_l += length;
  686|  3.42M|    *read_bits -= length;
  687|  3.42M|    ixheaacd_aac_read_byte_corr(&ptr_read_next, bit_pos, read_word,
  688|  3.42M|                                it_bit_buff->ptr_bit_buf_end);
  689|  3.42M|    if (tbl_sign) {
  ------------------
  |  Branch (689:9): [True: 65.8k, False: 3.36M]
  ------------------
  690|  65.8k|      WORD32 temp_word;
  691|  65.8k|      temp_word = *read_word << *bit_pos;
  692|  65.8k|      y = index / huff_mode;
  693|  65.8k|      z = index - huff_mode * y;
  694|       |
  695|  65.8k|      if (y) {
  ------------------
  |  Branch (695:11): [True: 25.5k, False: 40.3k]
  ------------------
  696|  25.5k|        if (temp_word & 0x80000000) y = -y;
  ------------------
  |  Branch (696:13): [True: 11.0k, False: 14.4k]
  ------------------
  697|       |
  698|  25.5k|        temp_word = temp_word << 1;
  699|  25.5k|        *bit_pos += 1;
  700|  25.5k|        *p_remaining_bits_in_seg -= 1;
  701|  25.5k|        *ptr_num_decoded_bits += 1;
  702|  25.5k|        *arr_seg_start_l += 1;
  703|  25.5k|        *read_bits -= 1;
  704|  25.5k|      }
  705|  65.8k|      *spec_coef++ = y;
  706|  65.8k|      spec_index++;
  707|       |
  708|  65.8k|      if (z) {
  ------------------
  |  Branch (708:11): [True: 27.4k, False: 38.4k]
  ------------------
  709|  27.4k|        if (temp_word & 0x80000000) {
  ------------------
  |  Branch (709:13): [True: 14.3k, False: 13.0k]
  ------------------
  710|  14.3k|          z = -z;
  711|  14.3k|        }
  712|  27.4k|        temp_word <<= 1;
  713|  27.4k|        *bit_pos += 1;
  714|  27.4k|        *p_remaining_bits_in_seg -= 1;
  715|  27.4k|        *ptr_num_decoded_bits += 1;
  716|  27.4k|        *arr_seg_start_l += 1;
  717|  27.4k|        *read_bits -= 1;
  718|  27.4k|      }
  719|  65.8k|      *spec_coef++ = z;
  720|  65.8k|      spec_index++;
  721|  3.36M|    } else {
  722|  3.36M|      y = (index / huff_mode) - 4;
  723|  3.36M|      z = index - ((y + 4) * huff_mode) - 4;
  724|       |
  725|  3.36M|      *spec_coef++ = y;
  726|  3.36M|      *spec_coef++ = z;
  727|  3.36M|      spec_index += 2;
  728|  3.36M|    }
  729|  3.42M|    ixheaacd_aac_read_byte_corr(&ptr_read_next, bit_pos, read_word,
  730|  3.42M|                                it_bit_buff->ptr_bit_buf_end);
  731|  3.42M|    no_bands--;
  732|  3.42M|    arr_seg_start_l++;
  733|  3.42M|    p_remaining_bits_in_seg++;
  734|  3.42M|  } while (no_bands != 0);
  ------------------
  |  Branch (734:12): [True: 3.39M, False: 29.6k]
  ------------------
  735|       |
  736|  29.6k|  it_bit_buff->ptr_read_next = ptr_read_next;
  737|  29.6k|  ptr_hcr_info->str_dec_io.quant_spec_coeff_idx = spec_index;
  738|       |
  739|  29.6k|  return arr_seg_start_l;
  740|  29.6k|}
ixheaacd_huff_code_reorder.c:ixheaacd_huff_dec_word_hcr_pcw:
  922|   126k|    WORD8 *p_remaining_bits_in_seg, WORD32 *ptr_num_decoded_bits) {
  923|   126k|  WORD32 sp1, sp2;
  924|   126k|  WORD32 flush_cw;
  925|   126k|  WORD32 i, value, norm_val, off;
  926|   126k|  WORD32 out1, out2;
  927|   126k|  WORD16 index;
  928|   126k|  WORD32 length;
  929|   126k|  UWORD8 *ptr_read_next = it_bit_buff->ptr_read_next;
  930|   126k|  WORD32 spec_index = ptr_hcr_info->str_dec_io.quant_spec_coeff_idx;
  931|   126k|  WORD32 *spec_coef =
  932|   126k|      ptr_hcr_info->str_dec_io.ptr_quant_spec_coeff_base + spec_index;
  933|   126k|  WORD32 *bit_pos = &it_bit_buff->bit_pos;
  934|       |
  935|   970k|  do {
  936|   970k|    UWORD32 read_word1;
  937|       |
  938|   970k|    WORD32 read_bit_offset =
  939|   970k|        *arr_seg_start_l - (it_bit_buff->size - *read_bits);
  940|       |
  941|   970k|    if (read_bit_offset) {
  ------------------
  |  Branch (941:9): [True: 929k, False: 40.9k]
  ------------------
  942|   929k|      *read_bits -= read_bit_offset;
  943|   929k|      *bit_pos += read_bit_offset;
  944|   929k|      ixheaacd_aac_read_byte_corr1(&ptr_read_next, bit_pos, read_word,
  945|   929k|                                   it_bit_buff->ptr_bit_buf_end);
  946|   929k|    }
  947|   970k|    *bit_pos = max(0, *bit_pos);
  ------------------
  |  |   74|   970k|#define max(a, b) (((a) > (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (74:20): [True: 221k, False: 748k]
  |  |  ------------------
  ------------------
  948|   970k|    read_word1 = *read_word << *bit_pos;
  949|   970k|    ixheaacd_huff_sfb_table(read_word1, &index, &length, code_book_tbl,
  950|   970k|                            idx_table);
  951|   970k|    *bit_pos += length;
  952|   970k|    *read_bits -= length;
  953|   970k|    *arr_seg_start_l += length;
  954|   970k|    *p_remaining_bits_in_seg -= length;
  955|   970k|    *ptr_num_decoded_bits += length;
  956|   970k|    ixheaacd_aac_read_byte_corr(&ptr_read_next, bit_pos, read_word,
  957|   970k|                                it_bit_buff->ptr_bit_buf_end);
  958|       |
  959|   970k|    out1 = index / 17;
  960|   970k|    out2 = index - out1 * 17;
  961|   970k|    flush_cw = *read_word << *bit_pos;
  962|       |
  963|   970k|    sp1 = out1;
  964|   970k|    sp2 = out2;
  965|       |
  966|   970k|    if (out1) {
  ------------------
  |  Branch (966:9): [True: 760k, False: 210k]
  ------------------
  967|   760k|      if (flush_cw & 0x80000000) {
  ------------------
  |  Branch (967:11): [True: 398k, False: 362k]
  ------------------
  968|   398k|        out1 = -out1;
  969|   398k|      }
  970|   760k|      *bit_pos += 1;
  971|   760k|      *read_bits -= 1;
  972|   760k|      *p_remaining_bits_in_seg -= 1;
  973|   760k|      *ptr_num_decoded_bits += 1;
  974|   760k|      *arr_seg_start_l += 1;
  975|   760k|      flush_cw = (WORD32)flush_cw << 1;
  976|   760k|    }
  977|       |
  978|   970k|    if (out2) {
  ------------------
  |  Branch (978:9): [True: 780k, False: 189k]
  ------------------
  979|   780k|      *bit_pos += 1;
  980|   780k|      *read_bits -= 1;
  981|   780k|      *p_remaining_bits_in_seg -= 1;
  982|   780k|      *ptr_num_decoded_bits += 1;
  983|   780k|      *arr_seg_start_l += 1;
  984|   780k|      if (flush_cw & 0x80000000) {
  ------------------
  |  Branch (984:11): [True: 345k, False: 435k]
  ------------------
  985|   345k|        out2 = -out2;
  986|   345k|      }
  987|   780k|    }
  988|       |
  989|   970k|    ixheaacd_aac_read_byte_corr(&ptr_read_next, bit_pos, read_word,
  990|   970k|                                it_bit_buff->ptr_bit_buf_end);
  991|       |
  992|   970k|    if (sp1 == 16) {
  ------------------
  |  Branch (992:9): [True: 107k, False: 862k]
  ------------------
  993|   107k|      i = 4;
  994|   107k|      value = ixheaac_extu(*read_word, *bit_pos, 23);
  995|   107k|      value = value | 0xfffffe00;
  996|   107k|      norm_val = ixheaac_norm32(value);
  997|       |
  998|   107k|      i += (norm_val - 22);
  999|   107k|      *bit_pos += (norm_val - 21);
 1000|   107k|      *p_remaining_bits_in_seg -= (norm_val - 21);
 1001|   107k|      *ptr_num_decoded_bits += (norm_val - 21);
 1002|   107k|      *read_bits -= (norm_val - 21);
 1003|   107k|      *arr_seg_start_l += (norm_val - 21);
 1004|       |
 1005|   107k|      ixheaacd_aac_read_byte_corr(&ptr_read_next, bit_pos, read_word,
 1006|   107k|                                  it_bit_buff->ptr_bit_buf_end);
 1007|       |
 1008|   107k|      off = ixheaac_extu(*read_word, *bit_pos, 32 - i);
 1009|       |
 1010|   107k|      *bit_pos += i;
 1011|   107k|      *p_remaining_bits_in_seg -= i;
 1012|   107k|      *ptr_num_decoded_bits += i;
 1013|   107k|      *read_bits -= i;
 1014|   107k|      *arr_seg_start_l += i;
 1015|       |
 1016|   107k|      ixheaacd_aac_read_byte_corr(&ptr_read_next, bit_pos, read_word,
 1017|   107k|                                  it_bit_buff->ptr_bit_buf_end);
 1018|   107k|      ixheaacd_aac_read_byte_corr(&ptr_read_next, bit_pos, read_word,
 1019|   107k|                                  it_bit_buff->ptr_bit_buf_end);
 1020|       |
 1021|   107k|      i = off + ((WORD32)1 << i);
 1022|       |
 1023|   107k|      if (out1 < 0)
  ------------------
  |  Branch (1023:11): [True: 61.9k, False: 45.6k]
  ------------------
 1024|  61.9k|        *spec_coef++ = -i;
 1025|  45.6k|      else
 1026|  45.6k|        *spec_coef++ = i;
 1027|   107k|      spec_index++;
 1028|   862k|    } else {
 1029|   862k|      *spec_coef++ = out1;
 1030|   862k|      spec_index++;
 1031|   862k|    }
 1032|       |
 1033|   970k|    if (sp2 == 16) {
  ------------------
  |  Branch (1033:9): [True: 69.4k, False: 901k]
  ------------------
 1034|  69.4k|      i = 4;
 1035|  69.4k|      value = ixheaac_extu(*read_word, *bit_pos, 23);
 1036|  69.4k|      value = value | 0xfffffe00;
 1037|  69.4k|      norm_val = ixheaac_norm32(value);
 1038|       |
 1039|  69.4k|      i += (norm_val - 22);
 1040|       |
 1041|  69.4k|      *bit_pos += (norm_val - 21);
 1042|  69.4k|      *read_bits -= (norm_val - 21);
 1043|  69.4k|      *p_remaining_bits_in_seg -= (norm_val - 21);
 1044|  69.4k|      *ptr_num_decoded_bits += (norm_val - 21);
 1045|  69.4k|      *arr_seg_start_l += (norm_val - 21);
 1046|  69.4k|      ixheaacd_aac_read_byte_corr(&ptr_read_next, bit_pos, read_word,
 1047|  69.4k|                                  it_bit_buff->ptr_bit_buf_end);
 1048|       |
 1049|  69.4k|      off = ixheaac_extu(*read_word, *bit_pos, 32 - i);
 1050|       |
 1051|  69.4k|      *bit_pos += i;
 1052|  69.4k|      *p_remaining_bits_in_seg -= i;
 1053|  69.4k|      *ptr_num_decoded_bits += i;
 1054|  69.4k|      *read_bits -= i;
 1055|  69.4k|      *arr_seg_start_l += i;
 1056|       |
 1057|  69.4k|      ixheaacd_aac_read_byte_corr(&ptr_read_next, bit_pos, read_word,
 1058|  69.4k|                                  it_bit_buff->ptr_bit_buf_end);
 1059|  69.4k|      ixheaacd_aac_read_byte_corr(&ptr_read_next, bit_pos, read_word,
 1060|  69.4k|                                  it_bit_buff->ptr_bit_buf_end);
 1061|       |
 1062|  69.4k|      i = off + ((WORD32)1 << i);
 1063|       |
 1064|  69.4k|      if (out2 < 0)
  ------------------
  |  Branch (1064:11): [True: 24.3k, False: 45.0k]
  ------------------
 1065|  24.3k|        *spec_coef++ = -i;
 1066|  45.0k|      else
 1067|  45.0k|        *spec_coef++ = i;
 1068|  69.4k|      spec_index++;
 1069|   901k|    } else {
 1070|   901k|      *spec_coef++ = out2;
 1071|   901k|      spec_index++;
 1072|   901k|    }
 1073|       |
 1074|   970k|    arr_seg_start_l++;
 1075|   970k|    p_remaining_bits_in_seg++;
 1076|       |
 1077|   970k|    no_bands--;
 1078|   970k|  } while (no_bands != 0);
  ------------------
  |  Branch (1078:12): [True: 843k, False: 126k]
  ------------------
 1079|       |
 1080|   126k|  it_bit_buff->ptr_read_next = ptr_read_next;
 1081|   126k|  ptr_hcr_info->str_dec_io.quant_spec_coeff_idx = spec_index;
 1082|       |
 1083|   126k|  return arr_seg_start_l;
 1084|   126k|}
ixheaacd_huff_code_reorder.c:ixheaacd_err_detect_segmentation_final:
 1826|  27.2k|    ia_hcr_info_struct *ptr_hcr_info) {
 1827|  27.2k|  UWORD8 segmentation_err_flag = 0;
 1828|  27.2k|  UWORD16 i;
 1829|  27.2k|  WORD8 *p_remaining_bits_in_seg =
 1830|  27.2k|      ptr_hcr_info->str_segment_info.p_remaining_bits_in_seg;
 1831|  27.2k|  UWORD32 num_segment = ptr_hcr_info->str_segment_info.num_segment;
 1832|       |
 1833|  4.45M|  for (i = num_segment; i != 0; i--) {
  ------------------
  |  Branch (1833:25): [True: 4.42M, False: 27.2k]
  ------------------
 1834|  4.42M|    if (*p_remaining_bits_in_seg++ != 0) {
  ------------------
  |  Branch (1834:9): [True: 4.01M, False: 407k]
  ------------------
 1835|  4.01M|      segmentation_err_flag = 1;
 1836|  4.01M|    }
 1837|  4.42M|  }
 1838|  27.2k|  if (segmentation_err_flag == 1) {
  ------------------
  |  Branch (1838:7): [True: 19.7k, False: 7.56k]
  ------------------
 1839|  19.7k|    ptr_hcr_info->str_dec_io.err_log |= ERROR_POS;
  ------------------
  |  |  185|  19.7k|#define ERROR_POS 0x00000001
  ------------------
 1840|  19.7k|  }
 1841|  27.2k|}
ixheaacd_huff_code_reorder.c:ixheaacd_hcr_reorder_quantized_spec_coeff:
 1753|  27.2k|    ia_aac_dec_channel_info_struct *ptr_aac_dec_channel_info) {
 1754|  27.2k|  WORD32 qsc;
 1755|  27.2k|  UWORD32 abs_qsc;
 1756|  27.2k|  UWORD32 i, j;
 1757|  27.2k|  UWORD16 num_spec_val_sect;
 1758|  27.2k|  WORD32 *ptr_teva;
 1759|  27.2k|  UWORD16 lav_err_cnt = 0;
 1760|       |
 1761|  27.2k|  UWORD32 num_sect = ptr_hcr_info->str_dec_io.num_sect;
 1762|  27.2k|  WORD32 *ptr_quant_spec_coeff_base =
 1763|  27.2k|      ptr_hcr_info->str_dec_io.ptr_quant_spec_coeff_base;
 1764|  27.2k|  WORD32 *ptr_quant_spec_coeff =
 1765|  27.2k|      ptr_hcr_info->str_dec_io.ptr_quant_spec_coeff_base;
 1766|  27.2k|  const UWORD8 *ptr_cb_dim_shift_tbl =
 1767|  27.2k|      ptr_hcr_info->table_info.ptr_cb_dim_shift_tbl;
 1768|  27.2k|  const UWORD16 *ptr_lav_tbl = ptr_hcr_info->table_info.ptr_lav_tbl;
 1769|  27.2k|  UWORD8 *ptr_sorted_cb = ptr_hcr_info->sect_info.ptr_sorted_cb;
 1770|  27.2k|  UWORD16 *ptr_num_sorted_cw_in_sect =
 1771|  27.2k|      ptr_hcr_info->sect_info.ptr_num_sorted_cw_in_sect;
 1772|  27.2k|  UWORD16 *ptr_reorder_offset = ptr_hcr_info->sect_info.ptr_reorder_offset;
 1773|  27.2k|  WORD32 *arr_temp_values = ptr_hcr_info->str_segment_info.arr_temp_values;
 1774|  27.2k|  WORD32 *ptr_bak = ptr_hcr_info->str_segment_info.arr_temp_values;
 1775|       |
 1776|   453k|  for (i = num_sect; i != 0; i--) {
  ------------------
  |  Branch (1776:22): [True: 426k, False: 27.2k]
  ------------------
 1777|   426k|    num_spec_val_sect = *ptr_num_sorted_cw_in_sect++
 1778|   426k|                        << ptr_cb_dim_shift_tbl[*ptr_sorted_cb];
 1779|   426k|    ptr_teva = &arr_temp_values[*ptr_reorder_offset++];
 1780|  15.7M|    for (j = num_spec_val_sect; j != 0; j--) {
  ------------------
  |  Branch (1780:33): [True: 15.3M, False: 426k]
  ------------------
 1781|  15.3M|      qsc = *ptr_quant_spec_coeff++;
 1782|  15.3M|      abs_qsc = ixheaac_abs32(qsc);
 1783|  15.3M|      if (abs_qsc <= ptr_lav_tbl[*ptr_sorted_cb]) {
  ------------------
  |  Branch (1783:11): [True: 15.2M, False: 59.0k]
  ------------------
 1784|  15.2M|        *ptr_teva++ = (WORD32)qsc;
 1785|  15.2M|      } else {
 1786|  59.0k|        if (abs_qsc == 8192) {
  ------------------
  |  Branch (1786:13): [True: 113, False: 58.9k]
  ------------------
 1787|    113|          *ptr_teva++ = (WORD32)qsc;
 1788|  58.9k|        } else {
 1789|  58.9k|          *ptr_teva++ = (WORD32)8192;
 1790|  58.9k|          lav_err_cnt += 1;
 1791|  58.9k|        }
 1792|  59.0k|      }
 1793|  15.3M|    }
 1794|   426k|    ptr_sorted_cb++;
 1795|   426k|  }
 1796|       |
 1797|  27.2k|  if (ptr_aac_dec_channel_info->str_ics_info.window_sequence ==
  ------------------
  |  Branch (1797:7): [True: 11.2k, False: 16.0k]
  ------------------
 1798|  27.2k|      EIGHT_SHORT_SEQUENCE) {
  ------------------
  |  |  102|  27.2k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
 1799|  11.2k|    WORD32 *ptr_out;
 1800|  11.2k|    WORD8 window;
 1801|       |
 1802|  11.2k|    ptr_bak = ptr_hcr_info->str_segment_info.arr_temp_values;
 1803|   101k|    for (window = 0; window < 8; window++) {
  ------------------
  |  Branch (1803:22): [True: 89.9k, False: 11.2k]
  ------------------
 1804|  89.9k|      ptr_out = ptr_quant_spec_coeff_base +
 1805|  89.9k|                (window * ptr_aac_dec_channel_info->granule_len);
 1806|  2.96M|      for (i = 0; i < (LINES_PER_UNIT_GROUP); i++) {
  ------------------
  |  |  158|  2.96M|#define LINES_PER_UNIT_GROUP (1024 / NUMBER_OF_UNIT_GROUPS)
  |  |  ------------------
  |  |  |  |  157|  2.96M|#define NUMBER_OF_UNIT_GROUPS (LINES_PER_UNIT * 8)
  |  |  |  |  ------------------
  |  |  |  |  |  |  154|  2.96M|#define LINES_PER_UNIT 4
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1806:19): [True: 2.87M, False: 89.9k]
  ------------------
 1807|  2.87M|        ptr_teva = ptr_bak + (window << 2) + i * 32;
 1808|  14.3M|        for (j = (LINES_PER_UNIT); j != 0; j--) {
  ------------------
  |  |  154|  2.87M|#define LINES_PER_UNIT 4
  ------------------
  |  Branch (1808:36): [True: 11.5M, False: 2.87M]
  ------------------
 1809|  11.5M|          *ptr_out++ = *ptr_teva++;
 1810|  11.5M|        }
 1811|  2.87M|      }
 1812|  89.9k|    }
 1813|  16.0k|  } else {
 1814|  16.0k|    ptr_quant_spec_coeff = ptr_quant_spec_coeff_base;
 1815|  16.4M|    for (i = 1024; i != 0; i--) {
  ------------------
  |  Branch (1815:20): [True: 16.4M, False: 16.0k]
  ------------------
 1816|  16.4M|      *ptr_quant_spec_coeff++ = *ptr_bak++;
 1817|  16.4M|    }
 1818|  16.0k|  }
 1819|       |
 1820|  27.2k|  if (lav_err_cnt != 0) {
  ------------------
  |  Branch (1820:7): [True: 8.45k, False: 18.8k]
  ------------------
 1821|  8.45k|    ptr_hcr_info->str_dec_io.err_log |= (ERROR_POS << 1);
  ------------------
  |  |  185|  8.45k|#define ERROR_POS 0x00000001
  ------------------
 1822|  8.45k|  }
 1823|  27.2k|}

ixheaacd_hufftab:
   34|  5.01k|                      WORD32 sign_code_book, UWORD8 max_code_word_len) {
   35|  5.01k|  WORD32 i, num;
   36|       |
   37|  5.01k|  if (!sign_code_book) {
  ------------------
  |  Branch (37:7): [True: 0, False: 5.01k]
  ------------------
   38|      0|    ptr_huff_code_book->huff_mode = lav + 1;
   39|      0|    ptr_huff_code_book->off = 0;
   40|  5.01k|  } else {
   41|  5.01k|    ptr_huff_code_book->huff_mode = 2 * lav + 1;
   42|  5.01k|    ptr_huff_code_book->off = lav;
   43|  5.01k|  }
   44|  5.01k|  num = 1;
   45|  10.0k|  for (i = 0; i < dim; i++) num *= ptr_huff_code_book->huff_mode;
  ------------------
  |  Branch (45:15): [True: 5.01k, False: 5.01k]
  ------------------
   46|       |
   47|  5.01k|  ptr_huff_code_book->num = num;
   48|  5.01k|  ptr_huff_code_book->dim = dim;
   49|  5.01k|  ptr_huff_code_book->lav = lav;
   50|  5.01k|  ptr_huff_code_book->lav_incr_esc = lav_incr_esc;
   51|  5.01k|  ptr_huff_code_book->sign_code_book = sign_code_book;
   52|  5.01k|  ptr_huff_code_book->pstr_huff_code_word = ptr_huff_code_word;
   53|  5.01k|  ptr_huff_code_book->code_book_tbl = code_book_tbl;
   54|  5.01k|  ptr_huff_code_book->idx_tbl = index;
   55|  5.01k|  ptr_huff_code_book->max_code_word_len = max_code_word_len;
   56|  5.01k|}
ixheaacd_huff_codeword:
   62|   148k|{
   63|   148k|  WORD32 i, j;
   64|   148k|  UWORD32 code_word = 0;
   65|   148k|  UWORD32 tmp = 0;
   66|       |
   67|   148k|  i = ptr_huff_code_word->len;
   68|   148k|  if (data_present == 0) {
  ------------------
  |  Branch (68:7): [True: 148k, False: 0]
  ------------------
   69|   148k|    code_word = ixheaacd_read_bits_buf(it_bit_buff, i);
   70|   148k|  }
   71|       |
   72|   148k|  if (data_present == 1) {
  ------------------
  |  Branch (72:7): [True: 0, False: 148k]
  ------------------
   73|      0|    code_word = ixheaacd_read_bits_buf(it_bit_buff, i);
   74|      0|  }
   75|  1.55M|  while (code_word != ptr_huff_code_word->code_word) {
  ------------------
  |  Branch (75:10): [True: 1.40M, False: 148k]
  ------------------
   76|  1.40M|    ptr_huff_code_word++;
   77|  1.40M|    j = ptr_huff_code_word->len - i;
   78|  1.40M|    if (j < 0) {
  ------------------
  |  Branch (78:9): [True: 0, False: 1.40M]
  ------------------
   79|      0|      return ptr_huff_code_word->index;
   80|      0|    }
   81|       |
   82|  1.40M|    i += j;
   83|  1.40M|    code_word <<= j;
   84|       |
   85|  1.40M|    if (data_present == 0) {
  ------------------
  |  Branch (85:9): [True: 1.40M, False: 0]
  ------------------
   86|  1.40M|      tmp = ixheaacd_read_bits_buf(it_bit_buff, j);
   87|  1.40M|    }
   88|       |
   89|  1.40M|    if (data_present == 1) {
  ------------------
  |  Branch (89:9): [True: 0, False: 1.40M]
  ------------------
   90|      0|      tmp = ixheaacd_read_bits_buf(it_bit_buff, j);
   91|      0|    }
   92|       |
   93|  1.40M|    code_word |= tmp;
   94|  1.40M|  }
   95|   148k|  return (ptr_huff_code_word->index);
   96|   148k|}

ixheaacd_calc_pre_twid_dec:
  113|   868k|                                const WORD32 *sin_ptr) {
  114|   868k|  WORD32 i;
  115|   868k|  WORD32 *ptr_y;
  116|       |
  117|   868k|  ptr_y = &ptr_x[2 * nlength - 1];
  118|       |
  119|   125M|  for (i = 0; i < nlength; i++) {
  ------------------
  |  Branch (119:15): [True: 124M, False: 868k]
  ------------------
  120|   124M|    *r_ptr++ = ((ixheaac_mult32(ixheaac_negate32_sat(*ptr_x), (*cos_ptr)) -
  121|   124M|                 ixheaac_mult32((*ptr_y), (*sin_ptr))));
  122|   124M|    *i_ptr++ = ((ixheaac_mult32((*ptr_y), (*cos_ptr++)) -
  123|   124M|                 ixheaac_mult32((*ptr_x), (*sin_ptr++))));
  124|   124M|    ptr_x += 2;
  125|   124M|    ptr_y -= 2;
  126|   124M|  }
  127|   868k|}
ixheaacd_calc_post_twid_dec:
  133|   868k|                                 ) {
  134|   868k|  WORD32 i;
  135|   868k|  WORD32 *yptr;
  136|       |
  137|   868k|  yptr = &xptr[2 * nlength - 1];
  138|       |
  139|   125M|  for (i = 0; i < nlength; i++) {
  ------------------
  |  Branch (139:15): [True: 124M, False: 868k]
  ------------------
  140|   124M|    *xptr = (-(ixheaac_mult32((r_ptr[i]), (*cos_ptr)) -
  141|   124M|               ixheaac_mult32((i_ptr[i]), (*sin_ptr))));
  142|   124M|    *yptr = (-(ixheaac_mult32((i_ptr[i]), (*cos_ptr++)) +
  143|   124M|               ixheaac_mult32((r_ptr[i]), (*sin_ptr++))));
  144|   124M|    xptr += 2;
  145|   124M|    yptr -= 2;
  146|   124M|  }
  147|   868k|}
ixheaacd_acelp_imdct:
  187|   868k|                            WORD32 *tmp_data) {
  188|   868k|  WORD32 preshift = 0;
  189|   868k|  WORD32 i;
  190|   868k|  WORD32 k = (npoints / 2);
  191|       |
  192|  7.34M|  while (((k & 1) == 0) & (k != 1)) {
  ------------------
  |  Branch (192:10): [True: 6.47M, False: 868k]
  ------------------
  193|  6.47M|    k = k >> 1;
  194|  6.47M|    preshift++;
  195|  6.47M|  }
  196|       |
  197|   868k|  if ((k != 1)) {
  ------------------
  |  Branch (197:7): [True: 41.2k, False: 827k]
  ------------------
  198|  12.7M|    for (i = 0; i < (npoints / 2); i++) {
  ------------------
  |  Branch (198:17): [True: 12.6M, False: 41.2k]
  ------------------
  199|  12.6M|      imdct_in[i] = (imdct_in[i] / 3) << 1;
  200|  12.6M|    }
  201|  41.2k|    preshift++;
  202|  41.2k|  }
  203|       |
  204|   868k|  ixheaacd_fft_based_imdct(imdct_in, npoints / 2, &preshift, tmp_data);
  205|   868k|  preshift += 2;
  206|   868k|  *qshift -= preshift;
  207|   868k|  return;
  208|   868k|}
ixheaacd_cal_fac_data:
  212|  79.3k|                                   WORD32 *fac_idata, WORD8 *q_fac) {
  213|  79.3k|  WORD32 gain_fac, scale, k, *i_aq, itemp = 0, *izir;
  214|  79.3k|  WORD32 int_aq[ORDER + 1] = {0};
  215|  79.3k|  WORD32 intzir[2 * LEN_FRAME] = {0};
  216|  79.3k|  WORD32 x_in[FAC_LENGTH] = {0};
  217|  79.3k|  FLOAT32 gain, ztemp, ftemp, pow10, rem10;
  218|  79.3k|  FLOAT32 qfac1;
  219|  79.3k|  WORD8 qshift1 = 0;
  220|  79.3k|  WORD8 qshift2 = 0;
  221|  79.3k|  WORD8 qshift3 = 0;
  222|  79.3k|  WORD32 preshift = 0;
  223|       |
  224|  79.3k|  FLOAT32 *last_lpc = usac_data->lpc_prev[i_ch];
  225|  79.3k|  FLOAT32 *acelp_in = usac_data->acelp_in[i_ch];
  226|  79.3k|  WORD32 *fac_data = usac_data->fac_data[i_ch];
  227|  79.3k|  WORD32 *ptr_scratch = &usac_data->scratch_buffer[0];
  228|       |
  229|  79.3k|  WORD32 quo = fac_data[0] / 28;
  230|  79.3k|  WORD32 rem = fac_data[0] % 28;
  231|  79.3k|  pow10 = ixheaacd_pow10(quo);
  232|  79.3k|  rem10 = (FLOAT32)ixheaacd_power_10_table[rem];
  233|       |
  234|  79.3k|  gain = pow10 * rem10;
  235|  79.3k|  scale = (WORD32)(ixheaac_norm32((WORD32)((ABS(gain) + 1))));
  ------------------
  |  |   80|  79.3k|#define ABS(A) ((A) < 0 ? (-A) : (A))
  |  |  ------------------
  |  |  |  Branch (80:17): [True: 0, False: 79.3k]
  |  |  ------------------
  ------------------
  236|  79.3k|  gain_fac = (WORD32)(gain * (FLOAT32)((WORD64)1 << scale));
  237|  79.3k|  scale += 4;
  238|  79.3k|  qfac1 = 1.0f / (gain);
  239|       |
  240|  79.3k|  if (acelp_in != NULL) {
  ------------------
  |  Branch (240:7): [True: 79.3k, False: 0]
  ------------------
  241|  79.3k|    izir = intzir;
  242|  79.3k|    ftemp = 0.0;
  243|  20.3M|    for (k = 0; k < n_long / 4; k++) {
  ------------------
  |  Branch (243:17): [True: 20.2M, False: 79.3k]
  ------------------
  244|  20.2M|      ztemp = acelp_in[k] * (qfac1);
  245|  20.2M|      if (ABS(ztemp) > ftemp) ftemp = ABS(ztemp);
  ------------------
  |  |   80|  20.2M|#define ABS(A) ((A) < 0 ? (-A) : (A))
  |  |  ------------------
  |  |  |  Branch (80:17): [True: 4.51M, False: 15.7M]
  |  |  ------------------
  ------------------
                    if (ABS(ztemp) > ftemp) ftemp = ABS(ztemp);
  ------------------
  |  |   80|   602k|#define ABS(A) ((A) < 0 ? (-A) : (A))
  |  |  ------------------
  |  |  |  Branch (80:17): [True: 259k, False: 342k]
  |  |  ------------------
  ------------------
  |  Branch (245:11): [True: 602k, False: 19.6M]
  ------------------
  246|  20.2M|    }
  247|       |
  248|  79.3k|    itemp = (WORD32)(ftemp);
  249|  79.3k|    qshift3 = ixheaac_norm32(itemp);
  250|       |
  251|  20.3M|    for (k = 0; k < n_long / 4; k++) {
  ------------------
  |  Branch (251:17): [True: 20.2M, False: 79.3k]
  ------------------
  252|  20.2M|      izir[k] =
  253|  20.2M|          (WORD32)((acelp_in[k] * (qfac1)) * (FLOAT32)((WORD64)1 << qshift3));
  254|  20.2M|    }
  255|  79.3k|  } else
  256|      0|    izir = NULL;
  257|       |
  258|  79.3k|  if (last_lpc != NULL) {
  ------------------
  |  Branch (258:7): [True: 79.3k, False: 0]
  ------------------
  259|  79.3k|    ftemp = 0.0;
  260|  79.3k|    i_aq = int_aq;
  261|  1.42M|    for (k = 0; k < ORDER + 1; k++) {
  ------------------
  |  |   30|  1.42M|#define ORDER 16
  ------------------
  |  Branch (261:17): [True: 1.34M, False: 79.3k]
  ------------------
  262|  1.34M|      if (ABS(last_lpc[k]) > ftemp) ftemp = ABS(last_lpc[k]);
  ------------------
  |  |   80|  1.34M|#define ABS(A) ((A) < 0 ? (-A) : (A))
  |  |  ------------------
  |  |  |  Branch (80:17): [True: 307k, False: 1.04M]
  |  |  ------------------
  ------------------
                    if (ABS(last_lpc[k]) > ftemp) ftemp = ABS(last_lpc[k]);
  ------------------
  |  |   80|   114k|#define ABS(A) ((A) < 0 ? (-A) : (A))
  |  |  ------------------
  |  |  |  Branch (80:17): [True: 35.0k, False: 79.0k]
  |  |  ------------------
  ------------------
  |  Branch (262:11): [True: 114k, False: 1.23M]
  ------------------
  263|  1.34M|    }
  264|       |
  265|  79.3k|    itemp = (WORD32)(ftemp);
  266|  79.3k|    qshift2 = ixheaac_norm32(itemp);
  267|       |
  268|  1.42M|    for (k = 0; k < ORDER + 1; k++) {
  ------------------
  |  |   30|  1.42M|#define ORDER 16
  ------------------
  |  Branch (268:17): [True: 1.34M, False: 79.3k]
  ------------------
  269|  1.34M|      i_aq[k] = (WORD32)(last_lpc[k] * (FLOAT32)((WORD64)1 << qshift2));
  270|  1.34M|    }
  271|  79.3k|  } else
  272|      0|    i_aq = NULL;
  273|       |
  274|  9.91M|  for (k = 0; k < lfac; k++) {
  ------------------
  |  Branch (274:15): [True: 9.84M, False: 79.3k]
  ------------------
  275|  9.84M|    if (ixheaac_abs32_sat(fac_data[k + 1]) > itemp)
  ------------------
  |  Branch (275:9): [True: 139k, False: 9.70M]
  ------------------
  276|   139k|      itemp = ixheaac_abs32_sat(fac_data[k + 1]);
  277|  9.84M|  }
  278|       |
  279|  79.3k|  qshift1 = ixheaac_norm32(itemp);
  280|       |
  281|  9.91M|  for (k = 0; k < lfac; k++) {
  ------------------
  |  Branch (281:15): [True: 9.84M, False: 79.3k]
  ------------------
  282|  9.84M|    fac_data[k + 1] =
  283|  9.84M|        (WORD32)(fac_data[k + 1] * (FLOAT32)((WORD64)1 << qshift1));
  284|  9.84M|  }
  285|       |
  286|  4.99M|  for (k = 0; k < lfac / 2; k++) {
  ------------------
  |  Branch (286:15): [True: 4.92M, False: 79.3k]
  ------------------
  287|  4.92M|    x_in[k] = fac_data[2 * k + 1];
  288|  4.92M|    x_in[lfac / 2 + k] = fac_data[lfac - 2 * k];
  289|  4.92M|  }
  290|       |
  291|  79.3k|  if (FAC_LENGTH < lfac) {
  ------------------
  |  |   33|  79.3k|#define FAC_LENGTH 128
  ------------------
  |  Branch (291:7): [True: 0, False: 79.3k]
  ------------------
  292|      0|    if (usac_data->ec_flag == 0)
  ------------------
  |  Branch (292:9): [True: 0, False: 0]
  ------------------
  293|      0|      return -1;
  294|      0|    else
  295|      0|      lfac = FAC_LENGTH;
  ------------------
  |  |   33|      0|#define FAC_LENGTH 128
  ------------------
  296|      0|  }
  297|       |
  298|  79.3k|  if ((n_long / 8) < lfac) {
  ------------------
  |  Branch (298:7): [True: 57, False: 79.2k]
  ------------------
  299|     57|    if (usac_data->ec_flag == 0)
  ------------------
  |  Branch (299:9): [True: 57, False: 0]
  ------------------
  300|     57|      return -1;
  301|      0|    else
  302|      0|      lfac = (n_long / 8);
  303|     57|  }
  304|       |
  305|  79.2k|  if ((n_long / 8 + 1) > (2 * LEN_FRAME - lfac - 1)) {
  ------------------
  |  |   26|  79.2k|#define LEN_FRAME 256
  ------------------
  |  Branch (305:7): [True: 0, False: 79.2k]
  ------------------
  306|      0|    if (usac_data->ec_flag == 0)
  ------------------
  |  Branch (306:9): [True: 0, False: 0]
  ------------------
  307|      0|      return -1;
  308|      0|    else
  309|      0|      lfac = (2 * LEN_FRAME) - (n_long / 8);
  ------------------
  |  |   26|      0|#define LEN_FRAME 256
  ------------------
  310|      0|  }
  311|       |
  312|  79.2k|  if (lfac & (lfac - 1)) {
  ------------------
  |  Branch (312:7): [True: 695, False: 78.5k]
  ------------------
  313|    695|    if ((lfac != 48) && (lfac != 96) && (lfac != 192) && (lfac != 384) && (lfac != 768)) {
  ------------------
  |  Branch (313:9): [True: 402, False: 293]
  |  Branch (313:25): [True: 0, False: 402]
  |  Branch (313:41): [True: 0, False: 0]
  |  Branch (313:58): [True: 0, False: 0]
  |  Branch (313:75): [True: 0, False: 0]
  ------------------
  314|      0|      if (usac_data->ec_flag == 0)
  ------------------
  |  Branch (314:11): [True: 0, False: 0]
  ------------------
  315|      0|        return -1;
  316|      0|      else
  317|      0|        lfac = 48;
  318|      0|    }
  319|    695|  }
  320|       |
  321|  79.2k|  ixheaacd_fr_alias_cnx_fix(x_in, n_long / 4, lfac, i_aq, izir, fac_idata + 16, &qshift1, qshift2,
  322|  79.2k|                            qshift3, &preshift, ptr_scratch);
  323|       |
  324|  79.2k|  preshift += 4;
  325|  79.2k|  *q_fac = (qshift1 - preshift);
  326|       |
  327|  79.2k|  if (acelp_in != NULL) {
  ------------------
  |  Branch (327:7): [True: 79.2k, False: 0]
  ------------------
  328|  19.7M|    for (k = 0; k < 2 * lfac; k++) {
  ------------------
  |  Branch (328:17): [True: 19.6M, False: 79.2k]
  ------------------
  329|  19.6M|      fac_idata[k] =
  330|  19.6M|          ixheaac_mul32_sh(fac_idata[k + 16], gain_fac, (WORD8)(scale));
  331|  19.6M|    }
  332|  79.2k|  }
  333|  79.2k|  return IA_NO_ERROR;
  ------------------
  |  |   23|  79.2k|#define IA_NO_ERROR 0x00000000
  ------------------
  334|  79.2k|}
ixheaacd_fd_frm_dec:
  596|   247k|WORD32 ixheaacd_fd_frm_dec(ia_usac_data_struct *usac_data, WORD32 i_ch) {
  597|   247k|  WORD32 fac_idata[2 * FAC_LENGTH + 16];
  598|   247k|  offset_lengths ixheaacd_drc_offset;
  599|   247k|  WORD8 fac_q = 0;
  600|   247k|  IA_ERRORCODE err = IA_NO_ERROR;
  ------------------
  |  |   23|   247k|#define IA_NO_ERROR 0x00000000
  ------------------
  601|   247k|  WORD32 td_frame_prev, fac_apply, window_sequence;
  602|   247k|  if (usac_data->ec_flag) {
  ------------------
  |  Branch (602:7): [True: 0, False: 247k]
  ------------------
  603|      0|    usac_data->str_error_concealment[i_ch].pstr_ec_scratch =
  604|      0|        (ia_ec_scratch_str *)&usac_data->str_error_concealment[i_ch].str_ec_scratch;
  605|      0|    usac_data->core_mode = 0;
  606|      0|    ixheaacd_usac_apply_ec(usac_data, &ixheaacd_samp_rate_info[0], i_ch);
  607|      0|  }
  608|   247k|  if (usac_data->ec_flag) {
  ------------------
  |  Branch (608:7): [True: 0, False: 247k]
  ------------------
  609|      0|    td_frame_prev = usac_data->td_frame_prev_ec[i_ch];
  610|   247k|  } else {
  611|   247k|    td_frame_prev = usac_data->td_frame_prev[i_ch];
  612|   247k|  }
  613|   247k|  fac_apply = usac_data->fac_data_present[i_ch];
  614|   247k|  window_sequence = usac_data->window_sequence[i_ch];
  615|   247k|  ixheaacd_drc_offset.n_long = usac_data->ccfl;
  616|   247k|  ixheaacd_drc_offset.n_short = ixheaacd_drc_offset.n_long >> 3;
  617|       |
  618|   247k|  memset(fac_idata, 0, sizeof(fac_idata));
  619|       |
  620|   247k|  if (td_frame_prev) {
  ------------------
  |  Branch (620:7): [True: 27.8k, False: 219k]
  ------------------
  621|  27.8k|    if (window_sequence == EIGHT_SHORT_SEQUENCE) {
  ------------------
  |  |  102|  27.8k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  |  Branch (621:9): [True: 11.7k, False: 16.0k]
  ------------------
  622|  11.7k|      ixheaacd_drc_offset.lfac = ixheaacd_drc_offset.n_long >> 4;
  623|  16.0k|    } else {
  624|  16.0k|      ixheaacd_drc_offset.lfac = ixheaacd_drc_offset.n_long >> 3;
  625|  16.0k|    }
  626|  27.8k|    ixheaacd_drc_offset.n_flat_ls =
  627|  27.8k|        (ixheaacd_drc_offset.n_long - (ixheaacd_drc_offset.lfac) * 2) >> 1;
  628|       |
  629|  27.8k|    ixheaacd_drc_offset.n_trans_ls = (ixheaacd_drc_offset.lfac) << 1;
  630|   219k|  } else {
  631|   219k|    ixheaacd_drc_offset.lfac = FAC_LENGTH;
  ------------------
  |  |   33|   219k|#define FAC_LENGTH 128
  ------------------
  632|   219k|    ixheaacd_drc_offset.n_flat_ls =
  633|   219k|        (ixheaacd_drc_offset.n_long - ixheaacd_drc_offset.n_short) >> 1;
  634|   219k|    ixheaacd_drc_offset.n_trans_ls = ixheaacd_drc_offset.n_short;
  635|   219k|  }
  636|       |
  637|   247k|  if (fac_apply && usac_data->frame_ok == 1) {
  ------------------
  |  Branch (637:7): [True: 79.3k, False: 168k]
  |  Branch (637:20): [True: 79.3k, False: 0]
  ------------------
  638|  79.3k|    err = ixheaacd_cal_fac_data(usac_data, i_ch, ixheaacd_drc_offset.n_long,
  639|  79.3k|                                ixheaacd_drc_offset.lfac, fac_idata, &fac_q);
  640|  79.3k|    if (err) return err;
  ------------------
  |  Branch (640:9): [True: 57, False: 79.2k]
  ------------------
  641|  79.3k|  }
  642|       |
  643|   247k|  if (window_sequence != EIGHT_SHORT_SEQUENCE) {
  ------------------
  |  |  102|   247k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  |  Branch (643:7): [True: 158k, False: 88.8k]
  ------------------
  644|   158k|    err = ixheaacd_fd_imdct_long(usac_data, i_ch, fac_idata,
  645|   158k|                                 &ixheaacd_drc_offset, fac_q);
  646|   158k|    if (err) return err;
  ------------------
  |  Branch (646:9): [True: 16, False: 158k]
  ------------------
  647|   158k|  } else {
  648|  88.8k|    err = ixheaacd_fd_imdct_short(usac_data, i_ch, fac_idata,
  649|  88.8k|                                  &ixheaacd_drc_offset, fac_q);
  650|  88.8k|    if (err) return err;
  ------------------
  |  Branch (650:9): [True: 5, False: 88.8k]
  ------------------
  651|  88.8k|  }
  652|       |
  653|   247k|  return err;
  654|   247k|}
ixheaacd_imdct.c:ixheaacd_fft_based_imdct:
  150|   868k|                                     WORD32 *tmp_data) {
  151|   868k|  WORD32 *data_r;
  152|   868k|  WORD32 *data_i;
  153|   868k|  WORD32 nlength = npoints >> 1;
  154|   868k|  const WORD32 *cos_ptr;
  155|   868k|  const WORD32 *sin_ptr;
  156|       |
  157|   868k|  data_r = tmp_data;
  158|   868k|  data_i = tmp_data + 512;
  159|       |
  160|   868k|  if (nlength == 512) {
  ------------------
  |  Branch (160:7): [True: 145k, False: 723k]
  ------------------
  161|   145k|    cos_ptr = ixheaacd_pre_post_twid_cos_512;
  162|   145k|    sin_ptr = ixheaacd_pre_post_twid_sin_512;
  163|   723k|  } else if (nlength == 384) {
  ------------------
  |  Branch (163:14): [True: 12.9k, False: 710k]
  ------------------
  164|  12.9k|    cos_ptr = ixheaacd_pre_post_twid_cos_384;
  165|  12.9k|    sin_ptr = ixheaacd_pre_post_twid_sin_384;
  166|   710k|  } else if (nlength == 64) {
  ------------------
  |  Branch (166:14): [True: 682k, False: 28.2k]
  ------------------
  167|   682k|    cos_ptr = ixheaacd_pre_post_twid_cos_64;
  168|   682k|    sin_ptr = ixheaacd_pre_post_twid_sin_64;
  169|   682k|  } else if (nlength == 48) {
  ------------------
  |  Branch (169:14): [True: 28.2k, False: 0]
  ------------------
  170|  28.2k|    cos_ptr = ixheaacd_pre_post_twid_cos_48;
  171|  28.2k|    sin_ptr = ixheaacd_pre_post_twid_sin_48;
  172|  28.2k|  } else {
  173|      0|    cos_ptr = ixheaacd_pre_post_twid_cos_48;
  174|      0|    sin_ptr = ixheaacd_pre_post_twid_sin_48;
  175|      0|  }
  176|       |
  177|   868k|  (*ixheaacd_calc_pre_twid)(data, data_r, data_i, nlength, cos_ptr, sin_ptr);
  178|   868k|  ixheaacd_complex_fft(data_r, data_i, nlength, 1, preshift);
  179|       |
  180|   868k|  (*ixheaacd_calc_post_twid)(data, data_r, data_i, nlength, cos_ptr, sin_ptr);
  181|   868k|  return;
  182|   868k|}
ixheaacd_imdct.c:ixheaacd_pow10:
  102|  79.3k|static FLOAT32 ixheaacd_pow10(WORD32 input) {
  103|  79.3k|  FLOAT32 output = 1;
  104|   167k|  while (input > 0) {
  ------------------
  |  Branch (104:10): [True: 88.6k, False: 79.3k]
  ------------------
  105|  88.6k|    output *= 10;
  106|  88.6k|    input--;
  107|  88.6k|  }
  108|  79.3k|  return (output);
  109|  79.3k|}
ixheaacd_imdct.c:ixheaacd_fd_imdct_long:
  480|   158k|                                           WORD8 fac_q) {
  481|   158k|  FLOAT32 qfac;
  482|   158k|  WORD32 *window_long_prev = NULL, k, i, *window_short_prev_ptr = NULL;
  483|       |
  484|   158k|  WORD32 *p_in_ibuffer = usac_data->coef_fix[i_ch];
  485|   158k|  WORD32 *p_overlap_ibuffer = usac_data->overlap_data_ptr[i_ch];
  486|   158k|  WORD32 *p_out_ibuffer = usac_data->output_data_ptr[i_ch];
  487|   158k|  FLOAT32 *p_out_buffer = usac_data->time_sample_vector[i_ch];
  488|   158k|  WORD32 *scratch_mem = usac_data->scratch_buffer;
  489|   158k|  WORD32 n_long = usac_data->ccfl;
  490|   158k|  WORD32 td_frame_prev = usac_data->td_frame_prev[i_ch];
  491|   158k|  WORD32 fac_apply = usac_data->fac_data_present[i_ch];
  492|   158k|  WORD8 shiftp, output_q = 0, shift_olap = 14;
  493|   158k|  WORD32 max_shift;
  494|       |
  495|   158k|  WORD32 window_sequence = usac_data->window_sequence[i_ch];
  496|   158k|  WORD32 window_select_prev = usac_data->window_shape_prev[i_ch];
  497|   158k|  ia_usac_lpd_decoder_handle st = usac_data->str_tddec[i_ch];
  498|       |
  499|   158k|  WORD32 err_code = 0;
  500|   158k|  if (usac_data->ec_flag) {
  ------------------
  |  Branch (500:7): [True: 0, False: 158k]
  ------------------
  501|      0|    td_frame_prev = usac_data->td_frame_prev_ec[i_ch];
  502|   158k|  } else {
  503|   158k|    if (ixheaacd_drc_offset->n_long & (ixheaacd_drc_offset->n_long - 1)) {
  ------------------
  |  Branch (503:9): [True: 12.9k, False: 145k]
  ------------------
  504|  12.9k|      if ((ixheaacd_drc_offset->n_long != 48) && (ixheaacd_drc_offset->n_long != 96) &&
  ------------------
  |  Branch (504:11): [True: 12.9k, False: 0]
  |  Branch (504:50): [True: 12.9k, False: 0]
  ------------------
  505|  12.9k|          (ixheaacd_drc_offset->n_long != 192) && (ixheaacd_drc_offset->n_long != 384) &&
  ------------------
  |  Branch (505:11): [True: 12.9k, False: 0]
  |  Branch (505:51): [True: 12.9k, False: 0]
  ------------------
  506|  12.9k|          (ixheaacd_drc_offset->n_long != 768)) {
  ------------------
  |  Branch (506:11): [True: 0, False: 12.9k]
  ------------------
  507|      0|        return -1;
  508|      0|      }
  509|  12.9k|    }
  510|   158k|  }
  511|       |
  512|   158k|  max_shift =
  513|   158k|      ixheaacd_calc_max_spectralline(p_in_ibuffer, ixheaacd_drc_offset->n_long);
  514|   158k|  ixheaacd_normalize(p_in_ibuffer, max_shift, ixheaacd_drc_offset->n_long);
  515|   158k|  shiftp = max_shift + 6;
  516|       |
  517|   158k|  ixheaacd_acelp_imdct(p_in_ibuffer, 2 * ixheaacd_drc_offset->n_long,
  518|   158k|                                  &shiftp, scratch_mem);
  519|       |
  520|   158k|  max_shift =
  521|   158k|      ixheaacd_calc_max_spectralline(p_in_ibuffer, ixheaacd_drc_offset->n_long);
  522|   158k|  ixheaacd_normalize(p_in_ibuffer, max_shift - 1, ixheaacd_drc_offset->n_long);
  523|   158k|  shiftp += max_shift - 1;
  524|   158k|  if ((shiftp - shift_olap) > 31) {
  ------------------
  |  Branch (524:7): [True: 123k, False: 34.7k]
  ------------------
  525|   123k|    shiftp = 31 + shift_olap;
  526|   123k|  }
  527|       |
  528|   158k|  switch (window_sequence) {
  ------------------
  |  Branch (528:11): [True: 158k, False: 0]
  ------------------
  529|   101k|    case ONLY_LONG_SEQUENCE:
  ------------------
  |  |  100|   101k|#define ONLY_LONG_SEQUENCE 0
  ------------------
  |  Branch (529:5): [True: 101k, False: 56.7k]
  ------------------
  530|   106k|    case LONG_START_SEQUENCE:
  ------------------
  |  |  101|   106k|#define LONG_START_SEQUENCE 1
  ------------------
  |  Branch (530:5): [True: 5.20k, False: 153k]
  ------------------
  531|   106k|      err_code = ixheaacd_calc_window(
  532|   106k|          &window_long_prev, ixheaacd_drc_offset->n_long, window_select_prev, usac_data->ec_flag);
  533|   106k|      if (err_code == -1) return err_code;
  ------------------
  |  Branch (533:11): [True: 0, False: 106k]
  ------------------
  534|   106k|      output_q = ixheaacd_windowing_long1(
  535|   106k|          p_in_ibuffer + n_long / 2, p_overlap_ibuffer, window_long_prev,
  536|   106k|          window_long_prev + ixheaacd_drc_offset->n_long - 1, p_out_ibuffer,
  537|   106k|          ixheaacd_drc_offset->n_long, shiftp, shift_olap);
  538|   106k|      break;
  539|       |
  540|  35.7k|    case STOP_START_SEQUENCE:
  ------------------
  |  |  104|  35.7k|#define STOP_START_SEQUENCE 4
  ------------------
  |  Branch (540:5): [True: 35.7k, False: 122k]
  ------------------
  541|  51.5k|    case LONG_STOP_SEQUENCE:
  ------------------
  |  |  103|  51.5k|#define LONG_STOP_SEQUENCE 3
  ------------------
  |  Branch (541:5): [True: 15.8k, False: 142k]
  ------------------
  542|  51.5k|      err_code = ixheaacd_calc_window(&window_short_prev_ptr,
  543|  51.5k|                                      ixheaacd_drc_offset->n_trans_ls,
  544|  51.5k|                                      window_select_prev, usac_data->ec_flag);
  545|  51.5k|      if (err_code == -1) return err_code;
  ------------------
  |  Branch (545:11): [True: 0, False: 51.5k]
  ------------------
  546|  51.5k|      if (fac_apply) {
  ------------------
  |  Branch (546:11): [True: 25.4k, False: 26.0k]
  ------------------
  547|  25.4k|        output_q = ixheaacd_windowing_long2(
  548|  25.4k|            p_in_ibuffer + n_long / 2, window_short_prev_ptr, fac_idata,
  549|  25.4k|            p_overlap_ibuffer, p_out_ibuffer, ixheaacd_drc_offset, shiftp,
  550|  25.4k|            shift_olap, fac_q);
  551|  26.0k|      } else {
  552|  26.0k|        output_q = ixheaacd_windowing_long3(
  553|  26.0k|            p_in_ibuffer + n_long / 2, window_short_prev_ptr, p_overlap_ibuffer,
  554|  26.0k|            p_out_ibuffer,
  555|  26.0k|            window_short_prev_ptr + ixheaacd_drc_offset->n_trans_ls - 1,
  556|  26.0k|            ixheaacd_drc_offset, shiftp, shift_olap);
  557|  26.0k|      }
  558|  51.5k|      break;
  559|   158k|  }
  560|       |
  561|  79.6M|  for (i = 0; i < ixheaacd_drc_offset->n_long / 2; i++) {
  ------------------
  |  Branch (561:15): [True: 79.4M, False: 158k]
  ------------------
  562|  79.4M|    if (shiftp > shift_olap) {
  ------------------
  |  Branch (562:9): [True: 68.6M, False: 10.8M]
  ------------------
  563|  68.6M|      p_overlap_ibuffer[ixheaacd_drc_offset->n_long / 2 + i] =
  564|  68.6M|        ixheaac_negate32_sat(p_in_ibuffer[i]) >> (shiftp - shift_olap);
  565|  68.6M|      p_overlap_ibuffer[ixheaacd_drc_offset->n_long / 2 - i - 1] =
  566|  68.6M|        ixheaac_negate32_sat(p_in_ibuffer[i]) >> (shiftp - shift_olap);
  567|  68.6M|    }
  568|  10.8M|    else {
  569|  10.8M|      p_overlap_ibuffer[ixheaacd_drc_offset->n_long / 2 + i] =
  570|  10.8M|        ixheaac_negate32_sat(p_in_ibuffer[i]) >> (shift_olap - shiftp);
  571|  10.8M|      p_overlap_ibuffer[ixheaacd_drc_offset->n_long / 2 - i - 1] =
  572|  10.8M|        ixheaac_negate32_sat(p_in_ibuffer[i]) >> (shift_olap - shiftp);
  573|  10.8M|    }
  574|  79.4M|  }
  575|       |
  576|   158k|  ixheaacd_scale_down_adj(p_out_ibuffer, p_out_ibuffer,
  577|   158k|                          ixheaacd_drc_offset->n_long, output_q, 15);
  578|       |
  579|   158k|  if (td_frame_prev) {
  ------------------
  |  Branch (579:7): [True: 16.0k, False: 142k]
  ------------------
  580|  16.0k|    qfac = 1.0f / (FLOAT32)(1 << 15);
  581|       |
  582|  15.7M|    for (k = 0; k < ixheaacd_drc_offset->n_long; k++) {
  ------------------
  |  Branch (582:17): [True: 15.7M, False: 16.0k]
  ------------------
  583|  15.7M|      p_out_buffer[k] = ((FLOAT32)p_out_ibuffer[k]) * qfac;
  584|  15.7M|    }
  585|  16.0k|    err_code = ixheaacd_lpd_bpf_fix(usac_data, 0, p_out_buffer, st);
  586|  16.0k|    if (err_code != 0) return err_code;
  ------------------
  |  Branch (586:9): [True: 16, False: 16.0k]
  ------------------
  587|       |
  588|  15.7M|    for (k = 0; k < ixheaacd_drc_offset->n_long; k++) {
  ------------------
  |  Branch (588:17): [True: 15.7M, False: 16.0k]
  ------------------
  589|  15.7M|      p_out_ibuffer[k] = (WORD32)(p_out_buffer[k] * (1 << 15));
  590|  15.7M|    }
  591|  16.0k|  }
  592|       |
  593|   158k|  return 0;
  594|   158k|}
ixheaacd_imdct.c:ixheaacd_calc_max_spectralline:
   82|   494k|static WORD32 ixheaacd_calc_max_spectralline(WORD32 *p_in_ibuffer, WORD32 n) {
   83|   494k|  WORD32 k, shiftp, itemp = 0;
   84|   498M|  for (k = 0; k < n; k++) {
  ------------------
  |  Branch (84:15): [True: 498M, False: 494k]
  ------------------
   85|   498M|    if (ixheaac_abs32_sat(p_in_ibuffer[k]) > itemp)
  ------------------
  |  Branch (85:9): [True: 2.36M, False: 495M]
  ------------------
   86|  2.36M|      itemp = ixheaac_abs32_sat(p_in_ibuffer[k]);
   87|   498M|  }
   88|       |
   89|   494k|  shiftp = ixheaac_norm32(itemp);
   90|       |
   91|   494k|  return (shiftp);
   92|   494k|}
ixheaacd_imdct.c:ixheaacd_normalize:
   94|   494k|static void ixheaacd_normalize(WORD32 *buff, WORD32 shift, WORD len) {
   95|   494k|  WORD32 i;
   96|       |
   97|   498M|  for (i = 0; i < len; i++) {
  ------------------
  |  Branch (97:15): [True: 498M, False: 494k]
  ------------------
   98|   498M|    buff[i] = buff[i] << shift;
   99|   498M|  }
  100|   494k|}
ixheaacd_imdct.c:ixheaacd_fd_imdct_short:
  339|  88.8k|                                            WORD8 fac_q) {
  340|  88.8k|  FLOAT32 qfac;
  341|  88.8k|  WORD32 overlap_data_buf[2 * N_LONG_LEN_MAX] = {0};
  342|  88.8k|  WORD32 *window_short, k, *window_short_prev_ptr;
  343|  88.8k|  WORD32 *overlap_data, *fp;
  344|       |
  345|  88.8k|  WORD32 *p_overlap_ibuffer = usac_data->overlap_data_ptr[i_ch];
  346|  88.8k|  WORD32 *p_in_ibuffer = usac_data->coef_fix[i_ch];
  347|  88.8k|  FLOAT32 *p_out_buffer = usac_data->time_sample_vector[i_ch];
  348|  88.8k|  WORD32 *p_out_ibuffer = usac_data->output_data_ptr[i_ch];
  349|  88.8k|  WORD32 *scratch_mem = usac_data->scratch_buffer;
  350|  88.8k|  WORD32 td_frame_prev = usac_data->td_frame_prev[i_ch];
  351|  88.8k|  WORD32 fac_apply = usac_data->fac_data_present[i_ch];
  352|  88.8k|  WORD8 shiftp, input_q, output_q, shift_olap = 14;
  353|  88.8k|  WORD32 max_shift;
  354|       |
  355|  88.8k|  WORD32 window_select = usac_data->window_shape[i_ch];
  356|  88.8k|  WORD32 window_select_prev = usac_data->window_shape_prev[i_ch];
  357|  88.8k|  ia_usac_lpd_decoder_handle st = usac_data->str_tddec[i_ch];
  358|  88.8k|  WORD32 err_code = 0;
  359|       |
  360|  88.8k|  if (usac_data->ec_flag) {
  ------------------
  |  Branch (360:7): [True: 0, False: 88.8k]
  ------------------
  361|      0|    td_frame_prev = usac_data->td_frame_prev_ec[i_ch];
  362|  88.8k|  } else {
  363|  88.8k|    if (ixheaacd_drc_offset->n_short & (ixheaacd_drc_offset->n_short - 1)) {
  ------------------
  |  Branch (363:9): [True: 3.52k, False: 85.2k]
  ------------------
  364|  3.52k|      if ((ixheaacd_drc_offset->n_short != 48) && (ixheaacd_drc_offset->n_short != 96) &&
  ------------------
  |  Branch (364:11): [True: 3.52k, False: 0]
  |  Branch (364:51): [True: 0, False: 3.52k]
  ------------------
  365|      0|          (ixheaacd_drc_offset->n_short != 192) && (ixheaacd_drc_offset->n_short != 384) &&
  ------------------
  |  Branch (365:11): [True: 0, False: 0]
  |  Branch (365:52): [True: 0, False: 0]
  ------------------
  366|      0|          (ixheaacd_drc_offset->n_short != 768)) {
  ------------------
  |  Branch (366:11): [True: 0, False: 0]
  ------------------
  367|      0|        return -1;
  368|      0|      }
  369|  3.52k|    }
  370|  88.8k|  }
  371|       |
  372|  88.8k|  max_shift = ixheaacd_calc_max_spectralline(p_in_ibuffer, ixheaacd_drc_offset->n_long);
  373|  88.8k|  ixheaacd_normalize(p_in_ibuffer, max_shift, ixheaacd_drc_offset->n_long);
  374|  88.8k|  shiftp = max_shift + 6;
  375|  88.8k|  input_q = shiftp;
  376|       |
  377|  88.8k|  memcpy(overlap_data_buf, p_overlap_ibuffer,
  378|  88.8k|         sizeof(WORD32) * ixheaacd_drc_offset->n_long);
  379|  88.8k|  overlap_data = overlap_data_buf;
  380|       |
  381|  88.8k|  fp = overlap_data + ixheaacd_drc_offset->n_flat_ls;
  382|       |
  383|   799k|  for (k = 0; k < 8; k++) {
  ------------------
  |  Branch (383:15): [True: 710k, False: 88.8k]
  ------------------
  384|   710k|    shiftp = input_q;
  385|   710k|    ixheaacd_acelp_imdct(
  386|   710k|        p_in_ibuffer + (k * ixheaacd_drc_offset->n_short),
  387|   710k|        2 * ixheaacd_drc_offset->n_short, &shiftp, scratch_mem);
  388|   710k|  }
  389|       |
  390|  88.8k|  max_shift =
  391|  88.8k|      ixheaacd_calc_max_spectralline(p_in_ibuffer, ixheaacd_drc_offset->n_long);
  392|  88.8k|  ixheaacd_normalize(p_in_ibuffer, max_shift - 1, ixheaacd_drc_offset->n_long);
  393|  88.8k|  shiftp += max_shift - 1;
  394|       |
  395|  88.8k|  if ((shiftp - shift_olap) > 31) {
  ------------------
  |  Branch (395:7): [True: 34.2k, False: 54.5k]
  ------------------
  396|  34.2k|    shiftp = 31 + shift_olap;
  397|  34.2k|  }
  398|  88.8k|  err_code = ixheaacd_calc_window(&window_short, ixheaacd_drc_offset->n_short,
  399|  88.8k|                                  window_select, usac_data->ec_flag);
  400|  88.8k|  if (err_code == -1) return err_code;
  ------------------
  |  Branch (400:7): [True: 0, False: 88.8k]
  ------------------
  401|  88.8k|  err_code = ixheaacd_calc_window(&window_short_prev_ptr, ixheaacd_drc_offset->n_trans_ls,
  402|  88.8k|                                  window_select_prev, usac_data->ec_flag);
  403|  88.8k|  if (err_code == -1) return err_code;
  ------------------
  |  Branch (403:7): [True: 0, False: 88.8k]
  ------------------
  404|       |
  405|  88.8k|  if (fac_apply)
  ------------------
  |  Branch (405:7): [True: 28.4k, False: 60.3k]
  ------------------
  406|  28.4k|    ixheaacd_windowing_short1(p_in_ibuffer + ixheaacd_drc_offset->n_short / 2,
  407|  28.4k|                              window_short_prev_ptr, fp, ixheaacd_drc_offset,
  408|  28.4k|                              shiftp, shift_olap);
  409|       |
  410|  60.3k|  else
  411|  60.3k|    ixheaacd_windowing_short2(p_in_ibuffer + ixheaacd_drc_offset->n_short / 2,
  412|  60.3k|                              window_short_prev_ptr, fp, ixheaacd_drc_offset,
  413|  60.3k|                              shiftp, shift_olap);
  414|       |
  415|  88.8k|  output_q = ixheaacd_windowing_short3(
  416|  88.8k|      p_in_ibuffer, window_short + ixheaacd_drc_offset->n_short - 1,
  417|  88.8k|      fp + ixheaacd_drc_offset->n_short, ixheaacd_drc_offset->n_short, shiftp,
  418|  88.8k|      shift_olap);
  419|  88.8k|  p_in_ibuffer += ixheaacd_drc_offset->n_short;
  420|  88.8k|  fp += ixheaacd_drc_offset->n_short;
  421|  88.8k|  window_short_prev_ptr = window_short;
  422|       |
  423|   621k|  for (k = 1; k < 7; k++) {
  ------------------
  |  Branch (423:15): [True: 532k, False: 88.8k]
  ------------------
  424|   532k|    output_q = ixheaacd_windowing_short4(
  425|   532k|        p_in_ibuffer, window_short_prev_ptr, fp,
  426|   532k|        window_short_prev_ptr + ixheaacd_drc_offset->n_short - 1,
  427|   532k|        ixheaacd_drc_offset->n_short, 1, shiftp, shift_olap, output_q);
  428|   532k|    p_in_ibuffer += ixheaacd_drc_offset->n_short;
  429|   532k|    fp += ixheaacd_drc_offset->n_short;
  430|   532k|    window_short_prev_ptr = window_short;
  431|   532k|  }
  432|       |
  433|  88.8k|  output_q = ixheaacd_windowing_short4(
  434|  88.8k|      p_in_ibuffer, window_short_prev_ptr, fp,
  435|  88.8k|      window_short_prev_ptr + ixheaacd_drc_offset->n_short - 1,
  436|  88.8k|      ixheaacd_drc_offset->n_short, 0, shiftp, shift_olap, output_q);
  437|  88.8k|  p_in_ibuffer += ixheaacd_drc_offset->n_short;
  438|  88.8k|  fp += ixheaacd_drc_offset->n_short;
  439|       |
  440|  88.8k|  if (fac_apply) {
  ------------------
  |  Branch (440:7): [True: 28.4k, False: 60.3k]
  ------------------
  441|  28.4k|    ixheaacd_combine_fac(overlap_data + ixheaacd_drc_offset->n_flat_ls +
  442|  28.4k|                             ixheaacd_drc_offset->lfac,
  443|  28.4k|                         fac_data_out,
  444|  28.4k|                         overlap_data + ixheaacd_drc_offset->n_flat_ls +
  445|  28.4k|                             ixheaacd_drc_offset->lfac,
  446|  28.4k|                         2 * ixheaacd_drc_offset->lfac, output_q, fac_q);
  447|  28.4k|  }
  448|  88.8k|  memset(overlap_data + 2 * ixheaacd_drc_offset->n_long -
  449|  88.8k|             ixheaacd_drc_offset->n_flat_ls,
  450|  88.8k|         0, sizeof(WORD32) * ixheaacd_drc_offset->n_flat_ls);
  451|  88.8k|  ixheaacd_scale_down(overlap_data, overlap_data,
  452|  88.8k|                      ixheaacd_drc_offset->n_flat_ls, shift_olap, output_q);
  453|       |
  454|  88.8k|  ixheaacd_scale_down(p_overlap_ibuffer,
  455|  88.8k|                      overlap_data + ixheaacd_drc_offset->n_long,
  456|  88.8k|                      ixheaacd_drc_offset->n_long, output_q, shift_olap);
  457|  88.8k|  ixheaacd_scale_down(p_out_ibuffer, overlap_data, ixheaacd_drc_offset->n_long,
  458|  88.8k|                      output_q, 15);
  459|       |
  460|  88.8k|  if (td_frame_prev) {
  ------------------
  |  Branch (460:7): [True: 11.7k, False: 77.0k]
  ------------------
  461|  11.7k|    qfac = 1.0f / (FLOAT32)(1 << 15);
  462|       |
  463|  11.3M|    for (k = 0; k < ixheaacd_drc_offset->n_long; k++) {
  ------------------
  |  Branch (463:17): [True: 11.3M, False: 11.7k]
  ------------------
  464|  11.3M|      p_out_buffer[k] = ((FLOAT32)p_out_ibuffer[k]) * qfac;
  465|  11.3M|    }
  466|  11.7k|    err_code = ixheaacd_lpd_bpf_fix(usac_data, 1, p_out_buffer, st);
  467|  11.7k|    if (err_code != 0) return err_code;
  ------------------
  |  Branch (467:9): [True: 5, False: 11.7k]
  ------------------
  468|       |
  469|  11.3M|    for (k = 0; k < ixheaacd_drc_offset->n_long; k++) {
  ------------------
  |  Branch (469:17): [True: 11.3M, False: 11.7k]
  ------------------
  470|  11.3M|      p_out_ibuffer[k] = (WORD32)(p_out_buffer[k] * (1 << 15));
  471|  11.3M|    }
  472|  11.7k|  }
  473|       |
  474|  88.8k|  return 0;
  475|  88.8k|}

ixheaacd_sbr_ratio:
   81|  24.0k|UWORD32 ixheaacd_sbr_ratio(UWORD32 core_sbr_framelength_idx) {
   82|  24.0k|  UWORD32 sbr_ratio_index = 0x0FF;
   83|       |
   84|  24.0k|  switch (core_sbr_framelength_idx) {
  ------------------
  |  Branch (84:11): [True: 24.0k, False: 0]
  ------------------
   85|  1.49k|    case 0:
  ------------------
  |  Branch (85:5): [True: 1.49k, False: 22.5k]
  ------------------
   86|  18.1k|    case 1:
  ------------------
  |  Branch (86:5): [True: 16.6k, False: 7.34k]
  ------------------
   87|  18.1k|      sbr_ratio_index = USAC_SBR_RATIO_NO_SBR;
  ------------------
  |  |   33|  18.1k|#define USAC_SBR_RATIO_NO_SBR 0
  ------------------
   88|  18.1k|      break;
   89|  1.30k|    case 2:
  ------------------
  |  Branch (89:5): [True: 1.30k, False: 22.7k]
  ------------------
   90|  1.30k|      sbr_ratio_index = USAC_SBR_RATIO_INDEX_8_3;
  ------------------
  |  |   35|  1.30k|#define USAC_SBR_RATIO_INDEX_8_3 2
  ------------------
   91|  1.30k|      break;
   92|  4.08k|    case 3:
  ------------------
  |  Branch (92:5): [True: 4.08k, False: 19.9k]
  ------------------
   93|  4.08k|      sbr_ratio_index = USAC_SBR_RATIO_INDEX_2_1;
  ------------------
  |  |   34|  4.08k|#define USAC_SBR_RATIO_INDEX_2_1 1
  ------------------
   94|  4.08k|      break;
   95|    462|    case 4:
  ------------------
  |  Branch (95:5): [True: 462, False: 23.5k]
  ------------------
   96|    462|      sbr_ratio_index = USAC_SBR_RATIO_INDEX_4_1;
  ------------------
  |  |   36|    462|#define USAC_SBR_RATIO_INDEX_4_1 3
  ------------------
   97|    462|      break;
   98|  24.0k|  }
   99|       |
  100|  24.0k|  return sbr_ratio_index;
  101|  24.0k|}
ixheaacd_sbr_params:
  115|  5.01k|                            UWORD32 *sample_freq_indx) {
  116|  5.01k|  UWORD32 sbr_ratio_index = 0x0FF;
  117|       |
  118|  5.01k|  *output_framelength = -1;
  119|       |
  120|  5.01k|  switch (core_sbr_framelength_idx) {
  ------------------
  |  Branch (120:11): [True: 5.01k, False: 0]
  ------------------
  121|  1.05k|    case 0:
  ------------------
  |  Branch (121:5): [True: 1.05k, False: 3.96k]
  ------------------
  122|  1.05k|      sbr_ratio_index = USAC_SBR_RATIO_NO_SBR;
  ------------------
  |  |   33|  1.05k|#define USAC_SBR_RATIO_NO_SBR 0
  ------------------
  123|  1.05k|      *output_framelength = USAC_OUT_FRAMELENGTH_768;
  ------------------
  |  |   38|  1.05k|#define USAC_OUT_FRAMELENGTH_768 768
  ------------------
  124|  1.05k|      *block_size = 768;
  125|  1.05k|      *output_samples = *block_size;
  126|  1.05k|      break;
  127|  1.09k|    case 1:
  ------------------
  |  Branch (127:5): [True: 1.09k, False: 3.92k]
  ------------------
  128|  1.09k|      sbr_ratio_index = USAC_SBR_RATIO_NO_SBR;
  ------------------
  |  |   33|  1.09k|#define USAC_SBR_RATIO_NO_SBR 0
  ------------------
  129|  1.09k|      *output_framelength = USAC_OUT_FRAMELENGTH_1024;
  ------------------
  |  |   39|  1.09k|#define USAC_OUT_FRAMELENGTH_1024 1024
  ------------------
  130|  1.09k|      *block_size = 1024;
  131|  1.09k|      *output_samples = *block_size;
  132|  1.09k|      break;
  133|    613|    case 2:
  ------------------
  |  Branch (133:5): [True: 613, False: 4.40k]
  ------------------
  134|    613|      sbr_ratio_index = USAC_SBR_RATIO_INDEX_8_3;
  ------------------
  |  |   35|    613|#define USAC_SBR_RATIO_INDEX_8_3 2
  ------------------
  135|    613|      *output_framelength = USAC_OUT_FRAMELENGTH_2048;
  ------------------
  |  |   40|    613|#define USAC_OUT_FRAMELENGTH_2048 2048
  ------------------
  136|    613|      *block_size = 768;
  137|    613|      *output_samples = (*block_size * 8) / 3;
  138|    613|      *sample_rate_layer = (*sample_rate_layer * 3) >> 3;
  139|    613|      break;
  140|  1.99k|    case 3:
  ------------------
  |  Branch (140:5): [True: 1.99k, False: 3.02k]
  ------------------
  141|  1.99k|      sbr_ratio_index = USAC_SBR_RATIO_INDEX_2_1;
  ------------------
  |  |   34|  1.99k|#define USAC_SBR_RATIO_INDEX_2_1 1
  ------------------
  142|  1.99k|      *output_framelength = USAC_OUT_FRAMELENGTH_2048;
  ------------------
  |  |   40|  1.99k|#define USAC_OUT_FRAMELENGTH_2048 2048
  ------------------
  143|  1.99k|      *block_size = 1024;
  144|  1.99k|      *output_samples = *block_size * 2;
  145|  1.99k|      *sample_rate_layer = *sample_rate_layer >> 1;
  146|  1.99k|      break;
  147|    262|    case 4:
  ------------------
  |  Branch (147:5): [True: 262, False: 4.75k]
  ------------------
  148|    262|      sbr_ratio_index = USAC_SBR_RATIO_INDEX_4_1;
  ------------------
  |  |   36|    262|#define USAC_SBR_RATIO_INDEX_4_1 3
  ------------------
  149|    262|      *output_framelength = USAC_OUT_FRAMELENGTH_4096;
  ------------------
  |  |   41|    262|#define USAC_OUT_FRAMELENGTH_4096 4096
  ------------------
  150|    262|      *block_size = 1024;
  151|    262|      *output_samples = *block_size * 4;
  152|    262|      *sample_rate_layer = *sample_rate_layer >> 2;
  153|    262|      break;
  154|  5.01k|  }
  155|       |
  156|  5.01k|  *sample_freq_indx = ixheaacd_get_sample_freq_indx(*sample_rate_layer);
  157|       |
  158|  5.01k|  return sbr_ratio_index;
  159|  5.01k|}
ixheaacd_read_escape_value:
  163|  88.1k|                                UWORD32 no_bits2, UWORD32 no_bits3) {
  164|  88.1k|  UWORD32 value = 0;
  165|  88.1k|  UWORD32 val_add = 0;
  166|  88.1k|  UWORD32 max_val1 = (1 << no_bits1) - 1;
  167|  88.1k|  UWORD32 max_val2 = (1 << no_bits2) - 1;
  168|       |
  169|  88.1k|  value = ixheaacd_read_bits_buf(it_bit_buff, no_bits1);
  170|       |
  171|  88.1k|  if (value == max_val1) {
  ------------------
  |  Branch (171:7): [True: 4.63k, False: 83.5k]
  ------------------
  172|  4.63k|    val_add = ixheaacd_read_bits_buf(it_bit_buff, no_bits2);
  173|       |
  174|  4.63k|    value += val_add;
  175|       |
  176|  4.63k|    if (val_add == max_val2) {
  ------------------
  |  Branch (176:9): [True: 621, False: 4.01k]
  ------------------
  177|    621|      val_add = ixheaacd_read_bits_buf(it_bit_buff, no_bits3);
  178|       |
  179|    621|      value += val_add;
  180|    621|    }
  181|  4.63k|  }
  182|       |
  183|  88.1k|  *ext_ele_value = value;
  184|  88.1k|}
ixheaacd_sbr_config:
  217|  5.82k|                         ia_usac_dec_sbr_config_struct *pstr_usac_sbr_config) {
  218|  5.82k|  pstr_usac_sbr_config->harmonic_sbr = ixheaacd_read_bits_buf(it_bit_buff, 1);
  219|  5.82k|  pstr_usac_sbr_config->bs_inter_tes = ixheaacd_read_bits_buf(it_bit_buff, 1);
  220|  5.82k|  pstr_usac_sbr_config->bs_pvc = ixheaacd_read_bits_buf(it_bit_buff, 1);
  221|  5.82k|  pstr_usac_sbr_config->dflt_start_freq =
  222|  5.82k|      ixheaacd_read_bits_buf(it_bit_buff, 4);
  223|       |
  224|  5.82k|  pstr_usac_sbr_config->dflt_stop_freq = ixheaacd_read_bits_buf(it_bit_buff, 4);
  225|  5.82k|  pstr_usac_sbr_config->dflt_header_extra1 =
  226|  5.82k|      ixheaacd_read_bits_buf(it_bit_buff, 1);
  227|  5.82k|  pstr_usac_sbr_config->dflt_header_extra2 =
  228|  5.82k|      ixheaacd_read_bits_buf(it_bit_buff, 1);
  229|       |
  230|  5.82k|  if (pstr_usac_sbr_config->dflt_header_extra1) {
  ------------------
  |  Branch (230:7): [True: 2.82k, False: 2.99k]
  ------------------
  231|  2.82k|    pstr_usac_sbr_config->dflt_freq_scale =
  232|  2.82k|        ixheaacd_read_bits_buf(it_bit_buff, 2);
  233|  2.82k|    pstr_usac_sbr_config->dflt_alter_scale =
  234|  2.82k|        ixheaacd_read_bits_buf(it_bit_buff, 1);
  235|  2.82k|    pstr_usac_sbr_config->dflt_noise_bands =
  236|  2.82k|        ixheaacd_read_bits_buf(it_bit_buff, 2);
  237|  2.82k|  }
  238|       |
  239|  5.82k|  if (pstr_usac_sbr_config->dflt_header_extra2) {
  ------------------
  |  Branch (239:7): [True: 1.00k, False: 4.81k]
  ------------------
  240|  1.00k|    pstr_usac_sbr_config->dflt_limiter_bands =
  241|  1.00k|        ixheaacd_read_bits_buf(it_bit_buff, 2);
  242|  1.00k|    pstr_usac_sbr_config->dflt_limiter_gains =
  243|  1.00k|        ixheaacd_read_bits_buf(it_bit_buff, 2);
  244|  1.00k|    pstr_usac_sbr_config->dflt_interpol_freq =
  245|  1.00k|        ixheaacd_read_bits_buf(it_bit_buff, 1);
  246|  1.00k|    pstr_usac_sbr_config->dflt_smoothing_mode =
  247|  1.00k|        ixheaacd_read_bits_buf(it_bit_buff, 1);
  248|  1.00k|  }
  249|  5.82k|}
ixheaacd_ext_element_config:
  255|  14.1k|    WORD32 *preroll_flag) {
  256|  14.1k|  UWORD32 usac_ext_element_type, usac_ext_element_config_length, flag;
  257|       |
  258|  14.1k|  UWORD32 i;
  259|       |
  260|  14.1k|  ixheaacd_read_escape_value(it_bit_buff, &(usac_ext_element_type), 4, 8, 16);
  261|       |
  262|  14.1k|  ixheaacd_read_escape_value(it_bit_buff, &(usac_ext_element_config_length), 4,
  263|  14.1k|                             8, 16);
  264|  14.1k|  if (usac_ext_element_config_length >= 768) return -1;
  ------------------
  |  Branch (264:7): [True: 1, False: 14.1k]
  ------------------
  265|       |
  266|  14.1k|  flag = ixheaacd_read_bits_buf(it_bit_buff, 1);
  267|       |
  268|  14.1k|  *ptr_usac_ext_ele_payload_len = 0;
  269|       |
  270|  14.1k|  if (flag) {
  ------------------
  |  Branch (270:7): [True: 2.93k, False: 11.1k]
  ------------------
  271|  2.93k|    ixheaacd_read_escape_value(
  272|  2.93k|        it_bit_buff,
  273|  2.93k|        (UWORD32 *)(&(pstr_usac_element_config->usac_ext_eleme_def_len)), 8, 16,
  274|  2.93k|        0);
  275|  2.93k|    pstr_usac_element_config->usac_ext_eleme_def_len += 1;
  276|       |
  277|  11.1k|  } else {
  278|  11.1k|    pstr_usac_element_config->usac_ext_eleme_def_len = 0;
  279|  11.1k|  }
  280|       |
  281|  14.1k|  pstr_usac_element_config->usac_ext_elem_pld_frag =
  282|  14.1k|      ixheaacd_read_bits_buf(it_bit_buff, 1);
  283|       |
  284|  14.1k|  switch (usac_ext_element_type) {
  285|     22|    case ID_EXT_ELE_FILL:
  ------------------
  |  |   46|     22|#define ID_EXT_ELE_FILL 0
  ------------------
  |  Branch (285:5): [True: 22, False: 14.0k]
  ------------------
  286|     22|      break;
  287|  6.14k|    case ID_EXT_ELE_AUDIOPREROLL:
  ------------------
  |  |   49|  6.14k|#define ID_EXT_ELE_AUDIOPREROLL 3
  ------------------
  |  Branch (287:5): [True: 6.14k, False: 7.97k]
  ------------------
  288|  6.14k|      *preroll_flag = 1;
  289|  6.14k|      break;
  290|  1.73k|    case ID_EXT_ELE_UNI_DRC:
  ------------------
  |  |   50|  1.73k|#define ID_EXT_ELE_UNI_DRC 4
  ------------------
  |  Branch (290:5): [True: 1.73k, False: 12.3k]
  ------------------
  291|  43.9k|      for (i = 0; i < usac_ext_element_config_length; i++) {
  ------------------
  |  Branch (291:19): [True: 42.2k, False: 1.73k]
  ------------------
  292|  42.2k|        ptr_usac_ext_ele_payload[i] = ixheaacd_read_bits_buf(it_bit_buff, 8);
  293|  42.2k|      }
  294|  1.73k|      *ptr_usac_ext_ele_payload_len = usac_ext_element_config_length;
  295|  1.73k|      break;
  296|       |
  297|  6.20k|    default:
  ------------------
  |  Branch (297:5): [True: 6.20k, False: 7.90k]
  ------------------
  298|  6.20k|      if ((it_bit_buff->cnt_bits >> 3) < (WORD32)usac_ext_element_config_length)
  ------------------
  |  Branch (298:11): [True: 9, False: 6.19k]
  ------------------
  299|      9|        return -1;
  300|  6.19k|      it_bit_buff->ptr_read_next += usac_ext_element_config_length;
  301|  6.19k|      it_bit_buff->cnt_bits -= (usac_ext_element_config_length << 3);
  302|       |
  303|  6.19k|      break;
  304|  14.1k|  }
  305|       |
  306|  14.0k|  return 0;
  307|  14.1k|}
ixheaacd_mps212_config:
  312|  2.56k|    WORD32 stereo_config_index) {
  313|  2.56k|  pstr_usac_mps212_config->bs_freq_res = ixheaacd_read_bits_buf(it_bit_buff, 3);
  314|       |
  315|  2.56k|  pstr_usac_mps212_config->bs_fixed_gain_dmx =
  316|  2.56k|      ixheaacd_read_bits_buf(it_bit_buff, 3);
  317|       |
  318|  2.56k|  pstr_usac_mps212_config->bs_temp_shape_config =
  319|  2.56k|      ixheaacd_read_bits_buf(it_bit_buff, 2);
  320|       |
  321|  2.56k|  pstr_usac_mps212_config->bs_decorr_config =
  322|  2.56k|      ixheaacd_read_bits_buf(it_bit_buff, 2);
  323|  2.56k|  if (pstr_usac_mps212_config->bs_decorr_config > MAX_DECOR_CONFIG_IDX)
  ------------------
  |  |   27|  2.56k|#define MAX_DECOR_CONFIG_IDX (2)
  ------------------
  |  Branch (323:7): [True: 1, False: 2.56k]
  ------------------
  324|      1|    return IA_FATAL_ERROR;
  ------------------
  |  |   25|      1|#define IA_FATAL_ERROR 0x80000000
  ------------------
  325|       |
  326|  2.56k|  pstr_usac_mps212_config->bs_high_rate_mode =
  327|  2.56k|      ixheaacd_read_bits_buf(it_bit_buff, 1);
  328|       |
  329|  2.56k|  pstr_usac_mps212_config->bs_phase_coding =
  330|  2.56k|      ixheaacd_read_bits_buf(it_bit_buff, 1);
  331|       |
  332|  2.56k|  pstr_usac_mps212_config->bs_ott_bands_phase_present =
  333|  2.56k|      ixheaacd_read_bits_buf(it_bit_buff, 1);
  334|       |
  335|  2.56k|  if (pstr_usac_mps212_config->bs_ott_bands_phase_present) {
  ------------------
  |  Branch (335:7): [True: 1.02k, False: 1.53k]
  ------------------
  336|  1.02k|    pstr_usac_mps212_config->bs_ott_bands_phase =
  337|  1.02k|        ixheaacd_read_bits_buf(it_bit_buff, 5);
  338|  1.02k|    if (pstr_usac_mps212_config->bs_ott_bands_phase > MAX_PARAMETER_BANDS)
  ------------------
  |  |   55|  1.02k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  |  Branch (338:9): [True: 1, False: 1.02k]
  ------------------
  339|      1|      return IA_FATAL_ERROR;
  ------------------
  |  |   25|      1|#define IA_FATAL_ERROR 0x80000000
  ------------------
  340|  1.02k|  }
  341|       |
  342|  2.56k|  if (stereo_config_index > 1) {
  ------------------
  |  Branch (342:7): [True: 1.65k, False: 907]
  ------------------
  343|  1.65k|    pstr_usac_mps212_config->bs_residual_bands =
  344|  1.65k|        ixheaacd_read_bits_buf(it_bit_buff, 5);
  345|       |
  346|  1.65k|    if (pstr_usac_mps212_config->bs_residual_bands > MAX_PARAMETER_BANDS)
  ------------------
  |  |   55|  1.65k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  |  Branch (346:9): [True: 2, False: 1.65k]
  ------------------
  347|      2|      return IA_FATAL_ERROR;
  ------------------
  |  |   25|      2|#define IA_FATAL_ERROR 0x80000000
  ------------------
  348|       |
  349|  1.65k|    pstr_usac_mps212_config->bs_ott_bands_phase =
  350|  1.65k|        max(pstr_usac_mps212_config->bs_ott_bands_phase,
  ------------------
  |  |   74|  1.65k|#define max(a, b) (((a) > (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (74:20): [True: 227, False: 1.42k]
  |  |  ------------------
  ------------------
  351|  1.65k|            pstr_usac_mps212_config->bs_residual_bands);
  352|       |
  353|  1.65k|    pstr_usac_mps212_config->bs_pseudo_lr =
  354|  1.65k|        ixheaacd_read_bits_buf(it_bit_buff, 1);
  355|  1.65k|  }
  356|       |
  357|  2.56k|  if (pstr_usac_mps212_config->bs_temp_shape_config == 2)
  ------------------
  |  Branch (357:7): [True: 488, False: 2.07k]
  ------------------
  358|    488|    pstr_usac_mps212_config->bs_env_quant_mode =
  359|    488|        ixheaacd_read_bits_buf(it_bit_buff, 1);
  360|       |
  361|  2.56k|  return IA_NO_ERROR;
  ------------------
  |  |   23|  2.56k|#define IA_NO_ERROR 0x00000000
  ------------------
  362|  2.56k|}
ixheaacd_cpe_config:
  367|  9.96k|    WORD32 sbr_ratio_index) {
  368|  9.96k|  pstr_usac_element_config->tw_mdct = ixheaacd_read_bits_buf(it_bit_buff, 1);
  369|  9.96k|  pstr_usac_element_config->noise_filling =
  370|  9.96k|      ixheaacd_read_bits_buf(it_bit_buff, 1);
  371|       |
  372|  9.96k|  if (sbr_ratio_index > 0) {
  ------------------
  |  Branch (372:7): [True: 2.75k, False: 7.20k]
  ------------------
  373|  2.75k|    ixheaacd_sbr_config(it_bit_buff,
  374|  2.75k|                        &(pstr_usac_element_config->str_usac_sbr_config));
  375|  2.75k|    pstr_usac_element_config->stereo_config_index =
  376|  2.75k|        ixheaacd_read_bits_buf(it_bit_buff, 2);
  377|       |
  378|  7.20k|  } else {
  379|  7.20k|    pstr_usac_element_config->stereo_config_index = 0;
  380|  7.20k|  }
  381|       |
  382|  9.96k|  if (pstr_usac_element_config->stereo_config_index > 0)
  ------------------
  |  Branch (382:7): [True: 2.56k, False: 7.40k]
  ------------------
  383|  2.56k|    return ixheaacd_mps212_config(
  384|  2.56k|        it_bit_buff, &(pstr_usac_element_config->str_usac_mps212_config),
  385|  2.56k|        pstr_usac_element_config->stereo_config_index);
  386|       |
  387|  7.40k|  return IA_NO_ERROR;
  ------------------
  |  |   23|  7.40k|#define IA_NO_ERROR 0x00000000
  ------------------
  388|  9.96k|}
ixheaacd_decoder_config:
  393|  24.0k|    WORD32 sbr_ratio_index, UINT32 *chan, WORD32 ec_flag) {
  394|  24.0k|  UWORD32 elem_idx = 0;
  395|  24.0k|  UWORD32 err = 0;
  396|  24.0k|  WORD32 num_channels = 0;
  397|       |
  398|  24.0k|  ixheaacd_read_escape_value(
  399|  24.0k|      it_bit_buff, &(pstr_usac_decoder_config->num_elements), 4, 8, 16);
  400|  24.0k|  pstr_usac_decoder_config->num_elements += 1;
  401|  24.0k|  pstr_usac_decoder_config->preroll_flag = 0;
  402|       |
  403|  24.0k|  if (pstr_usac_decoder_config->num_elements > USAC_MAX_ELEMENTS) {
  ------------------
  |  |   23|  24.0k|#define USAC_MAX_ELEMENTS (16)
  ------------------
  |  Branch (403:7): [True: 9, False: 24.0k]
  ------------------
  404|      9|    if (ec_flag) {
  ------------------
  |  Branch (404:9): [True: 0, False: 9]
  ------------------
  405|      0|      pstr_usac_decoder_config->num_elements = USAC_MAX_ELEMENTS;
  ------------------
  |  |   23|      0|#define USAC_MAX_ELEMENTS (16)
  ------------------
  406|      0|      longjmp(*(it_bit_buff->xaac_jmp_buf), IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|      0|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  407|      9|    } else {
  408|      9|      return IA_FATAL_ERROR;
  ------------------
  |  |   25|      9|#define IA_FATAL_ERROR 0x80000000
  ------------------
  409|      9|    }
  410|      9|  }
  411|       |
  412|  61.6k|  for (elem_idx = 0; elem_idx < pstr_usac_decoder_config->num_elements;
  ------------------
  |  Branch (412:22): [True: 37.7k, False: 23.9k]
  ------------------
  413|  37.7k|       elem_idx++) {
  414|  37.7k|    ia_usac_dec_element_config_struct *pstr_usac_element_config =
  415|  37.7k|        &(pstr_usac_decoder_config->str_usac_element_config[elem_idx]);
  416|       |
  417|  37.7k|    pstr_usac_decoder_config->usac_element_type[elem_idx] =
  418|  37.7k|        ixheaacd_read_bits_buf(it_bit_buff, 2);
  419|       |
  420|  37.7k|    switch (pstr_usac_decoder_config->usac_element_type[elem_idx]) {
  421|  13.3k|      case ID_USAC_SCE:
  ------------------
  |  |   27|  13.3k|#define ID_USAC_SCE 0
  ------------------
  |  Branch (421:7): [True: 13.3k, False: 24.3k]
  ------------------
  422|  13.3k|        num_channels++;
  423|  13.3k|        pstr_usac_element_config->tw_mdct =
  424|  13.3k|            ixheaacd_read_bits_buf(it_bit_buff, 1);
  425|  13.3k|        pstr_usac_element_config->noise_filling =
  426|  13.3k|            ixheaacd_read_bits_buf(it_bit_buff, 1);
  427|  13.3k|        pstr_usac_element_config->stereo_config_index = 0;
  428|  13.3k|        if (sbr_ratio_index > 0)
  ------------------
  |  Branch (428:13): [True: 3.06k, False: 10.2k]
  ------------------
  429|  3.06k|          ixheaacd_sbr_config(it_bit_buff,
  430|  3.06k|                              &(pstr_usac_element_config->str_usac_sbr_config));
  431|       |
  432|  13.3k|        break;
  433|       |
  434|  9.96k|      case ID_USAC_CPE:
  ------------------
  |  |   28|  9.96k|#define ID_USAC_CPE 1
  ------------------
  |  Branch (434:7): [True: 9.96k, False: 27.7k]
  ------------------
  435|  9.96k|        num_channels += 2;
  436|  9.96k|        if (ixheaacd_cpe_config(it_bit_buff, pstr_usac_element_config, sbr_ratio_index) !=
  ------------------
  |  Branch (436:13): [True: 4, False: 9.96k]
  ------------------
  437|  9.96k|            IA_NO_ERROR) {
  ------------------
  |  |   23|  9.96k|#define IA_NO_ERROR 0x00000000
  ------------------
  438|      4|          if (ec_flag) {
  ------------------
  |  Branch (438:15): [True: 0, False: 4]
  ------------------
  439|      0|            longjmp(*(it_bit_buff->xaac_jmp_buf),
  440|      0|                    IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|      0|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  441|      4|          } else {
  442|      4|            return IA_FATAL_ERROR;
  ------------------
  |  |   25|      4|#define IA_FATAL_ERROR 0x80000000
  ------------------
  443|      4|          }
  444|      4|        }
  445|  9.96k|        if (pstr_usac_element_config->stereo_config_index > 1 && *chan < 2) {
  ------------------
  |  Branch (445:13): [True: 1.65k, False: 8.30k]
  |  Branch (445:66): [True: 2, False: 1.65k]
  ------------------
  446|      2|          if (ec_flag) {
  ------------------
  |  Branch (446:15): [True: 0, False: 2]
  ------------------
  447|      0|            longjmp(*(it_bit_buff->xaac_jmp_buf),
  448|      0|                    IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|      0|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  449|      2|          } else {
  450|      2|            return IA_FATAL_ERROR;
  ------------------
  |  |   25|      2|#define IA_FATAL_ERROR 0x80000000
  ------------------
  451|      2|          }
  452|      2|        }
  453|  9.96k|        break;
  454|       |
  455|  9.96k|      case ID_USAC_LFE:
  ------------------
  |  |   29|    294|#define ID_USAC_LFE 2
  ------------------
  |  Branch (455:7): [True: 294, False: 37.4k]
  ------------------
  456|    294|        num_channels++;
  457|    294|        pstr_usac_element_config->tw_mdct = 0;
  458|    294|        pstr_usac_element_config->noise_filling = 0;
  459|    294|        pstr_usac_element_config->stereo_config_index = 0;
  460|    294|        break;
  461|       |
  462|  14.1k|      case ID_USAC_EXT:
  ------------------
  |  |   30|  14.1k|#define ID_USAC_EXT 3
  ------------------
  |  Branch (462:7): [True: 14.1k, False: 23.6k]
  ------------------
  463|  14.1k|        err = ixheaacd_ext_element_config(
  464|  14.1k|            it_bit_buff, pstr_usac_element_config,
  465|  14.1k|            &pstr_usac_decoder_config->usac_ext_ele_payload_buf[elem_idx][0],
  466|  14.1k|            &pstr_usac_decoder_config->usac_ext_ele_payload_len[elem_idx],
  467|  14.1k|            &(pstr_usac_decoder_config->preroll_flag));
  468|       |
  469|  14.1k|        if (pstr_usac_decoder_config->usac_ext_ele_payload_len[elem_idx] > 0) {
  ------------------
  |  Branch (469:13): [True: 1.66k, False: 12.4k]
  ------------------
  470|  1.66k|          pstr_usac_decoder_config->usac_ext_ele_payload_present[elem_idx] = 1;
  471|  12.4k|        } else {
  472|  12.4k|          pstr_usac_decoder_config->usac_ext_ele_payload_present[elem_idx] = 0;
  473|  12.4k|        }
  474|  14.1k|        if (err != 0) {
  ------------------
  |  Branch (474:13): [True: 10, False: 14.1k]
  ------------------
  475|     10|          if (ec_flag) {
  ------------------
  |  Branch (475:15): [True: 0, False: 10]
  ------------------
  476|      0|            longjmp(*(it_bit_buff->xaac_jmp_buf),
  477|      0|                    IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|      0|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  478|     10|          } else {
  479|     10|            return IA_FATAL_ERROR;
  ------------------
  |  |   25|     10|#define IA_FATAL_ERROR 0x80000000
  ------------------
  480|     10|          }
  481|     10|        }
  482|  14.1k|        break;
  483|  14.1k|      default:
  ------------------
  |  Branch (483:7): [True: 0, False: 37.7k]
  ------------------
  484|      0|        if (ec_flag) {
  ------------------
  |  Branch (484:13): [True: 0, False: 0]
  ------------------
  485|      0|          longjmp(*(it_bit_buff->xaac_jmp_buf),
  486|      0|                  IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|      0|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  487|      0|        } else {
  488|      0|          return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
  489|      0|        }
  490|      0|        break;
  491|  37.7k|    }
  492|  37.6k|    if (num_channels > 2) {
  ------------------
  |  Branch (492:9): [True: 13, False: 37.6k]
  ------------------
  493|     13|      if (ec_flag) {
  ------------------
  |  Branch (493:11): [True: 0, False: 13]
  ------------------
  494|      0|        longjmp(*(it_bit_buff->xaac_jmp_buf),
  495|      0|                IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|      0|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  496|     13|      } else {
  497|     13|        return IA_FATAL_ERROR;
  ------------------
  |  |   25|     13|#define IA_FATAL_ERROR 0x80000000
  ------------------
  498|     13|      }
  499|     13|    }
  500|  37.6k|  }
  501|  23.9k|  return err;
  502|  24.0k|}
ixheaacd_config_extension:
  505|  2.76k|    ia_usac_decoder_config_struct *pstr_usac_decoder_config, WORD32 ec_flag) {
  506|  2.76k|  UWORD32 i, j;
  507|  2.76k|  UWORD32 num_config_extensions;
  508|  2.76k|  UWORD32 usac_config_ext_type, usac_config_ext_len;
  509|       |
  510|  2.76k|  ixheaacd_read_escape_value(it_bit_buff, &(num_config_extensions), 2, 4, 8);
  511|  2.76k|  num_config_extensions += 1;
  512|  2.76k|  if (USAC_MAX_CONFIG_EXTENSIONS < num_config_extensions) {
  ------------------
  |  |   25|  2.76k|#define USAC_MAX_CONFIG_EXTENSIONS (16)
  ------------------
  |  Branch (512:7): [True: 3, False: 2.75k]
  ------------------
  513|      3|    if (ec_flag) {
  ------------------
  |  Branch (513:9): [True: 0, False: 3]
  ------------------
  514|      0|      longjmp(*(it_bit_buff->xaac_jmp_buf), IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|      0|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  515|      3|    } else {
  516|      3|      return IA_FATAL_ERROR;
  ------------------
  |  |   25|      3|#define IA_FATAL_ERROR 0x80000000
  ------------------
  517|      3|    }
  518|      3|  }
  519|       |
  520|  2.75k|  pstr_usac_decoder_config->num_config_extensions = num_config_extensions;
  521|  2.75k|  memset(pstr_usac_decoder_config->usac_cfg_ext_info_len, 0,
  522|  2.75k|         USAC_MAX_CONFIG_EXTENSIONS * sizeof(WORD32));
  ------------------
  |  |   25|  2.75k|#define USAC_MAX_CONFIG_EXTENSIONS (16)
  ------------------
  523|  2.75k|  memset(pstr_usac_decoder_config->usac_cfg_ext_info_present, 0,
  524|  2.75k|         USAC_MAX_CONFIG_EXTENSIONS * sizeof(WORD32));
  ------------------
  |  |   25|  2.75k|#define USAC_MAX_CONFIG_EXTENSIONS (16)
  ------------------
  525|       |
  526|  15.5k|  for (j = 0; j < num_config_extensions; j++) {
  ------------------
  |  Branch (526:15): [True: 12.7k, False: 2.72k]
  ------------------
  527|  12.7k|    UWORD32 fill_byte_val = 0xa5;
  528|       |
  529|  12.7k|    ixheaacd_read_escape_value(it_bit_buff, &(usac_config_ext_type), 4, 8, 16);
  530|  12.7k|    ixheaacd_read_escape_value(it_bit_buff, &(usac_config_ext_len), 4, 8, 16);
  531|       |
  532|  12.7k|    if (usac_config_ext_len > 768) {
  ------------------
  |  Branch (532:9): [True: 3, False: 12.7k]
  ------------------
  533|      3|      if (ec_flag) {
  ------------------
  |  Branch (533:11): [True: 0, False: 3]
  ------------------
  534|      0|        longjmp(*(it_bit_buff->xaac_jmp_buf),
  535|      0|                IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|      0|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  536|      3|      } else {
  537|      3|        return IA_FATAL_ERROR;
  ------------------
  |  |   25|      3|#define IA_FATAL_ERROR 0x80000000
  ------------------
  538|      3|      }
  539|      3|    }
  540|       |
  541|  12.7k|    switch (usac_config_ext_type) {
  542|  5.85k|      case ID_CONFIG_EXT_FILL:
  ------------------
  |  |   52|  5.85k|#define ID_CONFIG_EXT_FILL 0
  ------------------
  |  Branch (542:7): [True: 5.85k, False: 6.94k]
  ------------------
  543|  5.87k|        for (i = 0; i < usac_config_ext_len; i++) {
  ------------------
  |  Branch (543:21): [True: 26, False: 5.85k]
  ------------------
  544|     26|          fill_byte_val = ixheaacd_read_bits_buf(it_bit_buff, 8);
  545|     26|          if (fill_byte_val != 0xa5) {
  ------------------
  |  Branch (545:15): [True: 4, False: 22]
  ------------------
  546|      4|            if (ec_flag) {
  ------------------
  |  Branch (546:17): [True: 0, False: 4]
  ------------------
  547|      0|              longjmp(*(it_bit_buff->xaac_jmp_buf),
  548|      0|                      IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|      0|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  549|      4|            } else {
  550|      4|              return IA_FATAL_ERROR;
  ------------------
  |  |   25|      4|#define IA_FATAL_ERROR 0x80000000
  ------------------
  551|      4|            }
  552|      4|          }
  553|     26|        }
  554|  5.85k|        break;
  555|  6.93k|      default:
  ------------------
  |  Branch (555:7): [True: 6.93k, False: 5.86k]
  ------------------
  556|  6.93k|        if ((WORD32)usac_config_ext_len > (it_bit_buff->cnt_bits >> 3)) {
  ------------------
  |  Branch (556:13): [True: 14, False: 6.91k]
  ------------------
  557|     14|          if (ec_flag) {
  ------------------
  |  Branch (557:15): [True: 0, False: 14]
  ------------------
  558|      0|            longjmp(*(it_bit_buff->xaac_jmp_buf),
  559|      0|                    IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|      0|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  560|     14|          } else {
  561|     14|            return IA_FATAL_ERROR;
  ------------------
  |  |   25|     14|#define IA_FATAL_ERROR 0x80000000
  ------------------
  562|     14|          }
  563|     14|        }
  564|  6.91k|        if (ID_CONFIG_EXT_LOUDNESS_INFO == usac_config_ext_type) {
  ------------------
  |  |   53|  6.91k|#define ID_CONFIG_EXT_LOUDNESS_INFO (2)
  ------------------
  |  Branch (564:13): [True: 1.39k, False: 5.52k]
  ------------------
  565|  39.5k|          for (i = 0; i < usac_config_ext_len; i++) {
  ------------------
  |  Branch (565:23): [True: 38.1k, False: 1.39k]
  ------------------
  566|  38.1k|            UWORD8 byte_val = ixheaacd_read_bits_buf(it_bit_buff, 8);
  567|  38.1k|            pstr_usac_decoder_config->usac_cfg_ext_info_buf[j][i] = byte_val;
  568|  38.1k|          }
  569|  1.39k|          pstr_usac_decoder_config->usac_cfg_ext_info_len[j] =
  570|  1.39k|              usac_config_ext_len;
  571|  1.39k|          pstr_usac_decoder_config->usac_cfg_ext_info_present[j] = 1;
  572|  5.52k|        } else {
  573|  22.3k|          for (i = 0; i < usac_config_ext_len; i++)
  ------------------
  |  Branch (573:23): [True: 16.8k, False: 5.52k]
  ------------------
  574|  16.8k|            ixheaacd_read_bits_buf(it_bit_buff, 8);
  575|  5.52k|        }
  576|  6.91k|        break;
  577|  12.7k|    }
  578|  12.7k|  }
  579|       |
  580|  2.72k|  return 0;
  581|  2.75k|}
ixheaacd_config:
  584|  24.0k|                       UINT32 *chan, WORD32 ec_flag) {
  585|  24.0k|  WORD32 tmp, err;
  586|  24.0k|  err = 0;
  587|       |
  588|  24.0k|  pstr_usac_conf->usac_sampling_frequency_index =
  589|  24.0k|      ixheaacd_read_bits_buf(it_bit_buff, 5);
  590|       |
  591|  24.0k|  if (pstr_usac_conf->usac_sampling_frequency_index == 0x1f) {
  ------------------
  |  Branch (591:7): [True: 30, False: 24.0k]
  ------------------
  592|     30|    pstr_usac_conf->usac_sampling_frequency =
  593|     30|        ixheaacd_read_bits_buf(it_bit_buff, 24);
  594|       |
  595|     30|    if (pstr_usac_conf->usac_sampling_frequency > USAC_MAX_SAMPLE_RATE) {
  ------------------
  |  |   50|     30|#define USAC_MAX_SAMPLE_RATE (96000)
  ------------------
  |  Branch (595:9): [True: 3, False: 27]
  ------------------
  596|      3|      if (ec_flag) {
  ------------------
  |  Branch (596:11): [True: 0, False: 3]
  ------------------
  597|      0|        longjmp(*(it_bit_buff->xaac_jmp_buf),
  598|      0|                IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|      0|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  599|      3|      } else {
  600|      3|        return IA_FATAL_ERROR;
  ------------------
  |  |   25|      3|#define IA_FATAL_ERROR 0x80000000
  ------------------
  601|      3|      }
  602|      3|    }
  603|       |
  604|  24.0k|  } else {
  605|  24.0k|    pstr_usac_conf->usac_sampling_frequency =
  606|  24.0k|        sampling_rate_tbl[pstr_usac_conf->usac_sampling_frequency_index];
  607|  24.0k|  }
  608|       |
  609|  24.0k|  if (pstr_usac_conf->usac_sampling_frequency == 0) {
  ------------------
  |  Branch (609:7): [True: 3, False: 24.0k]
  ------------------
  610|      3|    if (ec_flag) {
  ------------------
  |  Branch (610:9): [True: 0, False: 3]
  ------------------
  611|      0|      longjmp(*(it_bit_buff->xaac_jmp_buf), IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|      0|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  612|      3|    } else {
  613|      3|      return IA_FATAL_ERROR;
  ------------------
  |  |   25|      3|#define IA_FATAL_ERROR 0x80000000
  ------------------
  614|      3|    }
  615|      3|  }
  616|  24.0k|  pstr_usac_conf->core_sbr_framelength_index =
  617|  24.0k|      ixheaacd_read_bits_buf(it_bit_buff, 3);
  618|       |
  619|  24.0k|  if (pstr_usac_conf->core_sbr_framelength_index > MAX_CORE_SBR_FRAME_LEN_IDX) {
  ------------------
  |  |   43|  24.0k|#define MAX_CORE_SBR_FRAME_LEN_IDX (4)
  ------------------
  |  Branch (619:7): [True: 10, False: 24.0k]
  ------------------
  620|     10|    if (ec_flag) {
  ------------------
  |  Branch (620:9): [True: 0, False: 10]
  ------------------
  621|      0|      longjmp(*(it_bit_buff->xaac_jmp_buf), IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|      0|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  622|     10|    } else {
  623|     10|      return IA_FATAL_ERROR;
  ------------------
  |  |   25|     10|#define IA_FATAL_ERROR 0x80000000
  ------------------
  624|     10|    }
  625|     10|  }
  626|       |
  627|  24.0k|  pstr_usac_conf->channel_configuration_index =
  628|  24.0k|      ixheaacd_read_bits_buf(it_bit_buff, 5);
  629|  24.0k|  if ((pstr_usac_conf->channel_configuration_index >= 3) &&
  ------------------
  |  Branch (629:7): [True: 1.07k, False: 22.9k]
  ------------------
  630|  1.07k|      (pstr_usac_conf->channel_configuration_index != 8)) {
  ------------------
  |  Branch (630:7): [True: 8, False: 1.07k]
  ------------------
  631|      8|    if (ec_flag) {
  ------------------
  |  Branch (631:9): [True: 0, False: 8]
  ------------------
  632|      0|      longjmp(*(it_bit_buff->xaac_jmp_buf), IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|      0|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  633|      8|    } else {
  634|      8|      return IA_FATAL_ERROR;
  ------------------
  |  |   25|      8|#define IA_FATAL_ERROR 0x80000000
  ------------------
  635|      8|    }
  636|      8|  }
  637|       |
  638|  24.0k|  if (pstr_usac_conf->channel_configuration_index == 0) {
  ------------------
  |  Branch (638:7): [True: 4.62k, False: 19.4k]
  ------------------
  639|  4.62k|    UWORD32 i;
  640|       |
  641|  4.62k|    ixheaacd_read_escape_value(it_bit_buff,
  642|  4.62k|                               (UWORD32 *)(&(pstr_usac_conf->num_out_channels)),
  643|  4.62k|                               5, 8, 16);
  644|  4.62k|    if (BS_MAX_NUM_OUT_CHANNELS < pstr_usac_conf->num_out_channels) {
  ------------------
  |  |  209|  4.62k|#define BS_MAX_NUM_OUT_CHANNELS (255)
  ------------------
  |  Branch (644:9): [True: 3, False: 4.62k]
  ------------------
  645|      3|      return IA_XHEAAC_DEC_INIT_FATAL_STREAM_CHAN_GT_MAX;
  ------------------
  |  |   85|      3|#define IA_XHEAAC_DEC_INIT_FATAL_STREAM_CHAN_GT_MAX 0xFFFF9002
  ------------------
  646|      3|    }
  647|  4.62k|    if (pstr_usac_conf->num_out_channels < 1) {
  ------------------
  |  Branch (647:9): [True: 12, False: 4.60k]
  ------------------
  648|     12|      return IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL;
  ------------------
  |  |   83|     12|#define IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL 0xFFFF9000
  ------------------
  649|     12|    }
  650|   368k|    for (i = 0; i < pstr_usac_conf->num_out_channels; i++)
  ------------------
  |  Branch (650:17): [True: 363k, False: 4.60k]
  ------------------
  651|   363k|      pstr_usac_conf->output_channel_pos[i] =
  652|   363k|          ixheaacd_read_bits_buf(it_bit_buff, 5);
  653|       |
  654|  4.60k|    if (ec_flag) {
  ------------------
  |  Branch (654:9): [True: 0, False: 4.60k]
  ------------------
  655|      0|      longjmp(*(it_bit_buff->xaac_jmp_buf), IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|      0|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  656|      0|    }
  657|  19.4k|  } else {
  658|  19.4k|    err = ixheaacd_get_usac_chan_conf(pstr_usac_conf, pstr_usac_conf->channel_configuration_index,
  659|  19.4k|                                      it_bit_buff, ec_flag);
  660|  19.4k|    if (err != 0)
  ------------------
  |  Branch (660:9): [True: 0, False: 19.4k]
  ------------------
  661|      0|      return err;
  662|  19.4k|  }
  663|       |
  664|  24.0k|  err = ixheaacd_decoder_config(
  665|  24.0k|      it_bit_buff, &(pstr_usac_conf->str_usac_dec_config),
  666|  24.0k|      ixheaacd_sbr_ratio(pstr_usac_conf->core_sbr_framelength_index), chan, ec_flag);
  667|  24.0k|  if (err != 0) return err;
  ------------------
  |  Branch (667:7): [True: 38, False: 23.9k]
  ------------------
  668|       |
  669|  23.9k|  tmp = ixheaacd_read_bits_buf(it_bit_buff, 1);
  670|       |
  671|  23.9k|  if (tmp) {
  ------------------
  |  Branch (671:7): [True: 2.76k, False: 21.2k]
  ------------------
  672|  2.76k|    err = ixheaacd_config_extension(it_bit_buff,
  673|  2.76k|                                    &pstr_usac_conf->str_usac_dec_config, ec_flag);
  674|  2.76k|    if (err != 0) return -1;
  ------------------
  |  Branch (674:9): [True: 24, False: 2.73k]
  ------------------
  675|  2.76k|  }
  676|       |
  677|  23.9k|  return err;
  678|  23.9k|}
ixheaacd_conf_default:
  680|  24.0k|VOID ixheaacd_conf_default(ia_usac_config_struct *pstr_usac_conf) {
  681|  24.0k|  WORD32 i;
  682|       |
  683|  24.0k|  pstr_usac_conf->num_out_channels = 0;
  684|       |
  685|  6.15M|  for (i = 0; i < BS_MAX_NUM_OUT_CHANNELS; i++)
  ------------------
  |  |  209|  6.15M|#define BS_MAX_NUM_OUT_CHANNELS (255)
  ------------------
  |  Branch (685:15): [True: 6.12M, False: 24.0k]
  ------------------
  686|  6.12M|    pstr_usac_conf->output_channel_pos[i] = BS_OUTPUT_CHANNEL_POS_NA;
  ------------------
  |  |  173|  6.12M|#define BS_OUTPUT_CHANNEL_POS_NA -1   /* n/a                                */
  ------------------
  687|       |
  688|  24.0k|  pstr_usac_conf->str_usac_dec_config.num_elements = 0;
  689|       |
  690|   408k|  for (i = 0; i < USAC_MAX_ELEMENTS; i++)
  ------------------
  |  |   23|   408k|#define USAC_MAX_ELEMENTS (16)
  ------------------
  |  Branch (690:15): [True: 384k, False: 24.0k]
  ------------------
  691|   384k|    pstr_usac_conf->str_usac_dec_config.usac_element_type[i] = ID_USAC_INVALID;
  ------------------
  |  |   31|   384k|#define ID_USAC_INVALID 0xFF
  ------------------
  692|       |
  693|  24.0k|  return;
  694|  24.0k|}
ixheaacd_init_config.c:ixheaacd_get_sample_freq_indx:
  103|  5.01k|static WORD32 ixheaacd_get_sample_freq_indx(WORD32 sampling_freq) {
  104|  5.01k|  WORD32 index;
  105|  5.01k|  const WORD32 tbl_size = sizeof(sampling_rate_tbl) / sizeof(WORD32) - 1;
  106|       |
  107|  93.5k|  for (index = 0; index < tbl_size; index++) {
  ------------------
  |  Branch (107:19): [True: 91.8k, False: 1.65k]
  ------------------
  108|  91.8k|    if (sampling_rate_tbl[index] == sampling_freq) break;
  ------------------
  |  Branch (108:9): [True: 3.36k, False: 88.5k]
  ------------------
  109|  91.8k|  }
  110|  5.01k|  return index;
  111|  5.01k|}
ixheaacd_init_config.c:ixheaacd_get_usac_chan_conf:
  188|  19.4k|{
  189|  19.4k|  switch (ch_config_index) {
  190|    560|    case 1:
  ------------------
  |  Branch (190:5): [True: 560, False: 18.8k]
  ------------------
  191|    560|      pstr_usac_config->num_out_channels = 1;
  192|    560|      pstr_usac_config->output_channel_pos[0] = BS_OUTPUT_CHANNEL_POS_C;
  ------------------
  |  |  176|    560|#define BS_OUTPUT_CHANNEL_POS_C 2     /* Center Front                        */
  ------------------
  193|    560|      break;
  194|  17.7k|    case 2:
  ------------------
  |  Branch (194:5): [True: 17.7k, False: 1.63k]
  ------------------
  195|  17.7k|      pstr_usac_config->num_out_channels = 2;
  196|  17.7k|      pstr_usac_config->output_channel_pos[0] = BS_OUTPUT_CHANNEL_POS_L;
  ------------------
  |  |  174|  17.7k|#define BS_OUTPUT_CHANNEL_POS_L 0     /* Left Front                          */
  ------------------
  197|  17.7k|      pstr_usac_config->output_channel_pos[1] = BS_OUTPUT_CHANNEL_POS_R;
  ------------------
  |  |  175|  17.7k|#define BS_OUTPUT_CHANNEL_POS_R 1     /* Right Front                         */
  ------------------
  198|  17.7k|      break;
  199|  1.07k|    case 8:
  ------------------
  |  Branch (199:5): [True: 1.07k, False: 18.3k]
  ------------------
  200|  1.07k|      pstr_usac_config->num_out_channels = 2;
  201|  1.07k|      pstr_usac_config->output_channel_pos[0] = BS_OUTPUT_CHANNEL_POS_NA;
  ------------------
  |  |  173|  1.07k|#define BS_OUTPUT_CHANNEL_POS_NA -1   /* n/a                                */
  ------------------
  202|  1.07k|      pstr_usac_config->output_channel_pos[1] = BS_OUTPUT_CHANNEL_POS_NA;
  ------------------
  |  |  173|  1.07k|#define BS_OUTPUT_CHANNEL_POS_NA -1   /* n/a                                */
  ------------------
  203|  1.07k|      break;
  204|       |
  205|      0|    default:
  ------------------
  |  Branch (205:5): [True: 0, False: 19.4k]
  ------------------
  206|      0|      if (ec_flag)
  ------------------
  |  Branch (206:11): [True: 0, False: 0]
  ------------------
  207|      0|        longjmp(*(it_bit_buff->xaac_jmp_buf),
  208|      0|            IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|      0|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  209|      0|      else
  210|      0|        return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
  211|      0|      break;
  212|  19.4k|  }
  213|  19.4k|  return IA_NO_ERROR;
  ------------------
  |  |   23|  19.4k|#define IA_NO_ERROR 0x00000000
  ------------------
  214|  19.4k|}

ixheaacd_set_aac_persistent_buffers:
   95|  22.9k|                                           WORD32 num_channel) {
   96|  22.9k|  WORD32 persistent_used;
   97|       |
   98|  22.9k|  struct ia_aac_persistent_struct *aac_persistent_mem =
   99|  22.9k|      (struct ia_aac_persistent_struct *)aac_persistent_mem_v;
  100|       |
  101|  22.9k|  persistent_used =
  102|  22.9k|      IXHEAAC_GET_SIZE_ALIGNED(sizeof(struct ia_aac_persistent_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  22.9k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  103|       |
  104|  22.9k|  memset(aac_persistent_mem, 0,
  105|  22.9k|         IXHEAAC_GET_SIZE_ALIGNED(sizeof(struct ia_aac_persistent_struct), BYTE_ALIGN_8));
  ------------------
  |  |   87|  22.9k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  106|  22.9k|  aac_persistent_mem->overlap_buffer =
  107|  22.9k|      (WORD32 *)((WORD8 *)aac_persistent_mem_v + persistent_used);
  108|       |
  109|  22.9k|  memset(
  110|  22.9k|      (WORD32 *)((WORD8 *)aac_persistent_mem_v + persistent_used), 0,
  111|  22.9k|      IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|  22.9k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  112|  22.9k|          4 * 512 * num_channel * sizeof(aac_persistent_mem->overlap_buffer[0]), BYTE_ALIGN_8));
  113|       |
  114|  22.9k|  persistent_used += IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|  22.9k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  115|  22.9k|      4 * 512 * num_channel * sizeof(aac_persistent_mem->overlap_buffer[0]), BYTE_ALIGN_8);
  116|       |
  117|  22.9k|  aac_persistent_mem->sbr_payload_buffer =
  118|  22.9k|      (WORD8 *)((WORD8 *)aac_persistent_mem_v + persistent_used);
  119|       |
  120|  22.9k|  memset((WORD16 *)((WORD8 *)aac_persistent_mem_v + persistent_used), 0,
  121|  22.9k|         num_channel *
  122|  22.9k|             IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|  22.9k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  123|  22.9k|                 MAXSBRBYTES * sizeof(aac_persistent_mem->sbr_payload_buffer[0]), BYTE_ALIGN_8));
  124|       |
  125|  22.9k|  persistent_used +=
  126|  22.9k|      num_channel *
  127|  22.9k|      IXHEAAC_GET_SIZE_ALIGNED(MAXSBRBYTES * sizeof(aac_persistent_mem->sbr_payload_buffer[0]),
  ------------------
  |  |   87|  22.9k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  128|  22.9k|                               BYTE_ALIGN_8);
  129|       |
  130|  22.9k|  aac_persistent_mem->prev_sbr_payload_buffer =
  131|  22.9k|      (WORD8 *)((WORD8 *)aac_persistent_mem_v + persistent_used);
  132|       |
  133|  22.9k|  memset((WORD8 *)aac_persistent_mem->prev_sbr_payload_buffer, 0,
  134|  22.9k|         num_channel * IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|  22.9k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  135|  22.9k|                           MAXSBRBYTES * sizeof(*(aac_persistent_mem->prev_sbr_payload_buffer)),
  136|  22.9k|                           BYTE_ALIGN_8));
  137|       |
  138|  22.9k|  persistent_used +=
  139|  22.9k|      num_channel *
  140|  22.9k|      IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|  22.9k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  141|  22.9k|          MAXSBRBYTES * sizeof(*(aac_persistent_mem->prev_sbr_payload_buffer)), BYTE_ALIGN_8);
  142|       |
  143|  22.9k|  {
  144|  22.9k|    WORD32 i;
  145|       |
  146|  67.3k|    for (i = 0; i < num_channel; i++) {
  ------------------
  |  Branch (146:17): [True: 44.4k, False: 22.9k]
  ------------------
  147|  44.4k|      aac_persistent_mem->ltp_buf[i] =
  148|  44.4k|          (WORD16 *)((WORD8 *)aac_persistent_mem_v + persistent_used);
  149|       |
  150|  44.4k|      memset((WORD16 *)((WORD8 *)aac_persistent_mem_v + persistent_used), 0,
  151|  44.4k|             IXHEAAC_GET_SIZE_ALIGNED(ltp_buffer_size * sizeof(aac_persistent_mem->ltp_buf[i][0]),
  ------------------
  |  |   87|  44.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  152|  44.4k|                                      BYTE_ALIGN_8));
  153|       |
  154|  44.4k|      persistent_used += IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|  44.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  155|  44.4k|          ltp_buffer_size * sizeof(aac_persistent_mem->ltp_buf[i][0]), BYTE_ALIGN_8);
  156|       |
  157|  44.4k|      aac_persistent_mem->ptr_aac_dec_static_channel_info[i] =
  158|  44.4k|          (ia_aac_dec_channel_info *)((WORD8 *)aac_persistent_mem_v + persistent_used);
  159|  44.4k|      persistent_used += IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_aac_dec_channel_info), BYTE_ALIGN_8);
  ------------------
  |  |   87|  44.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  160|       |
  161|  44.4k|      aac_persistent_mem->ptr_aac_dec_static_channel_info[i]
  162|  44.4k|          ->overlap_add_data.win_shape = 0;
  163|  44.4k|      aac_persistent_mem->ptr_aac_dec_static_channel_info[i]
  164|  44.4k|          ->overlap_add_data.win_seq = 0;
  165|       |
  166|  44.4k|      aac_persistent_mem->ptr_aac_dec_static_channel_info[i]
  167|  44.4k|          ->overlap_add_data.ptr_overlap_buf =
  168|  44.4k|          &aac_persistent_mem->overlap_buffer[i * OVERLAP_BUFFER_SIZE];
  ------------------
  |  |   28|  44.4k|#define OVERLAP_BUFFER_SIZE 512
  ------------------
  169|  44.4k|    }
  170|  22.9k|  }
  171|       |
  172|  22.9k|  return persistent_used;
  173|  22.9k|}
ixheaacd_huff_tables_create:
  175|  14.2k|VOID ixheaacd_huff_tables_create(ia_aac_dec_tables_struct *ptr_aac_tables) {
  176|  14.2k|  ptr_aac_tables->code_book[0] = 0;
  177|  14.2k|  ptr_aac_tables->code_book[1] =
  178|  14.2k|      (UWORD16 *)ptr_aac_tables->pstr_huffmann_tables->input_table_cb1;
  179|  14.2k|  ptr_aac_tables->code_book[2] =
  180|  14.2k|      (UWORD16 *)ptr_aac_tables->pstr_huffmann_tables->input_table_cb2;
  181|  14.2k|  ptr_aac_tables->code_book[3] =
  182|  14.2k|      (UWORD16 *)ptr_aac_tables->pstr_huffmann_tables->input_table_cb3;
  183|  14.2k|  ptr_aac_tables->code_book[4] =
  184|  14.2k|      (UWORD16 *)ptr_aac_tables->pstr_huffmann_tables->input_table_cb4;
  185|  14.2k|  ptr_aac_tables->code_book[5] =
  186|  14.2k|      (UWORD16 *)ptr_aac_tables->pstr_huffmann_tables->input_table_cb5;
  187|  14.2k|  ptr_aac_tables->code_book[6] =
  188|  14.2k|      (UWORD16 *)ptr_aac_tables->pstr_huffmann_tables->input_table_cb6;
  189|  14.2k|  ptr_aac_tables->code_book[7] =
  190|  14.2k|      (UWORD16 *)ptr_aac_tables->pstr_huffmann_tables->input_table_cb7;
  191|  14.2k|  ptr_aac_tables->code_book[8] =
  192|  14.2k|      (UWORD16 *)ptr_aac_tables->pstr_huffmann_tables->input_table_cb8;
  193|  14.2k|  ptr_aac_tables->code_book[9] =
  194|  14.2k|      (UWORD16 *)ptr_aac_tables->pstr_huffmann_tables->input_table_cb9;
  195|  14.2k|  ptr_aac_tables->code_book[10] =
  196|  14.2k|      (UWORD16 *)ptr_aac_tables->pstr_huffmann_tables->input_table_cb10;
  197|  14.2k|  ptr_aac_tables->code_book[11] =
  198|  14.2k|      (UWORD16 *)ptr_aac_tables->pstr_huffmann_tables->input_table_cb10;
  199|  14.2k|  ptr_aac_tables->code_book[12] =
  200|  14.2k|      (UWORD16 *)ptr_aac_tables->pstr_huffmann_tables->input_table_cb10;
  201|       |
  202|  14.2k|  ptr_aac_tables->index_table[1] =
  203|  14.2k|      (UWORD32 *)ptr_aac_tables->pstr_huffmann_tables->idx_table_hf1;
  204|  14.2k|  ptr_aac_tables->index_table[2] =
  205|  14.2k|      (UWORD32 *)ptr_aac_tables->pstr_huffmann_tables->idx_table_hf2;
  206|  14.2k|  ptr_aac_tables->index_table[3] =
  207|  14.2k|      (UWORD32 *)ptr_aac_tables->pstr_huffmann_tables->idx_table_hf3;
  208|  14.2k|  ptr_aac_tables->index_table[4] =
  209|  14.2k|      (UWORD32 *)ptr_aac_tables->pstr_huffmann_tables->idx_table_hf4;
  210|  14.2k|  ptr_aac_tables->index_table[5] =
  211|  14.2k|      (UWORD32 *)ptr_aac_tables->pstr_huffmann_tables->idx_table_hf5;
  212|  14.2k|  ptr_aac_tables->index_table[6] =
  213|  14.2k|      (UWORD32 *)ptr_aac_tables->pstr_huffmann_tables->idx_table_hf6;
  214|  14.2k|  ptr_aac_tables->index_table[7] =
  215|  14.2k|      (UWORD32 *)ptr_aac_tables->pstr_huffmann_tables->idx_table_hf7;
  216|  14.2k|  ptr_aac_tables->index_table[8] =
  217|  14.2k|      (UWORD32 *)ptr_aac_tables->pstr_huffmann_tables->idx_table_hf8;
  218|  14.2k|  ptr_aac_tables->index_table[9] =
  219|  14.2k|      (UWORD32 *)ptr_aac_tables->pstr_huffmann_tables->idx_table_hf9;
  220|  14.2k|  ptr_aac_tables->index_table[10] =
  221|  14.2k|      (UWORD32 *)ptr_aac_tables->pstr_huffmann_tables->idx_table_hf10;
  222|  14.2k|  ptr_aac_tables->index_table[11] =
  223|  14.2k|      (UWORD32 *)ptr_aac_tables->pstr_huffmann_tables->idx_table_hf10;
  224|  14.2k|  ptr_aac_tables->index_table[12] =
  225|  14.2k|      (UWORD32 *)ptr_aac_tables->pstr_huffmann_tables->idx_table_hf10;
  226|       |
  227|  14.2k|  ptr_aac_tables->scale_factor_bands_short[0] =
  228|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_96_128;
  229|  14.2k|  ptr_aac_tables->scale_factor_bands_short[1] =
  230|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_96_128;
  231|  14.2k|  ptr_aac_tables->scale_factor_bands_short[2] =
  232|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_96_128;
  233|  14.2k|  ptr_aac_tables->scale_factor_bands_short[3] =
  234|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_48_128;
  235|  14.2k|  ptr_aac_tables->scale_factor_bands_short[4] =
  236|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_48_128;
  237|  14.2k|  ptr_aac_tables->scale_factor_bands_short[5] =
  238|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_48_128;
  239|  14.2k|  ptr_aac_tables->scale_factor_bands_short[6] =
  240|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_24_128;
  241|  14.2k|  ptr_aac_tables->scale_factor_bands_short[7] =
  242|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_24_128;
  243|  14.2k|  ptr_aac_tables->scale_factor_bands_short[8] =
  244|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_16_128;
  245|  14.2k|  ptr_aac_tables->scale_factor_bands_short[9] =
  246|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_16_128;
  247|  14.2k|  ptr_aac_tables->scale_factor_bands_short[10] =
  248|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_16_128;
  249|  14.2k|  ptr_aac_tables->scale_factor_bands_short[11] =
  250|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_8_128;
  251|       |
  252|  14.2k|  ptr_aac_tables->scale_factor_bands_short[12] =
  253|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_96_120;
  254|  14.2k|  ptr_aac_tables->scale_factor_bands_short[13] =
  255|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_96_120;
  256|  14.2k|  ptr_aac_tables->scale_factor_bands_short[14] =
  257|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_96_120;
  258|  14.2k|  ptr_aac_tables->scale_factor_bands_short[15] =
  259|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_48_120;
  260|  14.2k|  ptr_aac_tables->scale_factor_bands_short[16] =
  261|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_48_120;
  262|  14.2k|  ptr_aac_tables->scale_factor_bands_short[17] =
  263|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_48_120;
  264|  14.2k|  ptr_aac_tables->scale_factor_bands_short[18] =
  265|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_24_120;
  266|  14.2k|  ptr_aac_tables->scale_factor_bands_short[19] =
  267|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_24_120;
  268|  14.2k|  ptr_aac_tables->scale_factor_bands_short[20] =
  269|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_16_120;
  270|  14.2k|  ptr_aac_tables->scale_factor_bands_short[21] =
  271|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_16_120;
  272|  14.2k|  ptr_aac_tables->scale_factor_bands_short[22] =
  273|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_16_120;
  274|  14.2k|  ptr_aac_tables->scale_factor_bands_short[23] =
  275|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_8_120;
  276|       |
  277|  14.2k|  ptr_aac_tables->scale_factor_bands_long[0] =
  278|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_96_1024;
  279|  14.2k|  ptr_aac_tables->scale_factor_bands_long[1] =
  280|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_96_1024;
  281|  14.2k|  ptr_aac_tables->scale_factor_bands_long[2] =
  282|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_64_1024;
  283|  14.2k|  ptr_aac_tables->scale_factor_bands_long[3] =
  284|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_48_1024;
  285|  14.2k|  ptr_aac_tables->scale_factor_bands_long[4] =
  286|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_48_1024;
  287|  14.2k|  ptr_aac_tables->scale_factor_bands_long[5] =
  288|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_32_1024;
  289|  14.2k|  ptr_aac_tables->scale_factor_bands_long[6] =
  290|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_24_1024;
  291|  14.2k|  ptr_aac_tables->scale_factor_bands_long[7] =
  292|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_24_1024;
  293|  14.2k|  ptr_aac_tables->scale_factor_bands_long[8] =
  294|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_16_1024;
  295|  14.2k|  ptr_aac_tables->scale_factor_bands_long[9] =
  296|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_16_1024;
  297|  14.2k|  ptr_aac_tables->scale_factor_bands_long[10] =
  298|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_16_1024;
  299|  14.2k|  ptr_aac_tables->scale_factor_bands_long[11] =
  300|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_8_1024;
  301|       |
  302|  14.2k|  ptr_aac_tables->scale_factor_bands_long[12] =
  303|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_96_960;
  304|  14.2k|  ptr_aac_tables->scale_factor_bands_long[13] =
  305|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_96_960;
  306|  14.2k|  ptr_aac_tables->scale_factor_bands_long[14] =
  307|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_64_960;
  308|  14.2k|  ptr_aac_tables->scale_factor_bands_long[15] =
  309|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_48_960;
  310|  14.2k|  ptr_aac_tables->scale_factor_bands_long[16] =
  311|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_48_960;
  312|  14.2k|  ptr_aac_tables->scale_factor_bands_long[17] =
  313|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_48_960;
  314|  14.2k|  ptr_aac_tables->scale_factor_bands_long[18] =
  315|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_24_960;
  316|  14.2k|  ptr_aac_tables->scale_factor_bands_long[19] =
  317|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_24_960;
  318|  14.2k|  ptr_aac_tables->scale_factor_bands_long[20] =
  319|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_16_960;
  320|  14.2k|  ptr_aac_tables->scale_factor_bands_long[21] =
  321|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_16_960;
  322|  14.2k|  ptr_aac_tables->scale_factor_bands_long[22] =
  323|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_16_960;
  324|  14.2k|  ptr_aac_tables->scale_factor_bands_long[23] =
  325|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_8_960;
  326|       |
  327|  14.2k|  ptr_aac_tables->scale_fac_bands_512[0] =
  328|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_48_512;
  329|  14.2k|  ptr_aac_tables->scale_fac_bands_512[1] =
  330|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_48_512;
  331|  14.2k|  ptr_aac_tables->scale_fac_bands_512[2] =
  332|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_48_512;
  333|  14.2k|  ptr_aac_tables->scale_fac_bands_512[3] =
  334|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_48_512;
  335|  14.2k|  ptr_aac_tables->scale_fac_bands_512[4] =
  336|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_48_512;
  337|  14.2k|  ptr_aac_tables->scale_fac_bands_512[5] =
  338|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_32_512;
  339|  14.2k|  ptr_aac_tables->scale_fac_bands_512[6] =
  340|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_24_512;
  341|  14.2k|  ptr_aac_tables->scale_fac_bands_512[7] =
  342|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_24_512;
  343|  14.2k|  ptr_aac_tables->scale_fac_bands_512[8] =
  344|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_24_512;
  345|  14.2k|  ptr_aac_tables->scale_fac_bands_512[9] =
  346|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_24_512;
  347|  14.2k|  ptr_aac_tables->scale_fac_bands_512[10] =
  348|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_24_512;
  349|  14.2k|  ptr_aac_tables->scale_fac_bands_512[11] =
  350|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_24_512;
  351|  14.2k|  ptr_aac_tables->scale_fac_bands_512[12] =
  352|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_24_512;
  353|  14.2k|  ptr_aac_tables->scale_fac_bands_512[13] =
  354|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_24_512;
  355|  14.2k|  ptr_aac_tables->scale_fac_bands_512[14] =
  356|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_24_512;
  357|  14.2k|  ptr_aac_tables->scale_fac_bands_512[15] =
  358|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_24_512;
  359|       |
  360|  14.2k|  ptr_aac_tables->scale_fac_bands_480[0] =
  361|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_48_480;
  362|  14.2k|  ptr_aac_tables->scale_fac_bands_480[1] =
  363|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_48_480;
  364|  14.2k|  ptr_aac_tables->scale_fac_bands_480[2] =
  365|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_48_480;
  366|  14.2k|  ptr_aac_tables->scale_fac_bands_480[3] =
  367|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_48_480;
  368|  14.2k|  ptr_aac_tables->scale_fac_bands_480[4] =
  369|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_48_480;
  370|  14.2k|  ptr_aac_tables->scale_fac_bands_480[5] =
  371|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_32_480;
  372|  14.2k|  ptr_aac_tables->scale_fac_bands_480[6] =
  373|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_24_480;
  374|  14.2k|  ptr_aac_tables->scale_fac_bands_480[7] =
  375|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_24_480;
  376|  14.2k|  ptr_aac_tables->scale_fac_bands_480[8] =
  377|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_24_480;
  378|  14.2k|  ptr_aac_tables->scale_fac_bands_480[9] =
  379|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_24_480;
  380|  14.2k|  ptr_aac_tables->scale_fac_bands_480[10] =
  381|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_24_480;
  382|  14.2k|  ptr_aac_tables->scale_fac_bands_480[11] =
  383|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_24_480;
  384|  14.2k|  ptr_aac_tables->scale_fac_bands_480[12] =
  385|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_24_480;
  386|  14.2k|  ptr_aac_tables->scale_fac_bands_480[13] =
  387|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_24_480;
  388|  14.2k|  ptr_aac_tables->scale_fac_bands_480[14] =
  389|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_24_480;
  390|  14.2k|  ptr_aac_tables->scale_fac_bands_480[15] =
  391|  14.2k|      ptr_aac_tables->pstr_huffmann_tables->ixheaacd_sfb_24_480;
  392|  14.2k|}
ixheaacd_aac_decoder_init:
  397|   104k|    VOID *aac_persistent_mem_v, WORD32 frame_length) {
  398|   104k|  WORD i, ch;
  399|   104k|  struct ia_aac_persistent_struct *aac_persistent_mem;
  400|   104k|  aac_persistent_mem = (struct ia_aac_persistent_struct *)aac_persistent_mem_v;
  401|       |
  402|   104k|  aac_persistent_mem->str_aac_decoder.pstr_sbr_bitstream = ptr_sbr_bitstream;
  403|       |
  404|   312k|  for (ch = 0; ch < channels; ch++) {
  ------------------
  |  Branch (404:16): [True: 207k, False: 104k]
  ------------------
  405|   207k|    ia_aac_decoder_struct *aac_dec_handle =
  406|   207k|        &aac_persistent_mem->str_aac_decoder;
  407|   207k|    aac_dec_handle->pstr_aac_dec_overlap_info[ch] =
  408|   207k|        &aac_persistent_mem->str_aac_dec_overlap_info[ch];
  409|   207k|    aac_dec_handle->pstr_pns_rand_vec_data =
  410|   207k|        &aac_persistent_mem->str_pns_rand_vec_data;
  411|       |
  412|   207k|    aac_dec_handle->pstr_aac_dec_overlap_info[ch]->window_shape = 0;
  413|   207k|    aac_dec_handle->pstr_aac_dec_overlap_info[ch]->window_sequence = 0;
  414|   207k|    if (p_state_enhaacplus_dec->audio_object_type == AOT_ER_AAC_ELD)
  ------------------
  |  Branch (414:9): [True: 43.1k, False: 164k]
  ------------------
  415|  43.1k|      aac_dec_handle->pstr_aac_dec_overlap_info[ch]->ptr_overlap_buf =
  416|  43.1k|          &aac_persistent_mem->overlap_buffer[ch * 4 * OVERLAP_BUFFER_SIZE];
  ------------------
  |  |   28|  43.1k|#define OVERLAP_BUFFER_SIZE 512
  ------------------
  417|   164k|    else
  418|   164k|      aac_dec_handle->pstr_aac_dec_overlap_info[ch]->ptr_overlap_buf =
  419|   164k|          &aac_persistent_mem->overlap_buffer[ch * OVERLAP_BUFFER_SIZE];
  ------------------
  |  |   28|   164k|#define OVERLAP_BUFFER_SIZE 512
  ------------------
  420|       |
  421|   207k|    {
  422|   207k|      WORD32 *ptr_overlap_buf =
  423|   207k|          aac_dec_handle->pstr_aac_dec_overlap_info[ch]->ptr_overlap_buf;
  424|   207k|      memset(ptr_overlap_buf, 0,
  425|   207k|             IXHEAAC_GET_SIZE_ALIGNED(sizeof(ptr_overlap_buf[0]) * 4 * 512, BYTE_ALIGN_8));
  ------------------
  |  |   87|   207k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  426|   207k|    }
  427|   207k|    aac_persistent_mem->str_aac_decoder.ptr_aac_dec_static_channel_info[ch] =
  428|   207k|        aac_persistent_mem->ptr_aac_dec_static_channel_info[ch];
  429|   207k|    aac_persistent_mem->str_aac_decoder.ptr_aac_dec_static_channel_info[ch]
  430|   207k|        ->ltp_buf = aac_persistent_mem->ltp_buf[ch];
  431|   207k|  }
  432|       |
  433|   209k|  for (i = 0; i < 1; i++) {
  ------------------
  |  Branch (433:15): [True: 104k, False: 104k]
  ------------------
  434|   104k|    ia_aac_dec_sbr_bitstream_struct *ptr_sbr_bitstream =
  435|   104k|        &aac_persistent_mem->str_aac_decoder.pstr_sbr_bitstream[i];
  436|       |
  437|   104k|    ptr_sbr_bitstream->no_elements = 0;
  438|   104k|    ptr_sbr_bitstream->str_sbr_ele[0].ptr_sbr_data =
  439|   104k|        &aac_persistent_mem->sbr_payload_buffer[ALIGN_SIZE64(MAXSBRBYTES) * i];
  ------------------
  |  |   92|   104k|#define ALIGN_SIZE64(x) ((((x) + 7) >> 3) << 3)
  ------------------
  440|   104k|    ptr_sbr_bitstream->str_sbr_ele[0].ptr_prev_sbr_data =
  441|   104k|        &aac_persistent_mem->prev_sbr_payload_buffer[ALIGN_SIZE64(MAXSBRBYTES) * i];
  ------------------
  |  |   92|   104k|#define ALIGN_SIZE64(x) ((((x) + 7) >> 3) << 3)
  ------------------
  442|   104k|    ptr_sbr_bitstream->str_sbr_ele[0].sbr_ele_id = ID_SCE;
  443|   104k|    ptr_sbr_bitstream->str_sbr_ele[0].size_payload = 0;
  444|   104k|    ptr_sbr_bitstream->str_sbr_ele[0].prev_size_payload = 0;
  445|   104k|    ptr_sbr_bitstream->str_sbr_ele[0].prev_sbr_ele_id = ID_SCE;
  446|   104k|    ptr_sbr_bitstream->str_sbr_ele[0].size_payload_old = 0;
  447|   104k|  }
  448|       |
  449|   104k|  {
  450|   104k|    ia_aac_dec_tables_struct *ptr_aac_tables =
  451|   104k|        aac_persistent_mem->str_aac_decoder.pstr_aac_tables;
  452|   104k|    ia_aac_dec_huffman_tables_struct *pstr_huffmann_tables =
  453|   104k|        ptr_aac_tables->pstr_huffmann_tables;
  454|       |
  455|   104k|    WORD num_entries = sizeof(pstr_huffmann_tables->str_sample_rate_info) /
  456|   104k|                       sizeof(ia_sampling_rate_info_struct);
  457|       |
  458|   104k|    WORD32 sampling_rate = p_state_enhaacplus_dec->sampling_rate;
  459|   104k|    WORD sfidx;
  460|       |
  461|   104k|    i = 0;
  462|   773k|    while ((i < num_entries) &&
  ------------------
  |  Branch (462:12): [True: 773k, False: 0]
  ------------------
  463|   773k|           sampling_rate != ((pstr_huffmann_tables->str_sample_rate_info[i]
  ------------------
  |  Branch (463:12): [True: 668k, False: 104k]
  ------------------
  464|   773k|                                  .sampling_frequency))) {
  465|   668k|      i++;
  466|   668k|    }
  467|   104k|    if (i == 12) {
  ------------------
  |  Branch (467:9): [True: 478, False: 104k]
  ------------------
  468|    478|      i = i - 1;
  469|    478|    }
  470|       |
  471|   104k|    if (i == num_entries) {
  ------------------
  |  Branch (471:9): [True: 0, False: 104k]
  ------------------
  472|      0|      return NULL;
  473|      0|    }
  474|   104k|    sfidx = i;
  475|       |
  476|   104k|    if (frame_length == 1024 || frame_length == 960) {
  ------------------
  |  Branch (476:9): [True: 61.0k, False: 43.4k]
  |  Branch (476:33): [True: 10.4k, False: 33.0k]
  ------------------
  477|  71.5k|      WORD16 *psfb_table_idx[2];
  478|  71.5k|      const WORD8 *psfb_width[2];
  479|  71.5k|      WORD width_idx;
  480|  71.5k|      WORD32 j;
  481|       |
  482|  71.5k|      if (frame_length == 960)
  ------------------
  |  Branch (482:11): [True: 10.4k, False: 61.0k]
  ------------------
  483|  10.4k|        sfidx += 12;
  484|       |
  485|  71.5k|      psfb_table_idx[0] = ptr_aac_tables->sfb_long_table;
  486|  71.5k|      psfb_table_idx[1] = ptr_aac_tables->sfb_short_table;
  487|       |
  488|  71.5k|      psfb_width[0] = ptr_aac_tables->scale_factor_bands_long[sfidx];
  489|  71.5k|      psfb_width[1] = ptr_aac_tables->scale_factor_bands_short[sfidx];
  490|       |
  491|   214k|      for (j = 1; j >= 0; j--) {
  ------------------
  |  Branch (491:19): [True: 143k, False: 71.5k]
  ------------------
  492|   143k|        const WORD8 *ptr_width = psfb_width[j];
  493|   143k|        WORD16 *ptable_idx = psfb_table_idx[j];
  494|   143k|        width_idx = 0;
  495|   143k|        *ptable_idx++ = width_idx;
  496|  4.26M|        do {
  497|  4.26M|          width_idx += (*ptr_width++);
  498|  4.26M|          *ptable_idx++ = width_idx;
  499|  4.26M|        } while (*ptr_width != -1);
  ------------------
  |  Branch (499:18): [True: 4.12M, False: 143k]
  ------------------
  500|       |
  501|   143k|        aac_persistent_mem->str_aac_decoder.num_swb_window[j] =
  502|   143k|            (WORD8)(ptr_width - psfb_width[j]);
  503|   143k|      }
  504|       |
  505|  71.5k|      {
  506|  71.5k|        ptr_aac_tables->str_aac_sfb_info[0].sfb_index =
  507|  71.5k|            ptr_aac_tables->sfb_long_table;
  508|  71.5k|        ptr_aac_tables->str_aac_sfb_info[1].sfb_index =
  509|  71.5k|            ptr_aac_tables->sfb_long_table;
  510|  71.5k|        ptr_aac_tables->str_aac_sfb_info[3].sfb_index =
  511|  71.5k|            ptr_aac_tables->sfb_long_table;
  512|       |
  513|  71.5k|        ptr_aac_tables->str_aac_sfb_info[2].sfb_index =
  514|  71.5k|            ptr_aac_tables->sfb_short_table;
  515|       |
  516|  71.5k|        ptr_aac_tables->str_aac_sfb_info[0].sfb_width = (WORD8 *)psfb_width[0];
  517|  71.5k|        ptr_aac_tables->str_aac_sfb_info[1].sfb_width = (WORD8 *)psfb_width[0];
  518|  71.5k|        ptr_aac_tables->str_aac_sfb_info[3].sfb_width = (WORD8 *)psfb_width[0];
  519|       |
  520|  71.5k|        ptr_aac_tables->str_aac_sfb_info[2].sfb_width = (WORD8 *)psfb_width[1];
  521|  71.5k|      }
  522|  71.5k|    } else {
  523|  33.0k|      WORD16 *ptr_sfb_idx[2];
  524|  33.0k|      const WORD8 *ptr_sfb_width[2] = {0};
  525|  33.0k|      WORD width_idx;
  526|  33.0k|      WORD32 j;
  527|       |
  528|  33.0k|      ptr_sfb_idx[0] = ptr_aac_tables->sfb_long_table;
  529|  33.0k|      ptr_sfb_idx[1] = ptr_aac_tables->sfb_short_table;
  530|       |
  531|  33.0k|      if (frame_length == 512)
  ------------------
  |  Branch (531:11): [True: 20.4k, False: 12.5k]
  ------------------
  532|  20.4k|        ptr_sfb_width[0] = ptr_aac_tables->scale_fac_bands_512[i];
  533|  12.5k|      else
  534|  12.5k|        ptr_sfb_width[0] = ptr_aac_tables->scale_fac_bands_480[i];
  535|       |
  536|  66.0k|      for (j = 0; j >= 0; j--) {
  ------------------
  |  Branch (536:19): [True: 33.0k, False: 33.0k]
  ------------------
  537|  33.0k|        const WORD8 *ptr_width = ptr_sfb_width[j];
  538|  33.0k|        WORD16 *ptr_idx = ptr_sfb_idx[j];
  539|  33.0k|        width_idx = 0;
  540|  33.0k|        *ptr_idx++ = width_idx;
  541|  1.08M|        do {
  542|  1.08M|          width_idx += (*ptr_width++);
  543|  1.08M|          *ptr_idx++ = width_idx;
  544|  1.08M|        } while (*ptr_width != -1);
  ------------------
  |  Branch (544:18): [True: 1.05M, False: 33.0k]
  ------------------
  545|       |
  546|  33.0k|        aac_persistent_mem->str_aac_decoder.num_swb_window[j] =
  547|  33.0k|            (WORD8)(ptr_width - ptr_sfb_width[j]);
  548|  33.0k|      }
  549|       |
  550|  33.0k|      {
  551|  33.0k|        ptr_aac_tables->str_aac_sfb_info[0].sfb_index =
  552|  33.0k|            ptr_aac_tables->sfb_long_table;
  553|  33.0k|        ptr_aac_tables->str_aac_sfb_info[1].sfb_index =
  554|  33.0k|            ptr_aac_tables->sfb_long_table;
  555|  33.0k|        ptr_aac_tables->str_aac_sfb_info[3].sfb_index =
  556|  33.0k|            ptr_aac_tables->sfb_long_table;
  557|  33.0k|        ptr_aac_tables->str_aac_sfb_info[2].sfb_index =
  558|  33.0k|            ptr_aac_tables->sfb_short_table;
  559|       |
  560|  33.0k|        ptr_aac_tables->str_aac_sfb_info[0].sfb_width =
  561|  33.0k|            (WORD8 *)ptr_sfb_width[0];
  562|  33.0k|        ptr_aac_tables->str_aac_sfb_info[1].sfb_width =
  563|  33.0k|            (WORD8 *)ptr_sfb_width[0];
  564|  33.0k|        ptr_aac_tables->str_aac_sfb_info[3].sfb_width =
  565|  33.0k|            (WORD8 *)ptr_sfb_width[0];
  566|  33.0k|        ptr_aac_tables->str_aac_sfb_info[2].sfb_width =
  567|  33.0k|            (WORD8 *)ptr_sfb_width[1];
  568|  33.0k|      }
  569|  33.0k|    }
  570|   104k|    {
  571|   104k|      ia_aac_decoder_struct *aac_dec_handle =
  572|   104k|          &aac_persistent_mem->str_aac_decoder;
  573|   104k|      aac_dec_handle->sampling_rate_index = (WORD16)i;
  574|   104k|      aac_dec_handle->sampling_rate = sampling_rate;
  575|   104k|      aac_dec_handle->channels = 1;
  576|   104k|      aac_dec_handle->block_number = 0;
  577|   104k|      aac_dec_handle->samples_per_frame = frame_length;
  578|   104k|    }
  579|   104k|  }
  580|       |
  581|      0|  return &(aac_persistent_mem->str_aac_decoder);
  582|   104k|}

ixheaacd_latm_au_chunk_length_info:
   90|   197k|    struct ia_bit_buf_struct *it_bit_buff) {
   91|   197k|  UWORD8 reading_done;
   92|   197k|  WORD32 len = 0;
   93|       |
   94|   207k|  do {
   95|   207k|    UWORD32 tmp = ixheaacd_read_bits_buf(it_bit_buff, 8);
   96|   207k|    reading_done = (tmp < 255);
   97|       |
   98|   207k|    len += tmp;
   99|       |
  100|   207k|  } while (reading_done == 0);
  ------------------
  |  Branch (100:12): [True: 9.66k, False: 197k]
  ------------------
  101|       |
  102|   197k|  len <<= 3;
  103|       |
  104|   197k|  return len;
  105|   197k|}
ixheaacd_latm_payload_length_info:
  108|   196k|                                         ixheaacd_latm_struct *latm_element) {
  109|   196k|  WORD32 error_code = AAC_DEC_OK;
  ------------------
  |  |   23|   196k|#define AAC_DEC_OK IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR
  |  |  ------------------
  |  |  |  |   27|   196k|#define IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR 0x00000000
  |  |  ------------------
  ------------------
  110|   196k|  UWORD32 prog, lay;
  111|       |
  112|   196k|  if (latm_element->all_streams_same_time_framing == 1) {
  ------------------
  |  Branch (112:7): [True: 196k, False: 7]
  ------------------
  113|   392k|    for (prog = 0; prog < latm_element->num_program; prog++) {
  ------------------
  |  Branch (113:20): [True: 196k, False: 196k]
  ------------------
  114|   394k|      for (lay = 0; lay < latm_element->num_layer; lay++) {
  ------------------
  |  Branch (114:21): [True: 197k, False: 196k]
  ------------------
  115|   197k|        ixheaacd_latm_layer_info *layer_info =
  116|   197k|            &latm_element->layer_info[prog][lay];
  117|       |
  118|   197k|        switch (layer_info->frame_len_type) {
  119|   197k|          case 0:
  ------------------
  |  Branch (119:11): [True: 197k, False: 0]
  ------------------
  120|   197k|            layer_info->frame_len_bits =
  121|   197k|                ixheaacd_latm_au_chunk_length_info(it_bit_buff);
  122|   197k|            if (layer_info->frame_len_bits % 8 != 0) {
  ------------------
  |  Branch (122:17): [True: 0, False: 197k]
  ------------------
  123|      0|              error_code = IA_XHEAAC_DEC_EXE_FATAL_INVALID_LOAS_HEADER;
  ------------------
  |  |  121|      0|#define IA_XHEAAC_DEC_EXE_FATAL_INVALID_LOAS_HEADER 0xFFFF9802
  ------------------
  124|      0|              return error_code;
  125|      0|            }
  126|       |
  127|   197k|            latm_element->frame_length = layer_info->frame_len_bits >> 3;
  128|   197k|            latm_element->frame_length +=
  129|   197k|                (it_bit_buff->size - it_bit_buff->cnt_bits) >> 3;
  130|   197k|            break;
  131|       |
  132|      0|          default:
  ------------------
  |  Branch (132:11): [True: 0, False: 197k]
  ------------------
  133|      0|            error_code = IA_XHEAAC_DEC_EXE_FATAL_INVALID_LOAS_HEADER;
  ------------------
  |  |  121|      0|#define IA_XHEAAC_DEC_EXE_FATAL_INVALID_LOAS_HEADER 0xFFFF9802
  ------------------
  134|      0|            return error_code;
  135|   197k|        }
  136|   197k|      }
  137|   196k|    }
  138|   196k|  } else {
  139|      7|    error_code = IA_XHEAAC_DEC_EXE_FATAL_INVALID_LOAS_HEADER;
  ------------------
  |  |  121|      7|#define IA_XHEAAC_DEC_EXE_FATAL_INVALID_LOAS_HEADER 0xFFFF9802
  ------------------
  140|      7|    return error_code;
  141|      7|  }
  142|       |
  143|   196k|  return (error_code);
  144|   196k|}
ixheaacd_latm_stream_mux_config:
  161|   145k|    ia_sampling_rate_info_struct *sample_rate_info) {
  162|   145k|  UWORD32 prog;
  163|   145k|  UWORD32 lay;
  164|   145k|  WORD32 bytes_consumed;
  165|   145k|  WORD32 audio_mux_version_a;
  166|   145k|  IA_ERRORCODE error_code = AAC_DEC_OK;
  ------------------
  |  |   23|   145k|#define AAC_DEC_OK IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR
  |  |  ------------------
  |  |  |  |   27|   145k|#define IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR 0x00000000
  |  |  ------------------
  ------------------
  167|   145k|  ixheaacd_latm_layer_info *layer_info = 0;
  168|       |
  169|   145k|  latm_element->audio_mux_version = ixheaacd_read_bits_buf(it_bit_buff, 1);
  170|       |
  171|   145k|  if (latm_element->audio_mux_version == 1)
  ------------------
  |  Branch (171:7): [True: 148, False: 145k]
  ------------------
  172|    148|    audio_mux_version_a = ixheaacd_read_bits_buf(it_bit_buff, 1);
  173|   145k|  else
  174|   145k|    audio_mux_version_a = 0;
  175|       |
  176|   145k|  if (audio_mux_version_a == 0) {
  ------------------
  |  Branch (176:7): [True: 145k, False: 10]
  ------------------
  177|   145k|    if (latm_element->audio_mux_version == 1) {
  ------------------
  |  Branch (177:9): [True: 138, False: 145k]
  ------------------
  178|    138|      ixheaacd_latm_get_value(it_bit_buff);/*tara_buf_fullness*/
  179|    138|    }
  180|   145k|    latm_element->all_streams_same_time_framing =
  181|   145k|        ixheaacd_read_bits_buf(it_bit_buff, 1);
  182|       |
  183|   145k|    latm_element->num_sub_frames = ixheaacd_read_bits_buf(it_bit_buff, 6) + 1;
  184|       |
  185|   145k|    if (latm_element->num_sub_frames != 1)
  ------------------
  |  Branch (185:9): [True: 120, False: 145k]
  ------------------
  186|    120|      return IA_XHEAAC_DEC_EXE_FATAL_INVALID_LOAS_HEADER;
  ------------------
  |  |  121|    120|#define IA_XHEAAC_DEC_EXE_FATAL_INVALID_LOAS_HEADER 0xFFFF9802
  ------------------
  187|       |
  188|   145k|    latm_element->num_program = ixheaacd_read_bits_buf(it_bit_buff, 4) + 1;
  189|       |
  190|   145k|    if (latm_element->num_program > LATM_MAX_PROG) return IA_FATAL_ERROR;
  ------------------
  |  |   23|   145k|#define LATM_MAX_PROG 8
  ------------------
                  if (latm_element->num_program > LATM_MAX_PROG) return IA_FATAL_ERROR;
  ------------------
  |  |   25|      3|#define IA_FATAL_ERROR 0x80000000
  ------------------
  |  Branch (190:9): [True: 3, False: 145k]
  ------------------
  191|       |
  192|   280k|    for (prog = 0; prog < latm_element->num_program; prog++) {
  ------------------
  |  Branch (192:20): [True: 145k, False: 135k]
  ------------------
  193|   145k|      latm_element->num_layer = ixheaacd_read_bits_buf(it_bit_buff, 3) + 1;
  194|       |
  195|   282k|      for (lay = 0; lay < latm_element->num_layer; lay++) {
  ------------------
  |  Branch (195:21): [True: 147k, False: 135k]
  ------------------
  196|   147k|        layer_info = &latm_element->layer_info[prog][lay];
  197|   147k|        layer_info->frame_len_bits = 0;
  198|       |
  199|   147k|        if ((prog == 0) && (lay == 0)) {
  ------------------
  |  Branch (199:13): [True: 146k, False: 140]
  |  Branch (199:28): [True: 145k, False: 1.62k]
  ------------------
  200|   145k|          WORD32 asc_len, pos;
  201|       |
  202|   145k|          latm_element->use_same_config = 0;
  203|       |
  204|   145k|          asc_len = (latm_element->audio_mux_version == 1)
  ------------------
  |  Branch (204:21): [True: 119, False: 145k]
  ------------------
  205|   145k|                        ? ixheaacd_latm_get_value(it_bit_buff)
  206|   145k|                        : 0;
  207|   145k|          pos = it_bit_buff->size - it_bit_buff->cnt_bits;
  208|       |
  209|   145k|          if (asc_len > it_bit_buff->size - 106 || asc_len > 2592 ||
  ------------------
  |  Branch (209:15): [True: 4, False: 145k]
  |  Branch (209:52): [True: 1, False: 145k]
  ------------------
  210|   145k|              asc_len < 0) {
  ------------------
  |  Branch (210:15): [True: 0, False: 145k]
  ------------------
  211|      5|            return IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL;
  ------------------
  |  |   83|      5|#define IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL 0xFFFF9000
  ------------------
  212|      5|          }
  213|       |
  214|   145k|          if ((error_code = ixheaacd_ga_hdr_dec(
  ------------------
  |  Branch (214:15): [True: 9.28k, False: 136k]
  ------------------
  215|   145k|                   aac_state_struct, it_bit_buff->cnt_bits, &bytes_consumed,
  216|   145k|                   sample_rate_info, it_bit_buff)))
  217|  9.28k|            return (error_code);
  218|       |
  219|   136k|          if (asc_len) {
  ------------------
  |  Branch (219:15): [True: 98, False: 135k]
  ------------------
  220|     98|            asc_len -= (it_bit_buff->size - it_bit_buff->cnt_bits) - pos;
  221|     98|            ixheaacd_read_bidirection(it_bit_buff, asc_len);
  222|     98|          }
  223|       |
  224|   136k|          layer_info->asc.aot = aac_state_struct->audio_object_type;
  225|   136k|          layer_info->asc.channel_config = aac_state_struct->ch_config;
  226|   136k|          layer_info->asc.samples_per_frame = aac_state_struct->frame_len_flag;
  227|   136k|          layer_info->asc.sampling_freq = aac_state_struct->sampling_rate;
  228|   136k|          layer_info->asc.samples_per_frame = aac_state_struct->frame_length;
  229|   136k|        } else {
  230|  1.76k|          latm_element->use_same_config =
  231|  1.76k|              ixheaacd_read_bits_buf(it_bit_buff, 1);
  232|       |
  233|  1.76k|          if (latm_element->use_same_config && (lay > 0)) {
  ------------------
  |  Branch (233:15): [True: 1.60k, False: 167]
  |  Branch (233:48): [True: 1.47k, False: 131]
  ------------------
  234|  1.47k|            layer_info->asc = latm_element->layer_info[prog][lay - 1].asc;
  235|  1.47k|          } else {
  236|    298|            if ((error_code = ixheaacd_ga_hdr_dec(
  ------------------
  |  Branch (236:17): [True: 285, False: 13]
  ------------------
  237|    298|                     aac_state_struct, it_bit_buff->cnt_bits, &bytes_consumed,
  238|    298|                     sample_rate_info, it_bit_buff)))
  239|    285|              return (error_code);
  240|    298|          }
  241|  1.76k|        }
  242|       |
  243|   137k|        layer_info->frame_len_type = ixheaacd_read_bits_buf(it_bit_buff, 3);
  244|       |
  245|   137k|        switch (layer_info->frame_len_type) {
  246|   137k|          case 0:
  ------------------
  |  Branch (246:11): [True: 137k, False: 244]
  ------------------
  247|   137k|            layer_info->buffer_fullness =
  248|   137k|                ixheaacd_read_bits_buf(it_bit_buff, 8);
  249|       |
  250|   137k|            if (!latm_element->all_streams_same_time_framing) {
  ------------------
  |  Branch (250:17): [True: 166, False: 137k]
  ------------------
  251|    166|              if ((lay > 0) && layer_info->asc.aot == AOT_AAC_SCAL) {
  ------------------
  |  Branch (251:19): [True: 3, False: 163]
  |  Branch (251:32): [True: 0, False: 3]
  ------------------
  252|      0|              }
  253|    166|            }
  254|   137k|            break;
  255|       |
  256|     21|          case 1:
  ------------------
  |  Branch (256:11): [True: 21, False: 137k]
  ------------------
  257|     21|            latm_element->frame_length = ixheaacd_read_bits_buf(it_bit_buff, 9);
  258|     69|          default:
  ------------------
  |  Branch (258:11): [True: 48, False: 137k]
  ------------------
  259|     69|            return IA_XHEAAC_DEC_EXE_FATAL_INVALID_LOAS_HEADER;
  ------------------
  |  |  121|     69|#define IA_XHEAAC_DEC_EXE_FATAL_INVALID_LOAS_HEADER 0xFFFF9802
  ------------------
  260|   137k|        }
  261|   137k|      }
  262|   145k|    }
  263|       |
  264|   135k|    latm_element->other_data_present = ixheaacd_read_bits_buf(it_bit_buff, 1);
  265|       |
  266|   135k|    if (latm_element->other_data_present) {
  ------------------
  |  Branch (266:9): [True: 6.31k, False: 129k]
  ------------------
  267|  6.31k|      if (latm_element->audio_mux_version == 1) {
  ------------------
  |  Branch (267:11): [True: 37, False: 6.28k]
  ------------------
  268|     37|        latm_element->other_data_length = ixheaacd_latm_get_value(it_bit_buff);
  269|  6.28k|      } else {
  270|  6.28k|        UWORD32 other_data_len;
  271|  6.28k|        latm_element->other_data_length = 0;
  272|  6.48k|        do {
  273|  6.48k|          other_data_len = ixheaacd_read_bits_buf(it_bit_buff, 1);
  274|  6.48k|          latm_element->other_data_length <<= 8;
  275|  6.48k|          latm_element->other_data_length +=
  276|  6.48k|              ixheaacd_read_bits_buf(it_bit_buff, 8);
  277|  6.48k|          if (latm_element->other_data_length > (UWORD32)it_bit_buff->cnt_bits)
  ------------------
  |  Branch (277:15): [True: 20, False: 6.46k]
  ------------------
  278|     20|            return IA_FATAL_ERROR;
  ------------------
  |  |   25|     20|#define IA_FATAL_ERROR 0x80000000
  ------------------
  279|  6.48k|        } while (other_data_len);
  ------------------
  |  Branch (279:18): [True: 205, False: 6.26k]
  ------------------
  280|  6.28k|      }
  281|  6.31k|    }
  282|       |
  283|   135k|    latm_element->crc_check_present = ixheaacd_read_bits_buf(it_bit_buff, 1);
  284|       |
  285|   135k|    if (latm_element->crc_check_present) {
  ------------------
  |  Branch (285:9): [True: 44.8k, False: 90.5k]
  ------------------
  286|  44.8k|      latm_element->crc_check_sum = ixheaacd_read_bits_buf(it_bit_buff, 8);
  287|  44.8k|    }
  288|   135k|  } else {
  289|     10|    error_code = IA_XHEAAC_DEC_EXE_FATAL_INVALID_LOAS_HEADER;
  ------------------
  |  |  121|     10|#define IA_XHEAAC_DEC_EXE_FATAL_INVALID_LOAS_HEADER 0xFFFF9802
  ------------------
  290|     10|  }
  291|   135k|  return (error_code);
  292|   145k|}
ixheaacd_latm_audio_mux_element:
  297|   206k|    ia_sampling_rate_info_struct *sample_rate_info) {
  298|   206k|  UWORD32 i;
  299|   206k|  IA_ERRORCODE error_code = AAC_DEC_OK;
  ------------------
  |  |   23|   206k|#define AAC_DEC_OK IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR
  |  |  ------------------
  |  |  |  |   27|   206k|#define IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR 0x00000000
  |  |  ------------------
  ------------------
  300|       |
  301|   206k|  ixheaacd_read_bits_buf(it_bit_buff, 13);
  302|       |
  303|   206k|  latm_element->use_same_stream_mux = ixheaacd_read_bits_buf(it_bit_buff, 1);
  304|       |
  305|   206k|  if (!latm_element->use_same_stream_mux) {
  ------------------
  |  Branch (305:7): [True: 145k, False: 60.9k]
  ------------------
  306|   145k|    if ((error_code = ixheaacd_latm_stream_mux_config(
  ------------------
  |  Branch (306:9): [True: 9.79k, False: 135k]
  ------------------
  307|   145k|             it_bit_buff, latm_element, aac_state_struct, sample_rate_info))) {
  308|  9.79k|      return (error_code);
  309|  9.79k|    }
  310|   145k|  }
  311|       |
  312|   393k|  for (i = 0; i < latm_element->num_sub_frames; i++) {
  ------------------
  |  Branch (312:15): [True: 196k, False: 196k]
  ------------------
  313|   196k|    if ((error_code =
  ------------------
  |  Branch (313:9): [True: 7, False: 196k]
  ------------------
  314|   196k|             ixheaacd_latm_payload_length_info(it_bit_buff, latm_element))) {
  315|      7|      if (error_code != 0) return (error_code);
  ------------------
  |  Branch (315:11): [True: 7, False: 0]
  ------------------
  316|      7|    }
  317|   196k|  }
  318|       |
  319|   196k|  return (error_code);
  320|   196k|}
ixheaacd_latmdemux.c:ixheaacd_latm_get_value:
  146|    294|static UWORD32 ixheaacd_latm_get_value(ia_bit_buf_struct *it_bit_buff) {
  147|    294|  UWORD32 bytes_read;
  148|       |
  149|    294|  bytes_read = ixheaacd_read_bits_buf(it_bit_buff, 2) + 1;
  150|       |
  151|    294|  if (bytes_read <= 3)
  ------------------
  |  Branch (151:7): [True: 244, False: 50]
  ------------------
  152|    244|    return ixheaacd_read_bits_buf(it_bit_buff, 8 * bytes_read);
  153|     50|  else
  154|     50|    return ixheaac_add32_sat(ixheaac_shl32_sat(ixheaacd_read_bits_buf(it_bit_buff, 24), 8),
  155|     50|                              ixheaacd_read_bits_buf(it_bit_buff, 8));
  156|    294|}

ixheaacd_ld_spatial_specific_config:
  207|  1.21k|    ia_usac_dec_mps_config_struct *config, ia_bit_buf_struct *it_bit_buff) {
  208|  1.21k|  WORD32 i, num_header_bits;
  209|  1.21k|  UWORD32 hc, hb;
  210|  1.21k|  WORD32 sac_header_len;
  211|  1.21k|  WORD32 bits_available;
  212|  1.21k|  WORD32 tmp = it_bit_buff->cnt_bits;
  213|  1.21k|  WORD32 err = 0;
  214|       |
  215|  1.21k|  sac_header_len = tmp;
  216|       |
  217|  1.21k|  bits_available = sac_header_len;
  218|  1.21k|  config->bs_sampling_freq_index = ixheaacd_read_bits_buf(it_bit_buff, 4);
  219|  1.21k|  if (config->bs_sampling_freq_index == 15) {
  ------------------
  |  Branch (219:7): [True: 6, False: 1.21k]
  ------------------
  220|      6|    config->bs_fampling_frequency = ixheaacd_read_bits_buf(it_bit_buff, 24);
  221|      6|  }
  222|       |
  223|  1.21k|  config->bs_frame_length = ixheaacd_read_bits_buf(it_bit_buff, 5);
  224|  1.21k|  config->bs_freq_res = ixheaacd_read_bits_buf(it_bit_buff, 3);
  225|  1.21k|  config->bs_tree_config = ixheaacd_read_bits_buf(it_bit_buff, 4);
  226|       |
  227|  1.21k|  if (config->bs_tree_config > 7) return IA_FATAL_ERROR;
  ------------------
  |  |   25|      1|#define IA_FATAL_ERROR 0x80000000
  ------------------
  |  Branch (227:7): [True: 1, False: 1.21k]
  ------------------
  228|       |
  229|  1.21k|  if (config->bs_tree_config != 15) {
  ------------------
  |  Branch (229:7): [True: 1.21k, False: 3]
  ------------------
  230|  1.21k|    config->num_ott_boxes =
  231|  1.21k|        ixheaacd_tree_property_table[config->bs_tree_config].num_ott_boxes;
  232|  1.21k|    config->num_ttt_boxes =
  233|  1.21k|        ixheaacd_tree_property_table[config->bs_tree_config].num_ttt_boxes;
  234|  1.21k|    config->num_input_channels =
  235|  1.21k|        ixheaacd_tree_property_table[config->bs_tree_config].num_input_chan;
  236|  1.21k|    config->num_output_channels =
  237|  1.21k|        ixheaacd_tree_property_table[config->bs_tree_config].num_output_chan;
  238|  7.27k|    for (i = 0; i < MAX_NUM_OTT; i++) {
  ------------------
  |  |   56|  7.27k|#define MAX_NUM_OTT (5)
  ------------------
  |  Branch (238:17): [True: 6.06k, False: 1.21k]
  ------------------
  239|  6.06k|      config->ott_mode_lfe[i] =
  240|  6.06k|          ixheaacd_tree_property_table[config->bs_tree_config].ott_mode_lfe[i];
  241|  6.06k|    }
  242|  1.21k|  }
  243|  1.21k|  config->bs_quant_mode = ixheaacd_read_bits_buf(it_bit_buff, 2);
  244|  1.21k|  if (config->bs_tree_config != 7) {
  ------------------
  |  Branch (244:7): [True: 1.03k, False: 178]
  ------------------
  245|  1.03k|    config->bs_one_icc = ixheaacd_read_bits_buf(it_bit_buff, 1);
  246|  1.03k|  }
  247|  1.21k|  config->bs_arbitrary_downmix = ixheaacd_read_bits_buf(it_bit_buff, 1);
  248|  1.21k|  if (config->bs_tree_config != 7) {
  ------------------
  |  Branch (248:7): [True: 1.03k, False: 178]
  ------------------
  249|  1.03k|    config->bs_fixed_gain_sur = ixheaacd_read_bits_buf(it_bit_buff, 3);
  250|  1.03k|    config->bs_fixed_gain_LFE = ixheaacd_read_bits_buf(it_bit_buff, 3);
  251|  1.03k|  }
  252|  1.21k|  config->bs_fixed_gain_dmx = ixheaacd_read_bits_buf(it_bit_buff, 3);
  253|  1.21k|  if (config->bs_tree_config != 7) {
  ------------------
  |  Branch (253:7): [True: 1.03k, False: 178]
  ------------------
  254|  1.03k|    config->bs_matrix_mode = ixheaacd_read_bits_buf(it_bit_buff, 1);
  255|  1.03k|  }
  256|  1.21k|  config->bs_temp_shape_config = ixheaacd_read_bits_buf(it_bit_buff, 2);
  257|  1.21k|  config->bs_decorr_config = ixheaacd_read_bits_buf(it_bit_buff, 2);
  258|  1.21k|  if (config->bs_tree_config != 7) {
  ------------------
  |  Branch (258:7): [True: 1.03k, False: 178]
  ------------------
  259|  1.03k|    config->bs_3D_audio_mode = ixheaacd_read_bits_buf(it_bit_buff, 1);
  260|  1.03k|  } else {
  261|    178|    config->bs_3D_audio_mode = 0;
  262|    178|  }
  263|       |
  264|       |  // ott_config
  265|  5.48k|  for (i = 0; i < config->num_ott_boxes; i++) {
  ------------------
  |  Branch (265:15): [True: 4.26k, False: 1.21k]
  ------------------
  266|  4.26k|    if (config->ott_mode_lfe[i]) {
  ------------------
  |  Branch (266:9): [True: 765, False: 3.50k]
  ------------------
  267|    765|      config->bs_ott_bands[i] = ixheaacd_read_bits_buf(it_bit_buff, 5);
  268|  3.50k|    } else {
  269|  3.50k|      config->bs_ott_bands[i] = ixheaacd_freq_res_table[config->bs_freq_res];
  270|  3.50k|    }
  271|  4.26k|  }
  272|       |
  273|       |  // ttt_config
  274|  1.37k|  for (i = 0; i < config->num_ttt_boxes; i++) {
  ------------------
  |  Branch (274:15): [True: 163, False: 1.21k]
  ------------------
  275|    163|    config->bs_ttt_dual_mode[i] = ixheaacd_read_bits_buf(it_bit_buff, 1);
  276|    163|    config->bs_ttt_mode_low[i] = ixheaacd_read_bits_buf(it_bit_buff, 3);
  277|    163|    if (config->bs_ttt_dual_mode[i]) {
  ------------------
  |  Branch (277:9): [True: 12, False: 151]
  ------------------
  278|     12|      config->bs_ttt_mode_high[i] = ixheaacd_read_bits_buf(it_bit_buff, 3);
  279|     12|      config->bs_ttt_bands_low[i] = ixheaacd_read_bits_buf(it_bit_buff, 5);
  280|     12|      config->bs_ttt_bands_high[i] = ixheaacd_freq_res_table[config->bs_freq_res];
  281|    151|    } else {
  282|    151|      config->bs_ttt_bands_low[i] = ixheaacd_freq_res_table[config->bs_freq_res];
  283|    151|    }
  284|    163|  }
  285|       |
  286|  1.21k|  if (config->bs_temp_shape_config == 2) {
  ------------------
  |  Branch (286:7): [True: 294, False: 921]
  ------------------
  287|    294|    config->bs_env_quant_mode = ixheaacd_read_bits_buf(it_bit_buff, 1);
  288|    294|  }
  289|       |
  290|  1.21k|  if (config->bs_3D_audio_mode) {
  ------------------
  |  Branch (290:7): [True: 193, False: 1.02k]
  ------------------
  291|    193|    config->bs_3D_audio_HRTF_set = ixheaacd_read_bits_buf(it_bit_buff, 2);
  292|       |    // param_HRTF_set
  293|    193|    if (config->bs_3D_audio_HRTF_set == 0) {
  ------------------
  |  Branch (293:9): [True: 61, False: 132]
  ------------------
  294|     61|      config->bs_HRTF_freq_res = ixheaacd_read_bits_buf(it_bit_buff, 3);
  295|     61|      config->bs_HRTF_num_chan = 5;
  296|     61|      config->bs_HRTF_asymmetric = ixheaacd_read_bits_buf(it_bit_buff, 1);
  297|       |
  298|     61|      config->HRTF_num_band = ixheaacd_hrtf_freq_res_table[0][config->bs_HRTF_freq_res];
  299|     61|      config->HRTF_num_phase = ixheaacd_hrtf_freq_res_table[1][config->bs_HRTF_freq_res];
  300|       |
  301|    277|      for (hc = 0; hc < config->bs_HRTF_num_chan; hc++) {
  ------------------
  |  Branch (301:20): [True: 216, False: 61]
  ------------------
  302|  1.69k|        for (hb = 0; hb < config->HRTF_num_band; hb++) {
  ------------------
  |  Branch (302:22): [True: 1.47k, False: 216]
  ------------------
  303|  1.47k|          config->bs_HRTF_level_left[hc][hb] =
  304|  1.47k|              ixheaacd_read_bits_buf(it_bit_buff, 6);
  305|  1.47k|        }
  306|  1.63k|        for (hb = 0; hb < config->HRTF_num_band; hb++) {
  ------------------
  |  Branch (306:22): [True: 1.41k, False: 216]
  ------------------
  307|  1.41k|          config->bs_HRTF_level_right[hc][hb] =
  308|  1.41k|              config->bs_HRTF_asymmetric
  ------------------
  |  Branch (308:15): [True: 148, False: 1.27k]
  ------------------
  309|  1.41k|                  ? ixheaacd_read_bits_buf(it_bit_buff, 6)
  310|  1.41k|                  : config->bs_HRTF_level_left[hc][hb];
  311|  1.41k|        }
  312|    216|        config->bs_HRTF_phase[hc] = ixheaacd_read_bits_buf(it_bit_buff, 1);
  313|  1.06k|        for (hb = 0; hb < config->HRTF_num_phase; hb++) {
  ------------------
  |  Branch (313:22): [True: 848, False: 216]
  ------------------
  314|    848|          config->bs_HRTF_phase_LR[hc][hb] =
  315|    848|              config->bs_HRTF_phase[hc] ? ixheaacd_read_bits_buf(it_bit_buff, 6)
  ------------------
  |  Branch (315:15): [True: 434, False: 414]
  ------------------
  316|    848|                                        : 0;
  317|    848|        }
  318|    216|        config->bs_HRTF_icc[hc] = ixheaacd_read_bits_buf(it_bit_buff, 1);
  319|    216|        if (config->bs_HRTF_icc[hc]) {
  ------------------
  |  Branch (319:13): [True: 71, False: 145]
  ------------------
  320|    590|          for (hb = 0; hb < config->HRTF_num_band; hb++)
  ------------------
  |  Branch (320:24): [True: 519, False: 71]
  ------------------
  321|    519|            config->bs_HRTF_icc_LR[hc][hb] =
  322|    519|                ixheaacd_read_bits_buf(it_bit_buff, 3);
  323|     71|        }
  324|    216|      }
  325|     61|    }
  326|    193|  }
  327|       |
  328|       |  // byte_align
  329|  1.21k|  i = (it_bit_buff->cnt_bits & 0x7);
  330|  1.21k|  ixheaacd_read_bits_buf(it_bit_buff, i);
  331|       |
  332|  1.21k|  num_header_bits = tmp - (it_bit_buff->cnt_bits);
  333|  1.21k|  bits_available -= num_header_bits;
  334|       |
  335|  1.21k|  err =
  336|  1.21k|      ixheaacd_ld_spatial_extension_config(it_bit_buff, config, bits_available);
  337|  1.21k|  return err;
  338|  1.21k|}
ixheaacd_ld_mps_config.c:ixheaacd_ld_spatial_extension_config:
   53|  1.17k|    WORD32 bits_available) {
   54|  1.17k|  WORD32 j, ch, idx, tmp, tmp_open, sac_ext_len, bits_read, n_fill_bits;
   55|  1.17k|  UWORD32 i;
   56|  1.17k|  WORD32 ba = bits_available;
   57|       |
   58|  1.17k|  config->sac_ext_cnt = 0;
   59|       |
   60|  1.17k|  tmp = it_bit_buff->cnt_bits;
   61|       |
   62|  1.17k|  WORD32 num_slots = config->bs_frame_length + 1;
   63|       |
   64|  8.26k|  while (ba >= 8) {
  ------------------
  |  Branch (64:10): [True: 7.11k, False: 1.14k]
  ------------------
   65|  7.11k|    if (config->sac_ext_cnt >= MAX_NUM_EXT_TYPES) return IA_FATAL_ERROR;
  ------------------
  |  |   61|  7.11k|#define MAX_NUM_EXT_TYPES (8)
  ------------------
                  if (config->sac_ext_cnt >= MAX_NUM_EXT_TYPES) return IA_FATAL_ERROR;
  ------------------
  |  |   25|      6|#define IA_FATAL_ERROR 0x80000000
  ------------------
  |  Branch (65:9): [True: 6, False: 7.11k]
  ------------------
   66|       |
   67|  7.11k|    config->bs_sac_ext_type[config->sac_ext_cnt] =
   68|  7.11k|        ixheaacd_read_bits_buf(it_bit_buff, 4);
   69|  7.11k|    ba -= 4;
   70|       |
   71|  7.11k|    sac_ext_len = ixheaacd_read_bits_buf(it_bit_buff, 4);
   72|  7.11k|    ba -= 4;
   73|       |
   74|  7.11k|    if ((ba >= 6) && (sac_ext_len > 0)) {
  ------------------
  |  Branch (74:9): [True: 7.07k, False: 39]
  |  Branch (74:22): [True: 4.16k, False: 2.90k]
  ------------------
   75|  4.16k|      if (sac_ext_len == 15) {
  ------------------
  |  Branch (75:11): [True: 2.27k, False: 1.88k]
  ------------------
   76|  2.27k|        sac_ext_len += ixheaacd_read_bits_buf(it_bit_buff, 8);
   77|  2.27k|        ba -= 8;
   78|  2.27k|        if (sac_ext_len == 15 + 255) {
  ------------------
  |  Branch (78:13): [True: 788, False: 1.49k]
  ------------------
   79|    788|          sac_ext_len += ixheaacd_read_bits_buf(it_bit_buff, 16);
   80|    788|          ba -= 16;
   81|    788|        }
   82|  2.27k|      }
   83|       |
   84|  4.16k|      switch (config->bs_sac_ext_type[config->sac_ext_cnt]) {
   85|     22|        case 0:
  ------------------
  |  Branch (85:9): [True: 22, False: 4.14k]
  ------------------
   86|     22|          config->bs_residual_coding = 1;
   87|       |
   88|     22|          config->bs_residual_sampling_freq_index =
   89|     22|              ixheaacd_read_bits_buf(it_bit_buff, 4);
   90|     22|          if (config->bs_residual_sampling_freq_index > MAX_RES_SAMP_FREQ_IDX) {
  ------------------
  |  |   71|     22|#define MAX_RES_SAMP_FREQ_IDX 11
  ------------------
  |  Branch (90:15): [True: 1, False: 21]
  ------------------
   91|      1|            return IA_FATAL_ERROR;
  ------------------
  |  |   25|      1|#define IA_FATAL_ERROR 0x80000000
  ------------------
   92|      1|          }
   93|     21|          config->bs_residual_frames_per_spatial_frame =
   94|     21|              ixheaacd_read_bits_buf(it_bit_buff, 2);
   95|       |
   96|     21|          if (!ixheaacd_validate_res_frames_per_spatial_frame(
  ------------------
  |  Branch (96:15): [True: 2, False: 19]
  ------------------
   97|     21|                  num_slots, config->bs_residual_frames_per_spatial_frame)) {
   98|      2|            return IA_FATAL_ERROR;
  ------------------
  |  |   25|      2|#define IA_FATAL_ERROR 0x80000000
  ------------------
   99|      2|          }
  100|       |
  101|     19|          if ((config->num_ott_boxes + config->num_ttt_boxes) >
  ------------------
  |  Branch (101:15): [True: 1, False: 18]
  ------------------
  102|     19|              MAX_RESIDUAL_CHANNELS)
  ------------------
  |  |   59|     19|#define MAX_RESIDUAL_CHANNELS (3)
  ------------------
  103|      1|            return IA_FATAL_ERROR;
  ------------------
  |  |   25|      1|#define IA_FATAL_ERROR 0x80000000
  ------------------
  104|     45|          for (j = 0; j < config->num_ott_boxes + config->num_ttt_boxes; j++) {
  ------------------
  |  Branch (104:23): [True: 27, False: 18]
  ------------------
  105|     27|            config->bs_residual_present[j] =
  106|     27|                ixheaacd_read_bits_buf(it_bit_buff, 1);
  107|     27|            if (config->bs_residual_present[j]) {
  ------------------
  |  Branch (107:17): [True: 6, False: 21]
  ------------------
  108|      6|              config->bs_residual_bands_ld_mps[j] =
  109|      6|                  ixheaacd_read_bits_buf(it_bit_buff, 5);
  110|      6|              if (config->bs_residual_bands_ld_mps[j] > MAX_PARAMETER_BANDS)
  ------------------
  |  |   55|      6|#define MAX_PARAMETER_BANDS (28)
  ------------------
  |  Branch (110:19): [True: 0, False: 6]
  ------------------
  111|      0|              {
  112|      0|                return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
  113|      0|              }
  114|      6|            }
  115|     27|          }
  116|     18|          break;
  117|       |
  118|     18|        case 1:
  ------------------
  |  Branch (118:9): [True: 18, False: 4.14k]
  ------------------
  119|     18|          config->bs_arbitrary_downmix = 2;
  120|       |
  121|     18|          config->bs_arbitrary_downmix_residual_sampling_freq_index =
  122|     18|              ixheaacd_read_bits_buf(it_bit_buff, 4);
  123|     18|          if (config->bs_arbitrary_downmix_residual_sampling_freq_index > MAX_RES_SAMP_FREQ_IDX) {
  ------------------
  |  |   71|     18|#define MAX_RES_SAMP_FREQ_IDX 11
  ------------------
  |  Branch (123:15): [True: 1, False: 17]
  ------------------
  124|      1|            return IA_FATAL_ERROR;
  ------------------
  |  |   25|      1|#define IA_FATAL_ERROR 0x80000000
  ------------------
  125|      1|          }
  126|     17|          config->bs_arbitrary_downmix_residual_frames_per_spatial_frame =
  127|     17|              ixheaacd_read_bits_buf(it_bit_buff, 2);
  128|       |
  129|     17|          if (!ixheaacd_validate_res_frames_per_spatial_frame(
  ------------------
  |  Branch (129:15): [True: 3, False: 14]
  ------------------
  130|     17|                  num_slots, config->bs_arbitrary_downmix_residual_frames_per_spatial_frame)) {
  131|      3|            return IA_FATAL_ERROR;
  ------------------
  |  |   25|      3|#define IA_FATAL_ERROR 0x80000000
  ------------------
  132|      3|          }
  133|       |
  134|     14|          config->bs_arbitrary_downmix_residual_bands =
  135|     14|              ixheaacd_read_bits_buf(it_bit_buff, 5);
  136|     14|          if (config->bs_arbitrary_downmix_residual_bands >=
  ------------------
  |  Branch (136:15): [True: 1, False: 13]
  ------------------
  137|     14|              ixheaacd_freq_res_table[config->bs_freq_res]) {
  138|      1|            return IA_FATAL_ERROR;
  ------------------
  |  |   25|      1|#define IA_FATAL_ERROR 0x80000000
  ------------------
  139|      1|          }
  140|       |
  141|     13|          break;
  142|       |
  143|    205|        case 2:
  ------------------
  |  Branch (143:9): [True: 205, False: 3.96k]
  ------------------
  144|    205|          config->num_out_chan_AT = 0;
  145|    205|          config->num_ott_boxes_AT = 0;
  146|    205|          if (config->num_output_channels > MAX_OUTPUT_CHANNELS)
  ------------------
  |  |   60|    205|#define MAX_OUTPUT_CHANNELS (7)
  ------------------
  |  Branch (146:15): [True: 1, False: 204]
  ------------------
  147|      1|            return IA_FATAL_ERROR;
  ------------------
  |  |   25|      1|#define IA_FATAL_ERROR 0x80000000
  ------------------
  148|  1.36k|          for (ch = 0; ch < config->num_output_channels; ch++) {
  ------------------
  |  Branch (148:24): [True: 1.15k, False: 204]
  ------------------
  149|  1.15k|            tmp_open = 1;
  150|  1.15k|            idx = 0;
  151|  4.77k|            while ((tmp_open > 0) && (idx < MAX_ARBITRARY_TREE_INDEX)) {
  ------------------
  |  |   69|  3.99k|#define MAX_ARBITRARY_TREE_INDEX ((1 << (MAX_ARBITRARY_TREE_LEVELS + 1)) - 1)
  |  |  ------------------
  |  |  |  |   66|  3.99k|#define MAX_ARBITRARY_TREE_LEVELS (2)
  |  |  ------------------
  ------------------
  |  Branch (151:20): [True: 3.99k, False: 782]
  |  Branch (151:38): [True: 3.62k, False: 376]
  ------------------
  152|  3.62k|              config->bs_ott_box_present_AT[ch][idx] =
  153|  3.62k|                  ixheaacd_read_bits_buf(it_bit_buff, 1);
  154|  3.62k|              if (config->bs_ott_box_present_AT[ch][idx]) {
  ------------------
  |  Branch (154:19): [True: 2.45k, False: 1.16k]
  ------------------
  155|  2.45k|                config->num_ott_boxes_AT++;
  156|  2.45k|                tmp_open++;
  157|  2.45k|              } else {
  158|  1.16k|                config->num_out_chan_AT++;
  159|  1.16k|                tmp_open--;
  160|  1.16k|              }
  161|  3.62k|              idx++;
  162|  3.62k|            }
  163|  1.15k|          }
  164|       |
  165|  2.60k|          for (i = 0; i < config->num_ott_boxes_AT; i++) {
  ------------------
  |  Branch (165:23): [True: 2.40k, False: 204]
  ------------------
  166|  2.40k|            config->bs_ott_default_cld_AT[i] =
  167|  2.40k|                ixheaacd_read_bits_buf(it_bit_buff, 1);
  168|  2.40k|            config->bs_ott_mode_lfe_AT[i] =
  169|  2.40k|                ixheaacd_read_bits_buf(it_bit_buff, 1);
  170|  2.40k|            if (config->bs_ott_mode_lfe_AT[i]) {
  ------------------
  |  Branch (170:17): [True: 1.03k, False: 1.36k]
  ------------------
  171|  1.03k|              config->bs_ott_bands_AT[i] =
  172|  1.03k|                  ixheaacd_read_bits_buf(it_bit_buff, 5);
  173|  1.36k|            } else {
  174|  1.36k|              config->bs_ott_bands_AT[i] = ixheaacd_freq_res_table[config->bs_freq_res];
  175|  1.36k|            }
  176|  2.40k|          }
  177|       |
  178|  1.29k|          for (i = 0; i < config->num_out_chan_AT; i++) {
  ------------------
  |  Branch (178:23): [True: 1.08k, False: 204]
  ------------------
  179|  1.08k|            config->bs_output_channel_pos_AT[i] =
  180|  1.08k|                ixheaacd_read_bits_buf(it_bit_buff, 5);
  181|  1.08k|          }
  182|       |
  183|    204|          break;
  184|       |
  185|  3.91k|        default:;
  ------------------
  |  Branch (185:9): [True: 3.91k, False: 246]
  ------------------
  186|  4.16k|      }
  187|  4.16k|    }
  188|       |
  189|  7.08k|    bits_read = tmp - it_bit_buff->cnt_bits;
  190|  7.08k|    n_fill_bits = 8 * sac_ext_len - bits_read;
  191|       |
  192|  1.51M|    while (n_fill_bits > 7) {
  ------------------
  |  Branch (192:12): [True: 1.50M, False: 7.08k]
  ------------------
  193|  1.50M|      ixheaacd_read_bits_buf(it_bit_buff, 8);
  194|  1.50M|      n_fill_bits -= 8;
  195|  1.50M|    }
  196|  7.08k|    if (n_fill_bits > 0) {
  ------------------
  |  Branch (196:9): [True: 176, False: 6.90k]
  ------------------
  197|    176|      ixheaacd_read_bits_buf(it_bit_buff, n_fill_bits);
  198|    176|    }
  199|       |
  200|  7.08k|    ba -= 8 * sac_ext_len;
  201|  7.08k|    config->sac_ext_cnt++;
  202|  7.08k|  }
  203|  1.14k|  return IA_NO_ERROR;
  ------------------
  |  |   23|  1.14k|#define IA_NO_ERROR 0x00000000
  ------------------
  204|  1.17k|}

ixheaacd_ld_qmf_analysis:
  106|    178|                                WORD16 *output_buf) {
  107|    178|  WORD32 *p_arr_qmf_buf_real[MAX_ENV_COLS + MAX_ENV_COLS];
  108|    178|  WORD32 **p_arr_qmf_buf_imag = &p_arr_qmf_buf_real[MAX_ENV_COLS];
  ------------------
  |  |   71|    178|#define MAX_ENV_COLS (MAX_COLS + MAX_OV_COLS)
  |  |  ------------------
  |  |  |  |   69|    178|#define MAX_COLS (MAX_FRAME_SIZE / NO_ANALYSIS_CHANNELS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|    178|#define MAX_FRAME_SIZE 1024
  |  |  |  |  ------------------
  |  |  |  |               #define MAX_COLS (MAX_FRAME_SIZE / NO_ANALYSIS_CHANNELS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   35|    178|#define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|    178|#define NO_SYNTHESIS_CHANNELS 64
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   23|    178|#define SBR_UPSAMPLE_FAC 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define MAX_ENV_COLS (MAX_COLS + MAX_OV_COLS)
  |  |  ------------------
  |  |  |  |   70|    178|#define MAX_OV_COLS 6
  |  |  ------------------
  ------------------
  109|    178|  WORD32 temp_arr[64 * 64];
  110|    178|  WORD32 *ptr = &temp_arr[0];
  111|    178|  float in_gain_n_q8_fac = self->input_gain * 0.00390625f;
  112|       |
  113|    178|  int i;
  114|    178|  WORD32 ts;
  115|       |
  116|  2.32k|  for (ts = 2; ts < self->time_slots + 2; ts++) {
  ------------------
  |  Branch (116:16): [True: 2.14k, False: 178]
  ------------------
  117|  2.14k|    p_arr_qmf_buf_real[ts] = ptr;
  118|  2.14k|    ptr += NO_SYNTHESIS_CHANNELS;
  ------------------
  |  |   34|  2.14k|#define NO_SYNTHESIS_CHANNELS 64
  ------------------
  119|       |
  120|  2.14k|    p_arr_qmf_buf_imag[ts] = ptr;
  121|  2.14k|    ptr += NO_SYNTHESIS_CHANNELS;
  ------------------
  |  |   34|  2.14k|#define NO_SYNTHESIS_CHANNELS 64
  ------------------
  122|  2.14k|  }
  123|       |
  124|    178|  self->str_mps_qmf_bank.num_time_slots = self->time_slots;
  125|    178|  self->str_mps_qmf_bank.no_channels = self->qmf_band_count;
  126|       |
  127|    178|  ixheaacd_cplx_anal_qmffilt_32((WORD32 *)output_buf, self->str_sbr_scale_fact,
  128|    178|                                &p_arr_qmf_buf_real[0], &p_arr_qmf_buf_imag[0],
  129|    178|                                &self->str_mps_qmf_bank,
  130|    178|                                self->qmf_dec_tables_ptr, 2, 0);
  131|       |
  132|  2.32k|  for (ts = 0; ts < self->time_slots; ts++) {
  ------------------
  |  Branch (132:16): [True: 2.14k, False: 178]
  ------------------
  133|  88.1k|    for (i = 0; i < self->qmf_band_count; i++) {
  ------------------
  |  Branch (133:17): [True: 86.0k, False: 2.14k]
  ------------------
  134|  86.0k|      self->qmf_in[0][ts][i].re =
  135|  86.0k|          (p_arr_qmf_buf_real[ts + 2][i] * in_gain_n_q8_fac);
  136|  86.0k|      self->qmf_in[0][ts][i].im =
  137|  86.0k|          (p_arr_qmf_buf_imag[ts + 2][i] * in_gain_n_q8_fac);
  138|  86.0k|    }
  139|  2.14k|  }
  140|       |
  141|    178|  return 0;
  142|    178|}
ixheaacd_ld_mps_apply:
  145|  2.20k|                             WORD16 *output_buf) {
  146|  2.20k|  ia_aac_dec_state_struct *aac_handle = p_obj_exhaacplus_dec->p_state_aac;
  147|  2.20k|  ia_mps_dec_state_struct *mps_handle = &(aac_handle->mps_dec_handle);
  148|  2.20k|  WORD32 err = 0;
  149|  2.20k|  WORD32 ts, i;
  150|  2.20k|  ia_dec_data_struct *pstr_dec_data =
  151|  2.20k|      (ia_dec_data_struct *)aac_handle->pstr_dec_data;
  152|  2.20k|  ia_usac_data_struct *pstr_usac_data = &(pstr_dec_data->str_usac_data);
  153|       |
  154|  2.20k|  mps_handle->hyb_band_count[0] = mps_handle->hyb_band_count_max;
  155|  2.20k|  mps_handle->hyb_band_count[1] = mps_handle->hyb_band_count_max;
  156|       |
  157|  2.20k|  err = ixheaacd_mps_frame_decode(mps_handle);
  158|  2.20k|  if (err != IA_NO_ERROR) return err;
  ------------------
  |  |   23|  2.20k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (158:7): [True: 14, False: 2.18k]
  ------------------
  159|       |
  160|  2.18k|  if (aac_handle->mps_dec_handle.num_parameter_sets_prev <= 0) return IA_FATAL_ERROR;
  ------------------
  |  |   25|     35|#define IA_FATAL_ERROR 0x80000000
  ------------------
  |  Branch (160:7): [True: 35, False: 2.15k]
  ------------------
  161|       |
  162|  2.15k|  if (mps_handle->ldmps_config.bs_tree_config == 7) {
  ------------------
  |  Branch (162:7): [True: 99, False: 2.05k]
  ------------------
  163|     99|    ixheaacd_pre_and_mix_matrix_calculation(&(aac_handle->mps_dec_handle));
  164|     99|    ixheaacd_mps_pre_matrix_mix_matrix_smoothing(&(aac_handle->mps_dec_handle));
  165|     99|  }
  166|  2.15k|  mps_handle->output_buffer = pstr_usac_data->time_sample_vector;
  167|  2.15k|  if (mps_handle->ldmps_config.no_ldsbr_present)
  ------------------
  |  Branch (167:7): [True: 178, False: 1.97k]
  ------------------
  168|    178|    ixheaacd_ld_qmf_analysis(mps_handle, output_buf);
  169|  1.97k|  else {
  170|  41.4k|    for (ts = 0; ts < mps_handle->time_slots; ts++) {
  ------------------
  |  Branch (170:18): [True: 39.5k, False: 1.97k]
  ------------------
  171|  39.5k|      FLOAT32 *qmf_re = p_obj_exhaacplus_dec->p_state_aac->str_sbr_dec_info[0]
  172|  39.5k|                          ->pstr_sbr_channel[0]
  173|  39.5k|                          ->str_sbr_dec.mps_qmf_buf_real[ts + 2];
  174|  39.5k|      FLOAT32 *qmf_im = p_obj_exhaacplus_dec->p_state_aac->str_sbr_dec_info[0]
  175|  39.5k|                          ->pstr_sbr_channel[0]
  176|  39.5k|                          ->str_sbr_dec.mps_qmf_buf_imag[ts + 2];
  177|  2.27M|      for (i = 0; i < mps_handle->qmf_band_count; i++) {
  ------------------
  |  Branch (177:19): [True: 2.24M, False: 39.5k]
  ------------------
  178|  2.24M|        mps_handle->qmf_in[0][ts][i].re = qmf_re[i] * mps_handle->input_gain;
  179|  2.24M|        mps_handle->qmf_in[0][ts][i].im = qmf_im[i] * mps_handle->input_gain;
  180|  2.24M|      }
  181|  39.5k|    }
  182|  1.97k|  }
  183|  2.15k|  ixheaacd_mps_qmf_hyb_analysis(mps_handle);
  184|       |
  185|  2.15k|  mps_handle->bs_high_rate_mode = 1;
  186|       |
  187|  2.15k|  ixheaacd_mps_apply_pre_matrix(mps_handle);
  188|       |
  189|  2.15k|  ixheaacd_mps_create_w(mps_handle);
  190|       |
  191|  2.15k|  if ((!(mps_handle->res_bands | mps_handle->pre_mix_req)) &&
  ------------------
  |  Branch (191:7): [True: 1.84k, False: 305]
  ------------------
  192|  1.84k|      (mps_handle->config->bs_phase_coding == 0)) {
  ------------------
  |  Branch (192:7): [True: 1.84k, False: 0]
  ------------------
  193|  1.84k|    ixheaacd_mps_apply_mix_matrix_type1(mps_handle);
  194|       |
  195|  1.84k|  } else if (mps_handle->pre_mix_req) {
  ------------------
  |  Branch (195:14): [True: 305, False: 0]
  ------------------
  196|    305|    ixheaacd_mps_apply_mix_matrix_type2(mps_handle);
  197|       |
  198|    305|  } else {
  199|      0|    ixheaacd_mps_apply_mix_matrix_type3(mps_handle);
  200|      0|  }
  201|       |
  202|  2.15k|  if (mps_handle->ldmps_config.bs_temp_shape_config == 2) {
  ------------------
  |  Branch (202:7): [True: 427, False: 1.72k]
  ------------------
  203|    427|    ixheaacd_mps_time_env_shaping(mps_handle);
  204|    427|  }
  205|       |
  206|  2.15k|  err = ixheaacd_mps_temp_process(mps_handle);
  207|  2.15k|  mps_handle->pre_mix_req = 0;
  208|  2.15k|  if (err)
  ------------------
  |  Branch (208:7): [True: 0, False: 2.15k]
  ------------------
  209|      0|    return err;
  210|       |
  211|  2.15k|  return err;
  212|  2.15k|}

ixheaacd_read_section_data:
   66|   216k|    ia_aac_dec_tables_struct *ptr_aac_tables) {
   67|   216k|  WORD sfb;
   68|   216k|  WORD sect_cb;
   69|   216k|  WORD sect_len;
   70|   216k|  WORD sect_len_incr;
   71|   216k|  WORD sect_esc_val;
   72|   216k|  ia_ics_info_struct *ptr_ics_info = &ptr_aac_dec_channel_info->str_ics_info;
   73|   216k|  WORD max_sfb = ptr_ics_info->max_sfb;
   74|   216k|  WORD num_win_group;
   75|       |
   76|   216k|  WORD8 *ptr_code_book = ptr_aac_dec_channel_info->ptr_code_book;
   77|   216k|  WORD8 *ptr_code_book_temp = ptr_code_book;
   78|   216k|  WORD32 sect_bitlen = LONG_BLOCK_SECT_LEN;
  ------------------
  |  |   59|   216k|#define LONG_BLOCK_SECT_LEN 5
  ------------------
   79|   216k|  int num_lines_sec_idx = 0, top;
   80|   216k|  short *ptr_num_sect_lines =
   81|   216k|      ptr_aac_dec_channel_info->num_line_in_sec4_hcr_arr;
   82|   216k|  UWORD8 *ptr_hcr_code_book = ptr_aac_dec_channel_info->cb4_hcr_arr;
   83|   216k|  const short *band_offsets = (WORD16 *)ixheaacd_getscalefactorbandoffsets(
   84|   216k|      &(ptr_aac_dec_channel_info->str_ics_info), ptr_aac_tables);
   85|   216k|  ptr_aac_dec_channel_info->number_sect = 0;
   86|       |
   87|   216k|  if (ptr_aac_dec_channel_info->str_ics_info.window_sequence ==
  ------------------
  |  Branch (87:7): [True: 34.8k, False: 181k]
  ------------------
   88|   216k|      EIGHT_SHORT_SEQUENCE) {
  ------------------
  |  |  102|   216k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
   89|  34.8k|    sect_bitlen = SHORT_BLOCK_SECT_LEN;
  ------------------
  |  |   60|  34.8k|#define SHORT_BLOCK_SECT_LEN 3
  ------------------
   90|  34.8k|  }
   91|       |
   92|   216k|  sect_esc_val = (1 << sect_bitlen) - 1;
   93|       |
   94|   531k|  for (num_win_group = 0; num_win_group < ptr_ics_info->num_window_groups;
  ------------------
  |  Branch (94:27): [True: 316k, False: 214k]
  ------------------
   95|   316k|       num_win_group++) {
   96|   316k|    sfb = 0;
   97|       |
   98|  1.16M|    while (sfb < max_sfb) {
  ------------------
  |  Branch (98:12): [True: 851k, False: 315k]
  ------------------
   99|   851k|      sect_len = 0;
  100|   851k|      if (aac_sect_data_resil_flag) {
  ------------------
  |  Branch (100:11): [True: 476k, False: 374k]
  ------------------
  101|   476k|        sect_cb = ixheaacd_read_bits_buf(it_bit_buff, 5);
  102|   476k|      } else {
  103|   374k|        sect_cb = ixheaacd_read_bits_buf(it_bit_buff, 4);
  104|   374k|      }
  105|       |
  106|   851k|      if ((aac_sect_data_resil_flag == 0) ||
  ------------------
  |  Branch (106:11): [True: 374k, False: 476k]
  ------------------
  107|   572k|          ((sect_cb < 11) || ((sect_cb > 11) && (sect_cb < 16)))) {
  ------------------
  |  Branch (107:12): [True: 119k, False: 356k]
  |  Branch (107:31): [True: 343k, False: 13.6k]
  |  Branch (107:49): [True: 77.8k, False: 265k]
  ------------------
  108|   572k|        sect_len_incr = ixheaacd_read_bits_buf(it_bit_buff, sect_bitlen);
  109|   584k|        while (sect_len_incr == sect_esc_val) {
  ------------------
  |  Branch (109:16): [True: 11.9k, False: 572k]
  ------------------
  110|  11.9k|          sect_len = (sect_len + sect_esc_val);
  111|  11.9k|          sect_len_incr = ixheaacd_read_bits_buf(it_bit_buff, sect_bitlen);
  112|  11.9k|        }
  113|   572k|      } else
  114|   279k|        sect_len_incr = 1;
  115|       |
  116|   851k|      sect_len = (sect_len + sect_len_incr);
  117|       |
  118|   851k|      if (aac_spect_data_resil_flag) {
  ------------------
  |  Branch (118:11): [True: 326k, False: 525k]
  ------------------
  119|   326k|        top = (sfb + sect_len);
  120|   326k|        if ((num_lines_sec_idx >= MAX_SFB_HCR) ||
  ------------------
  |  |  156|   326k|#define MAX_SFB_HCR (((1024 / 8) / LINES_PER_UNIT) * 8)
  |  |  ------------------
  |  |  |  |  154|   326k|#define LINES_PER_UNIT 4
  |  |  ------------------
  ------------------
  |  Branch (120:13): [True: 1, False: 326k]
  ------------------
  121|   326k|            (top >= MAX_SCALE_FACTOR_BANDS_LONG)) {
  ------------------
  |  |   31|   326k|#define MAX_SCALE_FACTOR_BANDS_LONG (52)
  ------------------
  |  Branch (121:13): [True: 15, False: 326k]
  ------------------
  122|     16|          return -1;
  123|     16|        }
  124|   326k|        ptr_num_sect_lines[num_lines_sec_idx] =
  125|   326k|            band_offsets[top] - band_offsets[sfb];
  126|   326k|        num_lines_sec_idx++;
  127|   326k|        if (sect_cb == (ESC_HCB + 1)) {
  ------------------
  |  |   37|   326k|#define ESC_HCB 11
  ------------------
  |  Branch (127:13): [True: 195, False: 326k]
  ------------------
  128|    195|          return IA_XHEAAC_DEC_EXE_NONFATAL_INVALID_CODE_BOOK;
  ------------------
  |  |  109|    195|#define IA_XHEAAC_DEC_EXE_NONFATAL_INVALID_CODE_BOOK 0x0000180E
  ------------------
  129|   326k|        } else {
  130|   326k|          *ptr_hcr_code_book++ = sect_cb;
  131|   326k|        }
  132|   326k|        ptr_aac_dec_channel_info->number_sect++;
  133|   326k|      }
  134|       |
  135|   851k|      sfb = (sfb + sect_len);
  136|   851k|      if (sfb > max_sfb) {
  ------------------
  |  Branch (136:11): [True: 907, False: 850k]
  ------------------
  137|    907|        return (WORD16)(
  138|    907|            (WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_EXCEEDS_SFB_TRANSMITTED);
  ------------------
  |  |  103|    907|#define IA_XHEAAC_DEC_EXE_NONFATAL_EXCEEDS_SFB_TRANSMITTED 0x00001808
  ------------------
  139|    907|      }
  140|   850k|      if (sect_cb == (ESC_HCB + 1)) {
  ------------------
  |  |   37|   850k|#define ESC_HCB 11
  ------------------
  |  Branch (140:11): [True: 147, False: 850k]
  ------------------
  141|    147|        return (WORD16)(
  142|    147|            (WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_INVALID_CODE_BOOK);
  ------------------
  |  |  109|    147|#define IA_XHEAAC_DEC_EXE_NONFATAL_INVALID_CODE_BOOK 0x0000180E
  ------------------
  143|    147|      }
  144|       |
  145|  3.92M|      while (sect_len--) {
  ------------------
  |  Branch (145:14): [True: 3.07M, False: 850k]
  ------------------
  146|  3.07M|        *ptr_code_book_temp++ = sect_cb;
  147|  3.07M|      }
  148|   850k|    }
  149|   315k|    ptr_code_book += MAX_SCALE_FACTOR_BANDS_SHORT;
  ------------------
  |  |   30|   315k|#define MAX_SCALE_FACTOR_BANDS_SHORT 16
  ------------------
  150|   315k|    ptr_code_book_temp = ptr_code_book;
  151|   315k|  }
  152|       |
  153|   214k|  return AAC_DEC_OK;
  ------------------
  |  |   23|   214k|#define AAC_DEC_OK IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR
  |  |  ------------------
  |  |  |  |   27|   214k|#define IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR 0x00000000
  |  |  ------------------
  ------------------
  154|   216k|}
ixheaacd_read_scale_factor_data:
  159|   159k|    ia_aac_dec_tables_struct *ptr_aac_tables, WORD32 object_type) {
  160|   159k|  WORD sfb;
  161|   159k|  WORD16 position = 0;
  162|   159k|  WORD num_win_group;
  163|   159k|  WORD16 factor = ptr_aac_dec_channel_info->global_gain;
  164|   159k|  WORD8 *ptr_code_book, *ptr_code_book_short;
  165|   159k|  WORD16 *ptr_scale_fact, *ptr_scale_fact_short;
  166|   159k|  WORD16 norm_value;
  167|   159k|  WORD16 index, length;
  168|   159k|  const UWORD16 *hcod_sf =
  169|   159k|      ptr_aac_tables->pstr_huffmann_tables->huffman_code_book_scl;
  170|   159k|  const UWORD32 *table_idx =
  171|   159k|      ptr_aac_tables->pstr_huffmann_tables->huffman_code_book_scl_index;
  172|       |
  173|   159k|  WORD start_bit_pos = it_bit_buff->bit_pos;
  174|   159k|  UWORD8 *start_read_pos = it_bit_buff->ptr_read_next;
  175|   159k|  UWORD8 *ptr_read_next = it_bit_buff->ptr_read_next;
  176|   159k|  WORD32 bit_pos = 7 - it_bit_buff->bit_pos;
  177|   159k|  WORD32 read_word;
  178|   159k|  WORD32 increment;
  179|   159k|  read_word = ixheaacd_aac_showbits_32(ptr_read_next, it_bit_buff->cnt_bits,
  180|   159k|                                       &increment);
  181|   159k|  ptr_read_next += increment;
  182|       |
  183|   159k|  ptr_code_book = ptr_aac_dec_channel_info->ptr_code_book;
  184|       |
  185|   159k|  ptr_scale_fact = ptr_aac_dec_channel_info->ptr_scale_factor;
  186|       |
  187|   159k|  for (num_win_group = 0;
  188|   406k|       num_win_group < ptr_aac_dec_channel_info->str_ics_info.num_window_groups;
  ------------------
  |  Branch (188:8): [True: 247k, False: 159k]
  ------------------
  189|   247k|       num_win_group++) {
  190|   247k|    ptr_code_book_short =
  191|   247k|        &ptr_code_book[num_win_group * MAX_SCALE_FACTOR_BANDS_SHORT];
  ------------------
  |  |   30|   247k|#define MAX_SCALE_FACTOR_BANDS_SHORT 16
  ------------------
  192|   247k|    ptr_scale_fact_short =
  193|   247k|        &ptr_scale_fact[num_win_group * MAX_SCALE_FACTOR_BANDS_SHORT];
  ------------------
  |  |   30|   247k|#define MAX_SCALE_FACTOR_BANDS_SHORT 16
  ------------------
  194|  2.41M|    for (sfb = ptr_aac_dec_channel_info->str_ics_info.max_sfb - 1; sfb >= 0;
  ------------------
  |  Branch (194:68): [True: 2.16M, False: 247k]
  ------------------
  195|  2.16M|         sfb--) {
  196|  2.16M|      WORD32 sfb_cb = *ptr_code_book_short++;
  197|  2.16M|      if (sfb_cb == ZERO_HCB)
  ------------------
  |  |   33|  2.16M|#define ZERO_HCB 0
  ------------------
  |  Branch (197:11): [True: 526k, False: 1.64M]
  ------------------
  198|   526k|        *ptr_scale_fact_short++ = 0;
  199|  1.64M|      else {
  200|  1.64M|        {
  201|  1.64M|          WORD32 pns_present = 0;
  202|  1.64M|          WORD pns_band;
  203|       |
  204|  1.64M|          ia_pns_info_struct *ptr_pns_info =
  205|  1.64M|              &ptr_aac_dec_channel_info->str_pns_info;
  206|       |
  207|  1.64M|          if (sfb_cb == NOISE_HCB && (ptr_pns_info->pns_active != 1)) {
  ------------------
  |  |   38|  3.28M|#define NOISE_HCB 13
  ------------------
  |  Branch (207:15): [True: 77.1k, False: 1.56M]
  |  Branch (207:38): [True: 12.5k, False: 64.6k]
  ------------------
  208|  12.5k|            pns_present = 1;
  209|  12.5k|          }
  210|       |
  211|  1.64M|          if (!pns_present) {
  ------------------
  |  Branch (211:15): [True: 1.63M, False: 12.5k]
  ------------------
  212|  1.63M|            UWORD32 read_word1;
  213|       |
  214|  1.63M|            read_word1 = read_word << bit_pos;
  215|       |
  216|  1.63M|            ixheaacd_huffman_decode(read_word1, &index, &length, hcod_sf,
  217|  1.63M|                                    table_idx);
  218|       |
  219|  1.63M|            bit_pos += length;
  220|  1.63M|            ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
  221|  1.63M|                                        it_bit_buff->ptr_bit_buf_end);
  222|       |
  223|  1.63M|            ixheaacd_aac_read_byte_corr1(&ptr_read_next, &bit_pos, &read_word,
  224|  1.63M|                                         it_bit_buff->ptr_bit_buf_end);
  225|       |
  226|  1.63M|            norm_value = index - 60;
  227|  1.63M|          }
  228|       |
  229|  12.5k|          else {
  230|  12.5k|            WORD32 noise_start_value;
  231|  12.5k|            UWORD32 temp;
  232|       |
  233|  12.5k|            temp = (read_word << bit_pos);
  234|  12.5k|            temp = ((UWORD32)temp >> (32 - 9));
  235|  12.5k|            noise_start_value = temp;
  236|  12.5k|            bit_pos += 9;
  237|       |
  238|  12.5k|            ixheaacd_aac_read_byte_corr1(&ptr_read_next, &bit_pos, &read_word,
  239|  12.5k|                                         it_bit_buff->ptr_bit_buf_end);
  240|       |
  241|  12.5k|            norm_value = noise_start_value - 256;
  242|  12.5k|            ptr_pns_info->pns_active = 1;
  243|       |
  244|  12.5k|            ptr_pns_info->noise_energy =
  245|  12.5k|                ptr_aac_dec_channel_info->global_gain - NOISE_OFFSET;
  ------------------
  |  |   35|  12.5k|#define NOISE_OFFSET 90
  ------------------
  246|  12.5k|          }
  247|       |
  248|  1.64M|          if ((object_type != AOT_ER_AAC_ELD) &&
  ------------------
  |  Branch (248:15): [True: 1.54M, False: 98.3k]
  ------------------
  249|  1.54M|              (object_type != AOT_ER_AAC_LD) && (object_type != AOT_ER_AAC_LC)) {
  ------------------
  |  Branch (249:15): [True: 1.06M, False: 479k]
  |  Branch (249:49): [True: 112k, False: 952k]
  ------------------
  250|   112k|            if (sfb_cb > NOISE_HCB) {
  ------------------
  |  |   38|   112k|#define NOISE_HCB 13
  ------------------
  |  Branch (250:17): [True: 13.8k, False: 98.9k]
  ------------------
  251|  13.8k|              position = position + norm_value;
  252|  13.8k|              *ptr_scale_fact_short++ = -position;
  253|  98.9k|            } else if (sfb_cb < NOISE_HCB) {
  ------------------
  |  |   38|  98.9k|#define NOISE_HCB 13
  ------------------
  |  Branch (253:24): [True: 59.1k, False: 39.7k]
  ------------------
  254|  59.1k|              factor = factor + norm_value;
  255|  59.1k|              *ptr_scale_fact_short++ = factor;
  256|  59.1k|            } else {
  257|  39.7k|              ptr_pns_info->noise_energy =
  258|  39.7k|                  ixheaac_add16_sat(ptr_pns_info->noise_energy, norm_value);
  259|       |
  260|  39.7k|              pns_band = (num_win_group << 4) +
  261|  39.7k|                         ptr_aac_dec_channel_info->str_ics_info.max_sfb - sfb -
  262|  39.7k|                         1;
  263|  39.7k|              ptr_aac_dec_channel_info->ptr_scale_factor[pns_band] =
  264|  39.7k|                  ptr_pns_info->noise_energy;
  265|       |
  266|  39.7k|              ptr_pns_info->pns_used[pns_band] = 1;
  267|  39.7k|              ptr_scale_fact_short++;
  268|  39.7k|            }
  269|  1.53M|          } else {
  270|  1.53M|            if ((sfb_cb == INTENSITY_HCB) || (sfb_cb == INTENSITY_HCB2)) {
  ------------------
  |  |   40|  1.53M|#define INTENSITY_HCB 15
  ------------------
                          if ((sfb_cb == INTENSITY_HCB) || (sfb_cb == INTENSITY_HCB2)) {
  ------------------
  |  |   39|  1.46M|#define INTENSITY_HCB2 14
  ------------------
  |  Branch (270:17): [True: 63.9k, False: 1.46M]
  |  Branch (270:46): [True: 130k, False: 1.33M]
  ------------------
  271|   194k|              position = position + norm_value;
  272|   194k|              *ptr_scale_fact_short++ = -position;
  273|  1.33M|            } else if (sfb_cb == NOISE_HCB) {
  ------------------
  |  |   38|  1.33M|#define NOISE_HCB 13
  ------------------
  |  Branch (273:24): [True: 37.3k, False: 1.29M]
  ------------------
  274|  37.3k|              ptr_pns_info->noise_energy =
  275|  37.3k|                  ixheaac_add16_sat(ptr_pns_info->noise_energy, norm_value);
  276|       |
  277|  37.3k|              pns_band = (num_win_group << 4) +
  278|  37.3k|                         ptr_aac_dec_channel_info->str_ics_info.max_sfb - sfb -
  279|  37.3k|                         1;
  280|  37.3k|              ptr_aac_dec_channel_info->ptr_scale_factor[pns_band] =
  281|  37.3k|                  ptr_pns_info->noise_energy;
  282|       |
  283|  37.3k|              ptr_pns_info->pns_used[pns_band] = 1;
  284|  37.3k|              ptr_scale_fact_short++;
  285|       |
  286|  1.29M|            } else {
  287|  1.29M|              factor = factor + norm_value;
  288|  1.29M|              *ptr_scale_fact_short++ = factor;
  289|  1.29M|            }
  290|  1.53M|          }
  291|  1.64M|        }
  292|  1.64M|      }
  293|  2.16M|    }
  294|   247k|  }
  295|       |
  296|   159k|  it_bit_buff->ptr_read_next = ptr_read_next - increment;
  297|       |
  298|   159k|  it_bit_buff->bit_pos = 7 - bit_pos;
  299|   159k|  {
  300|   159k|    WORD bits_consumed;
  301|   159k|    bits_consumed =
  302|   159k|        (WORD)(((it_bit_buff->ptr_read_next - start_read_pos) << 3) +
  303|   159k|               (start_bit_pos - it_bit_buff->bit_pos));
  304|   159k|    it_bit_buff->cnt_bits -= bits_consumed;
  305|   159k|  }
  306|   159k|}

ixheaacd_reset_acelp_data_fix:
  104|  45.4k|                                   WORD32 was_last_short, WORD32 tw_mdct) {
  105|  45.4k|  WORD32 i;
  106|       |
  107|  45.4k|  if (was_last_short == 1) {
  ------------------
  |  Branch (107:7): [True: 6.27k, False: 39.2k]
  ------------------
  108|  6.27k|    st->mode_prev = -2;
  109|  39.2k|  } else {
  110|  39.2k|    st->mode_prev = -1;
  111|  39.2k|  }
  112|       |
  113|   363k|  for (i = 0; i < NUM_SUBFR_SUPERFRAME_BY2 - 1; i++) {
  ------------------
  |  |   36|   363k|#define NUM_SUBFR_SUPERFRAME_BY2 (NUM_SUBFR_SUPERFRAME / 2)
  |  |  ------------------
  |  |  |  |   35|   363k|#define NUM_SUBFR_SUPERFRAME 16
  |  |  ------------------
  ------------------
  |  Branch (113:15): [True: 318k, False: 45.4k]
  ------------------
  114|   318k|    st->pitch_prev[i] = 64;
  115|   318k|    st->gain_prev[i] = 0;
  116|   318k|  }
  117|       |
  118|  45.4k|  st->bpf_active_prev = 0;
  119|       |
  120|  45.4k|  if (ptr_overlap_buf != NULL && !tw_mdct) {
  ------------------
  |  Branch (120:7): [True: 15.3k, False: 30.1k]
  |  Branch (120:34): [True: 15.3k, False: 0]
  ------------------
  121|  15.3k|    const WORD32 *ptr_window_coeff;
  122|  15.3k|    WORD32 fac_length;
  123|  15.3k|    if (was_last_short) {
  ------------------
  |  Branch (123:9): [True: 6.27k, False: 9.10k]
  ------------------
  124|  6.27k|      fac_length = (usac_data->ccfl) / 16;
  125|  9.10k|    } else {
  126|  9.10k|      fac_length = (usac_data->len_subfrm) / 2;
  127|  9.10k|    }
  128|       |
  129|  15.3k|    if (fac_length == 48) {
  ------------------
  |  Branch (129:9): [True: 951, False: 14.4k]
  ------------------
  130|    951|      ptr_window_coeff = ixheaacd_sine_win_96;
  131|  14.4k|    } else if (fac_length == 64) {
  ------------------
  |  Branch (131:16): [True: 5.32k, False: 9.10k]
  ------------------
  132|  5.32k|      ptr_window_coeff = ixheaacd_sine_win_128;
  133|  9.10k|    } else if (fac_length == 96) {
  ------------------
  |  Branch (133:16): [True: 1.71k, False: 7.38k]
  ------------------
  134|  1.71k|      ptr_window_coeff = ixheaacd_sine_win_192;
  135|  7.38k|    } else {
  136|  7.38k|      ptr_window_coeff = ixheaacd_sine_win_256;
  137|  7.38k|    }
  138|       |
  139|  3.00M|    for (i = 0; i < 2 * fac_length; i++) {
  ------------------
  |  Branch (139:17): [True: 2.99M, False: 15.3k]
  ------------------
  140|  2.99M|      ptr_overlap_buf[(usac_data->ccfl) / 2 - fac_length + i] =
  141|  2.99M|          ixheaacd_mult32_m(
  142|  2.99M|              ptr_overlap_buf[(usac_data->ccfl) / 2 - fac_length + i],
  143|  2.99M|              ptr_window_coeff[2 * fac_length - 1 - i]);
  144|  2.99M|    }
  145|  6.05M|    for (i = 0; i < (usac_data->ccfl) / 2 - fac_length; i++) {
  ------------------
  |  Branch (145:17): [True: 6.03M, False: 15.3k]
  ------------------
  146|  6.03M|      ptr_overlap_buf[(usac_data->ccfl) / 2 + fac_length + i] = 0;
  147|  6.03M|    }
  148|       |
  149|  15.3k|    if (ptr_overlap_buf != NULL) {
  ------------------
  |  Branch (149:9): [True: 15.3k, False: 0]
  ------------------
  150|   401k|      for (i = 0; i < (usac_data->len_subfrm) / 2 - fac_length; i++) {
  ------------------
  |  Branch (150:19): [True: 386k, False: 15.3k]
  ------------------
  151|   386k|        st->exc_prev[i] = 0.0f;
  152|   386k|      }
  153|  3.02M|      for (i = 0; i < 2 * fac_length + 1; i++) {
  ------------------
  |  Branch (153:19): [True: 3.00M, False: 15.3k]
  ------------------
  154|  3.00M|        st->exc_prev[(usac_data->len_subfrm) / 2 - fac_length + i] =
  155|  3.00M|            ptr_overlap_buf[i + usac_data->ccfl / 2 - fac_length - 1] /
  156|  3.00M|            (float)(16384);
  157|  3.00M|      }
  158|  15.3k|    } else {
  159|      0|      ixheaacd_memset(st->exc_prev, 1 + (2 * FAC_LENGTH));
  ------------------
  |  |   33|      0|#define FAC_LENGTH 128
  ------------------
  160|      0|    }
  161|  15.3k|  }
  162|       |
  163|  45.4k|  return;
  164|  45.4k|}
ixheaacd_fix2flt_data:
  167|  15.3k|                           ia_usac_lpd_decoder_handle st, WORD32 k) {
  168|  15.3k|  WORD32 i;
  169|  15.3k|  WORD32 fac_length;
  170|  15.3k|  WORD32 window_sequence_last = usac_data->window_sequence_last[k];
  171|  15.3k|  WORD32 *p_ola_buffer = usac_data->overlap_data_ptr[k];
  172|  15.3k|  if (window_sequence_last == EIGHT_SHORT_SEQUENCE) {
  ------------------
  |  |  102|  15.3k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  |  Branch (172:7): [True: 6.27k, False: 9.10k]
  ------------------
  173|  6.27k|    fac_length = (usac_data->ccfl) / 16;
  174|  9.10k|  } else {
  175|  9.10k|    fac_length = (usac_data->len_subfrm) / 2;
  176|  9.10k|  }
  177|       |
  178|  15.3k|  ixheaacd_memset(st->lp_flt_coeff_a_prev, 2 * (ORDER + 1));
  ------------------
  |  |   30|  15.3k|#define ORDER 16
  ------------------
  179|  15.3k|  ixheaacd_memset(st->xcitation_prev, MAX_PITCH + INTER_LP_FIL_ORDER + 1);
  ------------------
  |  |   55|  15.3k|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|  15.3k|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  15.3k|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|  15.3k|   (6 *           \
  |  |   57|  15.3k|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|  15.3k|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  15.3k|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  15.3k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  15.3k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  15.3k|#define TMIN 34
  |  |  ------------------
  ------------------
                ixheaacd_memset(st->xcitation_prev, MAX_PITCH + INTER_LP_FIL_ORDER + 1);
  ------------------
  |  |   51|  15.3k|#define INTER_LP_FIL_ORDER 16
  ------------------
  180|  15.3k|  ixheaacd_memset(st->synth_prev, MAX_PITCH + SYNTH_DELAY_LMAX);
  ------------------
  |  |   55|  15.3k|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|  15.3k|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  15.3k|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|  15.3k|   (6 *           \
  |  |   57|  15.3k|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|  15.3k|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  15.3k|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  15.3k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  15.3k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  15.3k|#define TMIN 34
  |  |  ------------------
  ------------------
                ixheaacd_memset(st->synth_prev, MAX_PITCH + SYNTH_DELAY_LMAX);
  ------------------
  |  |   37|  15.3k|#define SYNTH_DELAY_LMAX ((NUM_SUBFR_SUPERFRAME_BY2 - 1) * LEN_SUBFR)
  |  |  ------------------
  |  |  |  |   36|  15.3k|#define NUM_SUBFR_SUPERFRAME_BY2 (NUM_SUBFR_SUPERFRAME / 2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   35|  15.3k|#define NUM_SUBFR_SUPERFRAME 16
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SYNTH_DELAY_LMAX ((NUM_SUBFR_SUPERFRAME_BY2 - 1) * LEN_SUBFR)
  |  |  ------------------
  |  |  |  |  118|  15.3k|#define LEN_SUBFR 64
  |  |  ------------------
  ------------------
  181|  15.3k|  ixheaacd_memset(st->bpf_prev, FILTER_DELAY + LEN_SUBFR);
  ------------------
  |  |   43|  15.3k|#define FILTER_DELAY 12
  ------------------
                ixheaacd_memset(st->bpf_prev, FILTER_DELAY + LEN_SUBFR);
  ------------------
  |  |  118|  15.3k|#define LEN_SUBFR 64
  ------------------
  182|       |
  183|  15.3k|  st->gain_threshold = 0.0f;
  184|       |
  185|  15.3k|  if (p_ola_buffer != NULL) {
  ------------------
  |  Branch (185:7): [True: 15.3k, False: 0]
  ------------------
  186|   401k|    for (i = 0; i < (usac_data->len_subfrm) / 2 - fac_length; i++) {
  ------------------
  |  Branch (186:17): [True: 386k, False: 15.3k]
  ------------------
  187|   386k|      st->exc_prev[i] = 0;
  188|   386k|    }
  189|  3.02M|    for (i = 0; i < 2 * fac_length + 1; i++) {
  ------------------
  |  Branch (189:17): [True: 3.00M, False: 15.3k]
  ------------------
  190|  3.00M|      st->exc_prev[(usac_data->len_subfrm) / 2 - fac_length + i] = (FLOAT32)(
  191|  3.00M|          p_ola_buffer[i + usac_data->ccfl / 2 - fac_length - 1] / 16384.0);
  192|  3.00M|    }
  193|  15.3k|  } else {
  194|      0|    ixheaacd_memset(st->exc_prev, 1 + (2 * FAC_LENGTH));
  ------------------
  |  |   33|      0|#define FAC_LENGTH 128
  ------------------
  195|      0|  }
  196|       |
  197|  15.3k|  return;
  198|  15.3k|}
ixheaacd_init_acelp_data:
  201|  30.1k|                              ia_usac_lpd_decoder_handle st) {
  202|       |  ixheaacd_reset_acelp_data_fix(usac_data, st, NULL, 0, 0);
  203|  30.1k|}
ixheaacd_lsp_2_lsf_conversion:
  208|  27.1k|void ixheaacd_lsp_2_lsf_conversion(float lsp[], float lsf[], WORD32 m) {
  209|  27.1k|  short i;
  210|   462k|  for (i = 0; i < m; i++) {
  ------------------
  |  Branch (210:15): [True: 434k, False: 27.1k]
  ------------------
  211|   434k|    lsf[i] = (float)(acos(lsp[i]) * SCALE1);
  ------------------
  |  |  206|   434k|#define SCALE1 (6400.0 / PI)
  |  |  ------------------
  |  |  |  |  153|   434k|#define PI 3.14159265358979323846264338327950288
  |  |  ------------------
  ------------------
  212|   434k|  }
  213|  27.1k|  return;
  214|  27.1k|}
ixheaacd_lpd_dec:
  354|  68.6k|                        WORD32 short_fac_flag, WORD32 bpf_control_info) {
  355|  68.6k|  FLOAT32 *synth_buf = usac_data->synth_buf;
  356|  68.6k|  FLOAT32 *xcitation_buff = usac_data->exc_buf;
  357|  68.6k|  FLOAT32 lsp_curr[ORDER];
  358|  68.6k|  FLOAT32 lsf_curr[ORDER];
  359|  68.6k|  FLOAT32 *lp_flt_coff_a = usac_data->lp_flt_coff;
  360|  68.6k|  FLOAT32 *synth, *xcitation_curr;
  361|  68.6k|  WORD32 *pitch = usac_data->pitch;
  362|  68.6k|  FLOAT32 *pitch_gain = usac_data->pitch_gain;
  363|  68.6k|  FLOAT32 lsf_flt[(2 * NUM_FRAMES + 1) * ORDER];
  364|       |
  365|  68.6k|  WORD32 i, k, tp, mode;
  366|  68.6k|  WORD32 *mod;
  367|  68.6k|  FLOAT32 gain, stability_factor = 0.0f;
  368|  68.6k|  FLOAT32 tmp, synth_corr, synth_energy;
  369|       |
  370|  68.6k|  WORD32 len_fr;
  371|  68.6k|  WORD32 len_subfrm;
  372|  68.6k|  WORD32 num_subfr;
  373|  68.6k|  WORD32 num_subfr_in_superfr;
  374|  68.6k|  WORD32 num_subfr_by2;
  375|  68.6k|  WORD32 synth_delay;
  376|  68.6k|  WORD32 num_samples = 0;
  377|       |
  378|  68.6k|  WORD32 *ptr_scratch = &usac_data->scratch_buffer[0];
  379|       |
  380|  68.6k|  WORD32 subfr_len = 0, n_subfr = 0;
  381|  68.6k|  WORD32 err = 0;
  382|  68.6k|  WORD32 ch = usac_data->present_chan;
  383|       |
  384|  68.6k|  len_fr = usac_data->ccfl;
  385|  68.6k|  len_subfrm = usac_data->len_subfrm;
  386|  68.6k|  num_subfr = usac_data->num_subfrm;
  387|  68.6k|  num_subfr_in_superfr = NUM_FRAMES * num_subfr;
  ------------------
  |  |   27|  68.6k|#define NUM_FRAMES 4
  ------------------
  388|  68.6k|  num_subfr_by2 = (num_subfr_in_superfr / 2) - 1;
  389|  68.6k|  synth_delay = num_subfr_by2 * LEN_SUBFR;
  ------------------
  |  |  118|  68.6k|#define LEN_SUBFR 64
  ------------------
  390|       |
  391|  68.6k|  synth = synth_buf + MAX_PITCH + synth_delay;
  ------------------
  |  |   55|  68.6k|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|  68.6k|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  68.6k|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|  68.6k|   (6 *           \
  |  |   57|  68.6k|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|  68.6k|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  68.6k|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  68.6k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  68.6k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  68.6k|#define TMIN 34
  |  |  ------------------
  ------------------
  392|  68.6k|  ixheaacd_mem_cpy(st->synth_prev, synth_buf, MAX_PITCH + synth_delay);
  ------------------
  |  |   55|  68.6k|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|  68.6k|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  68.6k|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|  68.6k|   (6 *           \
  |  |   57|  68.6k|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|  68.6k|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  68.6k|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  68.6k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  68.6k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  68.6k|#define TMIN 34
  |  |  ------------------
  ------------------
  393|  68.6k|  ixheaacd_memset(synth, SYNTH_DELAY_LMAX + LEN_SUPERFRAME - synth_delay);
  ------------------
  |  |   37|  68.6k|#define SYNTH_DELAY_LMAX ((NUM_SUBFR_SUPERFRAME_BY2 - 1) * LEN_SUBFR)
  |  |  ------------------
  |  |  |  |   36|  68.6k|#define NUM_SUBFR_SUPERFRAME_BY2 (NUM_SUBFR_SUPERFRAME / 2)
  |  |  |  |  ------------------
  |  |  |  |  |  |   35|  68.6k|#define NUM_SUBFR_SUPERFRAME 16
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define SYNTH_DELAY_LMAX ((NUM_SUBFR_SUPERFRAME_BY2 - 1) * LEN_SUBFR)
  |  |  ------------------
  |  |  |  |  118|  68.6k|#define LEN_SUBFR 64
  |  |  ------------------
  ------------------
                ixheaacd_memset(synth, SYNTH_DELAY_LMAX + LEN_SUPERFRAME - synth_delay);
  ------------------
  |  |   25|  68.6k|#define LEN_SUPERFRAME 1024
  ------------------
  394|       |
  395|  68.6k|  xcitation_curr = xcitation_buff + MAX_PITCH + INTER_LP_FIL_ORDER + 1;
  ------------------
  |  |   55|  68.6k|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|  68.6k|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  68.6k|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|  68.6k|   (6 *           \
  |  |   57|  68.6k|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|  68.6k|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  68.6k|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  68.6k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  68.6k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  68.6k|#define TMIN 34
  |  |  ------------------
  ------------------
                xcitation_curr = xcitation_buff + MAX_PITCH + INTER_LP_FIL_ORDER + 1;
  ------------------
  |  |   51|  68.6k|#define INTER_LP_FIL_ORDER 16
  ------------------
  396|  68.6k|  ixheaacd_mem_cpy(st->xcitation_prev, xcitation_buff,
  397|  68.6k|                   MAX_PITCH + INTER_LP_FIL_ORDER + 1);
  ------------------
  |  |   55|  68.6k|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|  68.6k|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  68.6k|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|  68.6k|   (6 *           \
  |  |   57|  68.6k|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|  68.6k|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  68.6k|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  68.6k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  68.6k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  68.6k|#define TMIN 34
  |  |  ------------------
  ------------------
                                 MAX_PITCH + INTER_LP_FIL_ORDER + 1);
  ------------------
  |  |   51|  68.6k|#define INTER_LP_FIL_ORDER 16
  ------------------
  398|  68.6k|  memset(xcitation_curr, 0, sizeof(FLOAT32) * (LEN_SUPERFRAME + 1));
  ------------------
  |  |   25|  68.6k|#define LEN_SUPERFRAME 1024
  ------------------
  399|       |
  400|  68.6k|  mod = pstr_td_frame_data->mod;
  401|  68.6k|  if (usac_data->frame_ok == 1) {
  ------------------
  |  Branch (401:7): [True: 68.6k, False: 0]
  ------------------
  402|  68.6k|    usac_data->num_lost_lpd_frames[usac_data->present_chan] = 0;
  403|  68.6k|  }
  404|       |
  405|  68.6k|  if (usac_data->ec_flag && usac_data->frame_ok == 0) {
  ------------------
  |  Branch (405:7): [True: 0, False: 68.6k]
  |  Branch (405:29): [True: 0, False: 0]
  ------------------
  406|      0|    ixheaacd_usac_lpc_ec(usac_data->lsp_coeff, usac_data->lpc4_lsf, usac_data->lsf_adaptive_mean,
  407|      0|                         first_lpd_flag);
  408|      0|  }
  409|   498k|  for (i = 0; i < num_subfr_by2; i++) {
  ------------------
  |  Branch (409:15): [True: 429k, False: 68.6k]
  ------------------
  410|   429k|    pitch[i] = st->pitch_prev[i];
  411|   429k|    pitch_gain[i] = st->gain_prev[i];
  412|   429k|  }
  413|  1.06M|  for (i = 0; i < num_subfr_in_superfr; i++) {
  ------------------
  |  Branch (413:15): [True: 996k, False: 68.6k]
  ------------------
  414|   996k|    pitch[i + num_subfr_by2] = 64;
  415|   996k|    pitch_gain[i + num_subfr_by2] = 0.0f;
  416|   996k|  }
  417|       |
  418|  68.6k|  if (usac_data->frame_ok) {
  ------------------
  |  Branch (418:7): [True: 68.6k, False: 0]
  ------------------
  419|  68.6k|    if (!first_lpd_flag) {
  ------------------
  |  Branch (419:9): [True: 27.1k, False: 41.4k]
  ------------------
  420|  27.1k|      ixheaacd_lsp_2_lsf_conversion(st->lspold, lsf_flt, ORDER);
  ------------------
  |  |   30|  27.1k|#define ORDER 16
  ------------------
  421|  27.1k|    }
  422|       |
  423|  68.6k|    ixheaacd_alg_vec_dequant(pstr_td_frame_data, first_lpd_flag, lsf_flt, pstr_td_frame_data->mod,
  424|  68.6k|                             usac_data->ec_flag);
  425|  68.6k|  }
  426|  68.6k|  if (usac_data->ec_flag && !(usac_data->frame_ok)) {
  ------------------
  |  Branch (426:7): [True: 0, False: 68.6k]
  |  Branch (426:29): [True: 0, False: 0]
  ------------------
  427|      0|    for (i = 0; i < 5; i++) {
  ------------------
  |  Branch (427:17): [True: 0, False: 0]
  ------------------
  428|      0|      memcpy(&lsf_flt[i * ORDER], &usac_data->lsp_coeff[i], ORDER * sizeof(lsf_flt[0]));
  ------------------
  |  |   30|      0|#define ORDER 16
  ------------------
                    memcpy(&lsf_flt[i * ORDER], &usac_data->lsp_coeff[i], ORDER * sizeof(lsf_flt[0]));
  ------------------
  |  |   30|      0|#define ORDER 16
  ------------------
  429|      0|    }
  430|      0|  }
  431|  68.6k|  if (first_lpd_flag) {
  ------------------
  |  Branch (431:7): [True: 41.4k, False: 27.1k]
  ------------------
  432|  41.4k|    ixheaacd_mem_cpy(&lsf_flt[0], st->lsf_prev, ORDER);
  ------------------
  |  |   30|  41.4k|#define ORDER 16
  ------------------
  433|  41.4k|    ixheaacd_lsf_2_lsp_conversion_float(st->lsf_prev, st->lspold, ORDER);
  ------------------
  |  |   30|  41.4k|#define ORDER 16
  ------------------
  434|  41.4k|  }
  435|       |
  436|  68.6k|  if ((first_lpd_flag && mod[0] == 0) || (first_lpd_flag && mod[1] == 0) ||
  ------------------
  |  Branch (436:8): [True: 41.4k, False: 27.1k]
  |  Branch (436:26): [True: 16.5k, False: 24.8k]
  |  Branch (436:43): [True: 24.8k, False: 27.1k]
  |  Branch (436:61): [True: 9.65k, False: 15.2k]
  ------------------
  437|  42.3k|      ((first_lpd_flag && mod[2] == 0 && len_subfrm != LEN_FRAME))) {
  ------------------
  |  |   26|  3.46k|#define LEN_FRAME 256
  ------------------
  |  Branch (437:9): [True: 15.2k, False: 27.1k]
  |  Branch (437:27): [True: 3.46k, False: 11.7k]
  |  Branch (437:42): [True: 1.40k, False: 2.05k]
  ------------------
  438|  27.6k|    FLOAT32 lp_flt_coeff_a[9 * (ORDER + 1)];
  439|  27.6k|    FLOAT32 tmp_buf[3 * LEN_FRAME + ORDER];
  440|  27.6k|    FLOAT32 tmp_res_buf[3 * LEN_FRAME];
  441|  27.6k|    FLOAT32 *tmp = &(tmp_buf[LEN_FRAME]);
  ------------------
  |  |   26|  27.6k|#define LEN_FRAME 256
  ------------------
  442|  27.6k|    FLOAT32 *ptr_tmp = &(tmp_res_buf[LEN_FRAME]);
  ------------------
  |  |   26|  27.6k|#define LEN_FRAME 256
  ------------------
  443|  27.6k|    WORD32 tmp_start;
  444|  27.6k|    FLOAT32 mem = 0;
  445|  27.6k|    WORD32 gain;
  446|  27.6k|    WORD32 length;
  447|       |
  448|  27.6k|    ixheaacd_interpolation_lsp_params(st->lspold, st->lspold, lp_flt_coeff_a,
  449|  27.6k|                                      8);
  450|       |
  451|  27.6k|    memcpy(st->lp_flt_coeff_a_prev, lp_flt_coeff_a,
  452|  27.6k|           (ORDER + 1) * sizeof(FLOAT32));
  ------------------
  |  |   30|  27.6k|#define ORDER 16
  ------------------
  453|  27.6k|    memcpy(st->lp_flt_coeff_a_prev + ORDER + 1, lp_flt_coeff_a,
  ------------------
  |  |   30|  27.6k|#define ORDER 16
  ------------------
  454|  27.6k|           (ORDER + 1) * sizeof(FLOAT32));
  ------------------
  |  |   30|  27.6k|#define ORDER 16
  ------------------
  455|       |
  456|  27.6k|    if (mod[0] == 0) {
  ------------------
  |  Branch (456:9): [True: 16.5k, False: 11.0k]
  ------------------
  457|  16.5k|      WORD32 fac_length;
  458|  16.5k|      if (short_fac_flag) {
  ------------------
  |  Branch (458:11): [True: 3.60k, False: 12.9k]
  ------------------
  459|  3.60k|        fac_length = (len_subfrm * NUM_FRAMES) / 16;
  ------------------
  |  |   27|  3.60k|#define NUM_FRAMES 4
  ------------------
  460|  12.9k|      } else {
  461|  12.9k|        fac_length = len_subfrm / 2;
  462|  12.9k|      }
  463|       |
  464|  16.5k|      if (usac_data->frame_ok == 0) {
  ------------------
  |  Branch (464:11): [True: 0, False: 16.5k]
  ------------------
  465|      0|        memset(&pstr_td_frame_data->fac_data[0], 0, sizeof(pstr_td_frame_data->fac_data));
  466|      0|      }
  467|  16.5k|      gain = ixheaacd_pow_10_i_by_128[pstr_td_frame_data->fac_data[0]];
  468|       |
  469|  16.5k|      memcpy(ptr_scratch, &pstr_td_frame_data->fac_data[0],
  470|  16.5k|             129 * sizeof(WORD32));
  471|       |
  472|   887k|      for (i = 0; i < fac_length / 2; i++) {
  ------------------
  |  Branch (472:19): [True: 870k, False: 16.5k]
  ------------------
  473|   870k|        pstr_td_frame_data->fac_data[i] = ptr_scratch[2 * i + 1] << 16;
  474|   870k|        pstr_td_frame_data->fac_data[fac_length / 2 + i] =
  475|   870k|            ptr_scratch[fac_length - 2 * i] << 16;
  476|   870k|      }
  477|       |
  478|  16.5k|      if (usac_data->ec_flag == 0) {
  ------------------
  |  Branch (478:11): [True: 16.5k, False: 0]
  ------------------
  479|  16.5k|        if (fac_length & (fac_length - 1)) {
  ------------------
  |  Branch (479:13): [True: 4.86k, False: 11.7k]
  ------------------
  480|  4.86k|          if ((fac_length != 48) && (fac_length != 96) && (fac_length != 192) &&
  ------------------
  |  Branch (480:15): [True: 4.49k, False: 366]
  |  Branch (480:37): [True: 0, False: 4.49k]
  |  Branch (480:59): [True: 0, False: 0]
  ------------------
  481|      0|              (fac_length != 384) && (fac_length != 768)) {
  ------------------
  |  Branch (481:15): [True: 0, False: 0]
  |  Branch (481:38): [True: 0, False: 0]
  ------------------
  482|      0|            return -1;
  483|      0|          }
  484|  4.86k|        }
  485|  16.5k|      }
  486|       |
  487|  16.5k|      ixheaacd_fwd_alias_cancel_tool(usac_data, pstr_td_frame_data, fac_length, lp_flt_coeff_a,
  488|  16.5k|                                     gain);
  489|       |
  490|  16.5k|      memset(&usac_data->overlap_data_ptr[usac_data->present_chan][(len_fr / 2)], 0,
  491|  16.5k|             fac_length * sizeof(WORD32));
  492|  16.5k|    }
  493|       |
  494|  12.8M|    for (i = 0; i < 2 * len_subfrm; i++)
  ------------------
  |  Branch (494:17): [True: 12.8M, False: 27.6k]
  ------------------
  495|  12.8M|      st->fd_synth[ORDER + i] = (FLOAT32)(
  ------------------
  |  |   30|  12.8M|#define ORDER 16
  ------------------
  496|  12.8M|          (FLOAT32)usac_data->overlap_data_ptr[usac_data->present_chan][i] /
  497|  12.8M|          16384.0);
  498|  27.6k|    num_samples = min(2 * len_subfrm, MAX_PITCH + synth_delay);
  ------------------
  |  |   75|  27.6k|#define min(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (75:20): [True: 27.6k, False: 0]
  |  |  ------------------
  ------------------
  499|       |
  500|  27.6k|    ixheaacd_mem_cpy(st->fd_synth + ORDER, synth - 2 * len_subfrm,
  ------------------
  |  |   30|  27.6k|#define ORDER 16
  ------------------
  501|  27.6k|                     2 * len_subfrm);
  502|       |
  503|  27.6k|    ixheaacd_preemphsis_tool_float(st->fd_synth + ORDER, PREEMPH_FILT_FAC,
  ------------------
  |  |   30|  27.6k|#define ORDER 16
  ------------------
                  ixheaacd_preemphsis_tool_float(st->fd_synth + ORDER, PREEMPH_FILT_FAC,
  ------------------
  |  |   61|  27.6k|#define PREEMPH_FILT_FAC 0.68f
  ------------------
  504|  27.6k|                                   2 * len_subfrm, mem);
  505|       |
  506|  27.6k|    ixheaacd_memset(tmp, ORDER);
  ------------------
  |  |   30|  27.6k|#define ORDER 16
  ------------------
  507|  27.6k|    ixheaacd_mem_cpy(st->fd_synth + ORDER, tmp + ORDER, 2 * len_subfrm);
  ------------------
  |  |   30|  27.6k|#define ORDER 16
  ------------------
                  ixheaacd_mem_cpy(st->fd_synth + ORDER, tmp + ORDER, 2 * len_subfrm);
  ------------------
  |  |   30|  27.6k|#define ORDER 16
  ------------------
  508|  27.6k|    tmp_start = 0;
  509|       |
  510|  27.6k|    ixheaacd_memset(ptr_tmp - len_subfrm, 3 * len_subfrm);
  511|  27.6k|    memset(st->fd_synth, 0, ORDER * sizeof(WORD32));
  ------------------
  |  |   30|  27.6k|#define ORDER 16
  ------------------
  512|  27.6k|    length = (2 * len_subfrm - tmp_start) / LEN_SUBFR;
  ------------------
  |  |  118|  27.6k|#define LEN_SUBFR 64
  ------------------
  513|       |
  514|  27.6k|    ixheaacd_residual_tool_float1(lp_flt_coeff_a,
  515|  27.6k|                                  &st->fd_synth[ORDER + tmp_start],
  ------------------
  |  |   30|  27.6k|#define ORDER 16
  ------------------
  516|  27.6k|                                  &ptr_tmp[tmp_start], LEN_SUBFR, length);
  ------------------
  |  |  118|  27.6k|#define LEN_SUBFR 64
  ------------------
  517|       |
  518|  27.6k|    if (mod[0] != 0 && (len_subfrm == LEN_FRAME || mod[1] != 0)) {
  ------------------
  |  |   26|  22.1k|#define LEN_FRAME 256
  ------------------
  |  Branch (518:9): [True: 11.0k, False: 16.5k]
  |  Branch (518:25): [True: 5.47k, False: 5.58k]
  |  Branch (518:52): [True: 1.40k, False: 4.18k]
  ------------------
  519|  6.88k|      num_samples = min(len_subfrm, MAX_PITCH + INTER_LP_FIL_ORDER + 1);
  ------------------
  |  |   75|  6.88k|#define min(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (75:20): [True: 6.88k, False: 0]
  |  |  ------------------
  ------------------
  520|  20.7k|    } else {
  521|  20.7k|      num_samples = min(2 * len_subfrm, MAX_PITCH + INTER_LP_FIL_ORDER + 1);
  ------------------
  |  |   75|  20.7k|#define min(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (75:20): [True: 9.04k, False: 11.7k]
  |  |  ------------------
  ------------------
  522|  20.7k|    }
  523|  27.6k|    ixheaacd_mem_cpy(ptr_tmp + 2 * len_subfrm - num_samples,
  524|  27.6k|                     xcitation_curr - num_samples, num_samples);
  525|  27.6k|  }
  526|       |
  527|  68.6k|  k = 0;
  528|       |
  529|   311k|  while (k < 4) {
  ------------------
  |  Branch (529:10): [True: 242k, False: 68.6k]
  ------------------
  530|   242k|    if (usac_data->ec_flag && usac_data->frame_ok == 0) {
  ------------------
  |  Branch (530:9): [True: 0, False: 242k]
  |  Branch (530:31): [True: 0, False: 0]
  ------------------
  531|      0|      if (mod[k] != 0 && usac_data->frame_ok == 0 &&
  ------------------
  |  Branch (531:11): [True: 0, False: 0]
  |  Branch (531:26): [True: 0, False: 0]
  ------------------
  532|      0|          usac_data->str_error_concealment[ch].prev_frame_ok[0] == 0 && k == 0) {
  ------------------
  |  Branch (532:11): [True: 0, False: 0]
  |  Branch (532:73): [True: 0, False: 0]
  ------------------
  533|      0|        memcpy(st->lspold, usac_data->lspold_ec, sizeof(st->lspold));
  534|      0|      }
  535|      0|      usac_data->num_lost_lpd_frames[usac_data->present_chan]++;
  536|      0|    }
  537|       |
  538|   242k|    mode = mod[k];
  539|   242k|    if ((st->mode_prev == 0) && (mode > 0) &&
  ------------------
  |  Branch (539:9): [True: 126k, False: 115k]
  |  Branch (539:33): [True: 56.0k, False: 70.6k]
  ------------------
  540|  56.0k|        (k != 0 || st->bpf_active_prev == 1)) {
  ------------------
  |  Branch (540:10): [True: 29.0k, False: 27.0k]
  |  Branch (540:20): [True: 4.16k, False: 22.8k]
  ------------------
  541|  33.1k|      i = (k * num_subfr) + num_subfr_by2;
  542|  33.1k|      pitch[i + 1] = pitch[i] = pitch[i - 1];
  543|  33.1k|      pitch_gain[i + 1] = pitch_gain[i] = pitch_gain[i - 1];
  544|  33.1k|    }
  545|   242k|    if (usac_data->frame_ok == 0) {
  ------------------
  |  Branch (545:9): [True: 0, False: 242k]
  ------------------
  546|      0|      memcpy(lsf_curr, &lsf_flt[(k + 1) * ORDER], ORDER * sizeof(FLOAT32));
  ------------------
  |  |   30|      0|#define ORDER 16
  ------------------
                    memcpy(lsf_curr, &lsf_flt[(k + 1) * ORDER], ORDER * sizeof(FLOAT32));
  ------------------
  |  |   30|      0|#define ORDER 16
  ------------------
  547|   242k|    } else {
  548|   242k|      if ((mode == 0) || (mode == 1))
  ------------------
  |  Branch (548:11): [True: 137k, False: 105k]
  |  Branch (548:26): [True: 74.4k, False: 31.1k]
  ------------------
  549|   211k|        memcpy(lsf_curr, &lsf_flt[(k + 1) * ORDER], ORDER * sizeof(FLOAT32));
  ------------------
  |  |   30|   211k|#define ORDER 16
  ------------------
                      memcpy(lsf_curr, &lsf_flt[(k + 1) * ORDER], ORDER * sizeof(FLOAT32));
  ------------------
  |  |   30|   211k|#define ORDER 16
  ------------------
  550|  31.1k|      else if (mode == 2)
  ------------------
  |  Branch (550:16): [True: 30.8k, False: 306]
  ------------------
  551|  30.8k|        memcpy(lsf_curr, &lsf_flt[(k + 2) * ORDER], ORDER * sizeof(FLOAT32));
  ------------------
  |  |   30|  30.8k|#define ORDER 16
  ------------------
                      memcpy(lsf_curr, &lsf_flt[(k + 2) * ORDER], ORDER * sizeof(FLOAT32));
  ------------------
  |  |   30|  30.8k|#define ORDER 16
  ------------------
  552|    306|      else
  553|    306|        memcpy(lsf_curr, &lsf_flt[(k + 4) * ORDER], ORDER * sizeof(FLOAT32));
  ------------------
  |  |   30|    306|#define ORDER 16
  ------------------
                      memcpy(lsf_curr, &lsf_flt[(k + 4) * ORDER], ORDER * sizeof(FLOAT32));
  ------------------
  |  |   30|    306|#define ORDER 16
  ------------------
  554|   242k|    }
  555|       |
  556|   242k|    ixheaacd_lsf_2_lsp_conversion_float(lsf_curr, lsp_curr, ORDER);
  ------------------
  |  |   30|   242k|#define ORDER 16
  ------------------
  557|   242k|    if (usac_data->frame_ok) {
  ------------------
  |  Branch (557:9): [True: 242k, False: 0]
  ------------------
  558|   242k|      tmp = 0.0f;
  559|  4.12M|      for (i = 0; i < ORDER; i++) {
  ------------------
  |  |   30|  4.12M|#define ORDER 16
  ------------------
  |  Branch (559:19): [True: 3.88M, False: 242k]
  ------------------
  560|  3.88M|        tmp += (lsf_curr[i] - st->lsf_prev[i]) * (lsf_curr[i] - st->lsf_prev[i]);
  561|  3.88M|      }
  562|   242k|      stability_factor = (FLOAT32)(1.25f - (tmp / 400000.0f));
  563|   242k|      if (stability_factor > 1.0f) {
  ------------------
  |  Branch (563:11): [True: 53.4k, False: 189k]
  ------------------
  564|  53.4k|        stability_factor = 1.0f;
  565|  53.4k|      }
  566|   242k|      if (stability_factor < 0.0f) {
  ------------------
  |  Branch (566:11): [True: 121k, False: 120k]
  ------------------
  567|   121k|        stability_factor = 0.0f;
  568|   121k|      }
  569|   242k|      if (usac_data->ec_flag) {
  ------------------
  |  Branch (569:11): [True: 0, False: 242k]
  ------------------
  570|      0|        usac_data->stability_factor_old = stability_factor;
  571|      0|      }
  572|   242k|    }
  573|   242k|    if (usac_data->ec_flag && !(usac_data->frame_ok)) {
  ------------------
  |  Branch (573:9): [True: 0, False: 242k]
  |  Branch (573:31): [True: 0, False: 0]
  ------------------
  574|      0|      stability_factor = usac_data->stability_factor_old;
  575|      0|    }
  576|   242k|    if (usac_data->frame_ok == 0) {
  ------------------
  |  Branch (576:9): [True: 0, False: 242k]
  ------------------
  577|      0|      mode = st->mode_prev;
  578|      0|    }
  579|   242k|    if ((usac_data->frame_ok == 1 && mode == 0) ||
  ------------------
  |  Branch (579:10): [True: 242k, False: 0]
  |  Branch (579:38): [True: 137k, False: 105k]
  ------------------
  580|   137k|        (usac_data->frame_ok == 0 && (st->mode_prev == 0 || st->mode_prev == 1))) {
  ------------------
  |  Branch (580:10): [True: 0, False: 105k]
  |  Branch (580:39): [True: 0, False: 0]
  |  Branch (580:61): [True: 0, False: 0]
  ------------------
  581|   137k|      ixheaacd_interpolation_lsp_params(st->lspold, lsp_curr, lp_flt_coff_a, num_subfr);
  582|       |
  583|   137k|      if (usac_data->frame_ok == 1 || (usac_data->frame_ok == 0 && st->mode_prev == 0)) {
  ------------------
  |  Branch (583:11): [True: 137k, False: 0]
  |  Branch (583:40): [True: 0, False: 0]
  |  Branch (583:68): [True: 0, False: 0]
  ------------------
  584|   137k|        ixheaacd_acelp_alias_cnx(usac_data, pstr_td_frame_data, k, lp_flt_coff_a,
  585|   137k|                                 stability_factor, st);
  586|   137k|      }
  587|       |
  588|   137k|      if (usac_data->frame_ok == 0 && st->mode_prev == 1) {
  ------------------
  |  Branch (588:11): [True: 0, False: 137k]
  |  Branch (588:39): [True: 0, False: 0]
  ------------------
  589|      0|        ixheaacd_usac_tcx_ec(usac_data, st, lsp_curr, k, lp_flt_coff_a);
  590|      0|      }
  591|       |
  592|   137k|      if ((st->mode_prev != 0) && bpf_control_info) {
  ------------------
  |  Branch (592:11): [True: 66.3k, False: 70.6k]
  |  Branch (592:35): [True: 22.2k, False: 44.1k]
  ------------------
  593|  22.2k|        i = (k * num_subfr) + num_subfr_by2;
  594|  22.2k|        pitch[i - 1] = pitch[i];
  595|  22.2k|        pitch_gain[i - 1] = pitch_gain[i];
  596|  22.2k|        if (st->mode_prev != -2) {
  ------------------
  |  Branch (596:13): [True: 21.2k, False: 955]
  ------------------
  597|  21.2k|          pitch[i - 2] = pitch[i];
  598|  21.2k|          pitch_gain[i - 2] = pitch_gain[i];
  599|  21.2k|        }
  600|  22.2k|      }
  601|   137k|      k++;
  602|   137k|    } else {
  603|   105k|      if (mode == 1) {
  ------------------
  |  Branch (603:11): [True: 74.4k, False: 31.1k]
  ------------------
  604|  74.4k|        subfr_len = len_subfrm;
  605|  74.4k|        n_subfr = num_subfr;
  606|  74.4k|      } else if (mode == 2) {
  ------------------
  |  Branch (606:18): [True: 30.8k, False: 306]
  ------------------
  607|  30.8k|        subfr_len = len_subfrm << 1;
  608|  30.8k|        n_subfr = num_subfr_in_superfr / 2;
  609|  30.8k|      } else if (mode == 3) {
  ------------------
  |  Branch (609:18): [True: 306, False: 0]
  ------------------
  610|    306|        subfr_len = len_subfrm << 2;
  611|    306|        n_subfr = num_subfr_in_superfr;
  612|    306|      } else {
  613|      0|        if (usac_data->frame_ok == 0) {
  ------------------
  |  Branch (613:13): [True: 0, False: 0]
  ------------------
  614|      0|          mode = 3;
  615|      0|          subfr_len = len_subfrm << 2;
  616|      0|          n_subfr = num_subfr_in_superfr;
  617|      0|        }
  618|      0|      }
  619|       |
  620|   105k|      ixheaacd_lpc_coef_gen(st->lspold, lsp_curr, lp_flt_coff_a, n_subfr,
  621|   105k|                            ORDER);
  ------------------
  |  |   30|   105k|#define ORDER 16
  ------------------
  622|       |
  623|   105k|      err = ixheaacd_tcx_mdct(usac_data, pstr_td_frame_data, k, lp_flt_coff_a,
  624|   105k|                              subfr_len, st);
  625|   105k|      if (err) return err;
  ------------------
  |  Branch (625:11): [True: 0, False: 105k]
  ------------------
  626|   105k|      if (usac_data->frame_ok == 1 && k == 2) {
  ------------------
  |  Branch (626:11): [True: 105k, False: 0]
  |  Branch (626:39): [True: 31.0k, False: 74.6k]
  ------------------
  627|  31.0k|        memcpy(usac_data->lp_flt_coff_a_ec, &lp_flt_coff_a[k * (ORDER + 1)],
  ------------------
  |  |   30|  31.0k|#define ORDER 16
  ------------------
  628|  31.0k|               sizeof(usac_data->lp_flt_coff_a_ec));
  629|  31.0k|      }
  630|   105k|      k += (1 << (mode - 1));
  631|   105k|    }
  632|       |
  633|   242k|    st->mode_prev = mode;
  634|   242k|    if (usac_data->frame_ok == 0) {
  ------------------
  |  Branch (634:9): [True: 0, False: 242k]
  ------------------
  635|      0|      memcpy(usac_data->lspold_ec, st->lspold, sizeof(st->lspold));
  636|      0|    }
  637|   242k|    ixheaacd_mem_cpy(lsp_curr, st->lspold, ORDER);
  ------------------
  |  |   30|   242k|#define ORDER 16
  ------------------
  638|   242k|    ixheaacd_mem_cpy(lsf_curr, st->lsf_prev, ORDER);
  ------------------
  |  |   30|   242k|#define ORDER 16
  ------------------
  639|   242k|  }
  640|       |
  641|  68.6k|  ixheaacd_mem_cpy(xcitation_buff + len_fr, st->xcitation_prev,
  642|  68.6k|                   MAX_PITCH + INTER_LP_FIL_ORDER + 1);
  ------------------
  |  |   55|  68.6k|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|  68.6k|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  68.6k|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|  68.6k|   (6 *           \
  |  |   57|  68.6k|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|  68.6k|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  68.6k|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  68.6k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  68.6k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  68.6k|#define TMIN 34
  |  |  ------------------
  ------------------
                                 MAX_PITCH + INTER_LP_FIL_ORDER + 1);
  ------------------
  |  |   51|  68.6k|#define INTER_LP_FIL_ORDER 16
  ------------------
  643|       |
  644|  68.6k|  ixheaacd_mem_cpy(synth_buf + len_fr, st->synth_prev, MAX_PITCH + synth_delay);
  ------------------
  |  |   55|  68.6k|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|  68.6k|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  68.6k|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|  68.6k|   (6 *           \
  |  |   57|  68.6k|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|  68.6k|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  68.6k|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  68.6k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  68.6k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  68.6k|#define TMIN 34
  |  |  ------------------
  ------------------
  645|       |
  646|  68.6k|  if (!bpf_control_info) {
  ------------------
  |  Branch (646:7): [True: 46.5k, False: 22.0k]
  ------------------
  647|  46.5k|    if (mod[0] != 0 && st->bpf_active_prev) {
  ------------------
  |  Branch (647:9): [True: 36.9k, False: 9.61k]
  |  Branch (647:24): [True: 2.36k, False: 34.5k]
  ------------------
  648|  32.8k|      for (i = 2; i < num_subfr_in_superfr; i++)
  ------------------
  |  Branch (648:19): [True: 30.4k, False: 2.36k]
  ------------------
  649|  30.4k|        pitch_gain[num_subfr_by2 + i] = 0.0;
  650|  44.1k|    } else {
  651|   678k|      for (i = 0; i < num_subfr_in_superfr; i++)
  ------------------
  |  Branch (651:19): [True: 633k, False: 44.1k]
  ------------------
  652|   633k|        pitch_gain[num_subfr_by2 + i] = 0.0;
  653|  44.1k|    }
  654|  46.5k|  }
  655|  68.6k|  st->bpf_active_prev = bpf_control_info;
  656|       |
  657|   498k|  for (i = 0; i < num_subfr_by2; i++) {
  ------------------
  |  Branch (657:15): [True: 429k, False: 68.6k]
  ------------------
  658|   429k|    st->pitch_prev[i] = pitch[num_subfr_in_superfr + i];
  659|   429k|    st->gain_prev[i] = pitch_gain[num_subfr_in_superfr + i];
  660|   429k|  }
  661|       |
  662|  68.6k|  synth = synth_buf + MAX_PITCH;
  ------------------
  |  |   55|  68.6k|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|  68.6k|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  68.6k|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|  68.6k|   (6 *           \
  |  |   57|  68.6k|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|  68.6k|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  68.6k|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  68.6k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  68.6k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  68.6k|#define TMIN 34
  |  |  ------------------
  ------------------
  663|       |
  664|  1.06M|  for (i = 0; i < num_subfr_in_superfr; i++) {
  ------------------
  |  Branch (664:15): [True: 996k, False: 68.6k]
  ------------------
  665|   996k|    tp = pitch[i];
  666|   996k|    gain = pitch_gain[i];
  667|   996k|    if (gain > 0.0f) {
  ------------------
  |  Branch (667:9): [True: 230k, False: 766k]
  ------------------
  668|   230k|      synth_corr = 0.0f, synth_energy = 1e-6f;
  669|   230k|      if ((((i * LEN_SUBFR) + LEN_SUBFR) > LEN_SUPERFRAME) ||
  ------------------
  |  |  118|   230k|#define LEN_SUBFR 64
  ------------------
                    if ((((i * LEN_SUBFR) + LEN_SUBFR) > LEN_SUPERFRAME) ||
  ------------------
  |  |  118|   230k|#define LEN_SUBFR 64
  ------------------
                    if ((((i * LEN_SUBFR) + LEN_SUBFR) > LEN_SUPERFRAME) ||
  ------------------
  |  |   25|   230k|#define LEN_SUPERFRAME 1024
  ------------------
  |  Branch (669:11): [True: 0, False: 230k]
  ------------------
  670|   230k|          ((((i * LEN_SUBFR) + LEN_SUBFR) - tp) > LEN_SUPERFRAME)) {
  ------------------
  |  |  118|   230k|#define LEN_SUBFR 64
  ------------------
                        ((((i * LEN_SUBFR) + LEN_SUBFR) - tp) > LEN_SUPERFRAME)) {
  ------------------
  |  |  118|   230k|#define LEN_SUBFR 64
  ------------------
                        ((((i * LEN_SUBFR) + LEN_SUBFR) - tp) > LEN_SUPERFRAME)) {
  ------------------
  |  |   25|   230k|#define LEN_SUPERFRAME 1024
  ------------------
  |  Branch (670:11): [True: 0, False: 230k]
  ------------------
  671|      0|        if (usac_data->ec_flag) {
  ------------------
  |  Branch (671:13): [True: 0, False: 0]
  ------------------
  672|      0|          tp = LEN_SUPERFRAME - LEN_SUBFR - (i * LEN_SUBFR);
  ------------------
  |  |   25|      0|#define LEN_SUPERFRAME 1024
  ------------------
                        tp = LEN_SUPERFRAME - LEN_SUBFR - (i * LEN_SUBFR);
  ------------------
  |  |  118|      0|#define LEN_SUBFR 64
  ------------------
                        tp = LEN_SUPERFRAME - LEN_SUBFR - (i * LEN_SUBFR);
  ------------------
  |  |  118|      0|#define LEN_SUBFR 64
  ------------------
  673|      0|        } else
  674|      0|          return -1;
  675|      0|      }
  676|  14.9M|      for (k = 0; k < LEN_SUBFR; k++) {
  ------------------
  |  |  118|  14.9M|#define LEN_SUBFR 64
  ------------------
  |  Branch (676:19): [True: 14.7M, False: 230k]
  ------------------
  677|  14.7M|        synth_corr +=
  678|  14.7M|            synth[i * LEN_SUBFR + k] * synth[(i * LEN_SUBFR) - tp + k];
  ------------------
  |  |  118|  14.7M|#define LEN_SUBFR 64
  ------------------
                          synth[i * LEN_SUBFR + k] * synth[(i * LEN_SUBFR) - tp + k];
  ------------------
  |  |  118|  14.7M|#define LEN_SUBFR 64
  ------------------
  679|  14.7M|        synth_energy +=
  680|  14.7M|            synth[(i * LEN_SUBFR) - tp + k] * synth[(i * LEN_SUBFR) - tp + k];
  ------------------
  |  |  118|  14.7M|#define LEN_SUBFR 64
  ------------------
                          synth[(i * LEN_SUBFR) - tp + k] * synth[(i * LEN_SUBFR) - tp + k];
  ------------------
  |  |  118|  14.7M|#define LEN_SUBFR 64
  ------------------
  681|  14.7M|      }
  682|   230k|      pitch_gain[i] = synth_corr / synth_energy;
  683|   230k|    }
  684|   996k|  }
  685|       |
  686|  68.6k|  if (mod[3] == 0) {
  ------------------
  |  Branch (686:7): [True: 45.1k, False: 23.4k]
  ------------------
  687|  45.1k|    err = ixheaacd_bass_post_filter(synth, pitch, pitch_gain, fsynth, len_fr, synth_delay,
  688|  45.1k|                                    st->bpf_prev, usac_data->ec_flag);
  689|  45.1k|  } else {
  690|  23.4k|    err = ixheaacd_bass_post_filter(synth, pitch, pitch_gain, fsynth, len_fr,
  691|  23.4k|                                    synth_delay - (len_subfrm / 2), st->bpf_prev,
  692|  23.4k|                                    usac_data->ec_flag);
  693|  23.4k|  }
  694|  68.6k|  if (err) return err;
  ------------------
  |  Branch (694:7): [True: 20, False: 68.6k]
  ------------------
  695|  68.6k|  if (usac_data->ec_flag && usac_data->frame_ok) {
  ------------------
  |  Branch (695:7): [True: 0, False: 68.6k]
  |  Branch (695:29): [True: 0, False: 0]
  ------------------
  696|      0|    memcpy(usac_data->lpc4_lsf, pstr_td_frame_data->lpc4_lsf, sizeof(usac_data->lpc4_lsf));
  697|      0|    memcpy(usac_data->str_error_concealment[ch].lsf4, usac_data->lpc4_lsf,
  698|      0|           sizeof(usac_data->lpc4_lsf));
  699|      0|    memcpy(usac_data->lsf_adaptive_mean, pstr_td_frame_data->lsf_adaptive_mean_cand,
  700|      0|           sizeof(usac_data->lsf_adaptive_mean));
  701|      0|  }
  702|  68.6k|  return err;
  703|  68.6k|}
ixheaacd_lpd_dec_update:
  706|  13.5k|                             ia_usac_data_struct *usac_data, WORD32 i_ch) {
  707|  13.5k|  WORD32 i, k;
  708|       |
  709|  13.5k|  WORD32 *ptr_overlap = &usac_data->overlap_data_ptr[i_ch][0];
  710|  13.5k|  WORD32 len_fr, lpd_sbf_len, lpd_delay, num_subfr_by2, synth_delay, fac_length;
  711|       |
  712|  13.5k|  if (usac_data->tw_mdct[0])
  ------------------
  |  Branch (712:7): [True: 0, False: 13.5k]
  ------------------
  713|      0|    ptr_overlap = &usac_data->overlap_data_ptr[i_ch][usac_data->ccfl / 2];
  714|       |
  715|  13.5k|  len_fr = usac_data->ccfl;
  716|  13.5k|  lpd_sbf_len = (NUM_FRAMES * usac_data->num_subfrm) / 2;
  ------------------
  |  |   27|  13.5k|#define NUM_FRAMES 4
  ------------------
  717|  13.5k|  lpd_delay = lpd_sbf_len * LEN_SUBFR;
  ------------------
  |  |  118|  13.5k|#define LEN_SUBFR 64
  ------------------
  718|  13.5k|  num_subfr_by2 = lpd_sbf_len - 1;
  719|  13.5k|  synth_delay = num_subfr_by2 * LEN_SUBFR;
  ------------------
  |  |  118|  13.5k|#define LEN_SUBFR 64
  ------------------
  720|  13.5k|  fac_length = (usac_data->len_subfrm) / 2;
  721|       |
  722|  6.70M|  for (i = 0; i < LEN_SUBFR + synth_delay; i++)
  ------------------
  |  |  118|  6.70M|#define LEN_SUBFR 64
  ------------------
  |  Branch (722:15): [True: 6.69M, False: 13.5k]
  ------------------
  723|  6.69M|    ptr_overlap[i] = (WORD32)(
  724|  6.69M|        (FLOAT32)tddec->synth_prev[MAX_PITCH - (LEN_SUBFR) + i] * 16384.0);
  ------------------
  |  |   55|  6.69M|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|  6.69M|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  6.69M|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|  6.69M|   (6 *           \
  |  |   57|  6.69M|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|  6.69M|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  6.69M|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  6.69M|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  6.69M|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  6.69M|#define TMIN 34
  |  |  ------------------
  ------------------
                      (FLOAT32)tddec->synth_prev[MAX_PITCH - (LEN_SUBFR) + i] * 16384.0);
  ------------------
  |  |  118|  6.69M|#define LEN_SUBFR 64
  ------------------
  725|       |
  726|  13.5k|  ptr_overlap += LEN_SUBFR + synth_delay - fac_length;
  ------------------
  |  |  118|  13.5k|#define LEN_SUBFR 64
  ------------------
  727|       |
  728|  3.35M|  for (k = 0; k < 2 * fac_length; k++)
  ------------------
  |  Branch (728:15): [True: 3.34M, False: 13.5k]
  ------------------
  729|  3.34M|    ptr_overlap[k] = (WORD32)((FLOAT32)tddec->exc_prev[k + 1] * 16384.0);
  730|       |
  731|  13.5k|  ptr_overlap = &usac_data->overlap_data_ptr[i_ch][lpd_delay + fac_length];
  732|       |
  733|  5.03M|  for (i = 0; i < len_fr - lpd_delay - fac_length; i++) ptr_overlap[i] = 0;
  ------------------
  |  Branch (733:15): [True: 5.01M, False: 13.5k]
  ------------------
  734|       |
  735|  13.5k|  usac_data->window_shape[i_ch] = WIN_SEL_0;
  ------------------
  |  |   91|  13.5k|#define WIN_SEL_0 0
  ------------------
  736|  13.5k|  usac_data->window_sequence_last[i_ch] = EIGHT_SHORT_SEQUENCE;
  ------------------
  |  |  102|  13.5k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  737|  13.5k|  usac_data->td_frame_prev[i_ch] = 1;
  738|       |
  739|  13.5k|  if (tddec->mode_prev == 0) {
  ------------------
  |  Branch (739:7): [True: 9.44k, False: 4.15k]
  ------------------
  740|  9.44k|    memmove(usac_data->lpc_prev[i_ch], &tddec->lp_flt_coeff_a_prev[ORDER + 1],
  ------------------
  |  |   30|  9.44k|#define ORDER 16
  ------------------
  741|  9.44k|            (ORDER + 1) * sizeof(FLOAT32));
  ------------------
  |  |   30|  9.44k|#define ORDER 16
  ------------------
  742|  9.44k|    memmove(usac_data->acelp_in[i_ch], tddec->exc_prev,
  743|  9.44k|            (1 + (2 * FAC_LENGTH)) * sizeof(FLOAT32));
  ------------------
  |  |   33|  9.44k|#define FAC_LENGTH 128
  ------------------
  744|  9.44k|  }
  745|       |
  746|  13.5k|  return;
  747|  13.5k|}
ixheaacd_lpd_bpf_fix:
  751|  27.8k|                            ia_usac_lpd_decoder_handle st) {
  752|  27.8k|  WORD32 i, tp, k;
  753|  27.8k|  float synth_buf[MAX_PITCH + SYNTH_DELAY_LMAX + LEN_SUPERFRAME];
  754|  27.8k|  float signal_out[LEN_SUPERFRAME];
  755|  27.8k|  float *synth, synth_corr, synth_energy;
  756|  27.8k|  WORD32 pitch[NUM_SUBFR_SUPERFRAME_BY2 + 3];
  757|  27.8k|  float pitch_gain[NUM_SUBFR_SUPERFRAME_BY2 + 3];
  758|  27.8k|  WORD32 len_fr, lpd_sbf_len, num_subfr_by2, synth_delay;
  759|  27.8k|  WORD32 err = 0;
  760|       |
  761|  27.8k|  len_fr = usac_data->ccfl;
  762|  27.8k|  lpd_sbf_len = (NUM_FRAMES * usac_data->num_subfrm) / 2;
  ------------------
  |  |   27|  27.8k|#define NUM_FRAMES 4
  ------------------
  763|  27.8k|  num_subfr_by2 = lpd_sbf_len - 1;
  764|  27.8k|  synth_delay = num_subfr_by2 * LEN_SUBFR;
  ------------------
  |  |  118|  27.8k|#define LEN_SUBFR 64
  ------------------
  765|       |
  766|  27.8k|  ixheaacd_memset(synth_buf, MAX_PITCH + synth_delay + len_fr);
  ------------------
  |  |   55|  27.8k|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|  27.8k|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  27.8k|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|  27.8k|   (6 *           \
  |  |   57|  27.8k|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|  27.8k|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  27.8k|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  27.8k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  27.8k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  27.8k|#define TMIN 34
  |  |  ------------------
  ------------------
  767|  27.8k|  ixheaacd_mem_cpy(st->synth_prev, synth_buf, MAX_PITCH + synth_delay);
  ------------------
  |  |   55|  27.8k|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|  27.8k|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  27.8k|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|  27.8k|   (6 *           \
  |  |   57|  27.8k|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|  27.8k|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  27.8k|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  27.8k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  27.8k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  27.8k|#define TMIN 34
  |  |  ------------------
  ------------------
  768|  27.8k|  ixheaacd_mem_cpy(out_buffer, synth_buf + MAX_PITCH - (LEN_SUBFR),
  ------------------
  |  |   55|  27.8k|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|  27.8k|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  27.8k|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|  27.8k|   (6 *           \
  |  |   57|  27.8k|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|  27.8k|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  27.8k|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  27.8k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  27.8k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  27.8k|#define TMIN 34
  |  |  ------------------
  ------------------
                ixheaacd_mem_cpy(out_buffer, synth_buf + MAX_PITCH - (LEN_SUBFR),
  ------------------
  |  |  118|  27.8k|#define LEN_SUBFR 64
  ------------------
  769|  27.8k|                   synth_delay + len_fr + (LEN_SUBFR));
  ------------------
  |  |  118|  27.8k|#define LEN_SUBFR 64
  ------------------
  770|       |
  771|   211k|  for (i = 0; i < num_subfr_by2; i++) {
  ------------------
  |  Branch (771:15): [True: 183k, False: 27.8k]
  ------------------
  772|   183k|    pitch[i] = st->pitch_prev[i];
  773|   183k|    pitch_gain[i] = st->gain_prev[i];
  774|   183k|  }
  775|   139k|  for (i = num_subfr_by2; i < lpd_sbf_len + 3; i++) {
  ------------------
  |  Branch (775:27): [True: 111k, False: 27.8k]
  ------------------
  776|   111k|    pitch[i] = 64;
  777|   111k|    pitch_gain[i] = 0.0f;
  778|   111k|  }
  779|  27.8k|  if (st->mode_prev == 0) {
  ------------------
  |  Branch (779:7): [True: 19.4k, False: 8.37k]
  ------------------
  780|  19.4k|    pitch[num_subfr_by2] = pitch[num_subfr_by2 - 1];
  781|  19.4k|    pitch_gain[num_subfr_by2] = pitch_gain[num_subfr_by2 - 1];
  782|  19.4k|    if (!is_short_flag) {
  ------------------
  |  Branch (782:9): [True: 11.1k, False: 8.24k]
  ------------------
  783|  11.1k|      pitch[num_subfr_by2 + 1] = pitch[num_subfr_by2];
  784|  11.1k|      pitch_gain[num_subfr_by2 + 1] = pitch_gain[num_subfr_by2];
  785|  11.1k|    }
  786|  19.4k|  }
  787|       |
  788|  27.8k|  synth = synth_buf + MAX_PITCH;
  ------------------
  |  |   55|  27.8k|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|  27.8k|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  27.8k|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|  27.8k|   (6 *           \
  |  |   57|  27.8k|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|  27.8k|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  27.8k|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  27.8k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  27.8k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  27.8k|#define TMIN 34
  |  |  ------------------
  ------------------
  789|       |
  790|   266k|  for (i = 0; i < num_subfr_by2 + 2; i++) {
  ------------------
  |  Branch (790:15): [True: 239k, False: 27.8k]
  ------------------
  791|   239k|    tp = pitch[i];
  792|   239k|    if ((i * LEN_SUBFR + MAX_PITCH) < tp) {
  ------------------
  |  |  118|   239k|#define LEN_SUBFR 64
  ------------------
                  if ((i * LEN_SUBFR + MAX_PITCH) < tp) {
  ------------------
  |  |   55|   239k|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|   239k|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|   239k|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|   239k|   (6 *           \
  |  |   57|   239k|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|   239k|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|   239k|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|   239k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|   239k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|   239k|#define TMIN 34
  |  |  ------------------
  ------------------
  |  Branch (792:9): [True: 6, False: 239k]
  ------------------
  793|      6|      if (usac_data->ec_flag == 0)
  ------------------
  |  Branch (793:11): [True: 6, False: 0]
  ------------------
  794|      6|        return -1;
  795|      0|      else {
  796|      0|        tp = MAX_PITCH - (i * LEN_SUBFR);
  ------------------
  |  |   55|      0|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|      0|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|      0|   (6 *           \
  |  |   57|      0|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|      0|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|      0|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|      0|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|      0|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|      0|#define TMIN 34
  |  |  ------------------
  ------------------
                      tp = MAX_PITCH - (i * LEN_SUBFR);
  ------------------
  |  |  118|      0|#define LEN_SUBFR 64
  ------------------
  797|      0|      }
  798|   239k|    } else if (((i * LEN_SUBFR + MAX_PITCH - tp) >= 1883) ||
  ------------------
  |  |  118|   239k|#define LEN_SUBFR 64
  ------------------
                  } else if (((i * LEN_SUBFR + MAX_PITCH - tp) >= 1883) ||
  ------------------
  |  |   55|   239k|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|   239k|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|   239k|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|   239k|   (6 *           \
  |  |   57|   239k|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|   239k|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|   239k|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|   239k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|   239k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|   239k|#define TMIN 34
  |  |  ------------------
  ------------------
  |  Branch (798:16): [True: 0, False: 239k]
  ------------------
  799|   239k|               (((i * LEN_SUBFR) + LEN_SUBFR) > LEN_SUPERFRAME) ||
  ------------------
  |  |  118|   239k|#define LEN_SUBFR 64
  ------------------
                             (((i * LEN_SUBFR) + LEN_SUBFR) > LEN_SUPERFRAME) ||
  ------------------
  |  |  118|   239k|#define LEN_SUBFR 64
  ------------------
                             (((i * LEN_SUBFR) + LEN_SUBFR) > LEN_SUPERFRAME) ||
  ------------------
  |  |   25|   239k|#define LEN_SUPERFRAME 1024
  ------------------
  |  Branch (799:16): [True: 0, False: 239k]
  ------------------
  800|   239k|               ((((i * LEN_SUBFR) + LEN_SUBFR) - tp) > LEN_SUPERFRAME)) {
  ------------------
  |  |  118|   239k|#define LEN_SUBFR 64
  ------------------
                             ((((i * LEN_SUBFR) + LEN_SUBFR) - tp) > LEN_SUPERFRAME)) {
  ------------------
  |  |  118|   239k|#define LEN_SUBFR 64
  ------------------
                             ((((i * LEN_SUBFR) + LEN_SUBFR) - tp) > LEN_SUPERFRAME)) {
  ------------------
  |  |   25|   239k|#define LEN_SUPERFRAME 1024
  ------------------
  |  Branch (800:16): [True: 0, False: 239k]
  ------------------
  801|      0|      if (usac_data->ec_flag == 0)
  ------------------
  |  Branch (801:11): [True: 0, False: 0]
  ------------------
  802|      0|        return -1;
  803|      0|      else {
  804|      0|        tp = (i * LEN_SUBFR + MAX_PITCH - 1882);
  ------------------
  |  |  118|      0|#define LEN_SUBFR 64
  ------------------
                      tp = (i * LEN_SUBFR + MAX_PITCH - 1882);
  ------------------
  |  |   55|      0|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|      0|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|      0|   (6 *           \
  |  |   57|      0|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|      0|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|      0|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|      0|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|      0|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|      0|#define TMIN 34
  |  |  ------------------
  ------------------
  805|      0|      }
  806|      0|    }
  807|       |
  808|   239k|    if (pitch_gain[i] > 0.0f) {
  ------------------
  |  Branch (808:9): [True: 23.2k, False: 215k]
  ------------------
  809|  23.2k|      synth_corr = 0.0f, synth_energy = 1e-6f;
  810|  1.50M|      for (k = 0; k < LEN_SUBFR; k++) {
  ------------------
  |  |  118|  1.50M|#define LEN_SUBFR 64
  ------------------
  |  Branch (810:19): [True: 1.48M, False: 23.2k]
  ------------------
  811|  1.48M|        synth_corr +=
  812|  1.48M|            synth[i * LEN_SUBFR + k] * synth[(i * LEN_SUBFR) - tp + k];
  ------------------
  |  |  118|  1.48M|#define LEN_SUBFR 64
  ------------------
                          synth[i * LEN_SUBFR + k] * synth[(i * LEN_SUBFR) - tp + k];
  ------------------
  |  |  118|  1.48M|#define LEN_SUBFR 64
  ------------------
  813|  1.48M|        synth_energy +=
  814|  1.48M|            synth[(i * LEN_SUBFR) - tp + k] * synth[(i * LEN_SUBFR) - tp + k];
  ------------------
  |  |  118|  1.48M|#define LEN_SUBFR 64
  ------------------
                          synth[(i * LEN_SUBFR) - tp + k] * synth[(i * LEN_SUBFR) - tp + k];
  ------------------
  |  |  118|  1.48M|#define LEN_SUBFR 64
  ------------------
  815|  1.48M|      }
  816|  23.2k|      pitch_gain[i] = synth_corr / synth_energy;
  817|  23.2k|    }
  818|   239k|  }
  819|       |
  820|  27.8k|  err = ixheaacd_bass_post_filter(
  821|  27.8k|      synth, pitch, pitch_gain, signal_out, (lpd_sbf_len + 2) * LEN_SUBFR + LEN_SUBFR,
  ------------------
  |  |  118|  27.8k|#define LEN_SUBFR 64
  ------------------
                    synth, pitch, pitch_gain, signal_out, (lpd_sbf_len + 2) * LEN_SUBFR + LEN_SUBFR,
  ------------------
  |  |  118|  27.8k|#define LEN_SUBFR 64
  ------------------
  822|  27.8k|      len_fr - (lpd_sbf_len + 4) * LEN_SUBFR, st->bpf_prev, usac_data->ec_flag);
  ------------------
  |  |  118|  27.8k|#define LEN_SUBFR 64
  ------------------
  823|  27.8k|  if (err != 0) return err;
  ------------------
  |  Branch (823:7): [True: 15, False: 27.7k]
  ------------------
  824|       |
  825|  27.7k|  ixheaacd_mem_cpy(signal_out, out_buffer,
  826|  27.7k|                   (lpd_sbf_len + 2) * LEN_SUBFR + LEN_SUBFR);
  ------------------
  |  |  118|  27.7k|#define LEN_SUBFR 64
  ------------------
                                 (lpd_sbf_len + 2) * LEN_SUBFR + LEN_SUBFR);
  ------------------
  |  |  118|  27.7k|#define LEN_SUBFR 64
  ------------------
  827|  27.7k|  return err;
  828|  27.8k|}
ixheaacd_lpc.c:ixheaacd_mult32_m:
   91|  2.99M|static PLATFORM_INLINE WORD32 ixheaacd_mult32_m(WORD32 a, WORD32 b) {
   92|  2.99M|  WORD32 result;
   93|  2.99M|  WORD64 temp_result;
   94|       |
   95|  2.99M|  temp_result = (WORD64)a * (WORD64)b;
   96|  2.99M|  result = (WORD32)(temp_result >> 31);
   97|       |
   98|  2.99M|  return (result);
   99|  2.99M|}
ixheaacd_lpc.c:ixheaacd_lsf_2_lsp_conversion_float:
  217|   284k|                                                WORD32 m) {
  218|   284k|  WORD32 i;
  219|  4.83M|  for (i = 0; i < m; i++)
  ------------------
  |  Branch (219:15): [True: 4.54M, False: 284k]
  ------------------
  220|  4.54M|    lsp[i] = (FLOAT32)cos((double)lsf[i] * (double)PI_BY_6400);
  ------------------
  |  |  205|  4.54M|#define PI_BY_6400 (PI / 6400.0)
  |  |  ------------------
  |  |  |  |  153|  4.54M|#define PI 3.14159265358979323846264338327950288
  |  |  ------------------
  ------------------
  221|       |
  222|   284k|  return;
  223|   284k|}
ixheaacd_lpc.c:ixheaacd_bass_post_filter:
  227|  96.4k|                                        FLOAT32 bpf_prev[], WORD32 ec_flag) {
  228|  96.4k|  WORD32 i, j, sf, num_subfr, pitch_lag, lg;
  229|  96.4k|  FLOAT32 x_energy, xy_corr, y_energy, norm_corr, energy, gain, tmp, alpha;
  230|  96.4k|  FLOAT32 noise_buf[FILTER_DELAY + (2 * LEN_SUBFR)], *noise_tmp1, *noise_tmp2,
  231|  96.4k|      *x, *y;
  232|       |
  233|  96.4k|  noise_tmp1 = noise_buf + FILTER_DELAY;
  ------------------
  |  |   43|  96.4k|#define FILTER_DELAY 12
  ------------------
  234|  96.4k|  noise_tmp2 = noise_buf + FILTER_DELAY + LEN_SUBFR;
  ------------------
  |  |   43|  96.4k|#define FILTER_DELAY 12
  ------------------
                noise_tmp2 = noise_buf + FILTER_DELAY + LEN_SUBFR;
  ------------------
  |  |  118|  96.4k|#define LEN_SUBFR 64
  ------------------
  235|       |
  236|  96.4k|  memcpy(synth_out, synth_sig - LEN_SUBFR, len_fr * sizeof(FLOAT32));
  ------------------
  |  |  118|  96.4k|#define LEN_SUBFR 64
  ------------------
  237|       |
  238|  96.4k|  if (len_fr % 64)
  ------------------
  |  Branch (238:7): [True: 0, False: 96.4k]
  ------------------
  239|      0|    memset(synth_out + len_fr, 0, (LEN_SUBFR - len_fr % 64) * sizeof(FLOAT32));
  ------------------
  |  |  118|      0|#define LEN_SUBFR 64
  ------------------
  240|       |
  241|  96.4k|  sf = 0;
  242|  1.38M|  for (num_subfr = 0; num_subfr < len_fr; num_subfr += LEN_SUBFR, sf++) {
  ------------------
  |  |  118|  1.29M|#define LEN_SUBFR 64
  ------------------
  |  Branch (242:23): [True: 1.29M, False: 96.3k]
  ------------------
  243|  1.29M|    pitch_lag = pitch[sf];
  244|  1.29M|    gain = pitch_gain[sf];
  245|  1.29M|    if (((pitch_lag >> 1) + 96 - num_subfr) > MAX_PITCH) {
  ------------------
  |  |   55|  1.29M|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|  1.29M|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  1.29M|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|  1.29M|   (6 *           \
  |  |   57|  1.29M|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|  1.29M|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  1.29M|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  1.29M|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  1.29M|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  1.29M|#define TMIN 34
  |  |  ------------------
  ------------------
  |  Branch (245:9): [True: 1, False: 1.29M]
  ------------------
  246|      1|      if (ec_flag) {
  ------------------
  |  Branch (246:11): [True: 0, False: 1]
  ------------------
  247|      0|        pitch_lag = (MAX_PITCH + num_subfr - 96) << 1;
  ------------------
  |  |   55|      0|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|      0|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|      0|   (6 *           \
  |  |   57|      0|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|      0|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|      0|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|      0|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|      0|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|      0|#define TMIN 34
  |  |  ------------------
  ------------------
  248|      1|      } else {
  249|      1|        return -1;
  250|      1|      }
  251|      1|    }
  252|  1.29M|    if (gain > 1.0f) gain = 1.0f;
  ------------------
  |  Branch (252:9): [True: 22.4k, False: 1.26M]
  ------------------
  253|  1.29M|    if (gain < 0.0f) gain = 0.0f;
  ------------------
  |  Branch (253:9): [True: 51.6k, False: 1.23M]
  ------------------
  254|       |
  255|  1.29M|    x = &synth_sig[num_subfr - 96];
  256|  1.29M|    y = &synth_sig[num_subfr - pitch_lag / 2 - 96];
  257|       |
  258|  1.29M|    x_energy = 0.01f;
  259|  1.29M|    xy_corr = 0.01f;
  260|  1.29M|    y_energy = 0.01f;
  261|   207M|    for (i = 0; i < LEN_SUBFR + 96; i++) {
  ------------------
  |  |  118|   207M|#define LEN_SUBFR 64
  ------------------
  |  Branch (261:17): [True: 206M, False: 1.29M]
  ------------------
  262|   206M|      x_energy += x[i] * x[i];
  263|   206M|      xy_corr += x[i] * y[i];
  264|   206M|      y_energy += y[i] * y[i];
  265|   206M|    }
  266|       |
  267|  1.29M|    norm_corr = xy_corr / (FLOAT32)sqrt(x_energy * y_energy);
  268|       |
  269|  1.29M|    if (norm_corr > 0.95f) pitch_lag >>= 1;
  ------------------
  |  Branch (269:9): [True: 269k, False: 1.02M]
  ------------------
  270|       |
  271|  1.29M|    lg = len_fr + len2 - pitch_lag - num_subfr;
  272|  1.29M|    if (lg < 0) lg = 0;
  ------------------
  |  Branch (272:9): [True: 139, False: 1.29M]
  ------------------
  273|  1.29M|    if (lg > LEN_SUBFR) lg = LEN_SUBFR;
  ------------------
  |  |  118|  1.29M|#define LEN_SUBFR 64
  ------------------
                  if (lg > LEN_SUBFR) lg = LEN_SUBFR;
  ------------------
  |  |  118|  1.29M|#define LEN_SUBFR 64
  ------------------
  |  Branch (273:9): [True: 1.29M, False: 409]
  ------------------
  274|       |
  275|  1.29M|    if (pitch_lag > MAX_PITCH) {
  ------------------
  |  |   55|  1.29M|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|  1.29M|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  1.29M|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|  1.29M|   (6 *           \
  |  |   57|  1.29M|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|  1.29M|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  1.29M|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  1.29M|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|  1.29M|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|  1.29M|#define TMIN 34
  |  |  ------------------
  ------------------
  |  Branch (275:9): [True: 34, False: 1.29M]
  ------------------
  276|     34|      if (ec_flag) {
  ------------------
  |  Branch (276:11): [True: 0, False: 34]
  ------------------
  277|      0|        pitch_lag = MAX_PITCH;
  ------------------
  |  |   55|      0|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|      0|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|      0|   (6 *           \
  |  |   57|      0|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|      0|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|      0|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|      0|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|      0|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|      0|#define TMIN 34
  |  |  ------------------
  ------------------
  278|     34|      } else {
  279|     34|        return -1;
  280|     34|      }
  281|     34|    }
  282|       |
  283|  1.29M|    if (gain > 0) {
  ------------------
  |  Branch (283:9): [True: 148k, False: 1.14M]
  ------------------
  284|   148k|      if (lg > 0) {
  ------------------
  |  Branch (284:11): [True: 148k, False: 68]
  ------------------
  285|   148k|        tmp = 0.01f;
  286|  9.63M|        for (i = 0; i < lg; i++) {
  ------------------
  |  Branch (286:21): [True: 9.48M, False: 148k]
  ------------------
  287|  9.48M|          tmp += synth_sig[i + num_subfr] * synth_sig[i + num_subfr];
  288|  9.48M|        }
  289|   148k|        energy = 0.01f;
  290|  9.63M|        for (i = 0; i < lg; i++) {
  ------------------
  |  Branch (290:21): [True: 9.48M, False: 148k]
  ------------------
  291|  9.48M|          energy += synth_sig[i + num_subfr + pitch_lag] *
  292|  9.48M|                    synth_sig[i + num_subfr + pitch_lag];
  293|  9.48M|        }
  294|   148k|        tmp = (FLOAT32)sqrt(tmp / energy);
  295|   148k|        if (tmp < gain) gain = tmp;
  ------------------
  |  Branch (295:13): [True: 30.5k, False: 117k]
  ------------------
  296|   148k|      }
  297|       |
  298|   148k|      alpha = 0.5f * gain;
  299|  9.63M|      for (i = 0; i < lg; i++) {
  ------------------
  |  Branch (299:19): [True: 9.48M, False: 148k]
  ------------------
  300|  9.48M|        noise_tmp2[i] = alpha * (synth_sig[i + num_subfr] -
  301|  9.48M|                                 0.5f * synth_sig[i + num_subfr - pitch_lag] -
  302|  9.48M|                                 0.5f * synth_sig[i + num_subfr + pitch_lag]);
  303|  9.48M|      }
  304|   156k|      for (i = lg; i < LEN_SUBFR; i++) {
  ------------------
  |  |  118|   156k|#define LEN_SUBFR 64
  ------------------
  |  Branch (304:20): [True: 8.30k, False: 148k]
  ------------------
  305|  8.30k|        noise_tmp2[i] = alpha * (synth_sig[i + num_subfr] -
  306|  8.30k|                                 synth_sig[i + num_subfr - pitch_lag]);
  307|  8.30k|      }
  308|  1.14M|    } else {
  309|  1.14M|      memset(noise_tmp2, 0, LEN_SUBFR * sizeof(FLOAT32));
  ------------------
  |  |  118|  1.14M|#define LEN_SUBFR 64
  ------------------
  310|  1.14M|    }
  311|       |
  312|  1.29M|    memcpy(noise_buf, bpf_prev, (FILTER_DELAY + LEN_SUBFR) * sizeof(FLOAT32));
  ------------------
  |  |   43|  1.29M|#define FILTER_DELAY 12
  ------------------
                  memcpy(noise_buf, bpf_prev, (FILTER_DELAY + LEN_SUBFR) * sizeof(FLOAT32));
  ------------------
  |  |  118|  1.29M|#define LEN_SUBFR 64
  ------------------
  313|  1.29M|    memcpy(bpf_prev, noise_buf + LEN_SUBFR,
  ------------------
  |  |  118|  1.29M|#define LEN_SUBFR 64
  ------------------
  314|  1.29M|           (FILTER_DELAY + LEN_SUBFR) * sizeof(FLOAT32));
  ------------------
  |  |   43|  1.29M|#define FILTER_DELAY 12
  ------------------
                         (FILTER_DELAY + LEN_SUBFR) * sizeof(FLOAT32));
  ------------------
  |  |  118|  1.29M|#define LEN_SUBFR 64
  ------------------
  315|       |
  316|  83.9M|    for (i = 0; i < LEN_SUBFR; i++) {
  ------------------
  |  |  118|  83.9M|#define LEN_SUBFR 64
  ------------------
  |  Branch (316:17): [True: 82.6M, False: 1.29M]
  ------------------
  317|  82.6M|      tmp = ixheaacd_fir_lp_filt[0] * noise_tmp1[i];
  318|  1.07G|      for (j = 1; j <= FILTER_DELAY; j++) {
  ------------------
  |  |   43|  1.07G|#define FILTER_DELAY 12
  ------------------
  |  Branch (318:19): [True: 991M, False: 82.6M]
  ------------------
  319|   991M|        tmp +=
  320|   991M|            ixheaacd_fir_lp_filt[j] * (noise_tmp1[i - j] + noise_tmp1[i + j]);
  321|   991M|      }
  322|  82.6M|      synth_out[i + num_subfr] -= tmp;
  323|  82.6M|    }
  324|  1.29M|  }
  325|       |
  326|  96.3k|  return 0;
  327|  96.4k|}

ixheaacd_lsf_weight_2st_flt:
   52|   111k|VOID ixheaacd_lsf_weight_2st_flt(FLOAT32 *lsfq, FLOAT32 *w, WORD32 mode) {
   53|   111k|  WORD32 i;
   54|   111k|  FLOAT32 d[ORDER + 1];
   55|       |
   56|   111k|  d[0] = lsfq[0];
   57|   111k|  d[ORDER] = FREQ_MAX - lsfq[ORDER - 1];
  ------------------
  |  |   30|   111k|#define ORDER 16
  ------------------
                d[ORDER] = FREQ_MAX - lsfq[ORDER - 1];
  ------------------
  |  |   47|   111k|#define FREQ_MAX 6400.0f
  ------------------
                d[ORDER] = FREQ_MAX - lsfq[ORDER - 1];
  ------------------
  |  |   30|   111k|#define ORDER 16
  ------------------
   58|  1.78M|  for (i = 1; i < ORDER; i++) {
  ------------------
  |  |   30|  1.78M|#define ORDER 16
  ------------------
  |  Branch (58:15): [True: 1.67M, False: 111k]
  ------------------
   59|  1.67M|    d[i] = lsfq[i] - lsfq[i - 1];
   60|  1.67M|  }
   61|       |
   62|  1.89M|  for (i = 0; i < ORDER; i++) {
  ------------------
  |  |   30|  1.89M|#define ORDER 16
  ------------------
  |  Branch (62:15): [True: 1.78M, False: 111k]
  ------------------
   63|  1.78M|    w[i] = (FLOAT32)((factor_table[mode] * sqrt(d[i] * d[i + 1])) / FREQ_DIV);
  ------------------
  |  |   48|  1.78M|#define FREQ_DIV 400.0f
  ------------------
   64|  1.78M|  }
   65|       |
   66|   111k|  return;
   67|   111k|}
ixheaacd_avq_first_approx_rel:
  136|   111k|WORD32 ixheaacd_avq_first_approx_rel(FLOAT32 *lsf, WORD32 *indx, WORD32 mode) {
  137|   111k|  WORD32 i;
  138|   111k|  FLOAT32 w[ORDER];
  139|   111k|  WORD32 avq[ORDER];
  140|   111k|  WORD32 position = 0;
  141|   111k|  FLOAT32 lsf_min;
  142|       |
  143|   111k|  ixheaacd_lsf_weight_2st_flt(lsf, w, mode);
  144|       |
  145|   111k|  position = ixheaacd_decoding_avq_tool(indx, avq);
  146|       |
  147|   111k|  lsf_min = LSF_GAP;
  ------------------
  |  |   46|   111k|#define LSF_GAP 50.0f
  ------------------
  148|       |
  149|  1.89M|  for (i = 0; i < ORDER; i++) {
  ------------------
  |  |   30|  1.89M|#define ORDER 16
  ------------------
  |  Branch (149:15): [True: 1.78M, False: 111k]
  ------------------
  150|  1.78M|    lsf[i] += (w[i] * avq[i]);
  151|       |
  152|  1.78M|    if (lsf[i] < lsf_min) lsf[i] = lsf_min;
  ------------------
  |  Branch (152:9): [True: 126k, False: 1.65M]
  ------------------
  153|       |
  154|  1.78M|    lsf_min = lsf[i] + LSF_GAP;
  ------------------
  |  |   46|  1.78M|#define LSF_GAP 50.0f
  ------------------
  155|  1.78M|  }
  156|       |
  157|   111k|  return position;
  158|   111k|}
ixheaacd_alg_vec_dequant:
  161|  68.6k|                              FLOAT32 *lsf, WORD32 mod[], WORD32 ec_flag) {
  162|  68.6k|  WORD32 i;
  163|  68.6k|  WORD32 *lpc_index, mode_lpc, pos = 0;
  164|  68.6k|  WORD32 lpc_present[5] = {0, 0, 0, 0, 0};
  165|  68.6k|  lpc_index = pstr_td_frame_data->lpc_first_approx_idx;
  166|  68.6k|  lpc_present[4] = 1;
  167|  68.6k|  pos = ixheaacd_avq_first_approx_abs(&lsf[4 * ORDER], &lpc_index[0]);
  ------------------
  |  |   30|  68.6k|#define ORDER 16
  ------------------
  168|       |
  169|  68.6k|  lpc_index += pos;
  170|       |
  171|  68.6k|  if (first_lpd_flag) {
  ------------------
  |  Branch (171:7): [True: 41.4k, False: 27.1k]
  ------------------
  172|  41.4k|    mode_lpc = lpc_index[0];
  173|  41.4k|    lpc_index++;
  174|       |
  175|  41.4k|    if (mode_lpc == 0) {
  ------------------
  |  Branch (175:9): [True: 26.8k, False: 14.5k]
  ------------------
  176|  26.8k|      pos = ixheaacd_avq_first_approx_abs(&lsf[0], &lpc_index[0]);
  177|       |
  178|  26.8k|    } else if (mode_lpc == 1) {
  ------------------
  |  Branch (178:16): [True: 14.5k, False: 0]
  ------------------
  179|   247k|      for (i = 0; i < ORDER; i++) lsf[i] = lsf[4 * ORDER + i];
  ------------------
  |  |   30|   247k|#define ORDER 16
  ------------------
                    for (i = 0; i < ORDER; i++) lsf[i] = lsf[4 * ORDER + i];
  ------------------
  |  |   30|   233k|#define ORDER 16
  ------------------
  |  Branch (179:19): [True: 233k, False: 14.5k]
  ------------------
  180|  14.5k|      pos = ixheaacd_avq_first_approx_rel(&lsf[0], &lpc_index[0], 3);
  181|  14.5k|    }
  182|       |
  183|  41.4k|    lpc_index += pos;
  184|  41.4k|  }
  185|  68.6k|  lpc_present[0] = 1;
  186|       |
  187|  68.6k|  if (mod[0] < 3) {
  ------------------
  |  Branch (187:7): [True: 68.3k, False: 306]
  ------------------
  188|  68.3k|    mode_lpc = lpc_index[0];
  189|  68.3k|    lpc_index++;
  190|  68.3k|    lpc_present[2] = 1;
  191|       |
  192|  68.3k|    if (mode_lpc == 0) {
  ------------------
  |  Branch (192:9): [True: 45.2k, False: 23.0k]
  ------------------
  193|  45.2k|      pos = ixheaacd_avq_first_approx_abs(&lsf[2 * ORDER], &lpc_index[0]);
  ------------------
  |  |   30|  45.2k|#define ORDER 16
  ------------------
  194|  45.2k|    } else if (mode_lpc == 1) {
  ------------------
  |  Branch (194:16): [True: 23.0k, False: 0]
  ------------------
  195|   392k|      for (i = 0; i < ORDER; i++) lsf[2 * ORDER + i] = lsf[4 * ORDER + i];
  ------------------
  |  |   30|   392k|#define ORDER 16
  ------------------
                    for (i = 0; i < ORDER; i++) lsf[2 * ORDER + i] = lsf[4 * ORDER + i];
  ------------------
  |  |   30|   369k|#define ORDER 16
  ------------------
                    for (i = 0; i < ORDER; i++) lsf[2 * ORDER + i] = lsf[4 * ORDER + i];
  ------------------
  |  |   30|   369k|#define ORDER 16
  ------------------
  |  Branch (195:19): [True: 369k, False: 23.0k]
  ------------------
  196|  23.0k|      pos = ixheaacd_avq_first_approx_rel(&lsf[2 * ORDER], &lpc_index[0], 3);
  ------------------
  |  |   30|  23.0k|#define ORDER 16
  ------------------
  197|  23.0k|    }
  198|       |
  199|  68.3k|    lpc_index += pos;
  200|  68.3k|  }
  201|       |
  202|  68.6k|  if (mod[0] < 2) {
  ------------------
  |  Branch (202:7): [True: 44.7k, False: 23.8k]
  ------------------
  203|  44.7k|    mode_lpc = lpc_index[0];
  204|  44.7k|    lpc_index++;
  205|  44.7k|    lpc_present[1] = 1;
  206|       |
  207|  44.7k|    if (mode_lpc == 1) {
  ------------------
  |  Branch (207:9): [True: 3.52k, False: 41.2k]
  ------------------
  208|  59.9k|      for (i = 0; i < ORDER; i++)
  ------------------
  |  |   30|  59.9k|#define ORDER 16
  ------------------
  |  Branch (208:19): [True: 56.4k, False: 3.52k]
  ------------------
  209|  56.4k|        lsf[ORDER + i] = 0.5f * (lsf[i] + lsf[2 * ORDER + i]);
  ------------------
  |  |   30|  56.4k|#define ORDER 16
  ------------------
                      lsf[ORDER + i] = 0.5f * (lsf[i] + lsf[2 * ORDER + i]);
  ------------------
  |  |   30|  56.4k|#define ORDER 16
  ------------------
  210|  41.2k|    } else {
  211|  41.2k|      if (mode_lpc == 0) {
  ------------------
  |  Branch (211:11): [True: 11.3k, False: 29.8k]
  ------------------
  212|  11.3k|        pos = ixheaacd_avq_first_approx_abs(&lsf[ORDER], &lpc_index[0]);
  ------------------
  |  |   30|  11.3k|#define ORDER 16
  ------------------
  213|  29.8k|      } else if (mode_lpc == 2) {
  ------------------
  |  Branch (213:18): [True: 29.8k, False: 0]
  ------------------
  214|   506k|        for (i = 0; i < ORDER; i++) lsf[ORDER + i] = lsf[2 * ORDER + i];
  ------------------
  |  |   30|   506k|#define ORDER 16
  ------------------
                      for (i = 0; i < ORDER; i++) lsf[ORDER + i] = lsf[2 * ORDER + i];
  ------------------
  |  |   30|   477k|#define ORDER 16
  ------------------
                      for (i = 0; i < ORDER; i++) lsf[ORDER + i] = lsf[2 * ORDER + i];
  ------------------
  |  |   30|   477k|#define ORDER 16
  ------------------
  |  Branch (214:21): [True: 477k, False: 29.8k]
  ------------------
  215|  29.8k|        pos = ixheaacd_avq_first_approx_rel(&lsf[ORDER], &lpc_index[0], 2);
  ------------------
  |  |   30|  29.8k|#define ORDER 16
  ------------------
  216|  29.8k|      }
  217|       |
  218|  41.2k|      lpc_index += pos;
  219|  41.2k|    }
  220|  44.7k|  }
  221|       |
  222|  68.6k|  if (mod[2] < 2) {
  ------------------
  |  Branch (222:7): [True: 61.0k, False: 7.60k]
  ------------------
  223|  61.0k|    mode_lpc = lpc_index[0];
  224|  61.0k|    lpc_index++;
  225|  61.0k|    lpc_present[3] = 1;
  226|       |
  227|  61.0k|    if (mode_lpc == 0) {
  ------------------
  |  Branch (227:9): [True: 16.8k, False: 44.1k]
  ------------------
  228|  16.8k|      pos = ixheaacd_avq_first_approx_abs(&lsf[3 * ORDER], &lpc_index[0]);
  ------------------
  |  |   30|  16.8k|#define ORDER 16
  ------------------
  229|  44.1k|    } else if (mode_lpc == 1) {
  ------------------
  |  Branch (229:16): [True: 37.4k, False: 6.67k]
  ------------------
  230|   637k|      for (i = 0; i < ORDER; i++)
  ------------------
  |  |   30|   637k|#define ORDER 16
  ------------------
  |  Branch (230:19): [True: 599k, False: 37.4k]
  ------------------
  231|   599k|        lsf[3 * ORDER + i] = 0.5f * (lsf[2 * ORDER + i] + lsf[4 * ORDER + i]);
  ------------------
  |  |   30|   599k|#define ORDER 16
  ------------------
                      lsf[3 * ORDER + i] = 0.5f * (lsf[2 * ORDER + i] + lsf[4 * ORDER + i]);
  ------------------
  |  |   30|   599k|#define ORDER 16
  ------------------
                      lsf[3 * ORDER + i] = 0.5f * (lsf[2 * ORDER + i] + lsf[4 * ORDER + i]);
  ------------------
  |  |   30|   599k|#define ORDER 16
  ------------------
  232|  37.4k|      pos = ixheaacd_avq_first_approx_rel(&lsf[3 * ORDER], &lpc_index[0], 1);
  ------------------
  |  |   30|  37.4k|#define ORDER 16
  ------------------
  233|  37.4k|    } else if (mode_lpc == 2) {
  ------------------
  |  Branch (233:16): [True: 2.04k, False: 4.62k]
  ------------------
  234|  34.8k|      for (i = 0; i < ORDER; i++) lsf[3 * ORDER + i] = lsf[2 * ORDER + i];
  ------------------
  |  |   30|  34.8k|#define ORDER 16
  ------------------
                    for (i = 0; i < ORDER; i++) lsf[3 * ORDER + i] = lsf[2 * ORDER + i];
  ------------------
  |  |   30|  32.7k|#define ORDER 16
  ------------------
                    for (i = 0; i < ORDER; i++) lsf[3 * ORDER + i] = lsf[2 * ORDER + i];
  ------------------
  |  |   30|  32.7k|#define ORDER 16
  ------------------
  |  Branch (234:19): [True: 32.7k, False: 2.04k]
  ------------------
  235|  2.04k|      pos = ixheaacd_avq_first_approx_rel(&lsf[3 * ORDER], &lpc_index[0], 2);
  ------------------
  |  |   30|  2.04k|#define ORDER 16
  ------------------
  236|  4.62k|    } else if (mode_lpc == 3) {
  ------------------
  |  Branch (236:16): [True: 4.62k, False: 0]
  ------------------
  237|  78.6k|      for (i = 0; i < ORDER; i++) lsf[3 * ORDER + i] = lsf[4 * ORDER + i];
  ------------------
  |  |   30|  78.6k|#define ORDER 16
  ------------------
                    for (i = 0; i < ORDER; i++) lsf[3 * ORDER + i] = lsf[4 * ORDER + i];
  ------------------
  |  |   30|  74.0k|#define ORDER 16
  ------------------
                    for (i = 0; i < ORDER; i++) lsf[3 * ORDER + i] = lsf[4 * ORDER + i];
  ------------------
  |  |   30|  74.0k|#define ORDER 16
  ------------------
  |  Branch (237:19): [True: 74.0k, False: 4.62k]
  ------------------
  238|  4.62k|      pos = ixheaacd_avq_first_approx_rel(&lsf[3 * ORDER], &lpc_index[0], 2);
  ------------------
  |  |   30|  4.62k|#define ORDER 16
  ------------------
  239|  4.62k|    }
  240|       |
  241|  61.0k|    lpc_index += pos;
  242|  61.0k|  }
  243|  68.6k|  if (ec_flag) {
  ------------------
  |  Branch (243:7): [True: 0, False: 68.6k]
  ------------------
  244|      0|    WORD32 last, k;
  245|      0|    WORD32 num_lpc = 0, num_div = 4;
  246|      0|    FLOAT32 div_fac;
  247|      0|    FLOAT32 *lsf4 = &lsf[4 * ORDER];
  ------------------
  |  |   30|      0|#define ORDER 16
  ------------------
  248|      0|    for (i = 0; i < ORDER; i++) {
  ------------------
  |  |   30|      0|#define ORDER 16
  ------------------
  |  Branch (248:17): [True: 0, False: 0]
  ------------------
  249|      0|      pstr_td_frame_data->lpc4_lsf[i] = lsf4[i];
  250|      0|    }
  251|      0|    i = num_div;
  252|      0|    do {
  253|      0|      num_lpc += lpc_present[i--];
  254|      0|    } while (i >= 0 && num_lpc < 3);
  ------------------
  |  Branch (254:14): [True: 0, False: 0]
  |  Branch (254:24): [True: 0, False: 0]
  ------------------
  255|       |
  256|      0|    last = i;
  257|       |
  258|      0|    switch (num_lpc) {
  259|      0|      case 3:
  ------------------
  |  Branch (259:7): [True: 0, False: 0]
  ------------------
  260|      0|        div_fac = (1.0f / 3.0f);
  261|      0|        break;
  262|      0|      case 2:
  ------------------
  |  Branch (262:7): [True: 0, False: 0]
  ------------------
  263|      0|        div_fac = (1.0f / 2.0f);
  264|      0|        break;
  265|      0|      default:
  ------------------
  |  Branch (265:7): [True: 0, False: 0]
  ------------------
  266|      0|        div_fac = (1.0f);
  267|      0|        break;
  268|      0|    }
  269|      0|    for (k = 0; k < ORDER; k++) {
  ------------------
  |  |   30|      0|#define ORDER 16
  ------------------
  |  Branch (269:17): [True: 0, False: 0]
  ------------------
  270|      0|      FLOAT32 temp = 0;
  271|      0|      for (i = 4; i > last; i--) {
  ------------------
  |  Branch (271:19): [True: 0, False: 0]
  ------------------
  272|      0|        if (lpc_present[i]) {
  ------------------
  |  Branch (272:13): [True: 0, False: 0]
  ------------------
  273|      0|          temp = temp + (lsf[i * ORDER + k] * div_fac);
  ------------------
  |  |   30|      0|#define ORDER 16
  ------------------
  274|      0|        }
  275|      0|      }
  276|      0|      pstr_td_frame_data->lsf_adaptive_mean_cand[k] = temp;
  277|      0|    }
  278|      0|  }
  279|  68.6k|}
ixheaacd_lpc_dec.c:ixheaacd_decoding_avq_tool:
   69|   280k|static WORD32 ixheaacd_decoding_avq_tool(WORD32 *read_arr, WORD32 *nvecq) {
   70|   280k|  WORD32 i, k, qn, kv[8] = {0};
   71|   280k|  WORD32 code_book_idx;
   72|   280k|  WORD32 *ptr_kv = &kv[0];
   73|       |
   74|   280k|  WORD32 position = 2;
   75|       |
   76|   841k|  for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (76:15): [True: 561k, False: 280k]
  ------------------
   77|   561k|    qn = read_arr[k];
   78|       |
   79|   561k|    if (qn > 0) {
  ------------------
  |  Branch (79:9): [True: 494k, False: 66.6k]
  ------------------
   80|   494k|      code_book_idx = read_arr[position++];
   81|       |
   82|   494k|      ptr_kv = &read_arr[position];
   83|   494k|      position += 8;
   84|       |
   85|   494k|    } else {
   86|  66.6k|      code_book_idx = 0;
   87|   599k|      for (i = 0; i < 8; i++) ptr_kv = &kv[0];
  ------------------
  |  Branch (87:19): [True: 533k, False: 66.6k]
  ------------------
   88|  66.6k|    }
   89|       |
   90|   561k|    ixheaacd_rotated_gosset_mtx_dec(qn, code_book_idx, ptr_kv, &nvecq[k * 8]);
   91|   561k|  }
   92|       |
   93|   280k|  return position;
   94|   280k|}
ixheaacd_lpc_dec.c:ixheaacd_avq_first_approx_abs:
   96|   168k|static WORD32 ixheaacd_avq_first_approx_abs(FLOAT32 *lsf, WORD32 *indx) {
   97|   168k|  WORD32 i;
   98|   168k|  extern const FLOAT32 ixheaacd_dico_lsf_abs_8b_flt[];
   99|   168k|  extern const FLOAT32 ixheaacd_weight_table_avq[];
  100|   168k|  WORD32 position = 0;
  101|   168k|  WORD32 avq[ORDER];
  102|   168k|  FLOAT32 lsf_min;
  103|   168k|  const FLOAT32 *ptr_w;
  104|       |
  105|   168k|  ptr_w = &ixheaacd_weight_table_avq[(indx[0] * ORDER)];
  ------------------
  |  |   30|   168k|#define ORDER 16
  ------------------
  106|       |
  107|   168k|  position++;
  108|       |
  109|  2.87M|  for (i = 0; i < ORDER; i++) {
  ------------------
  |  |   30|  2.87M|#define ORDER 16
  ------------------
  |  Branch (109:15): [True: 2.70M, False: 168k]
  ------------------
  110|  2.70M|    lsf[i] = ixheaacd_dico_lsf_abs_8b_flt[indx[0] * ORDER + i];
  ------------------
  |  |   30|  2.70M|#define ORDER 16
  ------------------
  111|  2.70M|  }
  112|       |
  113|   168k|  position += ixheaacd_decoding_avq_tool(&indx[position], avq);
  114|       |
  115|   168k|  lsf_min = LSF_GAP;
  ------------------
  |  |   46|   168k|#define LSF_GAP 50.0f
  ------------------
  116|  2.87M|  for (i = 0; i < ORDER; i++) {
  ------------------
  |  |   30|  2.87M|#define ORDER 16
  ------------------
  |  Branch (116:15): [True: 2.70M, False: 168k]
  ------------------
  117|  2.70M|    lsf[i] += (ptr_w[i] * avq[i]);
  118|       |
  119|  2.70M|    if (lsf[i] < lsf_min) lsf[i] = lsf_min;
  ------------------
  |  Branch (119:9): [True: 151k, False: 2.55M]
  ------------------
  120|       |
  121|  2.70M|    lsf_min = lsf[i] + LSF_GAP;
  ------------------
  |  |   46|  2.70M|#define LSF_GAP 50.0f
  ------------------
  122|  2.70M|  }
  123|       |
  124|   168k|  lsf_min = FREQ_MAX - LSF_GAP;
  ------------------
  |  |   47|   168k|#define FREQ_MAX 6400.0f
  ------------------
                lsf_min = FREQ_MAX - LSF_GAP;
  ------------------
  |  |   46|   168k|#define LSF_GAP 50.0f
  ------------------
  125|  2.87M|  for (i = ORDER - 1; i >= 0; i--) {
  ------------------
  |  |   30|   168k|#define ORDER 16
  ------------------
  |  Branch (125:23): [True: 2.70M, False: 168k]
  ------------------
  126|  2.70M|    if (lsf[i] > lsf_min) {
  ------------------
  |  Branch (126:9): [True: 27.8k, False: 2.67M]
  ------------------
  127|  27.8k|      lsf[i] = lsf_min;
  128|  27.8k|    }
  129|       |
  130|  2.70M|    lsf_min = lsf[i] - LSF_GAP;
  ------------------
  |  |   46|  2.70M|#define LSF_GAP 50.0f
  ------------------
  131|  2.70M|  }
  132|       |
  133|   168k|  return position;
  134|   168k|}

ixheaacd_process_win_seq:
   97|  29.3k|                              WORD16 ch_fac, WORD16 flag, WORD16 size_01) {
   98|  29.3k|  WORD32 i, accu;
   99|  29.3k|  WORD32 *coef_1;
  100|  29.3k|  const WORD16 *temp_win_sh, *temp_win_long;
  101|  29.3k|  WORD32 *out1, *out2;
  102|  29.3k|  WORD32 *temp_prev;
  103|       |
  104|  29.3k|  WORD16 size_07 = 7 * size_01;
  105|  29.3k|  WORD16 size_08 = 8 * size_01;
  106|  29.3k|  WORD16 size_09 = 9 * size_01;
  107|  29.3k|  WORD16 size_14 = 14 * size_01;
  108|  29.3k|  WORD16 size_15 = 15 * size_01;
  109|       |
  110|  29.3k|  if (flag == 1) {
  ------------------
  |  Branch (110:7): [True: 17.4k, False: 11.9k]
  ------------------
  111|  7.65M|    for (i = 0; i < size_07; i++) {
  ------------------
  |  Branch (111:17): [True: 7.63M, False: 17.4k]
  ------------------
  112|  7.63M|      WORD32 temp1 = ixheaac_shl32_dir_sat_limit(
  113|  7.63M|          ixheaac_mult32x16in32(coef[size_08 + i], window_long[2 * i]),
  114|  7.63M|          (q_shift + 1));
  115|       |
  116|  7.63M|      accu = ixheaac_add32_sat(temp1, ((WORD32)prev[i] << 16));
  117|  7.63M|      out[ch_fac * i] = accu;
  118|       |
  119|  7.63M|      accu = ixheaac_shl32_dir_sat_limit(
  120|  7.63M|          ixheaac_mult32x16in32(-(coef[size_15 - 1 - i]),
  121|  7.63M|                                 window_long[2 * (size_07 - i) - 1]),
  122|  7.63M|          q_shift);
  123|  7.63M|      out[ch_fac * (i + size_09)] = (accu << 1);
  124|  7.63M|    }
  125|       |
  126|  17.4k|    temp_win_sh = &(window_short[0]);
  127|  17.4k|    coef_1 = &(coef[size_15]);
  128|  17.4k|    temp_win_long = &(window_long[size_14]);
  129|  17.4k|    temp_prev = &(prev[size_08 - 1]);
  130|  17.4k|    out1 = &(out[ch_fac * (size_07)]);
  131|  17.4k|    out2 = &(out[ch_fac * (size_09 - 1)]);
  132|       |
  133|  17.4k|  } else {
  134|  5.28M|    for (i = 0; i < size_07; i++) {
  ------------------
  |  Branch (134:17): [True: 5.27M, False: 11.9k]
  ------------------
  135|  5.27M|      accu = ixheaac_mult32x16in32_sat(
  136|  5.27M|          prev[size_08 - 1 - i], ixheaac_negate16(window_long[2 * i + 1]));
  137|       |
  138|  5.27M|      out[ch_fac * i] = accu;
  139|       |
  140|  5.27M|      accu = ixheaac_sub32_sat(
  141|  5.27M|          ixheaac_shl32_dir_sat_limit(-(coef[size_15 - 1 - i]), (q_shift - 1)),
  142|  5.27M|          ixheaac_mult32x16in32_sat(prev[i + size_01],
  143|  5.27M|                                     window_long[2 * size_07 - 2 - 2 * i]));
  144|       |
  145|  5.27M|      out[ch_fac * (size_09 + i)] = accu;
  146|  5.27M|    }
  147|       |
  148|  11.9k|    temp_win_sh = &(window_long[size_14]);
  149|  11.9k|    coef_1 = &(coef[size_15]);
  150|  11.9k|    temp_win_long = &(window_short[0]);
  151|  11.9k|    temp_prev = &(prev[size_01 - 1]);
  152|  11.9k|    out1 = &(out[ch_fac * (size_07)]);
  153|  11.9k|    out2 = &(out[ch_fac * (size_09 - 1)]);
  154|  11.9k|  }
  155|       |
  156|  1.87M|  for (i = size_01 - 1; i >= 0; i--) {
  ------------------
  |  Branch (156:25): [True: 1.84M, False: 29.3k]
  ------------------
  157|  1.84M|    WORD32 temp_coef = *coef_1++;
  158|  1.84M|    WORD16 win1 = *temp_win_long++;
  159|  1.84M|    WORD16 win2 = *temp_win_long++;
  160|  1.84M|    WORD32 prev1 = *temp_prev--;
  161|  1.84M|    WORD16 win4 = *temp_win_sh++;
  162|  1.84M|    WORD16 win3 = *temp_win_sh++;
  163|  1.84M|    accu = ixheaac_sub32_sat(
  164|  1.84M|        ixheaac_shl32_dir_sat_limit(ixheaac_mult32x16in32(temp_coef, win1),
  165|  1.84M|                                     q_shift),
  166|  1.84M|        ixheaac_mult32x16in32_sat(prev1, win3));
  167|  1.84M|    *out1 = accu << flag;
  168|  1.84M|    out1 += ch_fac;
  169|       |
  170|  1.84M|    accu = ixheaac_sub32_sat(
  171|  1.84M|        ixheaac_shl32_dir_sat_limit(
  172|  1.84M|            ixheaac_mult32x16in32(ixheaac_negate32_sat(temp_coef), win2),
  173|  1.84M|            q_shift),
  174|  1.84M|        ixheaac_mult32x16in32_sat(prev1, win4));
  175|  1.84M|    *out2 = accu << flag;
  176|  1.84M|    out2 -= ch_fac;
  177|  1.84M|  }
  178|  29.3k|}
ixheaacd_long_short_win_seq:
  222|  13.3k|                                 WORD16 ch_fac, WORD16 size_01) {
  223|       |
  224|  13.3k|  WORD16 size_02 = 2 * size_01;
  225|  13.3k|  WORD16 size_06 = 6 * size_01;
  226|  13.3k|  WORD16 size_07 = 7 * size_01;
  227|  13.3k|  WORD16 size_08 = 8 * size_01;
  228|  13.3k|  WORD16 size_09 = 9 * size_01;
  229|  13.3k|  WORD16 size_10 = 10 * size_01;
  230|  13.3k|  WORD16 size_16 = 16 * size_01;
  231|       |
  232|  13.3k|  WORD32 i, flag;
  233|  13.3k|  WORD32 accu;
  234|  5.88M|  for (i = 0; i < size_07; i++) {
  ------------------
  |  Branch (234:15): [True: 5.87M, False: 13.3k]
  ------------------
  235|  5.87M|    accu = ixheaac_mult32x16in32_sat(
  236|  5.87M|        prev[size_08 - 1 - i], ixheaac_negate16(long_window_prev[2 * i + 1]));
  237|  5.87M|    out[ch_fac * i] = accu;
  238|  5.87M|  }
  239|       |
  240|   852k|  for (i = 0; i < size_01; i++) {
  ------------------
  |  Branch (240:15): [True: 838k, False: 13.3k]
  ------------------
  241|   838k|    accu = ixheaac_sub32_sat(
  242|   838k|        ixheaac_shl32_dir_sat_limit(
  243|   838k|            ixheaac_mult32x16in32(current[size_01 + i],
  244|   838k|                                   short_window_prev[2 * i]),
  245|   838k|            q_shift),
  246|   838k|        ixheaac_mult32x16in32_sat(prev[size_01 - 1 - i],
  247|   838k|                                   long_window_prev[2 * size_07 + 1 + 2 * i]));
  248|   838k|    out[ch_fac * (size_07 + i)] = accu;
  249|   838k|  }
  250|       |
  251|   852k|  for (i = 0; i < size_01; i++) {
  ------------------
  |  Branch (251:15): [True: 838k, False: 13.3k]
  ------------------
  252|   838k|    accu = ixheaac_sub32_sat(
  253|   838k|        ixheaac_shl32_dir_sat_limit(
  254|   838k|            ixheaac_mult32x16in32(ixheaac_negate32_sat(current[size_02 - 1 - i]),
  255|   838k|                                   short_window_prev[size_02 - 2 * i - 1]),
  256|   838k|            q_shift),
  257|   838k|        ixheaac_mult32x16in32_sat(prev[i],
  258|   838k|                                   long_window_prev[size_16 - 2 - (2 * i)]));
  259|   838k|    out[ch_fac * (size_08 + i)] = accu;
  260|   838k|  }
  261|       |
  262|  13.3k|  flag = 1;
  263|  66.9k|  for (i = 0; i < 4; i++) {
  ------------------
  |  Branch (263:15): [True: 53.5k, False: 13.3k]
  ------------------
  264|  53.5k|    WORD32 inc = i * size_02;
  265|       |
  266|  53.5k|    if (i == 3) {
  ------------------
  |  Branch (266:9): [True: 13.3k, False: 40.1k]
  ------------------
  267|  13.3k|      flag = 0;
  268|  13.3k|    }
  269|       |
  270|  53.5k|    ixheaacd_long_short_win_process(&current[size_01 + inc], &prev[size_01 + inc],
  271|  53.5k|                                    &out[ch_fac * (size_09 + inc)], short_window,
  272|  53.5k|                                    &long_window_prev[2 * (size_07 - inc)],
  273|  53.5k|                                    q_shift, ch_fac, flag, size_01);
  274|  53.5k|  }
  275|       |
  276|   852k|  for (i = 0; i < size_01; i++) {
  ------------------
  |  Branch (276:15): [True: 838k, False: 13.3k]
  ------------------
  277|   838k|    accu = (ixheaac_mult32x16in32(-(current[size_10 - 1 - i]),
  278|   838k|                                   short_window[size_02 - 2 * i - 1]) -
  279|   838k|            ixheaac_mult32x16in32(current[size_06 + i],
  280|   838k|                                   short_window[size_02 - 2 * i - 2]));
  281|   838k|    prev[i] =
  282|   838k|        ixheaac_round16(ixheaac_shl32_dir_sat_limit(accu, (q_shift + 1)));
  283|   838k|  }
  284|  13.3k|}
ixheaacd_nolap1_32:
  287|  18.7k|                        WORD16 ch_fac, WORD16 size_01) {
  288|  18.7k|  WORD16 size_07 = 7 * size_01;
  289|  18.7k|  WORD32 i;
  290|       |
  291|  8.29M|  for (i = 0; i < size_07; i++) {
  ------------------
  |  Branch (291:15): [True: 8.27M, False: 18.7k]
  ------------------
  292|  8.27M|    out[ch_fac * i] = ixheaac_shr32_sat(
  293|  8.27M|        ixheaac_negate32_sat(coef[size_07 - 1 - i]), 16 - q_shift);
  294|  8.27M|  }
  295|  18.7k|}
ixheaacd_neg_shift_spec_dec:
  298|  4.18k|                                 WORD16 ch_fac) {
  299|  4.18k|  WORD32 i;
  300|  1.87M|  for (i = 0; i < SIZE07; i++) {
  ------------------
  |  |   46|  1.87M|#define SIZE07 7 * SIZE01
  |  |  ------------------
  |  |  |  |   45|  1.87M|#define SIZE01 (MAX_BINS_LONG / 16)
  |  |  |  |  ------------------
  |  |  |  |  |  |   28|  1.87M|#define MAX_BINS_LONG 1024
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (300:15): [True: 1.87M, False: 4.18k]
  ------------------
  301|  1.87M|    out[ch_fac * i] = (ixheaac_shl32_dir_sat_limit(
  302|  1.87M|        ixheaac_negate32_sat(coef[SIZE07 - 1 - i]), q_shift));
  ------------------
  |  |   46|  1.87M|#define SIZE07 7 * SIZE01
  |  |  ------------------
  |  |  |  |   45|  1.87M|#define SIZE01 (MAX_BINS_LONG / 16)
  |  |  |  |  ------------------
  |  |  |  |  |  |   28|  1.87M|#define MAX_BINS_LONG 1024
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  303|  1.87M|  }
  304|  4.18k|}
ixheaacd_Nolap_dec:
  307|  2.42k|                        WORD16 ch_fac, WORD16 size_01) {
  308|  2.42k|  WORD16 size_07 = 7 * size_01;
  309|  2.42k|  WORD32 i;
  310|  1.02M|  for (i = 0; i < size_07; i++) {
  ------------------
  |  Branch (310:15): [True: 1.01M, False: 2.42k]
  ------------------
  311|  1.01M|    out[ch_fac * i] = ixheaac_shl32_dir_sat_limit(
  312|  1.01M|        ixheaac_negate32_sat(coef[size_07 - 1 - i]), q_shift);
  313|  1.01M|  }
  314|  2.42k|}
ixheaacd_spec_to_overlapbuf_dec:
  318|   192k|                                     WORD32 size) {
  319|   192k|  WORD32 i;
  320|  38.5M|  for (i = 0; i < size; i++) {
  ------------------
  |  Branch (320:15): [True: 38.3M, False: 192k]
  ------------------
  321|  38.3M|    ptr_overlap_buf[i] = ixheaac_shr32_sat(ptr_spec_coeff[i], 16 - q_shift);
  322|  38.3M|  }
  323|   192k|}
ixheaacd_overlap_buf_out_dec:
  326|  24.9k|                                  WORD32 size, const WORD16 ch_fac) {
  327|  24.9k|  WORD32 i;
  328|       |
  329|  10.9M|  for (i = 0; i < size; i++) {
  ------------------
  |  Branch (329:15): [True: 10.9M, False: 24.9k]
  ------------------
  330|  10.9M|    out_samples[ch_fac * i] =
  331|  10.9M|        (ixheaac_shl32_sat((WORD16)ptr_overlap_buf[i], 15));
  332|  10.9M|  }
  333|  24.9k|}
ixheaacd_overlap_out_copy_dec:
  337|  20.7k|                                   const WORD16 ch_fac, WORD16 size_01) {
  338|  20.7k|  WORD32 i;
  339|       |
  340|  1.31M|  for (i = 0; i < size_01; i++) {
  ------------------
  |  Branch (340:15): [True: 1.29M, False: 20.7k]
  ------------------
  341|  1.29M|    out_samples[ch_fac * i] =
  342|  1.29M|        ixheaac_shl32_sat((WORD16)ptr_overlap_buf[i], 15);
  343|  1.29M|    ptr_overlap_buf[i] = ptr_overlap_buf1[i];
  344|  1.29M|  }
  345|  20.7k|}
ixheaacd_imdct_process:
  353|   211k|                            WORD slot_element) {
  354|   211k|  WORD32 *ptr_overlap_buf;
  355|   211k|  const WORD16 *ptr_long_window;
  356|   211k|  const WORD16 *ptr_short_window;
  357|   211k|  WORD16 max_bin_long = ptr_ics_info->frame_length;
  358|   211k|  WORD16 size_01;
  359|   211k|  if (max_bin_long == 960)
  ------------------
  |  Branch (359:7): [True: 52.0k, False: 159k]
  ------------------
  360|  52.0k|    size_01 = (max_bin_long / 16);
  361|   159k|  else
  362|   159k|    size_01 = (MAX_BINS_LONG / 16);
  ------------------
  |  |   28|   159k|#define MAX_BINS_LONG 1024
  ------------------
  363|   211k|  WORD16 size_02 = 2 * size_01;
  364|   211k|  WORD16 size_04 = 4 * size_01;
  365|   211k|  WORD16 size_06 = 6 * size_01;
  366|   211k|  WORD16 size_07 = 7 * size_01;
  367|   211k|  WORD16 size_08 = 8 * size_01;
  368|   211k|  WORD16 size_09 = 9 * size_01;
  369|   211k|  WORD16 size_10 = 10 * size_01;
  370|   211k|  WORD16 size_14 = 14 * size_01;
  371|   211k|  WORD16 size_15 = 15 * size_01;
  372|       |
  373|   211k|  ptr_overlap_buf = ptr_aac_dec_overlap_info->ptr_overlap_buf;
  374|   211k|  ptr_long_window =
  375|   211k|      ptr_aac_dec_overlap_info
  376|   211k|          ->ptr_long_window[(WORD32)ptr_aac_dec_overlap_info->window_shape];
  377|   211k|  ptr_short_window =
  378|   211k|      ptr_aac_dec_overlap_info
  379|   211k|          ->ptr_short_window[(WORD32)ptr_aac_dec_overlap_info->window_shape];
  380|       |
  381|   211k|  if (ptr_ics_info->window_sequence != EIGHT_SHORT_SEQUENCE) {
  ------------------
  |  |  102|   211k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  |  Branch (381:7): [True: 177k, False: 34.1k]
  ------------------
  382|   177k|    WORD16 q_shift;
  383|   177k|    WORD32 expo, imdct_scale;
  384|       |
  385|   177k|    if ((512 == ptr_ics_info->frame_length) ||
  ------------------
  |  Branch (385:9): [True: 59.2k, False: 118k]
  ------------------
  386|   118k|        (480 == ptr_ics_info->frame_length)) {
  ------------------
  |  Branch (386:9): [True: 31.1k, False: 87.5k]
  ------------------
  387|  90.3k|      ptr_ics_info->qshift_adj = -2;
  388|       |
  389|  90.3k|      if (512 == ptr_ics_info->frame_length) {
  ------------------
  |  Branch (389:11): [True: 59.2k, False: 31.1k]
  ------------------
  390|  59.2k|        WORD32 *ld_cos_sin_ptr =
  391|  59.2k|            (WORD32 *)ptr_aac_tables->pstr_imdct_tables->cosine_array_1024;
  392|       |
  393|  59.2k|        ixheaacd_inverse_transform_512(
  394|  59.2k|            ptr_spec_coeff, scratch, &imdct_scale, ld_cos_sin_ptr,
  395|  59.2k|            ptr_aac_tables->pstr_imdct_tables, object_type);
  396|       |
  397|  59.2k|      } else {
  398|  31.1k|        ixheaacd_mdct_480_ld(ptr_spec_coeff, scratch, &imdct_scale, 0,
  399|  31.1k|                             ptr_aac_tables->pstr_imdct_tables, object_type);
  400|  31.1k|      }
  401|       |
  402|  90.3k|      if (object_type == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (402:11): [True: 41.7k, False: 48.5k]
  ------------------
  403|  41.7k|        int i, N = (ptr_ics_info->frame_length << 1);
  404|       |
  405|  20.7M|        for (i = 0; i < N / 2; i++) {
  ------------------
  |  Branch (405:21): [True: 20.6M, False: 41.7k]
  ------------------
  406|  20.6M|          ptr_spec_coeff[i] = -ptr_spec_coeff[i + N];
  407|  20.6M|          ptr_spec_coeff[i + N + N / 2] = -ptr_spec_coeff[i + N / 2];
  408|  20.6M|        }
  409|  41.7k|      }
  410|  90.3k|    } else if (960 == ptr_ics_info->frame_length) {
  ------------------
  |  Branch (410:16): [True: 40.2k, False: 47.2k]
  ------------------
  411|  40.2k|      ixheaacd_mdct_960(ptr_spec_coeff, scratch, &imdct_scale, 0,
  412|  40.2k|                        ptr_aac_tables->pstr_imdct_tables);
  413|  47.2k|    } else {
  414|  47.2k|      expo = (*ixheaacd_calc_max_spectral_line)(ptr_spec_coeff, 1024) - 1;
  415|       |
  416|  47.2k|      expo = 8 - expo;
  417|       |
  418|  47.2k|      imdct_scale = ixheaacd_inverse_transform(
  419|  47.2k|          ptr_spec_coeff, scratch, ptr_aac_tables->pstr_imdct_tables, expo,
  420|  47.2k|          1024);
  421|  47.2k|    }
  422|       |
  423|   177k|    q_shift = (31 + imdct_scale) + (-1 - 16 - 9);
  424|       |
  425|   177k|    switch (ptr_ics_info->window_sequence) {
  ------------------
  |  Branch (425:13): [True: 177k, False: 0]
  ------------------
  426|   140k|      case ONLY_LONG_SEQUENCE:
  ------------------
  |  |  100|   140k|#define ONLY_LONG_SEQUENCE 0
  ------------------
  |  Branch (426:7): [True: 140k, False: 37.3k]
  ------------------
  427|       |
  428|   140k|        switch (ptr_aac_dec_overlap_info->window_sequence) {
  ------------------
  |  Branch (428:17): [True: 140k, False: 0]
  ------------------
  429|   130k|          case ONLY_LONG_SEQUENCE:
  ------------------
  |  |  100|   130k|#define ONLY_LONG_SEQUENCE 0
  ------------------
  |  Branch (429:11): [True: 130k, False: 9.95k]
  ------------------
  430|   133k|          case LONG_STOP_SEQUENCE:
  ------------------
  |  |  103|   133k|#define LONG_STOP_SEQUENCE 3
  ------------------
  |  Branch (430:11): [True: 2.88k, False: 137k]
  ------------------
  431|       |
  432|   133k|            if (1024 == ptr_ics_info->frame_length) {
  ------------------
  |  Branch (432:17): [True: 39.7k, False: 93.7k]
  ------------------
  433|  39.7k|              ia_ics_info_struct *tmp_ptr_ics_info = ptr_ics_info;
  434|       |
  435|  39.7k|              (*ixheaacd_post_twid_overlap_add)(
  436|  39.7k|                  (WORD32 *)out_samples, ptr_spec_coeff,
  437|  39.7k|                  ptr_aac_tables->pstr_imdct_tables, 1024, ptr_overlap_buf,
  438|  39.7k|                  q_shift, ptr_long_window, ch_fac);
  439|       |
  440|  39.7k|              ptr_ics_info->qshift_adj = 2;
  441|  39.7k|              ptr_ics_info = tmp_ptr_ics_info;
  442|  39.7k|            }
  443|       |
  444|   133k|            if (960 == ptr_ics_info->frame_length)
  ------------------
  |  Branch (444:17): [True: 27.3k, False: 106k]
  ------------------
  445|  27.3k|            {
  446|  27.3k|                ixheaacd_over_lap_add1_dec(ptr_spec_coeff, ptr_overlap_buf,
  447|  27.3k|                    (WORD32*)out_samples, ptr_long_window, q_shift,
  448|  27.3k|                    480, ch_fac);
  449|       |
  450|  27.3k|                ixheaacd_spec_to_overlapbuf(ptr_overlap_buf, ptr_spec_coeff,
  451|  27.3k|                                            q_shift, 480);
  452|       |
  453|  27.3k|                ptr_ics_info->qshift_adj = 2;
  454|  27.3k|            }
  455|       |
  456|   133k|            if ((512 == ptr_ics_info->frame_length) ||
  ------------------
  |  Branch (456:17): [True: 38.1k, False: 95.2k]
  ------------------
  457|  95.2k|                (480 == ptr_ics_info->frame_length)) {
  ------------------
  |  Branch (457:17): [True: 28.2k, False: 67.0k]
  ------------------
  458|  66.3k|              if (object_type != AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (458:19): [True: 24.6k, False: 41.7k]
  ------------------
  459|  24.6k|                if (512 == ptr_ics_info->frame_length) {
  ------------------
  |  Branch (459:21): [True: 18.8k, False: 5.74k]
  ------------------
  460|  18.8k|                  ixheaacd_lap1_512_480(ptr_spec_coeff, ptr_overlap_buf,
  461|  18.8k|                                        (WORD16 *)out_samples, ptr_long_window,
  462|  18.8k|                                        q_shift, size_04, ch_fac, slot_element);
  463|  18.8k|                  ixheaacd_spec_to_overlapbuf(ptr_overlap_buf, ptr_spec_coeff,
  464|  18.8k|                                              q_shift, size_04);
  465|  18.8k|                } else if (480 == ptr_ics_info->frame_length) {
  ------------------
  |  Branch (465:28): [True: 5.74k, False: 0]
  ------------------
  466|  5.74k|                  ixheaacd_lap1_512_480(ptr_spec_coeff, ptr_overlap_buf,
  467|  5.74k|                                        (WORD16 *)out_samples, ptr_long_window,
  468|  5.74k|                                        q_shift, 240, ch_fac, slot_element);
  469|  5.74k|                  ixheaacd_spec_to_overlapbuf(ptr_overlap_buf, ptr_spec_coeff,
  470|  5.74k|                                              q_shift, 240);
  471|  5.74k|                }
  472|  41.7k|              } else {
  473|  41.7k|                if (ld_mps_present == 1) {
  ------------------
  |  Branch (473:21): [True: 12.1k, False: 29.6k]
  ------------------
  474|  12.1k|                  ixheaacd_eld_dec_windowing_32bit(
  475|  12.1k|                      ptr_spec_coeff, ptr_long_window,
  476|  12.1k|                      ptr_ics_info->frame_length, q_shift, ptr_overlap_buf,
  477|  12.1k|                      ch_fac, (WORD32 *)out_samples);
  478|  29.6k|                } else {
  479|  29.6k|                  ixheaacd_eld_dec_windowing(
  480|  29.6k|                      ptr_spec_coeff, ptr_long_window,
  481|  29.6k|                      ptr_ics_info->frame_length, q_shift, ptr_overlap_buf,
  482|  29.6k|                      ch_fac, (WORD16 *)out_samples, slot_element);
  483|  29.6k|                }
  484|  41.7k|                ptr_ics_info->qshift_adj = -2;
  485|  41.7k|              }
  486|  66.3k|            }
  487|   133k|            break;
  488|       |
  489|  2.36k|          case LONG_START_SEQUENCE:
  ------------------
  |  |  101|  2.36k|#define LONG_START_SEQUENCE 1
  ------------------
  |  Branch (489:11): [True: 2.36k, False: 138k]
  ------------------
  490|  7.07k|          case EIGHT_SHORT_SEQUENCE:
  ------------------
  |  |  102|  7.07k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  |  Branch (490:11): [True: 4.70k, False: 135k]
  ------------------
  491|  7.07k|            if (1024 == ptr_ics_info->frame_length) {
  ------------------
  |  Branch (491:17): [True: 787, False: 6.28k]
  ------------------
  492|    787|              (*ixheaacd_post_twiddle)(scratch, ptr_spec_coeff,
  493|    787|                                       ptr_aac_tables->pstr_imdct_tables, 1024);
  494|    787|              ixheaacd_process_win_seq(scratch, ptr_overlap_buf,
  495|    787|                                       (WORD32*)out_samples, ptr_long_window,
  496|    787|                                       ptr_short_window, q_shift, ch_fac, 1,
  497|    787|                                       size_01);
  498|    787|              (*ixheaacd_spec_to_overlapbuf)(ptr_overlap_buf, scratch, q_shift,
  499|    787|                                             size_08);
  500|    787|            }
  501|       |
  502|  7.07k|            if (960 == ptr_ics_info->frame_length) {
  ------------------
  |  Branch (502:17): [True: 2.36k, False: 4.70k]
  ------------------
  503|  2.36k|              ixheaacd_process_win_seq(ptr_spec_coeff, ptr_overlap_buf,
  504|  2.36k|                                       (WORD32*)out_samples, ptr_long_window,
  505|  2.36k|                                       ptr_short_window, q_shift, ch_fac, 1,
  506|  2.36k|                                       size_01);
  507|  2.36k|              ixheaacd_spec_to_overlapbuf(ptr_overlap_buf, ptr_spec_coeff,
  508|  2.36k|                                          q_shift, 480);
  509|  2.36k|            }
  510|       |
  511|  7.07k|            ptr_ics_info->qshift_adj = 1;
  512|       |
  513|  7.07k|            if (512 == ptr_ics_info->frame_length) {
  ------------------
  |  Branch (513:17): [True: 2.30k, False: 4.76k]
  ------------------
  514|  2.30k|              ixheaacd_spec_to_overlapbuf(ptr_overlap_buf, ptr_spec_coeff,
  515|  2.30k|                                          q_shift, size_04);
  516|  2.30k|            }
  517|  7.07k|            if (480 == ptr_ics_info->frame_length) {
  ------------------
  |  Branch (517:17): [True: 1.61k, False: 5.45k]
  ------------------
  518|  1.61k|              ixheaacd_spec_to_overlapbuf(ptr_overlap_buf, ptr_spec_coeff,
  519|  1.61k|                                          q_shift, 240);
  520|  1.61k|            }
  521|  7.07k|            break;
  522|   140k|        }
  523|       |
  524|   140k|        break;
  525|       |
  526|   140k|      case LONG_START_SEQUENCE:
  ------------------
  |  |  101|  18.7k|#define LONG_START_SEQUENCE 1
  ------------------
  |  Branch (526:7): [True: 18.7k, False: 159k]
  ------------------
  527|  18.7k|        if (1024 == ptr_ics_info->frame_length) {
  ------------------
  |  Branch (527:13): [True: 2.93k, False: 15.8k]
  ------------------
  528|  2.93k|          (*ixheaacd_post_twiddle)(scratch, ptr_spec_coeff,
  529|  2.93k|                                   ptr_aac_tables->pstr_imdct_tables, 1024);
  530|  2.93k|        }
  531|  18.7k|        switch (ptr_aac_dec_overlap_info->window_sequence) {
  ------------------
  |  Branch (531:17): [True: 18.7k, False: 0]
  ------------------
  532|  3.15k|          case ONLY_LONG_SEQUENCE:
  ------------------
  |  |  100|  3.15k|#define ONLY_LONG_SEQUENCE 0
  ------------------
  |  Branch (532:11): [True: 3.15k, False: 15.6k]
  ------------------
  533|  4.51k|          case LONG_STOP_SEQUENCE:
  ------------------
  |  |  103|  4.51k|#define LONG_STOP_SEQUENCE 3
  ------------------
  |  Branch (533:11): [True: 1.35k, False: 17.4k]
  ------------------
  534|       |
  535|  4.51k|            if (1024 == ptr_ics_info->frame_length) {
  ------------------
  |  Branch (535:17): [True: 752, False: 3.76k]
  ------------------
  536|    752|              (*ixheaacd_over_lap_add1)(scratch, ptr_overlap_buf,
  537|    752|                                        (WORD32*)out_samples, ptr_long_window,
  538|    752|                                        q_shift, size_08, ch_fac);
  539|  3.76k|            } else {
  540|  3.76k|              ixheaacd_over_lap_add1_dec(ptr_spec_coeff, ptr_overlap_buf,
  541|  3.76k|                                         (WORD32*)out_samples, ptr_long_window,
  542|  3.76k|                                         q_shift, size_08, ch_fac);
  543|  3.76k|            }
  544|  4.51k|            ptr_ics_info->qshift_adj = 2;
  545|  4.51k|            break;
  546|       |
  547|  11.5k|          case LONG_START_SEQUENCE:
  ------------------
  |  |  101|  11.5k|#define LONG_START_SEQUENCE 1
  ------------------
  |  Branch (547:11): [True: 11.5k, False: 7.27k]
  ------------------
  548|  14.2k|          case EIGHT_SHORT_SEQUENCE:
  ------------------
  |  |  102|  14.2k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  |  Branch (548:11): [True: 2.75k, False: 16.0k]
  ------------------
  549|       |
  550|  14.2k|            if (1024 == ptr_ics_info->frame_length) {
  ------------------
  |  Branch (550:17): [True: 2.18k, False: 12.0k]
  ------------------
  551|  2.18k|              ixheaacd_process_win_seq(scratch, ptr_overlap_buf,
  552|  2.18k|                                       (WORD32*)out_samples, ptr_long_window,
  553|  2.18k|                                       ptr_short_window, q_shift, ch_fac, 1,
  554|  2.18k|                                       size_01);
  555|  12.0k|            } else {
  556|  12.0k|              ixheaacd_process_win_seq(ptr_spec_coeff, ptr_overlap_buf,
  557|  12.0k|                                       (WORD32*)out_samples, ptr_long_window,
  558|  12.0k|                                       ptr_short_window, q_shift, ch_fac, 1,
  559|  12.0k|                                       size_01);
  560|  12.0k|            }
  561|       |
  562|  14.2k|            ptr_ics_info->qshift_adj = 1;
  563|       |
  564|  14.2k|            break;
  565|  18.7k|        }
  566|       |
  567|  18.7k|        if (960 != ptr_ics_info->frame_length) {
  ------------------
  |  Branch (567:13): [True: 13.8k, False: 4.94k]
  ------------------
  568|  13.8k|          ixheaacd_nolap1_32(&scratch[size_01], ptr_overlap_buf, q_shift, 1,
  569|  13.8k|                             size_01);
  570|       |
  571|  13.8k|          (*ixheaacd_spec_to_overlapbuf)(&ptr_overlap_buf[size_07], scratch,
  572|  13.8k|                                         q_shift, size_01);
  573|  13.8k|        } else {
  574|  4.94k|          ixheaacd_nolap1_32(&ptr_spec_coeff[size_01], ptr_overlap_buf,
  575|  4.94k|                             q_shift, 1, size_01);
  576|       |
  577|  4.94k|          (*ixheaacd_spec_to_overlapbuf)(&ptr_overlap_buf[size_07],
  578|  4.94k|                                         ptr_spec_coeff, q_shift, size_01);
  579|  4.94k|        }
  580|       |
  581|  18.7k|        break;
  582|       |
  583|  18.5k|      case LONG_STOP_SEQUENCE:
  ------------------
  |  |  103|  18.5k|#define LONG_STOP_SEQUENCE 3
  ------------------
  |  Branch (583:7): [True: 18.5k, False: 159k]
  ------------------
  584|  18.5k|        if (1024 == ptr_ics_info->frame_length) {
  ------------------
  |  Branch (584:13): [True: 3.77k, False: 14.8k]
  ------------------
  585|  3.77k|          (*ixheaacd_post_twiddle)(scratch, ptr_spec_coeff,
  586|  3.77k|                                   ptr_aac_tables->pstr_imdct_tables, 1024);
  587|  3.77k|        }
  588|       |
  589|  18.5k|        switch (ptr_aac_dec_overlap_info->window_sequence) {
  ------------------
  |  Branch (589:17): [True: 18.5k, False: 0]
  ------------------
  590|  5.47k|          case EIGHT_SHORT_SEQUENCE:
  ------------------
  |  |  102|  5.47k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  |  Branch (590:11): [True: 5.47k, False: 13.1k]
  ------------------
  591|  6.60k|          case LONG_START_SEQUENCE:
  ------------------
  |  |  101|  6.60k|#define LONG_START_SEQUENCE 1
  ------------------
  |  Branch (591:11): [True: 1.12k, False: 17.4k]
  ------------------
  592|       |
  593|  6.60k|            if (960 != ptr_ics_info->frame_length) {
  ------------------
  |  Branch (593:17): [True: 4.18k, False: 2.42k]
  ------------------
  594|  4.18k|              (*ixheaacd_overlap_buf_out)((WORD32*)out_samples,
  595|  4.18k|                                          ptr_overlap_buf, size_07, ch_fac);
  596|  4.18k|              (*ixheaacd_over_lap_add1)(
  597|  4.18k|                  &scratch[size_14], &ptr_overlap_buf[size_07],
  598|  4.18k|                  ((WORD32*)out_samples + ch_fac * (size_07)),
  599|  4.18k|                  ptr_short_window, q_shift, size_01, ch_fac);
  600|  4.18k|            } else {
  601|  2.42k|              ixheaacd_dec_copy_outsample((WORD32*)out_samples,
  602|  2.42k|                                          ptr_overlap_buf, size_07, ch_fac);
  603|  2.42k|              ixheaacd_over_lap_add1_dec(&ptr_spec_coeff[size_14],
  604|  2.42k|                                         &ptr_overlap_buf[size_07],
  605|  2.42k|                                         ((WORD32*)out_samples + ch_fac * (size_07)),
  606|  2.42k|                                         ptr_short_window, q_shift, size_01,
  607|  2.42k|                                         ch_fac);
  608|  2.42k|            }
  609|       |
  610|  6.60k|            {
  611|  6.60k|              if (960 != ptr_ics_info->frame_length) {
  ------------------
  |  Branch (611:19): [True: 4.18k, False: 2.42k]
  ------------------
  612|       |
  613|  4.18k|                WORD16 q_shift1 = q_shift - 1;
  614|  4.18k|                (*ixheaacd_neg_shift_spec)(&scratch[size_08],
  615|  4.18k|                                           ((WORD32*)out_samples + ch_fac * size_09),
  616|  4.18k|                                           q_shift1, ch_fac);
  617|  4.18k|              } else {
  618|  2.42k|                WORD16 q_shift1 = q_shift - 1;
  619|  2.42k|                ixheaacd_Nolap_dec(&ptr_spec_coeff[size_08],
  620|  2.42k|                                   ((WORD32*)out_samples + ch_fac * size_09),
  621|  2.42k|                                   q_shift1, ch_fac, size_01);
  622|  2.42k|              }
  623|  6.60k|            }
  624|  6.60k|            ptr_ics_info->qshift_adj = 2;
  625|       |
  626|  6.60k|            break;
  627|  3.39k|          case ONLY_LONG_SEQUENCE:
  ------------------
  |  |  100|  3.39k|#define ONLY_LONG_SEQUENCE 0
  ------------------
  |  Branch (627:11): [True: 3.39k, False: 15.1k]
  ------------------
  628|  11.9k|          case LONG_STOP_SEQUENCE:
  ------------------
  |  |  103|  11.9k|#define LONG_STOP_SEQUENCE 3
  ------------------
  |  Branch (628:11): [True: 8.58k, False: 10.0k]
  ------------------
  629|       |
  630|  11.9k|            if (1024 == ptr_ics_info->frame_length) {
  ------------------
  |  Branch (630:17): [True: 2.20k, False: 9.77k]
  ------------------
  631|  2.20k|              ixheaacd_process_win_seq(scratch, ptr_overlap_buf,
  632|  2.20k|                                       (WORD32*)out_samples, ptr_long_window,
  633|  2.20k|                                       ptr_short_window, q_shift, ch_fac, 0,
  634|  2.20k|                                       size_01);
  635|  9.77k|            } else {
  636|  9.77k|              ixheaacd_process_win_seq(ptr_spec_coeff, ptr_overlap_buf,
  637|  9.77k|                                       (WORD32*)out_samples, ptr_long_window,
  638|  9.77k|                                       ptr_short_window, q_shift, ch_fac, 0,
  639|  9.77k|                                       size_01);
  640|  9.77k|            }
  641|       |
  642|  11.9k|            ptr_ics_info->qshift_adj = 2;
  643|  11.9k|            break;
  644|  18.5k|        }
  645|       |
  646|  18.5k|        if (1024 == ptr_ics_info->frame_length) {
  ------------------
  |  Branch (646:13): [True: 3.77k, False: 14.8k]
  ------------------
  647|  3.77k|          (*ixheaacd_spec_to_overlapbuf)(ptr_overlap_buf, scratch, q_shift,
  648|  3.77k|                                         size_08);
  649|  14.8k|        } else {
  650|  14.8k|          (*ixheaacd_spec_to_overlapbuf)(ptr_overlap_buf, ptr_spec_coeff,
  651|  14.8k|                                         q_shift, size_08);
  652|  14.8k|        }
  653|       |
  654|  18.5k|        break;
  655|   177k|    }
  656|       |
  657|   177k|  } else {
  658|  34.1k|    WORD16 q_shift, max_scale;
  659|  34.1k|    WORD32 imdct_scale[8], i;
  660|  34.1k|    const WORD16 *short_window;
  661|       |
  662|  34.1k|    short_window = ptr_aac_dec_overlap_info
  663|  34.1k|                       ->ptr_short_window[(WORD32)ptr_ics_info->window_shape];
  664|       |
  665|  34.1k|    {
  666|  34.1k|      WORD32 expo;
  667|       |
  668|  34.1k|      if (1024 == ptr_ics_info->frame_length) {
  ------------------
  |  Branch (668:11): [True: 10.4k, False: 23.6k]
  ------------------
  669|  10.4k|        expo = (*ixheaacd_calc_max_spectral_line)(ptr_spec_coeff, 1024) - 1;
  670|       |
  671|  10.4k|        expo = 5 - expo;
  672|       |
  673|  93.9k|        for (i = 0; i < MAX_WINDOWS; i++) {
  ------------------
  |  |   26|  93.9k|#define MAX_WINDOWS 8
  ------------------
  |  Branch (673:21): [True: 83.5k, False: 10.4k]
  ------------------
  674|  83.5k|          imdct_scale[i] = ixheaacd_inverse_transform(
  675|  83.5k|              &ptr_spec_coeff[i * size_02], &scratch[i * size_02],
  676|  83.5k|              ptr_aac_tables->pstr_imdct_tables, expo, 128);
  677|       |
  678|  83.5k|        (*ixheaacd_post_twiddle)(&scratch[i * size_02],
  679|  83.5k|                                 &ptr_spec_coeff[i * size_02],
  680|  83.5k|                                 ptr_aac_tables->pstr_imdct_tables, 128);
  681|  83.5k|        }
  682|  10.4k|        max_scale = 31 + imdct_scale[0];
  683|  10.4k|        q_shift = max_scale + (-16 - 6 - 1);
  684|  23.6k|      } else {
  685|  23.6k|        expo = (*ixheaacd_calc_max_spectral_line)(ptr_spec_coeff, 960) - 1;
  686|  23.6k|        memcpy(scratch, ptr_spec_coeff, sizeof(WORD32) * 960);
  687|       |
  688|   213k|        for (i = 0; i < MAX_WINDOWS; i++) {
  ------------------
  |  |   26|   213k|#define MAX_WINDOWS 8
  ------------------
  |  Branch (688:21): [True: 189k, False: 23.6k]
  ------------------
  689|   189k|            ixheaacd_inverse_transform_960(
  690|   189k|                &ptr_spec_coeff[i * size_02], &scratch[i * size_02],
  691|   189k|                ptr_aac_tables->pstr_imdct_tables, expo, &imdct_scale[i]);
  692|       |
  693|   189k|                imdct_scale[i] -= expo;
  694|   189k|        }
  695|  23.6k|        max_scale = 31 + imdct_scale[0];
  696|  23.6k|        q_shift = max_scale + (-16 - 6 - 1);
  697|       |
  698|  23.6k|      }
  699|  34.1k|    }
  700|  34.1k|    switch (ptr_aac_dec_overlap_info->window_sequence) {
  ------------------
  |  Branch (700:13): [True: 34.1k, False: 0]
  ------------------
  701|      0|      WORD32 overlap_buf_loc[64];
  702|       |
  703|  17.8k|      case EIGHT_SHORT_SEQUENCE:
  ------------------
  |  |  102|  17.8k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  |  Branch (703:7): [True: 17.8k, False: 16.2k]
  ------------------
  704|  20.7k|      case LONG_START_SEQUENCE:
  ------------------
  |  |  101|  20.7k|#define LONG_START_SEQUENCE 1
  ------------------
  |  Branch (704:7): [True: 2.83k, False: 31.2k]
  ------------------
  705|       |
  706|  20.7k|        (*ixheaacd_overlap_buf_out)((WORD32 *)out_samples, ptr_overlap_buf,
  707|  20.7k|                                    size_07, ch_fac);
  708|       |
  709|  20.7k|        if (1024 == ptr_ics_info->frame_length) {
  ------------------
  |  Branch (709:13): [True: 7.72k, False: 13.0k]
  ------------------
  710|  7.72k|          (*ixheaacd_over_lap_add1)(&scratch[0], &ptr_overlap_buf[size_07],
  711|  7.72k|                                    ((WORD32*)out_samples + ch_fac * size_07),
  712|  7.72k|                                    ptr_short_window, q_shift, size_01, ch_fac);
  713|  13.0k|        } else {
  714|  13.0k|          ixheaacd_over_lap_add1_dec(&ptr_spec_coeff[0], &ptr_overlap_buf[size_07],
  715|  13.0k|                                     ((WORD32*)out_samples + ch_fac * size_07),
  716|  13.0k|                                     ptr_short_window, q_shift, size_01, ch_fac);
  717|  13.0k|        }
  718|       |
  719|  82.9k|        for (i = 0; i < 3; i++) {
  ------------------
  |  Branch (719:21): [True: 62.1k, False: 20.7k]
  ------------------
  720|  62.1k|          WORD32 inc = (i * size_02);
  721|       |
  722|  62.1k|          if (1024 == ptr_ics_info->frame_length) {
  ------------------
  |  Branch (722:15): [True: 23.1k, False: 39.0k]
  ------------------
  723|  23.1k|            (*ixheaacd_spec_to_overlapbuf)(overlap_buf_loc, &scratch[inc],
  724|  23.1k|                                           q_shift, size_01);
  725|       |
  726|  23.1k|            (*ixheaacd_over_lap_add1)(&scratch[size_02 + inc], overlap_buf_loc,
  727|  23.1k|                                      ((WORD32*)out_samples + ch_fac * (size_09 + inc)),
  728|  23.1k|                                      short_window, q_shift, size_01, ch_fac);
  729|  39.0k|          } else {
  730|  39.0k|            (*ixheaacd_spec_to_overlapbuf)(overlap_buf_loc, &ptr_spec_coeff[inc],
  731|  39.0k|                                           q_shift, size_01);
  732|       |
  733|  39.0k|            ixheaacd_over_lap_add1_dec(&ptr_spec_coeff[size_02 + inc], overlap_buf_loc,
  734|  39.0k|                                       ((WORD32*)out_samples + ch_fac * (size_09 + inc)),
  735|  39.0k|                                       short_window, q_shift, size_01, ch_fac);
  736|  39.0k|          }
  737|  62.1k|        }
  738|       |
  739|  20.7k|        if (1024 == ptr_ics_info->frame_length) {
  ------------------
  |  Branch (739:13): [True: 7.72k, False: 13.0k]
  ------------------
  740|  7.72k|          (*ixheaacd_over_lap_add2)(&scratch[size_08], &scratch[size_06],
  741|  7.72k|                                    ptr_overlap_buf, short_window, q_shift,
  742|  7.72k|                                    size_01, 1);
  743|  13.0k|        } else {
  744|  13.0k|          ixheaacd_over_lap_add2_dec(&ptr_spec_coeff[size_08], &ptr_spec_coeff[size_06],
  745|  13.0k|                                     ptr_overlap_buf, short_window, q_shift,
  746|  13.0k|                                     size_01, 1);
  747|  13.0k|        }
  748|       |
  749|       |
  750|  20.7k|        (*ixheaacd_overlap_out_copy)(((WORD32 *)out_samples + ch_fac * size_15),
  751|  20.7k|                                     ptr_overlap_buf, &ptr_overlap_buf[size_01],
  752|  20.7k|                                     ch_fac, size_01);
  753|       |
  754|  20.7k|        ptr_ics_info->qshift_adj = 2;
  755|       |
  756|  20.7k|        break;
  757|       |
  758|  8.41k|      case ONLY_LONG_SEQUENCE:
  ------------------
  |  |  100|  8.41k|#define ONLY_LONG_SEQUENCE 0
  ------------------
  |  Branch (758:7): [True: 8.41k, False: 25.7k]
  ------------------
  759|  13.3k|      case LONG_STOP_SEQUENCE:
  ------------------
  |  |  103|  13.3k|#define LONG_STOP_SEQUENCE 3
  ------------------
  |  Branch (759:7): [True: 4.97k, False: 29.1k]
  ------------------
  760|       |
  761|  13.3k|        if (1024 == ptr_ics_info->frame_length) {
  ------------------
  |  Branch (761:13): [True: 2.71k, False: 10.6k]
  ------------------
  762|       |
  763|  2.71k|          ixheaacd_long_short_win_seq(
  764|  2.71k|              scratch, ptr_overlap_buf, (WORD32*)out_samples, short_window,
  765|  2.71k|              ptr_short_window, ptr_long_window, q_shift, ch_fac, size_01);
  766|  10.6k|        } else {
  767|  10.6k|          ixheaacd_long_short_win_seq(
  768|  10.6k|              ptr_spec_coeff, ptr_overlap_buf, (WORD32*)out_samples, short_window,
  769|  10.6k|              ptr_short_window, ptr_long_window, q_shift, ch_fac, size_01);
  770|  10.6k|        }
  771|       |
  772|  13.3k|        ptr_ics_info->qshift_adj = 2;
  773|  13.3k|        break;
  774|  34.1k|    }
  775|       |
  776|   136k|    for (i = 0; i < 3; i++) {
  ------------------
  |  Branch (776:17): [True: 102k, False: 34.1k]
  ------------------
  777|   102k|      WORD32 inc = (i * size_02);
  778|       |
  779|   102k|      if (1024 == ptr_ics_info->frame_length) {
  ------------------
  |  Branch (779:11): [True: 31.3k, False: 71.0k]
  ------------------
  780|  31.3k|        (*ixheaacd_over_lap_add2)(&scratch[size_10 + inc], &scratch[size_08 + inc],
  781|  31.3k|                                  &ptr_overlap_buf[size_01 + inc], short_window,
  782|  31.3k|                                  q_shift, size_01, 1);
  783|  71.0k|      } else {
  784|  71.0k|        ixheaacd_over_lap_add2_dec(&ptr_spec_coeff[size_10 + inc],
  785|  71.0k|                                   &ptr_spec_coeff[size_08 + inc],
  786|  71.0k|                                   &ptr_overlap_buf[size_01 + inc],
  787|  71.0k|                                   short_window, q_shift, size_01, 1);
  788|  71.0k|      }
  789|   102k|    }
  790|       |
  791|  34.1k|    if (1024 == ptr_ics_info->frame_length) {
  ------------------
  |  Branch (791:9): [True: 10.4k, False: 23.6k]
  ------------------
  792|  10.4k|      (*ixheaacd_spec_to_overlapbuf)(&ptr_overlap_buf[size_07], &scratch[size_14],
  793|  10.4k|                                     q_shift, size_01);
  794|  23.6k|    } else {
  795|  23.6k|      (*ixheaacd_spec_to_overlapbuf)(&ptr_overlap_buf[size_07], &ptr_spec_coeff[size_14],
  796|  23.6k|                                     q_shift, size_01);
  797|  23.6k|    }
  798|  34.1k|  }
  799|       |
  800|   211k|  ptr_aac_dec_overlap_info->window_shape = ptr_ics_info->window_shape;
  801|   211k|  ptr_aac_dec_overlap_info->window_sequence = ptr_ics_info->window_sequence;
  802|   211k|}
ixheaacd_eld_dec_windowing:
  807|  29.6k|                                VOID *out_samples_t, WORD slot_element) {
  808|  29.6k|  int i = 0;
  809|  29.6k|  int loop_size;
  810|  29.6k|  WORD32 *ptr_z = ptr_spect_coeff;
  811|       |
  812|  29.6k|  WORD32 *ptr_out, *p_out2;
  813|  29.6k|  WORD32 *p_overlap_buffer32 = (WORD32 *)p_overlap_buffer;
  814|  29.6k|  WORD32 delay = framesize >> 2;
  815|       |
  816|  29.6k|  WORD16 *out_samples = (WORD16 *)out_samples_t - slot_element;
  817|       |
  818|  29.6k|  ptr_z = ptr_spect_coeff + delay;
  819|  29.6k|  p_win += delay;
  820|  29.6k|  ptr_out = p_overlap_buffer32;
  821|       |
  822|  29.6k|  q_shift = q_shift + 2;
  823|       |
  824|  29.6k|  if (q_shift >= 0) {
  ------------------
  |  Branch (824:7): [True: 6.89k, False: 22.7k]
  ------------------
  825|   854k|    for (i = (delay)-1; i >= 0; i--) {
  ------------------
  |  Branch (825:25): [True: 847k, False: 6.89k]
  ------------------
  826|   847k|      WORD32 win_op;
  827|   847k|      WORD32 win_ovadd_op;
  828|   847k|      WORD16 win_val;
  829|       |
  830|   847k|      win_val = *p_win++;
  831|       |
  832|   847k|      win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
  833|       |
  834|   847k|      win_ovadd_op =
  835|   847k|          ixheaac_add32_sat(ixheaac_shl32(win_op, q_shift), *ptr_out++);
  836|       |
  837|   847k|      *out_samples = ixheaac_round16(ixheaac_shl32_sat(win_ovadd_op, 1));
  838|   847k|      out_samples += stride;
  839|       |
  840|   847k|      win_val = *p_win++;
  841|       |
  842|   847k|      win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
  843|       |
  844|   847k|      win_ovadd_op =
  845|   847k|          ixheaac_add32_sat(ixheaac_shl32(win_op, q_shift), *ptr_out++);
  846|       |
  847|   847k|      *out_samples = ixheaac_round16(ixheaac_shl32_sat(win_ovadd_op, 1));
  848|   847k|      out_samples += stride;
  849|   847k|      win_val = *p_win++;
  850|       |
  851|   847k|      win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
  852|       |
  853|   847k|      win_ovadd_op =
  854|   847k|          ixheaac_add32_sat(ixheaac_shl32(win_op, q_shift), *ptr_out++);
  855|       |
  856|   847k|      *out_samples = ixheaac_round16(ixheaac_shl32_sat(win_ovadd_op, 1));
  857|   847k|      out_samples += stride;
  858|       |
  859|   847k|      win_val = *p_win++;
  860|       |
  861|   847k|      win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
  862|       |
  863|   847k|      win_ovadd_op =
  864|   847k|          ixheaac_add32_sat(ixheaac_shl32(win_op, q_shift), *ptr_out++);
  865|       |
  866|   847k|      *out_samples = ixheaac_round16(ixheaac_shl32_sat(win_ovadd_op, 1));
  867|   847k|      out_samples += stride;
  868|   847k|    }
  869|       |
  870|  6.89k|    p_out2 = p_overlap_buffer32;
  871|  6.89k|    loop_size = (((framesize * 3) - framesize) >> 2) - 1;
  872|       |
  873|  1.70M|    for (i = loop_size; i >= 0; i--) {
  ------------------
  |  Branch (873:25): [True: 1.69M, False: 6.89k]
  ------------------
  874|  1.69M|      WORD32 win_op;
  875|  1.69M|      WORD16 win_val;
  876|  1.69M|      win_val = *p_win++;
  877|  1.69M|      win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
  878|  1.69M|      *p_out2++ =
  879|  1.69M|          ixheaac_add32_sat(ixheaac_shl32(win_op, q_shift), *ptr_out++);
  880|       |
  881|  1.69M|      win_val = *p_win++;
  882|  1.69M|      win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
  883|  1.69M|      *p_out2++ =
  884|  1.69M|          ixheaac_add32_sat(ixheaac_shl32(win_op, q_shift), *ptr_out++);
  885|       |
  886|  1.69M|      win_val = *p_win++;
  887|  1.69M|      win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
  888|  1.69M|      *p_out2++ =
  889|  1.69M|          ixheaac_add32_sat(ixheaac_shl32(win_op, q_shift), *ptr_out++);
  890|       |
  891|  1.69M|      win_val = *p_win++;
  892|  1.69M|      win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
  893|  1.69M|      *p_out2++ =
  894|  1.69M|          ixheaac_add32_sat(ixheaac_shl32(win_op, q_shift), *ptr_out++);
  895|  1.69M|    }
  896|       |
  897|  6.89k|    loop_size = ((((framesize << 2) - delay) - (framesize * 3)) >> 2) - 1;
  898|   642k|    for (i = loop_size; i >= 0; i--) {
  ------------------
  |  Branch (898:25): [True: 635k, False: 6.89k]
  ------------------
  899|   635k|      WORD32 win_op;
  900|   635k|      WORD16 win_val;
  901|       |
  902|   635k|      win_val = *p_win++;
  903|   635k|      win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
  904|   635k|      *p_out2++ = ixheaac_shl32(win_op, q_shift);
  905|       |
  906|   635k|      win_val = *p_win++;
  907|   635k|      win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
  908|   635k|      *p_out2++ = ixheaac_shl32(win_op, q_shift);
  909|       |
  910|   635k|      win_val = *p_win++;
  911|   635k|      win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
  912|   635k|      *p_out2++ = ixheaac_shl32(win_op, q_shift);
  913|       |
  914|   635k|      win_val = *p_win++;
  915|   635k|      win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
  916|   635k|      *p_out2++ = ixheaac_shl32(win_op, q_shift);
  917|   635k|    }
  918|  22.7k|  } else {
  919|  22.7k|    q_shift = -q_shift;
  920|       |
  921|  2.85M|    for (i = (delay)-1; i >= 0; i--) {
  ------------------
  |  Branch (921:25): [True: 2.83M, False: 22.7k]
  ------------------
  922|  2.83M|      WORD32 win_op;
  923|  2.83M|      WORD32 win_ovadd_op;
  924|  2.83M|      WORD16 win_val;
  925|       |
  926|  2.83M|      win_val = *p_win++;
  927|  2.83M|      win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
  928|       |
  929|  2.83M|      win_ovadd_op =
  930|  2.83M|          ixheaac_add32_sat(ixheaac_shr32(win_op, q_shift), *ptr_out++);
  931|       |
  932|  2.83M|      *out_samples = ixheaac_round16(ixheaac_shl32(win_ovadd_op, 1));
  933|  2.83M|      out_samples += stride;
  934|       |
  935|  2.83M|      win_val = *p_win++;
  936|  2.83M|      win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
  937|       |
  938|  2.83M|      win_ovadd_op =
  939|  2.83M|          ixheaac_add32_sat(ixheaac_shr32(win_op, q_shift), *ptr_out++);
  940|       |
  941|  2.83M|      *out_samples = ixheaac_round16(ixheaac_shl32(win_ovadd_op, 1));
  942|  2.83M|      out_samples += stride;
  943|       |
  944|  2.83M|      win_val = *p_win++;
  945|  2.83M|      win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
  946|       |
  947|  2.83M|      win_ovadd_op =
  948|  2.83M|          ixheaac_add32_sat(ixheaac_shr32(win_op, q_shift), *ptr_out++);
  949|       |
  950|  2.83M|      *out_samples = ixheaac_round16(ixheaac_shl32(win_ovadd_op, 1));
  951|  2.83M|      out_samples += stride;
  952|       |
  953|  2.83M|      win_val = *p_win++;
  954|  2.83M|      win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
  955|       |
  956|  2.83M|      win_ovadd_op =
  957|  2.83M|          ixheaac_add32_sat(ixheaac_shr32(win_op, q_shift), *ptr_out++);
  958|       |
  959|  2.83M|      *out_samples = ixheaac_round16(ixheaac_shl32(win_ovadd_op, 1));
  960|  2.83M|      out_samples += stride;
  961|  2.83M|    }
  962|       |
  963|  22.7k|    p_out2 = p_overlap_buffer32;
  964|  22.7k|    loop_size = (((framesize * 3) - framesize) >> 2) - 1;
  965|       |
  966|  5.69M|    for (i = loop_size; i >= 0; i--) {
  ------------------
  |  Branch (966:25): [True: 5.66M, False: 22.7k]
  ------------------
  967|  5.66M|      WORD32 win_op;
  968|  5.66M|      WORD16 win_val;
  969|  5.66M|      win_val = *p_win++;
  970|  5.66M|      win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
  971|  5.66M|      *p_out2++ =
  972|  5.66M|          ixheaac_add32_sat(ixheaac_shr32(win_op, q_shift), *ptr_out++);
  973|       |
  974|  5.66M|      win_val = *p_win++;
  975|  5.66M|      win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
  976|  5.66M|      *p_out2++ =
  977|  5.66M|          ixheaac_add32_sat(ixheaac_shr32(win_op, q_shift), *ptr_out++);
  978|       |
  979|  5.66M|      win_val = *p_win++;
  980|  5.66M|      win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
  981|  5.66M|      *p_out2++ =
  982|  5.66M|          ixheaac_add32_sat(ixheaac_shr32(win_op, q_shift), *ptr_out++);
  983|       |
  984|  5.66M|      win_val = *p_win++;
  985|  5.66M|      win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
  986|  5.66M|      *p_out2++ =
  987|  5.66M|          ixheaac_add32_sat(ixheaac_shr32(win_op, q_shift), *ptr_out++);
  988|  5.66M|    }
  989|  22.7k|    loop_size = ((((framesize << 2) - delay) - (framesize * 3)) >> 2) - 1;
  990|  2.14M|    for (i = loop_size; i >= 0; i--) {
  ------------------
  |  Branch (990:25): [True: 2.12M, False: 22.7k]
  ------------------
  991|  2.12M|      WORD32 win_op;
  992|  2.12M|      WORD16 win_val;
  993|  2.12M|      win_val = *p_win++;
  994|  2.12M|      win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
  995|  2.12M|      *p_out2++ = ixheaac_shr32(win_op, q_shift);
  996|       |
  997|  2.12M|      win_val = *p_win++;
  998|  2.12M|      win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
  999|  2.12M|      *p_out2++ = ixheaac_shr32(win_op, q_shift);
 1000|       |
 1001|  2.12M|      win_val = *p_win++;
 1002|  2.12M|      win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
 1003|  2.12M|      *p_out2++ = ixheaac_shr32(win_op, q_shift);
 1004|       |
 1005|  2.12M|      win_val = *p_win++;
 1006|  2.12M|      win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
 1007|  2.12M|      *p_out2++ = ixheaac_shr32(win_op, q_shift);
 1008|  2.12M|    }
 1009|  22.7k|  }
 1010|  29.6k|}
ixheaacd_eld_dec_windowing_32bit:
 1017|  12.1k|{
 1018|  12.1k|  WORD32 i = 0;
 1019|  12.1k|  WORD32 loop_size;
 1020|  12.1k|  WORD32 *ptr_z = ptr_spect_coeff;
 1021|       |
 1022|  12.1k|  WORD32 *ptr_out, *p_out2;
 1023|  12.1k|  WORD32 *p_overlap_buffer32 = (WORD32 *)p_overlap_buffer;
 1024|  12.1k|  WORD32 delay = framesize >> 2;
 1025|       |
 1026|  12.1k|  ptr_z = ptr_spect_coeff + delay;
 1027|  12.1k|  p_win += delay;
 1028|  12.1k|  ptr_out = p_overlap_buffer32;
 1029|       |
 1030|  12.1k|  q_shift = q_shift + 2;
 1031|       |
 1032|  12.1k|  if (q_shift >= 0) {
  ------------------
  |  Branch (1032:7): [True: 4.22k, False: 7.89k]
  ------------------
 1033|   511k|    for (i = (delay)-1; i >= 0; i--) {
  ------------------
  |  Branch (1033:25): [True: 507k, False: 4.22k]
  ------------------
 1034|   507k|      WORD32 win_op;
 1035|   507k|      WORD16 win_val;
 1036|       |
 1037|   507k|      win_val = *p_win++;
 1038|       |
 1039|   507k|      win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
 1040|       |
 1041|   507k|      *out_samples =
 1042|   507k|          ixheaac_add32_sat(ixheaac_shl32(win_op, q_shift), *ptr_out++);
 1043|       |
 1044|   507k|      out_samples += stride;
 1045|       |
 1046|   507k|      win_val = *p_win++;
 1047|       |
 1048|   507k|      win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
 1049|       |
 1050|   507k|      *out_samples =
 1051|   507k|          ixheaac_add32_sat(ixheaac_shl32(win_op, q_shift), *ptr_out++);
 1052|       |
 1053|   507k|      out_samples += stride;
 1054|   507k|      win_val = *p_win++;
 1055|       |
 1056|   507k|      win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
 1057|       |
 1058|   507k|      *out_samples =
 1059|   507k|          ixheaac_add32_sat(ixheaac_shl32(win_op, q_shift), *ptr_out++);
 1060|       |
 1061|   507k|      out_samples += stride;
 1062|       |
 1063|   507k|      win_val = *p_win++;
 1064|       |
 1065|   507k|      win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
 1066|       |
 1067|   507k|      *out_samples =
 1068|   507k|          ixheaac_add32_sat(ixheaac_shl32(win_op, q_shift), *ptr_out++);
 1069|       |
 1070|   507k|      out_samples += stride;
 1071|   507k|    }
 1072|       |
 1073|  4.22k|    p_out2 = p_overlap_buffer32;
 1074|  4.22k|    loop_size = (((framesize * 3) - framesize) >> 2) - 1;
 1075|       |
 1076|  1.01M|    for (i = loop_size; i >= 0; i--) {
  ------------------
  |  Branch (1076:25): [True: 1.01M, False: 4.22k]
  ------------------
 1077|  1.01M|      WORD32 win_op;
 1078|  1.01M|      WORD16 win_val;
 1079|  1.01M|      win_val = *p_win++;
 1080|  1.01M|      win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
 1081|  1.01M|      *p_out2++ =
 1082|  1.01M|          ixheaac_add32_sat(ixheaac_shl32(win_op, q_shift), *ptr_out++);
 1083|       |
 1084|  1.01M|      win_val = *p_win++;
 1085|  1.01M|      win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
 1086|  1.01M|      *p_out2++ =
 1087|  1.01M|          ixheaac_add32_sat(ixheaac_shl32(win_op, q_shift), *ptr_out++);
 1088|       |
 1089|  1.01M|      win_val = *p_win++;
 1090|  1.01M|      win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
 1091|  1.01M|      *p_out2++ =
 1092|  1.01M|          ixheaac_add32_sat(ixheaac_shl32(win_op, q_shift), *ptr_out++);
 1093|       |
 1094|  1.01M|      win_val = *p_win++;
 1095|  1.01M|      win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
 1096|  1.01M|      *p_out2++ =
 1097|  1.01M|          ixheaac_add32_sat(ixheaac_shl32(win_op, q_shift), *ptr_out++);
 1098|  1.01M|    }
 1099|       |
 1100|  4.22k|    loop_size = ((((framesize << 2) - delay) - (framesize * 3)) >> 2) - 1;
 1101|   384k|    for (i = loop_size; i >= 0; i--) {
  ------------------
  |  Branch (1101:25): [True: 380k, False: 4.22k]
  ------------------
 1102|   380k|      WORD32 win_op;
 1103|   380k|      WORD16 win_val;
 1104|       |
 1105|   380k|      win_val = *p_win++;
 1106|   380k|      win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
 1107|   380k|      *p_out2++ = ixheaac_shl32(win_op, q_shift);
 1108|       |
 1109|   380k|      win_val = *p_win++;
 1110|   380k|      win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
 1111|   380k|      *p_out2++ = ixheaac_shl32(win_op, q_shift);
 1112|       |
 1113|   380k|      win_val = *p_win++;
 1114|   380k|      win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
 1115|   380k|      *p_out2++ = ixheaac_shl32(win_op, q_shift);
 1116|       |
 1117|   380k|      win_val = *p_win++;
 1118|   380k|      win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
 1119|   380k|      *p_out2++ = ixheaac_shl32(win_op, q_shift);
 1120|   380k|    }
 1121|  7.89k|  } else {
 1122|  7.89k|    q_shift = -q_shift;
 1123|       |
 1124|   985k|    for (i = (delay)-1; i >= 0; i--) {
  ------------------
  |  Branch (1124:25): [True: 977k, False: 7.89k]
  ------------------
 1125|   977k|      WORD32 win_op;
 1126|   977k|      WORD16 win_val;
 1127|       |
 1128|   977k|      win_val = *p_win++;
 1129|   977k|      win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
 1130|       |
 1131|   977k|      *out_samples =
 1132|   977k|          ixheaac_add32_sat(ixheaac_shr32(win_op, q_shift), *ptr_out++);
 1133|       |
 1134|   977k|      out_samples += stride;
 1135|       |
 1136|   977k|      win_val = *p_win++;
 1137|   977k|      win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
 1138|       |
 1139|   977k|      *out_samples =
 1140|   977k|          ixheaac_add32_sat(ixheaac_shr32(win_op, q_shift), *ptr_out++);
 1141|       |
 1142|   977k|      out_samples += stride;
 1143|       |
 1144|   977k|      win_val = *p_win++;
 1145|   977k|      win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
 1146|       |
 1147|   977k|      *out_samples =
 1148|   977k|          ixheaac_add32_sat(ixheaac_shr32(win_op, q_shift), *ptr_out++);
 1149|       |
 1150|   977k|      out_samples += stride;
 1151|       |
 1152|   977k|      win_val = *p_win++;
 1153|   977k|      win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
 1154|       |
 1155|   977k|      *out_samples =
 1156|   977k|          ixheaac_add32_sat(ixheaac_shr32(win_op, q_shift), *ptr_out++);
 1157|       |
 1158|   977k|      out_samples += stride;
 1159|   977k|    }
 1160|       |
 1161|  7.89k|    p_out2 = p_overlap_buffer32;
 1162|  7.89k|    loop_size = (((framesize * 3) - framesize) >> 2) - 1;
 1163|       |
 1164|  1.96M|    for (i = loop_size; i >= 0; i--) {
  ------------------
  |  Branch (1164:25): [True: 1.95M, False: 7.89k]
  ------------------
 1165|  1.95M|      WORD32 win_op;
 1166|  1.95M|      WORD16 win_val;
 1167|  1.95M|      win_val = *p_win++;
 1168|  1.95M|      win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
 1169|  1.95M|      *p_out2++ =
 1170|  1.95M|          ixheaac_add32_sat(ixheaac_shr32(win_op, q_shift), *ptr_out++);
 1171|       |
 1172|  1.95M|      win_val = *p_win++;
 1173|  1.95M|      win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
 1174|  1.95M|      *p_out2++ =
 1175|  1.95M|          ixheaac_add32_sat(ixheaac_shr32(win_op, q_shift), *ptr_out++);
 1176|       |
 1177|  1.95M|      win_val = *p_win++;
 1178|  1.95M|      win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
 1179|  1.95M|      *p_out2++ =
 1180|  1.95M|          ixheaac_add32_sat(ixheaac_shr32(win_op, q_shift), *ptr_out++);
 1181|       |
 1182|  1.95M|      win_val = *p_win++;
 1183|  1.95M|      win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
 1184|  1.95M|      *p_out2++ =
 1185|  1.95M|          ixheaac_add32_sat(ixheaac_shr32(win_op, q_shift), *ptr_out++);
 1186|  1.95M|    }
 1187|  7.89k|    loop_size = ((((framesize << 2) - delay) - (framesize * 3)) >> 2) - 1;
 1188|   740k|    for (i = loop_size; i >= 0; i--) {
  ------------------
  |  Branch (1188:25): [True: 732k, False: 7.89k]
  ------------------
 1189|   732k|      WORD32 win_op;
 1190|   732k|      WORD16 win_val;
 1191|   732k|      win_val = *p_win++;
 1192|   732k|      win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
 1193|   732k|      *p_out2++ = ixheaac_shr32(win_op, q_shift);
 1194|       |
 1195|   732k|      win_val = *p_win++;
 1196|   732k|      win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
 1197|   732k|      *p_out2++ = ixheaac_shr32(win_op, q_shift);
 1198|       |
 1199|   732k|      win_val = *p_win++;
 1200|   732k|      win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
 1201|   732k|      *p_out2++ = ixheaac_shr32(win_op, q_shift);
 1202|       |
 1203|   732k|      win_val = *p_win++;
 1204|   732k|      win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
 1205|   732k|      *p_out2++ = ixheaac_shr32(win_op, q_shift);
 1206|   732k|    }
 1207|  7.89k|  }
 1208|  12.1k|}
ixheaacd_lpfuncs.c:ixheaacd_long_short_win_process:
  183|  53.5k|    WORD32 flag, WORD16 size_01) {
  184|       |
  185|  53.5k|  WORD16 size_02 = 2 * size_01;
  186|  53.5k|  WORD16 size_03 = 3 * size_01;
  187|  53.5k|  WORD i;
  188|  53.5k|  WORD32 accu;
  189|  53.5k|  WORD32 *current_tmp1 = &(current[(size_03 - 1)]);
  190|  53.5k|  WORD32 *current_tmp2 = &(current[-size_01]);
  191|  53.5k|  const WORD16 *short_ptr = &(short_window[size_02 - 1]);
  192|       |
  193|  3.40M|  for (i = size_01 - 1; i >= 0; i--) {
  ------------------
  |  Branch (193:25): [True: 3.35M, False: 53.5k]
  ------------------
  194|  3.35M|    WORD32 tmp1_cur = *current_tmp1--;
  195|  3.35M|    WORD32 tmp2_cur = *current_tmp2++;
  196|  3.35M|    WORD16 short1 = *short_ptr--;
  197|  3.35M|    WORD16 short2 = *short_ptr--;
  198|  3.35M|    accu = ixheaac_sub32_sat(
  199|  3.35M|        ixheaac_shl32_dir_sat_limit((ixheaac_mult32x16in32(tmp1_cur, short2) -
  200|  3.35M|                                      ixheaac_mult32x16in32(tmp2_cur, short1)),
  201|  3.35M|                                     q_shift),
  202|  3.35M|        ixheaac_mult32x16in32_sat(prev[i], long_window_prev[0 - 2 - 2 * i]));
  203|  3.35M|    out[ch_fac * (0 + i)] = accu;
  204|       |
  205|  3.35M|    if (flag) {
  ------------------
  |  Branch (205:9): [True: 2.51M, False: 838k]
  ------------------
  206|  2.51M|      accu = ixheaac_sub32_sat(
  207|  2.51M|          ixheaac_shl32_dir_sat_limit(
  208|  2.51M|              (ixheaac_mult32x16in32(ixheaac_negate32_sat(tmp1_cur), short1) -
  209|  2.51M|               ixheaac_mult32x16in32(tmp2_cur, short2)),
  210|  2.51M|              q_shift),
  211|  2.51M|          ixheaac_mult32x16in32_sat(prev[size_02 - 1 - i],
  212|  2.51M|                                     long_window_prev[-2 * size_02 + 2 * i]));
  213|  2.51M|      out[ch_fac * (size_02 - 1 - i)] = accu;
  214|  2.51M|    }
  215|  3.35M|  }
  216|  53.5k|}

ixheaacd_filterstep3:
  104|   309k|                          WORD32 high_band, WORD32 *qmf_buffer) {
  105|   309k|  WORD32 i;
  106|   309k|  WORD32 prev1r, prev1i;
  107|   309k|  WORD32 prev2r, prev2i;
  108|   309k|  WORD16 coef1r = (a0r);
  109|   309k|  WORD16 coef1i = (a0i);
  110|   309k|  WORD16 coef2r = (a1r);
  111|   309k|  WORD16 coef2i = (a1i);
  112|   309k|  WORD32 *p_src, *p_dst;
  113|   309k|  WORD32 qmf_real, qmf_imag;
  114|       |
  115|   309k|  WORD32 curr, curi;
  116|   309k|  p_src = qmf_buffer + low_band + ((start_indx) << 7);
  117|   309k|  prev2r = *p_src;
  118|   309k|  p_src += 64;
  119|       |
  120|   309k|  prev2i = *p_src;
  121|   309k|  p_src += 64;
  122|       |
  123|   309k|  prev1r = *p_src;
  124|   309k|  p_src += 64;
  125|       |
  126|   309k|  prev1i = *p_src;
  127|   309k|  p_src += 64;
  128|       |
  129|   309k|  p_dst = qmf_buffer + high_band + ((start_indx + 2) << 7);
  130|       |
  131|  5.14M|  for (i = stop_idx - start_indx; i != 0; i--) {
  ------------------
  |  Branch (131:35): [True: 4.83M, False: 309k]
  ------------------
  132|  4.83M|    WORD32 accu;
  133|       |
  134|  4.83M|    curr = *p_src;
  135|  4.83M|    p_src += 64;
  136|       |
  137|  4.83M|    curi = *p_src;
  138|  4.83M|    p_src += 64;
  139|       |
  140|  4.83M|    qmf_real = (curr >> LPC_SCALE_FACTOR);
  ------------------
  |  |   77|  4.83M|#define LPC_SCALE_FACTOR 2
  ------------------
  141|  4.83M|    qmf_imag = (curi >> LPC_SCALE_FACTOR);
  ------------------
  |  |   77|  4.83M|#define LPC_SCALE_FACTOR 2
  ------------------
  142|       |
  143|  4.83M|    accu = ixheaac_sub32(
  144|  4.83M|        ixheaac_add32(ixheaac_sub32(ixheaac_mult32x16in32(prev1r, coef1r),
  145|  4.83M|                                      ixheaac_mult32x16in32(prev1i, coef1i)),
  146|  4.83M|                       ixheaac_mult32x16in32(prev2r, coef2r)),
  147|  4.83M|        ixheaac_mult32x16in32(prev2i, coef2i));
  148|       |
  149|  4.83M|    *p_dst = ixheaac_add32(qmf_real, (accu << 1));
  150|  4.83M|    p_dst += 64;
  151|       |
  152|  4.83M|    accu = ixheaac_add32(
  153|  4.83M|        ixheaac_add32_sat(
  154|  4.83M|            ixheaac_add32_sat(ixheaac_mult32x16in32(prev1r, coef1i),
  155|  4.83M|                               ixheaac_mult32x16in32(prev1i, coef1r)),
  156|  4.83M|            ixheaac_mult32x16in32(prev2r, coef2i)),
  157|  4.83M|        ixheaac_mult32x16in32(prev2i, coef2r));
  158|       |
  159|  4.83M|    *p_dst = ixheaac_add32(qmf_imag, (accu << 1));
  160|  4.83M|    p_dst += 64;
  161|       |
  162|  4.83M|    prev2r = prev1r;
  163|  4.83M|    prev1r = curr;
  164|  4.83M|    prev2i = prev1i;
  165|  4.83M|    prev1i = curi;
  166|  4.83M|  }
  167|   309k|}
ixheaacd_covariance_matrix_calc_2_dec:
  377|  46.3k|    WORD32 *real_buffer, WORD32 num_bands, WORD16 slots) {
  378|  46.3k|  WORD32 k;
  379|  46.3k|  WORD32 *img_buffer;
  380|  46.3k|  WORD32 *ptr_real = real_buffer;
  381|  46.3k|  ia_lpp_trans_cov_matrix *pac_arr = cov_matrix;
  382|       |
  383|   516k|  for (k = 0; k < num_bands; k++) {
  ------------------
  |  Branch (383:15): [True: 469k, False: 46.3k]
  ------------------
  384|   469k|    WORD32 t_phi_11 = 0, t_phi_01 = 0, t_phi_01_i = 0;
  385|   469k|    WORD32 prev_real, prev_imag, curr_real, curr_imag;
  386|       |
  387|   469k|    real_buffer = ptr_real;
  388|   469k|    img_buffer = real_buffer + 64;
  389|   469k|    cov_matrix = pac_arr;
  390|       |
  391|   469k|    prev_real = real_buffer[-128];
  392|   469k|    prev_imag = img_buffer[-128];
  393|       |
  394|   469k|    curr_real = real_buffer[0];
  395|   469k|    curr_imag = img_buffer[0];
  396|       |
  397|   469k|    curr_real = ixheaac_shr32(curr_real, 3);
  398|   469k|    curr_imag = ixheaac_shr32(curr_imag, 3);
  399|   469k|    prev_real = ixheaac_shr32(prev_real, 3);
  400|   469k|    prev_imag = ixheaac_shr32(prev_imag, 3);
  401|       |
  402|   469k|    t_phi_01 = ixheaac_mult32x16hin32(curr_real, prev_real);
  403|   469k|    t_phi_01 = ixheaacd_mac32x16hin32(t_phi_01, curr_imag, prev_imag);
  404|       |
  405|   469k|    t_phi_01_i = ixheaac_mult32x16hin32(curr_imag, prev_real);
  406|   469k|    t_phi_01_i = ixheaacd_macn32x16hin32(t_phi_01_i, curr_real, prev_imag);
  407|       |
  408|   469k|    t_phi_11 = ixheaac_mult32x16hin32(prev_real, prev_real);
  409|   469k|    t_phi_11 = ixheaacd_mac32x16hin32(t_phi_11, prev_imag, prev_imag);
  410|       |
  411|   469k|    {
  412|   469k|      WORD n;
  413|   469k|      WORD32 *real1 = &real_buffer[128];
  414|   469k|      WORD32 *imag1 = &img_buffer[128];
  415|       |
  416|   469k|      prev_real = curr_real;
  417|   469k|      prev_imag = curr_imag;
  418|       |
  419|  3.53M|      for (n = ((slots - 2) >> 1); n; n--) {
  ------------------
  |  Branch (419:36): [True: 3.06M, False: 469k]
  ------------------
  420|  3.06M|        curr_real = *real1;
  421|  3.06M|        real1 += 128;
  422|  3.06M|        curr_imag = *imag1;
  423|  3.06M|        imag1 += 128;
  424|       |
  425|  3.06M|        curr_real = ixheaac_shr32(curr_real, 3);
  426|  3.06M|        curr_imag = ixheaac_shr32(curr_imag, 3);
  427|       |
  428|  3.06M|        t_phi_01 = ixheaacd_mac32x16hin32(t_phi_01, curr_real, prev_real);
  429|  3.06M|        t_phi_01 = ixheaacd_mac32x16hin32(t_phi_01, curr_imag, prev_imag);
  430|       |
  431|  3.06M|        t_phi_01_i = ixheaacd_mac32x16hin32(t_phi_01_i, curr_imag, prev_real);
  432|  3.06M|        t_phi_01_i = ixheaacd_macn32x16hin32(t_phi_01_i, curr_real, prev_imag);
  433|       |
  434|  3.06M|        t_phi_11 = ixheaacd_mac32x16hin32(t_phi_11, prev_real, prev_real);
  435|  3.06M|        t_phi_11 = ixheaacd_mac32x16hin32(t_phi_11, prev_imag, prev_imag);
  436|       |
  437|  3.06M|        prev_real = *real1;
  438|  3.06M|        real1 += 128;
  439|  3.06M|        prev_imag = *imag1;
  440|  3.06M|        imag1 += 128;
  441|       |
  442|  3.06M|        prev_real = ixheaac_shr32(prev_real, 3);
  443|  3.06M|        prev_imag = ixheaac_shr32(prev_imag, 3);
  444|       |
  445|  3.06M|        t_phi_01 = ixheaacd_mac32x16hin32(t_phi_01, prev_real, curr_real);
  446|  3.06M|        t_phi_01 = ixheaacd_mac32x16hin32(t_phi_01, prev_imag, curr_imag);
  447|       |
  448|  3.06M|        t_phi_01_i = ixheaacd_mac32x16hin32(t_phi_01_i, prev_imag, curr_real);
  449|  3.06M|        t_phi_01_i = ixheaacd_macn32x16hin32(t_phi_01_i, prev_real, curr_imag);
  450|       |
  451|  3.06M|        t_phi_11 = ixheaacd_mac32x16hin32(t_phi_11, curr_real, curr_real);
  452|  3.06M|        t_phi_11 = ixheaacd_mac32x16hin32(t_phi_11, curr_imag, curr_imag);
  453|  3.06M|      }
  454|       |
  455|   469k|      if (slots & 0x01) {
  ------------------
  |  Branch (455:11): [True: 220k, False: 249k]
  ------------------
  456|   220k|        curr_real = *real1;
  457|   220k|        curr_imag = *imag1;
  458|       |
  459|   220k|        curr_real = ixheaac_shr32(curr_real, 3);
  460|   220k|        curr_imag = ixheaac_shr32(curr_imag, 3);
  461|       |
  462|   220k|        t_phi_01 = ixheaacd_mac32x16hin32(t_phi_01, curr_real, prev_real);
  463|   220k|        t_phi_01 = ixheaacd_mac32x16hin32(t_phi_01, curr_imag, prev_imag);
  464|       |
  465|   220k|        t_phi_01_i = ixheaacd_mac32x16hin32(t_phi_01_i, curr_imag, prev_real);
  466|   220k|        t_phi_01_i = ixheaacd_macn32x16hin32(t_phi_01_i, curr_real, prev_imag);
  467|       |
  468|   220k|        t_phi_11 = ixheaacd_mac32x16hin32(t_phi_11, prev_real, prev_real);
  469|   220k|        t_phi_11 = ixheaacd_mac32x16hin32(t_phi_11, prev_imag, prev_imag);
  470|   220k|      }
  471|   469k|    }
  472|       |
  473|   469k|    {
  474|   469k|      WORD32 t_phi_22 = t_phi_11;
  475|   469k|      WORD32 curr_real = real_buffer[-2 * 128];
  476|   469k|      WORD32 curr_imag = img_buffer[-2 * 128];
  477|       |
  478|   469k|      curr_real = ixheaac_shr32(curr_real, 3);
  479|   469k|      curr_imag = ixheaac_shr32(curr_imag, 3);
  480|       |
  481|   469k|      t_phi_22 = ixheaacd_mac32x16hin32(t_phi_22, curr_real, curr_real);
  482|   469k|      t_phi_22 = ixheaacd_mac32x16hin32(t_phi_22, curr_imag, curr_imag);
  483|       |
  484|   469k|      curr_real = real_buffer[(slots - 2) * 128];
  485|   469k|      curr_imag = img_buffer[(slots - 2) * 128];
  486|       |
  487|   469k|      curr_real = ixheaac_shr32(curr_real, 3);
  488|   469k|      curr_imag = ixheaac_shr32(curr_imag, 3);
  489|       |
  490|   469k|      t_phi_11 = ixheaacd_mac32x16hin32(t_phi_11, curr_real, curr_real);
  491|   469k|      t_phi_11 = ixheaacd_mac32x16hin32(t_phi_11, curr_imag, curr_imag);
  492|       |
  493|   469k|      cov_matrix->phi_11 = t_phi_11;
  494|   469k|      cov_matrix->phi_22 = t_phi_22;
  495|   469k|    }
  496|       |
  497|   469k|    {
  498|   469k|      WORD32 t_phi_12 = t_phi_01;
  499|       |
  500|   469k|      t_phi_12 = ixheaacd_mac32x16hin32(t_phi_12, real_buffer[-128] >> 3,
  501|   469k|                                        real_buffer[-2 * 128] >> 3);
  502|   469k|      t_phi_12 = ixheaacd_mac32x16hin32(t_phi_12, img_buffer[-128] >> 3,
  503|   469k|                                        img_buffer[-2 * 128] >> 3);
  504|   469k|      t_phi_01 =
  505|   469k|          ixheaacd_mac32x16hin32(t_phi_01, real_buffer[(slots - 1) * 128] >> 3,
  506|   469k|                                 real_buffer[(slots - 2) * 128] >> 3);
  507|   469k|      t_phi_01 =
  508|   469k|          ixheaacd_mac32x16hin32(t_phi_01, img_buffer[(slots - 1) * 128] >> 3,
  509|   469k|                                 img_buffer[(slots - 2) * 128] >> 3);
  510|       |
  511|   469k|      cov_matrix->phi_01 = t_phi_01;
  512|   469k|      cov_matrix->phi_12 = t_phi_12;
  513|   469k|    }
  514|       |
  515|   469k|    {
  516|   469k|      WORD32 t_phi_12_i = t_phi_01_i;
  517|       |
  518|   469k|      t_phi_12_i = ixheaacd_mac32x16hin32(t_phi_12_i, img_buffer[-128] >> 3,
  519|   469k|                                          real_buffer[-2 * 128] >> 3);
  520|   469k|      t_phi_12_i = ixheaacd_macn32x16hin32(t_phi_12_i, real_buffer[-128] >> 3,
  521|   469k|                                           img_buffer[-2 * 128] >> 3);
  522|   469k|      t_phi_01_i =
  523|   469k|          ixheaacd_mac32x16hin32(t_phi_01_i, img_buffer[(slots - 1) * 128] >> 3,
  524|   469k|                                 real_buffer[(slots - 2) * 128] >> 3);
  525|   469k|      t_phi_01_i = ixheaacd_macn32x16hin32(t_phi_01_i,
  526|   469k|                                           real_buffer[(slots - 1) * 128] >> 3,
  527|   469k|                                           img_buffer[(slots - 2) * 128] >> 3);
  528|       |
  529|   469k|      cov_matrix->phi_01_im = t_phi_01_i;
  530|   469k|      cov_matrix->phi_12_im = t_phi_12_i;
  531|   469k|    }
  532|       |
  533|   469k|    {
  534|   469k|      WORD16 n, len_by_4, p;
  535|   469k|      WORD32 t_phi_02 = 0x00, t_phi_02_i = 0x00;
  536|       |
  537|   469k|      len_by_4 = (slots >> 2);
  538|   469k|      p = 0;
  539|  2.12M|      for (n = 0; n < len_by_4; n++) {
  ------------------
  |  Branch (539:19): [True: 1.65M, False: 469k]
  ------------------
  540|  1.65M|        WORD32 real1, real2, imag1, imag2;
  541|  1.65M|        real1 = real_buffer[p * 128];
  542|  1.65M|        real2 = real_buffer[(p - 2) * 128];
  543|  1.65M|        imag1 = img_buffer[p * 128];
  544|  1.65M|        imag2 = img_buffer[(p - 2) * 128];
  545|       |
  546|  1.65M|        real1 = ixheaac_shr32(real1, 3);
  547|  1.65M|        real2 = ixheaac_shr32(real2, 3);
  548|  1.65M|        imag1 = ixheaac_shr32(imag1, 3);
  549|  1.65M|        imag2 = ixheaac_shr32(imag2, 3);
  550|       |
  551|  1.65M|        t_phi_02 = ixheaacd_mac32x16hin32(t_phi_02, real1, real2);
  552|  1.65M|        t_phi_02 = ixheaacd_mac32x16hin32(t_phi_02, imag1, imag2);
  553|  1.65M|        t_phi_02_i = ixheaacd_mac32x16hin32(t_phi_02_i, imag1, real2);
  554|  1.65M|        t_phi_02_i = ixheaacd_macn32x16hin32(t_phi_02_i, real1, imag2);
  555|       |
  556|  1.65M|        real1 = real_buffer[(p + 1) * 128];
  557|  1.65M|        real2 = real_buffer[(p - 1) * 128];
  558|  1.65M|        imag1 = img_buffer[(p + 1) * 128];
  559|  1.65M|        imag2 = img_buffer[(p - 1) * 128];
  560|       |
  561|  1.65M|        real1 = ixheaac_shr32(real1, 3);
  562|  1.65M|        real2 = ixheaac_shr32(real2, 3);
  563|  1.65M|        imag1 = ixheaac_shr32(imag1, 3);
  564|  1.65M|        imag2 = ixheaac_shr32(imag2, 3);
  565|       |
  566|  1.65M|        t_phi_02 = ixheaacd_mac32x16hin32(t_phi_02, real1, real2);
  567|  1.65M|        t_phi_02 = ixheaacd_mac32x16hin32(t_phi_02, imag1, imag2);
  568|  1.65M|        t_phi_02_i = ixheaacd_mac32x16hin32(t_phi_02_i, imag1, real2);
  569|  1.65M|        t_phi_02_i = ixheaacd_macn32x16hin32(t_phi_02_i, real1, imag2);
  570|       |
  571|  1.65M|        real1 = real_buffer[(p + 2) * 128];
  572|  1.65M|        real2 = real_buffer[p * 128];
  573|  1.65M|        imag1 = img_buffer[(p + 2) * 128];
  574|  1.65M|        imag2 = img_buffer[p * 128];
  575|       |
  576|  1.65M|        real1 = ixheaac_shr32(real1, 3);
  577|  1.65M|        real2 = ixheaac_shr32(real2, 3);
  578|  1.65M|        imag1 = ixheaac_shr32(imag1, 3);
  579|  1.65M|        imag2 = ixheaac_shr32(imag2, 3);
  580|       |
  581|  1.65M|        t_phi_02 = ixheaacd_mac32x16hin32(t_phi_02, real1, real2);
  582|  1.65M|        t_phi_02 = ixheaacd_mac32x16hin32(t_phi_02, imag1, imag2);
  583|  1.65M|        t_phi_02_i = ixheaacd_mac32x16hin32(t_phi_02_i, imag1, real2);
  584|  1.65M|        t_phi_02_i = ixheaacd_macn32x16hin32(t_phi_02_i, real1, imag2);
  585|       |
  586|  1.65M|        real1 = real_buffer[(p + 3) * 128];
  587|  1.65M|        real2 = real_buffer[(p + 1) * 128];
  588|  1.65M|        imag1 = img_buffer[(p + 3) * 128];
  589|  1.65M|        imag2 = img_buffer[(p + 1) * 128];
  590|       |
  591|  1.65M|        real1 = ixheaac_shr32(real1, 3);
  592|  1.65M|        real2 = ixheaac_shr32(real2, 3);
  593|  1.65M|        imag1 = ixheaac_shr32(imag1, 3);
  594|  1.65M|        imag2 = ixheaac_shr32(imag2, 3);
  595|       |
  596|  1.65M|        t_phi_02 = ixheaacd_mac32x16hin32(t_phi_02, real1, real2);
  597|  1.65M|        t_phi_02 = ixheaacd_mac32x16hin32(t_phi_02, imag1, imag2);
  598|  1.65M|        t_phi_02_i = ixheaacd_mac32x16hin32(t_phi_02_i, imag1, real2);
  599|  1.65M|        t_phi_02_i = ixheaacd_macn32x16hin32(t_phi_02_i, real1, imag2);
  600|  1.65M|        p += 4;
  601|  1.65M|      }
  602|   469k|      n = ixheaac_shl16(len_by_4, 2);
  603|  1.13M|      for (; n < slots; n++) {
  ------------------
  |  Branch (603:14): [True: 661k, False: 469k]
  ------------------
  604|   661k|        WORD32 real1, real2, imag1, imag2;
  605|   661k|        real1 = real_buffer[(n * 128)];
  606|   661k|        real2 = real_buffer[(n - 2) * 128];
  607|   661k|        imag1 = img_buffer[n * 128];
  608|   661k|        imag2 = img_buffer[(n - 2) * 128];
  609|       |
  610|   661k|        real1 = ixheaac_shr32(real1, 3);
  611|   661k|        real2 = ixheaac_shr32(real2, 3);
  612|   661k|        imag1 = ixheaac_shr32(imag1, 3);
  613|   661k|        imag2 = ixheaac_shr32(imag2, 3);
  614|       |
  615|   661k|        t_phi_02 = ixheaacd_mac32x16hin32(t_phi_02, real1, real2);
  616|   661k|        t_phi_02 = ixheaacd_mac32x16hin32(t_phi_02, imag1, imag2);
  617|   661k|        t_phi_02_i = ixheaacd_mac32x16hin32(t_phi_02_i, imag1, real2);
  618|   661k|        t_phi_02_i = ixheaacd_macn32x16hin32(t_phi_02_i, real1, imag2);
  619|   661k|      }
  620|       |
  621|   469k|      cov_matrix->phi_02 = t_phi_02;
  622|   469k|      cov_matrix->phi_02_im = t_phi_02_i;
  623|   469k|    }
  624|   469k|    ptr_real++;
  625|   469k|    pac_arr++;
  626|   469k|  }
  627|  46.3k|}
ixheaacd_clr_subsamples:
  835|  50.4k|VOID ixheaacd_clr_subsamples(WORD32 *ptr_qmf_buf, WORD32 num, WORD32 size) {
  836|  50.4k|  WORD32 i;
  837|  1.62M|  for (i = num; i >= 0; i--) {
  ------------------
  |  Branch (837:17): [True: 1.57M, False: 50.4k]
  ------------------
  838|  1.57M|    memset(ptr_qmf_buf, 0, sizeof(WORD32) * (size));
  839|  1.57M|    ptr_qmf_buf += 64;
  840|  1.57M|  }
  841|  50.4k|}
ixheaacd_hf_generator:
  962|  46.3k|                           WORD32 *sub_sig_x, WORD audio_object_type) {
  963|  46.3k|  WORD32 bw_index[MAX_NUM_PATCHES];
  964|  46.3k|  WORD32 bw_array[MAX_NUM_PATCHES];
  965|       |
  966|  46.3k|  WORD32 i, j;
  967|  46.3k|  WORD32 start_patch, stop_patch, low_band, high_band;
  968|  46.3k|  ia_patch_param_struct *patch_param =
  969|  46.3k|      hf_generator->pstr_settings->str_patch_param;
  970|  46.3k|  WORD32 patch;
  971|       |
  972|  46.3k|  WORD16 alpha_real[LPC_ORDER];
  973|  46.3k|  WORD16 a0r, a1r;
  974|  46.3k|  WORD16 alpha_imag[LPC_ORDER];
  975|  46.3k|  WORD16 a0i = 0, a1i = 0;
  976|       |
  977|  46.3k|  WORD16 bw = 0;
  978|       |
  979|  46.3k|  ia_lpp_trans_cov_matrix cov_matrix;
  980|  46.3k|  ia_lpp_trans_cov_matrix cov_matrix_seq[MAX_COLS];
  981|       |
  982|  46.3k|  WORD32 common_scale;
  983|  46.3k|  WORD32 actual_stop_band;
  984|  46.3k|  WORD32 num_patches = hf_generator->pstr_settings->num_patches;
  985|       |
  986|  46.3k|  WORD32  auto_corr_length = hf_generator->pstr_settings->num_columns + 6;
  987|       |
  988|  46.3k|  start_idx = (start_idx * factor);
  989|       |
  990|  46.3k|  stop_idx = (hf_generator->pstr_settings->num_columns + (stop_idx * factor));
  991|       |
  992|  46.3k|  ixheaacd_invfilt_level_emphasis(hf_generator, num_if_bands, sbr_invf_mode,
  993|  46.3k|                                  sbr_invf_mode_prev, bw_array);
  994|       |
  995|  46.3k|  actual_stop_band =
  996|  46.3k|      ixheaac_add16(patch_param[num_patches - 1].dst_start_band,
  997|  46.3k|                     patch_param[num_patches - 1].num_bands_in_patch);
  998|       |
  999|   770k|  for (i = start_idx; i < stop_idx; i++) {
  ------------------
  |  Branch (999:23): [True: 723k, False: 46.3k]
  ------------------
 1000|   723k|    WORD32 *p_qmf_real = &qmf_real[i][actual_stop_band];
 1001|   723k|    WORD32 *p_qmf_imag = &qmf_imag[i][actual_stop_band];
 1002|       |
 1003|  20.8M|    for (j = NO_SYNTHESIS_CHANNELS - actual_stop_band; j != 0; j--) {
  ------------------
  |  |   34|   723k|#define NO_SYNTHESIS_CHANNELS 64
  ------------------
  |  Branch (1003:56): [True: 20.0M, False: 723k]
  ------------------
 1004|  20.0M|      *p_qmf_real++ = 0;
 1005|  20.0M|      *p_qmf_imag++ = 0;
 1006|  20.0M|    }
 1007|   723k|  }
 1008|       |
 1009|  46.3k|  memset(bw_index, 0, sizeof(WORD32) * num_patches);
 1010|       |
 1011|  46.3k|  common_scale =
 1012|  46.3k|      ixheaac_min32(scale_factor->ov_lb_scale, scale_factor->lb_scale);
 1013|       |
 1014|  46.3k|  start_patch = hf_generator->pstr_settings->start_patch;
 1015|  46.3k|  stop_patch = hf_generator->pstr_settings->stop_patch;
 1016|       |
 1017|  46.3k|  {
 1018|  46.3k|    WORD32 *ptr;
 1019|   139k|    for (i = 0; i < LPC_ORDER; i++) {
  ------------------
  |  |   65|   139k|#define LPC_ORDER 2
  ------------------
  |  Branch (1019:17): [True: 92.7k, False: 46.3k]
  ------------------
 1020|  92.7k|      ptr = sub_sig_x + (start_patch) + i * 128;
 1021|  92.7k|      memcpy(ptr, &hf_generator->lpc_filt_states_real[i][start_patch],
 1022|  92.7k|             sizeof(WORD32) * (stop_patch - start_patch));
 1023|  92.7k|      memcpy(ptr + 64, &hf_generator->lpc_filt_states_imag[i][start_patch],
 1024|  92.7k|             sizeof(WORD32) * (stop_patch - start_patch));
 1025|  92.7k|    }
 1026|  46.3k|  }
 1027|  46.3k|  if (audio_object_type != AOT_ER_AAC_ELD &&
  ------------------
  |  Branch (1027:7): [True: 0, False: 46.3k]
  ------------------
 1028|      0|      audio_object_type != AOT_ER_AAC_LD) {
  ------------------
  |  Branch (1028:7): [True: 0, False: 0]
  ------------------
 1029|      0|    if (auto_corr_length == 36) {
  ------------------
  |  Branch (1029:9): [True: 0, False: 0]
  ------------------
 1030|      0|      (*ixheaacd_covariance_matrix_calc_2)(
 1031|      0|          &cov_matrix_seq[start_patch],
 1032|      0|          (sub_sig_x + start_patch + LPC_ORDER * 128),
  ------------------
  |  |   65|      0|#define LPC_ORDER 2
  ------------------
 1033|      0|          (stop_patch - start_patch), auto_corr_length);
 1034|      0|     } else {
 1035|      0|      (*ixheaacd_covariance_matrix_calc_2)(
 1036|      0|          &cov_matrix_seq[start_patch],
 1037|      0|          (sub_sig_x + start_patch + LPC_ORDER * 128),
  ------------------
  |  |   65|      0|#define LPC_ORDER 2
  ------------------
 1038|      0|          (stop_patch - start_patch), 38);
 1039|      0|    }
 1040|  46.3k|  } else {
 1041|  46.3k|    if (hf_generator->pstr_settings->num_columns == 15) {
  ------------------
  |  Branch (1041:9): [True: 18.3k, False: 28.0k]
  ------------------
 1042|  18.3k|      (*ixheaacd_covariance_matrix_calc_2)(
 1043|  18.3k|          &cov_matrix_seq[start_patch],
 1044|  18.3k|          (sub_sig_x + start_patch + LPC_ORDER * 128),
  ------------------
  |  |   65|  18.3k|#define LPC_ORDER 2
  ------------------
 1045|  18.3k|          (stop_patch - start_patch),
 1046|  18.3k|          hf_generator->pstr_settings->num_columns);
 1047|  28.0k|     } else {
 1048|  28.0k|      (*ixheaacd_covariance_matrix_calc_2)(
 1049|  28.0k|          &cov_matrix_seq[start_patch],
 1050|  28.0k|          (sub_sig_x + start_patch + LPC_ORDER * 128),
  ------------------
  |  |   65|  28.0k|#define LPC_ORDER 2
  ------------------
 1051|  28.0k|          (stop_patch - start_patch), 16);
 1052|  28.0k|    }
 1053|  46.3k|  }
 1054|       |
 1055|   516k|  for (low_band = start_patch; low_band < stop_patch; low_band++) {
  ------------------
  |  Branch (1055:32): [True: 469k, False: 46.3k]
  ------------------
 1056|   469k|    FLAG reset_lpc_coeff = 0;
 1057|   469k|    WORD32 max_val;
 1058|   469k|    WORD32 q_shift;
 1059|   469k|    WORD32 v;
 1060|   469k|    max_val = ixheaac_abs32_nrm(cov_matrix_seq[low_band].phi_01);
 1061|   469k|    max_val = max_val | ixheaac_abs32_nrm(cov_matrix_seq[low_band].phi_02);
 1062|   469k|    max_val = max_val | ixheaac_abs32_nrm(cov_matrix_seq[low_band].phi_12);
 1063|       |
 1064|   469k|    max_val = max_val | (cov_matrix_seq[low_band].phi_11);
 1065|   469k|    max_val = max_val | (cov_matrix_seq[low_band].phi_22);
 1066|   469k|    max_val = max_val | ixheaac_abs32_nrm(cov_matrix_seq[low_band].phi_01_im);
 1067|   469k|    max_val = max_val | ixheaac_abs32_nrm(cov_matrix_seq[low_band].phi_02_im);
 1068|   469k|    max_val = max_val | ixheaac_abs32_nrm(cov_matrix_seq[low_band].phi_12_im);
 1069|       |
 1070|   469k|    q_shift = ixheaac_pnorm32(max_val);
 1071|       |
 1072|   469k|    cov_matrix.phi_11 = (cov_matrix_seq[low_band].phi_11 << q_shift);
 1073|   469k|    cov_matrix.phi_22 = (cov_matrix_seq[low_band].phi_22 << q_shift);
 1074|   469k|    cov_matrix.phi_01 = (cov_matrix_seq[low_band].phi_01 << q_shift);
 1075|   469k|    cov_matrix.phi_02 = (cov_matrix_seq[low_band].phi_02 << q_shift);
 1076|   469k|    cov_matrix.phi_12 = (cov_matrix_seq[low_band].phi_12 << q_shift);
 1077|   469k|    cov_matrix.phi_01_im = (cov_matrix_seq[low_band].phi_01_im << q_shift);
 1078|   469k|    cov_matrix.phi_02_im = (cov_matrix_seq[low_band].phi_02_im << q_shift);
 1079|   469k|    cov_matrix.phi_12_im = (cov_matrix_seq[low_band].phi_12_im << q_shift);
 1080|       |
 1081|   469k|    max_val = ixheaac_mult32(cov_matrix.phi_12, cov_matrix.phi_12);
 1082|   469k|    max_val = ixheaac_add32_sat(
 1083|   469k|        max_val, ixheaac_mult32(cov_matrix.phi_12_im, cov_matrix.phi_12_im));
 1084|       |
 1085|   469k|    v = ixheaac_sub32_sat(
 1086|   469k|            ixheaac_mult32(cov_matrix.phi_11, cov_matrix.phi_22), max_val)
 1087|   469k|        << 1;
 1088|   469k|    cov_matrix.d = v;
 1089|       |
 1090|   469k|    alpha_real[1] = 0;
 1091|   469k|    alpha_imag[1] = 0;
 1092|       |
 1093|   469k|    if (cov_matrix.d != 0) {
  ------------------
  |  Branch (1093:9): [True: 376k, False: 93.6k]
  ------------------
 1094|   376k|      WORD32 tmp_r, temp_real, modulus_d;
 1095|   376k|      WORD32 tmp_i, temp_imag;
 1096|   376k|      WORD16 inverse_d;
 1097|   376k|      WORD32 norm_d;
 1098|       |
 1099|   376k|      norm_d = ixheaac_norm32(cov_matrix.d);
 1100|       |
 1101|   376k|      inverse_d =
 1102|   376k|          (WORD16)(*ixheaacd_fix_div)(0x40000000, (cov_matrix.d << norm_d));
 1103|       |
 1104|   376k|      modulus_d = ixheaac_abs32_sat(cov_matrix.d);
 1105|   376k|      tmp_r =
 1106|   376k|          (ixheaac_sub32_sat(
 1107|   376k|              ixheaac_sub32_sat(
 1108|   376k|                  ixheaac_mult32(cov_matrix.phi_01, cov_matrix.phi_12),
 1109|   376k|                  ixheaac_mult32(cov_matrix.phi_01_im, cov_matrix.phi_12_im)),
 1110|   376k|              ixheaac_mult32(cov_matrix.phi_02, cov_matrix.phi_11))) >>
 1111|   376k|          (LPC_SCALE_FACTOR - 1);
  ------------------
  |  |   77|   376k|#define LPC_SCALE_FACTOR 2
  ------------------
 1112|   376k|      tmp_i = (ixheaac_sub32_sat(
 1113|   376k|                  ixheaac_add32_sat(
 1114|   376k|                      ixheaac_mult32(cov_matrix.phi_01_im, cov_matrix.phi_12),
 1115|   376k|                      ixheaac_mult32(cov_matrix.phi_01, cov_matrix.phi_12_im)),
 1116|   376k|                  ixheaac_mult32(cov_matrix.phi_02_im, cov_matrix.phi_11))) >>
 1117|   376k|              (LPC_SCALE_FACTOR - 1);
  ------------------
  |  |   77|   376k|#define LPC_SCALE_FACTOR 2
  ------------------
 1118|   376k|      temp_imag = ixheaac_abs32_sat(tmp_i);
 1119|   376k|      temp_real = ixheaac_abs32_sat(tmp_r);
 1120|       |
 1121|   376k|      if (temp_real >= modulus_d) {
  ------------------
  |  Branch (1121:11): [True: 1.41k, False: 374k]
  ------------------
 1122|  1.41k|        reset_lpc_coeff = 1;
 1123|   374k|      } else {
 1124|   374k|        alpha_real[1] = (WORD16)(
 1125|   374k|            (ixheaac_mult32x16in32(tmp_r, inverse_d) << (norm_d + 1)) >> 15);
 1126|   374k|      }
 1127|       |
 1128|   376k|      if (temp_imag >= modulus_d) {
  ------------------
  |  Branch (1128:11): [True: 2.66k, False: 373k]
  ------------------
 1129|  2.66k|        reset_lpc_coeff = 1;
 1130|   373k|      } else {
 1131|   373k|        alpha_imag[1] = (WORD16)(
 1132|   373k|            (ixheaac_mult32x16in32(tmp_i, inverse_d) << (norm_d + 1)) >> 15);
 1133|   373k|      }
 1134|   376k|    }
 1135|       |
 1136|   469k|    alpha_real[0] = 0;
 1137|   469k|    alpha_imag[0] = 0;
 1138|       |
 1139|   469k|    if (cov_matrix.phi_11 != 0) {
  ------------------
  |  Branch (1139:9): [True: 374k, False: 95.4k]
  ------------------
 1140|   374k|      WORD32 tmp_r, temp_real;
 1141|   374k|      WORD32 tmp_i = 0, temp_imag = 0;
 1142|   374k|      WORD16 inverse_r11;
 1143|   374k|      WORD32 norm_r11;
 1144|       |
 1145|   374k|      norm_r11 = ixheaac_norm32(cov_matrix.phi_11);
 1146|       |
 1147|   374k|      inverse_r11 = (WORD16)(*ixheaacd_fix_div)(
 1148|   374k|          0x40000000, (cov_matrix.phi_11 << norm_r11));
 1149|       |
 1150|   374k|      tmp_r = ixheaac_add32_sat(
 1151|   374k|          ixheaac_add32(
 1152|   374k|              (cov_matrix.phi_01 >> (LPC_SCALE_FACTOR + 1)),
  ------------------
  |  |   77|   374k|#define LPC_SCALE_FACTOR 2
  ------------------
 1153|   374k|              ixheaac_mult32x16in32(cov_matrix.phi_12, alpha_real[1])),
 1154|   374k|          ixheaac_mult32x16in32(cov_matrix.phi_12_im, alpha_imag[1]));
 1155|   374k|      tmp_i = ixheaac_sub32_sat(
 1156|   374k|          ixheaac_add32(
 1157|   374k|              (cov_matrix.phi_01_im >> (LPC_SCALE_FACTOR + 1)),
  ------------------
  |  |   77|   374k|#define LPC_SCALE_FACTOR 2
  ------------------
 1158|   374k|              ixheaac_mult32x16in32(cov_matrix.phi_12, alpha_imag[1])),
 1159|   374k|          ixheaac_mult32x16in32(cov_matrix.phi_12_im, alpha_real[1]));
 1160|       |
 1161|   374k|      tmp_r = tmp_r << 1;
 1162|   374k|      tmp_i = tmp_i << 1;
 1163|       |
 1164|   374k|      temp_imag = ixheaac_abs32_sat(tmp_i);
 1165|   374k|      temp_real = ixheaac_abs32_sat(tmp_r);
 1166|       |
 1167|   374k|      if (temp_real >= cov_matrix.phi_11) {
  ------------------
  |  Branch (1167:11): [True: 471, False: 374k]
  ------------------
 1168|    471|        reset_lpc_coeff = 1;
 1169|   374k|      } else {
 1170|   374k|        alpha_real[0] = (WORD16)(
 1171|   374k|            (ixheaac_mult32x16in32(ixheaac_sub32_sat(0, tmp_r), inverse_r11)
 1172|   374k|             << (norm_r11 + 1)) >>
 1173|   374k|            15);
 1174|   374k|      }
 1175|       |
 1176|   374k|      if (temp_imag >= cov_matrix.phi_11) {
  ------------------
  |  Branch (1176:11): [True: 306, False: 374k]
  ------------------
 1177|    306|        reset_lpc_coeff = 1;
 1178|   374k|      } else {
 1179|   374k|        alpha_imag[0] = (WORD16)(
 1180|   374k|            (ixheaac_mult32x16in32(ixheaac_sub32_sat(0, tmp_i), inverse_r11)
 1181|   374k|             << (norm_r11 + 1)) >>
 1182|   374k|            15);
 1183|   374k|      }
 1184|   374k|    }
 1185|       |
 1186|   469k|    if (ixheaac_add32_sat((alpha_real[0] * alpha_real[0]),
  ------------------
  |  Branch (1186:9): [True: 99, False: 469k]
  ------------------
 1187|   469k|                           (alpha_imag[0] * alpha_imag[0])) >= 0x40000000L) {
 1188|     99|      reset_lpc_coeff = 1;
 1189|     99|    }
 1190|       |
 1191|   469k|    if (ixheaac_add32_sat((alpha_real[1] * alpha_real[1]),
  ------------------
  |  Branch (1191:9): [True: 199, False: 469k]
  ------------------
 1192|   469k|                           (alpha_imag[1] * alpha_imag[1])) >= 0x40000000L) {
 1193|    199|      reset_lpc_coeff = 1;
 1194|    199|    }
 1195|       |
 1196|   469k|    if (reset_lpc_coeff) {
  ------------------
  |  Branch (1196:9): [True: 3.66k, False: 466k]
  ------------------
 1197|  3.66k|      alpha_real[0] = 0;
 1198|  3.66k|      alpha_real[1] = 0;
 1199|  3.66k|      alpha_imag[0] = 0;
 1200|  3.66k|      alpha_imag[1] = 0;
 1201|  3.66k|    }
 1202|       |
 1203|   469k|    patch = 0;
 1204|       |
 1205|  1.62M|    while (patch < num_patches) {
  ------------------
  |  Branch (1205:12): [True: 1.15M, False: 469k]
  ------------------
 1206|  1.15M|      high_band = (low_band + patch_param[patch].dst_end_band);
 1207|       |
 1208|  1.15M|      if ((low_band < patch_param[patch].src_start_band) ||
  ------------------
  |  Branch (1208:11): [True: 215k, False: 934k]
  ------------------
 1209|   934k|          (low_band >= patch_param[patch].src_end_band)) {
  ------------------
  |  Branch (1209:11): [True: 20.4k, False: 914k]
  ------------------
 1210|   236k|        patch++;
 1211|   236k|        continue;
 1212|   236k|      }
 1213|       |
 1214|   914k|      if (high_band < max_qmf_subband) {
  ------------------
  |  Branch (1214:11): [True: 0, False: 914k]
  ------------------
 1215|      0|        patch++;
 1216|      0|        continue;
 1217|      0|      }
 1218|       |
 1219|  1.05M|      while ((bw_index[patch] < MAX_NUM_PATCHES - 1) &&
  ------------------
  |  |   23|  1.05M|#define MAX_NUM_PATCHES 6
  ------------------
  |  Branch (1219:14): [True: 1.05M, False: 0]
  ------------------
 1220|  1.05M|             (bw_index[patch] < MAX_NUM_NOISE_VALUES) &&
  ------------------
  |  |   46|  1.05M|#define MAX_NUM_NOISE_VALUES (MAX_NOISE_ENVELOPES * MAX_NOISE_COEFFS)
  |  |  ------------------
  |  |  |  |   44|  1.05M|#define MAX_NOISE_ENVELOPES 2
  |  |  ------------------
  |  |               #define MAX_NUM_NOISE_VALUES (MAX_NOISE_ENVELOPES * MAX_NOISE_COEFFS)
  |  |  ------------------
  |  |  |  |   45|  1.05M|#define MAX_NOISE_COEFFS 5
  |  |  ------------------
  ------------------
  |  Branch (1220:14): [True: 1.05M, False: 0]
  ------------------
 1221|  1.05M|             (high_band >=
  ------------------
  |  Branch (1221:14): [True: 143k, False: 914k]
  ------------------
 1222|  1.05M|              hf_generator->pstr_settings->bw_borders[bw_index[patch]])) {
 1223|   143k|        bw_index[patch]++;
 1224|   143k|      }
 1225|       |
 1226|   914k|      bw = ixheaac_extract16h(bw_array[bw_index[patch]]);
 1227|   914k|      a0r = ixheaac_mult16_shl_sat(bw, alpha_real[0]);
 1228|   914k|      a0i = ixheaac_mult16_shl_sat(bw, alpha_imag[0]);
 1229|   914k|      bw = ixheaac_mult16_shl_sat(bw, bw);
 1230|   914k|      a1r = ixheaac_mult16_shl_sat(bw, alpha_real[1]);
 1231|   914k|      a1i = ixheaac_mult16_shl_sat(bw, alpha_imag[1]);
 1232|       |
 1233|   914k|      if (bw > 0) {
  ------------------
  |  Branch (1233:11): [True: 309k, False: 605k]
  ------------------
 1234|   309k|        ixheaacd_filterstep3(a0r, a0i, a1r, a1i, start_idx, stop_idx, low_band,
 1235|   309k|                             high_band, sub_sig_x);
 1236|       |
 1237|   605k|      } else {
 1238|   605k|        WORD32 *p_src = sub_sig_x + low_band + ((start_idx + 2) << 7);
 1239|   605k|        WORD32 *p_dst = sub_sig_x + high_band + ((start_idx + 2) << 7);
 1240|       |
 1241|  10.0M|        for (i = stop_idx - start_idx; i != 0; i--) {
  ------------------
  |  Branch (1241:40): [True: 9.40M, False: 605k]
  ------------------
 1242|  9.40M|          *(p_dst) = *(p_src) >> LPC_SCALE_FACTOR;
  ------------------
  |  |   77|  9.40M|#define LPC_SCALE_FACTOR 2
  ------------------
 1243|  9.40M|          p_src += 64;
 1244|  9.40M|          p_dst += 64;
 1245|  9.40M|          *(p_dst) = *(p_src) >> LPC_SCALE_FACTOR;
  ------------------
  |  |   77|  9.40M|#define LPC_SCALE_FACTOR 2
  ------------------
 1246|  9.40M|          p_src += 64;
 1247|  9.40M|          p_dst += 64;
 1248|  9.40M|        }
 1249|   605k|      }
 1250|       |
 1251|   914k|      patch++;
 1252|   914k|    }
 1253|   469k|  }
 1254|       |
 1255|  46.3k|  memcpy(hf_generator->bw_array_prev, bw_array, sizeof(WORD32) * num_if_bands);
 1256|       |
 1257|  46.3k|  scale_factor->hb_scale = (WORD16)(common_scale - LPC_SCALE_FACTOR);
  ------------------
  |  |   77|  46.3k|#define LPC_SCALE_FACTOR 2
  ------------------
 1258|  46.3k|}
ixheaacd_lpp_tran.c:ixheaacd_mac32x16hin32:
   85|  59.3M|                                                     WORD32 c) {
   86|  59.3M|  WORD32 result;
   87|       |
   88|  59.3M|  result = a + ixheaac_mult32x16hin32(b, c);
   89|       |
   90|  59.3M|  return (result);
   91|  59.3M|}
ixheaacd_lpp_tran.c:ixheaacd_macn32x16hin32:
   94|  15.0M|                                                      WORD32 c) {
   95|  15.0M|  WORD32 result;
   96|       |
   97|  15.0M|  result = a - ixheaac_mult32x16hin32(b, c);
   98|       |
   99|  15.0M|  return (result);
  100|  15.0M|}

ixheaacd_lt_prediction:
   57|  98.3k|    UWORD32 frame_len, WORD32 *in_data, WORD32 *out_data) {
   58|  98.3k|  ia_ics_info_struct *ptr_ics_info = &ptr_aac_dec_channel_info->str_ics_info;
   59|  98.3k|  WORD16 *lt_pred_stat = ptr_aac_dec_channel_info->ltp_buf;
   60|  98.3k|  UWORD16 win_shape = ptr_aac_dec_channel_info->str_ics_info.window_shape;
   61|  98.3k|  WORD16 sfb;
   62|  98.3k|  WORD16 bin, i, num_samples;
   63|  98.3k|  const WORD8 *swb_offset = aac_tables_ptr->scale_factor_bands_long[sr_index];
   64|  98.3k|  WORD32 *ptr_spec = &spec[0];
   65|  98.3k|  WORD32 *ptr_x_est = &out_data[0];
   66|       |
   67|  98.3k|  if (512 == ptr_ics_info->frame_length) {
  ------------------
  |  Branch (67:7): [True: 50.8k, False: 47.4k]
  ------------------
   68|  50.8k|    swb_offset = aac_tables_ptr->scale_fac_bands_512[sr_index];
   69|  50.8k|  } else if (480 == ptr_ics_info->frame_length) {
  ------------------
  |  Branch (69:14): [True: 9.64k, False: 37.8k]
  ------------------
   70|  9.64k|    swb_offset = aac_tables_ptr->scale_fac_bands_480[sr_index];
   71|  9.64k|  }
   72|       |
   73|  98.3k|  if (ptr_ics_info->window_sequence != EIGHT_SHORT_SEQUENCE) {
  ------------------
  |  |  102|  98.3k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  |  Branch (73:7): [True: 83.5k, False: 14.8k]
  ------------------
   74|  83.5k|    if (ltp->data_present) {
  ------------------
  |  Branch (74:9): [True: 43.6k, False: 39.8k]
  ------------------
   75|  43.6k|      num_samples = frame_len << 1;
   76|       |
   77|  51.1M|      for (i = 0; i < num_samples; i++) {
  ------------------
  |  Branch (77:19): [True: 51.1M, False: 43.6k]
  ------------------
   78|  51.1M|        in_data[i] =
   79|  51.1M|            ixheaac_shr32(ixheaac_mult32x16in32_shl_sat(
   80|  51.1M|                               ixheaacd_codebook_Q30[ltp->coef],
   81|  51.1M|                               lt_pred_stat[num_samples + i - ltp->lag]),
   82|  51.1M|                           SHIFT_VAL);
  ------------------
  |  |   50|  51.1M|#define SHIFT_VAL 8
  ------------------
   83|  51.1M|      }
   84|       |
   85|  43.6k|      ixheaacd_filter_bank_ltp(aac_tables_ptr, ptr_ics_info->window_sequence,
   86|  43.6k|                               win_shape, win_shape_prev, in_data, out_data,
   87|  43.6k|                               object_type, frame_len);
   88|       |
   89|  43.6k|      if (ptr_aac_dec_channel_info->str_tns_info.tns_data_present == 1)
  ------------------
  |  Branch (89:11): [True: 9.19k, False: 34.4k]
  ------------------
   90|  9.19k|        ixheaacd_aac_tns_process(ptr_aac_dec_channel_info, 1, aac_tables_ptr,
   91|  9.19k|                                 object_type, 0, out_data);
   92|       |
   93|   823k|      for (sfb = 0; sfb < ltp->last_band; sfb++) {
  ------------------
  |  Branch (93:21): [True: 780k, False: 43.6k]
  ------------------
   94|   780k|        WORD8 sfb_width = swb_offset[sfb];
   95|   780k|        if (ltp->long_used[sfb]) {
  ------------------
  |  Branch (95:13): [True: 347k, False: 432k]
  ------------------
   96|  3.53M|          for (bin = sfb_width - 1; bin >= 0; bin--) {
  ------------------
  |  Branch (96:37): [True: 3.18M, False: 347k]
  ------------------
   97|  3.18M|            WORD32 temp = *ptr_spec;
   98|  3.18M|            temp = ixheaac_add32_sat(temp,
   99|  3.18M|                                      ixheaac_shr32(*ptr_x_est++, SHIFT_VAL1));
  ------------------
  |  |   51|  3.18M|#define SHIFT_VAL1 (15 - SHIFT_VAL)
  |  |  ------------------
  |  |  |  |   50|  3.18M|#define SHIFT_VAL 8
  |  |  ------------------
  ------------------
  100|  3.18M|            *ptr_spec++ = temp;
  101|  3.18M|          }
  102|   432k|        } else {
  103|   432k|          ptr_spec += sfb_width;
  104|   432k|          ptr_x_est += sfb_width;
  105|   432k|        }
  106|   780k|      }
  107|  43.6k|    }
  108|  83.5k|  }
  109|  98.3k|}
ixheaacd_filter_bank_ltp:
  115|  43.6k|                              UWORD32 frame_len) {
  116|  43.6k|  WORD32 i;
  117|       |
  118|  43.6k|  const WORD16 *window_long = NULL;
  119|  43.6k|  const WORD16 *window_long_prev = NULL;
  120|  43.6k|  const WORD16 *window_short = NULL;
  121|  43.6k|  const WORD16 *window_short_prev = NULL;
  122|       |
  123|  43.6k|  UWORD16 nlong = frame_len;
  124|  43.6k|  UWORD16 nlong2 = frame_len << 1;
  125|  43.6k|  UWORD16 nshort = frame_len / 8;
  126|  43.6k|  UWORD16 nflat_ls = (nlong - nshort) / 2;
  127|  43.6k|  WORD32 imdct_scale = 0;
  128|  43.6k|  WORD32 expo = 0;
  129|       |
  130|  43.6k|  if (object_type == AOT_ER_AAC_LD) {
  ------------------
  |  Branch (130:7): [True: 35.9k, False: 7.65k]
  ------------------
  131|  35.9k|    if (!window_shape) {
  ------------------
  |  Branch (131:9): [True: 14.4k, False: 21.5k]
  ------------------
  132|  14.4k|      if (512 == frame_len) {
  ------------------
  |  Branch (132:11): [True: 10.4k, False: 3.97k]
  ------------------
  133|  10.4k|        window_long =
  134|  10.4k|            (WORD16 *)aac_tables_ptr->pstr_imdct_tables->window_sine_512;
  135|  10.4k|      } else {
  136|  3.97k|        window_long =
  137|  3.97k|            (WORD16 *)aac_tables_ptr->pstr_imdct_tables->window_sine_480;
  138|  3.97k|      }
  139|  21.5k|    } else {
  140|  21.5k|      if (512 == frame_len) {
  ------------------
  |  Branch (140:11): [True: 15.3k, False: 6.17k]
  ------------------
  141|  15.3k|        window_long =
  142|  15.3k|            (WORD16 *)aac_tables_ptr->pstr_imdct_tables->low_overlap_win;
  143|  15.3k|      } else {
  144|  6.17k|        window_long =
  145|  6.17k|            (WORD16 *)aac_tables_ptr->pstr_imdct_tables->low_overlap_win_480;
  146|  6.17k|      }
  147|  21.5k|    }
  148|       |
  149|  35.9k|    if (!window_shape_prev) {
  ------------------
  |  Branch (149:9): [True: 16.5k, False: 19.4k]
  ------------------
  150|  16.5k|      if (512 == frame_len) {
  ------------------
  |  Branch (150:11): [True: 12.0k, False: 4.48k]
  ------------------
  151|  12.0k|        window_long_prev =
  152|  12.0k|            (WORD16 *)aac_tables_ptr->pstr_imdct_tables->window_sine_512;
  153|  12.0k|      } else {
  154|  4.48k|        window_long_prev =
  155|  4.48k|            (WORD16 *)aac_tables_ptr->pstr_imdct_tables->window_sine_480;
  156|  4.48k|      }
  157|  19.4k|    } else {
  158|  19.4k|      if (512 == frame_len) {
  ------------------
  |  Branch (158:11): [True: 13.8k, False: 5.65k]
  ------------------
  159|  13.8k|        window_long_prev =
  160|  13.8k|            (WORD16 *)aac_tables_ptr->pstr_imdct_tables->low_overlap_win;
  161|  13.8k|      } else {
  162|  5.65k|        window_long_prev =
  163|  5.65k|            (WORD16 *)aac_tables_ptr->pstr_imdct_tables->low_overlap_win_480;
  164|  5.65k|      }
  165|  19.4k|    }
  166|       |
  167|  35.9k|    if (!window_shape)
  ------------------
  |  Branch (167:9): [True: 14.4k, False: 21.5k]
  ------------------
  168|  14.4k|      window_short = aac_tables_ptr->pstr_imdct_tables->only_short_window_sine;
  169|  21.5k|    else
  170|  21.5k|      window_short = aac_tables_ptr->pstr_imdct_tables->only_short_window_kbd;
  171|  35.9k|    if (!window_shape_prev)
  ------------------
  |  Branch (171:9): [True: 16.5k, False: 19.4k]
  ------------------
  172|  16.5k|      window_short_prev =
  173|  16.5k|          aac_tables_ptr->pstr_imdct_tables->only_short_window_sine;
  174|  19.4k|    else
  175|  19.4k|      window_short_prev =
  176|  19.4k|          aac_tables_ptr->pstr_imdct_tables->only_short_window_kbd;
  177|       |
  178|  35.9k|  } else {
  179|  7.65k|    if (!window_shape)
  ------------------
  |  Branch (179:9): [True: 5.82k, False: 1.82k]
  ------------------
  180|  5.82k|      window_long = aac_tables_ptr->pstr_imdct_tables->only_long_window_sine;
  181|  1.82k|    else
  182|  1.82k|      window_long = aac_tables_ptr->pstr_imdct_tables->only_long_window_kbd;
  183|  7.65k|    if (!window_shape_prev)
  ------------------
  |  Branch (183:9): [True: 6.06k, False: 1.59k]
  ------------------
  184|  6.06k|      window_long_prev =
  185|  6.06k|          aac_tables_ptr->pstr_imdct_tables->only_long_window_sine;
  186|  1.59k|    else
  187|  1.59k|      window_long_prev =
  188|  1.59k|          aac_tables_ptr->pstr_imdct_tables->only_long_window_kbd;
  189|       |
  190|  7.65k|    if (!window_shape)
  ------------------
  |  Branch (190:9): [True: 5.82k, False: 1.82k]
  ------------------
  191|  5.82k|      window_short = aac_tables_ptr->pstr_imdct_tables->only_short_window_sine;
  192|  1.82k|    else
  193|  1.82k|      window_short = aac_tables_ptr->pstr_imdct_tables->only_short_window_kbd;
  194|  7.65k|    if (!window_shape_prev)
  ------------------
  |  Branch (194:9): [True: 6.06k, False: 1.59k]
  ------------------
  195|  6.06k|      window_short_prev =
  196|  6.06k|          aac_tables_ptr->pstr_imdct_tables->only_short_window_sine;
  197|  1.59k|    else
  198|  1.59k|      window_short_prev =
  199|  1.59k|          aac_tables_ptr->pstr_imdct_tables->only_short_window_kbd;
  200|  7.65k|  }
  201|       |
  202|  43.6k|  switch (window_sequence) {
  ------------------
  |  Branch (202:11): [True: 43.6k, False: 0]
  ------------------
  203|  20.6k|    case ONLY_LONG_SEQUENCE:
  ------------------
  |  |  100|  20.6k|#define ONLY_LONG_SEQUENCE 0
  ------------------
  |  Branch (203:5): [True: 20.6k, False: 23.0k]
  ------------------
  204|       |
  205|  20.6k|      if ((512 != nlong) && (480 != nlong)) {
  ------------------
  |  Branch (205:11): [True: 10.5k, False: 10.1k]
  |  Branch (205:29): [True: 5.82k, False: 4.68k]
  ------------------
  206|  2.80M|        for (i = 0; i<nlong>> 1; i++) {
  ------------------
  |  Branch (206:21): [True: 2.79M, False: 5.82k]
  ------------------
  207|  2.79M|          in_data[i] =
  208|  2.79M|              ixheaac_mult32x16in32_shl(in_data[i], window_long_prev[2 * i]);
  209|       |
  210|  2.79M|          in_data[i + nlong] = ixheaac_mult32x16in32_shl(
  211|  2.79M|              in_data[i + nlong], window_long[2 * i + 1]);
  212|  2.79M|        }
  213|  2.80M|        for (i = 0; i<nlong>> 1; i++) {
  ------------------
  |  Branch (213:21): [True: 2.79M, False: 5.82k]
  ------------------
  214|  2.79M|          in_data[i + (nlong >> 1)] = ixheaac_mult32x16in32_shl(
  215|  2.79M|              in_data[i + (nlong >> 1)], window_long_prev[nlong - 1 - 2 * i]);
  216|       |
  217|  2.79M|          in_data[i + nlong + (nlong >> 1)] =
  218|  2.79M|              ixheaac_mult32x16in32_shl(in_data[i + nlong + (nlong >> 1)],
  219|  2.79M|                                         window_long[nlong - 1 - 2 * i - 1]);
  220|  2.79M|        }
  221|       |
  222|  14.8k|      } else {
  223|  14.8k|        WORD32 *win1, *win2;
  224|  14.8k|        WORD32 *ptr_in1, *ptr_in2;
  225|  14.8k|        win1 = (WORD32 *)window_long_prev;
  226|  14.8k|        win2 = (WORD32 *)window_long;
  227|  14.8k|        ptr_in1 = &in_data[0];
  228|  14.8k|        ptr_in2 = &in_data[nlong];
  229|       |
  230|  7.44M|        for (i = nlong - 1; i >= 0; i--) {
  ------------------
  |  Branch (230:29): [True: 7.43M, False: 14.8k]
  ------------------
  231|  7.43M|          WORD32 temp1 = ixheaac_mult32_shl(*ptr_in1, *win1++);
  232|  7.43M|          WORD32 temp2 = ixheaac_mult32_shl(*ptr_in2, win2[i]);
  233|       |
  234|  7.43M|          *ptr_in1++ = temp1;
  235|  7.43M|          *ptr_in2++ = temp2;
  236|  7.43M|        }
  237|  14.8k|      }
  238|       |
  239|  6.53M|      for (i = 0; i < nlong / 2; i++) {
  ------------------
  |  Branch (239:19): [True: 6.50M, False: 20.6k]
  ------------------
  240|  6.50M|        out_mdct[nlong / 2 + i] =
  241|  6.50M|            ixheaac_sub32(in_data[i], in_data[nlong - 1 - i]);
  242|  6.50M|        out_mdct[i] = (-ixheaac_add32(in_data[nlong + i + nlong / 2],
  243|  6.50M|                                       in_data[nlong2 - nlong / 2 - 1 - i]));
  244|  6.50M|      }
  245|       |
  246|  20.6k|      if (512 == nlong || (480 == nlong)) {
  ------------------
  |  Branch (246:11): [True: 10.1k, False: 10.5k]
  |  Branch (246:27): [True: 4.68k, False: 5.82k]
  ------------------
  247|  14.8k|        if (512 == nlong)
  ------------------
  |  Branch (247:13): [True: 10.1k, False: 4.68k]
  ------------------
  248|  10.1k|          ixheaacd_inverse_transform_512(
  249|  10.1k|              out_mdct, in_data, &imdct_scale,
  250|  10.1k|              aac_tables_ptr->pstr_imdct_tables->cosine_array_1024,
  251|  10.1k|              aac_tables_ptr->pstr_imdct_tables, object_type);
  252|       |
  253|  4.68k|        else
  254|  4.68k|          ixheaacd_mdct_480_ld(out_mdct, in_data, &imdct_scale, 1,
  255|  4.68k|                               aac_tables_ptr->pstr_imdct_tables, object_type);
  256|       |
  257|  14.8k|        imdct_scale += 1;
  258|       |
  259|  14.8k|        if (imdct_scale > 0) {
  ------------------
  |  Branch (259:13): [True: 9.46k, False: 5.33k]
  ------------------
  260|  9.46k|          WORD32 *ptr_out_mdct = &out_mdct[0];
  261|       |
  262|  1.19M|          for (i = nlong - 1; i >= 0; i -= 4) {
  ------------------
  |  Branch (262:31): [True: 1.18M, False: 9.46k]
  ------------------
  263|  1.18M|            *ptr_out_mdct = ixheaac_shl32(*ptr_out_mdct, imdct_scale);
  264|  1.18M|            ptr_out_mdct++;
  265|  1.18M|            *ptr_out_mdct = ixheaac_shl32(*ptr_out_mdct, imdct_scale);
  266|  1.18M|            ptr_out_mdct++;
  267|  1.18M|            *ptr_out_mdct = ixheaac_shl32(*ptr_out_mdct, imdct_scale);
  268|  1.18M|            ptr_out_mdct++;
  269|  1.18M|            *ptr_out_mdct = ixheaac_shl32(*ptr_out_mdct, imdct_scale);
  270|  1.18M|            ptr_out_mdct++;
  271|  1.18M|          }
  272|  9.46k|        } else if (imdct_scale < 0) {
  ------------------
  |  Branch (272:20): [True: 5.24k, False: 95]
  ------------------
  273|  5.24k|          WORD32 *ptr_out_mdct = &out_mdct[0];
  274|  5.24k|          imdct_scale = -imdct_scale;
  275|   662k|          for (i = nlong - 1; i >= 0; i -= 4) {
  ------------------
  |  Branch (275:31): [True: 657k, False: 5.24k]
  ------------------
  276|   657k|            *ptr_out_mdct = ixheaac_shr32(*ptr_out_mdct, imdct_scale);
  277|   657k|            ptr_out_mdct++;
  278|   657k|            *ptr_out_mdct = ixheaac_shr32(*ptr_out_mdct, imdct_scale);
  279|   657k|            ptr_out_mdct++;
  280|   657k|            *ptr_out_mdct = ixheaac_shr32(*ptr_out_mdct, imdct_scale);
  281|   657k|            ptr_out_mdct++;
  282|   657k|            *ptr_out_mdct = ixheaac_shr32(*ptr_out_mdct, imdct_scale);
  283|   657k|            ptr_out_mdct++;
  284|   657k|          }
  285|  5.24k|        }
  286|  14.8k|      }
  287|       |
  288|  5.82k|      else if (1024 == nlong) {
  ------------------
  |  Branch (288:16): [True: 22, False: 5.79k]
  ------------------
  289|     22|        expo = ixheaacd_calc_max_spectral_line_dec(out_mdct, 1024) - 1;
  290|       |
  291|     22|        expo = 8 - expo;
  292|       |
  293|     22|        imdct_scale = ixheaacd_inverse_transform(
  294|     22|            out_mdct, in_data, aac_tables_ptr->pstr_imdct_tables, expo, 1024);
  295|       |
  296|     22|        ixheaacd_post_twiddle_dec(in_data, out_mdct,
  297|     22|                                  aac_tables_ptr->pstr_imdct_tables, 1024);
  298|       |
  299|     22|        imdct_scale += 1;
  300|       |
  301|  22.5k|        for (i = 0; i < nlong; i++) {
  ------------------
  |  Branch (301:21): [True: 22.5k, False: 22]
  ------------------
  302|  22.5k|          out_mdct[i] = ixheaac_shl32_dir(in_data[i], imdct_scale);
  303|  22.5k|        }
  304|     22|      }
  305|       |
  306|  20.6k|      break;
  307|       |
  308|  13.7k|    case LONG_START_SEQUENCE:
  ------------------
  |  |  101|  13.7k|#define LONG_START_SEQUENCE 1
  ------------------
  |  Branch (308:5): [True: 13.7k, False: 29.9k]
  ------------------
  309|       |
  310|  3.94M|      for (i = 0; i<nlong>> 1; i++)
  ------------------
  |  Branch (310:19): [True: 3.93M, False: 13.7k]
  ------------------
  311|  3.93M|        in_data[i] =
  312|  3.93M|            ixheaac_mult32x16in32_shl(in_data[i], window_long_prev[2 * i]);
  313|       |
  314|  3.94M|      for (i = 0; i<nlong>> 1; i++)
  ------------------
  |  Branch (314:19): [True: 3.93M, False: 13.7k]
  ------------------
  315|  3.93M|        in_data[i + (nlong >> 1)] = ixheaac_mult32x16in32_shl(
  316|  3.93M|            in_data[i + (nlong >> 1)], window_long_prev[nlong - 1 - 2 * i - 1]);
  317|       |
  318|   505k|      for (i = 0; i<nshort>> 1; i++)
  ------------------
  |  Branch (318:19): [True: 491k, False: 13.7k]
  ------------------
  319|   491k|        in_data[i + nlong + nflat_ls + (nshort >> 1)] =
  320|   491k|            ixheaac_mult32x16in32_shl(
  321|   491k|                in_data[i + nlong + nflat_ls + (nshort >> 1)],
  322|   491k|                window_short[nshort - 1 - 2 * i - 1]);
  323|       |
  324|  3.45M|      for (i = 0; i < nflat_ls; i++) in_data[i + nlong + nflat_ls + nshort] = 0;
  ------------------
  |  Branch (324:19): [True: 3.43M, False: 13.7k]
  ------------------
  325|       |
  326|  3.94M|      for (i = 0; i < nlong / 2; i++) {
  ------------------
  |  Branch (326:19): [True: 3.93M, False: 13.7k]
  ------------------
  327|  3.93M|        out_mdct[nlong / 2 + i] =
  328|  3.93M|            ixheaac_sub32(in_data[i], in_data[nlong - 1 - i]);
  329|  3.93M|        out_mdct[nlong / 2 - 1 - i] =
  330|  3.93M|            -ixheaac_add32(in_data[nlong + i], in_data[nlong2 - 1 - i]);
  331|  3.93M|      }
  332|       |
  333|  13.7k|      {
  334|  13.7k|        expo = ixheaacd_calc_max_spectral_line_dec(out_mdct, 1024) - 1;
  335|       |
  336|  13.7k|        expo = 8 - expo;
  337|  13.7k|        imdct_scale = ixheaacd_inverse_transform(
  338|  13.7k|            out_mdct, in_data, aac_tables_ptr->pstr_imdct_tables, expo, 1024);
  339|       |
  340|  13.7k|        ixheaacd_post_twiddle_dec(in_data, out_mdct,
  341|  13.7k|                                  aac_tables_ptr->pstr_imdct_tables, 1024);
  342|  13.7k|      }
  343|       |
  344|  13.7k|      imdct_scale += 1;
  345|       |
  346|  7.87M|      for (i = 0; i < nlong; i++) {
  ------------------
  |  Branch (346:19): [True: 7.86M, False: 13.7k]
  ------------------
  347|  7.86M|        out_mdct[i] = ixheaac_shl32_dir(in_data[i], imdct_scale);
  348|  7.86M|      }
  349|  13.7k|      break;
  350|       |
  351|  9.31k|    case LONG_STOP_SEQUENCE:
  ------------------
  |  |  103|  9.31k|#define LONG_STOP_SEQUENCE 3
  ------------------
  |  Branch (351:5): [True: 9.31k, False: 34.3k]
  ------------------
  352|  2.05M|      for (i = 0; i < nflat_ls; i++) in_data[i] = 0;
  ------------------
  |  Branch (352:19): [True: 2.04M, False: 9.31k]
  ------------------
  353|       |
  354|   301k|      for (i = 0; i<nshort>> 1; i++)
  ------------------
  |  Branch (354:19): [True: 291k, False: 9.31k]
  ------------------
  355|   291k|        in_data[i + nflat_ls] = ixheaac_mult32x16in32_shl(
  356|   291k|            in_data[i + nflat_ls], window_short_prev[2 * i]);
  357|       |
  358|   301k|      for (i = 0; i<nshort>> 1; i++)
  ------------------
  |  Branch (358:19): [True: 291k, False: 9.31k]
  ------------------
  359|   291k|        in_data[i + nflat_ls + (nshort >> 1)] =
  360|   291k|            ixheaac_mult32x16in32_shl(in_data[i + nflat_ls + (nshort >> 1)],
  361|   291k|                                       window_short_prev[127 - 2 * i]);
  362|       |
  363|  2.34M|      for (i = 0; i<nlong>> 1; i++)
  ------------------
  |  Branch (363:19): [True: 2.33M, False: 9.31k]
  ------------------
  364|  2.33M|        in_data[i + nlong] = ixheaac_mult32x16in32_shl(in_data[i + nlong],
  365|  2.33M|                                                        window_long[2 * i + 1]);
  366|       |
  367|  2.34M|      for (i = 0; i<nlong>> 1; i++)
  ------------------
  |  Branch (367:19): [True: 2.33M, False: 9.31k]
  ------------------
  368|  2.33M|        in_data[i + nlong + (nlong >> 1)] =
  369|  2.33M|            ixheaac_mult32x16in32_shl(in_data[i + nlong + (nlong >> 1)],
  370|  2.33M|                                       window_long[nlong - 1 - 2 * i - 1]);
  371|       |
  372|  2.34M|      for (i = 0; i < nlong / 2; i++) {
  ------------------
  |  Branch (372:19): [True: 2.33M, False: 9.31k]
  ------------------
  373|  2.33M|        out_mdct[nlong / 2 + i] =
  374|  2.33M|            ixheaac_sub32(in_data[i], in_data[nlong - 1 - i]);
  375|  2.33M|        out_mdct[nlong / 2 - 1 - i] =
  376|  2.33M|            -ixheaac_add32(in_data[nlong + i], in_data[nlong2 - 1 - i]);
  377|  2.33M|      }
  378|       |
  379|  9.31k|      {
  380|  9.31k|        expo = ixheaacd_calc_max_spectral_line_dec(out_mdct, 1024) - 1;
  381|       |
  382|  9.31k|        expo = 8 - expo;
  383|  9.31k|        imdct_scale = ixheaacd_inverse_transform(
  384|  9.31k|            out_mdct, in_data, aac_tables_ptr->pstr_imdct_tables, expo, 1024);
  385|       |
  386|  9.31k|        ixheaacd_post_twiddle_dec(in_data, out_mdct,
  387|  9.31k|                                  aac_tables_ptr->pstr_imdct_tables, 1024);
  388|  9.31k|      }
  389|       |
  390|  9.31k|      imdct_scale += 1;
  391|       |
  392|  4.68M|      for (i = 0; i < nlong; i++) {
  ------------------
  |  Branch (392:19): [True: 4.67M, False: 9.31k]
  ------------------
  393|  4.67M|        out_mdct[i] = ixheaac_shl32_dir(in_data[i], imdct_scale);
  394|  4.67M|      }
  395|       |
  396|  9.31k|      break;
  397|  43.6k|  }
  398|  43.6k|}
ixheaacd_lt_update_state:
  404|  98.2k|                              WORD slot_element) {
  405|  98.2k|  WORD32 i;
  406|       |
  407|  98.2k|  if (object_type == AOT_ER_AAC_LD) {
  ------------------
  |  Branch (407:7): [True: 69.3k, False: 28.9k]
  ------------------
  408|  69.3k|    WORD16 *ptr_ltp_state0 = &lt_pred_stat[0];
  409|  69.3k|    WORD16 *ptr_ltp_state_fl = &lt_pred_stat[frame_len + 0];
  410|  69.3k|    WORD16 *ptr_ltp_state_2fl = &lt_pred_stat[(frame_len * 2) + 0];
  411|  69.3k|    WORD16 *time = (WORD16 *)time_t - slot_element;
  412|  69.3k|    WORD16 *ptr_time_in = &time[0 * stride];
  413|       |
  414|  35.1M|    for (i = 0; i < frame_len; i++) {
  ------------------
  |  Branch (414:17): [True: 35.0M, False: 69.3k]
  ------------------
  415|  35.0M|      *ptr_ltp_state0++ = *ptr_ltp_state_fl;
  416|  35.0M|      *ptr_ltp_state_fl++ = *ptr_ltp_state_2fl;
  417|  35.0M|      *ptr_ltp_state_2fl++ = *ptr_time_in;
  418|  35.0M|      ptr_time_in += stride;
  419|  35.0M|    }
  420|       |
  421|  69.3k|  } else {
  422|  28.9k|    WORD16 *ptr_ltp_state0 = &lt_pred_stat[0];
  423|  28.9k|    WORD16 *ptr_ltp_state_fl = &lt_pred_stat[frame_len + 0];
  424|  28.9k|    WORD32 *time = (WORD32 *)time_t;
  425|  28.9k|    WORD32 *ptr_time_in = &time[0 * stride];
  426|       |
  427|  28.9k|    time = (WORD32 *)time_t;
  428|       |
  429|  28.2M|    for (i = 0; i < frame_len; i++) {
  ------------------
  |  Branch (429:17): [True: 28.2M, False: 28.9k]
  ------------------
  430|  28.2M|      *ptr_ltp_state0++ = *ptr_ltp_state_fl;
  431|  28.2M|      *ptr_ltp_state_fl++ =
  432|  28.2M|          ixheaac_round16(ixheaac_shl32_sat(*ptr_time_in, 2));
  433|  28.2M|      ptr_time_in += stride;
  434|  28.2M|    }
  435|  28.9k|  }
  436|       |
  437|  98.2k|  if ((window_sequence == ONLY_LONG_SEQUENCE) ||
  ------------------
  |  |  100|  98.2k|#define ONLY_LONG_SEQUENCE 0
  ------------------
  |  Branch (437:7): [True: 54.5k, False: 43.7k]
  ------------------
  438|  66.9k|      (window_sequence == LONG_STOP_SEQUENCE)) {
  ------------------
  |  |  103|  43.7k|#define LONG_STOP_SEQUENCE 3
  ------------------
  |  Branch (438:7): [True: 12.4k, False: 31.3k]
  ------------------
  439|  66.9k|    if (512 == frame_len) {
  ------------------
  |  Branch (439:9): [True: 33.9k, False: 32.9k]
  ------------------
  440|  33.9k|      WORD32 *window = (WORD32 *)p_window_next;
  441|       |
  442|  8.72M|      for (i = 0; i < 256; i++) {
  ------------------
  |  Branch (442:19): [True: 8.69M, False: 33.9k]
  ------------------
  443|  8.69M|        lt_pred_stat[(frame_len * 3) + i] =
  444|  8.69M|            ixheaac_round16(ixheaac_mult16x16in32_shl(
  445|  8.69M|                (WORD16)ixheaac_shl16(
  446|  8.69M|                    (WORD16)-ixheaac_sat16(overlap[255 - i]), 1),
  447|  8.69M|                (WORD16)ixheaac_shr32(window[511 - i], 15)));
  448|       |
  449|  8.69M|        lt_pred_stat[(frame_len * 3) + 256 + i] =
  450|  8.69M|            ixheaac_round16(ixheaac_mult16x16in32_shl(
  451|  8.69M|                (WORD16)ixheaac_shl16((WORD16)-ixheaac_sat16(overlap[i]), 1),
  452|  8.69M|                (WORD16)ixheaac_shr32(window[255 - i], 15)));
  453|  8.69M|      }
  454|  33.9k|    } else if (480 == frame_len) {
  ------------------
  |  Branch (454:16): [True: 11.3k, False: 21.5k]
  ------------------
  455|  11.3k|      WORD32 *window = (WORD32 *)p_window_next;
  456|       |
  457|  2.74M|      for (i = 0; i < 240; i++) {
  ------------------
  |  Branch (457:19): [True: 2.73M, False: 11.3k]
  ------------------
  458|  2.73M|        lt_pred_stat[(frame_len * 3) + i] =
  459|  2.73M|            ixheaac_round16(ixheaac_mult16x16in32_shl(
  460|  2.73M|                (WORD16)ixheaac_shl16(
  461|  2.73M|                    (WORD16)-ixheaac_sat16(overlap[239 - i]), 1),
  462|  2.73M|                (WORD16)ixheaac_shr32(window[479 - i], 15)));
  463|       |
  464|  2.73M|        lt_pred_stat[(frame_len * 3) + 240 + i] =
  465|  2.73M|            ixheaac_round16(ixheaac_mult16x16in32_shl(
  466|  2.73M|                (WORD16)ixheaac_shl16((WORD16)-ixheaac_sat16(overlap[i]), 1),
  467|  2.73M|                (WORD16)ixheaac_shr32(window[239 - i], 15)));
  468|  2.73M|      }
  469|  21.5k|    } else {
  470|  11.0M|      for (i = 0; i < 512; i++) {
  ------------------
  |  Branch (470:19): [True: 11.0M, False: 21.5k]
  ------------------
  471|  11.0M|        lt_pred_stat[(frame_len * 2) + i] = ixheaac_round16(
  472|  11.0M|            ixheaac_shl32_sat(ixheaac_mult16x16in32_shl(
  473|  11.0M|                                   (WORD16)-ixheaac_sat16(overlap[511 - i]),
  474|  11.0M|                                   p_window_next[2 * i + 1]),
  475|  11.0M|                               1));
  476|       |
  477|  11.0M|        lt_pred_stat[(frame_len * 2) + 512 + i] =
  478|  11.0M|            ixheaac_round16(ixheaac_shl32_sat(
  479|  11.0M|                ixheaac_mult16x16in32_shl((WORD16)-ixheaac_sat16(overlap[i]),
  480|  11.0M|                                           p_window_next[1023 - 2 * i - 1]),
  481|  11.0M|                1));
  482|  11.0M|      }
  483|  21.5k|    }
  484|       |
  485|  66.9k|  } else if (window_sequence == LONG_START_SEQUENCE) {
  ------------------
  |  |  101|  31.3k|#define LONG_START_SEQUENCE 1
  ------------------
  |  Branch (485:14): [True: 16.5k, False: 14.8k]
  ------------------
  486|  7.41M|    for (i = 0; i < 448; i++) {
  ------------------
  |  Branch (486:17): [True: 7.39M, False: 16.5k]
  ------------------
  487|  7.39M|      lt_pred_stat[(frame_len * 2) + i] =
  488|  7.39M|          ixheaac_shl16((WORD16)-ixheaac_sat16(overlap[511 - i]), 1);
  489|  7.39M|    }
  490|  1.07M|    for (i = 0; i < 64; i++) {
  ------------------
  |  Branch (490:17): [True: 1.05M, False: 16.5k]
  ------------------
  491|  1.05M|      lt_pred_stat[(frame_len * 2) + 448 + i] =
  492|  1.05M|          ixheaac_round16(ixheaac_shl32_sat(
  493|  1.05M|              ixheaac_mult16x16in32_shl(
  494|  1.05M|                  (WORD16)-ixheaac_sat16(overlap[511 - 448 - i]),
  495|  1.05M|                  p_window_next[2 * i + 1]),
  496|  1.05M|              1));
  497|  1.05M|    }
  498|  1.07M|    for (i = 0; i < 64; i++) {
  ------------------
  |  Branch (498:17): [True: 1.05M, False: 16.5k]
  ------------------
  499|  1.05M|      lt_pred_stat[(frame_len * 2) + 512 + i] =
  500|  1.05M|          ixheaac_round16(ixheaac_shl32_sat(
  501|  1.05M|              ixheaac_mult16x16in32_shl((WORD16)-ixheaac_sat16(overlap[i]),
  502|  1.05M|                                         p_window_next[127 - 2 * i - 1]),
  503|  1.05M|              1));
  504|  1.05M|    }
  505|  7.41M|    for (i = 576; i < 1024; i++) {
  ------------------
  |  Branch (505:19): [True: 7.39M, False: 16.5k]
  ------------------
  506|  7.39M|      lt_pred_stat[(frame_len * 2) + i] = 0;
  507|  7.39M|    }
  508|  16.5k|  } else {
  509|  6.66M|    for (i = 0; i < 448; i++) {
  ------------------
  |  Branch (509:17): [True: 6.64M, False: 14.8k]
  ------------------
  510|  6.64M|      lt_pred_stat[(frame_len * 2) + i] =
  511|  6.64M|          ixheaac_shl16(ixheaac_sat16(overlap[i]), 1);
  512|  6.64M|    }
  513|   964k|    for (i = 0; i < 64; i++) {
  ------------------
  |  Branch (513:17): [True: 949k, False: 14.8k]
  ------------------
  514|   949k|      lt_pred_stat[(frame_len * 2) + 448 + i] = ixheaac_round16(
  515|   949k|          ixheaac_shl32_sat(ixheaac_mult16x16in32_shl(
  516|   949k|                                 (WORD16)-ixheaac_sat16(overlap[511 - i]),
  517|   949k|                                 p_window_next[2 * i + 1]),
  518|   949k|                             1));
  519|   949k|    }
  520|   964k|    for (i = 0; i < 64; i++) {
  ------------------
  |  Branch (520:17): [True: 949k, False: 14.8k]
  ------------------
  521|   949k|      lt_pred_stat[(frame_len * 2) + 512 + i] = ixheaac_round16(
  522|   949k|          ixheaac_shl32_sat(ixheaac_mult16x16in32_shl(
  523|   949k|                                 (WORD16)-ixheaac_sat16(overlap[448 + i]),
  524|   949k|                                 p_window_next[127 - 2 * i - 1]),
  525|   949k|                             1));
  526|   949k|    }
  527|  6.66M|    for (i = 576; i < 1024; i++) {
  ------------------
  |  Branch (527:19): [True: 6.64M, False: 14.8k]
  ------------------
  528|  6.64M|      lt_pred_stat[(frame_len * 2) + i] = 0;
  529|  6.64M|    }
  530|  14.8k|  }
  531|  98.2k|}

ixheaacd_dec_interp_umx:
   40|   361k|                             WORD32 *ptr_m_prev, ia_heaac_mps_state_struct *pstr_mps_state) {
   41|   361k|  WORD32 ts, ps = 0, pb;
   42|   361k|  WORD32 *r_out;
   43|   361k|  const WORD32 *reciprocal_tab = pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr->reciprocal;
   44|       |
   45|   361k|  WORD32 num_parameter_bands = pstr_mps_state->num_parameter_bands;
   46|   361k|  WORD32 num_parameter_sets = pstr_mps_state->num_parameter_sets;
   47|       |
   48|   361k|  WORD32 prev_slot = -1;
   49|   361k|  WORD32 *prm_slot = pstr_mps_state->aux_struct->param_slot;
   50|   361k|  WORD32 curr_slot = *prm_slot;
   51|       |
   52|   361k|  WORD32 temp = reciprocal_tab[curr_slot];
   53|   361k|  r_out = ptr_r;
   54|       |
   55|  7.39M|  for (ts = prev_slot + 1; ts <= curr_slot; ts++) {
  ------------------
  |  Branch (55:28): [True: 7.03M, False: 361k]
  ------------------
   56|   136M|    for (pb = 0; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (56:18): [True: 129M, False: 7.03M]
  ------------------
   57|   129M|      WORD32 alpha = temp * (ts + 1);
   58|   129M|      WORD32 one_minus_alpha;
   59|   129M|      WORD64 result;
   60|       |
   61|   129M|      one_minus_alpha = (ONE_IN_Q28 - alpha);
  ------------------
  |  |   52|   129M|#define ONE_IN_Q28 (268435456)
  ------------------
   62|       |
   63|   129M|      result = ((WORD64)(*ptr_m_prev) * (WORD64)one_minus_alpha);
   64|   129M|      result += ((WORD64)(m[ps][pb]) * (WORD64)alpha);
   65|       |
   66|   129M|      *r_out++ = (WORD32)((WORD64)result >> 28);
   67|   129M|      ptr_m_prev++;
   68|   129M|    }
   69|  7.03M|    ptr_m_prev -= num_parameter_bands;
   70|  7.03M|  }
   71|       |
   72|   665k|  for (ps = 1; ps < num_parameter_sets; ps++) {
  ------------------
  |  Branch (72:16): [True: 303k, False: 361k]
  ------------------
   73|   303k|    WORD32 prev_slot = prm_slot[ps - 1];
   74|   303k|    WORD32 curr_slot = prm_slot[ps];
   75|       |
   76|   303k|    temp = reciprocal_tab[curr_slot - prev_slot - 1];
   77|       |
   78|  3.10M|    for (ts = (prev_slot) + 1; ts <= (curr_slot); ts++) {
  ------------------
  |  Branch (78:32): [True: 2.79M, False: 303k]
  ------------------
   79|  53.9M|      for (pb = 0; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (79:20): [True: 51.1M, False: 2.79M]
  ------------------
   80|  51.1M|        WORD32 alpha = (ts - prev_slot) * temp;
   81|  51.1M|        WORD64 result;
   82|  51.1M|        WORD32 one_minus_alpha;
   83|  51.1M|        one_minus_alpha = (ONE_IN_Q28 - alpha);
  ------------------
  |  |   52|  51.1M|#define ONE_IN_Q28 (268435456)
  ------------------
   84|       |
   85|  51.1M|        result = ((WORD64)(m[ps - 1][pb]) * (WORD64)one_minus_alpha);
   86|  51.1M|        result += ((WORD64)(m[ps][pb]) * (WORD64)alpha);
   87|       |
   88|  51.1M|        *r_out++ = (WORD32)((WORD64)result >> 28);
   89|  51.1M|      }
   90|  2.79M|    }
   91|   303k|  }
   92|   361k|  return;
   93|   361k|}
ixheaacd_apply_abs_kernels:
   95|   361k|VOID ixheaacd_apply_abs_kernels(WORD32 *ptr_r_in, WORD32 *ptr_r_out, SIZE_T *ptr_params) {
   96|   361k|  WORD32 ts, qb;
   97|   361k|  SIZE_T *idx_ptr = (SIZE_T *)ptr_params[0];
  ------------------
  |  |   28|   361k|#define SIZE_T size_t
  ------------------
   98|   361k|  WORD32 time_slots = (WORD32)ptr_params[1];
   99|   361k|  WORD32 num_parameter_bands = (WORD32)ptr_params[2];
  100|   361k|  WORD32 hybrid_bands = (WORD32)ptr_params[3];
  101|       |
  102|  10.1M|  for (ts = 0; ts < time_slots; ts++) {
  ------------------
  |  Branch (102:16): [True: 9.80M, False: 361k]
  ------------------
  103|  9.80M|    SIZE_T *idx = idx_ptr;
  ------------------
  |  |   28|  9.80M|#define SIZE_T size_t
  ------------------
  104|   580M|    for (qb = 0; qb < hybrid_bands; qb++) {
  ------------------
  |  Branch (104:18): [True: 570M, False: 9.80M]
  ------------------
  105|   570M|      WORD32 idx_v = (WORD32)(*idx);
  106|   570M|      *ptr_r_out++ = *(ptr_r_in + idx_v);
  107|   570M|      idx++;
  108|   570M|    }
  109|  9.80M|    ptr_r_in += num_parameter_bands;
  110|  9.80M|  }
  111|   361k|  return;
  112|   361k|}

ixheaacd_mps_apply_m1:
   44|  13.1k|VOID ixheaacd_mps_apply_m1(ia_heaac_mps_state_struct *pstr_mps_state) {
   45|  13.1k|  ia_mps_dec_reuse_array_struct *p_array_struct = pstr_mps_state->array_struct;
   46|  13.1k|  ia_mps_dec_m1_param_struct *m1_param = p_array_struct->m1_param;
   47|  13.1k|  WORD32 ts, qs, row, col;
   48|  13.1k|  WORD32 temp_1, temp_2;
   49|  13.1k|  WORD32 *rout_real_ptr, *rout_imag_ptr, *rout_kernel_real_ptr, *rout_kernel_imag_ptr;
   50|  13.1k|  WORD32 *v_real, *v_imag, *x_real, *x_imag;
   51|  13.1k|  WORD32 *p_buffer_real, *p_buffer_imag, *p_v_real, *p_v_imag;
   52|       |
   53|  13.1k|  ia_heaac_mps_state_struct *curr_state = pstr_mps_state;
   54|  13.1k|  WORD32 *m1_param_real_prev = curr_state->mps_persistent_mem.m1_param_real_prev;
   55|  13.1k|  WORD32 *m1_param_imag_prev = curr_state->mps_persistent_mem.m1_param_imag_prev;
   56|  13.1k|  WORD32 imag_present = curr_state->m1_param_imag_present;
   57|  13.1k|  WORD32 v_channels = curr_state->num_v_channels;
   58|  13.1k|  WORD32 x_channels = curr_state->num_x_channels;
   59|  13.1k|  WORD32 hybrid_bands = curr_state->hybrid_bands;
   60|  13.1k|  WORD32 num_parameter_bands = curr_state->num_parameter_bands;
   61|  13.1k|  WORD32 *index = curr_state->index;
   62|       |
   63|  13.1k|  WORD32 *p_x_re, *p_x_im;
   64|       |
   65|  13.1k|  WORD32 hyb_bands = hybrid_bands;
   66|  13.1k|  WORD32 time_slots = curr_state->time_slots;
   67|  13.1k|  SIZE_T params[4];
  ------------------
  |  |   28|  13.1k|#define SIZE_T size_t
  ------------------
   68|       |
   69|  13.1k|  params[0] = (SIZE_T)(&curr_state->kernels[0]);
   70|  13.1k|  params[1] = time_slots;
   71|  13.1k|  params[2] = num_parameter_bands;
   72|  13.1k|  params[3] = hybrid_bands;
   73|       |
   74|  13.1k|  rout_real_ptr = pstr_mps_state->mps_scratch_mem_v;
   75|  13.1k|  rout_kernel_real_ptr = rout_real_ptr + IXHEAAC_GET_SIZE_ALIGNED_TYPE(
  ------------------
  |  |   89|  13.1k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
   76|  13.1k|                                             TSXHB, sizeof(*rout_kernel_real_ptr), BYTE_ALIGN_8);
   77|  13.1k|  rout_imag_ptr = rout_kernel_real_ptr +
   78|  13.1k|                  IXHEAAC_GET_SIZE_ALIGNED_TYPE(TSXHB, sizeof(*rout_imag_ptr), BYTE_ALIGN_8);
  ------------------
  |  |   89|  13.1k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
   79|  13.1k|  rout_kernel_imag_ptr = rout_imag_ptr + IXHEAAC_GET_SIZE_ALIGNED_TYPE(
  ------------------
  |  |   89|  13.1k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
   80|  13.1k|                                             TSXHB, sizeof(*rout_kernel_imag_ptr), BYTE_ALIGN_8);
   81|       |
   82|  13.1k|  p_buffer_real = p_array_struct->buf_real;
   83|  13.1k|  p_buffer_imag = p_array_struct->buf_imag;
   84|       |
   85|   111k|  for (row = 0; row < v_channels; row++) {
  ------------------
  |  Branch (85:17): [True: 98.0k, False: 13.1k]
  ------------------
   86|  98.0k|    v_real = p_buffer_real;
   87|  98.0k|    v_imag = p_buffer_imag;
   88|       |
   89|  2.80M|    for (ts = 0; ts < time_slots; ts++) {
  ------------------
  |  Branch (89:18): [True: 2.70M, False: 98.0k]
  ------------------
   90|  2.70M|      memset(v_real, 0, hybrid_bands * sizeof(v_real[0]));
   91|  2.70M|      memset(v_imag, 0, hybrid_bands * sizeof(v_imag[0]));
   92|       |
   93|  2.70M|      v_real += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  2.70M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  2.70M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
   94|  2.70M|      v_imag += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  2.70M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  2.70M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
   95|  2.70M|    }
   96|  98.0k|    p_buffer_real += TSXHB;
  ------------------
  |  |  106|  98.0k|#define TSXHB (5112)
  ------------------
   97|  98.0k|    p_buffer_imag += TSXHB;
  ------------------
  |  |  106|  98.0k|#define TSXHB (5112)
  ------------------
   98|  98.0k|  }
   99|       |
  100|  13.1k|  p_buffer_real = p_array_struct->buf_real;
  101|  13.1k|  p_buffer_imag = p_array_struct->buf_imag;
  102|       |
  103|  13.1k|  if (!imag_present) {
  ------------------
  |  Branch (103:7): [True: 3.29k, False: 9.82k]
  ------------------
  104|  23.8k|    for (row = 0; row < v_channels; row++) {
  ------------------
  |  Branch (104:19): [True: 20.5k, False: 3.29k]
  ------------------
  105|  20.5k|      WORD32 *p_x_real = p_array_struct->x_real;
  106|  20.5k|      WORD32 *p_x_imag = p_array_struct->x_imag;
  107|       |
  108|  99.6k|      for (col = 0; col < x_channels; col++) {
  ------------------
  |  Branch (108:21): [True: 79.0k, False: 20.5k]
  ------------------
  109|  79.0k|        if (pstr_mps_state->m1_param_present[row][col]) {
  ------------------
  |  Branch (109:13): [True: 30.3k, False: 48.7k]
  ------------------
  110|  30.3k|          WORD32 idx = index[col];
  111|       |
  112|  30.3k|          ixheaacd_dec_interp_umx(m1_param->m1_param_real[row][col], rout_real_ptr,
  113|  30.3k|                                  m1_param_real_prev, pstr_mps_state);
  114|  30.3k|          ixheaacd_apply_abs_kernels(rout_real_ptr, rout_kernel_real_ptr, params);
  115|       |
  116|  30.3k|          p_v_real = p_buffer_real;
  117|  30.3k|          p_v_imag = p_buffer_imag;
  118|       |
  119|  30.3k|          p_x_re = p_x_real;
  120|  30.3k|          p_x_im = p_x_imag;
  121|       |
  122|   777k|          for (ts = 0; ts < time_slots; ts++) {
  ------------------
  |  Branch (122:24): [True: 747k, False: 30.3k]
  ------------------
  123|   747k|            v_real = p_v_real;
  124|   747k|            v_imag = p_v_imag;
  125|       |
  126|   747k|            x_real = p_x_re;
  127|   747k|            x_imag = p_x_im;
  128|       |
  129|  38.0M|            for (qs = 0; qs < idx; qs++) {
  ------------------
  |  Branch (129:26): [True: 37.2M, False: 747k]
  ------------------
  130|  37.2M|              temp_1 = ixheaacd_mps_mult32_shr_15(*x_real, *rout_kernel_real_ptr);
  131|  37.2M|              *v_real = ixheaac_add32_sat(*v_real, temp_1);
  132|  37.2M|              v_real++;
  133|       |
  134|  37.2M|              temp_1 = ixheaacd_mps_mult32_shr_15(*x_imag, *rout_kernel_real_ptr);
  135|  37.2M|              rout_kernel_real_ptr++;
  136|  37.2M|              *v_imag = ixheaac_add32_sat(*v_imag, temp_1);
  137|  37.2M|              v_imag++;
  138|       |
  139|  37.2M|              x_real++;
  140|  37.2M|              x_imag++;
  141|  37.2M|            }
  142|   747k|            rout_kernel_real_ptr += hyb_bands - idx;
  143|       |
  144|   747k|            p_v_real += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|   747k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|   747k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  145|   747k|            p_v_imag += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|   747k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|   747k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  146|       |
  147|   747k|            p_x_re += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|   747k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|   747k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  148|   747k|            p_x_im += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|   747k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|   747k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  149|   747k|          }
  150|       |
  151|  30.3k|          m1_param_real_prev += num_parameter_bands;
  152|       |
  153|  30.3k|          p_x_real += TSXHB;
  ------------------
  |  |  106|  30.3k|#define TSXHB (5112)
  ------------------
  154|  30.3k|          p_x_imag += TSXHB;
  ------------------
  |  |  106|  30.3k|#define TSXHB (5112)
  ------------------
  155|  48.7k|        } else {
  156|  48.7k|          m1_param_real_prev += num_parameter_bands;
  157|       |
  158|  48.7k|          p_x_real += TSXHB;
  ------------------
  |  |  106|  48.7k|#define TSXHB (5112)
  ------------------
  159|  48.7k|          p_x_imag += TSXHB;
  ------------------
  |  |  106|  48.7k|#define TSXHB (5112)
  ------------------
  160|  48.7k|        }
  161|  79.0k|      }
  162|  20.5k|      p_buffer_real += TSXHB;
  ------------------
  |  |  106|  20.5k|#define TSXHB (5112)
  ------------------
  163|  20.5k|      p_buffer_imag += TSXHB;
  ------------------
  |  |  106|  20.5k|#define TSXHB (5112)
  ------------------
  164|  20.5k|    }
  165|  9.82k|  } else {
  166|  87.2k|    for (row = 0; row < v_channels; row++) {
  ------------------
  |  Branch (166:19): [True: 77.4k, False: 9.82k]
  ------------------
  167|  77.4k|      WORD32 *p_x_real = p_array_struct->x_real;
  168|  77.4k|      WORD32 *p_x_imag = p_array_struct->x_imag;
  169|       |
  170|   521k|      for (col = 0; col < x_channels; col++) {
  ------------------
  |  Branch (170:21): [True: 444k, False: 77.4k]
  ------------------
  171|   444k|        if (pstr_mps_state->m1_param_present[row][col]) {
  ------------------
  |  Branch (171:13): [True: 81.8k, False: 362k]
  ------------------
  172|  81.8k|          WORD32 idx = index[col];
  173|       |
  174|  81.8k|          ixheaacd_dec_interp_umx(m1_param->m1_param_real[row][col], rout_real_ptr,
  175|  81.8k|                                  m1_param_real_prev, pstr_mps_state);
  176|  81.8k|          ixheaacd_dec_interp_umx(m1_param->m1_param_imag[row][col], rout_imag_ptr,
  177|  81.8k|                                  m1_param_imag_prev, pstr_mps_state);
  178|  81.8k|          ixheaacd_apply_abs_kernels(rout_real_ptr, rout_kernel_real_ptr, params);
  179|  81.8k|          ixheaacd_apply_abs_kernels(rout_imag_ptr, rout_kernel_imag_ptr, params);
  180|       |
  181|  81.8k|          p_v_real = p_buffer_real;
  182|  81.8k|          p_v_imag = p_buffer_imag;
  183|       |
  184|  81.8k|          p_x_re = p_x_real;
  185|  81.8k|          p_x_im = p_x_imag;
  186|       |
  187|  2.34M|          for (ts = 0; ts < time_slots; ts++) {
  ------------------
  |  Branch (187:24): [True: 2.26M, False: 81.8k]
  ------------------
  188|  2.26M|            v_real = p_v_real;
  189|  2.26M|            v_imag = p_v_imag;
  190|       |
  191|  2.26M|            x_real = p_x_re;
  192|  2.26M|            x_imag = p_x_im;
  193|  6.78M|            for (qs = 0; qs < 2; qs++) {
  ------------------
  |  Branch (193:26): [True: 4.52M, False: 2.26M]
  ------------------
  194|  4.52M|              temp_1 = ixheaacd_mps_mult32_shr_15(*x_real, *rout_kernel_real_ptr);
  195|  4.52M|              temp_2 = ixheaacd_mps_mult32_shr_15(*x_imag, *rout_kernel_imag_ptr);
  196|  4.52M|              temp_1 = ixheaac_add32_sat(temp_1, temp_2);
  197|       |
  198|  4.52M|              *v_real = ixheaac_add32_sat(*v_real, temp_1);
  199|  4.52M|              v_real++;
  200|       |
  201|  4.52M|              temp_1 = ixheaacd_mps_mult32_shr_15(*x_imag, *rout_kernel_real_ptr);
  202|  4.52M|              rout_kernel_real_ptr++;
  203|  4.52M|              temp_2 = ixheaacd_mps_mult32_shr_15(*x_real, *rout_kernel_imag_ptr);
  204|  4.52M|              rout_kernel_imag_ptr++;
  205|  4.52M|              temp_1 = ixheaac_sub32_sat(temp_1, temp_2);
  206|       |
  207|  4.52M|              *v_imag = ixheaac_add32_sat(*v_imag, temp_1);
  208|  4.52M|              v_imag++;
  209|       |
  210|  4.52M|              x_real++;
  211|  4.52M|              x_imag++;
  212|  4.52M|            }
  213|   132M|            for (; qs < idx; qs++) {
  ------------------
  |  Branch (213:20): [True: 129M, False: 2.26M]
  ------------------
  214|   129M|              temp_1 = ixheaacd_mps_mult32_shr_15(*x_real, *rout_kernel_real_ptr);
  215|   129M|              temp_2 = ixheaacd_mps_mult32_shr_15(*x_imag, *rout_kernel_imag_ptr);
  216|   129M|              temp_1 = ixheaac_sub32_sat(temp_1, temp_2);
  217|       |
  218|   129M|              *v_real = ixheaac_add32_sat(*v_real, temp_1);
  219|   129M|              v_real++;
  220|       |
  221|   129M|              temp_1 = ixheaacd_mps_mult32_shr_15(*x_imag, *rout_kernel_real_ptr);
  222|   129M|              rout_kernel_real_ptr++;
  223|   129M|              temp_2 = ixheaacd_mps_mult32_shr_15(*x_real, *rout_kernel_imag_ptr);
  224|   129M|              rout_kernel_imag_ptr++;
  225|   129M|              temp_1 = ixheaac_add32_sat(temp_1, temp_2);
  226|       |
  227|   129M|              *v_imag = ixheaac_add32_sat(*v_imag, temp_1);
  228|   129M|              v_imag++;
  229|       |
  230|   129M|              x_real++;
  231|   129M|              x_imag++;
  232|   129M|            }
  233|  2.26M|            rout_kernel_real_ptr += hyb_bands - idx;
  234|  2.26M|            rout_kernel_imag_ptr += hyb_bands - idx;
  235|       |
  236|  2.26M|            p_v_real += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  2.26M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  2.26M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  237|  2.26M|            p_v_imag += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  2.26M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  2.26M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  238|       |
  239|  2.26M|            p_x_re += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  2.26M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  2.26M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  240|  2.26M|            p_x_im += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  2.26M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  2.26M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  241|  2.26M|          }
  242|       |
  243|  81.8k|          m1_param_real_prev += num_parameter_bands;
  244|  81.8k|          m1_param_imag_prev += num_parameter_bands;
  245|       |
  246|  81.8k|          p_x_real += TSXHB;
  ------------------
  |  |  106|  81.8k|#define TSXHB (5112)
  ------------------
  247|  81.8k|          p_x_imag += TSXHB;
  ------------------
  |  |  106|  81.8k|#define TSXHB (5112)
  ------------------
  248|   362k|        } else {
  249|   362k|          m1_param_real_prev += num_parameter_bands;
  250|   362k|          m1_param_imag_prev += num_parameter_bands;
  251|       |
  252|   362k|          p_x_real += TSXHB;
  ------------------
  |  |  106|   362k|#define TSXHB (5112)
  ------------------
  253|   362k|          p_x_imag += TSXHB;
  ------------------
  |  |  106|   362k|#define TSXHB (5112)
  ------------------
  254|   362k|        }
  255|   444k|      }
  256|  77.4k|      p_buffer_real += TSXHB;
  ------------------
  |  |  106|  77.4k|#define TSXHB (5112)
  ------------------
  257|  77.4k|      p_buffer_imag += TSXHB;
  ------------------
  |  |  106|  77.4k|#define TSXHB (5112)
  ------------------
  258|  77.4k|    }
  259|  9.82k|  }
  260|  13.1k|  return;
  261|  13.1k|}

ixheaacd_apply_m2:
   45|  13.1k|VOID ixheaacd_apply_m2(ia_heaac_mps_state_struct *pstr_mps_state) {
   46|  13.1k|  WORD32 ts, qs, row, col;
   47|  13.1k|  ia_heaac_mps_state_struct *curr_state = pstr_mps_state;
   48|  13.1k|  ia_mps_persistent_mem *persistent_mem = &curr_state->mps_persistent_mem;
   49|  13.1k|  ia_mps_dec_reuse_array_struct *p_array_struct = pstr_mps_state->array_struct;
   50|  13.1k|  ia_mps_dec_m2_param_struct *p_m2_param = pstr_mps_state->aux_struct->m2_param;
   51|       |
   52|  13.1k|  WORD32 num_direct_signals = curr_state->num_direct_signals;
   53|  13.1k|  WORD32 temp_1, loop_counter, col_counter = num_direct_signals + curr_state->num_decor_signals;
   54|       |
   55|  13.1k|  WORD32 *rout_ptr, *rout_kernel_ptr;
   56|       |
   57|  13.1k|  WORD32 *hyb_output_real_dry, *hyb_output_imag_dry, *hyb_output_real_wet, *hyb_output_imag_wet;
   58|       |
   59|  13.1k|  WORD32 *p_hyb_out_dry_real, *p_hyb_out_dry_imag, *p_hyb_out_dry_re, *p_hyb_out_dry_im;
   60|       |
   61|  13.1k|  WORD32 *w_wet_real, *w_wet_imag, *w_dry_real, *w_dry_imag;
   62|       |
   63|  13.1k|  WORD32 *m2_decor_real_prev = persistent_mem->m2_decor_real_prev;
   64|  13.1k|  WORD32 *m2_decor_imag_prev = persistent_mem->m2_decor_imag_prev;
   65|       |
   66|  13.1k|  WORD32 *p_buffer_real, *p_buffer_imag, *p_buffer_re, *p_buffer_im;
   67|  13.1k|  WORD32 *p_buf_real, *p_buf_imag, *p_buf_re, *p_buf_im;
   68|       |
   69|  13.1k|  WORD32 *m2_resid_real_prev = persistent_mem->m2_resid_real_prev;
   70|  13.1k|  WORD32 *m2_resid_imag_prev = persistent_mem->m2_resid_imag_prev;
   71|       |
   72|  13.1k|  WORD32 idx = 0;
   73|  13.1k|  WORD32 w_wet_offset = num_direct_signals * TSXHB;
  ------------------
  |  |  106|  13.1k|#define TSXHB (5112)
  ------------------
   74|       |
   75|  13.1k|  WORD32 num_output_channels = curr_state->num_output_channels;
   76|  13.1k|  WORD32 time_slots = curr_state->time_slots;
   77|  13.1k|  WORD32 hybrid_bands = curr_state->hybrid_bands;
   78|  13.1k|  WORD32 m2_param_imag_present = curr_state->m2_param_imag_present;
   79|  13.1k|  WORD32 num_parameter_bands = curr_state->num_parameter_bands;
   80|  13.1k|  WORD32 up_mix_type = curr_state->up_mix_type;
   81|  13.1k|  WORD32 residual_coding = curr_state->residual_coding;
   82|  13.1k|  WORD32 *index_ptr = curr_state->index;
   83|       |
   84|  13.1k|  SIZE_T params[4];
  ------------------
  |  |   28|  13.1k|#define SIZE_T size_t
  ------------------
   85|       |
   86|  13.1k|  params[0] = (SIZE_T)(&curr_state->kernels[0]);
   87|  13.1k|  params[1] = time_slots;
   88|  13.1k|  params[2] = num_parameter_bands;
   89|  13.1k|  params[3] = hybrid_bands;
   90|       |
   91|  13.1k|  rout_ptr = pstr_mps_state->mps_scratch_mem_v;
   92|  13.1k|  rout_kernel_ptr =
   93|  13.1k|      rout_ptr + IXHEAAC_GET_SIZE_ALIGNED_TYPE(TSXHB, sizeof(*rout_kernel_ptr), BYTE_ALIGN_8);
  ------------------
  |  |   89|  13.1k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
   94|       |
   95|  13.1k|  p_hyb_out_dry_real = p_array_struct->hyb_output_real_dry;
   96|  13.1k|  p_hyb_out_dry_imag = p_array_struct->hyb_output_imag_dry;
   97|       |
   98|   115k|  for (row = 0; row < num_output_channels; row++) {
  ------------------
  |  Branch (98:17): [True: 101k, False: 13.1k]
  ------------------
   99|   101k|    hyb_output_real_dry = p_hyb_out_dry_real;
  100|   101k|    hyb_output_imag_dry = p_hyb_out_dry_imag;
  101|       |
  102|  2.87M|    for (ts = 0; ts < time_slots; ts++) {
  ------------------
  |  Branch (102:18): [True: 2.77M, False: 101k]
  ------------------
  103|  2.77M|      memset(hyb_output_real_dry, 0, (hybrid_bands) * sizeof(hyb_output_real_dry[0]));
  104|  2.77M|      memset(hyb_output_imag_dry, 0, (hybrid_bands) * sizeof(hyb_output_imag_dry[0]));
  105|       |
  106|  2.77M|      hyb_output_real_dry += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  2.77M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  2.77M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  107|  2.77M|      hyb_output_imag_dry += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  2.77M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  2.77M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  108|  2.77M|    }
  109|       |
  110|   101k|    p_hyb_out_dry_real += TSXHB;
  ------------------
  |  |  106|   101k|#define TSXHB (5112)
  ------------------
  111|   101k|    p_hyb_out_dry_imag += TSXHB;
  ------------------
  |  |  106|   101k|#define TSXHB (5112)
  ------------------
  112|   101k|  }
  113|       |
  114|  13.1k|  if (residual_coding)
  ------------------
  |  Branch (114:7): [True: 372, False: 12.7k]
  ------------------
  115|    372|    loop_counter = col_counter;
  116|  12.7k|  else
  117|  12.7k|    loop_counter = num_direct_signals;
  118|       |
  119|  13.1k|  idx = 0;
  120|       |
  121|  13.1k|  p_hyb_out_dry_real = p_array_struct->hyb_output_real_dry;
  122|  13.1k|  p_hyb_out_dry_imag = p_array_struct->hyb_output_imag_dry;
  123|       |
  124|   115k|  for (row = 0; row < num_output_channels; row++) {
  ------------------
  |  Branch (124:17): [True: 101k, False: 13.1k]
  ------------------
  125|   101k|    p_buffer_real = p_array_struct->buf_real;
  126|   101k|    p_buffer_imag = p_array_struct->buf_imag;
  127|       |
  128|   645k|    for (col = 0; col < num_direct_signals; col++) {
  ------------------
  |  Branch (128:19): [True: 543k, False: 101k]
  ------------------
  129|   543k|      p_buffer_re = p_buffer_real;
  130|   543k|      p_buffer_im = p_buffer_imag;
  131|       |
  132|   543k|      if (curr_state->m2_param_present[row][col] & 2) {
  ------------------
  |  Branch (132:11): [True: 101k, False: 441k]
  ------------------
  133|   101k|        ixheaacd_dec_interp_umx(p_m2_param->m2_resid_real[idx++], rout_ptr, m2_resid_real_prev,
  134|   101k|                                pstr_mps_state);
  135|   101k|        ixheaacd_apply_abs_kernels(rout_ptr, rout_kernel_ptr, params);
  136|       |
  137|   101k|        p_hyb_out_dry_re = p_hyb_out_dry_real;
  138|   101k|        p_hyb_out_dry_im = p_hyb_out_dry_imag;
  139|       |
  140|  2.87M|        for (ts = 0; ts < time_slots; ts++) {
  ------------------
  |  Branch (140:22): [True: 2.77M, False: 101k]
  ------------------
  141|  2.77M|          hyb_output_real_dry = p_hyb_out_dry_re;
  142|  2.77M|          hyb_output_imag_dry = p_hyb_out_dry_im;
  143|       |
  144|  2.77M|          w_dry_real = p_buffer_re;
  145|  2.77M|          w_dry_imag = p_buffer_im;
  146|       |
  147|   167M|          for (qs = 0; qs < hybrid_bands; qs++) {
  ------------------
  |  Branch (147:24): [True: 164M, False: 2.77M]
  ------------------
  148|   164M|            temp_1 = ixheaacd_mps_mult32_shr_15(*w_dry_real, *rout_kernel_ptr);
  149|   164M|            w_dry_real++;
  150|   164M|            *hyb_output_real_dry = ixheaac_add32_sat(*hyb_output_real_dry, temp_1);
  151|   164M|            hyb_output_real_dry++;
  152|       |
  153|   164M|            temp_1 = ixheaacd_mps_mult32_shr_15(*w_dry_imag, *rout_kernel_ptr);
  154|   164M|            w_dry_imag++;
  155|   164M|            rout_kernel_ptr++;
  156|   164M|            *hyb_output_imag_dry = ixheaac_add32_sat(*hyb_output_imag_dry, temp_1);
  157|   164M|            hyb_output_imag_dry++;
  158|   164M|          }
  159|  2.77M|          p_buffer_re += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  2.77M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  2.77M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  160|  2.77M|          p_buffer_im += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  2.77M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  2.77M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  161|       |
  162|  2.77M|          p_hyb_out_dry_re += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  2.77M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  2.77M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  163|  2.77M|          p_hyb_out_dry_im += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  2.77M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  2.77M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  164|  2.77M|        }
  165|   101k|        m2_resid_real_prev += num_parameter_bands;
  166|   101k|      }
  167|   543k|      p_buffer_real += TSXHB;
  ------------------
  |  |  106|   543k|#define TSXHB (5112)
  ------------------
  168|   543k|      p_buffer_imag += TSXHB;
  ------------------
  |  |  106|   543k|#define TSXHB (5112)
  ------------------
  169|   543k|    }
  170|       |
  171|   108k|    for (; col < loop_counter; col++) {
  ------------------
  |  Branch (171:12): [True: 6.72k, False: 101k]
  ------------------
  172|  6.72k|      WORD32 index;
  173|  6.72k|      WORD32 res = ixheaacd_get_res_idx(pstr_mps_state, col);
  174|  6.72k|      index = index_ptr[res];
  175|       |
  176|  6.72k|      if (curr_state->m2_param_present[row][col] & 2) {
  ------------------
  |  Branch (176:11): [True: 2.53k, False: 4.19k]
  ------------------
  177|  2.53k|        WORD32 *p_dry_real = p_array_struct->w_dry_real + res * TSXHB;
  ------------------
  |  |  106|  2.53k|#define TSXHB (5112)
  ------------------
  178|  2.53k|        WORD32 *p_dry_imag = p_array_struct->w_dry_imag + res * TSXHB;
  ------------------
  |  |  106|  2.53k|#define TSXHB (5112)
  ------------------
  179|       |
  180|  2.53k|        ixheaacd_dec_interp_umx(p_m2_param->m2_resid_real[idx++], rout_ptr, m2_resid_real_prev,
  181|  2.53k|                                pstr_mps_state);
  182|  2.53k|        ixheaacd_apply_abs_kernels(rout_ptr, rout_kernel_ptr, params);
  183|       |
  184|  2.53k|        p_hyb_out_dry_re = p_hyb_out_dry_real;
  185|  2.53k|        p_hyb_out_dry_im = p_hyb_out_dry_imag;
  186|       |
  187|  65.4k|        for (ts = 0; ts < time_slots; ts++) {
  ------------------
  |  Branch (187:22): [True: 62.8k, False: 2.53k]
  ------------------
  188|  62.8k|          hyb_output_real_dry = p_hyb_out_dry_re;
  189|  62.8k|          hyb_output_imag_dry = p_hyb_out_dry_im;
  190|       |
  191|  62.8k|          w_dry_real = p_dry_real;
  192|  62.8k|          w_dry_imag = p_dry_imag;
  193|       |
  194|   723k|          for (qs = 0; qs < index; qs++) {
  ------------------
  |  Branch (194:24): [True: 660k, False: 62.8k]
  ------------------
  195|   660k|            temp_1 = ixheaacd_mps_mult32_shr_15(*w_dry_real, *rout_kernel_ptr);
  196|   660k|            w_dry_real++;
  197|   660k|            *hyb_output_real_dry = ixheaac_add32_sat(*hyb_output_real_dry, temp_1);
  198|   660k|            hyb_output_real_dry++;
  199|       |
  200|   660k|            temp_1 = ixheaacd_mps_mult32_shr_15(*w_dry_imag, *rout_kernel_ptr);
  201|   660k|            w_dry_imag++;
  202|   660k|            rout_kernel_ptr++;
  203|   660k|            *hyb_output_imag_dry = ixheaac_add32_sat(*hyb_output_imag_dry, temp_1);
  204|   660k|            hyb_output_imag_dry++;
  205|   660k|          }
  206|  62.8k|          rout_kernel_ptr += hybrid_bands - index;
  207|       |
  208|  62.8k|          p_hyb_out_dry_re += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  62.8k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  62.8k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  209|  62.8k|          p_hyb_out_dry_im += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  62.8k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  62.8k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  210|       |
  211|  62.8k|          p_dry_real += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  62.8k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  62.8k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  212|  62.8k|          p_dry_imag += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  62.8k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  62.8k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  213|  62.8k|        }
  214|  2.53k|        m2_resid_real_prev += num_parameter_bands;
  215|  2.53k|      }
  216|  6.72k|    }
  217|       |
  218|   101k|    p_hyb_out_dry_real += TSXHB;
  ------------------
  |  |  106|   101k|#define TSXHB (5112)
  ------------------
  219|   101k|    p_hyb_out_dry_imag += TSXHB;
  ------------------
  |  |  106|   101k|#define TSXHB (5112)
  ------------------
  220|   101k|  }
  221|       |
  222|  13.1k|  if (up_mix_type == 2) {
  ------------------
  |  Branch (222:7): [True: 0, False: 13.1k]
  ------------------
  223|      0|    if (m2_param_imag_present) {
  ------------------
  |  Branch (223:9): [True: 0, False: 0]
  ------------------
  224|      0|      if (residual_coding)
  ------------------
  |  Branch (224:11): [True: 0, False: 0]
  ------------------
  225|      0|        loop_counter = col_counter;
  226|      0|      else
  227|      0|        loop_counter = num_direct_signals;
  228|       |
  229|      0|      idx = 0;
  230|       |
  231|      0|      p_hyb_out_dry_real = p_array_struct->hyb_output_real_dry;
  232|      0|      p_hyb_out_dry_imag = p_array_struct->hyb_output_imag_dry;
  233|       |
  234|      0|      for (row = 0; row < num_output_channels; row++) {
  ------------------
  |  Branch (234:21): [True: 0, False: 0]
  ------------------
  235|      0|        p_buffer_real = p_array_struct->buf_real;
  236|      0|        p_buffer_imag = p_array_struct->buf_imag;
  237|       |
  238|      0|        for (col = 0; col < num_direct_signals; col++) {
  ------------------
  |  Branch (238:23): [True: 0, False: 0]
  ------------------
  239|      0|          p_buffer_re = p_buffer_real;
  240|      0|          p_buffer_im = p_buffer_imag;
  241|       |
  242|      0|          if (curr_state->m2_param_present[row][col] & 2) {
  ------------------
  |  Branch (242:15): [True: 0, False: 0]
  ------------------
  243|      0|            ixheaacd_dec_interp_umx(p_m2_param->m2_resid_imag[idx++], rout_ptr,
  244|      0|                                    m2_resid_imag_prev, pstr_mps_state);
  245|      0|            ixheaacd_apply_abs_kernels(rout_ptr, rout_kernel_ptr, params);
  246|       |
  247|      0|            p_hyb_out_dry_re = p_hyb_out_dry_real;
  248|      0|            p_hyb_out_dry_im = p_hyb_out_dry_imag;
  249|       |
  250|      0|            for (ts = 0; ts < time_slots; ts++) {
  ------------------
  |  Branch (250:26): [True: 0, False: 0]
  ------------------
  251|      0|              hyb_output_real_dry = p_hyb_out_dry_re;
  252|      0|              hyb_output_imag_dry = p_hyb_out_dry_im;
  253|       |
  254|      0|              w_dry_real = p_buffer_re;
  255|      0|              w_dry_imag = p_buffer_im;
  256|       |
  257|      0|              for (qs = 0; qs < 2; qs++) {
  ------------------
  |  Branch (257:28): [True: 0, False: 0]
  ------------------
  258|      0|                temp_1 = ixheaacd_mps_mult32_shr_15(*w_dry_imag, *rout_kernel_ptr);
  259|      0|                w_dry_imag++;
  260|      0|                *hyb_output_real_dry = ixheaac_add32_sat(*hyb_output_real_dry, temp_1);
  261|      0|                hyb_output_real_dry++;
  262|       |
  263|      0|                temp_1 = ixheaacd_mps_mult32_shr_15(*w_dry_real, *rout_kernel_ptr);
  264|      0|                w_dry_real++;
  265|      0|                rout_kernel_ptr++;
  266|      0|                *hyb_output_imag_dry = ixheaac_sub32_sat(*hyb_output_imag_dry, temp_1);
  267|      0|                hyb_output_imag_dry++;
  268|      0|              }
  269|       |
  270|      0|              for (; qs < hybrid_bands; qs++) {
  ------------------
  |  Branch (270:22): [True: 0, False: 0]
  ------------------
  271|      0|                temp_1 = ixheaacd_mps_mult32_shr_15(*w_dry_imag, *rout_kernel_ptr);
  272|      0|                w_dry_imag++;
  273|      0|                *hyb_output_real_dry = ixheaac_sub32_sat(*hyb_output_real_dry, temp_1);
  274|      0|                hyb_output_real_dry++;
  275|       |
  276|      0|                temp_1 = ixheaacd_mps_mult32_shr_15(*w_dry_real, *rout_kernel_ptr);
  277|      0|                w_dry_real++;
  278|      0|                rout_kernel_ptr++;
  279|      0|                *hyb_output_imag_dry = ixheaac_add32_sat(*hyb_output_imag_dry, temp_1);
  280|      0|                hyb_output_imag_dry++;
  281|      0|              }
  282|      0|              p_buffer_re += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|      0|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|      0|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  283|      0|              p_buffer_im += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|      0|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|      0|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  284|       |
  285|      0|              p_hyb_out_dry_re += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|      0|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|      0|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  286|      0|              p_hyb_out_dry_im += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|      0|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|      0|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  287|      0|            }
  288|      0|            m2_resid_imag_prev += num_parameter_bands;
  289|      0|          }
  290|      0|          p_buffer_real += TSXHB;
  ------------------
  |  |  106|      0|#define TSXHB (5112)
  ------------------
  291|      0|          p_buffer_imag += TSXHB;
  ------------------
  |  |  106|      0|#define TSXHB (5112)
  ------------------
  292|      0|        }
  293|       |
  294|      0|        for (; col < loop_counter; col++) {
  ------------------
  |  Branch (294:16): [True: 0, False: 0]
  ------------------
  295|      0|          WORD32 index;
  296|      0|          WORD32 res = ixheaacd_get_res_idx(pstr_mps_state, col);
  297|      0|          index = index_ptr[res];
  298|       |
  299|      0|          if (curr_state->m2_param_present[row][col] & 2) {
  ------------------
  |  Branch (299:15): [True: 0, False: 0]
  ------------------
  300|      0|            WORD32 *p_dry_real = p_array_struct->w_dry_real + res * TSXHB;
  ------------------
  |  |  106|      0|#define TSXHB (5112)
  ------------------
  301|      0|            WORD32 *p_dry_imag = p_array_struct->w_dry_imag + res * TSXHB;
  ------------------
  |  |  106|      0|#define TSXHB (5112)
  ------------------
  302|      0|            ixheaacd_dec_interp_umx(p_m2_param->m2_resid_imag[idx++], rout_ptr,
  303|      0|                                    m2_resid_imag_prev, pstr_mps_state);
  304|      0|            ixheaacd_apply_abs_kernels(rout_ptr, rout_kernel_ptr, params);
  305|       |
  306|      0|            p_hyb_out_dry_re = p_hyb_out_dry_real;
  307|      0|            p_hyb_out_dry_im = p_hyb_out_dry_imag;
  308|       |
  309|      0|            for (ts = 0; ts < time_slots; ts++) {
  ------------------
  |  Branch (309:26): [True: 0, False: 0]
  ------------------
  310|      0|              hyb_output_real_dry = p_hyb_out_dry_re;
  311|      0|              hyb_output_imag_dry = p_hyb_out_dry_im;
  312|       |
  313|      0|              w_dry_real = p_dry_real;
  314|      0|              w_dry_imag = p_dry_imag;
  315|       |
  316|      0|              for (qs = 0; qs < 2; qs++) {
  ------------------
  |  Branch (316:28): [True: 0, False: 0]
  ------------------
  317|      0|                temp_1 = ixheaacd_mps_mult32_shr_15(*w_dry_imag, *rout_kernel_ptr);
  318|      0|                w_dry_imag++;
  319|      0|                *hyb_output_real_dry = ixheaac_add32_sat(*hyb_output_real_dry, temp_1);
  320|      0|                hyb_output_real_dry++;
  321|       |
  322|      0|                temp_1 = ixheaacd_mps_mult32_shr_15(*w_dry_real, *rout_kernel_ptr);
  323|      0|                w_dry_real++;
  324|      0|                rout_kernel_ptr++;
  325|      0|                *hyb_output_imag_dry = ixheaac_sub32_sat(*hyb_output_imag_dry, temp_1);
  326|      0|                hyb_output_imag_dry++;
  327|      0|              }
  328|       |
  329|      0|              for (; qs < index; qs++) {
  ------------------
  |  Branch (329:22): [True: 0, False: 0]
  ------------------
  330|      0|                temp_1 = ixheaacd_mps_mult32_shr_15(*w_dry_imag, *rout_kernel_ptr);
  331|      0|                w_dry_imag++;
  332|      0|                *hyb_output_real_dry = ixheaac_sub32_sat(*hyb_output_real_dry, temp_1);
  333|      0|                hyb_output_real_dry++;
  334|       |
  335|      0|                temp_1 = ixheaacd_mps_mult32_shr_15(*w_dry_real, *rout_kernel_ptr);
  336|      0|                w_dry_real++;
  337|      0|                rout_kernel_ptr++;
  338|      0|                *hyb_output_imag_dry = ixheaac_add32_sat(*hyb_output_imag_dry, temp_1);
  339|      0|                hyb_output_imag_dry++;
  340|      0|              }
  341|      0|              rout_kernel_ptr += hybrid_bands - index;
  342|       |
  343|      0|              p_hyb_out_dry_re += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|      0|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|      0|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  344|      0|              p_hyb_out_dry_im += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|      0|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|      0|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  345|       |
  346|      0|              p_dry_real += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|      0|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|      0|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  347|      0|              p_dry_imag += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|      0|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|      0|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  348|      0|            }
  349|      0|            m2_resid_imag_prev += num_parameter_bands;
  350|      0|          }
  351|      0|        }
  352|      0|        p_hyb_out_dry_real += TSXHB;
  ------------------
  |  |  106|      0|#define TSXHB (5112)
  ------------------
  353|      0|        p_hyb_out_dry_imag += TSXHB;
  ------------------
  |  |  106|      0|#define TSXHB (5112)
  ------------------
  354|      0|      }
  355|      0|    }
  356|      0|  }
  357|  13.1k|  p_buffer_real = p_array_struct->buf_real;
  358|  13.1k|  p_buffer_imag = p_array_struct->buf_imag;
  359|       |
  360|   115k|  for (row = 0; row < num_output_channels; row++) {
  ------------------
  |  Branch (360:17): [True: 101k, False: 13.1k]
  ------------------
  361|   101k|    hyb_output_real_wet = p_buffer_real;
  362|   101k|    hyb_output_imag_wet = p_buffer_imag;
  363|       |
  364|  2.87M|    for (ts = 0; ts < time_slots; ts++) {
  ------------------
  |  Branch (364:18): [True: 2.77M, False: 101k]
  ------------------
  365|  2.77M|      memset(hyb_output_real_wet, 0, (hybrid_bands) * sizeof(*hyb_output_real_wet));
  366|  2.77M|      memset(hyb_output_imag_wet, 0, (hybrid_bands) * sizeof(*hyb_output_imag_wet));
  367|       |
  368|  2.77M|      hyb_output_real_wet += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  2.77M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  2.77M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  369|  2.77M|      hyb_output_imag_wet += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  2.77M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  2.77M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  370|  2.77M|    }
  371|   101k|    p_buffer_real += TSXHB;
  ------------------
  |  |  106|   101k|#define TSXHB (5112)
  ------------------
  372|   101k|    p_buffer_imag += TSXHB;
  ------------------
  |  |  106|   101k|#define TSXHB (5112)
  ------------------
  373|   101k|  }
  374|  13.1k|  idx = 0;
  375|       |
  376|  13.1k|  p_buffer_real = p_array_struct->buf_real;
  377|  13.1k|  p_buffer_imag = p_array_struct->buf_imag;
  378|       |
  379|   115k|  for (row = 0; row < num_output_channels; row++) {
  ------------------
  |  Branch (379:17): [True: 101k, False: 13.1k]
  ------------------
  380|   101k|    p_buf_real = p_array_struct->buffer_real + w_wet_offset;
  381|   101k|    p_buf_imag = p_array_struct->buffer_imag + w_wet_offset;
  382|   328k|    for (col = num_direct_signals; col < col_counter; col++) {
  ------------------
  |  Branch (382:36): [True: 226k, False: 101k]
  ------------------
  383|   226k|      if (curr_state->m2_param_present[row][col] & 1) {
  ------------------
  |  Branch (383:11): [True: 63.3k, False: 163k]
  ------------------
  384|  63.3k|        ixheaacd_dec_interp_umx(p_m2_param->m2_decor_real[idx++], rout_ptr, m2_decor_real_prev,
  385|  63.3k|                                pstr_mps_state);
  386|       |
  387|  63.3k|        ixheaacd_apply_abs_kernels(rout_ptr, rout_kernel_ptr, params);
  388|  63.3k|        p_buffer_re = p_buffer_real;
  389|  63.3k|        p_buffer_im = p_buffer_imag;
  390|       |
  391|  63.3k|        p_buf_re = p_buf_real;
  392|  63.3k|        p_buf_im = p_buf_imag;
  393|  1.76M|        for (ts = 0; ts < time_slots; ts++) {
  ------------------
  |  Branch (393:22): [True: 1.69M, False: 63.3k]
  ------------------
  394|  1.69M|          hyb_output_real_wet = p_buffer_re;
  395|  1.69M|          hyb_output_imag_wet = p_buffer_im;
  396|       |
  397|  1.69M|          w_wet_real = p_buf_re;
  398|  1.69M|          w_wet_imag = p_buf_im;
  399|       |
  400|  97.2M|          for (qs = 0; qs < hybrid_bands; qs++) {
  ------------------
  |  Branch (400:24): [True: 95.5M, False: 1.69M]
  ------------------
  401|  95.5M|            temp_1 = ixheaacd_mps_mult32_shr_15(*w_wet_real, *rout_kernel_ptr);
  402|  95.5M|            w_wet_real++;
  403|  95.5M|            *hyb_output_real_wet = ixheaac_add32_sat(*hyb_output_real_wet, temp_1);
  404|  95.5M|            hyb_output_real_wet++;
  405|       |
  406|  95.5M|            temp_1 = ixheaacd_mps_mult32_shr_15(*w_wet_imag, *rout_kernel_ptr);
  407|  95.5M|            w_wet_imag++;
  408|  95.5M|            rout_kernel_ptr++;
  409|  95.5M|            *hyb_output_imag_wet = ixheaac_add32_sat(*hyb_output_imag_wet, temp_1);
  410|  95.5M|            hyb_output_imag_wet++;
  411|  95.5M|          }
  412|  1.69M|          p_buffer_re += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  1.69M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  1.69M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  413|  1.69M|          p_buffer_im += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  1.69M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  1.69M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  414|       |
  415|  1.69M|          p_buf_re += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  1.69M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  1.69M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  416|  1.69M|          p_buf_im += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  1.69M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  1.69M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  417|  1.69M|        }
  418|  63.3k|        m2_decor_real_prev += num_parameter_bands;
  419|  63.3k|      }
  420|   226k|      p_buf_real += TSXHB;
  ------------------
  |  |  106|   226k|#define TSXHB (5112)
  ------------------
  421|   226k|      p_buf_imag += TSXHB;
  ------------------
  |  |  106|   226k|#define TSXHB (5112)
  ------------------
  422|   226k|    }
  423|   101k|    p_buffer_real += TSXHB;
  ------------------
  |  |  106|   101k|#define TSXHB (5112)
  ------------------
  424|   101k|    p_buffer_imag += TSXHB;
  ------------------
  |  |  106|   101k|#define TSXHB (5112)
  ------------------
  425|   101k|  }
  426|       |
  427|  13.1k|  if (up_mix_type == 2) {
  ------------------
  |  Branch (427:7): [True: 0, False: 13.1k]
  ------------------
  428|      0|    if (m2_param_imag_present) {
  ------------------
  |  Branch (428:9): [True: 0, False: 0]
  ------------------
  429|      0|      idx = 0;
  430|       |
  431|      0|      p_buffer_real = p_array_struct->buf_real;
  432|      0|      p_buffer_imag = p_array_struct->buf_imag;
  433|       |
  434|      0|      for (row = 0; row < num_output_channels; row++) {
  ------------------
  |  Branch (434:21): [True: 0, False: 0]
  ------------------
  435|      0|        m2_decor_imag_prev += num_parameter_bands * num_direct_signals;
  436|      0|        p_buf_real = p_array_struct->buffer_real + w_wet_offset;
  437|      0|        p_buf_imag = p_array_struct->buffer_imag + w_wet_offset;
  438|      0|        for (col = num_direct_signals; col < col_counter; col++) {
  ------------------
  |  Branch (438:40): [True: 0, False: 0]
  ------------------
  439|      0|          if (curr_state->m2_param_present[row][col] & 1) {
  ------------------
  |  Branch (439:15): [True: 0, False: 0]
  ------------------
  440|      0|            ixheaacd_dec_interp_umx(p_m2_param->m2_decor_imag[idx++], rout_ptr,
  441|      0|                                    m2_decor_imag_prev, pstr_mps_state);
  442|      0|            ixheaacd_apply_abs_kernels(rout_ptr, rout_kernel_ptr, params);
  443|       |
  444|      0|            p_buffer_re = p_buffer_real;
  445|      0|            p_buffer_im = p_buffer_imag;
  446|       |
  447|      0|            p_buf_re = p_buf_real;
  448|      0|            p_buf_im = p_buf_imag;
  449|      0|            for (ts = 0; ts < time_slots; ts++) {
  ------------------
  |  Branch (449:26): [True: 0, False: 0]
  ------------------
  450|      0|              hyb_output_real_wet = p_buffer_re;
  451|      0|              hyb_output_imag_wet = p_buffer_im;
  452|       |
  453|      0|              w_wet_real = p_buf_re;
  454|      0|              w_wet_imag = p_buf_im;
  455|       |
  456|      0|              for (qs = 0; qs < 2; qs++) {
  ------------------
  |  Branch (456:28): [True: 0, False: 0]
  ------------------
  457|      0|                temp_1 = ixheaacd_mps_mult32_shr_15(*w_wet_imag, *rout_kernel_ptr);
  458|      0|                w_wet_imag++;
  459|      0|                *hyb_output_real_wet = ixheaac_add32_sat(*hyb_output_real_wet, temp_1);
  460|      0|                hyb_output_real_wet++;
  461|       |
  462|      0|                temp_1 = ixheaacd_mps_mult32_shr_15(*w_wet_real, *rout_kernel_ptr);
  463|      0|                w_wet_real++;
  464|      0|                rout_kernel_ptr++;
  465|      0|                *hyb_output_imag_wet = ixheaac_sub32_sat(*hyb_output_imag_wet, temp_1);
  466|      0|                hyb_output_imag_wet++;
  467|      0|              }
  468|       |
  469|      0|              for (; qs < hybrid_bands; qs++) {
  ------------------
  |  Branch (469:22): [True: 0, False: 0]
  ------------------
  470|      0|                temp_1 = ixheaacd_mps_mult32_shr_15(*w_wet_imag, *rout_kernel_ptr);
  471|      0|                w_wet_imag++;
  472|      0|                *hyb_output_real_wet = ixheaac_sub32_sat(*hyb_output_real_wet, temp_1);
  473|      0|                hyb_output_real_wet++;
  474|       |
  475|      0|                temp_1 = ixheaacd_mps_mult32_shr_15(*w_wet_real, *rout_kernel_ptr);
  476|      0|                w_wet_real++;
  477|      0|                rout_kernel_ptr++;
  478|      0|                *hyb_output_imag_wet = ixheaac_add32_sat(*hyb_output_imag_wet, temp_1);
  479|      0|                hyb_output_imag_wet++;
  480|      0|              }
  481|      0|              p_buffer_re += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|      0|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|      0|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  482|      0|              p_buffer_im += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|      0|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|      0|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  483|       |
  484|      0|              p_buf_re += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|      0|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|      0|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  485|      0|              p_buf_im += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|      0|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|      0|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  486|      0|            }
  487|      0|            m2_decor_imag_prev += num_parameter_bands;
  488|      0|          }
  489|      0|          p_buf_real += TSXHB;
  ------------------
  |  |  106|      0|#define TSXHB (5112)
  ------------------
  490|      0|          p_buf_imag += TSXHB;
  ------------------
  |  |  106|      0|#define TSXHB (5112)
  ------------------
  491|      0|        }
  492|      0|        p_buffer_real += TSXHB;
  ------------------
  |  |  106|      0|#define TSXHB (5112)
  ------------------
  493|      0|        p_buffer_imag += TSXHB;
  ------------------
  |  |  106|      0|#define TSXHB (5112)
  ------------------
  494|      0|      }
  495|      0|    }
  496|      0|  }
  497|  13.1k|  return;
  498|  13.1k|}

ixheaacd_mps_dec.c:ixheaacd_mps_mult32_shr_15:
  222|  89.5M|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_15(WORD32 a, WORD32 b) {
  223|  89.5M|  WORD32 result;
  224|  89.5M|  WORD64 temp_result;
  225|  89.5M|  temp_result = (WORD64)a * (WORD64)b;
  226|  89.5M|  result = (WORD32)ixheaac_sat64_32(temp_result >> 15);
  227|       |
  228|  89.5M|  return (result);
  229|  89.5M|}
ixheaacd_mps_decorr.c:ixheaacd_mps_narrow:
   50|  44.4M|static PLATFORM_INLINE WORD32 ixheaacd_mps_narrow(WORD64 a, WORD16 *qfac) {
   51|  44.4M|  WORD32 x;
   52|  44.4M|  x = ixheaacd_mps_get_rshift_bits(a);
   53|  44.4M|  *qfac = 20 - x;
   54|  44.4M|  return (WORD32)((WORD64)a >> x);
   55|  44.4M|}
ixheaacd_mps_decorr.c:ixheaacd_mps_get_rshift_bits:
   34|  44.4M|static PLATFORM_INLINE WORD32 ixheaacd_mps_get_rshift_bits(WORD64 a) {
   35|  44.4M|  WORD32 temp_1, temp_2;
   36|  44.4M|  temp_1 = (WORD32)(a >> 32);
   37|  44.4M|  temp_2 = ixheaac_norm32(temp_1);
   38|  44.4M|  if (temp_2 < 31) {
  ------------------
  |  Branch (38:7): [True: 33.1M, False: 11.2M]
  ------------------
   39|  33.1M|    return (32 - temp_2);
   40|  33.1M|  } else {
   41|  11.2M|    temp_2 = (WORD32)(a);
   42|  11.2M|    if ((temp_1 ^ temp_2) < 0) {
  ------------------
  |  Branch (42:9): [True: 90.6k, False: 11.1M]
  ------------------
   43|  90.6k|      return 1;
   44|  11.1M|    } else {
   45|  11.1M|      return 0;
   46|  11.1M|    }
   47|  11.2M|  }
   48|  44.4M|}
ixheaacd_mps_decorr.c:ixheaacd_mps_add32:
  108|  44.4M|static PLATFORM_INLINE WORD32 ixheaacd_mps_add32(WORD32 a, WORD32 b, WORD16 *q_a, WORD16 q_b) {
  109|  44.4M|  WORD64 temp_result;
  110|       |
  111|  44.4M|  if (a == 0 || b == 0) {
  ------------------
  |  Branch (111:7): [True: 9.79M, False: 34.6M]
  |  Branch (111:17): [True: 633k, False: 34.0M]
  ------------------
  112|  10.4M|    if (b == 0) {
  ------------------
  |  Branch (112:9): [True: 10.1M, False: 316k]
  ------------------
  113|  10.1M|      return a;
  114|  10.1M|    } else {
  115|   316k|      *q_a = q_b;
  116|   316k|      return b;
  117|   316k|    }
  118|  10.4M|  }
  119|  34.0M|  if (*q_a > q_b) {
  ------------------
  |  Branch (119:7): [True: 1.22M, False: 32.7M]
  ------------------
  120|  1.22M|    if (((*q_a) - q_b) > 31) {
  ------------------
  |  Branch (120:9): [True: 1.39k, False: 1.22M]
  ------------------
  121|  1.39k|      a = 0;
  122|  1.39k|      *q_a = q_b;
  123|  1.22M|    } else {
  124|  1.22M|      a = (a >> ((*q_a) - q_b));
  125|  1.22M|      *q_a = q_b;
  126|  1.22M|    }
  127|  32.7M|  } else {
  128|  32.7M|    if ((q_b - (*q_a)) > 31) {
  ------------------
  |  Branch (128:9): [True: 127k, False: 32.6M]
  ------------------
  129|   127k|      b = 0;
  130|  32.6M|    } else {
  131|  32.6M|      b = (b >> (q_b - (*q_a)));
  132|  32.6M|      q_b = *q_a;
  133|  32.6M|    }
  134|  32.7M|  }
  135|  34.0M|  temp_result = (WORD64)a + (WORD64)b;
  136|  34.0M|  if (temp_result > (WORD32)0x7fffffff || temp_result < (WORD32)0x80000000) {
  ------------------
  |  Branch (136:7): [True: 1.07M, False: 32.9M]
  |  Branch (136:43): [True: 0, False: 32.9M]
  ------------------
  137|  1.07M|    temp_result = temp_result >> 1;
  138|  1.07M|    *q_a -= 1;
  139|  1.07M|  }
  140|       |
  141|  34.0M|  return (WORD32)temp_result;
  142|  44.4M|}
ixheaacd_mps_decorr.c:ixheaacd_mps_mult32x16_shr_16:
  214|  1.85G|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32x16_shr_16(WORD32 a, WORD32 b) {
  215|  1.85G|  WORD32 result;
  216|  1.85G|  WORD64 temp_result;
  217|  1.85G|  temp_result = (WORD64)a * (WORD64)b;
  218|  1.85G|  result = (WORD32)(temp_result >> 16);
  219|  1.85G|  return (result);
  220|  1.85G|}
ixheaacd_mps_decorr.c:ixheaacd_mps_comp:
  366|  36.4M|static PLATFORM_INLINE WORD32 ixheaacd_mps_comp(WORD32 a, WORD32 b, WORD16 *q_a, WORD16 q_b) {
  367|  36.4M|  if (a == 0 || b == 0) {
  ------------------
  |  Branch (367:7): [True: 8.64M, False: 27.7M]
  |  Branch (367:17): [True: 921k, False: 26.8M]
  ------------------
  368|  9.56M|    if (a == 0) {
  ------------------
  |  Branch (368:9): [True: 8.64M, False: 921k]
  ------------------
  369|  8.64M|      if (b < 0)
  ------------------
  |  Branch (369:11): [True: 0, False: 8.64M]
  ------------------
  370|      0|        return 1;
  371|  8.64M|      else
  372|  8.64M|        return 0;
  373|  8.64M|    } else if (b == 0) {
  ------------------
  |  Branch (373:16): [True: 921k, False: 0]
  ------------------
  374|   921k|      if (a > 0)
  ------------------
  |  Branch (374:11): [True: 921k, False: 0]
  ------------------
  375|   921k|        return 1;
  376|      0|      else
  377|      0|        return 0;
  378|   921k|    }
  379|  9.56M|  }
  380|       |
  381|  26.8M|  if (*q_a > q_b) {
  ------------------
  |  Branch (381:7): [True: 17.3M, False: 9.55M]
  ------------------
  382|  17.3M|    a = (a >> ((*q_a) - q_b));
  383|  17.3M|  } else {
  384|  9.55M|    b = (b >> (q_b - (*q_a)));
  385|  9.55M|  }
  386|       |
  387|  26.8M|  if (a > b)
  ------------------
  |  Branch (387:7): [True: 11.2M, False: 15.6M]
  ------------------
  388|  11.2M|    return 1;
  389|  15.6M|  else
  390|  15.6M|    return 0;
  391|  26.8M|}
ixheaacd_mps_decorr.c:ixheaacd_mps_div_32:
  242|  12.1M|static PLATFORM_INLINE WORD32 ixheaacd_mps_div_32(WORD32 a, WORD32 b, WORD16 *q_format) {
  243|  12.1M|  WORD32 quotient;
  244|  12.1M|  UWORD32 mantissa_nr, mantissa_dr;
  245|  12.1M|  LOOPINDEX i;
  246|  12.1M|  WORD q_nr, q_dr;
  247|       |
  248|  12.1M|  quotient = 0;
  249|       |
  250|  12.1M|  if (0 == b) {
  ------------------
  |  Branch (250:7): [True: 862k, False: 11.2M]
  ------------------
  251|   862k|    *q_format = 0;
  252|   862k|    return (a);
  253|   862k|  }
  254|       |
  255|  11.2M|  quotient = 0;
  256|       |
  257|  11.2M|  q_nr = ixheaac_norm32(a);
  258|  11.2M|  mantissa_nr = (UWORD32)a << (q_nr);
  259|  11.2M|  q_dr = ixheaac_norm32(b);
  260|  11.2M|  mantissa_dr = (UWORD32)b << (q_dr);
  261|  11.2M|  *q_format = (WORD)(30 + q_nr - q_dr);
  262|       |
  263|   360M|  for (i = 0; i < 31; i++) {
  ------------------
  |  Branch (263:15): [True: 349M, False: 11.2M]
  ------------------
  264|   349M|    quotient <<= 1;
  265|       |
  266|   349M|    if (mantissa_nr >= mantissa_dr) {
  ------------------
  |  Branch (266:9): [True: 174M, False: 174M]
  ------------------
  267|   174M|      mantissa_nr -= mantissa_dr;
  268|   174M|      quotient += 1;
  269|   174M|    }
  270|   349M|    mantissa_nr <<= 1;
  271|   349M|  }
  272|       |
  273|  11.2M|  if ((a ^ b) < 0) {
  ------------------
  |  Branch (273:7): [True: 0, False: 11.2M]
  ------------------
  274|      0|    return -(quotient);
  275|      0|  }
  276|       |
  277|  11.2M|  return quotient;
  278|  11.2M|}
ixheaacd_mps_decorr.c:ixheaacd_mps_sqrt:
   57|  9.54M|static PLATFORM_INLINE WORD32 ixheaacd_mps_sqrt(WORD32 num, WORD16 *q, const WORD32 *sqrt_tab) {
   58|  9.54M|  WORD32 index, answer, temp;
   59|  9.54M|  WORD k;
   60|       |
   61|  9.54M|  if (num == 0) return 0;
  ------------------
  |  Branch (61:7): [True: 59.6k, False: 9.48M]
  ------------------
   62|       |
   63|  9.48M|  k = ixheaac_norm32(num);
   64|  9.48M|  temp = ixheaac_shr32(ixheaac_shl32(num, k), 21);
   65|  9.48M|  *q += k;
   66|  9.48M|  index = temp & 0x1FF;
   67|  9.48M|  answer = sqrt_tab[index];
   68|  9.48M|  if (*q & 1) {
  ------------------
  |  Branch (68:7): [True: 3.88M, False: 5.60M]
  ------------------
   69|  3.88M|    *q -= 1;
   70|  3.88M|    answer = ixheaac_mult32_shl(answer, INV_SQRT_2_Q31);
  ------------------
  |  |   24|  3.88M|#define INV_SQRT_2_Q31 (1518500250)
  ------------------
   71|  3.88M|  }
   72|  9.48M|  *q = *q >> 1;
   73|  9.48M|  *q += Q_SQRT_TAB;
  ------------------
  |  |   25|  9.48M|#define Q_SQRT_TAB (15)
  ------------------
   74|  9.48M|  return answer;
   75|  9.54M|}
ixheaacd_mps_decorr.c:ixheaacd_mps_mult32_shr_n:
  185|  40.7M|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_n(WORD32 a, WORD32 b, WORD16 n) {
  186|  40.7M|  WORD32 result;
  187|  40.7M|  WORD64 temp_result;
  188|       |
  189|  40.7M|  temp_result = (WORD64)a * (WORD64)b;
  190|  40.7M|  result = (WORD32)(temp_result >> n);
  191|       |
  192|  40.7M|  return (result);
  193|  40.7M|}
ixheaacd_mps_decorr.c:ixheaacd_mps_mult32_shr_14:
  231|  90.6M|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_14(WORD32 a, WORD32 b) {
  232|  90.6M|  WORD32 result;
  233|  90.6M|  WORD64 temp_result;
  234|       |
  235|  90.6M|  temp_result = (WORD64)a * (WORD64)b;
  236|  90.6M|  result = (WORD32)(temp_result >> 16);
  237|  90.6M|  result = result << 2;
  238|       |
  239|  90.6M|  return (result);
  240|  90.6M|}
ixheaacd_mps_hybrid_filt.c:ixheaacd_mps_mult32x16_shr_16:
  214|  37.6M|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32x16_shr_16(WORD32 a, WORD32 b) {
  215|  37.6M|  WORD32 result;
  216|  37.6M|  WORD64 temp_result;
  217|  37.6M|  temp_result = (WORD64)a * (WORD64)b;
  218|  37.6M|  result = (WORD32)(temp_result >> 16);
  219|  37.6M|  return (result);
  220|  37.6M|}
ixheaacd_mps_mdct_2_qmf.c:ixheaacd_mps_mult32_shr_30:
  195|  2.23M|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_30(WORD32 a, WORD32 b) {
  196|  2.23M|  WORD32 result;
  197|  2.23M|  WORD64 temp_result;
  198|       |
  199|  2.23M|  temp_result = (WORD64)a * (WORD64)b;
  200|  2.23M|  result = (WORD32)(temp_result >> 30);
  201|       |
  202|  2.23M|  return (result);
  203|  2.23M|}
ixheaacd_mps_mdct_2_qmf.c:ixheaacd_mps_mult32_shr_15:
  222|  89.2M|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_15(WORD32 a, WORD32 b) {
  223|  89.2M|  WORD32 result;
  224|  89.2M|  WORD64 temp_result;
  225|  89.2M|  temp_result = (WORD64)a * (WORD64)b;
  226|  89.2M|  result = (WORD32)ixheaac_sat64_32(temp_result >> 15);
  227|       |
  228|  89.2M|  return (result);
  229|  89.2M|}
ixheaacd_mps_polyphase.c:ixheaacd_mps_mult32_shr_30:
  195|  1.44G|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_30(WORD32 a, WORD32 b) {
  196|  1.44G|  WORD32 result;
  197|  1.44G|  WORD64 temp_result;
  198|       |
  199|  1.44G|  temp_result = (WORD64)a * (WORD64)b;
  200|  1.44G|  result = (WORD32)(temp_result >> 30);
  201|       |
  202|  1.44G|  return (result);
  203|  1.44G|}
ixheaacd_mps_polyphase.c:ixheaacd_mps_mult32_shr_15:
  222|   101M|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_15(WORD32 a, WORD32 b) {
  223|   101M|  WORD32 result;
  224|   101M|  WORD64 temp_result;
  225|   101M|  temp_result = (WORD64)a * (WORD64)b;
  226|   101M|  result = (WORD32)ixheaac_sat64_32(temp_result >> 15);
  227|       |
  228|   101M|  return (result);
  229|   101M|}
ixheaacd_mps_process.c:ixheaacd_mps_mult32_shr_30:
  195|  1.06M|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_30(WORD32 a, WORD32 b) {
  196|  1.06M|  WORD32 result;
  197|  1.06M|  WORD64 temp_result;
  198|       |
  199|  1.06M|  temp_result = (WORD64)a * (WORD64)b;
  200|  1.06M|  result = (WORD32)(temp_result >> 30);
  201|       |
  202|  1.06M|  return (result);
  203|  1.06M|}
ixheaacd_mps_reshape_bb_env.c:ixheaacd_mps_reshape_add32:
   78|  33.1M|                                                         WORD16 qop2) {
   79|  33.1M|  WORD64 tempresult;
   80|  33.1M|  if (0 == op2) {
  ------------------
  |  Branch (80:7): [True: 8.57M, False: 24.6M]
  ------------------
   81|  8.57M|    return op1;
   82|  8.57M|  }
   83|  24.6M|  if (0 == op1) {
  ------------------
  |  Branch (83:7): [True: 1.77M, False: 22.8M]
  ------------------
   84|  1.77M|    *qop1 = qop2;
   85|  1.77M|    return op2;
   86|  1.77M|  }
   87|  22.8M|  if (*qop1 < qop2) {
  ------------------
  |  Branch (87:7): [True: 16.2M, False: 6.55M]
  ------------------
   88|  16.2M|    if ((qop2 - *qop1) > 31)
  ------------------
  |  Branch (88:9): [True: 52.1k, False: 16.2M]
  ------------------
   89|  52.1k|      op2 = 0;
   90|  16.2M|    else
   91|  16.2M|      op2 = op2 >> (qop2 - *qop1);
   92|  16.2M|    tempresult = (WORD64)op1 + (WORD64)op2;
   93|  16.2M|  } else {
   94|  6.55M|    if ((*qop1 - qop2) > 31)
  ------------------
  |  Branch (94:9): [True: 13.0k, False: 6.54M]
  ------------------
   95|  13.0k|      op1 = 0;
   96|  6.54M|    else
   97|  6.54M|      op1 = op1 >> (*qop1 - qop2);
   98|  6.55M|    *qop1 = qop2;
   99|  6.55M|    tempresult = (WORD64)op1 + (WORD64)op2;
  100|  6.55M|  }
  101|  22.8M|  if (tempresult > (WORD32)0x7fffffff || tempresult < (WORD32)0x80000000) {
  ------------------
  |  Branch (101:7): [True: 4.68M, False: 18.1M]
  |  Branch (101:42): [True: 468, False: 18.1M]
  ------------------
  102|  4.68M|    tempresult = tempresult >> 1;
  103|  4.68M|    *qop1 -= 1;
  104|  4.68M|  }
  105|  22.8M|  return (WORD32)tempresult;
  106|  24.6M|}
ixheaacd_mps_reshape_bb_env.c:ixheaacd_mps_mult32x32:
  167|  1.14M|                                                     WORD16 q_b) {
  168|  1.14M|  WORD64 temp_result;
  169|  1.14M|  if (a == 0 || b == 0) {
  ------------------
  |  Branch (169:7): [True: 294k, False: 850k]
  |  Branch (169:17): [True: 1.98k, False: 848k]
  ------------------
  170|   296k|    temp_result = 0;
  171|   296k|    *q_a = 15;
  172|   296k|    return (WORD32)temp_result;
  173|   296k|  }
  174|   848k|  *q_a = *q_a + q_b;
  175|       |
  176|   848k|  temp_result = (WORD64)a * (WORD64)b;
  177|  21.5M|  while (temp_result > (WORD32)0x7fffffff || temp_result < (WORD32)0x80000000) {
  ------------------
  |  Branch (177:10): [True: 20.2M, False: 1.31M]
  |  Branch (177:46): [True: 464k, False: 848k]
  ------------------
  178|  20.7M|    temp_result = temp_result >> 1;
  179|  20.7M|    *q_a -= 1;
  180|  20.7M|  }
  181|       |
  182|   848k|  return (WORD32)temp_result;
  183|  1.14M|}
ixheaacd_mps_reshape_bb_env.c:ixheaacd_mps_narrow:
   50|  10.3M|static PLATFORM_INLINE WORD32 ixheaacd_mps_narrow(WORD64 a, WORD16 *qfac) {
   51|  10.3M|  WORD32 x;
   52|  10.3M|  x = ixheaacd_mps_get_rshift_bits(a);
   53|  10.3M|  *qfac = 20 - x;
   54|  10.3M|  return (WORD32)((WORD64)a >> x);
   55|  10.3M|}
ixheaacd_mps_reshape_bb_env.c:ixheaacd_mps_get_rshift_bits:
   34|  10.3M|static PLATFORM_INLINE WORD32 ixheaacd_mps_get_rshift_bits(WORD64 a) {
   35|  10.3M|  WORD32 temp_1, temp_2;
   36|  10.3M|  temp_1 = (WORD32)(a >> 32);
   37|  10.3M|  temp_2 = ixheaac_norm32(temp_1);
   38|  10.3M|  if (temp_2 < 31) {
  ------------------
  |  Branch (38:7): [True: 7.30M, False: 3.07M]
  ------------------
   39|  7.30M|    return (32 - temp_2);
   40|  7.30M|  } else {
   41|  3.07M|    temp_2 = (WORD32)(a);
   42|  3.07M|    if ((temp_1 ^ temp_2) < 0) {
  ------------------
  |  Branch (42:9): [True: 22.6k, False: 3.05M]
  ------------------
   43|  22.6k|      return 1;
   44|  3.05M|    } else {
   45|  3.05M|      return 0;
   46|  3.05M|    }
   47|  3.07M|  }
   48|  10.3M|}
ixheaacd_mps_reshape_bb_env.c:ixheaacd_mps_div_32:
  242|  10.7M|static PLATFORM_INLINE WORD32 ixheaacd_mps_div_32(WORD32 a, WORD32 b, WORD16 *q_format) {
  243|  10.7M|  WORD32 quotient;
  244|  10.7M|  UWORD32 mantissa_nr, mantissa_dr;
  245|  10.7M|  LOOPINDEX i;
  246|  10.7M|  WORD q_nr, q_dr;
  247|       |
  248|  10.7M|  quotient = 0;
  249|       |
  250|  10.7M|  if (0 == b) {
  ------------------
  |  Branch (250:7): [True: 2.38M, False: 8.35M]
  ------------------
  251|  2.38M|    *q_format = 0;
  252|  2.38M|    return (a);
  253|  2.38M|  }
  254|       |
  255|  8.35M|  quotient = 0;
  256|       |
  257|  8.35M|  q_nr = ixheaac_norm32(a);
  258|  8.35M|  mantissa_nr = (UWORD32)a << (q_nr);
  259|  8.35M|  q_dr = ixheaac_norm32(b);
  260|  8.35M|  mantissa_dr = (UWORD32)b << (q_dr);
  261|  8.35M|  *q_format = (WORD)(30 + q_nr - q_dr);
  262|       |
  263|   267M|  for (i = 0; i < 31; i++) {
  ------------------
  |  Branch (263:15): [True: 259M, False: 8.35M]
  ------------------
  264|   259M|    quotient <<= 1;
  265|       |
  266|   259M|    if (mantissa_nr >= mantissa_dr) {
  ------------------
  |  Branch (266:9): [True: 122M, False: 136M]
  ------------------
  267|   122M|      mantissa_nr -= mantissa_dr;
  268|   122M|      quotient += 1;
  269|   122M|    }
  270|   259M|    mantissa_nr <<= 1;
  271|   259M|  }
  272|       |
  273|  8.35M|  if ((a ^ b) < 0) {
  ------------------
  |  Branch (273:7): [True: 273k, False: 8.08M]
  ------------------
  274|   273k|    return -(quotient);
  275|   273k|  }
  276|       |
  277|  8.08M|  return quotient;
  278|  8.35M|}
ixheaacd_mps_reshape_bb_env.c:ixheaacd_mps_add32:
  108|  52.2k|static PLATFORM_INLINE WORD32 ixheaacd_mps_add32(WORD32 a, WORD32 b, WORD16 *q_a, WORD16 q_b) {
  109|  52.2k|  WORD64 temp_result;
  110|       |
  111|  52.2k|  if (a == 0 || b == 0) {
  ------------------
  |  Branch (111:7): [True: 32.8k, False: 19.3k]
  |  Branch (111:17): [True: 29, False: 19.3k]
  ------------------
  112|  32.8k|    if (b == 0) {
  ------------------
  |  Branch (112:9): [True: 38, False: 32.8k]
  ------------------
  113|     38|      return a;
  114|  32.8k|    } else {
  115|  32.8k|      *q_a = q_b;
  116|  32.8k|      return b;
  117|  32.8k|    }
  118|  32.8k|  }
  119|  19.3k|  if (*q_a > q_b) {
  ------------------
  |  Branch (119:7): [True: 5.87k, False: 13.4k]
  ------------------
  120|  5.87k|    if (((*q_a) - q_b) > 31) {
  ------------------
  |  Branch (120:9): [True: 241, False: 5.62k]
  ------------------
  121|    241|      a = 0;
  122|    241|      *q_a = q_b;
  123|  5.62k|    } else {
  124|  5.62k|      a = (a >> ((*q_a) - q_b));
  125|  5.62k|      *q_a = q_b;
  126|  5.62k|    }
  127|  13.4k|  } else {
  128|  13.4k|    if ((q_b - (*q_a)) > 31) {
  ------------------
  |  Branch (128:9): [True: 0, False: 13.4k]
  ------------------
  129|      0|      b = 0;
  130|  13.4k|    } else {
  131|  13.4k|      b = (b >> (q_b - (*q_a)));
  132|  13.4k|      q_b = *q_a;
  133|  13.4k|    }
  134|  13.4k|  }
  135|  19.3k|  temp_result = (WORD64)a + (WORD64)b;
  136|  19.3k|  if (temp_result > (WORD32)0x7fffffff || temp_result < (WORD32)0x80000000) {
  ------------------
  |  Branch (136:7): [True: 31, False: 19.3k]
  |  Branch (136:43): [True: 0, False: 19.3k]
  ------------------
  137|     31|    temp_result = temp_result >> 1;
  138|     31|    *q_a -= 1;
  139|     31|  }
  140|       |
  141|  19.3k|  return (WORD32)temp_result;
  142|  52.2k|}
ixheaacd_mps_reshape_bb_env.c:ixheaacd_mps_sqrt:
   57|   426k|static PLATFORM_INLINE WORD32 ixheaacd_mps_sqrt(WORD32 num, WORD16 *q, const WORD32 *sqrt_tab) {
   58|   426k|  WORD32 index, answer, temp;
   59|   426k|  WORD k;
   60|       |
   61|   426k|  if (num == 0) return 0;
  ------------------
  |  Branch (61:7): [True: 68.3k, False: 357k]
  ------------------
   62|       |
   63|   357k|  k = ixheaac_norm32(num);
   64|   357k|  temp = ixheaac_shr32(ixheaac_shl32(num, k), 21);
   65|   357k|  *q += k;
   66|   357k|  index = temp & 0x1FF;
   67|   357k|  answer = sqrt_tab[index];
   68|   357k|  if (*q & 1) {
  ------------------
  |  Branch (68:7): [True: 185k, False: 172k]
  ------------------
   69|   185k|    *q -= 1;
   70|   185k|    answer = ixheaac_mult32_shl(answer, INV_SQRT_2_Q31);
  ------------------
  |  |   24|   185k|#define INV_SQRT_2_Q31 (1518500250)
  ------------------
   71|   185k|  }
   72|   357k|  *q = *q >> 1;
   73|   357k|  *q += Q_SQRT_TAB;
  ------------------
  |  |   25|   357k|#define Q_SQRT_TAB (15)
  ------------------
   74|   357k|  return answer;
   75|   426k|}
ixheaacd_mps_reshape_bb_env.c:ixheaacd_mps_convert_to_qn:
  280|   452k|static WORD32 ixheaacd_mps_convert_to_qn(WORD32 temp, WORD16 qtemp, WORD16 n) {
  281|   452k|  WORD64 result;
  282|   452k|  if (qtemp == n)
  ------------------
  |  Branch (282:7): [True: 27, False: 452k]
  ------------------
  283|     27|    return temp;
  284|   452k|  else if (qtemp > n)
  ------------------
  |  Branch (284:12): [True: 428k, False: 23.3k]
  ------------------
  285|   428k|    temp = (WORD32)((WORD64)temp >> (qtemp - n));
  286|  23.3k|  else {
  287|  23.3k|    result = (WORD32)((WORD64)temp << (n - qtemp));
  288|  23.3k|    if (result > (WORD32)0x7fffffff || result < (WORD32)0x80000000) {
  ------------------
  |  Branch (288:9): [True: 0, False: 23.3k]
  |  Branch (288:40): [True: 0, False: 23.3k]
  ------------------
  289|      0|      return 0;
  290|      0|    } else
  291|  23.3k|      temp = (WORD32)result;
  292|  23.3k|  }
  293|   452k|  return temp;
  294|   452k|}
ixheaacd_mps_reshape_bb_env.c:ixheaacd_mps_mult32_shr_16:
  205|  26.1k|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_16(WORD32 a, WORD32 b) {
  206|  26.1k|  WORD32 result;
  207|  26.1k|  WORD64 temp_result;
  208|       |
  209|  26.1k|  temp_result = (WORD64)a * (WORD64)b;
  210|  26.1k|  result = (WORD32)(temp_result >> 16);
  211|  26.1k|  return (result);
  212|  26.1k|}
ixheaacd_mps_reshape_bb_env.c:ixheaacd_mps_mult32_shr_15:
  222|  2.59M|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_15(WORD32 a, WORD32 b) {
  223|  2.59M|  WORD32 result;
  224|  2.59M|  WORD64 temp_result;
  225|  2.59M|  temp_result = (WORD64)a * (WORD64)b;
  226|  2.59M|  result = (WORD32)ixheaac_sat64_32(temp_result >> 15);
  227|       |
  228|  2.59M|  return (result);
  229|  2.59M|}
ixheaacd_mps_temp_process.c:ixheaacd_mps_mult32:
  144|  55.8M|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32(WORD32 a, WORD32 b, WORD16 *q_a, WORD16 q_b) {
  145|  55.8M|  WORD64 temp_result;
  146|  55.8M|  WORD32 temp;
  147|       |
  148|  55.8M|  if (a == 0 || b == 0) {
  ------------------
  |  Branch (148:7): [True: 44.9M, False: 10.9M]
  |  Branch (148:17): [True: 24.6k, False: 10.9M]
  ------------------
  149|  44.9M|    temp_result = 0;
  150|  44.9M|    *q_a = 15;
  151|  44.9M|    return (WORD32)temp_result;
  152|  44.9M|  }
  153|       |
  154|  10.9M|  *q_a = *q_a + q_b;
  155|       |
  156|  10.9M|  temp_result = (WORD64)a * (WORD64)b;
  157|  10.9M|  temp = ixheaacd_mps_get_rshift_bits(temp_result);
  158|  10.9M|  if (0 != temp) {
  ------------------
  |  Branch (158:7): [True: 3.14M, False: 7.76M]
  ------------------
  159|  3.14M|    *q_a -= temp;
  160|  3.14M|    temp_result = temp_result >> temp;
  161|  3.14M|  }
  162|       |
  163|  10.9M|  return (WORD32)temp_result;
  164|  55.8M|}
ixheaacd_mps_temp_process.c:ixheaacd_mps_get_rshift_bits:
   34|  10.9M|static PLATFORM_INLINE WORD32 ixheaacd_mps_get_rshift_bits(WORD64 a) {
   35|  10.9M|  WORD32 temp_1, temp_2;
   36|  10.9M|  temp_1 = (WORD32)(a >> 32);
   37|  10.9M|  temp_2 = ixheaac_norm32(temp_1);
   38|  10.9M|  if (temp_2 < 31) {
  ------------------
  |  Branch (38:7): [True: 2.73M, False: 8.16M]
  ------------------
   39|  2.73M|    return (32 - temp_2);
   40|  8.16M|  } else {
   41|  8.16M|    temp_2 = (WORD32)(a);
   42|  8.16M|    if ((temp_1 ^ temp_2) < 0) {
  ------------------
  |  Branch (42:9): [True: 404k, False: 7.76M]
  ------------------
   43|   404k|      return 1;
   44|  7.76M|    } else {
   45|  7.76M|      return 0;
   46|  7.76M|    }
   47|  8.16M|  }
   48|  10.9M|}
ixheaacd_mps_temp_process.c:ixheaacd_mps_add32:
  108|  44.7M|static PLATFORM_INLINE WORD32 ixheaacd_mps_add32(WORD32 a, WORD32 b, WORD16 *q_a, WORD16 q_b) {
  109|  44.7M|  WORD64 temp_result;
  110|       |
  111|  44.7M|  if (a == 0 || b == 0) {
  ------------------
  |  Branch (111:7): [True: 33.1M, False: 11.6M]
  |  Branch (111:17): [True: 256k, False: 11.4M]
  ------------------
  112|  33.3M|    if (b == 0) {
  ------------------
  |  Branch (112:9): [True: 32.4M, False: 914k]
  ------------------
  113|  32.4M|      return a;
  114|  32.4M|    } else {
  115|   914k|      *q_a = q_b;
  116|   914k|      return b;
  117|   914k|    }
  118|  33.3M|  }
  119|  11.4M|  if (*q_a > q_b) {
  ------------------
  |  Branch (119:7): [True: 741k, False: 10.6M]
  ------------------
  120|   741k|    if (((*q_a) - q_b) > 31) {
  ------------------
  |  Branch (120:9): [True: 2.52k, False: 739k]
  ------------------
  121|  2.52k|      a = 0;
  122|  2.52k|      *q_a = q_b;
  123|   739k|    } else {
  124|   739k|      a = (a >> ((*q_a) - q_b));
  125|   739k|      *q_a = q_b;
  126|   739k|    }
  127|  10.6M|  } else {
  128|  10.6M|    if ((q_b - (*q_a)) > 31) {
  ------------------
  |  Branch (128:9): [True: 1.98k, False: 10.6M]
  ------------------
  129|  1.98k|      b = 0;
  130|  10.6M|    } else {
  131|  10.6M|      b = (b >> (q_b - (*q_a)));
  132|  10.6M|      q_b = *q_a;
  133|  10.6M|    }
  134|  10.6M|  }
  135|  11.4M|  temp_result = (WORD64)a + (WORD64)b;
  136|  11.4M|  if (temp_result > (WORD32)0x7fffffff || temp_result < (WORD32)0x80000000) {
  ------------------
  |  Branch (136:7): [True: 1.10M, False: 10.3M]
  |  Branch (136:43): [True: 0, False: 10.3M]
  ------------------
  137|  1.10M|    temp_result = temp_result >> 1;
  138|  1.10M|    *q_a -= 1;
  139|  1.10M|  }
  140|       |
  141|  11.4M|  return (WORD32)temp_result;
  142|  44.7M|}
ixheaacd_mps_temp_process.c:ixheaacd_mps_mult32_shr_15:
  222|  7.81M|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_15(WORD32 a, WORD32 b) {
  223|  7.81M|  WORD32 result;
  224|  7.81M|  WORD64 temp_result;
  225|  7.81M|  temp_result = (WORD64)a * (WORD64)b;
  226|  7.81M|  result = (WORD32)ixheaac_sat64_32(temp_result >> 15);
  227|       |
  228|  7.81M|  return (result);
  229|  7.81M|}
ixheaacd_mps_temp_process.c:ixheaacd_mps_div_32:
  242|  1.02M|static PLATFORM_INLINE WORD32 ixheaacd_mps_div_32(WORD32 a, WORD32 b, WORD16 *q_format) {
  243|  1.02M|  WORD32 quotient;
  244|  1.02M|  UWORD32 mantissa_nr, mantissa_dr;
  245|  1.02M|  LOOPINDEX i;
  246|  1.02M|  WORD q_nr, q_dr;
  247|       |
  248|  1.02M|  quotient = 0;
  249|       |
  250|  1.02M|  if (0 == b) {
  ------------------
  |  Branch (250:7): [True: 0, False: 1.02M]
  ------------------
  251|      0|    *q_format = 0;
  252|      0|    return (a);
  253|      0|  }
  254|       |
  255|  1.02M|  quotient = 0;
  256|       |
  257|  1.02M|  q_nr = ixheaac_norm32(a);
  258|  1.02M|  mantissa_nr = (UWORD32)a << (q_nr);
  259|  1.02M|  q_dr = ixheaac_norm32(b);
  260|  1.02M|  mantissa_dr = (UWORD32)b << (q_dr);
  261|  1.02M|  *q_format = (WORD)(30 + q_nr - q_dr);
  262|       |
  263|  32.8M|  for (i = 0; i < 31; i++) {
  ------------------
  |  Branch (263:15): [True: 31.7M, False: 1.02M]
  ------------------
  264|  31.7M|    quotient <<= 1;
  265|       |
  266|  31.7M|    if (mantissa_nr >= mantissa_dr) {
  ------------------
  |  Branch (266:9): [True: 5.04M, False: 26.7M]
  ------------------
  267|  5.04M|      mantissa_nr -= mantissa_dr;
  268|  5.04M|      quotient += 1;
  269|  5.04M|    }
  270|  31.7M|    mantissa_nr <<= 1;
  271|  31.7M|  }
  272|       |
  273|  1.02M|  if ((a ^ b) < 0) {
  ------------------
  |  Branch (273:7): [True: 0, False: 1.02M]
  ------------------
  274|      0|    return -(quotient);
  275|      0|  }
  276|       |
  277|  1.02M|  return quotient;
  278|  1.02M|}
ixheaacd_mps_temp_process.c:ixheaacd_mps_sqrt:
   57|   688k|static PLATFORM_INLINE WORD32 ixheaacd_mps_sqrt(WORD32 num, WORD16 *q, const WORD32 *sqrt_tab) {
   58|   688k|  WORD32 index, answer, temp;
   59|   688k|  WORD k;
   60|       |
   61|   688k|  if (num == 0) return 0;
  ------------------
  |  Branch (61:7): [True: 138k, False: 549k]
  ------------------
   62|       |
   63|   549k|  k = ixheaac_norm32(num);
   64|   549k|  temp = ixheaac_shr32(ixheaac_shl32(num, k), 21);
   65|   549k|  *q += k;
   66|   549k|  index = temp & 0x1FF;
   67|   549k|  answer = sqrt_tab[index];
   68|   549k|  if (*q & 1) {
  ------------------
  |  Branch (68:7): [True: 270k, False: 279k]
  ------------------
   69|   270k|    *q -= 1;
   70|   270k|    answer = ixheaac_mult32_shl(answer, INV_SQRT_2_Q31);
  ------------------
  |  |   24|   270k|#define INV_SQRT_2_Q31 (1518500250)
  ------------------
   71|   270k|  }
   72|   549k|  *q = *q >> 1;
   73|   549k|  *q += Q_SQRT_TAB;
  ------------------
  |  |   25|   549k|#define Q_SQRT_TAB (15)
  ------------------
   74|   549k|  return answer;
   75|   688k|}
ixheaacd_mps_temp_process.c:ixheaacd_mps_convert_to_qn:
  280|   696k|static WORD32 ixheaacd_mps_convert_to_qn(WORD32 temp, WORD16 qtemp, WORD16 n) {
  281|   696k|  WORD64 result;
  282|   696k|  if (qtemp == n)
  ------------------
  |  Branch (282:7): [True: 622k, False: 73.7k]
  ------------------
  283|   622k|    return temp;
  284|  73.7k|  else if (qtemp > n)
  ------------------
  |  Branch (284:12): [True: 0, False: 73.7k]
  ------------------
  285|      0|    temp = (WORD32)((WORD64)temp >> (qtemp - n));
  286|  73.7k|  else {
  287|  73.7k|    result = (WORD32)((WORD64)temp << (n - qtemp));
  288|  73.7k|    if (result > (WORD32)0x7fffffff || result < (WORD32)0x80000000) {
  ------------------
  |  Branch (288:9): [True: 0, False: 73.7k]
  |  Branch (288:40): [True: 0, False: 73.7k]
  ------------------
  289|      0|      return 0;
  290|      0|    } else
  291|  73.7k|      temp = (WORD32)result;
  292|  73.7k|  }
  293|  73.7k|  return temp;
  294|   696k|}
ixheaacd_mps_temp_process.c:ixheaacd_mps_mult32_shr_30:
  195|   155k|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_30(WORD32 a, WORD32 b) {
  196|   155k|  WORD32 result;
  197|   155k|  WORD64 temp_result;
  198|       |
  199|   155k|  temp_result = (WORD64)a * (WORD64)b;
  200|   155k|  result = (WORD32)(temp_result >> 30);
  201|       |
  202|   155k|  return (result);
  203|   155k|}
ixheaacd_mps_apply_m1.c:ixheaacd_mps_mult32_shr_15:
  222|   612M|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_15(WORD32 a, WORD32 b) {
  223|   612M|  WORD32 result;
  224|   612M|  WORD64 temp_result;
  225|   612M|  temp_result = (WORD64)a * (WORD64)b;
  226|   612M|  result = (WORD32)ixheaac_sat64_32(temp_result >> 15);
  227|       |
  228|   612M|  return (result);
  229|   612M|}
ixheaacd_mps_apply_m2.c:ixheaacd_mps_mult32_shr_15:
  222|   521M|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_15(WORD32 a, WORD32 b) {
  223|   521M|  WORD32 result;
  224|   521M|  WORD64 temp_result;
  225|   521M|  temp_result = (WORD64)a * (WORD64)b;
  226|   521M|  result = (WORD32)ixheaac_sat64_32(temp_result >> 15);
  227|       |
  228|   521M|  return (result);
  229|   521M|}
ixheaacd_mps_calc_m1m2_tree_515x.c:ixheaacd_mps_mult32_shr_15:
  222|   682k|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_15(WORD32 a, WORD32 b) {
  223|   682k|  WORD32 result;
  224|   682k|  WORD64 temp_result;
  225|   682k|  temp_result = (WORD64)a * (WORD64)b;
  226|   682k|  result = (WORD32)ixheaac_sat64_32(temp_result >> 15);
  227|       |
  228|   682k|  return (result);
  229|   682k|}
ixheaacd_mps_calc_m1m2_tree_52xx.c:ixheaacd_mps_mult32_shr_15:
  222|   129k|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_15(WORD32 a, WORD32 b) {
  223|   129k|  WORD32 result;
  224|   129k|  WORD64 temp_result;
  225|   129k|  temp_result = (WORD64)a * (WORD64)b;
  226|   129k|  result = (WORD32)ixheaac_sat64_32(temp_result >> 15);
  227|       |
  228|   129k|  return (result);
  229|   129k|}
ixheaacd_mps_calc_m1m2_tree_52xx.c:ixheaacd_mps_mult32_shr_30:
  195|  13.4k|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_30(WORD32 a, WORD32 b) {
  196|  13.4k|  WORD32 result;
  197|  13.4k|  WORD64 temp_result;
  198|       |
  199|  13.4k|  temp_result = (WORD64)a * (WORD64)b;
  200|  13.4k|  result = (WORD32)(temp_result >> 30);
  201|       |
  202|  13.4k|  return (result);
  203|  13.4k|}
ixheaacd_mps_calc_m1m2_tree_727x.c:ixheaacd_mps_mult32_shr_15:
  222|   795k|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_15(WORD32 a, WORD32 b) {
  223|   795k|  WORD32 result;
  224|   795k|  WORD64 temp_result;
  225|   795k|  temp_result = (WORD64)a * (WORD64)b;
  226|   795k|  result = (WORD32)ixheaac_sat64_32(temp_result >> 15);
  227|       |
  228|   795k|  return (result);
  229|   795k|}
ixheaacd_mps_calc_m1m2_tree_727x.c:ixheaacd_mps_mult32_shr_30:
  195|  10.2k|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_30(WORD32 a, WORD32 b) {
  196|  10.2k|  WORD32 result;
  197|  10.2k|  WORD64 temp_result;
  198|       |
  199|  10.2k|  temp_result = (WORD64)a * (WORD64)b;
  200|  10.2k|  result = (WORD32)(temp_result >> 30);
  201|       |
  202|  10.2k|  return (result);
  203|  10.2k|}
ixheaacd_mps_calc_m1m2_common.c:ixheaacd_mps_mult32:
  144|  2.78k|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32(WORD32 a, WORD32 b, WORD16 *q_a, WORD16 q_b) {
  145|  2.78k|  WORD64 temp_result;
  146|  2.78k|  WORD32 temp;
  147|       |
  148|  2.78k|  if (a == 0 || b == 0) {
  ------------------
  |  Branch (148:7): [True: 0, False: 2.78k]
  |  Branch (148:17): [True: 1.80k, False: 979]
  ------------------
  149|  1.80k|    temp_result = 0;
  150|  1.80k|    *q_a = 15;
  151|  1.80k|    return (WORD32)temp_result;
  152|  1.80k|  }
  153|       |
  154|    979|  *q_a = *q_a + q_b;
  155|       |
  156|    979|  temp_result = (WORD64)a * (WORD64)b;
  157|    979|  temp = ixheaacd_mps_get_rshift_bits(temp_result);
  158|    979|  if (0 != temp) {
  ------------------
  |  Branch (158:7): [True: 0, False: 979]
  ------------------
  159|      0|    *q_a -= temp;
  160|      0|    temp_result = temp_result >> temp;
  161|      0|  }
  162|       |
  163|    979|  return (WORD32)temp_result;
  164|  2.78k|}
ixheaacd_mps_calc_m1m2_common.c:ixheaacd_mps_get_rshift_bits:
   34|    979|static PLATFORM_INLINE WORD32 ixheaacd_mps_get_rshift_bits(WORD64 a) {
   35|    979|  WORD32 temp_1, temp_2;
   36|    979|  temp_1 = (WORD32)(a >> 32);
   37|    979|  temp_2 = ixheaac_norm32(temp_1);
   38|    979|  if (temp_2 < 31) {
  ------------------
  |  Branch (38:7): [True: 0, False: 979]
  ------------------
   39|      0|    return (32 - temp_2);
   40|    979|  } else {
   41|    979|    temp_2 = (WORD32)(a);
   42|    979|    if ((temp_1 ^ temp_2) < 0) {
  ------------------
  |  Branch (42:9): [True: 0, False: 979]
  ------------------
   43|      0|      return 1;
   44|    979|    } else {
   45|    979|      return 0;
   46|    979|    }
   47|    979|  }
   48|    979|}
ixheaacd_mps_calc_m1m2_common.c:ixheaacd_mps_convert_to_qn:
  280|   668k|static WORD32 ixheaacd_mps_convert_to_qn(WORD32 temp, WORD16 qtemp, WORD16 n) {
  281|   668k|  WORD64 result;
  282|   668k|  if (qtemp == n)
  ------------------
  |  Branch (282:7): [True: 3.44k, False: 665k]
  ------------------
  283|  3.44k|    return temp;
  284|   665k|  else if (qtemp > n)
  ------------------
  |  Branch (284:12): [True: 596k, False: 68.9k]
  ------------------
  285|   596k|    temp = (WORD32)((WORD64)temp >> (qtemp - n));
  286|  68.9k|  else {
  287|  68.9k|    result = (WORD32)((WORD64)temp << (n - qtemp));
  288|  68.9k|    if (result > (WORD32)0x7fffffff || result < (WORD32)0x80000000) {
  ------------------
  |  Branch (288:9): [True: 0, False: 68.9k]
  |  Branch (288:40): [True: 0, False: 68.9k]
  ------------------
  289|      0|      return 0;
  290|      0|    } else
  291|  68.9k|      temp = (WORD32)result;
  292|  68.9k|  }
  293|   665k|  return temp;
  294|   668k|}
ixheaacd_mps_calc_m1m2_common.c:ixheaacd_mps_add32:
  108|  1.46k|static PLATFORM_INLINE WORD32 ixheaacd_mps_add32(WORD32 a, WORD32 b, WORD16 *q_a, WORD16 q_b) {
  109|  1.46k|  WORD64 temp_result;
  110|       |
  111|  1.46k|  if (a == 0 || b == 0) {
  ------------------
  |  Branch (111:7): [True: 910, False: 554]
  |  Branch (111:17): [True: 0, False: 554]
  ------------------
  112|    910|    if (b == 0) {
  ------------------
  |  Branch (112:9): [True: 0, False: 910]
  ------------------
  113|      0|      return a;
  114|    910|    } else {
  115|    910|      *q_a = q_b;
  116|    910|      return b;
  117|    910|    }
  118|    910|  }
  119|    554|  if (*q_a > q_b) {
  ------------------
  |  Branch (119:7): [True: 0, False: 554]
  ------------------
  120|      0|    if (((*q_a) - q_b) > 31) {
  ------------------
  |  Branch (120:9): [True: 0, False: 0]
  ------------------
  121|      0|      a = 0;
  122|      0|      *q_a = q_b;
  123|      0|    } else {
  124|      0|      a = (a >> ((*q_a) - q_b));
  125|      0|      *q_a = q_b;
  126|      0|    }
  127|    554|  } else {
  128|    554|    if ((q_b - (*q_a)) > 31) {
  ------------------
  |  Branch (128:9): [True: 0, False: 554]
  ------------------
  129|      0|      b = 0;
  130|    554|    } else {
  131|    554|      b = (b >> (q_b - (*q_a)));
  132|    554|      q_b = *q_a;
  133|    554|    }
  134|    554|  }
  135|    554|  temp_result = (WORD64)a + (WORD64)b;
  136|    554|  if (temp_result > (WORD32)0x7fffffff || temp_result < (WORD32)0x80000000) {
  ------------------
  |  Branch (136:7): [True: 0, False: 554]
  |  Branch (136:43): [True: 0, False: 554]
  ------------------
  137|      0|    temp_result = temp_result >> 1;
  138|      0|    *q_a -= 1;
  139|      0|  }
  140|       |
  141|    554|  return (WORD32)temp_result;
  142|  1.46k|}
ixheaacd_mps_calc_m1m2_common.c:ixheaacd_mps_div_32:
  242|   673k|static PLATFORM_INLINE WORD32 ixheaacd_mps_div_32(WORD32 a, WORD32 b, WORD16 *q_format) {
  243|   673k|  WORD32 quotient;
  244|   673k|  UWORD32 mantissa_nr, mantissa_dr;
  245|   673k|  LOOPINDEX i;
  246|   673k|  WORD q_nr, q_dr;
  247|       |
  248|   673k|  quotient = 0;
  249|       |
  250|   673k|  if (0 == b) {
  ------------------
  |  Branch (250:7): [True: 70.6k, False: 602k]
  ------------------
  251|  70.6k|    *q_format = 0;
  252|  70.6k|    return (a);
  253|  70.6k|  }
  254|       |
  255|   602k|  quotient = 0;
  256|       |
  257|   602k|  q_nr = ixheaac_norm32(a);
  258|   602k|  mantissa_nr = (UWORD32)a << (q_nr);
  259|   602k|  q_dr = ixheaac_norm32(b);
  260|   602k|  mantissa_dr = (UWORD32)b << (q_dr);
  261|   602k|  *q_format = (WORD)(30 + q_nr - q_dr);
  262|       |
  263|  19.2M|  for (i = 0; i < 31; i++) {
  ------------------
  |  Branch (263:15): [True: 18.6M, False: 602k]
  ------------------
  264|  18.6M|    quotient <<= 1;
  265|       |
  266|  18.6M|    if (mantissa_nr >= mantissa_dr) {
  ------------------
  |  Branch (266:9): [True: 6.38M, False: 12.2M]
  ------------------
  267|  6.38M|      mantissa_nr -= mantissa_dr;
  268|  6.38M|      quotient += 1;
  269|  6.38M|    }
  270|  18.6M|    mantissa_nr <<= 1;
  271|  18.6M|  }
  272|       |
  273|   602k|  if ((a ^ b) < 0) {
  ------------------
  |  Branch (273:7): [True: 224, False: 602k]
  ------------------
  274|    224|    return -(quotient);
  275|    224|  }
  276|       |
  277|   602k|  return quotient;
  278|   602k|}
ixheaacd_mps_calc_m1m2_common.c:ixheaacd_mps_sqrt:
   57|   452k|static PLATFORM_INLINE WORD32 ixheaacd_mps_sqrt(WORD32 num, WORD16 *q, const WORD32 *sqrt_tab) {
   58|   452k|  WORD32 index, answer, temp;
   59|   452k|  WORD k;
   60|       |
   61|   452k|  if (num == 0) return 0;
  ------------------
  |  Branch (61:7): [True: 28.6k, False: 423k]
  ------------------
   62|       |
   63|   423k|  k = ixheaac_norm32(num);
   64|   423k|  temp = ixheaac_shr32(ixheaac_shl32(num, k), 21);
   65|   423k|  *q += k;
   66|   423k|  index = temp & 0x1FF;
   67|   423k|  answer = sqrt_tab[index];
   68|   423k|  if (*q & 1) {
  ------------------
  |  Branch (68:7): [True: 168k, False: 255k]
  ------------------
   69|   168k|    *q -= 1;
   70|   168k|    answer = ixheaac_mult32_shl(answer, INV_SQRT_2_Q31);
  ------------------
  |  |   24|   168k|#define INV_SQRT_2_Q31 (1518500250)
  ------------------
   71|   168k|  }
   72|   423k|  *q = *q >> 1;
   73|   423k|  *q += Q_SQRT_TAB;
  ------------------
  |  |   25|   423k|#define Q_SQRT_TAB (15)
  ------------------
   74|   423k|  return answer;
   75|   452k|}
ixheaacd_mps_calc_m1m2_common.c:ixheaacd_mps_mult32_shr_15:
  222|  4.54M|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_15(WORD32 a, WORD32 b) {
  223|  4.54M|  WORD32 result;
  224|  4.54M|  WORD64 temp_result;
  225|  4.54M|  temp_result = (WORD64)a * (WORD64)b;
  226|  4.54M|  result = (WORD32)ixheaac_sat64_32(temp_result >> 15);
  227|       |
  228|  4.54M|  return (result);
  229|  4.54M|}
ixheaacd_mps_calc_m1m2_common.c:ixheaacd_mps_div32_in_q15:
  296|   212k|static PLATFORM_INLINE WORD32 ixheaacd_mps_div32_in_q15(WORD32 num, WORD32 den) {
  297|   212k|  WORD32 quotient;
  298|   212k|  WORD16 q_quotient;
  299|       |
  300|   212k|  quotient = ixheaacd_mps_div_32(num, den, &q_quotient);
  301|   212k|  quotient = ixheaacd_mps_convert_to_qn(quotient, q_quotient, 15);
  302|   212k|  return quotient;
  303|   212k|}
ixheaacd_mps_calc_m1m2_common.c:ixheaacd_mps_mult32_shr_n:
  185|   176k|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_n(WORD32 a, WORD32 b, WORD16 n) {
  186|   176k|  WORD32 result;
  187|   176k|  WORD64 temp_result;
  188|       |
  189|   176k|  temp_result = (WORD64)a * (WORD64)b;
  190|   176k|  result = (WORD32)(temp_result >> n);
  191|       |
  192|   176k|  return (result);
  193|   176k|}
ixheaacd_mps_calc_m1m2_common.c:ixheaacd_mps_mult32_shr_30:
  195|  61.8k|static PLATFORM_INLINE WORD32 ixheaacd_mps_mult32_shr_30(WORD32 a, WORD32 b) {
  196|  61.8k|  WORD32 result;
  197|  61.8k|  WORD64 temp_result;
  198|       |
  199|  61.8k|  temp_result = (WORD64)a * (WORD64)b;
  200|  61.8k|  result = (WORD32)(temp_result >> 30);
  201|       |
  202|  61.8k|  return (result);
  203|  61.8k|}

ixheaacd_validate_res_frames_per_spatial_frame:
   60|    953|FLAG ixheaacd_validate_res_frames_per_spatial_frame(WORD32 num_slots, WORD32 val) {
   61|    953|  switch (num_slots) {
   62|     18|    case 15:
  ------------------
  |  Branch (62:5): [True: 18, False: 935]
  ------------------
   63|    488|    case 16:
  ------------------
  |  Branch (63:5): [True: 470, False: 483]
  ------------------
   64|    507|    case 18:
  ------------------
  |  Branch (64:5): [True: 19, False: 934]
  ------------------
   65|    629|    case 24:
  ------------------
  |  Branch (65:5): [True: 122, False: 831]
  ------------------
   66|    661|    case 30:
  ------------------
  |  Branch (66:5): [True: 32, False: 921]
  ------------------
   67|    661|      return val == 0;
   68|    207|    case 32:
  ------------------
  |  Branch (68:5): [True: 207, False: 746]
  ------------------
   69|    207|      return val == 0 || val == 1;
  ------------------
  |  Branch (69:14): [True: 197, False: 10]
  |  Branch (69:26): [True: 9, False: 1]
  ------------------
   70|     43|    case 36:
  ------------------
  |  Branch (70:5): [True: 43, False: 910]
  ------------------
   71|     57|    case 48:
  ------------------
  |  Branch (71:5): [True: 14, False: 939]
  ------------------
   72|     74|    case 60:
  ------------------
  |  Branch (72:5): [True: 17, False: 936]
  ------------------
   73|     74|      return val == 1;
   74|      4|    case 64:
  ------------------
  |  Branch (74:5): [True: 4, False: 949]
  ------------------
   75|      4|      return val == 1 || val == 3;
  ------------------
  |  Branch (75:14): [True: 3, False: 1]
  |  Branch (75:26): [True: 0, False: 1]
  ------------------
   76|      3|    case 72:
  ------------------
  |  Branch (76:5): [True: 3, False: 950]
  ------------------
   77|      3|      return val == 2;
   78|      4|    default:
  ------------------
  |  Branch (78:5): [True: 4, False: 949]
  ------------------
   79|      4|      return 0;
   80|    953|  }
   81|    953|}
ixheaacd_parse_specific_config:
  249|  3.32k|                                            WORD32 sac_header_len) {
  250|  3.32k|  IA_ERRORCODE err_code = IA_NO_ERROR;
  ------------------
  |  |   23|  3.32k|#define IA_NO_ERROR 0x00000000
  ------------------
  251|  3.32k|  ia_mps_spatial_bs_config_struct *config = &(pstr_mps_state->bs_config);
  252|  3.32k|  ia_heaac_mps_state_struct *curr_state = pstr_mps_state;
  253|  3.32k|  const ia_mps_dec_tree_properties_struct *p_tree_property_table =
  254|  3.32k|      pstr_mps_state->ia_mps_dec_mps_table.bitdec_table_ptr->tree_property_table;
  255|  3.32k|  ia_bit_buf_struct *mps_bit_buf = pstr_mps_state->ptr_mps_bit_buff;
  256|       |
  257|  3.32k|  WORD32 i, hc, hb, num_header_bits, ott_mode_lfe[MAX_NUM_OTT];
  258|       |
  259|  3.32k|  WORD32 tmp = (WORD32)(((mps_bit_buf->ptr_read_next - mps_bit_buf->ptr_bit_buf_base + 1) << 3) -
  260|  3.32k|                        (mps_bit_buf->bit_pos + 1));
  261|  3.32k|  WORD32 bits_available = (sac_header_len << 3);
  262|  3.32k|  WORD32 temp, alignment_bits = 0;
  263|       |
  264|  3.32k|  config->bs_sampling_freq_index = ixheaacd_read_bits_buf(mps_bit_buf, 4);
  265|  3.32k|  if (config->bs_sampling_freq_index == 15) {
  ------------------
  |  Branch (265:7): [True: 19, False: 3.31k]
  ------------------
  266|     19|    config->bs_sampling_frequency = ixheaacd_read_bits_buf(mps_bit_buf, 24);
  267|     19|  }
  268|  3.32k|  temp = ixheaacd_read_bits_buf(mps_bit_buf, 14);
  269|  3.32k|  config->bs_frame_length = (temp >> 7) & SEVEN_BIT_MASK;
  ------------------
  |  |  210|  3.32k|#define SEVEN_BIT_MASK (0x0000007F)
  ------------------
  270|  3.32k|  if (config->bs_frame_length >= (MAX_QMF_BUF_LEN - 1)) {
  ------------------
  |  |  137|  3.32k|#define MAX_QMF_BUF_LEN 78
  ------------------
  |  Branch (270:7): [True: 1, False: 3.32k]
  ------------------
  271|      1|    return IA_FATAL_ERROR;
  ------------------
  |  |   25|      1|#define IA_FATAL_ERROR 0x80000000
  ------------------
  272|      1|  }
  273|  3.32k|  config->bs_freq_res = (temp >> 4) & THREE_BIT_MASK;
  ------------------
  |  |  206|  3.32k|#define THREE_BIT_MASK (0x00000007)
  ------------------
  274|  3.32k|  if (config->bs_freq_res == 0) {
  ------------------
  |  Branch (274:7): [True: 1, False: 3.32k]
  ------------------
  275|      1|    return IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_PARAMETER_BANDS;
  ------------------
  |  |  137|      1|#define IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_PARAMETER_BANDS 0xFFFF9812
  ------------------
  276|      1|  }
  277|  3.32k|  config->bs_tree_config = (temp)&FOUR_BIT_MASK;
  ------------------
  |  |  207|  3.32k|#define FOUR_BIT_MASK (0x0000000F)
  ------------------
  278|       |
  279|  3.32k|  if (config->bs_tree_config >= 7) {
  ------------------
  |  Branch (279:7): [True: 1, False: 3.32k]
  ------------------
  280|      1|    return IA_FATAL_ERROR;
  ------------------
  |  |   25|      1|#define IA_FATAL_ERROR 0x80000000
  ------------------
  281|      1|  }
  282|       |
  283|  3.32k|  if (config->bs_tree_config != 15) {
  ------------------
  |  Branch (283:7): [True: 3.32k, False: 3]
  ------------------
  284|  3.32k|    curr_state->num_ott_boxes = p_tree_property_table[config->bs_tree_config].num_ott_boxes;
  285|  3.32k|    curr_state->num_ttt_boxes = p_tree_property_table[config->bs_tree_config].num_ttt_boxes;
  286|  3.32k|    curr_state->num_input_channels =
  287|  3.32k|        p_tree_property_table[config->bs_tree_config].num_input_channels;
  288|  3.32k|    curr_state->num_output_channels =
  289|  3.32k|        p_tree_property_table[config->bs_tree_config].num_output_channels;
  290|  19.9k|    for (i = 0; i < MAX_NUM_OTT; i++) {
  ------------------
  |  |   56|  19.9k|#define MAX_NUM_OTT (5)
  ------------------
  |  Branch (290:17): [True: 16.6k, False: 3.32k]
  ------------------
  291|  16.6k|      ott_mode_lfe[i] = p_tree_property_table[config->bs_tree_config].ott_mode_lfe[i];
  292|  16.6k|    }
  293|  3.32k|  }
  294|  3.32k|  temp = ixheaacd_read_bits_buf(mps_bit_buf, 19);
  295|  3.32k|  config->bs_quant_mode = (temp >> 17) & TWO_BIT_MASK;
  ------------------
  |  |  205|  3.32k|#define TWO_BIT_MASK (0x00000003)
  ------------------
  296|  3.32k|  config->bs_one_icc = (temp >> 16) & ONE_BIT_MASK;
  ------------------
  |  |  204|  3.32k|#define ONE_BIT_MASK (0x00000001)
  ------------------
  297|  3.32k|  config->bs_arbitrary_downmix = (temp >> 15) & ONE_BIT_MASK;
  ------------------
  |  |  204|  3.32k|#define ONE_BIT_MASK (0x00000001)
  ------------------
  298|  3.32k|  config->bs_fixed_gain_sur = (temp >> 12) & THREE_BIT_MASK;
  ------------------
  |  |  206|  3.32k|#define THREE_BIT_MASK (0x00000007)
  ------------------
  299|  3.32k|  if (config->bs_fixed_gain_sur >= 5) {
  ------------------
  |  Branch (299:7): [True: 1, False: 3.32k]
  ------------------
  300|      1|    return IA_FATAL_ERROR;
  ------------------
  |  |   25|      1|#define IA_FATAL_ERROR 0x80000000
  ------------------
  301|      1|  }
  302|  3.32k|  config->bs_fixed_gain_lfe = (temp >> 9) & THREE_BIT_MASK;
  ------------------
  |  |  206|  3.32k|#define THREE_BIT_MASK (0x00000007)
  ------------------
  303|       |
  304|  3.32k|  if (config->bs_fixed_gain_lfe >= 5) return IA_FATAL_ERROR;
  ------------------
  |  |   25|      1|#define IA_FATAL_ERROR 0x80000000
  ------------------
  |  Branch (304:7): [True: 1, False: 3.32k]
  ------------------
  305|  3.32k|  config->bs_fixed_gain_dmx = (temp >> 6) & THREE_BIT_MASK;
  ------------------
  |  |  206|  3.32k|#define THREE_BIT_MASK (0x00000007)
  ------------------
  306|  3.32k|  config->bs_matrix_mode = (temp >> 5) & ONE_BIT_MASK;
  ------------------
  |  |  204|  3.32k|#define ONE_BIT_MASK (0x00000001)
  ------------------
  307|  3.32k|  config->bs_temp_shape_config = (temp >> 3) & TWO_BIT_MASK;
  ------------------
  |  |  205|  3.32k|#define TWO_BIT_MASK (0x00000003)
  ------------------
  308|  3.32k|  if (config->bs_temp_shape_config == 3)
  ------------------
  |  Branch (308:7): [True: 0, False: 3.32k]
  ------------------
  309|      0|    return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
  310|       |
  311|  3.32k|  config->bs_decorr_config = (temp >> 1) & TWO_BIT_MASK;
  ------------------
  |  |  205|  3.32k|#define TWO_BIT_MASK (0x00000003)
  ------------------
  312|  3.32k|  config->bs_3d_audio_mode = (temp)&ONE_BIT_MASK;
  ------------------
  |  |  204|  3.32k|#define ONE_BIT_MASK (0x00000001)
  ------------------
  313|       |
  314|  14.7k|  for (i = 0; i < curr_state->num_ott_boxes; i++) {
  ------------------
  |  Branch (314:15): [True: 11.4k, False: 3.32k]
  ------------------
  315|  11.4k|    if (ott_mode_lfe[i]) {
  ------------------
  |  Branch (315:9): [True: 2.21k, False: 9.19k]
  ------------------
  316|  2.21k|      config->bs_ott_bands[i] = ixheaacd_read_bits_buf(mps_bit_buf, 5);
  317|  2.21k|      if (config->bs_ott_bands[i] > MAX_PARAMETER_BANDS) return IA_FATAL_ERROR;
  ------------------
  |  |   55|  2.21k|#define MAX_PARAMETER_BANDS (28)
  ------------------
                    if (config->bs_ott_bands[i] > MAX_PARAMETER_BANDS) return IA_FATAL_ERROR;
  ------------------
  |  |   25|      1|#define IA_FATAL_ERROR 0x80000000
  ------------------
  |  Branch (317:11): [True: 1, False: 2.21k]
  ------------------
  318|  2.21k|    }
  319|  11.4k|  }
  320|       |
  321|  4.82k|  for (i = 0; i < curr_state->num_ttt_boxes; i++) {
  ------------------
  |  Branch (321:15): [True: 1.50k, False: 3.32k]
  ------------------
  322|  1.50k|    temp = ixheaacd_read_bits_buf(mps_bit_buf, 4);
  323|  1.50k|    config->bs_ttt_dual_mode[i] = (temp >> 3) & ONE_BIT_MASK;
  ------------------
  |  |  204|  1.50k|#define ONE_BIT_MASK (0x00000001)
  ------------------
  324|  1.50k|    config->bs_ttt_mode_low[i] = (temp)&THREE_BIT_MASK;
  ------------------
  |  |  206|  1.50k|#define THREE_BIT_MASK (0x00000007)
  ------------------
  325|  1.50k|    if (config->bs_ttt_dual_mode[i]) {
  ------------------
  |  Branch (325:9): [True: 1.09k, False: 405]
  ------------------
  326|  1.09k|      temp = ixheaacd_read_bits_buf(mps_bit_buf, 8);
  327|  1.09k|      config->bs_ttt_mode_high[i] = (temp >> 5) & THREE_BIT_MASK;
  ------------------
  |  |  206|  1.09k|#define THREE_BIT_MASK (0x00000007)
  ------------------
  328|  1.09k|      config->bs_ttt_bands_low[i] = (temp)&FIVE_BIT_MASK;
  ------------------
  |  |  208|  1.09k|#define FIVE_BIT_MASK (0x0000001F)
  ------------------
  329|  1.09k|      if (config->bs_ttt_bands_low[i] > MAX_PARAMETER_BANDS) return IA_FATAL_ERROR;
  ------------------
  |  |   55|  1.09k|#define MAX_PARAMETER_BANDS (28)
  ------------------
                    if (config->bs_ttt_bands_low[i] > MAX_PARAMETER_BANDS) return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
  |  Branch (329:11): [True: 0, False: 1.09k]
  ------------------
  330|  1.09k|    }
  331|  1.50k|  }
  332|       |
  333|  3.32k|  if (config->bs_temp_shape_config == 2) {
  ------------------
  |  Branch (333:7): [True: 1.07k, False: 2.25k]
  ------------------
  334|  1.07k|    config->bs_env_quant_mode = ixheaacd_read_bits_buf(mps_bit_buf, 1);
  335|  1.07k|  }
  336|       |
  337|  3.32k|  if (config->bs_3d_audio_mode) {
  ------------------
  |  Branch (337:7): [True: 29, False: 3.29k]
  ------------------
  338|     29|    config->bs_3d_audio_hrtf_set = ixheaacd_read_bits_buf(mps_bit_buf, 2);
  339|     29|    if (config->bs_3d_audio_hrtf_set == 0) {
  ------------------
  |  Branch (339:9): [True: 25, False: 4]
  ------------------
  340|     25|      temp = ixheaacd_read_bits_buf(mps_bit_buf, 4);
  341|     25|      config->bs_hrtf_freq_res = (temp >> 1) & THREE_BIT_MASK;
  ------------------
  |  |  206|     25|#define THREE_BIT_MASK (0x00000007)
  ------------------
  342|     25|      config->bs_hrtf_num_chan = 5;
  343|     25|      config->bs_hrtf_asymmetric = (temp)&ONE_BIT_MASK;
  ------------------
  |  |  204|     25|#define ONE_BIT_MASK (0x00000001)
  ------------------
  344|       |
  345|     25|      config->hrtf_num_band = pstr_mps_state->ia_mps_dec_mps_table.bitdec_table_ptr
  346|     25|                                  ->freq_res_table[config->bs_hrtf_freq_res];
  347|       |
  348|     92|      for (hc = 0; hc < config->bs_hrtf_num_chan; hc++) {
  ------------------
  |  Branch (348:20): [True: 67, False: 25]
  ------------------
  349|    730|        for (hb = 0; hb < config->hrtf_num_band; hb++) {
  ------------------
  |  Branch (349:22): [True: 663, False: 67]
  ------------------
  350|    663|          config->bs_hrtf_level_left[hc][hb] = ixheaacd_read_bits_buf(mps_bit_buf, 6);
  351|    663|        }
  352|    656|        for (hb = 0; hb < config->hrtf_num_band; hb++) {
  ------------------
  |  Branch (352:22): [True: 589, False: 67]
  ------------------
  353|    589|          config->bs_hrtf_level_right[hc][hb] = config->bs_hrtf_asymmetric
  ------------------
  |  Branch (353:49): [True: 20, False: 569]
  ------------------
  354|    589|                                                    ? ixheaacd_read_bits_buf(mps_bit_buf, 6)
  355|    589|                                                    : config->bs_hrtf_level_left[hc][hb];
  356|    589|        }
  357|     67|        config->bs_hrtf_phase[hc] = ixheaacd_read_bits_buf(mps_bit_buf, 1);
  358|    608|        for (hb = 0; hb < config->hrtf_num_band; hb++) {
  ------------------
  |  Branch (358:22): [True: 541, False: 67]
  ------------------
  359|    541|          config->bs_hrtf_phase_lr[hc][hb] =
  360|    541|              config->bs_hrtf_phase[hc] ? ixheaacd_read_bits_buf(mps_bit_buf, 6) : 0;
  ------------------
  |  Branch (360:15): [True: 141, False: 400]
  ------------------
  361|    541|        }
  362|     67|      }
  363|     25|    }
  364|     29|  }
  365|       |
  366|  3.32k|  ixheaacd_byte_align(mps_bit_buf, &alignment_bits);
  367|       |
  368|  3.32k|  num_header_bits =
  369|  3.32k|      (WORD32)(((mps_bit_buf->ptr_read_next - mps_bit_buf->ptr_bit_buf_base + 1) << 3) -
  370|  3.32k|               (mps_bit_buf->bit_pos + 1) - tmp);
  371|  3.32k|  bits_available -= num_header_bits;
  372|       |
  373|  3.32k|  err_code = ixheaacd_parse_extension_config(
  374|  3.32k|      config, curr_state->num_ott_boxes, curr_state->num_ttt_boxes,
  375|  3.32k|      curr_state->num_output_channels, bits_available, mps_bit_buf,
  376|  3.32k|      pstr_mps_state->ia_mps_dec_mps_table.bitdec_table_ptr);
  377|  3.32k|  if (err_code != IA_NO_ERROR) return err_code;
  ------------------
  |  |   23|  3.32k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (377:7): [True: 43, False: 3.28k]
  ------------------
  378|       |
  379|  3.28k|  return IA_NO_ERROR;
  ------------------
  |  |   23|  3.28k|#define IA_NO_ERROR 0x00000000
  ------------------
  380|  3.32k|}
ixheaacd_parse_frame:
 1056|  13.7k|IA_ERRORCODE ixheaacd_parse_frame(ia_heaac_mps_state_struct *pstr_mps_state) {
 1057|  13.7k|  ia_mps_spatial_bs_config_struct *p_bs_config = &pstr_mps_state->bs_config;
 1058|       |
 1059|  13.7k|  ia_mps_dec_auxilary_struct *p_aux_struct = pstr_mps_state->aux_struct;
 1060|  13.7k|  WORD32 i, bs_framing_type, prev_param_slot, data_bands, bs_temp_shape_enable,
 1061|  13.7k|      num_temp_shape_chan;
 1062|  13.7k|  WORD32 ttt_off, ps, pg, ts, pb, temp;
 1063|  13.7k|  WORD32 *bs_env_shape_data = pstr_mps_state->mps_scratch_mem_v;
 1064|  13.7k|  WORD32 const *reciprocal_tab = pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr->reciprocal;
 1065|  13.7k|  WORD32 num_parameter_sets;
 1066|       |
 1067|  13.7k|  ia_mps_dec_spatial_bs_frame_struct *frame = pstr_mps_state->bs_frame;
 1068|  13.7k|  ia_mps_dec_bitdec_tables_struct *bitdec_table =
 1069|  13.7k|      pstr_mps_state->ia_mps_dec_mps_table.bitdec_table_ptr;
 1070|  13.7k|  WORD32 bs_num_output_channels =
 1071|  13.7k|      bitdec_table->tree_property_table[pstr_mps_state->tree_config].num_output_channels;
 1072|       |
 1073|  13.7k|  WORD32 time_slots = pstr_mps_state->time_slots;
 1074|  13.7k|  WORD32 bitstream_parameter_bands = pstr_mps_state->bitstream_parameter_bands;
 1075|  13.7k|  WORD32 *b_ott_bands = pstr_mps_state->bitstream_ott_bands;
 1076|  13.7k|  WORD32 *param_slot = pstr_mps_state->aux_struct->param_slot;
 1077|       |
 1078|  13.7k|  WORD32 num_ott_boxes = pstr_mps_state->num_ott_boxes;
 1079|       |
 1080|  13.7k|  WORD32 reciprocal, alignment_bits = 0;
 1081|  13.7k|  ia_bit_buf_struct *mps_bit_buf = pstr_mps_state->ptr_mps_bit_buff;
 1082|  13.7k|  IA_ERRORCODE error_code = IA_NO_ERROR;
  ------------------
  |  |   23|  13.7k|#define IA_NO_ERROR 0x00000000
  ------------------
 1083|       |
 1084|  13.7k|  if (pstr_mps_state->parse_next_bitstream_frame == 0) return IA_NO_ERROR;
  ------------------
  |  |   23|      0|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (1084:7): [True: 0, False: 13.7k]
  ------------------
 1085|       |
 1086|  13.7k|  temp = ixheaacd_read_bits_buf(mps_bit_buf, 4);
 1087|  13.7k|  bs_framing_type = (temp >> 3) & ONE_BIT_MASK;
  ------------------
  |  |  204|  13.7k|#define ONE_BIT_MASK (0x00000001)
  ------------------
 1088|  13.7k|  num_parameter_sets = (temp & THREE_BIT_MASK) + 1;
  ------------------
  |  |  206|  13.7k|#define THREE_BIT_MASK (0x00000007)
  ------------------
 1089|  13.7k|  pstr_mps_state->num_parameter_sets = num_parameter_sets;
 1090|       |
 1091|  13.7k|  reciprocal = reciprocal_tab[num_parameter_sets - 1];
 1092|       |
 1093|  13.7k|  prev_param_slot = -1;
 1094|  36.3k|  for (i = 0; i < num_parameter_sets; i++) {
  ------------------
  |  Branch (1094:15): [True: 22.6k, False: 13.7k]
  ------------------
 1095|  22.6k|    if (bs_framing_type) {
  ------------------
  |  Branch (1095:9): [True: 7.20k, False: 15.3k]
  ------------------
 1096|  7.20k|      WORD32 bits_param_slot = 0;
 1097|  30.5k|      while ((1 << bits_param_slot) < (time_slots - num_parameter_sets + i - prev_param_slot))
  ------------------
  |  Branch (1097:14): [True: 23.3k, False: 7.20k]
  ------------------
 1098|  23.3k|        bits_param_slot++;
 1099|  7.20k|      param_slot[i] =
 1100|  7.20k|          bits_param_slot
  ------------------
  |  Branch (1100:11): [True: 5.26k, False: 1.94k]
  ------------------
 1101|  7.20k|              ? prev_param_slot + 1 + ixheaacd_read_bits_buf(mps_bit_buf, bits_param_slot)
 1102|  7.20k|              : prev_param_slot + 1;
 1103|  7.20k|      prev_param_slot = param_slot[i];
 1104|  15.3k|    } else {
 1105|  15.3k|      WORD64 temp = (WORD64)(
 1106|  15.3k|          ((WORD64)((time_slots * (i + 1)) + num_parameter_sets - 1) * (WORD64)reciprocal) >> 28);
 1107|  15.3k|      param_slot[i] = (WORD32)(temp - 1);
 1108|  15.3k|    }
 1109|  22.6k|  }
 1110|  13.7k|  frame->bs_independency_flag = ixheaacd_read_bits_buf(mps_bit_buf, 1);
 1111|       |
 1112|  49.0k|  for (i = 0; i < num_ott_boxes; i++) {
  ------------------
  |  Branch (1112:15): [True: 35.3k, False: 13.7k]
  ------------------
 1113|  35.3k|    error_code =
 1114|  35.3k|        ixheaacd_ec_data_dec(pstr_mps_state, &frame->cld_lossless_data, frame->cmp_ott_cld_idx,
 1115|  35.3k|                             frame->cmp_ott_cld_idx_prev, CLD, i, i, 0, b_ott_bands[i]);
  ------------------
  |  |   23|  35.3k|#define CLD (0)
  ------------------
 1116|  35.3k|    if (error_code != IA_NO_ERROR) return error_code;
  ------------------
  |  |   23|  35.3k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (1116:9): [True: 15, False: 35.2k]
  ------------------
 1117|  35.3k|  }
 1118|  13.7k|  if (pstr_mps_state->one_icc) {
  ------------------
  |  Branch (1118:7): [True: 2.91k, False: 10.8k]
  ------------------
 1119|  2.91k|    error_code = ixheaacd_ec_data_dec(pstr_mps_state, &frame->icc_lossless_data,
 1120|  2.91k|                                      frame->cmp_ott_icc_idx, frame->cmp_ott_icc_idx_prev, ICC, 0,
  ------------------
  |  |   24|  2.91k|#define ICC (1)
  ------------------
 1121|  2.91k|                                      0, 0, bitstream_parameter_bands);
 1122|  2.91k|    if (error_code != IA_NO_ERROR) return error_code;
  ------------------
  |  |   23|  2.91k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (1122:9): [True: 7, False: 2.90k]
  ------------------
 1123|  10.8k|  } else {
 1124|  33.5k|    for (i = 0; i < num_ott_boxes; i++) {
  ------------------
  |  Branch (1124:17): [True: 22.7k, False: 10.7k]
  ------------------
 1125|  22.7k|      if (!pstr_mps_state->ott_mode_lfe[i]) {
  ------------------
  |  Branch (1125:11): [True: 22.1k, False: 618]
  ------------------
 1126|  22.1k|        error_code = ixheaacd_ec_data_dec(pstr_mps_state, &frame->icc_lossless_data,
 1127|  22.1k|                                          frame->cmp_ott_icc_idx, frame->cmp_ott_icc_idx_prev,
 1128|  22.1k|                                          ICC, i, i, 0, b_ott_bands[i]);
  ------------------
  |  |   24|  22.1k|#define ICC (1)
  ------------------
 1129|  22.1k|        if (error_code != IA_NO_ERROR) return error_code;
  ------------------
  |  |   23|  22.1k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (1129:13): [True: 12, False: 22.1k]
  ------------------
 1130|  22.1k|      }
 1131|  22.7k|    }
 1132|  10.8k|  }
 1133|       |
 1134|  13.7k|  ttt_off = num_ott_boxes;
 1135|  16.2k|  for (i = 0; i < pstr_mps_state->num_ttt_boxes; i++) {
  ------------------
  |  Branch (1135:15): [True: 2.58k, False: 13.6k]
  ------------------
 1136|  2.58k|    if (p_aux_struct->ttt_config[0][i].mode < 2) {
  ------------------
  |  Branch (1136:9): [True: 996, False: 1.59k]
  ------------------
 1137|    996|      error_code = ixheaacd_ec_data_dec(pstr_mps_state, &frame->cpc_lossless_data,
 1138|    996|                                        frame->cmp_ttt_cpc_1_idx, frame->cmp_ttt_cpc_1_idx_prev,
 1139|    996|                                        CPC, i, ttt_off + 4 * i,
  ------------------
  |  |   26|    996|#define CPC (3)
  ------------------
 1140|    996|                                        p_aux_struct->ttt_config[0][i].bitstream_start_band,
 1141|    996|                                        p_aux_struct->ttt_config[0][i].bitstream_stop_band);
 1142|    996|      if (error_code != IA_NO_ERROR) return error_code;
  ------------------
  |  |   23|    996|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (1142:11): [True: 1, False: 995]
  ------------------
 1143|       |
 1144|    995|      error_code = ixheaacd_ec_data_dec(pstr_mps_state, &frame->cpc_lossless_data,
 1145|    995|                                        frame->cmp_ttt_cpc_2_idx, frame->cmp_ttt_cpc_2_idx_prev,
 1146|    995|                                        CPC, i, ttt_off + 4 * i + 1,
  ------------------
  |  |   26|    995|#define CPC (3)
  ------------------
 1147|    995|                                        p_aux_struct->ttt_config[0][i].bitstream_start_band,
 1148|    995|                                        p_aux_struct->ttt_config[0][i].bitstream_stop_band);
 1149|    995|      if (error_code != IA_NO_ERROR) return error_code;
  ------------------
  |  |   23|    995|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (1149:11): [True: 2, False: 993]
  ------------------
 1150|       |
 1151|    993|      error_code =
 1152|    993|          ixheaacd_ec_data_dec(pstr_mps_state, &frame->icc_lossless_data, frame->cmp_ttt_icc_idx,
 1153|    993|                               frame->cmp_ttt_icc_idx_prev, ICC, i, ttt_off + 4 * i,
  ------------------
  |  |   24|    993|#define ICC (1)
  ------------------
 1154|    993|                               p_aux_struct->ttt_config[0][i].bitstream_start_band,
 1155|    993|                               p_aux_struct->ttt_config[0][i].bitstream_stop_band);
 1156|    993|      if (error_code != IA_NO_ERROR) return error_code;
  ------------------
  |  |   23|    993|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (1156:11): [True: 11, False: 982]
  ------------------
 1157|  1.59k|    } else {
 1158|  1.59k|      error_code = ixheaacd_ec_data_dec(pstr_mps_state, &frame->cld_lossless_data,
 1159|  1.59k|                                        frame->cmp_ttt_cld_1_idx, frame->cmp_ttt_cld_1_idx_prev,
 1160|  1.59k|                                        CLD, i, ttt_off + 4 * i,
  ------------------
  |  |   23|  1.59k|#define CLD (0)
  ------------------
 1161|  1.59k|                                        p_aux_struct->ttt_config[0][i].bitstream_start_band,
 1162|  1.59k|                                        p_aux_struct->ttt_config[0][i].bitstream_stop_band);
 1163|  1.59k|      if (error_code != IA_NO_ERROR) return error_code;
  ------------------
  |  |   23|  1.59k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (1163:11): [True: 6, False: 1.58k]
  ------------------
 1164|       |
 1165|  1.58k|      error_code = ixheaacd_ec_data_dec(pstr_mps_state, &frame->cld_lossless_data,
 1166|  1.58k|                                        frame->cmp_ttt_cld_2_idx, frame->cmp_ttt_cld_2_idx_prev,
 1167|  1.58k|                                        CLD, i, ttt_off + 4 * i + 1,
  ------------------
  |  |   23|  1.58k|#define CLD (0)
  ------------------
 1168|  1.58k|                                        p_aux_struct->ttt_config[0][i].bitstream_start_band,
 1169|  1.58k|                                        p_aux_struct->ttt_config[0][i].bitstream_stop_band);
 1170|  1.58k|      if (error_code != IA_NO_ERROR) return error_code;
  ------------------
  |  |   23|  1.58k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (1170:11): [True: 2, False: 1.58k]
  ------------------
 1171|  1.58k|    }
 1172|       |
 1173|  2.56k|    if (p_aux_struct->ttt_config[1][i].bitstream_start_band <
  ------------------
  |  Branch (1173:9): [True: 847, False: 1.71k]
  ------------------
 1174|  2.56k|        p_aux_struct->ttt_config[1][i].bitstream_stop_band) {
 1175|    847|      if (p_aux_struct->ttt_config[1][i].mode < 2) {
  ------------------
  |  Branch (1175:11): [True: 249, False: 598]
  ------------------
 1176|    249|        error_code = ixheaacd_ec_data_dec(pstr_mps_state, &frame->cpc_lossless_data,
 1177|    249|                                          frame->cmp_ttt_cpc_1_idx, frame->cmp_ttt_cpc_1_idx_prev,
 1178|    249|                                          CPC, i, ttt_off + 4 * i + 2,
  ------------------
  |  |   26|    249|#define CPC (3)
  ------------------
 1179|    249|                                          p_aux_struct->ttt_config[1][i].bitstream_start_band,
 1180|    249|                                          p_aux_struct->ttt_config[1][i].bitstream_stop_band);
 1181|    249|        if (error_code != IA_NO_ERROR) return error_code;
  ------------------
  |  |   23|    249|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (1181:13): [True: 1, False: 248]
  ------------------
 1182|       |
 1183|    248|        error_code = ixheaacd_ec_data_dec(pstr_mps_state, &frame->cpc_lossless_data,
 1184|    248|                                          frame->cmp_ttt_cpc_2_idx, frame->cmp_ttt_cpc_2_idx_prev,
 1185|    248|                                          CPC, i, ttt_off + 4 * i + 3,
  ------------------
  |  |   26|    248|#define CPC (3)
  ------------------
 1186|    248|                                          p_aux_struct->ttt_config[1][i].bitstream_start_band,
 1187|    248|                                          p_aux_struct->ttt_config[1][i].bitstream_stop_band);
 1188|    248|        if (error_code != IA_NO_ERROR) return error_code;
  ------------------
  |  |   23|    248|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (1188:13): [True: 1, False: 247]
  ------------------
 1189|       |
 1190|    247|        error_code = ixheaacd_ec_data_dec(pstr_mps_state, &frame->icc_lossless_data,
 1191|    247|                                          frame->cmp_ttt_icc_idx, frame->cmp_ttt_icc_idx_prev,
 1192|    247|                                          ICC, i, ttt_off + 4 * i + 2,
  ------------------
  |  |   24|    247|#define ICC (1)
  ------------------
 1193|    247|                                          p_aux_struct->ttt_config[1][i].bitstream_start_band,
 1194|    247|                                          p_aux_struct->ttt_config[1][i].bitstream_stop_band);
 1195|    247|        if (error_code != IA_NO_ERROR) return error_code;
  ------------------
  |  |   23|    247|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (1195:13): [True: 5, False: 242]
  ------------------
 1196|    598|      } else {
 1197|    598|        error_code = ixheaacd_ec_data_dec(pstr_mps_state, &frame->cld_lossless_data,
 1198|    598|                                          frame->cmp_ttt_cld_1_idx, frame->cmp_ttt_cld_1_idx_prev,
 1199|    598|                                          CLD, i, ttt_off + 4 * i + 2,
  ------------------
  |  |   23|    598|#define CLD (0)
  ------------------
 1200|    598|                                          p_aux_struct->ttt_config[1][i].bitstream_start_band,
 1201|    598|                                          p_aux_struct->ttt_config[1][i].bitstream_stop_band);
 1202|    598|        if (error_code != IA_NO_ERROR) return error_code;
  ------------------
  |  |   23|    598|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (1202:13): [True: 1, False: 597]
  ------------------
 1203|       |
 1204|    597|        error_code = ixheaacd_ec_data_dec(pstr_mps_state, &frame->cld_lossless_data,
 1205|    597|                                          frame->cmp_ttt_cld_2_idx, frame->cmp_ttt_cld_2_idx_prev,
 1206|    597|                                          CLD, i, ttt_off + 4 * i + 3,
  ------------------
  |  |   23|    597|#define CLD (0)
  ------------------
 1207|    597|                                          p_aux_struct->ttt_config[1][i].bitstream_start_band,
 1208|    597|                                          p_aux_struct->ttt_config[1][i].bitstream_stop_band);
 1209|    597|        if (error_code != IA_NO_ERROR) return error_code;
  ------------------
  |  |   23|    597|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (1209:13): [True: 2, False: 595]
  ------------------
 1210|    597|      }
 1211|    847|    }
 1212|  2.56k|  }
 1213|       |
 1214|  13.6k|  frame->bs_smooth_control = 1;
 1215|       |
 1216|  13.6k|  if (frame->bs_smooth_control) {
  ------------------
  |  Branch (1216:7): [True: 13.5k, False: 94]
  ------------------
 1217|  35.3k|    for (ps = 0; ps < num_parameter_sets; ps++) {
  ------------------
  |  Branch (1217:18): [True: 21.7k, False: 13.5k]
  ------------------
 1218|  21.7k|      frame->bs_smooth_mode[ps] = ixheaacd_read_bits_buf(mps_bit_buf, 2);
 1219|  21.7k|      if (frame->bs_smooth_mode[ps] > 3 || frame->bs_smooth_mode[ps] < 0) {
  ------------------
  |  Branch (1219:11): [True: 6, False: 21.7k]
  |  Branch (1219:44): [True: 0, False: 21.7k]
  ------------------
 1220|      0|        return IA_XHEAAC_MPS_DEC_EXE_NONFATAL_INVALID_SMOOTH_MODE;
  ------------------
  |  |  111|      0|#define IA_XHEAAC_MPS_DEC_EXE_NONFATAL_INVALID_SMOOTH_MODE 0x00001810
  ------------------
 1221|      0|      }
 1222|  21.7k|      if (frame->bs_smooth_mode[ps] >= 2) {
  ------------------
  |  Branch (1222:11): [True: 5.51k, False: 16.2k]
  ------------------
 1223|  5.51k|        frame->bs_smooth_time[ps] = ixheaacd_read_bits_buf(mps_bit_buf, 2);
 1224|  5.51k|      }
 1225|  21.7k|      if (frame->bs_smooth_mode[ps] == 3) {
  ------------------
  |  Branch (1225:11): [True: 2.01k, False: 19.7k]
  ------------------
 1226|  2.01k|        frame->bs_freq_res_stride_smg[ps] = ixheaacd_read_bits_buf(mps_bit_buf, 2);
 1227|  2.01k|        data_bands = (bitstream_parameter_bands - 1) /
 1228|  2.01k|                         bitdec_table->pb_stride_table[frame->bs_freq_res_stride_smg[ps]] +
 1229|  2.01k|                     1;
 1230|  11.5k|        for (pg = 0; pg < data_bands; pg++) {
  ------------------
  |  Branch (1230:22): [True: 9.54k, False: 2.01k]
  ------------------
 1231|  9.54k|          frame->bs_smg_data[ps][pg] = ixheaacd_read_bits_buf(mps_bit_buf, 1);
 1232|  9.54k|        }
 1233|  2.01k|      }
 1234|  21.7k|    }
 1235|  13.5k|  }
 1236|       |
 1237|   118k|  for (i = 0; i < bs_num_output_channels; i++) {
  ------------------
  |  Branch (1237:15): [True: 104k, False: 13.6k]
  ------------------
 1238|   104k|    p_aux_struct->temp_shape_enable_channel_stp[i] = 0;
 1239|   104k|    p_aux_struct->temp_shape_enable_channel_ges[i] = 0;
 1240|   104k|  }
 1241|       |
 1242|  13.6k|  if (p_bs_config->bs_temp_shape_config != 0) {
  ------------------
  |  Branch (1242:7): [True: 12.9k, False: 698]
  ------------------
 1243|  12.9k|    bs_temp_shape_enable = ixheaacd_read_bits_buf(mps_bit_buf, 1);
 1244|  12.9k|    if (bs_temp_shape_enable) {
  ------------------
  |  Branch (1244:9): [True: 2.70k, False: 10.2k]
  ------------------
 1245|  2.70k|      num_temp_shape_chan =
 1246|  2.70k|          bitdec_table->temp_shape_chan_table[p_bs_config->bs_temp_shape_config - 1]
 1247|  2.70k|                                             [p_bs_config->bs_tree_config];
 1248|  2.70k|      switch (pstr_mps_state->temp_shape_config) {
 1249|    721|        case 1:
  ------------------
  |  Branch (1249:9): [True: 721, False: 1.98k]
  ------------------
 1250|  4.01k|          for (i = 0; i < num_temp_shape_chan; i++) {
  ------------------
  |  Branch (1250:23): [True: 3.29k, False: 721]
  ------------------
 1251|  3.29k|            p_aux_struct->temp_shape_enable_channel_stp[i] =
 1252|  3.29k|                ixheaacd_read_bits_buf(mps_bit_buf, 1);
 1253|  3.29k|          }
 1254|    721|          break;
 1255|  1.98k|        case 2:
  ------------------
  |  Branch (1255:9): [True: 1.98k, False: 721]
  ------------------
 1256|  10.2k|          for (i = 0; i < num_temp_shape_chan; i++) {
  ------------------
  |  Branch (1256:23): [True: 8.22k, False: 1.98k]
  ------------------
 1257|  8.22k|            p_aux_struct->temp_shape_enable_channel_ges[i] =
 1258|  8.22k|                ixheaacd_read_bits_buf(mps_bit_buf, 1);
 1259|  8.22k|          }
 1260|  10.1k|          for (i = 0; i < num_temp_shape_chan; i++) {
  ------------------
  |  Branch (1260:23): [True: 8.17k, False: 1.98k]
  ------------------
 1261|  8.17k|            if (p_aux_struct->temp_shape_enable_channel_ges[i]) {
  ------------------
  |  Branch (1261:17): [True: 999, False: 7.17k]
  ------------------
 1262|    999|              WORD32 const *envshape_data =
 1263|    999|                  &bitdec_table->envshape_data[pstr_mps_state->env_quant_mode][0];
 1264|    999|              ixheaacd_mps_huff_decode(mps_bit_buf, bs_env_shape_data, time_slots);
 1265|  29.0k|              for (ts = 0; ts < time_slots; ts++) {
  ------------------
  |  Branch (1265:28): [True: 28.0k, False: 999]
  ------------------
 1266|  28.0k|                p_aux_struct->env_shape_data[i][ts] = envshape_data[bs_env_shape_data[ts]];
 1267|  28.0k|              }
 1268|    999|            }
 1269|  8.17k|          }
 1270|  1.98k|          break;
 1271|      0|        default:
  ------------------
  |  Branch (1271:9): [True: 0, False: 2.70k]
  ------------------
 1272|      0|          return IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_TEMPORAL_SHAPING_CONFIG;
  ------------------
  |  |  131|      0|#define IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_TEMPORAL_SHAPING_CONFIG 0xFFFF980C
  ------------------
 1273|  2.70k|      }
 1274|  2.70k|    }
 1275|  12.9k|  }
 1276|       |
 1277|  13.6k|  if (pstr_mps_state->up_mix_type == 2) {
  ------------------
  |  Branch (1277:7): [True: 0, False: 13.6k]
  ------------------
 1278|      0|    for (i = 0; i < bs_num_output_channels; i++) {
  ------------------
  |  Branch (1278:17): [True: 0, False: 0]
  ------------------
 1279|      0|      p_aux_struct->temp_shape_enable_channel_stp[i] = 0;
 1280|      0|      p_aux_struct->temp_shape_enable_channel_ges[i] = 0;
 1281|      0|    }
 1282|      0|  }
 1283|       |
 1284|  13.6k|  if (pstr_mps_state->arbitrary_downmix != 0) {
  ------------------
  |  Branch (1284:7): [True: 1.14k, False: 12.5k]
  ------------------
 1285|  1.14k|    ixheaacd_parse_arbitrary_downmix_data(pstr_mps_state);
 1286|  1.14k|  }
 1287|       |
 1288|  13.6k|  ixheaacd_byte_align(mps_bit_buf, &alignment_bits);
 1289|  13.6k|  error_code = ixheaacd_parse_extension_frame(pstr_mps_state);
 1290|  13.6k|  if (error_code) {
  ------------------
  |  Branch (1290:7): [True: 86, False: 13.5k]
  ------------------
 1291|     86|    if (pstr_mps_state->ec_flag) {
  ------------------
  |  Branch (1291:9): [True: 0, False: 86]
  ------------------
 1292|      0|      pstr_mps_state->frame_ok = 0;
 1293|      0|    }
 1294|     86|    else
 1295|     86|      return error_code;
 1296|     86|  }
 1297|       |
 1298|  47.3k|  for (i = 0; i < num_ott_boxes; i++) {
  ------------------
  |  Branch (1298:15): [True: 33.7k, False: 13.5k]
  ------------------
 1299|  94.0k|    for (ps = 0; ps < num_parameter_sets; ps++) {
  ------------------
  |  Branch (1299:18): [True: 60.3k, False: 33.7k]
  ------------------
 1300|  60.3k|      if (!frame->res_data.bs_icc_diff_present[i][ps] || (pstr_mps_state->up_mix_type == 2) ||
  ------------------
  |  Branch (1300:11): [True: 60.1k, False: 160]
  |  Branch (1300:58): [True: 0, False: 160]
  ------------------
 1301|  60.1k|          (pstr_mps_state->up_mix_type == 3)) {
  ------------------
  |  Branch (1301:11): [True: 0, False: 160]
  ------------------
 1302|  1.00M|        for (pb = 0; pb < bitstream_parameter_bands; pb++) {
  ------------------
  |  Branch (1302:22): [True: 949k, False: 60.1k]
  ------------------
 1303|   949k|          pstr_mps_state->bs_frame->ott_icc_diff_idx[i][ps][pb] = 0;
 1304|   949k|        }
 1305|  60.1k|      }
 1306|  60.3k|    }
 1307|  33.7k|  }
 1308|       |
 1309|  13.5k|  pstr_mps_state->parse_next_bitstream_frame = 1;
 1310|       |
 1311|  13.5k|  return IA_NO_ERROR;
  ------------------
  |  |   23|  13.5k|#define IA_NO_ERROR 0x00000000
  ------------------
 1312|  13.6k|}
ixheaacd_decode_frame:
 2254|  13.3k|IA_ERRORCODE ixheaacd_decode_frame(ia_heaac_mps_state_struct *pstr_mps_state) {
 2255|  13.3k|  IA_ERRORCODE error_code = IA_NO_ERROR;
  ------------------
  |  |   23|  13.3k|#define IA_NO_ERROR 0x00000000
  ------------------
 2256|  13.3k|  ia_mps_spatial_bs_config_struct *p_bs_config = &pstr_mps_state->bs_config;
 2257|  13.3k|  WORD32 *param_slot = pstr_mps_state->aux_struct->param_slot;
 2258|       |
 2259|  13.3k|  pstr_mps_state->extend_frame = 0;
 2260|  13.3k|  if (param_slot[pstr_mps_state->num_parameter_sets - 1] != pstr_mps_state->time_slots - 1) {
  ------------------
  |  Branch (2260:7): [True: 3.62k, False: 9.68k]
  ------------------
 2261|  3.62k|    pstr_mps_state->extend_frame = 1;
 2262|  3.62k|  }
 2263|  13.3k|  if (pstr_mps_state->extend_frame)
  ------------------
  |  Branch (2263:7): [True: 3.62k, False: 9.68k]
  ------------------
 2264|  3.62k|  {
 2265|  3.62k|    if (pstr_mps_state->num_parameter_sets == MAX_PARAMETER_SETS) {
  ------------------
  |  |   74|  3.62k|#define MAX_PARAMETER_SETS (8)
  ------------------
  |  Branch (2265:9): [True: 3, False: 3.61k]
  ------------------
 2266|      3|      if (pstr_mps_state->ec_flag)
  ------------------
  |  Branch (2266:11): [True: 0, False: 3]
  ------------------
 2267|      0|        pstr_mps_state->num_parameter_sets = 1;
 2268|      3|      else
 2269|      3|        return IA_FATAL_ERROR;
  ------------------
  |  |   25|      3|#define IA_FATAL_ERROR 0x80000000
  ------------------
 2270|      3|    }
 2271|  3.62k|  }
 2272|       |
 2273|  13.2k|  error_code = ixheaacd_decode_and_map_frame_ott(pstr_mps_state);
 2274|  13.2k|  if (error_code)
  ------------------
  |  Branch (2274:7): [True: 118, False: 13.1k]
  ------------------
 2275|    118|  {
 2276|    118|    if (pstr_mps_state->ec_flag)
  ------------------
  |  Branch (2276:9): [True: 0, False: 118]
  ------------------
 2277|      0|    {
 2278|      0|      pstr_mps_state->frame_ok = 0;
 2279|      0|      for (WORD32 idx = 0; idx < MAX_NUM_OTT; idx++)
  ------------------
  |  |   56|      0|#define MAX_NUM_OTT (5)
  ------------------
  |  Branch (2279:28): [True: 0, False: 0]
  ------------------
 2280|      0|      {
 2281|      0|        ixheaacd_mps_check_index_bounds(pstr_mps_state->bs_frame->ott_cld_idx,
 2282|      0|            pstr_mps_state->num_parameter_sets, 0, pstr_mps_state->bitstream_ott_bands[idx],
 2283|      0|            CLD, idx);
  ------------------
  |  |   23|      0|#define CLD (0)
  ------------------
 2284|      0|        ixheaacd_mps_check_index_bounds(pstr_mps_state->bs_frame->ott_icc_idx,
 2285|      0|            pstr_mps_state->num_parameter_sets, 0, pstr_mps_state->bitstream_ott_bands[idx],
 2286|      0|            ICC, idx);
  ------------------
  |  |   24|      0|#define ICC (1)
  ------------------
 2287|      0|      }
 2288|      0|    }
 2289|    118|    else
 2290|    118|      return error_code;
 2291|    118|  }
 2292|       |
 2293|  13.1k|  error_code = ixheaacd_decode_and_map_frame_ttt(pstr_mps_state);
 2294|  13.1k|  if (error_code)
  ------------------
  |  Branch (2294:7): [True: 39, False: 13.1k]
  ------------------
 2295|     39|  {
 2296|     39|    if (pstr_mps_state->ec_flag)
  ------------------
  |  Branch (2296:9): [True: 0, False: 39]
  ------------------
 2297|      0|    {
 2298|      0|      pstr_mps_state->frame_ok = 0;
 2299|      0|      ixheaacd_mps_check_index_bounds(pstr_mps_state->bs_frame->ttt_icc_idx,
 2300|      0|          pstr_mps_state->num_parameter_sets, 0, MAX_PARAMETER_BANDS,
  ------------------
  |  |   55|      0|#define MAX_PARAMETER_BANDS (28)
  ------------------
 2301|      0|          ICC, 0);
  ------------------
  |  |   24|      0|#define ICC (1)
  ------------------
 2302|      0|    }
 2303|     39|    else
 2304|     39|      return error_code;
 2305|     39|  }
 2306|       |
 2307|  13.1k|  ixheaacd_decode_and_map_frame_smg(pstr_mps_state);
 2308|  13.1k|  if (p_bs_config->arbitrary_tree != 0) {
  ------------------
  |  Branch (2308:7): [True: 7, False: 13.1k]
  ------------------
 2309|      7|    error_code = ixheaacd_decode_and_map_frame_arb_tree(pstr_mps_state);
 2310|      7|    if (error_code)
  ------------------
  |  Branch (2310:9): [True: 1, False: 6]
  ------------------
 2311|      1|    {
 2312|      1|      if (pstr_mps_state->ec_flag)
  ------------------
  |  Branch (2312:11): [True: 0, False: 1]
  ------------------
 2313|      0|      {
 2314|      0|        pstr_mps_state->frame_ok = 0;
 2315|      0|        for (WORD32 idx = 0; idx < MAX_NUM_OTT; idx++)
  ------------------
  |  |   56|      0|#define MAX_NUM_OTT (5)
  ------------------
  |  Branch (2315:30): [True: 0, False: 0]
  ------------------
 2316|      0|        {
 2317|      0|          ixheaacd_mps_check_index_bounds(pstr_mps_state->bs_frame->ott_cld_idx,
 2318|      0|              pstr_mps_state->num_parameter_sets, 0, MAX_PARAMETER_BANDS,
  ------------------
  |  |   55|      0|#define MAX_PARAMETER_BANDS (28)
  ------------------
 2319|      0|              CLD, idx);
  ------------------
  |  |   23|      0|#define CLD (0)
  ------------------
 2320|      0|        }
 2321|      0|      }
 2322|      1|      else
 2323|      1|        return error_code;
 2324|      1|    }
 2325|      7|  }
 2326|       |
 2327|  13.1k|  if (pstr_mps_state->arbitrary_downmix != 0) {
  ------------------
  |  Branch (2327:7): [True: 980, False: 12.1k]
  ------------------
 2328|    980|    error_code = ixheaacd_decode_and_map_frame_arbdmx(pstr_mps_state);
 2329|    980|    if (error_code)
  ------------------
  |  Branch (2329:9): [True: 17, False: 963]
  ------------------
 2330|     17|    {
 2331|     17|      if (pstr_mps_state->ec_flag)
  ------------------
  |  Branch (2331:11): [True: 0, False: 17]
  ------------------
 2332|      0|      {
 2333|      0|        pstr_mps_state->frame_ok = 0;
 2334|      0|        for (WORD32 idx = 0; idx < MAX_INPUT_CHANNELS_MPS; idx++)
  ------------------
  |  |   66|      0|#define MAX_INPUT_CHANNELS_MPS (6)
  ------------------
  |  Branch (2334:30): [True: 0, False: 0]
  ------------------
 2335|      0|        {
 2336|      0|          ixheaacd_mps_check_index_bounds(pstr_mps_state->bs_frame->arbdmx_gain_idx,
 2337|      0|              pstr_mps_state->num_parameter_sets, 0, MAX_PARAMETER_BANDS,
  ------------------
  |  |   55|      0|#define MAX_PARAMETER_BANDS (28)
  ------------------
 2338|      0|              CLD, idx);
  ------------------
  |  |   23|      0|#define CLD (0)
  ------------------
 2339|      0|        }
 2340|      0|      }
 2341|     17|      else
 2342|     17|        return error_code;
 2343|     17|    }
 2344|    980|  }
 2345|       |
 2346|  13.1k|  if (pstr_mps_state->extend_frame) {
  ------------------
  |  Branch (2346:7): [True: 3.56k, False: 9.55k]
  ------------------
 2347|  3.56k|    pstr_mps_state->num_parameter_sets++;
 2348|  3.56k|    param_slot[pstr_mps_state->num_parameter_sets - 1] = pstr_mps_state->time_slots - 1;
 2349|  3.56k|  }
 2350|  13.1k|  return IA_NO_ERROR;
  ------------------
  |  |   23|  13.1k|#define IA_NO_ERROR 0x00000000
  ------------------
 2351|  13.1k|}
ixheaacd_set_current_state_parameters:
 2353|  3.24k|IA_ERRORCODE ixheaacd_set_current_state_parameters(ia_heaac_mps_state_struct *pstr_mps_state) {
 2354|  3.24k|  WORD32 i;
 2355|       |
 2356|  3.24k|  ia_mps_spatial_bs_config_struct *config = &(pstr_mps_state->bs_config);
 2357|  3.24k|  ia_mps_spatial_bs_config_struct *p_bs_config = &pstr_mps_state->bs_config;
 2358|  3.24k|  ia_heaac_mps_state_struct *curr_state = pstr_mps_state;
 2359|  3.24k|  ia_mps_dec_bitdec_tables_struct *bitdec_table =
 2360|  3.24k|      pstr_mps_state->ia_mps_dec_mps_table.bitdec_table_ptr;
 2361|  3.24k|  ia_mps_dec_auxilary_struct *p_aux_struct = pstr_mps_state->aux_struct;
 2362|  3.24k|  WORD32 *b_ott_bands = curr_state->bitstream_ott_bands;
 2363|       |
 2364|  3.24k|  if (config->bs_sampling_freq_index == 15) {
  ------------------
  |  Branch (2364:7): [True: 15, False: 3.23k]
  ------------------
 2365|     15|    curr_state->sampling_freq = config->bs_sampling_frequency;
 2366|  3.23k|  } else {
 2367|  3.23k|    curr_state->sampling_freq = bitdec_table->sampling_freq_table[config->bs_sampling_freq_index];
 2368|  3.23k|  }
 2369|  3.24k|  curr_state->time_slots = config->bs_frame_length + 1;
 2370|  3.24k|  curr_state->frame_length = curr_state->time_slots * curr_state->qmf_bands;
 2371|  3.24k|  curr_state->bitstream_parameter_bands = bitdec_table->freq_res_table[config->bs_freq_res];
 2372|       |
 2373|  3.24k|  curr_state->hybrid_bands = curr_state->qmf_bands - QMF_BANDS_TO_HYBRID + 10;
  ------------------
  |  |   64|  3.24k|#define QMF_BANDS_TO_HYBRID (3)
  ------------------
 2374|  3.24k|  curr_state->tp_hyb_band_border = 12;
 2375|  3.24k|  if (curr_state->hybrid_bands > 71) {
  ------------------
  |  Branch (2375:7): [True: 1, False: 3.24k]
  ------------------
 2376|      1|    return IA_FATAL_ERROR;
  ------------------
  |  |   25|      1|#define IA_FATAL_ERROR 0x80000000
  ------------------
 2377|      1|  }
 2378|  3.24k|  if (curr_state->up_mix_type == 2) {
  ------------------
  |  Branch (2378:7): [True: 0, False: 3.24k]
  ------------------
 2379|      0|    curr_state->num_parameter_bands = MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|      0|#define MAX_PARAMETER_BANDS (28)
  ------------------
 2380|  3.24k|  } else {
 2381|  3.24k|    curr_state->num_parameter_bands = curr_state->bitstream_parameter_bands;
 2382|  3.24k|  }
 2383|       |
 2384|  3.24k|  switch (curr_state->num_parameter_bands) {
 2385|    385|    case PARAMETER_BANDS_4:
  ------------------
  |  Branch (2385:5): [True: 385, False: 2.86k]
  ------------------
 2386|  15.5k|      for (i = 0; i < curr_state->hybrid_bands; i++) {
  ------------------
  |  Branch (2386:19): [True: 15.2k, False: 385]
  ------------------
 2387|  15.2k|        curr_state->kernels[i] = bitdec_table->kernel_table.kernels_4_to_71[i];
 2388|  15.2k|      }
 2389|    385|      break;
 2390|    289|    case PARAMETER_BANDS_5:
  ------------------
  |  Branch (2390:5): [True: 289, False: 2.95k]
  ------------------
 2391|  17.1k|      for (i = 0; i < curr_state->hybrid_bands; i++) {
  ------------------
  |  Branch (2391:19): [True: 16.9k, False: 289]
  ------------------
 2392|  16.9k|        curr_state->kernels[i] = bitdec_table->kernel_table.kernels_5_to_71[i];
 2393|  16.9k|      }
 2394|    289|      break;
 2395|     22|    case PARAMETER_BANDS_7:
  ------------------
  |  Branch (2395:5): [True: 22, False: 3.22k]
  ------------------
 2396|    976|      for (i = 0; i < curr_state->hybrid_bands; i++) {
  ------------------
  |  Branch (2396:19): [True: 954, False: 22]
  ------------------
 2397|    954|        curr_state->kernels[i] = bitdec_table->kernel_table.kernels_7_to_71[i];
 2398|    954|      }
 2399|     22|      break;
 2400|    125|    case PARAMETER_BANDS_10:
  ------------------
  |  Branch (2400:5): [True: 125, False: 3.12k]
  ------------------
 2401|  5.25k|      for (i = 0; i < curr_state->hybrid_bands; i++) {
  ------------------
  |  Branch (2401:19): [True: 5.13k, False: 125]
  ------------------
 2402|  5.13k|        curr_state->kernels[i] = bitdec_table->kernel_table.kernels_10_to_71[i];
 2403|  5.13k|      }
 2404|    125|      break;
 2405|  1.02k|    case PARAMETER_BANDS_14:
  ------------------
  |  Branch (2405:5): [True: 1.02k, False: 2.21k]
  ------------------
 2406|  41.4k|      for (i = 0; i < curr_state->hybrid_bands; i++) {
  ------------------
  |  Branch (2406:19): [True: 40.4k, False: 1.02k]
  ------------------
 2407|  40.4k|        curr_state->kernels[i] = bitdec_table->kernel_table.kernels_14_to_71[i];
 2408|  40.4k|      }
 2409|  1.02k|      break;
 2410|  1.17k|    case PARAMETER_BANDS_20:
  ------------------
  |  Branch (2410:5): [True: 1.17k, False: 2.07k]
  ------------------
 2411|  65.6k|      for (i = 0; i < curr_state->hybrid_bands; i++) {
  ------------------
  |  Branch (2411:19): [True: 64.4k, False: 1.17k]
  ------------------
 2412|  64.4k|        curr_state->kernels[i] = bitdec_table->kernel_table.kernels_20_to_71[i];
 2413|  64.4k|      }
 2414|  1.17k|      break;
 2415|    223|    case PARAMETER_BANDS_28:
  ------------------
  |  Branch (2415:5): [True: 223, False: 3.02k]
  ------------------
 2416|  8.98k|      for (i = 0; i < curr_state->hybrid_bands; i++) {
  ------------------
  |  Branch (2416:19): [True: 8.76k, False: 223]
  ------------------
 2417|  8.76k|        curr_state->kernels[i] = bitdec_table->kernel_table.kernels_28_to_71[i];
 2418|  8.76k|      }
 2419|    223|      break;
 2420|      0|    default:
  ------------------
  |  Branch (2420:5): [True: 0, False: 3.24k]
  ------------------
 2421|      0|      return IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_PARAMETER_BANDS;
  ------------------
  |  |  137|      0|#define IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_PARAMETER_BANDS 0xFFFF9812
  ------------------
 2422|  3.24k|  };
 2423|       |
 2424|  3.24k|  curr_state->tree_config = config->bs_tree_config;
 2425|       |
 2426|  3.24k|  switch (curr_state->tree_config) {
 2427|    340|    case TREE_5151:
  ------------------
  |  Branch (2427:5): [True: 340, False: 2.90k]
  ------------------
 2428|    685|    case TREE_5152:
  ------------------
  |  Branch (2428:5): [True: 345, False: 2.90k]
  ------------------
 2429|  1.59k|    case TREE_525:
  ------------------
  |  Branch (2429:5): [True: 908, False: 2.33k]
  ------------------
 2430|  1.59k|      config->ui_channel_mask = FIVE_POINT_ONE_CHANNEL_MASK;
  ------------------
  |  |   23|  1.59k|#define FIVE_POINT_ONE_CHANNEL_MASK (0x3F)
  ------------------
 2431|  1.59k|      break;
 2432|    333|    case TREE_7271:
  ------------------
  |  Branch (2432:5): [True: 333, False: 2.91k]
  ------------------
 2433|    502|    case TREE_7571:
  ------------------
  |  Branch (2433:5): [True: 169, False: 3.07k]
  ------------------
 2434|    502|      config->ui_channel_mask = SEVEN_POINT_ONE_CHANNEL_MASK1;
  ------------------
  |  |   24|    502|#define SEVEN_POINT_ONE_CHANNEL_MASK1 (0xFF)
  ------------------
 2435|    502|      break;
 2436|    223|    case TREE_7272:
  ------------------
  |  Branch (2436:5): [True: 223, False: 3.02k]
  ------------------
 2437|  1.15k|    case TREE_7572:
  ------------------
  |  Branch (2437:5): [True: 929, False: 2.31k]
  ------------------
 2438|  1.15k|      config->ui_channel_mask = SEVEN_POINT_ONE_CHANNEL_MASK2;
  ------------------
  |  |   25|  1.15k|#define SEVEN_POINT_ONE_CHANNEL_MASK2 (0x33F)
  ------------------
 2439|  1.15k|      break;
 2440|      0|    default:
  ------------------
  |  Branch (2440:5): [True: 0, False: 3.24k]
  ------------------
 2441|      0|      return IA_XHEAAC_MPS_DEC_EXE_FATAL_UNSUPPRORTED_TREE_CONFIG;
  ------------------
  |  |  124|      0|#define IA_XHEAAC_MPS_DEC_EXE_FATAL_UNSUPPRORTED_TREE_CONFIG 0xFFFF9805
  ------------------
 2442|  3.24k|  }
 2443|       |
 2444|  3.24k|  curr_state->num_ott_boxes =
 2445|  3.24k|      bitdec_table->tree_property_table[curr_state->tree_config].num_ott_boxes;
 2446|  3.24k|  curr_state->num_ttt_boxes =
 2447|  3.24k|      bitdec_table->tree_property_table[curr_state->tree_config].num_ttt_boxes;
 2448|  3.24k|  curr_state->num_input_channels =
 2449|  3.24k|      bitdec_table->tree_property_table[curr_state->tree_config].num_input_channels;
 2450|  3.24k|  curr_state->num_output_channels =
 2451|  3.24k|      bitdec_table->tree_property_table[curr_state->tree_config].num_output_channels;
 2452|  3.24k|  curr_state->quant_mode = config->bs_quant_mode;
 2453|  3.24k|  curr_state->one_icc = config->bs_one_icc;
 2454|  3.24k|  curr_state->arbitrary_downmix = config->bs_arbitrary_downmix;
 2455|  3.24k|  curr_state->residual_coding = config->bs_residual_coding;
 2456|  3.24k|  curr_state->smooth_config = config->bs_smooth_config;
 2457|  3.24k|  curr_state->mtx_inversion = config->bs_matrix_mode;
 2458|  3.24k|  curr_state->temp_shape_config = config->bs_temp_shape_config;
 2459|  3.24k|  curr_state->decorr_config = config->bs_decorr_config;
 2460|  3.24k|  curr_state->env_quant_mode = config->bs_env_quant_mode;
 2461|  3.24k|  curr_state->lfe_gain = bitdec_table->lfe_gain_table[config->bs_fixed_gain_lfe];
 2462|  3.24k|  curr_state->surround_gain = bitdec_table->surround_gain_table[config->bs_fixed_gain_sur];
 2463|  3.24k|  curr_state->clip_protect_gain = bitdec_table->clip_gain_table[config->bs_fixed_gain_dmx];
 2464|       |
 2465|  3.24k|  if (curr_state->up_mix_type == 2) {
  ------------------
  |  Branch (2465:7): [True: 0, False: 3.24k]
  ------------------
 2466|      0|    curr_state->num_output_channels = 2;
 2467|      0|    curr_state->decorr_config = 0;
 2468|      0|  }
 2469|       |
 2470|  3.24k|  if (curr_state->up_mix_type == 3) {
  ------------------
  |  Branch (2470:7): [True: 0, False: 3.24k]
  ------------------
 2471|      0|    curr_state->num_output_channels = 2;
 2472|      0|  }
 2473|       |
 2474|  3.24k|  if (p_bs_config->arbitrary_tree == 1)
  ------------------
  |  Branch (2474:7): [True: 11, False: 3.23k]
  ------------------
 2475|     11|    curr_state->num_output_channels_at = p_bs_config->num_out_chan_at;
 2476|  3.23k|  else
 2477|  3.23k|    curr_state->num_output_channels_at = curr_state->num_output_channels;
 2478|       |
 2479|  3.24k|  p_bs_config->ui_out_channels = curr_state->num_output_channels_at;
 2480|       |
 2481|  3.24k|  curr_state->_3d_stereo_inversion = config->bs_3d_audio_mode;
 2482|       |
 2483|  3.24k|  if (curr_state->mtx_inversion == 1 || curr_state->_3d_stereo_inversion == 1)
  ------------------
  |  Branch (2483:7): [True: 1.49k, False: 1.74k]
  |  Branch (2483:41): [True: 2, False: 1.74k]
  ------------------
 2484|  1.50k|    curr_state->m1_param_imag_present = 1;
 2485|       |
 2486|  14.3k|  for (i = 0; i < curr_state->num_ott_boxes; i++) {
  ------------------
  |  Branch (2486:15): [True: 11.1k, False: 3.24k]
  ------------------
 2487|  11.1k|    if (bitdec_table->tree_property_table[curr_state->tree_config].ott_mode_lfe[i]) {
  ------------------
  |  Branch (2487:9): [True: 2.14k, False: 8.97k]
  ------------------
 2488|  2.14k|      b_ott_bands[i] = config->bs_ott_bands[i];
 2489|  2.14k|      curr_state->ott_mode_lfe[i] = 1;
 2490|  8.97k|    } else {
 2491|  8.97k|      b_ott_bands[i] = curr_state->bitstream_parameter_bands;
 2492|  8.97k|      curr_state->ott_mode_lfe[i] = 0;
 2493|  8.97k|    }
 2494|       |
 2495|  11.1k|    if (curr_state->up_mix_type == 2) {
  ------------------
  |  Branch (2495:9): [True: 0, False: 11.1k]
  ------------------
 2496|      0|      ixheaacd_map_number_of_bands_to_28_bands(b_ott_bands[i],
 2497|      0|                                               curr_state->bitstream_parameter_bands,
 2498|      0|                                               &p_aux_struct->num_ott_bands[i], bitdec_table);
 2499|  11.1k|    } else {
 2500|  11.1k|      p_aux_struct->num_ott_bands[i] = b_ott_bands[i];
 2501|  11.1k|    }
 2502|  11.1k|  }
 2503|  4.71k|  for (i = 0; i < curr_state->num_ttt_boxes; i++) {
  ------------------
  |  Branch (2503:15): [True: 1.46k, False: 3.24k]
  ------------------
 2504|  1.46k|    p_aux_struct->ttt_config[0][i].mode = config->bs_ttt_mode_low[i];
 2505|  1.46k|    p_aux_struct->ttt_config[1][i].mode = config->bs_ttt_mode_high[i];
 2506|  1.46k|    p_aux_struct->ttt_config[0][i].bitstream_start_band = 0;
 2507|  1.46k|    p_aux_struct->ttt_config[1][i].bitstream_stop_band = curr_state->bitstream_parameter_bands;
 2508|       |
 2509|  1.46k|    if (config->bs_ttt_dual_mode[i]) {
  ------------------
  |  Branch (2509:9): [True: 1.07k, False: 392]
  ------------------
 2510|  1.07k|      p_aux_struct->ttt_config[0][i].bitstream_stop_band = config->bs_ttt_bands_low[i];
 2511|  1.07k|      p_aux_struct->ttt_config[1][i].bitstream_start_band = config->bs_ttt_bands_low[i];
 2512|  1.07k|    } else {
 2513|    392|      p_aux_struct->ttt_config[0][i].bitstream_stop_band = curr_state->bitstream_parameter_bands;
 2514|    392|      p_aux_struct->ttt_config[1][i].bitstream_start_band = curr_state->bitstream_parameter_bands;
 2515|    392|    }
 2516|       |
 2517|  1.46k|    if (curr_state->up_mix_type == 2) {
  ------------------
  |  Branch (2517:9): [True: 0, False: 1.46k]
  ------------------
 2518|      0|      ixheaacd_map_number_of_bands_to_28_bands(
 2519|      0|          p_aux_struct->ttt_config[0][i].bitstream_start_band,
 2520|      0|          curr_state->bitstream_parameter_bands, &p_aux_struct->ttt_config[0][i].start_band,
 2521|      0|          bitdec_table);
 2522|       |
 2523|      0|      ixheaacd_map_number_of_bands_to_28_bands(p_aux_struct->ttt_config[0][i].bitstream_stop_band,
 2524|      0|                                               curr_state->bitstream_parameter_bands,
 2525|      0|                                               &p_aux_struct->ttt_config[0][i].stop_band,
 2526|      0|                                               bitdec_table);
 2527|       |
 2528|      0|      ixheaacd_map_number_of_bands_to_28_bands(
 2529|      0|          p_aux_struct->ttt_config[1][i].bitstream_start_band,
 2530|      0|          curr_state->bitstream_parameter_bands, &p_aux_struct->ttt_config[1][i].start_band,
 2531|      0|          bitdec_table);
 2532|       |
 2533|      0|      ixheaacd_map_number_of_bands_to_28_bands(p_aux_struct->ttt_config[1][i].bitstream_stop_band,
 2534|      0|                                               curr_state->bitstream_parameter_bands,
 2535|      0|                                               &p_aux_struct->ttt_config[1][i].stop_band,
 2536|      0|                                               bitdec_table);
 2537|  1.46k|    } else {
 2538|  1.46k|      p_aux_struct->ttt_config[0][i].start_band =
 2539|  1.46k|          p_aux_struct->ttt_config[0][i].bitstream_start_band;
 2540|  1.46k|      p_aux_struct->ttt_config[0][i].stop_band =
 2541|  1.46k|          p_aux_struct->ttt_config[0][i].bitstream_stop_band;
 2542|  1.46k|      p_aux_struct->ttt_config[1][i].start_band =
 2543|  1.46k|          p_aux_struct->ttt_config[1][i].bitstream_start_band;
 2544|  1.46k|      p_aux_struct->ttt_config[1][i].stop_band =
 2545|  1.46k|          p_aux_struct->ttt_config[1][i].bitstream_stop_band;
 2546|  1.46k|    }
 2547|  1.46k|  }
 2548|  3.24k|  curr_state->residual_coding = config->bs_residual_coding;
 2549|  3.24k|  curr_state->num_residual_signals = 0;
 2550|  3.24k|  if (curr_state->residual_coding) {
  ------------------
  |  Branch (2550:7): [True: 542, False: 2.70k]
  ------------------
 2551|  2.81k|    for (i = 0; i < curr_state->num_ttt_boxes + curr_state->num_ott_boxes; i++) {
  ------------------
  |  Branch (2551:17): [True: 2.26k, False: 542]
  ------------------
 2552|  2.26k|      if (config->bs_residual_present[i]) {
  ------------------
  |  Branch (2552:11): [True: 735, False: 1.53k]
  ------------------
 2553|    735|        curr_state->res_bands[i] = config->bs_residual_bands[i];
 2554|    735|        curr_state->num_residual_signals++;
 2555|  1.53k|      } else {
 2556|  1.53k|        curr_state->res_bands[i] = 0;
 2557|  1.53k|      }
 2558|       |
 2559|  2.26k|      if (curr_state->up_mix_type == 2 || curr_state->up_mix_type == 3) {
  ------------------
  |  Branch (2559:11): [True: 0, False: 2.26k]
  |  Branch (2559:43): [True: 0, False: 2.26k]
  ------------------
 2560|      0|        curr_state->res_bands[i] = 0;
 2561|      0|      }
 2562|  2.26k|    }
 2563|    542|  }
 2564|       |
 2565|  3.24k|  curr_state->residual_frames_per_spatial_frame =
 2566|  3.24k|      p_bs_config->bs_residual_frames_per_spatial_frame + 1;
 2567|  3.24k|  if (curr_state->residual_frames_per_spatial_frame > 0) {
  ------------------
  |  Branch (2567:7): [True: 3.24k, False: 0]
  ------------------
 2568|  3.24k|    WORD32 const *reciprocal_tab =
 2569|  3.24k|        pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr->reciprocal;
 2570|       |
 2571|  3.24k|    WORD64 temp =
 2572|  3.24k|        (WORD64)(((WORD64)(p_bs_config->bs_frame_length + 1) *
 2573|  3.24k|                  (WORD64)reciprocal_tab[p_bs_config->bs_residual_frames_per_spatial_frame]) >>
 2574|  3.24k|                 28);
 2575|  3.24k|    curr_state->upd_qmf = (WORD32)temp;
 2576|  3.24k|    if (curr_state->upd_qmf != UPD_QMF_15 && curr_state->upd_qmf != UPD_QMF_16 &&
  ------------------
  |  |   30|  6.49k|#define UPD_QMF_15 (15)
  ------------------
                  if (curr_state->upd_qmf != UPD_QMF_15 && curr_state->upd_qmf != UPD_QMF_16 &&
  ------------------
  |  |   31|  6.48k|#define UPD_QMF_16 (16)
  ------------------
  |  Branch (2576:9): [True: 3.23k, False: 11]
  |  Branch (2576:46): [True: 2.15k, False: 1.08k]
  ------------------
 2577|  2.15k|        curr_state->upd_qmf != UPD_QMF_32 && curr_state->upd_qmf != UPD_QMF_18 &&
  ------------------
  |  |   35|  5.39k|#define UPD_QMF_32 (32)
  ------------------
                      curr_state->upd_qmf != UPD_QMF_32 && curr_state->upd_qmf != UPD_QMF_18 &&
  ------------------
  |  |   32|  3.80k|#define UPD_QMF_18 (18)
  ------------------
  |  Branch (2577:9): [True: 562, False: 1.59k]
  |  Branch (2577:46): [True: 532, False: 30]
  ------------------
 2578|    532|        curr_state->upd_qmf != UPD_QMF_30 && curr_state->upd_qmf != UPD_QMF_24)
  ------------------
  |  |   34|  3.77k|#define UPD_QMF_30 (30)
  ------------------
                      curr_state->upd_qmf != UPD_QMF_30 && curr_state->upd_qmf != UPD_QMF_24)
  ------------------
  |  |   33|    503|#define UPD_QMF_24 (24)
  ------------------
  |  Branch (2578:9): [True: 503, False: 29]
  |  Branch (2578:46): [True: 2, False: 501]
  ------------------
 2579|      2|      return IA_XHEAAC_MPS_DEC_EXE_NONFATAL_INVALID_QMF_UPDATE;
  ------------------
  |  |  114|      2|#define IA_XHEAAC_MPS_DEC_EXE_NONFATAL_INVALID_QMF_UPDATE 0x00001813
  ------------------
 2580|  3.24k|  }
 2581|       |
 2582|  3.24k|  curr_state->arbdmx_residual_bands = config->bs_arbitrary_downmix_residual_bands;
 2583|  3.24k|  curr_state->arbdmx_frames_per_spatial_frame =
 2584|  3.24k|      config->bs_arbitrary_downmix_residual_frames_per_spatial_frame + 1;
 2585|  3.24k|  if (curr_state->arbdmx_frames_per_spatial_frame > 0) {
  ------------------
  |  Branch (2585:7): [True: 3.24k, False: 0]
  ------------------
 2586|  3.24k|    curr_state->arbdmx_upd_qmf =
 2587|  3.24k|        curr_state->time_slots / curr_state->arbdmx_frames_per_spatial_frame;
 2588|  3.24k|    if (curr_state->arbdmx_upd_qmf != UPD_QMF_15 && curr_state->arbdmx_upd_qmf != UPD_QMF_16 &&
  ------------------
  |  |   30|  6.49k|#define UPD_QMF_15 (15)
  ------------------
                  if (curr_state->arbdmx_upd_qmf != UPD_QMF_15 && curr_state->arbdmx_upd_qmf != UPD_QMF_16 &&
  ------------------
  |  |   31|  6.47k|#define UPD_QMF_16 (16)
  ------------------
  |  Branch (2588:9): [True: 3.23k, False: 11]
  |  Branch (2588:53): [True: 2.15k, False: 1.08k]
  ------------------
 2589|  2.15k|        curr_state->arbdmx_upd_qmf != UPD_QMF_32 && curr_state->arbdmx_upd_qmf != UPD_QMF_18 &&
  ------------------
  |  |   35|  5.39k|#define UPD_QMF_32 (32)
  ------------------
                      curr_state->arbdmx_upd_qmf != UPD_QMF_32 && curr_state->arbdmx_upd_qmf != UPD_QMF_18 &&
  ------------------
  |  |   32|  3.80k|#define UPD_QMF_18 (18)
  ------------------
  |  Branch (2589:9): [True: 560, False: 1.59k]
  |  Branch (2589:53): [True: 530, False: 30]
  ------------------
 2590|    530|        curr_state->arbdmx_upd_qmf != UPD_QMF_30 && curr_state->arbdmx_upd_qmf != UPD_QMF_24)
  ------------------
  |  |   34|  3.77k|#define UPD_QMF_30 (30)
  ------------------
                      curr_state->arbdmx_upd_qmf != UPD_QMF_30 && curr_state->arbdmx_upd_qmf != UPD_QMF_24)
  ------------------
  |  |   33|    502|#define UPD_QMF_24 (24)
  ------------------
  |  Branch (2590:9): [True: 502, False: 28]
  |  Branch (2590:53): [True: 1, False: 501]
  ------------------
 2591|      1|      return IA_XHEAAC_MPS_DEC_EXE_NONFATAL_INVALID_QMF_UPDATE;
  ------------------
  |  |  114|      1|#define IA_XHEAAC_MPS_DEC_EXE_NONFATAL_INVALID_QMF_UPDATE 0x00001813
  ------------------
 2592|       |
 2593|  3.24k|    if ((curr_state->arbdmx_upd_qmf * 1.5f) > (curr_state->upd_qmf * 2))
  ------------------
  |  Branch (2593:9): [True: 1, False: 3.24k]
  ------------------
 2594|      1|      return IA_XHEAAC_MPS_DEC_EXE_NONFATAL_INVALID_QMF_UPDATE;
  ------------------
  |  |  114|      1|#define IA_XHEAAC_MPS_DEC_EXE_NONFATAL_INVALID_QMF_UPDATE 0x00001813
  ------------------
 2595|  3.24k|  }
 2596|       |
 2597|  3.24k|  curr_state->cpc_default = 10;
 2598|  3.24k|  curr_state->ttt_cld_1_default[0] = 15;
 2599|  3.24k|  curr_state->ttt_cld_2_default[0] = 0;
 2600|  3.24k|  curr_state->icc_default = 0;
 2601|  3.24k|  curr_state->arbdmx_gain_default = 0;
 2602|       |
 2603|  3.24k|  if (curr_state->_3d_stereo_inversion) {
  ------------------
  |  Branch (2603:7): [True: 2, False: 3.24k]
  ------------------
 2604|      2|    if (config->bs_3d_audio_hrtf_set == 0) {
  ------------------
  |  Branch (2604:9): [True: 1, False: 1]
  ------------------
 2605|      1|      return IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_HRTF_SET;
  ------------------
  |  |  132|      1|#define IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_HRTF_SET 0xFFFF980D
  ------------------
 2606|      1|    } else {
 2607|      1|      return IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_HRTF_SET;
  ------------------
  |  |  132|      1|#define IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_HRTF_SET 0xFFFF980D
  ------------------
 2608|      1|    }
 2609|      2|  }
 2610|       |
 2611|  3.24k|  switch (curr_state->tree_config) {
 2612|    339|    case TREE_5151:
  ------------------
  |  Branch (2612:5): [True: 339, False: 2.90k]
  ------------------
 2613|    339|      curr_state->num_direct_signals = 1;
 2614|    339|      curr_state->num_decor_signals = 4;
 2615|       |
 2616|    339|      if (curr_state->up_mix_type == 2) {
  ------------------
  |  Branch (2616:11): [True: 0, False: 339]
  ------------------
 2617|      0|        curr_state->num_decor_signals = 1;
 2618|      0|      }
 2619|       |
 2620|    339|      if (curr_state->up_mix_type == 3) {
  ------------------
  |  Branch (2620:11): [True: 0, False: 339]
  ------------------
 2621|      0|        curr_state->num_decor_signals = 3;
 2622|      0|      }
 2623|       |
 2624|    339|      curr_state->num_x_channels = 1;
 2625|    339|      if (curr_state->arbitrary_downmix == 2) {
  ------------------
  |  Branch (2625:11): [True: 161, False: 178]
  ------------------
 2626|    161|        curr_state->num_x_channels += 1;
 2627|    161|      }
 2628|    339|      curr_state->num_v_channels = curr_state->num_direct_signals + curr_state->num_decor_signals;
 2629|    339|      curr_state->num_w_channels = curr_state->num_v_channels;
 2630|    339|      curr_state->w_start_residual_idx = 0;
 2631|    339|      curr_state->ott_cld_default[0] = 15;
 2632|    339|      curr_state->ott_cld_default[1] = 15;
 2633|    339|      curr_state->ott_cld_default[2] = 0;
 2634|    339|      curr_state->ott_cld_default[3] = 0;
 2635|    339|      curr_state->ott_cld_default[4] = 15;
 2636|    339|      break;
 2637|    344|    case TREE_5152:
  ------------------
  |  Branch (2637:5): [True: 344, False: 2.89k]
  ------------------
 2638|    344|      curr_state->num_direct_signals = 1;
 2639|    344|      curr_state->num_decor_signals = 4;
 2640|       |
 2641|    344|      if (curr_state->up_mix_type == 2) {
  ------------------
  |  Branch (2641:11): [True: 0, False: 344]
  ------------------
 2642|      0|        curr_state->num_decor_signals = 1;
 2643|      0|      }
 2644|       |
 2645|    344|      if (curr_state->up_mix_type == 3) {
  ------------------
  |  Branch (2645:11): [True: 0, False: 344]
  ------------------
 2646|      0|        curr_state->num_decor_signals = 2;
 2647|      0|      }
 2648|       |
 2649|    344|      curr_state->num_x_channels = 1;
 2650|    344|      if (curr_state->arbitrary_downmix == 2) {
  ------------------
  |  Branch (2650:11): [True: 18, False: 326]
  ------------------
 2651|     18|        curr_state->num_x_channels += 1;
 2652|     18|      }
 2653|    344|      curr_state->num_v_channels = curr_state->num_direct_signals + curr_state->num_decor_signals;
 2654|    344|      curr_state->num_w_channels = curr_state->num_v_channels;
 2655|    344|      curr_state->w_start_residual_idx = 0;
 2656|    344|      curr_state->ott_cld_default[0] = 15;
 2657|    344|      curr_state->ott_cld_default[1] = 0;
 2658|    344|      curr_state->ott_cld_default[2] = 15;
 2659|    344|      curr_state->ott_cld_default[3] = 15;
 2660|    344|      curr_state->ott_cld_default[4] = 15;
 2661|    344|      break;
 2662|    907|    case TREE_525:
  ------------------
  |  Branch (2662:5): [True: 907, False: 2.33k]
  ------------------
 2663|    907|      curr_state->num_direct_signals = 3;
 2664|       |
 2665|  2.72k|      for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (2665:19): [True: 1.81k, False: 906]
  ------------------
 2666|  1.81k|        switch (p_aux_struct->ttt_config[i][0].mode) {
 2667|    723|          case TTT_MODE_0:
  ------------------
  |  Branch (2667:11): [True: 723, False: 1.09k]
  ------------------
 2668|    723|            p_aux_struct->ttt_config[i][0].use_ttt_decorr = 1;
 2669|    723|            curr_state->num_decor_signals = 3;
 2670|    723|            break;
 2671|    172|          case TTT_MODE_1:
  ------------------
  |  Branch (2671:11): [True: 172, False: 1.64k]
  ------------------
 2672|    284|          case TTT_MODE_2:
  ------------------
  |  Branch (2672:11): [True: 112, False: 1.70k]
  ------------------
 2673|    464|          case TTT_MODE_3:
  ------------------
  |  Branch (2673:11): [True: 180, False: 1.63k]
  ------------------
 2674|    782|          case TTT_MODE_4:
  ------------------
  |  Branch (2674:11): [True: 318, False: 1.49k]
  ------------------
 2675|    953|          case TTT_MODE_5:
  ------------------
  |  Branch (2675:11): [True: 171, False: 1.64k]
  ------------------
 2676|    953|            p_aux_struct->ttt_config[i][0].use_ttt_decorr = 0;
 2677|    953|            curr_state->num_decor_signals = 2;
 2678|    953|            break;
 2679|    138|          default:
  ------------------
  |  Branch (2679:11): [True: 138, False: 1.67k]
  ------------------
 2680|    138|            if (p_bs_config->bs_ttt_mode_low[0] <= 1)
  ------------------
  |  Branch (2680:17): [True: 1, False: 137]
  ------------------
 2681|      1|              return IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_TTT_MODE;
  ------------------
  |  |  133|      1|#define IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_TTT_MODE 0xFFFF980E
  ------------------
 2682|    137|            break;
 2683|  1.81k|        }
 2684|  1.81k|      }
 2685|       |
 2686|    906|      if (curr_state->residual_coding == 1) {
  ------------------
  |  Branch (2686:11): [True: 446, False: 460]
  ------------------
 2687|    446|        curr_state->num_x_channels = 3;
 2688|    460|      } else {
 2689|    460|        curr_state->num_x_channels = 2;
 2690|    460|      }
 2691|       |
 2692|    906|      if (curr_state->arbitrary_downmix == 2) {
  ------------------
  |  Branch (2692:11): [True: 37, False: 869]
  ------------------
 2693|     37|        curr_state->num_x_channels = 5;
 2694|     37|      }
 2695|       |
 2696|    906|      if (curr_state->up_mix_type == 2) {
  ------------------
  |  Branch (2696:11): [True: 0, False: 906]
  ------------------
 2697|      0|        curr_state->num_direct_signals = 2;
 2698|      0|        curr_state->num_decor_signals = 0;
 2699|      0|        curr_state->num_x_channels = 2;
 2700|       |
 2701|      0|        if (curr_state->arbitrary_downmix == 2) {
  ------------------
  |  Branch (2701:13): [True: 0, False: 0]
  ------------------
 2702|      0|          curr_state->num_direct_signals = 4;
 2703|      0|          curr_state->num_x_channels = 5;
 2704|      0|        }
 2705|      0|      }
 2706|       |
 2707|    906|      curr_state->num_v_channels = curr_state->num_direct_signals + curr_state->num_decor_signals;
 2708|    906|      curr_state->num_w_channels = curr_state->num_v_channels;
 2709|    906|      curr_state->w_start_residual_idx = 1;
 2710|    906|      curr_state->ott_cld_default[0] = 15;
 2711|    906|      curr_state->ott_cld_default[1] = 15;
 2712|    906|      curr_state->ott_cld_default[2] = 15;
 2713|    906|      break;
 2714|    333|    case TREE_7271:
  ------------------
  |  Branch (2714:5): [True: 333, False: 2.90k]
  ------------------
 2715|    555|    case TREE_7272:
  ------------------
  |  Branch (2715:5): [True: 222, False: 3.01k]
  ------------------
 2716|    555|      curr_state->num_direct_signals = 3;
 2717|       |
 2718|  1.66k|      for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (2718:19): [True: 1.11k, False: 554]
  ------------------
 2719|  1.11k|        switch (p_aux_struct->ttt_config[i][0].mode) {
 2720|    477|          case TTT_MODE_0:
  ------------------
  |  Branch (2720:11): [True: 477, False: 633]
  ------------------
 2721|    477|            p_aux_struct->ttt_config[i][0].use_ttt_decorr = 1;
 2722|    477|            curr_state->num_decor_signals = 5;
 2723|    477|            break;
 2724|     56|          case TTT_MODE_1:
  ------------------
  |  Branch (2724:11): [True: 56, False: 1.05k]
  ------------------
 2725|    140|          case TTT_MODE_2:
  ------------------
  |  Branch (2725:11): [True: 84, False: 1.02k]
  ------------------
 2726|    313|          case TTT_MODE_3:
  ------------------
  |  Branch (2726:11): [True: 173, False: 937]
  ------------------
 2727|    441|          case TTT_MODE_4:
  ------------------
  |  Branch (2727:11): [True: 128, False: 982]
  ------------------
 2728|    479|          case TTT_MODE_5:
  ------------------
  |  Branch (2728:11): [True: 38, False: 1.07k]
  ------------------
 2729|    479|            p_aux_struct->ttt_config[i][0].use_ttt_decorr = 0;
 2730|    479|            curr_state->num_decor_signals = 5;
 2731|    479|            break;
 2732|    154|          default:
  ------------------
  |  Branch (2732:11): [True: 154, False: 956]
  ------------------
 2733|    154|            if (p_bs_config->bs_ttt_mode_low[0] <= 1)
  ------------------
  |  Branch (2733:17): [True: 1, False: 153]
  ------------------
 2734|      1|              return IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_TTT_MODE;
  ------------------
  |  |  133|      1|#define IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_TTT_MODE 0xFFFF980E
  ------------------
 2735|    153|            break;
 2736|  1.11k|        }
 2737|  1.11k|      }
 2738|       |
 2739|    554|      if (curr_state->residual_coding == 1) {
  ------------------
  |  Branch (2739:11): [True: 32, False: 522]
  ------------------
 2740|     32|        curr_state->num_x_channels = 3;
 2741|    522|      } else {
 2742|    522|        curr_state->num_x_channels = 2;
 2743|    522|      }
 2744|       |
 2745|    554|      if (curr_state->arbitrary_downmix == 2) {
  ------------------
  |  Branch (2745:11): [True: 26, False: 528]
  ------------------
 2746|     26|        curr_state->num_x_channels = 5;
 2747|     26|      }
 2748|       |
 2749|    554|      if (curr_state->up_mix_type == 2) {
  ------------------
  |  Branch (2749:11): [True: 0, False: 554]
  ------------------
 2750|      0|        curr_state->num_direct_signals = 2;
 2751|      0|        curr_state->num_decor_signals = 0;
 2752|      0|        curr_state->num_x_channels = 2;
 2753|       |
 2754|      0|        if (curr_state->arbitrary_downmix == 2) {
  ------------------
  |  Branch (2754:13): [True: 0, False: 0]
  ------------------
 2755|      0|          curr_state->num_direct_signals = 4;
 2756|      0|          curr_state->num_x_channels = 5;
 2757|      0|        }
 2758|      0|      }
 2759|       |
 2760|    554|      curr_state->num_v_channels = curr_state->num_direct_signals + curr_state->num_decor_signals;
 2761|    554|      curr_state->num_w_channels = curr_state->num_v_channels;
 2762|    554|      curr_state->w_start_residual_idx = 1;
 2763|    554|      curr_state->ott_cld_default[0] = 15;
 2764|    554|      curr_state->ott_cld_default[1] = 15;
 2765|    554|      curr_state->ott_cld_default[2] = 15;
 2766|    554|      curr_state->ott_cld_default[3] = 15;
 2767|    554|      curr_state->ott_cld_default[4] = 15;
 2768|    554|      break;
 2769|    168|    case TREE_7571:
  ------------------
  |  Branch (2769:5): [True: 168, False: 3.07k]
  ------------------
 2770|  1.09k|    case TREE_7572:
  ------------------
  |  Branch (2770:5): [True: 928, False: 2.31k]
  ------------------
 2771|  1.09k|      curr_state->num_direct_signals = 6;
 2772|  1.09k|      curr_state->num_decor_signals = 2;
 2773|  1.09k|      curr_state->num_x_channels = 6;
 2774|  1.09k|      curr_state->num_v_channels = curr_state->num_direct_signals + curr_state->num_decor_signals;
 2775|  1.09k|      curr_state->num_w_channels = curr_state->num_v_channels;
 2776|  1.09k|      curr_state->w_start_residual_idx = 0;
 2777|  1.09k|      curr_state->ott_cld_default[0] = 15;
 2778|  1.09k|      curr_state->ott_cld_default[1] = 15;
 2779|  1.09k|      break;
 2780|      0|    default:
  ------------------
  |  Branch (2780:5): [True: 0, False: 3.24k]
  ------------------
 2781|      0|      return IA_XHEAAC_MPS_DEC_EXE_FATAL_UNSUPPRORTED_TREE_CONFIG;
  ------------------
  |  |  124|      0|#define IA_XHEAAC_MPS_DEC_EXE_FATAL_UNSUPPRORTED_TREE_CONFIG 0xFFFF9805
  ------------------
 2782|      0|      break;
 2783|  3.24k|  }
 2784|  3.23k|  return IA_NO_ERROR;
  ------------------
  |  |   23|  3.23k|#define IA_NO_ERROR 0x00000000
  ------------------
 2785|  3.24k|}
ixheaacd_mps_bitdec.c:ixheaacd_parse_extension_config:
  104|  3.29k|    ia_mps_dec_bitdec_tables_struct *ixheaacd_mps_dec_bitdec_tables) {
  105|  3.29k|  WORD32 i, ch, idx, tmp, tmp_open, sac_ext_len, bits_read, n_fill_bits, temp;
  106|  3.29k|  WORD32 ba = bits_available;
  107|       |
  108|  3.29k|  config->sac_ext_cnt = 0;
  109|       |
  110|  3.29k|  WORD32 num_slots = config->bs_frame_length + 1;
  111|       |
  112|  4.21k|  while (ba >= 8) {
  ------------------
  |  Branch (112:10): [True: 965, False: 3.24k]
  ------------------
  113|    965|    ba -= 8;
  114|    965|    temp = ixheaacd_read_bits_buf(it_bit_buff, 8);
  115|    965|    config->bs_sac_ext_type[config->sac_ext_cnt] = (temp >> 4) & FOUR_BIT_MASK;
  ------------------
  |  |  207|    965|#define FOUR_BIT_MASK (0x0000000F)
  ------------------
  116|    965|    sac_ext_len = temp & FOUR_BIT_MASK;
  ------------------
  |  |  207|    965|#define FOUR_BIT_MASK (0x0000000F)
  ------------------
  117|    965|    if (sac_ext_len == 15) {
  ------------------
  |  Branch (117:9): [True: 4, False: 961]
  ------------------
  118|      4|      sac_ext_len += ixheaacd_read_bits_buf(it_bit_buff, 8);
  119|      4|      ba -= 8;
  120|      4|      if (sac_ext_len == 15 + 255) {
  ------------------
  |  Branch (120:11): [True: 1, False: 3]
  ------------------
  121|      1|        sac_ext_len += ixheaacd_read_bits_buf(it_bit_buff, 16);
  122|      1|        ba -= 16;
  123|      1|      }
  124|      4|    }
  125|       |
  126|    965|    tmp = (WORD32)(((it_bit_buff->ptr_read_next - it_bit_buff->ptr_bit_buf_base + 1) << 3) -
  127|    965|                   (it_bit_buff->bit_pos + 1));
  128|       |
  129|    965|    switch (config->bs_sac_ext_type[config->sac_ext_cnt]) {
  130|    653|      case EXT_TYPE_0:
  ------------------
  |  Branch (130:7): [True: 653, False: 312]
  ------------------
  131|    653|        config->bs_residual_coding = 1;
  132|    653|        temp = ixheaacd_read_bits_buf(it_bit_buff, 6);
  133|    653|        config->bs_residual_sampling_freq_index = (temp >> 2) & FOUR_BIT_MASK;
  ------------------
  |  |  207|    653|#define FOUR_BIT_MASK (0x0000000F)
  ------------------
  134|    653|        if (config->bs_residual_sampling_freq_index > MAX_RES_SAMP_FREQ_IDX) {
  ------------------
  |  |   71|    653|#define MAX_RES_SAMP_FREQ_IDX 11
  ------------------
  |  Branch (134:13): [True: 3, False: 650]
  ------------------
  135|      3|          return IA_FATAL_ERROR;
  ------------------
  |  |   25|      3|#define IA_FATAL_ERROR 0x80000000
  ------------------
  136|      3|        }
  137|    650|        config->bs_residual_frames_per_spatial_frame = temp & TWO_BIT_MASK;
  ------------------
  |  |  205|    650|#define TWO_BIT_MASK (0x00000003)
  ------------------
  138|       |
  139|    650|        if (!ixheaacd_validate_res_frames_per_spatial_frame(
  ------------------
  |  Branch (139:13): [True: 9, False: 641]
  ------------------
  140|    650|                num_slots, config->bs_residual_frames_per_spatial_frame)) {
  141|      9|          return IA_FATAL_ERROR;
  ------------------
  |  |   25|      9|#define IA_FATAL_ERROR 0x80000000
  ------------------
  142|      9|        }
  143|       |
  144|  3.30k|        for (i = 0; i < num_ott_boxes + num_ttt_boxes; i++) {
  ------------------
  |  Branch (144:21): [True: 2.67k, False: 634]
  ------------------
  145|  2.67k|          config->bs_residual_present[i] = ixheaacd_read_bits_buf(it_bit_buff, 1);
  146|  2.67k|          if (config->bs_residual_present[i]) {
  ------------------
  |  Branch (146:15): [True: 802, False: 1.87k]
  ------------------
  147|    802|            config->bs_residual_bands[i] = ixheaacd_read_bits_buf(it_bit_buff, 5);
  148|    802|            if (config->bs_residual_bands[i] > MAX_PARAMETER_BANDS)
  ------------------
  |  |   55|    802|#define MAX_PARAMETER_BANDS (28)
  ------------------
  |  Branch (148:17): [True: 7, False: 795]
  ------------------
  149|      7|            {
  150|      7|              return IA_FATAL_ERROR;
  ------------------
  |  |   25|      7|#define IA_FATAL_ERROR 0x80000000
  ------------------
  151|      7|            }
  152|    802|          }
  153|  2.67k|        }
  154|    634|        break;
  155|       |
  156|    634|      case EXT_TYPE_1:
  ------------------
  |  Branch (156:7): [True: 266, False: 699]
  ------------------
  157|    266|        config->bs_arbitrary_downmix = 2;
  158|       |
  159|    266|        temp = ixheaacd_read_bits_buf(it_bit_buff, 11);
  160|    266|        config->bs_arbitrary_downmix_residual_sampling_freq_index = (temp >> 7) & FOUR_BIT_MASK;
  ------------------
  |  |  207|    266|#define FOUR_BIT_MASK (0x0000000F)
  ------------------
  161|    266|        if (config->bs_arbitrary_downmix_residual_sampling_freq_index > MAX_RES_SAMP_FREQ_IDX) {
  ------------------
  |  |   71|    266|#define MAX_RES_SAMP_FREQ_IDX 11
  ------------------
  |  Branch (161:13): [True: 1, False: 265]
  ------------------
  162|      1|          return IA_FATAL_ERROR;
  ------------------
  |  |   25|      1|#define IA_FATAL_ERROR 0x80000000
  ------------------
  163|      1|        }
  164|    265|        config->bs_arbitrary_downmix_residual_frames_per_spatial_frame =
  165|    265|            (temp >> 5) & TWO_BIT_MASK;
  ------------------
  |  |  205|    265|#define TWO_BIT_MASK (0x00000003)
  ------------------
  166|       |
  167|    265|        if (!ixheaacd_validate_res_frames_per_spatial_frame(
  ------------------
  |  Branch (167:13): [True: 2, False: 263]
  ------------------
  168|    265|                num_slots, config->bs_arbitrary_downmix_residual_frames_per_spatial_frame)) {
  169|      2|          return IA_FATAL_ERROR;
  ------------------
  |  |   25|      2|#define IA_FATAL_ERROR 0x80000000
  ------------------
  170|      2|        }
  171|       |
  172|    263|        config->bs_arbitrary_downmix_residual_bands = temp & FIVE_BIT_MASK;
  ------------------
  |  |  208|    263|#define FIVE_BIT_MASK (0x0000001F)
  ------------------
  173|    263|        if (config->bs_arbitrary_downmix_residual_bands >=
  ------------------
  |  Branch (173:13): [True: 2, False: 261]
  ------------------
  174|    263|            ixheaacd_freq_res_table[config->bs_freq_res]) {
  175|      2|          return IA_FATAL_ERROR;
  ------------------
  |  |   25|      2|#define IA_FATAL_ERROR 0x80000000
  ------------------
  176|      2|        }
  177|       |
  178|    261|        break;
  179|       |
  180|    261|      case EXT_TYPE_2:
  ------------------
  |  Branch (180:7): [True: 38, False: 927]
  ------------------
  181|     38|        config->arbitrary_tree = 1;
  182|     38|        config->num_out_chan_at = 0;
  183|     38|        config->num_ott_boxes_at = 0;
  184|    229|        for (ch = 0; ch < num_out_chan; ch++) {
  ------------------
  |  Branch (184:22): [True: 202, False: 27]
  ------------------
  185|    202|          tmp_open = 1;
  186|    202|          idx = 0;
  187|    542|          while (tmp_open > 0) {
  ------------------
  |  Branch (187:18): [True: 351, False: 191]
  ------------------
  188|    351|            config->bs_ott_box_present_at[ch][idx] = ixheaacd_read_bits_buf(it_bit_buff, 1);
  189|    351|            if (config->bs_ott_box_present_at[ch][idx]) {
  ------------------
  |  Branch (189:17): [True: 94, False: 257]
  ------------------
  190|     94|              config->num_ott_boxes_at++;
  191|     94|              tmp_open++;
  192|    257|            } else {
  193|    257|              config->num_out_chan_at++;
  194|    257|              tmp_open--;
  195|    257|            }
  196|    351|            if (config->num_ott_boxes_at >= 56) return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
  |  Branch (196:17): [True: 0, False: 351]
  ------------------
  197|    351|            if (config->num_out_chan_at > MAX_OUTPUT_CHANNELS_AT_MPS) return IA_FATAL_ERROR;
  ------------------
  |  |   86|    351|#define MAX_OUTPUT_CHANNELS_AT_MPS (8)
  ------------------
                          if (config->num_out_chan_at > MAX_OUTPUT_CHANNELS_AT_MPS) return IA_FATAL_ERROR;
  ------------------
  |  |   25|      4|#define IA_FATAL_ERROR 0x80000000
  ------------------
  |  Branch (197:17): [True: 4, False: 347]
  ------------------
  198|    347|            idx++;
  199|    347|            if (idx >= MAX_ARBITRARY_TREE_INDEX) return IA_FATAL_ERROR;
  ------------------
  |  |   69|    347|#define MAX_ARBITRARY_TREE_INDEX ((1 << (MAX_ARBITRARY_TREE_LEVELS + 1)) - 1)
  |  |  ------------------
  |  |  |  |   66|    347|#define MAX_ARBITRARY_TREE_LEVELS (2)
  |  |  ------------------
  ------------------
                          if (idx >= MAX_ARBITRARY_TREE_INDEX) return IA_FATAL_ERROR;
  ------------------
  |  |   25|      7|#define IA_FATAL_ERROR 0x80000000
  ------------------
  |  Branch (199:17): [True: 7, False: 340]
  ------------------
  200|    347|          }
  201|    202|        }
  202|       |
  203|     60|        for (i = 0; i < config->num_ott_boxes_at; i++) {
  ------------------
  |  Branch (203:21): [True: 34, False: 26]
  ------------------
  204|     34|          temp = ixheaacd_read_bits_buf(it_bit_buff, 2);
  205|     34|          config->bs_ott_default_cld_at[i] = (temp >> 1) & ONE_BIT_MASK;
  ------------------
  |  |  204|     34|#define ONE_BIT_MASK (0x00000001)
  ------------------
  206|     34|          config->bs_ott_mode_lfe_at[i] = temp & ONE_BIT_MASK;
  ------------------
  |  |  204|     34|#define ONE_BIT_MASK (0x00000001)
  ------------------
  207|     34|          if (config->bs_ott_mode_lfe_at[i]) {
  ------------------
  |  Branch (207:15): [True: 14, False: 20]
  ------------------
  208|     14|            config->bs_ott_bands_at[i] = ixheaacd_read_bits_buf(it_bit_buff, 5);
  209|     14|            if (config->bs_ott_bands_at[i] > MAX_PARAMETER_BANDS) return IA_FATAL_ERROR;
  ------------------
  |  |   55|     14|#define MAX_PARAMETER_BANDS (28)
  ------------------
                          if (config->bs_ott_bands_at[i] > MAX_PARAMETER_BANDS) return IA_FATAL_ERROR;
  ------------------
  |  |   25|      1|#define IA_FATAL_ERROR 0x80000000
  ------------------
  |  Branch (209:17): [True: 1, False: 13]
  ------------------
  210|     20|          } else {
  211|     20|            config->bs_ott_bands_at[i] =
  212|     20|                ixheaacd_mps_dec_bitdec_tables->freq_res_table[config->bs_freq_res];
  213|     20|          }
  214|     34|        }
  215|       |
  216|    203|        for (i = 0; i < config->num_out_chan_at; i++) {
  ------------------
  |  Branch (216:21): [True: 177, False: 26]
  ------------------
  217|    177|          config->bs_output_channel_pos_at[i] = ixheaacd_read_bits_buf(it_bit_buff, 5);
  218|    177|        }
  219|       |
  220|     26|        break;
  221|       |
  222|      5|      default:
  ------------------
  |  Branch (222:7): [True: 5, False: 960]
  ------------------
  223|      5|        return IA_XHEAAC_MPS_DEC_EXE_NONFATAL_INVALID_EXTENSION_TYPE;
  ------------------
  |  |  113|      5|#define IA_XHEAAC_MPS_DEC_EXE_NONFATAL_INVALID_EXTENSION_TYPE 0x00001812
  ------------------
  224|    965|    }
  225|       |
  226|    917|    bits_read = (WORD32)(((it_bit_buff->ptr_read_next - it_bit_buff->ptr_bit_buf_base + 1) << 3) -
  227|    917|                         (it_bit_buff->bit_pos + 1) - tmp);
  228|    917|    n_fill_bits = 8 * sac_ext_len - bits_read;
  229|       |
  230|  3.36k|    while (n_fill_bits > 7) {
  ------------------
  |  Branch (230:12): [True: 2.45k, False: 917]
  ------------------
  231|  2.45k|      ixheaacd_read_bits_buf(it_bit_buff, 8);
  232|  2.45k|      n_fill_bits -= 8;
  233|  2.45k|    }
  234|    917|    if (n_fill_bits > 0) {
  ------------------
  |  Branch (234:9): [True: 435, False: 482]
  ------------------
  235|    435|      ixheaacd_read_bits_buf(it_bit_buff, n_fill_bits);
  236|    435|    }
  237|       |
  238|    917|    ba -= 8 * sac_ext_len;
  239|    917|    config->sac_ext_cnt++;
  240|    917|    if (config->sac_ext_cnt >= MAX_NUM_EXT_TYPES) {
  ------------------
  |  |   61|    917|#define MAX_NUM_EXT_TYPES (8)
  ------------------
  |  Branch (240:9): [True: 2, False: 915]
  ------------------
  241|      2|      return IA_FATAL_ERROR;
  ------------------
  |  |   25|      2|#define IA_FATAL_ERROR 0x80000000
  ------------------
  242|      2|    }
  243|    917|  }
  244|       |
  245|  3.24k|  return IA_NO_ERROR;
  ------------------
  |  |   23|  3.24k|#define IA_NO_ERROR 0x00000000
  ------------------
  246|  3.29k|}
ixheaacd_mps_bitdec.c:ixheaacd_ec_data_dec:
  498|  70.1k|                                         WORD32 stop_band) {
  499|  70.1k|  IA_ERRORCODE error_code = IA_NO_ERROR;
  ------------------
  |  |   23|  70.1k|#define IA_NO_ERROR 0x00000000
  ------------------
  500|  70.1k|  WORD32 i, pb, data_sets, set_idx, bs_data_pair, data_bands, old_quant_coarse_xxx, temp;
  501|  70.1k|  WORD32 a_strides[MAX_PARAMETER_BANDS + 1] = {0};
  502|       |
  503|  70.1k|  ia_mps_dec_spatial_bs_frame_struct *frame = pstr_mps_state->bs_frame;
  504|  70.1k|  ia_bit_buf_struct *mps_bit_buf = pstr_mps_state->ptr_mps_bit_buff;
  505|       |
  506|  70.1k|  data_sets = 0;
  507|   196k|  for (i = 0; i < pstr_mps_state->num_parameter_sets; i++) {
  ------------------
  |  Branch (507:15): [True: 126k, False: 70.1k]
  ------------------
  508|   126k|    ll_data->bs_xxx_data_mode[param_idx][i] = ixheaacd_read_bits_buf(mps_bit_buf, 2);
  509|   126k|    if (ll_data->bs_xxx_data_mode[param_idx][i] == 3) {
  ------------------
  |  Branch (509:9): [True: 23.7k, False: 102k]
  ------------------
  510|  23.7k|      data_sets++;
  511|  23.7k|    }
  512|   126k|  }
  513|  70.1k|  set_idx = 0;
  514|  70.1k|  old_quant_coarse_xxx = ll_data->bs_quant_coarse_xxx_prev[param_idx];
  515|       |
  516|  89.4k|  while (set_idx < data_sets) {
  ------------------
  |  Branch (516:10): [True: 19.3k, False: 70.1k]
  ------------------
  517|  19.3k|    temp = ixheaacd_read_bits_buf(mps_bit_buf, 4);
  518|  19.3k|    bs_data_pair = (temp >> 3) & ONE_BIT_MASK;
  ------------------
  |  |  204|  19.3k|#define ONE_BIT_MASK (0x00000001)
  ------------------
  519|  19.3k|    ll_data->bs_quant_coarse_xxx[param_idx][set_idx] = (temp >> 2) & ONE_BIT_MASK;
  ------------------
  |  |  204|  19.3k|#define ONE_BIT_MASK (0x00000001)
  ------------------
  520|  19.3k|    ll_data->bs_freq_res_stride_xxx[param_idx][set_idx] = temp & TWO_BIT_MASK;
  ------------------
  |  |  205|  19.3k|#define TWO_BIT_MASK (0x00000003)
  ------------------
  521|       |
  522|  19.3k|    if (set_idx == 7 && bs_data_pair == 1) {
  ------------------
  |  Branch (522:9): [True: 24, False: 19.2k]
  |  Branch (522:25): [True: 3, False: 21]
  ------------------
  523|      3|      if (pstr_mps_state->ec_flag) {
  ------------------
  |  Branch (523:11): [True: 0, False: 3]
  ------------------
  524|      0|        bs_data_pair = 0;
  525|      3|      } else {
  526|      3|        return IA_FATAL_ERROR;
  ------------------
  |  |   25|      3|#define IA_FATAL_ERROR 0x80000000
  ------------------
  527|      3|      }
  528|      3|    }
  529|       |
  530|  19.3k|    if (ll_data->bs_quant_coarse_xxx[param_idx][set_idx] != old_quant_coarse_xxx) {
  ------------------
  |  Branch (530:9): [True: 6.52k, False: 12.7k]
  ------------------
  531|  6.52k|      if (old_quant_coarse_xxx) {
  ------------------
  |  Branch (531:11): [True: 960, False: 5.56k]
  ------------------
  532|    960|        ixheaacd_coarse_2_fine(lastdata[box_idx], datatype, start_band, stop_band - start_band);
  533|  5.56k|      } else {
  534|  5.56k|        ixheaacd_fine_2_coarse(lastdata[box_idx], start_band, stop_band - start_band);
  535|  5.56k|      }
  536|  6.52k|    }
  537|       |
  538|  19.3k|    data_bands = ixheaacd_get_stride_map(ll_data->bs_freq_res_stride_xxx[param_idx][set_idx],
  539|  19.3k|                                         start_band, stop_band, a_strides,
  540|  19.3k|                                         pstr_mps_state->ia_mps_dec_mps_table.bitdec_table_ptr);
  541|       |
  542|   130k|    for (pb = 0; pb < data_bands; pb++) {
  ------------------
  |  Branch (542:18): [True: 111k, False: 19.3k]
  ------------------
  543|   111k|      lastdata[box_idx][start_band + pb] = lastdata[box_idx][a_strides[pb]];
  544|   111k|    }
  545|       |
  546|  19.3k|    error_code = ixheaacd_mps_ecdatapairdec(
  547|  19.3k|        mps_bit_buf, data[box_idx], lastdata[box_idx], datatype, set_idx, start_band, data_bands,
  548|  19.3k|        bs_data_pair, ll_data->bs_quant_coarse_xxx[param_idx][set_idx],
  549|  19.3k|        (!frame->bs_independency_flag || (set_idx > 0)), 0, 1, pstr_mps_state->ec_flag);
  ------------------
  |  Branch (549:10): [True: 10.7k, False: 8.59k]
  |  Branch (549:42): [True: 2.76k, False: 5.82k]
  ------------------
  550|  19.3k|    if (error_code != IA_NO_ERROR) return error_code;
  ------------------
  |  |   23|  19.3k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (550:9): [True: 6, False: 19.3k]
  ------------------
  551|       |
  552|  19.3k|    if (datatype == CLD) {
  ------------------
  |  |   23|  19.3k|#define CLD (0)
  ------------------
  |  Branch (552:9): [True: 14.7k, False: 4.60k]
  ------------------
  553|  14.7k|      WORD32 band;
  554|  65.3k|      for (i = 0; i < pstr_mps_state->num_parameter_sets; i++) {
  ------------------
  |  Branch (554:19): [True: 50.7k, False: 14.6k]
  ------------------
  555|   770k|        for (band = start_band; band < stop_band; band++) {
  ------------------
  |  Branch (555:33): [True: 719k, False: 50.6k]
  ------------------
  556|   719k|          if (data[box_idx][i][band] > 15 || data[box_idx][i][band] < -15) {
  ------------------
  |  Branch (556:15): [True: 35, False: 719k]
  |  Branch (556:46): [True: 7, False: 719k]
  ------------------
  557|     42|            return IA_FATAL_ERROR;
  ------------------
  |  |   25|     42|#define IA_FATAL_ERROR 0x80000000
  ------------------
  558|     42|          }
  559|   719k|        }
  560|  50.7k|      }
  561|  14.7k|    } else if (datatype == ICC) {
  ------------------
  |  |   24|  4.60k|#define ICC (1)
  ------------------
  |  Branch (561:16): [True: 3.45k, False: 1.15k]
  ------------------
  562|  3.45k|      WORD32 band;
  563|  18.7k|      for (i = 0; i < pstr_mps_state->num_parameter_sets; i++) {
  ------------------
  |  Branch (563:19): [True: 15.3k, False: 3.42k]
  ------------------
  564|   224k|        for (band = start_band; band < stop_band; band++) {
  ------------------
  |  Branch (564:33): [True: 208k, False: 15.3k]
  ------------------
  565|   208k|          if (data[box_idx][i][band] > 7 || data[box_idx][i][band] < 0) {
  ------------------
  |  Branch (565:15): [True: 13, False: 208k]
  |  Branch (565:45): [True: 21, False: 208k]
  ------------------
  566|     34|            return IA_FATAL_ERROR;
  ------------------
  |  |   25|     34|#define IA_FATAL_ERROR 0x80000000
  ------------------
  567|     34|          }
  568|   208k|        }
  569|  15.3k|      }
  570|  3.45k|    }
  571|       |
  572|   128k|    for (pb = 0; pb < data_bands; pb++) {
  ------------------
  |  Branch (572:18): [True: 109k, False: 19.2k]
  ------------------
  573|   411k|      for (i = a_strides[pb]; i < a_strides[pb + 1]; i++) {
  ------------------
  |  Branch (573:31): [True: 302k, False: 109k]
  ------------------
  574|   302k|        lastdata[box_idx][i] = data[box_idx][set_idx + bs_data_pair][start_band + pb];
  575|   302k|      }
  576|   109k|    }
  577|       |
  578|  19.2k|    old_quant_coarse_xxx = ll_data->bs_quant_coarse_xxx[param_idx][set_idx];
  579|       |
  580|  19.2k|    if (bs_data_pair) {
  ------------------
  |  Branch (580:9): [True: 11.8k, False: 7.35k]
  ------------------
  581|  11.8k|      ll_data->bs_quant_coarse_xxx[param_idx][set_idx + 1] =
  582|  11.8k|          ll_data->bs_quant_coarse_xxx[param_idx][set_idx];
  583|  11.8k|      ll_data->bs_freq_res_stride_xxx[param_idx][set_idx + 1] =
  584|  11.8k|          ll_data->bs_freq_res_stride_xxx[param_idx][set_idx];
  585|  11.8k|    }
  586|  19.2k|    set_idx += bs_data_pair + 1;
  587|  19.2k|  }
  588|  70.1k|  return error_code;
  589|  70.1k|}
ixheaacd_mps_bitdec.c:ixheaacd_coarse_2_fine:
  445|  6.88k|                                   WORD32 num_bands) {
  446|  6.88k|  WORD32 i;
  447|       |
  448|  79.4k|  for (i = start_band; i < start_band + num_bands; i++) {
  ------------------
  |  Branch (448:24): [True: 72.5k, False: 6.88k]
  ------------------
  449|  72.5k|    data[i] <<= 1;
  450|  72.5k|  }
  451|       |
  452|  6.88k|  if (data_type == CLD) {
  ------------------
  |  |   23|  6.88k|#define CLD (0)
  ------------------
  |  Branch (452:7): [True: 4.98k, False: 1.89k]
  ------------------
  453|  51.6k|    for (i = start_band; i < start_band + num_bands; i++) {
  ------------------
  |  Branch (453:26): [True: 46.6k, False: 4.98k]
  ------------------
  454|  46.6k|      if (data[i] == -14)
  ------------------
  |  Branch (454:11): [True: 7.30k, False: 39.3k]
  ------------------
  455|  7.30k|        data[i] = -15;
  456|  39.3k|      else if (data[i] == 14)
  ------------------
  |  Branch (456:16): [True: 6.90k, False: 32.4k]
  ------------------
  457|  6.90k|        data[i] = 15;
  458|  46.6k|    }
  459|  4.98k|  }
  460|  6.88k|}
ixheaacd_mps_bitdec.c:ixheaacd_fine_2_coarse:
  462|  5.56k|static VOID ixheaacd_fine_2_coarse(WORD32 *data, WORD32 start_band, WORD32 num_bands) {
  463|  5.56k|  WORD32 i;
  464|       |
  465|  78.0k|  for (i = start_band; i < start_band + num_bands; i++) {
  ------------------
  |  Branch (465:24): [True: 72.5k, False: 5.56k]
  ------------------
  466|  72.5k|    data[i] >>= 1;
  467|  72.5k|  }
  468|  5.56k|}
ixheaacd_mps_bitdec.c:ixheaacd_get_stride_map:
  472|  19.3k|    ia_mps_dec_bitdec_tables_struct *ixheaacd_mps_dec_bitdec_tables) {
  473|  19.3k|  WORD32 i, pb, pb_stride, data_bands, str_offset;
  474|       |
  475|  19.3k|  pb_stride = ixheaacd_mps_dec_bitdec_tables->pb_stride_table[freq_res_stride];
  476|  19.3k|  data_bands = (stop_band - start_band - 1) / pb_stride + 1;
  477|       |
  478|  19.3k|  a_strides[0] = start_band;
  479|   130k|  for (pb = 1; pb <= data_bands; pb++) {
  ------------------
  |  Branch (479:16): [True: 111k, False: 19.3k]
  ------------------
  480|   111k|    a_strides[pb] = a_strides[pb - 1] + pb_stride;
  481|   111k|  }
  482|  19.3k|  str_offset = 0;
  483|   116k|  while (a_strides[data_bands] > stop_band) {
  ------------------
  |  Branch (483:10): [True: 97.4k, False: 19.3k]
  ------------------
  484|  97.4k|    if (str_offset < data_bands) str_offset++;
  ------------------
  |  Branch (484:9): [True: 9.55k, False: 87.9k]
  ------------------
  485|   201k|    for (i = str_offset; i <= data_bands; i++) {
  ------------------
  |  Branch (485:26): [True: 104k, False: 97.4k]
  ------------------
  486|   104k|      a_strides[i]--;
  487|   104k|    }
  488|  97.4k|  }
  489|       |
  490|  19.3k|  return data_bands;
  491|  19.3k|}
ixheaacd_mps_bitdec.c:ixheaacd_parse_arbitrary_downmix_data:
  592|  1.14k|    ia_heaac_mps_state_struct *pstr_mps_state) {
  593|  1.14k|  ia_mps_dec_spatial_bs_frame_struct *frame = pstr_mps_state->bs_frame;
  594|  1.14k|  IA_ERRORCODE error_code = IA_NO_ERROR;
  ------------------
  |  |   23|  1.14k|#define IA_NO_ERROR 0x00000000
  ------------------
  595|  1.14k|  WORD32 offset = pstr_mps_state->num_ott_boxes + 4 * pstr_mps_state->num_ttt_boxes;
  596|  1.14k|  WORD32 num_input_channels = pstr_mps_state->num_input_channels;
  597|  1.14k|  WORD32 bitstream_parameter_bands = pstr_mps_state->bitstream_parameter_bands;
  598|  1.14k|  WORD32 ch;
  599|       |
  600|  2.88k|  for (ch = 0; ch < num_input_channels; ch++) {
  ------------------
  |  Branch (600:16): [True: 1.75k, False: 1.13k]
  ------------------
  601|  1.75k|    error_code = ixheaacd_ec_data_dec(pstr_mps_state, &frame->cld_lossless_data,
  602|  1.75k|                                      frame->cmp_arbdmx_gain_idx, frame->cmp_arbdmx_gain_idx_prev,
  603|  1.75k|                                      CLD, ch, offset + ch, 0, bitstream_parameter_bands);
  ------------------
  |  |   23|  1.75k|#define CLD (0)
  ------------------
  604|  1.75k|    if (error_code != IA_NO_ERROR) return error_code;
  ------------------
  |  |   23|  1.75k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (604:9): [True: 18, False: 1.73k]
  ------------------
  605|  1.75k|  }
  606|  1.13k|  return error_code;
  607|  1.14k|}
ixheaacd_mps_bitdec.c:ixheaacd_parse_extension_frame:
  714|  13.5k|static IA_ERRORCODE ixheaacd_parse_extension_frame(ia_heaac_mps_state_struct *pstr_mps_state) {
  715|  13.5k|  WORD32 i, fr, gr, offset, ch;
  716|  13.5k|  WORD32 ext_num, sac_ext_type, sac_ext_len, tmp, bits_read, n_fill_bits, temp;
  717|  13.5k|  WORD32 channel_grouping[MAX_INPUT_CHANNELS_MPS];
  718|       |
  719|  13.5k|  ia_mps_dec_spatial_bs_frame_struct *frame = pstr_mps_state->bs_frame;
  720|  13.5k|  ia_mps_spatial_bs_config_struct *p_bs_config = &pstr_mps_state->bs_config;
  721|       |
  722|  13.5k|  ia_mps_dec_residual_aac_tables_struct *aac_tables_ptr =
  723|  13.5k|      pstr_mps_state->ia_mps_dec_mps_table.aac_tab;
  724|       |
  725|  13.5k|  WORD32 arbdmx_upd_qmf = pstr_mps_state->arbdmx_upd_qmf;
  726|  13.5k|  WORD32 num_ott_boxes = pstr_mps_state->num_ott_boxes;
  727|  13.5k|  WORD32 num_input_channels = pstr_mps_state->num_input_channels;
  728|  13.5k|  WORD32 num_ttt_boxes = pstr_mps_state->num_ttt_boxes;
  729|  13.5k|  WORD32 arbdmx_frames_per_spatial_frame = pstr_mps_state->arbdmx_frames_per_spatial_frame;
  730|  13.5k|  WORD32 *p_res_mdct, *p_mdct_res;
  731|       |
  732|  13.5k|  WORD32 sfidx;
  733|  13.5k|  VOID *free_scratch = pstr_mps_state->mps_scratch_mem_v;
  734|  13.5k|  ia_mps_dec_residual_sfband_info_struct *p_sfband_info_tab = &pstr_mps_state->sfband_info_tab;
  735|  13.5k|  ia_bit_buf_struct *mps_bit_buf = pstr_mps_state->ptr_mps_bit_buff;
  736|  13.5k|  IA_ERRORCODE error_code = IA_NO_ERROR;
  ------------------
  |  |   23|  13.5k|#define IA_NO_ERROR 0x00000000
  ------------------
  737|       |
  738|  40.5k|  for (ch = 0; ch < 2; ch++) {
  ------------------
  |  Branch (738:16): [True: 27.0k, False: 13.5k]
  ------------------
  739|  27.0k|    pstr_mps_state->p_aac_decoder_channel_info[ch] = free_scratch;
  740|  27.0k|    free_scratch =
  741|  27.0k|        (WORD8 *)free_scratch +
  742|  27.0k|        IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_mps_dec_residual_channel_info_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  27.0k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  743|  27.0k|    pstr_mps_state->p_aac_decoder_dynamic_data_init[ch] = free_scratch;
  744|  27.0k|    free_scratch =
  745|  27.0k|        (WORD8 *)free_scratch +
  746|  27.0k|        IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_mps_dec_residual_dynamic_data_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  27.0k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  747|  27.0k|    pstr_mps_state->p_aac_decoder_channel_info[ch]->p_scale_factor =
  748|  27.0k|        pstr_mps_state->p_aac_decoder_dynamic_data_init[ch]->a_scale_factor;
  749|  27.0k|    pstr_mps_state->p_aac_decoder_channel_info[ch]->p_code_book =
  750|  27.0k|        pstr_mps_state->p_aac_decoder_dynamic_data_init[ch]->a_code_book;
  751|  27.0k|    pstr_mps_state->p_aac_decoder_channel_info[ch]->p_spectral_coefficient = free_scratch;
  752|  27.0k|    free_scratch = (WORD8 *)free_scratch + IXHEAAC_GET_SIZE_ALIGNED(4096, BYTE_ALIGN_8);
  ------------------
  |  |   87|  27.0k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  753|  27.0k|    pstr_mps_state->p_aac_decoder_channel_info[ch]->p_tns_scratch = free_scratch;
  754|  27.0k|    free_scratch = (WORD8 *)free_scratch + IXHEAAC_GET_SIZE_ALIGNED(4096, BYTE_ALIGN_8);
  ------------------
  |  |   87|  27.0k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  755|  27.0k|    pstr_mps_state->p_aac_decoder_channel_info[ch]->ics_info.frame_length = AAC_FRAME_LENGTH;
  ------------------
  |  |   23|  27.0k|#define AAC_FRAME_LENGTH (1024)
  ------------------
  756|  27.0k|    pstr_mps_state->p_aac_decoder_channel_info[ch]->common_window = 0;
  757|  27.0k|  }
  758|  13.5k|  if (pstr_mps_state->arbitrary_downmix == 2)
  ------------------
  |  Branch (758:7): [True: 247, False: 13.2k]
  ------------------
  759|    247|    sfidx = p_bs_config->bs_arbitrary_downmix_residual_sampling_freq_index;
  760|  13.2k|  else
  761|  13.2k|    sfidx = p_bs_config->bs_residual_sampling_freq_index;
  762|  13.5k|  {
  763|  13.5k|    WORD16 *psfb_idx[2];
  764|  13.5k|    const WORD8 *psfb_width[2];
  765|  13.5k|    WORD width_idx;
  766|  13.5k|    WORD32 j;
  767|       |
  768|  13.5k|    pstr_mps_state->p_aac_decoder_channel_info[0]->ics_info.sampling_rate_index = sfidx;
  769|  13.5k|    psfb_idx[0] = p_sfband_info_tab->sfb_long_idx;
  770|  13.5k|    psfb_idx[1] = p_sfband_info_tab->sfb_short_idx;
  771|  13.5k|    psfb_width[0] = aac_tables_ptr->scale_factor_bands_long[sfidx];
  772|  13.5k|    psfb_width[1] = aac_tables_ptr->scale_factor_bands_short[sfidx];
  773|       |
  774|  40.5k|    for (j = 1; j >= 0; j--) {
  ------------------
  |  Branch (774:17): [True: 27.0k, False: 13.5k]
  ------------------
  775|  27.0k|      const WORD8 *ptr_w = psfb_width[j];
  776|  27.0k|      WORD16 *ptr_i = psfb_idx[j];
  777|  27.0k|      width_idx = 0;
  778|  27.0k|      *ptr_i++ = width_idx;
  779|   720k|      do {
  780|   720k|        width_idx += (*ptr_w++);
  781|   720k|        *ptr_i++ = width_idx;
  782|   720k|      } while (*ptr_w != -1);
  ------------------
  |  Branch (782:16): [True: 693k, False: 27.0k]
  ------------------
  783|       |
  784|  27.0k|      pstr_mps_state->tot_sf_bands_ls[j] = (WORD8)(ptr_w - psfb_width[j]);
  785|  27.0k|    }
  786|       |
  787|  13.5k|    {
  788|  13.5k|      aac_tables_ptr->sfb_index_long = p_sfband_info_tab->sfb_long_idx;
  789|  13.5k|      aac_tables_ptr->sfb_index_short = p_sfband_info_tab->sfb_short_idx;
  790|  13.5k|      aac_tables_ptr->sfb_index_long_width = (WORD8 *)psfb_width[0];
  791|  13.5k|      aac_tables_ptr->sfb_index_short_width = (WORD8 *)psfb_width[1];
  792|  13.5k|    }
  793|  13.5k|  }
  794|       |
  795|  14.2k|  for (ext_num = 0; ext_num < p_bs_config->sac_ext_cnt; ext_num++) {
  ------------------
  |  Branch (795:21): [True: 814, False: 13.3k]
  ------------------
  796|    814|    sac_ext_type = p_bs_config->bs_sac_ext_type[ext_num];
  797|       |
  798|    814|    if (sac_ext_type < 12) {
  ------------------
  |  Branch (798:9): [True: 814, False: 0]
  ------------------
  799|    814|      sac_ext_len = ixheaacd_read_bits_buf(mps_bit_buf, 8);
  800|    814|      if (sac_ext_len == 255) {
  ------------------
  |  Branch (800:11): [True: 1, False: 813]
  ------------------
  801|      1|        sac_ext_len += ixheaacd_read_bits_buf(mps_bit_buf, 16);
  802|      1|      }
  803|       |
  804|    814|      tmp = (WORD32)(((mps_bit_buf->ptr_read_next - mps_bit_buf->ptr_bit_buf_base + 1) << 3) -
  805|    814|                     (mps_bit_buf->bit_pos + 1));
  806|       |
  807|    814|      switch (sac_ext_type) {
  808|    561|        case EXT_TYPE_0:
  ------------------
  |  Branch (808:9): [True: 561, False: 253]
  ------------------
  809|    561|          error_code = ixheaacd_parse_residual_data(pstr_mps_state);
  810|    561|          if (error_code) {
  ------------------
  |  Branch (810:15): [True: 44, False: 517]
  ------------------
  811|     44|            if (pstr_mps_state->ec_flag) {
  ------------------
  |  Branch (811:17): [True: 0, False: 44]
  ------------------
  812|      0|              pstr_mps_state->frame_ok = 0;
  813|      0|            } else
  814|     44|              return error_code;
  815|     44|          }
  816|    517|          break;
  817|       |
  818|    517|        case EXT_TYPE_1:
  ------------------
  |  Branch (818:9): [True: 238, False: 576]
  ------------------
  819|    238|          switch (num_input_channels) {
  820|    177|            case IN_CH_1:
  ------------------
  |  Branch (820:13): [True: 177, False: 61]
  ------------------
  821|    177|              channel_grouping[0] = 1;
  822|    177|              break;
  823|     53|            case IN_CH_2:
  ------------------
  |  Branch (823:13): [True: 53, False: 185]
  ------------------
  824|     53|              channel_grouping[0] = 2;
  825|     53|              break;
  826|      8|            case IN_CH_6:
  ------------------
  |  Branch (826:13): [True: 8, False: 230]
  ------------------
  827|      8|              channel_grouping[0] = 2;
  828|      8|              channel_grouping[1] = 2;
  829|      8|              channel_grouping[2] = 2;
  830|      8|              break;
  831|      0|            default:
  ------------------
  |  Branch (831:13): [True: 0, False: 238]
  ------------------
  832|      0|              return IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_INPUT_CHANNEL;
  ------------------
  |  |  128|      0|#define IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_INPUT_CHANNEL 0xFFFF9809
  ------------------
  833|      0|              break;
  834|    238|          }
  835|       |
  836|    238|          offset = num_ott_boxes + num_ttt_boxes;
  837|       |
  838|    238|          p_res_mdct = pstr_mps_state->array_struct->res_mdct + offset * RFX2XMDCTCOEF;
  ------------------
  |  |  196|    238|#define RFX2XMDCTCOEF (8192)
  ------------------
  839|       |
  840|    450|          for (ch = 0, gr = 0; ch < num_input_channels; ch += channel_grouping[gr++]) {
  ------------------
  |  Branch (840:32): [True: 253, False: 197]
  ------------------
  841|    253|            p_mdct_res = p_res_mdct;
  842|       |
  843|    253|            temp = ixheaacd_read_bits_buf(mps_bit_buf, 2);
  844|    253|            frame->bs_arbitrary_downmix_residual_abs[ch] = (temp >> 1) & ONE_BIT_MASK;
  ------------------
  |  |  204|    253|#define ONE_BIT_MASK (0x00000001)
  ------------------
  845|    253|            frame->bs_arbitrary_downmix_residual_alpha_update_set[ch] = temp & ONE_BIT_MASK;
  ------------------
  |  |  204|    253|#define ONE_BIT_MASK (0x00000001)
  ------------------
  846|       |
  847|    253|            if (channel_grouping[gr] == 1) {
  ------------------
  |  Branch (847:17): [True: 177, False: 76]
  ------------------
  848|    331|              for (fr = 0; fr < arbdmx_frames_per_spatial_frame; fr++) {
  ------------------
  |  Branch (848:28): [True: 178, False: 153]
  ------------------
  849|    178|                error_code =
  850|    178|                    ixheaacd_res_read_ics(mps_bit_buf, pstr_mps_state->p_aac_decoder_channel_info,
  851|    178|                                          1, aac_tables_ptr, pstr_mps_state->tot_sf_bands_ls);
  852|    178|                if (error_code) {
  ------------------
  |  Branch (852:21): [True: 23, False: 155]
  ------------------
  853|     23|                  if (pstr_mps_state->ec_flag) {
  ------------------
  |  Branch (853:23): [True: 0, False: 23]
  ------------------
  854|      0|                    pstr_mps_state->frame_ok = 0;
  855|      0|                  } else
  856|     23|                    return error_code;
  857|     23|                }
  858|    155|                if (1 == pstr_mps_state->p_aac_decoder_channel_info[0]->tns_data.tns_data_present)
  ------------------
  |  Branch (858:21): [True: 45, False: 110]
  ------------------
  859|     45|                  ixheaacd_res_ctns_apply(
  860|     45|                      pstr_mps_state->p_aac_decoder_channel_info[0],
  861|     45|                      pstr_mps_state->p_aac_decoder_channel_info[0]->ics_info.max_sf_bands,
  862|     45|                      aac_tables_ptr);
  863|       |
  864|    155|                pstr_mps_state->res_block_type[offset + ch][fr] =
  865|    155|                    pstr_mps_state->p_aac_decoder_channel_info[0]->ics_info.window_sequence;
  866|   156k|                for (i = 0; i < AAC_FRAME_LENGTH; i++) {
  ------------------
  |  |   23|   156k|#define AAC_FRAME_LENGTH (1024)
  ------------------
  |  Branch (866:29): [True: 156k, False: 155]
  ------------------
  867|   156k|                  *p_mdct_res++ =
  868|   156k|                      (pstr_mps_state->p_aac_decoder_channel_info[0]->p_spectral_coefficient[i]);
  869|   156k|                }
  870|       |
  871|    155|                if ((pstr_mps_state->p_aac_decoder_channel_info[0]->ics_info.window_sequence ==
  ------------------
  |  Branch (871:21): [True: 22, False: 133]
  ------------------
  872|    155|                     EIGHT_SHORT_SEQUENCE) &&
  ------------------
  |  |  102|    155|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  873|     22|                    ((arbdmx_upd_qmf == UPD_QMF_18) || (arbdmx_upd_qmf == UPD_QMF_24) ||
  ------------------
  |  |   32|     22|#define UPD_QMF_18 (18)
  ------------------
                                  ((arbdmx_upd_qmf == UPD_QMF_18) || (arbdmx_upd_qmf == UPD_QMF_24) ||
  ------------------
  |  |   33|     21|#define UPD_QMF_24 (24)
  ------------------
  |  Branch (873:22): [True: 1, False: 21]
  |  Branch (873:56): [True: 1, False: 20]
  ------------------
  874|     20|                     (arbdmx_upd_qmf == UPD_QMF_30))) {
  ------------------
  |  |   34|     20|#define UPD_QMF_30 (30)
  ------------------
  |  Branch (874:22): [True: 3, False: 17]
  ------------------
  875|      5|                  error_code = ixheaacd_res_read_ics(
  876|      5|                      mps_bit_buf, pstr_mps_state->p_aac_decoder_channel_info, 1, aac_tables_ptr,
  877|      5|                      pstr_mps_state->tot_sf_bands_ls);
  878|      5|                  if (error_code) {
  ------------------
  |  Branch (878:23): [True: 1, False: 4]
  ------------------
  879|      1|                    if (pstr_mps_state->ec_flag) {
  ------------------
  |  Branch (879:25): [True: 0, False: 1]
  ------------------
  880|      0|                      pstr_mps_state->frame_ok = 0;
  881|      0|                    } else
  882|      1|                      return error_code;
  883|      1|                  }
  884|      4|                  if (1 ==
  ------------------
  |  Branch (884:23): [True: 1, False: 3]
  ------------------
  885|      4|                      pstr_mps_state->p_aac_decoder_channel_info[0]->tns_data.tns_data_present)
  886|      1|                    ixheaacd_res_ctns_apply(
  887|      1|                        pstr_mps_state->p_aac_decoder_channel_info[0],
  888|      1|                        pstr_mps_state->p_aac_decoder_channel_info[0]->ics_info.max_sf_bands,
  889|      1|                        aac_tables_ptr);
  890|  4.10k|                  for (i = 0; i < AAC_FRAME_LENGTH; i++) {
  ------------------
  |  |   23|  4.10k|#define AAC_FRAME_LENGTH (1024)
  ------------------
  |  Branch (890:31): [True: 4.09k, False: 4]
  ------------------
  891|  4.09k|                    *p_mdct_res++ = (pstr_mps_state->p_aac_decoder_channel_info[0]
  892|  4.09k|                                         ->p_spectral_coefficient[i]);
  893|  4.09k|                  }
  894|      4|                }
  895|    155|              }
  896|    153|              p_res_mdct += RFX2XMDCTCOEF;
  ------------------
  |  |  196|    153|#define RFX2XMDCTCOEF (8192)
  ------------------
  897|    153|            } else {
  898|     76|              frame->bs_arbitrary_downmix_residual_abs[ch + 1] =
  899|     76|                  frame->bs_arbitrary_downmix_residual_abs[ch];
  900|     76|              frame->bs_arbitrary_downmix_residual_alpha_update_set[ch + 1] =
  901|     76|                  frame->bs_arbitrary_downmix_residual_alpha_update_set[ch];
  902|       |
  903|    149|              for (fr = 0; fr < arbdmx_frames_per_spatial_frame; fr++) {
  ------------------
  |  Branch (903:28): [True: 90, False: 59]
  ------------------
  904|     90|                WORD32 *res_mdct_1 = p_mdct_res + RFX2XMDCTCOEF;
  ------------------
  |  |  196|     90|#define RFX2XMDCTCOEF (8192)
  ------------------
  905|     90|                WORD32 temp, win1, win2;
  906|     90|                temp = ixheaacd_read_bits_buf(mps_bit_buf, 4);
  907|     90|                temp = ixheaacd_read_bits_buf(mps_bit_buf, 1);
  908|       |
  909|     90|                if (temp != 0) {
  ------------------
  |  Branch (909:21): [True: 1, False: 89]
  ------------------
  910|      1|                  return IA_XHEAAC_MPS_DEC_EXE_FATAL_NONZERO_BIT;
  ------------------
  |  |  129|      1|#define IA_XHEAAC_MPS_DEC_EXE_FATAL_NONZERO_BIT 0xFFFF980A
  ------------------
  911|      1|                }
  912|       |
  913|     89|                error_code =
  914|     89|                    ixheaacd_res_read_ics(mps_bit_buf, pstr_mps_state->p_aac_decoder_channel_info,
  915|     89|                                          1, aac_tables_ptr, pstr_mps_state->tot_sf_bands_ls);
  916|     89|                if (error_code) {
  ------------------
  |  Branch (916:21): [True: 4, False: 85]
  ------------------
  917|      4|                  if (pstr_mps_state->ec_flag) {
  ------------------
  |  Branch (917:23): [True: 0, False: 4]
  ------------------
  918|      0|                    pstr_mps_state->frame_ok = 0;
  919|      0|                  } else
  920|      4|                    return error_code;
  921|      4|                }
  922|       |
  923|     85|                if (1 == pstr_mps_state->p_aac_decoder_channel_info[0]->tns_data.tns_data_present)
  ------------------
  |  Branch (923:21): [True: 4, False: 81]
  ------------------
  924|      4|                  ixheaacd_res_ctns_apply(
  925|      4|                      pstr_mps_state->p_aac_decoder_channel_info[0],
  926|      4|                      pstr_mps_state->p_aac_decoder_channel_info[0]->ics_info.max_sf_bands,
  927|      4|                      aac_tables_ptr);
  928|     85|                win1 = pstr_mps_state->p_aac_decoder_channel_info[0]->ics_info.window_sequence;
  929|     85|                pstr_mps_state->res_block_type[offset + ch][fr] =
  930|     85|                    pstr_mps_state->p_aac_decoder_channel_info[0]->ics_info.window_sequence;
  931|       |
  932|  87.1k|                for (i = 0; i < AAC_FRAME_LENGTH; i++) {
  ------------------
  |  |   23|  87.1k|#define AAC_FRAME_LENGTH (1024)
  ------------------
  |  Branch (932:29): [True: 87.0k, False: 85]
  ------------------
  933|  87.0k|                  *p_mdct_res++ =
  934|  87.0k|                      (pstr_mps_state->p_aac_decoder_channel_info[0]->p_spectral_coefficient[i]);
  935|  87.0k|                }
  936|       |
  937|     85|                error_code =
  938|     85|                    ixheaacd_res_read_ics(mps_bit_buf, pstr_mps_state->p_aac_decoder_channel_info,
  939|     85|                                          1, aac_tables_ptr, pstr_mps_state->tot_sf_bands_ls);
  940|     85|                if (error_code) {
  ------------------
  |  Branch (940:21): [True: 4, False: 81]
  ------------------
  941|      4|                  if (pstr_mps_state->ec_flag) {
  ------------------
  |  Branch (941:23): [True: 0, False: 4]
  ------------------
  942|      0|                    pstr_mps_state->frame_ok = 0;
  943|      0|                  } else
  944|      4|                    return error_code;
  945|      4|                }
  946|       |
  947|     81|                if (1 == pstr_mps_state->p_aac_decoder_channel_info[0]->tns_data.tns_data_present)
  ------------------
  |  Branch (947:21): [True: 9, False: 72]
  ------------------
  948|      9|                  ixheaacd_res_ctns_apply(
  949|      9|                      pstr_mps_state->p_aac_decoder_channel_info[0],
  950|      9|                      pstr_mps_state->p_aac_decoder_channel_info[0]->ics_info.max_sf_bands,
  951|      9|                      aac_tables_ptr);
  952|     81|                win2 = pstr_mps_state->p_aac_decoder_channel_info[0]->ics_info.window_sequence;
  953|  77.9k|                for (i = 0; i < AAC_FRAME_LENGTH; i++) {
  ------------------
  |  |   23|  77.9k|#define AAC_FRAME_LENGTH (1024)
  ------------------
  |  Branch (953:29): [True: 77.8k, False: 81]
  ------------------
  954|  77.8k|                  *res_mdct_1++ =
  955|  77.8k|                      (pstr_mps_state->p_aac_decoder_channel_info[0]->p_spectral_coefficient[i]);
  956|  77.8k|                }
  957|       |
  958|     81|                if (win1 != win2) return IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_WINDOW_SEQUENCE;
  ------------------
  |  |  130|      2|#define IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_WINDOW_SEQUENCE 0xFFFF980B
  ------------------
  |  Branch (958:21): [True: 2, False: 79]
  ------------------
  959|       |
  960|     79|                if ((win1 == EIGHT_SHORT_SEQUENCE) &&
  ------------------
  |  |  102|     79|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  |  Branch (960:21): [True: 14, False: 65]
  ------------------
  961|     14|                    ((arbdmx_upd_qmf == UPD_QMF_18) || (arbdmx_upd_qmf == UPD_QMF_24) ||
  ------------------
  |  |   32|     14|#define UPD_QMF_18 (18)
  ------------------
                                  ((arbdmx_upd_qmf == UPD_QMF_18) || (arbdmx_upd_qmf == UPD_QMF_24) ||
  ------------------
  |  |   33|      5|#define UPD_QMF_24 (24)
  ------------------
  |  Branch (961:22): [True: 9, False: 5]
  |  Branch (961:56): [True: 2, False: 3]
  ------------------
  962|     12|                     (arbdmx_upd_qmf == UPD_QMF_30))) {
  ------------------
  |  |   34|      3|#define UPD_QMF_30 (30)
  ------------------
  |  Branch (962:22): [True: 1, False: 2]
  ------------------
  963|     12|                  temp = ixheaacd_read_bits_buf(mps_bit_buf, 4);
  964|     12|                  temp = ixheaacd_read_bits_buf(mps_bit_buf, 1);
  965|       |
  966|     12|                  if (temp != 0) {
  ------------------
  |  Branch (966:23): [True: 1, False: 11]
  ------------------
  967|      1|                    return IA_XHEAAC_MPS_DEC_EXE_FATAL_NONZERO_BIT;
  ------------------
  |  |  129|      1|#define IA_XHEAAC_MPS_DEC_EXE_FATAL_NONZERO_BIT 0xFFFF980A
  ------------------
  968|      1|                  }
  969|       |
  970|     11|                  error_code = ixheaacd_res_read_ics(
  971|     11|                      mps_bit_buf, pstr_mps_state->p_aac_decoder_channel_info, 1, aac_tables_ptr,
  972|     11|                      pstr_mps_state->tot_sf_bands_ls);
  973|     11|                  if (error_code) {
  ------------------
  |  Branch (973:23): [True: 2, False: 9]
  ------------------
  974|      2|                    if (pstr_mps_state->ec_flag) {
  ------------------
  |  Branch (974:25): [True: 0, False: 2]
  ------------------
  975|      0|                      pstr_mps_state->frame_ok = 0;
  976|      0|                    } else
  977|      2|                      return error_code;
  978|      2|                  }
  979|       |
  980|      9|                  if (1 ==
  ------------------
  |  Branch (980:23): [True: 1, False: 8]
  ------------------
  981|      9|                      pstr_mps_state->p_aac_decoder_channel_info[0]->tns_data.tns_data_present)
  982|      1|                    ixheaacd_res_ctns_apply(
  983|      1|                        pstr_mps_state->p_aac_decoder_channel_info[0],
  984|      1|                        pstr_mps_state->p_aac_decoder_channel_info[0]->ics_info.max_sf_bands,
  985|      1|                        aac_tables_ptr);
  986|      9|                  win1 = pstr_mps_state->p_aac_decoder_channel_info[0]->ics_info.window_sequence;
  987|       |
  988|  7.17k|                  for (i = 0; i < AAC_FRAME_LENGTH; i++) {
  ------------------
  |  |   23|  7.17k|#define AAC_FRAME_LENGTH (1024)
  ------------------
  |  Branch (988:31): [True: 7.16k, False: 9]
  ------------------
  989|  7.16k|                    *p_mdct_res++ = (pstr_mps_state->p_aac_decoder_channel_info[0]
  990|  7.16k|                                         ->p_spectral_coefficient[i]);
  991|  7.16k|                  }
  992|       |
  993|      9|                  error_code = ixheaacd_res_read_ics(
  994|      9|                      mps_bit_buf, pstr_mps_state->p_aac_decoder_channel_info, 1, aac_tables_ptr,
  995|      9|                      pstr_mps_state->tot_sf_bands_ls);
  996|      9|                  if (error_code) {
  ------------------
  |  Branch (996:23): [True: 2, False: 7]
  ------------------
  997|      2|                    if (pstr_mps_state->ec_flag) {
  ------------------
  |  Branch (997:25): [True: 0, False: 2]
  ------------------
  998|      0|                      pstr_mps_state->frame_ok = 0;
  999|      0|                    } else
 1000|      2|                      return error_code;
 1001|      2|                  }
 1002|       |
 1003|      7|                  if (1 ==
  ------------------
  |  Branch (1003:23): [True: 1, False: 6]
  ------------------
 1004|      7|                      pstr_mps_state->p_aac_decoder_channel_info[0]->tns_data.tns_data_present)
 1005|      1|                    ixheaacd_res_ctns_apply(
 1006|      1|                        pstr_mps_state->p_aac_decoder_channel_info[0],
 1007|      1|                        pstr_mps_state->p_aac_decoder_channel_info[0]->ics_info.max_sf_bands,
 1008|      1|                        aac_tables_ptr);
 1009|      7|                  win2 = pstr_mps_state->p_aac_decoder_channel_info[0]->ics_info.window_sequence;
 1010|  5.12k|                  for (i = 0; i < AAC_FRAME_LENGTH; i++) {
  ------------------
  |  |   23|  5.12k|#define AAC_FRAME_LENGTH (1024)
  ------------------
  |  Branch (1010:31): [True: 5.12k, False: 7]
  ------------------
 1011|  5.12k|                    *res_mdct_1++ = (pstr_mps_state->p_aac_decoder_channel_info[0]
 1012|  5.12k|                                         ->p_spectral_coefficient[i]);
 1013|  5.12k|                  }
 1014|       |
 1015|      7|                  if (win1 != win2) return IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_WINDOW_SEQUENCE;
  ------------------
  |  |  130|      1|#define IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_WINDOW_SEQUENCE 0xFFFF980B
  ------------------
  |  Branch (1015:23): [True: 1, False: 6]
  ------------------
 1016|      7|                }
 1017|     79|              }
 1018|     59|              p_res_mdct += RFX2XMDCTCOEF;
  ------------------
  |  |  196|     59|#define RFX2XMDCTCOEF (8192)
  ------------------
 1019|     59|            }
 1020|    253|          }
 1021|       |
 1022|    197|          break;
 1023|       |
 1024|    197|        case EXT_TYPE_2:
  ------------------
  |  Branch (1024:9): [True: 13, False: 801]
  ------------------
 1025|     20|          for (i = 0; i < p_bs_config->num_ott_boxes_at; i++) {
  ------------------
  |  Branch (1025:23): [True: 8, False: 12]
  ------------------
 1026|      8|            error_code = ixheaacd_ec_data_dec(pstr_mps_state, &frame->cld_lossless_data,
 1027|      8|                                              frame->cmp_ott_cld_idx, frame->cmp_ott_cld_idx_prev,
 1028|      8|                                              CLD, num_ott_boxes + i, num_ott_boxes + i, 0,
  ------------------
  |  |   23|      8|#define CLD (0)
  ------------------
 1029|      8|                                              p_bs_config->bs_ott_bands_at[i]);
 1030|      8|            if (error_code != IA_NO_ERROR) return error_code;
  ------------------
  |  |   23|      8|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (1030:17): [True: 1, False: 7]
  ------------------
 1031|      8|          }
 1032|       |
 1033|     12|          break;
 1034|       |
 1035|     12|        default:
  ------------------
  |  Branch (1035:9): [True: 0, False: 814]
  ------------------
 1036|      0|          return IA_XHEAAC_MPS_DEC_EXE_NONFATAL_INVALID_EXTENSION_TYPE;
  ------------------
  |  |  113|      0|#define IA_XHEAAC_MPS_DEC_EXE_NONFATAL_INVALID_EXTENSION_TYPE 0x00001812
  ------------------
 1037|    814|      }
 1038|       |
 1039|    677|      bits_read =
 1040|    677|          (WORD32)(((mps_bit_buf->ptr_read_next - mps_bit_buf->ptr_bit_buf_base + 1) << 3) -
 1041|    677|                   (mps_bit_buf->bit_pos + 1) - tmp);
 1042|    677|      n_fill_bits = (sac_ext_len << 3) - bits_read;
 1043|       |
 1044|  1.34k|      while (n_fill_bits > 7) {
  ------------------
  |  Branch (1044:14): [True: 668, False: 677]
  ------------------
 1045|    668|        ixheaacd_read_bits_buf(mps_bit_buf, 8);
 1046|    668|        n_fill_bits -= 8;
 1047|    668|      }
 1048|    677|      if (n_fill_bits > 0) {
  ------------------
  |  Branch (1048:11): [True: 7, False: 670]
  ------------------
 1049|      7|        ixheaacd_read_bits_buf(mps_bit_buf, n_fill_bits);
 1050|      7|      }
 1051|    677|    }
 1052|    814|  }
 1053|  13.3k|  return IA_NO_ERROR;
  ------------------
  |  |   23|  13.3k|#define IA_NO_ERROR 0x00000000
  ------------------
 1054|  13.5k|}
ixheaacd_mps_bitdec.c:ixheaacd_parse_residual_data:
  619|    561|static IA_ERRORCODE ixheaacd_parse_residual_data(ia_heaac_mps_state_struct *pstr_mps_state) {
  620|    561|  WORD32 ich, ch;
  621|    561|  WORD32 rfpsf;
  622|    561|  WORD32 ps;
  623|    561|  WORD32 pb;
  624|       |
  625|    561|  ia_mps_dec_residual_aac_tables_struct *aac_tables_ptr =
  626|    561|      pstr_mps_state->ia_mps_dec_mps_table.aac_tab;
  627|    561|  WORD32 i;
  628|       |
  629|    561|  ia_mps_dec_spatial_bs_frame_struct *frame = pstr_mps_state->bs_frame;
  630|    561|  ia_mps_spatial_bs_config_struct *config = &(pstr_mps_state->bs_config);
  631|       |
  632|    561|  WORD32 num_ott_boxes = pstr_mps_state->num_ott_boxes;
  633|    561|  WORD32 num_parameter_sets = pstr_mps_state->num_parameter_sets;
  634|    561|  WORD32 residual_frames_per_spatial_frame = pstr_mps_state->residual_frames_per_spatial_frame;
  635|    561|  WORD32 upd_qmf = pstr_mps_state->upd_qmf;
  636|       |
  637|    561|  WORD32 loop_counter = num_ott_boxes + pstr_mps_state->num_ttt_boxes;
  638|    561|  WORD32 *p_mdct_res;
  639|       |
  640|    561|  WORD32 *p_res_mdct = pstr_mps_state->array_struct->res_mdct;
  641|    561|  ia_bit_buf_struct *mps_bit_buf = pstr_mps_state->ptr_mps_bit_buff;
  642|    561|  WORD16 error_code = IA_NO_ERROR;
  ------------------
  |  |   23|    561|#define IA_NO_ERROR 0x00000000
  ------------------
  643|       |
  644|  2.71k|  for (ich = 0; ich < loop_counter; ich++) {
  ------------------
  |  Branch (644:17): [True: 2.19k, False: 517]
  ------------------
  645|  2.19k|    ch = ich;
  646|       |
  647|  2.19k|    p_mdct_res = p_res_mdct;
  648|  2.19k|    if (config->bs_residual_bands[ch] > 0) {
  ------------------
  |  Branch (648:9): [True: 643, False: 1.55k]
  ------------------
  649|    643|      if (ch < num_ott_boxes) {
  ------------------
  |  Branch (649:11): [True: 614, False: 29]
  ------------------
  650|  1.90k|        for (ps = 0; ps < num_parameter_sets; ps++) {
  ------------------
  |  Branch (650:22): [True: 1.29k, False: 614]
  ------------------
  651|  1.29k|          frame->res_data.bs_icc_diff_present[ch][ps] = ixheaacd_read_bits_buf(mps_bit_buf, 1);
  652|  1.29k|          if (frame->res_data.bs_icc_diff_present[ch][ps]) {
  ------------------
  |  Branch (652:15): [True: 278, False: 1.01k]
  ------------------
  653|  4.50k|            for (pb = 0; pb < config->bs_residual_bands[ch]; pb++) {
  ------------------
  |  Branch (653:26): [True: 4.23k, False: 278]
  ------------------
  654|  4.23k|              frame->res_data.bs_icc_diff[ch][ps][pb] =
  655|  4.23k|                  ixheaacd_decode_icc_diff_code(mps_bit_buf);
  656|  4.23k|              frame->ott_icc_diff_idx[ch][ps][pb] = frame->res_data.bs_icc_diff[ch][ps][pb];
  657|  4.23k|            }
  658|    278|          }
  659|  1.29k|        }
  660|    614|      }
  661|    643|      p_mdct_res = p_res_mdct;
  662|  1.28k|      for (rfpsf = 0; rfpsf < residual_frames_per_spatial_frame; rfpsf++) {
  ------------------
  |  Branch (662:23): [True: 684, False: 599]
  ------------------
  663|    684|        error_code =
  664|    684|            ixheaacd_res_read_ics(mps_bit_buf, pstr_mps_state->p_aac_decoder_channel_info, 1,
  665|    684|                                  aac_tables_ptr, pstr_mps_state->tot_sf_bands_ls);
  666|    684|        if (error_code) {
  ------------------
  |  Branch (666:13): [True: 39, False: 645]
  ------------------
  667|     39|          if (pstr_mps_state->ec_flag) {
  ------------------
  |  Branch (667:15): [True: 0, False: 39]
  ------------------
  668|      0|            pstr_mps_state->frame_ok = 0;
  669|      0|          } else
  670|     39|            return error_code;
  671|     39|        }
  672|    645|        if (1 == pstr_mps_state->p_aac_decoder_channel_info[0]->tns_data.tns_data_present)
  ------------------
  |  Branch (672:13): [True: 151, False: 494]
  ------------------
  673|    151|          ixheaacd_res_ctns_apply(
  674|    151|              pstr_mps_state->p_aac_decoder_channel_info[0],
  675|    151|              pstr_mps_state->p_aac_decoder_channel_info[0]->ics_info.max_sf_bands,
  676|    151|              aac_tables_ptr);
  677|    645|        pstr_mps_state->res_block_type[ch][rfpsf] =
  678|    645|            pstr_mps_state->p_aac_decoder_channel_info[0]->ics_info.window_sequence;
  679|   650k|        for (i = 0; i < AAC_FRAME_LENGTH; i++) {
  ------------------
  |  |   23|   650k|#define AAC_FRAME_LENGTH (1024)
  ------------------
  |  Branch (679:21): [True: 650k, False: 645]
  ------------------
  680|   650k|          *p_mdct_res++ =
  681|   650k|              (pstr_mps_state->p_aac_decoder_channel_info[0]->p_spectral_coefficient[i]);
  682|   650k|        }
  683|       |
  684|    645|        if ((pstr_mps_state->p_aac_decoder_channel_info[0]->ics_info.window_sequence ==
  ------------------
  |  Branch (684:13): [True: 284, False: 361]
  ------------------
  685|    645|             EIGHT_SHORT_SEQUENCE) &&
  ------------------
  |  |  102|    645|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  686|    284|            ((upd_qmf == UPD_QMF_18) || (upd_qmf == UPD_QMF_24) || (upd_qmf == UPD_QMF_30))) {
  ------------------
  |  |   32|    284|#define UPD_QMF_18 (18)
  ------------------
                          ((upd_qmf == UPD_QMF_18) || (upd_qmf == UPD_QMF_24) || (upd_qmf == UPD_QMF_30))) {
  ------------------
  |  |   33|    262|#define UPD_QMF_24 (24)
  ------------------
                          ((upd_qmf == UPD_QMF_18) || (upd_qmf == UPD_QMF_24) || (upd_qmf == UPD_QMF_30))) {
  ------------------
  |  |   34|    248|#define UPD_QMF_30 (30)
  ------------------
  |  Branch (686:14): [True: 22, False: 262]
  |  Branch (686:41): [True: 14, False: 248]
  |  Branch (686:68): [True: 19, False: 229]
  ------------------
  687|     55|          error_code =
  688|     55|              ixheaacd_res_read_ics(mps_bit_buf, pstr_mps_state->p_aac_decoder_channel_info, 1,
  689|     55|                                    aac_tables_ptr, pstr_mps_state->tot_sf_bands_ls);
  690|     55|          if (error_code) {
  ------------------
  |  Branch (690:15): [True: 5, False: 50]
  ------------------
  691|      5|            if (pstr_mps_state->ec_flag) {
  ------------------
  |  Branch (691:17): [True: 0, False: 5]
  ------------------
  692|      0|              pstr_mps_state->frame_ok = 0;
  693|      0|            } else
  694|      5|              return error_code;
  695|      5|          }
  696|     50|          if (1 == pstr_mps_state->p_aac_decoder_channel_info[0]->tns_data.tns_data_present)
  ------------------
  |  Branch (696:15): [True: 3, False: 47]
  ------------------
  697|      3|            ixheaacd_res_ctns_apply(
  698|      3|                pstr_mps_state->p_aac_decoder_channel_info[0],
  699|      3|                pstr_mps_state->p_aac_decoder_channel_info[0]->ics_info.max_sf_bands,
  700|      3|                aac_tables_ptr);
  701|  33.8k|          for (i = 0; i < AAC_FRAME_LENGTH; i++) {
  ------------------
  |  |   23|  33.8k|#define AAC_FRAME_LENGTH (1024)
  ------------------
  |  Branch (701:23): [True: 33.7k, False: 50]
  ------------------
  702|  33.7k|            *p_mdct_res++ =
  703|  33.7k|                (pstr_mps_state->p_aac_decoder_channel_info[0]->p_spectral_coefficient[i]);
  704|  33.7k|          }
  705|     50|        }
  706|    645|      }
  707|    643|    }
  708|       |
  709|  2.15k|    p_res_mdct += RFX2XMDCTCOEF;
  ------------------
  |  |  196|  2.15k|#define RFX2XMDCTCOEF (8192)
  ------------------
  710|  2.15k|  }
  711|    517|  return IA_NO_ERROR;
  ------------------
  |  |   23|    517|#define IA_NO_ERROR 0x00000000
  ------------------
  712|    561|}
ixheaacd_mps_bitdec.c:ixheaacd_decode_icc_diff_code:
  609|  4.23k|static WORD32 ixheaacd_decode_icc_diff_code(ia_bit_buf_struct *it_bit_buff) {
  610|  4.23k|  WORD32 value = 0;
  611|  4.23k|  WORD32 count = 0;
  612|  9.39k|  while ((ixheaacd_read_bits_buf(it_bit_buff, 1) == 0) && (count++ < 7)) {
  ------------------
  |  Branch (612:10): [True: 5.50k, False: 3.89k]
  |  Branch (612:59): [True: 5.16k, False: 337]
  ------------------
  613|  5.16k|    value++;
  614|  5.16k|  }
  615|       |
  616|  4.23k|  return value;
  617|  4.23k|}
ixheaacd_mps_bitdec.c:ixheaacd_decode_and_map_frame_ott:
 1761|  13.2k|{
 1762|  13.2k|  IA_ERRORCODE error_code = IA_NO_ERROR;
  ------------------
  |  |   23|  13.2k|#define IA_NO_ERROR 0x00000000
  ------------------
 1763|  13.2k|  ia_mps_dec_spatial_bs_frame_struct *p_cur_bs;
 1764|  13.2k|  ia_heaac_mps_state_struct *curr_state = pstr_mps_state;
 1765|  13.2k|  ia_mps_dec_auxilary_struct *p_aux_struct = pstr_mps_state->aux_struct;
 1766|  13.2k|  ia_mps_dec_bitdec_tables_struct *bitdec_table =
 1767|  13.2k|      pstr_mps_state->ia_mps_dec_mps_table.bitdec_table_ptr;
 1768|  13.2k|  WORD32 *param_slot = pstr_mps_state->aux_struct->param_slot;
 1769|       |
 1770|  13.2k|  WORD32 i, num_parameter_sets, ott_idx, band;
 1771|  13.2k|  WORD32 num_ott_boxes;
 1772|  13.2k|  VOID *free_scratch;
 1773|       |
 1774|  13.2k|  WORD32 ps, pb;
 1775|       |
 1776|  13.2k|  WORD32 *tot_db;
 1777|  13.2k|  WORD32 *ott_vs_tot_db_fc;
 1778|  13.2k|  WORD32 *ott_vs_tot_db_s;
 1779|  13.2k|  WORD32 *ott_vs_tot_db_f;
 1780|  13.2k|  WORD32 *ott_vs_tot_db_c;
 1781|  13.2k|  WORD32 *ott_vs_tot_db_lr;
 1782|  13.2k|  WORD32 *ott_vs_tot_db_l;
 1783|  13.2k|  WORD32 *ott_vs_tot_db_r;
 1784|  13.2k|  WORD32 *tmp1;
 1785|  13.2k|  WORD32 *tmp2;
 1786|       |
 1787|  13.2k|  WORD32 bitstream_parameter_bands = curr_state->bitstream_parameter_bands;
 1788|  13.2k|  WORD32 *b_ott_bands = curr_state->bitstream_ott_bands;
 1789|  13.2k|  WORD32 *ott_cld_default = curr_state->ott_cld_default;
 1790|  13.2k|  WORD32 parameter_sets = curr_state->num_parameter_sets;
 1791|  13.2k|  WORD32 extend_frame = curr_state->extend_frame;
 1792|  13.2k|  WORD32 quant_mode = curr_state->quant_mode;
 1793|       |
 1794|  13.2k|  tot_db = pstr_mps_state->mps_scratch_mem_v;
 1795|  13.2k|  ott_vs_tot_db_fc =
 1796|  13.2k|      tot_db + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PSXPB, sizeof(*ott_vs_tot_db_fc), BYTE_ALIGN_8);
  ------------------
  |  |   89|  13.2k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
 1797|  13.2k|  ott_vs_tot_db_s = ott_vs_tot_db_fc + IXHEAAC_GET_SIZE_ALIGNED_TYPE(
  ------------------
  |  |   89|  13.2k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
 1798|  13.2k|                                           MAX_PSXPB, sizeof(*ott_vs_tot_db_s), BYTE_ALIGN_8);
 1799|  13.2k|  ott_vs_tot_db_f = ott_vs_tot_db_s + IXHEAAC_GET_SIZE_ALIGNED_TYPE(
  ------------------
  |  |   89|  13.2k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
 1800|  13.2k|                                          MAX_PSXPB, sizeof(*ott_vs_tot_db_f), BYTE_ALIGN_8);
 1801|  13.2k|  ott_vs_tot_db_c = ott_vs_tot_db_f + IXHEAAC_GET_SIZE_ALIGNED_TYPE(
  ------------------
  |  |   89|  13.2k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
 1802|  13.2k|                                          MAX_PSXPB, sizeof(*ott_vs_tot_db_c), BYTE_ALIGN_8);
 1803|  13.2k|  ott_vs_tot_db_lr = ott_vs_tot_db_c + IXHEAAC_GET_SIZE_ALIGNED_TYPE(
  ------------------
  |  |   89|  13.2k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
 1804|  13.2k|                                           MAX_PSXPB, sizeof(*ott_vs_tot_db_lr), BYTE_ALIGN_8);
 1805|  13.2k|  ott_vs_tot_db_l = ott_vs_tot_db_lr + IXHEAAC_GET_SIZE_ALIGNED_TYPE(
  ------------------
  |  |   89|  13.2k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
 1806|  13.2k|                                           MAX_PSXPB, sizeof(*ott_vs_tot_db_l), BYTE_ALIGN_8);
 1807|  13.2k|  ott_vs_tot_db_r = ott_vs_tot_db_l + IXHEAAC_GET_SIZE_ALIGNED_TYPE(
  ------------------
  |  |   89|  13.2k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
 1808|  13.2k|                                          MAX_PSXPB, sizeof(*ott_vs_tot_db_r), BYTE_ALIGN_8);
 1809|  13.2k|  tmp1 = ott_vs_tot_db_r + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PSXPB, sizeof(*tmp1), BYTE_ALIGN_8);
  ------------------
  |  |   89|  13.2k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
 1810|  13.2k|  tmp2 = tmp1 + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PSXPB, sizeof(*tmp2), BYTE_ALIGN_8);
  ------------------
  |  |   89|  13.2k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
 1811|  13.2k|  free_scratch = tmp2 + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PSXPB, sizeof(*tmp2), BYTE_ALIGN_8);
  ------------------
  |  |   89|  13.2k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
 1812|       |
 1813|  13.2k|  p_cur_bs = pstr_mps_state->bs_frame;
 1814|  13.2k|  num_ott_boxes = curr_state->num_ott_boxes;
 1815|       |
 1816|  13.2k|  pb = MAX_PSXPB;
  ------------------
  |  |   84|  13.2k|#define MAX_PSXPB (224)
  ------------------
 1817|  2.99M|  for (i = 0; i < pb; i++) tot_db[i] = 0;
  ------------------
  |  Branch (1817:15): [True: 2.97M, False: 13.2k]
  ------------------
 1818|       |
 1819|  13.2k|  switch (curr_state->tree_config) {
 1820|    306|    case TREE_5151:
  ------------------
  |  Branch (1820:5): [True: 306, False: 12.9k]
  ------------------
 1821|    306|      i = 0;
 1822|    306|      error_code = ixheaacd_map_index_data(
 1823|    306|          &p_cur_bs->cld_lossless_data, p_aux_struct->ott_cld, p_cur_bs->ott_cld_idx,
 1824|    306|          p_cur_bs->cmp_ott_cld_idx, NULL, i, p_cur_bs->ott_cld_idx_prev, i, CLD, 0,
  ------------------
  |  |   23|    306|#define CLD (0)
  ------------------
 1825|    306|          b_ott_bands[i], ott_cld_default[i], parameter_sets, param_slot, extend_frame,
 1826|    306|          quant_mode, tot_db, ott_vs_tot_db_fc, ott_vs_tot_db_s, bitdec_table, free_scratch);
 1827|    306|      if (error_code) return error_code;
  ------------------
  |  Branch (1827:11): [True: 5, False: 301]
  ------------------
 1828|       |
 1829|    301|      i = 1;
 1830|    301|      error_code = ixheaacd_map_index_data(&p_cur_bs->cld_lossless_data, p_aux_struct->ott_cld,
 1831|    301|                              p_cur_bs->ott_cld_idx, p_cur_bs->cmp_ott_cld_idx, NULL, i,
 1832|    301|                              p_cur_bs->ott_cld_idx_prev, i, CLD, 0, b_ott_bands[i],
  ------------------
  |  |   23|    301|#define CLD (0)
  ------------------
 1833|    301|                              ott_cld_default[i], parameter_sets, param_slot, extend_frame,
 1834|    301|                              quant_mode, ott_vs_tot_db_fc, ott_vs_tot_db_f, ott_vs_tot_db_c,
 1835|    301|                              bitdec_table, free_scratch);
 1836|    301|      if (error_code) return error_code;
  ------------------
  |  Branch (1836:11): [True: 3, False: 298]
  ------------------
 1837|       |
 1838|    298|      i = 2;
 1839|    298|      error_code = ixheaacd_map_index_data(
 1840|    298|          &p_cur_bs->cld_lossless_data, p_aux_struct->ott_cld, p_cur_bs->ott_cld_idx,
 1841|    298|          p_cur_bs->cmp_ott_cld_idx, NULL, i, p_cur_bs->ott_cld_idx_prev, i, CLD, 0,
  ------------------
  |  |   23|    298|#define CLD (0)
  ------------------
 1842|    298|          b_ott_bands[i], ott_cld_default[i], parameter_sets, param_slot, extend_frame,
 1843|    298|          quant_mode, ott_vs_tot_db_s, tmp1, tmp2, bitdec_table, free_scratch);
 1844|    298|      if (error_code) return error_code;
  ------------------
  |  Branch (1844:11): [True: 10, False: 288]
  ------------------
 1845|       |
 1846|    288|      i = 3;
 1847|    288|      error_code = ixheaacd_map_index_data(
 1848|    288|          &p_cur_bs->cld_lossless_data, p_aux_struct->ott_cld, p_cur_bs->ott_cld_idx,
 1849|    288|          p_cur_bs->cmp_ott_cld_idx, NULL, i, p_cur_bs->ott_cld_idx_prev, i, CLD, 0,
  ------------------
  |  |   23|    288|#define CLD (0)
  ------------------
 1850|    288|          b_ott_bands[i], ott_cld_default[i], parameter_sets, param_slot, extend_frame,
 1851|    288|          quant_mode, ott_vs_tot_db_f, tmp1, tmp2, bitdec_table, free_scratch);
 1852|    288|      if (error_code) return error_code;
  ------------------
  |  Branch (1852:11): [True: 6, False: 282]
  ------------------
 1853|       |
 1854|    282|      i = 4;
 1855|    282|      error_code = ixheaacd_map_index_data(&p_cur_bs->cld_lossless_data, p_aux_struct->ott_cld,
 1856|    282|                              p_cur_bs->ott_cld_idx, p_cur_bs->cmp_ott_cld_idx, NULL, i,
 1857|    282|                              p_cur_bs->ott_cld_idx_prev, i, CLD, 0, b_ott_bands[i],
  ------------------
  |  |   23|    282|#define CLD (0)
  ------------------
 1858|    282|                              ott_cld_default[i], parameter_sets, param_slot, extend_frame,
 1859|    282|                              quant_mode, tot_db, tmp1, tmp2, bitdec_table, free_scratch);
 1860|    282|      if (error_code) return error_code;
  ------------------
  |  Branch (1860:11): [True: 6, False: 276]
  ------------------
 1861|       |
 1862|    276|      break;
 1863|       |
 1864|    391|    case TREE_5152:
  ------------------
  |  Branch (1864:5): [True: 391, False: 12.9k]
  ------------------
 1865|    391|      i = 0;
 1866|    391|      error_code = ixheaacd_map_index_data(
 1867|    391|          &p_cur_bs->cld_lossless_data, p_aux_struct->ott_cld, p_cur_bs->ott_cld_idx,
 1868|    391|          p_cur_bs->cmp_ott_cld_idx, NULL, i, p_cur_bs->ott_cld_idx_prev, i, CLD, 0,
  ------------------
  |  |   23|    391|#define CLD (0)
  ------------------
 1869|    391|          b_ott_bands[i], ott_cld_default[i], parameter_sets, param_slot, extend_frame,
 1870|    391|          quant_mode, tot_db, ott_vs_tot_db_lr, ott_vs_tot_db_c, bitdec_table, free_scratch);
 1871|    391|      if (error_code) return error_code;
  ------------------
  |  Branch (1871:11): [True: 3, False: 388]
  ------------------
 1872|       |
 1873|    388|      i = 1;
 1874|    388|      error_code = ixheaacd_map_index_data(&p_cur_bs->cld_lossless_data, p_aux_struct->ott_cld,
 1875|    388|                              p_cur_bs->ott_cld_idx, p_cur_bs->cmp_ott_cld_idx, NULL, i,
 1876|    388|                              p_cur_bs->ott_cld_idx_prev, i, CLD, 0, b_ott_bands[i],
  ------------------
  |  |   23|    388|#define CLD (0)
  ------------------
 1877|    388|                              ott_cld_default[i], parameter_sets, param_slot, extend_frame,
 1878|    388|                              quant_mode, ott_vs_tot_db_lr, ott_vs_tot_db_l, ott_vs_tot_db_r,
 1879|    388|                              bitdec_table, free_scratch);
 1880|    388|      if (error_code) return error_code;
  ------------------
  |  Branch (1880:11): [True: 6, False: 382]
  ------------------
 1881|       |
 1882|    382|      i = 2;
 1883|    382|      error_code = ixheaacd_map_index_data(&p_cur_bs->cld_lossless_data, p_aux_struct->ott_cld,
 1884|    382|                              p_cur_bs->ott_cld_idx, p_cur_bs->cmp_ott_cld_idx, NULL, i,
 1885|    382|                              p_cur_bs->ott_cld_idx_prev, i, CLD, 0, b_ott_bands[i],
  ------------------
  |  |   23|    382|#define CLD (0)
  ------------------
 1886|    382|                              ott_cld_default[i], parameter_sets, param_slot, extend_frame,
 1887|    382|                              quant_mode, tot_db, tmp1, tmp2, bitdec_table, free_scratch);
 1888|    382|      if (error_code) return error_code;
  ------------------
  |  Branch (1888:11): [True: 5, False: 377]
  ------------------
 1889|       |
 1890|    377|      i = 3;
 1891|    377|      error_code = ixheaacd_map_index_data(
 1892|    377|          &p_cur_bs->cld_lossless_data, p_aux_struct->ott_cld, p_cur_bs->ott_cld_idx,
 1893|    377|          p_cur_bs->cmp_ott_cld_idx, NULL, i, p_cur_bs->ott_cld_idx_prev, i, CLD, 0,
  ------------------
  |  |   23|    377|#define CLD (0)
  ------------------
 1894|    377|          b_ott_bands[i], ott_cld_default[i], parameter_sets, param_slot, extend_frame,
 1895|    377|          quant_mode, ott_vs_tot_db_l, tmp1, tmp2, bitdec_table, free_scratch);
 1896|    377|      if (error_code) return error_code;
  ------------------
  |  Branch (1896:11): [True: 4, False: 373]
  ------------------
 1897|       |
 1898|    373|      i = 4;
 1899|    373|      error_code = ixheaacd_map_index_data(
 1900|    373|          &p_cur_bs->cld_lossless_data, p_aux_struct->ott_cld, p_cur_bs->ott_cld_idx,
 1901|    373|          p_cur_bs->cmp_ott_cld_idx, NULL, i, p_cur_bs->ott_cld_idx_prev, i, CLD, 0,
  ------------------
  |  |   23|    373|#define CLD (0)
  ------------------
 1902|    373|          b_ott_bands[i], ott_cld_default[i], parameter_sets, param_slot, extend_frame,
 1903|    373|          quant_mode, ott_vs_tot_db_r, tmp1, tmp2, bitdec_table, free_scratch);
 1904|    373|      if (error_code) return error_code;
  ------------------
  |  Branch (1904:11): [True: 4, False: 369]
  ------------------
 1905|    369|      break;
 1906|       |
 1907|  12.6k|    default:
  ------------------
  |  Branch (1907:5): [True: 12.6k, False: 697]
  ------------------
 1908|  42.7k|      for (i = 0; i < num_ott_boxes; i++) {
  ------------------
  |  Branch (1908:19): [True: 30.2k, False: 12.5k]
  ------------------
 1909|  30.2k|        error_code = ixheaacd_map_index_data(&p_cur_bs->cld_lossless_data, p_aux_struct->ott_cld,
 1910|  30.2k|                                p_cur_bs->ott_cld_idx, p_cur_bs->cmp_ott_cld_idx, NULL, i,
 1911|  30.2k|                                p_cur_bs->ott_cld_idx_prev, i, CLD, 0, b_ott_bands[i],
  ------------------
  |  |   23|  30.2k|#define CLD (0)
  ------------------
 1912|  30.2k|                                ott_cld_default[i], parameter_sets, param_slot, extend_frame,
 1913|  30.2k|                                (curr_state->tree_config == TREE_525) ? 0 : quant_mode, NULL,
  ------------------
  |  Branch (1913:33): [True: 2.86k, False: 27.3k]
  ------------------
 1914|  30.2k|                                NULL, NULL, bitdec_table, free_scratch);
 1915|  30.2k|        if (error_code) return error_code;
  ------------------
  |  Branch (1915:13): [True: 32, False: 30.1k]
  ------------------
 1916|  30.2k|      }
 1917|  12.5k|      break;
 1918|  13.2k|  }
 1919|       |
 1920|  13.2k|  if (curr_state->one_icc == 1) {
  ------------------
  |  Branch (1920:7): [True: 2.66k, False: 10.5k]
  ------------------
 1921|  2.66k|    if (extend_frame == 0) {
  ------------------
  |  Branch (1921:9): [True: 2.08k, False: 588]
  ------------------
 1922|  2.08k|      num_parameter_sets = parameter_sets;
 1923|  2.08k|    } else {
 1924|    588|      num_parameter_sets = parameter_sets + 1;
 1925|    588|    }
 1926|       |
 1927|  11.3k|    for (ott_idx = 1; ott_idx < num_ott_boxes; ott_idx++) {
  ------------------
  |  Branch (1927:23): [True: 8.68k, False: 2.66k]
  ------------------
 1928|  8.68k|      if (curr_state->ott_mode_lfe[ott_idx] == 0) {
  ------------------
  |  Branch (1928:11): [True: 8.10k, False: 579]
  ------------------
 1929|  29.6k|        for (i = 0; i < num_parameter_sets; i++) {
  ------------------
  |  Branch (1929:21): [True: 21.4k, False: 8.10k]
  ------------------
 1930|   298k|          for (band = 0; band < bitstream_parameter_bands; band++) {
  ------------------
  |  Branch (1930:26): [True: 277k, False: 21.4k]
  ------------------
 1931|   277k|            p_cur_bs->cmp_ott_icc_idx[ott_idx][i][band] = p_cur_bs->cmp_ott_icc_idx[0][i][band];
 1932|   277k|          }
 1933|  21.4k|        }
 1934|  8.10k|      }
 1935|  8.68k|    }
 1936|       |
 1937|  14.0k|    for (ott_idx = 0; ott_idx < num_ott_boxes; ott_idx++) {
  ------------------
  |  Branch (1937:23): [True: 11.3k, False: 2.66k]
  ------------------
 1938|  11.3k|      if (curr_state->ott_mode_lfe[ott_idx] == 0) {
  ------------------
  |  Branch (1938:11): [True: 8.81k, False: 2.52k]
  ------------------
 1939|  8.81k|        error_code = ixheaacd_map_index_data(&p_cur_bs->icc_lossless_data, p_aux_struct->ott_icc,
 1940|  8.81k|                                p_cur_bs->ott_icc_idx, p_cur_bs->cmp_ott_icc_idx,
 1941|  8.81k|                                p_cur_bs->ott_icc_diff_idx, ott_idx, p_cur_bs->ott_icc_idx_prev,
 1942|  8.81k|                                0, ICC, 0, b_ott_bands[ott_idx], curr_state->icc_default,
  ------------------
  |  |   24|  8.81k|#define ICC (1)
  ------------------
 1943|  8.81k|                                parameter_sets, param_slot, extend_frame, quant_mode, NULL, NULL,
 1944|  8.81k|                                NULL, bitdec_table, free_scratch);
 1945|  8.81k|        if (error_code) return error_code;
  ------------------
  |  Branch (1945:13): [True: 7, False: 8.80k]
  ------------------
 1946|  8.81k|      }
 1947|  11.3k|    }
 1948|  10.5k|  } else {
 1949|  32.5k|    for (ott_idx = 0; ott_idx < num_ott_boxes; ott_idx++) {
  ------------------
  |  Branch (1949:23): [True: 22.0k, False: 10.5k]
  ------------------
 1950|  22.0k|      if (curr_state->ott_mode_lfe[ott_idx] == 0) {
  ------------------
  |  Branch (1950:11): [True: 21.5k, False: 419]
  ------------------
 1951|  21.5k|        error_code = ixheaacd_map_index_data(&p_cur_bs->icc_lossless_data, p_aux_struct->ott_icc,
 1952|  21.5k|                                p_cur_bs->ott_icc_idx, p_cur_bs->cmp_ott_icc_idx,
 1953|  21.5k|                                p_cur_bs->ott_icc_diff_idx, ott_idx, p_cur_bs->ott_icc_idx_prev,
 1954|  21.5k|                                ott_idx, ICC, 0, b_ott_bands[ott_idx], curr_state->icc_default,
  ------------------
  |  |   24|  21.5k|#define ICC (1)
  ------------------
 1955|  21.5k|                                parameter_sets, param_slot, extend_frame, quant_mode, NULL, NULL,
 1956|  21.5k|                                NULL, bitdec_table, free_scratch);
 1957|  21.5k|        if (error_code) return error_code;
  ------------------
  |  Branch (1957:13): [True: 27, False: 21.5k]
  ------------------
 1958|  21.5k|      }
 1959|  22.0k|    }
 1960|  10.5k|  }
 1961|       |
 1962|  13.1k|  if (curr_state->up_mix_type == 2) {
  ------------------
  |  Branch (1962:7): [True: 0, False: 13.1k]
  ------------------
 1963|      0|    WORD32 num_parameter_sets = parameter_sets;
 1964|       |
 1965|      0|    if (extend_frame) {
  ------------------
  |  Branch (1965:9): [True: 0, False: 0]
  ------------------
 1966|      0|      num_parameter_sets++;
 1967|      0|    }
 1968|       |
 1969|      0|    for (ott_idx = 0; ott_idx < curr_state->num_ott_boxes; ott_idx++) {
  ------------------
  |  Branch (1969:23): [True: 0, False: 0]
  ------------------
 1970|      0|      for (ps = 0; ps < num_parameter_sets; ps++) {
  ------------------
  |  Branch (1970:20): [True: 0, False: 0]
  ------------------
 1971|      0|        ixheaacd_map_data_to_28_bands(p_aux_struct->ott_cld[ott_idx][ps],
 1972|      0|                                      bitstream_parameter_bands, bitdec_table);
 1973|      0|        ixheaacd_map_data_to_28_bands(p_aux_struct->ott_icc[ott_idx][ps],
 1974|      0|                                      bitstream_parameter_bands, bitdec_table);
 1975|      0|      }
 1976|      0|    }
 1977|      0|  }
 1978|  13.1k|  return error_code;
 1979|  13.2k|}
ixheaacd_mps_bitdec.c:ixheaacd_map_index_data:
 1501|  71.2k|    ia_mps_dec_bitdec_tables_struct *ixheaacd_mps_dec_bitdec_tables, VOID *scratch) {
 1502|  71.2k|  WORD32 *a_param_slots;
 1503|  71.2k|  WORD32 *a_interpolate;
 1504|       |
 1505|  71.2k|  WORD32 data_sets;
 1506|  71.2k|  WORD32 *a_map;
 1507|  71.2k|  VOID *free_scratch;
 1508|       |
 1509|  71.2k|  WORD32 set_idx, i, band, parm_slot;
 1510|  71.2k|  WORD32 data_bands, stride;
 1511|  71.2k|  WORD32 ps, pb;
 1512|       |
 1513|  71.2k|  WORD32 i1, i2, x1, xi, x2;
 1514|  71.2k|  WORD32 *db_in;
 1515|  71.2k|  WORD32 *db_1, *db_2;
 1516|  71.2k|  IA_ERRORCODE error_code = IA_NO_ERROR;
  ------------------
  |  |   23|  71.2k|#define IA_NO_ERROR 0x00000000
  ------------------
 1517|  71.2k|  db_in = ott_vs_tot_db_in;
 1518|  71.2k|  db_1 = ott_vs_tot_db_1;
 1519|  71.2k|  db_2 = ott_vs_tot_db_2;
 1520|  71.2k|  a_param_slots = scratch;
 1521|  71.2k|  a_interpolate = a_param_slots + IXHEAAC_GET_SIZE_ALIGNED_TYPE(
  ------------------
  |  |   89|  71.2k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
 1522|  71.2k|                                      MAX_PARAMETER_SETS, sizeof(*a_interpolate), BYTE_ALIGN_8);
 1523|  71.2k|  a_map = a_interpolate +
 1524|  71.2k|          IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_SETS, sizeof(*a_map), BYTE_ALIGN_8);
  ------------------
  |  |   89|  71.2k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
 1525|  71.2k|  free_scratch = a_map + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS_PLUS_1, sizeof(*a_map),
  ------------------
  |  |   89|  71.2k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
 1526|  71.2k|                                                       BYTE_ALIGN_8);
 1527|       |
 1528|  71.2k|  data_sets = 0;
 1529|   199k|  for (i = 0; i < num_parameter_sets; i++) {
  ------------------
  |  Branch (1529:15): [True: 128k, False: 71.2k]
  ------------------
 1530|   128k|    if (ll_data->bs_xxx_data_mode[param_idx][i] == 3) {
  ------------------
  |  Branch (1530:9): [True: 25.0k, False: 103k]
  ------------------
 1531|  25.0k|      a_param_slots[data_sets] = i;
 1532|  25.0k|      data_sets++;
 1533|  25.0k|    }
 1534|   128k|  }
 1535|       |
 1536|  71.2k|  set_idx = 0;
 1537|       |
 1538|   199k|  for (i = 0; i < num_parameter_sets; i++) {
  ------------------
  |  Branch (1538:15): [True: 128k, False: 71.2k]
  ------------------
 1539|   128k|    if (ll_data->bs_xxx_data_mode[param_idx][i] == 0) {
  ------------------
  |  Branch (1539:9): [True: 83.3k, False: 44.8k]
  ------------------
 1540|  83.3k|      ll_data->no_cmp_quant_coarse_xxx[param_idx][i] = 0;
 1541|  1.43M|      for (band = start_band; band < stop_band; band++) {
  ------------------
  |  Branch (1541:31): [True: 1.35M, False: 83.3k]
  ------------------
 1542|  1.35M|        output_idx_data[xtt_idx][i][band] = default_value;
 1543|  1.35M|      }
 1544|  1.43M|      for (band = start_band; band < stop_band; band++) {
  ------------------
  |  Branch (1544:31): [True: 1.35M, False: 83.3k]
  ------------------
 1545|  1.35M|        idx_prev[xtt_idx][band] = output_idx_data[xtt_idx][i][band];
 1546|  1.35M|      }
 1547|  83.3k|    }
 1548|       |
 1549|   128k|    if (ll_data->bs_xxx_data_mode[param_idx][i] == 1) {
  ------------------
  |  Branch (1549:9): [True: 11.8k, False: 116k]
  ------------------
 1550|   195k|      for (band = start_band; band < stop_band; band++) {
  ------------------
  |  Branch (1550:31): [True: 183k, False: 11.8k]
  ------------------
 1551|   183k|        output_idx_data[xtt_idx][i][band] = idx_prev[xtt_idx][band];
 1552|   183k|      }
 1553|  11.8k|      ll_data->no_cmp_quant_coarse_xxx[param_idx][i] =
 1554|  11.8k|          ll_data->bs_quant_coarse_xxx_prev[param_idx];
 1555|  11.8k|    }
 1556|       |
 1557|   128k|    if (ll_data->bs_xxx_data_mode[param_idx][i] == 2) {
  ------------------
  |  Branch (1557:9): [True: 7.95k, False: 120k]
  ------------------
 1558|   116k|      for (band = start_band; band < stop_band; band++) {
  ------------------
  |  Branch (1558:31): [True: 108k, False: 7.95k]
  ------------------
 1559|   108k|        output_idx_data[xtt_idx][i][band] = idx_prev[xtt_idx][band];
 1560|   108k|      }
 1561|  7.95k|      a_interpolate[i] = 1;
 1562|   120k|    } else {
 1563|   120k|      a_interpolate[i] = 0;
 1564|   120k|    }
 1565|       |
 1566|   128k|    if (ll_data->bs_xxx_data_mode[param_idx][i] == 3) {
  ------------------
  |  Branch (1566:9): [True: 25.0k, False: 103k]
  ------------------
 1567|  25.0k|      parm_slot = a_param_slots[set_idx];
 1568|  25.0k|      stride = ixheaacd_mps_dec_bitdec_tables
 1569|  25.0k|                   ->pb_stride_table[ll_data->bs_freq_res_stride_xxx[param_idx][set_idx]];
 1570|  25.0k|      data_bands = (stop_band - start_band - 1) / stride + 1;
 1571|  25.0k|      ixheaacd_create_mapping(a_map, start_band, stop_band, stride, free_scratch);
 1572|  25.0k|      ixheaacd_map_frequency(&cmp_idx_data[xtt_idx][set_idx][0],
 1573|  25.0k|                             &output_idx_data[xtt_idx][parm_slot][0], a_map, data_bands);
 1574|       |
 1575|   401k|      for (band = start_band; band < stop_band; band++) {
  ------------------
  |  Branch (1575:31): [True: 376k, False: 25.0k]
  ------------------
 1576|   376k|        idx_prev[xtt_idx][band] = output_idx_data[xtt_idx][parm_slot][band];
 1577|   376k|      }
 1578|       |
 1579|  25.0k|      ll_data->bs_quant_coarse_xxx_prev[param_idx] =
 1580|  25.0k|          ll_data->bs_quant_coarse_xxx[param_idx][set_idx];
 1581|  25.0k|      ll_data->no_cmp_quant_coarse_xxx[param_idx][i] =
 1582|  25.0k|          ll_data->bs_quant_coarse_xxx[param_idx][set_idx];
 1583|       |
 1584|  25.0k|      set_idx++;
 1585|  25.0k|    }
 1586|       |
 1587|   128k|    if (diff_idx_data != NULL) {
  ------------------
  |  Branch (1587:9): [True: 51.3k, False: 76.8k]
  ------------------
 1588|   890k|      for (band = start_band; band < stop_band; band++) {
  ------------------
  |  Branch (1588:31): [True: 839k, False: 51.3k]
  ------------------
 1589|   839k|        output_idx_data[xtt_idx][i][band] += diff_idx_data[xtt_idx][i][band];
 1590|   839k|      }
 1591|  51.3k|    }
 1592|   128k|  }
 1593|       |
 1594|   199k|  for (i = 0; i < num_parameter_sets; i++) {
  ------------------
  |  Branch (1594:15): [True: 128k, False: 71.2k]
  ------------------
 1595|   128k|    if (a_interpolate[i] != 1) {
  ------------------
  |  Branch (1595:9): [True: 120k, False: 7.93k]
  ------------------
 1596|   120k|      if (ll_data->no_cmp_quant_coarse_xxx[param_idx][i] == 1) {
  ------------------
  |  Branch (1596:11): [True: 13.4k, False: 106k]
  ------------------
 1597|   193k|        for (band = start_band; band < stop_band; band++) {
  ------------------
  |  Branch (1597:33): [True: 179k, False: 13.3k]
  ------------------
 1598|   179k|          error_code = ixheaacd_deq_coarse(output_idx_data[xtt_idx][i][band], param_type,
 1599|   179k|                                           &(output_data[xtt_idx][i][band]),
 1600|   179k|                                           ixheaacd_mps_dec_bitdec_tables);
 1601|   179k|          if (error_code) {
  ------------------
  |  Branch (1601:15): [True: 53, False: 179k]
  ------------------
 1602|     53|            return error_code;
 1603|     53|          }
 1604|   179k|        }
 1605|   106k|      } else {
 1606|  1.83M|        for (band = start_band; band < stop_band; band++) {
  ------------------
  |  Branch (1606:33): [True: 1.72M, False: 106k]
  ------------------
 1607|  1.72M|          error_code =
 1608|  1.72M|              ia_mps_dec_deq(output_idx_data[xtt_idx][i][band], param_type,
 1609|  1.72M|                             &(output_data[xtt_idx][i][band]), ixheaacd_mps_dec_bitdec_tables);
 1610|  1.72M|          if (error_code) {
  ------------------
  |  Branch (1610:15): [True: 8, False: 1.72M]
  ------------------
 1611|      8|            return error_code;
 1612|      8|          }
 1613|  1.72M|        }
 1614|   106k|      }
 1615|   120k|    }
 1616|   128k|  }
 1617|       |
 1618|  71.2k|  if (quant_mode && (param_type == CLD)) {
  ------------------
  |  |   23|  5.47k|#define CLD (0)
  ------------------
  |  Branch (1618:7): [True: 5.47k, False: 65.7k]
  |  Branch (1618:21): [True: 2.52k, False: 2.94k]
  ------------------
 1619|  2.52k|    if (db_in == 0 || db_1 == 0 || db_2 == 0)
  ------------------
  |  Branch (1619:9): [True: 15, False: 2.51k]
  |  Branch (1619:23): [True: 0, False: 2.51k]
  |  Branch (1619:36): [True: 0, False: 2.51k]
  ------------------
 1620|     15|      return IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_MPS_PARAM;
  ------------------
  |  |  136|     15|#define IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_MPS_PARAM 0xFFFF9811
  ------------------
 1621|       |
 1622|  11.0k|    for (ps = 0; ps < num_parameter_sets; ps++) {
  ------------------
  |  Branch (1622:18): [True: 8.48k, False: 2.51k]
  ------------------
 1623|  8.48k|      if (a_interpolate[ps] != 1) {
  ------------------
  |  Branch (1623:11): [True: 7.08k, False: 1.40k]
  ------------------
 1624|  7.08k|        if (ll_data->no_cmp_quant_coarse_xxx[param_idx][ps]) {
  ------------------
  |  Branch (1624:13): [True: 1.14k, False: 5.94k]
  ------------------
 1625|  1.14k|          ixheaacd_coarse_2_fine(output_idx_data[xtt_idx][ps], param_type, start_band,
 1626|  1.14k|                                 stop_band - start_band);
 1627|  1.14k|        }
 1628|  74.5k|        for (pb = start_band; pb < stop_band; pb++) {
  ------------------
  |  Branch (1628:31): [True: 67.4k, False: 7.08k]
  ------------------
 1629|  67.4k|          ll_data->no_cmp_quant_coarse_xxx[param_idx][ps] = 1;
 1630|  67.4k|          ixheaacd_factor_cld(&(output_idx_data[xtt_idx][ps][pb]), *db_in++, &(*db_1++),
 1631|  67.4k|                              &(*db_2++), quant_mode, ixheaacd_mps_dec_bitdec_tables);
 1632|  67.4k|          ia_mps_dec_deq(output_idx_data[xtt_idx][ps][pb], param_type,
 1633|  67.4k|                         &(output_data[xtt_idx][ps][pb]), ixheaacd_mps_dec_bitdec_tables);
 1634|  67.4k|        }
 1635|  7.08k|      }
 1636|  8.48k|    }
 1637|  2.51k|  }
 1638|       |
 1639|  71.1k|  i1 = 0;
 1640|  71.1k|  x1 = 0;
 1641|  71.1k|  i2 = 0;
 1642|   199k|  for (i = 0; i < num_parameter_sets; i++) {
  ------------------
  |  Branch (1642:15): [True: 127k, False: 71.0k]
  ------------------
 1643|   127k|    if (a_interpolate[i] != 1) {
  ------------------
  |  Branch (1643:9): [True: 120k, False: 7.89k]
  ------------------
 1644|   120k|      i1 = i;
 1645|   120k|    }
 1646|   127k|    i2 = i;
 1647|   137k|    while (a_interpolate[i2] == 1) {
  ------------------
  |  Branch (1647:12): [True: 9.54k, False: 127k]
  ------------------
 1648|  9.54k|      i2++;
 1649|  9.54k|    }
 1650|   127k|    x1 = param_slot[i1];
 1651|   127k|    xi = param_slot[i];
 1652|   127k|    x2 = param_slot[i2];
 1653|       |
 1654|   127k|    if (a_interpolate[i] == 1) {
  ------------------
  |  Branch (1654:9): [True: 7.89k, False: 120k]
  ------------------
 1655|  7.89k|      if (i2 >= num_parameter_sets) return IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_PARAMETER_SETS;
  ------------------
  |  |  135|     99|#define IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_PARAMETER_SETS 0xFFFF9810
  ------------------
  |  Branch (1655:11): [True: 99, False: 7.79k]
  ------------------
 1656|  7.79k|      if (ll_data->no_cmp_quant_coarse_xxx[param_idx][i1]) {
  ------------------
  |  Branch (1656:11): [True: 2.23k, False: 5.55k]
  ------------------
 1657|  2.23k|        ixheaacd_coarse_2_fine(output_idx_data[xtt_idx][i1], param_type, start_band,
 1658|  2.23k|                               stop_band - start_band);
 1659|  2.23k|      }
 1660|  7.79k|      if (ll_data->no_cmp_quant_coarse_xxx[param_idx][i2]) {
  ------------------
  |  Branch (1660:11): [True: 2.54k, False: 5.25k]
  ------------------
 1661|  2.54k|        ixheaacd_coarse_2_fine(output_idx_data[xtt_idx][i2], param_type, start_band,
 1662|  2.54k|                               stop_band - start_band);
 1663|  2.54k|      }
 1664|   113k|      for (band = start_band; band < stop_band; band++) {
  ------------------
  |  Branch (1664:31): [True: 105k, False: 7.79k]
  ------------------
 1665|   105k|        WORD32 yi = 0, y1, y2;
 1666|   105k|        y1 = output_idx_data[xtt_idx][i1][band];
 1667|   105k|        y2 = output_idx_data[xtt_idx][i2][band];
 1668|       |
 1669|   105k|        if (x2 != x1) {
  ------------------
  |  Branch (1669:13): [True: 105k, False: 0]
  ------------------
 1670|   105k|          yi = y1 + (xi - x1) * (y2 - y1) / (x2 - x1);
 1671|   105k|        }
 1672|   105k|        output_idx_data[xtt_idx][i][band] = yi;
 1673|   105k|        ia_mps_dec_deq(output_idx_data[xtt_idx][i][band], param_type,
 1674|   105k|                       &(output_data[xtt_idx][i][band]), ixheaacd_mps_dec_bitdec_tables);
 1675|   105k|      }
 1676|  7.79k|    }
 1677|   127k|  }
 1678|       |
 1679|  71.0k|  ixheaacd_mps_check_index_bounds(output_idx_data, num_parameter_sets, start_band,
 1680|  71.0k|                                  stop_band, param_type, xtt_idx);
 1681|       |
 1682|  71.0k|  if (extend_frame) {
  ------------------
  |  Branch (1682:7): [True: 17.9k, False: 53.1k]
  ------------------
 1683|   338k|    for (band = start_band; band < stop_band; band++) {
  ------------------
  |  Branch (1683:29): [True: 320k, False: 17.9k]
  ------------------
 1684|   320k|      output_data[xtt_idx][num_parameter_sets][band] =
 1685|   320k|          output_data[xtt_idx][num_parameter_sets - 1][band];
 1686|   320k|      output_idx_data[xtt_idx][num_parameter_sets][band] =
 1687|   320k|          output_idx_data[xtt_idx][num_parameter_sets - 1][band];
 1688|   320k|    }
 1689|  17.9k|  }
 1690|  71.0k|  return IA_NO_ERROR;
  ------------------
  |  |   23|  71.0k|#define IA_NO_ERROR 0x00000000
  ------------------
 1691|  71.1k|}
ixheaacd_mps_bitdec.c:ixheaacd_create_mapping:
 1315|  26.7k|                                    WORD32 stop_band, WORD32 stride, VOID *scratch) {
 1316|  26.7k|  WORD32 in_bands, out_bands, bands_achived, bands_diff, incr, k, i;
 1317|  26.7k|  WORD32 *v_dk;
 1318|  26.7k|  in_bands = stop_band - start_band;
 1319|  26.7k|  out_bands = (in_bands - 1) / stride + 1;
 1320|  26.7k|  v_dk = scratch;
 1321|  26.7k|  if (out_bands < 1) {
  ------------------
  |  Branch (1321:7): [True: 16, False: 26.7k]
  ------------------
 1322|     16|    out_bands = 1;
 1323|     16|  }
 1324|       |
 1325|  26.7k|  bands_achived = out_bands * stride;
 1326|  26.7k|  bands_diff = in_bands - bands_achived;
 1327|   156k|  for (i = 0; i < out_bands; i++) {
  ------------------
  |  Branch (1327:15): [True: 129k, False: 26.7k]
  ------------------
 1328|   129k|    v_dk[i] = stride;
 1329|   129k|  }
 1330|       |
 1331|  26.7k|  if (bands_diff > 0) {
  ------------------
  |  Branch (1331:7): [True: 0, False: 26.7k]
  ------------------
 1332|      0|    incr = -1;
 1333|      0|    k = out_bands - 1;
 1334|  26.7k|  } else {
 1335|  26.7k|    incr = 1;
 1336|  26.7k|    k = 0;
 1337|  26.7k|  }
 1338|       |
 1339|   189k|  while (bands_diff != 0) {
  ------------------
  |  Branch (1339:10): [True: 162k, False: 26.7k]
  ------------------
 1340|   162k|    v_dk[k] = v_dk[k] - incr;
 1341|   162k|    k = k + incr;
 1342|   162k|    bands_diff = bands_diff + incr;
 1343|   162k|    if (k >= out_bands) {
  ------------------
  |  Branch (1343:9): [True: 159k, False: 3.73k]
  ------------------
 1344|   159k|      if (bands_diff > 0) {
  ------------------
  |  Branch (1344:11): [True: 0, False: 159k]
  ------------------
 1345|      0|        k = out_bands - 1;
 1346|   159k|      } else if (bands_diff < 0) {
  ------------------
  |  Branch (1346:18): [True: 147k, False: 11.2k]
  ------------------
 1347|   147k|        k = 0;
 1348|   147k|      }
 1349|   159k|    }
 1350|   162k|  }
 1351|  26.7k|  a_map[0] = start_band;
 1352|   156k|  for (i = 0; i < out_bands; i++) {
  ------------------
  |  Branch (1352:15): [True: 129k, False: 26.7k]
  ------------------
 1353|   129k|    a_map[i + 1] = a_map[i] + v_dk[i];
 1354|   129k|  }
 1355|  26.7k|}
ixheaacd_mps_bitdec.c:ixheaacd_map_frequency:
 1358|  25.0k|                                   WORD32 data_bands) {
 1359|  25.0k|  WORD32 i, j, start_band, stop_band, value;
 1360|  25.0k|  WORD32 start_band_0 = p_map[0];
 1361|       |
 1362|   146k|  for (i = 0; i < data_bands; i++) {
  ------------------
  |  Branch (1362:15): [True: 121k, False: 25.0k]
  ------------------
 1363|   121k|    value = p_input[i + start_band_0];
 1364|       |
 1365|   121k|    start_band = p_map[i];
 1366|   121k|    stop_band = p_map[i + 1];
 1367|   497k|    for (j = start_band; j < stop_band; j++) {
  ------------------
  |  Branch (1367:26): [True: 376k, False: 121k]
  ------------------
 1368|   376k|      p_output[j] = value;
 1369|   376k|    }
 1370|   121k|  }
 1371|  25.0k|}
ixheaacd_mps_bitdec.c:ixheaacd_deq_coarse:
 1375|   179k|    ia_mps_dec_bitdec_tables_struct *ixheaacd_mps_dec_bitdec_tables) {
 1376|   179k|  switch (param_type) {
 1377|  74.4k|    case CLD:
  ------------------
  |  |   23|  74.4k|#define CLD (0)
  ------------------
  |  Branch (1377:5): [True: 74.4k, False: 105k]
  ------------------
 1378|  74.4k|      if (value >= 8 || value < -7) return IA_FATAL_ERROR;
  ------------------
  |  |   25|     48|#define IA_FATAL_ERROR 0x80000000
  ------------------
  |  Branch (1378:11): [True: 47, False: 74.4k]
  |  Branch (1378:25): [True: 1, False: 74.4k]
  ------------------
 1379|  74.4k|      *dequant = ixheaacd_mps_dec_bitdec_tables->dequant_cld_coarse[value + 7];
 1380|  74.4k|      break;
 1381|       |
 1382|  89.9k|    case ICC:
  ------------------
  |  |   24|  89.9k|#define ICC (1)
  ------------------
  |  Branch (1382:5): [True: 89.9k, False: 90.0k]
  ------------------
 1383|  89.9k|      if (value >= 8 || value < 0) return IA_FATAL_ERROR;
  ------------------
  |  |   25|      1|#define IA_FATAL_ERROR 0x80000000
  ------------------
  |  Branch (1383:11): [True: 1, False: 89.9k]
  |  Branch (1383:25): [True: 0, False: 89.9k]
  ------------------
 1384|  89.9k|      *dequant = ixheaacd_mps_dec_bitdec_tables->dequant_icc[value];
 1385|  89.9k|      break;
 1386|       |
 1387|  15.5k|    case CPC:
  ------------------
  |  |   26|  15.5k|#define CPC (3)
  ------------------
  |  Branch (1387:5): [True: 15.5k, False: 164k]
  ------------------
 1388|  15.5k|      if (value >= 16 || value < -10) return IA_FATAL_ERROR;
  ------------------
  |  |   25|      4|#define IA_FATAL_ERROR 0x80000000
  ------------------
  |  Branch (1388:11): [True: 1, False: 15.5k]
  |  Branch (1388:26): [True: 3, False: 15.5k]
  ------------------
 1389|  15.5k|      *dequant = ixheaacd_mps_dec_bitdec_tables->dequant_cpc_coarse[value + 10];
 1390|  15.5k|      break;
 1391|      0|    default:
  ------------------
  |  Branch (1391:5): [True: 0, False: 179k]
  ------------------
 1392|      0|      return IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_DEQUANT_PARAM;
  ------------------
  |  |  126|      0|#define IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_DEQUANT_PARAM 0xFFFF9807
  ------------------
 1393|   179k|  }
 1394|   179k|  return IA_NO_ERROR;
  ------------------
  |  |   23|   179k|#define IA_NO_ERROR 0x00000000
  ------------------
 1395|   179k|}
ixheaacd_mps_bitdec.c:ia_mps_dec_deq:
 1399|  1.90M|    ia_mps_dec_bitdec_tables_struct *ixheaacd_mps_dec_bitdec_tables) {
 1400|  1.90M|  switch (param_type) {
 1401|  1.09M|    case CLD:
  ------------------
  |  |   23|  1.09M|#define CLD (0)
  ------------------
  |  Branch (1401:5): [True: 1.09M, False: 809k]
  ------------------
 1402|  1.09M|      if (value >= 16 || value < -15) return IA_FATAL_ERROR;
  ------------------
  |  |   25|  5.09k|#define IA_FATAL_ERROR 0x80000000
  ------------------
  |  Branch (1402:11): [True: 4.23k, False: 1.08M]
  |  Branch (1402:26): [True: 859, False: 1.08M]
  ------------------
 1403|  1.08M|      *dequant = ixheaacd_mps_dec_bitdec_tables->dequant_cld[value + 15];
 1404|  1.08M|      break;
 1405|       |
 1406|   773k|    case ICC:
  ------------------
  |  |   24|   773k|#define ICC (1)
  ------------------
  |  Branch (1406:5): [True: 773k, False: 1.12M]
  ------------------
 1407|   773k|      if (value >= 8 || value < 0) return IA_FATAL_ERROR;
  ------------------
  |  |   25|  2.32k|#define IA_FATAL_ERROR 0x80000000
  ------------------
  |  Branch (1407:11): [True: 2.32k, False: 771k]
  |  Branch (1407:25): [True: 0, False: 771k]
  ------------------
 1408|   771k|      *dequant = ixheaacd_mps_dec_bitdec_tables->dequant_icc[value];
 1409|   771k|      break;
 1410|       |
 1411|  35.8k|    case CPC:
  ------------------
  |  |   26|  35.8k|#define CPC (3)
  ------------------
  |  Branch (1411:5): [True: 35.8k, False: 1.86M]
  ------------------
 1412|  35.8k|      if (value >= 32 || value < -20) return IA_FATAL_ERROR;
  ------------------
  |  |   25|    116|#define IA_FATAL_ERROR 0x80000000
  ------------------
  |  Branch (1412:11): [True: 22, False: 35.8k]
  |  Branch (1412:26): [True: 94, False: 35.7k]
  ------------------
 1413|  35.7k|      *dequant = ixheaacd_mps_dec_bitdec_tables->dequant_cpc[value + 20];
 1414|  35.7k|      break;
 1415|       |
 1416|      0|    default:
  ------------------
  |  Branch (1416:5): [True: 0, False: 1.90M]
  ------------------
 1417|      0|      return IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_DEQUANT_PARAM;
  ------------------
  |  |  126|      0|#define IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_DEQUANT_PARAM 0xFFFF9807
  ------------------
 1418|  1.90M|  }
 1419|  1.89M|  return IA_NO_ERROR;
  ------------------
  |  |   23|  1.89M|#define IA_NO_ERROR 0x00000000
  ------------------
 1420|  1.90M|}
ixheaacd_mps_bitdec.c:ixheaacd_factor_cld:
 1468|  67.4k|                                ia_mps_dec_bitdec_tables_struct *ixheaacd_mps_dec_bitdec_tables) {
 1469|  67.4k|  WORD32 factor = 0;
 1470|  67.4k|  WORD32 c1;
 1471|  67.4k|  WORD32 c2;
 1472|  67.4k|  WORD32 cld_idx;
 1473|       |
 1474|  67.4k|  ixheaacd_factor_funct(ott_vs_tot_db, quant_mode, &factor);
 1475|       |
 1476|  67.4k|  cld_idx = ixheaac_mul32_sh(*idx, factor, 23);
 1477|  67.4k|  cld_idx = ixheaac_shr32(ixheaac_add32(cld_idx, 1), 1);
 1478|       |
 1479|  67.4k|  cld_idx = min(cld_idx, 15);
  ------------------
  |  |   75|  67.4k|#define min(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (75:20): [True: 46.2k, False: 21.1k]
  |  |  ------------------
  ------------------
 1480|  67.4k|  cld_idx = max(cld_idx, -15);
  ------------------
  |  |   74|  67.4k|#define max(a, b) (((a) > (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (74:20): [True: 65.3k, False: 2.07k]
  |  |  ------------------
  ------------------
 1481|       |
 1482|  67.4k|  *idx = cld_idx;
 1483|       |
 1484|  67.4k|  c1 = ixheaacd_mps_dec_bitdec_tables->factor_cld_tab_1[*idx + 15];
 1485|  67.4k|  c2 = ixheaacd_mps_dec_bitdec_tables->factor_cld_tab_1[15 - *idx];
 1486|       |
 1487|  67.4k|  *ott_vs_tot_db_1 = ixheaac_add32_sat(c1, ott_vs_tot_db);
 1488|  67.4k|  *ott_vs_tot_db_2 = ixheaac_add32_sat(c2, ott_vs_tot_db);
 1489|  67.4k|}
ixheaacd_mps_bitdec.c:ixheaacd_factor_funct:
 1423|  67.4k|                                          WORD32 *factor) {
 1424|  67.4k|  WORD32 db_diff;
 1425|  67.4k|  WORD32 x_linear = 0;
 1426|       |
 1427|  67.4k|  WORD32 maxfactor = 0;
 1428|  67.4k|  WORD32 constfact;
 1429|       |
 1430|  67.4k|  if (ott_vs_tot_db > 0) return IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_MPS_PARAM;
  ------------------
  |  |  136|    354|#define IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_MPS_PARAM 0xFFFF9811
  ------------------
  |  Branch (1430:7): [True: 354, False: 67.0k]
  ------------------
 1431|  67.0k|  db_diff = ixheaac_negate32_sat(ott_vs_tot_db);
 1432|       |
 1433|  67.0k|  switch (quant_mode) {
 1434|      0|    case QUANT_MODE_0:
  ------------------
  |  Branch (1434:5): [True: 0, False: 67.0k]
  ------------------
 1435|      0|      return (ONE_IN_Q24);
  ------------------
  |  |   50|      0|#define ONE_IN_Q24 (16777216)
  ------------------
 1436|      0|      break;
 1437|  14.4k|    case QUANT_MODE_1:
  ------------------
  |  Branch (1437:5): [True: 14.4k, False: 52.6k]
  ------------------
 1438|  14.4k|      x_linear = 1024;
 1439|       |
 1440|  14.4k|      maxfactor = 83886080;
 1441|  14.4k|      constfact = 3277;
 1442|  14.4k|      break;
 1443|  20.8k|    case QUANT_MODE_2:
  ------------------
  |  Branch (1443:5): [True: 20.8k, False: 46.2k]
  ------------------
 1444|  20.8k|      x_linear = 1024;
 1445|       |
 1446|  20.8k|      maxfactor = (ONE_IN_Q27);
  ------------------
  |  |   51|  20.8k|#define ONE_IN_Q27 (134217728)
  ------------------
 1447|  20.8k|      constfact = 4779;
 1448|  20.8k|      break;
 1449|  31.8k|    default:
  ------------------
  |  Branch (1449:5): [True: 31.8k, False: 35.2k]
  ------------------
 1450|  31.8k|      return IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_QUANT_MODE;
  ------------------
  |  |  127|  31.8k|#define IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_QUANT_MODE 0xFFFF9808
  ------------------
 1451|  67.0k|  }
 1452|       |
 1453|  35.2k|  if (db_diff > (x_linear << 5)) {
  ------------------
  |  Branch (1453:7): [True: 12.4k, False: 22.7k]
  ------------------
 1454|  12.4k|    WORD32 db_diff_fix = db_diff >> 5;
 1455|  12.4k|    *factor = ixheaac_add32_sat(
 1456|  12.4k|        ixheaac_sat64_32(ixheaac_mult64(ixheaac_sub32_sat(db_diff_fix, x_linear), constfact)),
 1457|  12.4k|        ONE_IN_Q24);
  ------------------
  |  |   50|  12.4k|#define ONE_IN_Q24 (16777216)
  ------------------
 1458|  22.7k|  } else {
 1459|  22.7k|    *factor = ONE_IN_Q24;
  ------------------
  |  |   50|  22.7k|#define ONE_IN_Q24 (16777216)
  ------------------
 1460|  22.7k|  }
 1461|       |
 1462|  35.2k|  *factor = min(maxfactor, *factor);
  ------------------
  |  |   75|  35.2k|#define min(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (75:20): [True: 4.25k, False: 30.9k]
  |  |  ------------------
  ------------------
 1463|  35.2k|  return IA_NO_ERROR;
  ------------------
  |  |   23|  35.2k|#define IA_NO_ERROR 0x00000000
  ------------------
 1464|  67.0k|}
ixheaacd_mps_bitdec.c:ixheaacd_mps_check_index_bounds:
   86|  71.0k|    WORD32 param_type, WORD32 xtt_idx) {
   87|  71.0k|  WORD32 i, band;
   88|   198k|  for (i = 0; i < num_parameter_sets; i++) {
  ------------------
  |  Branch (88:15): [True: 127k, False: 71.0k]
  ------------------
   89|  2.13M|    for (band = start_band; band < stop_band; band++) {
  ------------------
  |  Branch (89:29): [True: 2.00M, False: 127k]
  ------------------
   90|  2.00M|      if (param_type == CLD) {
  ------------------
  |  |   23|  2.00M|#define CLD (0)
  ------------------
  |  Branch (90:11): [True: 1.09M, False: 913k]
  ------------------
   91|  1.09M|        output_idx_data[xtt_idx][i][band] =
   92|  1.09M|          ixheaacd_bound_check(output_idx_data[xtt_idx][i][band], -15, 15);
   93|  1.09M|      } else if (param_type == ICC) {
  ------------------
  |  |   24|   913k|#define ICC (1)
  ------------------
  |  Branch (93:18): [True: 862k, False: 50.7k]
  ------------------
   94|   862k|        output_idx_data[xtt_idx][i][band] =
   95|   862k|        ixheaacd_bound_check(output_idx_data[xtt_idx][i][band], 0, 7);
   96|   862k|      }
   97|  2.00M|    }
   98|   127k|  }
   99|  71.0k|}
ixheaacd_mps_bitdec.c:ixheaacd_bound_check:
   54|  1.95M|static WORD32 ixheaacd_bound_check(WORD32 var, WORD32 lower_bound, WORD32 upper_bound) {
   55|  1.95M|  var = min(var, upper_bound);
  ------------------
  |  |   75|  1.95M|#define min(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (75:20): [True: 1.27M, False: 679k]
  |  |  ------------------
  ------------------
   56|  1.95M|  var = max(var, lower_bound);
  ------------------
  |  |   74|  1.95M|#define max(a, b) (((a) > (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (74:20): [True: 1.20M, False: 753k]
  |  |  ------------------
  ------------------
   57|  1.95M|  return var;
   58|  1.95M|}
ixheaacd_mps_bitdec.c:ixheaacd_decode_and_map_frame_ttt:
 1982|  13.1k|{
 1983|  13.1k|  IA_ERRORCODE error_code = IA_NO_ERROR;
  ------------------
  |  |   23|  13.1k|#define IA_NO_ERROR 0x00000000
  ------------------
 1984|  13.1k|  ia_mps_dec_spatial_bs_frame_struct *p_cur_bs;
 1985|  13.1k|  ia_mps_dec_bitdec_tables_struct *bitdec_table =
 1986|  13.1k|      pstr_mps_state->ia_mps_dec_mps_table.bitdec_table_ptr;
 1987|  13.1k|  ia_mps_dec_auxilary_struct *p_aux_struct = pstr_mps_state->aux_struct;
 1988|  13.1k|  WORD32 *param_slot = pstr_mps_state->aux_struct->param_slot;
 1989|       |
 1990|  13.1k|  WORD32 num_bands;
 1991|       |
 1992|  13.1k|  WORD32 i, j, offset;
 1993|  13.1k|  WORD32 num_ttt_boxes;
 1994|  13.1k|  VOID *free_scratch;
 1995|       |
 1996|  13.1k|  p_cur_bs = pstr_mps_state->bs_frame;
 1997|  13.1k|  num_bands = pstr_mps_state->bitstream_parameter_bands;
 1998|  13.1k|  offset = pstr_mps_state->num_ott_boxes;
 1999|  13.1k|  num_ttt_boxes = pstr_mps_state->num_ttt_boxes;
 2000|  13.1k|  free_scratch = pstr_mps_state->mps_scratch_mem_v;
 2001|       |
 2002|  15.4k|  for (i = 0; i < num_ttt_boxes; i++) {
  ------------------
  |  Branch (2002:15): [True: 2.29k, False: 13.1k]
  ------------------
 2003|  2.29k|    for (j = 0;
 2004|  4.76k|         (j < 2) &&
  ------------------
  |  Branch (2004:10): [True: 4.31k, False: 441]
  ------------------
 2005|  4.31k|         p_aux_struct->ttt_config[j][i].start_band < p_aux_struct->ttt_config[j][i].stop_band;
  ------------------
  |  Branch (2005:10): [True: 2.50k, False: 1.81k]
  ------------------
 2006|  2.50k|         j++) {
 2007|  2.50k|      if (p_aux_struct->ttt_config[j][i].mode < 2) {
  ------------------
  |  Branch (2007:11): [True: 790, False: 1.71k]
  ------------------
 2008|    790|        error_code = ixheaacd_map_index_data(
 2009|    790|            &p_cur_bs->cpc_lossless_data, p_aux_struct->ttt_cpc_1, p_cur_bs->ttt_cpc_1_idx,
 2010|    790|            p_cur_bs->cmp_ttt_cpc_1_idx, NULL, i, p_cur_bs->ttt_cpc_1_idx_prev,
 2011|    790|            offset + 4 * i + 2 * j, CPC, p_aux_struct->ttt_config[j][i].bitstream_start_band,
  ------------------
  |  |   26|    790|#define CPC (3)
  ------------------
 2012|    790|            p_aux_struct->ttt_config[j][i].bitstream_stop_band, pstr_mps_state->cpc_default,
 2013|    790|            pstr_mps_state->num_parameter_sets, param_slot, pstr_mps_state->extend_frame,
 2014|    790|            pstr_mps_state->quant_mode, NULL, NULL, NULL, bitdec_table, free_scratch);
 2015|    790|        if (error_code) return error_code;
  ------------------
  |  Branch (2015:13): [True: 9, False: 781]
  ------------------
 2016|       |
 2017|    781|        error_code = ixheaacd_map_index_data(
 2018|    781|            &p_cur_bs->cpc_lossless_data, p_aux_struct->ttt_cpc_2, p_cur_bs->ttt_cpc_2_idx,
 2019|    781|            p_cur_bs->cmp_ttt_cpc_2_idx, NULL, i, p_cur_bs->ttt_cpc_2_idx_prev,
 2020|    781|            offset + 4 * i + 1 + 2 * j, CPC, p_aux_struct->ttt_config[j][i].bitstream_start_band,
  ------------------
  |  |   26|    781|#define CPC (3)
  ------------------
 2021|    781|            p_aux_struct->ttt_config[j][i].bitstream_stop_band, pstr_mps_state->cpc_default,
 2022|    781|            pstr_mps_state->num_parameter_sets, param_slot, pstr_mps_state->extend_frame,
 2023|    781|            pstr_mps_state->quant_mode, NULL, NULL, NULL, bitdec_table, free_scratch);
 2024|    781|        if (error_code) return error_code;
  ------------------
  |  Branch (2024:13): [True: 6, False: 775]
  ------------------
 2025|       |
 2026|    775|        error_code = ixheaacd_map_index_data(
 2027|    775|            &p_cur_bs->icc_lossless_data, p_aux_struct->ttt_icc, p_cur_bs->ttt_icc_idx,
 2028|    775|            p_cur_bs->cmp_ttt_icc_idx, NULL, i, p_cur_bs->ttt_icc_idx_prev,
 2029|    775|            offset + 4 * i + 2 * j, ICC, p_aux_struct->ttt_config[j][i].bitstream_start_band,
  ------------------
  |  |   24|    775|#define ICC (1)
  ------------------
 2030|    775|            p_aux_struct->ttt_config[j][i].bitstream_stop_band, pstr_mps_state->icc_default,
 2031|    775|            pstr_mps_state->num_parameter_sets, param_slot, pstr_mps_state->extend_frame,
 2032|    775|            pstr_mps_state->quant_mode, NULL, NULL, NULL, bitdec_table, free_scratch);
 2033|    775|        if (error_code) return error_code;
  ------------------
  |  Branch (2033:13): [True: 5, False: 770]
  ------------------
 2034|    775|      }
 2035|       |
 2036|  1.71k|      else {
 2037|  1.71k|        error_code = ixheaacd_map_index_data(
 2038|  1.71k|            &p_cur_bs->cld_lossless_data, p_aux_struct->ttt_cld_1, p_cur_bs->ttt_cld_1_idx,
 2039|  1.71k|            p_cur_bs->cmp_ttt_cld_1_idx, NULL, i, p_cur_bs->ttt_cld_1_idx_prev,
 2040|  1.71k|            offset + 4 * i + 2 * j, CLD, p_aux_struct->ttt_config[j][i].bitstream_start_band,
  ------------------
  |  |   23|  1.71k|#define CLD (0)
  ------------------
 2041|  1.71k|            p_aux_struct->ttt_config[j][i].bitstream_stop_band,
 2042|  1.71k|            pstr_mps_state->ttt_cld_1_default[i], pstr_mps_state->num_parameter_sets, param_slot,
 2043|  1.71k|            pstr_mps_state->extend_frame, pstr_mps_state->quant_mode, NULL, NULL, NULL,
 2044|  1.71k|            bitdec_table, free_scratch);
 2045|  1.71k|        if (error_code) return error_code;
  ------------------
  |  Branch (2045:13): [True: 15, False: 1.69k]
  ------------------
 2046|       |
 2047|  1.69k|        error_code = ixheaacd_map_index_data(
 2048|  1.69k|            &p_cur_bs->cld_lossless_data, p_aux_struct->ttt_cld_2, p_cur_bs->ttt_cld_2_idx,
 2049|  1.69k|            p_cur_bs->cmp_ttt_cld_2_idx, NULL, i, p_cur_bs->ttt_cld_2_idx_prev,
 2050|  1.69k|            offset + 4 * i + 1 + 2 * j, CLD, p_aux_struct->ttt_config[j][i].bitstream_start_band,
  ------------------
  |  |   23|  1.69k|#define CLD (0)
  ------------------
 2051|  1.69k|            p_aux_struct->ttt_config[j][i].bitstream_stop_band,
 2052|  1.69k|            pstr_mps_state->ttt_cld_2_default[i], pstr_mps_state->num_parameter_sets, param_slot,
 2053|  1.69k|            pstr_mps_state->extend_frame, pstr_mps_state->quant_mode, NULL, NULL, NULL,
 2054|  1.69k|            bitdec_table, free_scratch);
 2055|  1.69k|        if (error_code) return error_code;
  ------------------
  |  Branch (2055:13): [True: 4, False: 1.69k]
  ------------------
 2056|  1.69k|      }
 2057|       |
 2058|  2.46k|      if (pstr_mps_state->up_mix_type == 2) {
  ------------------
  |  Branch (2058:11): [True: 0, False: 2.46k]
  ------------------
 2059|      0|        WORD32 num_parameter_sets = pstr_mps_state->num_parameter_sets;
 2060|      0|        WORD32 ps;
 2061|       |
 2062|      0|        if (pstr_mps_state->extend_frame) {
  ------------------
  |  Branch (2062:13): [True: 0, False: 0]
  ------------------
 2063|      0|          num_parameter_sets++;
 2064|      0|        }
 2065|       |
 2066|      0|        for (ps = 0; ps < num_parameter_sets; ps++) {
  ------------------
  |  Branch (2066:22): [True: 0, False: 0]
  ------------------
 2067|      0|          ixheaacd_map_data_to_28_bands(p_aux_struct->ttt_cpc_1[i][ps], num_bands, bitdec_table);
 2068|      0|          ixheaacd_map_data_to_28_bands(p_aux_struct->ttt_cpc_2[i][ps], num_bands, bitdec_table);
 2069|      0|          ixheaacd_map_data_to_28_bands(p_aux_struct->ttt_cld_1[i][ps], num_bands, bitdec_table);
 2070|      0|          ixheaacd_map_data_to_28_bands(p_aux_struct->ttt_cld_2[i][ps], num_bands, bitdec_table);
 2071|      0|          ixheaacd_map_data_to_28_bands(p_aux_struct->ttt_icc[i][ps], num_bands, bitdec_table);
 2072|      0|        }
 2073|      0|      }
 2074|  2.46k|    }
 2075|  2.29k|  }
 2076|  13.1k|  return error_code;
 2077|  13.1k|}
ixheaacd_mps_bitdec.c:ixheaacd_decode_and_map_frame_smg:
 2079|  13.1k|static VOID ixheaacd_decode_and_map_frame_smg(ia_heaac_mps_state_struct *pstr_mps_state) {
 2080|  13.1k|  ia_mps_dec_smoothing_state_struct *smooth_state =
 2081|  13.1k|      pstr_mps_state->mps_persistent_mem.smooth_state;
 2082|  13.1k|  ia_mps_dec_bitdec_tables_struct *bitdec_table =
 2083|  13.1k|      pstr_mps_state->ia_mps_dec_mps_table.bitdec_table_ptr;
 2084|  13.1k|  ia_mps_dec_auxilary_struct *p_aux_struct = pstr_mps_state->aux_struct;
 2085|  13.1k|  WORD32 *smg_time = p_aux_struct->smg_time;
 2086|  13.1k|  WORD32 ps, pb, pg, pb_stride, data_bands, pb_start, pb_stop;
 2087|  13.1k|  WORD32 *a_group_to_band;
 2088|  13.1k|  VOID *free_scratch;
 2089|  13.1k|  ia_mps_dec_spatial_bs_frame_struct *frame = pstr_mps_state->bs_frame;
 2090|  13.1k|  pstr_mps_state->smooth_control = frame->bs_smooth_control;
 2091|  13.1k|  a_group_to_band = pstr_mps_state->mps_scratch_mem_v;
 2092|  13.1k|  free_scratch =
 2093|  13.1k|      a_group_to_band + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS_PLUS_1,
  ------------------
  |  |   89|  13.1k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
 2094|  13.1k|                                                      sizeof(*a_group_to_band), BYTE_ALIGN_8);
 2095|       |
 2096|  13.1k|  if (pstr_mps_state->smooth_control) {
  ------------------
  |  Branch (2096:7): [True: 13.1k, False: 0]
  ------------------
 2097|  33.7k|    for (ps = 0; ps < pstr_mps_state->num_parameter_sets; ps++) {
  ------------------
  |  Branch (2097:18): [True: 20.6k, False: 13.1k]
  ------------------
 2098|  20.6k|      switch (frame->bs_smooth_mode[ps]) {
 2099|  10.6k|        case SMOOTH_MODE_0:
  ------------------
  |  Branch (2099:9): [True: 10.6k, False: 9.92k]
  ------------------
 2100|  10.6k|          smg_time[ps] = 256;
 2101|   190k|          for (pb = 0; pb < pstr_mps_state->bitstream_parameter_bands; pb++) {
  ------------------
  |  Branch (2101:24): [True: 179k, False: 10.6k]
  ------------------
 2102|   179k|            p_aux_struct->smg_data[ps][pb] = 0;
 2103|   179k|          }
 2104|  10.6k|          break;
 2105|       |
 2106|  4.84k|        case SMOOTH_MODE_1:
  ------------------
  |  Branch (2106:9): [True: 4.84k, False: 15.7k]
  ------------------
 2107|  4.84k|          if (ps > 0)
  ------------------
  |  Branch (2107:15): [True: 964, False: 3.87k]
  ------------------
 2108|    964|            smg_time[ps] = smg_time[ps - 1];
 2109|  3.87k|          else
 2110|  3.87k|            smg_time[ps] = smooth_state->prev_smg_time;
 2111|       |
 2112|  95.9k|          for (pb = 0; pb < pstr_mps_state->bitstream_parameter_bands; pb++) {
  ------------------
  |  Branch (2112:24): [True: 91.1k, False: 4.84k]
  ------------------
 2113|  91.1k|            if (ps > 0)
  ------------------
  |  Branch (2113:17): [True: 15.3k, False: 75.7k]
  ------------------
 2114|  15.3k|              p_aux_struct->smg_data[ps][pb] = p_aux_struct->smg_data[ps - 1][pb];
 2115|  75.7k|            else
 2116|  75.7k|              p_aux_struct->smg_data[ps][pb] = smooth_state->prev_smg_data[pb];
 2117|  91.1k|          }
 2118|  4.84k|          break;
 2119|       |
 2120|  3.30k|        case SMOOTH_MODE_2:
  ------------------
  |  Branch (2120:9): [True: 3.30k, False: 17.3k]
  ------------------
 2121|  3.30k|          smg_time[ps] = bitdec_table->smg_time_table[frame->bs_smooth_time[ps]];
 2122|  64.7k|          for (pb = 0; pb < pstr_mps_state->bitstream_parameter_bands; pb++) {
  ------------------
  |  Branch (2122:24): [True: 61.4k, False: 3.30k]
  ------------------
 2123|  61.4k|            p_aux_struct->smg_data[ps][pb] = 1;
 2124|  61.4k|          }
 2125|  3.30k|          break;
 2126|       |
 2127|  1.78k|        case SMOOTH_MODE_3:
  ------------------
  |  Branch (2127:9): [True: 1.78k, False: 18.8k]
  ------------------
 2128|  1.78k|          smg_time[ps] = bitdec_table->smg_time_table[frame->bs_smooth_time[ps]];
 2129|  1.78k|          pb_stride = bitdec_table->pb_stride_table[frame->bs_freq_res_stride_smg[ps]];
 2130|  1.78k|          data_bands = (pstr_mps_state->bitstream_parameter_bands - 1) / pb_stride + 1;
 2131|  1.78k|          ixheaacd_create_mapping(a_group_to_band, 0, pstr_mps_state->bitstream_parameter_bands,
 2132|  1.78k|                                  pb_stride, free_scratch);
 2133|  10.1k|          for (pg = 0; pg < data_bands; pg++) {
  ------------------
  |  Branch (2133:24): [True: 8.34k, False: 1.78k]
  ------------------
 2134|  8.34k|            pb_start = a_group_to_band[pg];
 2135|  8.34k|            pb_stop = a_group_to_band[pg + 1];
 2136|  32.4k|            for (pb = pb_start; pb < pb_stop; pb++) {
  ------------------
  |  Branch (2136:33): [True: 24.0k, False: 8.34k]
  ------------------
 2137|  24.0k|              p_aux_struct->smg_data[ps][pb] = frame->bs_smg_data[ps][pg];
 2138|  24.0k|            }
 2139|  8.34k|          }
 2140|  1.78k|          break;
 2141|       |
 2142|      0|        default:
  ------------------
  |  Branch (2142:9): [True: 0, False: 20.6k]
  ------------------
 2143|      0|          break;
 2144|  20.6k|      }
 2145|  20.6k|    }
 2146|       |
 2147|  13.1k|    smooth_state->prev_smg_time = smg_time[pstr_mps_state->num_parameter_sets - 1];
 2148|   252k|    for (pb = 0; pb < pstr_mps_state->bitstream_parameter_bands; pb++) {
  ------------------
  |  Branch (2148:18): [True: 239k, False: 13.1k]
  ------------------
 2149|   239k|      smooth_state->prev_smg_data[pb] =
 2150|   239k|          p_aux_struct->smg_data[pstr_mps_state->num_parameter_sets - 1][pb];
 2151|   239k|    }
 2152|       |
 2153|  13.1k|    if (pstr_mps_state->extend_frame) {
  ------------------
  |  Branch (2153:9): [True: 3.56k, False: 9.57k]
  ------------------
 2154|  3.56k|      smg_time[pstr_mps_state->num_parameter_sets] =
 2155|  3.56k|          smg_time[pstr_mps_state->num_parameter_sets - 1];
 2156|  70.6k|      for (pb = 0; pb < pstr_mps_state->bitstream_parameter_bands; pb++) {
  ------------------
  |  Branch (2156:20): [True: 67.0k, False: 3.56k]
  ------------------
 2157|  67.0k|        p_aux_struct->smg_data[pstr_mps_state->num_parameter_sets][pb] =
 2158|  67.0k|            p_aux_struct->smg_data[pstr_mps_state->num_parameter_sets - 1][pb];
 2159|  67.0k|      }
 2160|  3.56k|    }
 2161|       |
 2162|  13.1k|    if (pstr_mps_state->up_mix_type == 2) {
  ------------------
  |  Branch (2162:9): [True: 0, False: 13.1k]
  ------------------
 2163|      0|      WORD32 *mapping = NULL;
 2164|      0|      ixheaacd_get_parameters_mapping(pstr_mps_state->bitstream_parameter_bands, mapping,
 2165|      0|                                      bitdec_table);
 2166|       |
 2167|      0|      if (mapping != NULL) {
  ------------------
  |  Branch (2167:11): [True: 0, False: 0]
  ------------------
 2168|      0|        WORD32 num_parameter_sets = pstr_mps_state->num_parameter_sets;
 2169|       |
 2170|      0|        if (pstr_mps_state->extend_frame) {
  ------------------
  |  Branch (2170:13): [True: 0, False: 0]
  ------------------
 2171|      0|          num_parameter_sets++;
 2172|      0|        }
 2173|       |
 2174|      0|        for (ps = 0; ps < num_parameter_sets; ps++) {
  ------------------
  |  Branch (2174:22): [True: 0, False: 0]
  ------------------
 2175|      0|          for (pb = MAX_PARAMETER_BANDS - 1; pb >= 0; pb--) {
  ------------------
  |  |   55|      0|#define MAX_PARAMETER_BANDS (28)
  ------------------
  |  Branch (2175:46): [True: 0, False: 0]
  ------------------
 2176|      0|            p_aux_struct->smg_data[ps][pb] = p_aux_struct->smg_data[ps][mapping[pb]];
 2177|      0|          }
 2178|      0|        }
 2179|      0|      }
 2180|      0|    }
 2181|  13.1k|  }
 2182|  13.1k|  return;
 2183|  13.1k|}
ixheaacd_mps_bitdec.c:ixheaacd_decode_and_map_frame_arb_tree:
 2229|      7|  ia_heaac_mps_state_struct *pstr_mps_state) {
 2230|      7|  IA_ERRORCODE error_code = IA_NO_ERROR;
  ------------------
  |  |   23|      7|#define IA_NO_ERROR 0x00000000
  ------------------
 2231|      7|  ia_mps_dec_spatial_bs_frame_struct *p_cur_bs = pstr_mps_state->bs_frame;
 2232|      7|  ia_mps_spatial_bs_config_struct *p_config = &(pstr_mps_state->bs_config);
 2233|      7|  ia_mps_dec_auxilary_struct *p_aux_struct = pstr_mps_state->aux_struct;
 2234|      7|  WORD32 *param_slot = p_aux_struct->param_slot;
 2235|      7|  WORD32 offset = pstr_mps_state->num_ott_boxes;
 2236|       |
 2237|      7|  VOID *scratch = pstr_mps_state->mps_scratch_mem_v;
 2238|       |
 2239|      7|  WORD32 i;
 2240|       |
 2241|     10|  for (i = 0; i < p_config->num_ott_boxes_at; i++) {
  ------------------
  |  Branch (2241:15): [True: 4, False: 6]
  ------------------
 2242|      4|    error_code = ixheaacd_map_index_data(&p_cur_bs->cld_lossless_data, p_aux_struct->ott_cld,
 2243|      4|                            p_cur_bs->ott_cld_idx, p_cur_bs->cmp_ott_cld_idx, NULL, offset + i,
 2244|      4|                            p_cur_bs->ott_cld_idx_prev, offset + i, CLD, 0,
  ------------------
  |  |   23|      4|#define CLD (0)
  ------------------
 2245|      4|                            p_config->bs_ott_bands_at[i], p_config->bs_ott_default_cld_at[i],
 2246|      4|                            pstr_mps_state->num_parameter_sets, param_slot,
 2247|      4|                            pstr_mps_state->extend_frame, pstr_mps_state->quant_mode, NULL, NULL,
 2248|      4|                            NULL, pstr_mps_state->ia_mps_dec_mps_table.bitdec_table_ptr, scratch);
 2249|      4|    if (error_code) return error_code;
  ------------------
  |  Branch (2249:9): [True: 1, False: 3]
  ------------------
 2250|      4|  }
 2251|      6|  return error_code;
 2252|      7|}
ixheaacd_mps_bitdec.c:ixheaacd_decode_and_map_frame_arbdmx:
 2186|    980|  ia_heaac_mps_state_struct *pstr_mps_state) {
 2187|    980|  IA_ERRORCODE error_code = IA_NO_ERROR;
  ------------------
  |  |   23|    980|#define IA_NO_ERROR 0x00000000
  ------------------
 2188|    980|  ia_mps_dec_spatial_bs_frame_struct *frame = pstr_mps_state->bs_frame;
 2189|    980|  ia_mps_dec_bitdec_tables_struct *bitdec_table =
 2190|    980|      pstr_mps_state->ia_mps_dec_mps_table.bitdec_table_ptr;
 2191|    980|  ia_mps_dec_auxilary_struct *p_aux_struct = pstr_mps_state->aux_struct;
 2192|    980|  WORD32 *param_slot = p_aux_struct->param_slot;
 2193|    980|  WORD32 offset = pstr_mps_state->num_ott_boxes + 4 * pstr_mps_state->num_ttt_boxes;
 2194|    980|  WORD32 ch;
 2195|       |
 2196|    980|  VOID *scratch = pstr_mps_state->mps_scratch_mem_v;
 2197|       |
 2198|  2.46k|  for (ch = 0; ch < pstr_mps_state->num_input_channels; ch++) {
  ------------------
  |  Branch (2198:16): [True: 1.50k, False: 963]
  ------------------
 2199|  1.50k|    error_code = ixheaacd_map_index_data(
 2200|  1.50k|        &frame->cld_lossless_data, p_aux_struct->arbdmx_gain, frame->arbdmx_gain_idx,
 2201|  1.50k|        frame->cmp_arbdmx_gain_idx, NULL, ch, frame->arbdmx_gain_idx_prev, offset + ch, CLD, 0,
  ------------------
  |  |   23|  1.50k|#define CLD (0)
  ------------------
 2202|  1.50k|        pstr_mps_state->bitstream_parameter_bands, pstr_mps_state->arbdmx_gain_default,
 2203|  1.50k|        pstr_mps_state->num_parameter_sets, param_slot, pstr_mps_state->extend_frame, 0, NULL,
 2204|  1.50k|        NULL, NULL, bitdec_table, scratch);
 2205|  1.50k|    if (error_code) return error_code;
  ------------------
  |  Branch (2205:9): [True: 17, False: 1.48k]
  ------------------
 2206|       |
 2207|  1.48k|    p_aux_struct->arbdmx_residual_abs[ch] = frame->bs_arbitrary_downmix_residual_abs[ch];
 2208|  1.48k|    p_aux_struct->arbdmx_alpha_upd_set[ch] =
 2209|  1.48k|        frame->bs_arbitrary_downmix_residual_alpha_update_set[ch];
 2210|       |
 2211|  1.48k|    if (pstr_mps_state->up_mix_type == 2) {
  ------------------
  |  Branch (2211:9): [True: 0, False: 1.48k]
  ------------------
 2212|      0|      WORD32 num_parameter_sets = pstr_mps_state->num_parameter_sets;
 2213|      0|      WORD32 ps;
 2214|       |
 2215|      0|      if (pstr_mps_state->extend_frame) {
  ------------------
  |  Branch (2215:11): [True: 0, False: 0]
  ------------------
 2216|      0|        num_parameter_sets++;
 2217|      0|      }
 2218|       |
 2219|      0|      for (ps = 0; ps < num_parameter_sets; ps++) {
  ------------------
  |  Branch (2219:20): [True: 0, False: 0]
  ------------------
 2220|      0|        ixheaacd_map_data_to_28_bands(p_aux_struct->arbdmx_gain[ch][ps],
 2221|      0|                                      pstr_mps_state->bitstream_parameter_bands, bitdec_table);
 2222|      0|      }
 2223|      0|    }
 2224|  1.48k|  }
 2225|    963|  return error_code;
 2226|    980|}

ixheaacd_get_matrix_inversion_weights:
   46|  26.5k|    WORD32 *weight1, WORD32 *weight2, ia_mps_dec_mps_tables_struct *ia_mps_dec_mps_table_ptr) {
   47|  26.5k|  WORD32 temp, temp_1, temp_2, temp_one;
   48|  26.5k|  WORD16 qtemp;
   49|  26.5k|  WORD32 w1 = ia_mps_dec_mps_table_ptr->m1_m2_table_ptr->cld_tab_2[iid_lf_ls_idx + 15];
   50|  26.5k|  WORD32 w2 = ia_mps_dec_mps_table_ptr->m1_m2_table_ptr->cld_tab_2[iid_rf_rs_idx + 15];
   51|       |
   52|  26.5k|  if (prediction_mode == 1) {
  ------------------
  |  Branch (52:7): [True: 7.68k, False: 18.8k]
  ------------------
   53|  12.3k|    if (abs(c1) >= ONE_IN_Q15) {
  ------------------
  |  |   55|  7.68k|#define abs(x) (x < 0) ? -x : x
  |  |  ------------------
  |  |  |  Branch (55:16): [True: 3.03k, False: 4.64k]
  |  |  ------------------
  ------------------
                  if (abs(c1) >= ONE_IN_Q15) {
  ------------------
  |  |   41|  4.64k|#define ONE_IN_Q15 (32768)
  ------------------
  |  Branch (53:9): [True: 6.36k, False: 1.32k]
  ------------------
   54|  6.36k|      c1 = ONE_IN_Q15;
  ------------------
  |  |   41|  6.36k|#define ONE_IN_Q15 (32768)
  ------------------
   55|  6.36k|    } else if ((c1 < MINUS_ONE_IN_Q14) && (c1 > MINUS_ONE_IN_Q15)) {
  ------------------
  |  |   38|  1.32k|#define MINUS_ONE_IN_Q14 (-16384)
  ------------------
                  } else if ((c1 < MINUS_ONE_IN_Q14) && (c1 > MINUS_ONE_IN_Q15)) {
  ------------------
  |  |   37|      0|#define MINUS_ONE_IN_Q15 (-32768)
  ------------------
  |  Branch (55:16): [True: 0, False: 1.32k]
  |  Branch (55:43): [True: 0, False: 0]
  ------------------
   56|      0|      c1 = MINUS_ONE_IN_Q15 - (c1 << 1);
  ------------------
  |  |   37|      0|#define MINUS_ONE_IN_Q15 (-32768)
  ------------------
   57|  1.32k|    } else {
   58|  1.32k|      qtemp = 15;
   59|  1.32k|      temp = ixheaacd_mps_mult32(TWO_BY_THREE_Q15, c1, &qtemp, 15);
  ------------------
  |  |   27|  1.32k|#define TWO_BY_THREE_Q15 (21845)
  ------------------
   60|  1.32k|      temp = ixheaacd_mps_convert_to_qn(temp, qtemp, 15);
   61|  1.32k|      c1 = ONE_BY_THREE_Q15 + temp;
  ------------------
  |  |   26|  1.32k|#define ONE_BY_THREE_Q15 (10923)
  ------------------
   62|  1.32k|    }
   63|       |
   64|  12.5k|    if (abs(c2) >= ONE_IN_Q15) {
  ------------------
  |  |   55|  7.68k|#define abs(x) (x < 0) ? -x : x
  |  |  ------------------
  |  |  |  Branch (55:16): [True: 2.77k, False: 4.90k]
  |  |  ------------------
  ------------------
                  if (abs(c2) >= ONE_IN_Q15) {
  ------------------
  |  |   41|  4.90k|#define ONE_IN_Q15 (32768)
  ------------------
  |  Branch (64:9): [True: 6.22k, False: 1.46k]
  ------------------
   65|  6.22k|      c2 = ONE_IN_Q15;
  ------------------
  |  |   41|  6.22k|#define ONE_IN_Q15 (32768)
  ------------------
   66|  6.22k|    } else if ((c2 < MINUS_ONE_IN_Q14) && (c2 > MINUS_ONE_IN_Q15)) {
  ------------------
  |  |   38|  1.46k|#define MINUS_ONE_IN_Q14 (-16384)
  ------------------
                  } else if ((c2 < MINUS_ONE_IN_Q14) && (c2 > MINUS_ONE_IN_Q15)) {
  ------------------
  |  |   37|      0|#define MINUS_ONE_IN_Q15 (-32768)
  ------------------
  |  Branch (66:16): [True: 0, False: 1.46k]
  |  Branch (66:43): [True: 0, False: 0]
  ------------------
   67|      0|      c2 = MINUS_ONE_IN_Q15 - (c2 << 1);
  ------------------
  |  |   37|      0|#define MINUS_ONE_IN_Q15 (-32768)
  ------------------
   68|  1.46k|    } else {
   69|  1.46k|      qtemp = 15;
   70|  1.46k|      temp = ixheaacd_mps_mult32(TWO_BY_THREE_Q15, c2, &qtemp, 15);
  ------------------
  |  |   27|  1.46k|#define TWO_BY_THREE_Q15 (21845)
  ------------------
   71|  1.46k|      temp = ixheaacd_mps_convert_to_qn(temp, qtemp, 15);
   72|  1.46k|      qtemp = 15;
   73|  1.46k|      temp = ixheaacd_mps_add32(temp, ONE_BY_THREE_Q15, &qtemp, 15);
  ------------------
  |  |   26|  1.46k|#define ONE_BY_THREE_Q15 (10923)
  ------------------
   74|  1.46k|      c2 = ixheaacd_mps_convert_to_qn(temp, qtemp, 15);
   75|  1.46k|    }
   76|  18.8k|  } else {
   77|  18.8k|    WORD32 c1p, c2p;
   78|  18.8k|    WORD64 acc;
   79|  18.8k|    const WORD32 *cld_tab_3 = ia_mps_dec_mps_table_ptr->m1_m2_table_ptr->cld_tab_3;
   80|  18.8k|    const WORD32 *sqrt_tab = ia_mps_dec_mps_table_ptr->common_table_ptr->sqrt_tab;
   81|       |
   82|  18.8k|    c1p = cld_tab_3[c1 + 15];
   83|  18.8k|    c2p = cld_tab_3[c2 + 15];
   84|       |
   85|  18.8k|    acc = (WORD64)((WORD64)c1p * (WORD64)c2p);
   86|  18.8k|    acc >>= 15;
   87|  18.8k|    temp = (WORD32)acc;
   88|  18.8k|    temp_1 = (ONE_IN_Q15 + c2p) << 1;
  ------------------
  |  |   41|  18.8k|#define ONE_IN_Q15 (32768)
  ------------------
   89|  18.8k|    acc += temp_1;
   90|  18.8k|    temp_2 = (WORD32)acc;
   91|       |
   92|  18.8k|    temp = ixheaacd_mps_div_32(temp, temp_2, &qtemp);
   93|       |
   94|  18.8k|    c1 = ixheaacd_mps_sqrt(temp, &qtemp, sqrt_tab);
   95|  18.8k|    c1 = ixheaacd_mps_convert_to_qn(c1, qtemp, 15);
   96|       |
   97|  18.8k|    temp_2 = ixheaac_add32_sat(c1p, temp_1);
   98|  18.8k|    temp = ixheaacd_mps_div_32(c1p, temp_2, &qtemp);
   99|  18.8k|    c2 = ixheaacd_mps_sqrt(temp, &qtemp, sqrt_tab);
  100|  18.8k|    c2 = ixheaacd_mps_convert_to_qn(c2, qtemp, 15);
  101|  18.8k|  }
  102|  26.5k|  temp_one = ONE_IN_Q15;
  ------------------
  |  |   41|  26.5k|#define ONE_IN_Q15 (32768)
  ------------------
  103|  26.5k|  if (ixheaac_norm32(w1) == 0) {
  ------------------
  |  Branch (103:7): [True: 809, False: 25.7k]
  ------------------
  104|    809|    temp_one = ONE_IN_Q14;
  ------------------
  |  |   40|    809|#define ONE_IN_Q14 (16384)
  ------------------
  105|    809|    w1 = w1 >> 1;
  106|    809|  }
  107|  26.5k|  temp_1 = temp_one + w1;
  108|  26.5k|  temp_2 = ixheaacd_mps_mult32_shr_15(c1, w1);
  109|  26.5k|  *weight1 = ixheaacd_mps_div32_in_q15(temp_2, temp_1);
  110|       |
  111|  26.5k|  if (ixheaac_norm32(w2) == 0) {
  ------------------
  |  Branch (111:7): [True: 1.05k, False: 25.5k]
  ------------------
  112|  1.05k|    temp_one = ONE_IN_Q14;
  ------------------
  |  |   40|  1.05k|#define ONE_IN_Q14 (16384)
  ------------------
  113|  1.05k|    w2 = w2 >> 1;
  114|  1.05k|  }
  115|  26.5k|  temp_1 = temp_one + w2;
  116|  26.5k|  temp_2 = ixheaacd_mps_mult32_shr_15(c2, w2);
  117|  26.5k|  *weight2 = ixheaacd_mps_div32_in_q15(temp_2, temp_1);
  118|  26.5k|}
ixheaacd_invert_matrix:
  122|  26.5k|                            const ia_mps_dec_common_tables_struct *common_tab_ptr) {
  123|  26.5k|  WORD32 h11_f_real, h12_f_real, h21_f_real, h22_f_real;
  124|  26.5k|  WORD32 h11_f_imag, h12_f_imag, h21_f_imag, h22_f_imag;
  125|       |
  126|  26.5k|  WORD32 inv_norm_real, inv_norm_imag, inv_norm;
  127|       |
  128|  26.5k|  WORD32 len1, len2;
  129|  26.5k|  WORD16 q_len1 = 0, q_len2 = 0;
  130|       |
  131|  26.5k|  WORD64 acc1, acc2;
  132|       |
  133|  26.5k|  len1 = ixheaacd_mps_sqrt(
  134|  26.5k|      (ONE_IN_Q15 - (weight1 << 1) + ixheaacd_mps_mult32_shr_n(weight1, weight1, 14)), &q_len1,
  ------------------
  |  |   41|  26.5k|#define ONE_IN_Q15 (32768)
  ------------------
  135|  26.5k|      common_tab_ptr->sqrt_tab);
  136|       |
  137|  26.5k|  len2 = ixheaacd_mps_sqrt(
  138|  26.5k|      (ONE_IN_Q15 - (weight2 << 1) + ixheaacd_mps_mult32_shr_n(weight2, weight2, 14)), &q_len2,
  ------------------
  |  |   41|  26.5k|#define ONE_IN_Q15 (32768)
  ------------------
  139|  26.5k|      common_tab_ptr->sqrt_tab);
  140|       |
  141|  26.5k|  len1 = ixheaacd_mps_convert_to_qn(len1, q_len1, 15);
  142|  26.5k|  len2 = ixheaacd_mps_convert_to_qn(len2, q_len2, 15);
  143|       |
  144|  26.5k|  h11_f_real = ixheaacd_mps_div32_in_q15((ONE_IN_Q15 - weight1), len1);
  ------------------
  |  |   41|  26.5k|#define ONE_IN_Q15 (32768)
  ------------------
  145|       |
  146|  26.5k|  h11_f_imag = ixheaacd_mps_div32_in_q15(weight1, len1);
  147|       |
  148|  26.5k|  h22_f_imag = ixheaac_negate32_sat(ixheaacd_mps_div32_in_q15(weight2, len2));
  149|       |
  150|  26.5k|  h12_f_real = 0;
  151|       |
  152|  26.5k|  h12_f_imag = ixheaacd_mps_mult32_shr_15(h22_f_imag, ONE_BY_SQRT_3_Q15);
  ------------------
  |  |   45|  26.5k|#define ONE_BY_SQRT_3_Q15 (18919)
  ------------------
  153|       |
  154|  26.5k|  h21_f_real = 0;
  155|       |
  156|  26.5k|  h21_f_imag = ixheaacd_mps_mult32_shr_15(h11_f_imag, -(ONE_BY_SQRT_3_Q15));
  ------------------
  |  |   45|  26.5k|#define ONE_BY_SQRT_3_Q15 (18919)
  ------------------
  157|       |
  158|  26.5k|  h22_f_real = ixheaacd_mps_div32_in_q15((ONE_IN_Q15 - weight2), len2);
  ------------------
  |  |   41|  26.5k|#define ONE_IN_Q15 (32768)
  ------------------
  159|       |
  160|  26.5k|  acc1 =
  161|  26.5k|      (WORD64)((WORD64)h11_f_real * (WORD64)h22_f_real - (WORD64)h11_f_imag * (WORD64)h22_f_imag);
  162|  26.5k|  acc1 >>= 15;
  163|       |
  164|  26.5k|  acc2 =
  165|  26.5k|      (WORD64)((WORD64)h12_f_real * (WORD64)h21_f_real - (WORD64)h12_f_imag * (WORD64)h21_f_imag);
  166|  26.5k|  acc2 >>= 15;
  167|  26.5k|  inv_norm_real = (WORD32)(acc1 - acc2);
  168|       |
  169|  26.5k|  acc1 =
  170|  26.5k|      (WORD64)((WORD64)h11_f_real * (WORD64)h22_f_imag + (WORD64)h11_f_imag * (WORD64)h22_f_real);
  171|  26.5k|  acc1 >>= 15;
  172|       |
  173|  26.5k|  acc2 =
  174|  26.5k|      (WORD64)((WORD64)h12_f_real * (WORD64)h21_f_imag + (WORD64)h12_f_imag * (WORD64)h21_f_real);
  175|  26.5k|  acc2 >>= 15;
  176|  26.5k|  inv_norm_imag = (WORD32)(acc1 + acc2);
  177|       |
  178|  26.5k|  acc1 = (WORD64)((WORD64)inv_norm_real * (WORD64)inv_norm_real +
  179|  26.5k|                  (WORD64)inv_norm_imag * (WORD64)inv_norm_imag);
  180|  26.5k|  acc1 >>= 15;
  181|  26.5k|  inv_norm = (WORD32)acc1;
  182|       |
  183|  26.5k|  inv_norm_real = ixheaacd_mps_div32_in_q15(inv_norm_real, inv_norm);
  184|  26.5k|  inv_norm_imag = -(ixheaacd_mps_div32_in_q15(inv_norm_imag, inv_norm));
  185|       |
  186|  26.5k|  acc1 = (WORD64)((WORD64)h22_f_real * (WORD64)inv_norm_real -
  187|  26.5k|                  (WORD64)h22_f_imag * (WORD64)inv_norm_imag);
  188|  26.5k|  acc1 >>= 15;
  189|  26.5k|  h_real[0][0] = (WORD32)acc1;
  190|       |
  191|  26.5k|  acc1 = (WORD64)((WORD64)h22_f_real * (WORD64)inv_norm_imag +
  192|  26.5k|                  (WORD64)h22_f_imag * (WORD64)inv_norm_real);
  193|  26.5k|  acc1 >>= 15;
  194|  26.5k|  h_imag[0][0] = (WORD32)acc1;
  195|       |
  196|  26.5k|  acc1 = (WORD64)((WORD64)h12_f_imag * (WORD64)inv_norm_imag -
  197|  26.5k|                  (WORD64)h12_f_real * (WORD64)inv_norm_real);
  198|  26.5k|  acc1 >>= 15;
  199|  26.5k|  h_real[0][1] = (WORD32)acc1;
  200|       |
  201|  26.5k|  acc1 = (WORD64)((WORD64)h12_f_real * (WORD64)inv_norm_imag +
  202|  26.5k|                  (WORD64)h12_f_imag * (WORD64)inv_norm_real);
  203|  26.5k|  acc1 = -(acc1 >> 15);
  204|  26.5k|  h_imag[0][1] = (WORD32)acc1;
  205|       |
  206|  26.5k|  acc1 = (WORD64)((WORD64)h21_f_imag * (WORD64)inv_norm_imag -
  207|  26.5k|                  (WORD64)h21_f_real * (WORD64)inv_norm_real);
  208|  26.5k|  acc1 >>= 15;
  209|  26.5k|  h_real[1][0] = (WORD32)acc1;
  210|       |
  211|  26.5k|  acc1 = (WORD64)((WORD64)h21_f_real * (WORD64)inv_norm_imag +
  212|  26.5k|                  (WORD64)h21_f_imag * (WORD64)inv_norm_real);
  213|  26.5k|  acc1 = -(acc1 >> 15);
  214|  26.5k|  h_imag[1][0] = (WORD32)acc1;
  215|       |
  216|  26.5k|  acc1 = (WORD64)((WORD64)h11_f_real * (WORD64)inv_norm_real -
  217|  26.5k|                  (WORD64)h11_f_imag * (WORD64)inv_norm_imag);
  218|  26.5k|  acc1 >>= 15;
  219|  26.5k|  h_real[1][1] = (WORD32)acc1;
  220|       |
  221|  26.5k|  acc1 = (WORD64)((WORD64)h11_f_real * (WORD64)inv_norm_imag +
  222|  26.5k|                  (WORD64)h11_f_imag * (WORD64)inv_norm_real);
  223|  26.5k|  acc1 >>= 15;
  224|  26.5k|  h_imag[1][1] = (WORD32)acc1;
  225|  26.5k|}
ixheaacd_dequant_icc_band:
  227|  9.06k|WORD32 ixheaacd_dequant_icc_band(WORD32 iccband, WORD32 cldband) {
  228|  9.06k|  if (iccband < 6) {
  ------------------
  |  Branch (228:7): [True: 7.48k, False: 1.57k]
  ------------------
  229|  7.48k|    return iccband;
  230|  7.48k|  }
  231|  1.57k|  if (iccband == 6) {
  ------------------
  |  Branch (231:7): [True: 517, False: 1.05k]
  ------------------
  232|    517|    if (cldband > 9 && cldband < 21) {
  ------------------
  |  Branch (232:9): [True: 371, False: 146]
  |  Branch (232:24): [True: 206, False: 165]
  ------------------
  233|    206|      switch (cldband) {
  234|     13|        case 10:
  ------------------
  |  Branch (234:9): [True: 13, False: 193]
  ------------------
  235|     54|        case 20:
  ------------------
  |  Branch (235:9): [True: 41, False: 165]
  ------------------
  236|     54|          return 10;
  237|      7|        case 11:
  ------------------
  |  Branch (237:9): [True: 7, False: 199]
  ------------------
  238|     12|        case 19:
  ------------------
  |  Branch (238:9): [True: 5, False: 201]
  ------------------
  239|     12|          return 11;
  240|     18|        case 12:
  ------------------
  |  Branch (240:9): [True: 18, False: 188]
  ------------------
  241|     36|        case 18:
  ------------------
  |  Branch (241:9): [True: 18, False: 188]
  ------------------
  242|     36|          return 12;
  243|     12|        case 13:
  ------------------
  |  Branch (243:9): [True: 12, False: 194]
  ------------------
  244|     28|        case 17:
  ------------------
  |  Branch (244:9): [True: 16, False: 190]
  ------------------
  245|     28|          return 13;
  246|     22|        case 14:
  ------------------
  |  Branch (246:9): [True: 22, False: 184]
  ------------------
  247|     35|        case 16:
  ------------------
  |  Branch (247:9): [True: 13, False: 193]
  ------------------
  248|     35|          return 14;
  249|     41|        case 15:
  ------------------
  |  Branch (249:9): [True: 41, False: 165]
  ------------------
  250|     41|          return 15;
  251|      0|        default:
  ------------------
  |  Branch (251:9): [True: 0, False: 206]
  ------------------
  252|      0|          return iccband;
  253|    206|      }
  254|    311|    } else {
  255|    311|      return iccband;
  256|    311|    }
  257|    517|  }
  258|  1.05k|  if (7 == iccband) {
  ------------------
  |  Branch (258:7): [True: 1.05k, False: 0]
  ------------------
  259|  1.05k|    if (cldband > 7 && cldband < 23) {
  ------------------
  |  Branch (259:9): [True: 920, False: 139]
  |  Branch (259:24): [True: 402, False: 518]
  ------------------
  260|    402|      switch (cldband) {
  261|     24|        case 8:
  ------------------
  |  Branch (261:9): [True: 24, False: 378]
  ------------------
  262|     46|        case 22:
  ------------------
  |  Branch (262:9): [True: 22, False: 380]
  ------------------
  263|     46|          return 8;
  264|     51|        case 9:
  ------------------
  |  Branch (264:9): [True: 51, False: 351]
  ------------------
  265|     68|        case 21:
  ------------------
  |  Branch (265:9): [True: 17, False: 385]
  ------------------
  266|     68|          return 9;
  267|     10|        case 10:
  ------------------
  |  Branch (267:9): [True: 10, False: 392]
  ------------------
  268|     44|        case 20:
  ------------------
  |  Branch (268:9): [True: 34, False: 368]
  ------------------
  269|     44|          return 10;
  270|      9|        case 11:
  ------------------
  |  Branch (270:9): [True: 9, False: 393]
  ------------------
  271|     24|        case 19:
  ------------------
  |  Branch (271:9): [True: 15, False: 387]
  ------------------
  272|     24|          return 11;
  273|     15|        case 12:
  ------------------
  |  Branch (273:9): [True: 15, False: 387]
  ------------------
  274|     35|        case 18:
  ------------------
  |  Branch (274:9): [True: 20, False: 382]
  ------------------
  275|     35|          return 12;
  276|     41|        case 13:
  ------------------
  |  Branch (276:9): [True: 41, False: 361]
  ------------------
  277|     65|        case 17:
  ------------------
  |  Branch (277:9): [True: 24, False: 378]
  ------------------
  278|     65|          return 13;
  279|     29|        case 14:
  ------------------
  |  Branch (279:9): [True: 29, False: 373]
  ------------------
  280|     59|        case 16:
  ------------------
  |  Branch (280:9): [True: 30, False: 372]
  ------------------
  281|     59|          return 14;
  282|     61|        case 15:
  ------------------
  |  Branch (282:9): [True: 61, False: 341]
  ------------------
  283|     61|          return 15;
  284|      0|        default:
  ------------------
  |  Branch (284:9): [True: 0, False: 402]
  ------------------
  285|      0|          return iccband;
  286|    402|      }
  287|    657|    } else {
  288|    657|      return iccband;
  289|    657|    }
  290|  1.05k|  } else {
  291|      0|    return iccband;
  292|      0|  }
  293|  1.05k|}
ixheaacd_dequant_cld_band:
  295|  1.93M|WORD32 ixheaacd_dequant_cld_band(WORD32 cld) {
  296|  1.93M|  switch (cld) {
  297|  37.2k|    case -4915200:
  ------------------
  |  Branch (297:5): [True: 37.2k, False: 1.90M]
  ------------------
  298|  37.2k|      return 0;
  299|    986|    case -1474560:
  ------------------
  |  Branch (299:5): [True: 986, False: 1.93M]
  ------------------
  300|    986|      return 1;
  301|    746|    case -1310720:
  ------------------
  |  Branch (301:5): [True: 746, False: 1.93M]
  ------------------
  302|    746|      return 2;
  303|  2.39k|    case -1146880:
  ------------------
  |  Branch (303:5): [True: 2.39k, False: 1.93M]
  ------------------
  304|  2.39k|      return 3;
  305|  1.19k|    case -983040:
  ------------------
  |  Branch (305:5): [True: 1.19k, False: 1.93M]
  ------------------
  306|  1.19k|      return 4;
  307|  3.19k|    case -819200:
  ------------------
  |  Branch (307:5): [True: 3.19k, False: 1.93M]
  ------------------
  308|  3.19k|      return 5;
  309|  1.39k|    case -720896:
  ------------------
  |  Branch (309:5): [True: 1.39k, False: 1.93M]
  ------------------
  310|  1.39k|      return 6;
  311|  3.29k|    case -622592:
  ------------------
  |  Branch (311:5): [True: 3.29k, False: 1.93M]
  ------------------
  312|  3.29k|      return 7;
  313|  1.25k|    case -524288:
  ------------------
  |  Branch (313:5): [True: 1.25k, False: 1.93M]
  ------------------
  314|  1.25k|      return 8;
  315|  5.25k|    case -425984:
  ------------------
  |  Branch (315:5): [True: 5.25k, False: 1.93M]
  ------------------
  316|  5.25k|      return 9;
  317|  16.4k|    case -327680:
  ------------------
  |  Branch (317:5): [True: 16.4k, False: 1.92M]
  ------------------
  318|  16.4k|      return 10;
  319|   119k|    case -262144:
  ------------------
  |  Branch (319:5): [True: 119k, False: 1.81M]
  ------------------
  320|   119k|      return 11;
  321|  24.2k|    case -196608:
  ------------------
  |  Branch (321:5): [True: 24.2k, False: 1.91M]
  ------------------
  322|  24.2k|      return 12;
  323|  5.80k|    case -131072:
  ------------------
  |  Branch (323:5): [True: 5.80k, False: 1.93M]
  ------------------
  324|  5.80k|      return 13;
  325|  11.8k|    case -65536:
  ------------------
  |  Branch (325:5): [True: 11.8k, False: 1.92M]
  ------------------
  326|  11.8k|      return 14;
  327|   177k|    case 0:
  ------------------
  |  Branch (327:5): [True: 177k, False: 1.76M]
  ------------------
  328|   177k|      return 15;
  329|  9.70k|    case 65536:
  ------------------
  |  Branch (329:5): [True: 9.70k, False: 1.92M]
  ------------------
  330|  9.70k|      return 16;
  331|  33.5k|    case 131072:
  ------------------
  |  Branch (331:5): [True: 33.5k, False: 1.90M]
  ------------------
  332|  33.5k|      return 17;
  333|  12.8k|    case 196608:
  ------------------
  |  Branch (333:5): [True: 12.8k, False: 1.92M]
  ------------------
  334|  12.8k|      return 18;
  335|  6.93k|    case 262144:
  ------------------
  |  Branch (335:5): [True: 6.93k, False: 1.93M]
  ------------------
  336|  6.93k|      return 19;
  337|  42.2k|    case 327680:
  ------------------
  |  Branch (337:5): [True: 42.2k, False: 1.89M]
  ------------------
  338|  42.2k|      return 20;
  339|  11.7k|    case 425984:
  ------------------
  |  Branch (339:5): [True: 11.7k, False: 1.92M]
  ------------------
  340|  11.7k|      return 21;
  341|  7.50k|    case 524288:
  ------------------
  |  Branch (341:5): [True: 7.50k, False: 1.93M]
  ------------------
  342|  7.50k|      return 22;
  343|  4.29k|    case 622592:
  ------------------
  |  Branch (343:5): [True: 4.29k, False: 1.93M]
  ------------------
  344|  4.29k|      return 23;
  345|  2.16k|    case 720896:
  ------------------
  |  Branch (345:5): [True: 2.16k, False: 1.93M]
  ------------------
  346|  2.16k|      return 24;
  347|  4.09k|    case 819200:
  ------------------
  |  Branch (347:5): [True: 4.09k, False: 1.93M]
  ------------------
  348|  4.09k|      return 25;
  349|  1.04k|    case 983040:
  ------------------
  |  Branch (349:5): [True: 1.04k, False: 1.93M]
  ------------------
  350|  1.04k|      return 26;
  351|  5.97k|    case 1146880:
  ------------------
  |  Branch (351:5): [True: 5.97k, False: 1.93M]
  ------------------
  352|  5.97k|      return 27;
  353|  2.33k|    case 1310720:
  ------------------
  |  Branch (353:5): [True: 2.33k, False: 1.93M]
  ------------------
  354|  2.33k|      return 28;
  355|  1.61k|    case 1474560:
  ------------------
  |  Branch (355:5): [True: 1.61k, False: 1.93M]
  ------------------
  356|  1.61k|      return 29;
  357|  1.38M|    case 4915200:
  ------------------
  |  Branch (357:5): [True: 1.38M, False: 558k]
  ------------------
  358|  1.38M|      return 30;
  359|      0|    default:
  ------------------
  |  Branch (359:5): [True: 0, False: 1.93M]
  ------------------
  360|      0|      return 0;
  361|  1.93M|  }
  362|  1.93M|}
ixheaacd_param_2_umx_ps_core_tables:
  370|  58.2k|    const ia_mps_dec_m1_m2_tables_struct *ixheaacd_mps_dec_m1_m2_tables) {
  371|  58.2k|  WORD32 band;
  372|  58.2k|  WORD32 quant_band_cld, quant_band_icc;
  373|       |
  374|  1.02M|  for (band = 0; band < num_ott_bands; band++) {
  ------------------
  |  Branch (374:18): [True: 969k, False: 58.2k]
  ------------------
  375|   969k|    quant_band_cld = ixheaacd_dequant_cld_band(cld[band]);
  376|       |
  377|   969k|    c_l[band] = (WORD16)ixheaacd_mps_dec_m1_m2_tables->c_l_table[quant_band_cld];
  378|   969k|    c_r[band] = (WORD16)ixheaacd_mps_dec_m1_m2_tables->c_l_table[30 - quant_band_cld];
  379|   969k|  }
  380|       |
  381|  1.02M|  for (band = 0; band < num_ott_bands; band++) {
  ------------------
  |  Branch (381:18): [True: 969k, False: 58.2k]
  ------------------
  382|   969k|    if (band < res_bands) {
  ------------------
  |  Branch (382:9): [True: 9.06k, False: 960k]
  ------------------
  383|  9.06k|      quant_band_cld = ixheaacd_dequant_cld_band(cld[band]);
  384|  9.06k|      quant_band_icc = ixheaacd_dequant_icc_band(icc[band], quant_band_cld);
  385|       |
  386|  9.06k|      h11[band] = ixheaacd_mps_dec_m1_m2_tables->cos_table[quant_band_icc][quant_band_cld];
  387|  9.06k|      h11[band] = ixheaacd_mps_mult32_shr_15(h11[band], c_l[band]);
  388|  9.06k|      h21[band] = ixheaacd_mps_dec_m1_m2_tables->cos_table[quant_band_icc][30 - quant_band_cld];
  389|  9.06k|      h21[band] = ixheaacd_mps_mult32_shr_15(h21[band], c_r[band]);
  390|       |
  391|  9.06k|      h12[band] = 0;
  392|  9.06k|      h22[band] = 0;
  393|  9.06k|      h12_res[band] = ONE_IN_Q15;
  ------------------
  |  |   41|  9.06k|#define ONE_IN_Q15 (32768)
  ------------------
  394|  9.06k|      h22_res[band] = MINUS_ONE_IN_Q15;
  ------------------
  |  |   37|  9.06k|#define MINUS_ONE_IN_Q15 (-32768)
  ------------------
  395|   960k|    } else {
  396|   960k|      quant_band_cld = ixheaacd_dequant_cld_band(cld[band]);
  397|   960k|      if (quant_band_cld < 0 || quant_band_cld >= 31) {
  ------------------
  |  Branch (397:11): [True: 0, False: 960k]
  |  Branch (397:33): [True: 0, False: 960k]
  ------------------
  398|      0|        quant_band_cld = 30;
  399|      0|      }
  400|       |
  401|   960k|      quant_band_icc = icc[band];
  402|       |
  403|   960k|      if (quant_band_icc < 0 || quant_band_icc >= 8) {
  ------------------
  |  Branch (403:11): [True: 0, False: 960k]
  |  Branch (403:33): [True: 0, False: 960k]
  ------------------
  404|      0|        quant_band_icc = 7;
  405|      0|      }
  406|   960k|      h11[band] = ixheaacd_mps_dec_m1_m2_tables->cos_table[quant_band_icc][quant_band_cld];
  407|   960k|      h11[band] = ixheaacd_mps_mult32_shr_15(h11[band], c_l[band]);
  408|   960k|      h21[band] = ixheaacd_mps_dec_m1_m2_tables->cos_table[quant_band_icc][30 - quant_band_cld];
  409|   960k|      h21[band] = ixheaacd_mps_mult32_shr_15(h21[band], c_r[band]);
  410|   960k|      h12[band] = ixheaacd_mps_dec_m1_m2_tables->sin_table[quant_band_icc][quant_band_cld];
  411|   960k|      h12[band] = ixheaacd_mps_mult32_shr_15(h12[band], c_l[band]);
  412|   960k|      h22[band] = -ixheaacd_mps_dec_m1_m2_tables->sin_table[quant_band_icc][30 - quant_band_cld];
  413|   960k|      h22[band] = ixheaacd_mps_mult32_shr_15(h22[band], c_r[band]);
  414|       |
  415|   960k|      h12_res[band] = 0;
  416|   960k|      h22_res[band] = 0;
  417|   960k|    }
  418|   969k|  }
  419|  58.2k|  return;
  420|  58.2k|}
ixheaacd_param_2_umx_ps:
  425|  58.2k|                             WORD32 parameter_set_indx, WORD32 res_bands) {
  426|  58.2k|  WORD32 band;
  427|  58.2k|  ia_mps_dec_spatial_bs_frame_struct *p_cur_bs = pstr_mps_state->bs_frame;
  428|  58.2k|  ia_mps_dec_auxilary_struct *p_aux_struct = pstr_mps_state->aux_struct;
  429|  58.2k|  WORD32 num_parameter_bands = pstr_mps_state->num_parameter_bands;
  430|       |
  431|  58.2k|  ixheaacd_param_2_umx_ps_core_tables(p_aux_struct->ott_cld[ott_box_indx][parameter_set_indx],
  432|  58.2k|                                      p_cur_bs->ott_icc_idx[ott_box_indx][parameter_set_indx],
  433|  58.2k|                                      p_aux_struct->num_ott_bands[ott_box_indx], res_bands, h11,
  434|  58.2k|                                      h12, h21, h22, h12_res, h22_res, c_l, c_r,
  435|  58.2k|                                      pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr);
  436|       |
  437|  58.2k|  for (band = p_aux_struct->num_ott_bands[ott_box_indx]; band < num_parameter_bands; band++) {
  ------------------
  |  Branch (437:58): [True: 0, False: 58.2k]
  ------------------
  438|      0|    h11[band] = h21[band] = h12[band] = h22[band] = h12_res[band] = h22_res[band] = 0;
  439|      0|  }
  440|  58.2k|  return;
  441|  58.2k|}
ixheaacd_calculate_ttt:
  531|   105k|                            WORD32 ttt_mode, WORD32 m_ttt[][3]) {
  532|   105k|  ia_mps_dec_auxilary_struct *p_aux_struct = pstr_mps_state->aux_struct;
  533|   105k|  WORD32 col;
  534|       |
  535|   105k|  if (ttt_mode < 2) {
  ------------------
  |  Branch (535:7): [True: 30.1k, False: 75.7k]
  ------------------
  536|  30.1k|    m_ttt[0][0] = (p_aux_struct->ttt_cpc_1[0][ps][pb] + ONE_IN_Q16);
  ------------------
  |  |   42|  30.1k|#define ONE_IN_Q16 (65536)
  ------------------
  537|  30.1k|    m_ttt[0][1] = (p_aux_struct->ttt_cpc_2[0][ps][pb] - ONE_IN_Q15);
  ------------------
  |  |   41|  30.1k|#define ONE_IN_Q15 (32768)
  ------------------
  538|  30.1k|    m_ttt[1][0] = (p_aux_struct->ttt_cpc_1[0][ps][pb] - ONE_IN_Q15);
  ------------------
  |  |   41|  30.1k|#define ONE_IN_Q15 (32768)
  ------------------
  539|  30.1k|    m_ttt[1][1] = (p_aux_struct->ttt_cpc_2[0][ps][pb] + ONE_IN_Q16);
  ------------------
  |  |   42|  30.1k|#define ONE_IN_Q16 (65536)
  ------------------
  540|  30.1k|    m_ttt[2][0] = (ONE_IN_Q15 - p_aux_struct->ttt_cpc_1[0][ps][pb]);
  ------------------
  |  |   41|  30.1k|#define ONE_IN_Q15 (32768)
  ------------------
  541|  30.1k|    m_ttt[2][1] = (ONE_IN_Q15 - p_aux_struct->ttt_cpc_2[0][ps][pb]);
  ------------------
  |  |   41|  30.1k|#define ONE_IN_Q15 (32768)
  ------------------
  542|       |
  543|  30.1k|    if (pb >= pstr_mps_state->res_bands[3]) {
  ------------------
  |  Branch (543:9): [True: 29.8k, False: 295]
  ------------------
  544|  29.8k|      WORD32 one_by_icc;
  545|  29.8k|      one_by_icc = ixheaacd_dequant_one_by_icc(p_aux_struct->ttt_icc[0][ps][pb]);
  546|       |
  547|  29.8k|      m_ttt[0][0] = ixheaacd_mps_mult32_shr_15(m_ttt[0][0], one_by_icc);
  548|  29.8k|      m_ttt[0][1] = ixheaacd_mps_mult32_shr_15(m_ttt[0][1], one_by_icc);
  549|  29.8k|      m_ttt[1][0] = ixheaacd_mps_mult32_shr_15(m_ttt[1][0], one_by_icc);
  550|  29.8k|      m_ttt[1][1] = ixheaacd_mps_mult32_shr_15(m_ttt[1][1], one_by_icc);
  551|  29.8k|      m_ttt[2][0] = ixheaacd_mps_mult32_shr_15(m_ttt[2][0], one_by_icc);
  552|  29.8k|      m_ttt[2][1] = ixheaacd_mps_mult32_shr_15(m_ttt[2][1], one_by_icc);
  553|  29.8k|    }
  554|       |
  555|  30.1k|    m_ttt[0][0] = ixheaac_mult32x16in32(m_ttt[0][0], TWO_BY_THREE_Q15);
  ------------------
  |  |   27|  30.1k|#define TWO_BY_THREE_Q15 (21845)
  ------------------
  556|  30.1k|    m_ttt[0][1] = ixheaac_mult32x16in32(m_ttt[0][1], TWO_BY_THREE_Q15);
  ------------------
  |  |   27|  30.1k|#define TWO_BY_THREE_Q15 (21845)
  ------------------
  557|  30.1k|    m_ttt[1][0] = ixheaac_mult32x16in32(m_ttt[1][0], TWO_BY_THREE_Q15);
  ------------------
  |  |   27|  30.1k|#define TWO_BY_THREE_Q15 (21845)
  ------------------
  558|  30.1k|    m_ttt[1][1] = ixheaac_mult32x16in32(m_ttt[1][1], TWO_BY_THREE_Q15);
  ------------------
  |  |   27|  30.1k|#define TWO_BY_THREE_Q15 (21845)
  ------------------
  559|  30.1k|    m_ttt[2][0] = ixheaac_mult32x16in32(m_ttt[2][0], TWO_BY_THREE_Q15);
  ------------------
  |  |   27|  30.1k|#define TWO_BY_THREE_Q15 (21845)
  ------------------
  560|  30.1k|    m_ttt[2][1] = ixheaac_mult32x16in32(m_ttt[2][1], TWO_BY_THREE_Q15);
  ------------------
  |  |   27|  30.1k|#define TWO_BY_THREE_Q15 (21845)
  ------------------
  561|  75.7k|  } else {
  562|  75.7k|    WORD32 center_wiener;
  563|  75.7k|    WORD32 center_subtraction;
  564|  75.7k|    WORD32 c1d, c2d;
  565|  75.7k|    WORD64 prod;
  566|  75.7k|    WORD32 w11, w00, w20, w21;
  567|  75.7k|    WORD16 q_w11, q_w00, q_w20, q_w21;
  568|       |
  569|  75.7k|    const WORD32 *ten_cld_by_10 =
  570|  75.7k|        pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr->ten_cld_by_10;
  571|       |
  572|  75.7k|    ia_mps_dec_spatial_bs_frame_struct *p_cur_bs = pstr_mps_state->bs_frame;
  573|  75.7k|    WORD16 index = ixheaacd_map_cld_index(p_aux_struct->ttt_cld_1[0][ps][pb] >> 15);
  574|       |
  575|  75.7k|    c1d = ten_cld_by_10[index];
  576|       |
  577|  75.7k|    index = ixheaacd_map_cld_index(p_aux_struct->ttt_cld_2[0][ps][pb] >> 15);
  578|  75.7k|    c2d = ten_cld_by_10[index];
  579|       |
  580|  75.7k|    if (p_cur_bs->cmp_ttt_cld_1_idx[0][ps][pb] == 15 ||
  ------------------
  |  Branch (580:9): [True: 164, False: 75.5k]
  ------------------
  581|  75.5k|        p_cur_bs->cmp_ttt_cld_2_idx[0][ps][pb] == 15) {
  ------------------
  |  Branch (581:9): [True: 680, False: 74.8k]
  ------------------
  582|    844|      if (p_cur_bs->cmp_ttt_cld_1_idx[0][ps][pb] == 15) {
  ------------------
  |  Branch (582:11): [True: 164, False: 680]
  ------------------
  583|    164|        if (p_cur_bs->cmp_ttt_cld_2_idx[0][ps][pb] == -15) {
  ------------------
  |  Branch (583:13): [True: 11, False: 153]
  ------------------
  584|     11|          w00 = ONE_BY_SQRT_2_Q15;
  ------------------
  |  |   29|     11|#define ONE_BY_SQRT_2_Q15 (23170)
  ------------------
  585|     11|          w20 = ONE_BY_SQRT_8_Q15;
  ------------------
  |  |   30|     11|#define ONE_BY_SQRT_8_Q15 (11585)
  ------------------
  586|    153|        } else {
  587|    153|          w00 = ONE_IN_Q15;
  ------------------
  |  |   41|    153|#define ONE_IN_Q15 (32768)
  ------------------
  588|    153|          w20 = 0;
  589|    153|        }
  590|       |
  591|    164|        if (p_cur_bs->cmp_ttt_cld_2_idx[0][ps][pb] == 15) {
  ------------------
  |  Branch (591:13): [True: 4, False: 160]
  ------------------
  592|      4|          w11 = ONE_BY_SQRT_2_Q15;
  ------------------
  |  |   29|      4|#define ONE_BY_SQRT_2_Q15 (23170)
  ------------------
  593|      4|          w21 = ONE_BY_SQRT_8_Q15;
  ------------------
  |  |   30|      4|#define ONE_BY_SQRT_8_Q15 (11585)
  ------------------
  594|    160|        } else {
  595|    160|          w11 = ONE_IN_Q15;
  ------------------
  |  |   41|    160|#define ONE_IN_Q15 (32768)
  ------------------
  596|    160|          w21 = 0;
  597|    160|        }
  598|       |
  599|    164|        m_ttt[0][0] = w00;
  600|    164|        m_ttt[2][0] = w20;
  601|    164|        m_ttt[2][1] = w21;
  602|    164|        m_ttt[1][1] = w11;
  603|    164|      }
  604|       |
  605|    844|      if (p_cur_bs->cmp_ttt_cld_2_idx[0][ps][pb] == 15) {
  ------------------
  |  Branch (605:11): [True: 684, False: 160]
  ------------------
  606|    684|        const WORD32 *w00_cld2_15 =
  607|    684|            pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr->w00_cld2_15;
  608|       |
  609|    684|        if (p_cur_bs->cmp_ttt_cld_1_idx[0][ps][pb] == 15) {
  ------------------
  |  Branch (609:13): [True: 4, False: 680]
  ------------------
  610|      4|          w11 = ONE_BY_SQRT_2_Q15;
  ------------------
  |  |   29|      4|#define ONE_BY_SQRT_2_Q15 (23170)
  ------------------
  611|      4|          w21 = ONE_BY_SQRT_8_Q15;
  ------------------
  |  |   30|      4|#define ONE_BY_SQRT_8_Q15 (11585)
  ------------------
  612|    680|        } else {
  613|    680|          w11 = 0;
  614|    680|          w21 = ONE_IN_Q14;
  ------------------
  |  |   40|    680|#define ONE_IN_Q14 (16384)
  ------------------
  615|    680|        }
  616|       |
  617|    684|        w00 = w00_cld2_15[p_cur_bs->cmp_ttt_cld_1_idx[0][ps][pb] + 15];
  618|    684|        w20 = w00_cld2_15[15 - p_cur_bs->cmp_ttt_cld_1_idx[0][ps][pb]] / 2;
  619|    684|        m_ttt[0][0] = w00;
  620|    684|        m_ttt[2][0] = w20;
  621|    684|        m_ttt[2][1] = w21;
  622|    684|        m_ttt[1][1] = w11;
  623|    684|      }
  624|       |
  625|    844|      m_ttt[0][1] = 0;
  626|    844|      m_ttt[1][0] = 0;
  627|  74.8k|    } else {
  628|  74.8k|      WORD32 temporary;
  629|  74.8k|      const WORD32 *sqrt_tab = pstr_mps_state->ia_mps_dec_mps_table.common_table_ptr->sqrt_tab;
  630|  74.8k|      prod = ixheaacd_mps_mult32_shr_15(c1d, c2d);
  631|       |
  632|  74.8k|      temporary = ixheaac_add32_sat(ONE_IN_Q15, c2d);
  ------------------
  |  |   41|  74.8k|#define ONE_IN_Q15 (32768)
  ------------------
  633|  74.8k|      temporary = ixheaac_add32_sat(temporary, (WORD32)prod);
  634|  74.8k|      w00 = ixheaacd_mps_div_32((WORD32)prod, temporary, &q_w00);
  635|       |
  636|  74.8k|      w11 = ixheaacd_mps_div_32(c1d, (ixheaac_add32_sat3(c1d, c2d, ONE_IN_Q15)), &q_w11);
  ------------------
  |  |   41|  74.8k|#define ONE_IN_Q15 (32768)
  ------------------
  637|       |
  638|  74.8k|      w20 = ixheaacd_mps_div_32((ixheaac_add32_sat(c2d, ONE_IN_Q15)),
  ------------------
  |  |   41|  74.8k|#define ONE_IN_Q15 (32768)
  ------------------
  639|  74.8k|                                ixheaac_add32_sat3(ONE_IN_Q15, (WORD32)prod, c2d), &q_w20);
  ------------------
  |  |   41|  74.8k|#define ONE_IN_Q15 (32768)
  ------------------
  640|       |
  641|  74.8k|      w21 = ixheaacd_mps_div_32(ixheaac_add32_sat(c2d, ONE_IN_Q15),
  ------------------
  |  |   41|  74.8k|#define ONE_IN_Q15 (32768)
  ------------------
  642|  74.8k|                                (ixheaac_add32_sat3(c1d, c2d, ONE_IN_Q15)), &q_w21);
  ------------------
  |  |   41|  74.8k|#define ONE_IN_Q15 (32768)
  ------------------
  643|       |
  644|  74.8k|      m_ttt[0][0] = ixheaacd_mps_sqrt(w00, &q_w00, sqrt_tab);
  645|  74.8k|      m_ttt[0][0] = ixheaacd_mps_convert_to_qn(m_ttt[0][0], q_w00, 15);
  646|       |
  647|  74.8k|      m_ttt[0][1] = 0;
  648|  74.8k|      m_ttt[1][0] = 0;
  649|       |
  650|  74.8k|      m_ttt[1][1] = ixheaacd_mps_sqrt(w11, &q_w11, sqrt_tab);
  651|  74.8k|      m_ttt[1][1] = ixheaacd_mps_convert_to_qn(m_ttt[1][1], q_w11, 15);
  652|       |
  653|  74.8k|      m_ttt[2][0] = ixheaacd_mps_sqrt(w20, &q_w20, sqrt_tab) >> 1;
  654|       |
  655|  74.8k|      m_ttt[2][0] = ixheaacd_mps_convert_to_qn(m_ttt[2][0], q_w20, 15);
  656|       |
  657|  74.8k|      m_ttt[2][1] = ixheaacd_mps_sqrt(w21, &q_w21, sqrt_tab) >> 1;
  658|       |
  659|  74.8k|      m_ttt[2][1] = ixheaacd_mps_convert_to_qn(m_ttt[2][1], q_w21, 15);
  660|  74.8k|      if (p_aux_struct->ttt_cld_1[0][ps][pb] == 4915200) {
  ------------------
  |  Branch (660:11): [True: 48.8k, False: 26.0k]
  ------------------
  661|  48.8k|        m_ttt[0][0] = 32767;
  662|  48.8k|        m_ttt[1][1] = 32767;
  663|  48.8k|        m_ttt[2][0] = 0;
  664|  48.8k|        m_ttt[2][1] = 0;
  665|  48.8k|      }
  666|  74.8k|    }
  667|       |
  668|  75.7k|    center_wiener = 0;
  669|  75.7k|    center_subtraction = (ttt_mode == 2 || ttt_mode == 3);
  ------------------
  |  Branch (669:27): [True: 16.7k, False: 58.9k]
  |  Branch (669:44): [True: 14.9k, False: 44.0k]
  ------------------
  670|       |
  671|  75.7k|    if (center_wiener) {
  ------------------
  |  Branch (671:9): [True: 0, False: 75.7k]
  ------------------
  672|      0|      WORD32 cld_1_idx = p_cur_bs->cmp_ttt_cld_1_idx[0][ps][pb];
  673|      0|      WORD32 cld_2_idx = p_cur_bs->cmp_ttt_cld_2_idx[0][ps][pb];
  674|       |
  675|      0|      if (cld_1_idx == 15 && cld_2_idx == 15) {
  ------------------
  |  Branch (675:11): [True: 0, False: 0]
  |  Branch (675:30): [True: 0, False: 0]
  ------------------
  676|      0|        m_ttt[2][0] = 0;
  677|      0|        m_ttt[2][1] = ONE_BY_SQRT_2_Q15;
  ------------------
  |  |   29|      0|#define ONE_BY_SQRT_2_Q15 (23170)
  ------------------
  678|      0|      } else if (cld_1_idx == 15) {
  ------------------
  |  Branch (678:18): [True: 0, False: 0]
  ------------------
  679|      0|        if (cld_2_idx == -15)
  ------------------
  |  Branch (679:13): [True: 0, False: 0]
  ------------------
  680|      0|          m_ttt[2][0] = ONE_BY_SQRT_2_Q15;
  ------------------
  |  |   29|      0|#define ONE_BY_SQRT_2_Q15 (23170)
  ------------------
  681|      0|        else
  682|      0|          m_ttt[2][0] = 0;
  683|      0|        m_ttt[2][1] = 0;
  684|      0|      } else if (cld_2_idx == 15) {
  ------------------
  |  Branch (684:18): [True: 0, False: 0]
  ------------------
  685|      0|        m_ttt[2][0] = 0;
  686|      0|        m_ttt[2][1] = ONE_IN_Q15;
  ------------------
  |  |   41|      0|#define ONE_IN_Q15 (32768)
  ------------------
  687|      0|      } else {
  688|      0|        WORD32 temp;
  689|      0|        WORD16 q_temp;
  690|      0|        const WORD32 *sqrt_tab = pstr_mps_state->ia_mps_dec_mps_table.common_table_ptr->sqrt_tab;
  691|       |
  692|      0|        prod = ixheaacd_mps_mult32_shr_15(c2d, (c2d + c1d + ONE_IN_Q16)) + ONE_IN_Q15;
  ------------------
  |  |   42|      0|#define ONE_IN_Q16 (65536)
  ------------------
                      prod = ixheaacd_mps_mult32_shr_15(c2d, (c2d + c1d + ONE_IN_Q16)) + ONE_IN_Q15;
  ------------------
  |  |   41|      0|#define ONE_IN_Q15 (32768)
  ------------------
  693|       |
  694|      0|        temp = ixheaacd_mps_div_32((WORD32)ONE_IN_Q15, (WORD32)prod, &q_temp);
  ------------------
  |  |   41|      0|#define ONE_IN_Q15 (32768)
  ------------------
  695|       |
  696|      0|        m_ttt[2][0] = ixheaacd_mps_sqrt(temp, &q_temp, sqrt_tab);
  697|      0|        m_ttt[2][0] = ixheaacd_mps_convert_to_qn(m_ttt[2][0], q_temp, 15);
  698|       |
  699|      0|        m_ttt[2][1] = ixheaacd_mps_mult32_shr_15(c2d, m_ttt[2][0]);
  700|      0|      }
  701|      0|    }
  702|       |
  703|  75.7k|    if (center_subtraction) {
  ------------------
  |  Branch (703:9): [True: 31.6k, False: 44.0k]
  ------------------
  704|  31.6k|      WORD32 wl1, wl2, wr1, wr2;
  705|  31.6k|      WORD16 q_wl1, q_wr1;
  706|  31.6k|      WORD32 cld_1_idx = p_cur_bs->cmp_ttt_cld_1_idx[0][ps][pb];
  707|  31.6k|      WORD32 cld_2_idx = p_cur_bs->cmp_ttt_cld_2_idx[0][ps][pb];
  708|       |
  709|  31.6k|      if (cld_1_idx == 15 && cld_2_idx == 15) {
  ------------------
  |  Branch (709:11): [True: 118, False: 31.5k]
  |  Branch (709:30): [True: 4, False: 114]
  ------------------
  710|      4|        m_ttt[0][0] = ONE_IN_Q15;
  ------------------
  |  |   41|      4|#define ONE_IN_Q15 (32768)
  ------------------
  711|      4|        m_ttt[0][1] = MINUS_ONE_IN_Q14;
  ------------------
  |  |   38|      4|#define MINUS_ONE_IN_Q14 (-16384)
  ------------------
  712|      4|        m_ttt[1][1] = ONE_BY_SQRT_2_Q15;
  ------------------
  |  |   29|      4|#define ONE_BY_SQRT_2_Q15 (23170)
  ------------------
  713|      4|        m_ttt[1][0] = 0;
  714|  31.6k|      } else if (cld_1_idx == 15) {
  ------------------
  |  Branch (714:18): [True: 114, False: 31.5k]
  ------------------
  715|    114|        if (cld_2_idx == -15) {
  ------------------
  |  Branch (715:13): [True: 11, False: 103]
  ------------------
  716|     11|          m_ttt[0][0] = ONE_BY_SQRT_2_Q15;
  ------------------
  |  |   29|     11|#define ONE_BY_SQRT_2_Q15 (23170)
  ------------------
  717|     11|          m_ttt[1][0] = MINUS_ONE_IN_Q14;
  ------------------
  |  |   38|     11|#define MINUS_ONE_IN_Q14 (-16384)
  ------------------
  718|    103|        } else {
  719|    103|          m_ttt[0][0] = ONE_IN_Q15;
  ------------------
  |  |   41|    103|#define ONE_IN_Q15 (32768)
  ------------------
  720|    103|          m_ttt[1][0] = 0;
  721|    103|        }
  722|       |
  723|    114|        m_ttt[0][1] = 0;
  724|    114|        m_ttt[1][1] = ONE_IN_Q15;
  ------------------
  |  |   41|    114|#define ONE_IN_Q15 (32768)
  ------------------
  725|  31.5k|      } else if (cld_2_idx == 15) {
  ------------------
  |  Branch (725:18): [True: 595, False: 30.9k]
  ------------------
  726|    595|        m_ttt[0][0] = ONE_IN_Q15;
  ------------------
  |  |   41|    595|#define ONE_IN_Q15 (32768)
  ------------------
  727|    595|        m_ttt[0][1] = MINUS_ONE_IN_Q15;
  ------------------
  |  |   37|    595|#define MINUS_ONE_IN_Q15 (-32768)
  ------------------
  728|    595|        m_ttt[1][1] = 0;
  729|    595|        m_ttt[1][0] = 0;
  730|  30.9k|      } else {
  731|  30.9k|        WORD32 temp, temp_1, q_a;
  732|  30.9k|        WORD16 q_c, q_l, q_r, q_temp, q_temp1;
  733|  30.9k|        WORD32 c;
  734|  30.9k|        WORD32 r;
  735|  30.9k|        WORD32 l;
  736|  30.9k|        const WORD32 *sqrt_tab = pstr_mps_state->ia_mps_dec_mps_table.common_table_ptr->sqrt_tab;
  737|       |
  738|  30.9k|        c = ixheaacd_mps_div_32(ONE_IN_Q15, (ixheaac_add32_sat(c1d, ONE_IN_Q15)), &q_c);
  ------------------
  |  |   41|  30.9k|#define ONE_IN_Q15 (32768)
  ------------------
                      c = ixheaacd_mps_div_32(ONE_IN_Q15, (ixheaac_add32_sat(c1d, ONE_IN_Q15)), &q_c);
  ------------------
  |  |   41|  30.9k|#define ONE_IN_Q15 (32768)
  ------------------
  739|  30.9k|        r = ixheaacd_mps_div_32(c1d, (ixheaac_add32_sat(c2d, ONE_IN_Q15)), &q_r);
  ------------------
  |  |   41|  30.9k|#define ONE_IN_Q15 (32768)
  ------------------
  740|  30.9k|        r = ixheaacd_mps_mult32_shr_30(r, c);
  741|  30.9k|        q_r = q_r + q_c - 30;
  742|       |
  743|  30.9k|        l = ixheaacd_mps_mult32_shr_30(c2d, r);
  744|  30.9k|        q_l = q_r - 15;
  745|       |
  746|  30.9k|        temp = ixheaacd_mps_div_32(r, l, &q_temp);
  747|  30.9k|        q_temp += (q_r - q_l);
  748|       |
  749|  30.9k|        if (q_temp > 28) {
  ------------------
  |  Branch (749:13): [True: 19.1k, False: 11.8k]
  ------------------
  750|  19.1k|          temp = temp >> (q_temp - 28);
  751|  19.1k|          q_temp = 28;
  752|  19.1k|        }
  753|       |
  754|  30.9k|        temp += ((1 << q_temp) - 1);
  755|       |
  756|  30.9k|        temp = ixheaac_add32_sat(
  757|  30.9k|            ixheaacd_mps_mult32_shr_n(c, temp, (WORD16)(q_c + q_temp - q_r)), r);
  758|  30.9k|        q_temp = q_r;
  759|       |
  760|  30.9k|        if (q_c > q_r) {
  ------------------
  |  Branch (760:13): [True: 16.1k, False: 14.7k]
  ------------------
  761|  16.1k|          temp_1 = r + (c >> (q_c - q_r));
  762|  16.1k|          q_temp1 = q_r;
  763|  16.1k|        } else {
  764|  14.7k|          temp_1 = ixheaac_add32_sat((r >> (q_r - q_c)), c);
  765|  14.7k|          q_temp1 = q_c;
  766|  14.7k|        }
  767|       |
  768|  30.9k|        temp = ixheaac_div32(temp_1, temp, &q_a);
  769|  30.9k|        q_wl1 = q_a + q_temp1 - q_temp;
  770|  30.9k|        wl1 = ixheaacd_mps_sqrt(temp, &q_wl1, sqrt_tab);
  771|  30.9k|        m_ttt[0][0] = ixheaacd_mps_convert_to_qn(wl1, q_wl1, 15);
  772|       |
  773|  30.9k|        temp = ixheaac_div32(wl1, temp_1, &q_a);
  774|  30.9k|        q_temp = q_a + (q_wl1 - q_temp1);
  775|  30.9k|        wl2 = ixheaacd_mps_mult32_shr_n(c, temp, (WORD16)(q_c + q_temp - 15));
  776|  30.9k|        m_ttt[0][1] = ixheaac_negate32_sat(wl2);
  777|       |
  778|  30.9k|        temp = ixheaacd_mps_div_32(l, r, &q_temp);
  779|  30.9k|        q_temp += (q_l - q_r);
  780|       |
  781|  30.9k|        if (q_temp > 28) {
  ------------------
  |  Branch (781:13): [True: 20.1k, False: 10.7k]
  ------------------
  782|  20.1k|          temp = temp >> (q_temp - 28);
  783|  20.1k|          q_temp = 28;
  784|  20.1k|        }
  785|       |
  786|  30.9k|        temp = ixheaac_add32_sat((1 << q_temp) - 1, temp);
  787|       |
  788|  30.9k|        temp = ixheaac_add32_sat(
  789|  30.9k|                   ixheaacd_mps_mult32_shr_n(c, temp, (WORD16)(q_c + q_temp - q_l)), l);
  790|       |
  791|  30.9k|        q_temp = q_l;
  792|       |
  793|  30.9k|        if (q_c > q_l) {
  ------------------
  |  Branch (793:13): [True: 22.3k, False: 8.57k]
  ------------------
  794|  22.3k|          temp_1 = l + (c >> (q_c - q_l));
  795|  22.3k|          q_temp1 = q_l;
  796|  22.3k|        } else {
  797|  8.57k|          temp_1 = ixheaac_add32_sat((l >> (q_l - q_c)), c);
  798|  8.57k|          q_temp1 = q_c;
  799|  8.57k|        }
  800|       |
  801|  30.9k|        temp = ixheaac_div32(temp_1, temp, &q_a);
  802|  30.9k|        q_wr1 = q_a + q_temp1 - q_temp;
  803|  30.9k|        wr1 = ixheaacd_mps_sqrt(temp, &q_wr1, sqrt_tab);
  804|  30.9k|        m_ttt[1][1] = ixheaacd_mps_convert_to_qn(wr1, q_wr1, 15);
  805|       |
  806|  30.9k|        temp = ixheaac_div32(wr1, temp_1, &q_a);
  807|  30.9k|        q_temp = q_a + (q_wl1 - q_temp1);
  808|  30.9k|        wr2 = ixheaacd_mps_mult32_shr_n(c, temp, (WORD16)(q_c + q_temp - 15));
  809|  30.9k|        m_ttt[1][0] = ixheaac_negate32_sat(wr2);
  810|  30.9k|      }
  811|  31.6k|    }
  812|  75.7k|  }
  813|       |
  814|   105k|  m_ttt[0][2] = ONE_BY_THREE_Q15;
  ------------------
  |  |   26|   105k|#define ONE_BY_THREE_Q15 (10923)
  ------------------
  815|   105k|  m_ttt[1][2] = ONE_BY_THREE_Q15;
  ------------------
  |  |   26|   105k|#define ONE_BY_THREE_Q15 (10923)
  ------------------
  816|   105k|  m_ttt[2][2] = MINUS_ONE_BY_THREE_Q15;
  ------------------
  |  |   28|   105k|#define MINUS_ONE_BY_THREE_Q15 (-10923)
  ------------------
  817|       |
  818|   423k|  for (col = 0; col < 3; col++) {
  ------------------
  |  Branch (818:17): [True: 317k, False: 105k]
  ------------------
  819|   317k|    m_ttt[2][col] = ixheaacd_mps_mult32_shr_15(m_ttt[2][col], SQRT_TWO_Q15);
  ------------------
  |  |   23|   317k|#define SQRT_TWO_Q15 (46341)
  ------------------
  820|   317k|  }
  821|   105k|}
ixheaacd_calculate_mtx_inv:
  824|  26.5k|                                WORD32 mode, WORD32 h_real[][2], WORD32 h_imag[][2]) {
  825|  26.5k|  ia_mps_dec_auxilary_struct *p_aux_struct = pstr_mps_state->aux_struct;
  826|       |
  827|  26.5k|  WORD32 weight1;
  828|  26.5k|  WORD32 weight2;
  829|  26.5k|  ia_mps_dec_spatial_bs_frame_struct *p_cur_bs = pstr_mps_state->bs_frame;
  830|       |
  831|  26.5k|  if (mode < 2) {
  ------------------
  |  Branch (831:7): [True: 7.68k, False: 18.8k]
  ------------------
  832|  7.68k|    ixheaacd_get_matrix_inversion_weights(
  833|  7.68k|        p_cur_bs->ott_cld_idx[1][ps][pb], p_cur_bs->ott_cld_idx[2][ps][pb], 1,
  834|  7.68k|        p_aux_struct->ttt_cpc_1[0][ps][pb], p_aux_struct->ttt_cpc_2[0][ps][pb], &weight1,
  835|  7.68k|        &weight2, &(pstr_mps_state->ia_mps_dec_mps_table));
  836|  18.8k|  } else {
  837|  18.8k|    ixheaacd_get_matrix_inversion_weights(
  838|  18.8k|        p_cur_bs->ott_cld_idx[1][ps][pb], p_cur_bs->ott_cld_idx[2][ps][pb], 0,
  839|  18.8k|        p_cur_bs->cmp_ttt_cld_1_idx[0][ps][pb], p_cur_bs->cmp_ttt_cld_2_idx[0][ps][pb], &weight1,
  840|  18.8k|        &weight2, &(pstr_mps_state->ia_mps_dec_mps_table));
  841|  18.8k|  }
  842|       |
  843|  26.5k|  ixheaacd_invert_matrix(weight1, weight2, h_real, h_imag,
  844|  26.5k|                         pstr_mps_state->ia_mps_dec_mps_table.common_table_ptr);
  845|  26.5k|}
ixheaacd_calculate_arb_dmx_mtx:
  848|  40.6k|                                    WORD32 pb, WORD32 g_real[]) {
  849|  40.6k|  WORD32 ch;
  850|  40.6k|  WORD32 gain;
  851|       |
  852|  40.6k|  WORD32 *arbdmx_alpha_prev = pstr_mps_state->mps_persistent_mem.arbdmx_alpha_prev;
  853|  40.6k|  WORD32 *arbdmx_alpha_upd_set = pstr_mps_state->aux_struct->arbdmx_alpha_upd_set;
  854|  40.6k|  WORD32 *arbdmx_alpha = pstr_mps_state->aux_struct->arbdmx_alpha;
  855|       |
  856|  40.6k|  WORD32 n_ch_in = pstr_mps_state->num_input_channels;
  857|  40.6k|  WORD32 temp_1;
  858|   100k|  for (ch = 0; ch < n_ch_in; ch++) {
  ------------------
  |  Branch (858:16): [True: 60.1k, False: 40.6k]
  ------------------
  859|  60.1k|    temp_1 = pstr_mps_state->bs_frame->arbdmx_gain_idx[ch][ps][pb] + 15;
  860|  60.1k|    gain = pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr->dec_pow[temp_1];
  861|       |
  862|  60.1k|    if (pb < pstr_mps_state->arbdmx_residual_bands) {
  ------------------
  |  Branch (862:9): [True: 2.19k, False: 57.9k]
  ------------------
  863|  2.19k|      if ((ps == 0) && (arbdmx_alpha_upd_set[ch] == 1)) {
  ------------------
  |  Branch (863:11): [True: 1.22k, False: 961]
  |  Branch (863:24): [True: 319, False: 910]
  ------------------
  864|    319|        g_real[ch] = ixheaacd_mps_mult32_shr_15(*arbdmx_alpha_prev, gain);
  865|  1.87k|      } else {
  866|  1.87k|        g_real[ch] = ixheaacd_mps_mult32_shr_15(arbdmx_alpha[ch], gain);
  867|  1.87k|      }
  868|  57.9k|    } else {
  869|  57.9k|      g_real[ch] = gain;
  870|  57.9k|    }
  871|  60.1k|    arbdmx_alpha_prev++;
  872|  60.1k|  }
  873|  40.6k|}
ixheaacd_quantize:
  875|  27.2k|WORD32 ixheaacd_quantize(WORD32 cld) {
  876|  27.2k|  switch (cld) {
  877|  1.36k|    case -150:
  ------------------
  |  Branch (877:5): [True: 1.36k, False: 25.9k]
  ------------------
  878|  1.36k|      return -15;
  879|     95|    case -45:
  ------------------
  |  Branch (879:5): [True: 95, False: 27.1k]
  ------------------
  880|     95|      return -14;
  881|     60|    case -40:
  ------------------
  |  Branch (881:5): [True: 60, False: 27.2k]
  ------------------
  882|     60|      return -13;
  883|    186|    case -35:
  ------------------
  |  Branch (883:5): [True: 186, False: 27.0k]
  ------------------
  884|    186|      return -12;
  885|    122|    case -30:
  ------------------
  |  Branch (885:5): [True: 122, False: 27.1k]
  ------------------
  886|    122|      return -11;
  887|    105|    case -25:
  ------------------
  |  Branch (887:5): [True: 105, False: 27.1k]
  ------------------
  888|    105|      return -10;
  889|    249|    case -22:
  ------------------
  |  Branch (889:5): [True: 249, False: 27.0k]
  ------------------
  890|    249|      return -9;
  891|  2.59k|    case -19:
  ------------------
  |  Branch (891:5): [True: 2.59k, False: 24.6k]
  ------------------
  892|  2.59k|      return -8;
  893|    171|    case -16:
  ------------------
  |  Branch (893:5): [True: 171, False: 27.0k]
  ------------------
  894|    171|      return -7;
  895|    302|    case -13:
  ------------------
  |  Branch (895:5): [True: 302, False: 26.9k]
  ------------------
  896|    302|      return -6;
  897|    547|    case -10:
  ------------------
  |  Branch (897:5): [True: 547, False: 26.7k]
  ------------------
  898|    547|      return -5;
  899|    879|    case -8:
  ------------------
  |  Branch (899:5): [True: 879, False: 26.3k]
  ------------------
  900|    879|      return -4;
  901|    315|    case -6:
  ------------------
  |  Branch (901:5): [True: 315, False: 26.9k]
  ------------------
  902|    315|      return -3;
  903|    336|    case -4:
  ------------------
  |  Branch (903:5): [True: 336, False: 26.9k]
  ------------------
  904|    336|      return -2;
  905|    954|    case -2:
  ------------------
  |  Branch (905:5): [True: 954, False: 26.3k]
  ------------------
  906|    954|      return -1;
  907|  1.64k|    case 0:
  ------------------
  |  Branch (907:5): [True: 1.64k, False: 25.6k]
  ------------------
  908|  1.64k|      return 0;
  909|    227|    case 2:
  ------------------
  |  Branch (909:5): [True: 227, False: 27.0k]
  ------------------
  910|    227|      return 1;
  911|    384|    case 4:
  ------------------
  |  Branch (911:5): [True: 384, False: 26.8k]
  ------------------
  912|    384|      return 2;
  913|    483|    case 6:
  ------------------
  |  Branch (913:5): [True: 483, False: 26.7k]
  ------------------
  914|    483|      return 3;
  915|    658|    case 8:
  ------------------
  |  Branch (915:5): [True: 658, False: 26.6k]
  ------------------
  916|    658|      return 4;
  917|    205|    case 10:
  ------------------
  |  Branch (917:5): [True: 205, False: 27.0k]
  ------------------
  918|    205|      return 5;
  919|    704|    case 13:
  ------------------
  |  Branch (919:5): [True: 704, False: 26.5k]
  ------------------
  920|    704|      return 6;
  921|    157|    case 16:
  ------------------
  |  Branch (921:5): [True: 157, False: 27.1k]
  ------------------
  922|    157|      return 7;
  923|    612|    case 19:
  ------------------
  |  Branch (923:5): [True: 612, False: 26.6k]
  ------------------
  924|    612|      return 8;
  925|    194|    case 22:
  ------------------
  |  Branch (925:5): [True: 194, False: 27.0k]
  ------------------
  926|    194|      return 9;
  927|    225|    case 25:
  ------------------
  |  Branch (927:5): [True: 225, False: 27.0k]
  ------------------
  928|    225|      return 10;
  929|    251|    case 30:
  ------------------
  |  Branch (929:5): [True: 251, False: 27.0k]
  ------------------
  930|    251|      return 11;
  931|    188|    case 35:
  ------------------
  |  Branch (931:5): [True: 188, False: 27.0k]
  ------------------
  932|    188|      return 12;
  933|    155|    case 40:
  ------------------
  |  Branch (933:5): [True: 155, False: 27.1k]
  ------------------
  934|    155|      return 13;
  935|    477|    case 45:
  ------------------
  |  Branch (935:5): [True: 477, False: 26.7k]
  ------------------
  936|    477|      return 14;
  937|  12.4k|    case 150:
  ------------------
  |  Branch (937:5): [True: 12.4k, False: 14.8k]
  ------------------
  938|  12.4k|      return 15;
  939|      0|    default:
  ------------------
  |  Branch (939:5): [True: 0, False: 27.2k]
  ------------------
  940|      0|      return 0;
  941|  27.2k|  }
  942|  27.2k|}
ixheaacd_mps_calc_m1m2_common.c:ixheaacd_dequant_one_by_icc:
  443|  29.8k|static WORD32 ixheaacd_dequant_one_by_icc(WORD32 icc) {
  444|  29.8k|  switch (icc) {
  445|  17.5k|    case 32768:
  ------------------
  |  Branch (445:5): [True: 17.5k, False: 12.3k]
  ------------------
  446|  17.5k|      return 32768;
  447|    345|    case 30704:
  ------------------
  |  Branch (447:5): [True: 345, False: 29.5k]
  ------------------
  448|    345|      return 34971;
  449|    847|    case 27564:
  ------------------
  |  Branch (449:5): [True: 847, False: 29.0k]
  ------------------
  450|    847|      return 38955;
  451|  4.74k|    case 19691:
  ------------------
  |  Branch (451:5): [True: 4.74k, False: 25.1k]
  ------------------
  452|  4.74k|      return 54530;
  453|  1.19k|    case 12047:
  ------------------
  |  Branch (453:5): [True: 1.19k, False: 28.7k]
  ------------------
  454|  1.19k|      return 89131;
  455|  3.65k|    case 0:
  ------------------
  |  Branch (455:5): [True: 3.65k, False: 26.2k]
  ------------------
  456|  3.65k|      return 0;
  457|    658|    case -19300:
  ------------------
  |  Branch (457:5): [True: 658, False: 29.2k]
  ------------------
  458|    658|      return -55633;
  459|    915|    case -32440:
  ------------------
  |  Branch (459:5): [True: 915, False: 28.9k]
  ------------------
  460|    915|      return -33099;
  461|      0|    default:
  ------------------
  |  Branch (461:5): [True: 0, False: 29.8k]
  ------------------
  462|      0|      return 0;
  463|  29.8k|  }
  464|  29.8k|}
ixheaacd_mps_calc_m1m2_common.c:ixheaacd_map_cld_index:
  466|   151k|static WORD16 ixheaacd_map_cld_index(WORD32 cld_val) {
  467|   151k|  WORD32 temp = cld_val;
  468|   151k|  WORD16 idx = 0;
  469|   151k|  if (cld_val == 0) {
  ------------------
  |  Branch (469:7): [True: 57.3k, False: 94.0k]
  ------------------
  470|  57.3k|    return 15;
  471|  94.0k|  } else {
  472|  94.0k|    if (cld_val < 0) {
  ------------------
  |  Branch (472:9): [True: 30.4k, False: 63.6k]
  ------------------
  473|  30.4k|      temp = -cld_val;
  474|  30.4k|    }
  475|  94.0k|    switch (temp) {
  476|  68.6k|      case 150:
  ------------------
  |  Branch (476:7): [True: 68.6k, False: 25.4k]
  ------------------
  477|  68.6k|        idx = 15;
  478|  68.6k|        break;
  479|  1.34k|      case 45:
  ------------------
  |  Branch (479:7): [True: 1.34k, False: 92.7k]
  ------------------
  480|  1.34k|        idx = 14;
  481|  1.34k|        break;
  482|    803|      case 40:
  ------------------
  |  Branch (482:7): [True: 803, False: 93.2k]
  ------------------
  483|    803|        idx = 13;
  484|    803|        break;
  485|  3.26k|      case 35:
  ------------------
  |  Branch (485:7): [True: 3.26k, False: 90.8k]
  ------------------
  486|  3.26k|        idx = 12;
  487|  3.26k|        break;
  488|    958|      case 30:
  ------------------
  |  Branch (488:7): [True: 958, False: 93.1k]
  ------------------
  489|    958|        idx = 11;
  490|    958|        break;
  491|  2.63k|      case 25:
  ------------------
  |  Branch (491:7): [True: 2.63k, False: 91.4k]
  ------------------
  492|  2.63k|        idx = 10;
  493|  2.63k|        break;
  494|    605|      case 22:
  ------------------
  |  Branch (494:7): [True: 605, False: 93.4k]
  ------------------
  495|    605|        idx = 9;
  496|    605|        break;
  497|  1.30k|      case 19:
  ------------------
  |  Branch (497:7): [True: 1.30k, False: 92.7k]
  ------------------
  498|  1.30k|        idx = 8;
  499|  1.30k|        break;
  500|  1.00k|      case 16:
  ------------------
  |  Branch (500:7): [True: 1.00k, False: 93.0k]
  ------------------
  501|  1.00k|        idx = 7;
  502|  1.00k|        break;
  503|  2.59k|      case 13:
  ------------------
  |  Branch (503:7): [True: 2.59k, False: 91.4k]
  ------------------
  504|  2.59k|        idx = 6;
  505|  2.59k|        break;
  506|  1.35k|      case 10:
  ------------------
  |  Branch (506:7): [True: 1.35k, False: 92.7k]
  ------------------
  507|  1.35k|        idx = 5;
  508|  1.35k|        break;
  509|    858|      case 8:
  ------------------
  |  Branch (509:7): [True: 858, False: 93.2k]
  ------------------
  510|    858|        idx = 4;
  511|    858|        break;
  512|  1.07k|      case 6:
  ------------------
  |  Branch (512:7): [True: 1.07k, False: 93.0k]
  ------------------
  513|  1.07k|        idx = 3;
  514|  1.07k|        break;
  515|  2.10k|      case 4:
  ------------------
  |  Branch (515:7): [True: 2.10k, False: 91.9k]
  ------------------
  516|  2.10k|        idx = 2;
  517|  2.10k|        break;
  518|  5.55k|      case 2:
  ------------------
  |  Branch (518:7): [True: 5.55k, False: 88.5k]
  ------------------
  519|  5.55k|        idx = 1;
  520|  5.55k|        break;
  521|      0|      default:
  ------------------
  |  Branch (521:7): [True: 0, False: 94.0k]
  ------------------
  522|      0|        idx = 0;
  523|      0|        break;
  524|  94.0k|    }
  525|  94.0k|  }
  526|       |
  527|  94.0k|  return (cld_val >= 0) ? idx + 15 : 15 - idx;
  ------------------
  |  Branch (527:10): [True: 63.6k, False: 30.4k]
  ------------------
  528|   151k|}

ixheaacd_calc_m1m2_5151:
   45|    273|VOID ixheaacd_calc_m1m2_5151(ia_heaac_mps_state_struct *pstr_mps_state) {
   46|    273|  ia_mps_dec_auxilary_struct *p_aux_struct = pstr_mps_state->aux_struct;
   47|    273|  ia_mps_dec_m2_param_struct *m2_param = p_aux_struct->m2_param;
   48|    273|  ia_mps_dec_m1_param_struct *m1_param = pstr_mps_state->array_struct->m1_param;
   49|    273|  ia_heaac_mps_state_struct *curr_state = pstr_mps_state;
   50|    273|  WORD32 ps, pb;
   51|    273|  WORD32 *h11_fs, *h11_c;
   52|    273|  WORD32 *h12_fs, *h12_c;
   53|    273|  WORD32 *h21_fs, *h21_c;
   54|    273|  WORD32 *h22_fs, *h22_c;
   55|    273|  WORD32 *h12_res_fs, *h12_res_c;
   56|    273|  WORD32 *h22_res_fs, *h22_res_c;
   57|    273|  WORD16 *c_l_fs, *c_l_c;
   58|    273|  WORD16 *c_r_fs, *c_r_c;
   59|       |
   60|    273|  WORD32 *h11_f, *h11_s;
   61|    273|  WORD32 *h12_f, *h12_s;
   62|    273|  WORD32 *h21_f, *h21_s;
   63|    273|  WORD32 *h22_f, *h22_s;
   64|    273|  WORD32 *h12_res_f, *h12_res_s, *c_r_clfe;
   65|    273|  WORD32 *h22_res_f, *h22_res_s, *c_l_clfe;
   66|    273|  WORD16 *c_l_f, *c_l_s;
   67|    273|  WORD16 *c_r_f, *c_r_s;
   68|       |
   69|    273|  WORD32 idx;
   70|    273|  WORD32 residual_coding = pstr_mps_state->residual_coding;
   71|    273|  WORD32 num_parameter_sets = pstr_mps_state->num_parameter_sets;
   72|    273|  WORD32 num_parameter_bands = pstr_mps_state->num_parameter_bands;
   73|    273|  WORD32 arbitrary_downmix = pstr_mps_state->arbitrary_downmix;
   74|    273|  WORD32 *res_bands = pstr_mps_state->res_bands;
   75|       |
   76|    273|  h11_fs = pstr_mps_state->mps_scratch_mem_v;
   77|    273|  h11_c =
   78|    273|      h11_fs + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h11_c), BYTE_ALIGN_8);
  ------------------
  |  |   89|    273|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
   79|    273|  h12_fs =
   80|    273|      h11_c + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h12_fs), BYTE_ALIGN_8);
  ------------------
  |  |   89|    273|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
   81|    273|  h12_c =
   82|    273|      h12_fs + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h12_c), BYTE_ALIGN_8);
  ------------------
  |  |   89|    273|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
   83|    273|  h21_fs =
   84|    273|      h12_c + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h21_fs), BYTE_ALIGN_8);
  ------------------
  |  |   89|    273|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
   85|    273|  h21_c =
   86|    273|      h21_fs + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h21_c), BYTE_ALIGN_8);
  ------------------
  |  |   89|    273|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
   87|    273|  h22_fs =
   88|    273|      h21_c + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h22_fs), BYTE_ALIGN_8);
  ------------------
  |  |   89|    273|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
   89|    273|  h22_c =
   90|    273|      h22_fs + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h22_c), BYTE_ALIGN_8);
  ------------------
  |  |   89|    273|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
   91|    273|  h12_res_fs = h22_c + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h12_res_fs),
  ------------------
  |  |   89|    273|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
   92|    273|                                                     BYTE_ALIGN_8);
   93|    273|  h12_res_c = h12_res_fs + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h12_res_c),
  ------------------
  |  |   89|    273|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
   94|    273|                                                         BYTE_ALIGN_8);
   95|    273|  h22_res_fs = h12_res_c + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h22_res_fs),
  ------------------
  |  |   89|    273|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
   96|    273|                                                         BYTE_ALIGN_8);
   97|    273|  h22_res_c = h22_res_fs + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h22_res_c),
  ------------------
  |  |   89|    273|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
   98|    273|                                                         BYTE_ALIGN_8);
   99|    273|  h11_f = h22_res_c +
  100|    273|          IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h11_f), BYTE_ALIGN_8);
  ------------------
  |  |   89|    273|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  101|    273|  h11_s =
  102|    273|      h11_f + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h11_s), BYTE_ALIGN_8);
  ------------------
  |  |   89|    273|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  103|    273|  h12_f =
  104|    273|      h11_s + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h12_f), BYTE_ALIGN_8);
  ------------------
  |  |   89|    273|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  105|    273|  h12_s =
  106|    273|      h12_f + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h12_s), BYTE_ALIGN_8);
  ------------------
  |  |   89|    273|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  107|    273|  h21_f =
  108|    273|      h12_s + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h21_f), BYTE_ALIGN_8);
  ------------------
  |  |   89|    273|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  109|    273|  h21_s =
  110|    273|      h21_f + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h21_s), BYTE_ALIGN_8);
  ------------------
  |  |   89|    273|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  111|    273|  h22_f =
  112|    273|      h21_s + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h22_f), BYTE_ALIGN_8);
  ------------------
  |  |   89|    273|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  113|    273|  h22_s =
  114|    273|      h22_f + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h22_s), BYTE_ALIGN_8);
  ------------------
  |  |   89|    273|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  115|    273|  h12_res_f = h22_s + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h12_res_f),
  ------------------
  |  |   89|    273|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  116|    273|                                                    BYTE_ALIGN_8);
  117|    273|  h12_res_s = h12_res_f + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h12_res_s),
  ------------------
  |  |   89|    273|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  118|    273|                                                        BYTE_ALIGN_8);
  119|    273|  h22_res_f = h12_res_s + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h22_res_f),
  ------------------
  |  |   89|    273|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  120|    273|                                                        BYTE_ALIGN_8);
  121|    273|  h22_res_s = h22_res_f + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h22_res_s),
  ------------------
  |  |   89|    273|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  122|    273|                                                        BYTE_ALIGN_8);
  123|    273|  c_r_clfe = h22_res_s +
  124|    273|             IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*c_r_clfe), BYTE_ALIGN_8);
  ------------------
  |  |   89|    273|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  125|    273|  c_l_clfe = c_r_clfe +
  126|    273|             IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*c_l_clfe), BYTE_ALIGN_8);
  ------------------
  |  |   89|    273|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  127|       |
  128|    273|  c_l_fs = (WORD16 *)pstr_mps_state->mps_scratch_mem_v +
  129|    273|           IXHEAAC_GET_SIZE_ALIGNED_TYPE(PARAMETER_BANDSX52, sizeof(*c_l_fs), BYTE_ALIGN_8);
  ------------------
  |  |   89|    273|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  130|    273|  c_l_c =
  131|    273|      c_l_fs + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*c_l_c), BYTE_ALIGN_8);
  ------------------
  |  |   89|    273|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  132|    273|  c_r_fs =
  133|    273|      c_l_c + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*c_r_fs), BYTE_ALIGN_8);
  ------------------
  |  |   89|    273|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  134|    273|  c_r_c =
  135|    273|      c_r_fs + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*c_r_c), BYTE_ALIGN_8);
  ------------------
  |  |   89|    273|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  136|    273|  c_l_f =
  137|    273|      c_r_c + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*c_l_f), BYTE_ALIGN_8);
  ------------------
  |  |   89|    273|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  138|    273|  c_l_s =
  139|    273|      c_l_f + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*c_l_s), BYTE_ALIGN_8);
  ------------------
  |  |   89|    273|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  140|    273|  c_r_f =
  141|    273|      c_l_s + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*c_r_f), BYTE_ALIGN_8);
  ------------------
  |  |   89|    273|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  142|    273|  c_r_s =
  143|    273|      c_r_f + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*c_r_s), BYTE_ALIGN_8);
  ------------------
  |  |   89|    273|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  144|       |
  145|  1.03k|  for (ps = 0; ps < num_parameter_sets; ps++) {
  ------------------
  |  Branch (145:16): [True: 765, False: 273]
  ------------------
  146|    765|    ixheaacd_param_2_umx_ps(pstr_mps_state, h11_fs, h12_fs, h21_fs, h22_fs, h12_res_fs,
  147|    765|                            h22_res_fs, c_l_fs, c_r_fs, 0, ps, res_bands[0]);
  148|    765|    ixheaacd_param_2_umx_ps(pstr_mps_state, h11_c, h12_c, h21_c, h22_c, h12_res_c, h22_res_c,
  149|    765|                            c_l_c, c_r_c, 1, ps, res_bands[1]);
  150|    765|    ixheaacd_param_2_umx_ps(pstr_mps_state, h11_s, h12_s, h21_s, h22_s, h12_res_s, h22_res_s,
  151|    765|                            c_l_s, c_r_s, 2, ps, res_bands[2]);
  152|    765|    ixheaacd_param_2_umx_ps(pstr_mps_state, h11_f, h12_f, h21_f, h22_f, h12_res_f, h22_res_f,
  153|    765|                            c_l_f, c_r_f, 3, ps, res_bands[3]);
  154|       |
  155|  4.06k|    for (pb = 0; pb < p_aux_struct->num_ott_bands[4]; pb++) {
  ------------------
  |  Branch (155:18): [True: 3.29k, False: 765]
  ------------------
  156|  3.29k|      ia_mps_dec_spatial_bs_frame_struct *p_cur_bs = pstr_mps_state->bs_frame;
  157|  3.29k|      c_l_clfe[pb] = pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr
  158|  3.29k|                         ->r1_matrix_l[p_cur_bs->ott_cld_idx[4][ps][pb] + 15];
  159|  3.29k|      c_r_clfe[pb] = pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr
  160|  3.29k|                         ->r1_matrix_l[15 - p_cur_bs->ott_cld_idx[4][ps][pb]];
  161|  3.29k|    }
  162|       |
  163|  8.16k|    for (pb = p_aux_struct->num_ott_bands[4]; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (163:47): [True: 7.39k, False: 765]
  ------------------
  164|  7.39k|      c_l_clfe[pb] = ONE_IN_Q15;
  ------------------
  |  |   41|  7.39k|#define ONE_IN_Q15 (32768)
  ------------------
  165|  7.39k|      c_r_clfe[pb] = 0;
  166|  7.39k|    }
  167|       |
  168|  10.3k|    for (pb = 0; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (168:18): [True: 9.55k, False: 765]
  ------------------
  169|  9.55k|      m1_param->m1_param_real[0][0][ps][pb] = ONE_IN_Q15;
  ------------------
  |  |   41|  9.55k|#define ONE_IN_Q15 (32768)
  ------------------
  170|  9.55k|      m1_param->m1_param_real[1][0][ps][pb] = ONE_IN_Q15;
  ------------------
  |  |   41|  9.55k|#define ONE_IN_Q15 (32768)
  ------------------
  171|  9.55k|      m1_param->m1_param_real[2][0][ps][pb] = c_l_fs[pb];
  172|  9.55k|      m1_param->m1_param_real[3][0][ps][pb] = ixheaac_mult16_shl(c_l_fs[pb], c_l_c[pb]);
  173|  9.55k|      m1_param->m1_param_real[4][0][ps][pb] = c_r_fs[pb];
  174|  9.55k|    }
  175|       |
  176|  10.3k|    for (pb = 0; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (176:18): [True: 9.55k, False: 765]
  ------------------
  177|  9.55k|      m2_param->m2_decor_real[0][ps][pb] = ixheaacd_mps_mult32_shr_15(
  178|  9.55k|          h11_f[pb], ixheaacd_mps_mult32_shr_15(h11_c[pb], h12_fs[pb]));
  179|  9.55k|      m2_param->m2_decor_real[1][ps][pb] = ixheaacd_mps_mult32_shr_15(h11_f[pb], h12_c[pb]);
  180|  9.55k|      m2_param->m2_decor_real[2][ps][pb] = h12_f[pb];
  181|       |
  182|  9.55k|      m2_param->m2_decor_real[3][ps][pb] = ixheaacd_mps_mult32_shr_15(
  183|  9.55k|          h21_f[pb], ixheaacd_mps_mult32_shr_15(h11_c[pb], h12_fs[pb]));
  184|  9.55k|      m2_param->m2_decor_real[4][ps][pb] = ixheaacd_mps_mult32_shr_15(h21_f[pb], h12_c[pb]);
  185|  9.55k|      m2_param->m2_decor_real[5][ps][pb] = h22_f[pb];
  186|       |
  187|  9.55k|      m2_param->m2_decor_real[6][ps][pb] = ixheaacd_mps_mult32_shr_15(
  188|  9.55k|          c_l_clfe[pb], ixheaacd_mps_mult32_shr_15(h21_c[pb], h12_fs[pb]));
  189|  9.55k|      m2_param->m2_decor_real[7][ps][pb] = ixheaacd_mps_mult32_shr_15(c_l_clfe[pb], h22_c[pb]);
  190|       |
  191|  9.55k|      m2_param->m2_decor_real[8][ps][pb] = ixheaacd_mps_mult32_shr_15(h11_s[pb], h22_fs[pb]);
  192|  9.55k|      m2_param->m2_decor_real[9][ps][pb] = h12_s[pb];
  193|       |
  194|  9.55k|      m2_param->m2_decor_real[10][ps][pb] = ixheaacd_mps_mult32_shr_15(h21_s[pb], h22_fs[pb]);
  195|  9.55k|      m2_param->m2_decor_real[11][ps][pb] = h22_s[pb];
  196|  9.55k|    }
  197|       |
  198|  10.3k|    for (pb = 0; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (198:18): [True: 9.55k, False: 765]
  ------------------
  199|  9.55k|      idx = 0;
  200|       |
  201|  9.55k|      m2_param->m2_resid_real[idx++][ps][pb] = ixheaacd_mps_mult32_shr_15(
  202|  9.55k|          h11_f[pb], ixheaacd_mps_mult32_shr_15(h11_c[pb], h11_fs[pb]));
  203|       |
  204|  9.55k|      if (residual_coding) {
  ------------------
  |  Branch (204:11): [True: 835, False: 8.71k]
  ------------------
  205|    835|        m2_param->m2_resid_real[idx++][ps][pb] = ixheaacd_mps_mult32_shr_15(
  206|    835|            h11_f[pb], ixheaacd_mps_mult32_shr_15(h11_c[pb], h12_res_fs[pb]));
  207|    835|        m2_param->m2_resid_real[idx++][ps][pb] =
  208|    835|            ixheaacd_mps_mult32_shr_15(h11_f[pb], h12_res_c[pb]);
  209|    835|        m2_param->m2_resid_real[idx++][ps][pb] = h12_res_f[pb];
  210|    835|      }
  211|       |
  212|  9.55k|      m2_param->m2_resid_real[idx++][ps][pb] = ixheaacd_mps_mult32_shr_15(
  213|  9.55k|          h21_f[pb], ixheaacd_mps_mult32_shr_15(h11_c[pb], h11_fs[pb]));
  214|       |
  215|  9.55k|      if (residual_coding) {
  ------------------
  |  Branch (215:11): [True: 835, False: 8.71k]
  ------------------
  216|    835|        m2_param->m2_resid_real[idx++][ps][pb] = ixheaacd_mps_mult32_shr_15(
  217|    835|            h21_f[pb], ixheaacd_mps_mult32_shr_15(h11_c[pb], h12_res_fs[pb]));
  218|    835|        m2_param->m2_resid_real[idx++][ps][pb] =
  219|    835|            ixheaacd_mps_mult32_shr_15(h21_f[pb], h12_res_c[pb]);
  220|    835|        m2_param->m2_resid_real[idx++][ps][pb] = h22_res_f[pb];
  221|    835|      }
  222|       |
  223|  9.55k|      m2_param->m2_resid_real[idx++][ps][pb] = ixheaacd_mps_mult32_shr_15(
  224|  9.55k|          c_l_clfe[pb], ixheaacd_mps_mult32_shr_15(h21_c[pb], h11_fs[pb]));
  225|       |
  226|  9.55k|      if (residual_coding) {
  ------------------
  |  Branch (226:11): [True: 835, False: 8.71k]
  ------------------
  227|    835|        m2_param->m2_resid_real[idx++][ps][pb] = ixheaacd_mps_mult32_shr_15(
  228|    835|            c_l_clfe[pb], ixheaacd_mps_mult32_shr_15(h21_c[pb], h12_res_fs[pb]));
  229|    835|        m2_param->m2_resid_real[idx++][ps][pb] =
  230|    835|            ixheaacd_mps_mult32_shr_15(c_l_clfe[pb], h22_res_c[pb]);
  231|    835|      }
  232|       |
  233|  9.55k|      m2_param->m2_resid_real[idx++][ps][pb] = ixheaacd_mps_mult32_shr_15(
  234|  9.55k|          c_r_clfe[pb], ixheaacd_mps_mult32_shr_15(c_r_c[pb], c_l_fs[pb]));
  235|       |
  236|  9.55k|      m2_param->m2_resid_real[idx++][ps][pb] = ixheaacd_mps_mult32_shr_15(h11_s[pb], h21_fs[pb]);
  237|       |
  238|  9.55k|      if (residual_coding) {
  ------------------
  |  Branch (238:11): [True: 835, False: 8.71k]
  ------------------
  239|    835|        m2_param->m2_resid_real[idx++][ps][pb] =
  240|    835|            ixheaacd_mps_mult32_shr_15(h11_s[pb], h22_res_fs[pb]);
  241|    835|        m2_param->m2_resid_real[idx++][ps][pb] = h12_res_s[pb];
  242|    835|      }
  243|       |
  244|  9.55k|      m2_param->m2_resid_real[idx++][ps][pb] = ixheaacd_mps_mult32_shr_15(h21_s[pb], h21_fs[pb]);
  245|       |
  246|  9.55k|      if (residual_coding) {
  ------------------
  |  Branch (246:11): [True: 835, False: 8.71k]
  ------------------
  247|    835|        m2_param->m2_resid_real[idx++][ps][pb] =
  248|    835|            ixheaacd_mps_mult32_shr_15(h21_s[pb], h22_res_fs[pb]);
  249|    835|        m2_param->m2_resid_real[idx++][ps][pb] = h22_res_s[pb];
  250|    835|      }
  251|  9.55k|    }
  252|    765|  }
  253|       |
  254|    273|  if (arbitrary_downmix > 0) {
  ------------------
  |  Branch (254:7): [True: 196, False: 77]
  ------------------
  255|    757|    for (ps = 0; ps < num_parameter_sets; ps++) {
  ------------------
  |  Branch (255:18): [True: 561, False: 196]
  ------------------
  256|  8.64k|      for (pb = 0; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (256:20): [True: 8.08k, False: 561]
  ------------------
  257|  8.08k|        WORD32 g_real[1];
  258|  8.08k|        ixheaacd_calculate_arb_dmx_mtx(pstr_mps_state, ps, pb, g_real);
  259|       |
  260|  8.08k|        if (arbitrary_downmix == 2) {
  ------------------
  |  Branch (260:13): [True: 2.80k, False: 5.27k]
  ------------------
  261|  2.80k|          m1_param->m1_param_real[0][1][ps][pb] = m1_param->m1_param_real[0][0][ps][pb];
  262|  2.80k|          m1_param->m1_param_real[1][1][ps][pb] = m1_param->m1_param_real[1][0][ps][pb];
  263|  2.80k|          m1_param->m1_param_real[2][1][ps][pb] = m1_param->m1_param_real[2][0][ps][pb];
  264|  2.80k|          m1_param->m1_param_real[3][1][ps][pb] = m1_param->m1_param_real[3][0][ps][pb];
  265|  2.80k|          m1_param->m1_param_real[4][1][ps][pb] = m1_param->m1_param_real[4][0][ps][pb];
  266|       |
  267|  2.80k|          curr_state->m1_param_present[0][1] = 1;
  268|  2.80k|          curr_state->m1_param_present[1][1] = 1;
  269|  2.80k|          curr_state->m1_param_present[2][1] = 1;
  270|  2.80k|          curr_state->m1_param_present[3][1] = 1;
  271|  2.80k|          curr_state->m1_param_present[4][1] = 1;
  272|  2.80k|        }
  273|       |
  274|  8.08k|        m1_param->m1_param_real[0][0][ps][pb] =
  275|  8.08k|            ixheaacd_mps_mult32_shr_15(m1_param->m1_param_real[0][0][ps][pb], g_real[0]);
  276|  8.08k|        m1_param->m1_param_real[1][0][ps][pb] =
  277|  8.08k|            ixheaacd_mps_mult32_shr_15(m1_param->m1_param_real[1][0][ps][pb], g_real[0]);
  278|  8.08k|        m1_param->m1_param_real[2][0][ps][pb] =
  279|  8.08k|            ixheaacd_mps_mult32_shr_15(m1_param->m1_param_real[2][0][ps][pb], g_real[0]);
  280|  8.08k|        m1_param->m1_param_real[3][0][ps][pb] =
  281|  8.08k|            ixheaacd_mps_mult32_shr_15(m1_param->m1_param_real[3][0][ps][pb], g_real[0]);
  282|  8.08k|        m1_param->m1_param_real[4][0][ps][pb] =
  283|  8.08k|            ixheaacd_mps_mult32_shr_15(m1_param->m1_param_real[4][0][ps][pb], g_real[0]);
  284|  8.08k|      }
  285|    561|    }
  286|    196|  }
  287|    273|  return;
  288|    273|}
ixheaacd_calc_m1m2_5152:
  290|    357|VOID ixheaacd_calc_m1m2_5152(ia_heaac_mps_state_struct *pstr_mps_state) {
  291|    357|  ia_mps_dec_auxilary_struct *p_aux_struct = pstr_mps_state->aux_struct;
  292|    357|  ia_mps_dec_m2_param_struct *m2_param = p_aux_struct->m2_param;
  293|    357|  ia_mps_dec_m1_param_struct *m1_param = pstr_mps_state->array_struct->m1_param;
  294|    357|  ia_heaac_mps_state_struct *curr_state = pstr_mps_state;
  295|    357|  WORD32 ps, pb;
  296|       |
  297|    357|  WORD32 *h11_lr, *h11_c, *h12_lr, *h12_c, *h21_lr, *h21_c, *h22_lr, *h22_c, *h12_res_lr,
  298|    357|      *h12_res_c, *h22_res_lr, *h22_res_c;
  299|    357|  WORD16 *c_l_lr, *c_l_c, *c_r_lr, *c_r_c;
  300|       |
  301|    357|  WORD32 *h11_l, *h11_r, *h12_l, *h12_r, *h21_l, *h21_r, *h22_l, *h22_r, *h12_res_l, *h12_res_r,
  302|    357|      *h22_res_l, *h22_res_r, *c_l_clfe, *c_r_clfe;
  303|    357|  WORD16 *c_l_l, *c_l_r, *c_r_l, *c_r_r;
  304|       |
  305|    357|  WORD32 idx;
  306|    357|  WORD32 num_parameter_sets = pstr_mps_state->num_parameter_sets;
  307|    357|  WORD32 residual_coding = pstr_mps_state->residual_coding;
  308|    357|  WORD32 num_parameter_bands = pstr_mps_state->num_parameter_bands;
  309|    357|  WORD32 arbitrary_downmix = pstr_mps_state->arbitrary_downmix;
  310|    357|  WORD32 *res_bands = pstr_mps_state->res_bands;
  311|       |
  312|    357|  h11_lr = pstr_mps_state->mps_scratch_mem_v;
  313|    357|  h11_c =
  314|    357|      h11_lr + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h11_c), BYTE_ALIGN_8);
  ------------------
  |  |   89|    357|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  315|    357|  h12_lr =
  316|    357|      h11_c + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h12_lr), BYTE_ALIGN_8);
  ------------------
  |  |   89|    357|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  317|    357|  h12_c =
  318|    357|      h12_lr + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h12_c), BYTE_ALIGN_8);
  ------------------
  |  |   89|    357|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  319|    357|  h21_lr =
  320|    357|      h12_c + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h21_lr), BYTE_ALIGN_8);
  ------------------
  |  |   89|    357|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  321|    357|  h21_c =
  322|    357|      h21_lr + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h21_c), BYTE_ALIGN_8);
  ------------------
  |  |   89|    357|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  323|    357|  h22_lr =
  324|    357|      h21_c + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h22_lr), BYTE_ALIGN_8);
  ------------------
  |  |   89|    357|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  325|    357|  h22_c =
  326|    357|      h22_lr + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h22_c), BYTE_ALIGN_8);
  ------------------
  |  |   89|    357|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  327|    357|  h12_res_lr = h22_c + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h12_res_lr),
  ------------------
  |  |   89|    357|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  328|    357|                                                     BYTE_ALIGN_8);
  329|    357|  h12_res_c = h12_res_lr + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h12_res_c),
  ------------------
  |  |   89|    357|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  330|    357|                                                         BYTE_ALIGN_8);
  331|    357|  h22_res_lr = h12_res_c + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h22_res_lr),
  ------------------
  |  |   89|    357|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  332|    357|                                                         BYTE_ALIGN_8);
  333|    357|  h22_res_c = h22_res_lr + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h22_res_c),
  ------------------
  |  |   89|    357|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  334|    357|                                                         BYTE_ALIGN_8);
  335|    357|  h11_l = h22_res_c +
  336|    357|          IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h11_l), BYTE_ALIGN_8);
  ------------------
  |  |   89|    357|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  337|    357|  h11_r =
  338|    357|      h11_l + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h11_r), BYTE_ALIGN_8);
  ------------------
  |  |   89|    357|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  339|    357|  h12_l =
  340|    357|      h11_r + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h12_l), BYTE_ALIGN_8);
  ------------------
  |  |   89|    357|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  341|    357|  h12_r =
  342|    357|      h12_l + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h12_r), BYTE_ALIGN_8);
  ------------------
  |  |   89|    357|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  343|    357|  h21_l =
  344|    357|      h12_r + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h21_l), BYTE_ALIGN_8);
  ------------------
  |  |   89|    357|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  345|    357|  h21_r =
  346|    357|      h21_l + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h21_r), BYTE_ALIGN_8);
  ------------------
  |  |   89|    357|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  347|    357|  h22_l =
  348|    357|      h21_r + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h22_l), BYTE_ALIGN_8);
  ------------------
  |  |   89|    357|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  349|    357|  h22_r =
  350|    357|      h22_l + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h22_r), BYTE_ALIGN_8);
  ------------------
  |  |   89|    357|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  351|    357|  h12_res_l = h22_r + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h12_res_l),
  ------------------
  |  |   89|    357|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  352|    357|                                                    BYTE_ALIGN_8);
  353|    357|  h12_res_r = h12_res_l + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h12_res_r),
  ------------------
  |  |   89|    357|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  354|    357|                                                        BYTE_ALIGN_8);
  355|    357|  h22_res_l = h12_res_r + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h22_res_l),
  ------------------
  |  |   89|    357|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  356|    357|                                                        BYTE_ALIGN_8);
  357|    357|  h22_res_r = h22_res_l + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h22_res_r),
  ------------------
  |  |   89|    357|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  358|    357|                                                        BYTE_ALIGN_8);
  359|    357|  c_r_clfe = h22_res_r +
  360|    357|             IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*c_r_clfe), BYTE_ALIGN_8);
  ------------------
  |  |   89|    357|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  361|    357|  c_l_clfe = c_r_clfe +
  362|    357|             IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*c_l_clfe), BYTE_ALIGN_8);
  ------------------
  |  |   89|    357|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  363|       |
  364|    357|  c_l_lr = (WORD16 *)pstr_mps_state->mps_scratch_mem_v +
  365|    357|           IXHEAAC_GET_SIZE_ALIGNED_TYPE(PARAMETER_BANDSX52, sizeof(*c_l_lr), BYTE_ALIGN_8);
  ------------------
  |  |   89|    357|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  366|    357|  c_l_c =
  367|    357|      c_l_lr + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*c_l_c), BYTE_ALIGN_8);
  ------------------
  |  |   89|    357|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  368|    357|  c_r_lr =
  369|    357|      c_l_c + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*c_r_lr), BYTE_ALIGN_8);
  ------------------
  |  |   89|    357|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  370|    357|  c_r_c =
  371|    357|      c_r_lr + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*c_r_c), BYTE_ALIGN_8);
  ------------------
  |  |   89|    357|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  372|    357|  c_l_l =
  373|    357|      c_r_c + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*c_l_l), BYTE_ALIGN_8);
  ------------------
  |  |   89|    357|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  374|    357|  c_l_r =
  375|    357|      c_l_l + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*c_l_r), BYTE_ALIGN_8);
  ------------------
  |  |   89|    357|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  376|    357|  c_r_l =
  377|    357|      c_l_r + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*c_r_l), BYTE_ALIGN_8);
  ------------------
  |  |   89|    357|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  378|    357|  c_r_r =
  379|    357|      c_r_l + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*c_r_r), BYTE_ALIGN_8);
  ------------------
  |  |   89|    357|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  380|       |
  381|  1.84k|  for (ps = 0; ps < num_parameter_sets; ps++) {
  ------------------
  |  Branch (381:16): [True: 1.48k, False: 357]
  ------------------
  382|  1.48k|    ixheaacd_param_2_umx_ps(pstr_mps_state, h11_c, h12_c, h21_c, h22_c, h12_res_c, h22_res_c,
  383|  1.48k|                            c_l_c, c_r_c, 0, ps, res_bands[0]);
  384|  1.48k|    ixheaacd_param_2_umx_ps(pstr_mps_state, h11_lr, h12_lr, h21_lr, h22_lr, h12_res_lr,
  385|  1.48k|                            h22_res_lr, c_l_lr, c_r_lr, 1, ps, res_bands[1]);
  386|  1.48k|    ixheaacd_param_2_umx_ps(pstr_mps_state, h11_l, h12_l, h21_l, h22_l, h12_res_l, h22_res_l,
  387|  1.48k|                            c_l_l, c_r_l, 3, ps, res_bands[3]);
  388|  1.48k|    ixheaacd_param_2_umx_ps(pstr_mps_state, h11_r, h12_r, h21_r, h22_r, h12_res_r, h22_res_r,
  389|  1.48k|                            c_l_r, c_r_r, 4, ps, res_bands[4]);
  390|       |
  391|  8.99k|    for (pb = 0; pb < p_aux_struct->num_ott_bands[2]; pb++) {
  ------------------
  |  Branch (391:18): [True: 7.51k, False: 1.48k]
  ------------------
  392|  7.51k|      ia_mps_dec_spatial_bs_frame_struct *p_cur_bs = pstr_mps_state->bs_frame;
  393|  7.51k|      c_l_clfe[pb] = pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr
  394|  7.51k|                         ->r1_matrix_l[p_cur_bs->ott_cld_idx[2][ps][pb] + 15];
  395|  7.51k|      c_r_clfe[pb] = pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr
  396|  7.51k|                         ->r1_matrix_l[15 - p_cur_bs->ott_cld_idx[2][ps][pb]];
  397|  7.51k|    }
  398|       |
  399|  10.3k|    for (pb = p_aux_struct->num_ott_bands[2]; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (399:47): [True: 8.89k, False: 1.48k]
  ------------------
  400|  8.89k|      c_l_clfe[pb] = ONE_IN_Q15;
  ------------------
  |  |   41|  8.89k|#define ONE_IN_Q15 (32768)
  ------------------
  401|  8.89k|      c_r_clfe[pb] = 0;
  402|  8.89k|    }
  403|       |
  404|  17.1k|    for (pb = 0; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (404:18): [True: 15.6k, False: 1.48k]
  ------------------
  405|  15.6k|      m1_param->m1_param_real[0][0][ps][pb] = ONE_IN_Q15;
  ------------------
  |  |   41|  15.6k|#define ONE_IN_Q15 (32768)
  ------------------
  406|  15.6k|      m1_param->m1_param_real[1][0][ps][pb] = ONE_IN_Q15;
  ------------------
  |  |   41|  15.6k|#define ONE_IN_Q15 (32768)
  ------------------
  407|  15.6k|      m1_param->m1_param_real[2][0][ps][pb] = c_l_c[pb];
  408|  15.6k|      m1_param->m1_param_real[3][0][ps][pb] = ixheaac_mult16_shl(c_l_c[pb], c_l_lr[pb]);
  409|  15.6k|      m1_param->m1_param_real[4][0][ps][pb] = ixheaac_mult16_shl(c_l_c[pb], c_r_lr[pb]);
  410|  15.6k|    }
  411|       |
  412|  17.1k|    for (pb = 0; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (412:18): [True: 15.6k, False: 1.48k]
  ------------------
  413|  15.6k|      m2_param->m2_decor_real[0][ps][pb] = ixheaacd_mps_mult32_shr_15(
  414|  15.6k|          h11_l[pb], ixheaacd_mps_mult32_shr_15(h11_lr[pb], h12_c[pb]));
  415|  15.6k|      m2_param->m2_decor_real[1][ps][pb] = ixheaacd_mps_mult32_shr_15(h11_l[pb], h12_lr[pb]);
  416|  15.6k|      m2_param->m2_decor_real[2][ps][pb] = h12_l[pb];
  417|       |
  418|  15.6k|      m2_param->m2_decor_real[3][ps][pb] = ixheaacd_mps_mult32_shr_15(
  419|  15.6k|          h21_l[pb], ixheaacd_mps_mult32_shr_15(h11_lr[pb], h12_c[pb]));
  420|  15.6k|      m2_param->m2_decor_real[4][ps][pb] = ixheaacd_mps_mult32_shr_15(h21_l[pb], h12_lr[pb]);
  421|  15.6k|      m2_param->m2_decor_real[5][ps][pb] = h22_l[pb];
  422|       |
  423|  15.6k|      m2_param->m2_decor_real[6][ps][pb] = ixheaacd_mps_mult32_shr_15(
  424|  15.6k|          h11_r[pb], ixheaacd_mps_mult32_shr_15(h21_lr[pb], h12_c[pb]));
  425|  15.6k|      m2_param->m2_decor_real[7][ps][pb] = ixheaacd_mps_mult32_shr_15(h11_r[pb], h22_lr[pb]);
  426|  15.6k|      m2_param->m2_decor_real[8][ps][pb] = h12_r[pb];
  427|       |
  428|  15.6k|      m2_param->m2_decor_real[9][ps][pb] = ixheaacd_mps_mult32_shr_15(
  429|  15.6k|          h21_r[pb], ixheaacd_mps_mult32_shr_15(h21_lr[pb], h12_c[pb]));
  430|  15.6k|      m2_param->m2_decor_real[10][ps][pb] = ixheaacd_mps_mult32_shr_15(h21_r[pb], h22_lr[pb]);
  431|  15.6k|      m2_param->m2_decor_real[11][ps][pb] = h22_r[pb];
  432|       |
  433|  15.6k|      m2_param->m2_decor_real[12][ps][pb] = ixheaacd_mps_mult32_shr_15(c_l_clfe[pb], h22_c[pb]);
  434|  15.6k|    }
  435|       |
  436|  17.1k|    for (pb = 0; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (436:18): [True: 15.6k, False: 1.48k]
  ------------------
  437|  15.6k|      idx = 0;
  438|       |
  439|  15.6k|      m2_param->m2_resid_real[idx++][ps][pb] = ixheaacd_mps_mult32_shr_15(
  440|  15.6k|          h11_l[pb], ixheaacd_mps_mult32_shr_15(h11_lr[pb], h11_c[pb]));
  441|       |
  442|  15.6k|      if (residual_coding) {
  ------------------
  |  Branch (442:11): [True: 443, False: 15.2k]
  ------------------
  443|    443|        m2_param->m2_resid_real[idx++][ps][pb] = ixheaacd_mps_mult32_shr_15(
  444|    443|            h11_l[pb], ixheaacd_mps_mult32_shr_15(h11_lr[pb], h12_res_c[pb]));
  445|    443|        m2_param->m2_resid_real[idx++][ps][pb] =
  446|    443|            ixheaacd_mps_mult32_shr_15(h11_l[pb], h12_res_lr[pb]);
  447|    443|        m2_param->m2_resid_real[idx++][ps][pb] = h12_res_l[pb];
  448|    443|      }
  449|       |
  450|  15.6k|      m2_param->m2_resid_real[idx++][ps][pb] = ixheaacd_mps_mult32_shr_15(
  451|  15.6k|          h21_l[pb], ixheaacd_mps_mult32_shr_15(h11_lr[pb], h11_c[pb]));
  452|       |
  453|  15.6k|      if (residual_coding) {
  ------------------
  |  Branch (453:11): [True: 443, False: 15.2k]
  ------------------
  454|    443|        m2_param->m2_resid_real[idx++][ps][pb] = ixheaacd_mps_mult32_shr_15(
  455|    443|            h21_l[pb], ixheaacd_mps_mult32_shr_15(h11_lr[pb], h12_res_c[pb]));
  456|    443|        m2_param->m2_resid_real[idx++][ps][pb] =
  457|    443|            ixheaacd_mps_mult32_shr_15(h21_l[pb], h12_res_lr[pb]);
  458|    443|        m2_param->m2_resid_real[idx++][ps][pb] = h22_res_l[pb];
  459|    443|      }
  460|       |
  461|  15.6k|      m2_param->m2_resid_real[idx++][ps][pb] = ixheaacd_mps_mult32_shr_15(
  462|  15.6k|          h11_r[pb], ixheaacd_mps_mult32_shr_15(h21_lr[pb], h11_c[pb]));
  463|       |
  464|  15.6k|      if (residual_coding) {
  ------------------
  |  Branch (464:11): [True: 443, False: 15.2k]
  ------------------
  465|    443|        m2_param->m2_resid_real[idx++][ps][pb] = ixheaacd_mps_mult32_shr_15(
  466|    443|            h11_r[pb], ixheaacd_mps_mult32_shr_15(h21_lr[pb], h12_res_c[pb]));
  467|    443|        m2_param->m2_resid_real[idx++][ps][pb] =
  468|    443|            ixheaacd_mps_mult32_shr_15(h11_r[pb], h22_res_lr[pb]);
  469|    443|        m2_param->m2_resid_real[idx++][ps][pb] = h12_res_r[pb];
  470|    443|      }
  471|       |
  472|  15.6k|      m2_param->m2_resid_real[idx++][ps][pb] = ixheaacd_mps_mult32_shr_15(
  473|  15.6k|          h21_r[pb], ixheaacd_mps_mult32_shr_15(h21_lr[pb], h11_c[pb]));
  474|       |
  475|  15.6k|      if (residual_coding) {
  ------------------
  |  Branch (475:11): [True: 443, False: 15.2k]
  ------------------
  476|    443|        m2_param->m2_resid_real[idx++][ps][pb] = ixheaacd_mps_mult32_shr_15(
  477|    443|            h21_r[pb], ixheaacd_mps_mult32_shr_15(h21_lr[pb], h12_res_c[pb]));
  478|    443|        m2_param->m2_resid_real[idx++][ps][pb] =
  479|    443|            ixheaacd_mps_mult32_shr_15(h21_r[pb], h22_res_lr[pb]);
  480|    443|        m2_param->m2_resid_real[idx++][ps][pb] = h22_res_r[pb];
  481|    443|      }
  482|       |
  483|  15.6k|      m2_param->m2_resid_real[idx++][ps][pb] =
  484|  15.6k|          ixheaacd_mps_mult32_shr_15(c_l_clfe[pb], h21_c[pb]);
  485|       |
  486|  15.6k|      if (residual_coding)
  ------------------
  |  Branch (486:11): [True: 443, False: 15.2k]
  ------------------
  487|    443|        m2_param->m2_resid_real[idx++][ps][pb] =
  488|    443|            ixheaacd_mps_mult32_shr_15(c_l_clfe[pb], h22_res_c[pb]);
  489|       |
  490|  15.6k|      m2_param->m2_resid_real[idx++][ps][pb] =
  491|  15.6k|          ixheaacd_mps_mult32_shr_15(c_r_c[pb], c_r_clfe[pb]);
  492|  15.6k|    }
  493|  1.48k|  }
  494|       |
  495|    357|  if (arbitrary_downmix > 0) {
  ------------------
  |  Branch (495:7): [True: 293, False: 64]
  ------------------
  496|  1.61k|    for (ps = 0; ps < num_parameter_sets; ps++) {
  ------------------
  |  Branch (496:18): [True: 1.32k, False: 293]
  ------------------
  497|  14.4k|      for (pb = 0; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (497:20): [True: 13.1k, False: 1.32k]
  ------------------
  498|  13.1k|        WORD32 g_real[1];
  499|  13.1k|        ixheaacd_calculate_arb_dmx_mtx(pstr_mps_state, ps, pb, g_real);
  500|       |
  501|  13.1k|        if (arbitrary_downmix == 2) {
  ------------------
  |  Branch (501:13): [True: 326, False: 12.8k]
  ------------------
  502|    326|          m1_param->m1_param_real[0][1][ps][pb] = m1_param->m1_param_real[0][0][ps][pb];
  503|    326|          m1_param->m1_param_real[1][1][ps][pb] = m1_param->m1_param_real[1][0][ps][pb];
  504|    326|          m1_param->m1_param_real[2][1][ps][pb] = m1_param->m1_param_real[2][0][ps][pb];
  505|    326|          m1_param->m1_param_real[3][1][ps][pb] = m1_param->m1_param_real[3][0][ps][pb];
  506|    326|          m1_param->m1_param_real[4][1][ps][pb] = m1_param->m1_param_real[4][0][ps][pb];
  507|       |
  508|    326|          curr_state->m1_param_present[0][1] = 1;
  509|    326|          curr_state->m1_param_present[1][1] = 1;
  510|    326|          curr_state->m1_param_present[2][1] = 1;
  511|    326|          curr_state->m1_param_present[3][1] = 1;
  512|    326|          curr_state->m1_param_present[4][1] = 1;
  513|    326|        }
  514|       |
  515|  13.1k|        m1_param->m1_param_real[0][0][ps][pb] =
  516|  13.1k|            ixheaacd_mps_mult32_shr_15(m1_param->m1_param_real[0][0][ps][pb], g_real[0]);
  517|  13.1k|        m1_param->m1_param_real[1][0][ps][pb] =
  518|  13.1k|            ixheaacd_mps_mult32_shr_15(m1_param->m1_param_real[1][0][ps][pb], g_real[0]);
  519|  13.1k|        m1_param->m1_param_real[2][0][ps][pb] =
  520|  13.1k|            ixheaacd_mps_mult32_shr_15(m1_param->m1_param_real[2][0][ps][pb], g_real[0]);
  521|  13.1k|        m1_param->m1_param_real[3][0][ps][pb] =
  522|  13.1k|            ixheaacd_mps_mult32_shr_15(m1_param->m1_param_real[3][0][ps][pb], g_real[0]);
  523|  13.1k|        m1_param->m1_param_real[4][0][ps][pb] =
  524|  13.1k|            ixheaacd_mps_mult32_shr_15(m1_param->m1_param_real[4][0][ps][pb], g_real[0]);
  525|  13.1k|      }
  526|  1.32k|    }
  527|    293|  }
  528|    357|  return;
  529|    357|}

ixheaacd_calc_m1m2_5251:
  270|    909|VOID ixheaacd_calc_m1m2_5251(ia_heaac_mps_state_struct *pstr_mps_state) {
  271|    909|  ia_mps_dec_auxilary_struct *p_aux_struct = pstr_mps_state->aux_struct;
  272|    909|  ia_mps_dec_m2_param_struct *m2_param = p_aux_struct->m2_param;
  273|    909|  ia_mps_dec_m1_param_struct *m1_param = pstr_mps_state->array_struct->m1_param;
  274|    909|  WORD32 ch, ps, pb, col, row, i;
  275|       |
  276|    909|  WORD32 temp_1;
  277|    909|  WORD32 *h11_l, *h11_r, *h12_l, *h12_r, *h21_l, *h21_r, *h22_l, *h22_r, *h12_res_l, *h12_res_r,
  278|    909|      *h22_res_l, *h22_res_r;
  279|    909|  WORD32 *c_l_clfe, *c_r_clfe, *kappa, *g_dd;
  280|    909|  WORD16 *c_f_l, *c_f_r, *dummy1, *dummy2;
  281|       |
  282|    909|  WORD32 idx, index2 = 0, index3 = 0;
  283|    909|  WORD32 mode_0 = p_aux_struct->ttt_config[0][0].mode;
  284|    909|  WORD32 mode_1 = p_aux_struct->ttt_config[1][0].mode;
  285|    909|  WORD32 enable_additionals = ((mode_0 == 0) || (mode_1 == 0));
  ------------------
  |  Branch (285:32): [True: 393, False: 516]
  |  Branch (285:49): [True: 146, False: 370]
  ------------------
  286|       |
  287|    909|  WORD32 num_decor_signals = pstr_mps_state->num_decor_signals;
  288|    909|  WORD32 residual_coding = pstr_mps_state->residual_coding;
  289|    909|  WORD32 num_parameter_sets = pstr_mps_state->num_parameter_sets;
  290|    909|  WORD32 num_parameter_bands = pstr_mps_state->num_parameter_bands;
  291|    909|  WORD32 m1_param_imag_present = pstr_mps_state->m1_param_imag_present;
  292|    909|  WORD32 num_x_channels = pstr_mps_state->num_x_channels;
  293|    909|  WORD32 arbitrary_downmix = pstr_mps_state->arbitrary_downmix;
  294|    909|  WORD32 arbdmx_residual_bands = pstr_mps_state->arbdmx_residual_bands;
  295|    909|  WORD32 in_ch = pstr_mps_state->num_input_channels;
  296|    909|  WORD32 res_bands = pstr_mps_state->res_bands[3];
  297|       |
  298|    909|  WORD32 decorr_present;
  299|    909|  WORD32 pos[3];
  300|    909|  WORD64 acc;
  301|       |
  302|    909|  h11_l = pstr_mps_state->mps_scratch_mem_v;
  303|    909|  h11_r =
  304|    909|      h11_l + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h11_r), BYTE_ALIGN_8);
  ------------------
  |  |   89|    909|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  305|    909|  h12_l =
  306|    909|      h11_r + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h12_l), BYTE_ALIGN_8);
  ------------------
  |  |   89|    909|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  307|    909|  h12_r =
  308|    909|      h12_l + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h12_r), BYTE_ALIGN_8);
  ------------------
  |  |   89|    909|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  309|    909|  h21_l =
  310|    909|      h12_r + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h21_l), BYTE_ALIGN_8);
  ------------------
  |  |   89|    909|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  311|    909|  h21_r =
  312|    909|      h21_l + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h21_r), BYTE_ALIGN_8);
  ------------------
  |  |   89|    909|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  313|    909|  h22_l =
  314|    909|      h21_r + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h22_l), BYTE_ALIGN_8);
  ------------------
  |  |   89|    909|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  315|    909|  h22_r =
  316|    909|      h22_l + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h22_r), BYTE_ALIGN_8);
  ------------------
  |  |   89|    909|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  317|    909|  h12_res_l = h22_r + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h12_res_l),
  ------------------
  |  |   89|    909|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  318|    909|                                                    BYTE_ALIGN_8);
  319|    909|  h12_res_r = h12_res_l + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h12_res_r),
  ------------------
  |  |   89|    909|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  320|    909|                                                        BYTE_ALIGN_8);
  321|    909|  h22_res_l = h12_res_r + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h22_res_l),
  ------------------
  |  |   89|    909|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  322|    909|                                                        BYTE_ALIGN_8);
  323|    909|  h22_res_r = h22_res_l + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h22_res_r),
  ------------------
  |  |   89|    909|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  324|    909|                                                        BYTE_ALIGN_8);
  325|    909|  c_l_clfe = h22_res_r +
  326|    909|             IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*c_l_clfe), BYTE_ALIGN_8);
  ------------------
  |  |   89|    909|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  327|    909|  c_r_clfe = c_l_clfe +
  328|    909|             IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*c_r_clfe), BYTE_ALIGN_8);
  ------------------
  |  |   89|    909|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  329|    909|  kappa =
  330|    909|      c_r_clfe + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*kappa), BYTE_ALIGN_8);
  ------------------
  |  |   89|    909|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  331|    909|  g_dd = kappa + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*g_dd), BYTE_ALIGN_8);
  ------------------
  |  |   89|    909|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  332|       |
  333|    909|  c_f_l = (WORD16 *)pstr_mps_state->mps_scratch_mem_v +
  334|    909|          IXHEAAC_GET_SIZE_ALIGNED_TYPE(PARAMETER_BANDSX32, sizeof(*c_f_l), BYTE_ALIGN_8);
  ------------------
  |  |   89|    909|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  335|    909|  c_f_r =
  336|    909|      c_f_l + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*c_f_r), BYTE_ALIGN_8);
  ------------------
  |  |   89|    909|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  337|    909|  dummy1 =
  338|    909|      c_f_r + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*dummy1), BYTE_ALIGN_8);
  ------------------
  |  |   89|    909|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  339|    909|  dummy2 =
  340|    909|      dummy1 + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*dummy2), BYTE_ALIGN_8);
  ------------------
  |  |   89|    909|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  341|       |
  342|    909|  if (enable_additionals) {
  ------------------
  |  Branch (342:7): [True: 539, False: 370]
  ------------------
  343|    539|    if (mode_1 == 0 &&
  ------------------
  |  Branch (343:9): [True: 301, False: 238]
  ------------------
  344|    301|        (p_aux_struct->ttt_config[1][0].start_band >= p_aux_struct->ttt_config[1][0].stop_band))
  ------------------
  |  Branch (344:9): [True: 230, False: 71]
  ------------------
  345|    230|      enable_additionals = 0;
  346|    309|    else if (mode_0 == 0 && (p_aux_struct->ttt_config[0][0].start_band >=
  ------------------
  |  Branch (346:14): [True: 264, False: 45]
  |  Branch (346:29): [True: 96, False: 168]
  ------------------
  347|    264|                             p_aux_struct->ttt_config[0][0].stop_band))
  348|     96|      enable_additionals = 0;
  349|    539|  }
  350|       |
  351|    909|  decorr_present = enable_additionals && num_decor_signals == 3;
  ------------------
  |  Branch (351:20): [True: 213, False: 696]
  |  Branch (351:42): [True: 74, False: 139]
  ------------------
  352|       |
  353|    909|  pstr_mps_state->num_decor_signals = 2;
  354|       |
  355|  3.57k|  for (ps = 0; ps < num_parameter_sets; ps++) {
  ------------------
  |  Branch (355:16): [True: 2.66k, False: 909]
  ------------------
  356|  7.99k|    for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (356:17): [True: 5.32k, False: 2.66k]
  ------------------
  357|  5.32k|      for (pb = p_aux_struct->ttt_config[i][0].start_band;
  358|  52.4k|           pb < p_aux_struct->ttt_config[i][0].stop_band; pb++) {
  ------------------
  |  Branch (358:12): [True: 47.1k, False: 5.32k]
  ------------------
  359|  47.1k|        WORD32 m_ttt[3][3];
  360|  47.1k|        WORD32 m_pre[3][5];
  361|  47.1k|        WORD32 mtx_inversion = pstr_mps_state->mtx_inversion;
  362|       |
  363|  47.1k|        memset(m_pre, 0, sizeof(m_pre));
  364|       |
  365|  47.1k|        if (p_aux_struct->ttt_config[i][0].mode >= 2) {
  ------------------
  |  Branch (365:13): [True: 28.5k, False: 18.6k]
  ------------------
  366|  28.5k|          mtx_inversion = mtx_inversion && (p_aux_struct->ttt_config[i][0].mode == 2 ||
  ------------------
  |  Branch (366:27): [True: 13.7k, False: 14.7k]
  |  Branch (366:45): [True: 7.73k, False: 6.04k]
  ------------------
  367|  6.04k|                                            p_aux_struct->ttt_config[i][0].mode == 4);
  ------------------
  |  Branch (367:45): [True: 1.78k, False: 4.26k]
  ------------------
  368|  28.5k|        }
  369|       |
  370|  47.1k|        ixheaacd_calculate_ttt(pstr_mps_state, ps, pb, p_aux_struct->ttt_config[i][0].mode,
  371|  47.1k|                               m_ttt);
  372|       |
  373|   188k|        for (row = 0; row < 3; row++) {
  ------------------
  |  Branch (373:23): [True: 141k, False: 47.1k]
  ------------------
  374|   566k|          for (col = 0; col < 3; col++) {
  ------------------
  |  Branch (374:25): [True: 424k, False: 141k]
  ------------------
  375|   424k|            m_pre[row][col] = m_ttt[row][col];
  376|   424k|          }
  377|   141k|        }
  378|       |
  379|  47.1k|        if (arbitrary_downmix != 0) {
  ------------------
  |  Branch (379:13): [True: 11.4k, False: 35.6k]
  ------------------
  380|  11.4k|          WORD32 g_real[2];
  381|  11.4k|          ixheaacd_calculate_arb_dmx_mtx(pstr_mps_state, ps, pb, g_real);
  382|       |
  383|  11.4k|          if (arbitrary_downmix == 2 && pb < arbdmx_residual_bands) {
  ------------------
  |  Branch (383:15): [True: 1.15k, False: 10.3k]
  |  Branch (383:41): [True: 460, False: 698]
  ------------------
  384|  1.38k|            for (ch = 0; ch < in_ch; ch++) {
  ------------------
  |  Branch (384:26): [True: 920, False: 460]
  ------------------
  385|  3.68k|              for (row = 0; row < 3; row++) {
  ------------------
  |  Branch (385:29): [True: 2.76k, False: 920]
  ------------------
  386|  2.76k|                m_pre[row][ch] = ixheaacd_mps_mult32_shr_15(m_pre[row][ch], g_real[ch]);
  387|  2.76k|                m_pre[row][3 + ch] = m_ttt[row][ch];
  388|  2.76k|              }
  389|    920|            }
  390|  11.0k|          } else {
  391|  33.0k|            for (ch = 0; ch < in_ch; ch++) {
  ------------------
  |  Branch (391:26): [True: 22.0k, False: 11.0k]
  ------------------
  392|  88.2k|              for (row = 0; row < 3; row++) {
  ------------------
  |  Branch (392:29): [True: 66.1k, False: 22.0k]
  ------------------
  393|  66.1k|                m_pre[row][ch] = ixheaacd_mps_mult32_shr_15(m_pre[row][ch], g_real[ch]);
  394|  66.1k|              }
  395|  22.0k|            }
  396|  11.0k|          }
  397|  11.4k|        }
  398|       |
  399|  47.1k|        if (mtx_inversion) {
  ------------------
  |  Branch (399:13): [True: 13.5k, False: 33.6k]
  ------------------
  400|  13.5k|          WORD32 h_real[2][2], h_imag[2][2];
  401|       |
  402|  13.5k|          ixheaacd_calculate_mtx_inv(pstr_mps_state, ps, pb, p_aux_struct->ttt_config[i][0].mode,
  403|  13.5k|                                     h_real, h_imag);
  404|       |
  405|  13.5k|          acc = (WORD64)((WORD64)m_pre[0][0] * (WORD64)h_real[0][0] +
  406|  13.5k|                         (WORD64)m_pre[0][1] * (WORD64)h_real[1][0]);
  407|  13.5k|          acc >>= 15;
  408|  13.5k|          m1_param->m1_param_real[0][0][ps][pb] = (WORD32)acc;
  409|       |
  410|  13.5k|          acc = (WORD64)((WORD64)m_pre[0][0] * (WORD64)h_real[0][1] +
  411|  13.5k|                         (WORD64)m_pre[0][1] * (WORD64)h_real[1][1]);
  412|  13.5k|          acc >>= 15;
  413|  13.5k|          m1_param->m1_param_real[0][1][ps][pb] = (WORD32)acc;
  414|       |
  415|  13.5k|          acc = (WORD64)((WORD64)m_pre[1][0] * (WORD64)h_real[0][0] +
  416|  13.5k|                         (WORD64)m_pre[1][1] * (WORD64)h_real[1][0]);
  417|  13.5k|          acc >>= 15;
  418|  13.5k|          m1_param->m1_param_real[1][0][ps][pb] = (WORD32)acc;
  419|       |
  420|  13.5k|          acc = (WORD64)((WORD64)m_pre[1][0] * (WORD64)h_real[0][1] +
  421|  13.5k|                         (WORD64)m_pre[1][1] * (WORD64)h_real[1][1]);
  422|  13.5k|          acc >>= 15;
  423|  13.5k|          m1_param->m1_param_real[1][1][ps][pb] = (WORD32)acc;
  424|       |
  425|  13.5k|          acc = (WORD64)((WORD64)m_pre[2][0] * (WORD64)h_real[0][0] +
  426|  13.5k|                         (WORD64)m_pre[2][1] * (WORD64)h_real[1][0]);
  427|  13.5k|          acc >>= 15;
  428|  13.5k|          m1_param->m1_param_real[2][0][ps][pb] = (WORD32)acc;
  429|       |
  430|  13.5k|          acc = (WORD64)((WORD64)m_pre[2][0] * (WORD64)h_real[0][1] +
  431|  13.5k|                         (WORD64)m_pre[2][1] * (WORD64)h_real[1][1]);
  432|  13.5k|          acc >>= 15;
  433|  13.5k|          m1_param->m1_param_real[2][1][ps][pb] = (WORD32)acc;
  434|       |
  435|  13.5k|          acc = (WORD64)((WORD64)m_pre[0][0] * (WORD64)h_imag[0][0] +
  436|  13.5k|                         (WORD64)m_pre[0][1] * (WORD64)h_imag[1][0]);
  437|  13.5k|          acc >>= 15;
  438|  13.5k|          m1_param->m1_param_imag[0][0][ps][pb] = (WORD32)acc;
  439|       |
  440|  13.5k|          acc = (WORD64)((WORD64)m_pre[0][0] * (WORD64)h_imag[0][1] +
  441|  13.5k|                         (WORD64)m_pre[0][1] * (WORD64)h_imag[1][1]);
  442|  13.5k|          acc >>= 15;
  443|  13.5k|          m1_param->m1_param_imag[0][1][ps][pb] = (WORD32)acc;
  444|       |
  445|  13.5k|          acc = (WORD64)((WORD64)m_pre[1][0] * (WORD64)h_imag[0][0] +
  446|  13.5k|                         (WORD64)m_pre[1][1] * (WORD64)h_imag[1][0]);
  447|  13.5k|          acc >>= 15;
  448|  13.5k|          m1_param->m1_param_imag[1][0][ps][pb] = (WORD32)acc;
  449|       |
  450|  13.5k|          acc = (WORD64)((WORD64)m_pre[1][0] * (WORD64)h_imag[0][1] +
  451|  13.5k|                         (WORD64)m_pre[1][1] * (WORD64)h_imag[1][1]);
  452|  13.5k|          acc >>= 15;
  453|  13.5k|          m1_param->m1_param_imag[1][1][ps][pb] = (WORD32)acc;
  454|       |
  455|  13.5k|          acc = (WORD64)((WORD64)m_pre[2][0] * (WORD64)h_imag[0][0] +
  456|  13.5k|                         (WORD64)m_pre[2][1] * (WORD64)h_imag[1][0]);
  457|  13.5k|          acc >>= 15;
  458|  13.5k|          m1_param->m1_param_imag[2][0][ps][pb] = (WORD32)acc;
  459|       |
  460|  13.5k|          acc = (WORD64)((WORD64)m_pre[2][0] * (WORD64)h_imag[0][1] +
  461|  13.5k|                         (WORD64)m_pre[2][1] * (WORD64)h_imag[1][1]);
  462|  13.5k|          acc >>= 15;
  463|  13.5k|          m1_param->m1_param_imag[2][1][ps][pb] = (WORD32)acc;
  464|  33.6k|        } else if (pstr_mps_state->_3d_stereo_inversion) {
  ------------------
  |  Branch (464:20): [True: 0, False: 33.6k]
  ------------------
  465|  33.6k|        } else {
  466|  33.6k|          m1_param->m1_param_real[0][0][ps][pb] = m_pre[0][0];
  467|  33.6k|          m1_param->m1_param_real[0][1][ps][pb] = m_pre[0][1];
  468|  33.6k|          m1_param->m1_param_real[1][0][ps][pb] = m_pre[1][0];
  469|  33.6k|          m1_param->m1_param_real[1][1][ps][pb] = m_pre[1][1];
  470|  33.6k|          m1_param->m1_param_real[2][0][ps][pb] = m_pre[2][0];
  471|  33.6k|          m1_param->m1_param_real[2][1][ps][pb] = m_pre[2][1];
  472|  33.6k|          m1_param->m1_param_imag[0][0][ps][pb] = 0;
  473|  33.6k|          m1_param->m1_param_imag[0][1][ps][pb] = 0;
  474|  33.6k|          m1_param->m1_param_imag[1][0][ps][pb] = 0;
  475|  33.6k|          m1_param->m1_param_imag[1][1][ps][pb] = 0;
  476|  33.6k|          m1_param->m1_param_imag[2][0][ps][pb] = 0;
  477|  33.6k|          m1_param->m1_param_imag[2][1][ps][pb] = 0;
  478|  33.6k|        }
  479|       |
  480|  47.1k|        m1_param->m1_param_real[0][2][ps][pb] = m_pre[0][2];
  481|  47.1k|        m1_param->m1_param_real[0][3][ps][pb] = m_pre[0][3];
  482|  47.1k|        m1_param->m1_param_real[0][4][ps][pb] = m_pre[0][4];
  483|  47.1k|        m1_param->m1_param_real[1][2][ps][pb] = m_pre[1][2];
  484|  47.1k|        m1_param->m1_param_real[1][3][ps][pb] = m_pre[1][3];
  485|  47.1k|        m1_param->m1_param_real[1][4][ps][pb] = m_pre[1][4];
  486|  47.1k|        m1_param->m1_param_real[2][2][ps][pb] = m_pre[2][2];
  487|  47.1k|        m1_param->m1_param_real[2][3][ps][pb] = m_pre[2][3];
  488|  47.1k|        m1_param->m1_param_real[2][4][ps][pb] = m_pre[2][4];
  489|       |
  490|  47.1k|        m1_param->m1_param_imag[0][2][ps][pb] = 0;
  491|  47.1k|        m1_param->m1_param_imag[0][3][ps][pb] = 0;
  492|  47.1k|        m1_param->m1_param_imag[0][4][ps][pb] = 0;
  493|  47.1k|        m1_param->m1_param_imag[1][2][ps][pb] = 0;
  494|  47.1k|        m1_param->m1_param_imag[1][3][ps][pb] = 0;
  495|  47.1k|        m1_param->m1_param_imag[1][4][ps][pb] = 0;
  496|  47.1k|        m1_param->m1_param_imag[2][2][ps][pb] = 0;
  497|  47.1k|        m1_param->m1_param_imag[2][3][ps][pb] = 0;
  498|  47.1k|        m1_param->m1_param_imag[2][4][ps][pb] = 0;
  499|       |
  500|   154k|        for (col = 0; col < num_x_channels; col++) {
  ------------------
  |  Branch (500:23): [True: 107k, False: 47.1k]
  ------------------
  501|   107k|          m1_param->m1_param_real[3][col][ps][pb] = m1_param->m1_param_real[0][col][ps][pb];
  502|   107k|          m1_param->m1_param_real[4][col][ps][pb] = m1_param->m1_param_real[1][col][ps][pb];
  503|       |
  504|   107k|          if (m1_param_imag_present) {
  ------------------
  |  Branch (504:15): [True: 36.8k, False: 70.4k]
  ------------------
  505|  36.8k|            m1_param->m1_param_imag[3][col][ps][pb] = m1_param->m1_param_imag[0][col][ps][pb];
  506|  36.8k|            m1_param->m1_param_imag[4][col][ps][pb] = m1_param->m1_param_imag[1][col][ps][pb];
  507|  36.8k|          }
  508|   107k|          pstr_mps_state->m1_param_present[3][col] = 1;
  509|   107k|          pstr_mps_state->m1_param_present[4][col] = 1;
  510|       |
  511|   107k|          if (p_aux_struct->ttt_config[i][0].use_ttt_decorr) {
  ------------------
  |  Branch (511:15): [True: 26.4k, False: 80.8k]
  ------------------
  512|  26.4k|            m1_param->m1_param_real[5][col][ps][pb] = m1_param->m1_param_real[2][col][ps][pb];
  513|  26.4k|            if (m1_param_imag_present)
  ------------------
  |  Branch (513:17): [True: 6.85k, False: 19.5k]
  ------------------
  514|  6.85k|              m1_param->m1_param_imag[5][col][ps][pb] = m1_param->m1_param_imag[2][col][ps][pb];
  515|       |
  516|  26.4k|            pstr_mps_state->m1_param_present[5][col] = 1;
  517|  26.4k|          }
  518|   107k|        }
  519|  47.1k|      }
  520|  5.32k|    }
  521|  2.66k|  }
  522|       |
  523|  3.57k|  for (ps = 0; ps < num_parameter_sets; ps++) {
  ------------------
  |  Branch (523:16): [True: 2.66k, False: 909]
  ------------------
  524|  2.66k|    ixheaacd_param_2_umx_ps(pstr_mps_state, h11_l, h12_l, h21_l, h22_l, h12_res_l, h22_res_l,
  525|  2.66k|                            c_f_l, dummy1, 1, ps, pstr_mps_state->res_bands[1]);
  526|       |
  527|  2.66k|    ixheaacd_param_2_umx_ps(pstr_mps_state, h11_r, h12_r, h21_r, h22_r, h12_res_r, h22_res_r,
  528|  2.66k|                            c_f_r, dummy2, 2, ps, pstr_mps_state->res_bands[2]);
  529|       |
  530|  29.9k|    for (pb = 0; pb < p_aux_struct->num_ott_bands[0]; pb++) {
  ------------------
  |  Branch (530:18): [True: 27.2k, False: 2.66k]
  ------------------
  531|  27.2k|      WORD32 temp = ixheaacd_quantize((p_aux_struct->ott_cld[0][ps][pb]) >> 15);
  532|       |
  533|  27.2k|      c_l_clfe[pb] = pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr->r1_matrix_l[temp + 15];
  534|  27.2k|      c_r_clfe[pb] = pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr->r1_matrix_l[15 - temp];
  535|  27.2k|    }
  536|       |
  537|  18.7k|    for (pb = p_aux_struct->num_ott_bands[0]; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (537:47): [True: 16.1k, False: 2.66k]
  ------------------
  538|  16.1k|      c_l_clfe[pb] = ONE_IN_Q15;
  ------------------
  |  |   41|  16.1k|#define ONE_IN_Q15 (32768)
  ------------------
  539|  16.1k|      c_r_clfe[pb] = 0;
  540|  16.1k|    }
  541|       |
  542|  39.7k|    for (pb = 0; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (542:18): [True: 37.0k, False: 2.66k]
  ------------------
  543|  37.0k|      idx = 0;
  544|       |
  545|  37.0k|      m2_param->m2_decor_real[idx++][ps][pb] = h12_l[pb];
  546|  37.0k|      if (enable_additionals) {
  ------------------
  |  Branch (546:11): [True: 5.62k, False: 31.4k]
  ------------------
  547|  5.62k|        pos[0] = idx++;
  548|  5.62k|      }
  549|  37.0k|      m2_param->m2_decor_real[idx++][ps][pb] = h22_l[pb];
  550|  37.0k|      m2_param->m2_decor_real[idx++][ps][pb] = h12_r[pb];
  551|  37.0k|      if (enable_additionals) {
  ------------------
  |  Branch (551:11): [True: 5.62k, False: 31.4k]
  ------------------
  552|  5.62k|        pos[1] = idx++;
  553|  5.62k|      }
  554|  37.0k|      m2_param->m2_decor_real[idx++][ps][pb] = h22_r[pb];
  555|  37.0k|      if (enable_additionals) {
  ------------------
  |  Branch (555:11): [True: 5.62k, False: 31.4k]
  ------------------
  556|  5.62k|        pos[2] = idx++;
  557|  5.62k|      }
  558|  37.0k|    }
  559|       |
  560|  39.7k|    for (pb = 0; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (560:18): [True: 37.0k, False: 2.66k]
  ------------------
  561|  37.0k|      idx = 1;
  562|       |
  563|  37.0k|      m2_param->m2_resid_real[0][ps][pb] = h11_l[pb];
  564|       |
  565|  37.0k|      if (residual_coding) m2_param->m2_resid_real[idx++][ps][pb] = h12_res_l[pb];
  ------------------
  |  Branch (565:11): [True: 8.41k, False: 28.6k]
  ------------------
  566|       |
  567|  37.0k|      if (decorr_present) idx++;
  ------------------
  |  Branch (567:11): [True: 3.34k, False: 33.7k]
  ------------------
  568|       |
  569|  37.0k|      m2_param->m2_resid_real[idx++][ps][pb] = h21_l[pb];
  570|       |
  571|  37.0k|      if (residual_coding) m2_param->m2_resid_real[idx++][ps][pb] = h22_res_l[pb];
  ------------------
  |  Branch (571:11): [True: 8.41k, False: 28.6k]
  ------------------
  572|       |
  573|  37.0k|      m2_param->m2_resid_real[idx][ps][pb] = h11_r[pb];
  574|  37.0k|      index2 = idx++;
  575|       |
  576|  37.0k|      if (residual_coding) m2_param->m2_resid_real[idx++][ps][pb] = h12_res_r[pb];
  ------------------
  |  Branch (576:11): [True: 8.41k, False: 28.6k]
  ------------------
  577|       |
  578|  37.0k|      if (decorr_present) idx++;
  ------------------
  |  Branch (578:11): [True: 3.34k, False: 33.7k]
  ------------------
  579|       |
  580|  37.0k|      m2_param->m2_resid_real[idx++][ps][pb] = h21_r[pb];
  581|       |
  582|  37.0k|      if (residual_coding) m2_param->m2_resid_real[idx++][ps][pb] = h22_res_r[pb];
  ------------------
  |  Branch (582:11): [True: 8.41k, False: 28.6k]
  ------------------
  583|       |
  584|  37.0k|      m2_param->m2_resid_real[idx][ps][pb] = c_l_clfe[pb];
  585|  37.0k|      index3 = idx++;
  586|       |
  587|  37.0k|      if (decorr_present) idx++;
  ------------------
  |  Branch (587:11): [True: 3.34k, False: 33.7k]
  ------------------
  588|       |
  589|  37.0k|      m2_param->m2_resid_real[idx++][ps][pb] = c_r_clfe[pb];
  590|  37.0k|    }
  591|       |
  592|  39.7k|    for (pb = 0; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (592:18): [True: 37.0k, False: 2.66k]
  ------------------
  593|  37.0k|      ia_mps_dec_spatial_bs_frame_struct *p_cur_bs = pstr_mps_state->bs_frame;
  594|       |
  595|  37.0k|      kappa[pb] = p_aux_struct->ttt_icc[0][ps][pb];
  596|  37.0k|      g_dd[pb] = pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr
  597|  37.0k|                     ->table_kappa[p_cur_bs->ttt_icc_idx[0][ps][pb]];
  598|  37.0k|    }
  599|       |
  600|  7.99k|    for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (600:17): [True: 5.32k, False: 2.66k]
  ------------------
  601|  5.32k|      if (p_aux_struct->ttt_config[i][0].use_ttt_decorr) {
  ------------------
  |  Branch (601:11): [True: 1.67k, False: 3.65k]
  ------------------
  602|  1.67k|        for (pb = p_aux_struct->ttt_config[i][0].start_band;
  603|  13.6k|             pb < p_aux_struct->ttt_config[i][0].stop_band; pb++) {
  ------------------
  |  Branch (603:14): [True: 11.9k, False: 1.67k]
  ------------------
  604|  11.9k|          if (p_aux_struct->ttt_config[i][0].mode == 0 && pb >= res_bands) {
  ------------------
  |  Branch (604:15): [True: 11.9k, False: 0]
  |  Branch (604:59): [True: 11.6k, False: 279]
  ------------------
  605|  11.6k|            if (p_aux_struct->ttt_config[i][0].use_ttt_decorr && enable_additionals) {
  ------------------
  |  Branch (605:17): [True: 11.6k, False: 0]
  |  Branch (605:66): [True: 6.72k, False: 4.95k]
  ------------------
  606|  6.72k|              WORD32 temp;
  607|  6.72k|              pstr_mps_state->num_decor_signals = 3;
  608|       |
  609|  6.72k|              temp_1 = MINUS_SQRT_2_Q30;
  ------------------
  |  |   47|  6.72k|#define MINUS_SQRT_2_Q30 (-1518500250)
  ------------------
  610|  6.72k|              m2_param->m2_decor_real[pos[0]][ps][pb] =
  611|  6.72k|                  ixheaacd_mps_mult32_shr_15(g_dd[pb], c_f_l[pb]);
  612|  6.72k|              m2_param->m2_decor_real[pos[1]][ps][pb] =
  613|  6.72k|                  ixheaacd_mps_mult32_shr_15(g_dd[pb], c_f_r[pb]);
  614|       |
  615|  6.72k|              temp = ixheaacd_mps_mult32_shr_15(g_dd[pb], c_l_clfe[pb]);
  616|  6.72k|              m2_param->m2_decor_real[pos[2]][ps][pb] = ixheaacd_mps_mult32_shr_30(temp, temp_1);
  617|       |
  618|  6.72k|              pstr_mps_state->m2_param_present[0][5] = 3;
  619|  6.72k|              pstr_mps_state->m2_param_present[2][5] = 3;
  620|  6.72k|              pstr_mps_state->m2_param_present[4][5] = 3;
  621|       |
  622|  6.72k|              m2_param->m2_resid_real[0][ps][pb] =
  623|  6.72k|                  ixheaacd_mps_mult32_shr_15(m2_param->m2_resid_real[0][ps][pb], kappa[pb]);
  624|  6.72k|              m2_param->m2_resid_real[index2][ps][pb] =
  625|  6.72k|                  ixheaacd_mps_mult32_shr_15(m2_param->m2_resid_real[index2][ps][pb], kappa[pb]);
  626|  6.72k|              m2_param->m2_resid_real[index3][ps][pb] =
  627|  6.72k|                  ixheaacd_mps_mult32_shr_15(m2_param->m2_resid_real[index3][ps][pb], kappa[pb]);
  628|       |
  629|  6.72k|              m2_param->m2_resid_real[pos[0]][ps][pb] =
  630|  6.72k|                  ixheaacd_mps_mult32_shr_15(g_dd[pb], c_f_l[pb]);
  631|  6.72k|              m2_param->m2_resid_real[pos[1]][ps][pb] =
  632|  6.72k|                  ixheaacd_mps_mult32_shr_15(g_dd[pb], c_f_r[pb]);
  633|       |
  634|  6.72k|              temp = ixheaacd_mps_mult32_shr_15(g_dd[pb], c_l_clfe[pb]);
  635|  6.72k|              m2_param->m2_resid_real[pos[2]][ps][pb] = ixheaacd_mps_mult32_shr_30(temp, temp_1);
  636|  6.72k|            }
  637|  11.6k|          }
  638|  11.9k|        }
  639|  1.67k|      }
  640|  5.32k|    }
  641|  2.66k|  }
  642|    909|  return;
  643|    909|}

ixheaacd_calc_m1m2_7271:
   45|  1.03k|VOID ixheaacd_calc_m1m2_7271(ia_heaac_mps_state_struct *pstr_mps_state) {
   46|  1.03k|  ia_mps_dec_auxilary_struct *p_aux_struct = pstr_mps_state->aux_struct;
   47|  1.03k|  ia_mps_dec_m2_param_struct *m2_param = p_aux_struct->m2_param;
   48|  1.03k|  ia_mps_dec_m1_param_struct *m1_param = pstr_mps_state->array_struct->m1_param;
   49|  1.03k|  ia_heaac_mps_state_struct *curr_state = pstr_mps_state;
   50|  1.03k|  WORD32 ps, pb, col, row, i;
   51|       |
   52|  1.03k|  WORD32 m_pre[3][5];
   53|  1.03k|  WORD32 m_ttt[3][3];
   54|       |
   55|  1.03k|  WORD32 g_real[2];
   56|       |
   57|  1.03k|  WORD32 temp_1, temp_2;
   58|  1.03k|  WORD64 acc;
   59|       |
   60|  1.03k|  WORD32 *h11_l, *h11_r, *h12_l, *h12_r, *h21_l, *h21_r, *h22_l, *h22_r, *h12_res_l, *h12_res_r,
   61|  1.03k|      *h22_res_l, *h22_res_r;
   62|  1.03k|  WORD32 *c_l_clfe, *c_r_clfe, *kappa, *g_dd;
   63|  1.03k|  WORD16 *c_f_l, *c_f_r, *dummy;
   64|       |
   65|  1.03k|  WORD32 *h11_lc, *h11_rc, *h12_lc, *h12_rc, *h21_lc, *h21_rc, *h22_lc, *h22_rc, *h12_res_lc,
   66|  1.03k|      *h12_res_rc, *h22_res_lc, *h22_res_rc;
   67|  1.03k|  WORD16 *c_f_lc, *c_f_rc;
   68|       |
   69|  1.03k|  WORD32 idx;
   70|  1.03k|  WORD32 residual_coding = pstr_mps_state->residual_coding;
   71|  1.03k|  WORD32 *res_bands = pstr_mps_state->res_bands;
   72|  1.03k|  WORD32 num_parameter_bands = pstr_mps_state->num_parameter_bands;
   73|  1.03k|  WORD32 m1_param_imag_present = pstr_mps_state->m1_param_imag_present;
   74|  1.03k|  WORD32 num_input_channels = pstr_mps_state->num_input_channels;
   75|  1.03k|  WORD32 num_parameter_sets = pstr_mps_state->num_parameter_sets;
   76|  1.03k|  WORD32 arbitrary_downmix = pstr_mps_state->arbitrary_downmix;
   77|  1.03k|  WORD32 mode_0 = p_aux_struct->ttt_config[0][0].mode;
   78|  1.03k|  WORD32 mode_1 = p_aux_struct->ttt_config[1][0].mode;
   79|  1.03k|  WORD32 enable_additionals = ((mode_0 == 0) || (mode_1 == 0));
  ------------------
  |  Branch (79:32): [True: 175, False: 864]
  |  Branch (79:49): [True: 102, False: 762]
  ------------------
   80|  1.03k|  WORD32 pos[5] = {0};
   81|  1.03k|  WORD32 pos_resid[5] = {0};
   82|       |
   83|  1.03k|  h11_l = pstr_mps_state->mps_scratch_mem_v;
   84|  1.03k|  h11_r =
   85|  1.03k|      h11_l + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h11_r), BYTE_ALIGN_8);
  ------------------
  |  |   89|  1.03k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
   86|  1.03k|  h12_l =
   87|  1.03k|      h11_r + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h12_l), BYTE_ALIGN_8);
  ------------------
  |  |   89|  1.03k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
   88|  1.03k|  h12_r =
   89|  1.03k|      h12_l + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h12_r), BYTE_ALIGN_8);
  ------------------
  |  |   89|  1.03k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
   90|  1.03k|  h21_l =
   91|  1.03k|      h12_r + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h21_l), BYTE_ALIGN_8);
  ------------------
  |  |   89|  1.03k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
   92|  1.03k|  h21_r =
   93|  1.03k|      h21_l + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h21_r), BYTE_ALIGN_8);
  ------------------
  |  |   89|  1.03k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
   94|  1.03k|  h22_l =
   95|  1.03k|      h21_r + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h22_l), BYTE_ALIGN_8);
  ------------------
  |  |   89|  1.03k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
   96|  1.03k|  h22_r =
   97|  1.03k|      h22_l + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h22_r), BYTE_ALIGN_8);
  ------------------
  |  |   89|  1.03k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
   98|  1.03k|  h12_res_l = h22_r + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h12_res_l),
  ------------------
  |  |   89|  1.03k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
   99|  1.03k|                                                    BYTE_ALIGN_8);
  100|  1.03k|  h12_res_r = h12_res_l + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h12_res_r),
  ------------------
  |  |   89|  1.03k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  101|  1.03k|                                                        BYTE_ALIGN_8);
  102|  1.03k|  h22_res_l = h12_res_r + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h22_res_l),
  ------------------
  |  |   89|  1.03k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  103|  1.03k|                                                        BYTE_ALIGN_8);
  104|  1.03k|  h22_res_r = h22_res_l + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h22_res_r),
  ------------------
  |  |   89|  1.03k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  105|  1.03k|                                                        BYTE_ALIGN_8);
  106|  1.03k|  c_l_clfe = h22_res_r +
  107|  1.03k|             IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*c_l_clfe), BYTE_ALIGN_8);
  ------------------
  |  |   89|  1.03k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  108|  1.03k|  c_r_clfe = c_l_clfe +
  109|  1.03k|             IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*c_r_clfe), BYTE_ALIGN_8);
  ------------------
  |  |   89|  1.03k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  110|  1.03k|  kappa =
  111|  1.03k|      c_r_clfe + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*kappa), BYTE_ALIGN_8);
  ------------------
  |  |   89|  1.03k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  112|  1.03k|  g_dd = kappa + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*g_dd), BYTE_ALIGN_8);
  ------------------
  |  |   89|  1.03k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  113|       |
  114|  1.03k|  h11_lc =
  115|  1.03k|      g_dd + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h11_lc), BYTE_ALIGN_8);
  ------------------
  |  |   89|  1.03k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  116|  1.03k|  h11_rc =
  117|  1.03k|      h11_lc + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h11_rc), BYTE_ALIGN_8);
  ------------------
  |  |   89|  1.03k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  118|  1.03k|  h12_lc =
  119|  1.03k|      h11_rc + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h12_lc), BYTE_ALIGN_8);
  ------------------
  |  |   89|  1.03k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  120|  1.03k|  h12_rc =
  121|  1.03k|      h12_lc + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h12_rc), BYTE_ALIGN_8);
  ------------------
  |  |   89|  1.03k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  122|  1.03k|  h21_lc =
  123|  1.03k|      h12_rc + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h21_lc), BYTE_ALIGN_8);
  ------------------
  |  |   89|  1.03k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  124|  1.03k|  h21_rc =
  125|  1.03k|      h21_lc + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h21_rc), BYTE_ALIGN_8);
  ------------------
  |  |   89|  1.03k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  126|  1.03k|  h22_lc =
  127|  1.03k|      h21_rc + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h22_lc), BYTE_ALIGN_8);
  ------------------
  |  |   89|  1.03k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  128|  1.03k|  h22_rc =
  129|  1.03k|      h22_lc + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h22_rc), BYTE_ALIGN_8);
  ------------------
  |  |   89|  1.03k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  130|  1.03k|  h12_res_lc = h22_rc + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h12_res_lc),
  ------------------
  |  |   89|  1.03k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  131|  1.03k|                                                      BYTE_ALIGN_8);
  132|  1.03k|  h12_res_rc = h12_res_lc + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS,
  ------------------
  |  |   89|  1.03k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  133|  1.03k|                                                          sizeof(*h12_res_rc), BYTE_ALIGN_8);
  134|  1.03k|  h22_res_lc = h12_res_rc + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS,
  ------------------
  |  |   89|  1.03k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  135|  1.03k|                                                          sizeof(*h22_res_lc), BYTE_ALIGN_8);
  136|  1.03k|  h22_res_rc = h22_res_lc + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS,
  ------------------
  |  |   89|  1.03k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  137|  1.03k|                                                          sizeof(*h22_res_rc), BYTE_ALIGN_8);
  138|       |
  139|  1.03k|  c_f_l = (WORD16 *)pstr_mps_state->mps_scratch_mem_v +
  140|  1.03k|          IXHEAAC_GET_SIZE_ALIGNED_TYPE(PARAMETER_BANDSX56, sizeof(*c_f_l), BYTE_ALIGN_8);
  ------------------
  |  |   89|  1.03k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  141|  1.03k|  c_f_r =
  142|  1.03k|      c_f_l + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*c_f_r), BYTE_ALIGN_8);
  ------------------
  |  |   89|  1.03k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  143|  1.03k|  dummy =
  144|  1.03k|      c_f_r + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*dummy), BYTE_ALIGN_8);
  ------------------
  |  |   89|  1.03k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  145|  1.03k|  c_f_lc =
  146|  1.03k|      dummy + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*c_f_lc), BYTE_ALIGN_8);
  ------------------
  |  |   89|  1.03k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  147|  1.03k|  c_f_rc =
  148|  1.03k|      c_f_lc + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*c_f_rc), BYTE_ALIGN_8);
  ------------------
  |  |   89|  1.03k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  149|       |
  150|  1.03k|  if (enable_additionals) {
  ------------------
  |  Branch (150:7): [True: 277, False: 762]
  ------------------
  151|    277|    if (mode_1 == 0 &&
  ------------------
  |  Branch (151:9): [True: 243, False: 34]
  ------------------
  152|    243|        (p_aux_struct->ttt_config[1][0].start_band >= p_aux_struct->ttt_config[1][0].stop_band))
  ------------------
  |  Branch (152:9): [True: 219, False: 24]
  ------------------
  153|    219|      enable_additionals = 0;
  154|     58|    else if (mode_0 == 0 && (p_aux_struct->ttt_config[0][0].start_band >=
  ------------------
  |  Branch (154:14): [True: 40, False: 18]
  |  Branch (154:29): [True: 12, False: 28]
  ------------------
  155|     40|                             p_aux_struct->ttt_config[0][0].stop_band))
  156|     12|      enable_additionals = 0;
  157|    277|  }
  158|       |
  159|  3.15k|  for (ps = 0; ps < num_parameter_sets; ps++) {
  ------------------
  |  Branch (159:16): [True: 2.11k, False: 1.03k]
  ------------------
  160|  2.11k|    ixheaacd_param_2_umx_ps(pstr_mps_state, h11_l, h12_l, h21_l, h22_l, h12_res_l, h22_res_l,
  161|  2.11k|                            c_f_l, dummy, 1, ps, res_bands[1]);
  162|  2.11k|    ixheaacd_param_2_umx_ps(pstr_mps_state, h11_r, h12_r, h21_r, h22_r, h12_res_r, h22_res_r,
  163|  2.11k|                            c_f_r, dummy, 2, ps, res_bands[2]);
  164|  2.11k|    ixheaacd_param_2_umx_ps(pstr_mps_state, h11_lc, h12_lc, h21_lc, h22_lc, h12_res_lc,
  165|  2.11k|                            h22_res_lc, c_f_lc, dummy, 3, ps, res_bands[3]);
  166|  2.11k|    ixheaacd_param_2_umx_ps(pstr_mps_state, h11_rc, h12_rc, h21_rc, h22_rc, h12_res_rc,
  167|  2.11k|                            h22_res_rc, c_f_rc, dummy, 4, ps, res_bands[4]);
  168|       |
  169|  6.34k|    for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (169:17): [True: 4.23k, False: 2.11k]
  ------------------
  170|  4.23k|      for (pb = p_aux_struct->ttt_config[i][0].start_band;
  171|  52.0k|           pb < p_aux_struct->ttt_config[i][0].stop_band; pb++) {
  ------------------
  |  Branch (171:12): [True: 47.8k, False: 4.23k]
  ------------------
  172|  47.8k|        WORD32 mtx_inversion = pstr_mps_state->mtx_inversion;
  173|       |
  174|  47.8k|        memset(m_pre, 0, sizeof(m_pre));
  175|       |
  176|  47.8k|        if (p_aux_struct->ttt_config[i][0].mode >= 2) {
  ------------------
  |  Branch (176:13): [True: 41.1k, False: 6.74k]
  ------------------
  177|  41.1k|          mtx_inversion = mtx_inversion && (p_aux_struct->ttt_config[i][0].mode == 2 ||
  ------------------
  |  Branch (177:27): [True: 15.4k, False: 25.6k]
  |  Branch (177:45): [True: 7.02k, False: 8.43k]
  ------------------
  178|  8.43k|                                            p_aux_struct->ttt_config[i][0].mode == 4);
  ------------------
  |  Branch (178:45): [True: 1.11k, False: 7.32k]
  ------------------
  179|  41.1k|        }
  180|       |
  181|  47.8k|        ixheaacd_calculate_ttt(pstr_mps_state, ps, pb, p_aux_struct->ttt_config[i][0].mode,
  182|  47.8k|                               m_ttt);
  183|       |
  184|   191k|        for (row = 0; row < 3; row++) {
  ------------------
  |  Branch (184:23): [True: 143k, False: 47.8k]
  ------------------
  185|   574k|          for (col = 0; col < 3; col++) {
  ------------------
  |  Branch (185:25): [True: 430k, False: 143k]
  ------------------
  186|   430k|            m_pre[row][col] = m_ttt[row][col];
  187|   430k|          }
  188|   143k|        }
  189|       |
  190|  47.8k|        if (arbitrary_downmix != 0) {
  ------------------
  |  Branch (190:13): [True: 4.11k, False: 43.7k]
  ------------------
  191|  4.11k|          WORD32 ch;
  192|  4.11k|          ixheaacd_calculate_arb_dmx_mtx(pstr_mps_state, ps, pb, g_real);
  193|       |
  194|  12.3k|          for (ch = 0; ch < num_input_channels; ch++) {
  ------------------
  |  Branch (194:24): [True: 8.22k, False: 4.11k]
  ------------------
  195|  32.8k|            for (row = 0; row < 3; row++) {
  ------------------
  |  Branch (195:27): [True: 24.6k, False: 8.22k]
  ------------------
  196|  24.6k|              m_pre[row][col] = ixheaacd_mps_mult32_shr_15(m_pre[row][col], g_real[ch]);
  197|       |
  198|  24.6k|              if (arbitrary_downmix == 2 && pb < pstr_mps_state->arbdmx_residual_bands) {
  ------------------
  |  Branch (198:19): [True: 1.31k, False: 23.3k]
  |  Branch (198:45): [True: 948, False: 366]
  ------------------
  199|    948|                m_pre[row][3 + ch] = m_ttt[row][ch];
  200|    948|              }
  201|  24.6k|            }
  202|  8.22k|          }
  203|  4.11k|        }
  204|       |
  205|  47.8k|        if (mtx_inversion) {
  ------------------
  |  Branch (205:13): [True: 10.8k, False: 36.9k]
  ------------------
  206|  10.8k|          WORD32 h_real[2][2], h_imag[2][2];
  207|       |
  208|  10.8k|          ixheaacd_calculate_mtx_inv(pstr_mps_state, ps, pb, p_aux_struct->ttt_config[i][0].mode,
  209|  10.8k|                                     h_real, h_imag);
  210|       |
  211|  10.8k|          acc = (WORD64)((WORD64)m_pre[0][0] * (WORD64)h_real[0][0] +
  212|  10.8k|                         (WORD64)m_pre[0][1] * (WORD64)h_real[1][0]);
  213|  10.8k|          acc >>= 15;
  214|  10.8k|          m1_param->m1_param_real[0][0][ps][pb] = (WORD32)acc;
  215|       |
  216|  10.8k|          acc = (WORD64)((WORD64)m_pre[0][0] * (WORD64)h_real[0][1] +
  217|  10.8k|                         (WORD64)m_pre[0][1] * (WORD64)h_real[1][1]);
  218|  10.8k|          acc >>= 15;
  219|  10.8k|          m1_param->m1_param_real[0][1][ps][pb] = (WORD32)acc;
  220|       |
  221|  10.8k|          acc = (WORD64)((WORD64)m_pre[1][0] * (WORD64)h_real[0][0] +
  222|  10.8k|                         (WORD64)m_pre[1][1] * (WORD64)h_real[1][0]);
  223|  10.8k|          acc >>= 15;
  224|  10.8k|          m1_param->m1_param_real[1][0][ps][pb] = (WORD32)acc;
  225|       |
  226|  10.8k|          acc = (WORD64)((WORD64)m_pre[1][0] * (WORD64)h_real[0][1] +
  227|  10.8k|                         (WORD64)m_pre[1][1] * (WORD64)h_real[1][1]);
  228|  10.8k|          acc >>= 15;
  229|  10.8k|          m1_param->m1_param_real[1][1][ps][pb] = (WORD32)acc;
  230|       |
  231|  10.8k|          acc = (WORD64)((WORD64)m_pre[2][0] * (WORD64)h_real[0][0] +
  232|  10.8k|                         (WORD64)m_pre[2][1] * (WORD64)h_real[1][0]);
  233|  10.8k|          acc >>= 15;
  234|  10.8k|          m1_param->m1_param_real[2][0][ps][pb] = (WORD32)acc;
  235|       |
  236|  10.8k|          acc = (WORD64)((WORD64)m_pre[2][0] * (WORD64)h_real[0][1] +
  237|  10.8k|                         (WORD64)m_pre[2][1] * (WORD64)h_real[1][1]);
  238|  10.8k|          acc >>= 15;
  239|  10.8k|          m1_param->m1_param_real[2][1][ps][pb] = (WORD32)acc;
  240|       |
  241|  10.8k|          acc = (WORD64)((WORD64)m_pre[0][0] * (WORD64)h_imag[0][0] +
  242|  10.8k|                         (WORD64)m_pre[0][1] * (WORD64)h_imag[1][0]);
  243|  10.8k|          acc >>= 15;
  244|  10.8k|          m1_param->m1_param_imag[0][0][ps][pb] = (WORD32)acc;
  245|       |
  246|  10.8k|          acc = (WORD64)((WORD64)m_pre[0][0] * (WORD64)h_imag[0][1] +
  247|  10.8k|                         (WORD64)m_pre[0][1] * (WORD64)h_imag[1][1]);
  248|  10.8k|          acc >>= 15;
  249|  10.8k|          m1_param->m1_param_imag[0][1][ps][pb] = (WORD32)acc;
  250|       |
  251|  10.8k|          acc = (WORD64)((WORD64)m_pre[1][0] * (WORD64)h_imag[0][0] +
  252|  10.8k|                         (WORD64)m_pre[1][1] * (WORD64)h_imag[1][0]);
  253|  10.8k|          acc >>= 15;
  254|  10.8k|          m1_param->m1_param_imag[1][0][ps][pb] = (WORD32)acc;
  255|       |
  256|  10.8k|          acc = (WORD64)((WORD64)m_pre[1][0] * (WORD64)h_imag[0][1] +
  257|  10.8k|                         (WORD64)m_pre[1][1] * (WORD64)h_imag[1][1]);
  258|  10.8k|          acc >>= 15;
  259|  10.8k|          m1_param->m1_param_imag[1][1][ps][pb] = (WORD32)acc;
  260|       |
  261|  10.8k|          acc = (WORD64)((WORD64)m_pre[2][0] * (WORD64)h_imag[0][0] +
  262|  10.8k|                         (WORD64)m_pre[2][1] * (WORD64)h_imag[1][0]);
  263|  10.8k|          acc >>= 15;
  264|  10.8k|          m1_param->m1_param_imag[2][0][ps][pb] = (WORD32)acc;
  265|       |
  266|  10.8k|          acc = (WORD64)((WORD64)m_pre[2][0] * (WORD64)h_imag[0][1] +
  267|  10.8k|                         (WORD64)m_pre[2][1] * (WORD64)h_imag[1][1]);
  268|  10.8k|          acc >>= 15;
  269|  10.8k|          m1_param->m1_param_imag[2][1][ps][pb] = (WORD32)acc;
  270|  36.9k|        } else if (pstr_mps_state->_3d_stereo_inversion) {
  ------------------
  |  Branch (270:20): [True: 0, False: 36.9k]
  ------------------
  271|  36.9k|        } else {
  272|  36.9k|          m1_param->m1_param_real[0][0][ps][pb] = m_pre[0][0];
  273|  36.9k|          m1_param->m1_param_real[0][1][ps][pb] = m_pre[0][1];
  274|  36.9k|          m1_param->m1_param_real[1][0][ps][pb] = m_pre[1][0];
  275|  36.9k|          m1_param->m1_param_real[1][1][ps][pb] = m_pre[1][1];
  276|  36.9k|          m1_param->m1_param_real[2][0][ps][pb] = m_pre[2][0];
  277|  36.9k|          m1_param->m1_param_real[2][1][ps][pb] = m_pre[2][1];
  278|  36.9k|        }
  279|       |
  280|  47.8k|        m1_param->m1_param_real[0][2][ps][pb] = m_pre[0][2];
  281|  47.8k|        m1_param->m1_param_real[0][3][ps][pb] = m_pre[0][3];
  282|  47.8k|        m1_param->m1_param_real[0][4][ps][pb] = m_pre[0][4];
  283|  47.8k|        m1_param->m1_param_real[1][2][ps][pb] = m_pre[1][2];
  284|  47.8k|        m1_param->m1_param_real[1][3][ps][pb] = m_pre[1][3];
  285|  47.8k|        m1_param->m1_param_real[1][4][ps][pb] = m_pre[1][4];
  286|  47.8k|        m1_param->m1_param_real[2][2][ps][pb] = m_pre[2][2];
  287|  47.8k|        m1_param->m1_param_real[2][3][ps][pb] = m_pre[2][3];
  288|  47.8k|        m1_param->m1_param_real[2][4][ps][pb] = m_pre[2][4];
  289|       |
  290|   144k|        for (col = 0; col < pstr_mps_state->num_x_channels; col++) {
  ------------------
  |  Branch (290:23): [True: 96.5k, False: 47.8k]
  ------------------
  291|  96.5k|          m1_param->m1_param_real[3][col][ps][pb] = m1_param->m1_param_real[0][col][ps][pb];
  292|  96.5k|          m1_param->m1_param_real[4][col][ps][pb] = m1_param->m1_param_real[1][col][ps][pb];
  293|       |
  294|  96.5k|          curr_state->m1_param_present[3][col] = 1;
  295|  96.5k|          curr_state->m1_param_present[4][col] = 1;
  296|       |
  297|  96.5k|          if (m1_param_imag_present) {
  ------------------
  |  Branch (297:15): [True: 36.4k, False: 60.0k]
  ------------------
  298|  36.4k|            m1_param->m1_param_imag[3][col][ps][pb] = m1_param->m1_param_imag[0][col][ps][pb];
  299|  36.4k|            m1_param->m1_param_imag[4][col][ps][pb] = m1_param->m1_param_imag[1][col][ps][pb];
  300|  36.4k|          }
  301|       |
  302|  96.5k|          if (p_aux_struct->ttt_config[i][0].use_ttt_decorr) {
  ------------------
  |  Branch (302:15): [True: 13.3k, False: 83.1k]
  ------------------
  303|  13.3k|            m1_param->m1_param_real[5][col][ps][pb] = m1_param->m1_param_real[2][col][ps][pb];
  304|  13.3k|            if (m1_param_imag_present)
  ------------------
  |  Branch (304:17): [True: 5.38k, False: 7.93k]
  ------------------
  305|  5.38k|              m1_param->m1_param_imag[5][col][ps][pb] = m1_param->m1_param_imag[2][col][ps][pb];
  306|       |
  307|  13.3k|            curr_state->m1_param_present[5][col] = 1;
  308|  83.1k|          } else {
  309|  83.1k|            m1_param->m1_param_real[5][col][ps][pb] = 0;
  310|  83.1k|            if (m1_param_imag_present) m1_param->m1_param_imag[5][col][ps][pb] = 0;
  ------------------
  |  Branch (310:17): [True: 31.0k, False: 52.1k]
  ------------------
  311|  83.1k|          }
  312|       |
  313|  96.5k|          m1_param->m1_param_real[6][col][ps][pb] =
  314|  96.5k|              ixheaacd_mps_mult32_shr_15(c_f_l[pb], m1_param->m1_param_real[0][col][ps][pb]);
  315|  96.5k|          m1_param->m1_param_real[7][col][ps][pb] =
  316|  96.5k|              ixheaacd_mps_mult32_shr_15(c_f_r[pb], m1_param->m1_param_real[1][col][ps][pb]);
  317|       |
  318|  96.5k|          if (m1_param_imag_present) {
  ------------------
  |  Branch (318:15): [True: 36.4k, False: 60.0k]
  ------------------
  319|  36.4k|            m1_param->m1_param_imag[6][col][ps][pb] =
  320|  36.4k|                ixheaacd_mps_mult32_shr_15(c_f_l[pb], m1_param->m1_param_imag[0][col][ps][pb]);
  321|  36.4k|            m1_param->m1_param_imag[7][col][ps][pb] =
  322|  36.4k|                ixheaacd_mps_mult32_shr_15(c_f_r[pb], m1_param->m1_param_imag[1][col][ps][pb]);
  323|  36.4k|          }
  324|       |
  325|  96.5k|          curr_state->m1_param_present[6][col] = 1;
  326|  96.5k|          curr_state->m1_param_present[7][col] = 1;
  327|  96.5k|        }
  328|  47.8k|      }
  329|  4.23k|    }
  330|       |
  331|  24.3k|    for (pb = 0; pb < p_aux_struct->num_ott_bands[0]; pb++) {
  ------------------
  |  Branch (331:18): [True: 22.2k, False: 2.11k]
  ------------------
  332|  22.2k|      ia_mps_dec_spatial_bs_frame_struct *p_cur_bs = pstr_mps_state->bs_frame;
  333|  22.2k|      c_l_clfe[pb] = pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr
  334|  22.2k|                         ->r1_matrix_l[p_cur_bs->ott_cld_idx[0][ps][pb] + 15];
  335|  22.2k|      c_r_clfe[pb] = pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr
  336|  22.2k|                         ->r1_matrix_l[15 - p_cur_bs->ott_cld_idx[0][ps][pb]];
  337|  22.2k|    }
  338|  10.4k|    for (pb = p_aux_struct->num_ott_bands[0]; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (338:47): [True: 8.37k, False: 2.11k]
  ------------------
  339|  8.37k|      c_l_clfe[pb] = ONE_IN_Q15;
  ------------------
  |  |   41|  8.37k|#define ONE_IN_Q15 (32768)
  ------------------
  340|  8.37k|      c_r_clfe[pb] = 0;
  341|  8.37k|    }
  342|       |
  343|  31.1k|    for (pb = 0; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (343:18): [True: 29.0k, False: 2.11k]
  ------------------
  344|  29.0k|      idx = 0;
  345|       |
  346|  29.0k|      m2_param->m2_decor_real[idx++][ps][pb] = ixheaacd_mps_mult32_shr_15(h11_lc[pb], h12_l[pb]);
  347|  29.0k|      if (enable_additionals) {
  ------------------
  |  Branch (347:11): [True: 1.05k, False: 28.0k]
  ------------------
  348|  1.05k|        pos[0] = idx++;
  349|  1.05k|      }
  350|  29.0k|      m2_param->m2_decor_real[idx++][ps][pb] = h12_lc[pb];
  351|  29.0k|      m2_param->m2_decor_real[idx++][ps][pb] = ixheaacd_mps_mult32_shr_15(h21_lc[pb], h12_l[pb]);
  352|  29.0k|      if (enable_additionals) {
  ------------------
  |  Branch (352:11): [True: 1.05k, False: 28.0k]
  ------------------
  353|  1.05k|        pos[1] = idx++;
  354|  1.05k|      }
  355|  29.0k|      m2_param->m2_decor_real[idx++][ps][pb] = h22_lc[pb];
  356|  29.0k|      m2_param->m2_decor_real[idx++][ps][pb] = h22_l[pb];
  357|  29.0k|      m2_param->m2_decor_real[idx++][ps][pb] = ixheaacd_mps_mult32_shr_15(h11_rc[pb], h12_r[pb]);
  358|  29.0k|      if (enable_additionals) {
  ------------------
  |  Branch (358:11): [True: 1.05k, False: 28.0k]
  ------------------
  359|  1.05k|        pos[2] = idx++;
  360|  1.05k|      }
  361|  29.0k|      m2_param->m2_decor_real[idx++][ps][pb] = h12_rc[pb];
  362|  29.0k|      m2_param->m2_decor_real[idx++][ps][pb] = ixheaacd_mps_mult32_shr_15(h21_rc[pb], h12_r[pb]);
  363|  29.0k|      if (enable_additionals) {
  ------------------
  |  Branch (363:11): [True: 1.05k, False: 28.0k]
  ------------------
  364|  1.05k|        pos[3] = idx++;
  365|  1.05k|      }
  366|  29.0k|      m2_param->m2_decor_real[idx++][ps][pb] = h22_rc[pb];
  367|  29.0k|      m2_param->m2_decor_real[idx++][ps][pb] = h22_r[pb];
  368|  29.0k|      if (enable_additionals) {
  ------------------
  |  Branch (368:11): [True: 1.05k, False: 28.0k]
  ------------------
  369|  1.05k|        pos[4] = idx++;
  370|  1.05k|      }
  371|  29.0k|    }
  372|       |
  373|  31.1k|    for (pb = 0; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (373:18): [True: 29.0k, False: 2.11k]
  ------------------
  374|  29.0k|      idx = 0;
  375|       |
  376|  29.0k|      m2_param->m2_resid_real[idx][ps][pb] = ixheaacd_mps_mult32_shr_15(h11_lc[pb], h11_l[pb]);
  377|  29.0k|      pos_resid[0] = idx++;
  378|       |
  379|  29.0k|      if (residual_coding) {
  ------------------
  |  Branch (379:11): [True: 148, False: 28.9k]
  ------------------
  380|    148|        m2_param->m2_resid_real[idx++][ps][pb] =
  381|    148|            ixheaacd_mps_mult32_shr_15(h11_lc[pb], h12_res_l[pb]);
  382|    148|        m2_param->m2_resid_real[idx++][ps][pb] = h12_res_lc[pb];
  383|    148|      }
  384|       |
  385|  29.0k|      m2_param->m2_resid_real[idx][ps][pb] = ixheaacd_mps_mult32_shr_15(h21_lc[pb], h11_l[pb]);
  386|  29.0k|      pos_resid[1] = idx++;
  387|       |
  388|  29.0k|      if (residual_coding) {
  ------------------
  |  Branch (388:11): [True: 148, False: 28.9k]
  ------------------
  389|    148|        m2_param->m2_resid_real[idx++][ps][pb] =
  390|    148|            ixheaacd_mps_mult32_shr_15(h21_lc[pb], h12_res_l[pb]);
  391|    148|        m2_param->m2_resid_real[idx++][ps][pb] = h22_res_lc[pb];
  392|    148|      }
  393|       |
  394|  29.0k|      m2_param->m2_resid_real[idx++][ps][pb] = h21_l[pb];
  395|       |
  396|  29.0k|      if (residual_coding) m2_param->m2_resid_real[idx++][ps][pb] = h22_res_l[pb];
  ------------------
  |  Branch (396:11): [True: 148, False: 28.9k]
  ------------------
  397|       |
  398|  29.0k|      m2_param->m2_resid_real[idx][ps][pb] = ixheaacd_mps_mult32_shr_15(h11_rc[pb], h11_r[pb]);
  399|  29.0k|      pos_resid[2] = idx++;
  400|       |
  401|  29.0k|      if (residual_coding) {
  ------------------
  |  Branch (401:11): [True: 148, False: 28.9k]
  ------------------
  402|    148|        m2_param->m2_resid_real[idx++][ps][pb] =
  403|    148|            ixheaacd_mps_mult32_shr_15(h11_rc[pb], h12_res_r[pb]);
  404|    148|        m2_param->m2_resid_real[idx++][ps][pb] = h12_res_rc[pb];
  405|    148|      }
  406|       |
  407|  29.0k|      m2_param->m2_resid_real[idx][ps][pb] = ixheaacd_mps_mult32_shr_15(h21_rc[pb], h11_r[pb]);
  408|  29.0k|      pos_resid[3] = idx++;
  409|       |
  410|  29.0k|      if (residual_coding) {
  ------------------
  |  Branch (410:11): [True: 148, False: 28.9k]
  ------------------
  411|    148|        m2_param->m2_resid_real[idx++][ps][pb] =
  412|    148|            ixheaacd_mps_mult32_shr_15(h21_rc[pb], h12_res_r[pb]);
  413|    148|        m2_param->m2_resid_real[idx++][ps][pb] = h22_res_rc[pb];
  414|    148|      }
  415|       |
  416|  29.0k|      m2_param->m2_resid_real[idx++][ps][pb] = h21_r[pb];
  417|       |
  418|  29.0k|      if (residual_coding) m2_param->m2_resid_real[idx++][ps][pb] = h22_res_r[pb];
  ------------------
  |  Branch (418:11): [True: 148, False: 28.9k]
  ------------------
  419|       |
  420|  29.0k|      m2_param->m2_resid_real[idx][ps][pb] = c_l_clfe[pb];
  421|  29.0k|      pos_resid[4] = idx++;
  422|       |
  423|  29.0k|      m2_param->m2_resid_real[idx][ps][pb] = c_r_clfe[pb];
  424|  29.0k|    }
  425|       |
  426|  31.1k|    for (pb = 0; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (426:18): [True: 29.0k, False: 2.11k]
  ------------------
  427|  29.0k|      ia_mps_dec_spatial_bs_frame_struct *p_cur_bs = pstr_mps_state->bs_frame;
  428|       |
  429|  29.0k|      kappa[pb] = p_aux_struct->ttt_icc[0][ps][pb];
  430|  29.0k|      g_dd[pb] = pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr
  431|  29.0k|                     ->table_kappa[p_cur_bs->ttt_icc_idx[0][ps][pb]];
  432|  29.0k|    }
  433|       |
  434|  6.34k|    for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (434:17): [True: 4.23k, False: 2.11k]
  ------------------
  435|  4.23k|      for (pb = p_aux_struct->ttt_config[i][0].start_band;
  436|  52.0k|           pb < p_aux_struct->ttt_config[i][0].stop_band; pb++) {
  ------------------
  |  Branch (436:12): [True: 47.8k, False: 4.23k]
  ------------------
  437|  47.8k|        if (p_aux_struct->ttt_config[i][0].mode == 0 && pb >= pstr_mps_state->res_bands[5]) {
  ------------------
  |  Branch (437:13): [True: 6.63k, False: 41.2k]
  |  Branch (437:57): [True: 6.59k, False: 41]
  ------------------
  438|  6.59k|          if (p_aux_struct->ttt_config[i][0].use_ttt_decorr) {
  ------------------
  |  Branch (438:15): [True: 6.59k, False: 0]
  ------------------
  439|  6.59k|            temp_1 = ixheaacd_mps_mult32_shr_15(g_dd[pb], c_f_l[pb]);
  440|  6.59k|            m2_param->m2_decor_real[pos[0]][ps][pb] =
  441|  6.59k|                ixheaacd_mps_mult32_shr_15(temp_1, h11_lc[pb]);
  442|       |
  443|  6.59k|            temp_1 = ixheaacd_mps_mult32_shr_15(g_dd[pb], c_f_l[pb]);
  444|  6.59k|            m2_param->m2_decor_real[pos[1]][ps][pb] =
  445|  6.59k|                ixheaacd_mps_mult32_shr_15(temp_1, h21_lc[pb]);
  446|       |
  447|  6.59k|            temp_1 = ixheaacd_mps_mult32_shr_15(g_dd[pb], c_f_r[pb]);
  448|  6.59k|            m2_param->m2_decor_real[pos[2]][ps][pb] =
  449|  6.59k|                ixheaacd_mps_mult32_shr_15(temp_1, h11_rc[pb]);
  450|       |
  451|  6.59k|            temp_1 = ixheaacd_mps_mult32_shr_15(g_dd[pb], c_f_r[pb]);
  452|  6.59k|            m2_param->m2_decor_real[pos[3]][ps][pb] =
  453|  6.59k|                ixheaacd_mps_mult32_shr_15(temp_1, h21_rc[pb]);
  454|       |
  455|  6.59k|            temp_1 = ixheaacd_mps_mult32_shr_15(g_dd[pb], c_l_clfe[pb]);
  456|  6.59k|            temp_2 = MINUS_SQRT_2_Q30;
  ------------------
  |  |   47|  6.59k|#define MINUS_SQRT_2_Q30 (-1518500250)
  ------------------
  457|  6.59k|            m2_param->m2_decor_real[pos[4]][ps][pb] = ixheaacd_mps_mult32_shr_30(temp_1, temp_2);
  458|       |
  459|  6.59k|            pstr_mps_state->m2_param_present[0][5] = 1;
  460|  6.59k|            pstr_mps_state->m2_param_present[1][5] = 1;
  461|  6.59k|            pstr_mps_state->m2_param_present[3][5] = 1;
  462|  6.59k|            pstr_mps_state->m2_param_present[4][5] = 1;
  463|  6.59k|            pstr_mps_state->m2_param_present[6][5] = 1;
  464|       |
  465|  6.59k|            m2_param->m2_resid_real[pos_resid[0]][ps][pb] = ixheaacd_mps_mult32_shr_15(
  466|  6.59k|                m2_param->m2_resid_real[pos_resid[0]][ps][pb], kappa[pb]);
  467|  6.59k|            m2_param->m2_resid_real[pos_resid[1]][ps][pb] = ixheaacd_mps_mult32_shr_15(
  468|  6.59k|                m2_param->m2_resid_real[pos_resid[1]][ps][pb], kappa[pb]);
  469|  6.59k|            m2_param->m2_resid_real[pos_resid[2]][ps][pb] = ixheaacd_mps_mult32_shr_15(
  470|  6.59k|                m2_param->m2_resid_real[pos_resid[2]][ps][pb], kappa[pb]);
  471|  6.59k|            m2_param->m2_resid_real[pos_resid[3]][ps][pb] = ixheaacd_mps_mult32_shr_15(
  472|  6.59k|                m2_param->m2_resid_real[pos_resid[3]][ps][pb], kappa[pb]);
  473|  6.59k|            m2_param->m2_resid_real[pos_resid[4]][ps][pb] = ixheaacd_mps_mult32_shr_15(
  474|  6.59k|                m2_param->m2_resid_real[pos_resid[4]][ps][pb], kappa[pb]);
  475|  6.59k|          }
  476|  6.59k|        }
  477|  47.8k|      }
  478|  4.23k|    }
  479|  2.11k|  }
  480|  1.03k|  return;
  481|  1.03k|}
ixheaacd_calc_m1m2_7272:
  483|    305|VOID ixheaacd_calc_m1m2_7272(ia_heaac_mps_state_struct *pstr_mps_state) {
  484|    305|  ia_mps_dec_auxilary_struct *p_aux_struct = pstr_mps_state->aux_struct;
  485|    305|  ia_mps_dec_m2_param_struct *m2_param = p_aux_struct->m2_param;
  486|    305|  ia_mps_dec_m1_param_struct *m1_param = pstr_mps_state->array_struct->m1_param;
  487|    305|  ia_heaac_mps_state_struct *curr_state = pstr_mps_state;
  488|    305|  WORD32 ps, pb, col, row, i;
  489|       |
  490|    305|  WORD32 m_pre[3][5];
  491|    305|  WORD32 m_ttt[3][3];
  492|       |
  493|    305|  WORD32 g_real[2];
  494|       |
  495|    305|  WORD32 temp_1, temp_2;
  496|    305|  WORD64 acc;
  497|       |
  498|    305|  WORD32 *h11_l, *h11_r, *h12_l, *h12_r, *h21_l, *h21_r, *h22_l, *h22_r, *h12_res_l, *h12_res_r,
  499|    305|      *h22_res_l, *h22_res_r;
  500|    305|  WORD32 *c_l_clfe, *c_r_clfe, *kappa, *g_dd;
  501|    305|  WORD16 *c_1_L, *c_1_R, *c_2_L, *c_2_R;
  502|    305|  WORD32 *h11_ls, *h11_rs, *h12_ls, *h12_rs, *h21_ls, *h21_rs, *h22_ls, *h22_rs, *h12_res_ls,
  503|    305|      *h12_res_rs, *h22_res_ls, *h22_res_rs;
  504|    305|  WORD16 *c_f_ls, *c_f_rs, *dummy;
  505|       |
  506|    305|  WORD32 idx;
  507|    305|  WORD32 mode_0 = p_aux_struct->ttt_config[0][0].mode;
  508|    305|  WORD32 mode_1 = p_aux_struct->ttt_config[1][0].mode;
  509|    305|  WORD32 num_parameter_bands = pstr_mps_state->num_parameter_bands;
  510|    305|  WORD32 m1_param_imag_present = pstr_mps_state->m1_param_imag_present;
  511|    305|  WORD32 num_parameter_sets = pstr_mps_state->num_parameter_sets;
  512|    305|  WORD32 arbitrary_downmix = pstr_mps_state->arbitrary_downmix;
  513|       |
  514|    305|  WORD32 enable_additionals = ((mode_0 == 0) || (mode_1 == 0));
  ------------------
  |  Branch (514:32): [True: 99, False: 206]
  |  Branch (514:49): [True: 94, False: 112]
  ------------------
  515|    305|  WORD32 pos[3] = {0};
  516|    305|  WORD32 pos_resid[3] = {0};
  517|       |
  518|    305|  WORD32 residual_coding = pstr_mps_state->residual_coding;
  519|       |
  520|    305|  h11_l = pstr_mps_state->mps_scratch_mem_v;
  521|    305|  h11_r =
  522|    305|      h11_l + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h11_r), BYTE_ALIGN_8);
  ------------------
  |  |   89|    305|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  523|    305|  h12_l =
  524|    305|      h11_r + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h12_l), BYTE_ALIGN_8);
  ------------------
  |  |   89|    305|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  525|    305|  h12_r =
  526|    305|      h12_l + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h12_r), BYTE_ALIGN_8);
  ------------------
  |  |   89|    305|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  527|    305|  h21_l =
  528|    305|      h12_r + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h21_l), BYTE_ALIGN_8);
  ------------------
  |  |   89|    305|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  529|    305|  h21_r =
  530|    305|      h21_l + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h21_r), BYTE_ALIGN_8);
  ------------------
  |  |   89|    305|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  531|    305|  h22_l =
  532|    305|      h21_r + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h22_l), BYTE_ALIGN_8);
  ------------------
  |  |   89|    305|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  533|    305|  h22_r =
  534|    305|      h22_l + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h22_r), BYTE_ALIGN_8);
  ------------------
  |  |   89|    305|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  535|    305|  h12_res_l = h22_r + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h12_res_l),
  ------------------
  |  |   89|    305|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  536|    305|                                                    BYTE_ALIGN_8);
  537|    305|  h12_res_r = h12_res_l + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h12_res_r),
  ------------------
  |  |   89|    305|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  538|    305|                                                        BYTE_ALIGN_8);
  539|    305|  h22_res_l = h12_res_r + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h22_res_l),
  ------------------
  |  |   89|    305|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  540|    305|                                                        BYTE_ALIGN_8);
  541|    305|  h22_res_r = h22_res_l + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h22_res_r),
  ------------------
  |  |   89|    305|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  542|    305|                                                        BYTE_ALIGN_8);
  543|    305|  c_l_clfe = h22_res_r +
  544|    305|             IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*c_l_clfe), BYTE_ALIGN_8);
  ------------------
  |  |   89|    305|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  545|    305|  c_r_clfe = c_l_clfe +
  546|    305|             IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*c_r_clfe), BYTE_ALIGN_8);
  ------------------
  |  |   89|    305|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  547|    305|  kappa =
  548|    305|      c_r_clfe + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*kappa), BYTE_ALIGN_8);
  ------------------
  |  |   89|    305|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  549|    305|  g_dd = kappa + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*g_dd), BYTE_ALIGN_8);
  ------------------
  |  |   89|    305|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  550|       |
  551|    305|  h11_ls =
  552|    305|      g_dd + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h11_ls), BYTE_ALIGN_8);
  ------------------
  |  |   89|    305|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  553|    305|  h11_rs =
  554|    305|      h11_ls + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h11_rs), BYTE_ALIGN_8);
  ------------------
  |  |   89|    305|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  555|    305|  h12_ls =
  556|    305|      h11_rs + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h12_ls), BYTE_ALIGN_8);
  ------------------
  |  |   89|    305|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  557|    305|  h12_rs =
  558|    305|      h12_ls + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h12_rs), BYTE_ALIGN_8);
  ------------------
  |  |   89|    305|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  559|    305|  h21_ls =
  560|    305|      h12_rs + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h21_ls), BYTE_ALIGN_8);
  ------------------
  |  |   89|    305|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  561|    305|  h21_rs =
  562|    305|      h21_ls + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h21_rs), BYTE_ALIGN_8);
  ------------------
  |  |   89|    305|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  563|    305|  h22_ls =
  564|    305|      h21_rs + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h22_ls), BYTE_ALIGN_8);
  ------------------
  |  |   89|    305|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  565|    305|  h22_rs =
  566|    305|      h22_ls + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h22_rs), BYTE_ALIGN_8);
  ------------------
  |  |   89|    305|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  567|    305|  h12_res_ls = h22_rs + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h12_res_ls),
  ------------------
  |  |   89|    305|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  568|    305|                                                      BYTE_ALIGN_8);
  569|    305|  h12_res_rs = h12_res_ls + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS,
  ------------------
  |  |   89|    305|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  570|    305|                                                          sizeof(*h12_res_rs), BYTE_ALIGN_8);
  571|    305|  h22_res_ls = h12_res_rs + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS,
  ------------------
  |  |   89|    305|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  572|    305|                                                          sizeof(*h22_res_ls), BYTE_ALIGN_8);
  573|    305|  h22_res_rs = h22_res_ls + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS,
  ------------------
  |  |   89|    305|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  574|    305|                                                          sizeof(*h22_res_rs), BYTE_ALIGN_8);
  575|       |
  576|    305|  c_1_L = (WORD16 *)pstr_mps_state->mps_scratch_mem_v +
  577|    305|          IXHEAAC_GET_SIZE_ALIGNED_TYPE(PARAMETER_BANDSX56, sizeof(*c_1_L), BYTE_ALIGN_8);
  ------------------
  |  |   89|    305|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  578|    305|  c_1_R =
  579|    305|      c_1_L + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*c_1_R), BYTE_ALIGN_8);
  ------------------
  |  |   89|    305|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  580|    305|  c_2_L =
  581|    305|      c_1_R + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*c_2_L), BYTE_ALIGN_8);
  ------------------
  |  |   89|    305|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  582|    305|  c_2_R =
  583|    305|      c_2_L + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*c_2_R), BYTE_ALIGN_8);
  ------------------
  |  |   89|    305|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  584|    305|  c_f_ls =
  585|    305|      c_2_R + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*c_f_ls), BYTE_ALIGN_8);
  ------------------
  |  |   89|    305|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  586|    305|  c_f_rs =
  587|    305|      c_f_ls + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*c_f_rs), BYTE_ALIGN_8);
  ------------------
  |  |   89|    305|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  588|    305|  dummy =
  589|    305|      c_f_rs + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*dummy), BYTE_ALIGN_8);
  ------------------
  |  |   89|    305|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  590|       |
  591|    305|  if (enable_additionals) {
  ------------------
  |  Branch (591:7): [True: 193, False: 112]
  ------------------
  592|    193|    if (mode_1 == 0 &&
  ------------------
  |  Branch (592:9): [True: 155, False: 38]
  ------------------
  593|    155|        (p_aux_struct->ttt_config[1][0].start_band >= p_aux_struct->ttt_config[1][0].stop_band))
  ------------------
  |  Branch (593:9): [True: 77, False: 78]
  ------------------
  594|     77|      enable_additionals = 0;
  595|    116|    else if (mode_0 == 0 && (p_aux_struct->ttt_config[0][0].start_band >=
  ------------------
  |  Branch (595:14): [True: 71, False: 45]
  |  Branch (595:29): [True: 29, False: 42]
  ------------------
  596|     71|                             p_aux_struct->ttt_config[0][0].stop_band))
  597|     29|      enable_additionals = 0;
  598|    193|  }
  599|       |
  600|    981|  for (ps = 0; ps < num_parameter_sets; ps++) {
  ------------------
  |  Branch (600:16): [True: 676, False: 305]
  ------------------
  601|    676|    ixheaacd_param_2_umx_ps(pstr_mps_state, h11_l, h12_l, h21_l, h22_l, h12_res_l, h22_res_l,
  602|    676|                            c_1_L, c_2_L, 1, ps, pstr_mps_state->res_bands[1]);
  603|    676|    ixheaacd_param_2_umx_ps(pstr_mps_state, h11_r, h12_r, h21_r, h22_r, h12_res_r, h22_res_r,
  604|    676|                            c_1_R, c_2_R, 2, ps, pstr_mps_state->res_bands[2]);
  605|    676|    ixheaacd_param_2_umx_ps(pstr_mps_state, h11_ls, h12_ls, h21_ls, h22_ls, h12_res_ls,
  606|    676|                            h22_res_ls, dummy, c_f_ls, 3, ps, pstr_mps_state->res_bands[3]);
  607|    676|    ixheaacd_param_2_umx_ps(pstr_mps_state, h11_rs, h12_rs, h21_rs, h22_rs, h12_res_rs,
  608|    676|                            h22_res_rs, dummy, c_f_rs, 4, ps, pstr_mps_state->res_bands[4]);
  609|       |
  610|  2.02k|    for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (610:17): [True: 1.35k, False: 676]
  ------------------
  611|  1.35k|      for (pb = p_aux_struct->ttt_config[i][0].start_band;
  612|  12.2k|           pb < p_aux_struct->ttt_config[i][0].stop_band; pb++) {
  ------------------
  |  Branch (612:12): [True: 10.8k, False: 1.35k]
  ------------------
  613|  10.8k|        WORD32 mtx_inversion = pstr_mps_state->mtx_inversion;
  614|       |
  615|  10.8k|        memset(m_pre, 0, sizeof(m_pre));
  616|       |
  617|  10.8k|        if (p_aux_struct->ttt_config[i][0].mode >= 2) {
  ------------------
  |  Branch (617:13): [True: 6.07k, False: 4.81k]
  ------------------
  618|  6.07k|          mtx_inversion = mtx_inversion && (p_aux_struct->ttt_config[i][0].mode == 2 ||
  ------------------
  |  Branch (618:27): [True: 3.31k, False: 2.76k]
  |  Branch (618:45): [True: 566, False: 2.74k]
  ------------------
  619|  2.74k|                                            p_aux_struct->ttt_config[i][0].mode == 4);
  ------------------
  |  Branch (619:45): [True: 646, False: 2.10k]
  ------------------
  620|  6.07k|        }
  621|       |
  622|  10.8k|        ixheaacd_calculate_ttt(pstr_mps_state, ps, pb, p_aux_struct->ttt_config[i][0].mode,
  623|  10.8k|                               m_ttt);
  624|       |
  625|  43.5k|        for (row = 0; row < 3; row++) {
  ------------------
  |  Branch (625:23): [True: 32.6k, False: 10.8k]
  ------------------
  626|   130k|          for (col = 0; col < 3; col++) {
  ------------------
  |  Branch (626:25): [True: 97.9k, False: 32.6k]
  ------------------
  627|  97.9k|            m_pre[row][col] = m_ttt[row][col];
  628|  97.9k|          }
  629|  32.6k|        }
  630|       |
  631|  10.8k|        if (arbitrary_downmix != 0) {
  ------------------
  |  Branch (631:13): [True: 3.85k, False: 7.03k]
  ------------------
  632|  3.85k|          WORD32 ch;
  633|  3.85k|          ixheaacd_calculate_arb_dmx_mtx(pstr_mps_state, ps, pb, g_real);
  634|       |
  635|  11.5k|          for (ch = 0; ch < pstr_mps_state->num_input_channels; ch++) {
  ------------------
  |  Branch (635:24): [True: 7.70k, False: 3.85k]
  ------------------
  636|  30.8k|            for (row = 0; row < 3; row++) {
  ------------------
  |  Branch (636:27): [True: 23.1k, False: 7.70k]
  ------------------
  637|  23.1k|              m_pre[row][col] = ixheaacd_mps_mult32_shr_15(m_pre[row][col], g_real[ch]);
  638|       |
  639|  23.1k|              if (arbitrary_downmix == 2 && pb < pstr_mps_state->arbdmx_residual_bands) {
  ------------------
  |  Branch (639:19): [True: 612, False: 22.4k]
  |  Branch (639:45): [True: 228, False: 384]
  ------------------
  640|    228|                m_pre[row][3 + ch] = m_ttt[row][ch];
  641|    228|              }
  642|  23.1k|            }
  643|  7.70k|          }
  644|  3.85k|        }
  645|       |
  646|  10.8k|        if (mtx_inversion) {
  ------------------
  |  Branch (646:13): [True: 2.14k, False: 8.74k]
  ------------------
  647|  2.14k|          WORD32 h_real[2][2], h_imag[2][2];
  648|       |
  649|  2.14k|          ixheaacd_calculate_mtx_inv(pstr_mps_state, ps, pb, p_aux_struct->ttt_config[i][0].mode,
  650|  2.14k|                                     h_real, h_imag);
  651|       |
  652|  2.14k|          acc = (WORD64)((WORD64)m_pre[0][0] * (WORD64)h_real[0][0] +
  653|  2.14k|                         (WORD64)m_pre[0][1] * (WORD64)h_real[1][0]);
  654|  2.14k|          acc >>= 15;
  655|  2.14k|          m1_param->m1_param_real[0][0][ps][pb] = (WORD32)acc;
  656|       |
  657|  2.14k|          acc = (WORD64)((WORD64)m_pre[0][0] * (WORD64)h_real[0][1] +
  658|  2.14k|                         (WORD64)m_pre[0][1] * (WORD64)h_real[1][1]);
  659|  2.14k|          acc >>= 15;
  660|  2.14k|          m1_param->m1_param_real[0][1][ps][pb] = (WORD32)acc;
  661|       |
  662|  2.14k|          acc = (WORD64)((WORD64)m_pre[1][0] * (WORD64)h_real[0][0] +
  663|  2.14k|                         (WORD64)m_pre[1][1] * (WORD64)h_real[1][0]);
  664|  2.14k|          acc >>= 15;
  665|  2.14k|          m1_param->m1_param_real[1][0][ps][pb] = (WORD32)acc;
  666|       |
  667|  2.14k|          acc = (WORD64)((WORD64)m_pre[1][0] * (WORD64)h_real[0][1] +
  668|  2.14k|                         (WORD64)m_pre[1][1] * (WORD64)h_real[1][1]);
  669|  2.14k|          acc >>= 15;
  670|  2.14k|          m1_param->m1_param_real[1][1][ps][pb] = (WORD32)acc;
  671|       |
  672|  2.14k|          acc = (WORD64)((WORD64)m_pre[2][0] * (WORD64)h_real[0][0] +
  673|  2.14k|                         (WORD64)m_pre[2][1] * (WORD64)h_real[1][0]);
  674|  2.14k|          acc >>= 15;
  675|  2.14k|          m1_param->m1_param_real[2][0][ps][pb] = (WORD32)acc;
  676|       |
  677|  2.14k|          acc = (WORD64)((WORD64)m_pre[2][0] * (WORD64)h_real[0][1] +
  678|  2.14k|                         (WORD64)m_pre[2][1] * (WORD64)h_real[1][1]);
  679|  2.14k|          acc >>= 15;
  680|  2.14k|          m1_param->m1_param_real[2][1][ps][pb] = (WORD32)acc;
  681|       |
  682|  2.14k|          acc = (WORD64)((WORD64)m_pre[0][0] * (WORD64)h_imag[0][0] +
  683|  2.14k|                         (WORD64)m_pre[0][1] * (WORD64)h_imag[1][0]);
  684|  2.14k|          acc >>= 15;
  685|  2.14k|          m1_param->m1_param_imag[0][0][ps][pb] = (WORD32)acc;
  686|       |
  687|  2.14k|          acc = (WORD64)((WORD64)m_pre[0][0] * (WORD64)h_imag[0][1] +
  688|  2.14k|                         (WORD64)m_pre[0][1] * (WORD64)h_imag[1][1]);
  689|  2.14k|          acc >>= 15;
  690|  2.14k|          m1_param->m1_param_imag[0][1][ps][pb] = (WORD32)acc;
  691|       |
  692|  2.14k|          acc = (WORD64)((WORD64)m_pre[1][0] * (WORD64)h_imag[0][0] +
  693|  2.14k|                         (WORD64)m_pre[1][1] * (WORD64)h_imag[1][0]);
  694|  2.14k|          acc >>= 15;
  695|  2.14k|          m1_param->m1_param_imag[1][0][ps][pb] = (WORD32)acc;
  696|       |
  697|  2.14k|          acc = (WORD64)((WORD64)m_pre[1][0] * (WORD64)h_imag[0][1] +
  698|  2.14k|                         (WORD64)m_pre[1][1] * (WORD64)h_imag[1][1]);
  699|  2.14k|          acc >>= 15;
  700|  2.14k|          m1_param->m1_param_imag[1][1][ps][pb] = (WORD32)acc;
  701|       |
  702|  2.14k|          acc = (WORD64)((WORD64)m_pre[2][0] * (WORD64)h_imag[0][0] +
  703|  2.14k|                         (WORD64)m_pre[2][1] * (WORD64)h_imag[1][0]);
  704|  2.14k|          acc >>= 15;
  705|  2.14k|          m1_param->m1_param_imag[2][0][ps][pb] = (WORD32)acc;
  706|       |
  707|  2.14k|          acc = (WORD64)((WORD64)m_pre[2][0] * (WORD64)h_imag[0][1] +
  708|  2.14k|                         (WORD64)m_pre[2][1] * (WORD64)h_imag[1][1]);
  709|  2.14k|          acc >>= 15;
  710|  2.14k|          m1_param->m1_param_imag[2][1][ps][pb] = (WORD32)acc;
  711|  8.74k|        } else if (pstr_mps_state->_3d_stereo_inversion) {
  ------------------
  |  Branch (711:20): [True: 0, False: 8.74k]
  ------------------
  712|  8.74k|        } else {
  713|  8.74k|          m1_param->m1_param_real[0][0][ps][pb] = m_pre[0][0];
  714|  8.74k|          m1_param->m1_param_real[0][1][ps][pb] = m_pre[0][1];
  715|  8.74k|          m1_param->m1_param_real[1][0][ps][pb] = m_pre[1][0];
  716|  8.74k|          m1_param->m1_param_real[1][1][ps][pb] = m_pre[1][1];
  717|  8.74k|          m1_param->m1_param_real[2][0][ps][pb] = m_pre[2][0];
  718|  8.74k|          m1_param->m1_param_real[2][1][ps][pb] = m_pre[2][1];
  719|  8.74k|        }
  720|       |
  721|  10.8k|        m1_param->m1_param_real[0][2][ps][pb] = m_pre[0][2];
  722|  10.8k|        m1_param->m1_param_real[0][3][ps][pb] = m_pre[0][3];
  723|  10.8k|        m1_param->m1_param_real[0][4][ps][pb] = m_pre[0][4];
  724|  10.8k|        m1_param->m1_param_real[1][2][ps][pb] = m_pre[1][2];
  725|  10.8k|        m1_param->m1_param_real[1][3][ps][pb] = m_pre[1][3];
  726|  10.8k|        m1_param->m1_param_real[1][4][ps][pb] = m_pre[1][4];
  727|  10.8k|        m1_param->m1_param_real[2][2][ps][pb] = m_pre[2][2];
  728|  10.8k|        m1_param->m1_param_real[2][3][ps][pb] = m_pre[2][3];
  729|  10.8k|        m1_param->m1_param_real[2][4][ps][pb] = m_pre[2][4];
  730|       |
  731|  33.4k|        for (col = 0; col < pstr_mps_state->num_x_channels; col++) {
  ------------------
  |  Branch (731:23): [True: 22.5k, False: 10.8k]
  ------------------
  732|  22.5k|          m1_param->m1_param_real[3][col][ps][pb] = m1_param->m1_param_real[0][col][ps][pb];
  733|  22.5k|          m1_param->m1_param_real[4][col][ps][pb] = m1_param->m1_param_real[1][col][ps][pb];
  734|       |
  735|  22.5k|          if (m1_param_imag_present) {
  ------------------
  |  Branch (735:15): [True: 8.63k, False: 13.8k]
  ------------------
  736|  8.63k|            m1_param->m1_param_imag[3][col][ps][pb] = m1_param->m1_param_imag[0][col][ps][pb];
  737|  8.63k|            m1_param->m1_param_imag[4][col][ps][pb] = m1_param->m1_param_imag[1][col][ps][pb];
  738|  8.63k|          }
  739|       |
  740|  22.5k|          curr_state->m1_param_present[3][col] = 1;
  741|  22.5k|          curr_state->m1_param_present[4][col] = 1;
  742|       |
  743|  22.5k|          if (p_aux_struct->ttt_config[i][0].use_ttt_decorr) {
  ------------------
  |  Branch (743:15): [True: 8.06k, False: 14.4k]
  ------------------
  744|  8.06k|            m1_param->m1_param_real[5][col][ps][pb] = m1_param->m1_param_real[2][col][ps][pb];
  745|  8.06k|            if (m1_param_imag_present)
  ------------------
  |  Branch (745:17): [True: 1.58k, False: 6.47k]
  ------------------
  746|  1.58k|              m1_param->m1_param_imag[5][col][ps][pb] = m1_param->m1_param_imag[2][col][ps][pb];
  747|       |
  748|  8.06k|            curr_state->m1_param_present[5][col] = 1;
  749|  14.4k|          } else {
  750|  14.4k|            m1_param->m1_param_real[5][col][ps][pb] = 0;
  751|  14.4k|            if (m1_param_imag_present) m1_param->m1_param_imag[5][col][ps][pb] = 0;
  ------------------
  |  Branch (751:17): [True: 7.04k, False: 7.42k]
  ------------------
  752|  14.4k|          }
  753|       |
  754|  22.5k|          m1_param->m1_param_real[6][col][ps][pb] =
  755|  22.5k|              ixheaacd_mps_mult32_shr_15(m1_param->m1_param_real[0][col][ps][pb], c_2_L[pb]);
  756|  22.5k|          m1_param->m1_param_real[7][col][ps][pb] =
  757|  22.5k|              ixheaacd_mps_mult32_shr_15(m1_param->m1_param_real[1][col][ps][pb], c_2_R[pb]);
  758|       |
  759|  22.5k|          if (m1_param_imag_present) {
  ------------------
  |  Branch (759:15): [True: 8.63k, False: 13.8k]
  ------------------
  760|  8.63k|            m1_param->m1_param_imag[6][col][ps][pb] =
  761|  8.63k|                ixheaacd_mps_mult32_shr_15(m1_param->m1_param_imag[0][col][ps][pb], c_2_L[pb]);
  762|  8.63k|            m1_param->m1_param_imag[7][col][ps][pb] =
  763|  8.63k|                ixheaacd_mps_mult32_shr_15(m1_param->m1_param_imag[1][col][ps][pb], c_2_R[pb]);
  764|  8.63k|          }
  765|       |
  766|  22.5k|          curr_state->m1_param_present[6][col] = 1;
  767|  22.5k|          curr_state->m1_param_present[7][col] = 1;
  768|  22.5k|        }
  769|  10.8k|      }
  770|  1.35k|    }
  771|       |
  772|  6.72k|    for (pb = 0; pb < p_aux_struct->num_ott_bands[0]; pb++) {
  ------------------
  |  Branch (772:18): [True: 6.04k, False: 676]
  ------------------
  773|  6.04k|      ia_mps_dec_spatial_bs_frame_struct *p_cur_bs = pstr_mps_state->bs_frame;
  774|  6.04k|      c_l_clfe[pb] = pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr
  775|  6.04k|                         ->r1_matrix_l[p_cur_bs->ott_cld_idx[0][ps][pb] + 15];
  776|  6.04k|      c_r_clfe[pb] = pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr
  777|  6.04k|                         ->r1_matrix_l[15 - p_cur_bs->ott_cld_idx[0][ps][pb]];
  778|  6.04k|    }
  779|  4.42k|    for (pb = p_aux_struct->num_ott_bands[0]; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (779:47): [True: 3.74k, False: 676]
  ------------------
  780|  3.74k|      c_l_clfe[pb] = ONE_IN_Q15;
  ------------------
  |  |   41|  3.74k|#define ONE_IN_Q15 (32768)
  ------------------
  781|  3.74k|      c_r_clfe[pb] = 0;
  782|  3.74k|    }
  783|       |
  784|  9.46k|    for (pb = 0; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (784:18): [True: 8.79k, False: 676]
  ------------------
  785|  8.79k|      idx = 0;
  786|       |
  787|  8.79k|      m2_param->m2_decor_real[idx++][ps][pb] = h12_l[pb];
  788|  8.79k|      if (enable_additionals) {
  ------------------
  |  Branch (788:11): [True: 2.55k, False: 6.23k]
  ------------------
  789|  2.55k|        pos[0] = idx++;
  790|  2.55k|      }
  791|  8.79k|      m2_param->m2_decor_real[idx++][ps][pb] = ixheaacd_mps_mult32_shr_15(h11_ls[pb], h22_l[pb]);
  792|  8.79k|      m2_param->m2_decor_real[idx++][ps][pb] = h12_ls[pb];
  793|  8.79k|      m2_param->m2_decor_real[idx++][ps][pb] = ixheaacd_mps_mult32_shr_15(h21_ls[pb], h22_l[pb]);
  794|  8.79k|      m2_param->m2_decor_real[idx++][ps][pb] = h22_ls[pb];
  795|  8.79k|      m2_param->m2_decor_real[idx++][ps][pb] = h12_r[pb];
  796|  8.79k|      if (enable_additionals) {
  ------------------
  |  Branch (796:11): [True: 2.55k, False: 6.23k]
  ------------------
  797|  2.55k|        pos[1] = idx++;
  798|  2.55k|      }
  799|  8.79k|      m2_param->m2_decor_real[idx++][ps][pb] = ixheaacd_mps_mult32_shr_15(h11_rs[pb], h22_r[pb]);
  800|  8.79k|      m2_param->m2_decor_real[idx++][ps][pb] = h12_rs[pb];
  801|  8.79k|      m2_param->m2_decor_real[idx++][ps][pb] = ixheaacd_mps_mult32_shr_15(h21_rs[pb], h22_r[pb]);
  802|  8.79k|      m2_param->m2_decor_real[idx++][ps][pb] = h22_rs[pb];
  803|  8.79k|      if (enable_additionals) {
  ------------------
  |  Branch (803:11): [True: 2.55k, False: 6.23k]
  ------------------
  804|  2.55k|        pos[2] = idx++;
  805|  2.55k|      }
  806|  8.79k|    }
  807|       |
  808|  9.46k|    for (pb = 0; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (808:18): [True: 8.79k, False: 676]
  ------------------
  809|  8.79k|      idx = 0;
  810|  8.79k|      m2_param->m2_resid_real[idx][ps][pb] = h11_l[pb];
  811|  8.79k|      pos_resid[0] = idx++;
  812|       |
  813|  8.79k|      if (residual_coding) m2_param->m2_resid_real[idx++][ps][pb] = h12_res_l[pb];
  ------------------
  |  Branch (813:11): [True: 439, False: 8.35k]
  ------------------
  814|       |
  815|  8.79k|      m2_param->m2_resid_real[idx++][ps][pb] = ixheaacd_mps_mult32_shr_15(h11_ls[pb], h21_l[pb]);
  816|       |
  817|  8.79k|      if (residual_coding) {
  ------------------
  |  Branch (817:11): [True: 439, False: 8.35k]
  ------------------
  818|    439|        m2_param->m2_resid_real[idx++][ps][pb] =
  819|    439|            ixheaacd_mps_mult32_shr_15(h11_ls[pb], h22_res_l[pb]);
  820|    439|        m2_param->m2_resid_real[idx++][ps][pb] = h12_res_ls[pb];
  821|    439|      }
  822|       |
  823|  8.79k|      m2_param->m2_resid_real[idx++][ps][pb] = ixheaacd_mps_mult32_shr_15(h21_ls[pb], h21_l[pb]);
  824|       |
  825|  8.79k|      if (residual_coding) {
  ------------------
  |  Branch (825:11): [True: 439, False: 8.35k]
  ------------------
  826|    439|        m2_param->m2_resid_real[idx++][ps][pb] =
  827|    439|            ixheaacd_mps_mult32_shr_15(h21_ls[pb], h22_res_l[pb]);
  828|    439|        m2_param->m2_resid_real[idx++][ps][pb] = h22_res_ls[pb];
  829|    439|      }
  830|       |
  831|  8.79k|      m2_param->m2_resid_real[idx][ps][pb] = h11_r[pb];
  832|  8.79k|      pos_resid[1] = idx++;
  833|       |
  834|  8.79k|      if (residual_coding) m2_param->m2_resid_real[idx++][ps][pb] = h12_res_r[pb];
  ------------------
  |  Branch (834:11): [True: 439, False: 8.35k]
  ------------------
  835|       |
  836|  8.79k|      m2_param->m2_resid_real[idx++][ps][pb] = ixheaacd_mps_mult32_shr_15(h11_rs[pb], h21_r[pb]);
  837|       |
  838|  8.79k|      if (residual_coding) {
  ------------------
  |  Branch (838:11): [True: 439, False: 8.35k]
  ------------------
  839|    439|        m2_param->m2_resid_real[idx++][ps][pb] =
  840|    439|            ixheaacd_mps_mult32_shr_15(h11_rs[pb], h22_res_r[pb]);
  841|    439|        m2_param->m2_resid_real[idx++][ps][pb] = h12_res_rs[pb];
  842|    439|      }
  843|       |
  844|  8.79k|      m2_param->m2_resid_real[idx++][ps][pb] = ixheaacd_mps_mult32_shr_15(h21_rs[pb], h21_r[pb]);
  845|       |
  846|  8.79k|      if (residual_coding) {
  ------------------
  |  Branch (846:11): [True: 439, False: 8.35k]
  ------------------
  847|    439|        m2_param->m2_resid_real[idx++][ps][pb] =
  848|    439|            ixheaacd_mps_mult32_shr_15(h21_rs[pb], h22_res_r[pb]);
  849|    439|        m2_param->m2_resid_real[idx++][ps][pb] = h22_res_rs[pb];
  850|    439|      }
  851|       |
  852|  8.79k|      m2_param->m2_resid_real[idx][ps][pb] = c_l_clfe[pb];
  853|  8.79k|      pos_resid[2] = idx++;
  854|       |
  855|  8.79k|      m2_param->m2_resid_real[idx++][ps][pb] = c_r_clfe[pb];
  856|  8.79k|    }
  857|       |
  858|  9.46k|    for (pb = 0; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (858:18): [True: 8.79k, False: 676]
  ------------------
  859|  8.79k|      ia_mps_dec_spatial_bs_frame_struct *p_cur_bs = pstr_mps_state->bs_frame;
  860|       |
  861|  8.79k|      kappa[pb] = p_aux_struct->ttt_icc[0][ps][pb];
  862|  8.79k|      g_dd[pb] = pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr
  863|  8.79k|                     ->table_kappa[p_cur_bs->ttt_icc_idx[0][ps][pb]];
  864|  8.79k|    }
  865|       |
  866|  2.02k|    for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (866:17): [True: 1.35k, False: 676]
  ------------------
  867|  1.35k|      for (pb = p_aux_struct->ttt_config[i][0].start_band;
  868|  12.2k|           pb < p_aux_struct->ttt_config[i][0].stop_band; pb++) {
  ------------------
  |  Branch (868:12): [True: 10.8k, False: 1.35k]
  ------------------
  869|  10.8k|        if (p_aux_struct->ttt_config[i][0].mode == 0 && pb >= pstr_mps_state->res_bands[5]) {
  ------------------
  |  Branch (869:13): [True: 3.89k, False: 6.99k]
  |  Branch (869:57): [True: 3.65k, False: 240]
  ------------------
  870|  3.65k|          if (p_aux_struct->ttt_config[i][0].use_ttt_decorr) {
  ------------------
  |  Branch (870:15): [True: 3.65k, False: 0]
  ------------------
  871|  3.65k|            m2_param->m2_decor_real[pos[0]][ps][pb] =
  872|  3.65k|                ixheaacd_mps_mult32_shr_15(g_dd[pb], c_1_L[pb]);
  873|       |
  874|  3.65k|            m2_param->m2_decor_real[pos[1]][ps][pb] =
  875|  3.65k|                ixheaacd_mps_mult32_shr_15(g_dd[pb], c_1_R[pb]);
  876|       |
  877|  3.65k|            temp_1 = ixheaacd_mps_mult32_shr_15(g_dd[pb], c_l_clfe[pb]);
  878|  3.65k|            temp_2 = MINUS_SQRT_2_Q30;
  ------------------
  |  |   47|  3.65k|#define MINUS_SQRT_2_Q30 (-1518500250)
  ------------------
  879|  3.65k|            m2_param->m2_decor_real[pos[2]][ps][pb] = ixheaacd_mps_mult32_shr_30(temp_1, temp_2);
  880|       |
  881|  3.65k|            pstr_mps_state->m2_param_present[0][5] = 1;
  882|  3.65k|            pstr_mps_state->m2_param_present[3][5] = 1;
  883|  3.65k|            pstr_mps_state->m2_param_present[6][5] = 1;
  884|       |
  885|  3.65k|            m2_param->m2_resid_real[pos_resid[0]][ps][pb] = ixheaacd_mps_mult32_shr_15(
  886|  3.65k|                m2_param->m2_resid_real[pos_resid[0]][ps][pb], kappa[pb]);
  887|  3.65k|            m2_param->m2_resid_real[pos_resid[1]][ps][pb] = ixheaacd_mps_mult32_shr_15(
  888|  3.65k|                m2_param->m2_resid_real[pos_resid[1]][ps][pb], kappa[pb]);
  889|  3.65k|            m2_param->m2_resid_real[pos_resid[2]][ps][pb] = ixheaacd_mps_mult32_shr_15(
  890|  3.65k|                m2_param->m2_resid_real[pos_resid[2]][ps][pb], kappa[pb]);
  891|  3.65k|          }
  892|  3.65k|        }
  893|  10.8k|      }
  894|  1.35k|    }
  895|    676|  }
  896|    305|  return;
  897|    305|}

ixheaacd_calc_m1m2_7571:
   45|    527|VOID ixheaacd_calc_m1m2_7571(ia_heaac_mps_state_struct *pstr_mps_state) {
   46|    527|  ia_mps_dec_auxilary_struct *p_aux_struct = pstr_mps_state->aux_struct;
   47|    527|  ia_mps_dec_m2_param_struct *m2_param = p_aux_struct->m2_param;
   48|    527|  ia_mps_dec_m1_param_struct *m1_param = pstr_mps_state->array_struct->m1_param;
   49|    527|  WORD32 ps, pb;
   50|       |
   51|    527|  WORD32 *h11_l, *h11_r, *h12_l, *h12_r, *h21_l, *h21_r, *h22_l, *h22_r, *h12_res_l, *h12_res_r,
   52|    527|      *h22_res_l, *h22_res_r;
   53|    527|  WORD16 *c_f_l, *c_f_r, *dummy;
   54|       |
   55|    527|  WORD32 idx;
   56|    527|  WORD32 residual_coding = pstr_mps_state->residual_coding;
   57|    527|  WORD32 num_parameter_sets = pstr_mps_state->num_parameter_sets;
   58|    527|  WORD32 num_parameter_bands = pstr_mps_state->num_parameter_bands;
   59|       |
   60|    527|  h11_l = pstr_mps_state->mps_scratch_mem_v;
   61|    527|  h11_r =
   62|    527|      h11_l + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h11_r), BYTE_ALIGN_8);
  ------------------
  |  |   89|    527|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
   63|    527|  h12_l =
   64|    527|      h11_r + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h12_l), BYTE_ALIGN_8);
  ------------------
  |  |   89|    527|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
   65|    527|  h12_r =
   66|    527|      h12_l + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h12_r), BYTE_ALIGN_8);
  ------------------
  |  |   89|    527|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
   67|    527|  h21_l =
   68|    527|      h12_r + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h21_l), BYTE_ALIGN_8);
  ------------------
  |  |   89|    527|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
   69|    527|  h21_r =
   70|    527|      h21_l + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h21_r), BYTE_ALIGN_8);
  ------------------
  |  |   89|    527|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
   71|    527|  h22_l =
   72|    527|      h21_r + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h22_l), BYTE_ALIGN_8);
  ------------------
  |  |   89|    527|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
   73|    527|  h22_r =
   74|    527|      h22_l + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h22_r), BYTE_ALIGN_8);
  ------------------
  |  |   89|    527|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
   75|    527|  h12_res_l = h22_r + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h12_res_l),
  ------------------
  |  |   89|    527|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
   76|    527|                                                    BYTE_ALIGN_8);
   77|    527|  h12_res_r = h12_res_l + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h12_res_r),
  ------------------
  |  |   89|    527|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
   78|    527|                                                        BYTE_ALIGN_8);
   79|    527|  h22_res_l = h12_res_r + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h22_res_l),
  ------------------
  |  |   89|    527|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
   80|    527|                                                        BYTE_ALIGN_8);
   81|    527|  h22_res_r = h22_res_l + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h22_res_r),
  ------------------
  |  |   89|    527|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
   82|    527|                                                        BYTE_ALIGN_8);
   83|       |
   84|    527|  c_f_l = (WORD16 *)pstr_mps_state->mps_scratch_mem_v +
   85|    527|          IXHEAAC_GET_SIZE_ALIGNED_TYPE(PARAMETER_BANDSX24, sizeof(*c_f_l), BYTE_ALIGN_8);
  ------------------
  |  |   89|    527|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
   86|    527|  c_f_r =
   87|    527|      c_f_l + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*c_f_r), BYTE_ALIGN_8);
  ------------------
  |  |   89|    527|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
   88|    527|  dummy =
   89|    527|      c_f_r + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*dummy), BYTE_ALIGN_8);
  ------------------
  |  |   89|    527|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
   90|       |
   91|  1.57k|  for (ps = 0; ps < num_parameter_sets; ps++) {
  ------------------
  |  Branch (91:16): [True: 1.04k, False: 527]
  ------------------
   92|  1.04k|    ixheaacd_param_2_umx_ps(pstr_mps_state, h11_l, h12_l, h21_l, h22_l, h12_res_l, h22_res_l,
   93|  1.04k|                            c_f_l, dummy, 0, ps, pstr_mps_state->res_bands[0]);
   94|  1.04k|    ixheaacd_param_2_umx_ps(pstr_mps_state, h11_r, h12_r, h21_r, h22_r, h12_res_r, h22_res_r,
   95|  1.04k|                            c_f_r, dummy, 1, ps, pstr_mps_state->res_bands[1]);
   96|       |
   97|  20.0k|    for (pb = 0; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (97:18): [True: 18.9k, False: 1.04k]
  ------------------
   98|  18.9k|      m1_param->m1_param_real[0][0][ps][pb] = ONE_IN_Q15;
  ------------------
  |  |   41|  18.9k|#define ONE_IN_Q15 (32768)
  ------------------
   99|  18.9k|      m1_param->m1_param_real[1][1][ps][pb] = ONE_IN_Q15;
  ------------------
  |  |   41|  18.9k|#define ONE_IN_Q15 (32768)
  ------------------
  100|  18.9k|      m1_param->m1_param_real[2][2][ps][pb] = ONE_IN_Q15;
  ------------------
  |  |   41|  18.9k|#define ONE_IN_Q15 (32768)
  ------------------
  101|  18.9k|      m1_param->m1_param_real[3][3][ps][pb] = ONE_IN_Q15;
  ------------------
  |  |   41|  18.9k|#define ONE_IN_Q15 (32768)
  ------------------
  102|  18.9k|      m1_param->m1_param_real[4][4][ps][pb] = ONE_IN_Q15;
  ------------------
  |  |   41|  18.9k|#define ONE_IN_Q15 (32768)
  ------------------
  103|  18.9k|      m1_param->m1_param_real[5][5][ps][pb] = ONE_IN_Q15;
  ------------------
  |  |   41|  18.9k|#define ONE_IN_Q15 (32768)
  ------------------
  104|  18.9k|      m1_param->m1_param_real[6][0][ps][pb] = ONE_IN_Q15;
  ------------------
  |  |   41|  18.9k|#define ONE_IN_Q15 (32768)
  ------------------
  105|  18.9k|      m1_param->m1_param_real[7][1][ps][pb] = ONE_IN_Q15;
  ------------------
  |  |   41|  18.9k|#define ONE_IN_Q15 (32768)
  ------------------
  106|  18.9k|    }
  107|       |
  108|  1.04k|    memcpy(m2_param->m2_decor_real[0][ps], h12_l, num_parameter_bands * sizeof(h12_l[0]));
  109|  1.04k|    memcpy(m2_param->m2_decor_real[1][ps], h22_l, num_parameter_bands * sizeof(h22_l[0]));
  110|  1.04k|    memcpy(m2_param->m2_decor_real[2][ps], h12_r, num_parameter_bands * sizeof(h12_r[0]));
  111|  1.04k|    memcpy(m2_param->m2_decor_real[3][ps], h22_r, num_parameter_bands * sizeof(h22_r[0]));
  112|       |
  113|  20.0k|    for (pb = 0; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (113:18): [True: 18.9k, False: 1.04k]
  ------------------
  114|  18.9k|      idx = 0;
  115|       |
  116|  18.9k|      m2_param->m2_resid_real[idx++][ps][pb] = h11_l[pb];
  117|       |
  118|  18.9k|      if (residual_coding) m2_param->m2_resid_real[idx++][ps][pb] = h12_res_l[pb];
  ------------------
  |  Branch (118:11): [True: 56, False: 18.8k]
  ------------------
  119|       |
  120|  18.9k|      m2_param->m2_resid_real[idx++][ps][pb] = h21_l[pb];
  121|       |
  122|  18.9k|      if (residual_coding) m2_param->m2_resid_real[idx++][ps][pb] = h22_res_l[pb];
  ------------------
  |  Branch (122:11): [True: 56, False: 18.8k]
  ------------------
  123|       |
  124|  18.9k|      m2_param->m2_resid_real[idx++][ps][pb] = ONE_IN_Q15;
  ------------------
  |  |   41|  18.9k|#define ONE_IN_Q15 (32768)
  ------------------
  125|       |
  126|  18.9k|      m2_param->m2_resid_real[idx++][ps][pb] = h11_r[pb];
  127|       |
  128|  18.9k|      if (residual_coding) m2_param->m2_resid_real[idx++][ps][pb] = h12_res_r[pb];
  ------------------
  |  Branch (128:11): [True: 56, False: 18.8k]
  ------------------
  129|       |
  130|  18.9k|      m2_param->m2_resid_real[idx++][ps][pb] = h21_r[pb];
  131|       |
  132|  18.9k|      if (residual_coding) m2_param->m2_resid_real[idx++][ps][pb] = h22_res_r[pb];
  ------------------
  |  Branch (132:11): [True: 56, False: 18.8k]
  ------------------
  133|       |
  134|  18.9k|      m2_param->m2_resid_real[idx++][ps][pb] = ONE_IN_Q15;
  ------------------
  |  |   41|  18.9k|#define ONE_IN_Q15 (32768)
  ------------------
  135|       |
  136|  18.9k|      m2_param->m2_resid_real[idx++][ps][pb] = ONE_IN_Q15;
  ------------------
  |  |   41|  18.9k|#define ONE_IN_Q15 (32768)
  ------------------
  137|       |
  138|  18.9k|      m2_param->m2_resid_real[idx++][ps][pb] = ONE_IN_Q15;
  ------------------
  |  |   41|  18.9k|#define ONE_IN_Q15 (32768)
  ------------------
  139|  18.9k|    }
  140|  1.04k|  }
  141|    527|  return;
  142|    527|}
ixheaacd_calc_m1m2_7572:
  144|  9.71k|VOID ixheaacd_calc_m1m2_7572(ia_heaac_mps_state_struct *pstr_mps_state) {
  145|  9.71k|  ia_mps_dec_auxilary_struct *p_aux_struct = pstr_mps_state->aux_struct;
  146|  9.71k|  ia_mps_dec_m2_param_struct *m2_param = p_aux_struct->m2_param;
  147|  9.71k|  ia_mps_dec_m1_param_struct *m1_param = pstr_mps_state->array_struct->m1_param;
  148|  9.71k|  WORD32 ps, pb;
  149|  9.71k|  WORD32 *h11_l, *h11_r, *h12_l, *h12_r, *h21_l, *h21_r, *h22_l, *h22_r, *h12_res_l, *h12_res_r,
  150|  9.71k|      *h22_res_l, *h22_res_r;
  151|  9.71k|  WORD16 *c_f_l, *c_f_r, *dummy;
  152|       |
  153|  9.71k|  WORD32 idx;
  154|  9.71k|  WORD32 residual_coding = pstr_mps_state->residual_coding;
  155|  9.71k|  WORD32 num_parameter_sets = pstr_mps_state->num_parameter_sets;
  156|  9.71k|  WORD32 num_parameter_bands = pstr_mps_state->num_parameter_bands;
  157|       |
  158|  9.71k|  h11_l = pstr_mps_state->mps_scratch_mem_v;
  159|  9.71k|  h11_r =
  160|  9.71k|      h11_l + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h11_r), BYTE_ALIGN_8);
  ------------------
  |  |   89|  9.71k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  161|  9.71k|  h12_l =
  162|  9.71k|      h11_r + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h12_l), BYTE_ALIGN_8);
  ------------------
  |  |   89|  9.71k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  163|  9.71k|  h12_r =
  164|  9.71k|      h12_l + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h12_r), BYTE_ALIGN_8);
  ------------------
  |  |   89|  9.71k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  165|  9.71k|  h21_l =
  166|  9.71k|      h12_r + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h21_l), BYTE_ALIGN_8);
  ------------------
  |  |   89|  9.71k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  167|  9.71k|  h21_r =
  168|  9.71k|      h21_l + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h21_r), BYTE_ALIGN_8);
  ------------------
  |  |   89|  9.71k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  169|  9.71k|  h22_l =
  170|  9.71k|      h21_r + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h22_l), BYTE_ALIGN_8);
  ------------------
  |  |   89|  9.71k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  171|  9.71k|  h22_r =
  172|  9.71k|      h22_l + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h22_r), BYTE_ALIGN_8);
  ------------------
  |  |   89|  9.71k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  173|  9.71k|  h12_res_l = h22_r + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h12_res_l),
  ------------------
  |  |   89|  9.71k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  174|  9.71k|                                                    BYTE_ALIGN_8);
  175|  9.71k|  h12_res_r = h12_res_l + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h12_res_r),
  ------------------
  |  |   89|  9.71k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  176|  9.71k|                                                        BYTE_ALIGN_8);
  177|  9.71k|  h22_res_l = h12_res_r + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h22_res_l),
  ------------------
  |  |   89|  9.71k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  178|  9.71k|                                                        BYTE_ALIGN_8);
  179|  9.71k|  h22_res_r = h22_res_l + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*h22_res_r),
  ------------------
  |  |   89|  9.71k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  180|  9.71k|                                                        BYTE_ALIGN_8);
  181|       |
  182|  9.71k|  c_f_l = (WORD16 *)pstr_mps_state->mps_scratch_mem_v +
  183|  9.71k|          IXHEAAC_GET_SIZE_ALIGNED_TYPE(PARAMETER_BANDSX24, sizeof(*c_f_l), BYTE_ALIGN_8);
  ------------------
  |  |   89|  9.71k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  184|  9.71k|  c_f_r =
  185|  9.71k|      c_f_l + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*c_f_r), BYTE_ALIGN_8);
  ------------------
  |  |   89|  9.71k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  186|  9.71k|  dummy =
  187|  9.71k|      c_f_r + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*dummy), BYTE_ALIGN_8);
  ------------------
  |  |   89|  9.71k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  188|       |
  189|  25.0k|  for (ps = 0; ps < num_parameter_sets; ps++) {
  ------------------
  |  Branch (189:16): [True: 15.3k, False: 9.71k]
  ------------------
  190|  15.3k|    ixheaacd_param_2_umx_ps(pstr_mps_state, h11_l, h12_l, h21_l, h22_l, h12_res_l, h22_res_l,
  191|  15.3k|                            c_f_l, dummy, 0, ps, pstr_mps_state->res_bands[0]);
  192|  15.3k|    ixheaacd_param_2_umx_ps(pstr_mps_state, h11_r, h12_r, h21_r, h22_r, h12_res_r, h22_res_r,
  193|  15.3k|                            c_f_r, dummy, 1, ps, pstr_mps_state->res_bands[1]);
  194|       |
  195|   317k|    for (pb = 0; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (195:18): [True: 302k, False: 15.3k]
  ------------------
  196|   302k|      m1_param->m1_param_real[0][0][ps][pb] = ONE_IN_Q15;
  ------------------
  |  |   41|   302k|#define ONE_IN_Q15 (32768)
  ------------------
  197|   302k|      m1_param->m1_param_real[1][1][ps][pb] = ONE_IN_Q15;
  ------------------
  |  |   41|   302k|#define ONE_IN_Q15 (32768)
  ------------------
  198|   302k|      m1_param->m1_param_real[2][2][ps][pb] = ONE_IN_Q15;
  ------------------
  |  |   41|   302k|#define ONE_IN_Q15 (32768)
  ------------------
  199|   302k|      m1_param->m1_param_real[3][3][ps][pb] = ONE_IN_Q15;
  ------------------
  |  |   41|   302k|#define ONE_IN_Q15 (32768)
  ------------------
  200|   302k|      m1_param->m1_param_real[4][4][ps][pb] = ONE_IN_Q15;
  ------------------
  |  |   41|   302k|#define ONE_IN_Q15 (32768)
  ------------------
  201|   302k|      m1_param->m1_param_real[5][5][ps][pb] = ONE_IN_Q15;
  ------------------
  |  |   41|   302k|#define ONE_IN_Q15 (32768)
  ------------------
  202|   302k|      m1_param->m1_param_real[6][4][ps][pb] = ONE_IN_Q15;
  ------------------
  |  |   41|   302k|#define ONE_IN_Q15 (32768)
  ------------------
  203|   302k|      m1_param->m1_param_real[7][5][ps][pb] = ONE_IN_Q15;
  ------------------
  |  |   41|   302k|#define ONE_IN_Q15 (32768)
  ------------------
  204|   302k|    }
  205|       |
  206|  15.3k|    memcpy(m2_param->m2_decor_real[0][ps], h22_l, num_parameter_bands * sizeof(h22_l[0]));
  207|  15.3k|    memcpy(m2_param->m2_decor_real[1][ps], h12_l, num_parameter_bands * sizeof(h12_l[0]));
  208|  15.3k|    memcpy(m2_param->m2_decor_real[2][ps], h22_r, num_parameter_bands * sizeof(h22_r[0]));
  209|  15.3k|    memcpy(m2_param->m2_decor_real[3][ps], h12_r, num_parameter_bands * sizeof(h12_r[0]));
  210|       |
  211|   317k|    for (pb = 0; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (211:18): [True: 302k, False: 15.3k]
  ------------------
  212|   302k|      idx = 0;
  213|       |
  214|   302k|      m2_param->m2_resid_real[idx++][ps][pb] = ONE_IN_Q15;
  ------------------
  |  |   41|   302k|#define ONE_IN_Q15 (32768)
  ------------------
  215|       |
  216|   302k|      m2_param->m2_resid_real[idx++][ps][pb] = h21_l[pb];
  217|       |
  218|   302k|      if (residual_coding) m2_param->m2_resid_real[idx++][ps][pb] = h22_res_l[pb];
  ------------------
  |  Branch (218:11): [True: 525, False: 301k]
  ------------------
  219|       |
  220|   302k|      m2_param->m2_resid_real[idx++][ps][pb] = h11_l[pb];
  221|       |
  222|   302k|      if (residual_coding) m2_param->m2_resid_real[idx++][ps][pb] = h12_res_l[pb];
  ------------------
  |  Branch (222:11): [True: 525, False: 301k]
  ------------------
  223|       |
  224|   302k|      m2_param->m2_resid_real[idx++][ps][pb] = ONE_IN_Q15;
  ------------------
  |  |   41|   302k|#define ONE_IN_Q15 (32768)
  ------------------
  225|       |
  226|   302k|      m2_param->m2_resid_real[idx++][ps][pb] = h21_r[pb];
  227|       |
  228|   302k|      if (residual_coding) m2_param->m2_resid_real[idx++][ps][pb] = h22_res_r[pb];
  ------------------
  |  Branch (228:11): [True: 525, False: 301k]
  ------------------
  229|       |
  230|   302k|      m2_param->m2_resid_real[idx++][ps][pb] = h11_r[pb];
  231|       |
  232|   302k|      if (residual_coding) m2_param->m2_resid_real[idx++][ps][pb] = h12_res_r[pb];
  ------------------
  |  Branch (232:11): [True: 525, False: 301k]
  ------------------
  233|       |
  234|   302k|      m2_param->m2_resid_real[idx++][ps][pb] = ONE_IN_Q15;
  ------------------
  |  |   41|   302k|#define ONE_IN_Q15 (32768)
  ------------------
  235|       |
  236|   302k|      m2_param->m2_resid_real[idx++][ps][pb] = ONE_IN_Q15;
  ------------------
  |  |   41|   302k|#define ONE_IN_Q15 (32768)
  ------------------
  237|   302k|    }
  238|  15.3k|  }
  239|  9.71k|  return;
  240|  9.71k|}

ixheaacd_mps_create:
   90|  2.22k|                           ia_usac_dec_mps_config_struct* mps212_config) {
   91|  2.22k|  WORD32 num_ch;
   92|  2.22k|  WORD32 err_code = 0;
   93|       |
   94|  2.22k|  ia_mps_bs_frame bs_frame;
   95|       |
   96|  2.22k|  self->num_parameter_sets = 1;
   97|  2.22k|  self->qmf_band_count = 64;
   98|       |
   99|  2.22k|  self->res_ch_count = 0;
  100|       |
  101|  2.22k|  if (mps212_config) {
  ------------------
  |  Branch (101:7): [True: 2.22k, False: 0]
  ------------------
  102|  2.22k|    self->config = mps212_config;
  103|  2.22k|    self->frame_length = bs_frame_len;
  104|  2.22k|    self->in_ch_count = 1;
  105|  2.22k|    self->out_ch_count = 2;
  106|  2.22k|    self->residual_coding = residual_coding;
  107|  2.22k|    if (self->residual_coding) {
  ------------------
  |  Branch (107:9): [True: 827, False: 1.40k]
  ------------------
  108|    827|      self->bs_residual_present = 1;
  109|    827|      self->bs_residual_bands = mps212_config->bs_residual_bands;
  110|    827|      if (self->config->bs_phase_coding) {
  ------------------
  |  Branch (110:11): [True: 573, False: 254]
  ------------------
  111|    573|        self->config->bs_phase_coding = 2;
  112|    573|      }
  113|    827|    }
  114|  2.22k|  }
  115|       |
  116|  2.22k|  err_code = ixheaacd_mps_header_decode(self);
  117|       |
  118|  2.22k|  if (err_code != IA_NO_ERROR) {
  ------------------
  |  |   23|  2.22k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (118:7): [True: 7, False: 2.22k]
  ------------------
  119|      7|    self->mps_init_done = 0;
  120|      7|    return err_code;
  121|      7|  }
  122|       |
  123|  2.22k|  if ((self->residual_coding) && (self->res_bands > 0)) self->res_ch_count++;
  ------------------
  |  Branch (123:7): [True: 827, False: 1.39k]
  |  Branch (123:34): [True: 601, False: 226]
  ------------------
  124|       |
  125|  2.22k|  ixheaacd_mps_env_init(self);
  126|       |
  127|  2.22k|  self->resolution = self->qmf_band_count;
  128|       |
  129|  6.66k|  for (num_ch = 0; num_ch < self->out_ch_count; num_ch++) {
  ------------------
  |  Branch (129:20): [True: 4.44k, False: 2.22k]
  ------------------
  130|  4.44k|    ixheaacd_mps_synt_init(self->qmf_filt_state[num_ch]);
  131|  4.44k|  }
  132|       |
  133|  2.22k|  ixheaacd_mps_qmf_hybrid_analysis_init(&self->hyb_filt_state[0]);
  134|       |
  135|  2.22k|  if ((self->residual_coding) && (self->res_bands > 0))
  ------------------
  |  Branch (135:7): [True: 827, False: 1.39k]
  |  Branch (135:34): [True: 601, False: 226]
  ------------------
  136|    601|    ixheaacd_mps_qmf_hybrid_analysis_init(&self->hyb_filt_state[1]);
  137|       |
  138|  2.22k|  err_code = ixheaacd_mps_decor_init(&(self->mps_decor), self->hyb_band_count_max,
  139|  2.22k|                                     self->config->bs_decorr_config,
  140|  2.22k|                                     self->object_type);
  141|       |
  142|  2.22k|  if (err_code != IA_NO_ERROR) {
  ------------------
  |  |   23|  2.22k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (142:7): [True: 12, False: 2.21k]
  ------------------
  143|     12|    self->mps_init_done = 0;
  144|     12|    return err_code;
  145|     12|  }
  146|       |
  147|  2.21k|  ixheaacd_mps_init_pre_and_post_matrix(self);
  148|       |
  149|  2.21k|  self->parse_nxt_frame = 1;
  150|       |
  151|  2.21k|  bs_frame = self->bs_frame;
  152|  2.21k|  memset(bs_frame.cld_idx_pre, 0, MAX_PARAMETER_BANDS * sizeof(WORD32));
  ------------------
  |  |   55|  2.21k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  153|  2.21k|  memset(bs_frame.icc_idx_pre, 0, MAX_PARAMETER_BANDS * sizeof(WORD32));
  ------------------
  |  |   55|  2.21k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  154|  2.21k|  memset(bs_frame.cmp_cld_idx_prev, 0, MAX_PARAMETER_BANDS * sizeof(WORD32));
  ------------------
  |  |   55|  2.21k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  155|  2.21k|  memset(bs_frame.cmp_icc_idx_prev, 0, MAX_PARAMETER_BANDS * sizeof(WORD32));
  ------------------
  |  |   55|  2.21k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  156|       |
  157|  2.21k|  self->subband_var.init_flag = 0;
  158|  2.21k|  self->subband_var.update_old_ener = 0;
  159|  2.21k|  self->subband_var.nrg_dir = 0;
  160|  2.21k|  memset(self->subband_var.nrg_diff, 0, 2 * sizeof(FLOAT32));
  161|       |
  162|  2.21k|  memset(self->opd_smooth.smooth_l_phase, 0,
  163|  2.21k|         MAX_PARAMETER_BANDS * sizeof(WORD32));
  ------------------
  |  |   55|  2.21k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  164|  2.21k|  memset(self->opd_smooth.smooth_r_phase, 0,
  165|  2.21k|         MAX_PARAMETER_BANDS * sizeof(WORD32));
  ------------------
  |  |   55|  2.21k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  166|  2.21k|  self->mps_init_done = 1;
  167|       |
  168|  2.21k|  return 0;
  169|  2.22k|}
ixheaacd_mps_qmf_hyb_analysis:
  179|  15.1k|VOID ixheaacd_mps_qmf_hyb_analysis(ia_mps_dec_state_struct* self) {
  180|  15.1k|  if (self->object_type == AOT_ER_AAC_ELD ||
  ------------------
  |  Branch (180:7): [True: 2.15k, False: 13.0k]
  ------------------
  181|  13.0k|      self->object_type == AOT_ER_AAC_LD) {
  ------------------
  |  Branch (181:7): [True: 0, False: 13.0k]
  ------------------
  182|  2.15k|    WORD32 k, n;
  183|       |
  184|  43.8k|    for (n = 0; n < self->time_slots; n++) {
  ------------------
  |  Branch (184:17): [True: 41.6k, False: 2.15k]
  ------------------
  185|  2.36M|      for (k = 0; k < self->qmf_band_count; k++) {
  ------------------
  |  Branch (185:19): [True: 2.32M, False: 41.6k]
  ------------------
  186|  2.32M|        self->hyb_in[0][k][n].re = self->qmf_in[0][n][k].re;
  187|  2.32M|        self->hyb_in[0][k][n].im = self->qmf_in[0][n][k].im;
  188|  2.32M|      }
  189|  41.6k|    }
  190|  13.0k|  } else {
  191|  13.0k|      ixheaacd_mps_qmf_hybrid_analysis(&self->hyb_filt_state[0], self->qmf_in[0],
  192|  13.0k|                                   self->qmf_band_count, self->time_slots,
  193|  13.0k|                                   self->hyb_in[0]);
  194|  13.0k|  }
  195|       |
  196|  15.1k|  if ((self->residual_coding) && (self->res_bands > 0)) {
  ------------------
  |  Branch (196:7): [True: 11.1k, False: 4.01k]
  |  Branch (196:34): [True: 9.29k, False: 1.86k]
  ------------------
  197|  9.29k|    ixheaacd_mps_qmf_hybrid_analysis(&self->hyb_filt_state[self->in_ch_count],
  198|  9.29k|                                     self->qmf_in[1], self->band_count[1],
  199|  9.29k|                                     self->time_slots, self->hyb_res);
  200|  9.29k|  }
  201|  15.1k|}
ixheaacd_mps_qmf_hyb_synthesis:
  203|  79.5k|VOID ixheaacd_mps_qmf_hyb_synthesis(ia_mps_dec_state_struct* self) {
  204|  79.5k|  WORD32 ch;
  205|       |
  206|  79.5k|  if (self->object_type == AOT_ER_AAC_ELD ||
  ------------------
  |  Branch (206:7): [True: 2.15k, False: 77.3k]
  ------------------
  207|  77.3k|      self->object_type == AOT_ER_AAC_LD) {
  ------------------
  |  Branch (207:7): [True: 0, False: 77.3k]
  ------------------
  208|  2.15k|    WORD32 k, n;
  209|  6.45k|    for (ch = 0; ch < self->out_ch_count; ch++) {
  ------------------
  |  Branch (209:18): [True: 4.30k, False: 2.15k]
  ------------------
  210|  87.6k|      for (n = 0; n < self->time_slots; n++) {
  ------------------
  |  Branch (210:19): [True: 83.3k, False: 4.30k]
  ------------------
  211|  4.73M|        for (k = 0; k < self->qmf_band_count; k++) {
  ------------------
  |  Branch (211:21): [True: 4.65M, False: 83.3k]
  ------------------
  212|  4.65M|          self->qmf_out_dir[ch][n][k].re = self->hyb_dir_out[ch][n][k].re;
  213|  4.65M|          self->qmf_out_dir[ch][n][k].im = self->hyb_dir_out[ch][n][k].im;
  214|  4.65M|        }
  215|  83.3k|      }
  216|  4.30k|    }
  217|  77.3k|  } else {
  218|   232k|      for (ch = 0; ch < self->out_ch_count; ch++) {
  ------------------
  |  Branch (218:20): [True: 154k, False: 77.3k]
  ------------------
  219|   154k|          ixheaacd_mps_qmf_hybrid_synthesis(self->hyb_dir_out[ch],
  220|   154k|                                      self->qmf_band_count, self->time_slots,
  221|   154k|                                      self->qmf_out_dir[ch]);
  222|   154k|      }
  223|  77.3k|  }
  224|  79.5k|}
ixheaacd_mps_decor:
  226|  15.1k|VOID ixheaacd_mps_decor(ia_mps_dec_state_struct* self) {
  227|  15.1k|  WORD32 k, sb_sample, idx;
  228|       |
  229|  15.1k|  ia_cmplx_flt_struct(*scratch)[MAX_HYBRID_BANDS_MPS];
  230|       |
  231|  15.1k|  ia_cmplx_flt_struct coeff;
  232|  15.1k|  WORD32 band_start = 7;
  233|       |
  234|  15.1k|  scratch = self->scratch;
  235|       |
  236|  30.3k|  for (k = self->dir_sig_count; k < self->dir_sig_count + self->decor_sig_count;
  ------------------
  |  Branch (236:33): [True: 15.1k, False: 15.1k]
  ------------------
  237|  15.1k|       k++) {
  238|  15.1k|    if (self->bs_tsd_enable) {
  ------------------
  |  Branch (238:9): [True: 8.89k, False: 6.27k]
  ------------------
  239|   437k|      for (sb_sample = 0; sb_sample < self->time_slots; sb_sample++) {
  ------------------
  |  Branch (239:27): [True: 428k, False: 8.89k]
  ------------------
  240|   428k|        if (self->bs_tsd_sep_data[sb_sample]) {
  ------------------
  |  Branch (240:13): [True: 61.0k, False: 367k]
  ------------------
  241|  1.66M|          for (idx = band_start; idx < self->mps_decor.num_bins; idx++) {
  ------------------
  |  Branch (241:34): [True: 1.60M, False: 61.0k]
  ------------------
  242|  1.60M|            scratch[sb_sample][idx].re = self->v[k][sb_sample][idx].re;
  243|  1.60M|            scratch[sb_sample][idx].im = self->v[k][sb_sample][idx].im;
  244|  1.60M|            self->v[k][sb_sample][idx].re = 0.0f;
  245|  1.60M|            self->v[k][sb_sample][idx].im = 0.0f;
  246|  1.60M|          }
  247|  61.0k|        }
  248|   428k|      }
  249|  8.89k|    }
  250|       |
  251|  15.1k|    ixheaacd_mps_decor_apply(&self->mps_decor, self->v[k], self->w_diff[k],
  252|  15.1k|                             self->time_slots, NO_RES_BANDS,
  ------------------
  |  |   45|  15.1k|#define NO_RES_BANDS -1
  ------------------
  253|  15.1k|                             self->ldmps_config.ldmps_present_flag);
  254|       |
  255|  15.1k|    if (self->bs_tsd_enable) {
  ------------------
  |  Branch (255:9): [True: 8.89k, False: 6.27k]
  ------------------
  256|   437k|      for (sb_sample = 0; sb_sample < self->time_slots; sb_sample++) {
  ------------------
  |  Branch (256:27): [True: 428k, False: 8.89k]
  ------------------
  257|   428k|        if (self->bs_tsd_sep_data[sb_sample]) {
  ------------------
  |  Branch (257:13): [True: 61.0k, False: 367k]
  ------------------
  258|  61.0k|          coeff.re = ixheaacd_tsd_mul_re[self->bs_tsd_tr_phase_data[sb_sample]];
  259|  61.0k|          coeff.im = ixheaacd_tsd_mul_im[self->bs_tsd_tr_phase_data[sb_sample]];
  260|       |
  261|  1.66M|          for (idx = band_start; idx < self->mps_decor.num_bins; idx++) {
  ------------------
  |  Branch (261:34): [True: 1.60M, False: 61.0k]
  ------------------
  262|  1.60M|            self->w_diff[k][sb_sample][idx].re +=
  263|  1.60M|                coeff.re * scratch[sb_sample][idx].re -
  264|  1.60M|                coeff.im * scratch[sb_sample][idx].im;
  265|  1.60M|            self->w_diff[k][sb_sample][idx].im +=
  266|  1.60M|                coeff.im * scratch[sb_sample][idx].re +
  267|  1.60M|                coeff.re * scratch[sb_sample][idx].im;
  268|  1.60M|          }
  269|  61.0k|        }
  270|   428k|      }
  271|  8.89k|    }
  272|  15.1k|  }
  273|  15.1k|}
ixheaacd_mps_mix_res_decor:
  275|  15.1k|VOID ixheaacd_mps_mix_res_decor(ia_mps_dec_state_struct* self) {
  276|  15.1k|  WORD32 ts, qs, row, indx;
  277|       |
  278|   675k|  for (ts = 0; ts < self->time_slots; ts++) {
  ------------------
  |  Branch (278:16): [True: 660k, False: 15.1k]
  ------------------
  279|  23.3M|    for (qs = 0; qs < self->hyb_band_count_max; qs++) {
  ------------------
  |  Branch (279:18): [True: 22.7M, False: 660k]
  ------------------
  280|  22.7M|      indx = self->hyb_band_to_processing_band_table[qs];
  281|       |
  282|  45.4M|      for (row = 0; row < self->dir_sig_count; row++) {
  ------------------
  |  Branch (282:21): [True: 22.7M, False: 22.7M]
  ------------------
  283|  22.7M|        self->w_dir[row][ts][qs].re = self->v[row][ts][qs].re;
  284|  22.7M|        self->w_dir[row][ts][qs].im = self->v[row][ts][qs].im;
  285|  22.7M|      }
  286|       |
  287|  22.7M|      for (row = self->dir_sig_count;
  288|  45.4M|           row < (self->dir_sig_count + self->decor_sig_count); row++) {
  ------------------
  |  Branch (288:12): [True: 22.7M, False: 22.7M]
  ------------------
  289|  22.7M|        if (indx < self->res_bands) {
  ------------------
  |  Branch (289:13): [True: 11.1M, False: 11.6M]
  ------------------
  290|  11.1M|          self->w_dir[row][ts][qs].re = self->hyb_res[qs][ts].re;
  291|  11.1M|          self->w_dir[row][ts][qs].im = self->hyb_res[qs][ts].im;
  292|  11.6M|        } else {
  293|  11.6M|          self->w_dir[row][ts][qs].re = 0.0f;
  294|  11.6M|          self->w_dir[row][ts][qs].im = 0.0f;
  295|  11.6M|        }
  296|  22.7M|      }
  297|       |
  298|  45.4M|      for (row = 0; row < self->dir_sig_count; row++) {
  ------------------
  |  Branch (298:21): [True: 22.7M, False: 22.7M]
  ------------------
  299|  22.7M|        self->w_diff[row][ts][qs].re = 0.0f;
  300|  22.7M|        self->w_diff[row][ts][qs].im = 0.0f;
  301|  22.7M|      }
  302|       |
  303|  22.7M|      for (row = self->dir_sig_count;
  304|  45.4M|           row < (self->dir_sig_count + self->decor_sig_count); row++) {
  ------------------
  |  Branch (304:12): [True: 22.7M, False: 22.7M]
  ------------------
  305|  22.7M|        if (indx < self->res_bands) {
  ------------------
  |  Branch (305:13): [True: 11.1M, False: 11.6M]
  ------------------
  306|  11.1M|          self->w_diff[row][ts][qs].re = 0.0f;
  307|  11.1M|          self->w_diff[row][ts][qs].im = 0.0f;
  308|  11.1M|        }
  309|  22.7M|      }
  310|  22.7M|    }
  311|   660k|  }
  312|  15.1k|}
ixheaacd_mps_mix_res_decor_residual_band:
  314|  27.1k|VOID ixheaacd_mps_mix_res_decor_residual_band(ia_mps_dec_state_struct* self) {
  315|  27.1k|  WORD32 ts, qs, indx;
  316|  1.43M|  for (qs = 0; qs < self->hyb_band_count_max; qs++) {
  ------------------
  |  Branch (316:16): [True: 1.40M, False: 27.1k]
  ------------------
  317|  1.40M|    indx = self->hyb_band_to_processing_band_table[qs];
  318|  1.40M|    if (indx >= self->res_bands) {
  ------------------
  |  Branch (318:9): [True: 920k, False: 483k]
  ------------------
  319|   920k|      if (qs < self->hyb_band_count[1]) {
  ------------------
  |  Branch (319:11): [True: 496k, False: 423k]
  ------------------
  320|  16.6M|        for (ts = 0; ts < self->time_slots; ts++) {
  ------------------
  |  Branch (320:22): [True: 16.1M, False: 496k]
  ------------------
  321|  16.1M|          self->w_dir[1][ts][qs].re = 0.0f;
  322|  16.1M|          self->w_dir[1][ts][qs].im = 0.0f;
  323|  16.1M|        }
  324|   496k|      }
  325|   920k|    } else {
  326|  22.4M|      for (ts = 0; ts < self->time_slots; ts++) {
  ------------------
  |  Branch (326:20): [True: 21.9M, False: 483k]
  ------------------
  327|  21.9M|        self->w_diff[1][ts][qs].re = 0.0f;
  328|  21.9M|        self->w_diff[1][ts][qs].im = 0.0f;
  329|  21.9M|      }
  330|   483k|    }
  331|  1.40M|  }
  332|  27.1k|}
ixheaacd_mps_create_w:
  334|  15.1k|VOID ixheaacd_mps_create_w(ia_mps_dec_state_struct* self) {
  335|  15.1k|  ixheaacd_mps_decor(self);
  336|  15.1k|  ixheaacd_mps_mix_res_decor(self);
  337|  15.1k|}
ixheaacd_mps_qmf_hyb_analysis_no_pre_mix:
  339|  64.3k|VOID ixheaacd_mps_qmf_hyb_analysis_no_pre_mix(ia_mps_dec_state_struct* self) {
  340|  64.3k|  ixheaacd_mps_qmf_hybrid_analysis_no_pre_mix(
  341|  64.3k|      &self->hyb_filt_state[0], self->qmf_in[0], self->band_count[0],
  342|  64.3k|      self->time_slots, self->w_dir[0]);
  343|       |
  344|  64.3k|  if (self->res_bands) {
  ------------------
  |  Branch (344:7): [True: 36.8k, False: 27.4k]
  ------------------
  345|  36.8k|    ixheaacd_mps_qmf_hybrid_analysis_no_pre_mix(
  346|  36.8k|        &self->hyb_filt_state[1], self->qmf_in[1], self->band_count[1],
  347|  36.8k|        self->time_slots, self->w_dir[1]);
  348|       |
  349|  36.8k|    if (self->res_bands != 28) {
  ------------------
  |  Branch (349:9): [True: 27.1k, False: 9.66k]
  ------------------
  350|  27.1k|      ixheaacd_mps_decor_apply(&self->mps_decor, self->w_dir[0],
  351|  27.1k|                               self->w_diff[1], self->time_slots,
  352|  27.1k|                               self->res_bands,
  353|  27.1k|                               self->ldmps_config.ldmps_present_flag);
  354|       |
  355|  27.1k|      ixheaacd_mps_mix_res_decor_residual_band(self);
  356|  27.1k|    }
  357|  36.8k|  } else {
  358|  27.4k|    ixheaacd_mps_decor_apply(&self->mps_decor, self->w_dir[0], self->w_diff[1],
  359|  27.4k|                             self->time_slots, NO_RES_BANDS,
  ------------------
  |  |   45|  27.4k|#define NO_RES_BANDS -1
  ------------------
  360|  27.4k|                             self->ldmps_config.ldmps_present_flag);
  361|  27.4k|  }
  362|  64.3k|}
ixheaacd_mps_apply:
  366|  77.4k|                          FLOAT32 (*output_buffer)[4096]) {
  367|  77.4k|  WORD32 ch, ts, qs;
  368|  77.4k|  WORD32 time_slots = self->time_slots;
  369|  77.4k|  WORD32 in_ch_count = self->in_ch_count + self->res_ch_count;
  370|  77.4k|  WORD32 err = 0;
  371|  77.4k|  self->hyb_band_count[0] = self->band_count[0] - QMF_BANDS_TO_HYBRID + 10;
  ------------------
  |  |   64|  77.4k|#define QMF_BANDS_TO_HYBRID (3)
  ------------------
  372|  77.4k|  self->hyb_band_count[1] = self->band_count[1] - QMF_BANDS_TO_HYBRID + 10;
  ------------------
  |  |   64|  77.4k|#define QMF_BANDS_TO_HYBRID (3)
  ------------------
  373|  77.4k|  self->hyb_band_count_max =
  374|  77.4k|      max(self->hyb_band_count[0], self->hyb_band_count[1]);
  ------------------
  |  |   74|  77.4k|#define max(a, b) (((a) > (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (74:20): [True: 24.8k, False: 52.5k]
  |  |  ------------------
  ------------------
  375|  77.4k|  self->mps_decor.decor_nrg_smooth.num_bins = self->hyb_band_count_max;
  376|  77.4k|  self->mps_decor.num_bins = self->hyb_band_count_max;
  377|  77.4k|  self->output_buffer = output_buffer;
  378|       |
  379|  77.4k|  err = ixheaacd_mps_frame_decode(self);
  380|       |
  381|  77.4k|  if (err != IA_NO_ERROR) return err;
  ------------------
  |  |   23|  77.4k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (381:7): [True: 54, False: 77.3k]
  ------------------
  382|       |
  383|  77.3k|  ixheaacd_pre_and_mix_matrix_calculation(self);
  384|       |
  385|  77.3k|  ixheaacd_mps_pre_matrix_mix_matrix_smoothing(self);
  386|       |
  387|   200k|  for (ch = 0; ch < in_ch_count; ch++) {
  ------------------
  |  Branch (387:16): [True: 123k, False: 77.3k]
  ------------------
  388|  4.97M|    for (ts = 0; ts < time_slots; ts++) {
  ------------------
  |  Branch (388:18): [True: 4.85M, False: 123k]
  ------------------
  389|   155M|      for (qs = 0; qs < self->band_count[ch]; qs++) {
  ------------------
  |  Branch (389:20): [True: 150M, False: 4.85M]
  ------------------
  390|   150M|        self->qmf_in[ch][qs][ts].re =
  391|   150M|            self->input_gain * input_buffer[2 * ch][ts][qs];
  392|   150M|        self->qmf_in[ch][qs][ts].im =
  393|   150M|            self->input_gain * input_buffer[2 * ch + 1][ts][qs];
  394|   150M|      }
  395|  4.85M|    }
  396|   123k|  }
  397|       |
  398|  77.3k|  if (!(self->pre_mix_req | self->bs_tsd_enable)) {
  ------------------
  |  Branch (398:7): [True: 64.3k, False: 13.0k]
  ------------------
  399|  64.3k|    ixheaacd_mps_qmf_hyb_analysis_no_pre_mix(self);
  400|  64.3k|  } else {
  401|  13.0k|    ixheaacd_mps_qmf_hyb_analysis(self);
  402|       |
  403|  13.0k|    ixheaacd_mps_apply_pre_matrix(self);
  404|       |
  405|  13.0k|    ixheaacd_mps_create_w(self);
  406|  13.0k|  }
  407|       |
  408|  77.3k|  if ((!(self->res_bands | self->pre_mix_req)) &&
  ------------------
  |  Branch (408:7): [True: 29.1k, False: 48.1k]
  ------------------
  409|  29.1k|      (self->config->bs_phase_coding == 0)) {
  ------------------
  |  Branch (409:7): [True: 9.41k, False: 19.7k]
  ------------------
  410|  9.41k|    ixheaacd_mps_apply_mix_matrix_type1(self);
  411|       |
  412|  67.9k|  } else if (self->pre_mix_req) {
  ------------------
  |  Branch (412:14): [True: 5.14k, False: 62.7k]
  ------------------
  413|  5.14k|    ixheaacd_mps_apply_mix_matrix_type2(self);
  414|       |
  415|  62.7k|  } else {
  416|  62.7k|    ixheaacd_mps_apply_mix_matrix_type3(self);
  417|  62.7k|  }
  418|       |
  419|  77.3k|  if (self->config->bs_temp_shape_config == 2) {
  ------------------
  |  Branch (419:7): [True: 4.07k, False: 73.2k]
  ------------------
  420|  4.07k|    ixheaacd_mps_time_env_shaping(self);
  421|  4.07k|  }
  422|       |
  423|  77.3k|  err = ixheaacd_mps_temp_process(self);
  424|  77.3k|  if (err) return err;
  ------------------
  |  Branch (424:7): [True: 12, False: 77.3k]
  ------------------
  425|       |
  426|  77.3k|  self->parse_nxt_frame = 1;
  427|  77.3k|  self->pre_mix_req = 0;
  428|  77.3k|  return 0;
  429|  77.3k|}
ixheaacd_mps_ecdatapairdec:
 1496|  45.4k|                                  WORD32 ld_mps_flag, WORD32 heaac_mps_present, WORD32 ec_flag) {
 1497|  45.4k|  WORD32 attach_lsb_flag = 0;
 1498|  45.4k|  WORD32 pcm_coding_flag = 0;
 1499|  45.4k|  WORD32 pilot_coding_flag = 0;
 1500|  45.4k|  WORD32 pilot_data[2] = {0, 0};
 1501|  45.4k|  WORD32 mixed_time_pair = 0, pcm_val = 0;
 1502|  45.4k|  WORD32 quant_levels = 0, quant_offset = 0;
 1503|  45.4k|  UWORD32 data = 0;
 1504|  45.4k|  WORD32 band_start = 0;
 1505|       |
 1506|  45.4k|  WORD32 data_pair[2][MAXBANDS] = {{0}};
 1507|  45.4k|  WORD32 data_diff[2][MAXBANDS] = {{0}};
 1508|       |
 1509|  45.4k|  WORD32 msb_state[MAXBANDS] = {0};
 1510|       |
 1511|  45.4k|  WORD32* data_array[2] = {NULL, NULL};
 1512|       |
 1513|  45.4k|  WORD32 diff_type[2] = {DIFF_FREQ, DIFF_FREQ};
  ------------------
  |  |   31|  45.4k|#define DIFF_FREQ (0)
  ------------------
                WORD32 diff_type[2] = {DIFF_FREQ, DIFF_FREQ};
  ------------------
  |  |   31|  45.4k|#define DIFF_FREQ (0)
  ------------------
 1514|  45.4k|  WORD32 cdg_scheme = HUFF_1D;
  ------------------
  |  |   34|  45.4k|#define HUFF_1D (0)
  ------------------
 1515|  45.4k|  WORD32 direction = BACKWARDS;
  ------------------
  |  |   28|  45.4k|#define BACKWARDS (0)
  ------------------
 1516|       |
 1517|  45.4k|  if (heaac_mps_present == 1) {
  ------------------
  |  Branch (1517:7): [True: 19.3k, False: 26.0k]
  ------------------
 1518|  19.3k|    band_start = start_band;
 1519|  19.3k|  }
 1520|       |
 1521|  45.4k|  switch (data_type) {
 1522|  27.0k|    case CLD:
  ------------------
  |  |   23|  27.0k|#define CLD (0)
  ------------------
  |  Branch (1522:5): [True: 27.0k, False: 18.3k]
  ------------------
 1523|  27.0k|      if (coarse_flag) {
  ------------------
  |  Branch (1523:11): [True: 10.3k, False: 16.7k]
  ------------------
 1524|  10.3k|        attach_lsb_flag = 0;
 1525|  10.3k|        quant_levels = 15;
 1526|  10.3k|        quant_offset = 7;
 1527|  16.7k|      } else {
 1528|  16.7k|        attach_lsb_flag = 0;
 1529|  16.7k|        quant_levels = 31;
 1530|  16.7k|        quant_offset = 15;
 1531|  16.7k|      }
 1532|       |
 1533|  27.0k|      break;
 1534|       |
 1535|  13.7k|    case ICC:
  ------------------
  |  |   24|  13.7k|#define ICC (1)
  ------------------
  |  Branch (1535:5): [True: 13.7k, False: 31.6k]
  ------------------
 1536|  13.7k|      if (coarse_flag) {
  ------------------
  |  Branch (1536:11): [True: 6.00k, False: 7.72k]
  ------------------
 1537|  6.00k|        attach_lsb_flag = 0;
 1538|  6.00k|        quant_levels = 4;
 1539|  6.00k|        quant_offset = 0;
 1540|  7.72k|      } else {
 1541|  7.72k|        attach_lsb_flag = 0;
 1542|  7.72k|        quant_levels = 8;
 1543|  7.72k|        quant_offset = 0;
 1544|  7.72k|      }
 1545|       |
 1546|  13.7k|      break;
 1547|       |
 1548|  3.51k|    case IPD:
  ------------------
  |  |   25|  3.51k|#define IPD (2)
  ------------------
  |  Branch (1548:5): [True: 3.51k, False: 41.8k]
  ------------------
 1549|  3.51k|      if (coarse_flag) {
  ------------------
  |  Branch (1549:11): [True: 1.83k, False: 1.68k]
  ------------------
 1550|  1.83k|        attach_lsb_flag = 0;
 1551|  1.83k|        quant_levels = 8;
 1552|  1.83k|        quant_offset = 0;
 1553|  1.83k|      } else {
 1554|  1.68k|        attach_lsb_flag = 1;
 1555|  1.68k|        quant_levels = 16;
 1556|  1.68k|        quant_offset = 0;
 1557|  1.68k|      }
 1558|  3.51k|      break;
 1559|       |
 1560|  1.10k|    case CPC:
  ------------------
  |  |   26|  1.10k|#define CPC (3)
  ------------------
  |  Branch (1560:5): [True: 1.10k, False: 44.2k]
  ------------------
 1561|  1.10k|      if (coarse_flag) {
  ------------------
  |  Branch (1561:11): [True: 833, False: 276]
  ------------------
 1562|    833|        attach_lsb_flag = 0;
 1563|    833|        quant_levels = 26;
 1564|    833|        quant_offset = 10;
 1565|    833|      } else {
 1566|    276|        attach_lsb_flag = 1;
 1567|    276|        quant_levels = 51;
 1568|    276|        quant_offset = 20;
 1569|    276|      }
 1570|  1.10k|      break;
 1571|       |
 1572|      0|    default:
  ------------------
  |  Branch (1572:5): [True: 0, False: 45.4k]
  ------------------
 1573|      0|      break;
 1574|  45.4k|  }
 1575|       |
 1576|  45.4k|  data = ixheaacd_read_bits_buf(it_bit_buff, 1);
 1577|  45.4k|  pcm_coding_flag = data;
 1578|       |
 1579|  45.4k|  pilot_coding_flag = 0;
 1580|       |
 1581|  45.4k|  if (heaac_mps_present == 1) {
  ------------------
  |  Branch (1581:7): [True: 19.3k, False: 26.0k]
  ------------------
 1582|  19.3k|    if (pcm_coding_flag && data_bands > 4) {
  ------------------
  |  Branch (1582:9): [True: 12.0k, False: 7.24k]
  |  Branch (1582:28): [True: 5.89k, False: 6.17k]
  ------------------
 1583|  5.89k|      data = ixheaacd_read_bits_buf(it_bit_buff, 1);
 1584|  5.89k|      pilot_coding_flag = data;
 1585|  5.89k|    }
 1586|  19.3k|  }
 1587|       |
 1588|  45.4k|  if (pcm_coding_flag && !pilot_coding_flag) {
  ------------------
  |  Branch (1588:7): [True: 24.9k, False: 20.5k]
  |  Branch (1588:26): [True: 19.6k, False: 5.29k]
  ------------------
 1589|  19.6k|    if (pair_flag) {
  ------------------
  |  Branch (1589:9): [True: 9.91k, False: 9.69k]
  ------------------
 1590|  9.91k|      data_array[0] = data_pair[0];
 1591|  9.91k|      data_array[1] = data_pair[1];
 1592|  9.91k|      pcm_val = 2 * data_bands;
 1593|  9.91k|    } else {
 1594|  9.69k|      data_array[0] = data_pair[0];
 1595|  9.69k|      data_array[1] = NULL;
 1596|  9.69k|      pcm_val = data_bands;
 1597|  9.69k|    }
 1598|       |
 1599|  19.6k|    ixheaacd_mps_pcm_decode(it_bit_buff, data_array[0], data_array[1],
 1600|  19.6k|                            quant_offset, pcm_val, quant_levels);
 1601|       |
 1602|  25.8k|  } else {
 1603|  25.8k|    if (pair_flag) {
  ------------------
  |  Branch (1603:9): [True: 12.6k, False: 13.1k]
  ------------------
 1604|  12.6k|      data_array[0] = data_diff[0];
 1605|  12.6k|      data_array[1] = data_diff[1];
 1606|  13.1k|    } else {
 1607|  13.1k|      data_array[0] = data_diff[0];
 1608|  13.1k|      data_array[1] = NULL;
 1609|  13.1k|    }
 1610|       |
 1611|  25.8k|    diff_type[0] = DIFF_FREQ;
  ------------------
  |  |   31|  25.8k|#define DIFF_FREQ (0)
  ------------------
 1612|  25.8k|    diff_type[1] = DIFF_FREQ;
  ------------------
  |  |   31|  25.8k|#define DIFF_FREQ (0)
  ------------------
 1613|       |
 1614|  25.8k|    direction = BACKWARDS;
  ------------------
  |  |   28|  25.8k|#define BACKWARDS (0)
  ------------------
 1615|       |
 1616|  25.8k|    if (!pilot_coding_flag) {
  ------------------
  |  Branch (1616:9): [True: 20.5k, False: 5.30k]
  ------------------
 1617|  20.5k|      if (pair_flag || diff_time_back_flag) {
  ------------------
  |  Branch (1617:11): [True: 7.88k, False: 12.6k]
  |  Branch (1617:24): [True: 7.86k, False: 4.74k]
  ------------------
 1618|  15.7k|        data = ixheaacd_read_bits_buf(it_bit_buff, 1);
 1619|  15.7k|        diff_type[0] = data;
 1620|  15.7k|      }
 1621|       |
 1622|  20.5k|      if (pair_flag && ((diff_type[0] == DIFF_FREQ) || diff_time_back_flag)) {
  ------------------
  |  |   31|  7.88k|#define DIFF_FREQ (0)
  ------------------
  |  Branch (1622:11): [True: 7.88k, False: 12.6k]
  |  Branch (1622:25): [True: 6.20k, False: 1.67k]
  |  Branch (1622:56): [True: 1.16k, False: 514]
  ------------------
 1623|  7.36k|        data = ixheaacd_read_bits_buf(it_bit_buff, 1);
 1624|  7.36k|        diff_type[1] = data;
 1625|  7.36k|      }
 1626|  20.5k|    }
 1627|       |
 1628|  25.8k|    if (data_bands <= 0) {
  ------------------
  |  Branch (1628:9): [True: 273, False: 25.5k]
  ------------------
 1629|    273|      if (!ec_flag)
  ------------------
  |  Branch (1629:11): [True: 273, False: 0]
  ------------------
 1630|    273|        return -1;
 1631|      0|      else
 1632|      0|        longjmp(*(it_bit_buff->xaac_jmp_buf), IA_FATAL_ERROR);
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
 1633|    273|    }
 1634|       |
 1635|  25.5k|    ixheaacd_huff_decode(it_bit_buff, data_array[0], data_array[1], data_type, diff_type[0],
 1636|  25.5k|                         diff_type[1], pilot_coding_flag, pilot_data, data_bands, &cdg_scheme,
 1637|  25.5k|                         ld_mps_flag);
 1638|       |
 1639|  25.5k|    if (pilot_coding_flag && heaac_mps_present == 1) {
  ------------------
  |  Branch (1639:9): [True: 5.29k, False: 20.2k]
  |  Branch (1639:30): [True: 5.29k, False: 0]
  ------------------
 1640|  5.29k|      WORD32 i;
 1641|  59.4k|      for (i = 0; i < data_bands; i++) {
  ------------------
  |  Branch (1641:19): [True: 54.1k, False: 5.29k]
  ------------------
 1642|  54.1k|        data_pair[0][i] = data_diff[0][i] + pilot_data[0];
 1643|  54.1k|      }
 1644|       |
 1645|  5.29k|      if (pair_flag) {
  ------------------
  |  Branch (1645:11): [True: 4.75k, False: 539]
  ------------------
 1646|  52.3k|        for (i = 0; i < data_bands; i++) {
  ------------------
  |  Branch (1646:21): [True: 47.6k, False: 4.75k]
  ------------------
 1647|  47.6k|          data_pair[1][i] = data_diff[1][i] + pilot_data[0];
 1648|  47.6k|        }
 1649|  4.75k|      }
 1650|  20.2k|    } else {
 1651|  20.2k|      if ((diff_type[0] == DIFF_TIME) || (diff_type[1] == DIFF_TIME)) {
  ------------------
  |  |   32|  20.2k|#define DIFF_TIME (1)
  ------------------
                    if ((diff_type[0] == DIFF_TIME) || (diff_type[1] == DIFF_TIME)) {
  ------------------
  |  |   32|  15.7k|#define DIFF_TIME (1)
  ------------------
  |  Branch (1651:11): [True: 4.44k, False: 15.7k]
  |  Branch (1651:42): [True: 3.32k, False: 12.4k]
  ------------------
 1652|  7.69k|        if (pair_flag) {
  ------------------
  |  Branch (1652:13): [True: 4.99k, False: 2.70k]
  ------------------
 1653|  4.99k|          if ((diff_type[0] == DIFF_TIME) && !diff_time_back_flag) {
  ------------------
  |  |   32|  4.99k|#define DIFF_TIME (1)
  ------------------
  |  Branch (1653:15): [True: 1.66k, False: 3.32k]
  |  Branch (1653:46): [True: 510, False: 1.15k]
  ------------------
 1654|    510|            direction = FORWARDS;
  ------------------
  |  |   29|    510|#define FORWARDS (1)
  ------------------
 1655|  4.48k|          } else if (diff_type[1] == DIFF_TIME) {
  ------------------
  |  |   32|  4.48k|#define DIFF_TIME (1)
  ------------------
  |  Branch (1655:22): [True: 3.98k, False: 491]
  ------------------
 1656|  3.98k|            direction = BACKWARDS;
  ------------------
  |  |   28|  3.98k|#define BACKWARDS (0)
  ------------------
 1657|  3.98k|          } else {
 1658|    491|            data = ixheaacd_read_bits_buf(it_bit_buff, 1);
 1659|    491|            direction = data;
 1660|    491|          }
 1661|  4.99k|        } else {
 1662|  2.70k|          direction = BACKWARDS;
  ------------------
  |  |   28|  2.70k|#define BACKWARDS (0)
  ------------------
 1663|  2.70k|        }
 1664|  7.69k|      }
 1665|       |
 1666|  20.2k|      mixed_time_pair = (diff_type[0] != diff_type[1]) &&
  ------------------
  |  Branch (1666:25): [True: 7.03k, False: 13.2k]
  ------------------
 1667|  7.03k|                        ((cdg_scheme & PAIR_MASK) == TIME_PAIR);
  ------------------
  |  |   41|  7.03k|#define PAIR_MASK 0xf
  ------------------
                                      ((cdg_scheme & PAIR_MASK) == TIME_PAIR);
  ------------------
  |  |   38|  7.03k|#define TIME_PAIR (1)
  ------------------
  |  Branch (1667:25): [True: 2.89k, False: 4.14k]
  ------------------
 1668|       |
 1669|  20.2k|      if (direction == BACKWARDS) {
  ------------------
  |  |   28|  20.2k|#define BACKWARDS (0)
  ------------------
  |  Branch (1669:11): [True: 19.5k, False: 720]
  ------------------
 1670|  19.5k|        if (diff_type[0] == DIFF_FREQ) {
  ------------------
  |  |   31|  19.5k|#define DIFF_FREQ (0)
  ------------------
  |  Branch (1670:13): [True: 15.7k, False: 3.72k]
  ------------------
 1671|  15.7k|          ixheaacd_diff_freq_decode(data_diff[0], data_pair[0], data_bands);
 1672|  15.7k|        } else {
 1673|  3.72k|          WORD32 i;
 1674|  28.2k|          for (i = 0; i < data_bands; i++) {
  ------------------
  |  Branch (1674:23): [True: 24.4k, False: 3.72k]
  ------------------
 1675|  24.4k|            msb_state[i] = history[i + band_start] + quant_offset;
 1676|  24.4k|            if (attach_lsb_flag) {
  ------------------
  |  Branch (1676:17): [True: 3.32k, False: 21.1k]
  ------------------
 1677|  3.32k|              msb_state[i] >>= 1;
 1678|  3.32k|            }
 1679|  24.4k|          }
 1680|  3.72k|          ixheaacd_mps_diff_time_dec_bwd(msb_state, data_diff[0], data_pair[0],
 1681|  3.72k|                                         mixed_time_pair, data_bands);
 1682|  3.72k|        }
 1683|  19.5k|        if (diff_type[1] == DIFF_FREQ) {
  ------------------
  |  |   31|  19.5k|#define DIFF_FREQ (0)
  ------------------
  |  Branch (1683:13): [True: 15.5k, False: 3.98k]
  ------------------
 1684|  15.5k|          ixheaacd_diff_freq_decode(data_diff[1], data_pair[1], data_bands);
 1685|  15.5k|        } else {
 1686|  3.98k|          ixheaacd_mps_diff_time_dec_bwd(data_pair[0], data_diff[1], data_pair[1],
 1687|  3.98k|                                         mixed_time_pair, data_bands);
 1688|  3.98k|        }
 1689|  19.5k|      } else {
 1690|    720|        ixheaacd_diff_freq_decode(data_diff[1], data_pair[1], data_bands);
 1691|       |
 1692|    720|        if (diff_type[0] == DIFF_FREQ) {
  ------------------
  |  |   31|    720|#define DIFF_FREQ (0)
  ------------------
  |  Branch (1692:13): [True: 0, False: 720]
  ------------------
 1693|      0|          ixheaacd_diff_freq_decode(data_diff[0], data_pair[0], data_bands);
 1694|    720|        } else {
 1695|    720|          ixheaacd_mps_diff_time_dec_fwd(data_pair[1], data_diff[0], data_pair[0],
 1696|    720|                                         mixed_time_pair, data_bands);
 1697|    720|        }
 1698|    720|      }
 1699|  20.2k|    }
 1700|  25.5k|    ixheaacd_attach_lsb(it_bit_buff, data_pair[0], quant_offset,
 1701|  25.5k|                        attach_lsb_flag ? 1 : 0, data_bands, data_pair[0]);
  ------------------
  |  Branch (1701:25): [True: 814, False: 24.7k]
  ------------------
 1702|  25.5k|    if (pair_flag) {
  ------------------
  |  Branch (1702:9): [True: 12.3k, False: 13.2k]
  ------------------
 1703|  12.3k|      ixheaacd_attach_lsb(it_bit_buff, data_pair[1], quant_offset,
 1704|  12.3k|                          attach_lsb_flag ? 1 : 0, data_bands, data_pair[1]);
  ------------------
  |  Branch (1704:27): [True: 274, False: 12.0k]
  ------------------
 1705|  12.3k|    }
 1706|  25.5k|  }
 1707|       |
 1708|  45.1k|  memcpy(outdata[set_idx] + band_start, data_pair[0],
 1709|  45.1k|         sizeof(WORD32) * data_bands);
 1710|  45.1k|  if (pair_flag) {
  ------------------
  |  Branch (1710:7): [True: 22.2k, False: 22.9k]
  ------------------
 1711|  22.2k|    memcpy(outdata[set_idx + 1] + band_start, data_pair[1],
 1712|  22.2k|           sizeof(WORD32) * data_bands);
 1713|  22.2k|  }
 1714|       |
 1715|  45.1k|  return IA_NO_ERROR;
  ------------------
  |  |   23|  45.1k|#define IA_NO_ERROR 0x00000000
  ------------------
 1716|  45.4k|}
ixheaacd_mps_huff_decode:
 1719|  2.13k|                              WORD32* out_data, WORD32 num_val) {
 1720|  2.13k|  WORD32 val_rcvd = 0, dummy = 0, i = 0, val = 0, len = 0;
 1721|  2.13k|  WORD32 rl_data[2] = {0};
 1722|       |
 1723|  22.5k|  while (val_rcvd < num_val) {
  ------------------
  |  Branch (1723:10): [True: 20.4k, False: 2.13k]
  ------------------
 1724|  20.4k|    ixheaacd_mps_huff_read_2d(it_bit_buff,
 1725|  20.4k|                              (ia_huff_node_struct)&ixheaacd_huff_reshape_nodes,
 1726|  20.4k|                              rl_data, &dummy);
 1727|  20.4k|    val = rl_data[0];
 1728|  20.4k|    len = rl_data[1] + 1;
 1729|  71.6k|    for (i = val_rcvd; i < val_rcvd + len; i++) {
  ------------------
  |  Branch (1729:24): [True: 51.1k, False: 20.4k]
  ------------------
 1730|  51.1k|      out_data[i] = val;
 1731|  51.1k|    }
 1732|  20.4k|    val_rcvd += len;
 1733|  20.4k|  }
 1734|       |
 1735|  2.13k|  return;
 1736|  2.13k|}
ixheaacd_update_out_buffer:
 1739|  13.1k|                                WORD16 *out_buf) {
 1740|  13.1k|  WORD32 ch, sam;
 1741|  13.1k|  WORD32 num_output_channels_at = pstr_mps_state->num_output_channels_at;
 1742|  13.1k|  WORD32 frame_length = pstr_mps_state->frame_length;
 1743|       |
 1744|  13.1k|  WORD32 *p_time_out = pstr_mps_state->array_struct->time_out;
 1745|       |
 1746|   115k|  for (ch = 0; ch < num_output_channels_at; ch++) {
  ------------------
  |  Branch (1746:16): [True: 101k, False: 13.1k]
  ------------------
 1747|   101k|    WORD32 *time_out = p_time_out;
 1748|   145M|    for (sam = 0; sam < frame_length; sam++) {
  ------------------
  |  Branch (1748:19): [True: 144M, False: 101k]
  ------------------
 1749|   144M|      out_buf[sam * num_output_channels_at + ch] = (*time_out++) >> 16;
 1750|   144M|    }
 1751|   101k|    p_time_out += QBXTS;
  ------------------
  |  |   98|   101k|#define QBXTS (4608)
  ------------------
 1752|   101k|  }
 1753|       |
 1754|  13.1k|  return;
 1755|  13.1k|}
ixheaacd_update_time_out_buffer:
 1757|  13.1k|VOID ixheaacd_update_time_out_buffer(ia_heaac_mps_state_struct *pstr_mps_state) {
 1758|  13.1k|  WORD32 n;
 1759|  13.1k|  WORD32 up_mix_type = pstr_mps_state->up_mix_type;
 1760|  13.1k|  WORD32 tree_config = pstr_mps_state->tree_config;
 1761|  13.1k|  WORD32 lfe_gain = pstr_mps_state->lfe_gain;
 1762|  13.1k|  WORD32 surround_gain = pstr_mps_state->surround_gain;
 1763|       |
 1764|  13.1k|  if (!pstr_mps_state->bs_config.arbitrary_tree && up_mix_type != 2 && up_mix_type != 3) {
  ------------------
  |  Branch (1764:7): [True: 13.1k, False: 6]
  |  Branch (1764:52): [True: 13.1k, False: 0]
  |  Branch (1764:72): [True: 13.1k, False: 0]
  ------------------
 1765|  13.1k|    WORD32 frame_length = pstr_mps_state->frame_length;
 1766|       |
 1767|  13.1k|    WORD32 *time_out_3 = pstr_mps_state->array_struct->time_out + QBXTSX3;
  ------------------
  |  |  100|  13.1k|#define QBXTSX3 (13824)
  ------------------
 1768|  13.1k|    WORD32 *time_out_4 = time_out_3 + QBXTS;
  ------------------
  |  |   98|  13.1k|#define QBXTS (4608)
  ------------------
 1769|  13.1k|    WORD32 *time_out_5 = time_out_4 + QBXTS;
  ------------------
  |  |   98|  13.1k|#define QBXTS (4608)
  ------------------
 1770|  13.1k|    WORD32 *time_out_6 = time_out_5 + QBXTS;
  ------------------
  |  |   98|  13.1k|#define QBXTS (4608)
  ------------------
 1771|  13.1k|    WORD32 *time_out_7 = time_out_6 + QBXTS;
  ------------------
  |  |   98|  13.1k|#define QBXTS (4608)
  ------------------
 1772|       |
 1773|  18.4M|    for (n = 0; n < frame_length; n++) {
  ------------------
  |  Branch (1773:17): [True: 18.4M, False: 13.1k]
  ------------------
 1774|  18.4M|      *time_out_3 = ixheaacd_mps_mult32_shr_15(*time_out_3, lfe_gain);
 1775|  18.4M|      time_out_3++;
 1776|  18.4M|      *time_out_4 = ixheaacd_mps_mult32_shr_15(*time_out_4, surround_gain);
 1777|  18.4M|      time_out_4++;
 1778|  18.4M|      *time_out_5 = ixheaacd_mps_mult32_shr_15(*time_out_5, surround_gain);
 1779|  18.4M|      time_out_5++;
 1780|  18.4M|    }
 1781|       |
 1782|  13.1k|    if (tree_config == 4 || tree_config == 6) {
  ------------------
  |  Branch (1782:9): [True: 305, False: 12.8k]
  |  Branch (1782:29): [True: 9.71k, False: 3.09k]
  ------------------
 1783|  16.0M|      for (n = 0; n < frame_length; n++) {
  ------------------
  |  Branch (1783:19): [True: 16.0M, False: 10.0k]
  ------------------
 1784|  16.0M|        *time_out_6 = ixheaacd_mps_mult32_shr_15(*time_out_6, surround_gain);
 1785|  16.0M|        time_out_6++;
 1786|  16.0M|        *time_out_7 = ixheaacd_mps_mult32_shr_15(*time_out_7, surround_gain);
 1787|  16.0M|        time_out_7++;
 1788|  16.0M|      }
 1789|  10.0k|    }
 1790|  13.1k|  }
 1791|  13.1k|}
ixheaacd_heaac_mps_apply:
 1988|  13.7k|                                      WORD32 mps_bytes) {
 1989|  13.7k|  ia_heaac_mps_state_struct *pstr_mps_state =
 1990|  13.7k|      &self->p_state_aac->heaac_mps_handle;
 1991|  13.7k|  IA_ERRORCODE error_code = IA_NO_ERROR;
  ------------------
  |  |   23|  13.7k|#define IA_NO_ERROR 0x00000000
  ------------------
 1992|  13.7k|  WORD32 n_channels, n_time_slots, qmf_bands, channel;
 1993|  13.7k|  ia_heaac_mps_state_struct *curr_state = pstr_mps_state;
 1994|       |
 1995|  13.7k|  WORD32 *p_qmf_real = pstr_mps_state->array_struct->m_qmf_real;
 1996|  13.7k|  WORD32 *p_qmf_imag = pstr_mps_state->array_struct->m_qmf_imag;
 1997|  13.7k|  WORD32 buffer_size = mps_bytes;
 1998|       |
 1999|  13.7k|  if (self->p_state_aac->heaac_mps_handle.is_first == 1) {
  ------------------
  |  Branch (1999:7): [True: 10.5k, False: 3.23k]
  ------------------
 2000|  10.5k|    self->p_state_aac->heaac_mps_handle.is_first = 1;
 2001|  10.5k|    if (pstr_mps_state->bytes_remaining != 0) {
  ------------------
  |  Branch (2001:9): [True: 9.32k, False: 1.20k]
  ------------------
 2002|  9.32k|      buffer_size = mps_bytes + pstr_mps_state->bytes_remaining;
 2003|  9.32k|      if (buffer_size > 1024) {
  ------------------
  |  Branch (2003:11): [True: 11, False: 9.30k]
  ------------------
 2004|     11|        return IA_FATAL_ERROR;
  ------------------
  |  |   25|     11|#define IA_FATAL_ERROR 0x80000000
  ------------------
 2005|     11|      }
 2006|   153k|      for (WORD32 ii = 0; ii < mps_bytes; ii++) {
  ------------------
  |  Branch (2006:27): [True: 143k, False: 9.30k]
  ------------------
 2007|   143k|        pstr_mps_state->temp_buf[ii + pstr_mps_state->bytes_remaining] =
 2008|   143k|            mps_buffer[ii];
 2009|   143k|      }
 2010|       |
 2011|  9.30k|      pstr_mps_state->ptr_mps_bit_buff = ixheaacd_create_bit_buf(
 2012|  9.30k|          &pstr_mps_state->mps_bit_buf, (UWORD8 *)pstr_mps_state->temp_buf,
 2013|  9.30k|          buffer_size);
 2014|  9.30k|      pstr_mps_state->ptr_mps_bit_buff->xaac_jmp_buf =
 2015|  9.30k|          &self->p_state_aac->xaac_jmp_buf;
 2016|       |
 2017|  9.30k|      pstr_mps_state->ptr_mps_bit_buff->cnt_bits += (8 * buffer_size);
 2018|  9.30k|    } else {
 2019|  1.20k|      memcpy(pstr_mps_state->temp_buf, mps_buffer, mps_bytes);
 2020|  1.20k|      buffer_size = mps_bytes;
 2021|  1.20k|      pstr_mps_state->ptr_mps_bit_buff = ixheaacd_create_bit_buf(
 2022|  1.20k|          &pstr_mps_state->mps_bit_buf, (UWORD8 *)mps_buffer, buffer_size);
 2023|  1.20k|      pstr_mps_state->ptr_mps_bit_buff->cnt_bits += (8 * buffer_size);
 2024|       |
 2025|  1.20k|      pstr_mps_state->ptr_mps_bit_buff->xaac_jmp_buf =
 2026|  1.20k|          &self->p_state_aac->xaac_jmp_buf;
 2027|  1.20k|    }
 2028|  10.5k|  }
 2029|       |
 2030|  13.7k|  if (curr_state->num_input_channels > 2 && pstr_mps_state->mps_with_sbr == 1) {
  ------------------
  |  Branch (2030:7): [True: 10.3k, False: 3.43k]
  |  Branch (2030:45): [True: 1, False: 10.3k]
  ------------------
 2031|      1|    if (pstr_mps_state->ec_flag) {
  ------------------
  |  Branch (2031:9): [True: 0, False: 1]
  ------------------
 2032|      0|      curr_state->num_input_channels = 2;
 2033|      0|      pstr_mps_state->frame_ok = 0;
 2034|      1|    } else {
 2035|      1|      return IA_FATAL_ERROR;
  ------------------
  |  |   25|      1|#define IA_FATAL_ERROR 0x80000000
  ------------------
 2036|      1|    }
 2037|      1|  }
 2038|       |
 2039|  13.7k|  n_channels = curr_state->num_input_channels;
 2040|  13.7k|  n_time_slots = curr_state->time_slots;
 2041|  13.7k|  qmf_bands = curr_state->qmf_bands;
 2042|       |
 2043|  13.7k|  if (pstr_mps_state->mps_decode == 1) {
  ------------------
  |  Branch (2043:7): [True: 13.7k, False: 4]
  ------------------
 2044|  13.7k|    if (pstr_mps_state->mps_with_sbr) {
  ------------------
  |  Branch (2044:9): [True: 962, False: 12.7k]
  ------------------
 2045|  2.86k|      for (channel = 0; channel < n_channels; channel++) {
  ------------------
  |  Branch (2045:25): [True: 1.90k, False: 962]
  ------------------
 2046|  1.90k|        WORD32 kk = 0;
 2047|  1.90k|        if (self->aac_config.ui_enh_sbr)
  ------------------
  |  Branch (2047:13): [True: 1.90k, False: 0]
  ------------------
 2048|  1.90k|        {
 2049|  34.1k|          for (WORD32 ii = 0; ii < n_time_slots; ii++) {
  ------------------
  |  Branch (2049:31): [True: 32.2k, False: 1.90k]
  ------------------
 2050|  32.2k|            FLOAT32 *qmf_re = self->p_state_aac->str_sbr_dec_info[0]
 2051|  32.2k|                ->pstr_sbr_channel[channel]->str_sbr_dec.pp_qmf_buf_real[ii];
 2052|  32.2k|            FLOAT32 *qmf_im = self->p_state_aac->str_sbr_dec_info[0]
 2053|  32.2k|                ->pstr_sbr_channel[channel]->str_sbr_dec.pp_qmf_buf_imag[ii];
 2054|       |
 2055|  1.06M|            for (WORD32 jj = 0; jj < qmf_bands; jj++) {
  ------------------
  |  Branch (2055:33): [True: 1.03M, False: 32.2k]
  ------------------
 2056|  1.03M|              p_qmf_real[kk] = ixheaacd_mps_mult32_shr_15(
 2057|  1.03M|                  curr_state->clip_protect_gain, (WORD32)(qmf_re[jj] * 1024));
 2058|  1.03M|              p_qmf_imag[kk++] = ixheaacd_mps_mult32_shr_15(
 2059|  1.03M|                  curr_state->clip_protect_gain, (WORD32)(qmf_im[jj] * 1024));
 2060|  1.03M|            }
 2061|  32.2k|          }
 2062|  1.90k|        }
 2063|      0|        else
 2064|      0|        {
 2065|      0|          for (WORD32 ii = 0; ii < n_time_slots; ii++) {
  ------------------
  |  Branch (2065:31): [True: 0, False: 0]
  ------------------
 2066|      0|            WORD32 *qmf_re = self->p_state_aac->str_sbr_dec_info[0]
 2067|      0|                ->pstr_sbr_channel[channel]->str_sbr_dec.p_arr_qmf_buf_real[ii];
 2068|      0|            WORD32 *qmf_im = self->p_state_aac->str_sbr_dec_info[0]
 2069|      0|                ->pstr_sbr_channel[channel]->str_sbr_dec.p_arr_qmf_buf_imag[ii];
 2070|       |
 2071|      0|            for (WORD32 jj = 0; jj < qmf_bands; jj++) {
  ------------------
  |  Branch (2071:33): [True: 0, False: 0]
  ------------------
 2072|      0|              p_qmf_real[kk] = ixheaacd_mps_mult32_shr_15(
 2073|      0|                  curr_state->clip_protect_gain, qmf_re[jj] * 256);
 2074|      0|              p_qmf_imag[kk++] = ixheaacd_mps_mult32_shr_15(
 2075|      0|                  curr_state->clip_protect_gain, qmf_im[jj] * 256);
 2076|      0|            }
 2077|      0|          }
 2078|      0|        }
 2079|  1.90k|        p_qmf_real += QBXTS;
  ------------------
  |  |   98|  1.90k|#define QBXTS (4608)
  ------------------
 2080|  1.90k|        p_qmf_imag += QBXTS;
  ------------------
  |  |   98|  1.90k|#define QBXTS (4608)
  ------------------
 2081|  1.90k|      }
 2082|  12.7k|    } else {
 2083|  78.7k|      for (channel = 0; channel < n_channels; channel++) {
  ------------------
  |  Branch (2083:25): [True: 66.0k, False: 12.7k]
  ------------------
 2084|  66.0k|        ixheaacd_calc_ana_filt_bank(pstr_mps_state, output_buf, p_qmf_real,
 2085|  66.0k|                                    p_qmf_imag, channel);
 2086|       |
 2087|  66.0k|        p_qmf_real += QBXTS;
  ------------------
  |  |   98|  66.0k|#define QBXTS (4608)
  ------------------
 2088|  66.0k|        p_qmf_imag += QBXTS;
  ------------------
  |  |   98|  66.0k|#define QBXTS (4608)
  ------------------
 2089|  66.0k|      }
 2090|  12.7k|    }
 2091|  13.7k|    if (!pstr_mps_state->ec_flag && pstr_mps_state->frame_ok) {
  ------------------
  |  Branch (2091:9): [True: 13.7k, False: 0]
  |  Branch (2091:37): [True: 13.7k, False: 0]
  ------------------
 2092|  13.7k|      error_code = ixheaacd_parse_frame(pstr_mps_state);
 2093|  13.7k|      if (error_code != IA_NO_ERROR) return error_code;
  ------------------
  |  |   23|  13.7k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (2093:11): [True: 152, False: 13.5k]
  ------------------
 2094|  13.7k|    }
 2095|       |
 2096|  13.5k|    if (!pstr_mps_state->first_frame || !pstr_mps_state->ec_flag) {
  ------------------
  |  Branch (2096:9): [True: 10.7k, False: 2.82k]
  |  Branch (2096:41): [True: 2.82k, False: 0]
  ------------------
 2097|  13.3k|      error_code = ixheaacd_apply_frame(pstr_mps_state, n_time_slots,
 2098|  13.3k|                                        pstr_mps_state->array_struct->m_qmf_real,
 2099|  13.3k|                                        pstr_mps_state->array_struct->m_qmf_imag, output_buf);
 2100|  13.3k|      if (error_code != IA_NO_ERROR) return error_code;
  ------------------
  |  |   23|  13.3k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (2100:11): [True: 185, False: 13.1k]
  ------------------
 2101|  13.3k|    }
 2102|  13.4k|    if (error_code == 0 && pstr_mps_state->ec_flag && pstr_mps_state->frame_ok) {
  ------------------
  |  Branch (2102:9): [True: 13.1k, False: 281]
  |  Branch (2102:28): [True: 0, False: 13.1k]
  |  Branch (2102:55): [True: 0, False: 0]
  ------------------
 2103|      0|      error_code = ixheaacd_parse_frame(pstr_mps_state);
 2104|      0|      if (error_code != IA_NO_ERROR) {
  ------------------
  |  |   23|      0|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (2104:11): [True: 0, False: 0]
  ------------------
 2105|      0|        pstr_mps_state->frame_ok = 0;
 2106|      0|      }
 2107|      0|    }
 2108|       |
 2109|  13.4k|    pstr_mps_state->i_bytes_consumed_mps =
 2110|  13.4k|        (WORD32)(pstr_mps_state->ptr_mps_bit_buff->ptr_read_next -
 2111|  13.4k|                 pstr_mps_state->ptr_mps_bit_buff->ptr_bit_buf_base);
 2112|       |
 2113|  13.4k|    pstr_mps_state->bytes_remaining =
 2114|  13.4k|        buffer_size - pstr_mps_state->i_bytes_consumed_mps;
 2115|  13.4k|    if (pstr_mps_state->bytes_remaining < 0)
  ------------------
  |  Branch (2115:9): [True: 311, False: 13.0k]
  ------------------
 2116|    311|    {
 2117|    311|      if (pstr_mps_state->ec_flag)
  ------------------
  |  Branch (2117:11): [True: 0, False: 311]
  ------------------
 2118|      0|      {
 2119|      0|        pstr_mps_state->bytes_remaining = 0;
 2120|      0|        pstr_mps_state->frame_ok = 0;
 2121|      0|      }
 2122|    311|      else
 2123|    311|      {
 2124|    311|        return IA_FATAL_ERROR;
  ------------------
  |  |   25|    311|#define IA_FATAL_ERROR 0x80000000
  ------------------
 2125|    311|      }
 2126|    311|    }
 2127|       |
 2128|  13.0k|    if (pstr_mps_state->bytes_remaining != 0) {
  ------------------
  |  Branch (2128:9): [True: 11.2k, False: 1.83k]
  ------------------
 2129|   745k|      for (WORD32 ii = 0; ii < pstr_mps_state->bytes_remaining; ii++) {
  ------------------
  |  Branch (2129:27): [True: 734k, False: 11.2k]
  ------------------
 2130|   734k|        pstr_mps_state->temp_buf[ii] =
 2131|   734k|            pstr_mps_state->temp_buf[ii + pstr_mps_state->i_bytes_consumed_mps];
 2132|   734k|      }
 2133|  11.2k|    }
 2134|  13.0k|  }
 2135|  13.0k|  self->p_state_aac->heaac_mps_handle.is_first = 1;
 2136|  13.0k|  self->p_state_aac->heaac_mps_handle.first_frame = 0;
 2137|       |
 2138|  13.0k|  return error_code;
 2139|  13.7k|}
ixheaacd_mps_dec.c:ixheaacd_mps_pcm_decode:
  434|  19.6k|                                    WORD32 num_levels) {
  435|  19.6k|  WORD32 i = 0, j = 0, idx = 0;
  436|  19.6k|  WORD32 max_grp_len = 0, grp_len = 0, next_val = 0, grp_val = 0;
  437|  19.6k|  UWORD32 data = 0;
  438|       |
  439|  19.6k|  FLOAT32 ld_nlev = 0.f;
  440|       |
  441|  19.6k|  WORD32 pcm_chunk_size[7] = {0};
  442|       |
  443|  19.6k|  switch (num_levels) {
  444|     33|    case 3:
  ------------------
  |  Branch (444:5): [True: 33, False: 19.6k]
  ------------------
  445|     33|      max_grp_len = 5;
  446|     33|      break;
  447|     21|    case 7:
  ------------------
  |  Branch (447:5): [True: 21, False: 19.6k]
  ------------------
  448|     21|      max_grp_len = 6;
  449|     21|      break;
  450|     17|    case 11:
  ------------------
  |  Branch (450:5): [True: 17, False: 19.6k]
  ------------------
  451|     17|      max_grp_len = 2;
  452|     17|      break;
  453|      0|    case 13:
  ------------------
  |  Branch (453:5): [True: 0, False: 19.6k]
  ------------------
  454|      0|      max_grp_len = 4;
  455|      0|      break;
  456|      0|    case 19:
  ------------------
  |  Branch (456:5): [True: 0, False: 19.6k]
  ------------------
  457|      0|      max_grp_len = 4;
  458|      0|      break;
  459|      0|    case 25:
  ------------------
  |  Branch (459:5): [True: 0, False: 19.6k]
  ------------------
  460|      0|      max_grp_len = 3;
  461|      0|      break;
  462|     95|    case 51:
  ------------------
  |  Branch (462:5): [True: 95, False: 19.5k]
  ------------------
  463|     95|      max_grp_len = 4;
  464|     95|      break;
  465|  4.19k|    case 4:
  ------------------
  |  Branch (465:5): [True: 4.19k, False: 15.4k]
  ------------------
  466|  8.10k|    case 8:
  ------------------
  |  Branch (466:5): [True: 3.91k, False: 15.7k]
  ------------------
  467|  15.3k|    case 15:
  ------------------
  |  Branch (467:5): [True: 7.20k, False: 12.4k]
  ------------------
  468|  16.3k|    case 16:
  ------------------
  |  Branch (468:5): [True: 1.03k, False: 18.6k]
  ------------------
  469|  16.9k|    case 26:
  ------------------
  |  Branch (469:5): [True: 628, False: 19.0k]
  ------------------
  470|  19.5k|    case 31:
  ------------------
  |  Branch (470:5): [True: 2.54k, False: 17.1k]
  ------------------
  471|  19.5k|      max_grp_len = 1;
  472|  19.5k|      break;
  473|      0|    default:
  ------------------
  |  Branch (473:5): [True: 0, False: 19.6k]
  ------------------
  474|      0|      return;
  475|  19.6k|  }
  476|       |
  477|  19.6k|  ld_nlev = (FLOAT32)(log((FLOAT32)num_levels) / log(2.f));
  478|       |
  479|  39.9k|  for (i = 1; i <= max_grp_len; i++) {
  ------------------
  |  Branch (479:15): [True: 20.2k, False: 19.6k]
  ------------------
  480|  20.2k|    pcm_chunk_size[i] = (WORD32)ceil((FLOAT32)(i)*ld_nlev);
  481|  20.2k|  }
  482|       |
  483|   156k|  for (i = 0; i < num_val; i += max_grp_len) {
  ------------------
  |  Branch (483:15): [True: 136k, False: 19.6k]
  ------------------
  484|   136k|    grp_len = min(max_grp_len, num_val - i);
  ------------------
  |  |   75|   136k|#define min(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (75:20): [True: 118k, False: 18.4k]
  |  |  ------------------
  ------------------
  485|   136k|    data = ixheaacd_read_bits_buf(it_bit_buff, pcm_chunk_size[grp_len]);
  486|       |
  487|   136k|    grp_val = data;
  488|       |
  489|   274k|    for (j = 0; j < grp_len; j++) {
  ------------------
  |  Branch (489:17): [True: 137k, False: 136k]
  ------------------
  490|   137k|      idx = i + (grp_len - j - 1);
  491|   137k|      next_val = grp_val % num_levels;
  492|       |
  493|   137k|      if (out_data_2 == NULL) {
  ------------------
  |  Branch (493:11): [True: 97.7k, False: 39.5k]
  ------------------
  494|  97.7k|        out_data_1[idx] = next_val - ixheaacd_drc_offset;
  495|  97.7k|      } else if (out_data_1 == NULL) {
  ------------------
  |  Branch (495:18): [True: 0, False: 39.5k]
  ------------------
  496|      0|        out_data_2[idx] = next_val - ixheaacd_drc_offset;
  497|  39.5k|      } else {
  498|  39.5k|        if (idx % 2) {
  ------------------
  |  Branch (498:13): [True: 19.7k, False: 19.8k]
  ------------------
  499|  19.7k|          out_data_2[idx / 2] = next_val - ixheaacd_drc_offset;
  500|  19.8k|        } else {
  501|  19.8k|          out_data_1[idx / 2] = next_val - ixheaacd_drc_offset;
  502|  19.8k|        }
  503|  39.5k|      }
  504|       |
  505|   137k|      grp_val = (grp_val - next_val) / num_levels;
  506|   137k|    }
  507|   136k|  }
  508|       |
  509|  19.6k|  return;
  510|  19.6k|}
ixheaacd_mps_dec.c:ixheaacd_huff_decode:
 1061|  25.5k|                                 WORD32 num_val, WORD32 *cdg_scheme, WORD32 ld_mps_flag) {
 1062|  25.5k|  WORD32 diff_type;
 1063|       |
 1064|  25.5k|  WORD32 i = 0;
 1065|  25.5k|  UWORD32 data = 0;
 1066|       |
 1067|  25.5k|  WORD32 pair_vec[MAXBANDS][2];
 1068|       |
 1069|  25.5k|  WORD32* p0_data_1[2] = {NULL, NULL};
 1070|  25.5k|  WORD32* p0_data_2[2] = {NULL, NULL};
 1071|       |
 1072|  25.5k|  WORD32 p0_flag[2];
 1073|       |
 1074|  25.5k|  WORD32 num_val_1_int = num_val;
 1075|  25.5k|  WORD32 num_val_2_int = num_val;
 1076|       |
 1077|  25.5k|  WORD32* out_data_1_int = out_data_1;
 1078|  25.5k|  WORD32* out_data_2_int = out_data_2;
 1079|       |
 1080|  25.5k|  WORD32 df_rest_flag_1 = 0;
 1081|  25.5k|  WORD32 df_rest_flag_2 = 0;
 1082|       |
 1083|  25.5k|  WORD32 huff_yy_1;
 1084|  25.5k|  WORD32 huff_yy_2;
 1085|  25.5k|  WORD32 huff_yy;
 1086|  25.5k|  if (pilot_coding_flag) {
  ------------------
  |  Branch (1086:7): [True: 5.29k, False: 20.2k]
  ------------------
 1087|  5.29k|    switch (data_type) {
 1088|  4.78k|      case CLD:
  ------------------
  |  |   23|  4.78k|#define CLD (0)
  ------------------
  |  Branch (1088:7): [True: 4.78k, False: 512]
  ------------------
 1089|  4.78k|        if (out_data_1 != NULL) {
  ------------------
  |  Branch (1089:13): [True: 4.78k, False: 0]
  ------------------
 1090|  4.78k|          ixheaacd_mps_huff_dec_pilot(
 1091|  4.78k|              it_bit_buff, (ia_huff_node_struct)&ixheaacd_huff_pilot_nodes.cld,
 1092|  4.78k|              pilot_data);
 1093|  4.78k|        }
 1094|  4.78k|        break;
 1095|       |
 1096|    449|      case ICC:
  ------------------
  |  |   24|    449|#define ICC (1)
  ------------------
  |  Branch (1096:7): [True: 449, False: 4.84k]
  ------------------
 1097|    449|        if (out_data_1 != NULL) {
  ------------------
  |  Branch (1097:13): [True: 449, False: 0]
  ------------------
 1098|    449|          ixheaacd_mps_huff_dec_pilot(
 1099|    449|              it_bit_buff, (ia_huff_node_struct)&ixheaacd_huff_pilot_nodes.icc,
 1100|    449|              pilot_data);
 1101|    449|        }
 1102|    449|        break;
 1103|       |
 1104|     63|      case CPC:
  ------------------
  |  |   26|     63|#define CPC (3)
  ------------------
  |  Branch (1104:7): [True: 63, False: 5.23k]
  ------------------
 1105|     63|        if (out_data_1 != NULL) {
  ------------------
  |  Branch (1105:13): [True: 63, False: 0]
  ------------------
 1106|     63|          ixheaacd_mps_huff_dec_pilot(
 1107|     63|              it_bit_buff,
 1108|     63|              (ia_huff_node_struct) & (ixheaacd_huff_pilot_nodes.cpc),
 1109|     63|              pilot_data);
 1110|     63|        }
 1111|     63|        break;
 1112|       |
 1113|      0|      default:
  ------------------
  |  Branch (1113:7): [True: 0, False: 5.29k]
  ------------------
 1114|      0|        break;
 1115|  5.29k|    }
 1116|  5.29k|  }
 1117|       |
 1118|  25.5k|  data = ixheaacd_read_bits_buf(it_bit_buff, 1);
 1119|  25.5k|  *cdg_scheme = data << PAIR_SHIFT;
  ------------------
  |  |   40|  25.5k|#define PAIR_SHIFT 4
  ------------------
 1120|       |
 1121|  25.5k|  if (*cdg_scheme >> PAIR_SHIFT == HUFF_2D) {
  ------------------
  |  |   40|  25.5k|#define PAIR_SHIFT 4
  ------------------
                if (*cdg_scheme >> PAIR_SHIFT == HUFF_2D) {
  ------------------
  |  |   35|  25.5k|#define HUFF_2D (1)
  ------------------
  |  Branch (1121:7): [True: 16.1k, False: 9.40k]
  ------------------
 1122|  16.1k|    if ((out_data_1 != NULL) && (out_data_2 != NULL) && (ld_mps_flag != 1)) {
  ------------------
  |  Branch (1122:9): [True: 16.1k, False: 0]
  |  Branch (1122:33): [True: 8.76k, False: 7.35k]
  |  Branch (1122:57): [True: 8.31k, False: 454]
  ------------------
 1123|  8.31k|      data = ixheaacd_read_bits_buf(it_bit_buff, 1);
 1124|  8.31k|      *cdg_scheme |= data;
 1125|  8.31k|    } else {
 1126|  7.80k|      *cdg_scheme |= FREQ_PAIR;
  ------------------
  |  |   37|  7.80k|#define FREQ_PAIR (0)
  ------------------
 1127|  7.80k|    }
 1128|  16.1k|  }
 1129|       |
 1130|  25.5k|  if (pilot_coding_flag) {
  ------------------
  |  Branch (1130:7): [True: 5.29k, False: 20.2k]
  ------------------
 1131|  5.29k|    huff_yy_1 = PCM_PLT;
  ------------------
  |  |   43|  5.29k|#define PCM_PLT 0x2
  ------------------
 1132|  5.29k|    huff_yy_2 = PCM_PLT;
  ------------------
  |  |   43|  5.29k|#define PCM_PLT 0x2
  ------------------
 1133|  20.2k|  } else {
 1134|  20.2k|    huff_yy_1 = diff_type_1;
 1135|  20.2k|    huff_yy_2 = diff_type_2;
 1136|  20.2k|  }
 1137|       |
 1138|  25.5k|  switch (*cdg_scheme >> PAIR_SHIFT) {
  ------------------
  |  |   40|  25.5k|#define PAIR_SHIFT 4
  ------------------
 1139|  9.40k|    case HUFF_1D:
  ------------------
  |  |   34|  9.40k|#define HUFF_1D (0)
  ------------------
  |  Branch (1139:5): [True: 9.40k, False: 16.1k]
  ------------------
 1140|       |
 1141|  9.40k|      p0_flag[0] = (diff_type_1 == DIFF_FREQ) && !pilot_coding_flag;
  ------------------
  |  |   31|  9.40k|#define DIFF_FREQ (0)
  ------------------
  |  Branch (1141:20): [True: 8.46k, False: 940]
  |  Branch (1141:50): [True: 7.64k, False: 823]
  ------------------
 1142|  9.40k|      p0_flag[1] = (diff_type_2 == DIFF_FREQ) && !pilot_coding_flag;
  ------------------
  |  |   31|  9.40k|#define DIFF_FREQ (0)
  ------------------
  |  Branch (1142:20): [True: 8.73k, False: 671]
  |  Branch (1142:50): [True: 7.90k, False: 823]
  ------------------
 1143|       |
 1144|  9.40k|      switch (data_type) {
 1145|  6.07k|        case CLD:
  ------------------
  |  |   23|  6.07k|#define CLD (0)
  ------------------
  |  Branch (1145:9): [True: 6.07k, False: 3.32k]
  ------------------
 1146|  6.07k|          if (out_data_1 != NULL) {
  ------------------
  |  Branch (1146:15): [True: 6.07k, False: 0]
  ------------------
 1147|  6.07k|            ixheaacd_mps_huff_dec_cld_1d(
 1148|  6.07k|                it_bit_buff, &ixheaacd_huff_cld_nodes.h_1_dim[huff_yy_1],
 1149|  6.07k|                out_data_1, num_val_1_int, p0_flag[0]);
 1150|  6.07k|          }
 1151|  6.07k|          if (out_data_2 != NULL) {
  ------------------
  |  Branch (1151:15): [True: 2.38k, False: 3.69k]
  ------------------
 1152|  2.38k|            ixheaacd_mps_huff_dec_cld_1d(
 1153|  2.38k|                it_bit_buff, &ixheaacd_huff_cld_nodes.h_1_dim[huff_yy_2],
 1154|  2.38k|                out_data_2, num_val_2_int, p0_flag[1]);
 1155|  2.38k|          }
 1156|       |
 1157|  6.07k|          break;
 1158|       |
 1159|  2.39k|        case ICC:
  ------------------
  |  |   24|  2.39k|#define ICC (1)
  ------------------
  |  Branch (1159:9): [True: 2.39k, False: 7.01k]
  ------------------
 1160|  2.39k|          if (out_data_1 != NULL) {
  ------------------
  |  Branch (1160:15): [True: 2.39k, False: 0]
  ------------------
 1161|  2.39k|            ixheaacd_mps_huff_dec_icc_1d(
 1162|  2.39k|                it_bit_buff, &ixheaacd_huff_icc_nodes.h_1_dim[huff_yy_1],
 1163|  2.39k|                out_data_1, num_val_1_int, p0_flag[0]);
 1164|  2.39k|          }
 1165|  2.39k|          if (out_data_2 != NULL) {
  ------------------
  |  Branch (1165:15): [True: 812, False: 1.58k]
  ------------------
 1166|    812|            ixheaacd_mps_huff_dec_icc_1d(
 1167|    812|                it_bit_buff, &ixheaacd_huff_icc_nodes.h_1_dim[huff_yy_2],
 1168|    812|                out_data_2, num_val_2_int, p0_flag[1]);
 1169|    812|          }
 1170|       |
 1171|  2.39k|          break;
 1172|       |
 1173|    744|        case IPD:
  ------------------
  |  |   25|    744|#define IPD (2)
  ------------------
  |  Branch (1173:9): [True: 744, False: 8.65k]
  ------------------
 1174|    744|          if (out_data_1 != NULL) {
  ------------------
  |  Branch (1174:15): [True: 744, False: 0]
  ------------------
 1175|    744|            ixheaacd_mps_huff_dec_ipd_1d(
 1176|    744|                it_bit_buff, &ixheaacd_huff_ipd_nodes.h_1_dim[huff_yy_1],
 1177|    744|                out_data_1, num_val_1_int, p0_flag[0]);
 1178|    744|          }
 1179|    744|          if (out_data_2 != NULL) {
  ------------------
  |  Branch (1179:15): [True: 288, False: 456]
  ------------------
 1180|    288|            ixheaacd_mps_huff_dec_ipd_1d(
 1181|    288|                it_bit_buff, &ixheaacd_huff_ipd_nodes.h_1_dim[huff_yy_2],
 1182|    288|                out_data_2, num_val_2_int, p0_flag[1]);
 1183|    288|          }
 1184|       |
 1185|    744|          break;
 1186|    187|        case CPC:
  ------------------
  |  |   26|    187|#define CPC (3)
  ------------------
  |  Branch (1186:9): [True: 187, False: 9.21k]
  ------------------
 1187|    187|          if (out_data_1 != NULL) {
  ------------------
  |  Branch (1187:15): [True: 187, False: 0]
  ------------------
 1188|    187|            ia_mps_dec_huff_dec_cpc_1d(
 1189|    187|                &(ixheaacd_huff_cpc_nodes.h_1_dim[huff_yy_1]), out_data_1,
 1190|    187|                num_val_1_int, p0_flag[0], it_bit_buff);
 1191|    187|          }
 1192|    187|          if (out_data_2 != NULL) {
  ------------------
  |  Branch (1192:15): [True: 113, False: 74]
  ------------------
 1193|    113|            ia_mps_dec_huff_dec_cpc_1d(
 1194|    113|                &(ixheaacd_huff_cpc_nodes.h_1_dim[huff_yy_2]), out_data_2,
 1195|    113|                num_val_2_int, p0_flag[1], it_bit_buff);
 1196|    113|          }
 1197|       |
 1198|    187|          break;
 1199|      0|        default:
  ------------------
  |  Branch (1199:9): [True: 0, False: 9.40k]
  ------------------
 1200|      0|          break;
 1201|  9.40k|      }
 1202|       |
 1203|  9.35k|      break;
 1204|       |
 1205|  16.1k|    case HUFF_2D:
  ------------------
  |  |   35|  16.1k|#define HUFF_2D (1)
  ------------------
  |  Branch (1205:5): [True: 16.1k, False: 9.40k]
  ------------------
 1206|       |
 1207|  16.1k|      switch (*cdg_scheme & PAIR_MASK) {
  ------------------
  |  |   41|  16.1k|#define PAIR_MASK 0xf
  ------------------
 1208|  12.4k|        case FREQ_PAIR:
  ------------------
  |  |   37|  12.4k|#define FREQ_PAIR (0)
  ------------------
  |  Branch (1208:9): [True: 12.4k, False: 3.63k]
  ------------------
 1209|       |
 1210|  12.4k|          if (out_data_1 != NULL) {
  ------------------
  |  Branch (1210:15): [True: 12.4k, False: 0]
  ------------------
 1211|  12.4k|            if (!pilot_coding_flag && diff_type_1 == DIFF_FREQ) {
  ------------------
  |  |   31|  8.27k|#define DIFF_FREQ (0)
  ------------------
  |  Branch (1211:17): [True: 8.27k, False: 4.20k]
  |  Branch (1211:39): [True: 5.47k, False: 2.79k]
  ------------------
 1212|  5.47k|              p0_data_1[0] = &out_data_1[0];
 1213|  5.47k|              p0_data_1[1] = NULL;
 1214|       |
 1215|  5.47k|              num_val_1_int -= 1;
 1216|  5.47k|              out_data_1_int += 1;
 1217|  5.47k|            }
 1218|  12.4k|            df_rest_flag_1 = num_val_1_int % 2;
 1219|  12.4k|            if (df_rest_flag_1) num_val_1_int -= 1;
  ------------------
  |  Branch (1219:17): [True: 3.71k, False: 8.76k]
  ------------------
 1220|  12.4k|          }
 1221|  12.4k|          if (out_data_2 != NULL) {
  ------------------
  |  Branch (1221:15): [True: 5.13k, False: 7.35k]
  ------------------
 1222|  5.13k|            if (!pilot_coding_flag && diff_type_2 == DIFF_FREQ) {
  ------------------
  |  |   31|  1.17k|#define DIFF_FREQ (0)
  ------------------
  |  Branch (1222:17): [True: 1.17k, False: 3.96k]
  |  Branch (1222:39): [True: 571, False: 599]
  ------------------
 1223|    571|              p0_data_2[0] = NULL;
 1224|    571|              p0_data_2[1] = &out_data_2[0];
 1225|       |
 1226|    571|              num_val_2_int -= 1;
 1227|    571|              out_data_2_int += 1;
 1228|    571|            }
 1229|  5.13k|            df_rest_flag_2 = num_val_2_int % 2;
 1230|  5.13k|            if (df_rest_flag_2) num_val_2_int -= 1;
  ------------------
  |  Branch (1230:17): [True: 695, False: 4.43k]
  ------------------
 1231|  5.13k|          }
 1232|       |
 1233|  12.4k|          switch (data_type) {
 1234|  9.24k|            case CLD:
  ------------------
  |  |   23|  9.24k|#define CLD (0)
  ------------------
  |  Branch (1234:13): [True: 9.24k, False: 3.23k]
  ------------------
 1235|       |
 1236|  9.24k|              if (out_data_1 != NULL) {
  ------------------
  |  Branch (1236:19): [True: 9.24k, False: 0]
  ------------------
 1237|  9.24k|                ixheaacd_mps_huff_dec_cld_2d(
 1238|  9.24k|                    it_bit_buff,
 1239|  9.24k|                    &ixheaacd_huff_cld_nodes.h_2_dim[huff_yy_1][FREQ_PAIR],
  ------------------
  |  |   37|  9.24k|#define FREQ_PAIR (0)
  ------------------
 1240|  9.24k|                    pair_vec, num_val_1_int, 2, p0_data_1);
 1241|  9.24k|                if (df_rest_flag_1) {
  ------------------
  |  Branch (1241:21): [True: 1.83k, False: 7.40k]
  ------------------
 1242|  1.83k|                  ixheaacd_mps_huff_dec_cld_1d(
 1243|  1.83k|                      it_bit_buff, &ixheaacd_huff_cld_nodes.h_1_dim[huff_yy_1],
 1244|  1.83k|                      out_data_1_int + num_val_1_int, 1, 0);
 1245|  1.83k|                }
 1246|  9.24k|              }
 1247|  9.24k|              if (out_data_2 != NULL) {
  ------------------
  |  Branch (1247:19): [True: 4.52k, False: 4.71k]
  ------------------
 1248|  4.52k|                ixheaacd_mps_huff_dec_cld_2d(
 1249|  4.52k|                    it_bit_buff,
 1250|  4.52k|                    &ixheaacd_huff_cld_nodes.h_2_dim[huff_yy_2][FREQ_PAIR],
  ------------------
  |  |   37|  4.52k|#define FREQ_PAIR (0)
  ------------------
 1251|  4.52k|                    pair_vec + 1, num_val_2_int, 2, p0_data_2);
 1252|  4.52k|                if (df_rest_flag_2) {
  ------------------
  |  Branch (1252:21): [True: 340, False: 4.18k]
  ------------------
 1253|    340|                  ixheaacd_mps_huff_dec_cld_1d(
 1254|    340|                      it_bit_buff, &ixheaacd_huff_cld_nodes.h_1_dim[huff_yy_2],
 1255|    340|                      out_data_2_int + num_val_2_int, 1, 0);
 1256|    340|                }
 1257|  4.52k|              }
 1258|  9.24k|              break;
 1259|       |
 1260|  2.76k|            case ICC:
  ------------------
  |  |   24|  2.76k|#define ICC (1)
  ------------------
  |  Branch (1260:13): [True: 2.76k, False: 9.71k]
  ------------------
 1261|  2.76k|              if (out_data_1 != NULL) {
  ------------------
  |  Branch (1261:19): [True: 2.76k, False: 0]
  ------------------
 1262|  2.76k|                ixheaacd_mps_huff_dec_icc_2d(
 1263|  2.76k|                    it_bit_buff,
 1264|  2.76k|                    &ixheaacd_huff_icc_nodes.h_2_dim[huff_yy_1][FREQ_PAIR],
  ------------------
  |  |   37|  2.76k|#define FREQ_PAIR (0)
  ------------------
 1265|  2.76k|                    pair_vec, num_val_1_int, 2, p0_data_1);
 1266|  2.76k|                if (df_rest_flag_1) {
  ------------------
  |  Branch (1266:21): [True: 1.73k, False: 1.03k]
  ------------------
 1267|  1.73k|                  ixheaacd_mps_huff_dec_icc_1d(
 1268|  1.73k|                      it_bit_buff, &ixheaacd_huff_icc_nodes.h_1_dim[huff_yy_1],
 1269|  1.73k|                      out_data_1_int + num_val_1_int, 1, 0);
 1270|  1.73k|                }
 1271|  2.76k|              }
 1272|  2.76k|              if (out_data_2 != NULL) {
  ------------------
  |  Branch (1272:19): [True: 496, False: 2.27k]
  ------------------
 1273|    496|                ixheaacd_mps_huff_dec_icc_2d(
 1274|    496|                    it_bit_buff,
 1275|    496|                    &ixheaacd_huff_icc_nodes.h_2_dim[huff_yy_2][FREQ_PAIR],
  ------------------
  |  |   37|    496|#define FREQ_PAIR (0)
  ------------------
 1276|    496|                    pair_vec + 1, num_val_2_int, 2, p0_data_2);
 1277|    496|                if (df_rest_flag_2) {
  ------------------
  |  Branch (1277:21): [True: 298, False: 198]
  ------------------
 1278|    298|                  ixheaacd_mps_huff_dec_icc_1d(
 1279|    298|                      it_bit_buff, &ixheaacd_huff_icc_nodes.h_1_dim[huff_yy_2],
 1280|    298|                      out_data_2_int + num_val_2_int, 1, 0);
 1281|    298|                }
 1282|    496|              }
 1283|  2.76k|              break;
 1284|       |
 1285|    360|            case IPD:
  ------------------
  |  |   25|    360|#define IPD (2)
  ------------------
  |  Branch (1285:13): [True: 360, False: 12.1k]
  ------------------
 1286|    360|              if (out_data_1 != NULL) {
  ------------------
  |  Branch (1286:19): [True: 360, False: 0]
  ------------------
 1287|    360|                ixheaacd_mps_huff_dec_ipd_2d(
 1288|    360|                    it_bit_buff,
 1289|    360|                    &ixheaacd_huff_ipd_nodes.h_2_dim[huff_yy_1][FREQ_PAIR],
  ------------------
  |  |   37|    360|#define FREQ_PAIR (0)
  ------------------
 1290|    360|                    pair_vec, num_val_1_int, 2, p0_data_1);
 1291|    360|                if (df_rest_flag_1) {
  ------------------
  |  Branch (1291:21): [True: 83, False: 277]
  ------------------
 1292|     83|                  ixheaacd_mps_huff_dec_ipd_1d(
 1293|     83|                      it_bit_buff, &ixheaacd_huff_ipd_nodes.h_1_dim[huff_yy_1],
 1294|     83|                      out_data_1_int + num_val_1_int, 1, 0);
 1295|     83|                }
 1296|    360|              }
 1297|    360|              if (out_data_2 != NULL) {
  ------------------
  |  Branch (1297:19): [True: 64, False: 296]
  ------------------
 1298|     64|                ixheaacd_mps_huff_dec_ipd_2d(
 1299|     64|                    it_bit_buff,
 1300|     64|                    &ixheaacd_huff_ipd_nodes.h_2_dim[huff_yy_2][FREQ_PAIR],
  ------------------
  |  |   37|     64|#define FREQ_PAIR (0)
  ------------------
 1301|     64|                    pair_vec + 1, num_val_2_int, 2, p0_data_2);
 1302|     64|                if (df_rest_flag_2) {
  ------------------
  |  Branch (1302:21): [True: 29, False: 35]
  ------------------
 1303|     29|                  ixheaacd_mps_huff_dec_ipd_1d(
 1304|     29|                      it_bit_buff, &ixheaacd_huff_ipd_nodes.h_1_dim[huff_yy_2],
 1305|     29|                      out_data_2_int + num_val_2_int, 1, 0);
 1306|     29|                }
 1307|     64|              }
 1308|    360|              break;
 1309|    111|            case CPC:
  ------------------
  |  |   26|    111|#define CPC (3)
  ------------------
  |  Branch (1309:13): [True: 111, False: 12.3k]
  ------------------
 1310|    111|              if (out_data_1 != NULL) {
  ------------------
  |  Branch (1310:19): [True: 111, False: 0]
  ------------------
 1311|    111|                ia_mps_dec_huff_dec_cpc_2d(
 1312|    111|                    &(ixheaacd_huff_cpc_nodes.h_2_dim[huff_yy_1][FREQ_PAIR]), pair_vec,
  ------------------
  |  |   37|    111|#define FREQ_PAIR (0)
  ------------------
 1313|    111|                    num_val_1_int, 2, p0_data_1, it_bit_buff);
 1314|    111|                if (df_rest_flag_1) {
  ------------------
  |  Branch (1314:21): [True: 61, False: 50]
  ------------------
 1315|     61|                  ia_mps_dec_huff_dec_cpc_1d(&(ixheaacd_huff_cpc_nodes.h_1_dim[huff_yy_1]),
 1316|     61|                      out_data_1_int + num_val_1_int, 1, 0, it_bit_buff);
 1317|     61|                }
 1318|    111|              }
 1319|    111|              if (out_data_2 != NULL) {
  ------------------
  |  Branch (1319:19): [True: 42, False: 69]
  ------------------
 1320|     42|                ia_mps_dec_huff_dec_cpc_2d(
 1321|     42|                    &(ixheaacd_huff_cpc_nodes.h_2_dim[huff_yy_2][FREQ_PAIR]), pair_vec + 1,
  ------------------
  |  |   37|     42|#define FREQ_PAIR (0)
  ------------------
 1322|     42|                    num_val_2_int, 2, p0_data_2, it_bit_buff);
 1323|       |
 1324|     42|                if (df_rest_flag_2) {
  ------------------
  |  Branch (1324:21): [True: 24, False: 18]
  ------------------
 1325|     24|                  ia_mps_dec_huff_dec_cpc_1d(
 1326|     24|                      &(ixheaacd_huff_cpc_nodes.h_1_dim[huff_yy_2]),
 1327|     24|                      out_data_2_int + num_val_2_int, 1, 0, it_bit_buff);
 1328|     24|                }
 1329|     42|              }
 1330|    111|              break;
 1331|      0|            default:
  ------------------
  |  Branch (1331:13): [True: 0, False: 12.4k]
  ------------------
 1332|      0|              break;
 1333|  12.4k|          }
 1334|       |
 1335|  12.4k|          if (out_data_1 != NULL) {
  ------------------
  |  Branch (1335:15): [True: 12.4k, False: 0]
  ------------------
 1336|  55.8k|            for (i = 0; i < num_val_1_int - 1; i += 2) {
  ------------------
  |  Branch (1336:25): [True: 43.3k, False: 12.4k]
  ------------------
 1337|  43.3k|              out_data_1_int[i] = pair_vec[i][0];
 1338|  43.3k|              out_data_1_int[i + 1] = pair_vec[i][1];
 1339|  43.3k|            }
 1340|  12.4k|          }
 1341|  12.4k|          if (out_data_2 != NULL) {
  ------------------
  |  Branch (1341:15): [True: 5.12k, False: 7.34k]
  ------------------
 1342|  27.8k|            for (i = 0; i < num_val_2_int - 1; i += 2) {
  ------------------
  |  Branch (1342:25): [True: 22.7k, False: 5.12k]
  ------------------
 1343|  22.7k|              out_data_2_int[i] = pair_vec[i + 1][0];
 1344|  22.7k|              out_data_2_int[i + 1] = pair_vec[i + 1][1];
 1345|  22.7k|            }
 1346|  5.12k|          }
 1347|       |
 1348|  12.4k|          break;
 1349|       |
 1350|  3.63k|        case TIME_PAIR:
  ------------------
  |  |   38|  3.63k|#define TIME_PAIR (1)
  ------------------
  |  Branch (1350:9): [True: 3.63k, False: 12.4k]
  ------------------
 1351|       |
 1352|  3.63k|          if (!pilot_coding_flag &&
  ------------------
  |  Branch (1352:15): [True: 3.36k, False: 268]
  ------------------
 1353|  3.36k|              ((diff_type_1 == DIFF_FREQ) || (diff_type_2 == DIFF_FREQ))) {
  ------------------
  |  |   31|  3.36k|#define DIFF_FREQ (0)
  ------------------
                            ((diff_type_1 == DIFF_FREQ) || (diff_type_2 == DIFF_FREQ))) {
  ------------------
  |  |   31|    642|#define DIFF_FREQ (0)
  ------------------
  |  Branch (1353:16): [True: 2.72k, False: 642]
  |  Branch (1353:46): [True: 407, False: 235]
  ------------------
 1354|  3.13k|            p0_data_1[0] = &out_data_1[0];
 1355|  3.13k|            p0_data_1[1] = &out_data_2[0];
 1356|       |
 1357|  3.13k|            out_data_1_int += 1;
 1358|  3.13k|            out_data_2_int += 1;
 1359|       |
 1360|  3.13k|            num_val_1_int -= 1;
 1361|  3.13k|          }
 1362|       |
 1363|  3.63k|          if ((diff_type_1 == DIFF_TIME) || (diff_type_2 == DIFF_TIME)) {
  ------------------
  |  |   32|  3.63k|#define DIFF_TIME (1)
  ------------------
                        if ((diff_type_1 == DIFF_TIME) || (diff_type_2 == DIFF_TIME)) {
  ------------------
  |  |   32|  2.99k|#define DIFF_TIME (1)
  ------------------
  |  Branch (1363:15): [True: 642, False: 2.99k]
  |  Branch (1363:45): [True: 2.49k, False: 498]
  ------------------
 1364|  3.13k|            diff_type = DIFF_TIME;
  ------------------
  |  |   32|  3.13k|#define DIFF_TIME (1)
  ------------------
 1365|  3.13k|          } else {
 1366|    498|            diff_type = DIFF_FREQ;
  ------------------
  |  |   31|    498|#define DIFF_FREQ (0)
  ------------------
 1367|    498|          }
 1368|  3.63k|          if (pilot_coding_flag) {
  ------------------
  |  Branch (1368:15): [True: 268, False: 3.36k]
  ------------------
 1369|    268|            huff_yy = PCM_PLT;
  ------------------
  |  |   43|    268|#define PCM_PLT 0x2
  ------------------
 1370|  3.36k|          } else {
 1371|  3.36k|            huff_yy = diff_type;
 1372|  3.36k|          }
 1373|       |
 1374|  3.63k|          switch (data_type) {
 1375|  1.72k|            case CLD:
  ------------------
  |  |   23|  1.72k|#define CLD (0)
  ------------------
  |  Branch (1375:13): [True: 1.72k, False: 1.91k]
  ------------------
 1376|  1.72k|              ixheaacd_mps_huff_dec_cld_2d(
 1377|  1.72k|                  it_bit_buff,
 1378|  1.72k|                  &ixheaacd_huff_cld_nodes.h_2_dim[huff_yy][TIME_PAIR],
  ------------------
  |  |   38|  1.72k|#define TIME_PAIR (1)
  ------------------
 1379|  1.72k|                  pair_vec, num_val_1_int, 1, p0_data_1);
 1380|  1.72k|              break;
 1381|       |
 1382|  1.66k|            case ICC:
  ------------------
  |  |   24|  1.66k|#define ICC (1)
  ------------------
  |  Branch (1382:13): [True: 1.66k, False: 1.96k]
  ------------------
 1383|  1.66k|              ixheaacd_mps_huff_dec_icc_2d(
 1384|  1.66k|                  it_bit_buff,
 1385|  1.66k|                  &ixheaacd_huff_icc_nodes.h_2_dim[huff_yy][TIME_PAIR],
  ------------------
  |  |   38|  1.66k|#define TIME_PAIR (1)
  ------------------
 1386|  1.66k|                  pair_vec, num_val_1_int, 1, p0_data_1);
 1387|  1.66k|              break;
 1388|       |
 1389|    156|            case IPD:
  ------------------
  |  |   25|    156|#define IPD (2)
  ------------------
  |  Branch (1389:13): [True: 156, False: 3.47k]
  ------------------
 1390|    156|              ixheaacd_mps_huff_dec_ipd_2d(
 1391|    156|                  it_bit_buff,
 1392|    156|                  &ixheaacd_huff_ipd_nodes.h_2_dim[huff_yy][TIME_PAIR],
  ------------------
  |  |   38|    156|#define TIME_PAIR (1)
  ------------------
 1393|    156|                  pair_vec, num_val_1_int, 1, p0_data_1);
 1394|    156|              break;
 1395|     85|            case CPC:
  ------------------
  |  |   26|     85|#define CPC (3)
  ------------------
  |  Branch (1395:13): [True: 85, False: 3.54k]
  ------------------
 1396|     85|              ia_mps_dec_huff_dec_cpc_2d(&(ixheaacd_huff_cpc_nodes.h_2_dim[huff_yy][TIME_PAIR]),
  ------------------
  |  |   38|     85|#define TIME_PAIR (1)
  ------------------
 1397|     85|                  pair_vec, num_val_1_int, 1, p0_data_1, it_bit_buff);
 1398|     85|              break;
 1399|      0|            default:
  ------------------
  |  Branch (1399:13): [True: 0, False: 3.63k]
  ------------------
 1400|      0|              break;
 1401|  3.63k|          }
 1402|       |
 1403|  20.9k|          for (i = 0; i < num_val_1_int; i++) {
  ------------------
  |  Branch (1403:23): [True: 17.3k, False: 3.62k]
  ------------------
 1404|  17.3k|            out_data_1_int[i] = pair_vec[i][0];
 1405|  17.3k|            out_data_2_int[i] = pair_vec[i][1];
 1406|  17.3k|          }
 1407|       |
 1408|  3.62k|          break;
 1409|       |
 1410|      0|        default:
  ------------------
  |  Branch (1410:9): [True: 0, False: 16.1k]
  ------------------
 1411|      0|          break;
 1412|  16.1k|      }
 1413|       |
 1414|  16.0k|      break;
 1415|       |
 1416|  16.0k|    default:
  ------------------
  |  Branch (1416:5): [True: 0, False: 25.5k]
  ------------------
 1417|      0|      break;
 1418|  25.5k|  }
 1419|       |
 1420|  25.4k|  return;
 1421|  25.5k|}
ixheaacd_mps_dec.c:ixheaacd_mps_huff_dec_pilot:
  617|  5.29k|                                        WORD32* pilot_data) {
  618|  5.29k|  WORD32 node = 0;
  619|       |
  620|  5.29k|  ixheaacd_mps_huff_read(it_bit_buff, node_tab, &node);
  621|  5.29k|  *pilot_data = -(node + 1);
  622|       |
  623|  5.29k|  return;
  624|  5.29k|}
ixheaacd_mps_dec.c:ixheaacd_mps_huff_read:
  514|   251k|                                   WORD32* out_data) {
  515|   251k|  WORD32 node = 0;
  516|   251k|  UWORD32 next_bit = 0;
  517|       |
  518|   566k|  do {
  519|   566k|    next_bit = ixheaacd_read_bits_buf(it_bit_buff, 1);
  520|   566k|    node = (*node_tab)[node][next_bit];
  521|   566k|  } while (node > 0);
  ------------------
  |  Branch (521:12): [True: 314k, False: 251k]
  ------------------
  522|       |
  523|   251k|  *out_data = node;
  524|       |
  525|   251k|  return;
  526|   251k|}
ixheaacd_mps_dec.c:ixheaacd_mps_huff_dec_cld_1d:
  629|  10.6k|    WORD32 num_val, WORD32 p0_flag) {
  630|  10.6k|  WORD32 i = 0, node = 0, ixheaacd_drc_offset = 0;
  631|  10.6k|  WORD32 od = 0, od_sign = 0;
  632|  10.6k|  UWORD32 data = 0;
  633|       |
  634|  10.6k|  if (p0_flag) {
  ------------------
  |  Branch (634:7): [True: 6.47k, False: 4.16k]
  ------------------
  635|  6.47k|    ixheaacd_mps_huff_read(it_bit_buff,
  636|  6.47k|                           (ia_huff_node_struct)&ixheaacd_huff_part0_nodes.cld,
  637|  6.47k|                           &node);
  638|  6.47k|    out_data[0] = -(node + 1);
  639|  6.47k|    ixheaacd_drc_offset = 1;
  640|  6.47k|  }
  641|       |
  642|  73.1k|  for (i = ixheaacd_drc_offset; i < num_val; i++) {
  ------------------
  |  Branch (642:33): [True: 62.5k, False: 10.6k]
  ------------------
  643|  62.5k|    ixheaacd_mps_huff_read(it_bit_buff,
  644|  62.5k|                           (ia_huff_node_struct)&huff_nodes->node_tab, &node);
  645|  62.5k|    od = -(node + 1);
  646|       |
  647|  62.5k|    if (od != 0) {
  ------------------
  |  Branch (647:9): [True: 13.0k, False: 49.5k]
  ------------------
  648|  13.0k|      data = ixheaacd_read_bits_buf(it_bit_buff, 1);
  649|  13.0k|      od_sign = data;
  650|       |
  651|  13.0k|      if (od_sign) od = -od;
  ------------------
  |  Branch (651:11): [True: 4.46k, False: 8.54k]
  ------------------
  652|  13.0k|    }
  653|       |
  654|  62.5k|    out_data[i] = od;
  655|  62.5k|  }
  656|       |
  657|  10.6k|  return;
  658|  10.6k|}
ixheaacd_mps_dec.c:ixheaacd_mps_huff_dec_icc_1d:
  688|  5.23k|    WORD32 num_val, WORD32 p0_flag) {
  689|  5.23k|  WORD32 i = 0, node = 0, ixheaacd_drc_offset = 0;
  690|  5.23k|  WORD32 od = 0, od_sign = 0;
  691|  5.23k|  UWORD32 data = 0;
  692|       |
  693|  5.23k|  if (p0_flag) {
  ------------------
  |  Branch (693:7): [True: 2.55k, False: 2.67k]
  ------------------
  694|  2.55k|    ixheaacd_mps_huff_read(it_bit_buff,
  695|  2.55k|                           (ia_huff_node_struct)&ixheaacd_huff_part0_nodes.icc,
  696|  2.55k|                           &node);
  697|  2.55k|    out_data[0] = -(node + 1);
  698|  2.55k|    ixheaacd_drc_offset = 1;
  699|  2.55k|  }
  700|       |
  701|  30.0k|  for (i = ixheaacd_drc_offset; i < num_val; i++) {
  ------------------
  |  Branch (701:33): [True: 24.8k, False: 5.23k]
  ------------------
  702|  24.8k|    ixheaacd_mps_huff_read(it_bit_buff,
  703|  24.8k|                           (ia_huff_node_struct)&huff_nodes->node_tab, &node);
  704|  24.8k|    od = -(node + 1);
  705|       |
  706|  24.8k|    if (od != 0) {
  ------------------
  |  Branch (706:9): [True: 7.63k, False: 17.2k]
  ------------------
  707|  7.63k|      data = ixheaacd_read_bits_buf(it_bit_buff, 1);
  708|  7.63k|      od_sign = data;
  709|       |
  710|  7.63k|      if (od_sign) od = -od;
  ------------------
  |  Branch (710:11): [True: 2.72k, False: 4.91k]
  ------------------
  711|  7.63k|    }
  712|       |
  713|  24.8k|    out_data[i] = od;
  714|  24.8k|  }
  715|       |
  716|  5.23k|  return;
  717|  5.23k|}
ixheaacd_mps_dec.c:ixheaacd_mps_huff_dec_ipd_1d:
  663|  1.14k|    WORD32 num_val, WORD32 p0_flag) {
  664|  1.14k|  WORD32 i = 0, node = 0, ixheaacd_drc_offset = 0;
  665|  1.14k|  WORD32 od = 0;
  666|       |
  667|  1.14k|  if (p0_flag) {
  ------------------
  |  Branch (667:7): [True: 833, False: 311]
  ------------------
  668|    833|    ixheaacd_mps_huff_read(
  669|    833|        it_bit_buff, (ia_huff_node_struct)&ixheaacd_huff_ipd_nodes.hp0.node_tab,
  670|    833|        &node);
  671|    833|    out_data[0] = -(node + 1);
  672|    833|    ixheaacd_drc_offset = 1;
  673|    833|  }
  674|       |
  675|  10.4k|  for (i = ixheaacd_drc_offset; i < num_val; i++) {
  ------------------
  |  Branch (675:33): [True: 9.25k, False: 1.14k]
  ------------------
  676|  9.25k|    ixheaacd_mps_huff_read(it_bit_buff,
  677|  9.25k|                           (ia_huff_node_struct)&huff_nodes->node_tab, &node);
  678|  9.25k|    od = -(node + 1);
  679|  9.25k|    out_data[i] = od;
  680|  9.25k|  }
  681|       |
  682|  1.14k|  return;
  683|  1.14k|}
ixheaacd_mps_dec.c:ia_mps_dec_huff_dec_cpc_1d:
  721|    385|    WORD32 num_val, WORD32 p0_flag, ia_bit_buf_struct *h_bit_buf) {
  722|    385|  WORD32 i = 0, node = 0, offset = 0;
  723|    385|  WORD32 od = 0, od_sign = 0;
  724|    385|  WORD32 data = 0;
  725|       |
  726|    385|  if (p0_flag) {
  ------------------
  |  Branch (726:7): [True: 175, False: 210]
  ------------------
  727|    175|    ixheaacd_mps_huff_read(
  728|    175|        h_bit_buf, (ia_huff_node_struct) & (ixheaacd_huff_part0_nodes.cpc),
  729|    175|        &node);
  730|    175|    out_data[0] = -(node + 1);
  731|    175|    offset = 1;
  732|    175|  }
  733|       |
  734|  2.73k|  for (i = offset; i < num_val; i++) {
  ------------------
  |  Branch (734:20): [True: 2.35k, False: 385]
  ------------------
  735|  2.35k|    ixheaacd_mps_huff_read(h_bit_buf,
  736|  2.35k|                           (ia_huff_node_struct)&huff_nodes->node_tab, &node);
  737|  2.35k|    od = -(node + 1);
  738|       |
  739|  2.35k|    if (od != 0) {
  ------------------
  |  Branch (739:9): [True: 1.49k, False: 859]
  ------------------
  740|  1.49k|      data = ixheaacd_read_bits_buf(h_bit_buf, 1);
  741|  1.49k|      od_sign = data;
  742|       |
  743|  1.49k|      if (od_sign) od = -od;
  ------------------
  |  Branch (743:11): [True: 733, False: 760]
  ------------------
  744|  1.49k|    }
  745|       |
  746|  2.35k|    out_data[i] = od;
  747|  2.35k|  }
  748|    385|}
ixheaacd_mps_dec.c:ixheaacd_mps_huff_dec_cld_2d:
  753|  15.4k|    WORD32 num_val, WORD32 ch_fac, WORD32* p0_data[2]) {
  754|  15.4k|  WORD32 i = 0, lav = 0, escape = 0, esc_contrl = 0;
  755|  15.4k|  WORD32 node = 0;
  756|  15.4k|  UWORD32 data = 0;
  757|       |
  758|  15.4k|  WORD32 esc_data[MAXBANDS][2] = {{0}};
  759|  15.4k|  WORD32 esc_idx[MAXBANDS] = {0};
  760|       |
  761|  15.4k|  ixheaacd_mps_huff_read(
  762|  15.4k|      it_bit_buff, (ia_huff_node_struct)&ixheaacd_huff_lav_idx_nodes.node_tab,
  763|  15.4k|      &node);
  764|  15.4k|  data = -(node + 1);
  765|       |
  766|  15.4k|  lav = 2 * data + 3;
  767|       |
  768|  15.4k|  if (p0_data[0] != NULL) {
  ------------------
  |  Branch (768:7): [True: 5.99k, False: 9.50k]
  ------------------
  769|  5.99k|    ixheaacd_mps_huff_read(it_bit_buff,
  770|  5.99k|                           (ia_huff_node_struct)&ixheaacd_huff_part0_nodes.cld,
  771|  5.99k|                           &node);
  772|  5.99k|    *p0_data[0] = -(node + 1);
  773|  5.99k|  }
  774|  15.4k|  if (p0_data[1] != NULL) {
  ------------------
  |  Branch (774:7): [True: 1.88k, False: 13.6k]
  ------------------
  775|  1.88k|    ixheaacd_mps_huff_read(it_bit_buff,
  776|  1.88k|                           (ia_huff_node_struct)&ixheaacd_huff_part0_nodes.cld,
  777|  1.88k|                           &node);
  778|  1.88k|    *p0_data[1] = -(node + 1);
  779|  1.88k|  }
  780|       |
  781|  75.3k|  for (i = 0; i < num_val; i += ch_fac) {
  ------------------
  |  Branch (781:15): [True: 59.8k, False: 15.4k]
  ------------------
  782|  59.8k|    switch (lav) {
  783|  36.1k|      case 3:
  ------------------
  |  Branch (783:7): [True: 36.1k, False: 23.7k]
  ------------------
  784|  36.1k|        ixheaacd_mps_huff_read_2d(it_bit_buff,
  785|  36.1k|                                  (ia_huff_node_struct)&huff_nodes->lav3,
  786|  36.1k|                                  out_data[i], &escape);
  787|  36.1k|        break;
  788|  8.86k|      case 5:
  ------------------
  |  Branch (788:7): [True: 8.86k, False: 50.9k]
  ------------------
  789|  8.86k|        ixheaacd_mps_huff_read_2d(it_bit_buff,
  790|  8.86k|                                  (ia_huff_node_struct)&huff_nodes->lav5,
  791|  8.86k|                                  out_data[i], &escape);
  792|  8.86k|        break;
  793|  12.4k|      case 7:
  ------------------
  |  Branch (793:7): [True: 12.4k, False: 47.3k]
  ------------------
  794|  12.4k|        ixheaacd_mps_huff_read_2d(it_bit_buff,
  795|  12.4k|                                  (ia_huff_node_struct)&huff_nodes->lav7,
  796|  12.4k|                                  out_data[i], &escape);
  797|  12.4k|        break;
  798|  2.36k|      case 9:
  ------------------
  |  Branch (798:7): [True: 2.36k, False: 57.4k]
  ------------------
  799|  2.36k|        ixheaacd_mps_huff_read_2d(it_bit_buff,
  800|  2.36k|                                  (ia_huff_node_struct)&huff_nodes->lav9,
  801|  2.36k|                                  out_data[i], &escape);
  802|  2.36k|        break;
  803|      0|      default:
  ------------------
  |  Branch (803:7): [True: 0, False: 59.8k]
  ------------------
  804|      0|        break;
  805|  59.8k|    }
  806|       |
  807|  59.8k|    if (escape) {
  ------------------
  |  Branch (807:9): [True: 0, False: 59.8k]
  ------------------
  808|      0|      esc_idx[esc_contrl++] = i;
  809|  59.8k|    } else {
  810|  59.8k|      ixheaacd_mps_sym_restore(it_bit_buff, lav, out_data[i]);
  811|  59.8k|    }
  812|  59.8k|  }
  813|       |
  814|  15.4k|  if (esc_contrl > 0) {
  ------------------
  |  Branch (814:7): [True: 0, False: 15.4k]
  ------------------
  815|      0|    ixheaacd_mps_pcm_decode(it_bit_buff, esc_data[0], esc_data[1], 0,
  816|      0|                            2 * esc_contrl, (2 * lav + 1));
  817|       |
  818|      0|    for (i = 0; i < esc_contrl; i++) {
  ------------------
  |  Branch (818:17): [True: 0, False: 0]
  ------------------
  819|      0|      out_data[esc_idx[i]][0] = esc_data[0][i] - lav;
  820|      0|      out_data[esc_idx[i]][1] = esc_data[1][i] - lav;
  821|      0|    }
  822|      0|  }
  823|       |
  824|  15.4k|  return;
  825|  15.4k|}
ixheaacd_mps_dec.c:ixheaacd_mps_sym_restore:
  552|  79.8k|                                     WORD32 lav, WORD32 data[2]) {
  553|  79.8k|  WORD32 tmp = 0;
  554|  79.8k|  UWORD32 sym_bit = 0;
  555|       |
  556|  79.8k|  WORD32 sum_val = data[0] + data[1];
  557|  79.8k|  WORD32 diff_val = data[0] - data[1];
  558|       |
  559|  79.8k|  if (sum_val > lav) {
  ------------------
  |  Branch (559:7): [True: 19.3k, False: 60.4k]
  ------------------
  560|  19.3k|    data[0] = -sum_val + (2 * lav + 1);
  561|  19.3k|    data[1] = -diff_val;
  562|  60.4k|  } else {
  563|  60.4k|    data[0] = sum_val;
  564|  60.4k|    data[1] = diff_val;
  565|  60.4k|  }
  566|       |
  567|  79.8k|  if (data[0] + data[1] != 0) {
  ------------------
  |  Branch (567:7): [True: 30.2k, False: 49.5k]
  ------------------
  568|  30.2k|    sym_bit = ixheaacd_read_bits_buf(it_bit_buff, 1);
  569|  30.2k|    if (sym_bit) {
  ------------------
  |  Branch (569:9): [True: 9.64k, False: 20.6k]
  ------------------
  570|  9.64k|      data[0] = -data[0];
  571|  9.64k|      data[1] = -data[1];
  572|  9.64k|    }
  573|  30.2k|  }
  574|       |
  575|  79.8k|  if (data[0] - data[1] != 0) {
  ------------------
  |  Branch (575:7): [True: 27.4k, False: 52.3k]
  ------------------
  576|  27.4k|    sym_bit = ixheaacd_read_bits_buf(it_bit_buff, 1);
  577|  27.4k|    if (sym_bit) {
  ------------------
  |  Branch (577:9): [True: 8.00k, False: 19.4k]
  ------------------
  578|  8.00k|      tmp = data[0];
  579|  8.00k|      data[0] = data[1];
  580|  8.00k|      data[1] = tmp;
  581|  8.00k|    }
  582|  27.4k|  }
  583|       |
  584|  79.8k|  return;
  585|  79.8k|}
ixheaacd_mps_dec.c:ixheaacd_mps_huff_dec_icc_2d:
  830|  4.93k|    WORD32 num_val, WORD32 ch_fac, WORD32* p0_data[2]) {
  831|  4.93k|  WORD32 i = 0, lav = 0, escape = 0, esc_contrl = 0;
  832|  4.93k|  WORD32 node = 0;
  833|  4.93k|  UWORD32 data = 0;
  834|       |
  835|  4.93k|  WORD32 esc_data[2][MAXBANDS] = {{0}};
  836|  4.93k|  WORD32 esc_idx[MAXBANDS] = {0};
  837|       |
  838|  4.93k|  ixheaacd_mps_huff_read(
  839|  4.93k|      it_bit_buff, (ia_huff_node_struct)&ixheaacd_huff_lav_idx_nodes.node_tab,
  840|  4.93k|      &node);
  841|  4.93k|  data = -(node + 1);
  842|       |
  843|  4.93k|  lav = 2 * data + 1;
  844|       |
  845|  4.93k|  if (p0_data[0] != NULL) {
  ------------------
  |  Branch (845:7): [True: 2.34k, False: 2.58k]
  ------------------
  846|  2.34k|    ixheaacd_mps_huff_read(it_bit_buff,
  847|  2.34k|                           (ia_huff_node_struct)&ixheaacd_huff_part0_nodes.icc,
  848|  2.34k|                           &node);
  849|  2.34k|    *p0_data[0] = -(node + 1);
  850|  2.34k|  }
  851|  4.93k|  if (p0_data[1] != NULL) {
  ------------------
  |  Branch (851:7): [True: 1.61k, False: 3.31k]
  ------------------
  852|  1.61k|    ixheaacd_mps_huff_read(it_bit_buff,
  853|  1.61k|                           (ia_huff_node_struct)&ixheaacd_huff_part0_nodes.icc,
  854|  1.61k|                           &node);
  855|  1.61k|    *p0_data[1] = -(node + 1);
  856|  1.61k|  }
  857|       |
  858|  23.7k|  for (i = 0; i < num_val; i += ch_fac) {
  ------------------
  |  Branch (858:15): [True: 18.8k, False: 4.92k]
  ------------------
  859|  18.8k|    switch (lav) {
  ------------------
  |  Branch (859:13): [True: 18.8k, False: 0]
  ------------------
  860|  10.6k|      case 1:
  ------------------
  |  Branch (860:7): [True: 10.6k, False: 8.21k]
  ------------------
  861|  10.6k|        ixheaacd_mps_huff_read_2d(it_bit_buff,
  862|  10.6k|                                  (ia_huff_node_struct)&huff_nodes->lav1,
  863|  10.6k|                                  out_data[i], &escape);
  864|  10.6k|        break;
  865|  5.89k|      case 3:
  ------------------
  |  Branch (865:7): [True: 5.89k, False: 12.9k]
  ------------------
  866|  5.89k|        ixheaacd_mps_huff_read_2d(it_bit_buff,
  867|  5.89k|                                  (ia_huff_node_struct)&huff_nodes->lav3,
  868|  5.89k|                                  out_data[i], &escape);
  869|  5.89k|        break;
  870|    898|      case 5:
  ------------------
  |  Branch (870:7): [True: 898, False: 17.9k]
  ------------------
  871|    898|        ixheaacd_mps_huff_read_2d(it_bit_buff,
  872|    898|                                  (ia_huff_node_struct)&huff_nodes->lav5,
  873|    898|                                  out_data[i], &escape);
  874|    898|        break;
  875|  1.42k|      case 7:
  ------------------
  |  Branch (875:7): [True: 1.42k, False: 17.4k]
  ------------------
  876|  1.42k|        ixheaacd_mps_huff_read_2d(it_bit_buff,
  877|  1.42k|                                  (ia_huff_node_struct)&huff_nodes->lav7,
  878|  1.42k|                                  out_data[i], &escape);
  879|  1.42k|        break;
  880|  18.8k|    }
  881|       |
  882|  18.8k|    if (escape) {
  ------------------
  |  Branch (882:9): [True: 47, False: 18.7k]
  ------------------
  883|     47|      esc_idx[esc_contrl++] = i;
  884|  18.7k|    } else {
  885|  18.7k|      ixheaacd_mps_sym_restore(it_bit_buff, lav, out_data[i]);
  886|  18.7k|    }
  887|  18.8k|  }
  888|       |
  889|  4.92k|  if (esc_contrl > 0) {
  ------------------
  |  Branch (889:7): [True: 10, False: 4.91k]
  ------------------
  890|     10|    ixheaacd_mps_pcm_decode(it_bit_buff, esc_data[0], esc_data[1], 0,
  891|     10|                            2 * esc_contrl, (2 * lav + 1));
  892|       |
  893|     57|    for (i = 0; i < esc_contrl; i++) {
  ------------------
  |  Branch (893:17): [True: 47, False: 10]
  ------------------
  894|     47|      out_data[esc_idx[i]][0] = esc_data[0][i] - lav;
  895|     47|      out_data[esc_idx[i]][1] = esc_data[1][i] - lav;
  896|     47|    }
  897|     10|  }
  898|       |
  899|  4.92k|  return;
  900|  4.93k|}
ixheaacd_mps_dec.c:ixheaacd_mps_huff_dec_ipd_2d:
  905|    580|    WORD32 num_val, WORD32 ch_fac, WORD32* p0_data[2]) {
  906|    580|  WORD32 i = 0, lav = 0, escape = 0, esc_contrl = 0;
  907|    580|  WORD32 node = 0;
  908|    580|  UWORD32 data = 0;
  909|       |
  910|    580|  WORD32 esc_data[2][MAXBANDS] = {{0}};
  911|    580|  WORD32 esc_idx[MAXBANDS] = {0};
  912|       |
  913|    580|  ixheaacd_mps_huff_read(
  914|    580|      it_bit_buff, (ia_huff_node_struct)&ixheaacd_huff_lav_idx_nodes.node_tab,
  915|    580|      &node);
  916|       |
  917|    580|  data = -(node + 1);
  918|    580|  if (data == 0)
  ------------------
  |  Branch (918:7): [True: 122, False: 458]
  ------------------
  919|    122|    data = 3;
  920|    458|  else
  921|    458|    data--;
  922|       |
  923|    580|  lav = 2 * data + 1;
  924|       |
  925|    580|  if (p0_data[0] != NULL) {
  ------------------
  |  Branch (925:7): [True: 168, False: 412]
  ------------------
  926|    168|    ixheaacd_mps_huff_read(
  927|    168|        it_bit_buff, (ia_huff_node_struct)&ixheaacd_huff_ipd_nodes.hp0.node_tab,
  928|    168|        &node);
  929|    168|    *p0_data[0] = -(node + 1);
  930|    168|  }
  931|    580|  if (p0_data[1] != NULL) {
  ------------------
  |  Branch (931:7): [True: 114, False: 466]
  ------------------
  932|    114|    ixheaacd_mps_huff_read(
  933|    114|        it_bit_buff, (ia_huff_node_struct)&ixheaacd_huff_ipd_nodes.hp0.node_tab,
  934|    114|        &node);
  935|    114|    *p0_data[1] = -(node + 1);
  936|    114|  }
  937|       |
  938|  4.27k|  for (i = 0; i < num_val; i += ch_fac) {
  ------------------
  |  Branch (938:15): [True: 3.69k, False: 580]
  ------------------
  939|  3.69k|    switch (lav) {
  ------------------
  |  Branch (939:13): [True: 3.69k, False: 0]
  ------------------
  940|  1.42k|      case 1:
  ------------------
  |  Branch (940:7): [True: 1.42k, False: 2.26k]
  ------------------
  941|  1.42k|        ixheaacd_mps_huff_read_2d(it_bit_buff,
  942|  1.42k|                                  (ia_huff_node_struct)&huff_nodes->lav1,
  943|  1.42k|                                  out_data[i], &escape);
  944|  1.42k|        break;
  945|    704|      case 3:
  ------------------
  |  Branch (945:7): [True: 704, False: 2.98k]
  ------------------
  946|    704|        ixheaacd_mps_huff_read_2d(it_bit_buff,
  947|    704|                                  (ia_huff_node_struct)&huff_nodes->lav3,
  948|    704|                                  out_data[i], &escape);
  949|    704|        break;
  950|    591|      case 5:
  ------------------
  |  Branch (950:7): [True: 591, False: 3.09k]
  ------------------
  951|    591|        ixheaacd_mps_huff_read_2d(it_bit_buff,
  952|    591|                                  (ia_huff_node_struct)&huff_nodes->lav5,
  953|    591|                                  out_data[i], &escape);
  954|    591|        break;
  955|    966|      case 7:
  ------------------
  |  Branch (955:7): [True: 966, False: 2.72k]
  ------------------
  956|    966|        ixheaacd_mps_huff_read_2d(it_bit_buff,
  957|    966|                                  (ia_huff_node_struct)&huff_nodes->lav7,
  958|    966|                                  out_data[i], &escape);
  959|    966|        break;
  960|  3.69k|    }
  961|       |
  962|  3.69k|    if (escape) {
  ------------------
  |  Branch (962:9): [True: 168, False: 3.52k]
  ------------------
  963|    168|      esc_idx[esc_contrl++] = i;
  964|  3.52k|    } else {
  965|  3.52k|      ixheaacd_mps_sym_restoreipd(it_bit_buff, lav, out_data[i]);
  966|  3.52k|    }
  967|  3.69k|  }
  968|       |
  969|    580|  if (esc_contrl > 0) {
  ------------------
  |  Branch (969:7): [True: 72, False: 508]
  ------------------
  970|     72|    ixheaacd_mps_pcm_decode(it_bit_buff, esc_data[0], esc_data[1], 0,
  971|     72|                            2 * esc_contrl, (2 * lav + 1));
  972|       |
  973|    240|    for (i = 0; i < esc_contrl; i++) {
  ------------------
  |  Branch (973:17): [True: 168, False: 72]
  ------------------
  974|    168|      out_data[esc_idx[i]][0] = esc_data[0][i] - lav;
  975|    168|      out_data[esc_idx[i]][1] = esc_data[1][i] - lav;
  976|    168|    }
  977|     72|  }
  978|       |
  979|    580|  return;
  980|    580|}
ixheaacd_mps_dec.c:ixheaacd_mps_sym_restoreipd:
  588|  3.52k|                                        WORD32 lav, WORD32 data[2]) {
  589|  3.52k|  WORD32 tmp = 0;
  590|  3.52k|  UWORD32 sym_bit = 0;
  591|       |
  592|  3.52k|  WORD32 sum_val = data[0] + data[1];
  593|  3.52k|  WORD32 diff_val = data[0] - data[1];
  594|       |
  595|  3.52k|  if (sum_val > lav) {
  ------------------
  |  Branch (595:7): [True: 610, False: 2.91k]
  ------------------
  596|    610|    data[0] = -sum_val + (2 * lav + 1);
  597|    610|    data[1] = -diff_val;
  598|  2.91k|  } else {
  599|  2.91k|    data[0] = sum_val;
  600|  2.91k|    data[1] = diff_val;
  601|  2.91k|  }
  602|       |
  603|  3.52k|  if (data[0] - data[1] != 0) {
  ------------------
  |  Branch (603:7): [True: 917, False: 2.60k]
  ------------------
  604|    917|    sym_bit = ixheaacd_read_bits_buf(it_bit_buff, 1);
  605|    917|    if (sym_bit) {
  ------------------
  |  Branch (605:9): [True: 567, False: 350]
  ------------------
  606|    567|      tmp = data[0];
  607|    567|      data[0] = data[1];
  608|    567|      data[1] = tmp;
  609|    567|    }
  610|    917|  }
  611|       |
  612|  3.52k|  return;
  613|  3.52k|}
ixheaacd_mps_dec.c:ia_mps_dec_huff_dec_cpc_2d:
  985|    238|    ia_bit_buf_struct *h_bit_buf) {
  986|    238|  WORD32 i = 0, lav = 0, escape = 0, esc_cntr = 0;
  987|    238|  WORD32 node = 0;
  988|    238|  WORD32 data = 0;
  989|       |
  990|    238|  WORD32 esc_data[2][MAXBANDS] = {{0}};
  991|    238|  WORD32 esc_idx[MAXBANDS] = {0};
  992|       |
  993|    238|  ixheaacd_mps_huff_read(
  994|    238|      h_bit_buf, (ia_huff_node_struct) & (ixheaacd_huff_lav_idx_nodes.node_tab),
  995|    238|      &node);
  996|    238|  data = -(node + 1);
  997|       |
  998|    238|  lav = 3 * data + 3;
  999|       |
 1000|    238|  if (p0_data[0] != NULL) {
  ------------------
  |  Branch (1000:7): [True: 105, False: 133]
  ------------------
 1001|    105|    ixheaacd_mps_huff_read(
 1002|    105|        h_bit_buf, (ia_huff_node_struct) & (ixheaacd_huff_part0_nodes.cpc),
 1003|    105|        &node);
 1004|    105|    *p0_data[0] = -(node + 1);
 1005|    105|  }
 1006|    238|  if (p0_data[1] != NULL) {
  ------------------
  |  Branch (1006:7): [True: 86, False: 152]
  ------------------
 1007|     86|    ixheaacd_mps_huff_read(
 1008|     86|        h_bit_buf, (ia_huff_node_struct) & (ixheaacd_huff_part0_nodes.cpc),
 1009|     86|        &node);
 1010|     86|    *p0_data[1] = -(node + 1);
 1011|     86|  }
 1012|       |
 1013|  1.39k|  for (i = 0; i < num_val; i += stride) {
  ------------------
  |  Branch (1013:15): [True: 1.16k, False: 233]
  ------------------
 1014|  1.16k|    switch (lav) {
 1015|    502|      case LAV_3:
  ------------------
  |  Branch (1015:7): [True: 502, False: 661]
  ------------------
 1016|    502|        ixheaacd_mps_huff_read_2d(h_bit_buf,
 1017|    502|                                  (ia_huff_node_struct)&huff_nodes->lav3,
 1018|    502|                                  out_data[i], &escape);
 1019|    502|        break;
 1020|    235|      case LAV_6:
  ------------------
  |  Branch (1020:7): [True: 235, False: 928]
  ------------------
 1021|    235|        ixheaacd_mps_huff_read_2d(h_bit_buf,
 1022|    235|                                  (ia_huff_node_struct)&huff_nodes->lav6,
 1023|    235|                                  out_data[i], &escape);
 1024|    235|        break;
 1025|    114|      case LAV_9:
  ------------------
  |  Branch (1025:7): [True: 114, False: 1.04k]
  ------------------
 1026|    114|        ixheaacd_mps_huff_read_2d(h_bit_buf,
 1027|    114|                                  (ia_huff_node_struct)&huff_nodes->lav9,
 1028|    114|                                  out_data[i], &escape);
 1029|    114|        break;
 1030|    312|      case LAV_12:
  ------------------
  |  Branch (1030:7): [True: 312, False: 851]
  ------------------
 1031|    312|        ixheaacd_mps_huff_read_2d(h_bit_buf,
 1032|    312|                                  (ia_huff_node_struct)&huff_nodes->lav12,
 1033|    312|                                  out_data[i], &escape);
 1034|    312|        break;
 1035|      0|      default:
  ------------------
  |  Branch (1035:7): [True: 0, False: 1.16k]
  ------------------
 1036|      0|        break;
 1037|  1.16k|    }
 1038|       |
 1039|  1.15k|    if (escape) {
  ------------------
  |  Branch (1039:9): [True: 0, False: 1.15k]
  ------------------
 1040|      0|      esc_idx[esc_cntr++] = i;
 1041|  1.15k|    } else {
 1042|  1.15k|      ixheaacd_mps_sym_restore(h_bit_buf, lav, out_data[i]);
 1043|  1.15k|    }
 1044|  1.15k|  }
 1045|       |
 1046|    233|  if (esc_cntr > 0) {
  ------------------
  |  Branch (1046:7): [True: 0, False: 233]
  ------------------
 1047|      0|    ixheaacd_mps_pcm_decode(h_bit_buf, esc_data[0], esc_data[1], 0,
 1048|      0|                            (esc_cntr << 1), ((lav << 1) + 1));
 1049|       |
 1050|      0|    for (i = 0; i < esc_cntr; i++) {
  ------------------
  |  Branch (1050:17): [True: 0, False: 0]
  ------------------
 1051|      0|      out_data[esc_idx[i]][0] = esc_data[0][i] - lav;
 1052|      0|      out_data[esc_idx[i]][1] = esc_data[1][i] - lav;
 1053|      0|    }
 1054|      0|  }
 1055|    233|  return;
 1056|    238|}
ixheaacd_mps_dec.c:ixheaacd_diff_freq_decode:
 1424|  31.9k|                                      WORD32 num_val) {
 1425|  31.9k|  WORD32 i = 0;
 1426|       |
 1427|  31.9k|  out_data[0] = diff_data[0];
 1428|       |
 1429|   225k|  for (i = 1; i < num_val; i++) {
  ------------------
  |  Branch (1429:15): [True: 193k, False: 31.9k]
  ------------------
 1430|   193k|    out_data[i] = out_data[i - 1] + diff_data[i];
 1431|   193k|  }
 1432|  31.9k|}
ixheaacd_mps_dec.c:ixheaacd_mps_diff_time_dec_bwd:
 1437|  7.71k|                                           WORD32 num_val) {
 1438|  7.71k|  WORD32 i = 0;
 1439|       |
 1440|  7.71k|  if (mixed_diff_type) {
  ------------------
  |  Branch (1440:7): [True: 2.62k, False: 5.08k]
  ------------------
 1441|  2.62k|    out_data[0] = diff_data[0];
 1442|  13.6k|    for (i = 1; i < num_val; i++) {
  ------------------
  |  Branch (1442:17): [True: 11.0k, False: 2.62k]
  ------------------
 1443|  11.0k|      out_data[i] = prev_data[i] + diff_data[i];
 1444|  11.0k|    }
 1445|  5.08k|  } else {
 1446|  39.7k|    for (i = 0; i < num_val; i++) {
  ------------------
  |  Branch (1446:17): [True: 34.6k, False: 5.08k]
  ------------------
 1447|  34.6k|      out_data[i] = prev_data[i] + diff_data[i];
 1448|  34.6k|    }
 1449|  5.08k|  }
 1450|  7.71k|}
ixheaacd_mps_dec.c:ixheaacd_mps_diff_time_dec_fwd:
 1455|    644|                                           WORD32 num_val) {
 1456|    644|  WORD32 i = 0;
 1457|       |
 1458|    644|  if (mixed_diff_type) {
  ------------------
  |  Branch (1458:7): [True: 263, False: 381]
  ------------------
 1459|    263|    out_data[0] = diff_data[0];
 1460|  1.65k|    for (i = 1; i < num_val; i++) {
  ------------------
  |  Branch (1460:17): [True: 1.39k, False: 263]
  ------------------
 1461|  1.39k|      out_data[i] = prev_data[i] - diff_data[i];
 1462|  1.39k|    }
 1463|    381|  } else {
 1464|  2.57k|    for (i = 0; i < num_val; i++) {
  ------------------
  |  Branch (1464:17): [True: 2.19k, False: 381]
  ------------------
 1465|  2.19k|      out_data[i] = prev_data[i] - diff_data[i];
 1466|  2.19k|    }
 1467|    381|  }
 1468|    644|}
ixheaacd_mps_dec.c:ixheaacd_attach_lsb:
 1473|  37.7k|                                WORD32* out_data) {
 1474|  37.7k|  WORD32 i = 0, lsb = 0, msb = 0;
 1475|  37.7k|  UWORD32 data = 0;
 1476|       |
 1477|   325k|  for (i = 0; i < num_val; i++) {
  ------------------
  |  Branch (1477:15): [True: 287k, False: 37.7k]
  ------------------
 1478|   287k|    msb = in_data_msb[i];
 1479|       |
 1480|   287k|    if (num_lsb > 0) {
  ------------------
  |  Branch (1480:9): [True: 12.1k, False: 275k]
  ------------------
 1481|  12.1k|      data = ixheaacd_read_bits_buf(it_bit_buff, num_lsb);
 1482|  12.1k|      lsb = data;
 1483|       |
 1484|  12.1k|      out_data[i] = ((msb << num_lsb) | lsb) - ixheaacd_drc_offset;
 1485|  12.1k|    } else
 1486|   275k|      out_data[i] = msb - ixheaacd_drc_offset;
 1487|   287k|  }
 1488|       |
 1489|  37.7k|  return;
 1490|  37.7k|}
ixheaacd_mps_dec.c:ixheaacd_mps_huff_read_2d:
  532|   104k|{
  533|   104k|  WORD32 huff_2d_8bit = 0;
  534|   104k|  WORD32 node = 0;
  535|       |
  536|   104k|  ixheaacd_mps_huff_read(it_bit_buff, node_tab, &node);
  537|   104k|  *escape = (node == 0);
  538|       |
  539|   104k|  if (*escape) {
  ------------------
  |  Branch (539:7): [True: 215, False: 103k]
  ------------------
  540|    215|    out_data[0] = 0;
  541|    215|    out_data[1] = 1;
  542|   103k|  } else {
  543|   103k|    huff_2d_8bit = -(node + 1);
  544|   103k|    out_data[0] = huff_2d_8bit >> 4;
  545|   103k|    out_data[1] = huff_2d_8bit & 0xf;
  546|   103k|  }
  547|       |
  548|   104k|  return;
  549|   104k|}
ixheaacd_mps_dec.c:ixheaacd_apply_frame:
 1796|  13.3k|                                         WORD16 *out_buf) {
 1797|  13.3k|  IA_ERRORCODE err_code = IA_NO_ERROR;
  ------------------
  |  |   23|  13.3k|#define IA_NO_ERROR 0x00000000
  ------------------
 1798|  13.3k|  WORD32 ch, ts, qs;
 1799|  13.3k|  WORD32 *pbuf_real, *pbuf_imag, *pbuf_re, *pbuf_im;
 1800|  13.3k|  WORD32 *buf_real, *buf_imag;
 1801|  13.3k|  WORD32 *qmf_input_delay_real_2 =
 1802|  13.3k|      pstr_mps_state->mps_persistent_mem.qmf_input_delay_real;
 1803|  13.3k|  WORD32 *qmf_input_delay_imag_2 =
 1804|  13.3k|      pstr_mps_state->mps_persistent_mem.qmf_input_delay_imag;
 1805|  13.3k|  WORD32 num_input_channels = pstr_mps_state->num_input_channels;
 1806|  13.3k|  WORD32 qmf_bands = pstr_mps_state->qmf_bands;
 1807|  13.3k|  WORD32 cur_time_slot = pstr_mps_state->cur_time_slot;
 1808|  13.3k|  WORD32 time_slots = pstr_mps_state->time_slots;
 1809|  13.3k|  WORD32 qmf_input_delay_index = pstr_mps_state->qmf_input_delay_index;
 1810|  13.3k|  WORD32 up_mix_type = pstr_mps_state->up_mix_type;
 1811|  13.3k|  WORD32 residual_coding = pstr_mps_state->residual_coding;
 1812|  13.3k|  WORD32 arbitrary_downmix = pstr_mps_state->arbitrary_downmix;
 1813|       |
 1814|  13.3k|  WORD32 *qmf_input_delay_real_1, *qmf_input_delay_imag_1;
 1815|  13.3k|  WORD32 *qmf_input_delay_real, *qmf_input_delay_imag;
 1816|       |
 1817|  13.3k|  WORD32 *p_qmf_real = m_qmf_real;
 1818|  13.3k|  WORD32 *p_qmf_imag = m_qmf_imag;
 1819|  13.3k|  WORD32 *p_qmf_re, *p_qmf_im, *qmf_real, *qmf_imag;
 1820|       |
 1821|  13.3k|  if (cur_time_slot + in_time_slots > time_slots) {
  ------------------
  |  Branch (1821:7): [True: 0, False: 13.3k]
  ------------------
 1822|      0|    if (pstr_mps_state->ec_flag)
  ------------------
  |  Branch (1822:9): [True: 0, False: 0]
  ------------------
 1823|      0|      cur_time_slot = time_slots - in_time_slots;
 1824|      0|    else
 1825|      0|      return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
 1826|      0|  }
 1827|  13.3k|  if (time_slots % HOP_SLOTS != 0) {
  ------------------
  |  |   23|  13.3k|#define HOP_SLOTS (4)
  ------------------
  |  Branch (1827:7): [True: 7, False: 13.3k]
  ------------------
 1828|      7|    if (pstr_mps_state->ec_flag)
  ------------------
  |  Branch (1828:9): [True: 0, False: 7]
  ------------------
 1829|      0|      time_slots = time_slots - (time_slots % HOP_SLOTS);
  ------------------
  |  |   23|      0|#define HOP_SLOTS (4)
  ------------------
 1830|      7|    else
 1831|      7|      return IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_TIMESLOTS;
  ------------------
  |  |  125|      7|#define IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_TIMESLOTS 0xFFFF9806
  ------------------
 1832|      7|  }
 1833|       |
 1834|  13.3k|  pbuf_real = pstr_mps_state->array_struct->buf_real;
 1835|  13.3k|  pbuf_imag = pstr_mps_state->array_struct->buf_imag;
 1836|       |
 1837|  13.3k|  if (up_mix_type == 1) {
  ------------------
  |  Branch (1837:7): [True: 0, False: 13.3k]
  ------------------
 1838|      0|    for (ch = 0; ch < num_input_channels; ch++) {
  ------------------
  |  Branch (1838:18): [True: 0, False: 0]
  ------------------
 1839|      0|      pbuf_re = pbuf_real;
 1840|      0|      pbuf_im = pbuf_imag;
 1841|       |
 1842|      0|      p_qmf_re = p_qmf_real;
 1843|      0|      p_qmf_im = p_qmf_imag;
 1844|       |
 1845|      0|      for (ts = 0; ts < in_time_slots; ts++) {
  ------------------
  |  Branch (1845:20): [True: 0, False: 0]
  ------------------
 1846|      0|        buf_real = pbuf_re + (cur_time_slot + ts);
 1847|      0|        buf_imag = pbuf_im + (cur_time_slot + ts);
 1848|       |
 1849|      0|        qmf_real = p_qmf_re;
 1850|      0|        qmf_imag = p_qmf_im;
 1851|       |
 1852|      0|        for (qs = 0; qs < qmf_bands; qs++) {
  ------------------
  |  Branch (1852:22): [True: 0, False: 0]
  ------------------
 1853|      0|          *buf_real++ = *qmf_real++;
 1854|      0|          *buf_imag++ = *qmf_imag++;
 1855|      0|        }
 1856|      0|        pbuf_re += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|      0|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|      0|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
 1857|      0|        pbuf_im += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|      0|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|      0|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
 1858|       |
 1859|      0|        p_qmf_re += MAX_NUM_QMF_BANDS;
  ------------------
  |  |   62|      0|#define MAX_NUM_QMF_BANDS (64)
  ------------------
 1860|      0|        p_qmf_im += MAX_NUM_QMF_BANDS;
  ------------------
  |  |   62|      0|#define MAX_NUM_QMF_BANDS (64)
  ------------------
 1861|      0|      }
 1862|      0|      pbuf_real += TSXHB;
  ------------------
  |  |  106|      0|#define TSXHB (5112)
  ------------------
 1863|      0|      pbuf_imag += TSXHB;
  ------------------
  |  |  106|      0|#define TSXHB (5112)
  ------------------
 1864|       |
 1865|      0|      p_qmf_real += QBXTS;
  ------------------
  |  |   98|      0|#define QBXTS (4608)
  ------------------
 1866|      0|      p_qmf_imag += QBXTS;
  ------------------
  |  |   98|      0|#define QBXTS (4608)
  ------------------
 1867|      0|    }
 1868|  13.3k|  } else {
 1869|  80.3k|    for (ch = 0; ch < num_input_channels; ch++) {
  ------------------
  |  Branch (1869:18): [True: 67.0k, False: 13.3k]
  ------------------
 1870|  67.0k|      WORD32 offset = ch * PCXQB;
  ------------------
  |  |  194|  67.0k|#define PCXQB (320)
  ------------------
 1871|  67.0k|      qmf_input_delay_index = pstr_mps_state->qmf_input_delay_index;
 1872|  67.0k|      qmf_input_delay_real_1 = qmf_input_delay_real_2 + offset;
 1873|  67.0k|      qmf_input_delay_imag_1 = qmf_input_delay_imag_2 + offset;
 1874|       |
 1875|  67.0k|      pbuf_re = pbuf_real + cur_time_slot * MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  67.0k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  67.0k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
 1876|  67.0k|      pbuf_im = pbuf_imag + cur_time_slot * MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  67.0k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  67.0k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
 1877|       |
 1878|  67.0k|      p_qmf_re = p_qmf_real;
 1879|  67.0k|      p_qmf_im = p_qmf_imag;
 1880|       |
 1881|  1.94M|      for (ts = 0; ts < in_time_slots; ts++) {
  ------------------
  |  Branch (1881:20): [True: 1.87M, False: 67.0k]
  ------------------
 1882|  1.87M|        WORD32 off_set = qmf_input_delay_index * MAX_NUM_QMF_BANDS;
  ------------------
  |  |   62|  1.87M|#define MAX_NUM_QMF_BANDS (64)
  ------------------
 1883|  1.87M|        qmf_input_delay_real = qmf_input_delay_real_1 + off_set;
 1884|  1.87M|        qmf_input_delay_imag = qmf_input_delay_imag_1 + off_set;
 1885|       |
 1886|  1.87M|        buf_real = pbuf_re;
 1887|  1.87M|        buf_imag = pbuf_im;
 1888|       |
 1889|  1.87M|        qmf_real = p_qmf_re;
 1890|  1.87M|        qmf_imag = p_qmf_im;
 1891|       |
 1892|   103M|        for (qs = 0; qs < qmf_bands; qs++) {
  ------------------
  |  Branch (1892:22): [True: 101M, False: 1.87M]
  ------------------
 1893|   101M|          {
 1894|   101M|            *buf_real++ = *qmf_input_delay_real;
 1895|   101M|            *buf_imag++ = *qmf_input_delay_imag;
 1896|       |
 1897|   101M|            *qmf_input_delay_real++ = *qmf_real++;
 1898|   101M|            *qmf_input_delay_imag++ = *qmf_imag++;
 1899|   101M|          }
 1900|   101M|        }
 1901|       |
 1902|  1.87M|        qmf_input_delay_index++;
 1903|       |
 1904|  1.87M|        if (qmf_input_delay_index == PC_FILTERDELAY) {
  ------------------
  |  |   58|  1.87M|#define PC_FILTERDELAY ((PC_FILTERLENGTH - 1) / 2)
  |  |  ------------------
  |  |  |  |   57|  1.87M|#define PC_FILTERLENGTH (11)
  |  |  ------------------
  ------------------
  |  Branch (1904:13): [True: 371k, False: 1.50M]
  ------------------
 1905|   371k|          qmf_input_delay_index = 0;
 1906|   371k|        }
 1907|  1.87M|        pbuf_re += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  1.87M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  1.87M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
 1908|  1.87M|        pbuf_im += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  1.87M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  1.87M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
 1909|       |
 1910|  1.87M|        p_qmf_re += MAX_NUM_QMF_BANDS;
  ------------------
  |  |   62|  1.87M|#define MAX_NUM_QMF_BANDS (64)
  ------------------
 1911|  1.87M|        p_qmf_im += MAX_NUM_QMF_BANDS;
  ------------------
  |  |   62|  1.87M|#define MAX_NUM_QMF_BANDS (64)
  ------------------
 1912|  1.87M|      }
 1913|  67.0k|      pbuf_real += TSXHB;
  ------------------
  |  |  106|  67.0k|#define TSXHB (5112)
  ------------------
 1914|  67.0k|      pbuf_imag += TSXHB;
  ------------------
  |  |  106|  67.0k|#define TSXHB (5112)
  ------------------
 1915|       |
 1916|  67.0k|      p_qmf_real += QBXTS;
  ------------------
  |  |   98|  67.0k|#define QBXTS (4608)
  ------------------
 1917|  67.0k|      p_qmf_imag += QBXTS;
  ------------------
  |  |   98|  67.0k|#define QBXTS (4608)
  ------------------
 1918|  67.0k|    }
 1919|  13.3k|    pstr_mps_state->qmf_input_delay_index = qmf_input_delay_index;
 1920|  13.3k|  }
 1921|       |
 1922|  13.3k|  pstr_mps_state->cur_time_slot += in_time_slots;
 1923|  13.3k|  cur_time_slot = pstr_mps_state->cur_time_slot;
 1924|       |
 1925|  13.3k|  if (pstr_mps_state->cur_time_slot < time_slots) {
  ------------------
  |  Branch (1925:7): [True: 0, False: 13.3k]
  ------------------
 1926|      0|    if (pstr_mps_state->ec_flag) {
  ------------------
  |  Branch (1926:9): [True: 0, False: 0]
  ------------------
 1927|      0|      pstr_mps_state->cur_time_slot = time_slots;
 1928|      0|    } else
 1929|      0|      return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
 1930|      0|  }
 1931|       |
 1932|  13.3k|  pstr_mps_state->cur_time_slot = 0;
 1933|       |
 1934|  13.3k|  err_code = ixheaacd_decode_frame(pstr_mps_state);
 1935|  13.3k|  if (err_code != IA_NO_ERROR) return err_code;
  ------------------
  |  |   23|  13.3k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (1935:7): [True: 178, False: 13.1k]
  ------------------
 1936|       |
 1937|  13.1k|  ixheaacd_mdct_2_qmf(pstr_mps_state);
 1938|       |
 1939|  13.1k|  ixheaacd_hybrid_qmf_analysis(pstr_mps_state);
 1940|       |
 1941|  13.1k|  if (residual_coding || (arbitrary_downmix == 2)) {
  ------------------
  |  Branch (1941:7): [True: 372, False: 12.7k]
  |  Branch (1941:26): [True: 126, False: 12.6k]
  ------------------
 1942|    498|    ixheaacd_update_buffers(pstr_mps_state);
 1943|    498|  }
 1944|       |
 1945|  13.1k|  if (up_mix_type == 1) {
  ------------------
  |  Branch (1945:7): [True: 0, False: 13.1k]
  ------------------
 1946|      0|    ixheaacd_apply_blind(pstr_mps_state);
 1947|      0|  }
 1948|       |
 1949|  13.1k|  ixheaacd_calc_m1m2(pstr_mps_state);
 1950|       |
 1951|  13.1k|  ixheaacd_smooth_m1m2(pstr_mps_state);
 1952|       |
 1953|  13.1k|  ixheaacd_mps_apply_m1(pstr_mps_state);
 1954|       |
 1955|  13.1k|  ixheaacd_buffer_m1(pstr_mps_state);
 1956|       |
 1957|  13.1k|  if (up_mix_type != 2) {
  ------------------
  |  Branch (1957:7): [True: 13.1k, False: 0]
  ------------------
 1958|  13.1k|    if (pstr_mps_state->temp_shape_config == 2) {
  ------------------
  |  Branch (1958:9): [True: 6.64k, False: 6.48k]
  ------------------
 1959|  6.64k|      ixheaacd_pre_reshape_bb_env(pstr_mps_state);
 1960|  6.64k|    }
 1961|  13.1k|  }
 1962|       |
 1963|  13.1k|  ixheaacd_create_w(pstr_mps_state);
 1964|       |
 1965|  13.1k|  ixheaacd_apply_m2(pstr_mps_state);
 1966|       |
 1967|  13.1k|  ixheaacd_buffer_m2(pstr_mps_state);
 1968|       |
 1969|  13.1k|  if (up_mix_type != 2) {
  ------------------
  |  Branch (1969:7): [True: 13.1k, False: 0]
  ------------------
 1970|  13.1k|    if (pstr_mps_state->temp_shape_config == 2) {
  ------------------
  |  Branch (1970:9): [True: 6.64k, False: 6.48k]
  ------------------
 1971|  6.64k|      ixheaacd_reshape_bb_env(pstr_mps_state);
 1972|  6.64k|    }
 1973|  13.1k|  }
 1974|       |
 1975|  13.1k|  ixheaacd_tp_process(pstr_mps_state);
 1976|       |
 1977|  13.1k|  ixheaacd_update_time_out_buffer(pstr_mps_state);
 1978|       |
 1979|  13.1k|  ixheaacd_update_out_buffer(pstr_mps_state, out_buf);
 1980|       |
 1981|  13.1k|  pstr_mps_state->parse_next_bitstream_frame = 1;
 1982|       |
 1983|  13.1k|  return IA_NO_ERROR;
  ------------------
  |  |   23|  13.1k|#define IA_NO_ERROR 0x00000000
  ------------------
 1984|  13.3k|}

ixheaacd_mps_decor_init:
  298|  2.22k|                                     WORD32 object_type) {
  299|  2.22k|  WORD32 i, reverb_band;
  300|  2.22k|  const WORD32 *splitfreq;
  301|  2.22k|  const WORD32 *ptr_ixheaacd_hybrid_to_qmf_map;
  302|  2.22k|  const WORD32 *ptr_decorr_delay;
  303|  2.22k|  if (object_type == AOT_ER_AAC_ELD || object_type == AOT_ER_AAC_LD) {
  ------------------
  |  Branch (303:7): [True: 956, False: 1.26k]
  |  Branch (303:40): [True: 0, False: 1.26k]
  ------------------
  304|    956|    ptr_ixheaacd_hybrid_to_qmf_map = ixheaacd_hybrid_to_qmf_map_ldmps;
  305|    956|    ptr_decorr_delay = ixheaacd_decorr_delay_ldmps;
  306|    956|    switch (decor_config) {
  307|    375|      case 0:
  ------------------
  |  Branch (307:7): [True: 375, False: 581]
  ------------------
  308|    375|        splitfreq = ixheaacd_qmf_split_freq_0_ldmps;
  309|    375|        break;
  310|     87|      case 1:
  ------------------
  |  Branch (310:7): [True: 87, False: 869]
  ------------------
  311|     87|        splitfreq = ixheaacd_qmf_split_freq_1_ldmps;
  312|     87|        break;
  313|    490|      case 2:
  ------------------
  |  Branch (313:7): [True: 490, False: 466]
  ------------------
  314|    490|        splitfreq = ixheaacd_qmf_split_freq_2_ldmps;
  315|    490|        break;
  316|      4|      default:
  ------------------
  |  Branch (316:7): [True: 4, False: 952]
  ------------------
  317|      4|        return IA_FATAL_ERROR;
  ------------------
  |  |   25|      4|#define IA_FATAL_ERROR 0x80000000
  ------------------
  318|    956|    }
  319|  1.26k|  } else {
  320|  1.26k|    ptr_ixheaacd_hybrid_to_qmf_map = ixheaacd_hybrid_to_qmf_map;
  321|  1.26k|    ptr_decorr_delay = ixheaacd_decorr_delay;
  322|  1.26k|    switch (decor_config) {
  323|    928|      case 0:
  ------------------
  |  Branch (323:7): [True: 928, False: 338]
  ------------------
  324|    928|        splitfreq = ixheaacd_qmf_split_freq_0;
  325|    928|        break;
  326|    103|      case 1:
  ------------------
  |  Branch (326:7): [True: 103, False: 1.16k]
  ------------------
  327|    103|        splitfreq = ixheaacd_qmf_split_freq_1;
  328|    103|        break;
  329|    235|      case 2:
  ------------------
  |  Branch (329:7): [True: 235, False: 1.03k]
  ------------------
  330|    235|        splitfreq = ixheaacd_qmf_split_freq_2;
  331|    235|        break;
  332|      0|      default:
  ------------------
  |  Branch (332:7): [True: 0, False: 1.26k]
  ------------------
  333|      0|        return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
  334|  1.26k|    }
  335|  1.26k|  }
  336|       |
  337|  2.21k|  self->num_bins = subbands;
  338|  2.21k|  if (self->num_bins > MAX_HYBRID_BANDS_MPS) return IA_FATAL_ERROR;
  ------------------
  |  |   47|  2.21k|#define MAX_HYBRID_BANDS_MPS (MAX_NUM_QMF_BANDS_MPS_NEW - 3 + 10)
  |  |  ------------------
  |  |  |  |   28|  2.21k|#define MAX_NUM_QMF_BANDS_MPS_NEW (64)
  |  |  ------------------
  ------------------
                if (self->num_bins > MAX_HYBRID_BANDS_MPS) return IA_FATAL_ERROR;
  ------------------
  |  |   25|      8|#define IA_FATAL_ERROR 0x80000000
  ------------------
  |  Branch (338:7): [True: 8, False: 2.21k]
  ------------------
  339|       |
  340|   134k|  for (i = 0; i < self->num_bins; i++) {
  ------------------
  |  Branch (340:15): [True: 132k, False: 2.21k]
  ------------------
  341|   132k|    reverb_band = 0;
  342|   390k|    while ((reverb_band < 3) &&
  ------------------
  |  Branch (342:12): [True: 342k, False: 48.0k]
  ------------------
  343|   342k|           (ptr_ixheaacd_hybrid_to_qmf_map[i] >= (splitfreq[reverb_band] - 1)))
  ------------------
  |  Branch (343:12): [True: 258k, False: 84.2k]
  ------------------
  344|   258k|      reverb_band++;
  345|       |
  346|   132k|    self->delay_sample_count[i] = ptr_decorr_delay[reverb_band];
  347|   132k|    ixheaacd_mps_decor_filt_init(&self->filter[i], reverb_band, object_type);
  348|   132k|  }
  349|       |
  350|  2.21k|  self->decor_nrg_smooth.num_bins = self->num_bins;
  351|       |
  352|  2.21k|  return IA_NO_ERROR;
  ------------------
  |  |   23|  2.21k|#define IA_NO_ERROR 0x00000000
  ------------------
  353|  2.21k|}
ixheaacd_mps_decor_apply:
  359|  69.8k|    WORD32 length, WORD32 res_bands, WORD32 ldmps_present) {
  360|  69.8k|  WORD32 idx, sb_sample, index = 0;
  361|       |
  362|  69.8k|  ia_cmplx_flt_struct scratch[MAX_TIME_SLOTS];
  363|       |
  364|  69.8k|  if (res_bands != NO_RES_BANDS) index = ixheaacd_mps_gain_set_indx[res_bands];
  ------------------
  |  |   45|  69.8k|#define NO_RES_BANDS -1
  ------------------
  |  Branch (364:7): [True: 27.1k, False: 42.6k]
  ------------------
  365|       |
  366|  3.12M|  for (idx = index; idx < self->num_bins; idx++) {
  ------------------
  |  Branch (366:21): [True: 3.05M, False: 69.8k]
  ------------------
  367|   108M|    for (sb_sample = 0; sb_sample < length; sb_sample++) {
  ------------------
  |  Branch (367:25): [True: 105M, False: 3.05M]
  ------------------
  368|   105M|      self->decor_delay_buffer[idx][self->delay_sample_count[idx] + sb_sample]
  369|   105M|          .re = in[sb_sample][idx].re;
  370|   105M|      self->decor_delay_buffer[idx][self->delay_sample_count[idx] + sb_sample]
  371|   105M|          .im = in[sb_sample][idx].im;
  372|   105M|    }
  373|  3.05M|    ixheaacd_mps_allpass_apply(&self->filter[idx],
  374|  3.05M|                               self->decor_delay_buffer[idx], length, scratch);
  375|       |
  376|   108M|    for (sb_sample = 0; sb_sample < length; sb_sample++) {
  ------------------
  |  Branch (376:25): [True: 105M, False: 3.05M]
  ------------------
  377|   105M|      out[sb_sample][idx].re = scratch[sb_sample].re;
  378|   105M|      out[sb_sample][idx].im = scratch[sb_sample].im;
  379|   105M|    }
  380|       |
  381|  21.8M|    for (sb_sample = 0; sb_sample < self->delay_sample_count[idx];
  ------------------
  |  Branch (381:25): [True: 18.8M, False: 3.05M]
  ------------------
  382|  18.8M|         sb_sample++) {
  383|  18.8M|      self->decor_delay_buffer[idx][sb_sample].re =
  384|  18.8M|          self->decor_delay_buffer[idx][length + sb_sample].re;
  385|  18.8M|      self->decor_delay_buffer[idx][sb_sample].im =
  386|  18.8M|          self->decor_delay_buffer[idx][length + sb_sample].im;
  387|  18.8M|    }
  388|  3.05M|  }
  389|       |
  390|  69.8k|  ixheaacd_mps_decor_energy_adjustment(&self->decor_nrg_smooth, in, out, length,
  391|  69.8k|                                       res_bands,
  392|  69.8k|                                       ldmps_present);
  393|  69.8k|}
ixheaacd_decorr_create:
  947|  16.1k|    ia_mps_dec_mps_tables_struct *ia_mps_dec_mps_table_ptr) {
  948|  16.1k|  IA_ERRORCODE error_code = IA_NO_ERROR;
  ------------------
  |  |   23|  16.1k|#define IA_NO_ERROR 0x00000000
  ------------------
  949|  16.1k|  WORD32 i, reverb_band;
  950|       |
  951|  16.1k|  const WORD32 *rev_split_freq;
  952|       |
  953|  16.1k|  switch (decorr_config) {
  954|  11.3k|    case DECOR_CONFIG_0:
  ------------------
  |  Branch (954:5): [True: 11.3k, False: 4.87k]
  ------------------
  955|  11.3k|      rev_split_freq =
  956|  11.3k|          ia_mps_dec_mps_table_ptr->decor_table_ptr->rev_table.rev_split_freq_0;
  957|  11.3k|      break;
  958|  3.48k|    case DECOR_CONFIG_1:
  ------------------
  |  Branch (958:5): [True: 3.48k, False: 12.7k]
  ------------------
  959|  3.48k|      rev_split_freq =
  960|  3.48k|          ia_mps_dec_mps_table_ptr->decor_table_ptr->rev_table.rev_split_freq_1;
  961|  3.48k|      break;
  962|  1.39k|    case DECOR_CONFIG_2:
  ------------------
  |  Branch (962:5): [True: 1.39k, False: 14.8k]
  ------------------
  963|  1.39k|      rev_split_freq =
  964|  1.39k|          ia_mps_dec_mps_table_ptr->decor_table_ptr->rev_table.rev_split_freq_2;
  965|  1.39k|      break;
  966|      1|    default:
  ------------------
  |  Branch (966:5): [True: 1, False: 16.1k]
  ------------------
  967|      1|      return IA_FATAL_ERROR;
  ------------------
  |  |   25|      1|#define IA_FATAL_ERROR 0x80000000
  ------------------
  968|      0|      break;
  969|  16.1k|  }
  970|       |
  971|  16.1k|  if (error_code == IA_NO_ERROR) {
  ------------------
  |  |   23|  16.1k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (971:7): [True: 16.1k, False: 0]
  ------------------
  972|  16.1k|    self->decorr_seed = seed;
  973|  16.1k|    self->numbins = subbands;
  974|       |
  975|   773k|    for (i = 0; i < self->numbins; i++) {
  ------------------
  |  Branch (975:17): [True: 757k, False: 16.1k]
  ------------------
  976|   757k|      reverb_band = 0;
  977|  1.96M|      while ((reverb_band < 3) &&
  ------------------
  |  Branch (977:14): [True: 1.74M, False: 215k]
  ------------------
  978|  1.74M|             (ixheaacd_get_qmf_sb(
  ------------------
  |  Branch (978:14): [True: 1.20M, False: 542k]
  ------------------
  979|  1.74M|                  i, ia_mps_dec_mps_table_ptr->mdct2qmf_table_ptr) >=
  980|  1.74M|              (rev_split_freq[reverb_band] - 1)))
  981|  1.20M|        reverb_band++;
  982|       |
  983|   757k|      {
  984|   757k|        self->no_sample_delay[i] =
  985|   757k|            ia_mps_dec_mps_table_ptr->decor_table_ptr->rev_table
  986|   757k|                .rev_delay[reverb_band][self->decorr_seed];
  987|       |
  988|   757k|        error_code = ixheaacd_decorr_filt_create(
  989|   757k|            self->filter[i], self->decorr_seed,
  990|   757k|            ixheaacd_get_qmf_sb(i,
  991|   757k|                                ia_mps_dec_mps_table_ptr->mdct2qmf_table_ptr),
  992|   757k|            reverb_band, dec_type, ia_mps_dec_mps_table_ptr);
  993|   757k|      }
  994|   757k|    }
  995|       |
  996|  16.1k|    if (error_code == IA_NO_ERROR) {
  ------------------
  |  |   23|  16.1k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (996:9): [True: 16.1k, False: 0]
  ------------------
  997|  16.1k|      error_code = ixheaacd_ducker_create(self->ducker, self->numbins);
  998|  16.1k|    }
  999|  16.1k|  }
 1000|  16.1k|  return (error_code);
 1001|  16.1k|}
ixheaacd_decorr_apply:
 1006|  29.5k|                           WORD32 index) {
 1007|  29.5k|  WORD32 l = index - pstr_mps_state->num_direct_signals;
 1008|  29.5k|  ia_mps_dec_decorr_dec_handle decorr_ptr = pstr_mps_state->ap_decor[l];
 1009|  29.5k|  WORD32 idx, sb_sample;
 1010|       |
 1011|  29.5k|  WORD32 *p_input_real, *p_input_re, *p_input_imag, *p_input_im;
 1012|  29.5k|  WORD32 *p_output_real, *p_output_imag, *p_output_re, *p_output_im;
 1013|  29.5k|  WORD32 *delay_buffer_real, *delay_buffer_imag;
 1014|  29.5k|  WORD32 length1;
 1015|  29.5k|  VOID *free_scratch;
 1016|       |
 1017|  29.5k|  free_scratch = (WORD32 *)pstr_mps_state->mps_scratch_mem_v +
 1018|  29.5k|                 IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_TIMESLOTSX2, sizeof(WORD32), BYTE_ALIGN_8);
  ------------------
  |  |   89|  29.5k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
 1019|       |
 1020|  29.5k|  if (decorr_ptr != NULL) {
  ------------------
  |  Branch (1020:7): [True: 29.5k, False: 0]
  ------------------
 1021|  29.5k|    p_input_real = input_real;
 1022|  29.5k|    p_input_imag = input_imag;
 1023|       |
 1024|  29.5k|    p_output_real = output_real;
 1025|  29.5k|    p_output_imag = output_imag;
 1026|  1.67M|    for (idx = 0; idx < decorr_ptr->numbins; idx++) {
  ------------------
  |  Branch (1026:19): [True: 1.64M, False: 29.5k]
  ------------------
 1027|  1.64M|      p_input_re = p_input_real;
 1028|  1.64M|      p_input_im = p_input_imag;
 1029|       |
 1030|  1.64M|      p_output_re = p_output_real;
 1031|  1.64M|      p_output_im = p_output_imag;
 1032|       |
 1033|  1.64M|      length1 = length - decorr_ptr->no_sample_delay[idx];
 1034|  1.64M|      delay_buffer_real =
 1035|  1.64M|          &decorr_ptr->delay_buffer_real[idx][decorr_ptr->no_sample_delay[idx]];
 1036|  1.64M|      delay_buffer_imag =
 1037|  1.64M|          &decorr_ptr->delay_buffer_imag[idx][decorr_ptr->no_sample_delay[idx]];
 1038|  40.0M|      for (sb_sample = 0; sb_sample < length1; sb_sample++) {
  ------------------
  |  Branch (1038:27): [True: 38.3M, False: 1.64M]
  ------------------
 1039|  38.3M|        delay_buffer_real[sb_sample] = *p_input_re;
 1040|  38.3M|        *delay_buffer_imag++ = *p_input_im;
 1041|  38.3M|        p_input_re += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  38.3M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  38.3M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
 1042|  38.3M|        p_input_im += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  38.3M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  38.3M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
 1043|  38.3M|      }
 1044|  1.64M|      {
 1045|  1.64M|        ixheaacd_decorr_filt_apply(
 1046|  1.64M|            decorr_ptr->filter[idx], length, decorr_ptr->delay_buffer_real[idx],
 1047|  1.64M|            decorr_ptr->delay_buffer_imag[idx], p_output_re++, p_output_im++);
 1048|  1.64M|      }
 1049|       |
 1050|  1.64M|      length1 = decorr_ptr->no_sample_delay[idx];
 1051|  1.64M|      delay_buffer_real = &decorr_ptr->delay_buffer_real[idx][0];
 1052|  1.64M|      delay_buffer_imag = &decorr_ptr->delay_buffer_imag[idx][0];
 1053|  8.60M|      for (sb_sample = 0; sb_sample < length1; sb_sample++) {
  ------------------
  |  Branch (1053:27): [True: 6.95M, False: 1.64M]
  ------------------
 1054|  6.95M|        delay_buffer_real[sb_sample] = *p_input_re;
 1055|  6.95M|        p_input_re += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  6.95M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  6.95M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
 1056|  6.95M|        *delay_buffer_imag++ = *p_input_im;
 1057|  6.95M|        p_input_im += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  6.95M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  6.95M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
 1058|  6.95M|      }
 1059|       |
 1060|  1.64M|      p_input_real++;
 1061|  1.64M|      p_input_imag++;
 1062|       |
 1063|  1.64M|      p_output_real++;
 1064|  1.64M|      p_output_imag++;
 1065|  1.64M|    }
 1066|  29.5k|    decorr_ptr->ducker->apply(decorr_ptr->ducker, length, input_real,
 1067|  29.5k|                              input_imag, output_real, output_imag,
 1068|  29.5k|                              &(pstr_mps_state->ia_mps_dec_mps_table), free_scratch);
 1069|  29.5k|  }
 1070|  29.5k|}
ixheaacd_mps_decorr.c:ixheaacd_mps_decor_filt_init:
  147|   132k|                                         WORD32 object_type) {
  148|   132k|  if (object_type == AOT_ER_AAC_ELD || object_type == AOT_ER_AAC_LD) {
  ------------------
  |  Branch (148:7): [True: 42.4k, False: 89.8k]
  |  Branch (148:40): [True: 0, False: 89.8k]
  ------------------
  149|  42.4k|    switch (reverb_band) {
  ------------------
  |  Branch (149:13): [True: 42.4k, False: 0]
  ------------------
  150|      0|      case 0:
  ------------------
  |  Branch (150:7): [True: 0, False: 42.4k]
  ------------------
  151|      0|        self->num_len = self->den_len = DECORR_FILTER_ORDER_BAND_0 + 1;
  ------------------
  |  |   33|      0|#define DECORR_FILTER_ORDER_BAND_0 (20)
  ------------------
  152|      0|        self->num = NULL;
  153|      0|        self->den = NULL;
  154|       |
  155|      0|        break;
  156|  16.0k|      case 1:
  ------------------
  |  Branch (156:7): [True: 16.0k, False: 26.3k]
  ------------------
  157|  16.0k|        self->num_len = self->den_len = DECORR_FILTER_ORDER_BAND_1 + 1;
  ------------------
  |  |   34|  16.0k|#define DECORR_FILTER_ORDER_BAND_1 (15)
  ------------------
  158|  16.0k|        self->num = ixheaacd_lattice_coeff_1_filt_num_ldmps;
  159|  16.0k|        self->den = ixheaacd_lattice_coeff_1_filt_den_ldmps;
  160|       |
  161|  16.0k|        break;
  162|  16.3k|      case 2:
  ------------------
  |  Branch (162:7): [True: 16.3k, False: 26.0k]
  ------------------
  163|  16.3k|        self->num_len = self->den_len = DECORR_FILTER_ORDER_BAND_2 + 1;
  ------------------
  |  |   35|  16.3k|#define DECORR_FILTER_ORDER_BAND_2 (6)
  ------------------
  164|  16.3k|        self->num = ixheaacd_lattice_coeff_2_filt_num_ldmps;
  165|  16.3k|        self->den = ixheaacd_lattice_coeff_2_filt_den_ldmps;
  166|  16.3k|        break;
  167|  9.97k|      case 3:
  ------------------
  |  Branch (167:7): [True: 9.97k, False: 32.4k]
  ------------------
  168|  9.97k|        self->num_len = self->den_len = DECORR_FILTER_ORDER_BAND_3 + 1;
  ------------------
  |  |   36|  9.97k|#define DECORR_FILTER_ORDER_BAND_3 (3)
  ------------------
  169|  9.97k|        self->num = ixheaacd_lattice_coeff_3_filt_num_ldmps;
  170|  9.97k|        self->den = ixheaacd_lattice_coeff_3_filt_den_ldmps;
  171|  9.97k|        break;
  172|  42.4k|    }
  173|  89.8k|  } else {
  174|  89.8k|    switch (reverb_band) {
  ------------------
  |  Branch (174:13): [True: 89.8k, False: 0]
  ------------------
  175|  8.24k|      case 0:
  ------------------
  |  Branch (175:7): [True: 8.24k, False: 81.6k]
  ------------------
  176|  8.24k|        self->num_len = self->den_len = DECORR_FILT_0_ORD + 1;
  ------------------
  |  |   40|  8.24k|#define DECORR_FILT_0_ORD (10)
  ------------------
  177|  8.24k|        self->num = ixheaacd_lattice_coeff_0_filt_num_coeff;
  178|  8.24k|        self->den = ixheaacd_lattice_coeff_0_filt_den_coeff;
  179|       |
  180|  8.24k|        break;
  181|  21.9k|      case 1:
  ------------------
  |  Branch (181:7): [True: 21.9k, False: 67.9k]
  ------------------
  182|  21.9k|        self->num_len = self->den_len = DECORR_FILT_1_ORD + 1;
  ------------------
  |  |   41|  21.9k|#define DECORR_FILT_1_ORD (8)
  ------------------
  183|  21.9k|        self->num = ixheaacd_lattice_coeff_1_filt_num_coeff;
  184|  21.9k|        self->den = ixheaacd_lattice_coeff_1_filt_den_coeff;
  185|       |
  186|  21.9k|        break;
  187|  21.6k|      case 2:
  ------------------
  |  Branch (187:7): [True: 21.6k, False: 68.2k]
  ------------------
  188|  21.6k|        self->num_len = self->den_len = DECORR_FILT_2_ORD + 1;
  ------------------
  |  |   42|  21.6k|#define DECORR_FILT_2_ORD (3)
  ------------------
  189|  21.6k|        self->num = ixheaacd_lattice_coeff_2_filt_num_coeff;
  190|  21.6k|        self->den = ixheaacd_lattice_coeff_2_filt_den_coeff;
  191|  21.6k|        break;
  192|  38.0k|      case 3:
  ------------------
  |  Branch (192:7): [True: 38.0k, False: 51.8k]
  ------------------
  193|  38.0k|        self->num_len = self->den_len = DECORR_FILT_3_ORD + 1;
  ------------------
  |  |   43|  38.0k|#define DECORR_FILT_3_ORD (2)
  ------------------
  194|  38.0k|        self->num = ixheaacd_lattice_coeff_3_filt_num_coeff;
  195|  38.0k|        self->den = ixheaacd_lattice_coeff_3_filt_den_coeff;
  196|  38.0k|        break;
  197|  89.8k|    }
  198|  89.8k|  }
  199|       |
  200|   132k|  self->state_len = self->num_len;
  201|   132k|  memset(self->state, 0,
  202|   132k|         sizeof(ia_cmplx_flt_struct) * (MAX_DECORR_FILTER_ORDER + 1));
  ------------------
  |  |   38|   132k|#define MAX_DECORR_FILTER_ORDER (DECORR_FILTER_ORDER_BAND_0)
  |  |  ------------------
  |  |  |  |   33|   132k|#define DECORR_FILTER_ORDER_BAND_0 (20)
  |  |  ------------------
  ------------------
  203|       |
  204|   132k|  return;
  205|   132k|}
ixheaacd_mps_decorr.c:ixheaacd_mps_allpass_apply:
  209|  3.05M|                                       ia_cmplx_flt_struct *output) {
  210|  3.05M|  WORD32 i, j;
  211|       |
  212|   108M|  for (i = 0; i < len; i++) {
  ------------------
  |  Branch (212:15): [True: 105M, False: 3.05M]
  ------------------
  213|   105M|    output[i].re = self->state[0].re + input[i].re * self->num[0];
  214|   105M|    output[i].im = self->state[0].im + input[i].im * self->num[0];
  215|       |
  216|   646M|    for (j = 1; j < self->num_len; j++) {
  ------------------
  |  Branch (216:17): [True: 541M, False: 105M]
  ------------------
  217|   541M|      self->state[j - 1].re = self->state[j].re + self->num[j] * input[i].re -
  218|   541M|                              self->den[j] * output[i].re;
  219|   541M|      self->state[j - 1].im = self->state[j].im + self->num[j] * input[i].im -
  220|   541M|                              self->den[j] * output[i].im;
  221|   541M|    }
  222|   105M|  }
  223|  3.05M|}
ixheaacd_mps_decorr.c:ixheaacd_mps_decor_energy_adjustment:
  229|  69.8k|    WORD32 time_slots, WORD32 res_bands, WORD32 ldmps_present) {
  230|  69.8k|  ixheaacd_mps_decor_energy_adjust_filt_struct *self =
  231|  69.8k|      (ixheaacd_mps_decor_energy_adjust_filt_struct *)handle;
  232|  69.8k|  FLOAT32 in_energy[MAX_PARAMETER_BANDS] = {0};
  233|  69.8k|  FLOAT32 out_energy[MAX_PARAMETER_BANDS] = {0};
  234|  69.8k|  FLOAT32 gain[MAX_PARAMETER_BANDS];
  235|  69.8k|  WORD32 i, j, k, loop_counter;
  236|  69.8k|  WORD32 *ptr_hybrid_band;
  237|       |
  238|  69.8k|  if (ldmps_present == 1)
  ------------------
  |  Branch (238:7): [True: 2.15k, False: 67.6k]
  ------------------
  239|  2.15k|    ptr_hybrid_band = ixheaacd_hybrid_band_64_to_processing_band_23_map;
  240|  67.6k|  else
  241|  67.6k|    ptr_hybrid_band = ixheaacd_hybrid_band_71_to_processing_band_28_map;
  242|       |
  243|  69.8k|  WORD32 start_param_band = 0, start_bin = 0;
  244|       |
  245|  69.8k|  if (res_bands != NO_RES_BANDS) {
  ------------------
  |  |   45|  69.8k|#define NO_RES_BANDS -1
  ------------------
  |  Branch (245:7): [True: 27.1k, False: 42.6k]
  ------------------
  246|  27.1k|    start_bin = ixheaacd_mps_gain_set_indx[res_bands];
  247|  27.1k|    start_param_band = res_bands;
  248|  27.1k|  }
  249|       |
  250|  2.73M|  for (i = 0; i < time_slots; i++) {
  ------------------
  |  Branch (250:15): [True: 2.66M, False: 69.8k]
  ------------------
  251|  2.66M|    memset(in_energy, 0, sizeof(FLOAT32) * MAX_PARAMETER_BANDS);
  ------------------
  |  |   55|  2.66M|#define MAX_PARAMETER_BANDS (28)
  ------------------
  252|  2.66M|    memset(out_energy, 0, sizeof(FLOAT32) * MAX_PARAMETER_BANDS);
  ------------------
  |  |   55|  2.66M|#define MAX_PARAMETER_BANDS (28)
  ------------------
  253|       |
  254|   107M|    for (j = start_bin; j < self->num_bins; j++) {
  ------------------
  |  Branch (254:25): [True: 105M, False: 2.66M]
  ------------------
  255|   105M|      k = ptr_hybrid_band[j];
  256|       |
  257|   105M|      in_energy[k] += in[i][j].re * in[i][j].re + in[i][j].im * in[i][j].im;
  258|   105M|      out_energy[k] +=
  259|   105M|          out[i][j].re * out[i][j].re + out[i][j].im * out[i][j].im;
  260|   105M|    }
  261|       |
  262|  2.66M|    loop_counter = MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|  2.66M|#define MAX_PARAMETER_BANDS (28)
  ------------------
  263|       |
  264|  65.6M|    for (k = start_param_band; k < loop_counter; k++) {
  ------------------
  |  Branch (264:32): [True: 62.9M, False: 2.66M]
  ------------------
  265|  62.9M|      self->smooth_in_energy[k] = self->smooth_in_energy[k] * DECOR_ALPHA +
  ------------------
  |  |   23|  62.9M|#define DECOR_ALPHA (0.8f)
  ------------------
  266|  62.9M|                                  in_energy[k] * ONE_MINUS_DECOR_ALPHA;
  ------------------
  |  |   24|  62.9M|#define ONE_MINUS_DECOR_ALPHA (1 - DECOR_ALPHA)
  |  |  ------------------
  |  |  |  |   23|  62.9M|#define DECOR_ALPHA (0.8f)
  |  |  ------------------
  ------------------
  267|  62.9M|      self->smooth_out_energy[k] = self->smooth_out_energy[k] * DECOR_ALPHA +
  ------------------
  |  |   23|  62.9M|#define DECOR_ALPHA (0.8f)
  ------------------
  268|  62.9M|                                   out_energy[k] * ONE_MINUS_DECOR_ALPHA;
  ------------------
  |  |   24|  62.9M|#define ONE_MINUS_DECOR_ALPHA (1 - DECOR_ALPHA)
  |  |  ------------------
  |  |  |  |   23|  62.9M|#define DECOR_ALPHA (0.8f)
  |  |  ------------------
  ------------------
  269|       |
  270|  62.9M|      gain[k] = 1.0f;
  271|       |
  272|  62.9M|      if (self->smooth_out_energy[k] >
  ------------------
  |  Branch (272:11): [True: 22.6M, False: 40.3M]
  ------------------
  273|  62.9M|          self->smooth_in_energy[k] * DECOR_GAMMA) {
  ------------------
  |  |   25|  62.9M|#define DECOR_GAMMA (1.5f)
  ------------------
  274|  22.6M|        gain[k] = (FLOAT32)sqrt(self->smooth_in_energy[k] * DECOR_GAMMA /
  ------------------
  |  |   25|  22.6M|#define DECOR_GAMMA (1.5f)
  ------------------
  275|  22.6M|                                (self->smooth_out_energy[k] + ABS_THR));
  ------------------
  |  |   25|  22.6M|#define ABS_THR (1e-9f * 32768 * 32768)
  ------------------
  276|  22.6M|      }
  277|       |
  278|  62.9M|      if (self->smooth_in_energy[k] >
  ------------------
  |  Branch (278:11): [True: 9.83M, False: 53.1M]
  ------------------
  279|  62.9M|          self->smooth_out_energy[k] * DECOR_GAMMA) {
  ------------------
  |  |   25|  62.9M|#define DECOR_GAMMA (1.5f)
  ------------------
  280|  9.83M|        gain[k] =
  281|  9.83M|            min(2.0f, (FLOAT32)sqrt(self->smooth_in_energy[k] /
  ------------------
  |  |   75|  9.83M|#define min(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (75:20): [True: 5.27M, False: 4.56M]
  |  |  ------------------
  ------------------
  282|  9.83M|                                    (DECOR_GAMMA * self->smooth_out_energy[k] +
  283|  9.83M|                                     ABS_THR)));
  284|  9.83M|      }
  285|  62.9M|    }
  286|       |
  287|   107M|    for (j = start_bin; j < self->num_bins; j++) {
  ------------------
  |  Branch (287:25): [True: 105M, False: 2.66M]
  ------------------
  288|   105M|      k = ptr_hybrid_band[j];
  289|       |
  290|   105M|      out[i][j].re *= gain[k];
  291|   105M|      out[i][j].im *= gain[k];
  292|   105M|    }
  293|  2.66M|  }
  294|  69.8k|}
ixheaacd_mps_decorr.c:ixheaacd_decorr_filt_create:
  432|   757k|    ia_mps_dec_mps_tables_struct *ia_mps_dec_mps_table) {
  433|   757k|  IA_ERRORCODE error_code = IA_NO_ERROR;
  ------------------
  |  |   23|   757k|#define IA_NO_ERROR 0x00000000
  ------------------
  434|   757k|  WORD32 i;
  435|   757k|  const WORD32 *lattice_coeff = NULL;
  436|   757k|  WORD32 lattice_coeff_real[MAX_DECORR_FILTER_ORDER];
  437|   757k|  WORD32 lattice_coeff_imag[MAX_DECORR_FILTER_ORDER];
  438|   757k|  WORD32 temp_1;
  439|       |
  440|   757k|  if (self == NULL) {
  ------------------
  |  Branch (440:7): [True: 0, False: 757k]
  ------------------
  441|      0|    error_code = IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
  442|      0|  }
  443|       |
  444|   757k|  if (error_code == IA_NO_ERROR) {
  ------------------
  |  |   23|   757k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (444:7): [True: 757k, False: 0]
  ------------------
  445|   757k|    switch (reverb_band) {
  446|   118k|      case REVERB_BAND_0:
  ------------------
  |  Branch (446:7): [True: 118k, False: 638k]
  ------------------
  447|   118k|        self->num_length = self->den_length = DECORR_FILTER_ORDER_BAND_0 + 1;
  ------------------
  |  |   33|   118k|#define DECORR_FILTER_ORDER_BAND_0 (20)
  ------------------
  448|   118k|        lattice_coeff = &(ia_mps_dec_mps_table->decor_table_ptr
  449|   118k|                              ->lattice_coeff_0[decorr_seed][0]);
  450|   118k|        break;
  451|   290k|      case REVERB_BAND_1:
  ------------------
  |  Branch (451:7): [True: 290k, False: 467k]
  ------------------
  452|   290k|        self->num_length = self->den_length = DECORR_FILTER_ORDER_BAND_1 + 1;
  ------------------
  |  |   34|   290k|#define DECORR_FILTER_ORDER_BAND_1 (15)
  ------------------
  453|   290k|        lattice_coeff = &(ia_mps_dec_mps_table->decor_table_ptr
  454|   290k|                              ->lattice_coeff_1[decorr_seed][0]);
  455|   290k|        break;
  456|   133k|      case REVERB_BAND_2:
  ------------------
  |  Branch (456:7): [True: 133k, False: 623k]
  ------------------
  457|   133k|        self->num_length = self->den_length = DECORR_FILTER_ORDER_BAND_2 + 1;
  ------------------
  |  |   35|   133k|#define DECORR_FILTER_ORDER_BAND_2 (6)
  ------------------
  458|   133k|        lattice_coeff = &(ia_mps_dec_mps_table->decor_table_ptr
  459|   133k|                              ->lattice_coeff_2[decorr_seed][0]);
  460|   133k|        break;
  461|   215k|      case REVERB_BAND_3:
  ------------------
  |  Branch (461:7): [True: 215k, False: 542k]
  ------------------
  462|   215k|        self->num_length = self->den_length = DECORR_FILTER_ORDER_BAND_3 + 1;
  ------------------
  |  |   36|   215k|#define DECORR_FILTER_ORDER_BAND_3 (3)
  ------------------
  463|   215k|        lattice_coeff = &(ia_mps_dec_mps_table->decor_table_ptr
  464|   215k|                              ->lattice_coeff_3[decorr_seed][0]);
  465|   215k|        break;
  466|      0|      default:
  ------------------
  |  Branch (466:7): [True: 0, False: 757k]
  ------------------
  467|      0|        return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
  468|   757k|    }
  469|   757k|    self->state_length = (self->num_length > self->den_length)
  ------------------
  |  Branch (469:26): [True: 0, False: 757k]
  ------------------
  470|   757k|                             ? self->num_length
  471|   757k|                             : self->den_length;
  472|   757k|  }
  473|       |
  474|   757k|  if (error_code == IA_NO_ERROR) {
  ------------------
  |  |   23|   757k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (474:7): [True: 757k, False: 0]
  ------------------
  475|   757k|    const WORD32 *cos_tab =
  476|   757k|        ia_mps_dec_mps_table->hybrid_table_ptr->cosine_array;
  477|   757k|    const WORD32 *sin_tab = ia_mps_dec_mps_table->hybrid_table_ptr->sine_array;
  478|       |
  479|   757k|    if (dec_type == 1) {
  ------------------
  |  Branch (479:9): [True: 0, False: 757k]
  ------------------
  480|      0|      for (i = 0; i < self->num_length - 1; i++) {
  ------------------
  |  Branch (480:19): [True: 0, False: 0]
  ------------------
  481|      0|        temp_1 = (qmf_band * ia_mps_dec_mps_table->decor_table_ptr
  482|      0|                                 ->lattice_delta_phi[decorr_seed][i]) >>
  483|      0|                 1;
  484|      0|        lattice_coeff_real[i] = ixheaacd_mps_mult32_shr_15(
  485|      0|            ixheaacd_mps_cos(temp_1, cos_tab), lattice_coeff[i]);
  486|      0|        lattice_coeff_imag[i] = ixheaacd_mps_mult32_shr_15(
  487|      0|            ixheaacd_mps_sin(temp_1, sin_tab), lattice_coeff[i]);
  488|      0|      }
  489|       |
  490|      0|      ixheaacd_convert_lattice_coefs_complex(
  491|      0|          self->num_length - 1, lattice_coeff_real, lattice_coeff_imag,
  492|      0|          self->denominator_real, self->denominator_imag);
  493|      0|      for (i = 0; i < self->num_length; i++) {
  ------------------
  |  Branch (493:19): [True: 0, False: 0]
  ------------------
  494|      0|        self->numerator_real[i] =
  495|      0|            self->denominator_real[self->num_length - 1 - i];
  496|      0|        self->numerator_imag[i] =
  497|      0|            -self->denominator_imag[self->num_length - 1 - i];
  498|      0|      }
  499|       |
  500|      0|      self->complex = 1;
  501|   757k|    } else {
  502|   757k|      switch (reverb_band) {
  503|   118k|        case REVERB_BAND_0:
  ------------------
  |  Branch (503:9): [True: 118k, False: 638k]
  ------------------
  504|   118k|          self->denominator_real = &(ia_mps_dec_mps_table->decor_table_ptr
  505|   118k|                                         ->den_coef_0[decorr_seed][0]);
  506|   118k|          break;
  507|   290k|        case REVERB_BAND_1:
  ------------------
  |  Branch (507:9): [True: 290k, False: 467k]
  ------------------
  508|   290k|          self->denominator_real = &(ia_mps_dec_mps_table->decor_table_ptr
  509|   290k|                                         ->den_coef_1[decorr_seed][0]);
  510|   290k|          break;
  511|   133k|        case REVERB_BAND_2:
  ------------------
  |  Branch (511:9): [True: 133k, False: 623k]
  ------------------
  512|   133k|          self->denominator_real = &(ia_mps_dec_mps_table->decor_table_ptr
  513|   133k|                                         ->den_coef_2[decorr_seed][0]);
  514|   133k|          break;
  515|   215k|        case REVERB_BAND_3:
  ------------------
  |  Branch (515:9): [True: 215k, False: 542k]
  ------------------
  516|   215k|          self->denominator_real = &(ia_mps_dec_mps_table->decor_table_ptr
  517|   215k|                                         ->den_coef_3[decorr_seed][0]);
  518|   215k|          break;
  519|      0|        default:
  ------------------
  |  Branch (519:9): [True: 0, False: 757k]
  ------------------
  520|      0|          return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
  521|   757k|      }
  522|       |
  523|  9.68M|      for (i = 0; i < self->num_length; i++) {
  ------------------
  |  Branch (523:19): [True: 8.92M, False: 757k]
  ------------------
  524|  8.92M|        self->numerator_real[i] =
  525|  8.92M|            self->denominator_real[self->num_length - 1 - i];
  526|  8.92M|      }
  527|   757k|      self->complex = 0;
  528|   757k|    }
  529|   757k|  }
  530|   757k|  return error_code;
  531|   757k|}
ixheaacd_mps_decorr.c:ixheaacd_ducker_create:
  905|  16.1k|    ia_mps_dec_ducker_interface *const face, WORD32 const hybrid_bands) {
  906|  16.1k|  ia_mps_dec_duck_instance_struct *self = NULL;
  907|  16.1k|  IA_ERRORCODE error_code = IA_NO_ERROR;
  ------------------
  |  |   23|  16.1k|#define IA_NO_ERROR 0x00000000
  ------------------
  908|  16.1k|  WORD32 i;
  909|       |
  910|  16.1k|  if (face == NULL) {
  ------------------
  |  Branch (910:7): [True: 0, False: 16.1k]
  ------------------
  911|      0|    error_code = IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
  912|      0|  }
  913|       |
  914|  16.1k|  if (error_code == IA_NO_ERROR) {
  ------------------
  |  |   23|  16.1k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (914:7): [True: 16.1k, False: 0]
  ------------------
  915|  16.1k|    self = (ia_mps_dec_duck_instance_struct *)&face[1];
  916|       |
  917|  16.1k|    self->hybrid_bands = hybrid_bands;
  918|  16.1k|    self->parameter_bands = MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|  16.1k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  919|       |
  920|  16.1k|    self->alpha = DUCK_ALPHA;
  ------------------
  |  |   27|  16.1k|#define DUCK_ALPHA (26214)
  ------------------
  921|  16.1k|    self->one_minus_alpha = DUCK_ONEMINUSALPHA;
  ------------------
  |  |   29|  16.1k|#define DUCK_ONEMINUSALPHA (6554)
  ------------------
  922|  16.1k|    self->gamma = DUCK_GAMMA;
  ------------------
  |  |   28|  16.1k|#define DUCK_GAMMA (24576)
  ------------------
  923|  16.1k|    self->abs_thr = ABS_THR_FIX;
  ------------------
  |  |   59|  16.1k|#define ABS_THR_FIX (35184)
  ------------------
  924|  16.1k|    self->hybrid_bands = hybrid_bands;
  925|  16.1k|    self->parameter_bands = MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|  16.1k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  926|       |
  927|  16.1k|    self->qalpha = 15;
  928|  16.1k|    self->qgamma = 14;
  929|       |
  930|  16.1k|    if (hybrid_bands == 71)
  ------------------
  |  Branch (930:9): [True: 3.93k, False: 12.2k]
  ------------------
  931|  3.93k|      face->apply = ixheaacd_ducker_apply_71;
  932|  12.2k|    else
  933|  12.2k|      face->apply = ixheaacd_ducker_apply;
  934|       |
  935|   469k|    for (i = 0; i < MAX_PARAMETER_BANDS; i++) {
  ------------------
  |  |   55|   469k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  |  Branch (935:17): [True: 453k, False: 16.1k]
  ------------------
  936|   453k|      self->q_smooth_direct_nrg[i] = 31;
  937|   453k|      self->q_smooth_reverb_nrg[i] = 31;
  938|   453k|    }
  939|  16.1k|  }
  940|       |
  941|  16.1k|  return error_code;
  942|  16.1k|}
ixheaacd_mps_decorr.c:ixheaacd_ducker_apply_71:
  592|  15.4k|    VOID *scratch) {
  593|  15.4k|  ia_mps_dec_duck_instance_struct *self =
  594|  15.4k|      (ia_mps_dec_duck_instance_struct *)&face[1];
  595|  15.4k|  WORD32 *duck_gain;
  596|  15.4k|  WORD32 gain;
  597|  15.4k|  WORD16 qgain;
  598|  15.4k|  WORD64 direct_nrg[28];
  599|  15.4k|  WORD64 reverb_nrg[28];
  600|  15.4k|  WORD16 *q_duck_gain;
  601|  15.4k|  WORD32 ts;
  602|  15.4k|  WORD32 qs;
  603|  15.4k|  WORD32 pb;
  604|  15.4k|  WORD16 qtemp1, qtemp2, qtemp3;
  605|  15.4k|  WORD32 temp_1, temp_2, temp3;
  606|  15.4k|  const WORD32 *p_input_real;
  607|  15.4k|  const WORD32 *p_input_imag;
  608|  15.4k|  const WORD32 *hybrid_2_param_28 =
  609|  15.4k|      ia_mps_dec_mps_table_ptr->m1_m2_table_ptr->hybrid_2_param_28;
  610|  15.4k|  const WORD32 *sqrt_tab = ia_mps_dec_mps_table_ptr->common_table_ptr->sqrt_tab;
  611|  15.4k|  WORD32 *smooth_direct_nrg = self->smooth_direct_nrg;
  612|  15.4k|  WORD16 *q_smooth_direct_nrg = self->q_smooth_direct_nrg;
  613|       |
  614|  15.4k|  WORD32 *smooth_reverb_nrg = self->smooth_reverb_nrg;
  615|  15.4k|  WORD16 *q_smooth_reverb_nrg = self->q_smooth_reverb_nrg;
  616|       |
  617|  15.4k|  WORD32 parameter_bands = self->parameter_bands;
  618|       |
  619|  15.4k|  WORD32 *p_output_real, *p_output_imag;
  620|       |
  621|  15.4k|  WORD32 num_bands_2 = self->hybrid_bands;
  622|  15.4k|  WORD32 v1, v2, v3, v4;
  623|  15.4k|  WORD16 one_by_5 = ONE_BY_FIVE_Q16;
  ------------------
  |  |   31|  15.4k|#define ONE_BY_FIVE_Q16 (13107)
  ------------------
  624|       |
  625|  15.4k|  duck_gain = scratch;
  626|  15.4k|  q_duck_gain = (WORD16 *)scratch + IXHEAAC_GET_SIZE_ALIGNED_TYPE(
  ------------------
  |  |   89|  15.4k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  627|  15.4k|                                        PARAMETER_BANDSX2, sizeof(*q_duck_gain), BYTE_ALIGN_8);
  628|       |
  629|  15.4k|  p_input_real = input_real;
  630|  15.4k|  p_input_imag = input_imag;
  631|       |
  632|  15.4k|  p_output_real = output_real;
  633|  15.4k|  p_output_imag = output_imag;
  634|       |
  635|   465k|  for (ts = 0; ts < time_slots; ts++) {
  ------------------
  |  Branch (635:16): [True: 449k, False: 15.4k]
  ------------------
  636|   449k|    memset(direct_nrg, 0, sizeof(direct_nrg));
  637|   449k|    memset(reverb_nrg, 0, sizeof(reverb_nrg));
  638|       |
  639|  25.1M|    for (qs = 0; qs < 55; qs++) {
  ------------------
  |  Branch (639:18): [True: 24.7M, False: 449k]
  ------------------
  640|  24.7M|      v1 = p_input_real[qs];
  641|  24.7M|      v2 = p_input_imag[qs];
  642|  24.7M|      v3 = p_output_real[qs];
  643|  24.7M|      v4 = p_output_imag[qs];
  644|       |
  645|  24.7M|      pb = hybrid_2_param_28[qs];
  646|  24.7M|      direct_nrg[pb] = ixheaac_add64_sat(direct_nrg[pb], ixheaac_mult32x32in64(v1, v1));
  647|  24.7M|      direct_nrg[pb] = ixheaac_add64_sat(direct_nrg[pb], ixheaac_mult32x32in64(v2, v2));
  648|  24.7M|      reverb_nrg[pb] = ixheaac_add64_sat(reverb_nrg[pb], ixheaac_mult32x32in64(v3, v3));
  649|  24.7M|      reverb_nrg[pb] = ixheaac_add64_sat(reverb_nrg[pb], ixheaac_mult32x32in64(v4, v4));
  650|  24.7M|    }
  651|       |
  652|  7.64M|    for (; qs < num_bands_2; qs++) {
  ------------------
  |  Branch (652:12): [True: 7.19M, False: 449k]
  ------------------
  653|  7.19M|      v1 = p_input_real[qs];
  654|  7.19M|      v2 = p_input_imag[qs];
  655|  7.19M|      v3 = p_output_real[qs];
  656|  7.19M|      v4 = p_output_imag[qs];
  657|       |
  658|  7.19M|      direct_nrg[27] = ixheaac_add64_sat(direct_nrg[27], ixheaac_mult32x32in64(v1, v1));
  659|  7.19M|      direct_nrg[27] = ixheaac_add64_sat(direct_nrg[27], ixheaac_mult32x32in64(v2, v2));
  660|  7.19M|      reverb_nrg[27] = ixheaac_add64_sat(reverb_nrg[27], ixheaac_mult32x32in64(v3, v3));
  661|  7.19M|      reverb_nrg[27] = ixheaac_add64_sat(reverb_nrg[27], ixheaac_mult32x32in64(v4, v4));
  662|  7.19M|    }
  663|       |
  664|  13.0M|    for (pb = 0; pb < parameter_bands; pb++) {
  ------------------
  |  Branch (664:18): [True: 12.5M, False: 449k]
  ------------------
  665|  12.5M|      WORD16 qtemp, qtemp_1;
  666|  12.5M|      temp_1 = ixheaacd_mps_narrow(direct_nrg[pb], &qtemp);
  667|       |
  668|  12.5M|      temp_2 = smooth_direct_nrg[pb] << 2;
  669|  12.5M|      temp3 =
  670|  12.5M|          ixheaacd_mps_add32(temp_2, temp_1, &(q_smooth_direct_nrg[pb]), qtemp);
  671|  12.5M|      smooth_direct_nrg[pb] = ixheaacd_mps_mult32x16_shr_16(temp3, one_by_5);
  672|       |
  673|  12.5M|      temp_1 = ixheaacd_mps_narrow(reverb_nrg[pb], &qtemp);
  674|  12.5M|      temp_2 = smooth_reverb_nrg[pb] << 2;
  675|       |
  676|  12.5M|      temp3 =
  677|  12.5M|          ixheaacd_mps_add32(temp_2, temp_1, &(q_smooth_reverb_nrg[pb]), qtemp);
  678|  12.5M|      smooth_reverb_nrg[pb] = ixheaacd_mps_mult32x16_shr_16(temp3, one_by_5);
  679|       |
  680|  12.5M|      qtemp1 = q_smooth_reverb_nrg[pb] - 1;
  681|  12.5M|      temp_1 = (smooth_reverb_nrg[pb] >> 2) * 3;
  682|  12.5M|      qtemp = q_smooth_direct_nrg[pb];
  683|  12.5M|      temp3 = smooth_direct_nrg[pb];
  684|       |
  685|  12.5M|      if (ixheaacd_mps_comp(temp3, temp_1, &qtemp, qtemp1)) {
  ------------------
  |  Branch (685:11): [True: 4.69M, False: 7.89M]
  ------------------
  686|  4.69M|        temp_2 = ixheaacd_mps_div_32(temp3, temp_1, &qtemp2);
  687|  4.69M|        qtemp2 = qtemp2 + qtemp - qtemp1;
  688|  4.69M|        if (temp_1 == 0) {
  ------------------
  |  Branch (688:13): [True: 248k, False: 4.44M]
  ------------------
  689|   248k|          qtemp2 = qtemp;
  690|   248k|        }
  691|  4.69M|        temp3 = (qtemp2) > 28 ? MAX_32 : 4 << qtemp2;
  ------------------
  |  |   60|  3.49M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (691:17): [True: 3.49M, False: 1.20M]
  ------------------
  692|       |
  693|  4.69M|        if (temp_2 > temp3) {
  ------------------
  |  Branch (693:13): [True: 954k, False: 3.74M]
  ------------------
  694|   954k|          *duck_gain = (ONE_IN_Q15 - 1);
  ------------------
  |  |   41|   954k|#define ONE_IN_Q15 (32768)
  ------------------
  695|   954k|          *q_duck_gain++ = 14;
  696|  3.74M|        } else {
  697|  3.74M|          *duck_gain = ixheaacd_mps_sqrt(temp_2, &qtemp2, sqrt_tab);
  698|  3.74M|          *q_duck_gain++ = qtemp2;
  699|  3.74M|        }
  700|  4.69M|        duck_gain++;
  701|  4.69M|        continue;
  702|  4.69M|      }
  703|       |
  704|  7.89M|      *duck_gain = ONE_IN_Q14 - 1;
  ------------------
  |  |   40|  7.89M|#define ONE_IN_Q14 (16384)
  ------------------
  705|       |
  706|  7.89M|      qtemp = q_smooth_direct_nrg[pb] - 1;
  707|  7.89M|      temp_1 = (smooth_direct_nrg[pb] >> 2) * 3;
  708|       |
  709|  7.89M|      qtemp_1 = q_smooth_reverb_nrg[pb];
  710|  7.89M|      temp_2 = smooth_reverb_nrg[pb];
  711|  7.89M|      if (ixheaacd_mps_comp(temp_2, temp_1, &(qtemp_1), qtemp)) {
  ------------------
  |  Branch (711:11): [True: 2.64M, False: 5.24M]
  ------------------
  712|  2.64M|        temp3 = ixheaacd_mps_div_32(temp_1, temp_2, &qtemp3);
  713|  2.64M|        qtemp3 = qtemp3 + qtemp - qtemp_1;
  714|       |
  715|  2.64M|        *duck_gain = ixheaacd_mps_sqrt(temp3, &qtemp3, sqrt_tab);
  716|  2.64M|        *q_duck_gain = qtemp3;
  717|  2.64M|      }
  718|       |
  719|  7.89M|      duck_gain++;
  720|  7.89M|      q_duck_gain++;
  721|  7.89M|    }
  722|   449k|    duck_gain -= parameter_bands;
  723|   449k|    q_duck_gain -= parameter_bands;
  724|       |
  725|  25.1M|    for (qs = 0; qs < 55; qs++) {
  ------------------
  |  Branch (725:18): [True: 24.7M, False: 449k]
  ------------------
  726|  24.7M|      pb = hybrid_2_param_28[qs];
  727|  24.7M|      gain = duck_gain[pb];
  728|  24.7M|      if (gain == 16383) {
  ------------------
  |  Branch (728:11): [True: 12.9M, False: 11.7M]
  ------------------
  729|  12.9M|        continue;
  730|  12.9M|      }
  731|  11.7M|      qgain = q_duck_gain[pb];
  732|  11.7M|      p_output_real[qs] =
  733|  11.7M|          ixheaacd_mps_mult32_shr_n(p_output_real[qs], gain, qgain);
  734|  11.7M|      p_output_imag[qs] =
  735|  11.7M|          ixheaacd_mps_mult32_shr_n(p_output_imag[qs], gain, qgain);
  736|  11.7M|    }
  737|       |
  738|   449k|    gain = duck_gain[27];
  739|       |
  740|   449k|    if (gain != 16383) {
  ------------------
  |  Branch (740:9): [True: 101k, False: 348k]
  ------------------
  741|   101k|      qgain = q_duck_gain[27];
  742|  1.72M|      for (; qs < num_bands_2; qs++) {
  ------------------
  |  Branch (742:14): [True: 1.61M, False: 101k]
  ------------------
  743|  1.61M|        p_output_real[qs] =
  744|  1.61M|            ixheaacd_mps_mult32_shr_n(p_output_real[qs], gain, qgain);
  745|  1.61M|        p_output_imag[qs] =
  746|  1.61M|            ixheaacd_mps_mult32_shr_n(p_output_imag[qs], gain, qgain);
  747|  1.61M|      }
  748|   101k|    }
  749|       |
  750|   449k|    p_input_real += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|   449k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|   449k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  751|   449k|    p_input_imag += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|   449k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|   449k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  752|       |
  753|   449k|    p_output_real += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|   449k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|   449k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  754|   449k|    p_output_imag += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|   449k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|   449k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  755|   449k|  }
  756|  15.4k|}
ixheaacd_mps_decorr.c:ixheaacd_ducker_apply:
  762|  14.0k|    VOID *scratch) {
  763|  14.0k|  ia_mps_dec_duck_instance_struct *self =
  764|  14.0k|      (ia_mps_dec_duck_instance_struct *)&face[1];
  765|  14.0k|  WORD32 *duck_gain;
  766|  14.0k|  WORD32 gain;
  767|  14.0k|  WORD16 qgain;
  768|  14.0k|  WORD64 direct_nrg[28];
  769|  14.0k|  WORD64 reverb_nrg[28];
  770|  14.0k|  WORD16 *q_duck_gain;
  771|  14.0k|  WORD32 ts;
  772|  14.0k|  WORD32 qs;
  773|  14.0k|  WORD32 pb;
  774|  14.0k|  WORD16 qtemp1, qtemp2, qtemp3;
  775|  14.0k|  WORD32 temp_1, temp_2, temp3;
  776|  14.0k|  const WORD32 *p_input_real;
  777|  14.0k|  const WORD32 *p_input_imag;
  778|  14.0k|  const WORD32 *hybrid_2_param_28 =
  779|  14.0k|      ia_mps_dec_mps_table_ptr->m1_m2_table_ptr->hybrid_2_param_28;
  780|  14.0k|  const WORD32 *sqrt_tab = ia_mps_dec_mps_table_ptr->common_table_ptr->sqrt_tab;
  781|  14.0k|  WORD32 *smooth_direct_nrg = self->smooth_direct_nrg;
  782|  14.0k|  WORD16 *q_smooth_direct_nrg = self->q_smooth_direct_nrg;
  783|       |
  784|  14.0k|  WORD32 *smooth_reverb_nrg = self->smooth_reverb_nrg;
  785|  14.0k|  WORD16 *q_smooth_reverb_nrg = self->q_smooth_reverb_nrg;
  786|       |
  787|  14.0k|  WORD32 parameter_bands = self->parameter_bands;
  788|       |
  789|  14.0k|  WORD32 *p_output_real, *p_output_imag;
  790|       |
  791|  14.0k|  WORD32 num_bands_2 = self->hybrid_bands;
  792|  14.0k|  WORD32 v1, v2, v3, v4;
  793|  14.0k|  WORD16 one_by_5 = ONE_BY_FIVE_Q16;
  ------------------
  |  |   31|  14.0k|#define ONE_BY_FIVE_Q16 (13107)
  ------------------
  794|       |
  795|  14.0k|  duck_gain = scratch;
  796|  14.0k|  q_duck_gain = (WORD16 *)scratch + IXHEAAC_GET_SIZE_ALIGNED_TYPE(
  ------------------
  |  |   89|  14.0k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  797|  14.0k|                                        PARAMETER_BANDSX2, sizeof(*q_duck_gain), BYTE_ALIGN_8);
  798|       |
  799|  14.0k|  p_input_real = input_real;
  800|  14.0k|  p_input_imag = input_imag;
  801|       |
  802|  14.0k|  p_output_real = output_real;
  803|  14.0k|  p_output_imag = output_imag;
  804|       |
  805|   357k|  for (ts = 0; ts < time_slots; ts++) {
  ------------------
  |  Branch (805:16): [True: 343k, False: 14.0k]
  ------------------
  806|   343k|    memset(direct_nrg, 0, sizeof(direct_nrg));
  807|   343k|    memset(reverb_nrg, 0, sizeof(reverb_nrg));
  808|       |
  809|  13.7M|    for (qs = 0; qs < num_bands_2; qs++) {
  ------------------
  |  Branch (809:18): [True: 13.4M, False: 343k]
  ------------------
  810|  13.4M|      v1 = p_input_real[qs];
  811|  13.4M|      v2 = p_input_imag[qs];
  812|  13.4M|      v3 = p_output_real[qs];
  813|  13.4M|      v4 = p_output_imag[qs];
  814|       |
  815|  13.4M|      pb = hybrid_2_param_28[qs];
  816|  13.4M|      direct_nrg[pb] = ixheaac_add64_sat(direct_nrg[pb], ixheaac_mult32x32in64(v1, v1));
  817|  13.4M|      direct_nrg[pb] = ixheaac_add64_sat(direct_nrg[pb], ixheaac_mult32x32in64(v2, v2));
  818|  13.4M|      reverb_nrg[pb] = ixheaac_add64_sat(reverb_nrg[pb], ixheaac_mult32x32in64(v3, v3));
  819|  13.4M|      reverb_nrg[pb] = ixheaac_add64_sat(reverb_nrg[pb], ixheaac_mult32x32in64(v4, v4));
  820|  13.4M|    }
  821|       |
  822|  9.97M|    for (pb = 0; pb < parameter_bands; pb++) {
  ------------------
  |  Branch (822:18): [True: 9.62M, False: 343k]
  ------------------
  823|  9.62M|      WORD16 qtemp, qtemp_1;
  824|  9.62M|      temp_1 = ixheaacd_mps_narrow(direct_nrg[pb], &qtemp);
  825|  9.62M|      temp_2 = smooth_direct_nrg[pb] << 2;
  826|  9.62M|      temp3 =
  827|  9.62M|          ixheaacd_mps_add32(temp_2, temp_1, &(q_smooth_direct_nrg[pb]), qtemp);
  828|  9.62M|      smooth_direct_nrg[pb] = ixheaacd_mps_mult32x16_shr_16(temp3, one_by_5);
  829|       |
  830|  9.62M|      temp_1 = ixheaacd_mps_narrow(reverb_nrg[pb], &qtemp);
  831|  9.62M|      temp_2 = smooth_reverb_nrg[pb] << 2;
  832|       |
  833|  9.62M|      temp3 =
  834|  9.62M|          ixheaacd_mps_add32(temp_2, temp_1, &(q_smooth_reverb_nrg[pb]), qtemp);
  835|  9.62M|      smooth_reverb_nrg[pb] = ixheaacd_mps_mult32x16_shr_16(temp3, one_by_5);
  836|       |
  837|  9.62M|      qtemp1 = q_smooth_reverb_nrg[pb] - 1;
  838|  9.62M|      temp_1 = (smooth_reverb_nrg[pb] >> 2) * 3;
  839|  9.62M|      qtemp = q_smooth_direct_nrg[pb];
  840|  9.62M|      temp3 = smooth_direct_nrg[pb];
  841|       |
  842|  9.62M|      if (ixheaacd_mps_comp(temp3, temp_1, &qtemp, qtemp1)) {
  ------------------
  |  Branch (842:11): [True: 3.31M, False: 6.31M]
  ------------------
  843|  3.31M|        temp_2 = ixheaacd_mps_div_32(temp3, temp_1, &qtemp2);
  844|  3.31M|        qtemp2 = qtemp2 + qtemp - qtemp1;
  845|  3.31M|        if (temp_1 == 0) {
  ------------------
  |  Branch (845:13): [True: 613k, False: 2.69M]
  ------------------
  846|   613k|          qtemp2 = qtemp;
  847|   613k|        }
  848|  3.31M|        temp3 = qtemp2 > 28 ? MAX_32 : 4 << qtemp2;
  ------------------
  |  |   60|  1.48M|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  |  Branch (848:17): [True: 1.48M, False: 1.82M]
  ------------------
  849|       |
  850|  3.31M|        if (temp_2 > temp3) {
  ------------------
  |  Branch (850:13): [True: 1.62M, False: 1.69M]
  ------------------
  851|  1.62M|          *duck_gain = 32767;
  852|  1.62M|          *q_duck_gain++ = 14;
  853|  1.69M|        } else {
  854|  1.69M|          *duck_gain = ixheaacd_mps_sqrt(temp_2, &qtemp2, sqrt_tab);
  855|  1.69M|          *q_duck_gain++ = qtemp2;
  856|  1.69M|        }
  857|  3.31M|        duck_gain++;
  858|  3.31M|        continue;
  859|  3.31M|      }
  860|       |
  861|  6.31M|      *duck_gain = 16383;
  862|       |
  863|  6.31M|      qtemp = q_smooth_direct_nrg[pb] - 1;
  864|  6.31M|      temp_1 = (smooth_direct_nrg[pb] >> 2) * 3;
  865|       |
  866|  6.31M|      qtemp_1 = q_smooth_reverb_nrg[pb];
  867|  6.31M|      temp_2 = smooth_reverb_nrg[pb];
  868|  6.31M|      if (ixheaacd_mps_comp(temp_2, temp_1, &(qtemp_1), qtemp)) {
  ------------------
  |  Branch (868:11): [True: 1.46M, False: 4.84M]
  ------------------
  869|  1.46M|        temp3 = ixheaacd_mps_div_32(temp_1, temp_2, &qtemp3);
  870|  1.46M|        qtemp3 = qtemp3 + qtemp - qtemp_1;
  871|       |
  872|  1.46M|        *duck_gain = ixheaacd_mps_sqrt(temp3, &qtemp3, sqrt_tab);
  873|  1.46M|        *q_duck_gain = qtemp3;
  874|  1.46M|      }
  875|       |
  876|  6.31M|      duck_gain++;
  877|  6.31M|      q_duck_gain++;
  878|  6.31M|    }
  879|       |
  880|   343k|    duck_gain -= parameter_bands;
  881|   343k|    q_duck_gain -= parameter_bands;
  882|       |
  883|  13.7M|    for (qs = 0; qs < num_bands_2; qs++) {
  ------------------
  |  Branch (883:18): [True: 13.4M, False: 343k]
  ------------------
  884|  13.4M|      pb = hybrid_2_param_28[qs];
  885|  13.4M|      gain = duck_gain[pb];
  886|  13.4M|      if (gain == 16383) {
  ------------------
  |  Branch (886:11): [True: 6.36M, False: 7.04M]
  ------------------
  887|  6.36M|        continue;
  888|  6.36M|      }
  889|  7.04M|      qgain = q_duck_gain[pb];
  890|  7.04M|      p_output_real[qs] =
  891|  7.04M|          ixheaacd_mps_mult32_shr_n(p_output_real[qs], gain, qgain);
  892|  7.04M|      p_output_imag[qs] =
  893|  7.04M|          ixheaacd_mps_mult32_shr_n(p_output_imag[qs], gain, qgain);
  894|  7.04M|    }
  895|       |
  896|   343k|    p_input_real += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|   343k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|   343k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  897|   343k|    p_input_imag += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|   343k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|   343k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  898|       |
  899|   343k|    p_output_real += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|   343k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|   343k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  900|   343k|    p_output_imag += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|   343k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|   343k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  901|   343k|  }
  902|  14.0k|}
ixheaacd_mps_decorr.c:ixheaacd_decorr_filt_apply:
  536|  1.64M|    WORD32 *const p_output_real, WORD32 *const p_output_imag) {
  537|  1.64M|  WORD32 temp_1, temp_2, temp3, temp4;
  538|  1.64M|  WORD32 temp5, temp6, temp7, temp8;
  539|  1.64M|  WORD32 *state_real, *state_imag;
  540|  1.64M|  WORD32 *numerator_real, *denominator_real;
  541|  1.64M|  WORD32 *output_real = p_output_real;
  542|  1.64M|  WORD32 *output_imag = p_output_imag;
  543|       |
  544|  1.64M|  WORD32 common_part;
  545|  1.64M|  WORD32 i;
  546|  1.64M|  WORD32 j;
  547|       |
  548|  1.64M|  common_part = self->num_length;
  549|  1.64M|  state_real = self->state_real;
  550|  1.64M|  state_imag = self->state_imag;
  551|  1.64M|  numerator_real = self->numerator_real;
  552|  1.64M|  denominator_real = self->denominator_real;
  553|       |
  554|  1.64M|  {
  555|  46.9M|    for (i = 0; i < length; i++) {
  ------------------
  |  Branch (555:17): [True: 45.3M, False: 1.64M]
  ------------------
  556|  45.3M|      {
  557|  45.3M|        temp5 = input_real[i];
  558|  45.3M|        temp6 = input_imag[i];
  559|       |
  560|  45.3M|        temp_1 = ixheaacd_mps_mult32_shr_14(temp5, numerator_real[0]);
  561|  45.3M|        temp_2 = ixheaacd_mps_mult32_shr_14(temp6, numerator_real[0]);
  562|       |
  563|  45.3M|        *output_real = ixheaac_add32_sat(temp_1, state_real[0]);
  564|  45.3M|        *output_imag = ixheaac_add32_sat(temp_2, state_imag[0]);
  565|       |
  566|  45.3M|        temp7 = *output_real;
  567|  45.3M|        temp8 = *output_imag;
  568|       |
  569|  45.3M|        output_real += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  45.3M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  45.3M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  570|  45.3M|        output_imag += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  45.3M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  45.3M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  571|   496M|        for (j = 1; j < common_part; j++) {
  ------------------
  |  Branch (571:21): [True: 451M, False: 45.3M]
  ------------------
  572|   451M|          temp_1 = ixheaacd_mps_mult32x16_shr_16(temp5, numerator_real[j]);
  573|   451M|          temp3 = ixheaacd_mps_mult32x16_shr_16(temp6, numerator_real[j]);
  574|   451M|          temp_2 = ixheaacd_mps_mult32x16_shr_16(temp7, denominator_real[j]);
  575|   451M|          temp4 = ixheaacd_mps_mult32x16_shr_16(temp8, denominator_real[j]);
  576|   451M|          temp_1 -= temp_2;
  577|       |
  578|   451M|          state_real[j - 1] = ixheaac_add32_sat(state_real[j], (temp_1 << 2));
  579|   451M|          temp3 -= temp4;
  580|       |
  581|   451M|          state_imag[j - 1] = ixheaac_add32_sat(state_imag[j], (temp3 << 2));
  582|   451M|        }
  583|  45.3M|      }
  584|  45.3M|    }
  585|  1.64M|  }
  586|  1.64M|}

ixheaacd_get_ch_idx:
   41|  1.21M|VOID ixheaacd_get_ch_idx(ia_heaac_mps_state_struct *pstr_mps_state, WORD32 row, WORD32 *index) {
   42|  1.21M|  switch (pstr_mps_state->temp_shape_config) {
   43|  1.21M|    case SHAPE_STP:
  ------------------
  |  |   31|  1.21M|#define SHAPE_STP (1)
  ------------------
  |  Branch (43:5): [True: 1.21M, False: 0]
  ------------------
   44|  1.21M|      *index = pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr->idx_table
   45|  1.21M|                   .row_2_channel_stp[pstr_mps_state->tree_config][row];
   46|  1.21M|      break;
   47|      0|    case SHAPE_GES:
  ------------------
  |  |   32|      0|#define SHAPE_GES (2)
  ------------------
  |  Branch (47:5): [True: 0, False: 1.21M]
  ------------------
   48|      0|      *index = pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr->idx_table
   49|      0|                   .row_2_channel_ges[pstr_mps_state->tree_config][row];
   50|      0|      break;
   51|      0|    default:
  ------------------
  |  Branch (51:5): [True: 0, False: 1.21M]
  ------------------
   52|      0|      break;
   53|  1.21M|  }
   54|       |
   55|  1.21M|  return;
   56|  1.21M|}
ixheaacd_get_res_idx:
   58|  7.71k|WORD32 ixheaacd_get_res_idx(ia_heaac_mps_state_struct *pstr_mps_state, WORD32 row) {
   59|  7.71k|  return pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr->idx_table
   60|  7.71k|      .row_2_residual[pstr_mps_state->tree_config][row];
   61|  7.71k|}

ixheaacd_mps_qmf_hybrid_analysis_init:
  207|  2.82k|VOID ixheaacd_mps_qmf_hybrid_analysis_init(ia_mps_hybrid_filt_struct *handle) {
  208|  2.82k|  memset(handle->lf_buffer, 0,
  209|  2.82k|         QMF_BANDS_TO_HYBRID * BUFFER_LEN_LF_MPS * sizeof(ia_cmplx_w32_struct));
  ------------------
  |  |   64|  2.82k|#define QMF_BANDS_TO_HYBRID (3)
  ------------------
                       QMF_BANDS_TO_HYBRID * BUFFER_LEN_LF_MPS * sizeof(ia_cmplx_w32_struct));
  ------------------
  |  |   51|  2.82k|#define BUFFER_LEN_LF_MPS (QMF_HYBRID_FILT_ORDER - 1 + MAX_TIME_SLOTS)
  |  |  ------------------
  |  |  |  |   50|  2.82k|#define QMF_HYBRID_FILT_ORDER (13)
  |  |  ------------------
  |  |               #define BUFFER_LEN_LF_MPS (QMF_HYBRID_FILT_ORDER - 1 + MAX_TIME_SLOTS)
  |  |  ------------------
  |  |  |  |   48|  2.82k|#define MAX_TIME_SLOTS (72)
  |  |  ------------------
  ------------------
  210|  2.82k|  memset(handle->hf_buffer, 0,
  211|  2.82k|         MAX_NUM_QMF_BANDS_MPS * BUFFER_LEN_HF_MPS * sizeof(ia_cmplx_flt_struct));
  ------------------
  |  |   27|  2.82k|#define MAX_NUM_QMF_BANDS_MPS (128)
  ------------------
                       MAX_NUM_QMF_BANDS_MPS * BUFFER_LEN_HF_MPS * sizeof(ia_cmplx_flt_struct));
  ------------------
  |  |   31|  2.82k|#define BUFFER_LEN_HF_MPS ((QMF_HYBRID_FILT_ORDER - 1) / 2 + MAX_TIME_SLOTS)
  |  |  ------------------
  |  |  |  |   50|  2.82k|#define QMF_HYBRID_FILT_ORDER (13)
  |  |  ------------------
  |  |               #define BUFFER_LEN_HF_MPS ((QMF_HYBRID_FILT_ORDER - 1) / 2 + MAX_TIME_SLOTS)
  |  |  ------------------
  |  |  |  |   48|  2.82k|#define MAX_TIME_SLOTS (72)
  |  |  ------------------
  ------------------
  212|  2.82k|}
ixheaacd_mps_qmf_hybrid_analysis_no_pre_mix:
  217|   101k|    WORD32 num_samples, ia_cmplx_flt_struct v[MAX_TIME_SLOTS][MAX_HYBRID_BANDS_MPS]) {
  218|   101k|  WORD32 lf_samples_shift;
  219|   101k|  WORD32 hf_samples_shift;
  220|   101k|  WORD32 lf_qmf_bands;
  221|   101k|  WORD32 k, n;
  222|       |
  223|   101k|  ia_cmplx_flt_struct scratch[MAX_HYBRID_ONLY_BANDS_PER_QMF][MAX_TIME_SLOTS];
  224|       |
  225|   101k|  lf_samples_shift = BUFFER_LEN_LF_MPS - num_samples;
  ------------------
  |  |   51|   101k|#define BUFFER_LEN_LF_MPS (QMF_HYBRID_FILT_ORDER - 1 + MAX_TIME_SLOTS)
  |  |  ------------------
  |  |  |  |   50|   101k|#define QMF_HYBRID_FILT_ORDER (13)
  |  |  ------------------
  |  |               #define BUFFER_LEN_LF_MPS (QMF_HYBRID_FILT_ORDER - 1 + MAX_TIME_SLOTS)
  |  |  ------------------
  |  |  |  |   48|   101k|#define MAX_TIME_SLOTS (72)
  |  |  ------------------
  ------------------
  226|   101k|  hf_samples_shift = BUFFER_LEN_HF_MPS - num_samples;
  ------------------
  |  |   31|   101k|#define BUFFER_LEN_HF_MPS ((QMF_HYBRID_FILT_ORDER - 1) / 2 + MAX_TIME_SLOTS)
  |  |  ------------------
  |  |  |  |   50|   101k|#define QMF_HYBRID_FILT_ORDER (13)
  |  |  ------------------
  |  |               #define BUFFER_LEN_HF_MPS ((QMF_HYBRID_FILT_ORDER - 1) / 2 + MAX_TIME_SLOTS)
  |  |  ------------------
  |  |  |  |   48|   101k|#define MAX_TIME_SLOTS (72)
  |  |  ------------------
  ------------------
  227|       |
  228|   101k|  lf_qmf_bands = QMF_BANDS_TO_HYBRID;
  ------------------
  |  |   64|   101k|#define QMF_BANDS_TO_HYBRID (3)
  ------------------
  229|       |
  230|   404k|  for (k = 0; k < lf_qmf_bands; k++) {
  ------------------
  |  Branch (230:15): [True: 303k, False: 101k]
  ------------------
  231|   303k|    memmove(&handle->lf_buffer[k][0].re, &handle->lf_buffer[k][num_samples].re,
  232|   303k|            2 * lf_samples_shift * sizeof(FLOAT32));
  233|   303k|  }
  234|       |
  235|   404k|  for (k = 0; k < lf_qmf_bands; k++) {
  ------------------
  |  Branch (235:15): [True: 303k, False: 101k]
  ------------------
  236|   303k|    memcpy(&handle->lf_buffer[k][lf_samples_shift].re, &in_qmf[k][0].re,
  237|   303k|           2 * num_samples * sizeof(FLOAT32));
  238|   303k|  }
  239|       |
  240|  6.27M|  for (k = 0; k < MAX_NUM_QMF_BANDS_SAC / 2 - lf_qmf_bands; k++) {
  ------------------
  |  |   23|  6.27M|#define MAX_NUM_QMF_BANDS_SAC (128)
  ------------------
  |  Branch (240:15): [True: 6.17M, False: 101k]
  ------------------
  241|  6.17M|    memmove(&handle->hf_buffer[k][0].re, &handle->hf_buffer[k][num_samples].re,
  242|  6.17M|            2 * hf_samples_shift * sizeof(FLOAT32));
  243|  6.17M|  }
  244|       |
  245|  3.41M|  for (k = 0; k < num_bands - lf_qmf_bands; k++) {
  ------------------
  |  Branch (245:15): [True: 3.31M, False: 101k]
  ------------------
  246|  3.31M|    memcpy(&handle->hf_buffer[k][hf_samples_shift].re, &in_qmf[k + lf_qmf_bands][0].re,
  247|  3.31M|           2 * num_samples * sizeof(FLOAT32));
  248|  3.31M|  }
  249|       |
  250|   101k|  ixheaacd_mps_hyb_filt_type1(
  251|   101k|      &(handle->lf_buffer[0][lf_samples_shift + 1 - QMF_HYBRID_FILT_ORDER]), scratch, num_samples,
  ------------------
  |  |   50|   101k|#define QMF_HYBRID_FILT_ORDER (13)
  ------------------
  252|   101k|      ixheaacd_ia_mps_hyb_filter_coeff_8);
  253|       |
  254|   303k|  for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (254:15): [True: 202k, False: 101k]
  ------------------
  255|  7.67M|    for (n = 0; n < num_samples; n++) {
  ------------------
  |  Branch (255:17): [True: 7.47M, False: 202k]
  ------------------
  256|  7.47M|      v[n][k].re = scratch[k + 6][n].re;
  257|  7.47M|      v[n][k + 2].re = scratch[k][n].re;
  258|  7.47M|      v[n][k + 4].re = scratch[k + 2][n].re;
  259|  7.47M|      v[n][k + 4].re += scratch[5 - k][n].re;
  260|       |
  261|  7.47M|      v[n][k].im = scratch[k + 6][n].im;
  262|  7.47M|      v[n][k + 2].im = scratch[k][n].im;
  263|  7.47M|      v[n][k + 4].im = scratch[k + 2][n].im;
  264|  7.47M|      v[n][k + 4].im += scratch[5 - k][n].im;
  265|  7.47M|    }
  266|   202k|  }
  267|       |
  268|   101k|  ixheaacd_mps_hyb_filt_type2(
  269|   101k|      &(handle->lf_buffer[1][lf_samples_shift + 1 - QMF_HYBRID_FILT_ORDER]), scratch, num_samples,
  ------------------
  |  |   50|   101k|#define QMF_HYBRID_FILT_ORDER (13)
  ------------------
  270|   101k|      ixheaacd_mps_hyb_filter_coeff_2);
  271|       |
  272|   303k|  for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (272:15): [True: 202k, False: 101k]
  ------------------
  273|  7.67M|    for (n = 0; n < num_samples; n++) {
  ------------------
  |  Branch (273:17): [True: 7.47M, False: 202k]
  ------------------
  274|  7.47M|      v[n][k + 6].re = scratch[1 - k][n].re;
  275|  7.47M|      v[n][k + 6].im = scratch[1 - k][n].im;
  276|  7.47M|    }
  277|   202k|  }
  278|       |
  279|   101k|  ixheaacd_mps_hyb_filt_type2(
  280|   101k|      &(handle->lf_buffer[2][lf_samples_shift + 1 - QMF_HYBRID_FILT_ORDER]), scratch, num_samples,
  ------------------
  |  |   50|   101k|#define QMF_HYBRID_FILT_ORDER (13)
  ------------------
  281|   101k|      ixheaacd_mps_hyb_filter_coeff_2);
  282|       |
  283|   303k|  for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (283:15): [True: 202k, False: 101k]
  ------------------
  284|  7.67M|    for (n = 0; n < num_samples; n++) {
  ------------------
  |  Branch (284:17): [True: 7.47M, False: 202k]
  ------------------
  285|  7.47M|      v[n][k + 8].re = scratch[k][n].re;
  286|  7.47M|      v[n][k + 8].im = scratch[k][n].im;
  287|  7.47M|    }
  288|   202k|  }
  289|       |
  290|  3.41M|  for (k = 0; k < num_bands - lf_qmf_bands; k++) {
  ------------------
  |  Branch (290:15): [True: 3.31M, False: 101k]
  ------------------
  291|   117M|    for (n = 0; n < num_samples; n++) {
  ------------------
  |  Branch (291:17): [True: 114M, False: 3.31M]
  ------------------
  292|   114M|      v[n][k + 10].re = (handle->hf_buffer[k][n + hf_samples_shift].re);
  293|   114M|      v[n][k + 10].im = (handle->hf_buffer[k][n + hf_samples_shift].im);
  294|   114M|    }
  295|  3.31M|  }
  296|   101k|}
ixheaacd_mps_qmf_hybrid_analysis:
  301|  22.3k|    WORD32 num_samples, ia_cmplx_flt_struct hyb[MAX_HYBRID_BANDS_MPS][MAX_TIME_SLOTS]) {
  302|  22.3k|  WORD32 lf_samples_shift;
  303|  22.3k|  WORD32 hf_samples_shift;
  304|  22.3k|  WORD32 lf_qmf_bands;
  305|  22.3k|  WORD32 k, n;
  306|       |
  307|  22.3k|  ia_cmplx_flt_struct scratch[MAX_HYBRID_ONLY_BANDS_PER_QMF][MAX_TIME_SLOTS];
  308|       |
  309|  22.3k|  lf_samples_shift = BUFFER_LEN_LF_MPS - num_samples;
  ------------------
  |  |   51|  22.3k|#define BUFFER_LEN_LF_MPS (QMF_HYBRID_FILT_ORDER - 1 + MAX_TIME_SLOTS)
  |  |  ------------------
  |  |  |  |   50|  22.3k|#define QMF_HYBRID_FILT_ORDER (13)
  |  |  ------------------
  |  |               #define BUFFER_LEN_LF_MPS (QMF_HYBRID_FILT_ORDER - 1 + MAX_TIME_SLOTS)
  |  |  ------------------
  |  |  |  |   48|  22.3k|#define MAX_TIME_SLOTS (72)
  |  |  ------------------
  ------------------
  310|  22.3k|  hf_samples_shift = BUFFER_LEN_HF_MPS - num_samples;
  ------------------
  |  |   31|  22.3k|#define BUFFER_LEN_HF_MPS ((QMF_HYBRID_FILT_ORDER - 1) / 2 + MAX_TIME_SLOTS)
  |  |  ------------------
  |  |  |  |   50|  22.3k|#define QMF_HYBRID_FILT_ORDER (13)
  |  |  ------------------
  |  |               #define BUFFER_LEN_HF_MPS ((QMF_HYBRID_FILT_ORDER - 1) / 2 + MAX_TIME_SLOTS)
  |  |  ------------------
  |  |  |  |   48|  22.3k|#define MAX_TIME_SLOTS (72)
  |  |  ------------------
  ------------------
  311|       |
  312|  22.3k|  lf_qmf_bands = QMF_BANDS_TO_HYBRID;
  ------------------
  |  |   64|  22.3k|#define QMF_BANDS_TO_HYBRID (3)
  ------------------
  313|       |
  314|  89.2k|  for (k = 0; k < lf_qmf_bands; k++) {
  ------------------
  |  Branch (314:15): [True: 66.9k, False: 22.3k]
  ------------------
  315|  66.9k|    memmove(&handle->lf_buffer[k][0].re, &handle->lf_buffer[k][num_samples].re,
  316|  66.9k|            2 * lf_samples_shift * sizeof(FLOAT32));
  317|  66.9k|  }
  318|       |
  319|  89.2k|  for (k = 0; k < lf_qmf_bands; k++) {
  ------------------
  |  Branch (319:15): [True: 66.9k, False: 22.3k]
  ------------------
  320|  66.9k|    memcpy(&handle->lf_buffer[k][lf_samples_shift].re, &in_qmf[k][0].re,
  321|  66.9k|           2 * num_samples * sizeof(FLOAT32));
  322|  66.9k|  }
  323|       |
  324|  1.38M|  for (k = 0; k < MAX_NUM_QMF_BANDS_SAC / 2 - lf_qmf_bands; k++) {
  ------------------
  |  |   23|  1.38M|#define MAX_NUM_QMF_BANDS_SAC (128)
  ------------------
  |  Branch (324:15): [True: 1.36M, False: 22.3k]
  ------------------
  325|  1.36M|    memmove(&handle->hf_buffer[k][0].re, &handle->hf_buffer[k][num_samples].re,
  326|  1.36M|            2 * hf_samples_shift * sizeof(FLOAT32));
  327|  1.36M|  }
  328|       |
  329|   985k|  for (k = 0; k < num_bands - lf_qmf_bands; k++) {
  ------------------
  |  Branch (329:15): [True: 963k, False: 22.3k]
  ------------------
  330|   963k|    memcpy(&handle->hf_buffer[k][hf_samples_shift].re, &in_qmf[k + lf_qmf_bands][0].re,
  331|   963k|           2 * num_samples * sizeof(FLOAT32));
  332|   963k|  }
  333|       |
  334|  22.3k|  ixheaacd_mps_hyb_filt_type1(
  335|  22.3k|      &(handle->lf_buffer[0][lf_samples_shift + 1 - QMF_HYBRID_FILT_ORDER]), scratch, num_samples,
  ------------------
  |  |   50|  22.3k|#define QMF_HYBRID_FILT_ORDER (13)
  ------------------
  336|  22.3k|      ixheaacd_ia_mps_hyb_filter_coeff_8);
  337|       |
  338|  66.9k|  for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (338:15): [True: 44.6k, False: 22.3k]
  ------------------
  339|  2.27M|    for (n = 0; n < num_samples; n++) {
  ------------------
  |  Branch (339:17): [True: 2.23M, False: 44.6k]
  ------------------
  340|  2.23M|      hyb[k][n].re = scratch[k + 6][n].re;
  341|  2.23M|      hyb[k + 2][n].re = scratch[k][n].re;
  342|  2.23M|      hyb[k + 4][n].re = scratch[k + 2][n].re;
  343|  2.23M|      hyb[k + 4][n].re += scratch[5 - k][n].re;
  344|       |
  345|  2.23M|      hyb[k][n].im = scratch[k + 6][n].im;
  346|  2.23M|      hyb[k + 2][n].im = scratch[k][n].im;
  347|  2.23M|      hyb[k + 4][n].im = scratch[k + 2][n].im;
  348|  2.23M|      hyb[k + 4][n].im += scratch[5 - k][n].im;
  349|  2.23M|    }
  350|  44.6k|  }
  351|       |
  352|  22.3k|  ixheaacd_mps_hyb_filt_type2(
  353|  22.3k|      &(handle->lf_buffer[1][lf_samples_shift + 1 - QMF_HYBRID_FILT_ORDER]), scratch, num_samples,
  ------------------
  |  |   50|  22.3k|#define QMF_HYBRID_FILT_ORDER (13)
  ------------------
  354|  22.3k|      ixheaacd_mps_hyb_filter_coeff_2);
  355|       |
  356|  66.9k|  for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (356:15): [True: 44.6k, False: 22.3k]
  ------------------
  357|  2.27M|    for (n = 0; n < num_samples; n++) {
  ------------------
  |  Branch (357:17): [True: 2.23M, False: 44.6k]
  ------------------
  358|  2.23M|      hyb[k + 6][n].re = scratch[1 - k][n].re;
  359|  2.23M|      hyb[k + 6][n].im = scratch[1 - k][n].im;
  360|  2.23M|    }
  361|  44.6k|  }
  362|       |
  363|  22.3k|  ixheaacd_mps_hyb_filt_type2(
  364|  22.3k|      &(handle->lf_buffer[2][lf_samples_shift + 1 - QMF_HYBRID_FILT_ORDER]), scratch, num_samples,
  ------------------
  |  |   50|  22.3k|#define QMF_HYBRID_FILT_ORDER (13)
  ------------------
  365|  22.3k|      ixheaacd_mps_hyb_filter_coeff_2);
  366|       |
  367|  66.9k|  for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (367:15): [True: 44.6k, False: 22.3k]
  ------------------
  368|  2.27M|    for (n = 0; n < num_samples; n++) {
  ------------------
  |  Branch (368:17): [True: 2.23M, False: 44.6k]
  ------------------
  369|  2.23M|      hyb[k + 8][n].re = scratch[k][n].re;
  370|  2.23M|      hyb[k + 8][n].im = scratch[k][n].im;
  371|  2.23M|    }
  372|  44.6k|  }
  373|       |
  374|   985k|  for (k = 0; k < num_bands - lf_qmf_bands; k++) {
  ------------------
  |  Branch (374:15): [True: 963k, False: 22.3k]
  ------------------
  375|   963k|    memcpy(&hyb[k + 10][0].re, &handle->hf_buffer[k][hf_samples_shift].re,
  376|   963k|           2 * num_samples * sizeof(FLOAT32));
  377|   963k|  }
  378|  22.3k|}
ixheaacd_mps_qmf_hybrid_synthesis:
  382|   154k|    WORD32 num_samples, ia_cmplx_flt_struct in_qmf[MAX_TIME_SLOTS][MAX_NUM_QMF_BANDS_MPS]) {
  383|   154k|  WORD32 k, n;
  384|       |
  385|  6.02M|  for (n = 0; n < num_samples; n++) {
  ------------------
  |  Branch (385:15): [True: 5.86M, False: 154k]
  ------------------
  386|  5.86M|    in_qmf[n][0].re = hyb[n][0].re;
  387|  5.86M|    in_qmf[n][0].im = hyb[n][0].im;
  388|       |
  389|  35.2M|    for (k = 1; k < 6; k++) {
  ------------------
  |  Branch (389:17): [True: 29.3M, False: 5.86M]
  ------------------
  390|  29.3M|      in_qmf[n][0].re += hyb[n][k].re;
  391|  29.3M|      in_qmf[n][0].im += hyb[n][k].im;
  392|  29.3M|    }
  393|       |
  394|  5.86M|    in_qmf[n][1].re = hyb[n][6].re + hyb[n][7].re;
  395|  5.86M|    in_qmf[n][1].im = hyb[n][6].im + hyb[n][7].im;
  396|       |
  397|  5.86M|    in_qmf[n][2].re = hyb[n][8].re + hyb[n][9].re;
  398|  5.86M|    in_qmf[n][2].im = hyb[n][8].im + hyb[n][9].im;
  399|       |
  400|  5.86M|    memcpy(&in_qmf[n][3].re, &hyb[n][10].re, 2 * (num_bands - 3) * sizeof(FLOAT32));
  401|  5.86M|  }
  402|   154k|}
ixheaacd_mps_fft:
  405|  1.88M|                      const ia_mps_dec_hybrid_tables_struct *hyb_tab) {
  406|  1.88M|  LOOPINDEX block_per_stage, stage_num, inner;
  407|  1.88M|  const WORD32 *cosine_array = hyb_tab->cosine_array;
  408|  1.88M|  const WORD32 *sine_array = hyb_tab->sine_array;
  409|  1.88M|  WORD32 index_1, index_2, index, tab_modifier;
  410|  1.88M|  WORD32 len, increment, i;
  411|       |
  412|  1.88M|  WORD32 cos_val;
  413|  1.88M|  WORD32 sin_val;
  414|       |
  415|  1.88M|  WORD16 index1;
  416|  1.88M|  WORD32 re_temp;
  417|  1.88M|  WORD32 im_temp;
  418|  1.88M|  WORD32 *out1_w32, *out2_w32;
  419|       |
  420|  1.88M|  len = idx;
  421|  1.88M|  i = 1;
  422|  1.88M|  increment = 0;
  423|       |
  424|  1.88M|  len = len >> 1;
  425|  1.88M|  index_1 = 0;
  426|  1.88M|  increment += 1;
  427|       |
  428|  1.88M|  index = 11 - increment;
  429|  1.88M|  tab_modifier = ixheaac_shl32(1, index);
  430|       |
  431|  1.88M|  out1_w32 = (WORD32 *)&out[index_1];
  432|  1.88M|  out2_w32 = (WORD32 *)&out[index_1 + 1];
  433|       |
  434|  9.41M|  for (block_per_stage = 0; block_per_stage < len; block_per_stage++) {
  ------------------
  |  Branch (434:29): [True: 7.52M, False: 1.88M]
  ------------------
  435|  7.52M|    re_temp = out2_w32[0];
  436|  7.52M|    im_temp = out2_w32[1];
  437|       |
  438|  7.52M|    out2_w32[0] = ixheaac_sub32_sat(out1_w32[0], re_temp);
  439|  7.52M|    out2_w32[1] = ixheaac_sub32_sat(out1_w32[1], im_temp);
  440|       |
  441|  7.52M|    out1_w32[0] = ixheaac_add32_sat(re_temp, out1_w32[0]);
  442|  7.52M|    out1_w32[1] = ixheaac_add32_sat(im_temp, out1_w32[1]);
  443|       |
  444|  7.52M|    out1_w32 += 4;
  445|  7.52M|    out2_w32 += 4;
  446|  7.52M|  }
  447|       |
  448|  1.88M|  i <<= 1;
  449|       |
  450|  5.64M|  for (stage_num = 1; stage_num < nob; stage_num++) {
  ------------------
  |  Branch (450:23): [True: 3.76M, False: 1.88M]
  ------------------
  451|  3.76M|    len = len >> 1;
  452|  3.76M|    index_1 = 0;
  453|  3.76M|    increment += 1;
  454|       |
  455|  3.76M|    index = 11 - increment;
  456|  3.76M|    tab_modifier = ixheaac_shl32(1, index);
  457|       |
  458|  9.41M|    for (block_per_stage = 0; block_per_stage < len; block_per_stage++) {
  ------------------
  |  Branch (458:31): [True: 5.64M, False: 3.76M]
  ------------------
  459|  5.64M|      index_2 = index_1 + i;
  460|       |
  461|  5.64M|      out1_w32 = (WORD32 *)&out[index_1];
  462|  5.64M|      out2_w32 = (WORD32 *)&out[index_2];
  463|       |
  464|  5.64M|      re_temp = out1_w32[0];
  465|  5.64M|      im_temp = out1_w32[1];
  466|       |
  467|  5.64M|      out1_w32[0] = ((WORD64)re_temp + (WORD64)out2_w32[0]) >> 1;
  468|  5.64M|      out1_w32[1] = ((WORD64)im_temp + (WORD64)out2_w32[1]) >> 1;
  469|       |
  470|  5.64M|      out2_w32[0] = ((WORD64)re_temp - (WORD64)out2_w32[0]) >> 1;
  471|  5.64M|      out2_w32[1] = ((WORD64)im_temp - (WORD64)out2_w32[1]) >> 1;
  472|       |
  473|  5.64M|      index1 = tab_modifier;
  474|       |
  475|  5.64M|      out1_w32 += 2;
  476|  5.64M|      out2_w32 += 2;
  477|       |
  478|  15.0M|      for (inner = 0; inner < ((i - 1) << 1); inner += 2) {
  ------------------
  |  Branch (478:23): [True: 9.41M, False: 5.64M]
  ------------------
  479|  9.41M|        cos_val = cosine_array[index1];
  480|  9.41M|        sin_val = sine_array[index1];
  481|       |
  482|  9.41M|        re_temp = ixheaacd_mps_mult32x16_shr_16(out2_w32[inner], cos_val) +
  483|  9.41M|                  ixheaacd_mps_mult32x16_shr_16(out2_w32[inner + 1], sin_val);
  484|  9.41M|        im_temp = ixheaacd_mps_mult32x16_shr_16(out2_w32[inner + 1], cos_val) -
  485|  9.41M|                  ixheaacd_mps_mult32x16_shr_16(out2_w32[inner], sin_val);
  486|       |
  487|  9.41M|        out1_w32[inner] >>= 1;
  488|  9.41M|        out1_w32[inner + 1] >>= 1;
  489|       |
  490|  9.41M|        out2_w32[inner] = ixheaac_sub32_sat(out1_w32[inner], re_temp);
  491|  9.41M|        out2_w32[inner + 1] = ixheaac_sub32_sat(out1_w32[inner + 1], im_temp);
  492|       |
  493|  9.41M|        out1_w32[inner] = ixheaac_add32_sat(out1_w32[inner], re_temp);
  494|  9.41M|        out1_w32[inner + 1] = ixheaac_add32_sat(out1_w32[inner + 1], im_temp);
  495|       |
  496|  9.41M|        index1 += tab_modifier;
  497|  9.41M|      }
  498|       |
  499|  5.64M|      index_1 += ixheaac_shl32(1, increment);
  500|  5.64M|    }
  501|  3.76M|    i <<= 1;
  502|  3.76M|  }
  503|  1.88M|}
ixheaacd_8ch_filtering:
  507|  1.88M|                            const ia_mps_dec_hybrid_tables_struct *hyb_tab) {
  508|  1.88M|  WORD32 n;
  509|  1.88M|  WORD32 real, imag;
  510|  1.88M|  const WORD16 tcos = COS_PI_BY_8;
  ------------------
  |  |  213|  1.88M|#define COS_PI_BY_8 (0x7642)
  ------------------
  511|  1.88M|  const WORD16 tsin = SIN_PI_BY_8;
  ------------------
  |  |  214|  1.88M|#define SIN_PI_BY_8 (0x30fc)
  ------------------
  512|  1.88M|  WORD32 cum[16];
  513|  1.88M|  WORD32 *p_complex;
  514|  1.88M|  const WORD16 *p8_13 = hyb_tab->p8_13;
  515|       |
  516|  1.88M|  real = ixheaac_shl32((ixheaac_mult32x16in32(p_qmf_real[4], p8_13[4]) +
  517|  1.88M|                         ixheaac_mult32x16in32(p_qmf_real[12], p8_13[12])),
  518|  1.88M|                        1);
  519|  1.88M|  imag = ixheaac_shl32((ixheaac_mult32x16in32(p_qmf_imag[4], p8_13[4]) +
  520|  1.88M|                         ixheaac_mult32x16in32(p_qmf_imag[12], p8_13[12])),
  521|  1.88M|                        1);
  522|       |
  523|  1.88M|  cum[5] = ixheaac_sub32_sat(imag, real);
  524|  1.88M|  cum[4] = -ixheaac_add32_sat(imag, real);
  525|       |
  526|  1.88M|  real = ixheaac_shl32((ixheaac_mult32x16in32(p_qmf_real[3], p8_13[3]) +
  527|  1.88M|                         ixheaac_mult32x16in32(p_qmf_real[11], p8_13[11])),
  528|  1.88M|                        1);
  529|  1.88M|  imag = ixheaac_shl32((ixheaac_mult32x16in32(p_qmf_imag[3], p8_13[3]) +
  530|  1.88M|                         ixheaac_mult32x16in32(p_qmf_imag[11], p8_13[11])),
  531|  1.88M|                        1);
  532|       |
  533|  1.88M|  cum[13] = ixheaac_shl32(
  534|  1.88M|      (ixheaac_mult32x16in32(imag, tcos) - ixheaac_mult32x16in32(real, tsin)), 1);
  535|  1.88M|  cum[12] = ixheaac_shl32(
  536|  1.88M|      -((ixheaac_mult32x16in32(imag, tsin) + ixheaac_mult32x16in32(real, tcos))), 1);
  537|       |
  538|  1.88M|  cum[2] = ixheaac_shl32((ixheaac_mult32x16in32(p_qmf_real[2], p8_13[10]) -
  539|  1.88M|                          ixheaac_mult32x16in32(p_qmf_real[10], p8_13[10])),
  540|  1.88M|                         1);
  541|  1.88M|  cum[3] = ixheaac_shl32((ixheaac_mult32x16in32(p_qmf_imag[2], p8_13[2]) -
  542|  1.88M|                          ixheaac_mult32x16in32(p_qmf_imag[10], p8_13[2])),
  543|  1.88M|                         1);
  544|  1.88M|  real = ixheaac_shl32((ixheaac_mult32x16in32(p_qmf_real[1], p8_13[1]) +
  545|  1.88M|                         ixheaac_mult32x16in32(p_qmf_real[9], p8_13[9])),
  546|  1.88M|                        1);
  547|  1.88M|  imag = ixheaac_shl32((ixheaac_mult32x16in32(p_qmf_imag[1], p8_13[1]) +
  548|  1.88M|                         ixheaac_mult32x16in32(p_qmf_imag[9], p8_13[9])),
  549|  1.88M|                        1);
  550|       |
  551|  1.88M|  cum[11] = ixheaac_shl32(
  552|  1.88M|      (ixheaac_mult32x16in32(imag, tcos) + ixheaac_mult32x16in32(real, tsin)), 1);
  553|  1.88M|  cum[10] = ixheaac_shl32(
  554|  1.88M|      (ixheaac_mult32x16in32(imag, tsin) - ixheaac_mult32x16in32(real, tcos)), 1);
  555|       |
  556|  1.88M|  real = ixheaac_shl32((ixheaac_mult32x16in32(p_qmf_real[0], p8_13[0]) +
  557|  1.88M|                         ixheaac_mult32x16in32(p_qmf_real[8], p8_13[8])),
  558|  1.88M|                        1);
  559|  1.88M|  imag = ixheaac_shl32((ixheaac_mult32x16in32(p_qmf_imag[0], p8_13[0]) +
  560|  1.88M|                         ixheaac_mult32x16in32(p_qmf_imag[8], p8_13[8])),
  561|  1.88M|                        1);
  562|       |
  563|  1.88M|  cum[7] = ixheaac_add32_sat(imag, real);
  564|  1.88M|  cum[6] = ixheaac_sub32_sat(imag, real);
  565|       |
  566|  1.88M|  cum[15] = ixheaac_shl32((ixheaac_mult32x16in32(p_qmf_imag[7], p8_13[14]) +
  567|  1.88M|                            ixheaac_mult32x16in32(p_qmf_real[7], p8_13[13])),
  568|  1.88M|                           1);
  569|  1.88M|  cum[14] = ixheaac_shl32((ixheaac_mult32x16in32(p_qmf_imag[7], p8_13[13]) -
  570|  1.88M|                            ixheaac_mult32x16in32(p_qmf_real[7], p8_13[14])),
  571|  1.88M|                           1);
  572|       |
  573|  1.88M|  cum[1] = ixheaac_shl32(
  574|  1.88M|      ixheaac_mult32x16in32(p_qmf_real[HYBRID_FILTER_DELAY], p8_13[HYBRID_FILTER_DELAY]), 1);
  ------------------
  |  |   24|  1.88M|#define HYBRID_FILTER_DELAY 6
  ------------------
                    ixheaac_mult32x16in32(p_qmf_real[HYBRID_FILTER_DELAY], p8_13[HYBRID_FILTER_DELAY]), 1);
  ------------------
  |  |   24|  1.88M|#define HYBRID_FILTER_DELAY 6
  ------------------
  575|  1.88M|  cum[0] = ixheaac_shl32(
  576|  1.88M|      ixheaac_mult32x16in32(p_qmf_imag[HYBRID_FILTER_DELAY], p8_13[HYBRID_FILTER_DELAY]), 1);
  ------------------
  |  |   24|  1.88M|#define HYBRID_FILTER_DELAY 6
  ------------------
                    ixheaac_mult32x16in32(p_qmf_imag[HYBRID_FILTER_DELAY], p8_13[HYBRID_FILTER_DELAY]), 1);
  ------------------
  |  |   24|  1.88M|#define HYBRID_FILTER_DELAY 6
  ------------------
  577|       |
  578|  1.88M|  cum[9] = ixheaac_shl32((ixheaac_mult32x16in32(p_qmf_real[5], p8_13[13]) -
  579|  1.88M|                           ixheaac_mult32x16in32(p_qmf_imag[5], p8_13[14])),
  580|  1.88M|                          1);
  581|  1.88M|  cum[8] = ixheaac_shl32((ixheaac_mult32x16in32(p_qmf_real[5], p8_13[14]) +
  582|  1.88M|                           ixheaac_mult32x16in32(p_qmf_imag[5], p8_13[13])),
  583|  1.88M|                          1);
  584|       |
  585|  1.88M|  ixheaacd_mps_fft((complex *)cum, 8, 3, hyb_tab);
  586|       |
  587|  1.88M|  p_complex = cum;
  588|       |
  589|  16.9M|  for (n = 0; n < 8; n++) {
  ------------------
  |  Branch (589:15): [True: 15.0M, False: 1.88M]
  ------------------
  590|  15.0M|    m_hybrid_imag[n] = *p_complex++;
  591|  15.0M|    m_hybrid_real[n] = *p_complex++;
  592|  15.0M|  }
  593|  1.88M|}
ixheaacd_2ch_filtering:
  596|  7.52M|                            const ia_mps_dec_hybrid_tables_struct *hyb_tab_ptr) {
  597|  7.52M|  WORD32 cum0, cum1;
  598|  7.52M|  WORD64 temp;
  599|  7.52M|  const WORD16 *p2_6 = hyb_tab_ptr->p2_6;
  600|       |
  601|  7.52M|  cum0 = (WORD32)p_qmf[HYBRID_FILTER_DELAY] >> 1;
  ------------------
  |  |   24|  7.52M|#define HYBRID_FILTER_DELAY 6
  ------------------
  602|       |
  603|  7.52M|  temp = (WORD64)((WORD64)p2_6[0] * ((WORD64)p_qmf[1] + (WORD64)p_qmf[11]) +
  604|  7.52M|                  (WORD64)p2_6[1] * ((WORD64)p_qmf[3] + (WORD64)p_qmf[9]));
  605|  7.52M|  temp += (WORD64)p2_6[2] * ((WORD64)p_qmf[5] + (WORD64)p_qmf[7]);
  606|  7.52M|  cum1 = (WORD32)(temp >> 16);
  607|       |
  608|  7.52M|  m_hybrid[0] = ixheaac_add32_sat(cum0, cum1);
  609|  7.52M|  m_hybrid[1] = ixheaac_sub32_sat(cum0, cum1);
  610|  7.52M|}
ixheaacd_get_qmf_sb:
  614|  2.50M|    const ia_mps_dec_mdct2qmf_table_struct *ixheaacd_mps_dec_mdct2qmf_table) {
  615|  2.50M|  return ixheaacd_mps_dec_mdct2qmf_table->hybrid_2_qmf[hybrid_subband];
  616|  2.50M|}
ixheaacd_init_ana_hyb_filt_bank:
  618|  11.2k|VOID ixheaacd_init_ana_hyb_filt_bank(ia_mps_dec_thyb_filter_state_struct *hyb_state) {
  619|  11.2k|  WORD32 k, n;
  620|       |
  621|  44.8k|  for (k = 0; k < QMF_BANDS_TO_HYBRID; k++) {
  ------------------
  |  |   64|  44.8k|#define QMF_BANDS_TO_HYBRID (3)
  ------------------
  |  Branch (621:15): [True: 33.6k, False: 11.2k]
  ------------------
  622|  2.86M|    for (n = 0; n < PROTO_LEN - 1 + MAX_TIME_SLOTS; n++) {
  ------------------
  |  |   80|  2.86M|#define PROTO_LEN (13)
  ------------------
                  for (n = 0; n < PROTO_LEN - 1 + MAX_TIME_SLOTS; n++) {
  ------------------
  |  |   48|  2.86M|#define MAX_TIME_SLOTS (72)
  ------------------
  |  Branch (622:17): [True: 2.82M, False: 33.6k]
  ------------------
  623|  2.82M|      hyb_state->buffer_lf_real[k][n] = 0;
  624|  2.82M|      hyb_state->buffer_lf_imag[k][n] = 0;
  625|  2.82M|      hyb_state->qmf_lf_real[k][n] = 0;
  626|  2.82M|      hyb_state->qmf_lf_imag[k][n] = 0;
  627|  2.82M|    }
  628|  33.6k|  }
  629|       |
  630|   729k|  for (k = 0; k < MAX_NUM_QMF_BANDS; k++) {
  ------------------
  |  |   62|   729k|#define MAX_NUM_QMF_BANDS (64)
  ------------------
  |  Branch (630:15): [True: 718k, False: 11.2k]
  ------------------
  631|  56.7M|    for (n = 0; n < ((PROTO_LEN - 1) >> 1) + MAX_TIME_SLOTS; n++) {
  ------------------
  |  |   80|  56.7M|#define PROTO_LEN (13)
  ------------------
                  for (n = 0; n < ((PROTO_LEN - 1) >> 1) + MAX_TIME_SLOTS; n++) {
  ------------------
  |  |   48|  56.7M|#define MAX_TIME_SLOTS (72)
  ------------------
  |  Branch (631:17): [True: 56.0M, False: 718k]
  ------------------
  632|  56.0M|      hyb_state->buffer_hf_real[k][n] = 0;
  633|  56.0M|      hyb_state->buffer_hf_imag[k][n] = 0;
  634|  56.0M|    }
  635|   718k|  }
  636|  11.2k|}
ixheaacd_apply_ana_hyb_filt_bank_create_x:
  641|  66.5k|    const ia_mps_dec_hybrid_tables_struct *hyb_tab_ptr) {
  642|  66.5k|  WORD32 nr_samples_shift_lf;
  643|  66.5k|  WORD32 nr_qmf_bands_lf;
  644|  66.5k|  WORD32 k, n;
  645|  66.5k|  WORD32 time_slot;
  646|       |
  647|  66.5k|  WORD32 proto_len = (PROTO_LEN - 1) >> 1;
  ------------------
  |  |   80|  66.5k|#define PROTO_LEN (13)
  ------------------
  648|  66.5k|  WORD32 val = nr_samples - proto_len;
  649|  66.5k|  WORD32 val_xhb = val * MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  66.5k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  66.5k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  650|  66.5k|  WORD32 loop_cnt, loop_cnt_x4;
  651|  66.5k|  WORD32 *p_qmf_real, *p_qmf_re, *p_qmf_imag, *p_qmf_im;
  652|       |
  653|  66.5k|  WORD32 m_temp_output_real[MAX_HYBRID_ONLY_BANDS_PER_QMF];
  654|  66.5k|  WORD32 m_temp_output_imag[MAX_HYBRID_ONLY_BANDS_PER_QMF];
  655|       |
  656|  66.5k|  WORD32 *p_hybrid_real = m_hybrid_real + 10;
  657|  66.5k|  WORD32 *p_hybrid_imag = m_hybrid_imag + 10;
  658|       |
  659|  66.5k|  WORD32 *p_hybrid_re, *p_hybrid_im;
  660|       |
  661|  66.5k|  nr_samples_shift_lf = BUFFER_LEN_LF - nr_samples;
  ------------------
  |  |   81|  66.5k|#define BUFFER_LEN_LF (PROTO_LEN - 1 + MAX_TIME_SLOTS)
  |  |  ------------------
  |  |  |  |   80|  66.5k|#define PROTO_LEN (13)
  |  |  ------------------
  |  |               #define BUFFER_LEN_LF (PROTO_LEN - 1 + MAX_TIME_SLOTS)
  |  |  ------------------
  |  |  |  |   48|  66.5k|#define MAX_TIME_SLOTS (72)
  |  |  ------------------
  ------------------
  662|       |
  663|  66.5k|  nr_qmf_bands_lf = QMF_BANDS_TO_HYBRID;
  ------------------
  |  |   64|  66.5k|#define QMF_BANDS_TO_HYBRID (3)
  ------------------
  664|  66.5k|  loop_cnt = nr_bands - nr_qmf_bands_lf;
  665|  66.5k|  loop_cnt_x4 = (loop_cnt << 2);
  666|       |
  667|   266k|  for (k = 0; k < nr_qmf_bands_lf; k++) {
  ------------------
  |  Branch (667:15): [True: 199k, False: 66.5k]
  ------------------
  668|  11.3M|    for (n = 0; n < nr_samples_shift_lf; n++) {
  ------------------
  |  Branch (668:17): [True: 11.1M, False: 199k]
  ------------------
  669|  11.1M|      hyb_state->buffer_lf_real[k][n] = hyb_state->buffer_lf_real[k][n + nr_samples];
  670|  11.1M|      hyb_state->buffer_lf_imag[k][n] = hyb_state->buffer_lf_imag[k][n + nr_samples];
  671|       |
  672|  11.1M|      hyb_state->qmf_lf_real[k][n] = hyb_state->qmf_lf_real[k][n + nr_samples];
  673|  11.1M|      hyb_state->qmf_lf_imag[k][n] = hyb_state->qmf_lf_imag[k][n + nr_samples];
  674|  11.1M|    }
  675|   199k|  }
  676|       |
  677|  66.5k|  p_qmf_real = m_qmf_real;
  678|  66.5k|  p_qmf_imag = m_qmf_imag;
  679|   266k|  for (k = 0; k < nr_qmf_bands_lf; k++) {
  ------------------
  |  Branch (679:15): [True: 199k, False: 66.5k]
  ------------------
  680|   199k|    p_qmf_re = p_qmf_real;
  681|   199k|    p_qmf_im = p_qmf_imag;
  682|       |
  683|  5.79M|    for (n = 0; n < nr_samples; n++) {
  ------------------
  |  Branch (683:17): [True: 5.59M, False: 199k]
  ------------------
  684|  5.59M|      hyb_state->buffer_lf_real[k][n + nr_samples_shift_lf] = *p_qmf_re;
  685|  5.59M|      hyb_state->buffer_lf_imag[k][n + nr_samples_shift_lf] = *p_qmf_im;
  686|       |
  687|  5.59M|      hyb_state->qmf_lf_imag[k][n + nr_samples_shift_lf] = *p_qmf_im;
  688|  5.59M|      hyb_state->qmf_lf_real[k][n + nr_samples_shift_lf] = *p_qmf_re;
  689|       |
  690|  5.59M|      p_qmf_re += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  5.59M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  5.59M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  691|  5.59M|      p_qmf_im += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  5.59M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  5.59M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  692|  5.59M|    }
  693|       |
  694|   199k|    p_qmf_real++;
  695|   199k|    p_qmf_imag++;
  696|   199k|  }
  697|       |
  698|  66.5k|  p_qmf_real = m_qmf_real + nr_qmf_bands_lf + val_xhb;
  699|  66.5k|  p_qmf_imag = m_qmf_imag + nr_qmf_bands_lf + val_xhb;
  700|       |
  701|   465k|  for (n = 0; n < proto_len; n++) {
  ------------------
  |  Branch (701:15): [True: 399k, False: 66.5k]
  ------------------
  702|   399k|    p_qmf_re = p_qmf_real;
  703|   399k|    p_qmf_im = p_qmf_imag;
  704|       |
  705|   399k|    p_hybrid_re = p_hybrid_real;
  706|   399k|    p_hybrid_im = p_hybrid_imag;
  707|       |
  708|  20.5M|    for (k = 0; k < loop_cnt; k++) {
  ------------------
  |  Branch (708:17): [True: 20.1M, False: 399k]
  ------------------
  709|  20.1M|      *p_hybrid_re++ = hyb_state->buffer_hf_real[k][n];
  710|  20.1M|      *p_hybrid_im++ = hyb_state->buffer_hf_imag[k][n];
  711|       |
  712|  20.1M|      hyb_state->buffer_hf_real[k][n] = *p_qmf_re++;
  713|  20.1M|      hyb_state->buffer_hf_imag[k][n] = *p_qmf_im++;
  714|  20.1M|    }
  715|   399k|    p_qmf_real += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|   399k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|   399k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  716|   399k|    p_qmf_imag += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|   399k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|   399k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  717|       |
  718|   399k|    p_hybrid_real += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|   399k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|   399k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  719|   399k|    p_hybrid_imag += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|   399k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|   399k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  720|   399k|  }
  721|       |
  722|  66.5k|  p_qmf_real = m_qmf_real;
  723|  66.5k|  p_qmf_imag = m_qmf_imag;
  724|       |
  725|  66.5k|  p_hybrid_real = m_hybrid_real + 10;
  726|  66.5k|  p_hybrid_imag = m_hybrid_imag + 10;
  727|       |
  728|  66.5k|  k = proto_len * MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  66.5k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  66.5k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  729|       |
  730|  66.5k|  p_hybrid_re = p_hybrid_real + k;
  731|  66.5k|  p_hybrid_im = p_hybrid_imag + k;
  732|       |
  733|  66.5k|  p_qmf_re = p_qmf_real + nr_qmf_bands_lf;
  734|  66.5k|  p_qmf_im = p_qmf_imag + nr_qmf_bands_lf;
  735|       |
  736|  1.53M|  for (n = 0; n < val; n++) {
  ------------------
  |  Branch (736:15): [True: 1.46M, False: 66.5k]
  ------------------
  737|  1.46M|    memcpy(p_hybrid_re, p_qmf_re, loop_cnt_x4);
  738|  1.46M|    memcpy(p_hybrid_im, p_qmf_im, loop_cnt_x4);
  739|       |
  740|  1.46M|    p_qmf_re += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  1.46M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  1.46M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  741|  1.46M|    p_qmf_im += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  1.46M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  1.46M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  742|       |
  743|  1.46M|    p_hybrid_re += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  1.46M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  1.46M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  744|  1.46M|    p_hybrid_im += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  1.46M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  1.46M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  745|  1.46M|  }
  746|       |
  747|  66.5k|  p_hybrid_real = m_hybrid_real;
  748|  66.5k|  p_hybrid_imag = m_hybrid_imag;
  749|       |
  750|  1.93M|  for (time_slot = 0; time_slot < nr_samples; time_slot++) {
  ------------------
  |  Branch (750:23): [True: 1.86M, False: 66.5k]
  ------------------
  751|  1.86M|    p_hybrid_re = p_hybrid_real;
  752|  1.86M|    p_hybrid_im = p_hybrid_imag;
  753|       |
  754|  1.86M|    ixheaacd_8ch_filtering(
  755|  1.86M|        &(hyb_state->buffer_lf_real[0][time_slot + nr_samples_shift_lf + 1 - PROTO_LEN]),
  ------------------
  |  |   80|  1.86M|#define PROTO_LEN (13)
  ------------------
  756|  1.86M|        &(hyb_state->buffer_lf_imag[0][time_slot + nr_samples_shift_lf + 1 - PROTO_LEN]),
  ------------------
  |  |   80|  1.86M|#define PROTO_LEN (13)
  ------------------
  757|  1.86M|        m_temp_output_real, m_temp_output_imag, hyb_tab_ptr);
  758|       |
  759|  1.86M|    *p_hybrid_re++ = m_temp_output_real[6];
  760|  1.86M|    *p_hybrid_re++ = m_temp_output_real[7];
  761|  1.86M|    *p_hybrid_re++ = m_temp_output_real[0];
  762|  1.86M|    *p_hybrid_re++ = m_temp_output_real[1];
  763|  1.86M|    *p_hybrid_re++ = ixheaac_add32_sat(m_temp_output_real[2], m_temp_output_real[5]);
  764|  1.86M|    *p_hybrid_re++ = ixheaac_add32_sat(m_temp_output_real[3], m_temp_output_real[4]);
  765|       |
  766|  1.86M|    *p_hybrid_im++ = m_temp_output_imag[6];
  767|  1.86M|    *p_hybrid_im++ = m_temp_output_imag[7];
  768|  1.86M|    *p_hybrid_im++ = m_temp_output_imag[0];
  769|  1.86M|    *p_hybrid_im++ = m_temp_output_imag[1];
  770|  1.86M|    *p_hybrid_im++ = ixheaac_add32_sat(m_temp_output_imag[2], m_temp_output_imag[5]);
  771|  1.86M|    *p_hybrid_im++ = ixheaac_add32_sat(m_temp_output_imag[3], m_temp_output_imag[4]);
  772|       |
  773|  1.86M|    ixheaacd_2ch_filtering(
  774|  1.86M|        &(hyb_state->buffer_lf_real[1][time_slot + nr_samples_shift_lf + 1 - PROTO_LEN]),
  ------------------
  |  |   80|  1.86M|#define PROTO_LEN (13)
  ------------------
  775|  1.86M|        m_temp_output_real, hyb_tab_ptr);
  776|       |
  777|  1.86M|    ixheaacd_2ch_filtering(
  778|  1.86M|        &(hyb_state->buffer_lf_imag[1][time_slot + nr_samples_shift_lf + 1 - PROTO_LEN]),
  ------------------
  |  |   80|  1.86M|#define PROTO_LEN (13)
  ------------------
  779|  1.86M|        m_temp_output_imag, hyb_tab_ptr);
  780|       |
  781|  1.86M|    *p_hybrid_re++ = m_temp_output_real[1];
  782|  1.86M|    *p_hybrid_re++ = m_temp_output_real[0];
  783|       |
  784|  1.86M|    *p_hybrid_im++ = m_temp_output_imag[1];
  785|  1.86M|    *p_hybrid_im++ = m_temp_output_imag[0];
  786|       |
  787|  1.86M|    ixheaacd_2ch_filtering(
  788|  1.86M|        &(hyb_state->buffer_lf_real[2][time_slot + nr_samples_shift_lf + 1 - PROTO_LEN]),
  ------------------
  |  |   80|  1.86M|#define PROTO_LEN (13)
  ------------------
  789|  1.86M|        m_temp_output_real, hyb_tab_ptr);
  790|       |
  791|  1.86M|    ixheaacd_2ch_filtering(
  792|  1.86M|        &(hyb_state->buffer_lf_imag[2][time_slot + nr_samples_shift_lf + 1 - PROTO_LEN]),
  ------------------
  |  |   80|  1.86M|#define PROTO_LEN (13)
  ------------------
  793|  1.86M|        m_temp_output_imag, hyb_tab_ptr);
  794|       |
  795|  1.86M|    *p_hybrid_re++ = m_temp_output_real[0];
  796|  1.86M|    *p_hybrid_re++ = m_temp_output_real[1];
  797|       |
  798|  1.86M|    *p_hybrid_im++ = m_temp_output_imag[0];
  799|  1.86M|    *p_hybrid_im++ = m_temp_output_imag[1];
  800|       |
  801|  1.86M|    p_hybrid_real += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  1.86M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  1.86M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  802|  1.86M|    p_hybrid_imag += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  1.86M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  1.86M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  803|  1.86M|  }
  804|       |
  805|  66.5k|  p_qmf_real = m_qmf_real;
  806|  66.5k|  p_qmf_imag = m_qmf_imag;
  807|   266k|  for (k = 0; k < nr_qmf_bands_lf; k++) {
  ------------------
  |  Branch (807:15): [True: 199k, False: 66.5k]
  ------------------
  808|   199k|    p_qmf_re = p_qmf_real;
  809|   199k|    p_qmf_im = p_qmf_imag;
  810|   199k|    for (n = MAX_TIME_SLOTS; n < nr_samples_shift_lf; n++) {
  ------------------
  |  |   48|   199k|#define MAX_TIME_SLOTS (72)
  ------------------
  |  Branch (810:30): [True: 0, False: 199k]
  ------------------
  811|      0|      hyb_state->buffer_lf_real[k][n] = hyb_state->qmf_lf_real[k][n];
  812|      0|      hyb_state->buffer_lf_imag[k][n] = hyb_state->qmf_lf_imag[k][n];
  813|      0|    }
  814|  5.79M|    for (n = 0; n < nr_samples; n++) {
  ------------------
  |  Branch (814:17): [True: 5.59M, False: 199k]
  ------------------
  815|  5.59M|      hyb_state->buffer_lf_real[k][n + nr_samples_shift_lf] = *p_qmf_re;
  816|  5.59M|      hyb_state->buffer_lf_imag[k][n + nr_samples_shift_lf] = *p_qmf_im;
  817|       |
  818|  5.59M|      p_qmf_re += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  5.59M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  5.59M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  819|  5.59M|      p_qmf_im += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  5.59M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  5.59M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  820|  5.59M|    }
  821|   199k|    p_qmf_real++;
  822|   199k|    p_qmf_imag++;
  823|   199k|  }
  824|  66.5k|}
ixheaacd_apply_ana_hyb_filt_bank_merge_res_decor:
  830|    413|    const ia_mps_dec_hybrid_tables_struct *hyb_tab_ptr) {
  831|    413|  WORD32 nr_samples_shift_lf;
  832|    413|  WORD32 nr_qmf_bands_lf;
  833|    413|  WORD32 k, n;
  834|    413|  WORD32 time_slot;
  835|       |
  836|    413|  WORD32 m_temp_output_real[MAX_HYBRID_ONLY_BANDS_PER_QMF];
  837|    413|  WORD32 m_temp_output_imag[MAX_HYBRID_ONLY_BANDS_PER_QMF];
  838|       |
  839|    413|  WORD32 proto_len = (PROTO_LEN - 1) >> 1;
  ------------------
  |  |   80|    413|#define PROTO_LEN (13)
  ------------------
  840|    413|  WORD32 val = nr_samples - proto_len;
  841|    413|  WORD32 loop_cnt;
  842|       |
  843|    413|  WORD32 *p_qmf_real = m_qmf_real;
  844|    413|  WORD32 *p_qmf_imag = m_qmf_imag;
  845|       |
  846|    413|  WORD32 *p_hybrid_real = m_hybrid_real + 10;
  847|    413|  WORD32 *p_hybrid_imag = m_hybrid_imag + 10;
  848|    413|  WORD32 *p_buffer_lf_real, *p_buffer_lf_imag;
  849|       |
  850|    413|  WORD32 nr_samples_x4 = nr_samples << 2;
  851|       |
  852|    413|  nr_samples_shift_lf = BUFFER_LEN_LF - nr_samples;
  ------------------
  |  |   81|    413|#define BUFFER_LEN_LF (PROTO_LEN - 1 + MAX_TIME_SLOTS)
  |  |  ------------------
  |  |  |  |   80|    413|#define PROTO_LEN (13)
  |  |  ------------------
  |  |               #define BUFFER_LEN_LF (PROTO_LEN - 1 + MAX_TIME_SLOTS)
  |  |  ------------------
  |  |  |  |   48|    413|#define MAX_TIME_SLOTS (72)
  |  |  ------------------
  ------------------
  853|       |
  854|    413|  nr_qmf_bands_lf = QMF_BANDS_TO_HYBRID;
  ------------------
  |  |   64|    413|#define QMF_BANDS_TO_HYBRID (3)
  ------------------
  855|    413|  loop_cnt = nr_bands - nr_qmf_bands_lf;
  856|       |
  857|  1.65k|  for (k = 0; k < nr_qmf_bands_lf; k++) {
  ------------------
  |  Branch (857:15): [True: 1.23k, False: 413]
  ------------------
  858|  75.1k|    for (n = 0; n < nr_samples_shift_lf; n++) {
  ------------------
  |  Branch (858:17): [True: 73.9k, False: 1.23k]
  ------------------
  859|  73.9k|      hyb_state->buffer_lf_real[k][n] = hyb_state->buffer_lf_real[k][n + nr_samples];
  860|  73.9k|      hyb_state->buffer_lf_imag[k][n] = hyb_state->buffer_lf_imag[k][n + nr_samples];
  861|       |
  862|  73.9k|      hyb_state->qmf_lf_real[k][n] = hyb_state->qmf_lf_real[k][n + nr_samples];
  863|  73.9k|      hyb_state->qmf_lf_imag[k][n] = hyb_state->qmf_lf_imag[k][n + nr_samples];
  864|  73.9k|    }
  865|  1.23k|  }
  866|  1.65k|  for (k = 0; k < nr_qmf_bands_lf; k++) {
  ------------------
  |  Branch (866:15): [True: 1.23k, False: 413]
  ------------------
  867|  1.23k|    WORD32 *qmf_real = p_qmf_real;
  868|  1.23k|    WORD32 *qmf_imag = p_qmf_imag;
  869|  31.3k|    for (n = 0; n < nr_samples; n++) {
  ------------------
  |  Branch (869:17): [True: 30.1k, False: 1.23k]
  ------------------
  870|  30.1k|      hyb_state->buffer_lf_real[k][n + nr_samples_shift_lf] = *qmf_real;
  871|  30.1k|      hyb_state->buffer_lf_imag[k][n + nr_samples_shift_lf] = *qmf_imag;
  872|       |
  873|  30.1k|      hyb_state->qmf_lf_imag[k][n + nr_samples_shift_lf] = *qmf_imag++;
  874|  30.1k|      hyb_state->qmf_lf_real[k][n + nr_samples_shift_lf] = *qmf_real++;
  875|  30.1k|    }
  876|  1.23k|    p_qmf_real += MAX_TIME_SLOTS;
  ------------------
  |  |   48|  1.23k|#define MAX_TIME_SLOTS (72)
  ------------------
  877|  1.23k|    p_qmf_imag += MAX_TIME_SLOTS;
  ------------------
  |  |   48|  1.23k|#define MAX_TIME_SLOTS (72)
  ------------------
  878|  1.23k|  }
  879|       |
  880|    413|  p_qmf_real = m_qmf_real + nr_qmf_bands_lf * MAX_TIME_SLOTS;
  ------------------
  |  |   48|    413|#define MAX_TIME_SLOTS (72)
  ------------------
  881|    413|  p_qmf_imag = m_qmf_imag + nr_qmf_bands_lf * MAX_TIME_SLOTS;
  ------------------
  |  |   48|    413|#define MAX_TIME_SLOTS (72)
  ------------------
  882|       |
  883|  12.3k|  for (k = 0; k < loop_cnt; k++) {
  ------------------
  |  Branch (883:15): [True: 11.9k, False: 413]
  ------------------
  884|  11.9k|    WORD32 *qmf_real = p_qmf_real + val;
  885|  11.9k|    WORD32 *qmf_imag = p_qmf_imag + val;
  886|       |
  887|  11.9k|    WORD32 *hybrid_real = p_hybrid_real;
  888|  11.9k|    WORD32 *hybrid_imag = p_hybrid_imag;
  889|       |
  890|  83.8k|    for (n = 0; n < proto_len; n++) {
  ------------------
  |  Branch (890:17): [True: 71.8k, False: 11.9k]
  ------------------
  891|  71.8k|      *hybrid_real = hyb_state->buffer_hf_real[k][n];
  892|  71.8k|      *hybrid_imag = hyb_state->buffer_hf_imag[k][n];
  893|       |
  894|  71.8k|      hyb_state->buffer_hf_real[k][n] = *qmf_real++;
  895|  71.8k|      hyb_state->buffer_hf_imag[k][n] = *qmf_imag++;
  896|       |
  897|  71.8k|      hybrid_real += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  71.8k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  71.8k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  898|  71.8k|      hybrid_imag += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  71.8k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  71.8k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  899|  71.8k|    }
  900|       |
  901|  11.9k|    p_qmf_real += MAX_TIME_SLOTS;
  ------------------
  |  |   48|  11.9k|#define MAX_TIME_SLOTS (72)
  ------------------
  902|  11.9k|    p_qmf_imag += MAX_TIME_SLOTS;
  ------------------
  |  |   48|  11.9k|#define MAX_TIME_SLOTS (72)
  ------------------
  903|       |
  904|  11.9k|    p_hybrid_real++;
  905|  11.9k|    p_hybrid_imag++;
  906|  11.9k|  }
  907|       |
  908|    413|  p_qmf_real = m_qmf_real + NR_QMF_BANDS_LFXTS;
  ------------------
  |  |   78|    413|#define NR_QMF_BANDS_LFXTS (216)
  ------------------
  909|    413|  p_qmf_imag = m_qmf_imag + NR_QMF_BANDS_LFXTS;
  ------------------
  |  |   78|    413|#define NR_QMF_BANDS_LFXTS (216)
  ------------------
  910|       |
  911|    413|  p_hybrid_real = m_hybrid_real + 10;
  912|    413|  p_hybrid_imag = m_hybrid_imag + 10;
  913|       |
  914|  12.3k|  for (k = 0; k < loop_cnt; k++) {
  ------------------
  |  Branch (914:15): [True: 11.9k, False: 413]
  ------------------
  915|  11.9k|    WORD32 *qmf_real = p_qmf_real;
  916|  11.9k|    WORD32 *qmf_imag = p_qmf_imag;
  917|       |
  918|  11.9k|    WORD32 *hybrid_real = p_hybrid_real + proto_len * MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  11.9k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  11.9k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  919|  11.9k|    WORD32 *hybrid_imag = p_hybrid_imag + proto_len * MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  11.9k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  11.9k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  920|       |
  921|   231k|    for (n = 0; n < val; n++) {
  ------------------
  |  Branch (921:17): [True: 219k, False: 11.9k]
  ------------------
  922|   219k|      *hybrid_real = *qmf_real++;
  923|   219k|      *hybrid_imag = *qmf_imag++;
  924|       |
  925|   219k|      hybrid_real += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|   219k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|   219k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  926|   219k|      hybrid_imag += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|   219k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|   219k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  927|   219k|    }
  928|       |
  929|  11.9k|    p_qmf_real += MAX_TIME_SLOTS;
  ------------------
  |  |   48|  11.9k|#define MAX_TIME_SLOTS (72)
  ------------------
  930|  11.9k|    p_qmf_imag += MAX_TIME_SLOTS;
  ------------------
  |  |   48|  11.9k|#define MAX_TIME_SLOTS (72)
  ------------------
  931|       |
  932|  11.9k|    p_hybrid_real++;
  933|  11.9k|    p_hybrid_imag++;
  934|  11.9k|  }
  935|       |
  936|    413|  p_hybrid_real = m_hybrid_real;
  937|    413|  p_hybrid_imag = m_hybrid_imag;
  938|       |
  939|  10.4k|  for (time_slot = 0; time_slot < nr_samples; time_slot++) {
  ------------------
  |  Branch (939:23): [True: 10.0k, False: 413]
  ------------------
  940|  10.0k|    WORD32 *hybrid_real = p_hybrid_real;
  941|  10.0k|    WORD32 *hybrid_imag = p_hybrid_imag;
  942|       |
  943|  10.0k|    ixheaacd_8ch_filtering(
  944|  10.0k|        &(hyb_state->buffer_lf_real[0][time_slot + nr_samples_shift_lf + 1 - PROTO_LEN]),
  ------------------
  |  |   80|  10.0k|#define PROTO_LEN (13)
  ------------------
  945|  10.0k|        &(hyb_state->buffer_lf_imag[0][time_slot + nr_samples_shift_lf + 1 - PROTO_LEN]),
  ------------------
  |  |   80|  10.0k|#define PROTO_LEN (13)
  ------------------
  946|  10.0k|        m_temp_output_real, m_temp_output_imag, hyb_tab_ptr);
  947|       |
  948|  10.0k|    *hybrid_real++ = m_temp_output_real[6];
  949|  10.0k|    *hybrid_real++ = m_temp_output_real[7];
  950|  10.0k|    *hybrid_real++ = m_temp_output_real[0];
  951|  10.0k|    *hybrid_real++ = m_temp_output_real[1];
  952|  10.0k|    *hybrid_imag++ = (m_temp_output_imag[2] + m_temp_output_imag[5]);
  953|  10.0k|    *hybrid_real++ = (m_temp_output_real[3] + m_temp_output_real[4]);
  954|       |
  955|  10.0k|    *hybrid_imag++ = m_temp_output_imag[6];
  956|  10.0k|    *hybrid_imag++ = m_temp_output_imag[7];
  957|  10.0k|    *hybrid_imag++ = m_temp_output_imag[0];
  958|  10.0k|    *hybrid_imag++ = m_temp_output_imag[1];
  959|  10.0k|    *hybrid_real++ = (m_temp_output_real[2] + m_temp_output_real[5]);
  960|  10.0k|    *hybrid_imag++ = (m_temp_output_imag[3] + m_temp_output_imag[4]);
  961|       |
  962|  10.0k|    ixheaacd_2ch_filtering(
  963|  10.0k|        &(hyb_state->buffer_lf_real[1][time_slot + nr_samples_shift_lf + 1 - PROTO_LEN]),
  ------------------
  |  |   80|  10.0k|#define PROTO_LEN (13)
  ------------------
  964|  10.0k|        m_temp_output_real, hyb_tab_ptr);
  965|       |
  966|  10.0k|    ixheaacd_2ch_filtering(
  967|  10.0k|        &(hyb_state->buffer_lf_imag[1][time_slot + nr_samples_shift_lf + 1 - PROTO_LEN]),
  ------------------
  |  |   80|  10.0k|#define PROTO_LEN (13)
  ------------------
  968|  10.0k|        m_temp_output_imag, hyb_tab_ptr);
  969|       |
  970|  10.0k|    *hybrid_real++ = m_temp_output_real[1];
  971|  10.0k|    *hybrid_real++ = m_temp_output_real[0];
  972|       |
  973|  10.0k|    *hybrid_imag++ = m_temp_output_imag[0];
  974|  10.0k|    *hybrid_imag++ = m_temp_output_imag[1];
  975|       |
  976|  10.0k|    ixheaacd_2ch_filtering(
  977|  10.0k|        &(hyb_state->buffer_lf_real[2][time_slot + nr_samples_shift_lf + 1 - PROTO_LEN]),
  ------------------
  |  |   80|  10.0k|#define PROTO_LEN (13)
  ------------------
  978|  10.0k|        m_temp_output_real, hyb_tab_ptr);
  979|       |
  980|  10.0k|    ixheaacd_2ch_filtering(
  981|  10.0k|        &(hyb_state->buffer_lf_imag[2][time_slot + nr_samples_shift_lf + 1 - PROTO_LEN]),
  ------------------
  |  |   80|  10.0k|#define PROTO_LEN (13)
  ------------------
  982|  10.0k|        m_temp_output_imag, hyb_tab_ptr);
  983|       |
  984|  10.0k|    *hybrid_real++ = m_temp_output_real[0];
  985|  10.0k|    *hybrid_real++ = m_temp_output_real[1];
  986|       |
  987|  10.0k|    *hybrid_imag++ = m_temp_output_imag[0];
  988|  10.0k|    *hybrid_imag++ = m_temp_output_imag[1];
  989|       |
  990|  10.0k|    p_hybrid_real += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  10.0k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  10.0k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  991|  10.0k|    p_hybrid_imag += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  10.0k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  10.0k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  992|  10.0k|  }
  993|       |
  994|    413|  p_qmf_real = m_qmf_real;
  995|    413|  p_qmf_imag = m_qmf_imag;
  996|       |
  997|    413|  p_buffer_lf_real = &hyb_state->buffer_lf_real[0][nr_samples_shift_lf];
  998|    413|  p_buffer_lf_imag = &hyb_state->buffer_lf_imag[0][nr_samples_shift_lf];
  999|       |
 1000|  1.65k|  for (k = 0; k < nr_qmf_bands_lf; k++) {
  ------------------
  |  Branch (1000:15): [True: 1.23k, False: 413]
  ------------------
 1001|  1.23k|    for (n = MAX_TIME_SLOTS; n < nr_samples_shift_lf; n++) {
  ------------------
  |  |   48|  1.23k|#define MAX_TIME_SLOTS (72)
  ------------------
  |  Branch (1001:30): [True: 0, False: 1.23k]
  ------------------
 1002|      0|      hyb_state->buffer_lf_real[k][n] = hyb_state->qmf_lf_real[k][n];
 1003|      0|      hyb_state->buffer_lf_imag[k][n] = hyb_state->qmf_lf_imag[k][n];
 1004|      0|    }
 1005|  1.23k|    {
 1006|  1.23k|      memcpy(p_buffer_lf_real, p_qmf_real, nr_samples_x4);
 1007|  1.23k|      memcpy(p_buffer_lf_imag, p_qmf_imag, nr_samples_x4);
 1008|  1.23k|    }
 1009|  1.23k|    p_qmf_real += MAX_TIME_SLOTS;
  ------------------
  |  |   48|  1.23k|#define MAX_TIME_SLOTS (72)
  ------------------
 1010|  1.23k|    p_qmf_imag += MAX_TIME_SLOTS;
  ------------------
  |  |   48|  1.23k|#define MAX_TIME_SLOTS (72)
  ------------------
 1011|       |
 1012|  1.23k|    p_buffer_lf_real += BUFFER_LEN_LF;
  ------------------
  |  |   81|  1.23k|#define BUFFER_LEN_LF (PROTO_LEN - 1 + MAX_TIME_SLOTS)
  |  |  ------------------
  |  |  |  |   80|  1.23k|#define PROTO_LEN (13)
  |  |  ------------------
  |  |               #define BUFFER_LEN_LF (PROTO_LEN - 1 + MAX_TIME_SLOTS)
  |  |  ------------------
  |  |  |  |   48|  1.23k|#define MAX_TIME_SLOTS (72)
  |  |  ------------------
  ------------------
 1013|  1.23k|    p_buffer_lf_imag += BUFFER_LEN_LF;
  ------------------
  |  |   81|  1.23k|#define BUFFER_LEN_LF (PROTO_LEN - 1 + MAX_TIME_SLOTS)
  |  |  ------------------
  |  |  |  |   80|  1.23k|#define PROTO_LEN (13)
  |  |  ------------------
  |  |               #define BUFFER_LEN_LF (PROTO_LEN - 1 + MAX_TIME_SLOTS)
  |  |  ------------------
  |  |  |  |   48|  1.23k|#define MAX_TIME_SLOTS (72)
  |  |  ------------------
  ------------------
 1014|  1.23k|  }
 1015|    413|}
ixheaacd_apply_ana_hyb_filt_bank_create_x_res:
 1021|    226|    const ia_mps_dec_hybrid_tables_struct *hyb_tab_ptr) {
 1022|    226|  WORD32 nr_samples_shift_lf;
 1023|    226|  WORD32 nr_qmf_bands_lf;
 1024|    226|  WORD32 k, n, qs;
 1025|    226|  WORD32 time_slot, ch_off_set;
 1026|    226|  SIZE_T *idx = indx;
  ------------------
  |  |   28|    226|#define SIZE_T size_t
  ------------------
 1027|       |
 1028|    226|  WORD32 proto_len = (PROTO_LEN - 1) >> 1;
  ------------------
  |  |   80|    226|#define PROTO_LEN (13)
  ------------------
 1029|    226|  WORD32 val = nr_samples - proto_len;
 1030|       |
 1031|    226|  WORD32 *p_qmf_real = m_qmf_real;
 1032|    226|  WORD32 *p_qmf_imag = m_qmf_imag;
 1033|    226|  WORD32 loop_cnt;
 1034|       |
 1035|    226|  WORD32 m_temp_output_real[MAX_HYBRID_ONLY_BANDS_PER_QMF];
 1036|    226|  WORD32 m_temp_output_imag[MAX_HYBRID_ONLY_BANDS_PER_QMF];
 1037|       |
 1038|    226|  WORD32 *p_hybrid_real = m_hybrid_real + 10;
 1039|    226|  WORD32 *p_hybrid_imag = m_hybrid_imag + 10;
 1040|       |
 1041|    226|  WORD32 *p_hybrid_re, *p_hybrid_im;
 1042|       |
 1043|    226|  WORD32 *p_buffer_lf_real, *p_buffer_lf_imag;
 1044|       |
 1045|    226|  WORD32 nr_samples_x4 = nr_samples << 2;
 1046|       |
 1047|    226|  nr_samples_shift_lf = BUFFER_LEN_LF - nr_samples;
  ------------------
  |  |   81|    226|#define BUFFER_LEN_LF (PROTO_LEN - 1 + MAX_TIME_SLOTS)
  |  |  ------------------
  |  |  |  |   80|    226|#define PROTO_LEN (13)
  |  |  ------------------
  |  |               #define BUFFER_LEN_LF (PROTO_LEN - 1 + MAX_TIME_SLOTS)
  |  |  ------------------
  |  |  |  |   48|    226|#define MAX_TIME_SLOTS (72)
  |  |  ------------------
  ------------------
 1048|       |
 1049|    226|  nr_qmf_bands_lf = QMF_BANDS_TO_HYBRID;
  ------------------
  |  |   64|    226|#define QMF_BANDS_TO_HYBRID (3)
  ------------------
 1050|    226|  loop_cnt = nr_bands - nr_qmf_bands_lf;
 1051|    226|  ch_off_set = 0;
 1052|       |
 1053|    904|  for (k = 0; k < nr_qmf_bands_lf; k++) {
  ------------------
  |  Branch (1053:15): [True: 678, False: 226]
  ------------------
 1054|  40.3k|    for (n = 0; n < nr_samples_shift_lf; n++) {
  ------------------
  |  Branch (1054:17): [True: 39.6k, False: 678]
  ------------------
 1055|  39.6k|      hyb_state->buffer_lf_real[k][n] = hyb_state->buffer_lf_real[k][n + nr_samples];
 1056|  39.6k|      hyb_state->buffer_lf_imag[k][n] = hyb_state->buffer_lf_imag[k][n + nr_samples];
 1057|       |
 1058|  39.6k|      hyb_state->qmf_lf_real[k][n] = hyb_state->qmf_lf_real[k][n + nr_samples];
 1059|  39.6k|      hyb_state->qmf_lf_imag[k][n] = hyb_state->qmf_lf_imag[k][n + nr_samples];
 1060|  39.6k|    }
 1061|    678|  }
 1062|    904|  for (k = 0; k < nr_qmf_bands_lf; k++) {
  ------------------
  |  Branch (1062:15): [True: 678, False: 226]
  ------------------
 1063|    678|    WORD32 *qmf_real = p_qmf_real;
 1064|    678|    WORD32 *qmf_imag = p_qmf_imag;
 1065|       |
 1066|  18.0k|    for (n = 0; n < nr_samples; n++) {
  ------------------
  |  Branch (1066:17): [True: 17.3k, False: 678]
  ------------------
 1067|  17.3k|      hyb_state->buffer_lf_real[k][n + nr_samples_shift_lf] = *qmf_real;
 1068|  17.3k|      hyb_state->buffer_lf_imag[k][n + nr_samples_shift_lf] = *qmf_imag;
 1069|       |
 1070|  17.3k|      hyb_state->qmf_lf_imag[k][n + nr_samples_shift_lf] = *qmf_imag++;
 1071|  17.3k|      hyb_state->qmf_lf_real[k][n + nr_samples_shift_lf] = *qmf_real++;
 1072|  17.3k|    }
 1073|    678|    p_qmf_real += MAX_TIME_SLOTS;
  ------------------
  |  |   48|    678|#define MAX_TIME_SLOTS (72)
  ------------------
 1074|    678|    p_qmf_imag += MAX_TIME_SLOTS;
  ------------------
  |  |   48|    678|#define MAX_TIME_SLOTS (72)
  ------------------
 1075|    678|  }
 1076|       |
 1077|    226|  p_qmf_real = m_qmf_real + NR_QMF_BANDS_LFXTS;
  ------------------
  |  |   78|    226|#define NR_QMF_BANDS_LFXTS (216)
  ------------------
 1078|    226|  p_qmf_imag = m_qmf_imag + NR_QMF_BANDS_LFXTS;
  ------------------
  |  |   78|    226|#define NR_QMF_BANDS_LFXTS (216)
  ------------------
 1079|       |
 1080|  6.84k|  for (k = 0; k < loop_cnt; k++) {
  ------------------
  |  Branch (1080:15): [True: 6.61k, False: 226]
  ------------------
 1081|  6.61k|    WORD32 *qmf_real = p_qmf_real + val;
 1082|  6.61k|    WORD32 *qmf_imag = p_qmf_imag + val;
 1083|       |
 1084|  6.61k|    p_hybrid_re = p_hybrid_real;
 1085|  6.61k|    p_hybrid_im = p_hybrid_imag;
 1086|       |
 1087|  46.3k|    for (n = 0; n < proto_len; n++) {
  ------------------
  |  Branch (1087:17): [True: 39.7k, False: 6.61k]
  ------------------
 1088|  39.7k|      *p_hybrid_re = hyb_state->buffer_hf_real[k][n];
 1089|  39.7k|      *p_hybrid_im = hyb_state->buffer_hf_imag[k][n];
 1090|       |
 1091|  39.7k|      hyb_state->buffer_hf_real[k][n] = *qmf_real++;
 1092|  39.7k|      hyb_state->buffer_hf_imag[k][n] = *qmf_imag++;
 1093|       |
 1094|  39.7k|      p_hybrid_re += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  39.7k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  39.7k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
 1095|  39.7k|      p_hybrid_im += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  39.7k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  39.7k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
 1096|  39.7k|    }
 1097|  6.61k|    p_qmf_real += MAX_TIME_SLOTS;
  ------------------
  |  |   48|  6.61k|#define MAX_TIME_SLOTS (72)
  ------------------
 1098|  6.61k|    p_qmf_imag += MAX_TIME_SLOTS;
  ------------------
  |  |   48|  6.61k|#define MAX_TIME_SLOTS (72)
  ------------------
 1099|       |
 1100|  6.61k|    p_hybrid_real++;
 1101|  6.61k|    p_hybrid_imag++;
 1102|  6.61k|  }
 1103|       |
 1104|    226|  p_qmf_real = m_qmf_real + NR_QMF_BANDS_LFXTS;
  ------------------
  |  |   78|    226|#define NR_QMF_BANDS_LFXTS (216)
  ------------------
 1105|    226|  p_qmf_imag = m_qmf_imag + NR_QMF_BANDS_LFXTS;
  ------------------
  |  |   78|    226|#define NR_QMF_BANDS_LFXTS (216)
  ------------------
 1106|       |
 1107|    226|  p_hybrid_real = m_hybrid_real + 10;
 1108|    226|  p_hybrid_imag = m_hybrid_imag + 10;
 1109|       |
 1110|  6.84k|  for (k = 0; k < loop_cnt; k++) {
  ------------------
  |  Branch (1110:15): [True: 6.61k, False: 226]
  ------------------
 1111|  6.61k|    WORD32 *qmf_real = p_qmf_real;
 1112|  6.61k|    WORD32 *qmf_imag = p_qmf_imag;
 1113|       |
 1114|  6.61k|    p_hybrid_re = p_hybrid_real + proto_len * MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  6.61k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  6.61k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
 1115|  6.61k|    p_hybrid_im = p_hybrid_imag + proto_len * MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  6.61k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  6.61k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
 1116|       |
 1117|   135k|    for (n = 0; n < val; n++) {
  ------------------
  |  Branch (1117:17): [True: 128k, False: 6.61k]
  ------------------
 1118|   128k|      *p_hybrid_re = *qmf_real++;
 1119|   128k|      *p_hybrid_im = *qmf_imag++;
 1120|       |
 1121|   128k|      p_hybrid_re += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|   128k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|   128k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
 1122|   128k|      p_hybrid_im += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|   128k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|   128k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
 1123|   128k|    }
 1124|  6.61k|    p_qmf_real += MAX_TIME_SLOTS;
  ------------------
  |  |   48|  6.61k|#define MAX_TIME_SLOTS (72)
  ------------------
 1125|  6.61k|    p_qmf_imag += MAX_TIME_SLOTS;
  ------------------
  |  |   48|  6.61k|#define MAX_TIME_SLOTS (72)
  ------------------
 1126|       |
 1127|  6.61k|    p_hybrid_real++;
 1128|  6.61k|    p_hybrid_imag++;
 1129|  6.61k|  }
 1130|       |
 1131|    226|  if (res == 1 && (num_parameter_bands == 20 || num_parameter_bands == 28))
  ------------------
  |  Branch (1131:7): [True: 41, False: 185]
  |  Branch (1131:20): [True: 6, False: 35]
  |  Branch (1131:49): [True: 28, False: 7]
  ------------------
 1132|     34|    *counter = 3;
 1133|    192|  else {
 1134|    192|    idx = indx;
 1135|  4.25k|    for (qs = 0; qs < hyb_bands; qs++) {
  ------------------
  |  Branch (1135:18): [True: 4.05k, False: 192]
  ------------------
 1136|  4.05k|      if (*idx++ >= (SIZE_T)res) {
  ------------------
  |  Branch (1136:11): [True: 163, False: 3.89k]
  ------------------
 1137|    163|        *counter = qs;
 1138|    163|        qs = hyb_bands;
 1139|    163|      }
 1140|  4.05k|    }
 1141|    192|  }
 1142|       |
 1143|    226|  p_hybrid_real = m_hybrid_real;
 1144|    226|  p_hybrid_imag = m_hybrid_imag;
 1145|  6.00k|  for (time_slot = 0; time_slot < nr_samples; time_slot++) {
  ------------------
  |  Branch (1145:23): [True: 5.77k, False: 226]
  ------------------
 1146|  5.77k|    idx = indx;
 1147|  5.77k|    p_hybrid_re = p_hybrid_real;
 1148|  5.77k|    p_hybrid_im = p_hybrid_imag;
 1149|       |
 1150|  5.77k|    ixheaacd_8ch_filtering(
 1151|  5.77k|        &(hyb_state->buffer_lf_real[0][time_slot + nr_samples_shift_lf + 1 - PROTO_LEN]),
  ------------------
  |  |   80|  5.77k|#define PROTO_LEN (13)
  ------------------
 1152|  5.77k|        &(hyb_state->buffer_lf_imag[0][time_slot + nr_samples_shift_lf + 1 - PROTO_LEN]),
  ------------------
  |  |   80|  5.77k|#define PROTO_LEN (13)
  ------------------
 1153|  5.77k|        m_temp_output_real, m_temp_output_imag, hyb_tab_ptr);
 1154|       |
 1155|  5.77k|    *p_hybrid_re++ = m_temp_output_real[6];
 1156|  5.77k|    *p_hybrid_re++ = m_temp_output_real[7];
 1157|  5.77k|    *p_hybrid_re++ = m_temp_output_real[0];
 1158|       |
 1159|  5.77k|    *p_hybrid_re++ = m_temp_output_real[1];
 1160|       |
 1161|  5.77k|    *p_hybrid_im++ = m_temp_output_imag[6];
 1162|  5.77k|    *p_hybrid_im++ = m_temp_output_imag[7];
 1163|  5.77k|    *p_hybrid_im++ = m_temp_output_imag[0];
 1164|  5.77k|    *p_hybrid_im++ = m_temp_output_imag[1];
 1165|       |
 1166|  5.77k|    if (*counter > 4) {
  ------------------
  |  Branch (1166:9): [True: 4.08k, False: 1.69k]
  ------------------
 1167|  4.08k|      *p_hybrid_re++ = ixheaac_add32_sat(m_temp_output_real[2], m_temp_output_real[5]);
 1168|  4.08k|      *p_hybrid_im++ = ixheaac_add32_sat(m_temp_output_imag[2], m_temp_output_imag[5]);
 1169|  4.08k|    }
 1170|       |
 1171|  5.77k|    if (*counter > 5) {
  ------------------
  |  Branch (1171:9): [True: 3.70k, False: 2.07k]
  ------------------
 1172|  3.70k|      *p_hybrid_re++ = ixheaac_add32_sat(m_temp_output_real[3], m_temp_output_real[4]);
 1173|  3.70k|      *p_hybrid_im++ = ixheaac_add32_sat(m_temp_output_imag[3], m_temp_output_imag[4]);
 1174|  3.70k|    }
 1175|       |
 1176|  5.77k|    ch_off_set = 6;
 1177|  5.77k|    p_hybrid_re = p_hybrid_real + ch_off_set;
 1178|  5.77k|    p_hybrid_im = p_hybrid_imag + ch_off_set;
 1179|       |
 1180|  5.77k|    ixheaacd_2ch_filtering(
 1181|  5.77k|        &(hyb_state->buffer_lf_real[1][time_slot + nr_samples_shift_lf + 1 - PROTO_LEN]),
  ------------------
  |  |   80|  5.77k|#define PROTO_LEN (13)
  ------------------
 1182|  5.77k|        m_temp_output_real, hyb_tab_ptr);
 1183|       |
 1184|  5.77k|    ixheaacd_2ch_filtering(
 1185|  5.77k|        &(hyb_state->buffer_lf_imag[1][time_slot + nr_samples_shift_lf + 1 - PROTO_LEN]),
  ------------------
  |  |   80|  5.77k|#define PROTO_LEN (13)
  ------------------
 1186|  5.77k|        m_temp_output_imag, hyb_tab_ptr);
 1187|       |
 1188|  5.77k|    *p_hybrid_re++ = m_temp_output_real[1];
 1189|  5.77k|    *p_hybrid_re++ = m_temp_output_real[0];
 1190|       |
 1191|  5.77k|    *p_hybrid_im++ = m_temp_output_imag[1];
 1192|  5.77k|    *p_hybrid_im++ = m_temp_output_imag[0];
 1193|       |
 1194|  5.77k|    ixheaacd_2ch_filtering(
 1195|  5.77k|        &(hyb_state->buffer_lf_real[2][time_slot + nr_samples_shift_lf + 1 - PROTO_LEN]),
  ------------------
  |  |   80|  5.77k|#define PROTO_LEN (13)
  ------------------
 1196|  5.77k|        m_temp_output_real, hyb_tab_ptr);
 1197|       |
 1198|  5.77k|    ixheaacd_2ch_filtering(
 1199|  5.77k|        &(hyb_state->buffer_lf_imag[2][time_slot + nr_samples_shift_lf + 1 - PROTO_LEN]),
  ------------------
  |  |   80|  5.77k|#define PROTO_LEN (13)
  ------------------
 1200|  5.77k|        m_temp_output_imag, hyb_tab_ptr);
 1201|       |
 1202|  5.77k|    *p_hybrid_re++ = m_temp_output_real[0];
 1203|  5.77k|    *p_hybrid_re++ = m_temp_output_real[1];
 1204|       |
 1205|  5.77k|    *p_hybrid_im++ = m_temp_output_imag[0];
 1206|  5.77k|    *p_hybrid_im++ = m_temp_output_imag[1];
 1207|       |
 1208|  5.77k|    p_hybrid_real += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  5.77k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  5.77k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
 1209|  5.77k|    p_hybrid_imag += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  5.77k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  5.77k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
 1210|  5.77k|  }
 1211|    226|  p_qmf_real = m_qmf_real;
 1212|    226|  p_qmf_imag = m_qmf_imag;
 1213|       |
 1214|    226|  p_buffer_lf_real = &hyb_state->buffer_lf_real[0][nr_samples_shift_lf];
 1215|    226|  p_buffer_lf_imag = &hyb_state->buffer_lf_imag[0][nr_samples_shift_lf];
 1216|       |
 1217|    904|  for (k = 0; k < nr_qmf_bands_lf; k++) {
  ------------------
  |  Branch (1217:15): [True: 678, False: 226]
  ------------------
 1218|    678|    for (n = MAX_TIME_SLOTS; n < nr_samples_shift_lf; n++) {
  ------------------
  |  |   48|    678|#define MAX_TIME_SLOTS (72)
  ------------------
  |  Branch (1218:30): [True: 0, False: 678]
  ------------------
 1219|      0|      hyb_state->buffer_lf_real[k][n] = hyb_state->qmf_lf_real[k][n];
 1220|      0|      hyb_state->buffer_lf_imag[k][n] = hyb_state->qmf_lf_imag[k][n];
 1221|      0|    }
 1222|    678|    {
 1223|    678|      memcpy(p_buffer_lf_real, p_qmf_real, nr_samples_x4);
 1224|    678|      memcpy(p_buffer_lf_imag, p_qmf_imag, nr_samples_x4);
 1225|    678|    }
 1226|    678|    p_qmf_real += MAX_TIME_SLOTS;
  ------------------
  |  |   48|    678|#define MAX_TIME_SLOTS (72)
  ------------------
 1227|    678|    p_qmf_imag += MAX_TIME_SLOTS;
  ------------------
  |  |   48|    678|#define MAX_TIME_SLOTS (72)
  ------------------
 1228|       |
 1229|    678|    p_buffer_lf_real += BUFFER_LEN_LF;
  ------------------
  |  |   81|    678|#define BUFFER_LEN_LF (PROTO_LEN - 1 + MAX_TIME_SLOTS)
  |  |  ------------------
  |  |  |  |   80|    678|#define PROTO_LEN (13)
  |  |  ------------------
  |  |               #define BUFFER_LEN_LF (PROTO_LEN - 1 + MAX_TIME_SLOTS)
  |  |  ------------------
  |  |  |  |   48|    678|#define MAX_TIME_SLOTS (72)
  |  |  ------------------
  ------------------
 1230|    678|    p_buffer_lf_imag += BUFFER_LEN_LF;
  ------------------
  |  |   81|    678|#define BUFFER_LEN_LF (PROTO_LEN - 1 + MAX_TIME_SLOTS)
  |  |  ------------------
  |  |  |  |   80|    678|#define PROTO_LEN (13)
  |  |  ------------------
  |  |               #define BUFFER_LEN_LF (PROTO_LEN - 1 + MAX_TIME_SLOTS)
  |  |  ------------------
  |  |  |  |   48|    678|#define MAX_TIME_SLOTS (72)
  |  |  ------------------
  ------------------
 1231|    678|  }
 1232|    226|}
ixheaacd_mps_hybrid_filt.c:ixheaacd_mps_hyb_filt_type1:
   51|   123k|                                        WORD32 num_samples, const FLOAT32 *filt_coeff) {
   52|   123k|  WORD32 i, n, q;
   53|       |
   54|   123k|  FLOAT32 in_re, in_im;
   55|   123k|  FLOAT32 coeff;
   56|   123k|  FLOAT32 acc_re_l, acc_re_h, acc_im_l, acc_im_h;
   57|       |
   58|  4.97M|  for (i = 0; i < num_samples; i++) {
  ------------------
  |  Branch (58:15): [True: 4.85M, False: 123k]
  ------------------
   59|  4.85M|    FLOAT32 x0_re[13], x0_im[13], x0_1_re[8], x0_1_im[8];
   60|  4.85M|    FLOAT32 acc_re_val[8], acc_im_val[8];
   61|  67.9M|    for (n = 0; n < QMF_HYBRID_FILT_ORDER; n++) {
  ------------------
  |  |   50|  67.9M|#define QMF_HYBRID_FILT_ORDER (13)
  ------------------
  |  Branch (61:17): [True: 63.0M, False: 4.85M]
  ------------------
   62|  63.0M|      in_re = input[n + i].re;
   63|  63.0M|      in_im = input[n + i].im;
   64|       |
   65|  63.0M|      coeff = filt_coeff[QMF_HYBRID_FILT_ORDER - 1 - n];
  ------------------
  |  |   50|  63.0M|#define QMF_HYBRID_FILT_ORDER (13)
  ------------------
   66|       |
   67|  63.0M|      x0_re[n] = coeff * in_re;
   68|  63.0M|      x0_im[n] = coeff * in_im;
   69|  63.0M|    }
   70|       |
   71|  4.85M|    x0_1_re[0] = x0_re[6];
   72|  4.85M|    x0_1_im[0] = x0_im[6];
   73|       |
   74|  4.85M|    x0_1_re[1] = x0_re[7];
   75|  4.85M|    x0_1_im[1] = x0_im[7];
   76|       |
   77|  4.85M|    x0_1_re[2] = x0_re[8] - x0_re[0];
   78|  4.85M|    x0_1_im[2] = x0_im[8] - x0_im[0];
   79|       |
   80|  4.85M|    x0_1_re[3] = x0_re[9] - x0_re[1];
   81|  4.85M|    x0_1_im[3] = x0_im[9] - x0_im[1];
   82|       |
   83|  4.85M|    x0_1_re[4] = x0_re[10] - x0_re[2];
   84|  4.85M|    x0_1_im[4] = x0_im[10] - x0_im[2];
   85|       |
   86|  4.85M|    x0_1_re[5] = x0_re[11] - x0_re[3];
   87|  4.85M|    x0_1_im[5] = x0_im[11] - x0_im[3];
   88|       |
   89|  4.85M|    x0_1_re[6] = x0_re[12] - x0_re[4];
   90|  4.85M|    x0_1_im[6] = x0_im[12] - x0_im[4];
   91|       |
   92|  4.85M|    x0_1_re[7] = -(x0_re[5]);
   93|  4.85M|    x0_1_im[7] = -(x0_im[5]);
   94|       |
   95|  4.85M|    acc_re_val[0] = x0_1_re[0];
   96|  4.85M|    acc_re_val[1] = x0_1_re[1] - x0_1_re[7];
   97|  4.85M|    acc_re_val[2] = x0_1_re[2] - x0_1_re[6];
   98|  4.85M|    acc_re_val[3] = x0_1_re[3] - x0_1_re[5];
   99|  4.85M|    acc_re_val[4] = x0_1_im[1] + x0_1_im[7];
  100|  4.85M|    acc_re_val[5] = x0_1_im[2] + x0_1_im[6];
  101|  4.85M|    acc_re_val[6] = x0_1_im[3] + x0_1_im[5];
  102|  4.85M|    acc_re_val[7] = x0_1_im[4];
  103|       |
  104|  4.85M|    acc_im_val[0] = x0_1_im[0];
  105|  4.85M|    acc_im_val[1] = x0_1_im[1] - x0_1_im[7];
  106|  4.85M|    acc_im_val[2] = x0_1_im[2] - x0_1_im[6];
  107|  4.85M|    acc_im_val[3] = x0_1_im[3] - x0_1_im[5];
  108|  4.85M|    acc_im_val[4] = x0_1_re[1] + x0_1_re[7];
  109|  4.85M|    acc_im_val[5] = x0_1_re[2] + x0_1_re[6];
  110|  4.85M|    acc_im_val[6] = x0_1_re[3] + x0_1_re[5];
  111|  4.85M|    acc_im_val[7] = x0_1_re[4];
  112|       |
  113|  24.2M|    for (q = 0; q < 4; q++) {
  ------------------
  |  Branch (113:17): [True: 19.4M, False: 4.85M]
  ------------------
  114|  19.4M|      acc_re_l = 0;
  115|  19.4M|      acc_im_l = 0;
  116|  19.4M|      acc_re_h = 0;
  117|  19.4M|      acc_im_h = 0;
  118|       |
  119|  19.4M|      acc_re_l += acc_re_val[0];
  120|  19.4M|      acc_re_l += acc_re_val[1] * ixheaacd_cosine[q][1];
  121|  19.4M|      acc_re_l += acc_re_val[2] * ixheaacd_cosine[q][2];
  122|  19.4M|      acc_re_l += acc_re_val[3] * ixheaacd_cosine[q][3];
  123|       |
  124|  19.4M|      acc_re_h = acc_re_l;
  125|       |
  126|  19.4M|      acc_re_l -= acc_re_val[4] * ixheaacd_sine[q][1];
  127|  19.4M|      acc_re_l -= acc_re_val[5] * ixheaacd_sine[q][2];
  128|  19.4M|      acc_re_l -= acc_re_val[6] * ixheaacd_sine[q][3];
  129|  19.4M|      acc_re_l -= acc_re_val[7] * ixheaacd_sine[q][4];
  130|       |
  131|  19.4M|      acc_re_h = acc_re_h - (acc_re_l - acc_re_h);
  132|       |
  133|  19.4M|      acc_im_l += acc_im_val[0];
  134|  19.4M|      acc_im_l += acc_im_val[1] * ixheaacd_cosine[q][1];
  135|  19.4M|      acc_im_l += acc_im_val[2] * ixheaacd_cosine[q][2];
  136|  19.4M|      acc_im_l += acc_im_val[3] * ixheaacd_cosine[q][3];
  137|       |
  138|  19.4M|      acc_im_h = acc_im_l;
  139|       |
  140|  19.4M|      acc_im_l += acc_im_val[4] * ixheaacd_sine[q][1];
  141|  19.4M|      acc_im_l += acc_im_val[5] * ixheaacd_sine[q][2];
  142|  19.4M|      acc_im_l += acc_im_val[6] * ixheaacd_sine[q][3];
  143|  19.4M|      acc_im_l += acc_im_val[7] * ixheaacd_sine[q][4];
  144|       |
  145|  19.4M|      acc_im_h = acc_im_h - (acc_im_l - acc_im_h);
  146|       |
  147|  19.4M|      output[q][i].re = acc_re_l;
  148|  19.4M|      output[q][i].im = acc_im_l;
  149|       |
  150|  19.4M|      output[7 - q][i].re = acc_re_h;
  151|  19.4M|      output[7 - q][i].im = acc_im_h;
  152|  19.4M|    }
  153|  4.85M|  }
  154|   123k|}
ixheaacd_mps_hybrid_filt.c:ixheaacd_mps_hyb_filt_type2:
  158|   246k|                                        WORD32 num_samples, const FLOAT32 *filt_coeff) {
  159|   246k|  WORD32 i, n;
  160|       |
  161|   246k|  FLOAT32 in_re, in_im;
  162|   246k|  FLOAT32 coeff;
  163|   246k|  FLOAT32 acc_re[2], acc_im[2];
  164|       |
  165|  9.94M|  for (i = 0; i < num_samples; i++) {
  ------------------
  |  Branch (165:15): [True: 9.70M, False: 246k]
  ------------------
  166|  9.70M|    FLOAT32 x_0_re[13], x_0_im[13];
  167|       |
  168|  38.8M|    for (n = 1; n < 6; n = n + 2) {
  ------------------
  |  Branch (168:17): [True: 29.1M, False: 9.70M]
  ------------------
  169|  29.1M|      in_re = input[n + i].re;
  170|  29.1M|      in_im = input[n + i].im;
  171|       |
  172|  29.1M|      in_re += input[12 - n + i].re;
  173|  29.1M|      in_im += input[12 - n + i].im;
  174|       |
  175|  29.1M|      coeff = filt_coeff[QMF_HYBRID_FILT_ORDER - 1 - n];
  ------------------
  |  |   50|  29.1M|#define QMF_HYBRID_FILT_ORDER (13)
  ------------------
  176|       |
  177|  29.1M|      x_0_re[n] = coeff * in_re;
  178|  29.1M|      x_0_im[n] = coeff * in_im;
  179|  29.1M|    }
  180|       |
  181|  9.70M|    n = 6;
  182|  9.70M|    in_re = input[n + i].re;
  183|  9.70M|    in_im = input[n + i].im;
  184|       |
  185|  9.70M|    coeff = filt_coeff[QMF_HYBRID_FILT_ORDER - 1 - n];
  ------------------
  |  |   50|  9.70M|#define QMF_HYBRID_FILT_ORDER (13)
  ------------------
  186|       |
  187|  9.70M|    x_0_re[n] = coeff * in_re;
  188|  9.70M|    x_0_im[n] = coeff * in_im;
  189|       |
  190|  9.70M|    x_0_re[1] = x_0_re[1] + x_0_re[3] + x_0_re[5];
  191|  9.70M|    x_0_im[1] = x_0_im[1] + x_0_im[3] + x_0_im[5];
  192|       |
  193|  9.70M|    acc_re[0] = x_0_re[6] + x_0_re[1];
  194|  9.70M|    acc_im[0] = x_0_im[6] + x_0_im[1];
  195|       |
  196|  9.70M|    acc_re[1] = x_0_re[6] - x_0_re[1];
  197|  9.70M|    acc_im[1] = x_0_im[6] - x_0_im[1];
  198|       |
  199|  9.70M|    output[0][i].re = acc_re[0];
  200|  9.70M|    output[0][i].im = acc_im[0];
  201|       |
  202|  9.70M|    output[1][i].re = acc_re[1];
  203|  9.70M|    output[1][i].im = acc_im[1];
  204|  9.70M|  }
  205|   246k|}

ixheaacd_getsize_mps_persistent:
   70|  28.4k|WORD32 ixheaacd_getsize_mps_persistent() {
   71|  28.4k|  return (IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_mps_persistent_mem), BYTE_ALIGN_8));
  ------------------
  |  |   87|  28.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
   72|  28.4k|}
ixheaacd_mps_persistent_buffer_sizes:
  112|  14.2k|WORD32 ixheaacd_mps_persistent_buffer_sizes() {
  113|  14.2k|  WORD32 buffer_size;
  114|       |
  115|  14.2k|  buffer_size = ixheaacd_getsize_mps_persistent();
  116|       |
  117|  14.2k|  buffer_size += IXHEAAC_GET_SIZE_ALIGNED(PREV_GAINAT, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  118|       |
  119|  14.2k|  buffer_size += IXHEAAC_GET_SIZE_ALIGNED(ARBDMX_ALPHA, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  120|       |
  121|  14.2k|  buffer_size += IXHEAAC_GET_SIZE_ALIGNED(M1_PREV, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  122|       |
  123|  14.2k|  buffer_size += IXHEAAC_GET_SIZE_ALIGNED(M1_PREV, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  124|       |
  125|  14.2k|  buffer_size += IXHEAAC_GET_SIZE_ALIGNED(M2_PREV_DECOR, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  126|       |
  127|  14.2k|  buffer_size += IXHEAAC_GET_SIZE_ALIGNED(M2_PREV_DECOR, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  128|       |
  129|  14.2k|  buffer_size += IXHEAAC_GET_SIZE_ALIGNED(M2_PREV_RESID, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  130|       |
  131|  14.2k|  buffer_size += IXHEAAC_GET_SIZE_ALIGNED(M2_PREV_RESID, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  132|       |
  133|  14.2k|  buffer_size += IXHEAAC_GET_SIZE_ALIGNED(QMF_DELAY_INPUT, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  134|       |
  135|  14.2k|  buffer_size += IXHEAAC_GET_SIZE_ALIGNED(QMF_DELAY_INPUT, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  136|       |
  137|  14.2k|  buffer_size += IXHEAAC_GET_SIZE_ALIGNED(ANA_BUF_SIZE, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  138|       |
  139|  14.2k|  buffer_size += IXHEAAC_GET_SIZE_ALIGNED(SYN_BUF_SIZE, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  140|       |
  141|  14.2k|  buffer_size += ixheaacd_calc_decorr_size();
  142|       |
  143|  14.2k|  buffer_size += IXHEAAC_GET_SIZE_ALIGNED(HYB_FILTER_STATE_SIZE, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  144|       |
  145|  14.2k|  buffer_size += IXHEAAC_GET_SIZE_ALIGNED(TONALITY_STATE_SIZE, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  146|       |
  147|  14.2k|  buffer_size += IXHEAAC_GET_SIZE_ALIGNED(SMOOTHING_STATE_SIZE, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  148|       |
  149|  14.2k|  buffer_size += IXHEAAC_GET_SIZE_ALIGNED(RESHAPE_STATE_SIZE, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  150|       |
  151|  14.2k|  buffer_size += IXHEAAC_GET_SIZE_ALIGNED(SUBBAND_TP_SIZE, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  152|       |
  153|  14.2k|  buffer_size += IXHEAAC_GET_SIZE_ALIGNED(BLIND_DECODER_SIZE, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  154|       |
  155|  14.2k|  buffer_size +=
  156|  14.2k|      IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_mps_dec_spatial_bs_frame_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  157|       |
  158|  14.2k|  buffer_size += IXHEAAC_GET_SIZE_ALIGNED(ARRAY_STRUCT_SIZE, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  159|       |
  160|       |  // Add buffer sizes for pstr_mps_state->array_struct
  161|       |  // res_mdct
  162|  14.2k|  buffer_size += IXHEAAC_GET_SIZE_ALIGNED(MDCT_RES_BUF_SIZE, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  163|       |  // qmf_residual_real
  164|  14.2k|  buffer_size += IXHEAAC_GET_SIZE_ALIGNED(QMF_RES_BUF_SIZE, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  165|       |  // qmf_residual_imag
  166|  14.2k|  buffer_size += IXHEAAC_GET_SIZE_ALIGNED(QMF_RES_BUF_SIZE, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  167|       |  // m_qmf_real
  168|  14.2k|  buffer_size += IXHEAAC_GET_SIZE_ALIGNED(QMF_BUF_SIZE, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  169|       |  // m_qmf_imag
  170|  14.2k|  buffer_size += IXHEAAC_GET_SIZE_ALIGNED(QMF_BUF_SIZE, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  171|       |  // buf_real
  172|  14.2k|  buffer_size += IXHEAAC_GET_SIZE_ALIGNED(BUF_SIZE, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  173|       |  // buf_imag
  174|  14.2k|  buffer_size += IXHEAAC_GET_SIZE_ALIGNED(BUF_SIZE, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  175|       |  // aux_struct
  176|  14.2k|  buffer_size += IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_mps_dec_auxilary_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  177|       |  // aux_struct->m2_param
  178|  14.2k|  buffer_size += IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_mps_dec_m2_param_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  179|       |
  180|  14.2k|  return buffer_size;
  181|  14.2k|}
ixheaacd_set_mps_persistent_buffers:
  185|  14.2k|                                         VOID *persistent_mem) {
  186|  14.2k|  WORD32 used_persistent = *persistent_used;
  187|       |
  188|  14.2k|  struct ia_mps_persistent_mem *mps_persistent_mem = &(pstr_mps_state->mps_persistent_mem);
  189|       |
  190|  14.2k|  WORD32 decorr_size;
  191|       |
  192|  14.2k|  num_channel = max(2, num_channel);
  ------------------
  |  |   74|  14.2k|#define max(a, b) (((a) > (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (74:20): [True: 0, False: 14.2k]
  |  |  ------------------
  ------------------
  193|       |
  194|  14.2k|  mps_persistent_mem->prev_gain_at = (WORD32 *)((WORD8 *)persistent_mem);
  195|       |
  196|  14.2k|  memset(mps_persistent_mem->prev_gain_at, 0,
  197|  14.2k|         IXHEAAC_GET_SIZE_ALIGNED(PREV_GAINAT, BYTE_ALIGN_8));
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  198|       |
  199|  14.2k|  used_persistent += IXHEAAC_GET_SIZE_ALIGNED(PREV_GAINAT, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  200|       |
  201|  14.2k|  mps_persistent_mem->arbdmx_alpha_prev = (WORD32 *)((WORD8 *)persistent_mem + used_persistent);
  202|  14.2k|  memset(mps_persistent_mem->arbdmx_alpha_prev, 0,
  203|  14.2k|         IXHEAAC_GET_SIZE_ALIGNED(ARBDMX_ALPHA, BYTE_ALIGN_8));
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  204|  14.2k|  used_persistent += IXHEAAC_GET_SIZE_ALIGNED(ARBDMX_ALPHA, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  205|       |
  206|  14.2k|  mps_persistent_mem->m1_param_real_prev = (WORD32 *)((WORD8 *)persistent_mem + used_persistent);
  207|  14.2k|  memset(mps_persistent_mem->m1_param_real_prev, 0,
  208|  14.2k|         IXHEAAC_GET_SIZE_ALIGNED(M1_PREV, BYTE_ALIGN_8));
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  209|  14.2k|  used_persistent += IXHEAAC_GET_SIZE_ALIGNED(M1_PREV, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  210|       |
  211|  14.2k|  mps_persistent_mem->m1_param_imag_prev = (WORD32 *)((WORD8 *)persistent_mem + used_persistent);
  212|  14.2k|  memset(mps_persistent_mem->m1_param_imag_prev, 0,
  213|  14.2k|         IXHEAAC_GET_SIZE_ALIGNED(M1_PREV, BYTE_ALIGN_8));
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  214|  14.2k|  used_persistent += IXHEAAC_GET_SIZE_ALIGNED(M1_PREV, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  215|       |
  216|  14.2k|  mps_persistent_mem->m2_decor_real_prev = (WORD32 *)((WORD8 *)persistent_mem + used_persistent);
  217|  14.2k|  memset(mps_persistent_mem->m2_decor_real_prev, 0,
  218|  14.2k|         IXHEAAC_GET_SIZE_ALIGNED(M2_PREV_DECOR, BYTE_ALIGN_8));
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  219|  14.2k|  used_persistent += IXHEAAC_GET_SIZE_ALIGNED(M2_PREV_DECOR, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  220|       |
  221|  14.2k|  mps_persistent_mem->m2_decor_imag_prev = (WORD32 *)((WORD8 *)persistent_mem + used_persistent);
  222|  14.2k|  memset(mps_persistent_mem->m2_decor_imag_prev, 0,
  223|  14.2k|         IXHEAAC_GET_SIZE_ALIGNED(M2_PREV_DECOR, BYTE_ALIGN_8));
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  224|  14.2k|  used_persistent += IXHEAAC_GET_SIZE_ALIGNED(M2_PREV_DECOR, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  225|       |
  226|  14.2k|  mps_persistent_mem->m2_resid_real_prev = (WORD32 *)((WORD8 *)persistent_mem + used_persistent);
  227|  14.2k|  memset(mps_persistent_mem->m2_resid_real_prev, 0,
  228|  14.2k|         IXHEAAC_GET_SIZE_ALIGNED(M2_PREV_RESID, BYTE_ALIGN_8));
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  229|  14.2k|  used_persistent += IXHEAAC_GET_SIZE_ALIGNED(M2_PREV_RESID, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  230|       |
  231|  14.2k|  mps_persistent_mem->m2_resid_imag_prev = (WORD32 *)((WORD8 *)persistent_mem + used_persistent);
  232|  14.2k|  memset(mps_persistent_mem->m2_resid_imag_prev, 0,
  233|  14.2k|         IXHEAAC_GET_SIZE_ALIGNED(M2_PREV_RESID, BYTE_ALIGN_8));
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  234|  14.2k|  used_persistent += IXHEAAC_GET_SIZE_ALIGNED(M2_PREV_RESID, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  235|       |
  236|  14.2k|  mps_persistent_mem->qmf_input_delay_real =
  237|  14.2k|      (WORD32 *)((WORD8 *)persistent_mem + used_persistent);
  238|  14.2k|  memset(mps_persistent_mem->qmf_input_delay_real, 0,
  239|  14.2k|         IXHEAAC_GET_SIZE_ALIGNED(QMF_DELAY_INPUT, BYTE_ALIGN_8));
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  240|  14.2k|  used_persistent += IXHEAAC_GET_SIZE_ALIGNED(QMF_DELAY_INPUT, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  241|       |
  242|  14.2k|  mps_persistent_mem->qmf_input_delay_imag =
  243|  14.2k|      (WORD32 *)((WORD8 *)persistent_mem + used_persistent);
  244|  14.2k|  memset(mps_persistent_mem->qmf_input_delay_imag, 0,
  245|  14.2k|         IXHEAAC_GET_SIZE_ALIGNED(QMF_DELAY_INPUT, BYTE_ALIGN_8));
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  246|  14.2k|  used_persistent += IXHEAAC_GET_SIZE_ALIGNED(QMF_DELAY_INPUT, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  247|       |
  248|  14.2k|  mps_persistent_mem->syn_qmf_states_buffer =
  249|  14.2k|      (WORD32 *)((WORD8 *)persistent_mem + used_persistent);
  250|  14.2k|  memset(mps_persistent_mem->syn_qmf_states_buffer, 0,
  251|  14.2k|         IXHEAAC_GET_SIZE_ALIGNED(SYN_BUF_SIZE, BYTE_ALIGN_8));
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  252|  14.2k|  used_persistent += IXHEAAC_GET_SIZE_ALIGNED(SYN_BUF_SIZE, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  253|       |
  254|  14.2k|  mps_persistent_mem->ana_qmf_states_buffer =
  255|  14.2k|      (WORD32 *)((WORD8 *)persistent_mem + used_persistent);
  256|  14.2k|  memset(mps_persistent_mem->ana_qmf_states_buffer, 0,
  257|  14.2k|         IXHEAAC_GET_SIZE_ALIGNED(ANA_BUF_SIZE, BYTE_ALIGN_8));
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  258|  14.2k|  used_persistent += IXHEAAC_GET_SIZE_ALIGNED(ANA_BUF_SIZE, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  259|       |
  260|  14.2k|  decorr_size = ixheaacd_calc_decorr_size();
  261|       |
  262|  14.2k|  mps_persistent_mem->decorr_ptr = (WORD32 *)((WORD8 *)persistent_mem + used_persistent);
  263|  14.2k|  memset(mps_persistent_mem->decorr_ptr, 0, decorr_size);
  264|  14.2k|  used_persistent += decorr_size;
  265|       |
  266|  14.2k|  mps_persistent_mem->hyb_filter_state =
  267|  14.2k|      (ia_mps_dec_thyb_filter_state_struct *)((WORD8 *)persistent_mem + used_persistent);
  268|  14.2k|  memset(mps_persistent_mem->hyb_filter_state, 0,
  269|  14.2k|         IXHEAAC_GET_SIZE_ALIGNED(HYB_FILTER_STATE_SIZE, BYTE_ALIGN_8));
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  270|  14.2k|  used_persistent += IXHEAAC_GET_SIZE_ALIGNED(HYB_FILTER_STATE_SIZE, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  271|       |
  272|  14.2k|  mps_persistent_mem->ton_state =
  273|  14.2k|      (ia_mps_dec_tonality_state_struct *)((WORD8 *)persistent_mem + used_persistent);
  274|  14.2k|  memset(mps_persistent_mem->ton_state, 0,
  275|  14.2k|         IXHEAAC_GET_SIZE_ALIGNED(TONALITY_STATE_SIZE, BYTE_ALIGN_8));
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  276|  14.2k|  used_persistent += IXHEAAC_GET_SIZE_ALIGNED(TONALITY_STATE_SIZE, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  277|       |
  278|  14.2k|  mps_persistent_mem->smooth_state =
  279|  14.2k|      (ia_mps_dec_smoothing_state_struct *)((WORD8 *)persistent_mem + used_persistent);
  280|  14.2k|  memset(mps_persistent_mem->smooth_state, 0,
  281|  14.2k|         IXHEAAC_GET_SIZE_ALIGNED(SMOOTHING_STATE_SIZE, BYTE_ALIGN_8));
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  282|  14.2k|  used_persistent += IXHEAAC_GET_SIZE_ALIGNED(SMOOTHING_STATE_SIZE, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  283|       |
  284|  14.2k|  mps_persistent_mem->reshape_bb_env_state =
  285|  14.2k|      (ia_mps_dec_reshape_bb_env_state_struct *)((WORD8 *)persistent_mem + used_persistent);
  286|  14.2k|  memset(mps_persistent_mem->reshape_bb_env_state, 0,
  287|  14.2k|         IXHEAAC_GET_SIZE_ALIGNED(RESHAPE_STATE_SIZE, BYTE_ALIGN_8));
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  288|  14.2k|  used_persistent += IXHEAAC_GET_SIZE_ALIGNED(RESHAPE_STATE_SIZE, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  289|       |
  290|  14.2k|  mps_persistent_mem->sub_band_params =
  291|  14.2k|      (ia_mps_dec_subband_tp_params_struct *)((WORD8 *)persistent_mem + used_persistent);
  292|  14.2k|  memset(mps_persistent_mem->sub_band_params, 0,
  293|  14.2k|         IXHEAAC_GET_SIZE_ALIGNED(SUBBAND_TP_SIZE, BYTE_ALIGN_8));
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  294|  14.2k|  used_persistent += IXHEAAC_GET_SIZE_ALIGNED(SUBBAND_TP_SIZE, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  295|       |
  296|  14.2k|  mps_persistent_mem->blind_decoder =
  297|  14.2k|      (ia_mps_dec_blind_decoder_struct *)((WORD8 *)persistent_mem + used_persistent);
  298|  14.2k|  memset(mps_persistent_mem->blind_decoder, 0,
  299|  14.2k|         IXHEAAC_GET_SIZE_ALIGNED(BLIND_DECODER_SIZE, BYTE_ALIGN_8));
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  300|  14.2k|  used_persistent += IXHEAAC_GET_SIZE_ALIGNED(BLIND_DECODER_SIZE, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  301|       |
  302|  14.2k|  mps_persistent_mem->p_bs_frame =
  303|  14.2k|      (ia_mps_dec_spatial_bs_frame_struct *)((WORD8 *)persistent_mem + used_persistent);
  304|  14.2k|  memset(mps_persistent_mem->p_bs_frame, 0,
  305|  14.2k|         IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_mps_dec_spatial_bs_frame_struct), BYTE_ALIGN_8));
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  306|  14.2k|  used_persistent +=
  307|  14.2k|      IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_mps_dec_spatial_bs_frame_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  308|       |
  309|  14.2k|  pstr_mps_state->array_struct =
  310|  14.2k|      (ia_mps_dec_reuse_array_struct *)((WORD8 *)persistent_mem + used_persistent);
  311|  14.2k|  memset(pstr_mps_state->array_struct, 0,
  312|  14.2k|         IXHEAAC_GET_SIZE_ALIGNED(ARRAY_STRUCT_SIZE, BYTE_ALIGN_8));
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  313|  14.2k|  used_persistent += IXHEAAC_GET_SIZE_ALIGNED(ARRAY_STRUCT_SIZE, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  314|       |
  315|       |  // Set buffers pointers of pstr_mps_state->array_struct
  316|  14.2k|  ia_mps_dec_reuse_array_struct *p_array_struct = pstr_mps_state->array_struct;
  317|       |
  318|  14.2k|  p_array_struct->res_mdct = (WORD32 *)((WORD8 *)persistent_mem + used_persistent);
  319|  14.2k|  used_persistent += IXHEAAC_GET_SIZE_ALIGNED(MDCT_RES_BUF_SIZE, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  320|       |
  321|  14.2k|  p_array_struct->qmf_residual_real = (WORD32 *)((WORD8 *)persistent_mem + used_persistent);
  322|  14.2k|  used_persistent += IXHEAAC_GET_SIZE_ALIGNED(QMF_RES_BUF_SIZE, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  323|  14.2k|  p_array_struct->qmf_residual_imag = (WORD32 *)((WORD8 *)persistent_mem + used_persistent);
  324|  14.2k|  used_persistent += IXHEAAC_GET_SIZE_ALIGNED(QMF_RES_BUF_SIZE, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  325|       |
  326|  14.2k|  p_array_struct->m_qmf_real = (WORD32 *)((WORD8 *)persistent_mem + used_persistent);
  327|  14.2k|  used_persistent += IXHEAAC_GET_SIZE_ALIGNED(QMF_BUF_SIZE, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  328|  14.2k|  p_array_struct->m_qmf_imag = (WORD32 *)((WORD8 *)persistent_mem + used_persistent);
  329|  14.2k|  used_persistent += IXHEAAC_GET_SIZE_ALIGNED(QMF_BUF_SIZE, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  330|       |
  331|  14.2k|  p_array_struct->buf_real = (WORD32 *)((WORD8 *)persistent_mem + used_persistent);
  332|  14.2k|  used_persistent += IXHEAAC_GET_SIZE_ALIGNED(BUF_SIZE, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  333|  14.2k|  p_array_struct->buf_imag = (WORD32 *)((WORD8 *)persistent_mem + used_persistent);
  334|  14.2k|  used_persistent += IXHEAAC_GET_SIZE_ALIGNED(BUF_SIZE, BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  335|       |
  336|  14.2k|  p_array_struct->hyb_output_real_dry = p_array_struct->res_mdct;
  337|  14.2k|  p_array_struct->hyb_output_imag_dry =
  338|  14.2k|      p_array_struct->res_mdct +
  339|  14.2k|      IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_OUTPUT_CHANNELS_AT_MPS * TSXHB,
  ------------------
  |  |   89|  14.2k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  340|  14.2k|                                    sizeof(*p_array_struct->hyb_output_imag_dry), BYTE_ALIGN_8);
  341|       |
  342|  14.2k|  p_array_struct->x_real = p_array_struct->hyb_output_real_dry;
  343|  14.2k|  p_array_struct->x_imag = p_array_struct->hyb_output_imag_dry;
  344|       |
  345|  14.2k|  p_array_struct->time_out = p_array_struct->hyb_output_real_dry;
  346|       |
  347|  14.2k|  p_array_struct->w_dry_real = p_array_struct->m_qmf_real;
  348|  14.2k|  p_array_struct->w_dry_imag = p_array_struct->m_qmf_imag;
  349|       |
  350|  14.2k|  p_array_struct->env_dmx_0 =
  351|  14.2k|      p_array_struct->m_qmf_real +
  352|  14.2k|      IXHEAAC_GET_SIZE_ALIGNED_TYPE(TSXHBX5, sizeof(*p_array_struct->env_dmx_0), BYTE_ALIGN_8);
  ------------------
  |  |   89|  14.2k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  353|  14.2k|  p_array_struct->env_dmx_1 =
  354|  14.2k|      p_array_struct->env_dmx_0 +
  355|  14.2k|      IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_TIME_SLOTS, sizeof(*p_array_struct->env_dmx_1),
  ------------------
  |  |   89|  14.2k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  356|  14.2k|                                    BYTE_ALIGN_8);
  357|       |
  358|  14.2k|  p_array_struct->qmf_residual_real_pre = p_array_struct->qmf_residual_real;
  359|  14.2k|  p_array_struct->qmf_residual_real_post =
  360|  14.2k|      p_array_struct->qmf_residual_real +
  361|  14.2k|      IXHEAAC_GET_SIZE_ALIGNED_TYPE(
  ------------------
  |  |   89|  14.2k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  362|  14.2k|          RES_CHXQMFXTS, sizeof(*p_array_struct->qmf_residual_real_post), BYTE_ALIGN_8);
  363|       |
  364|  14.2k|  p_array_struct->qmf_residual_imag_pre = p_array_struct->qmf_residual_imag;
  365|  14.2k|  p_array_struct->qmf_residual_imag_post =
  366|  14.2k|      p_array_struct->qmf_residual_imag +
  367|  14.2k|      IXHEAAC_GET_SIZE_ALIGNED_TYPE(
  ------------------
  |  |   89|  14.2k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  368|  14.2k|          RES_CHXQMFXTS, sizeof(*p_array_struct->qmf_residual_imag_post), BYTE_ALIGN_8);
  369|       |
  370|  14.2k|  p_array_struct->buffer_real = p_array_struct->qmf_residual_real_post;
  371|  14.2k|  p_array_struct->buffer_imag = p_array_struct->qmf_residual_imag_post;
  372|       |
  373|  14.2k|  p_array_struct->m1_param = (ia_mps_dec_m1_param_struct *)p_array_struct->buffer_real;
  374|       |
  375|  14.2k|  pstr_mps_state->aux_struct =
  376|  14.2k|      (ia_mps_dec_auxilary_struct *)((WORD8 *)persistent_mem + used_persistent);
  377|  14.2k|  used_persistent += IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_mps_dec_auxilary_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  378|       |
  379|  14.2k|  pstr_mps_state->aux_struct->m2_param =
  380|  14.2k|      (ia_mps_dec_m2_param_struct *)((WORD8 *)persistent_mem + used_persistent);
  381|  14.2k|  used_persistent += IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_mps_dec_m2_param_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  14.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  382|       |
  383|  14.2k|  *persistent_used = used_persistent;
  384|  14.2k|}
ixheaacd_set_scratch_buffers:
  410|  14.2k|VOID ixheaacd_set_scratch_buffers(ia_heaac_mps_state_struct *pstr_mps_state, VOID *scratch_mem) {
  411|  14.2k|  WORD32 scratch_used = 0;
  412|       |
  413|  14.2k|  pstr_mps_state->mps_scratch_mem_v = (VOID *)((WORD8 *)scratch_mem + scratch_used);
  414|  14.2k|}
ixheaacd_ana_filter_bank_init:
  416|  10.2k|                                   ia_mps_dec_qmf_ana_filter_bank *qmf_bank) {
  417|  10.2k|  memset(qmf_bank->qmf_states_buffer, 0,
  418|  10.2k|         QMF_FILTER_STATE_ANA_SIZE_MPS * sizeof(qmf_bank->qmf_states_buffer[0]));
  ------------------
  |  |   90|  10.2k|#define QMF_FILTER_STATE_ANA_SIZE_MPS (640)
  ------------------
  419|  10.2k|  qmf_bank->p_filter_ana =
  420|  10.2k|      pstr_mps_state->ia_mps_dec_mps_table.qmf_table_ptr->ia_mps_enc_qmf_64_640;
  421|  10.2k|  qmf_bank->flag = 0;
  422|  10.2k|  qmf_bank->offset = 0;
  423|  10.2k|  qmf_bank->ref_co_eff_ptr_l = qmf_bank->p_filter_ana + 10;
  424|  10.2k|  qmf_bank->ref_co_eff_ptr_r = qmf_bank->p_filter_ana + QMF_FILTER_STATE_ANA_SIZE_MPS;
  ------------------
  |  |   90|  10.2k|#define QMF_FILTER_STATE_ANA_SIZE_MPS (640)
  ------------------
  425|  10.2k|  qmf_bank->offset_l = 5;
  426|  10.2k|  qmf_bank->offset_r = 5;
  427|  10.2k|}
ixheaacd_syn_filter_bank_create:
  429|  3.24k|VOID ixheaacd_syn_filter_bank_create(ia_heaac_mps_state_struct *pstr_mps_state) {
  430|  3.24k|  ia_mps_dec_qmf_syn_filter_bank *qmf_bank = &(pstr_mps_state->syn_qmf_bank);
  431|       |
  432|  3.24k|  memset(qmf_bank->sbr_qmf_states_synthesis, 0, SYN_BUFFER_SIZE);
  ------------------
  |  |   86|  3.24k|#define SYN_BUFFER_SIZE (18432)
  ------------------
  433|  3.24k|  qmf_bank->p_filter_syn =
  434|  3.24k|      pstr_mps_state->ia_mps_dec_mps_table.tp_process_table_ptr->ia_mps_dec_qmf_64_640;
  435|  3.24k|}
ixheaacd_sb_tp_init:
  787|  1.64k|VOID ixheaacd_sb_tp_init(ia_heaac_mps_state_struct *pstr_mps_state) {
  788|  1.64k|  WORD32 ch;
  789|  1.64k|  ia_mps_dec_subband_tp_params_struct *sub_band_tp =
  790|  1.64k|      pstr_mps_state->mps_persistent_mem.sub_band_params;
  791|  1.64k|  WORD32 *prev_tp_scale = sub_band_tp->prev_tp_scale;
  792|  1.64k|  WORD16 *q_prev_tp_scale = sub_band_tp->q_prev_tp_scale;
  793|       |
  794|  1.64k|  WORD32 *old_wet_ener = sub_band_tp->old_wet_ener;
  795|  1.64k|  WORD16 *q_old_wet_ener = sub_band_tp->q_old_wet_ener;
  796|       |
  797|  1.64k|  WORD32 *run_wet_ener = sub_band_tp->run_wet_ener;
  798|  1.64k|  WORD16 *q_run_wet_ener = sub_band_tp->q_run_wet_ener;
  799|       |
  800|  14.8k|  for (ch = 0; ch < MAX_OUTPUT_CHANNELS_MPS; ch++) {
  ------------------
  |  |   71|  14.8k|#define MAX_OUTPUT_CHANNELS_MPS (8)
  ------------------
  |  Branch (800:16): [True: 13.1k, False: 1.64k]
  ------------------
  801|  13.1k|    prev_tp_scale[ch] = ONE_IN_Q15;
  ------------------
  |  |   41|  13.1k|#define ONE_IN_Q15 (32768)
  ------------------
  802|  13.1k|    q_prev_tp_scale[ch] = 15;
  803|       |
  804|  13.1k|    old_wet_ener[ch] = ONE_IN_Q30;
  ------------------
  |  |   43|  13.1k|#define ONE_IN_Q30 (1073741824)
  ------------------
  805|  13.1k|    q_old_wet_ener[ch] = 0;
  806|  13.1k|    run_wet_ener[ch] = 0;
  807|  13.1k|    q_run_wet_ener[ch] = 0;
  808|  13.1k|  }
  809|  11.5k|  for (ch = 0; ch < MAX_INPUT_CHANNELS_MPS; ch++) {
  ------------------
  |  |   66|  11.5k|#define MAX_INPUT_CHANNELS_MPS (6)
  ------------------
  |  Branch (809:16): [True: 9.87k, False: 1.64k]
  ------------------
  810|  9.87k|    sub_band_tp->old_dry_ener[ch] = ONE_IN_Q30;
  ------------------
  |  |   43|  9.87k|#define ONE_IN_Q30 (1073741824)
  ------------------
  811|  9.87k|    sub_band_tp->q_old_dry_ener[ch] = 0;
  812|  9.87k|    sub_band_tp->run_dry_ener[ch] = 0;
  813|  9.87k|    sub_band_tp->q_run_dry_ener[ch] = 0;
  814|  9.87k|  }
  815|  1.64k|}
ixheaacd_decorr_init:
  817|  3.23k|VOID ixheaacd_decorr_init(ia_heaac_mps_state_struct *pstr_mps_state) {
  818|  3.23k|  VOID *decorr_persistent = pstr_mps_state->mps_persistent_mem.decorr_ptr;
  819|  3.23k|  WORD32 i, k;
  820|  3.23k|  WORD32 hybrid_bands = pstr_mps_state->hybrid_bands;
  821|  3.23k|  WORD32 dec_type = pstr_mps_state->dec_type;
  822|       |
  823|  19.4k|  for (k = 0; k < MAX_NO_DECORR_CHANNELS; k++) {
  ------------------
  |  |   84|  19.4k|#define MAX_NO_DECORR_CHANNELS (5)
  ------------------
  |  Branch (823:15): [True: 16.1k, False: 3.23k]
  ------------------
  824|  16.1k|    pstr_mps_state->ap_decor[k] = decorr_persistent;
  825|  16.1k|    decorr_persistent =
  826|  16.1k|        (WORD8 *)decorr_persistent +
  827|  16.1k|        IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_mps_dec_decorr_dec_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  16.1k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  828|  16.1k|  }
  829|  19.4k|  for (k = 0; k < MAX_NO_DECORR_CHANNELS; k++) {
  ------------------
  |  |   84|  19.4k|#define MAX_NO_DECORR_CHANNELS (5)
  ------------------
  |  Branch (829:15): [True: 16.1k, False: 3.23k]
  ------------------
  830|  16.1k|    pstr_mps_state->ap_decor[k]->ducker = decorr_persistent;
  831|  16.1k|    decorr_persistent =
  832|  16.1k|        (WORD8 *)decorr_persistent +
  833|  16.1k|        IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_mps_dec_ducker_interface), BYTE_ALIGN_8) +
  ------------------
  |  |   87|  16.1k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  834|  16.1k|        IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_mps_dec_duck_instance_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  16.1k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  835|  16.1k|  }
  836|       |
  837|  19.4k|  for (k = 0; k < MAX_NO_DECORR_CHANNELS; k++) {
  ------------------
  |  |   84|  19.4k|#define MAX_NO_DECORR_CHANNELS (5)
  ------------------
  |  Branch (837:15): [True: 16.1k, False: 3.23k]
  ------------------
  838|   773k|    for (i = 0; i < hybrid_bands; i++) {
  ------------------
  |  Branch (838:17): [True: 757k, False: 16.1k]
  ------------------
  839|   757k|      pstr_mps_state->ap_decor[k]->filter[i] = decorr_persistent;
  840|   757k|      decorr_persistent = (WORD8 *)decorr_persistent +
  841|   757k|                          IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|   757k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  842|   757k|                              sizeof(ia_mps_dec_decorr_filter_instance_struct), BYTE_ALIGN_8);
  843|   757k|    }
  844|  16.1k|  }
  845|       |
  846|  3.23k|  if (dec_type == 1) {
  ------------------
  |  Branch (846:7): [True: 0, False: 3.23k]
  ------------------
  847|      0|    for (k = 0; k < MAX_NO_DECORR_CHANNELS; k++) {
  ------------------
  |  |   84|      0|#define MAX_NO_DECORR_CHANNELS (5)
  ------------------
  |  Branch (847:17): [True: 0, False: 0]
  ------------------
  848|      0|      for (i = 0; i < hybrid_bands; i++) {
  ------------------
  |  Branch (848:19): [True: 0, False: 0]
  ------------------
  849|      0|        pstr_mps_state->ap_decor[k]->filter[i]->numerator_real = decorr_persistent;
  850|      0|        decorr_persistent =
  851|      0|            (WORD8 *)decorr_persistent +
  852|      0|            IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|      0|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  853|      0|                MAX_NUM_DEN_LENGTH *
  854|      0|                    sizeof(pstr_mps_state->ap_decor[k]->filter[i]->numerator_real[0]),
  855|      0|                BYTE_ALIGN_8);
  856|      0|        pstr_mps_state->ap_decor[k]->filter[i]->denominator_real = decorr_persistent;
  857|      0|        decorr_persistent =
  858|      0|            (WORD8 *)decorr_persistent +
  859|      0|            IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|      0|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  860|      0|                MAX_NUM_DEN_LENGTH *
  861|      0|                    sizeof(pstr_mps_state->ap_decor[k]->filter[i]->denominator_real[0]),
  862|      0|                BYTE_ALIGN_8);
  863|      0|        pstr_mps_state->ap_decor[k]->filter[i]->numerator_imag = decorr_persistent;
  864|      0|        decorr_persistent =
  865|      0|            (WORD8 *)decorr_persistent +
  866|      0|            IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|      0|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  867|      0|                MAX_NUM_DEN_LENGTH *
  868|      0|                    sizeof(pstr_mps_state->ap_decor[k]->filter[i]->numerator_imag[0]),
  869|      0|                BYTE_ALIGN_8);
  870|      0|        pstr_mps_state->ap_decor[k]->filter[i]->denominator_imag = decorr_persistent;
  871|      0|        decorr_persistent =
  872|      0|            (WORD8 *)decorr_persistent +
  873|      0|            IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|      0|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  874|      0|                MAX_NUM_DEN_LENGTH *
  875|      0|                    sizeof(pstr_mps_state->ap_decor[k]->filter[i]->denominator_imag[0]),
  876|      0|                BYTE_ALIGN_8);
  877|      0|      }
  878|      0|    }
  879|  3.23k|  } else {
  880|  19.4k|    for (k = 0; k < MAX_NO_DECORR_CHANNELS; k++) {
  ------------------
  |  |   84|  19.4k|#define MAX_NO_DECORR_CHANNELS (5)
  ------------------
  |  Branch (880:17): [True: 16.1k, False: 3.23k]
  ------------------
  881|   773k|      for (i = 0; i < hybrid_bands; i++) {
  ------------------
  |  Branch (881:19): [True: 757k, False: 16.1k]
  ------------------
  882|   757k|        pstr_mps_state->ap_decor[k]->filter[i]->numerator_real = decorr_persistent;
  883|   757k|        decorr_persistent =
  884|   757k|            (WORD8 *)decorr_persistent +
  885|   757k|            IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|   757k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  886|   757k|                MAX_NUM_DEN_LENGTH *
  887|   757k|                    sizeof(pstr_mps_state->ap_decor[k]->filter[i]->numerator_real[0]),
  888|   757k|                BYTE_ALIGN_8);
  889|   757k|        pstr_mps_state->ap_decor[k]->filter[i]->denominator_real = decorr_persistent;
  890|   757k|        decorr_persistent =
  891|   757k|            (WORD8 *)decorr_persistent +
  892|   757k|            IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|   757k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  893|   757k|                MAX_NUM_DEN_LENGTH *
  894|   757k|                    sizeof(pstr_mps_state->ap_decor[k]->filter[i]->denominator_real[0]),
  895|   757k|                BYTE_ALIGN_8);
  896|   757k|      }
  897|  16.1k|    }
  898|  3.23k|  }
  899|       |
  900|  19.4k|  for (k = 0; k < MAX_NO_DECORR_CHANNELS; k++) {
  ------------------
  |  |   84|  19.4k|#define MAX_NO_DECORR_CHANNELS (5)
  ------------------
  |  Branch (900:15): [True: 16.1k, False: 3.23k]
  ------------------
  901|   773k|    for (i = 0; i < hybrid_bands; i++) {
  ------------------
  |  Branch (901:17): [True: 757k, False: 16.1k]
  ------------------
  902|   757k|      pstr_mps_state->ap_decor[k]->filter[i]->state_real = decorr_persistent;
  903|   757k|      decorr_persistent =
  904|   757k|          (WORD8 *)decorr_persistent +
  905|   757k|          IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|   757k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  906|   757k|              MAX_NUM_DEN_LENGTH * sizeof(pstr_mps_state->ap_decor[k]->filter[i]->state_real[0]),
  907|   757k|              BYTE_ALIGN_8);
  908|   757k|      pstr_mps_state->ap_decor[k]->filter[i]->state_imag = decorr_persistent;
  909|   757k|      decorr_persistent =
  910|   757k|          (WORD8 *)decorr_persistent +
  911|   757k|          IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|   757k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  912|   757k|              MAX_NUM_DEN_LENGTH * sizeof(pstr_mps_state->ap_decor[k]->filter[i]->state_imag[0]),
  913|   757k|              BYTE_ALIGN_8);
  914|   757k|    }
  915|  16.1k|  }
  916|       |
  917|  19.4k|  for (k = 0; k < MAX_NO_DECORR_CHANNELS; k++) {
  ------------------
  |  |   84|  19.4k|#define MAX_NO_DECORR_CHANNELS (5)
  ------------------
  |  Branch (917:15): [True: 16.1k, False: 3.23k]
  ------------------
  918|  16.1k|    pstr_mps_state->ap_decor[k]->delay_buffer_real = (WORD32 **)decorr_persistent;
  919|  16.1k|    decorr_persistent =
  920|  16.1k|        (WORD8 *)decorr_persistent +
  921|  16.1k|        IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|  16.1k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  922|  16.1k|            hybrid_bands * sizeof(pstr_mps_state->ap_decor[k]->delay_buffer_real[0]),
  923|  16.1k|            BYTE_ALIGN_8);
  924|   773k|    for (i = 0; i < hybrid_bands; i++) {
  ------------------
  |  Branch (924:17): [True: 757k, False: 16.1k]
  ------------------
  925|   757k|      pstr_mps_state->ap_decor[k]->delay_buffer_real[i] = (WORD32 *)decorr_persistent;
  926|       |
  927|   757k|      decorr_persistent = (WORD8 *)decorr_persistent +
  928|   757k|                          IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|   757k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  929|   757k|                              (MAX_TIME_SLOTS + MAX_NO_TIME_SLOTS_DELAY) *
  930|   757k|                                  sizeof(pstr_mps_state->ap_decor[k]->delay_buffer_real[i][0]),
  931|   757k|                              BYTE_ALIGN_8);
  932|   757k|    }
  933|       |
  934|  16.1k|    pstr_mps_state->ap_decor[k]->delay_buffer_imag =
  935|  16.1k|        (WORD32 **)ALIGN_SIZE64((SIZE_T)(decorr_persistent));
  ------------------
  |  |   66|  16.1k|#define ALIGN_SIZE64(x) ((((x) + 7) >> 3) << 3)
  ------------------
  936|  16.1k|    decorr_persistent =
  937|  16.1k|        (WORD8 *)decorr_persistent +
  938|  16.1k|        IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|  16.1k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  939|  16.1k|            hybrid_bands * sizeof(pstr_mps_state->ap_decor[k]->delay_buffer_imag[0]),
  940|  16.1k|            BYTE_ALIGN_8);
  941|       |
  942|   773k|    for (i = 0; i < hybrid_bands; i++) {
  ------------------
  |  Branch (942:17): [True: 757k, False: 16.1k]
  ------------------
  943|   757k|      pstr_mps_state->ap_decor[k]->delay_buffer_imag[i] =
  944|   757k|          (WORD32 *)ALIGN_SIZE64((SIZE_T)(decorr_persistent));
  ------------------
  |  |   66|   757k|#define ALIGN_SIZE64(x) ((((x) + 7) >> 3) << 3)
  ------------------
  945|       |
  946|   757k|      decorr_persistent = (WORD8 *)decorr_persistent +
  947|   757k|                          IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|   757k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  948|   757k|                              (MAX_TIME_SLOTS + MAX_NO_TIME_SLOTS_DELAY) *
  949|   757k|                                  sizeof(pstr_mps_state->ap_decor[k]->delay_buffer_imag[i][0]),
  950|   757k|                              BYTE_ALIGN_8);
  951|   757k|    }
  952|  16.1k|  }
  953|  3.23k|}
ixheaacd_bs_frame_init:
  955|  3.23k|VOID ixheaacd_bs_frame_init(ia_heaac_mps_state_struct *pstr_mps_state) {
  956|  3.23k|  ia_mps_dec_spatial_bs_frame_struct *bs_frame = pstr_mps_state->bs_frame;
  957|       |
  958|  3.23k|  memset(bs_frame->ott_cld_idx_prev, 0,
  959|  3.23k|         MAX_NUM_OTT * MAX_PARAMETER_BANDS * sizeof(bs_frame->ott_cld_idx_prev[0][0]));
  ------------------
  |  |   56|  3.23k|#define MAX_NUM_OTT (5)
  ------------------
                       MAX_NUM_OTT * MAX_PARAMETER_BANDS * sizeof(bs_frame->ott_cld_idx_prev[0][0]));
  ------------------
  |  |   55|  3.23k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  960|  3.23k|  memset(bs_frame->ott_icc_idx_prev, 0,
  961|  3.23k|         MAX_NUM_OTT * MAX_PARAMETER_BANDS * sizeof(bs_frame->ott_icc_idx_prev[0][0]));
  ------------------
  |  |   56|  3.23k|#define MAX_NUM_OTT (5)
  ------------------
                       MAX_NUM_OTT * MAX_PARAMETER_BANDS * sizeof(bs_frame->ott_icc_idx_prev[0][0]));
  ------------------
  |  |   55|  3.23k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  962|  3.23k|  memset(bs_frame->cmp_ott_cld_idx_prev, 0,
  963|  3.23k|         MAX_NUM_OTT * MAX_PARAMETER_BANDS * sizeof(bs_frame->cmp_ott_cld_idx_prev[0][0]));
  ------------------
  |  |   56|  3.23k|#define MAX_NUM_OTT (5)
  ------------------
                       MAX_NUM_OTT * MAX_PARAMETER_BANDS * sizeof(bs_frame->cmp_ott_cld_idx_prev[0][0]));
  ------------------
  |  |   55|  3.23k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  964|  3.23k|  memset(bs_frame->cmp_ott_icc_idx_prev, 0,
  965|  3.23k|         MAX_NUM_OTT * MAX_PARAMETER_BANDS * sizeof(bs_frame->cmp_ott_icc_idx_prev[0][0]));
  ------------------
  |  |   56|  3.23k|#define MAX_NUM_OTT (5)
  ------------------
                       MAX_NUM_OTT * MAX_PARAMETER_BANDS * sizeof(bs_frame->cmp_ott_icc_idx_prev[0][0]));
  ------------------
  |  |   55|  3.23k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  966|       |
  967|  3.23k|  memset(bs_frame->ttt_cpc_1_idx_prev, 0,
  968|  3.23k|         MAX_NUM_TTT * MAX_PARAMETER_BANDS * sizeof(bs_frame->ttt_cpc_1_idx_prev[0][0]));
  ------------------
  |  |   57|  3.23k|#define MAX_NUM_TTT (1)
  ------------------
                       MAX_NUM_TTT * MAX_PARAMETER_BANDS * sizeof(bs_frame->ttt_cpc_1_idx_prev[0][0]));
  ------------------
  |  |   55|  3.23k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  969|  3.23k|  memset(bs_frame->ttt_cpc_2_idx_prev, 0,
  970|  3.23k|         MAX_NUM_TTT * MAX_PARAMETER_BANDS * sizeof(bs_frame->ttt_cpc_2_idx_prev[0][0]));
  ------------------
  |  |   57|  3.23k|#define MAX_NUM_TTT (1)
  ------------------
                       MAX_NUM_TTT * MAX_PARAMETER_BANDS * sizeof(bs_frame->ttt_cpc_2_idx_prev[0][0]));
  ------------------
  |  |   55|  3.23k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  971|  3.23k|  memset(bs_frame->ttt_cld_1_idx_prev, 0,
  972|  3.23k|         MAX_NUM_TTT * MAX_PARAMETER_BANDS * sizeof(bs_frame->ttt_cld_1_idx_prev[0][0]));
  ------------------
  |  |   57|  3.23k|#define MAX_NUM_TTT (1)
  ------------------
                       MAX_NUM_TTT * MAX_PARAMETER_BANDS * sizeof(bs_frame->ttt_cld_1_idx_prev[0][0]));
  ------------------
  |  |   55|  3.23k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  973|  3.23k|  memset(bs_frame->ttt_cld_2_idx_prev, 0,
  974|  3.23k|         MAX_NUM_TTT * MAX_PARAMETER_BANDS * sizeof(bs_frame->ttt_cld_2_idx_prev[0][0]));
  ------------------
  |  |   57|  3.23k|#define MAX_NUM_TTT (1)
  ------------------
                       MAX_NUM_TTT * MAX_PARAMETER_BANDS * sizeof(bs_frame->ttt_cld_2_idx_prev[0][0]));
  ------------------
  |  |   55|  3.23k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  975|  3.23k|  memset(bs_frame->ttt_icc_idx_prev, 0,
  976|  3.23k|         MAX_NUM_TTT * MAX_PARAMETER_BANDS * sizeof(bs_frame->ttt_icc_idx_prev[0][0]));
  ------------------
  |  |   57|  3.23k|#define MAX_NUM_TTT (1)
  ------------------
                       MAX_NUM_TTT * MAX_PARAMETER_BANDS * sizeof(bs_frame->ttt_icc_idx_prev[0][0]));
  ------------------
  |  |   55|  3.23k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  977|  3.23k|  memset(bs_frame->cmp_ttt_cpc_1_idx_prev, 0,
  978|  3.23k|         MAX_NUM_TTT * MAX_PARAMETER_BANDS * sizeof(bs_frame->cmp_ttt_cpc_1_idx_prev[0][0]));
  ------------------
  |  |   57|  3.23k|#define MAX_NUM_TTT (1)
  ------------------
                       MAX_NUM_TTT * MAX_PARAMETER_BANDS * sizeof(bs_frame->cmp_ttt_cpc_1_idx_prev[0][0]));
  ------------------
  |  |   55|  3.23k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  979|  3.23k|  memset(bs_frame->cmp_ttt_cpc_2_idx_prev, 0,
  980|  3.23k|         MAX_NUM_TTT * MAX_PARAMETER_BANDS * sizeof(bs_frame->cmp_ttt_cpc_2_idx_prev[0][0]));
  ------------------
  |  |   57|  3.23k|#define MAX_NUM_TTT (1)
  ------------------
                       MAX_NUM_TTT * MAX_PARAMETER_BANDS * sizeof(bs_frame->cmp_ttt_cpc_2_idx_prev[0][0]));
  ------------------
  |  |   55|  3.23k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  981|  3.23k|  memset(bs_frame->cmp_ttt_cld_1_idx_prev, 0,
  982|  3.23k|         MAX_NUM_TTT * MAX_PARAMETER_BANDS * sizeof(bs_frame->cmp_ttt_cld_1_idx_prev[0][0]));
  ------------------
  |  |   57|  3.23k|#define MAX_NUM_TTT (1)
  ------------------
                       MAX_NUM_TTT * MAX_PARAMETER_BANDS * sizeof(bs_frame->cmp_ttt_cld_1_idx_prev[0][0]));
  ------------------
  |  |   55|  3.23k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  983|  3.23k|  memset(bs_frame->cmp_ttt_cld_2_idx_prev, 0,
  984|  3.23k|         MAX_NUM_TTT * MAX_PARAMETER_BANDS * sizeof(bs_frame->cmp_ttt_cld_2_idx_prev[0][0]));
  ------------------
  |  |   57|  3.23k|#define MAX_NUM_TTT (1)
  ------------------
                       MAX_NUM_TTT * MAX_PARAMETER_BANDS * sizeof(bs_frame->cmp_ttt_cld_2_idx_prev[0][0]));
  ------------------
  |  |   55|  3.23k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  985|  3.23k|  memset(bs_frame->cmp_ttt_icc_idx_prev, 0,
  986|  3.23k|         MAX_NUM_TTT * MAX_PARAMETER_BANDS * sizeof(bs_frame->cmp_ttt_icc_idx_prev[0][0]));
  ------------------
  |  |   57|  3.23k|#define MAX_NUM_TTT (1)
  ------------------
                       MAX_NUM_TTT * MAX_PARAMETER_BANDS * sizeof(bs_frame->cmp_ttt_icc_idx_prev[0][0]));
  ------------------
  |  |   55|  3.23k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  987|       |
  988|  3.23k|  memset(bs_frame->arbdmx_gain_idx_prev, 0,
  989|  3.23k|         MAX_INPUT_CHANNELS_MPS * MAX_PARAMETER_BANDS *
  ------------------
  |  |   66|  3.23k|#define MAX_INPUT_CHANNELS_MPS (6)
  ------------------
                       MAX_INPUT_CHANNELS_MPS * MAX_PARAMETER_BANDS *
  ------------------
  |  |   55|  3.23k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  990|  3.23k|             sizeof(bs_frame->arbdmx_gain_idx_prev[0][0]));
  991|  3.23k|  memset(bs_frame->cmp_arbdmx_gain_idx_prev, 0,
  992|  3.23k|         MAX_INPUT_CHANNELS_MPS * MAX_PARAMETER_BANDS *
  ------------------
  |  |   66|  3.23k|#define MAX_INPUT_CHANNELS_MPS (6)
  ------------------
                       MAX_INPUT_CHANNELS_MPS * MAX_PARAMETER_BANDS *
  ------------------
  |  |   55|  3.23k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  993|  3.23k|             sizeof(bs_frame->cmp_arbdmx_gain_idx_prev[0][0]));
  994|  3.23k|}
ixheaacd_modules_init:
  996|  3.23k|IA_ERRORCODE ixheaacd_modules_init(ia_heaac_mps_state_struct *pstr_mps_state) {
  997|  3.23k|  IA_ERRORCODE err_code = IA_NO_ERROR;
  ------------------
  |  |   23|  3.23k|#define IA_NO_ERROR 0x00000000
  ------------------
  998|  3.23k|  ia_mps_dec_thyb_filter_state_struct *hyb_filter_state =
  999|  3.23k|      pstr_mps_state->mps_persistent_mem.hyb_filter_state;
 1000|  3.23k|  WORD32 up_mix_type = pstr_mps_state->up_mix_type;
 1001|  3.23k|  WORD32 in_channels = pstr_mps_state->num_input_channels;
 1002|  3.23k|  WORD32 n_ch;
 1003|  3.23k|  if (pstr_mps_state->smooth_config) ixheaacd_init_tonality(pstr_mps_state);
  ------------------
  |  Branch (1003:7): [True: 0, False: 3.23k]
  ------------------
 1004|       |
 1005|  3.23k|  if (up_mix_type != 2) {
  ------------------
  |  Branch (1005:7): [True: 3.23k, False: 0]
  ------------------
 1006|  3.23k|    if (pstr_mps_state->temp_shape_config == 2) {
  ------------------
  |  Branch (1006:9): [True: 1.04k, False: 2.19k]
  ------------------
 1007|  1.04k|      ixheaacd_init_bb_env(pstr_mps_state);
 1008|  1.04k|    }
 1009|  3.23k|  }
 1010|       |
 1011|  3.23k|  if (pstr_mps_state->scaling_enable == 1) ixheaacd_sb_tp_init(pstr_mps_state);
  ------------------
  |  Branch (1011:7): [True: 1.64k, False: 1.59k]
  ------------------
 1012|       |
 1013|  3.23k|  err_code = ixheaacd_syn_filt_bank_init(pstr_mps_state->syn, pstr_mps_state->qmf_bands);
 1014|       |
 1015|  3.23k|  if (err_code != IA_NO_ERROR) return err_code;
  ------------------
  |  |   23|  3.23k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (1015:7): [True: 0, False: 3.23k]
  ------------------
 1016|       |
 1017|  13.4k|  for (n_ch = 0; n_ch < in_channels; n_ch++) {
  ------------------
  |  Branch (1017:18): [True: 10.1k, False: 3.23k]
  ------------------
 1018|  10.1k|    ixheaacd_init_ana_hyb_filt_bank(&hyb_filter_state[n_ch]);
 1019|  10.1k|  }
 1020|       |
 1021|  13.4k|  for (n_ch = 0; n_ch < in_channels; n_ch++) {
  ------------------
  |  Branch (1021:18): [True: 10.1k, False: 3.23k]
  ------------------
 1022|  10.1k|    pstr_mps_state->aux_struct->arbdmx_alpha[n_ch] = 0;
 1023|  10.1k|  }
 1024|       |
 1025|  3.23k|  memset(&pstr_mps_state->aux_struct->ttt_cld_1[0], 0, 8 * 28 * sizeof(WORD32));
 1026|       |
 1027|  3.23k|  if (pstr_mps_state->residual_coding) {
  ------------------
  |  Branch (1027:7): [True: 540, False: 2.69k]
  ------------------
 1028|    540|    WORD32 offset = in_channels;
 1029|  2.79k|    for (n_ch = 0; n_ch < pstr_mps_state->num_ott_boxes + pstr_mps_state->num_ttt_boxes; n_ch++) {
  ------------------
  |  Branch (1029:20): [True: 2.25k, False: 540]
  ------------------
 1030|  2.25k|      if (pstr_mps_state->res_bands[n_ch] > 0) {
  ------------------
  |  Branch (1030:11): [True: 686, False: 1.57k]
  ------------------
 1031|    686|        ixheaacd_init_ana_hyb_filt_bank(&hyb_filter_state[offset + n_ch]);
 1032|    686|      }
 1033|  2.25k|    }
 1034|    540|  }
 1035|       |
 1036|  3.23k|  if (pstr_mps_state->arbitrary_downmix == 2) {
  ------------------
  |  Branch (1036:7): [True: 251, False: 2.98k]
  ------------------
 1037|    251|    WORD32 offset = in_channels + pstr_mps_state->num_ott_boxes + pstr_mps_state->num_ttt_boxes;
 1038|    610|    for (n_ch = 0; n_ch < in_channels; n_ch++) {
  ------------------
  |  Branch (1038:20): [True: 359, False: 251]
  ------------------
 1039|    359|      ixheaacd_init_ana_hyb_filt_bank(&hyb_filter_state[offset + n_ch]);
 1040|    359|    }
 1041|    251|  }
 1042|  3.23k|  if (up_mix_type == 1) {
  ------------------
  |  Branch (1042:7): [True: 0, False: 3.23k]
  ------------------
 1043|      0|    ixheaacd_init_blind(pstr_mps_state);
 1044|      0|  }
 1045|       |
 1046|  3.23k|  pstr_mps_state->parse_next_bitstream_frame = 1;
 1047|       |
 1048|  3.23k|  ixheaacd_bs_frame_init(pstr_mps_state);
 1049|       |
 1050|  3.23k|  return err_code;
 1051|  3.23k|}
ixheaacd_header_parse:
 1053|  3.32k|IA_ERRORCODE ixheaacd_header_parse(ia_heaac_mps_state_struct *pstr_mps_state) {
 1054|  3.32k|  IA_ERRORCODE err_code = IA_NO_ERROR;
  ------------------
  |  |   23|  3.32k|#define IA_NO_ERROR 0x00000000
  ------------------
 1055|  3.32k|  WORD32 up_mix_type = pstr_mps_state->up_mix_type;
 1056|  3.32k|  WORD32 sac_header_len, alignment_bits = 0;
 1057|  3.32k|  ia_bit_buf_struct *mps_bit_buf = pstr_mps_state->ptr_mps_bit_buff;
 1058|       |
 1059|  3.32k|  if (up_mix_type != 1) {
  ------------------
  |  Branch (1059:7): [True: 3.32k, False: 0]
  ------------------
 1060|  3.32k|    pstr_mps_state->sac_time_align_flag = ixheaacd_read_bits_buf(mps_bit_buf, 1);
 1061|       |
 1062|  3.32k|    sac_header_len = ixheaacd_read_bits_buf(mps_bit_buf, 7);
 1063|  3.32k|    if (sac_header_len == 127) {
  ------------------
  |  Branch (1063:9): [True: 5, False: 3.32k]
  ------------------
 1064|      5|      sac_header_len += ixheaacd_read_bits_buf(mps_bit_buf, 16);
 1065|      5|    }
 1066|       |
 1067|  3.32k|    err_code = ixheaacd_parse_specific_config(pstr_mps_state, sac_header_len);
 1068|  3.32k|    if (err_code != IA_NO_ERROR) return err_code;
  ------------------
  |  |   23|  3.32k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (1068:9): [True: 49, False: 3.28k]
  ------------------
 1069|       |
 1070|  3.28k|    if (pstr_mps_state->bs_config.bs_temp_shape_config == 1) pstr_mps_state->scaling_enable = 1;
  ------------------
  |  Branch (1070:9): [True: 1.64k, False: 1.63k]
  ------------------
 1071|       |
 1072|  3.28k|    ixheaacd_byte_align(mps_bit_buf, &alignment_bits);
 1073|  3.28k|  } else {
 1074|      0|    err_code = ixheaacd_default_specific_config(pstr_mps_state, pstr_mps_state->sampling_freq);
 1075|      0|    if (err_code != IA_NO_ERROR) return err_code;
  ------------------
  |  |   23|      0|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (1075:9): [True: 0, False: 0]
  ------------------
 1076|      0|  }
 1077|  3.28k|  return err_code;
 1078|  3.32k|}
ixheaacd_aac_mps_create:
 1080|  3.24k|IA_ERRORCODE ixheaacd_aac_mps_create(ia_heaac_mps_state_struct *pstr_mps_state) {
 1081|  3.24k|  WORD32 i, j, k;
 1082|  3.24k|  WORD32 *prev_gain_at = pstr_mps_state->mps_persistent_mem.prev_gain_at;
 1083|  3.24k|  IA_ERRORCODE err_code = IA_NO_ERROR;
  ------------------
  |  |   23|  3.24k|#define IA_NO_ERROR 0x00000000
  ------------------
 1084|  3.24k|  WORD32 dec_type = pstr_mps_state->dec_type;
 1085|  3.24k|  WORD32 up_mix_type = pstr_mps_state->up_mix_type;
 1086|  3.24k|  WORD32 in_channels = pstr_mps_state->num_input_channels;
 1087|       |
 1088|  3.24k|  if (pstr_mps_state == 0) return IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL;
  ------------------
  |  |   83|      0|#define IA_XHEAAC_DEC_INIT_FATAL_DEC_INIT_FAIL 0xFFFF9000
  ------------------
  |  Branch (1088:7): [True: 0, False: 3.24k]
  ------------------
 1089|       |
 1090|  3.24k|  pstr_mps_state->num_parameter_sets = 1;
 1091|       |
 1092|  29.2k|  for (i = 0; i < MAX_OUTPUT_CHANNELS_AT_MPS; i++) {
  ------------------
  |  |   86|  29.2k|#define MAX_OUTPUT_CHANNELS_AT_MPS (8)
  ------------------
  |  Branch (1092:15): [True: 25.9k, False: 3.24k]
  ------------------
 1093|   753k|    for (j = 0; j < MAX_PARAMETER_BANDS; j++) {
  ------------------
  |  |   55|   753k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  |  Branch (1093:17): [True: 727k, False: 25.9k]
  ------------------
 1094|   727k|      *prev_gain_at++ = ONE_IN_Q15;
  ------------------
  |  |   41|   727k|#define ONE_IN_Q15 (32768)
  ------------------
 1095|   727k|    }
 1096|  25.9k|  }
 1097|       |
 1098|  13.4k|  for (i = 0; i < in_channels; i++) {
  ------------------
  |  Branch (1098:15): [True: 10.2k, False: 3.24k]
  ------------------
 1099|  10.2k|    ixheaacd_ana_filter_bank_init(pstr_mps_state, &(pstr_mps_state->qmf_bank[i]));
 1100|  10.2k|  }
 1101|       |
 1102|  3.24k|  ixheaacd_syn_filter_bank_create(pstr_mps_state);
 1103|       |
 1104|  3.24k|  err_code = ixheaacd_set_current_state_parameters(pstr_mps_state);
 1105|  3.24k|  if (err_code != IA_NO_ERROR) return err_code;
  ------------------
  |  |   23|  3.24k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (1105:7): [True: 9, False: 3.23k]
  ------------------
 1106|       |
 1107|  3.23k|  err_code = ixheaacd_set_m2_params(pstr_mps_state);
 1108|  3.23k|  if (err_code != IA_NO_ERROR) return err_code;
  ------------------
  |  |   23|  3.23k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (1108:7): [True: 0, False: 3.23k]
  ------------------
 1109|       |
 1110|  3.23k|  err_code = ixheaacd_mdct2qmf_create(pstr_mps_state);
 1111|  3.23k|  if (err_code != IA_NO_ERROR) return err_code;
  ------------------
  |  |   23|  3.23k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (1111:7): [True: 0, False: 3.23k]
  ------------------
 1112|       |
 1113|  3.23k|  ixheaacd_decorr_init(pstr_mps_state);
 1114|       |
 1115|  19.4k|  for (k = 0; k < MAX_NO_DECORR_CHANNELS; k++) {
  ------------------
  |  |   84|  19.4k|#define MAX_NO_DECORR_CHANNELS (5)
  ------------------
  |  Branch (1115:15): [True: 16.1k, False: 3.23k]
  ------------------
 1116|  16.1k|    WORD32 idec;
 1117|       |
 1118|  16.1k|    if (up_mix_type == 3) {
  ------------------
  |  Branch (1118:9): [True: 0, False: 16.1k]
  ------------------
 1119|      0|      idec = 0;
 1120|  16.1k|    } else {
 1121|  16.1k|      idec = k;
 1122|  16.1k|    }
 1123|       |
 1124|  16.1k|    err_code = ixheaacd_decorr_create((pstr_mps_state->ap_decor[k]), pstr_mps_state->hybrid_bands,
 1125|  16.1k|                                      idec, dec_type, pstr_mps_state->decorr_config,
 1126|  16.1k|                                      &(pstr_mps_state->ia_mps_dec_mps_table));
 1127|  16.1k|    if (err_code != IA_NO_ERROR) return err_code;
  ------------------
  |  |   23|  16.1k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (1127:9): [True: 1, False: 16.1k]
  ------------------
 1128|  16.1k|  }
 1129|       |
 1130|  3.23k|  err_code = ixheaacd_modules_init(pstr_mps_state);
 1131|       |
 1132|  3.23k|  return err_code;
 1133|  3.23k|}
ixheaacd_wf_table_init:
 1135|  3.32k|VOID ixheaacd_wf_table_init(ia_heaac_mps_state_struct *pstr_mps_state) {
 1136|  3.32k|  WORD32 const **wf = pstr_mps_state->wf_tab.wf;
 1137|  3.32k|  ia_mps_dec_mps_tables_struct *mps_table_ptr = &pstr_mps_state->ia_mps_dec_mps_table;
 1138|       |
 1139|  3.32k|  wf[0] = NULL;
 1140|  3.32k|  wf[1] = ixheaacd_mps_dec_wf_tables.wf_02;
 1141|  3.32k|  wf[2] = ixheaacd_mps_dec_wf_tables.wf_03;
 1142|  3.32k|  wf[3] = ixheaacd_mps_dec_wf_tables.wf_04;
 1143|  3.32k|  wf[4] = NULL;
 1144|  3.32k|  wf[5] = NULL;
 1145|  3.32k|  wf[6] = NULL;
 1146|  3.32k|  wf[7] = NULL;
 1147|  3.32k|  wf[8] = NULL;
 1148|  3.32k|  wf[9] = NULL;
 1149|  3.32k|  wf[10] = NULL;
 1150|  3.32k|  wf[11] = NULL;
 1151|  3.32k|  wf[12] = NULL;
 1152|  3.32k|  wf[13] = NULL;
 1153|  3.32k|  wf[14] = ixheaacd_mps_dec_wf_tables.wf_15;
 1154|  3.32k|  wf[15] = ixheaacd_mps_dec_wf_tables.wf_16;
 1155|  3.32k|  wf[16] = NULL;
 1156|  3.32k|  wf[17] = ixheaacd_mps_dec_wf_tables.wf_18;
 1157|  3.32k|  wf[18] = NULL;
 1158|  3.32k|  wf[19] = NULL;
 1159|  3.32k|  wf[20] = NULL;
 1160|  3.32k|  wf[21] = NULL;
 1161|  3.32k|  wf[22] = NULL;
 1162|  3.32k|  wf[23] = ixheaacd_mps_dec_wf_tables.wf_24;
 1163|  3.32k|  wf[24] = NULL;
 1164|  3.32k|  wf[25] = NULL;
 1165|  3.32k|  wf[26] = NULL;
 1166|  3.32k|  wf[27] = NULL;
 1167|  3.32k|  wf[28] = NULL;
 1168|  3.32k|  wf[29] = ixheaacd_mps_dec_wf_tables.wf_30;
 1169|  3.32k|  wf[30] = NULL;
 1170|  3.32k|  wf[31] = ixheaacd_mps_dec_wf_tables.wf_32;
 1171|       |
 1172|  3.32k|  mps_table_ptr->wf_tab_ptr = &(pstr_mps_state->wf_tab);
 1173|  3.32k|}
ixheaacd_res_huff_tables_init:
 1175|  3.32k|VOID ixheaacd_res_huff_tables_init(ia_mps_dec_residual_aac_tables_struct *aac_tables_ptr) {
 1176|  3.32k|  aac_tables_ptr->code_book[0] = 0;
 1177|  3.32k|  aac_tables_ptr->code_book[1] = aac_tables_ptr->res_huffmann_tables_ptr->huffman_code_book_1;
 1178|  3.32k|  aac_tables_ptr->code_book[2] = aac_tables_ptr->res_huffmann_tables_ptr->huffman_code_book_2;
 1179|  3.32k|  aac_tables_ptr->code_book[3] = aac_tables_ptr->res_huffmann_tables_ptr->huffman_code_book_3;
 1180|  3.32k|  aac_tables_ptr->code_book[4] = aac_tables_ptr->res_huffmann_tables_ptr->huffman_code_book_4;
 1181|  3.32k|  aac_tables_ptr->code_book[5] = aac_tables_ptr->res_huffmann_tables_ptr->huffman_code_book_5;
 1182|  3.32k|  aac_tables_ptr->code_book[6] = aac_tables_ptr->res_huffmann_tables_ptr->huffman_code_book_6;
 1183|  3.32k|  aac_tables_ptr->code_book[7] = aac_tables_ptr->res_huffmann_tables_ptr->huffman_code_book_7;
 1184|  3.32k|  aac_tables_ptr->code_book[8] = aac_tables_ptr->res_huffmann_tables_ptr->huffman_code_book_8;
 1185|  3.32k|  aac_tables_ptr->code_book[9] = aac_tables_ptr->res_huffmann_tables_ptr->huffman_code_book_9;
 1186|  3.32k|  aac_tables_ptr->code_book[10] = aac_tables_ptr->res_huffmann_tables_ptr->huffman_code_book_10;
 1187|  3.32k|  aac_tables_ptr->code_book[11] = aac_tables_ptr->res_huffmann_tables_ptr->huffman_code_book_10;
 1188|  3.32k|  aac_tables_ptr->code_book[12] = aac_tables_ptr->res_huffmann_tables_ptr->huffman_code_book_10;
 1189|       |
 1190|  3.32k|  aac_tables_ptr->scale_factor_bands_short[0] =
 1191|  3.32k|      aac_tables_ptr->res_huffmann_tables_ptr->sfb_96_128;
 1192|  3.32k|  aac_tables_ptr->scale_factor_bands_short[1] =
 1193|  3.32k|      aac_tables_ptr->res_huffmann_tables_ptr->sfb_96_128;
 1194|  3.32k|  aac_tables_ptr->scale_factor_bands_short[2] =
 1195|  3.32k|      aac_tables_ptr->res_huffmann_tables_ptr->sfb_96_128;
 1196|  3.32k|  aac_tables_ptr->scale_factor_bands_short[3] =
 1197|  3.32k|      aac_tables_ptr->res_huffmann_tables_ptr->sfb_48_128;
 1198|  3.32k|  aac_tables_ptr->scale_factor_bands_short[4] =
 1199|  3.32k|      aac_tables_ptr->res_huffmann_tables_ptr->sfb_48_128;
 1200|  3.32k|  aac_tables_ptr->scale_factor_bands_short[5] =
 1201|  3.32k|      aac_tables_ptr->res_huffmann_tables_ptr->sfb_48_128;
 1202|  3.32k|  aac_tables_ptr->scale_factor_bands_short[6] =
 1203|  3.32k|      aac_tables_ptr->res_huffmann_tables_ptr->sfb_24_128;
 1204|  3.32k|  aac_tables_ptr->scale_factor_bands_short[7] =
 1205|  3.32k|      aac_tables_ptr->res_huffmann_tables_ptr->sfb_24_128;
 1206|  3.32k|  aac_tables_ptr->scale_factor_bands_short[8] =
 1207|  3.32k|      aac_tables_ptr->res_huffmann_tables_ptr->sfb_16_128;
 1208|  3.32k|  aac_tables_ptr->scale_factor_bands_short[9] =
 1209|  3.32k|      aac_tables_ptr->res_huffmann_tables_ptr->sfb_16_128;
 1210|  3.32k|  aac_tables_ptr->scale_factor_bands_short[10] =
 1211|  3.32k|      aac_tables_ptr->res_huffmann_tables_ptr->sfb_16_128;
 1212|  3.32k|  aac_tables_ptr->scale_factor_bands_short[11] =
 1213|  3.32k|      aac_tables_ptr->res_huffmann_tables_ptr->sfb_8_128;
 1214|  3.32k|  aac_tables_ptr->scale_factor_bands_short[12] =
 1215|  3.32k|      aac_tables_ptr->res_huffmann_tables_ptr->sfb_96_120;
 1216|  3.32k|  aac_tables_ptr->scale_factor_bands_short[13] =
 1217|  3.32k|      aac_tables_ptr->res_huffmann_tables_ptr->sfb_96_120;
 1218|  3.32k|  aac_tables_ptr->scale_factor_bands_short[14] =
 1219|  3.32k|      aac_tables_ptr->res_huffmann_tables_ptr->sfb_96_120;
 1220|  3.32k|  aac_tables_ptr->scale_factor_bands_short[15] =
 1221|  3.32k|      aac_tables_ptr->res_huffmann_tables_ptr->sfb_48_120;
 1222|  3.32k|  aac_tables_ptr->scale_factor_bands_short[16] =
 1223|  3.32k|      aac_tables_ptr->res_huffmann_tables_ptr->sfb_48_120;
 1224|  3.32k|  aac_tables_ptr->scale_factor_bands_short[17] =
 1225|  3.32k|      aac_tables_ptr->res_huffmann_tables_ptr->sfb_48_120;
 1226|  3.32k|  aac_tables_ptr->scale_factor_bands_short[18] =
 1227|  3.32k|      aac_tables_ptr->res_huffmann_tables_ptr->sfb_24_120;
 1228|  3.32k|  aac_tables_ptr->scale_factor_bands_short[19] =
 1229|  3.32k|      aac_tables_ptr->res_huffmann_tables_ptr->sfb_24_120;
 1230|  3.32k|  aac_tables_ptr->scale_factor_bands_short[20] =
 1231|  3.32k|      aac_tables_ptr->res_huffmann_tables_ptr->sfb_16_120;
 1232|  3.32k|  aac_tables_ptr->scale_factor_bands_short[21] =
 1233|  3.32k|      aac_tables_ptr->res_huffmann_tables_ptr->sfb_16_120;
 1234|  3.32k|  aac_tables_ptr->scale_factor_bands_short[22] =
 1235|  3.32k|      aac_tables_ptr->res_huffmann_tables_ptr->sfb_16_120;
 1236|  3.32k|  aac_tables_ptr->scale_factor_bands_short[23] =
 1237|  3.32k|      aac_tables_ptr->res_huffmann_tables_ptr->sfb_8_120;
 1238|       |
 1239|  3.32k|  aac_tables_ptr->scale_factor_bands_long[0] =
 1240|  3.32k|      aac_tables_ptr->res_huffmann_tables_ptr->sfb_96_1024;
 1241|  3.32k|  aac_tables_ptr->scale_factor_bands_long[1] =
 1242|  3.32k|      aac_tables_ptr->res_huffmann_tables_ptr->sfb_96_1024;
 1243|  3.32k|  aac_tables_ptr->scale_factor_bands_long[2] =
 1244|  3.32k|      aac_tables_ptr->res_huffmann_tables_ptr->sfb_64_1024;
 1245|  3.32k|  aac_tables_ptr->scale_factor_bands_long[3] =
 1246|  3.32k|      aac_tables_ptr->res_huffmann_tables_ptr->sfb_48_1024;
 1247|  3.32k|  aac_tables_ptr->scale_factor_bands_long[4] =
 1248|  3.32k|      aac_tables_ptr->res_huffmann_tables_ptr->sfb_48_1024;
 1249|  3.32k|  aac_tables_ptr->scale_factor_bands_long[5] =
 1250|  3.32k|      aac_tables_ptr->res_huffmann_tables_ptr->sfb_32_1024;
 1251|  3.32k|  aac_tables_ptr->scale_factor_bands_long[6] =
 1252|  3.32k|      aac_tables_ptr->res_huffmann_tables_ptr->sfb_24_1024;
 1253|  3.32k|  aac_tables_ptr->scale_factor_bands_long[7] =
 1254|  3.32k|      aac_tables_ptr->res_huffmann_tables_ptr->sfb_24_1024;
 1255|  3.32k|  aac_tables_ptr->scale_factor_bands_long[8] =
 1256|  3.32k|      aac_tables_ptr->res_huffmann_tables_ptr->sfb_16_1024;
 1257|  3.32k|  aac_tables_ptr->scale_factor_bands_long[9] =
 1258|  3.32k|      aac_tables_ptr->res_huffmann_tables_ptr->sfb_16_1024;
 1259|  3.32k|  aac_tables_ptr->scale_factor_bands_long[10] =
 1260|  3.32k|      aac_tables_ptr->res_huffmann_tables_ptr->sfb_16_1024;
 1261|  3.32k|  aac_tables_ptr->scale_factor_bands_long[11] =
 1262|  3.32k|      aac_tables_ptr->res_huffmann_tables_ptr->sfb_8_1024;
 1263|  3.32k|  aac_tables_ptr->scale_factor_bands_long[12] =
 1264|  3.32k|      aac_tables_ptr->res_huffmann_tables_ptr->sfb_96_960;
 1265|  3.32k|  aac_tables_ptr->scale_factor_bands_long[13] =
 1266|  3.32k|      aac_tables_ptr->res_huffmann_tables_ptr->sfb_96_960;
 1267|  3.32k|  aac_tables_ptr->scale_factor_bands_long[14] =
 1268|  3.32k|      aac_tables_ptr->res_huffmann_tables_ptr->sfb_64_960;
 1269|  3.32k|  aac_tables_ptr->scale_factor_bands_long[15] =
 1270|  3.32k|      aac_tables_ptr->res_huffmann_tables_ptr->sfb_48_960;
 1271|  3.32k|  aac_tables_ptr->scale_factor_bands_long[16] =
 1272|  3.32k|      aac_tables_ptr->res_huffmann_tables_ptr->sfb_48_960;
 1273|  3.32k|  aac_tables_ptr->scale_factor_bands_long[17] =
 1274|  3.32k|      aac_tables_ptr->res_huffmann_tables_ptr->sfb_48_960;
 1275|  3.32k|  aac_tables_ptr->scale_factor_bands_long[18] =
 1276|  3.32k|      aac_tables_ptr->res_huffmann_tables_ptr->sfb_24_960;
 1277|  3.32k|  aac_tables_ptr->scale_factor_bands_long[19] =
 1278|  3.32k|      aac_tables_ptr->res_huffmann_tables_ptr->sfb_24_960;
 1279|  3.32k|  aac_tables_ptr->scale_factor_bands_long[20] =
 1280|  3.32k|      aac_tables_ptr->res_huffmann_tables_ptr->sfb_16_960;
 1281|  3.32k|  aac_tables_ptr->scale_factor_bands_long[21] =
 1282|  3.32k|      aac_tables_ptr->res_huffmann_tables_ptr->sfb_16_960;
 1283|  3.32k|  aac_tables_ptr->scale_factor_bands_long[22] =
 1284|  3.32k|      aac_tables_ptr->res_huffmann_tables_ptr->sfb_16_960;
 1285|  3.32k|  aac_tables_ptr->scale_factor_bands_long[23] =
 1286|  3.32k|      aac_tables_ptr->res_huffmann_tables_ptr->sfb_8_960;
 1287|  3.32k|}
ixheaacd_aac_mps_init:
 1333|  3.32k|                                   WORD32 buffer_size, WORD32 sample_rate) {
 1334|  3.32k|  WORD32 i;
 1335|       |
 1336|  3.32k|  VOID *buf_ptr;
 1337|  3.32k|  ia_mps_persistent_mem *persistent_mem =
 1338|  3.32k|      &p_obj_mps_dec->p_state_aac->heaac_mps_handle.mps_persistent_mem;
 1339|       |
 1340|  3.32k|  IA_ERRORCODE err_code = IA_NO_ERROR;
  ------------------
  |  |   23|  3.32k|#define IA_NO_ERROR 0x00000000
  ------------------
 1341|  3.32k|  ia_heaac_mps_state_struct *curr_state = &p_obj_mps_dec->p_state_aac->heaac_mps_handle;
 1342|  3.32k|  ia_mps_spatial_bs_config_struct *p_bs_config = &curr_state->bs_config;
 1343|  3.32k|  curr_state->ec_flag = p_obj_mps_dec->p_state_aac->ec_enable;
 1344|  3.32k|  ixheaacd_table_ptr_init(curr_state);
 1345|       |
 1346|  3.32k|  curr_state->ptr_mps_bit_buff =
 1347|  3.32k|      ixheaacd_create_bit_buf(&curr_state->mps_bit_buf, (UWORD8 *)databuf, buffer_size);
 1348|  3.32k|  curr_state->ptr_mps_bit_buff->cnt_bits += (8 * buffer_size);
 1349|       |
 1350|  3.32k|  curr_state->ptr_mps_bit_buff->xaac_jmp_buf = &p_obj_mps_dec->p_state_aac->xaac_jmp_buf;
 1351|       |
 1352|  3.32k|  if (sample_rate < 27713) {
  ------------------
  |  Branch (1352:7): [True: 2.53k, False: 795]
  ------------------
 1353|  2.53k|    curr_state->qmf_bands = 32;
 1354|  2.53k|  } else if (sample_rate >= 55426) {
  ------------------
  |  Branch (1354:14): [True: 3, False: 792]
  ------------------
 1355|      3|    curr_state->qmf_bands = 128;
 1356|    792|  } else {
 1357|    792|    curr_state->qmf_bands = 64;
 1358|    792|  }
 1359|       |
 1360|  3.32k|  curr_state->sampling_freq = sample_rate;
 1361|  3.32k|  curr_state->num_input_channels = p_obj_mps_dec->p_state_aac->p_config->ui_n_channels;
 1362|  3.32k|  curr_state->bits_per_sample = p_obj_mps_dec->p_state_aac->p_config->ui_pcm_wdsz;
 1363|  3.32k|  curr_state->dec_type = p_bs_config->ui_dec_type;
 1364|  3.32k|  curr_state->up_mix_type = p_bs_config->ui_upmix_type;
 1365|  3.32k|  curr_state->binaural_quality = p_bs_config->ui_binaural_quality;
 1366|  3.32k|  curr_state->hrtf_model = p_bs_config->ui_hrtf_model;
 1367|  3.32k|  curr_state->is_buried_flag = p_bs_config->ui_bs_is_buried;
 1368|       |
 1369|  3.32k|  curr_state->bs_frame = persistent_mem->p_bs_frame;
 1370|       |
 1371|  3.32k|  buf_ptr = persistent_mem->syn_qmf_states_buffer;
 1372|  3.32k|  curr_state->syn = buf_ptr;
 1373|       |
 1374|  3.32k|  curr_state->syn_qmf_bank.sbr_qmf_states_synthesis =
 1375|  3.32k|      (WORD32 *)((WORD8 *)buf_ptr + sizeof(ia_mps_dec_synthesis_interface));
 1376|       |
 1377|  3.32k|  buf_ptr = persistent_mem->ana_qmf_states_buffer;
 1378|       |
 1379|  3.32k|  memset(curr_state->m2_param_present, 0,
 1380|  3.32k|         MAX_M2_OUTPUT * MAX_M2_INPUT * sizeof(curr_state->m2_param_present[0][0]));
  ------------------
  |  |   78|  3.32k|#define MAX_M2_OUTPUT (8)
  ------------------
                       MAX_M2_OUTPUT * MAX_M2_INPUT * sizeof(curr_state->m2_param_present[0][0]));
  ------------------
  |  |   77|  3.32k|#define MAX_M2_INPUT (8)
  ------------------
 1381|  3.32k|  memset(&(curr_state->bs_config), 0, sizeof(ia_mps_spatial_bs_config_struct));
 1382|  3.32k|  memset(&(curr_state->res_block_type), 0,
 1383|  3.32k|         sizeof(WORD32) * MAX_RESIDUAL_CHANNELS_MPS * MAX_RESIDUAL_FRAMES);
  ------------------
  |  |   68|  3.32k|#define MAX_RESIDUAL_CHANNELS_MPS (10)
  ------------------
                       sizeof(WORD32) * MAX_RESIDUAL_CHANNELS_MPS * MAX_RESIDUAL_FRAMES);
  ------------------
  |  |   69|  3.32k|#define MAX_RESIDUAL_FRAMES (4)
  ------------------
 1384|       |
 1385|  3.32k|  curr_state->bs_config.ui_pcm_wdsz = 16;
 1386|  3.32k|  curr_state->bs_config.ui_samp_freq = 48000;
 1387|  3.32k|  curr_state->bs_config.ui_in_channels = 2;
 1388|  3.32k|  curr_state->bs_config.ui_qmf_bands = 64;
 1389|       |
 1390|  3.32k|  err_code = ixheaacd_header_parse(curr_state);
 1391|  3.32k|  if (err_code != IA_NO_ERROR) return err_code;
  ------------------
  |  |   23|  3.32k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (1391:7): [True: 49, False: 3.28k]
  ------------------
 1392|       |
 1393|  13.4k|  for (i = 0; i < curr_state->num_input_channels; i++) {
  ------------------
  |  Branch (1393:15): [True: 10.2k, False: 3.28k]
  ------------------
 1394|  10.2k|    curr_state->qmf_bank[i].qmf_states_buffer = buf_ptr;
 1395|  10.2k|    buf_ptr = (WORD8 *)buf_ptr + QMF_FILTER_STATE_ANA_SIZE_MPS * sizeof(WORD32);
  ------------------
  |  |   90|  10.2k|#define QMF_FILTER_STATE_ANA_SIZE_MPS (640)
  ------------------
 1396|  10.2k|  }
 1397|       |
 1398|  3.28k|  curr_state->i_bytes_consumed_mps = (WORD32)(curr_state->ptr_mps_bit_buff->ptr_read_next -
 1399|  3.28k|                                              curr_state->ptr_mps_bit_buff->ptr_bit_buf_base);
 1400|       |
 1401|  3.28k|  curr_state->bytes_remaining = buffer_size - curr_state->i_bytes_consumed_mps;
 1402|       |
 1403|  3.28k|  if (curr_state->bytes_remaining != 0) {
  ------------------
  |  Branch (1403:7): [True: 3.24k, False: 33]
  ------------------
 1404|   112k|    for (WORD32 ii = 0; ii < curr_state->bytes_remaining; ii++) {
  ------------------
  |  Branch (1404:25): [True: 109k, False: 3.24k]
  ------------------
 1405|   109k|      curr_state->temp_buf[ii] = databuf[ii + curr_state->i_bytes_consumed_mps];
 1406|   109k|    }
 1407|  3.24k|  }
 1408|       |
 1409|  3.28k|  err_code = ixheaacd_aac_mps_create(curr_state);
 1410|  3.28k|  if (err_code != IA_NO_ERROR) return err_code;
  ------------------
  |  |   23|  3.28k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (1410:7): [True: 10, False: 3.27k]
  ------------------
 1411|       |
 1412|  3.27k|  curr_state->mps_init_done = 1;
 1413|  3.27k|  curr_state->first_frame = 1;
 1414|       |
 1415|  3.27k|  return err_code;
 1416|  3.28k|}
ixheaacd_mps_initfuncs.c:ixheaacd_calc_decorr_size:
   74|  28.4k|static WORD32 ixheaacd_calc_decorr_size() {
   75|  28.4k|  WORD32 matrix_alloc_size, decorr_filter_size, num_den_size;
   76|  28.4k|  WORD32 fraction_alloc_size, ducker_create_size, decor_dec_size;
   77|  28.4k|  WORD32 state_alloc_size, alloc_size, dec_type = 0;
   78|       |
   79|  28.4k|  matrix_alloc_size =
   80|  28.4k|      MAX_NO_DECORR_CHANNELS * 2 *
  ------------------
  |  |   84|  28.4k|#define MAX_NO_DECORR_CHANNELS (5)
  ------------------
   81|  28.4k|      (MAX_HYBRID_BANDS *
  ------------------
  |  |   65|  28.4k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  28.4k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
   82|  28.4k|           IXHEAAC_GET_SIZE_ALIGNED((MAX_TIME_SLOTS + MAX_NO_TIME_SLOTS_DELAY) * sizeof(WORD32),
  ------------------
  |  |   87|  28.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
   83|  28.4k|                                    BYTE_ALIGN_8) +
   84|  28.4k|       IXHEAAC_GET_SIZE_ALIGNED(MAX_HYBRID_BANDS * sizeof(WORD32 *), BYTE_ALIGN_8));
  ------------------
  |  |   87|  28.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
   85|  28.4k|  decorr_filter_size =
   86|  28.4k|      MAX_NO_DECORR_CHANNELS * MAX_HYBRID_BANDS *
  ------------------
  |  |   84|  28.4k|#define MAX_NO_DECORR_CHANNELS (5)
  ------------------
                    MAX_NO_DECORR_CHANNELS * MAX_HYBRID_BANDS *
  ------------------
  |  |   65|  28.4k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  28.4k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
   87|  28.4k|      IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_mps_dec_decorr_filter_instance_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  28.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
   88|  28.4k|  num_den_size = MAX_NO_DECORR_CHANNELS * MAX_HYBRID_BANDS *
  ------------------
  |  |   84|  28.4k|#define MAX_NO_DECORR_CHANNELS (5)
  ------------------
                num_den_size = MAX_NO_DECORR_CHANNELS * MAX_HYBRID_BANDS *
  ------------------
  |  |   65|  28.4k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  28.4k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
   89|  28.4k|                 IXHEAAC_GET_SIZE_ALIGNED(MAX_NUM_DEN_LENGTH * sizeof(WORD32), BYTE_ALIGN_8);
  ------------------
  |  |   87|  28.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
   90|       |
   91|  28.4k|  if (dec_type == 1)
  ------------------
  |  Branch (91:7): [True: 0, False: 28.4k]
  ------------------
   92|      0|    fraction_alloc_size = 4 * num_den_size;
   93|  28.4k|  else
   94|  28.4k|    fraction_alloc_size = 2 * num_den_size;
   95|       |
   96|  28.4k|  state_alloc_size = MAX_NO_DECORR_CHANNELS * MAX_HYBRID_BANDS * 2 *
  ------------------
  |  |   84|  28.4k|#define MAX_NO_DECORR_CHANNELS (5)
  ------------------
                state_alloc_size = MAX_NO_DECORR_CHANNELS * MAX_HYBRID_BANDS * 2 *
  ------------------
  |  |   65|  28.4k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  28.4k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
   97|  28.4k|                     IXHEAAC_GET_SIZE_ALIGNED(MAX_NUM_DEN_LENGTH * sizeof(WORD32), BYTE_ALIGN_8);
  ------------------
  |  |   87|  28.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
   98|       |
   99|  28.4k|  ducker_create_size =
  100|  28.4k|      MAX_NO_DECORR_CHANNELS *
  ------------------
  |  |   84|  28.4k|#define MAX_NO_DECORR_CHANNELS (5)
  ------------------
  101|  28.4k|      (IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_mps_dec_ducker_interface), BYTE_ALIGN_8) +
  ------------------
  |  |   87|  28.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  102|  28.4k|       IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_mps_dec_duck_instance_struct), BYTE_ALIGN_8));
  ------------------
  |  |   87|  28.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  103|  28.4k|  decor_dec_size = MAX_NO_DECORR_CHANNELS *
  ------------------
  |  |   84|  28.4k|#define MAX_NO_DECORR_CHANNELS (5)
  ------------------
  104|  28.4k|                   IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_mps_dec_decorr_dec_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  28.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  105|       |
  106|  28.4k|  alloc_size = matrix_alloc_size + decorr_filter_size + fraction_alloc_size + ducker_create_size +
  107|  28.4k|               decor_dec_size + state_alloc_size;
  108|       |
  109|  28.4k|  return (2 * alloc_size);
  110|  28.4k|}
ixheaacd_mps_initfuncs.c:ixheaacd_set_m2_params:
  437|  3.23k|static IA_ERRORCODE ixheaacd_set_m2_params(ia_heaac_mps_state_struct *pstr_mps_state) {
  438|  3.23k|  ia_heaac_mps_state_struct *curr_state = pstr_mps_state;
  439|  3.23k|  WORD32 up_mix_type = curr_state->up_mix_type;
  440|       |
  441|  3.23k|  switch (curr_state->tree_config) {
  442|    339|    case TREE_5151:
  ------------------
  |  Branch (442:5): [True: 339, False: 2.90k]
  ------------------
  443|    339|      if (up_mix_type == 2) {
  ------------------
  |  Branch (443:11): [True: 0, False: 339]
  ------------------
  444|      0|        curr_state->m2_param_imag_present = 1;
  445|       |
  446|      0|        curr_state->m2_param_present[0][1] = 1;
  447|      0|        curr_state->m2_param_present[1][1] = 1;
  448|      0|        curr_state->m2_param_present[0][0] = 2;
  449|      0|        curr_state->m2_param_present[1][0] = 2;
  450|       |
  451|      0|        curr_state->m1_param_present[0][0] = 1;
  452|      0|        curr_state->m1_param_present[1][0] = 1;
  453|    339|      } else {
  454|    339|        if (up_mix_type == 3) {
  ------------------
  |  Branch (454:13): [True: 0, False: 339]
  ------------------
  455|      0|          curr_state->m2_param_present[0][3] = 1;
  456|      0|          curr_state->m2_param_present[1][3] = 1;
  457|      0|          curr_state->m2_param_present[0][0] = 2;
  458|      0|          curr_state->m2_param_present[1][0] = 2;
  459|       |
  460|      0|          curr_state->m1_param_present[0][0] = 1;
  461|      0|          curr_state->m1_param_present[3][0] = 1;
  462|    339|        } else {
  463|    339|          curr_state->m2_param_present[0][0] = 3;
  464|    339|          curr_state->m2_param_present[0][1] = 3;
  465|    339|          curr_state->m2_param_present[0][2] = 3;
  466|    339|          curr_state->m2_param_present[0][3] = 3;
  467|    339|          curr_state->m2_param_present[1][0] = 3;
  468|    339|          curr_state->m2_param_present[1][1] = 3;
  469|    339|          curr_state->m2_param_present[1][2] = 3;
  470|    339|          curr_state->m2_param_present[1][3] = 3;
  471|    339|          curr_state->m2_param_present[2][0] = 3;
  472|    339|          curr_state->m2_param_present[2][1] = 3;
  473|    339|          curr_state->m2_param_present[2][2] = 3;
  474|    339|          curr_state->m2_param_present[3][0] = 3;
  475|    339|          curr_state->m2_param_present[4][0] = 3;
  476|    339|          curr_state->m2_param_present[4][1] = 3;
  477|    339|          curr_state->m2_param_present[4][4] = 3;
  478|    339|          curr_state->m2_param_present[5][0] = 3;
  479|    339|          curr_state->m2_param_present[5][1] = 3;
  480|    339|          curr_state->m2_param_present[5][4] = 3;
  481|       |
  482|    339|          curr_state->m1_param_present[0][0] = 1;
  483|    339|          curr_state->m1_param_present[1][0] = 1;
  484|    339|          curr_state->m1_param_present[2][0] = 1;
  485|    339|          curr_state->m1_param_present[3][0] = 1;
  486|    339|          curr_state->m1_param_present[4][0] = 1;
  487|    339|        }
  488|    339|      }
  489|    339|      break;
  490|    344|    case TREE_5152:
  ------------------
  |  Branch (490:5): [True: 344, False: 2.89k]
  ------------------
  491|    344|      if (up_mix_type == 2) {
  ------------------
  |  Branch (491:11): [True: 0, False: 344]
  ------------------
  492|      0|        curr_state->m2_param_imag_present = 1;
  493|       |
  494|      0|        curr_state->m2_param_present[0][1] = 1;
  495|      0|        curr_state->m2_param_present[1][1] = 1;
  496|      0|        curr_state->m2_param_present[0][0] = 2;
  497|      0|        curr_state->m2_param_present[1][0] = 2;
  498|       |
  499|      0|        curr_state->m1_param_present[0][0] = 1;
  500|      0|        curr_state->m1_param_present[1][0] = 1;
  501|    344|      } else {
  502|    344|        if (up_mix_type == 3) {
  ------------------
  |  Branch (502:13): [True: 0, False: 344]
  ------------------
  503|      0|          curr_state->m2_param_present[0][2] = 1;
  504|      0|          curr_state->m2_param_present[1][2] = 1;
  505|      0|          curr_state->m2_param_present[0][0] = 2;
  506|      0|          curr_state->m2_param_present[1][0] = 2;
  507|       |
  508|      0|          curr_state->m1_param_present[0][0] = 1;
  509|      0|          curr_state->m1_param_present[2][0] = 1;
  510|    344|        } else {
  511|    344|          curr_state->m2_param_present[0][0] = 3;
  512|    344|          curr_state->m2_param_present[0][1] = 3;
  513|    344|          curr_state->m2_param_present[0][2] = 3;
  514|    344|          curr_state->m2_param_present[0][3] = 3;
  515|    344|          curr_state->m2_param_present[1][0] = 3;
  516|    344|          curr_state->m2_param_present[1][1] = 3;
  517|    344|          curr_state->m2_param_present[1][2] = 3;
  518|    344|          curr_state->m2_param_present[1][3] = 3;
  519|    344|          curr_state->m2_param_present[2][0] = 3;
  520|    344|          curr_state->m2_param_present[2][1] = 3;
  521|    344|          curr_state->m2_param_present[2][2] = 3;
  522|    344|          curr_state->m2_param_present[2][4] = 3;
  523|    344|          curr_state->m2_param_present[3][0] = 3;
  524|    344|          curr_state->m2_param_present[3][1] = 3;
  525|    344|          curr_state->m2_param_present[3][2] = 3;
  526|    344|          curr_state->m2_param_present[3][4] = 3;
  527|    344|          curr_state->m2_param_present[4][0] = 3;
  528|    344|          curr_state->m2_param_present[4][1] = 3;
  529|    344|          curr_state->m2_param_present[5][0] = 3;
  530|       |
  531|    344|          curr_state->m1_param_present[0][0] = 1;
  532|    344|          curr_state->m1_param_present[1][0] = 1;
  533|    344|          curr_state->m1_param_present[2][0] = 1;
  534|    344|          curr_state->m1_param_present[3][0] = 1;
  535|    344|          curr_state->m1_param_present[4][0] = 1;
  536|    344|        }
  537|    344|      }
  538|    344|      break;
  539|    906|    case TREE_525:
  ------------------
  |  Branch (539:5): [True: 906, False: 2.33k]
  ------------------
  540|    906|      if (up_mix_type == 1) {
  ------------------
  |  Branch (540:11): [True: 0, False: 906]
  ------------------
  541|      0|        curr_state->m2_param_present[0][3] = 1;
  542|      0|        curr_state->m2_param_present[1][3] = 1;
  543|      0|        curr_state->m2_param_present[2][4] = 1;
  544|      0|        curr_state->m2_param_present[3][4] = 1;
  545|       |
  546|      0|        curr_state->m2_param_present[0][0] = 2;
  547|      0|        curr_state->m2_param_present[1][0] = 2;
  548|      0|        curr_state->m2_param_present[2][1] = 2;
  549|      0|        curr_state->m2_param_present[3][1] = 2;
  550|      0|        curr_state->m2_param_present[4][2] = 2;
  551|       |
  552|      0|        curr_state->m1_param_present[0][0] = 1;
  553|      0|        curr_state->m1_param_present[0][1] = 1;
  554|      0|        curr_state->m1_param_present[0][2] = 1;
  555|      0|        curr_state->m1_param_present[1][0] = 1;
  556|      0|        curr_state->m1_param_present[1][1] = 1;
  557|      0|        curr_state->m1_param_present[1][2] = 1;
  558|      0|        curr_state->m1_param_present[2][0] = 1;
  559|      0|        curr_state->m1_param_present[2][1] = 1;
  560|      0|        curr_state->m1_param_present[2][2] = 1;
  561|    906|      } else if (up_mix_type == 2) {
  ------------------
  |  Branch (561:18): [True: 0, False: 906]
  ------------------
  562|      0|        if (curr_state->binaural_quality == 1) {
  ------------------
  |  Branch (562:13): [True: 0, False: 0]
  ------------------
  563|      0|        } else {
  564|      0|          curr_state->m2_param_imag_present = 1;
  565|       |
  566|      0|          curr_state->m2_param_present[0][0] = 2;
  567|      0|          curr_state->m2_param_present[0][1] = 2;
  568|      0|          curr_state->m2_param_present[1][0] = 2;
  569|      0|          curr_state->m2_param_present[1][1] = 2;
  570|      0|          if (curr_state->arbitrary_downmix == 2) {
  ------------------
  |  Branch (570:15): [True: 0, False: 0]
  ------------------
  571|      0|            curr_state->m2_param_present[0][2] = 2;
  572|      0|            curr_state->m2_param_present[0][3] = 2;
  573|      0|            curr_state->m2_param_present[1][2] = 2;
  574|      0|            curr_state->m2_param_present[1][3] = 2;
  575|      0|          }
  576|       |
  577|      0|          curr_state->m1_param_present[0][0] = 1;
  578|      0|          curr_state->m1_param_present[1][1] = 1;
  579|      0|          curr_state->m1_param_present[2][3] = 1;
  580|      0|          curr_state->m1_param_present[3][4] = 1;
  581|      0|        }
  582|    906|      } else {
  583|    906|        curr_state->m2_param_present[0][0] = 3;
  584|    906|        curr_state->m2_param_present[0][3] = 3;
  585|    906|        curr_state->m2_param_present[1][0] = 3;
  586|    906|        curr_state->m2_param_present[1][3] = 3;
  587|    906|        curr_state->m2_param_present[2][1] = 3;
  588|    906|        curr_state->m2_param_present[2][4] = 3;
  589|    906|        curr_state->m2_param_present[3][1] = 3;
  590|    906|        curr_state->m2_param_present[3][4] = 3;
  591|    906|        curr_state->m2_param_present[4][2] = 3;
  592|    906|        curr_state->m2_param_present[5][2] = 3;
  593|       |
  594|    906|        curr_state->m1_param_present[0][0] = 1;
  595|    906|        curr_state->m1_param_present[0][1] = 1;
  596|    906|        curr_state->m1_param_present[0][2] = 1;
  597|    906|        curr_state->m1_param_present[0][3] = 1;
  598|    906|        curr_state->m1_param_present[0][4] = 1;
  599|    906|        curr_state->m1_param_present[1][0] = 1;
  600|    906|        curr_state->m1_param_present[1][1] = 1;
  601|    906|        curr_state->m1_param_present[1][2] = 1;
  602|    906|        curr_state->m1_param_present[1][3] = 1;
  603|    906|        curr_state->m1_param_present[1][4] = 1;
  604|    906|        curr_state->m1_param_present[2][0] = 1;
  605|    906|        curr_state->m1_param_present[2][1] = 1;
  606|    906|        curr_state->m1_param_present[2][2] = 1;
  607|    906|        curr_state->m1_param_present[2][3] = 1;
  608|    906|        curr_state->m1_param_present[2][4] = 1;
  609|    906|      }
  610|    906|      break;
  611|    333|    case TREE_7271:
  ------------------
  |  Branch (611:5): [True: 333, False: 2.90k]
  ------------------
  612|    333|      if (up_mix_type == 0) {
  ------------------
  |  Branch (612:11): [True: 333, False: 0]
  ------------------
  613|    333|        curr_state->m2_param_present[0][3] = 3;
  614|    333|        curr_state->m2_param_present[0][6] = 3;
  615|    333|        curr_state->m2_param_present[1][3] = 3;
  616|    333|        curr_state->m2_param_present[1][6] = 3;
  617|    333|        curr_state->m2_param_present[2][3] = 3;
  618|    333|        curr_state->m2_param_present[3][4] = 3;
  619|    333|        curr_state->m2_param_present[3][7] = 3;
  620|    333|        curr_state->m2_param_present[4][4] = 3;
  621|    333|        curr_state->m2_param_present[4][7] = 3;
  622|    333|        curr_state->m2_param_present[5][4] = 3;
  623|       |
  624|    333|        curr_state->m2_param_present[0][0] = 2;
  625|    333|        curr_state->m2_param_present[1][0] = 2;
  626|    333|        curr_state->m2_param_present[2][0] = 2;
  627|    333|        curr_state->m2_param_present[3][1] = 2;
  628|    333|        curr_state->m2_param_present[4][1] = 2;
  629|    333|        curr_state->m2_param_present[5][1] = 2;
  630|    333|        curr_state->m2_param_present[6][2] = 2;
  631|    333|        curr_state->m2_param_present[7][2] = 2;
  632|       |
  633|    333|        curr_state->m1_param_present[0][0] = 1;
  634|    333|        curr_state->m1_param_present[0][1] = 1;
  635|    333|        curr_state->m1_param_present[0][2] = 1;
  636|    333|        curr_state->m1_param_present[0][3] = 1;
  637|    333|        curr_state->m1_param_present[0][4] = 1;
  638|    333|        curr_state->m1_param_present[1][0] = 1;
  639|    333|        curr_state->m1_param_present[1][1] = 1;
  640|    333|        curr_state->m1_param_present[1][2] = 1;
  641|    333|        curr_state->m1_param_present[1][3] = 1;
  642|    333|        curr_state->m1_param_present[1][4] = 1;
  643|    333|        curr_state->m1_param_present[2][0] = 1;
  644|    333|        curr_state->m1_param_present[2][1] = 1;
  645|    333|        curr_state->m1_param_present[2][2] = 1;
  646|    333|        curr_state->m1_param_present[2][3] = 1;
  647|    333|        curr_state->m1_param_present[2][4] = 1;
  648|    333|      } else if (up_mix_type == 2) {
  ------------------
  |  Branch (648:18): [True: 0, False: 0]
  ------------------
  649|      0|        if (curr_state->binaural_quality == 1) {
  ------------------
  |  Branch (649:13): [True: 0, False: 0]
  ------------------
  650|      0|        } else {
  651|      0|          curr_state->m2_param_imag_present = 1;
  652|       |
  653|      0|          curr_state->m2_param_present[0][0] = 2;
  654|      0|          curr_state->m2_param_present[0][1] = 2;
  655|      0|          curr_state->m2_param_present[1][0] = 2;
  656|      0|          curr_state->m2_param_present[1][1] = 2;
  657|      0|          if (curr_state->arbitrary_downmix == 2) {
  ------------------
  |  Branch (657:15): [True: 0, False: 0]
  ------------------
  658|      0|            curr_state->m2_param_present[0][2] = 2;
  659|      0|            curr_state->m2_param_present[0][3] = 2;
  660|      0|            curr_state->m2_param_present[1][2] = 2;
  661|      0|            curr_state->m2_param_present[1][3] = 2;
  662|      0|          }
  663|       |
  664|      0|          curr_state->m1_param_present[0][0] = 1;
  665|      0|          curr_state->m1_param_present[1][1] = 1;
  666|      0|          curr_state->m1_param_present[2][3] = 1;
  667|      0|          curr_state->m1_param_present[3][4] = 1;
  668|      0|        }
  669|      0|      }
  670|    333|      break;
  671|    221|    case TREE_7272:
  ------------------
  |  Branch (671:5): [True: 221, False: 3.01k]
  ------------------
  672|    221|      if (up_mix_type == 0) {
  ------------------
  |  Branch (672:11): [True: 221, False: 0]
  ------------------
  673|    221|        curr_state->m2_param_present[0][3] = 3;
  674|    221|        curr_state->m2_param_present[1][3] = 3;
  675|    221|        curr_state->m2_param_present[1][6] = 3;
  676|    221|        curr_state->m2_param_present[2][3] = 3;
  677|    221|        curr_state->m2_param_present[2][6] = 3;
  678|    221|        curr_state->m2_param_present[3][4] = 3;
  679|    221|        curr_state->m2_param_present[4][4] = 3;
  680|    221|        curr_state->m2_param_present[4][7] = 3;
  681|    221|        curr_state->m2_param_present[5][4] = 3;
  682|    221|        curr_state->m2_param_present[5][7] = 3;
  683|       |
  684|    221|        curr_state->m2_param_present[0][0] = 2;
  685|    221|        curr_state->m2_param_present[1][0] = 2;
  686|    221|        curr_state->m2_param_present[2][0] = 2;
  687|    221|        curr_state->m2_param_present[3][1] = 2;
  688|    221|        curr_state->m2_param_present[4][1] = 2;
  689|    221|        curr_state->m2_param_present[5][1] = 2;
  690|    221|        curr_state->m2_param_present[6][2] = 2;
  691|    221|        curr_state->m2_param_present[7][2] = 2;
  692|       |
  693|    221|        curr_state->m1_param_present[0][0] = 1;
  694|    221|        curr_state->m1_param_present[0][1] = 1;
  695|    221|        curr_state->m1_param_present[0][2] = 1;
  696|    221|        curr_state->m1_param_present[0][3] = 1;
  697|    221|        curr_state->m1_param_present[0][4] = 1;
  698|    221|        curr_state->m1_param_present[1][0] = 1;
  699|    221|        curr_state->m1_param_present[1][1] = 1;
  700|    221|        curr_state->m1_param_present[1][2] = 1;
  701|    221|        curr_state->m1_param_present[1][3] = 1;
  702|    221|        curr_state->m1_param_present[1][4] = 1;
  703|    221|        curr_state->m1_param_present[2][0] = 1;
  704|    221|        curr_state->m1_param_present[2][1] = 1;
  705|    221|        curr_state->m1_param_present[2][2] = 1;
  706|    221|        curr_state->m1_param_present[2][3] = 1;
  707|    221|        curr_state->m1_param_present[2][4] = 1;
  708|    221|      } else if (up_mix_type == 2) {
  ------------------
  |  Branch (708:18): [True: 0, False: 0]
  ------------------
  709|      0|        if (curr_state->binaural_quality == 1) {
  ------------------
  |  Branch (709:13): [True: 0, False: 0]
  ------------------
  710|      0|        } else {
  711|      0|          curr_state->m2_param_imag_present = 1;
  712|       |
  713|      0|          curr_state->m2_param_present[0][0] = 2;
  714|      0|          curr_state->m2_param_present[0][1] = 2;
  715|      0|          curr_state->m2_param_present[1][0] = 2;
  716|      0|          curr_state->m2_param_present[1][1] = 2;
  717|      0|          if (curr_state->arbitrary_downmix == 2) {
  ------------------
  |  Branch (717:15): [True: 0, False: 0]
  ------------------
  718|      0|            curr_state->m2_param_present[0][2] = 2;
  719|      0|            curr_state->m2_param_present[0][3] = 2;
  720|      0|            curr_state->m2_param_present[1][2] = 2;
  721|      0|            curr_state->m2_param_present[1][3] = 2;
  722|      0|          }
  723|       |
  724|      0|          curr_state->m1_param_present[0][0] = 1;
  725|      0|          curr_state->m1_param_present[1][1] = 1;
  726|      0|          curr_state->m1_param_present[2][3] = 1;
  727|      0|          curr_state->m1_param_present[3][4] = 1;
  728|      0|        }
  729|      0|      }
  730|    221|      break;
  731|    168|    case TREE_7571:
  ------------------
  |  Branch (731:5): [True: 168, False: 3.07k]
  ------------------
  732|    168|      curr_state->m2_param_present[0][6] = 3;
  733|    168|      curr_state->m2_param_present[1][6] = 3;
  734|    168|      curr_state->m2_param_present[3][7] = 3;
  735|    168|      curr_state->m2_param_present[4][7] = 3;
  736|       |
  737|    168|      curr_state->m2_param_present[0][0] = 2;
  738|    168|      curr_state->m2_param_present[1][0] = 2;
  739|    168|      curr_state->m2_param_present[2][4] = 2;
  740|    168|      curr_state->m2_param_present[3][1] = 2;
  741|    168|      curr_state->m2_param_present[4][1] = 2;
  742|    168|      curr_state->m2_param_present[5][5] = 2;
  743|    168|      curr_state->m2_param_present[6][2] = 2;
  744|    168|      curr_state->m2_param_present[7][3] = 2;
  745|       |
  746|    168|      curr_state->m1_param_present[0][0] = 1;
  747|    168|      curr_state->m1_param_present[1][1] = 1;
  748|    168|      curr_state->m1_param_present[2][2] = 1;
  749|    168|      curr_state->m1_param_present[3][3] = 1;
  750|    168|      curr_state->m1_param_present[4][4] = 1;
  751|    168|      curr_state->m1_param_present[5][5] = 1;
  752|    168|      curr_state->m1_param_present[6][0] = 1;
  753|    168|      curr_state->m1_param_present[7][1] = 1;
  754|    168|      break;
  755|    928|    case TREE_7572:
  ------------------
  |  Branch (755:5): [True: 928, False: 2.31k]
  ------------------
  756|    928|      curr_state->m2_param_present[1][6] = 3;
  757|    928|      curr_state->m2_param_present[2][6] = 3;
  758|    928|      curr_state->m2_param_present[4][7] = 3;
  759|    928|      curr_state->m2_param_present[5][7] = 3;
  760|       |
  761|    928|      curr_state->m2_param_present[0][0] = 2;
  762|    928|      curr_state->m2_param_present[1][4] = 2;
  763|    928|      curr_state->m2_param_present[2][4] = 2;
  764|    928|      curr_state->m2_param_present[3][1] = 2;
  765|    928|      curr_state->m2_param_present[4][5] = 2;
  766|    928|      curr_state->m2_param_present[5][5] = 2;
  767|    928|      curr_state->m2_param_present[6][2] = 2;
  768|    928|      curr_state->m2_param_present[7][3] = 2;
  769|       |
  770|    928|      curr_state->m1_param_present[0][0] = 1;
  771|    928|      curr_state->m1_param_present[1][1] = 1;
  772|    928|      curr_state->m1_param_present[2][2] = 1;
  773|    928|      curr_state->m1_param_present[3][3] = 1;
  774|    928|      curr_state->m1_param_present[4][4] = 1;
  775|    928|      curr_state->m1_param_present[5][5] = 1;
  776|    928|      curr_state->m1_param_present[6][4] = 1;
  777|    928|      curr_state->m1_param_present[7][5] = 1;
  778|    928|      break;
  779|      0|    default:
  ------------------
  |  Branch (779:5): [True: 0, False: 3.23k]
  ------------------
  780|      0|      return IA_XHEAAC_MPS_DEC_EXE_FATAL_UNSUPPRORTED_TREE_CONFIG;
  ------------------
  |  |  124|      0|#define IA_XHEAAC_MPS_DEC_EXE_FATAL_UNSUPPRORTED_TREE_CONFIG 0xFFFF9805
  ------------------
  781|      0|      break;
  782|  3.23k|  };
  783|       |
  784|  3.23k|  return IA_NO_ERROR;
  ------------------
  |  |   23|  3.23k|#define IA_NO_ERROR 0x00000000
  ------------------
  785|  3.23k|}
ixheaacd_mps_initfuncs.c:ixheaacd_table_ptr_init:
 1289|  3.32k|static VOID ixheaacd_table_ptr_init(ia_heaac_mps_state_struct *pstr_mps_state) {
 1290|  3.32k|  ia_mps_dec_mps_tables_struct *mps_table_ptr = &pstr_mps_state->ia_mps_dec_mps_table;
 1291|  3.32k|  ia_mps_dec_residual_aac_tables_struct *aac_table_ptr = &pstr_mps_state->aac_table;
 1292|       |
 1293|  3.32k|  mps_table_ptr->qmf_table_ptr = (ia_mps_dec_qmf_tables_struct *)&ixheaacd_mps_dec_qmf_tables;
 1294|  3.32k|  mps_table_ptr->common_table_ptr =
 1295|  3.32k|      (ia_mps_dec_common_tables_struct *)&ixheaacd_mps_dec_common_tables;
 1296|  3.32k|  mps_table_ptr->hybrid_table_ptr =
 1297|  3.32k|      (ia_mps_dec_hybrid_tables_struct *)&ixheaacd_mps_dec_hybrid_tables;
 1298|  3.32k|  mps_table_ptr->m1_m2_table_ptr =
 1299|  3.32k|      (ia_mps_dec_m1_m2_tables_struct *)&ixheaacd_mps_dec_m1_m2_tables;
 1300|  3.32k|  mps_table_ptr->decor_table_ptr =
 1301|  3.32k|      (ia_mps_dec_decorr_tables_struct *)&ixheaacd_mps_dec_decorr_tables;
 1302|  3.32k|  mps_table_ptr->tp_process_table_ptr =
 1303|  3.32k|      (ia_mps_dec_tp_process_tables_struct *)&ixheaacd_mps_dec_tp_process_tables;
 1304|       |
 1305|  3.32k|  mps_table_ptr->mdct2qmf_table_ptr =
 1306|  3.32k|      (ia_mps_dec_mdct2qmf_table_struct *)&ixheaacd_mps_dec_mdct2qmf_table;
 1307|       |
 1308|  3.32k|  mps_table_ptr->tonality_table_ptr =
 1309|  3.32k|      (ia_mps_dec_tonality_tables_struct *)&ixheaacd_mps_dec_tonality_tables;
 1310|       |
 1311|  3.32k|  mps_table_ptr->bitdec_table_ptr =
 1312|  3.32k|      (ia_mps_dec_bitdec_tables_struct *)&ixheaacd_mps_dec_bitdec_tables;
 1313|  3.32k|  mps_table_ptr->blind_table_ptr =
 1314|  3.32k|      (ia_mps_dec_blind_tables_struct *)&ixheaacd_mps_dec_blind_tables;
 1315|       |
 1316|  3.32k|  mps_table_ptr->mdct2qmfcos_table_ptr =
 1317|  3.32k|      (ia_mps_dec_mdct2qmf_tables_struct *)&ixheaacd_mps_dec_mdct2qmf_tables;
 1318|  3.32k|  mps_table_ptr->mdct2qmfcos_tab_ptr =
 1319|  3.32k|      (ia_mps_dec_mdct2qmf_cos_table_struct *)&pstr_mps_state->ia_mps_dec_mdct2qmfcos_table;
 1320|  3.32k|  aac_table_ptr->res_huffmann_tables_ptr =
 1321|  3.32k|      (ia_mps_dec_res_huffmann_tables_struct *)&ixheaacd_mps_dec_res_huffmann_tables;
 1322|  3.32k|  aac_table_ptr->res_block_tables_ptr =
 1323|  3.32k|      (ia_mps_dec_res_block_tables_struct *)&ixheaacd_mps_dec_res_block_tables;
 1324|       |
 1325|  3.32k|  ixheaacd_res_huff_tables_init(aac_table_ptr);
 1326|       |
 1327|  3.32k|  mps_table_ptr->aac_tab = aac_table_ptr;
 1328|       |
 1329|  3.32k|  ixheaacd_wf_table_init(pstr_mps_state);
 1330|  3.32k|}

ixheaacd_buffer_m1:
   45|  13.1k|VOID ixheaacd_buffer_m1(ia_heaac_mps_state_struct *pstr_mps_state) {
   46|  13.1k|  ia_mps_dec_m1_param_struct *m1_param = pstr_mps_state->array_struct->m1_param;
   47|  13.1k|  WORD32 pb, row, col;
   48|       |
   49|  13.1k|  ia_mps_persistent_mem *persistent_mem = &pstr_mps_state->mps_persistent_mem;
   50|  13.1k|  WORD32 *m1_param_real_prev = persistent_mem->m1_param_real_prev;
   51|  13.1k|  WORD32 *m1_param_imag_prev = persistent_mem->m1_param_imag_prev;
   52|       |
   53|  13.1k|  WORD32 *m1_param_real, *m1_param_imag;
   54|       |
   55|  13.1k|  WORD32 *p_m1_param_real, *p_m1_param_re;
   56|       |
   57|  13.1k|  WORD32 num_parameter_bands = pstr_mps_state->num_parameter_bands;
   58|  13.1k|  WORD32 num_v_channels = pstr_mps_state->num_v_channels;
   59|  13.1k|  WORD32 num_x_channels = pstr_mps_state->num_x_channels;
   60|  13.1k|  WORD32 m1_param_imag_present = pstr_mps_state->m1_param_imag_present;
   61|       |
   62|  13.1k|  WORD32 num_parameter_sets_prev;
   63|       |
   64|  13.1k|  pstr_mps_state->num_parameter_sets_prev = pstr_mps_state->num_parameter_sets;
   65|  13.1k|  num_parameter_sets_prev = pstr_mps_state->num_parameter_sets_prev;
   66|       |
   67|  13.1k|  if (m1_param_imag_present) {
  ------------------
  |  Branch (67:7): [True: 9.82k, False: 3.29k]
  ------------------
   68|  9.82k|    WORD32 *p_m1_param_imag = &m1_param->m1_param_imag[0][0][0][0];
   69|  9.82k|    p_m1_param_real = &m1_param->m1_param_real[0][0][0][0];
   70|  87.2k|    for (row = 0; row < num_v_channels; row++) {
  ------------------
  |  Branch (70:19): [True: 77.4k, False: 9.82k]
  ------------------
   71|  77.4k|      WORD32 *p_m1_param_im = p_m1_param_imag;
   72|  77.4k|      p_m1_param_re = p_m1_param_real;
   73|       |
   74|   521k|      for (col = 0; col < num_x_channels; col++) {
  ------------------
  |  Branch (74:21): [True: 444k, False: 77.4k]
  ------------------
   75|   444k|        m1_param_real = p_m1_param_re + (num_parameter_sets_prev - 1) * MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|   444k|#define MAX_PARAMETER_BANDS (28)
  ------------------
   76|   444k|        m1_param_imag = p_m1_param_im + (num_parameter_sets_prev - 1) * MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|   444k|#define MAX_PARAMETER_BANDS (28)
  ------------------
   77|       |
   78|  9.17M|        for (pb = 0; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (78:22): [True: 8.73M, False: 444k]
  ------------------
   79|  8.73M|          *m1_param_real_prev++ = *m1_param_real++;
   80|  8.73M|          *m1_param_imag_prev++ = *m1_param_imag++;
   81|  8.73M|        }
   82|   444k|        p_m1_param_re += PBXPS;
  ------------------
  |  |  168|   444k|#define PBXPS (224)
  ------------------
   83|   444k|        p_m1_param_im += PBXPS;
  ------------------
  |  |  168|   444k|#define PBXPS (224)
  ------------------
   84|   444k|      }
   85|  77.4k|      p_m1_param_real += MAX_INPUT_CHANNELS_MPS * PBXPS;
  ------------------
  |  |   66|  77.4k|#define MAX_INPUT_CHANNELS_MPS (6)
  ------------------
                    p_m1_param_real += MAX_INPUT_CHANNELS_MPS * PBXPS;
  ------------------
  |  |  168|  77.4k|#define PBXPS (224)
  ------------------
   86|  77.4k|      p_m1_param_imag += MAX_INPUT_CHANNELS_MPS * PBXPS;
  ------------------
  |  |   66|  77.4k|#define MAX_INPUT_CHANNELS_MPS (6)
  ------------------
                    p_m1_param_imag += MAX_INPUT_CHANNELS_MPS * PBXPS;
  ------------------
  |  |  168|  77.4k|#define PBXPS (224)
  ------------------
   87|  77.4k|    }
   88|  9.82k|  } else {
   89|  3.29k|    p_m1_param_real = &m1_param->m1_param_real[0][0][0][0];
   90|  23.8k|    for (row = 0; row < num_v_channels; row++) {
  ------------------
  |  Branch (90:19): [True: 20.5k, False: 3.29k]
  ------------------
   91|  20.5k|      p_m1_param_re = p_m1_param_real;
   92|  99.6k|      for (col = 0; col < num_x_channels; col++) {
  ------------------
  |  Branch (92:21): [True: 79.0k, False: 20.5k]
  ------------------
   93|  79.0k|        m1_param_real = p_m1_param_re + (num_parameter_sets_prev - 1) * MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|  79.0k|#define MAX_PARAMETER_BANDS (28)
  ------------------
   94|  1.47M|        for (pb = 0; pb < num_parameter_bands; pb++) *m1_param_real_prev++ = *m1_param_real++;
  ------------------
  |  Branch (94:22): [True: 1.39M, False: 79.0k]
  ------------------
   95|       |
   96|  79.0k|        p_m1_param_re += PBXPS;
  ------------------
  |  |  168|  79.0k|#define PBXPS (224)
  ------------------
   97|  79.0k|      }
   98|  20.5k|      p_m1_param_real += MAX_INPUT_CHANNELS_MPS * PBXPS;
  ------------------
  |  |   66|  20.5k|#define MAX_INPUT_CHANNELS_MPS (6)
  ------------------
                    p_m1_param_real += MAX_INPUT_CHANNELS_MPS * PBXPS;
  ------------------
  |  |  168|  20.5k|#define PBXPS (224)
  ------------------
   99|  20.5k|    }
  100|  3.29k|  }
  101|  13.1k|}
ixheaacd_buffer_m2:
  103|  13.1k|VOID ixheaacd_buffer_m2(ia_heaac_mps_state_struct *pstr_mps_state) {
  104|  13.1k|  WORD32 num_direct_signals = pstr_mps_state->num_direct_signals;
  105|  13.1k|  WORD32 pb, row, col, col_counter = num_direct_signals + pstr_mps_state->num_decor_signals;
  106|       |
  107|  13.1k|  ia_mps_persistent_mem *persistent_mem = &pstr_mps_state->mps_persistent_mem;
  108|  13.1k|  ia_mps_dec_m2_param_struct *m2_param = pstr_mps_state->aux_struct->m2_param;
  109|       |
  110|  13.1k|  WORD32 *m2_decor_real_prev = persistent_mem->m2_decor_real_prev;
  111|  13.1k|  WORD32 *m2_decor_imag_prev = persistent_mem->m2_decor_imag_prev;
  112|       |
  113|  13.1k|  WORD32 *m2_resid_real_prev = persistent_mem->m2_resid_real_prev;
  114|  13.1k|  WORD32 *m2_resid_imag_prev = persistent_mem->m2_resid_imag_prev;
  115|       |
  116|  13.1k|  WORD32 *m2_decor_real, *m2_decor_imag, *m2_resid_real, *m2_resid_imag;
  117|  13.1k|  WORD32 idx = -1;
  118|       |
  119|  13.1k|  WORD32 resid_col_counter;
  120|       |
  121|  13.1k|  WORD32 num_parameter_bands = pstr_mps_state->num_parameter_bands;
  122|  13.1k|  WORD32 num_output_channels = pstr_mps_state->num_output_channels;
  123|  13.1k|  WORD32 num_parameter_sets_prev = pstr_mps_state->num_parameter_sets_prev;
  124|       |
  125|  13.1k|  if (pstr_mps_state->residual_coding)
  ------------------
  |  Branch (125:7): [True: 372, False: 12.7k]
  ------------------
  126|    372|    resid_col_counter = col_counter;
  127|  12.7k|  else
  128|  12.7k|    resid_col_counter = num_direct_signals;
  129|       |
  130|  13.1k|  if (pstr_mps_state->m2_param_imag_present) {
  ------------------
  |  Branch (130:7): [True: 0, False: 13.1k]
  ------------------
  131|      0|    for (row = 0; row < num_output_channels; row++) {
  ------------------
  |  Branch (131:19): [True: 0, False: 0]
  ------------------
  132|      0|      for (col = num_direct_signals; col < col_counter; col++) {
  ------------------
  |  Branch (132:38): [True: 0, False: 0]
  ------------------
  133|      0|        if (pstr_mps_state->m2_param_present[row][col] & 1) {
  ------------------
  |  Branch (133:13): [True: 0, False: 0]
  ------------------
  134|      0|          idx++;
  135|      0|          m2_decor_real = &m2_param->m2_decor_real[idx][num_parameter_sets_prev - 1][0];
  136|       |
  137|      0|          for (pb = 0; pb < num_parameter_bands; pb++) *m2_decor_real_prev++ = *m2_decor_real++;
  ------------------
  |  Branch (137:24): [True: 0, False: 0]
  ------------------
  138|       |
  139|      0|          m2_decor_imag = &m2_param->m2_decor_imag[idx][num_parameter_sets_prev - 1][0];
  140|       |
  141|      0|          for (pb = 0; pb < num_parameter_bands; pb++) *m2_decor_imag_prev++ = *m2_decor_imag++;
  ------------------
  |  Branch (141:24): [True: 0, False: 0]
  ------------------
  142|      0|        }
  143|      0|      }
  144|      0|    }
  145|       |
  146|      0|    idx = -1;
  147|      0|    for (row = 0; row < num_output_channels; row++) {
  ------------------
  |  Branch (147:19): [True: 0, False: 0]
  ------------------
  148|      0|      for (col = 0; col < resid_col_counter; col++) {
  ------------------
  |  Branch (148:21): [True: 0, False: 0]
  ------------------
  149|      0|        if (pstr_mps_state->m2_param_present[row][col] & 2) {
  ------------------
  |  Branch (149:13): [True: 0, False: 0]
  ------------------
  150|      0|          idx++;
  151|      0|          m2_resid_real = &m2_param->m2_resid_real[idx][num_parameter_sets_prev - 1][0];
  152|       |
  153|      0|          for (pb = 0; pb < num_parameter_bands; pb++) *m2_resid_real_prev++ = *m2_resid_real++;
  ------------------
  |  Branch (153:24): [True: 0, False: 0]
  ------------------
  154|      0|          m2_resid_imag = &m2_param->m2_resid_imag[idx][num_parameter_sets_prev - 1][0];
  155|      0|          for (pb = 0; pb < num_parameter_bands; pb++) *m2_resid_imag_prev++ = *m2_resid_imag++;
  ------------------
  |  Branch (155:24): [True: 0, False: 0]
  ------------------
  156|      0|        }
  157|      0|      }
  158|      0|    }
  159|  13.1k|  } else {
  160|   115k|    for (row = 0; row < num_output_channels; row++) {
  ------------------
  |  Branch (160:19): [True: 101k, False: 13.1k]
  ------------------
  161|   328k|      for (col = num_direct_signals; col < col_counter; col++) {
  ------------------
  |  Branch (161:38): [True: 226k, False: 101k]
  ------------------
  162|   226k|        if (pstr_mps_state->m2_param_present[row][col] & 1) {
  ------------------
  |  Branch (162:13): [True: 63.3k, False: 163k]
  ------------------
  163|  63.3k|          idx++;
  164|  63.3k|          m2_decor_real = &m2_param->m2_decor_real[idx][num_parameter_sets_prev - 1][0];
  165|       |
  166|  1.14M|          for (pb = 0; pb < num_parameter_bands; pb++) *m2_decor_real_prev++ = *m2_decor_real++;
  ------------------
  |  Branch (166:24): [True: 1.08M, False: 63.3k]
  ------------------
  167|  63.3k|        }
  168|   226k|      }
  169|   101k|    }
  170|       |
  171|  13.1k|    idx = -1;
  172|   115k|    for (row = 0; row < num_output_channels; row++) {
  ------------------
  |  Branch (172:19): [True: 101k, False: 13.1k]
  ------------------
  173|   652k|      for (col = 0; col < resid_col_counter; col++) {
  ------------------
  |  Branch (173:21): [True: 550k, False: 101k]
  ------------------
  174|   550k|        if (pstr_mps_state->m2_param_present[row][col] & 2) {
  ------------------
  |  Branch (174:13): [True: 104k, False: 446k]
  ------------------
  175|   104k|          idx++;
  176|   104k|          m2_resid_real = &m2_param->m2_resid_real[idx][num_parameter_sets_prev - 1][0];
  177|       |
  178|  2.01M|          for (pb = 0; pb < num_parameter_bands; pb++) *m2_resid_real_prev++ = *m2_resid_real++;
  ------------------
  |  Branch (178:24): [True: 1.90M, False: 104k]
  ------------------
  179|   104k|        }
  180|   550k|      }
  181|   101k|    }
  182|  13.1k|  }
  183|  13.1k|}
ixheaacd_calc_m1m2:
  218|  13.1k|VOID ixheaacd_calc_m1m2(ia_heaac_mps_state_struct *pstr_mps_state) {
  219|  13.1k|  WORD32 up_mix_type = pstr_mps_state->up_mix_type;
  220|  13.1k|  WORD32 binaural_quality = pstr_mps_state->binaural_quality;
  221|       |
  222|  13.1k|  if (pstr_mps_state->arbitrary_downmix != 0) {
  ------------------
  |  Branch (222:7): [True: 963, False: 12.1k]
  ------------------
  223|    963|    ixheaacd_update_alpha(pstr_mps_state);
  224|    963|  }
  225|       |
  226|  13.1k|  switch (pstr_mps_state->tree_config) {
  227|    273|    case TREE_5151: {
  ------------------
  |  Branch (227:5): [True: 273, False: 12.8k]
  ------------------
  228|    273|      if (up_mix_type == 3) {
  ------------------
  |  Branch (228:11): [True: 0, False: 273]
  ------------------
  229|      0|        ixheaacd_calc_m1m2_51s1(pstr_mps_state);
  230|    273|      } else {
  231|    273|        ixheaacd_calc_m1m2_5151(pstr_mps_state);
  232|    273|      }
  233|    273|    } break;
  234|    357|    case TREE_5152: {
  ------------------
  |  Branch (234:5): [True: 357, False: 12.7k]
  ------------------
  235|    357|      if (up_mix_type == 3) {
  ------------------
  |  Branch (235:11): [True: 0, False: 357]
  ------------------
  236|      0|        ixheaacd_calc_m1m2_51s2(pstr_mps_state);
  237|    357|      } else {
  238|    357|        ixheaacd_calc_m1m2_5152(pstr_mps_state);
  239|    357|      }
  240|    357|    } break;
  241|    909|    case TREE_525:
  ------------------
  |  Branch (241:5): [True: 909, False: 12.2k]
  ------------------
  242|    909|      if (up_mix_type == 1) {
  ------------------
  |  Branch (242:11): [True: 0, False: 909]
  ------------------
  243|      0|        ixheaacd_calc_m1m2_emm(pstr_mps_state);
  244|    909|      } else if (up_mix_type == 2) {
  ------------------
  |  Branch (244:18): [True: 0, False: 909]
  ------------------
  245|      0|        if (binaural_quality == 1) {
  ------------------
  |  Branch (245:13): [True: 0, False: 0]
  ------------------
  246|      0|          ixheaacd_calc_m1m2_5227(pstr_mps_state);
  247|      0|        }
  248|    909|      } else {
  249|    909|        ixheaacd_calc_m1m2_5251(pstr_mps_state);
  250|    909|      }
  251|    909|      break;
  252|  1.03k|    case TREE_7271:
  ------------------
  |  Branch (252:5): [True: 1.03k, False: 12.0k]
  ------------------
  253|  1.03k|      if (up_mix_type == 0) {
  ------------------
  |  Branch (253:11): [True: 1.03k, False: 0]
  ------------------
  254|  1.03k|        ixheaacd_calc_m1m2_7271(pstr_mps_state);
  255|  1.03k|      } else if (up_mix_type == 2) {
  ------------------
  |  Branch (255:18): [True: 0, False: 0]
  ------------------
  256|      0|        if (binaural_quality == 1) {
  ------------------
  |  Branch (256:13): [True: 0, False: 0]
  ------------------
  257|      0|          ixheaacd_calc_m1m2_5227(pstr_mps_state);
  258|      0|        }
  259|      0|      }
  260|  1.03k|      break;
  261|    305|    case TREE_7272:
  ------------------
  |  Branch (261:5): [True: 305, False: 12.8k]
  ------------------
  262|    305|      if (up_mix_type == 0) {
  ------------------
  |  Branch (262:11): [True: 305, False: 0]
  ------------------
  263|    305|        ixheaacd_calc_m1m2_7272(pstr_mps_state);
  264|    305|      } else if (up_mix_type == 2) {
  ------------------
  |  Branch (264:18): [True: 0, False: 0]
  ------------------
  265|      0|        if (binaural_quality == 1) {
  ------------------
  |  Branch (265:13): [True: 0, False: 0]
  ------------------
  266|      0|          ixheaacd_calc_m1m2_5227(pstr_mps_state);
  267|      0|        }
  268|      0|      }
  269|    305|      break;
  270|    527|    case TREE_7571:
  ------------------
  |  Branch (270:5): [True: 527, False: 12.5k]
  ------------------
  271|    527|      ixheaacd_calc_m1m2_7571(pstr_mps_state);
  272|    527|      break;
  273|  9.71k|    case TREE_7572:
  ------------------
  |  Branch (273:5): [True: 9.71k, False: 3.41k]
  ------------------
  274|  9.71k|      ixheaacd_calc_m1m2_7572(pstr_mps_state);
  275|  9.71k|      break;
  276|      0|    default:
  ------------------
  |  Branch (276:5): [True: 0, False: 13.1k]
  ------------------
  277|      0|      break;
  278|  13.1k|  };
  279|       |
  280|  13.1k|  return;
  281|  13.1k|}
ixheaacd_mps_m1m2_common.c:ixheaacd_update_alpha:
  185|    963|static VOID ixheaacd_update_alpha(ia_heaac_mps_state_struct *pstr_mps_state) {
  186|    963|  WORD32 alpha;
  187|       |
  188|    963|  WORD32 *arbdmx_alpha_prev = pstr_mps_state->mps_persistent_mem.arbdmx_alpha_prev;
  189|    963|  ia_mps_dec_auxilary_struct *p_aux_struct = pstr_mps_state->aux_struct;
  190|    963|  WORD32 *arbdmx_alpha = p_aux_struct->arbdmx_alpha;
  191|       |
  192|    963|  WORD32 n_ch_in = pstr_mps_state->num_input_channels;
  193|    963|  WORD32 ch;
  194|       |
  195|  2.44k|  for (ch = 0; ch < n_ch_in; ch++) {
  ------------------
  |  Branch (195:16): [True: 1.48k, False: 963]
  ------------------
  196|  1.48k|    *arbdmx_alpha_prev++ = arbdmx_alpha[ch];
  197|       |
  198|  1.48k|    if (pstr_mps_state->arbitrary_downmix == 2) {
  ------------------
  |  Branch (198:9): [True: 200, False: 1.28k]
  ------------------
  199|    200|      alpha = arbdmx_alpha[ch];
  200|       |
  201|    200|      if (p_aux_struct->arbdmx_residual_abs[ch]) {
  ------------------
  |  Branch (201:11): [True: 106, False: 94]
  ------------------
  202|    106|        alpha -= POINT_THREE_THREE_Q15;
  ------------------
  |  |   60|    106|#define POINT_THREE_THREE_Q15 (10813)
  ------------------
  203|       |
  204|    106|        if (alpha < 0) alpha = 0;
  ------------------
  |  Branch (204:13): [True: 106, False: 0]
  ------------------
  205|    106|      } else {
  206|     94|        alpha += POINT_THREE_THREE_Q15;
  ------------------
  |  |   60|     94|#define POINT_THREE_THREE_Q15 (10813)
  ------------------
  207|       |
  208|     94|        if (alpha > ONE_IN_Q15) alpha = ONE_IN_Q15;
  ------------------
  |  |   41|     94|#define ONE_IN_Q15 (32768)
  ------------------
                      if (alpha > ONE_IN_Q15) alpha = ONE_IN_Q15;
  ------------------
  |  |   41|      0|#define ONE_IN_Q15 (32768)
  ------------------
  |  Branch (208:13): [True: 0, False: 94]
  ------------------
  209|     94|      }
  210|  1.28k|    } else {
  211|  1.28k|      alpha = ONE_IN_Q15;
  ------------------
  |  |   41|  1.28k|#define ONE_IN_Q15 (32768)
  ------------------
  212|  1.28k|    }
  213|       |
  214|  1.48k|    arbdmx_alpha[ch] = alpha;
  215|  1.48k|  }
  216|    963|}

ixheaacd_mdct2qmf_tables_init:
   47|  3.23k|IA_ERRORCODE ixheaacd_mdct2qmf_tables_init(ia_heaac_mps_state_struct *pstr_mps_state) {
   48|  3.23k|  WORD32 time_slots;
   49|       |
   50|  3.23k|  time_slots = pstr_mps_state->upd_qmf;
   51|       |
   52|  3.23k|  if (32 == time_slots) {
  ------------------
  |  Branch (52:7): [True: 1.58k, False: 1.65k]
  ------------------
   53|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[0] =
   54|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_00;
   55|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[1] =
   56|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_01;
   57|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[2] =
   58|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_02;
   59|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[3] =
   60|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_03;
   61|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[4] =
   62|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_04;
   63|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[5] =
   64|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_05;
   65|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[6] =
   66|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_06;
   67|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[7] =
   68|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_07;
   69|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[8] =
   70|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_08;
   71|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[9] =
   72|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_09;
   73|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[10] =
   74|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_10;
   75|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[11] =
   76|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_11;
   77|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[12] =
   78|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_12;
   79|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[13] =
   80|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_13;
   81|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[14] =
   82|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_14;
   83|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[15] =
   84|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_15;
   85|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[16] =
   86|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_15;
   87|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[17] =
   88|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_14;
   89|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[18] =
   90|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_13;
   91|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[19] =
   92|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_12;
   93|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[20] =
   94|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_11;
   95|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[21] =
   96|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_10;
   97|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[22] =
   98|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_09;
   99|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[23] =
  100|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_08;
  101|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[24] =
  102|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_07;
  103|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[25] =
  104|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_06;
  105|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[26] =
  106|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_05;
  107|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[27] =
  108|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_04;
  109|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[28] =
  110|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_03;
  111|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[29] =
  112|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_02;
  113|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[30] =
  114|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_01;
  115|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[31] =
  116|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_00;
  117|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[32] =
  118|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_16;
  119|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[33] =
  120|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_17;
  121|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[34] =
  122|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_18;
  123|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[35] =
  124|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_19;
  125|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[36] =
  126|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_20;
  127|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[37] =
  128|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_21;
  129|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[38] =
  130|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_22;
  131|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[39] =
  132|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_23;
  133|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[40] =
  134|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_24;
  135|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[41] =
  136|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_25;
  137|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[42] =
  138|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_26;
  139|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[43] =
  140|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_27;
  141|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[44] =
  142|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_28;
  143|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[45] =
  144|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_29;
  145|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[46] =
  146|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_30;
  147|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[47] =
  148|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_31;
  149|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[48] =
  150|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_31;
  151|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[49] =
  152|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_30;
  153|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[50] =
  154|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_29;
  155|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[51] =
  156|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_28;
  157|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[52] =
  158|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_27;
  159|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[53] =
  160|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_26;
  161|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[54] =
  162|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_25;
  163|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[55] =
  164|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_24;
  165|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[56] =
  166|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_23;
  167|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[57] =
  168|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_22;
  169|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[58] =
  170|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_21;
  171|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[59] =
  172|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_20;
  173|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[60] =
  174|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_19;
  175|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[61] =
  176|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_18;
  177|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[62] =
  178|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_17;
  179|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[63] =
  180|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_32_16;
  181|       |
  182|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[0] =
  183|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_short_4_00;
  184|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[1] =
  185|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_short_4_01;
  186|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[2] =
  187|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_short_4_01;
  188|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[3] =
  189|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_short_4_00;
  190|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[4] =
  191|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_short_4_02;
  192|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[5] =
  193|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_short_4_03;
  194|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[6] =
  195|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_short_4_03;
  196|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[7] =
  197|  1.58k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_short_4_02;
  198|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[8] = NULL;
  199|  1.58k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[9] = NULL;
  200|  1.65k|  } else {
  201|  1.65k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[0] =
  202|  1.65k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_short_2_00;
  203|  1.65k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[1] =
  204|  1.65k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_short_2_00;
  205|  1.65k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[2] =
  206|  1.65k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_short_2_01;
  207|  1.65k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[3] =
  208|  1.65k|        pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_short_2_01;
  209|  1.65k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[4] = NULL;
  210|  1.65k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[5] = NULL;
  211|  1.65k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[6] = NULL;
  212|  1.65k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[7] = NULL;
  213|  1.65k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[8] = NULL;
  214|  1.65k|    pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[9] = NULL;
  215|       |
  216|  1.65k|    if (30 == time_slots) {
  ------------------
  |  Branch (216:9): [True: 27, False: 1.62k]
  ------------------
  217|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[0] =
  218|     27|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_00;
  219|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[1] =
  220|     27|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_01;
  221|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[2] =
  222|     27|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_02;
  223|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[3] =
  224|     27|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_03;
  225|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[4] =
  226|     27|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_04;
  227|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[5] =
  228|     27|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_05;
  229|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[6] =
  230|     27|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_06;
  231|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[7] =
  232|     27|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_07;
  233|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[8] =
  234|     27|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_08;
  235|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[9] =
  236|     27|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_09;
  237|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[10] =
  238|     27|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_10;
  239|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[11] =
  240|     27|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_11;
  241|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[12] =
  242|     27|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_12;
  243|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[13] =
  244|     27|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_13;
  245|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[14] =
  246|     27|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_14;
  247|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[15] =
  248|     27|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_14;
  249|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[16] =
  250|     27|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_13;
  251|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[17] =
  252|     27|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_12;
  253|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[18] =
  254|     27|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_11;
  255|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[19] =
  256|     27|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_10;
  257|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[20] =
  258|     27|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_09;
  259|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[21] =
  260|     27|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_08;
  261|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[22] =
  262|     27|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_07;
  263|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[23] =
  264|     27|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_06;
  265|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[24] =
  266|     27|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_05;
  267|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[25] =
  268|     27|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_04;
  269|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[26] =
  270|     27|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_03;
  271|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[27] =
  272|     27|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_02;
  273|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[28] =
  274|     27|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_01;
  275|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[29] =
  276|     27|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_00;
  277|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[30] =
  278|     27|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_15;
  279|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[31] =
  280|     27|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_16;
  281|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[32] =
  282|     27|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_17;
  283|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[33] =
  284|     27|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_18;
  285|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[34] =
  286|     27|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_19;
  287|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[35] =
  288|     27|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_20;
  289|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[36] =
  290|     27|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_21;
  291|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[37] =
  292|     27|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_22;
  293|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[38] =
  294|     27|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_23;
  295|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[39] =
  296|     27|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_24;
  297|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[40] =
  298|     27|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_25;
  299|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[41] =
  300|     27|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_26;
  301|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[42] =
  302|     27|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_27;
  303|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[43] =
  304|     27|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_28;
  305|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[44] =
  306|     27|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_29;
  307|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[45] =
  308|     27|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_29;
  309|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[46] =
  310|     27|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_28;
  311|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[47] =
  312|     27|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_27;
  313|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[48] =
  314|     27|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_26;
  315|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[49] =
  316|     27|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_25;
  317|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[50] =
  318|     27|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_24;
  319|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[51] =
  320|     27|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_23;
  321|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[52] =
  322|     27|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_22;
  323|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[53] =
  324|     27|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_21;
  325|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[54] =
  326|     27|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_20;
  327|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[55] =
  328|     27|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_19;
  329|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[56] =
  330|     27|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_18;
  331|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[57] =
  332|     27|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_17;
  333|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[58] =
  334|     27|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_16;
  335|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[59] =
  336|     27|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_30_15;
  337|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[60] = NULL;
  338|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[61] = NULL;
  339|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[62] = NULL;
  340|     27|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[63] = NULL;
  341|  1.62k|    } else if (24 == time_slots) {
  ------------------
  |  Branch (341:16): [True: 501, False: 1.12k]
  ------------------
  342|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[0] =
  343|    501|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_00;
  344|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[1] =
  345|    501|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_01;
  346|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[2] =
  347|    501|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_02;
  348|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[3] =
  349|    501|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_03;
  350|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[4] =
  351|    501|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_04;
  352|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[5] =
  353|    501|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_05;
  354|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[6] =
  355|    501|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_06;
  356|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[7] =
  357|    501|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_07;
  358|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[8] =
  359|    501|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_08;
  360|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[9] =
  361|    501|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_09;
  362|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[10] =
  363|    501|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_10;
  364|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[11] =
  365|    501|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_11;
  366|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[12] =
  367|    501|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_11;
  368|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[13] =
  369|    501|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_10;
  370|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[14] =
  371|    501|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_09;
  372|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[15] =
  373|    501|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_08;
  374|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[16] =
  375|    501|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_07;
  376|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[17] =
  377|    501|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_06;
  378|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[18] =
  379|    501|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_05;
  380|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[19] =
  381|    501|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_04;
  382|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[20] =
  383|    501|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_03;
  384|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[21] =
  385|    501|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_02;
  386|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[22] =
  387|    501|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_01;
  388|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[23] =
  389|    501|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_00;
  390|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[24] =
  391|    501|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_12;
  392|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[25] =
  393|    501|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_13;
  394|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[26] =
  395|    501|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_14;
  396|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[27] =
  397|    501|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_15;
  398|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[28] =
  399|    501|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_16;
  400|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[29] =
  401|    501|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_17;
  402|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[30] =
  403|    501|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_18;
  404|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[31] =
  405|    501|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_19;
  406|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[32] =
  407|    501|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_20;
  408|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[33] =
  409|    501|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_21;
  410|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[34] =
  411|    501|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_22;
  412|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[35] =
  413|    501|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_23;
  414|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[36] =
  415|    501|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_23;
  416|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[37] =
  417|    501|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_22;
  418|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[38] =
  419|    501|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_21;
  420|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[39] =
  421|    501|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_20;
  422|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[40] =
  423|    501|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_19;
  424|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[41] =
  425|    501|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_18;
  426|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[42] =
  427|    501|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_17;
  428|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[43] =
  429|    501|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_16;
  430|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[44] =
  431|    501|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_15;
  432|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[45] =
  433|    501|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_14;
  434|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[46] =
  435|    501|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_13;
  436|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[47] =
  437|    501|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_24_12;
  438|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[48] = NULL;
  439|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[49] = NULL;
  440|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[50] = NULL;
  441|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[51] = NULL;
  442|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[52] = NULL;
  443|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[53] = NULL;
  444|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[54] = NULL;
  445|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[55] = NULL;
  446|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[56] = NULL;
  447|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[57] = NULL;
  448|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[58] = NULL;
  449|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[59] = NULL;
  450|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[60] = NULL;
  451|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[61] = NULL;
  452|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[62] = NULL;
  453|    501|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[63] = NULL;
  454|  1.12k|    } else if (18 == time_slots) {
  ------------------
  |  Branch (454:16): [True: 30, False: 1.09k]
  ------------------
  455|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[0] =
  456|     30|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_00;
  457|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[1] =
  458|     30|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_01;
  459|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[2] =
  460|     30|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_02;
  461|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[3] =
  462|     30|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_03;
  463|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[4] =
  464|     30|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_04;
  465|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[5] =
  466|     30|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_05;
  467|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[6] =
  468|     30|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_06;
  469|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[7] =
  470|     30|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_07;
  471|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[8] =
  472|     30|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_08;
  473|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[9] =
  474|     30|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_08;
  475|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[10] =
  476|     30|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_07;
  477|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[11] =
  478|     30|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_06;
  479|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[12] =
  480|     30|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_05;
  481|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[13] =
  482|     30|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_04;
  483|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[14] =
  484|     30|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_03;
  485|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[15] =
  486|     30|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_02;
  487|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[16] =
  488|     30|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_01;
  489|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[17] =
  490|     30|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_00;
  491|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[18] =
  492|     30|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_09;
  493|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[19] =
  494|     30|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_10;
  495|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[20] =
  496|     30|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_11;
  497|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[21] =
  498|     30|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_12;
  499|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[22] =
  500|     30|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_13;
  501|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[23] =
  502|     30|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_14;
  503|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[24] =
  504|     30|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_15;
  505|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[25] =
  506|     30|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_16;
  507|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[26] =
  508|     30|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_17;
  509|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[27] =
  510|     30|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_17;
  511|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[28] =
  512|     30|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_16;
  513|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[29] =
  514|     30|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_15;
  515|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[30] =
  516|     30|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_14;
  517|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[31] =
  518|     30|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_13;
  519|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[32] =
  520|     30|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_12;
  521|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[33] =
  522|     30|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_11;
  523|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[34] =
  524|     30|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_10;
  525|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[35] =
  526|     30|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_18_09;
  527|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[36] = NULL;
  528|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[37] = NULL;
  529|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[38] = NULL;
  530|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[39] = NULL;
  531|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[40] = NULL;
  532|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[41] = NULL;
  533|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[42] = NULL;
  534|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[43] = NULL;
  535|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[44] = NULL;
  536|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[45] = NULL;
  537|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[46] = NULL;
  538|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[47] = NULL;
  539|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[48] = NULL;
  540|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[49] = NULL;
  541|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[50] = NULL;
  542|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[51] = NULL;
  543|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[52] = NULL;
  544|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[53] = NULL;
  545|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[54] = NULL;
  546|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[55] = NULL;
  547|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[56] = NULL;
  548|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[57] = NULL;
  549|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[58] = NULL;
  550|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[59] = NULL;
  551|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[60] = NULL;
  552|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[61] = NULL;
  553|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[62] = NULL;
  554|     30|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[63] = NULL;
  555|  1.09k|    } else if (16 == time_slots) {
  ------------------
  |  Branch (555:16): [True: 1.08k, False: 11]
  ------------------
  556|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[0] =
  557|  1.08k|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_00;
  558|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[1] =
  559|  1.08k|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_01;
  560|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[2] =
  561|  1.08k|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_02;
  562|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[3] =
  563|  1.08k|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_03;
  564|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[4] =
  565|  1.08k|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_04;
  566|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[5] =
  567|  1.08k|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_05;
  568|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[6] =
  569|  1.08k|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_06;
  570|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[7] =
  571|  1.08k|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_07;
  572|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[8] =
  573|  1.08k|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_07;
  574|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[9] =
  575|  1.08k|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_06;
  576|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[10] =
  577|  1.08k|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_05;
  578|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[11] =
  579|  1.08k|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_04;
  580|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[12] =
  581|  1.08k|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_03;
  582|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[13] =
  583|  1.08k|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_02;
  584|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[14] =
  585|  1.08k|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_01;
  586|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[15] =
  587|  1.08k|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_00;
  588|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[16] =
  589|  1.08k|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_08;
  590|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[17] =
  591|  1.08k|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_09;
  592|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[18] =
  593|  1.08k|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_10;
  594|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[19] =
  595|  1.08k|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_11;
  596|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[20] =
  597|  1.08k|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_12;
  598|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[21] =
  599|  1.08k|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_13;
  600|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[22] =
  601|  1.08k|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_14;
  602|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[23] =
  603|  1.08k|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_15;
  604|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[24] =
  605|  1.08k|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_15;
  606|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[25] =
  607|  1.08k|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_14;
  608|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[26] =
  609|  1.08k|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_13;
  610|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[27] =
  611|  1.08k|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_12;
  612|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[28] =
  613|  1.08k|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_11;
  614|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[29] =
  615|  1.08k|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_10;
  616|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[30] =
  617|  1.08k|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_09;
  618|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[31] =
  619|  1.08k|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_16_08;
  620|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[32] = NULL;
  621|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[33] = NULL;
  622|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[34] = NULL;
  623|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[35] = NULL;
  624|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[36] = NULL;
  625|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[37] = NULL;
  626|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[38] = NULL;
  627|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[39] = NULL;
  628|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[40] = NULL;
  629|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[41] = NULL;
  630|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[42] = NULL;
  631|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[43] = NULL;
  632|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[44] = NULL;
  633|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[45] = NULL;
  634|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[46] = NULL;
  635|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[47] = NULL;
  636|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[48] = NULL;
  637|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[49] = NULL;
  638|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[50] = NULL;
  639|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[51] = NULL;
  640|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[52] = NULL;
  641|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[53] = NULL;
  642|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[54] = NULL;
  643|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[55] = NULL;
  644|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[56] = NULL;
  645|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[57] = NULL;
  646|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[58] = NULL;
  647|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[59] = NULL;
  648|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[60] = NULL;
  649|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[61] = NULL;
  650|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[62] = NULL;
  651|  1.08k|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[63] = NULL;
  652|  1.08k|    } else if (15 == time_slots) {
  ------------------
  |  Branch (652:16): [True: 11, False: 0]
  ------------------
  653|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[0] =
  654|     11|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_00;
  655|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[1] =
  656|     11|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_01;
  657|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[2] =
  658|     11|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_02;
  659|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[3] =
  660|     11|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_03;
  661|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[4] =
  662|     11|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_04;
  663|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[5] =
  664|     11|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_05;
  665|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[6] =
  666|     11|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_06;
  667|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[7] =
  668|     11|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_06;
  669|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[8] =
  670|     11|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_05;
  671|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[9] =
  672|     11|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_04;
  673|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[10] =
  674|     11|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_03;
  675|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[11] =
  676|     11|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_02;
  677|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[12] =
  678|     11|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_01;
  679|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[13] =
  680|     11|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_00;
  681|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[14] =
  682|     11|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_07;
  683|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[15] =
  684|     11|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_08;
  685|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[16] =
  686|     11|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_09;
  687|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[17] =
  688|     11|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_10;
  689|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[18] =
  690|     11|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_11;
  691|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[19] =
  692|     11|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_12;
  693|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[20] =
  694|     11|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_13;
  695|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[21] =
  696|     11|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_14;
  697|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[22] =
  698|     11|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_14;
  699|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[23] =
  700|     11|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_13;
  701|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[24] =
  702|     11|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_12;
  703|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[25] =
  704|     11|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_11;
  705|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[26] =
  706|     11|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_10;
  707|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[27] =
  708|     11|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_09;
  709|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[28] =
  710|     11|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_08;
  711|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[29] =
  712|     11|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_long_15_07;
  713|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[30] = NULL;
  714|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[31] = NULL;
  715|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[32] = NULL;
  716|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[33] = NULL;
  717|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[34] = NULL;
  718|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[35] = NULL;
  719|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[36] = NULL;
  720|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[37] = NULL;
  721|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[38] = NULL;
  722|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[39] = NULL;
  723|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[40] = NULL;
  724|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[41] = NULL;
  725|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[42] = NULL;
  726|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[43] = NULL;
  727|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[44] = NULL;
  728|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[45] = NULL;
  729|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[46] = NULL;
  730|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[47] = NULL;
  731|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[48] = NULL;
  732|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[49] = NULL;
  733|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[50] = NULL;
  734|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[51] = NULL;
  735|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[52] = NULL;
  736|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[53] = NULL;
  737|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[54] = NULL;
  738|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[55] = NULL;
  739|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[56] = NULL;
  740|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[57] = NULL;
  741|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[58] = NULL;
  742|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[59] = NULL;
  743|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[60] = NULL;
  744|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[61] = NULL;
  745|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[62] = NULL;
  746|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_long[63] = NULL;
  747|       |
  748|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[4] =
  749|     11|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_short_3_00;
  750|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[5] =
  751|     11|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_short_3_00;
  752|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[6] =
  753|     11|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_short_3_01;
  754|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[7] =
  755|     11|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_short_3_02;
  756|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[8] =
  757|     11|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_short_3_02;
  758|     11|      pstr_mps_state->ia_mps_dec_mdct2qmfcos_table.cos_table_short[9] =
  759|     11|          pstr_mps_state->ia_mps_dec_mps_table.mdct2qmfcos_table_ptr->cos_table_short_3_01;
  760|     11|    } else {
  761|      0|      if (pstr_mps_state->residual_coding) return IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_TIMESLOTS;
  ------------------
  |  |  125|      0|#define IA_XHEAAC_MPS_DEC_EXE_FATAL_INVALID_TIMESLOTS 0xFFFF9806
  ------------------
  |  Branch (761:11): [True: 0, False: 0]
  ------------------
  762|      0|    }
  763|  1.65k|  }
  764|       |
  765|  3.23k|  return IA_NO_ERROR;
  ------------------
  |  |   23|  3.23k|#define IA_NO_ERROR 0x00000000
  ------------------
  766|  3.23k|}
ixheaacd_mdct2qmf_create:
  768|  3.23k|IA_ERRORCODE ixheaacd_mdct2qmf_create(ia_heaac_mps_state_struct *pstr_mps_state) {
  769|  3.23k|  IA_ERRORCODE error_code = IA_NO_ERROR;
  ------------------
  |  |   23|  3.23k|#define IA_NO_ERROR 0x00000000
  ------------------
  770|       |
  771|  3.23k|  WORD32 *qmf_residual_real = pstr_mps_state->array_struct->qmf_residual_real_pre;
  772|  3.23k|  WORD32 *qmf_residual_imag = pstr_mps_state->array_struct->qmf_residual_imag_pre;
  773|       |
  774|  3.23k|  memset(qmf_residual_real, 0, RES_CHXQMFXTSX4);
  ------------------
  |  |   74|  3.23k|#define RES_CHXQMFXTSX4 (184320)
  ------------------
  775|  3.23k|  memset(qmf_residual_imag, 0, RES_CHXQMFXTSX4);
  ------------------
  |  |   74|  3.23k|#define RES_CHXQMFXTSX4 (184320)
  ------------------
  776|       |
  777|  3.23k|  error_code = ixheaacd_mdct2qmf_tables_init(pstr_mps_state);
  778|       |
  779|  3.23k|  return error_code;
  780|  3.23k|}
ixheaacd_mdct2qmf_process:
 1475|    752|                               VOID *scratch, WORD32 time_slots) {
 1476|    752|  WORD32 i;
 1477|    752|  WORD32 j;
 1478|    752|  WORD32 k;
 1479|       |
 1480|    752|  WORD32 l = (upd_qmf << 1);
 1481|       |
 1482|    752|  WORD32 n = 0;
 1483|    752|  WORD32 *wf;
 1484|    752|  WORD32 *wt;
 1485|       |
 1486|    752|  WORD32 *v1;
 1487|    752|  WORD32 *v2;
 1488|       |
 1489|    752|  WORD32 *z1_real;
 1490|    752|  WORD32 *z1_imag;
 1491|       |
 1492|    752|  WORD32 *twipost_real;
 1493|    752|  WORD32 *twipost_imag;
 1494|       |
 1495|    752|  WORD32 *mdct_sf, *mdct_sf_ptr;
 1496|    752|  WORD32 *mdct_p, *mdct_p2;
 1497|       |
 1498|    752|  WORD32 temp_2, temp3, temp4;
 1499|       |
 1500|    752|  WORD32 *p_qmf_real_pre = qmf_real_pre;
 1501|    752|  WORD32 *p_qmf_real_post = qmf_real_post;
 1502|    752|  WORD32 *p_qmf_imag_pre = qmf_imag_pre;
 1503|    752|  WORD32 *p_qmf_imag_post = qmf_imag_post;
 1504|       |
 1505|    752|  VOID *free_scratch;
 1506|       |
 1507|    752|  WORD32 const **wf_tab = ia_mps_dec_mps_table_ptr->wf_tab_ptr->wf;
 1508|       |
 1509|    752|  WORD32 window_offset = 0;
 1510|       |
 1511|    752|  WORD32 mdct_offset = 0;
 1512|    752|  WORD32 mdct_shift = AAC_SHORT_FRAME_LENGTH;
  ------------------
  |  |   24|    752|#define AAC_SHORT_FRAME_LENGTH (128)
  ------------------
 1513|       |
 1514|    752|  WORD32 qmf_offset = 0;
 1515|    752|  WORD32 qmf_shift = 0;
 1516|       |
 1517|    752|  WORD32 n_windows = 0;
 1518|       |
 1519|    752|  WORD32 mdct_length = MDCT_LENGTH_LO;
  ------------------
  |  |   26|    752|#define MDCT_LENGTH_LO (AAC_FRAME_LENGTH)
  |  |  ------------------
  |  |  |  |   23|    752|#define AAC_FRAME_LENGTH (1024)
  |  |  ------------------
  ------------------
 1520|       |
 1521|    752|  WORD32 qmf_bands = 64;
 1522|    752|  const WORD32 *ptr1, *ptr2;
 1523|    752|  WORD32 is_long;
 1524|    752|  WORD32 *zr, *zi;
 1525|       |
 1526|    752|  WORD32 *a, *scale;
 1527|    752|  WORD32 gain = 0;
 1528|    752|  WORD32 *wp;
 1529|    752|  WORD64 temp_prod = 0;
 1530|       |
 1531|    752|  wf = scratch;
 1532|    752|  wt = wf + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_TIMESLOTSX2, sizeof(*wt), BYTE_ALIGN_8);
  ------------------
  |  |   89|    752|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
 1533|    752|  v1 = wt + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_TIMESLOTSX2, sizeof(*v1), BYTE_ALIGN_8);
  ------------------
  |  |   89|    752|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
 1534|    752|  v2 = v1 + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MDCT_LENGTH_HI, sizeof(*v2), BYTE_ALIGN_8);
  ------------------
  |  |   89|    752|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
 1535|    752|  twipost_real =
 1536|    752|      v2 + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MDCT_LENGTH_HI, sizeof(*twipost_real), BYTE_ALIGN_8);
  ------------------
  |  |   89|    752|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
 1537|    752|  twipost_imag = twipost_real + IXHEAAC_GET_SIZE_ALIGNED_TYPE(
  ------------------
  |  |   89|    752|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
 1538|    752|                                    MAX_NUM_QMF_BANDS, sizeof(*twipost_imag), BYTE_ALIGN_8);
 1539|    752|  mdct_sf = twipost_imag +
 1540|    752|            IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_NUM_QMF_BANDS, sizeof(*mdct_sf), BYTE_ALIGN_8);
  ------------------
  |  |   89|    752|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
 1541|    752|  z1_real =
 1542|    752|      mdct_sf + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MDCT_LENGTH_SF, sizeof(*z1_real), BYTE_ALIGN_8);
  ------------------
  |  |   89|    752|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
 1543|    752|  z1_imag = z1_real + IXHEAAC_GET_SIZE_ALIGNED_TYPE(QBXTSX2, sizeof(*z1_imag), BYTE_ALIGN_8);
  ------------------
  |  |   89|    752|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
 1544|    752|  a = z1_imag + IXHEAAC_GET_SIZE_ALIGNED_TYPE(QBXTSX2, sizeof(*a), BYTE_ALIGN_8);
  ------------------
  |  |   89|    752|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
 1545|    752|  free_scratch = (VOID *)((WORD32 *)a + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_NUM_QMF_BANDS,
  ------------------
  |  |   89|    752|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
 1546|    752|                                                                      sizeof(*a), BYTE_ALIGN_8));
 1547|       |
 1548|    752|  scale = a;
 1549|       |
 1550|    752|  ixheaacd_local_mdct_win(upd_qmf, window_type, wf, wf_tab, wt,
 1551|    752|                          ia_mps_dec_mps_table_ptr->mdct2qmf_table_ptr);
 1552|       |
 1553|    752|  switch (window_type) {
 1554|    415|    case ONLY_LONG_SEQUENCE:
  ------------------
  |  |  100|    415|#define ONLY_LONG_SEQUENCE 0
  ------------------
  |  Branch (1554:5): [True: 415, False: 337]
  ------------------
 1555|    518|    case LONG_START_SEQUENCE:
  ------------------
  |  |  101|    518|#define LONG_START_SEQUENCE 1
  ------------------
  |  Branch (1555:5): [True: 103, False: 649]
  ------------------
 1556|    548|    case LONG_STOP_SEQUENCE:
  ------------------
  |  |  103|    548|#define LONG_STOP_SEQUENCE 3
  ------------------
  |  Branch (1556:5): [True: 30, False: 722]
  ------------------
 1557|       |
 1558|    548|      n = upd_qmf * qmf_bands - MDCT_LENGTH_LO;
  ------------------
  |  |   26|    548|#define MDCT_LENGTH_LO (AAC_FRAME_LENGTH)
  |  |  ------------------
  |  |  |  |   23|    548|#define AAC_FRAME_LENGTH (1024)
  |  |  ------------------
  ------------------
 1559|       |
 1560|    548|      if (n > 0) {
  ------------------
  |  Branch (1560:11): [True: 397, False: 151]
  ------------------
 1561|    397|        ixheaacd_local_zero(n, &mdct_in[MDCT_LENGTH_LO]);
  ------------------
  |  |   26|    397|#define MDCT_LENGTH_LO (AAC_FRAME_LENGTH)
  |  |  ------------------
  |  |  |  |   23|    397|#define AAC_FRAME_LENGTH (1024)
  |  |  ------------------
  ------------------
 1562|    397|      }
 1563|    548|      mdct_length += n;
 1564|       |
 1565|    548|      ixheaacd_local_fold_out(mdct_in, mdct_length, wf, l, v1, v2);
 1566|       |
 1567|    548|      wp = wt;
 1568|       |
 1569|    548|      ixheaacd_get_gain(l, &gain);
 1570|       |
 1571|  26.0k|      for (k = 0; k < l; k++) {
  ------------------
  |  Branch (1571:19): [True: 25.4k, False: 548]
  ------------------
 1572|  25.4k|        *scale++ = ixheaacd_mps_mult32_shr_15(gain, *wp);
 1573|  25.4k|        wp++;
 1574|  25.4k|      }
 1575|    548|      ixheaacd_local_hybcmdct2qmf(v1, v2, a, l, z1_real, z1_imag,
 1576|    548|                                  ia_mps_dec_mps_table_ptr->mdct2qmfcos_tab_ptr, free_scratch, 1);
 1577|       |
 1578|    548|      ptr1 = ia_mps_dec_mps_table_ptr->mdct2qmf_table_ptr->twi_post_cos;
 1579|    548|      ptr2 = ia_mps_dec_mps_table_ptr->mdct2qmf_table_ptr->twi_post_sin;
 1580|       |
 1581|    548|      if (qmf_global_offset < time_slots) {
  ------------------
  |  Branch (1581:11): [True: 548, False: 0]
  ------------------
 1582|    548|        if (qmf_global_offset + l < time_slots) {
  ------------------
  |  Branch (1582:13): [True: 0, False: 548]
  ------------------
 1583|      0|          for (i = 0; i < qmf_bands; i++) {
  ------------------
  |  Branch (1583:23): [True: 0, False: 0]
  ------------------
 1584|      0|            WORD32 cos_twi = *ptr1++;
 1585|      0|            WORD32 sin_twi = *ptr2++;
 1586|      0|            for (j = 0; j < l; j++) {
  ------------------
  |  Branch (1586:25): [True: 0, False: 0]
  ------------------
 1587|      0|              temp3 = *z1_real++;
 1588|      0|              temp4 = *z1_imag++;
 1589|       |
 1590|      0|              temp_2 = j + qmf_global_offset;
 1591|      0|              temp_prod = (WORD64)(p_qmf_real_pre[temp_2]);
 1592|      0|              temp_prod = ixheaac_mac32x32in64(temp_prod, cos_twi, temp3);
 1593|      0|              temp_prod = ixheaac_mac32x32in64(temp_prod, -sin_twi, temp4);
 1594|      0|              p_qmf_real_pre[temp_2] = ixheaac_sat64_32(temp_prod);
 1595|      0|              temp_prod = (WORD64)(p_qmf_imag_pre[temp_2]);
 1596|      0|              temp_prod = ixheaac_mac32x32in64(temp_prod, cos_twi, temp4);
 1597|      0|              temp_prod = ixheaac_mac32x32in64(temp_prod, sin_twi, temp3);
 1598|      0|              p_qmf_imag_pre[temp_2] = ixheaac_sat64_32(temp_prod);
 1599|      0|            }
 1600|      0|            p_qmf_real_pre += MAX_TIME_SLOTS;
  ------------------
  |  |   48|      0|#define MAX_TIME_SLOTS (72)
  ------------------
 1601|      0|            p_qmf_imag_pre += MAX_TIME_SLOTS;
  ------------------
  |  |   48|      0|#define MAX_TIME_SLOTS (72)
  ------------------
 1602|      0|          }
 1603|    548|        } else {
 1604|  35.6k|          for (i = 0; i < qmf_bands; i++) {
  ------------------
  |  Branch (1604:23): [True: 35.0k, False: 548]
  ------------------
 1605|  35.0k|            WORD32 cos_twi = *ptr1++;
 1606|  35.0k|            WORD32 sin_twi = *ptr2++;
 1607|  1.66M|            for (j = 0; j < l; j++) {
  ------------------
  |  Branch (1607:25): [True: 1.63M, False: 35.0k]
  ------------------
 1608|  1.63M|              temp3 = *z1_real++;
 1609|  1.63M|              temp4 = *z1_imag++;
 1610|       |
 1611|  1.63M|              temp_2 = j + qmf_global_offset;
 1612|  1.63M|              if (temp_2 < time_slots) {
  ------------------
  |  Branch (1612:19): [True: 880k, False: 750k]
  ------------------
 1613|   880k|                temp_prod = (WORD64)(p_qmf_real_pre[temp_2]);
 1614|   880k|                temp_prod = ixheaac_mac32x32in64(temp_prod, cos_twi, temp3);
 1615|   880k|                temp_prod = ixheaac_mac32x32in64(temp_prod, -sin_twi, temp4);
 1616|   880k|                p_qmf_real_pre[temp_2] = ixheaac_sat64_32(temp_prod);
 1617|   880k|                temp_prod = (WORD64)(p_qmf_imag_pre[temp_2]);
 1618|   880k|                temp_prod = ixheaac_mac32x32in64(temp_prod, cos_twi, temp4);
 1619|   880k|                temp_prod = ixheaac_mac32x32in64(temp_prod, sin_twi, temp3);
 1620|   880k|                p_qmf_imag_pre[temp_2] = ixheaac_sat64_32(temp_prod);
 1621|   880k|              } else {
 1622|   750k|                temp_prod = (WORD64)(p_qmf_real_post[temp_2 - time_slots]);
 1623|   750k|                temp_prod = ixheaac_mac32x32in64(temp_prod, cos_twi, temp3);
 1624|   750k|                temp_prod = ixheaac_mac32x32in64(temp_prod, -sin_twi, temp4);
 1625|   750k|                p_qmf_real_post[temp_2 - time_slots] = ixheaac_sat64_32(temp_prod);
 1626|   750k|                temp_prod = (WORD64)(p_qmf_imag_post[temp_2 - time_slots]);
 1627|   750k|                temp_prod = ixheaac_mac32x32in64(temp_prod, cos_twi, temp4);
 1628|   750k|                temp_prod = ixheaac_mac32x32in64(temp_prod, sin_twi, temp3);
 1629|   750k|                p_qmf_imag_post[temp_2 - time_slots] = ixheaac_sat64_32(temp_prod);
 1630|   750k|              }
 1631|  1.63M|            }
 1632|  35.0k|            p_qmf_real_pre += MAX_TIME_SLOTS;
  ------------------
  |  |   48|  35.0k|#define MAX_TIME_SLOTS (72)
  ------------------
 1633|  35.0k|            p_qmf_real_post += MAX_TIME_SLOTS;
  ------------------
  |  |   48|  35.0k|#define MAX_TIME_SLOTS (72)
  ------------------
 1634|       |
 1635|  35.0k|            p_qmf_imag_pre += MAX_TIME_SLOTS;
  ------------------
  |  |   48|  35.0k|#define MAX_TIME_SLOTS (72)
  ------------------
 1636|  35.0k|            p_qmf_imag_post += MAX_TIME_SLOTS;
  ------------------
  |  |   48|  35.0k|#define MAX_TIME_SLOTS (72)
  ------------------
 1637|  35.0k|          }
 1638|    548|        }
 1639|    548|      } else {
 1640|      0|        for (i = 0; i < qmf_bands; i++) {
  ------------------
  |  Branch (1640:21): [True: 0, False: 0]
  ------------------
 1641|      0|          WORD32 cos_twi = *ptr1++;
 1642|      0|          WORD32 sin_twi = *ptr2++;
 1643|      0|          for (j = 0; j < l; j++) {
  ------------------
  |  Branch (1643:23): [True: 0, False: 0]
  ------------------
 1644|      0|            temp3 = *z1_real++;
 1645|      0|            temp4 = *z1_imag++;
 1646|       |
 1647|      0|            temp_2 = j + qmf_global_offset;
 1648|       |
 1649|      0|            temp_prod = (WORD64)(p_qmf_real_post[temp_2 - time_slots]);
 1650|      0|            temp_prod = ixheaac_mac32x32in64(temp_prod, cos_twi, temp3);
 1651|      0|            temp_prod = ixheaac_mac32x32in64(temp_prod, -sin_twi, temp4);
 1652|      0|            p_qmf_real_post[temp_2 - time_slots] = ixheaac_sat64_32(temp_prod);
 1653|      0|            temp_prod = (WORD64)(p_qmf_imag_post[temp_2 - time_slots]);
 1654|      0|            temp_prod = ixheaac_mac32x32in64(temp_prod, cos_twi, temp4);
 1655|      0|            temp_prod = ixheaac_mac32x32in64(temp_prod, sin_twi, temp3);
 1656|      0|            p_qmf_imag_post[temp_2 - time_slots] = ixheaac_sat64_32(temp_prod);
 1657|      0|          }
 1658|      0|          p_qmf_real_post += MAX_TIME_SLOTS;
  ------------------
  |  |   48|      0|#define MAX_TIME_SLOTS (72)
  ------------------
 1659|      0|          p_qmf_imag_post += MAX_TIME_SLOTS;
  ------------------
  |  |   48|      0|#define MAX_TIME_SLOTS (72)
  ------------------
 1660|      0|        }
 1661|      0|      }
 1662|    548|      break;
 1663|    204|    case EIGHT_SHORT_SEQUENCE:
  ------------------
  |  |  102|    204|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  |  Branch (1663:5): [True: 204, False: 548]
  ------------------
 1664|       |
 1665|    204|      switch (upd_qmf) {
 1666|      0|        case UPD_QMF_15:
  ------------------
  |  |   30|      0|#define UPD_QMF_15 (15)
  ------------------
  |  Branch (1666:9): [True: 0, False: 204]
  ------------------
 1667|      0|          l = 4;
 1668|      0|          mdct_length = AAC_SHORT_FRAME_LENGTH;
  ------------------
  |  |   24|      0|#define AAC_SHORT_FRAME_LENGTH (128)
  ------------------
 1669|      0|          qmf_offset = 6;
 1670|      0|          qmf_shift = 2;
 1671|      0|          n_windows = 7;
 1672|      0|          break;
 1673|    102|        case UPD_QMF_16:
  ------------------
  |  |   31|    102|#define UPD_QMF_16 (16)
  ------------------
  |  Branch (1673:9): [True: 102, False: 102]
  ------------------
 1674|    187|        case UPD_QMF_32:
  ------------------
  |  |   35|    187|#define UPD_QMF_32 (32)
  ------------------
  |  Branch (1674:9): [True: 85, False: 119]
  ------------------
 1675|    187|          n = (upd_qmf - UPD_QMF_16) * 8;
  ------------------
  |  |   31|    187|#define UPD_QMF_16 (16)
  ------------------
 1676|    187|          mdct_length = AAC_SHORT_FRAME_LENGTH + n;
  ------------------
  |  |   24|    187|#define AAC_SHORT_FRAME_LENGTH (128)
  ------------------
 1677|    187|          l = 2 * (upd_qmf >> 3);
 1678|    187|          qmf_offset = 7 * upd_qmf >> 4;
 1679|    187|          qmf_shift = upd_qmf >> 3;
 1680|    187|          n_windows = 8;
 1681|    187|          break;
 1682|      6|        case UPD_QMF_18:
  ------------------
  |  |   32|      6|#define UPD_QMF_18 (18)
  ------------------
  |  Branch (1682:9): [True: 6, False: 198]
  ------------------
 1683|      6|          l = 4;
 1684|      6|          mdct_length = AAC_SHORT_FRAME_LENGTH;
  ------------------
  |  |   24|      6|#define AAC_SHORT_FRAME_LENGTH (128)
  ------------------
 1685|      6|          qmf_offset = 8;
 1686|      6|          qmf_shift = 2;
 1687|      6|          n_windows = 9;
 1688|      6|          break;
 1689|     11|        case UPD_QMF_24:
  ------------------
  |  |   33|     11|#define UPD_QMF_24 (24)
  ------------------
  |  Branch (1689:9): [True: 11, False: 193]
  ------------------
 1690|     11|          l = 4;
 1691|     11|          mdct_length = AAC_SHORT_FRAME_LENGTH;
  ------------------
  |  |   24|     11|#define AAC_SHORT_FRAME_LENGTH (128)
  ------------------
 1692|     11|          qmf_offset = 11;
 1693|     11|          qmf_shift = 2;
 1694|     11|          n_windows = 12;
 1695|     11|          break;
 1696|      0|        case UPD_QMF_30:
  ------------------
  |  |   34|      0|#define UPD_QMF_30 (30)
  ------------------
  |  Branch (1696:9): [True: 0, False: 204]
  ------------------
 1697|      0|          l = 4;
 1698|      0|          mdct_length = AAC_SHORT_FRAME_LENGTH;
  ------------------
  |  |   24|      0|#define AAC_SHORT_FRAME_LENGTH (128)
  ------------------
 1699|      0|          qmf_offset = 14;
 1700|      0|          qmf_shift = 2;
 1701|      0|          n_windows = 15;
 1702|      0|          break;
 1703|      0|        default:
  ------------------
  |  Branch (1703:9): [True: 0, False: 204]
  ------------------
 1704|      0|          l = 4;
 1705|      0|          mdct_length = AAC_SHORT_FRAME_LENGTH;
  ------------------
  |  |   24|      0|#define AAC_SHORT_FRAME_LENGTH (128)
  ------------------
 1706|      0|          qmf_offset = 6;
 1707|      0|          qmf_shift = 2;
 1708|      0|          n_windows = 7;
 1709|      0|          break;
 1710|    204|      }
 1711|       |
 1712|    204|      wp = wt;
 1713|    204|      ixheaacd_get_gain(l, &gain);
 1714|       |
 1715|  1.36k|      for (k = 0; k < l; k++) {
  ------------------
  |  Branch (1715:19): [True: 1.15k, False: 204]
  ------------------
 1716|  1.15k|        *scale++ = ixheaacd_mps_mult32_shr_15(gain, *wp);
 1717|  1.15k|        wp++;
 1718|  1.15k|      }
 1719|       |
 1720|  1.88k|      for (k = 0; k < n_windows; k++) {
  ------------------
  |  Branch (1720:19): [True: 1.68k, False: 204]
  ------------------
 1721|  1.68k|        is_long = 0;
 1722|  1.68k|        mdct_sf_ptr = mdct_sf;
 1723|  1.68k|        switch (upd_qmf) {
 1724|    816|          case UPD_QMF_16:
  ------------------
  |  |   31|    816|#define UPD_QMF_16 (16)
  ------------------
  |  Branch (1724:11): [True: 816, False: 866]
  ------------------
 1725|  1.49k|          case UPD_QMF_32:
  ------------------
  |  |   35|  1.49k|#define UPD_QMF_32 (32)
  ------------------
  |  Branch (1725:11): [True: 680, False: 1.00k]
  ------------------
 1726|  1.49k|            mdct_p = mdct_in + mdct_offset;
 1727|   192k|            for (i = 0; i < AAC_SHORT_FRAME_LENGTH; i++) {
  ------------------
  |  |   24|   192k|#define AAC_SHORT_FRAME_LENGTH (128)
  ------------------
  |  Branch (1727:25): [True: 191k, False: 1.49k]
  ------------------
 1728|   191k|              *mdct_sf_ptr++ = *mdct_p++;
 1729|   191k|            }
 1730|       |
 1731|  1.49k|            ixheaacd_local_zero(n, &mdct_sf[AAC_SHORT_FRAME_LENGTH]);
  ------------------
  |  |   24|  1.49k|#define AAC_SHORT_FRAME_LENGTH (128)
  ------------------
 1732|  1.49k|            break;
 1733|      0|          case UPD_QMF_15:
  ------------------
  |  |   30|      0|#define UPD_QMF_15 (15)
  ------------------
  |  Branch (1733:11): [True: 0, False: 1.68k]
  ------------------
 1734|      0|            if (k < n_windows - 1) {
  ------------------
  |  Branch (1734:17): [True: 0, False: 0]
  ------------------
 1735|      0|              mdct_p = mdct_in + mdct_offset;
 1736|      0|              for (i = 0; i < AAC_SHORT_FRAME_LENGTH; i++) {
  ------------------
  |  |   24|      0|#define AAC_SHORT_FRAME_LENGTH (128)
  ------------------
  |  Branch (1736:27): [True: 0, False: 0]
  ------------------
 1737|      0|                *mdct_sf_ptr++ = *mdct_p++;
 1738|      0|              }
 1739|      0|            } else {
 1740|      0|              window_offset = l;
 1741|      0|              l = 6;
 1742|      0|              mdct_length = 192;
 1743|      0|              is_long = 4;
 1744|      0|              gain = 13377;
 1745|      0|              scale = a;
 1746|      0|              wp = wt + window_offset;
 1747|       |
 1748|      0|              for (k = 0; k < l; k++) {
  ------------------
  |  Branch (1748:27): [True: 0, False: 0]
  ------------------
 1749|      0|                *scale++ = ixheaacd_mps_mult32_shr_15(gain, *wp);
 1750|      0|                wp++;
 1751|      0|              }
 1752|       |
 1753|      0|              mdct_p = mdct_in + mdct_offset;
 1754|      0|              mdct_p2 = mdct_in + mdct_offset + AAC_SHORT_FRAME_LENGTH;
  ------------------
  |  |   24|      0|#define AAC_SHORT_FRAME_LENGTH (128)
  ------------------
 1755|       |
 1756|      0|              for (i = 0, j = 0; i < mdct_length / 2; i++) {
  ------------------
  |  Branch (1756:34): [True: 0, False: 0]
  ------------------
 1757|      0|                *mdct_sf_ptr++ = *mdct_p++;
 1758|      0|                *mdct_sf_ptr++ = *mdct_p2++;
 1759|      0|              }
 1760|      0|            }
 1761|      0|            break;
 1762|     54|          case UPD_QMF_18:
  ------------------
  |  |   32|     54|#define UPD_QMF_18 (18)
  ------------------
  |  Branch (1762:11): [True: 54, False: 1.62k]
  ------------------
 1763|    186|          case UPD_QMF_24:
  ------------------
  |  |   33|    186|#define UPD_QMF_24 (24)
  ------------------
  |  Branch (1763:11): [True: 132, False: 1.55k]
  ------------------
 1764|    186|          case UPD_QMF_30:
  ------------------
  |  |   34|    186|#define UPD_QMF_30 (30)
  ------------------
  |  Branch (1764:11): [True: 0, False: 1.68k]
  ------------------
 1765|       |
 1766|    186|            mdct_p = mdct_in + mdct_offset;
 1767|  23.9k|            for (i = 0; i < AAC_SHORT_FRAME_LENGTH; i++) {
  ------------------
  |  |   24|  23.9k|#define AAC_SHORT_FRAME_LENGTH (128)
  ------------------
  |  Branch (1767:25): [True: 23.8k, False: 186]
  ------------------
 1768|  23.8k|              *mdct_sf_ptr++ = *mdct_p++;
 1769|  23.8k|            }
 1770|    186|            break;
 1771|      0|          default:
  ------------------
  |  Branch (1771:11): [True: 0, False: 1.68k]
  ------------------
 1772|      0|            break;
 1773|  1.68k|        }
 1774|  1.68k|        ixheaacd_local_fold_out(mdct_sf, mdct_length, &wf[window_offset], l, v1, v2);
 1775|       |
 1776|  1.68k|        ixheaacd_local_hybcmdct2qmf(v1, v2, a, l, z1_real, z1_imag,
 1777|  1.68k|                                    ia_mps_dec_mps_table_ptr->mdct2qmfcos_tab_ptr, free_scratch,
 1778|  1.68k|                                    is_long);
 1779|       |
 1780|  1.68k|        zr = z1_real;
 1781|  1.68k|        zi = z1_imag;
 1782|       |
 1783|  1.68k|        ptr1 = ia_mps_dec_mps_table_ptr->mdct2qmf_table_ptr->twi_post_cos;
 1784|  1.68k|        ptr2 = ia_mps_dec_mps_table_ptr->mdct2qmf_table_ptr->twi_post_sin;
 1785|  1.68k|        temp_2 = qmf_offset + qmf_global_offset;
 1786|       |
 1787|  1.68k|        if (temp_2 < time_slots) {
  ------------------
  |  Branch (1787:13): [True: 1.05k, False: 631]
  ------------------
 1788|  1.05k|          if ((temp_2 + l) < time_slots) {
  ------------------
  |  Branch (1788:15): [True: 647, False: 404]
  ------------------
 1789|    647|            p_qmf_real_pre = qmf_real_pre;
 1790|    647|            p_qmf_imag_pre = qmf_imag_pre;
 1791|       |
 1792|  42.0k|            for (i = 0; i < qmf_bands; i++) {
  ------------------
  |  Branch (1792:25): [True: 41.4k, False: 647]
  ------------------
 1793|  41.4k|              WORD32 cos_twi = *ptr1++;
 1794|  41.4k|              WORD32 sin_twi = *ptr2++;
 1795|       |
 1796|   272k|              for (j = 0; j < l; j++) {
  ------------------
  |  Branch (1796:27): [True: 230k, False: 41.4k]
  ------------------
 1797|   230k|                temp3 = *zr++;
 1798|   230k|                temp4 = (*zi++);
 1799|       |
 1800|   230k|                temp_prod = (WORD64)(p_qmf_real_pre[temp_2 + j]);
 1801|   230k|                temp_prod = ixheaac_mac32x32in64(temp_prod, cos_twi, temp3);
 1802|   230k|                temp_prod = ixheaac_mac32x32in64(temp_prod, -sin_twi, temp4);
 1803|   230k|                p_qmf_real_pre[temp_2 + j] = ixheaac_sat64_32(temp_prod);
 1804|   230k|                temp_prod = (WORD64)(p_qmf_imag_pre[temp_2 + j]);
 1805|   230k|                temp_prod = ixheaac_mac32x32in64(temp_prod, cos_twi, temp4);
 1806|   230k|                temp_prod = ixheaac_mac32x32in64(temp_prod, sin_twi, temp3);
 1807|   230k|                p_qmf_imag_pre[temp_2 + j] = ixheaac_sat64_32(temp_prod);
 1808|   230k|              }
 1809|  41.4k|              p_qmf_real_pre += MAX_TIME_SLOTS;
  ------------------
  |  |   48|  41.4k|#define MAX_TIME_SLOTS (72)
  ------------------
 1810|  41.4k|              p_qmf_imag_pre += MAX_TIME_SLOTS;
  ------------------
  |  |   48|  41.4k|#define MAX_TIME_SLOTS (72)
  ------------------
 1811|  41.4k|            }
 1812|    647|          } else {
 1813|    404|            p_qmf_real_pre = qmf_real_pre;
 1814|    404|            p_qmf_real_post = qmf_real_post;
 1815|    404|            p_qmf_imag_pre = qmf_imag_pre;
 1816|    404|            p_qmf_imag_post = qmf_imag_post;
 1817|       |
 1818|  26.2k|            for (i = 0; i < qmf_bands; i++) {
  ------------------
  |  Branch (1818:25): [True: 25.8k, False: 404]
  ------------------
 1819|  25.8k|              WORD32 cos_twi = *ptr1++;
 1820|  25.8k|              WORD32 sin_twi = *ptr2++;
 1821|       |
 1822|   172k|              for (j = 0; j < l; j++) {
  ------------------
  |  Branch (1822:27): [True: 146k, False: 25.8k]
  ------------------
 1823|   146k|                temp3 = *zr++;
 1824|   146k|                temp4 = (*zi++);
 1825|       |
 1826|   146k|                if ((temp_2 + j) < time_slots) {
  ------------------
  |  Branch (1826:21): [True: 74.1k, False: 72.8k]
  ------------------
 1827|  74.1k|                  temp_prod = (WORD64)(p_qmf_real_pre[temp_2 + j]);
 1828|  74.1k|                  temp_prod = ixheaac_mac32x32in64(temp_prod, cos_twi, temp3);
 1829|  74.1k|                  temp_prod = ixheaac_mac32x32in64(temp_prod, -sin_twi, temp4);
 1830|  74.1k|                  p_qmf_real_pre[temp_2 + j] = ixheaac_sat64_32(temp_prod);
 1831|  74.1k|                  temp_prod = (WORD64)(p_qmf_imag_pre[temp_2 + j]);
 1832|  74.1k|                  temp_prod = ixheaac_mac32x32in64(temp_prod, cos_twi, temp4);
 1833|  74.1k|                  temp_prod = ixheaac_mac32x32in64(temp_prod, sin_twi, temp3);
 1834|  74.1k|                  p_qmf_imag_pre[temp_2 + j] = ixheaac_sat64_32(temp_prod);
 1835|  74.1k|                } else {
 1836|  72.8k|                  temp_prod = (WORD64)(p_qmf_real_post[temp_2 + j - time_slots]);
 1837|  72.8k|                  temp_prod = ixheaac_mac32x32in64(temp_prod, cos_twi, temp3);
 1838|  72.8k|                  temp_prod = ixheaac_mac32x32in64(temp_prod, -sin_twi, temp4);
 1839|  72.8k|                  p_qmf_real_post[temp_2 + j - time_slots] = ixheaac_sat64_32(temp_prod);
 1840|  72.8k|                  temp_prod = (WORD64)(p_qmf_imag_post[temp_2 + j - time_slots]);
 1841|  72.8k|                  temp_prod = ixheaac_mac32x32in64(temp_prod, cos_twi, temp4);
 1842|  72.8k|                  temp_prod = ixheaac_mac32x32in64(temp_prod, sin_twi, temp3);
 1843|  72.8k|                  p_qmf_imag_post[temp_2 + j - time_slots] = ixheaac_sat64_32(temp_prod);
 1844|  72.8k|                }
 1845|   146k|              }
 1846|  25.8k|              p_qmf_real_pre += MAX_TIME_SLOTS;
  ------------------
  |  |   48|  25.8k|#define MAX_TIME_SLOTS (72)
  ------------------
 1847|  25.8k|              p_qmf_imag_pre += MAX_TIME_SLOTS;
  ------------------
  |  |   48|  25.8k|#define MAX_TIME_SLOTS (72)
  ------------------
 1848|       |
 1849|  25.8k|              p_qmf_real_post += MAX_TIME_SLOTS;
  ------------------
  |  |   48|  25.8k|#define MAX_TIME_SLOTS (72)
  ------------------
 1850|  25.8k|              p_qmf_imag_post += MAX_TIME_SLOTS;
  ------------------
  |  |   48|  25.8k|#define MAX_TIME_SLOTS (72)
  ------------------
 1851|  25.8k|            }
 1852|    404|          }
 1853|  1.05k|        } else {
 1854|    631|          p_qmf_real_post = qmf_real_post;
 1855|    631|          p_qmf_imag_post = qmf_imag_post;
 1856|       |
 1857|  41.0k|          for (i = 0; i < qmf_bands; i++) {
  ------------------
  |  Branch (1857:23): [True: 40.3k, False: 631]
  ------------------
 1858|  40.3k|            WORD32 cos_twi = *ptr1++;
 1859|  40.3k|            WORD32 sin_twi = *ptr2++;
 1860|       |
 1861|   267k|            for (j = 0; j < l; j++) {
  ------------------
  |  Branch (1861:25): [True: 226k, False: 40.3k]
  ------------------
 1862|   226k|              temp3 = *zr++;
 1863|   226k|              temp4 = (*zi++);
 1864|   226k|              {
 1865|   226k|                temp_prod = (WORD64)(p_qmf_real_post[temp_2 + j - time_slots]);
 1866|   226k|                temp_prod = ixheaac_mac32x32in64(temp_prod, cos_twi, temp3);
 1867|   226k|                temp_prod = ixheaac_mac32x32in64(temp_prod, -sin_twi, temp4);
 1868|   226k|                p_qmf_real_post[temp_2 + j - time_slots] = ixheaac_sat64_32(temp_prod);
 1869|   226k|                temp_prod = (WORD64)(p_qmf_imag_post[temp_2 + j - time_slots]);
 1870|   226k|                temp_prod = ixheaac_mac32x32in64(temp_prod, cos_twi, temp4);
 1871|   226k|                temp_prod = ixheaac_mac32x32in64(temp_prod, sin_twi, temp3);
 1872|   226k|                p_qmf_imag_post[temp_2 + j - time_slots] = ixheaac_sat64_32(temp_prod);
 1873|   226k|              }
 1874|   226k|            }
 1875|  40.3k|            p_qmf_real_post += MAX_TIME_SLOTS;
  ------------------
  |  |   48|  40.3k|#define MAX_TIME_SLOTS (72)
  ------------------
 1876|  40.3k|            p_qmf_imag_post += MAX_TIME_SLOTS;
  ------------------
  |  |   48|  40.3k|#define MAX_TIME_SLOTS (72)
  ------------------
 1877|  40.3k|          }
 1878|    631|        }
 1879|       |
 1880|  1.68k|        mdct_offset += mdct_shift;
 1881|  1.68k|        qmf_offset += qmf_shift;
 1882|  1.68k|      }
 1883|    204|      break;
 1884|    204|    default:
  ------------------
  |  Branch (1884:5): [True: 0, False: 752]
  ------------------
 1885|      0|      break;
 1886|    752|  }
 1887|    752|  return;
 1888|    752|}
ixheaacd_mps_mdct_2_qmf.c:ixheaacd_local_mdct_win:
 1296|    752|                                    ia_mps_dec_mdct2qmf_table_struct *mdct2qmf_tab) {
 1297|    752|  WORD32 length = 0;
 1298|    752|  WORD32 length_right = 0;
 1299|    752|  WORD32 length_left = 0;
 1300|    752|  WORD32 length_const1 = 0;
 1301|    752|  WORD32 length_const2 = 0;
 1302|       |
 1303|    752|  switch (window_type) {
 1304|    415|    case ONLY_LONG_SEQUENCE:
  ------------------
  |  |  100|    415|#define ONLY_LONG_SEQUENCE 0
  ------------------
  |  Branch (1304:5): [True: 415, False: 337]
  ------------------
 1305|    415|      length = upd_qmf;
 1306|    415|      ixheaacd_local_sin(upd_qmf, 0, (length << 1), &wt[0], mdct2qmf_tab);
 1307|    415|      break;
 1308|    103|    case LONG_START_SEQUENCE:
  ------------------
  |  |  101|    103|#define LONG_START_SEQUENCE 1
  ------------------
  |  Branch (1308:5): [True: 103, False: 649]
  ------------------
 1309|    103|      switch (upd_qmf) {
 1310|      0|        case UPD_QMF_15:
  ------------------
  |  |   30|      0|#define UPD_QMF_15 (15)
  ------------------
  |  Branch (1310:9): [True: 0, False: 103]
  ------------------
 1311|      0|          length_const1 = 6;
 1312|      0|          length_const2 = 7;
 1313|      0|          length_right = 2;
 1314|      0|          break;
 1315|     26|        case UPD_QMF_16:
  ------------------
  |  |   31|     26|#define UPD_QMF_16 (16)
  ------------------
  |  Branch (1315:9): [True: 26, False: 77]
  ------------------
 1316|     37|        case UPD_QMF_32:
  ------------------
  |  |   35|     37|#define UPD_QMF_32 (32)
  ------------------
  |  Branch (1316:9): [True: 11, False: 92]
  ------------------
 1317|     37|          length_const1 = 7 * (upd_qmf >> 4);
 1318|     37|          length_const2 = length_const1;
 1319|     37|          length_right = upd_qmf >> 3;
 1320|     37|          break;
 1321|      7|        case UPD_QMF_18:
  ------------------
  |  |   32|      7|#define UPD_QMF_18 (18)
  ------------------
  |  Branch (1321:9): [True: 7, False: 96]
  ------------------
 1322|      7|          length_const1 = 8;
 1323|      7|          length_const2 = length_const1;
 1324|      7|          length_right = 2;
 1325|      7|          break;
 1326|     56|        case UPD_QMF_24:
  ------------------
  |  |   33|     56|#define UPD_QMF_24 (24)
  ------------------
  |  Branch (1326:9): [True: 56, False: 47]
  ------------------
 1327|     56|          length_const1 = 11;
 1328|     56|          length_const2 = length_const1;
 1329|     56|          length_right = 2;
 1330|     56|          break;
 1331|      3|        case UPD_QMF_30:
  ------------------
  |  |   34|      3|#define UPD_QMF_30 (30)
  ------------------
  |  Branch (1331:9): [True: 3, False: 100]
  ------------------
 1332|      3|          length_const1 = 14;
 1333|      3|          length_const2 = length_const1;
 1334|      3|          length_right = 2;
 1335|      3|          break;
 1336|      0|        default:
  ------------------
  |  Branch (1336:9): [True: 0, False: 103]
  ------------------
 1337|      0|          length_const1 = 6;
 1338|      0|          length_const2 = 7;
 1339|      0|          length_right = 2;
 1340|      0|          break;
 1341|    103|      }
 1342|       |
 1343|    103|      ixheaacd_local_sin(upd_qmf, 0, upd_qmf, &wt[0], mdct2qmf_tab);
 1344|    103|      ixheaacd_local_one(length_const1, &wt[upd_qmf]);
 1345|    103|      ixheaacd_local_sin(length_right, length_right, length_right, &wt[upd_qmf + length_const1],
 1346|    103|                         mdct2qmf_tab);
 1347|       |
 1348|    103|      ixheaacd_local_zero(length_const2, &wt[upd_qmf + length_const1 + length_right]);
 1349|    103|      length = upd_qmf;
 1350|    103|      break;
 1351|    204|    case EIGHT_SHORT_SEQUENCE:
  ------------------
  |  |  102|    204|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  |  Branch (1351:5): [True: 204, False: 548]
  ------------------
 1352|    204|      switch (upd_qmf) {
 1353|    102|        case UPD_QMF_16:
  ------------------
  |  |   31|    102|#define UPD_QMF_16 (16)
  ------------------
  |  Branch (1353:9): [True: 102, False: 102]
  ------------------
 1354|    187|        case UPD_QMF_32:
  ------------------
  |  |   35|    187|#define UPD_QMF_32 (32)
  ------------------
  |  Branch (1354:9): [True: 85, False: 119]
  ------------------
 1355|    187|          length = upd_qmf >> 3;
 1356|    187|          break;
 1357|      0|        case UPD_QMF_15:
  ------------------
  |  |   30|      0|#define UPD_QMF_15 (15)
  ------------------
  |  Branch (1357:9): [True: 0, False: 204]
  ------------------
 1358|      6|        case UPD_QMF_18:
  ------------------
  |  |   32|      6|#define UPD_QMF_18 (18)
  ------------------
  |  Branch (1358:9): [True: 6, False: 198]
  ------------------
 1359|      6|        case UPD_QMF_30:
  ------------------
  |  |   34|      6|#define UPD_QMF_30 (30)
  ------------------
  |  Branch (1359:9): [True: 0, False: 204]
  ------------------
 1360|     17|        case UPD_QMF_24:
  ------------------
  |  |   33|     17|#define UPD_QMF_24 (24)
  ------------------
  |  Branch (1360:9): [True: 11, False: 193]
  ------------------
 1361|     17|          length = 2;
 1362|     17|          break;
 1363|      0|        default:
  ------------------
  |  Branch (1363:9): [True: 0, False: 204]
  ------------------
 1364|      0|          break;
 1365|    204|      }
 1366|    204|      ixheaacd_local_sin(length, 0, 2 * length, &wt[0], mdct2qmf_tab);
 1367|    204|      break;
 1368|     30|    case LONG_STOP_SEQUENCE:
  ------------------
  |  |  103|     30|#define LONG_STOP_SEQUENCE 3
  ------------------
  |  Branch (1368:5): [True: 30, False: 722]
  ------------------
 1369|     30|      switch (upd_qmf) {
 1370|      0|        case UPD_QMF_15:
  ------------------
  |  |   30|      0|#define UPD_QMF_15 (15)
  ------------------
  |  Branch (1370:9): [True: 0, False: 30]
  ------------------
 1371|      0|          length_const1 = 6;
 1372|      0|          length_const2 = 7;
 1373|      0|          length_left = 2;
 1374|      0|          break;
 1375|     17|        case UPD_QMF_16:
  ------------------
  |  |   31|     17|#define UPD_QMF_16 (16)
  ------------------
  |  Branch (1375:9): [True: 17, False: 13]
  ------------------
 1376|     20|        case UPD_QMF_32:
  ------------------
  |  |   35|     20|#define UPD_QMF_32 (32)
  ------------------
  |  Branch (1376:9): [True: 3, False: 27]
  ------------------
 1377|     20|          length_const1 = 7 * (upd_qmf >> 4);
 1378|     20|          length_const2 = length_const1;
 1379|     20|          length_left = upd_qmf >> 3;
 1380|     20|          break;
 1381|      3|        case UPD_QMF_18:
  ------------------
  |  |   32|      3|#define UPD_QMF_18 (18)
  ------------------
  |  Branch (1381:9): [True: 3, False: 27]
  ------------------
 1382|      3|          length_const1 = 8;
 1383|      3|          length_const2 = length_const1;
 1384|      3|          length_left = 2;
 1385|      3|          break;
 1386|      7|        case UPD_QMF_24:
  ------------------
  |  |   33|      7|#define UPD_QMF_24 (24)
  ------------------
  |  Branch (1386:9): [True: 7, False: 23]
  ------------------
 1387|      7|          length_const1 = 11;
 1388|      7|          length_const2 = length_const1;
 1389|      7|          length_left = 2;
 1390|      7|          break;
 1391|      0|        case UPD_QMF_30:
  ------------------
  |  |   34|      0|#define UPD_QMF_30 (30)
  ------------------
  |  Branch (1391:9): [True: 0, False: 30]
  ------------------
 1392|      0|          length_const1 = 14;
 1393|      0|          length_const2 = length_const1;
 1394|      0|          length_left = 2;
 1395|      0|          break;
 1396|      0|        default:
  ------------------
  |  Branch (1396:9): [True: 0, False: 30]
  ------------------
 1397|      0|          break;
 1398|     30|      }
 1399|       |
 1400|     30|      ixheaacd_local_zero(length_const1, &wt[0]);
 1401|     30|      ixheaacd_local_sin(length_left, 0, length_left, &wt[length_const1], mdct2qmf_tab);
 1402|     30|      ixheaacd_local_one(length_const2, &wt[length_const1 + length_left]);
 1403|     30|      ixheaacd_local_sin(upd_qmf, upd_qmf, upd_qmf,
 1404|     30|                         &wt[length_const1 + length_left + length_const2], mdct2qmf_tab);
 1405|     30|      length = upd_qmf;
 1406|     30|      break;
 1407|      0|    default:
  ------------------
  |  Branch (1407:5): [True: 0, False: 752]
  ------------------
 1408|      0|      break;
 1409|    752|  }
 1410|       |
 1411|    752|  ixheaacd_local_freq_win(length, &wf[0], wf_tab);
 1412|       |
 1413|    752|  if ((upd_qmf == UPD_QMF_15) && (window_type == EIGHT_SHORT_SEQUENCE)) {
  ------------------
  |  |   30|    752|#define UPD_QMF_15 (15)
  ------------------
                if ((upd_qmf == UPD_QMF_15) && (window_type == EIGHT_SHORT_SEQUENCE)) {
  ------------------
  |  |  102|      0|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  |  Branch (1413:7): [True: 0, False: 752]
  |  Branch (1413:34): [True: 0, False: 0]
  ------------------
 1414|      0|    WORD32 length2 = 3;
 1415|       |
 1416|      0|    ixheaacd_local_sin(length, 0, length, &wt[(length << 1)], mdct2qmf_tab);
 1417|      0|    ixheaacd_local_one(1, &wt[3 * length]);
 1418|      0|    ixheaacd_local_sin(length, length, length, &wt[3 * length + 1], mdct2qmf_tab);
 1419|      0|    ixheaacd_local_zero(1, &wt[(length << 2) + 1]);
 1420|       |
 1421|      0|    ixheaacd_local_freq_win(length2, &wf[(length << 1)], wf_tab);
 1422|      0|  }
 1423|    752|  return;
 1424|    752|}
ixheaacd_mps_mdct_2_qmf.c:ixheaacd_local_sin:
 1127|    885|                               ia_mps_dec_mdct2qmf_table_struct *mdct2qmf_tab) {
 1128|    885|  WORD32 *sin_ptr;
 1129|       |
 1130|    885|  switch (t) {
 1131|    238|    case TS_2:
  ------------------
  |  |   46|    238|#define TS_2 (2)
  ------------------
  |  Branch (1131:5): [True: 238, False: 647]
  ------------------
 1132|    238|      switch (p) {
 1133|    146|        case ZERO:
  ------------------
  |  |   55|    146|#define ZERO (0)
  ------------------
  |  Branch (1133:9): [True: 146, False: 92]
  ------------------
 1134|    146|          b[0] = 12540;
 1135|    146|          b[1] = 30274;
 1136|    146|          if (l == TSX2_4) {
  ------------------
  |  |   37|    146|#define TSX2_4 (4)
  ------------------
  |  Branch (1136:15): [True: 119, False: 27]
  ------------------
 1137|    119|            b[2] = b[1];
 1138|    119|            b[3] = b[0];
 1139|    119|          }
 1140|    146|          break;
 1141|     92|        case TS_2:
  ------------------
  |  |   46|     92|#define TS_2 (2)
  ------------------
  |  Branch (1141:9): [True: 92, False: 146]
  ------------------
 1142|     92|          b[0] = 30274;
 1143|     92|          b[1] = 12540;
 1144|     92|          break;
 1145|      0|        default:
  ------------------
  |  Branch (1145:9): [True: 0, False: 238]
  ------------------
 1146|      0|          break;
 1147|    238|      }
 1148|    238|      break;
 1149|    238|    case TS_4:
  ------------------
  |  |   47|     99|#define TS_4 (4)
  ------------------
  |  Branch (1149:5): [True: 99, False: 786]
  ------------------
 1150|     99|      switch (p) {
 1151|     88|        case ZERO:
  ------------------
  |  |   55|     88|#define ZERO (0)
  ------------------
  |  Branch (1151:9): [True: 88, False: 11]
  ------------------
 1152|     88|          sin_ptr = mdct2qmf_tab->local_sin_4;
 1153|     88|          b[0] = *sin_ptr++;
 1154|     88|          b[1] = *sin_ptr++;
 1155|     88|          b[2] = *sin_ptr++;
 1156|     88|          b[3] = *sin_ptr;
 1157|     88|          if (l == TSX2_8) {
  ------------------
  |  |   39|     88|#define TSX2_8 (8)
  ------------------
  |  Branch (1157:15): [True: 85, False: 3]
  ------------------
 1158|     85|            b[4] = *sin_ptr--;
 1159|     85|            b[5] = *sin_ptr--;
 1160|     85|            b[6] = *sin_ptr--;
 1161|     85|            b[7] = *sin_ptr;
 1162|     85|          }
 1163|     88|          break;
 1164|     11|        case TS_4:
  ------------------
  |  |   47|     11|#define TS_4 (4)
  ------------------
  |  Branch (1164:9): [True: 11, False: 88]
  ------------------
 1165|     11|          sin_ptr = &(mdct2qmf_tab->local_sin_4[TS_MINUS_ONE_4]);
  ------------------
  |  |   48|     11|#define TS_MINUS_ONE_4 (3)
  ------------------
 1166|     11|          b[0] = *sin_ptr--;
 1167|     11|          b[1] = *sin_ptr--;
 1168|     11|          b[2] = *sin_ptr--;
 1169|     11|          b[3] = *sin_ptr;
 1170|     11|          break;
 1171|      0|        default:
  ------------------
  |  Branch (1171:9): [True: 0, False: 99]
  ------------------
 1172|      0|          break;
 1173|     99|      }
 1174|     99|      break;
 1175|     99|    case UPD_QMF_15:
  ------------------
  |  |   30|      0|#define UPD_QMF_15 (15)
  ------------------
  |  Branch (1175:5): [True: 0, False: 885]
  ------------------
 1176|      0|      switch (p) {
 1177|      0|        case ZERO:
  ------------------
  |  |   55|      0|#define ZERO (0)
  ------------------
  |  Branch (1177:9): [True: 0, False: 0]
  ------------------
 1178|      0|          sin_ptr = &(mdct2qmf_tab->local_sin_15[1]);
 1179|      0|          ixheaacd_local_p_zero_ts15(b, sin_ptr, l);
 1180|      0|          break;
 1181|      0|        case UPD_QMF_15:
  ------------------
  |  |   30|      0|#define UPD_QMF_15 (15)
  ------------------
  |  Branch (1181:9): [True: 0, False: 0]
  ------------------
 1182|      0|          sin_ptr = &(mdct2qmf_tab->local_sin_15[TS_MINUS_ONE_15]);
  ------------------
  |  |   49|      0|#define TS_MINUS_ONE_15 (14)
  ------------------
 1183|      0|          ixheaacd_local_p_nonzero(b, sin_ptr, l);
 1184|      0|          break;
 1185|      0|        default:
  ------------------
  |  Branch (1185:9): [True: 0, False: 0]
  ------------------
 1186|      0|          break;
 1187|      0|      }
 1188|      0|      break;
 1189|    151|    case UPD_QMF_16:
  ------------------
  |  |   31|    151|#define UPD_QMF_16 (16)
  ------------------
  |  Branch (1189:5): [True: 151, False: 734]
  ------------------
 1190|    151|      switch (p) {
 1191|    134|        case ZERO:
  ------------------
  |  |   55|    134|#define ZERO (0)
  ------------------
  |  Branch (1191:9): [True: 134, False: 17]
  ------------------
 1192|    134|          sin_ptr = mdct2qmf_tab->local_sin_16;
 1193|    134|          ixheaacd_local_p_zero(b, sin_ptr, l, UPD_QMF_16);
  ------------------
  |  |   31|    134|#define UPD_QMF_16 (16)
  ------------------
 1194|    134|          break;
 1195|     17|        case UPD_QMF_16:
  ------------------
  |  |   31|     17|#define UPD_QMF_16 (16)
  ------------------
  |  Branch (1195:9): [True: 17, False: 134]
  ------------------
 1196|     17|          sin_ptr = &(mdct2qmf_tab->local_sin_16[TS_MINUS_ONE_16]);
  ------------------
  |  |   50|     17|#define TS_MINUS_ONE_16 (15)
  ------------------
 1197|     17|          ixheaacd_local_p_nonzero(b, sin_ptr, l);
 1198|     17|          break;
 1199|      0|        default:
  ------------------
  |  Branch (1199:9): [True: 0, False: 151]
  ------------------
 1200|      0|          break;
 1201|    151|      }
 1202|    151|      break;
 1203|    151|    case UPD_QMF_18:
  ------------------
  |  |   32|     50|#define UPD_QMF_18 (18)
  ------------------
  |  Branch (1203:5): [True: 50, False: 835]
  ------------------
 1204|     50|      switch (p) {
 1205|     47|        case ZERO:
  ------------------
  |  |   55|     47|#define ZERO (0)
  ------------------
  |  Branch (1205:9): [True: 47, False: 3]
  ------------------
 1206|     47|          sin_ptr = mdct2qmf_tab->local_sin_18;
 1207|     47|          ixheaacd_local_p_zero(b, sin_ptr, l, UPD_QMF_18);
  ------------------
  |  |   32|     47|#define UPD_QMF_18 (18)
  ------------------
 1208|     47|          break;
 1209|      3|        case UPD_QMF_18:
  ------------------
  |  |   32|      3|#define UPD_QMF_18 (18)
  ------------------
  |  Branch (1209:9): [True: 3, False: 47]
  ------------------
 1210|      3|          sin_ptr = &(mdct2qmf_tab->local_sin_18[TS_MINUS_ONE_18]);
  ------------------
  |  |   51|      3|#define TS_MINUS_ONE_18 (17)
  ------------------
 1211|      3|          ixheaacd_local_p_nonzero(b, sin_ptr, l);
 1212|      3|          break;
 1213|      0|        default:
  ------------------
  |  Branch (1213:9): [True: 0, False: 50]
  ------------------
 1214|      0|          break;
 1215|     50|      }
 1216|     50|      break;
 1217|    203|    case UPD_QMF_24:
  ------------------
  |  |   33|    203|#define UPD_QMF_24 (24)
  ------------------
  |  Branch (1217:5): [True: 203, False: 682]
  ------------------
 1218|    203|      switch (p) {
 1219|    196|        case ZERO:
  ------------------
  |  |   55|    196|#define ZERO (0)
  ------------------
  |  Branch (1219:9): [True: 196, False: 7]
  ------------------
 1220|    196|          sin_ptr = mdct2qmf_tab->local_sin_24;
 1221|    196|          ixheaacd_local_p_zero(b, sin_ptr, l, UPD_QMF_24);
  ------------------
  |  |   33|    196|#define UPD_QMF_24 (24)
  ------------------
 1222|    196|          break;
 1223|      7|        case UPD_QMF_24:
  ------------------
  |  |   33|      7|#define UPD_QMF_24 (24)
  ------------------
  |  Branch (1223:9): [True: 7, False: 196]
  ------------------
 1224|      7|          sin_ptr = &(mdct2qmf_tab->local_sin_24[TS_MINUS_ONE_24]);
  ------------------
  |  |   52|      7|#define TS_MINUS_ONE_24 (23)
  ------------------
 1225|      7|          ixheaacd_local_p_nonzero(b, sin_ptr, l);
 1226|      7|          break;
 1227|      0|        default:
  ------------------
  |  Branch (1227:9): [True: 0, False: 203]
  ------------------
 1228|      0|          break;
 1229|    203|      }
 1230|    203|      break;
 1231|    203|    case UPD_QMF_30:
  ------------------
  |  |   34|     24|#define UPD_QMF_30 (30)
  ------------------
  |  Branch (1231:5): [True: 24, False: 861]
  ------------------
 1232|     24|      switch (p) {
 1233|     24|        case ZERO:
  ------------------
  |  |   55|     24|#define ZERO (0)
  ------------------
  |  Branch (1233:9): [True: 24, False: 0]
  ------------------
 1234|     24|          sin_ptr = mdct2qmf_tab->local_sin_30;
 1235|     24|          ixheaacd_local_p_zero(b, sin_ptr, l, UPD_QMF_30);
  ------------------
  |  |   34|     24|#define UPD_QMF_30 (30)
  ------------------
 1236|     24|          break;
 1237|      0|        case UPD_QMF_30:
  ------------------
  |  |   34|      0|#define UPD_QMF_30 (30)
  ------------------
  |  Branch (1237:9): [True: 0, False: 24]
  ------------------
 1238|      0|          sin_ptr = &(mdct2qmf_tab->local_sin_30[TS_MINUS_ONE_30]);
  ------------------
  |  |   53|      0|#define TS_MINUS_ONE_30 (29)
  ------------------
 1239|      0|          ixheaacd_local_p_nonzero(b, sin_ptr, l);
 1240|      0|          break;
 1241|      0|        default:
  ------------------
  |  Branch (1241:9): [True: 0, False: 24]
  ------------------
 1242|      0|          break;
 1243|     24|      }
 1244|     24|      break;
 1245|    120|    case UPD_QMF_32:
  ------------------
  |  |   35|    120|#define UPD_QMF_32 (32)
  ------------------
  |  Branch (1245:5): [True: 120, False: 765]
  ------------------
 1246|    120|      switch (p) {
 1247|    117|        case ZERO:
  ------------------
  |  |   55|    117|#define ZERO (0)
  ------------------
  |  Branch (1247:9): [True: 117, False: 3]
  ------------------
 1248|    117|          sin_ptr = mdct2qmf_tab->local_sin_32;
 1249|    117|          ixheaacd_local_p_zero(b, sin_ptr, l, UPD_QMF_32);
  ------------------
  |  |   35|    117|#define UPD_QMF_32 (32)
  ------------------
 1250|    117|          break;
 1251|      3|        case UPD_QMF_32:
  ------------------
  |  |   35|      3|#define UPD_QMF_32 (32)
  ------------------
  |  Branch (1251:9): [True: 3, False: 117]
  ------------------
 1252|      3|          sin_ptr = &(mdct2qmf_tab->local_sin_32[TS_MINUS_ONE_32]);
  ------------------
  |  |   54|      3|#define TS_MINUS_ONE_32 (31)
  ------------------
 1253|      3|          ixheaacd_local_p_nonzero(b, sin_ptr, l);
 1254|       |
 1255|      3|          break;
 1256|      0|        default:
  ------------------
  |  Branch (1256:9): [True: 0, False: 120]
  ------------------
 1257|      0|          break;
 1258|    120|      }
 1259|    120|      break;
 1260|    120|    default:
  ------------------
  |  Branch (1260:5): [True: 0, False: 885]
  ------------------
 1261|      0|      break;
 1262|    885|  }
 1263|    885|  return;
 1264|    885|}
ixheaacd_mps_mdct_2_qmf.c:ixheaacd_local_p_nonzero:
 1105|     30|static VOID ixheaacd_local_p_nonzero(WORD32 *const b, WORD32 *src, WORD32 l) {
 1106|     30|  WORD32 i;
 1107|       |
 1108|    620|  for (i = 0; i < l; i++) {
  ------------------
  |  Branch (1108:15): [True: 590, False: 30]
  ------------------
 1109|    590|    b[i] = *src--;
 1110|    590|  }
 1111|     30|}
ixheaacd_mps_mdct_2_qmf.c:ixheaacd_local_p_zero:
 1113|    518|static VOID ixheaacd_local_p_zero(WORD32 *const b, WORD32 *src, WORD32 l, WORD32 upd_qmf) {
 1114|    518|  WORD32 i;
 1115|       |
 1116|  12.6k|  for (i = 0; i < upd_qmf; i++) {
  ------------------
  |  Branch (1116:15): [True: 12.1k, False: 518]
  ------------------
 1117|  12.1k|    b[i] = *src++;
 1118|  12.1k|  }
 1119|    518|  if (l != upd_qmf) {
  ------------------
  |  Branch (1119:7): [True: 415, False: 103]
  ------------------
 1120|  10.2k|    for (; i < l; i++) {
  ------------------
  |  Branch (1120:12): [True: 9.83k, False: 415]
  ------------------
 1121|  9.83k|      b[i] = *--src;
 1122|  9.83k|    }
 1123|    415|  }
 1124|    518|}
ixheaacd_mps_mdct_2_qmf.c:ixheaacd_local_one:
 1266|    133|static VOID ixheaacd_local_one(WORD32 const l, WORD32 *const b) {
 1267|    133|  WORD32 i;
 1268|       |
 1269|  1.44k|  for (i = 0; i < l; i++) {
  ------------------
  |  Branch (1269:15): [True: 1.31k, False: 133]
  ------------------
 1270|  1.31k|    b[i] = ONE_IN_Q15;
  ------------------
  |  |   41|  1.31k|#define ONE_IN_Q15 (32768)
  ------------------
 1271|  1.31k|  }
 1272|    133|}
ixheaacd_mps_mdct_2_qmf.c:ixheaacd_local_freq_win:
 1274|    752|static VOID ixheaacd_local_freq_win(WORD32 const l, WORD32 *const b, const WORD32 **wf) {
 1275|    752|  WORD32 i;
 1276|    752|  WORD32 odd_length = (l & ONE_BIT_MASK);
  ------------------
  |  |  204|    752|#define ONE_BIT_MASK (0x00000001)
  ------------------
 1277|    752|  WORD32 temp_1;
 1278|    752|  WORD32 *b_start, *b_end;
 1279|    752|  b_start = b;
 1280|    752|  b_end = b + 2 * l - 1 - odd_length;
 1281|       |
 1282|  14.0k|  for (i = 0; i < l - odd_length; i++) {
  ------------------
  |  Branch (1282:15): [True: 13.3k, False: 752]
  ------------------
 1283|  13.3k|    temp_1 = wf[l - 1][i];
 1284|  13.3k|    *b_start++ = temp_1;
 1285|  13.3k|    *b_end-- = temp_1;
 1286|  13.3k|  }
 1287|       |
 1288|    752|  if (odd_length == 1) {
  ------------------
  |  Branch (1288:7): [True: 0, False: 752]
  ------------------
 1289|      0|    *b_start = wf[l - 1][l - 1];
 1290|      0|    *(b_start + l) = 0;
 1291|      0|  }
 1292|    752|}
ixheaacd_mps_mdct_2_qmf.c:ixheaacd_local_zero:
  782|  2.02k|static VOID ixheaacd_local_zero(WORD32 const l, WORD32 *const b) {
  783|  2.02k|  WORD32 i;
  784|       |
  785|   345k|  for (i = 0; i < l; i++) {
  ------------------
  |  Branch (785:15): [True: 343k, False: 2.02k]
  ------------------
  786|   343k|    b[i] = 0;
  787|   343k|  }
  788|  2.02k|}
ixheaacd_mps_mdct_2_qmf.c:ixheaacd_local_fold_out:
  793|  2.23k|                                    WORD32 *const v_slave) {
  794|  2.23k|  WORD32 n;
  795|  2.23k|  WORD32 i;
  796|  2.23k|  WORD32 j;
  797|  2.23k|  WORD32 k;
  798|       |
  799|  2.23k|  WORD32 temp_1;
  800|       |
  801|  2.23k|  WORD32 *w1;
  802|  2.23k|  WORD32 *w2;
  803|  2.23k|  WORD32 *w3;
  804|  2.23k|  WORD32 *w4;
  805|  2.23k|  WORD32 *ptr1, *ptr2, *ptr3;
  806|       |
  807|  2.23k|  WORD32 m = l_w >> 1;
  808|  2.23k|  WORD32 l = lv / m;
  809|  2.23k|  WORD32 m2w = m >> 1;
  810|  2.23k|  WORD32 m2a = m - m2w;
  811|       |
  812|  37.9k|  for (i = m; i < lv; i += l_w) {
  ------------------
  |  Branch (812:15): [True: 35.6k, False: 2.23k]
  ------------------
  813|   594k|    for (n = i + l_w; i < n; i++) {
  ------------------
  |  Branch (813:23): [True: 559k, False: 35.6k]
  ------------------
  814|   559k|      s[i] = -s[i];
  815|   559k|    }
  816|  35.6k|  }
  817|       |
  818|  2.23k|  w1 = &w[-m2a];
  819|  2.23k|  w2 = &w[m2w];
  820|  2.23k|  w3 = &w[m2w];
  821|  2.23k|  w4 = &w[m + m2w];
  822|       |
  823|   142k|  for (n = 0, j = 0, k = m; n < l - 1; n++) {
  ------------------
  |  Branch (823:29): [True: 140k, False: 2.23k]
  ------------------
  824|   690k|    for (i = 0; i < m2a; i++, j++, k++) {
  ------------------
  |  Branch (824:17): [True: 550k, False: 140k]
  ------------------
  825|   550k|      v_main[k] = ixheaacd_mps_mult32_shr_30(w2[i], s[k]);
  826|   550k|      v_slave[j] = ixheaacd_mps_mult32_shr_30(w4[i], s[k]);
  827|   550k|    }
  828|       |
  829|   690k|    for (; i < m; i++, j++, k++) {
  ------------------
  |  Branch (829:12): [True: 550k, False: 140k]
  ------------------
  830|   550k|      v_main[j] = ixheaacd_mps_mult32_shr_30(w3[i], s[j]);
  831|   550k|      v_slave[k] = ixheaacd_mps_mult32_shr_30(w1[i], s[j]);
  832|   550k|    }
  833|   140k|  }
  834|       |
  835|  2.23k|  ptr1 = v_main;
  836|  2.23k|  ptr2 = v_slave + m - 1;
  837|  2.23k|  ptr3 = s;
  838|  10.9k|  for (i = 0; i < m2a; i++) {
  ------------------
  |  Branch (838:15): [True: 8.73k, False: 2.23k]
  ------------------
  839|  8.73k|    temp_1 = *ptr3++;
  840|  8.73k|    *ptr1++ = ixheaacd_mps_mult32_shr_30(*w2++, temp_1);
  841|  8.73k|    *ptr2-- = ixheaacd_mps_mult32_shr_30(*w4++, temp_1);
  842|  8.73k|  }
  843|       |
  844|  2.23k|  j = l * m - m2w;
  845|  2.23k|  k = l * m - m2a - 1;
  846|  2.23k|  ptr3 = s + l * m - m;
  847|  2.23k|  ptr1 = v_main + j;
  848|  2.23k|  ptr2 = v_slave + k;
  849|       |
  850|  2.23k|  w1 += m2a;
  851|  10.9k|  for (; i < m; i++, j++) {
  ------------------
  |  Branch (851:10): [True: 8.73k, False: 2.23k]
  ------------------
  852|  8.73k|    temp_1 = *ptr3++;
  853|  8.73k|    *ptr1++ = ixheaacd_mps_mult32_shr_30(*w2++, temp_1);
  854|  8.73k|    *ptr2-- = ixheaacd_mps_mult32_shr_30(*w1++, temp_1);
  855|  8.73k|  }
  856|  2.23k|}
ixheaacd_mps_mdct_2_qmf.c:ixheaacd_get_gain:
 1426|    752|static VOID ixheaacd_get_gain(WORD32 l, WORD32 *gain) {
 1427|    752|  switch (l) {
 1428|    119|    case TSX2_4:
  ------------------
  |  |   37|    119|#define TSX2_4 (4)
  ------------------
  |  Branch (1428:5): [True: 119, False: 633]
  ------------------
 1429|    119|      *gain = 16384;
 1430|    119|      break;
 1431|       |
 1432|      0|    case TSX2_6:
  ------------------
  |  |   38|      0|#define TSX2_6 (6)
  ------------------
  |  Branch (1432:5): [True: 0, False: 752]
  ------------------
 1433|      0|      *gain = 13377;
 1434|      0|      break;
 1435|       |
 1436|     85|    case TSX2_8:
  ------------------
  |  |   39|     85|#define TSX2_8 (8)
  ------------------
  |  Branch (1436:5): [True: 85, False: 667]
  ------------------
 1437|     85|      *gain = 11585;
 1438|     85|      break;
 1439|       |
 1440|      0|    case TSX2_30:
  ------------------
  |  |   40|      0|#define TSX2_30 (30)
  ------------------
  |  Branch (1440:5): [True: 0, False: 752]
  ------------------
 1441|      0|      *gain = 5982;
 1442|      0|      break;
 1443|       |
 1444|    151|    case TSX2_32:
  ------------------
  |  |   41|    151|#define TSX2_32 (32)
  ------------------
  |  Branch (1444:5): [True: 151, False: 601]
  ------------------
 1445|    151|      *gain = 5792;
 1446|    151|      break;
 1447|       |
 1448|     50|    case TSX2_36:
  ------------------
  |  |   42|     50|#define TSX2_36 (36)
  ------------------
  |  Branch (1448:5): [True: 50, False: 702]
  ------------------
 1449|     50|      *gain = 5461;
 1450|     50|      break;
 1451|       |
 1452|    203|    case TSX2_48:
  ------------------
  |  |   43|    203|#define TSX2_48 (48)
  ------------------
  |  Branch (1452:5): [True: 203, False: 549]
  ------------------
 1453|    203|      *gain = 4729;
 1454|    203|      break;
 1455|       |
 1456|     24|    case TSX2_60:
  ------------------
  |  |   44|     24|#define TSX2_60 (60)
  ------------------
  |  Branch (1456:5): [True: 24, False: 728]
  ------------------
 1457|     24|      *gain = 4230;
 1458|     24|      break;
 1459|       |
 1460|    120|    case TSX2_64:
  ------------------
  |  |   45|    120|#define TSX2_64 (64)
  ------------------
  |  Branch (1460:5): [True: 120, False: 632]
  ------------------
 1461|    120|      *gain = 4096;
 1462|    120|      break;
 1463|       |
 1464|      0|    default:
  ------------------
  |  Branch (1464:5): [True: 0, False: 752]
  ------------------
 1465|      0|      break;
 1466|    752|  }
 1467|       |
 1468|    752|  return;
 1469|    752|}
ixheaacd_mps_mdct_2_qmf.c:ixheaacd_local_hybcmdct2qmf:
 1057|  2.23k|    VOID *scratch, WORD32 is_long) {
 1058|  2.23k|  WORD32 i, start = 0;
 1059|  2.23k|  WORD32 m = lw >> 1;
 1060|       |
 1061|  2.23k|  switch (lw) {
 1062|  1.00k|    case TSX2_4:
  ------------------
  |  |   37|  1.00k|#define TSX2_4 (4)
  ------------------
  |  Branch (1062:5): [True: 1.00k, False: 1.22k]
  ------------------
 1063|  1.00k|    case TSX2_6:
  ------------------
  |  |   38|  1.00k|#define TSX2_6 (6)
  ------------------
  |  Branch (1063:5): [True: 0, False: 2.23k]
  ------------------
 1064|  1.00k|    case TSX2_30:
  ------------------
  |  |   40|  1.00k|#define TSX2_30 (30)
  ------------------
  |  Branch (1064:5): [True: 0, False: 2.23k]
  ------------------
 1065|  1.05k|    case TSX2_36:
  ------------------
  |  |   42|  1.05k|#define TSX2_36 (36)
  ------------------
  |  Branch (1065:5): [True: 50, False: 2.18k]
  ------------------
 1066|  1.07k|    case TSX2_60:
  ------------------
  |  |   44|  1.07k|#define TSX2_60 (60)
  ------------------
  |  Branch (1066:5): [True: 24, False: 2.20k]
  ------------------
 1067|  1.07k|      start = 1;
 1068|  1.07k|      break;
 1069|       |
 1070|    680|    case TSX2_8:
  ------------------
  |  |   39|    680|#define TSX2_8 (8)
  ------------------
  |  Branch (1070:5): [True: 680, False: 1.55k]
  ------------------
 1071|    831|    case TSX2_32:
  ------------------
  |  |   41|    831|#define TSX2_32 (32)
  ------------------
  |  Branch (1071:5): [True: 151, False: 2.07k]
  ------------------
 1072|  1.03k|    case TSX2_48:
  ------------------
  |  |   43|  1.03k|#define TSX2_48 (48)
  ------------------
  |  Branch (1072:5): [True: 203, False: 2.02k]
  ------------------
 1073|  1.15k|    case TSX2_64:
  ------------------
  |  |   45|  1.15k|#define TSX2_64 (64)
  ------------------
  |  Branch (1073:5): [True: 120, False: 2.11k]
  ------------------
 1074|  1.15k|      start = 0;
 1075|  1.15k|      break;
 1076|       |
 1077|      0|    default:
  ------------------
  |  Branch (1077:5): [True: 0, False: 2.23k]
  ------------------
 1078|      0|      break;
 1079|  2.23k|  }
 1080|       |
 1081|  2.23k|  ixheaacd_local_imdet(v_slave, v_main, w, m, z_real, z_imag, ia_mps_dec_mdct2qmfcos_tab, is_long,
 1082|  2.23k|                       scratch);
 1083|       |
 1084|  1.12M|  for (i = start; i < (m << 7); i += 2) {
  ------------------
  |  Branch (1084:19): [True: 1.11M, False: 2.23k]
  ------------------
 1085|  1.11M|    z_imag[i] = -(z_imag[i]);
 1086|  1.11M|  }
 1087|       |
 1088|  2.23k|  return;
 1089|  2.23k|}
ixheaacd_mps_mdct_2_qmf.c:ixheaacd_local_imdet:
  861|  2.23k|    WORD32 is_long, VOID *scratch) {
  862|  2.23k|  WORD32 lw = val << 1;
  863|  2.23k|  WORD32 offset = val - (val >> 1);
  864|       |
  865|  2.23k|  WORD32 temp_1, temp3, temp_2;
  866|  2.23k|  WORD32 *z_real_2, *z_imag_2;
  867|  2.23k|  WORD32 *px1, *px2, *px3, *px4;
  868|  2.23k|  const WORD16 *cp, *sp;
  869|  2.23k|  WORD32 *scale;
  870|  2.23k|  WORD32 cnt = val + (val >> 1);
  871|       |
  872|  2.23k|  WORD32 k;
  873|  2.23k|  WORD32 n, j;
  874|       |
  875|  2.23k|  WORD32 l;
  876|       |
  877|  2.23k|  WORD32 *p_sum = scratch;
  878|  2.23k|  WORD32 *p_diff =
  879|  2.23k|      (WORD32 *)scratch + IXHEAAC_GET_SIZE_ALIGNED_TYPE(SUM_SIZE, sizeof(*p_diff), BYTE_ALIGN_8);
  ------------------
  |  |   89|  2.23k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  880|       |
  881|  2.23k|  z_real_2 = z_real + lw;
  882|  2.23k|  z_imag_2 = z_imag + lw;
  883|       |
  884|  73.5k|  for (l = 0; l < LOOP_COUNTER; l++) {
  ------------------
  |  |   82|  73.5k|#define LOOP_COUNTER (32)
  ------------------
  |  Branch (884:15): [True: 71.3k, False: 2.23k]
  ------------------
  885|  71.3k|    WORD32 *sum = p_sum;
  886|  71.3k|    WORD32 *diff = p_diff;
  887|       |
  888|  71.3k|    px1 = x1;
  889|  71.3k|    px2 = x2 + val - 1;
  890|  71.3k|    px3 = x2 + val;
  891|  71.3k|    px4 = x1 + 2 * val - 1;
  892|       |
  893|   630k|    for (n = 0; n < val; n++) {
  ------------------
  |  Branch (893:17): [True: 559k, False: 71.3k]
  ------------------
  894|   559k|      *sum++ = ixheaac_add32_sat(*px1, *px2);
  895|   559k|      *sum++ = ixheaac_add32_sat(*px3, *px4);
  896|   559k|      *diff++ = ixheaac_sub32_sat(*px1++, *px2--);
  897|   559k|      *diff++ = ixheaac_sub32_sat(*px3++, *px4--);
  898|   559k|    }
  899|       |
  900|  71.3k|    scale = scale1;
  901|   910k|    for (k = 0; k < cnt; k++) {
  ------------------
  |  Branch (901:17): [True: 838k, False: 71.3k]
  ------------------
  902|   838k|      if (1 == is_long) {
  ------------------
  |  Branch (902:11): [True: 611k, False: 226k]
  ------------------
  903|   611k|        cp = ia_mps_dec_mdct2qmfcos_tab->cos_table_long[k];
  904|   611k|        sp = cp + val;
  905|   611k|      } else {
  906|   226k|        cp = ia_mps_dec_mdct2qmfcos_tab->cos_table_short[k + is_long];
  907|   226k|        sp = cp + val;
  908|   226k|      }
  909|       |
  910|   838k|      sum = p_sum;
  911|   838k|      diff = p_diff;
  912|       |
  913|   838k|      temp_1 = *cp++;
  914|   838k|      temp_2 = ixheaacd_mps_mult32_shr_15(temp_1, *sum);
  915|   838k|      sum++;
  916|   838k|      *z_real = temp_2;
  917|       |
  918|   838k|      temp_2 = ixheaacd_mps_mult32_shr_15(temp_1, *sum);
  919|   838k|      sum++;
  920|   838k|      *z_real_2 = temp_2;
  921|       |
  922|   838k|      temp_1 = *--sp;
  923|   838k|      temp_2 = ixheaacd_mps_mult32_shr_15(temp_1, *diff);
  924|   838k|      diff++;
  925|   838k|      *z_imag = temp_2;
  926|       |
  927|   838k|      temp_2 = ixheaacd_mps_mult32_shr_15(temp_1, *diff);
  928|   838k|      diff++;
  929|   838k|      *z_imag_2 = temp_2;
  930|  15.8M|      for (n = 1; n < val; n++) {
  ------------------
  |  Branch (930:19): [True: 15.0M, False: 838k]
  ------------------
  931|  15.0M|        temp_1 = *cp++;
  932|  15.0M|        temp_2 = ixheaacd_mps_mult32_shr_15(temp_1, *sum);
  933|  15.0M|        sum++;
  934|  15.0M|        *z_real = ixheaac_add32_sat(*z_real, temp_2);
  935|       |
  936|  15.0M|        temp_2 = ixheaacd_mps_mult32_shr_15(temp_1, *sum);
  937|  15.0M|        sum++;
  938|  15.0M|        *z_real_2 = ixheaac_add32_sat(*z_real_2, temp_2);
  939|       |
  940|  15.0M|        temp_1 = *--sp;
  941|  15.0M|        temp_2 = ixheaacd_mps_mult32_shr_15(temp_1, *diff);
  942|  15.0M|        diff++;
  943|  15.0M|        *z_imag = ixheaac_add32_sat(*z_imag, temp_2);
  944|       |
  945|  15.0M|        temp_2 = ixheaacd_mps_mult32_shr_15(temp_1, *diff);
  946|  15.0M|        diff++;
  947|  15.0M|        *z_imag_2 = ixheaac_add32_sat(*z_imag_2, temp_2);
  948|  15.0M|      }
  949|   838k|      z_real++;
  950|   838k|      z_imag++;
  951|   838k|      z_real_2++;
  952|   838k|      z_imag_2++;
  953|   838k|    }
  954|  71.3k|    z_real -= cnt;
  955|  71.3k|    z_real_2 -= cnt;
  956|  71.3k|    z_imag -= cnt;
  957|  71.3k|    z_imag_2 -= cnt;
  958|       |
  959|   910k|    for (j = 0; j < (cnt); j++) {
  ------------------
  |  Branch (959:17): [True: 838k, False: 71.3k]
  ------------------
  960|   838k|      *z_real = ixheaacd_mps_mult32_shr_15(*z_real, *scale);
  961|   838k|      z_real++;
  962|   838k|      *z_imag = ixheaacd_mps_mult32_shr_15(*z_imag, *scale);
  963|   838k|      z_imag++;
  964|   838k|      *z_real_2 = ixheaacd_mps_mult32_shr_15(*z_real_2, *scale);
  965|   838k|      z_real_2++;
  966|   838k|      *z_imag_2 = ixheaacd_mps_mult32_shr_15(*z_imag_2, *scale);
  967|   838k|      scale++;
  968|   838k|      z_imag_2++;
  969|   838k|    }
  970|       |
  971|   350k|    for (; k < lw; k++) {
  ------------------
  |  Branch (971:12): [True: 279k, False: 71.3k]
  ------------------
  972|   279k|      if (1 == is_long) {
  ------------------
  |  Branch (972:11): [True: 203k, False: 75.5k]
  ------------------
  973|   203k|        cp = ia_mps_dec_mdct2qmfcos_tab->cos_table_long[k];
  974|   203k|        sp = cp + val;
  975|   203k|      } else {
  976|  75.5k|        cp = ia_mps_dec_mdct2qmfcos_tab->cos_table_short[k + is_long];
  977|  75.5k|        sp = cp + val;
  978|  75.5k|      }
  979|       |
  980|   279k|      sum = p_sum;
  981|   279k|      diff = p_diff;
  982|       |
  983|   279k|      temp_1 = *cp++;
  984|       |
  985|   279k|      temp3 = ixheaacd_mps_mult32_shr_15(temp_1, *sum);
  986|   279k|      sum++;
  987|   279k|      *z_real = temp3;
  988|       |
  989|   279k|      temp3 = ixheaacd_mps_mult32_shr_15(temp_1, *sum);
  990|   279k|      sum++;
  991|   279k|      *z_real_2 = temp3;
  992|       |
  993|   279k|      temp_1 = *--sp;
  994|   279k|      temp3 = ixheaacd_mps_mult32_shr_15(temp_1, *diff);
  995|   279k|      diff++;
  996|   279k|      *z_imag = temp3;
  997|       |
  998|   279k|      temp3 = ixheaacd_mps_mult32_shr_15(temp_1, *diff);
  999|   279k|      diff++;
 1000|   279k|      *z_imag_2 = temp3;
 1001|       |
 1002|  5.29M|      for (n = 1; n < val; n++) {
  ------------------
  |  Branch (1002:19): [True: 5.01M, False: 279k]
  ------------------
 1003|  5.01M|        temp_1 = *cp++;
 1004|  5.01M|        temp3 = ixheaacd_mps_mult32_shr_15(temp_1, *sum);
 1005|  5.01M|        sum++;
 1006|  5.01M|        *z_real = ixheaac_add32_sat(*z_real, temp3);
 1007|       |
 1008|  5.01M|        temp3 = ixheaacd_mps_mult32_shr_15(temp_1, *sum);
 1009|  5.01M|        sum++;
 1010|  5.01M|        *z_real_2 = ixheaac_add32_sat(*z_real_2, temp3);
 1011|       |
 1012|  5.01M|        temp_1 = *--sp;
 1013|  5.01M|        temp3 = ixheaacd_mps_mult32_shr_15(temp_1, *diff);
 1014|  5.01M|        diff++;
 1015|  5.01M|        *z_imag = ixheaac_add32_sat(*z_imag, temp3);
 1016|       |
 1017|  5.01M|        temp3 = ixheaacd_mps_mult32_shr_15(temp_1, *diff);
 1018|  5.01M|        diff++;
 1019|  5.01M|        *z_imag_2 = ixheaac_add32_sat(*z_imag_2, temp3);
 1020|  5.01M|      }
 1021|       |
 1022|   279k|      z_real++;
 1023|   279k|      z_imag++;
 1024|   279k|      z_real_2++;
 1025|   279k|      z_imag_2++;
 1026|   279k|    }
 1027|  71.3k|    z_real -= offset;
 1028|  71.3k|    z_real_2 -= offset;
 1029|  71.3k|    z_imag -= offset;
 1030|  71.3k|    z_imag_2 -= offset;
 1031|       |
 1032|   350k|    for (j = 0; j < (offset); j++) {
  ------------------
  |  Branch (1032:17): [True: 279k, False: 71.3k]
  ------------------
 1033|   279k|      temp_1 = (*scale++) * -1;
 1034|   279k|      *z_real = ixheaacd_mps_mult32_shr_15(*z_real, temp_1);
 1035|   279k|      z_real++;
 1036|   279k|      *z_imag = ixheaacd_mps_mult32_shr_15(*z_imag, temp_1);
 1037|   279k|      z_imag++;
 1038|   279k|      *z_real_2 = ixheaacd_mps_mult32_shr_15(*z_real_2, temp_1);
 1039|   279k|      z_real_2++;
 1040|   279k|      *z_imag_2 = ixheaacd_mps_mult32_shr_15(*z_imag_2, temp_1);
 1041|   279k|      z_imag_2++;
 1042|   279k|    }
 1043|       |
 1044|  71.3k|    x1 += lw;
 1045|  71.3k|    x2 += lw;
 1046|       |
 1047|  71.3k|    z_real += lw;
 1048|  71.3k|    z_imag += lw;
 1049|  71.3k|    z_imag_2 += lw;
 1050|  71.3k|    z_real_2 += lw;
 1051|  71.3k|  }
 1052|  2.23k|}

ixheaacd_mps_frame_parsing:
  420|  77.5k|                                        ia_bit_buf_struct *bitstream) {
  421|  77.5k|  WORD32 i, bs_frame_type, data_bands, bs_temp_shape_enable, num_of_temp_shape_ch;
  422|  77.5k|  WORD32 ps, pg, ts, pb;
  423|  77.5k|  WORD32 env_shape_data[MAX_TIME_SLOTS];
  424|       |
  425|  77.5k|  WORD32 bits_param_slot = 0;
  426|       |
  427|  77.5k|  ia_mps_bs_frame *frame = &(self->bs_frame);
  428|  77.5k|  IA_ERRORCODE err = IA_NO_ERROR;
  ------------------
  |  |   23|  77.5k|#define IA_NO_ERROR 0x00000000
  ------------------
  429|       |
  430|  77.5k|  if (self->parse_nxt_frame == 0) return IA_NO_ERROR;
  ------------------
  |  |   23|      0|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (430:7): [True: 0, False: 77.5k]
  ------------------
  431|       |
  432|  77.5k|  self->num_parameter_sets_prev = self->num_parameter_sets;
  433|       |
  434|  77.5k|  if (self->bs_high_rate_mode) {
  ------------------
  |  Branch (434:7): [True: 18.2k, False: 59.2k]
  ------------------
  435|  18.2k|    bs_frame_type = ixheaacd_read_bits_buf(bitstream, 1);
  436|  18.2k|    self->num_parameter_sets = ixheaacd_read_bits_buf(bitstream, 3) + 1;
  437|  59.2k|  } else {
  438|  59.2k|    bs_frame_type = 0;
  439|  59.2k|    self->num_parameter_sets = 1;
  440|  59.2k|  }
  441|       |
  442|  77.5k|  if (self->time_slots == 32)
  ------------------
  |  Branch (442:7): [True: 63.1k, False: 14.3k]
  ------------------
  443|  63.1k|    bits_param_slot = 5;
  444|  14.3k|  else if (self->time_slots == 64)
  ------------------
  |  Branch (444:12): [True: 14.3k, False: 10]
  ------------------
  445|  14.3k|    bits_param_slot = 6;
  446|       |
  447|  77.5k|  if (bs_frame_type) {
  ------------------
  |  Branch (447:7): [True: 3.09k, False: 74.4k]
  ------------------
  448|  3.09k|    WORD32 prev_param_slot = -1;
  449|  6.26k|    for (i = 0; i < self->num_parameter_sets; i++) {
  ------------------
  |  Branch (449:17): [True: 3.20k, False: 3.05k]
  ------------------
  450|  3.20k|      self->param_slots[i] = ixheaacd_read_bits_buf(bitstream, bits_param_slot);
  451|       |
  452|  3.20k|      if (prev_param_slot >= self->param_slots[i] || self->param_slots[i] >= self->time_slots) {
  ------------------
  |  Branch (452:11): [True: 36, False: 3.17k]
  |  Branch (452:54): [True: 0, False: 3.17k]
  ------------------
  453|     34|        return IA_FATAL_ERROR;
  ------------------
  |  |   25|     34|#define IA_FATAL_ERROR 0x80000000
  ------------------
  454|     34|      }
  455|  3.17k|      prev_param_slot = self->param_slots[i];
  456|  3.17k|    }
  457|  74.4k|  } else {
  458|   160k|    for (i = 0; i < self->num_parameter_sets; i++) {
  ------------------
  |  Branch (458:17): [True: 86.3k, False: 74.4k]
  ------------------
  459|  86.3k|      self->param_slots[i] = (((self->time_slots * (i + 1)) + self->num_parameter_sets - 1) /
  460|  86.3k|                              self->num_parameter_sets) -
  461|  86.3k|                             1;
  462|  86.3k|    }
  463|  74.4k|  }
  464|       |
  465|  77.5k|  if (!usac_independency_flag) {
  ------------------
  |  Branch (465:7): [True: 75.8k, False: 1.70k]
  ------------------
  466|  75.8k|    frame->independency_flag = ixheaacd_read_bits_buf(bitstream, 1);
  467|  75.8k|  } else {
  468|  1.70k|    frame->independency_flag = 1;
  469|  1.70k|  }
  470|       |
  471|  77.5k|  err = ixheaacd_mps_ecdata_decoding(self, bitstream, frame->cmp_cld_idx, CLD);
  ------------------
  |  |   23|  77.5k|#define CLD (0)
  ------------------
  472|  77.5k|  if (err) return err;
  ------------------
  |  Branch (472:7): [True: 0, False: 77.5k]
  ------------------
  473|       |
  474|  77.5k|  err = ixheaacd_mps_ecdata_decoding(self, bitstream, frame->cmp_icc_idx, ICC);
  ------------------
  |  |   24|  77.5k|#define ICC (1)
  ------------------
  475|  77.5k|  if (err) return err;
  ------------------
  |  Branch (475:7): [True: 0, False: 77.5k]
  ------------------
  476|       |
  477|  77.5k|  if (self->config->bs_phase_coding) {
  ------------------
  |  Branch (477:7): [True: 62.1k, False: 15.3k]
  ------------------
  478|  62.1k|    self->bs_phase_mode = ixheaacd_read_bits_buf(bitstream, 1);
  479|       |
  480|  62.1k|    if (!self->bs_phase_mode) {
  ------------------
  |  Branch (480:9): [True: 46.9k, False: 15.1k]
  ------------------
  481|   654k|      for (pb = 0; pb < self->num_bands_ipd; pb++) {
  ------------------
  |  Branch (481:20): [True: 607k, False: 46.9k]
  ------------------
  482|   607k|        frame->ipd_idx_data_prev[pb] = 0;
  483|  1.32M|        for (i = 0; i < self->num_parameter_sets; i++) {
  ------------------
  |  Branch (483:21): [True: 717k, False: 607k]
  ------------------
  484|   717k|          frame->ipd_idx_data[i][pb] = 0;
  485|   717k|          self->bs_frame.ipd_idx[i][pb] = 0;
  486|   717k|        }
  487|   607k|        self->bs_frame.ipd_idx_prev[pb] = 0;
  488|   607k|      }
  489|  46.9k|      self->opd_smoothing_mode = 0;
  490|  46.9k|    } else {
  491|  15.1k|      self->opd_smoothing_mode = ixheaacd_read_bits_buf(bitstream, 1);
  492|  15.1k|      err = ixheaacd_mps_ecdata_decoding(self, bitstream, frame->ipd_idx_data,
  493|  15.1k|                                         IPD);
  ------------------
  |  |   25|  15.1k|#define IPD (2)
  ------------------
  494|  15.1k|      if (err) return err;
  ------------------
  |  Branch (494:11): [True: 2, False: 15.1k]
  ------------------
  495|  15.1k|    }
  496|  62.1k|  }
  497|       |
  498|  15.3k|  else {
  499|  15.3k|    self->bs_phase_mode = 0;
  500|  88.0k|    for (pb = 0; pb < self->num_bands_ipd; pb++) {
  ------------------
  |  Branch (500:18): [True: 72.6k, False: 15.3k]
  ------------------
  501|  72.6k|      frame->ipd_idx_data_prev[pb] = 0;
  502|   168k|      for (i = 0; i < self->num_parameter_sets; i++) {
  ------------------
  |  Branch (502:19): [True: 95.6k, False: 72.6k]
  ------------------
  503|  95.6k|        frame->ipd_idx_data[i][pb] = 0;
  504|  95.6k|        self->bs_frame.ipd_idx[i][pb] = 0;
  505|  95.6k|      }
  506|  72.6k|      self->bs_frame.ipd_idx_prev[pb] = 0;
  507|  72.6k|    }
  508|  15.3k|    self->opd_smoothing_mode = 0;
  509|  15.3k|  }
  510|       |
  511|  77.5k|  if (self->bs_high_rate_mode) {
  ------------------
  |  Branch (511:7): [True: 18.1k, False: 59.3k]
  ------------------
  512|  48.1k|    for (ps = 0; ps < self->num_parameter_sets; ps++) {
  ------------------
  |  Branch (512:18): [True: 30.0k, False: 18.1k]
  ------------------
  513|  30.0k|      frame->bs_smooth_mode[ps] = ixheaacd_read_bits_buf(bitstream, 2);
  514|  30.0k|      if (frame->bs_smooth_mode[ps] >= 2) {
  ------------------
  |  Branch (514:11): [True: 8.40k, False: 21.6k]
  ------------------
  515|  8.40k|        frame->bs_smooth_time[ps] = ixheaacd_read_bits_buf(bitstream, 2);
  516|  8.40k|      }
  517|  30.0k|      if (frame->bs_smooth_mode[ps] == 3) {
  ------------------
  |  Branch (517:11): [True: 2.17k, False: 27.8k]
  ------------------
  518|  2.17k|        frame->bs_freq_res_stride_smg[ps] =
  519|  2.17k|            ixheaacd_read_bits_buf(bitstream, 2);
  520|  2.17k|        data_bands =
  521|  2.17k|            (self->bs_param_bands - 1) /
  522|  2.17k|                ixheaacd_mps_stride_table[frame->bs_freq_res_stride_smg[ps]] +
  523|  2.17k|            1;
  524|  22.0k|        for (pg = 0; pg < data_bands; pg++) {
  ------------------
  |  Branch (524:22): [True: 19.8k, False: 2.17k]
  ------------------
  525|  19.8k|          frame->bs_smg_data[ps][pg] = ixheaacd_read_bits_buf(bitstream, 1);
  526|  19.8k|        }
  527|  2.17k|      }
  528|  30.0k|    }
  529|  59.3k|  } else {
  530|   118k|    for (ps = 0; ps < self->num_parameter_sets; ps++) {
  ------------------
  |  Branch (530:18): [True: 59.2k, False: 59.3k]
  ------------------
  531|  59.2k|      frame->bs_smooth_mode[ps] = 0;
  532|  59.2k|    }
  533|  59.3k|  }
  534|       |
  535|   232k|  for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (535:15): [True: 154k, False: 77.5k]
  ------------------
  536|   154k|    self->temp_shape_enable_ch_stp[i] = 0;
  537|   154k|    self->temp_shape_enable_ch_ges[i] = 0;
  538|   154k|  }
  539|       |
  540|  77.5k|  self->bs_tsd_enable = 0;
  541|  77.5k|  if (self->config->bs_temp_shape_config == 3) {
  ------------------
  |  Branch (541:7): [True: 38.9k, False: 38.5k]
  ------------------
  542|  38.9k|    self->bs_tsd_enable = ixheaacd_read_bits_buf(bitstream, 1);
  543|  38.9k|  } else if (self->config->bs_temp_shape_config != 0) {
  ------------------
  |  Branch (543:14): [True: 24.2k, False: 14.2k]
  ------------------
  544|  24.2k|    bs_temp_shape_enable = ixheaacd_read_bits_buf(bitstream, 1);
  545|  24.2k|    if (bs_temp_shape_enable) {
  ------------------
  |  Branch (545:9): [True: 3.52k, False: 20.7k]
  ------------------
  546|  3.52k|      num_of_temp_shape_ch = 2;
  547|  3.52k|      switch (self->config->bs_temp_shape_config) {
  548|  2.61k|        case 1:
  ------------------
  |  Branch (548:9): [True: 2.61k, False: 914]
  ------------------
  549|  7.83k|          for (i = 0; i < num_of_temp_shape_ch; i++) {
  ------------------
  |  Branch (549:23): [True: 5.22k, False: 2.61k]
  ------------------
  550|  5.22k|            self->temp_shape_enable_ch_stp[i] =
  551|  5.22k|                ixheaacd_read_bits_buf(bitstream, 1);
  552|  5.22k|          }
  553|  2.61k|          break;
  554|    914|        case 2:
  ------------------
  |  Branch (554:9): [True: 914, False: 2.61k]
  ------------------
  555|  2.74k|          for (i = 0; i < num_of_temp_shape_ch; i++) {
  ------------------
  |  Branch (555:23): [True: 1.82k, False: 914]
  ------------------
  556|  1.82k|            self->temp_shape_enable_ch_ges[i] =
  557|  1.82k|                ixheaacd_read_bits_buf(bitstream, 1);
  558|  1.82k|          }
  559|  2.73k|          for (i = 0; i < num_of_temp_shape_ch; i++) {
  ------------------
  |  Branch (559:23): [True: 1.81k, False: 914]
  ------------------
  560|  1.81k|            if (self->temp_shape_enable_ch_ges[i]) {
  ------------------
  |  Branch (560:17): [True: 535, False: 1.28k]
  ------------------
  561|    535|              ixheaacd_mps_huff_decode(bitstream, env_shape_data,
  562|    535|                                       self->time_slots);
  563|  19.1k|              for (ts = 0; ts < self->time_slots; ts++) {
  ------------------
  |  Branch (563:28): [True: 18.6k, False: 535]
  ------------------
  564|  18.6k|                self->env_shape_data[i][ts] = (FLOAT32)pow(
  565|  18.6k|                    2, (FLOAT32)env_shape_data[ts] /
  566|  18.6k|                               (self->config->bs_env_quant_mode + 2) -
  567|  18.6k|                           1);
  568|  18.6k|              }
  569|    535|            }
  570|  1.81k|          }
  571|    914|          break;
  572|      0|        default:
  ------------------
  |  Branch (572:9): [True: 0, False: 3.52k]
  ------------------
  573|      0|          return -1;
  574|  3.52k|      }
  575|  3.52k|    }
  576|  24.2k|  }
  577|       |
  578|  77.4k|  if (self->bs_tsd_enable) {
  ------------------
  |  Branch (578:7): [True: 8.91k, False: 68.5k]
  ------------------
  579|  8.91k|    UWORD16 s[4];
  580|  8.91k|    UWORD64 s_64;
  581|  8.91k|    UWORD16 c[5];
  582|  8.91k|    UWORD64 c_64;
  583|  8.91k|    UWORD16 b;
  584|  8.91k|    UWORD16 r[1];
  585|  8.91k|    static const UWORD16 table_64[] = {
  586|  8.91k|        6,  11, 16, 20, 23, 27, 30, 33, 35, 38, 40, 42, 44, 46, 48, 49,
  587|  8.91k|        51, 52, 53, 55, 56, 57, 58, 58, 59, 60, 60, 60, 61, 61, 61, 61};
  588|  8.91k|    static const UWORD16 table_32[] = {5,  9,  13, 16, 18, 20, 22, 24,
  589|  8.91k|                                              25, 26, 27, 28, 29, 29, 30, 30};
  590|  8.91k|    unsigned const short *tab = NULL;
  591|  8.91k|    WORD32 k;
  592|  8.91k|    UWORD16 h;
  593|  8.91k|    WORD32 nbits_tr_slots = 0;
  594|       |
  595|  8.91k|    if (self->time_slots == 32) {
  ------------------
  |  Branch (595:9): [True: 4.43k, False: 4.48k]
  ------------------
  596|  4.43k|      nbits_tr_slots = 4;
  597|  4.43k|      tab = table_32;
  598|  4.48k|    } else if (self->time_slots == 64) {
  ------------------
  |  Branch (598:16): [True: 4.48k, False: 0]
  ------------------
  599|  4.48k|      nbits_tr_slots = 5;
  600|  4.48k|      tab = table_64;
  601|  4.48k|    }
  602|       |
  603|  8.91k|    self->tsd_num_tr_slots = ixheaacd_read_bits_buf(bitstream, nbits_tr_slots);
  604|  8.91k|    self->tsd_num_tr_slots++;
  605|  8.91k|    self->tsd_codeword_len = tab[self->tsd_num_tr_slots - 1];
  606|       |
  607|  8.91k|    if (self->tsd_codeword_len > 48) {
  ------------------
  |  Branch (607:9): [True: 41, False: 8.87k]
  ------------------
  608|     41|      s[3] = ixheaacd_read_bits_buf(bitstream, self->tsd_codeword_len - 48);
  609|     41|      s_64 = s[3];
  610|     41|      s[2] = ixheaacd_read_bits_buf(bitstream, 16);
  611|     41|      s_64 = (s_64 << 16) | s[2];
  612|     41|      s[1] = ixheaacd_read_bits_buf(bitstream, 16);
  613|     41|      s_64 = (s_64 << 16) | s[1];
  614|     41|      s[0] = ixheaacd_read_bits_buf(bitstream, 16);
  615|     41|      s_64 = (s_64 << 16) | s[0];
  616|  8.87k|    } else if (self->tsd_codeword_len > 32) {
  ------------------
  |  Branch (616:16): [True: 1.75k, False: 7.11k]
  ------------------
  617|  1.75k|      s[3] = 0;
  618|  1.75k|      s_64 = s[3];
  619|  1.75k|      s[2] = ixheaacd_read_bits_buf(bitstream, self->tsd_codeword_len - 32);
  620|  1.75k|      s_64 = (s_64 << 16) | s[2];
  621|  1.75k|      s[1] = ixheaacd_read_bits_buf(bitstream, 16);
  622|  1.75k|      s_64 = (s_64 << 16) | s[1];
  623|  1.75k|      s[0] = ixheaacd_read_bits_buf(bitstream, 16);
  624|  1.75k|      s_64 = (s_64 << 16) | s[0];
  625|  7.11k|    } else if (self->tsd_codeword_len > 16) {
  ------------------
  |  Branch (625:16): [True: 3.61k, False: 3.49k]
  ------------------
  626|  3.61k|      s[3] = 0;
  627|  3.61k|      s_64 = s[3];
  628|  3.61k|      s[2] = 0;
  629|  3.61k|      s_64 = (s_64 << 16) | s[2];
  630|  3.61k|      s[1] = ixheaacd_read_bits_buf(bitstream, self->tsd_codeword_len - 16);
  631|  3.61k|      s_64 = (s_64 << 16) | s[1];
  632|  3.61k|      s[0] = ixheaacd_read_bits_buf(bitstream, 16);
  633|  3.61k|      s_64 = (s_64 << 16) | s[0];
  634|  3.61k|    } else {
  635|  3.49k|      s[3] = 0;
  636|  3.49k|      s_64 = s[3];
  637|  3.49k|      s[2] = 0;
  638|  3.49k|      s_64 = (s_64 << 16) | s[2];
  639|  3.49k|      s[1] = 0;
  640|  3.49k|      s_64 = (s_64 << 16) | s[1];
  641|  3.49k|      s[0] = ixheaacd_read_bits_buf(bitstream, self->tsd_codeword_len);
  642|  3.49k|      s_64 = (s_64 << 16) | s[0];
  643|  3.49k|    }
  644|       |
  645|  8.91k|    {
  646|  8.91k|      WORD32 p = self->tsd_num_tr_slots;
  647|       |
  648|   437k|      for (i = 0; i < self->time_slots; i++) self->bs_tsd_sep_data[i] = 0;
  ------------------
  |  Branch (648:19): [True: 428k, False: 8.91k]
  ------------------
  649|       |
  650|   346k|      for (k = self->time_slots - 1; k >= 0; k--) {
  ------------------
  |  Branch (650:38): [True: 346k, False: 5]
  ------------------
  651|   346k|        if (p > k) {
  ------------------
  |  Branch (651:13): [True: 994, False: 345k]
  ------------------
  652|  2.88k|          for (; k >= 0; k--) self->bs_tsd_sep_data[k] = 1;
  ------------------
  |  Branch (652:18): [True: 1.89k, False: 994]
  ------------------
  653|    994|          break;
  654|    994|        }
  655|       |
  656|   345k|        c[0] = k - p + 1;
  657|   345k|        c_64 = c[0];
  658|  1.72M|        for (i = 1; i < 5; i++) c[i] = 0;
  ------------------
  |  Branch (658:21): [True: 1.38M, False: 345k]
  ------------------
  659|       |
  660|  1.32M|        for (h = 2; h <= p; h++) {
  ------------------
  |  Branch (660:21): [True: 979k, False: 345k]
  ------------------
  661|   979k|          b = k - p + h;
  662|   979k|          c_64 = c_64 * (b / h);
  663|   979k|          ixheaacd_longmult1(c, b, c, 5);
  664|   979k|          b = h;
  665|   979k|          ixheaacd_longdiv(c, b, c, r, 5);
  666|   979k|        }
  667|       |
  668|   345k|        if (ixheaacd_longcompare(s, c, 4)) {
  ------------------
  |  Branch (668:13): [True: 59.2k, False: 285k]
  ------------------
  669|  59.2k|          ixheaacd_longsub(s, c, 4, 4);
  670|  59.2k|          self->bs_tsd_sep_data[k] = 1;
  671|  59.2k|          p--;
  672|  59.2k|          if (p == 0) break;
  ------------------
  |  Branch (672:15): [True: 7.91k, False: 51.3k]
  ------------------
  673|  59.2k|        }
  674|   345k|      }
  675|  8.91k|    }
  676|       |
  677|   437k|    for (i = 0; i < self->time_slots; i++) {
  ------------------
  |  Branch (677:17): [True: 428k, False: 8.91k]
  ------------------
  678|   428k|      if (self->bs_tsd_sep_data[i])
  ------------------
  |  Branch (678:11): [True: 61.0k, False: 367k]
  ------------------
  679|  61.0k|        self->bs_tsd_tr_phase_data[i] = ixheaacd_read_bits_buf(bitstream, 3);
  680|   428k|    }
  681|  8.91k|  }
  682|       |
  683|  77.4k|  self->parse_nxt_frame = 0;
  684|  77.4k|  return err;
  685|  77.5k|}
ixheaacd_ld_mps_frame_parsing:
  796|  2.14k|    ia_mps_dec_state_struct *self, ia_bit_buf_struct *it_bit_buff) {
  797|  2.14k|  WORD32 i, bs_frame_type, data_bands, bs_temp_shape_enable,
  798|  2.14k|      num_of_temp_shape_ch;
  799|  2.14k|  WORD32 ps, pg, ts, ic;
  800|  2.14k|  WORD32 env_shape_data[MAX_TIME_SLOTS];
  801|  2.14k|  WORD32 alignment;
  802|  2.14k|  WORD32 bits_param_slot = 0;
  803|       |
  804|  2.14k|  ia_mps_bs_frame *frame = &(self->bs_frame);
  805|  2.14k|  alignment = it_bit_buff->cnt_bits;
  806|  2.14k|  if (self->parse_nxt_frame == 0) return IA_NO_ERROR;
  ------------------
  |  |   23|      0|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (806:7): [True: 0, False: 2.14k]
  ------------------
  807|       |
  808|  2.14k|  self->num_parameter_sets_prev = self->num_parameter_sets;
  809|       |
  810|  2.14k|  bs_frame_type = ixheaacd_read_bits_buf(it_bit_buff, 1);
  811|  2.14k|  self->num_parameter_sets = ixheaacd_read_bits_buf(it_bit_buff, 1) + 1;
  812|       |
  813|  2.14k|  if (self->time_slots == 32)
  ------------------
  |  Branch (813:7): [True: 410, False: 1.73k]
  ------------------
  814|    410|    bits_param_slot = 5;
  815|  1.73k|  else if (self->time_slots == 64)
  ------------------
  |  Branch (815:12): [True: 0, False: 1.73k]
  ------------------
  816|      0|    bits_param_slot = 6;
  817|  1.73k|  else if (self->time_slots == 8)
  ------------------
  |  Branch (817:12): [True: 23, False: 1.71k]
  ------------------
  818|     23|    bits_param_slot = 3;
  819|  1.71k|  else if (self->time_slots == 16 || self->time_slots == 15)
  ------------------
  |  Branch (819:12): [True: 46, False: 1.66k]
  |  Branch (819:38): [True: 25, False: 1.64k]
  ------------------
  820|     71|    bits_param_slot = 4;
  821|       |
  822|  2.14k|  if (bs_frame_type) {
  ------------------
  |  Branch (822:7): [True: 402, False: 1.74k]
  ------------------
  823|    402|    WORD32 prev_param_slot = -1;
  824|    821|    for (i = 0; i < self->num_parameter_sets; i++) {
  ------------------
  |  Branch (824:17): [True: 455, False: 366]
  ------------------
  825|    455|      self->param_slots[i] = ixheaacd_read_bits_buf(it_bit_buff, bits_param_slot);
  826|       |
  827|    455|      if (prev_param_slot >= self->param_slots[i] || self->param_slots[i] >= self->time_slots) {
  ------------------
  |  Branch (827:11): [True: 33, False: 422]
  |  Branch (827:54): [True: 3, False: 419]
  ------------------
  828|     36|        return IA_FATAL_ERROR;
  ------------------
  |  |   25|     36|#define IA_FATAL_ERROR 0x80000000
  ------------------
  829|     36|      }
  830|    419|      prev_param_slot = self->param_slots[i];
  831|    419|    }
  832|  1.74k|  } else {
  833|  4.14k|    for (i = 0; i < self->num_parameter_sets; i++) {
  ------------------
  |  Branch (833:17): [True: 2.40k, False: 1.74k]
  ------------------
  834|  2.40k|      self->param_slots[i] = (((self->time_slots * (i + 1)) + self->num_parameter_sets - 1) /
  835|  2.40k|                              self->num_parameter_sets) -
  836|  2.40k|                             1;
  837|  2.40k|    }
  838|  1.74k|  }
  839|       |
  840|  2.11k|  frame->independency_flag = ixheaacd_read_bits_buf(it_bit_buff, 1);
  841|       |
  842|  10.5k|  for (i = 0; i < self->ldmps_config.num_ott_boxes; i++) {
  ------------------
  |  Branch (842:15): [True: 8.40k, False: 2.11k]
  ------------------
  843|  8.40k|    ixheaacd_ld_mps_ecdata_decoding(self, it_bit_buff, frame->cmp_cld_idx, CLD,
  ------------------
  |  |   23|  8.40k|#define CLD (0)
  ------------------
  844|  8.40k|                                    0);
  845|  8.40k|  }
  846|       |
  847|  2.11k|  if (self->ldmps_config.bs_one_icc) {
  ------------------
  |  Branch (847:7): [True: 813, False: 1.29k]
  ------------------
  848|    813|    ixheaacd_ld_mps_ecdata_decoding(self, it_bit_buff, frame->cmp_icc_idx, ICC,
  ------------------
  |  |   24|    813|#define ICC (1)
  ------------------
  849|    813|                                    0);
  850|  1.29k|  } else {
  851|  6.87k|    for (i = 0; i < self->ldmps_config.num_ott_boxes; i++) {
  ------------------
  |  Branch (851:17): [True: 5.57k, False: 1.29k]
  ------------------
  852|  5.57k|      if (!self->ldmps_config.ott_mode_lfe[i])
  ------------------
  |  Branch (852:11): [True: 4.53k, False: 1.04k]
  ------------------
  853|  4.53k|        ixheaacd_ld_mps_ecdata_decoding(self, it_bit_buff, frame->cmp_icc_idx,
  854|  4.53k|                                        ICC, 0);
  ------------------
  |  |   24|  4.53k|#define ICC (1)
  ------------------
  855|  5.57k|    }
  856|  1.29k|  }
  857|       |
  858|  4.86k|  for (ps = 0; ps < self->num_parameter_sets; ps++) {
  ------------------
  |  Branch (858:16): [True: 2.75k, False: 2.11k]
  ------------------
  859|  2.75k|    frame->bs_smooth_mode[ps] = ixheaacd_read_bits_buf(it_bit_buff, 2);
  860|  2.75k|    if (frame->bs_smooth_mode[ps] >= 2) {
  ------------------
  |  Branch (860:9): [True: 980, False: 1.77k]
  ------------------
  861|    980|      frame->bs_smooth_time[ps] = ixheaacd_read_bits_buf(it_bit_buff, 2);
  862|    980|    }
  863|  2.75k|    if (frame->bs_smooth_mode[ps] == 3) {
  ------------------
  |  Branch (863:9): [True: 673, False: 2.07k]
  ------------------
  864|    673|      frame->bs_freq_res_stride_smg[ps] =
  865|    673|          ixheaacd_read_bits_buf(it_bit_buff, 2);
  866|    673|      data_bands =
  867|    673|          (ixheaacd_freq_res_table_ld[self->ldmps_config.bs_freq_res] - 1) /
  868|    673|              ixheaacd_mps_stride_table[frame->bs_freq_res_stride_smg[ps]] +
  869|    673|          1;
  870|  3.13k|      for (pg = 0; pg < data_bands; pg++) {
  ------------------
  |  Branch (870:20): [True: 2.46k, False: 673]
  ------------------
  871|  2.46k|        frame->bs_smg_data[ps][pg] = ixheaacd_read_bits_buf(it_bit_buff, 1);
  872|  2.46k|      }
  873|    673|    }
  874|  2.75k|  }
  875|       |
  876|  6.28k|  for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (876:15): [True: 4.17k, False: 2.11k]
  ------------------
  877|  4.17k|    self->temp_shape_enable_ch_stp[i] = 0;
  878|  4.17k|    self->temp_shape_enable_ch_ges[i] = 0;
  879|  4.17k|  }
  880|       |
  881|  2.11k|  if (self->ldmps_config.bs_temp_shape_config != 0) {
  ------------------
  |  Branch (881:7): [True: 1.68k, False: 424]
  ------------------
  882|  1.68k|    bs_temp_shape_enable = ixheaacd_read_bits_buf(it_bit_buff, 1);
  883|  1.68k|    if (bs_temp_shape_enable) {
  ------------------
  |  Branch (883:9): [True: 678, False: 1.00k]
  ------------------
  884|    678|      num_of_temp_shape_ch = 2;
  885|    678|      switch (self->ldmps_config.bs_temp_shape_config) {
  886|    201|        case 1:
  ------------------
  |  Branch (886:9): [True: 201, False: 477]
  ------------------
  887|    603|          for (i = 0; i < num_of_temp_shape_ch; i++) {
  ------------------
  |  Branch (887:23): [True: 402, False: 201]
  ------------------
  888|    402|            self->temp_shape_enable_ch_stp[i] =
  889|    402|                ixheaacd_read_bits_buf(it_bit_buff, 1);
  890|    402|          }
  891|    201|          break;
  892|    463|        case 2:
  ------------------
  |  Branch (892:9): [True: 463, False: 215]
  ------------------
  893|  1.38k|          for (i = 0; i < num_of_temp_shape_ch; i++) {
  ------------------
  |  Branch (893:23): [True: 926, False: 463]
  ------------------
  894|    926|            self->temp_shape_enable_ch_ges[i] =
  895|    926|                ixheaacd_read_bits_buf(it_bit_buff, 1);
  896|    926|          }
  897|  1.38k|          for (i = 0; i < num_of_temp_shape_ch; i++) {
  ------------------
  |  Branch (897:23): [True: 926, False: 463]
  ------------------
  898|    926|            if (self->temp_shape_enable_ch_ges[i]) {
  ------------------
  |  Branch (898:17): [True: 599, False: 327]
  ------------------
  899|    599|              ixheaacd_mps_huff_decode(it_bit_buff, env_shape_data,
  900|    599|                                       self->time_slots);
  901|  2.85k|              for (ts = 0; ts < self->time_slots; ts++) {
  ------------------
  |  Branch (901:28): [True: 2.25k, False: 599]
  ------------------
  902|  2.25k|                self->env_shape_data[i][ts] = (FLOAT32)pow(
  903|  2.25k|                    2, (FLOAT32)env_shape_data[ts] /
  904|  2.25k|                               (self->ldmps_config.bs_env_quant_mode + 2) -
  905|  2.25k|                           1);
  906|  2.25k|              }
  907|    599|            }
  908|    926|          }
  909|    463|          break;
  910|     14|        default:
  ------------------
  |  Branch (910:9): [True: 14, False: 664]
  ------------------
  911|     14|          if (self->ec_flag == 0) {
  ------------------
  |  Branch (911:15): [True: 14, False: 0]
  ------------------
  912|     14|          return IA_FATAL_ERROR;
  ------------------
  |  |   25|     14|#define IA_FATAL_ERROR 0x80000000
  ------------------
  913|     14|      }
  914|      0|          break;
  915|    678|      }
  916|    678|    }
  917|  1.68k|  }
  918|       |
  919|  2.09k|  if (self->ldmps_config.bs_arbitrary_downmix != 0) {
  ------------------
  |  Branch (919:7): [True: 1.64k, False: 448]
  ------------------
  920|  5.21k|    for (ic = 0; ic < self->ldmps_config.num_input_channels; ic++) {
  ------------------
  |  Branch (920:18): [True: 3.56k, False: 1.64k]
  ------------------
  921|  3.56k|      ixheaacd_ld_mps_ecdata_decoding(self, it_bit_buff, frame->cmp_cld_idx,
  922|  3.56k|                                      CLD, 0);
  ------------------
  |  |   23|  3.56k|#define CLD (0)
  ------------------
  923|  3.56k|    }
  924|  1.64k|  }
  925|       |
  926|  2.09k|  ixheaacd_byte_align(it_bit_buff, &alignment);
  927|       |
  928|  9.11M|  while (it_bit_buff->cnt_bits > 8) {
  ------------------
  |  Branch (928:10): [True: 9.11M, False: 2.09k]
  ------------------
  929|  9.11M|    ixheaacd_read_bits_buf(it_bit_buff, 8);
  930|  9.11M|  }
  931|  2.09k|  ixheaacd_read_bits_buf(it_bit_buff, it_bit_buff->cnt_bits);
  932|  2.09k|  return IA_NO_ERROR;
  ------------------
  |  |   23|  2.09k|#define IA_NO_ERROR 0x00000000
  ------------------
  933|  2.11k|}
ixheaacd_mps_frame_decode:
 1280|  79.6k|IA_ERRORCODE ixheaacd_mps_frame_decode(ia_mps_dec_state_struct *self) {
 1281|  79.6k|  WORD32 i;
 1282|  79.6k|  IA_ERRORCODE err_code = 0;
 1283|  79.6k|  if (self->ldmps_config.ldmps_present_flag != 1)
  ------------------
  |  Branch (1283:7): [True: 77.4k, False: 2.20k]
  ------------------
 1284|  77.4k|    if (self->parse_nxt_frame == 1) return err_code;
  ------------------
  |  Branch (1284:9): [True: 0, False: 77.4k]
  ------------------
 1285|  79.6k|  self->ext_frame_flag = 0;
 1286|  79.6k|  if (self->param_slots[self->num_parameter_sets - 1] != self->time_slots - 1) {
  ------------------
  |  Branch (1286:7): [True: 3.29k, False: 76.3k]
  ------------------
 1287|  3.29k|    self->ext_frame_flag = 1;
 1288|  3.29k|  }
 1289|       |
 1290|  79.6k|  err_code = ixheaacd_mps_dec_and_mapframeott(self);
 1291|  79.6k|  if (err_code != IA_NO_ERROR) return err_code;
  ------------------
  |  |   23|  79.6k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (1291:7): [True: 61, False: 79.5k]
  ------------------
 1292|  79.5k|  ixheaacd_mps_dec_and_mapframesmg(self);
 1293|       |
 1294|  79.5k|  if (self->ext_frame_flag) {
  ------------------
  |  Branch (1294:7): [True: 3.29k, False: 76.2k]
  ------------------
 1295|  3.29k|    self->num_parameter_sets++;
 1296|  3.29k|    self->param_slots[self->num_parameter_sets - 1] = self->time_slots - 1;
 1297|  3.29k|  }
 1298|  79.5k|  self->param_slot_diff[0] = self->param_slots[0] + 1;
 1299|  79.5k|  if (MAX_TIME_SLOTS < (self->param_slot_diff[0])) {
  ------------------
  |  |   48|  79.5k|#define MAX_TIME_SLOTS (72)
  ------------------
  |  Branch (1299:7): [True: 0, False: 79.5k]
  ------------------
 1300|      0|    if (self->ec_flag == 0) {
  ------------------
  |  Branch (1300:9): [True: 0, False: 0]
  ------------------
 1301|      0|      return -1;
 1302|      0|    } else {
 1303|      0|      self->param_slot_diff[0] = MAX_TIME_SLOTS;
  ------------------
  |  |   48|      0|#define MAX_TIME_SLOTS (72)
  ------------------
 1304|      0|    }
 1305|      0|  }
 1306|  79.5k|  self->inv_param_slot_diff[0] = (FLOAT32)1 / self->param_slot_diff[0];
 1307|  79.5k|  self->inv_param_slot_diff_Q30[0] =
 1308|  79.5k|      (WORD32)floor(self->inv_param_slot_diff[0] * 1073741824 + 0.5);
 1309|  95.9k|  for (i = 1; i < self->num_parameter_sets; i++) {
  ------------------
  |  Branch (1309:15): [True: 16.4k, False: 79.5k]
  ------------------
 1310|  16.4k|    self->param_slot_diff[i] = self->param_slots[i] - self->param_slots[i - 1];
 1311|  16.4k|    if ((MAX_TIME_SLOTS < (self->param_slot_diff[0] + self->param_slot_diff[i])) ||
  ------------------
  |  |   48|  16.4k|#define MAX_TIME_SLOTS (72)
  ------------------
  |  Branch (1311:9): [True: 0, False: 16.4k]
  ------------------
 1312|  16.4k|        (self->param_slot_diff[i] == 0)) {
  ------------------
  |  Branch (1312:9): [True: 7, False: 16.4k]
  ------------------
 1313|      7|      if (self->ec_flag == 0) {
  ------------------
  |  Branch (1313:11): [True: 7, False: 0]
  ------------------
 1314|      7|        return -1;
 1315|      7|      } else {
 1316|      0|        self->param_slot_diff[i] = 1;
 1317|      0|        self->inv_param_slot_diff[i] = 1;
 1318|      0|      }
 1319|      7|    }
 1320|  16.4k|    self->inv_param_slot_diff[i] = (FLOAT32)1 / self->param_slot_diff[i];
 1321|  16.4k|    self->inv_param_slot_diff_Q30[i] =
 1322|  16.4k|        (WORD32)floor(self->inv_param_slot_diff[i] * 1073741824 + 0.5);
 1323|  16.4k|  }
 1324|  79.5k|  return IA_NO_ERROR;
  ------------------
  |  |   23|  79.5k|#define IA_NO_ERROR 0x00000000
  ------------------
 1325|  79.5k|}
ixheaacd_mps_header_decode:
 1327|  2.22k|WORD32 ixheaacd_mps_header_decode(ia_mps_dec_state_struct *self) {
 1328|  2.22k|  WORD32 samp_freq;
 1329|  2.22k|  WORD32 sampling_rate_tbl[] = {96000, 88200, 64000, 48000, 44100, 32000,
 1330|  2.22k|                                24000, 22050, 16000, 12000, 11025, 8000,
 1331|  2.22k|                                7350,  0,     0,     0};
 1332|       |
 1333|  2.22k|  if (self->ldmps_config.ldmps_present_flag == 1)
  ------------------
  |  Branch (1333:7): [True: 962, False: 1.26k]
  ------------------
 1334|    962|    self->time_slots = self->frame_length + 1;
 1335|  1.26k|  else
 1336|  1.26k|    self->time_slots = self->frame_length;
 1337|       |
 1338|  2.22k|  self->bs_param_bands = ixheaacd_freq_res_table[self->config->bs_freq_res];
 1339|       |
 1340|  2.22k|  if (self->ldmps_config.ldmps_present_flag == 1) {
  ------------------
  |  Branch (1340:7): [True: 962, False: 1.26k]
  ------------------
 1341|    962|    if (self->ldmps_config.bs_sampling_freq_index == 15) {
  ------------------
  |  Branch (1341:9): [True: 6, False: 956]
  ------------------
 1342|      6|      samp_freq = self->ldmps_config.bs_fampling_frequency;
 1343|    956|    } else {
 1344|    956|      samp_freq = sampling_rate_tbl[self->ldmps_config.bs_sampling_freq_index];
 1345|    956|    }
 1346|       |
 1347|    962|    if (samp_freq < 27713.0) {
  ------------------
  |  Branch (1347:9): [True: 564, False: 398]
  ------------------
 1348|    564|      self->qmf_band_count = 32;
 1349|    564|    } else if (samp_freq >= 55426.0) {
  ------------------
  |  Branch (1349:16): [True: 13, False: 385]
  ------------------
 1350|     13|      self->qmf_band_count = 128;
 1351|    385|    } else {
 1352|    385|      self->qmf_band_count = 64;
 1353|    385|    }
 1354|    962|  }
 1355|       |
 1356|  2.22k|  if (self->object_type == AOT_ER_AAC_ELD ||
  ------------------
  |  Branch (1356:7): [True: 962, False: 1.26k]
  ------------------
 1357|  1.26k|      self->object_type == AOT_ER_AAC_LD) {
  ------------------
  |  Branch (1357:7): [True: 0, False: 1.26k]
  ------------------
 1358|    962|    self->bs_param_bands =
 1359|    962|        ixheaacd_freq_res_table_ld[self->config->bs_freq_res];
 1360|    962|    self->hyb_band_count_max = self->qmf_band_count;
 1361|    962|  } else
 1362|  1.26k|    self->hyb_band_count_max = self->qmf_band_count - QMF_BANDS_TO_HYBRID + 10;
  ------------------
  |  |   64|  1.26k|#define QMF_BANDS_TO_HYBRID (3)
  ------------------
 1363|       |
 1364|  2.22k|  if (self->object_type == AOT_ER_AAC_ELD ||
  ------------------
  |  Branch (1364:7): [True: 962, False: 1.26k]
  ------------------
 1365|  1.26k|      self->object_type == AOT_ER_AAC_LD) {
  ------------------
  |  Branch (1365:7): [True: 0, False: 1.26k]
  ------------------
 1366|    962|    switch (self->bs_param_bands) {
 1367|     71|      case 4:
  ------------------
  |  Branch (1367:7): [True: 71, False: 891]
  ------------------
 1368|       |
 1369|     71|        self->hyb_band_to_processing_band_table =
 1370|     71|            ixheaacd_hybrid_band_64_to_processing_band_4_map;
 1371|     71|        break;
 1372|     25|      case 5:
  ------------------
  |  Branch (1372:7): [True: 25, False: 937]
  ------------------
 1373|       |
 1374|     25|        self->hyb_band_to_processing_band_table =
 1375|     25|            ixheaacd_hybrid_band_64_to_processing_band_5_map;
 1376|     25|        break;
 1377|     63|      case 7:
  ------------------
  |  Branch (1377:7): [True: 63, False: 899]
  ------------------
 1378|       |
 1379|     63|        self->hyb_band_to_processing_band_table =
 1380|     63|            ixheaacd_hybrid_band_64_to_processing_band_7_map;
 1381|     63|        break;
 1382|    108|      case 9:
  ------------------
  |  Branch (1382:7): [True: 108, False: 854]
  ------------------
 1383|       |
 1384|    108|        self->hyb_band_to_processing_band_table =
 1385|    108|            ixheaacd_hybrid_band_64_to_processing_band_9_map;
 1386|    108|        break;
 1387|    100|      case 12:
  ------------------
  |  Branch (1387:7): [True: 100, False: 862]
  ------------------
 1388|       |
 1389|    100|        self->hyb_band_to_processing_band_table =
 1390|    100|            ixheaacd_hybrid_band_64_to_processing_band_12_map;
 1391|    100|        break;
 1392|    126|      case 15:
  ------------------
  |  Branch (1392:7): [True: 126, False: 836]
  ------------------
 1393|       |
 1394|    126|        self->hyb_band_to_processing_band_table =
 1395|    126|            ixheaacd_hybrid_band_64_to_processing_band_15_map;
 1396|    126|        break;
 1397|    463|      case 23:
  ------------------
  |  Branch (1397:7): [True: 463, False: 499]
  ------------------
 1398|       |
 1399|    463|        self->hyb_band_to_processing_band_table =
 1400|    463|            ixheaacd_hybrid_band_64_to_processing_band_23_map;
 1401|    463|        break;
 1402|      6|      default:
  ------------------
  |  Branch (1402:7): [True: 6, False: 956]
  ------------------
 1403|      6|        self->hyb_band_to_processing_band_table = NULL;
 1404|      6|        return -1;
 1405|      0|        break;
 1406|    962|    }
 1407|  1.26k|  } else {
 1408|  1.26k|    switch (self->bs_param_bands) {
 1409|    336|      case 4:
  ------------------
  |  Branch (1409:7): [True: 336, False: 931]
  ------------------
 1410|    336|        self->hyb_band_to_processing_band_table =
 1411|    336|            ixheaacd_hybrid_band_71_to_processing_band_4_map;
 1412|    336|        break;
 1413|    151|      case 5:
  ------------------
  |  Branch (1413:7): [True: 151, False: 1.11k]
  ------------------
 1414|    151|        self->hyb_band_to_processing_band_table =
 1415|    151|            ixheaacd_hybrid_band_71_to_processing_band_5_map;
 1416|    151|        break;
 1417|    178|      case 7:
  ------------------
  |  Branch (1417:7): [True: 178, False: 1.08k]
  ------------------
 1418|    178|        self->hyb_band_to_processing_band_table =
 1419|    178|            ixheaacd_hybrid_band_71_to_processing_band_7_map;
 1420|    178|        break;
 1421|    150|      case 10:
  ------------------
  |  Branch (1421:7): [True: 150, False: 1.11k]
  ------------------
 1422|    150|        self->hyb_band_to_processing_band_table =
 1423|    150|            ixheaacd_hybrid_band_71_to_processing_band_10_map;
 1424|    150|        break;
 1425|    144|      case 14:
  ------------------
  |  Branch (1425:7): [True: 144, False: 1.12k]
  ------------------
 1426|    144|        self->hyb_band_to_processing_band_table =
 1427|    144|            ixheaacd_hybrid_band_71_to_processing_band_14_map;
 1428|    144|        break;
 1429|     71|      case 20:
  ------------------
  |  Branch (1429:7): [True: 71, False: 1.19k]
  ------------------
 1430|     71|        self->hyb_band_to_processing_band_table =
 1431|     71|            ixheaacd_hybrid_band_71_to_processing_band_20_map;
 1432|     71|        break;
 1433|    236|      case 28:
  ------------------
  |  Branch (1433:7): [True: 236, False: 1.03k]
  ------------------
 1434|    236|        self->hyb_band_to_processing_band_table =
 1435|    236|            ixheaacd_hybrid_band_71_to_processing_band_28_map;
 1436|    236|        break;
 1437|      1|      default:
  ------------------
  |  Branch (1437:7): [True: 1, False: 1.26k]
  ------------------
 1438|      1|        self->hyb_band_to_processing_band_table = NULL;
 1439|      1|        return -1;
 1440|      0|        break;
 1441|  1.26k|    }
 1442|  1.26k|  }
 1443|  2.22k|  self->in_ch_count = 1;
 1444|  2.22k|  self->out_ch_count = 2;
 1445|       |
 1446|  2.22k|  self->input_gain =
 1447|  2.22k|      ixheaacd_mps_clip_gain_table[self->config->bs_fixed_gain_dmx];
 1448|       |
 1449|  2.22k|  if (self->config->bs_ott_bands_phase_present) {
  ------------------
  |  Branch (1449:7): [True: 501, False: 1.72k]
  ------------------
 1450|    501|    self->num_bands_ipd = self->config->bs_ott_bands_phase;
 1451|  1.72k|  } else {
 1452|  1.72k|    if (!(self->object_type == AOT_ER_AAC_ELD ||
  ------------------
  |  Branch (1452:11): [True: 956, False: 765]
  ------------------
 1453|    765|          self->object_type == AOT_ER_AAC_LD)) {
  ------------------
  |  Branch (1453:11): [True: 0, False: 765]
  ------------------
 1454|    765|      switch (self->bs_param_bands) {
 1455|    292|        case 4:
  ------------------
  |  Branch (1455:9): [True: 292, False: 473]
  ------------------
 1456|    361|        case 5:
  ------------------
  |  Branch (1456:9): [True: 69, False: 696]
  ------------------
 1457|    361|          self->num_bands_ipd = 2;
 1458|    361|          break;
 1459|    134|        case 7:
  ------------------
  |  Branch (1459:9): [True: 134, False: 631]
  ------------------
 1460|    134|          self->num_bands_ipd = 3;
 1461|    134|          break;
 1462|     44|        case 10:
  ------------------
  |  Branch (1462:9): [True: 44, False: 721]
  ------------------
 1463|     44|          self->num_bands_ipd = 5;
 1464|     44|          break;
 1465|     89|        case 14:
  ------------------
  |  Branch (1465:9): [True: 89, False: 676]
  ------------------
 1466|     89|          self->num_bands_ipd = 7;
 1467|     89|          break;
 1468|     20|        case 20:
  ------------------
  |  Branch (1468:9): [True: 20, False: 745]
  ------------------
 1469|    137|        case 28:
  ------------------
  |  Branch (1469:9): [True: 117, False: 648]
  ------------------
 1470|    137|          self->num_bands_ipd = 10;
 1471|    137|          break;
 1472|      0|        default:
  ------------------
  |  Branch (1472:9): [True: 0, False: 765]
  ------------------
 1473|      0|          return -1;
 1474|      0|          break;
 1475|    765|      }
 1476|    765|    }
 1477|  1.72k|  }
 1478|       |
 1479|  2.22k|  if (self->residual_coding) {
  ------------------
  |  Branch (1479:7): [True: 827, False: 1.39k]
  ------------------
 1480|    827|    self->num_bands_ipd = max(self->bs_residual_bands, self->num_bands_ipd);
  ------------------
  |  |   74|    827|#define max(a, b) (((a) > (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (74:20): [True: 362, False: 465]
  |  |  ------------------
  ------------------
 1481|    827|    self->max_res_bands = 0;
 1482|    827|    if (self->bs_residual_present) {
  ------------------
  |  Branch (1482:9): [True: 827, False: 0]
  ------------------
 1483|    827|      self->res_bands = self->bs_residual_bands;
 1484|    827|      if (self->res_bands > self->max_res_bands) {
  ------------------
  |  Branch (1484:11): [True: 601, False: 226]
  ------------------
 1485|    601|        self->max_res_bands = self->res_bands;
 1486|    601|      }
 1487|    827|    } else {
 1488|      0|      self->res_bands = 0;
 1489|      0|    }
 1490|    827|  }
 1491|       |
 1492|  2.22k|  if (self->num_bands_ipd > MAX_PARAMETER_BANDS) return -1;
  ------------------
  |  |   55|  2.22k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  |  Branch (1492:7): [True: 0, False: 2.22k]
  ------------------
 1493|       |
 1494|  2.22k|  self->dir_sig_count = 1;
 1495|  2.22k|  self->decor_sig_count = 1;
 1496|       |
 1497|  2.22k|  self->bs_high_rate_mode = self->config->bs_high_rate_mode;
 1498|  2.22k|  self->pre_mix_req = 1;
 1499|       |
 1500|  2.22k|  return 0;
 1501|  2.22k|}
ixheaacd_mps_parse.c:ixheaacd_mps_ecdata_decoding:
  309|   170k|    WORD32 data[MAX_PARAMETER_SETS_MPS][MAX_PARAMETER_BANDS], WORD32 datatype) {
  310|   170k|  WORD32 i, j, pb, set_index, bs_data_pair, data_bands, old_quant_coarse_xxx;
  311|   170k|  WORD32 strides[MAX_PARAMETER_BANDS + 1] = {0};
  312|   170k|  WORD32 band_stop = 0;
  313|       |
  314|   170k|  WORD32 *lastdata = NULL;
  315|   170k|  ia_mps_data_struct *frame_xxx_data = NULL;
  316|   170k|  WORD32 default_val = 0;
  317|   170k|  IA_ERRORCODE err = IA_NO_ERROR;
  ------------------
  |  |   23|   170k|#define IA_NO_ERROR 0x00000000
  ------------------
  318|       |
  319|   170k|  ia_mps_bs_frame *frame = &(self->bs_frame);
  320|       |
  321|   170k|  if (datatype == 0) {
  ------------------
  |  Branch (321:7): [True: 77.5k, False: 92.6k]
  ------------------
  322|  77.5k|    frame_xxx_data = &frame->cld_data;
  323|  77.5k|    lastdata = frame->cmp_cld_idx_prev;
  324|  77.5k|    band_stop = self->bs_param_bands;
  325|  92.6k|  } else if (datatype == 1) {
  ------------------
  |  Branch (325:14): [True: 77.4k, False: 15.1k]
  ------------------
  326|  77.4k|    frame_xxx_data = &frame->icc_data;
  327|  77.4k|    lastdata = frame->cmp_icc_idx_prev;
  328|  77.4k|    band_stop = self->bs_param_bands;
  329|  77.4k|  } else if (datatype == 2) {
  ------------------
  |  Branch (329:14): [True: 15.1k, False: 0]
  ------------------
  330|  15.1k|    frame_xxx_data = &frame->ipd_data;
  331|  15.1k|    lastdata = frame->ipd_idx_data_prev;
  332|  15.1k|    band_stop = self->num_bands_ipd;
  333|  15.1k|  } else {
  334|      0|    frame_xxx_data = &frame->cld_data;
  335|      0|    lastdata = frame->cmp_cld_idx_prev;
  336|      0|    band_stop = self->bs_param_bands;
  337|      0|  }
  338|       |
  339|   366k|  for (i = 0; i < self->num_parameter_sets; i++) {
  ------------------
  |  Branch (339:15): [True: 196k, False: 170k]
  ------------------
  340|   196k|    frame_xxx_data->bs_xxx_data_mode[i] = ixheaacd_read_bits_buf(bitstream, 2);
  341|   196k|  }
  342|       |
  343|   170k|  set_index = 0;
  344|   170k|  bs_data_pair = 0;
  345|   170k|  old_quant_coarse_xxx = frame_xxx_data->bs_quant_coarse_xxx_prev;
  346|       |
  347|   366k|  for (i = 0; i < self->num_parameter_sets; i++) {
  ------------------
  |  Branch (347:15): [True: 196k, False: 170k]
  ------------------
  348|   196k|    if (frame_xxx_data->bs_xxx_data_mode[i] == 0) {
  ------------------
  |  Branch (348:9): [True: 111k, False: 84.7k]
  ------------------
  349|  1.53M|      for (pb = 0; pb < band_stop; pb++) {
  ------------------
  |  Branch (349:20): [True: 1.42M, False: 111k]
  ------------------
  350|  1.42M|        lastdata[pb] = default_val;
  351|  1.42M|      }
  352|       |
  353|   111k|      old_quant_coarse_xxx = 0;
  354|   111k|    }
  355|       |
  356|   196k|    if (frame_xxx_data->bs_xxx_data_mode[i] == 3) {
  ------------------
  |  Branch (356:9): [True: 20.9k, False: 175k]
  ------------------
  357|  20.9k|      if (bs_data_pair) {
  ------------------
  |  Branch (357:11): [True: 714, False: 20.1k]
  ------------------
  358|    714|        bs_data_pair = 0;
  359|  20.1k|      } else {
  360|  20.1k|        bs_data_pair = ixheaacd_read_bits_buf(bitstream, 1);
  361|  20.1k|        frame_xxx_data->bs_quant_coarse_xxx[set_index] =
  362|  20.1k|            ixheaacd_read_bits_buf(bitstream, 1);
  363|  20.1k|        frame_xxx_data->bs_freq_res_stride_xxx[set_index] =
  364|  20.1k|            ixheaacd_read_bits_buf(bitstream, 2);
  365|       |
  366|  20.1k|        if (frame_xxx_data->bs_quant_coarse_xxx[set_index] !=
  ------------------
  |  Branch (366:13): [True: 4.88k, False: 15.3k]
  ------------------
  367|  20.1k|            old_quant_coarse_xxx) {
  368|  4.88k|          if (old_quant_coarse_xxx) {
  ------------------
  |  Branch (368:15): [True: 598, False: 4.28k]
  ------------------
  369|    598|            ixheaacd_mps_coarse2fine(lastdata, datatype, 0, band_stop - 0);
  370|  4.28k|          } else {
  371|  4.28k|            ixheaacd_mps_fine2coarse(lastdata, band_stop);
  372|  4.28k|          }
  373|  4.88k|        }
  374|       |
  375|  20.1k|        data_bands = ixheaacd_mps_getstridemap(
  376|  20.1k|            frame_xxx_data->bs_freq_res_stride_xxx[set_index], 0, band_stop,
  377|  20.1k|            strides);
  378|       |
  379|   190k|        for (pb = 0; pb < data_bands; pb++) {
  ------------------
  |  Branch (379:22): [True: 170k, False: 20.1k]
  ------------------
  380|   170k|          lastdata[pb] = lastdata[strides[pb]];
  381|   170k|        }
  382|       |
  383|  20.1k|        err = ixheaacd_mps_ecdatapairdec(
  384|  20.1k|            bitstream, data, lastdata, datatype, set_index, 0, data_bands, bs_data_pair,
  385|  20.1k|            frame_xxx_data->bs_quant_coarse_xxx[set_index],
  386|  20.1k|            !(frame->independency_flag && (i == 0)) || (set_index > 0), 0, 0, self->ec_flag);
  ------------------
  |  Branch (386:15): [True: 7.34k, False: 12.8k]
  |  Branch (386:43): [True: 4.82k, False: 2.51k]
  |  Branch (386:56): [True: 0, False: 4.82k]
  ------------------
  387|  20.1k|        if (err) return err;
  ------------------
  |  Branch (387:13): [True: 2, False: 20.1k]
  ------------------
  388|       |
  389|   190k|        for (pb = 0; pb < data_bands; pb++) {
  ------------------
  |  Branch (389:22): [True: 169k, False: 20.1k]
  ------------------
  390|   418k|          for (j = strides[pb]; j < strides[pb + 1]; j++) {
  ------------------
  |  Branch (390:33): [True: 248k, False: 169k]
  ------------------
  391|   248k|            if (datatype == IPD) {
  ------------------
  |  |   25|   248k|#define IPD (2)
  ------------------
  |  Branch (391:17): [True: 51.9k, False: 196k]
  ------------------
  392|  51.9k|              if (frame_xxx_data->bs_quant_coarse_xxx[set_index]) {
  ------------------
  |  Branch (392:19): [True: 26.6k, False: 25.2k]
  ------------------
  393|  26.6k|                lastdata[j] = data[set_index + bs_data_pair][pb] & 7;
  394|  26.6k|              } else {
  395|  25.2k|                lastdata[j] = data[set_index + bs_data_pair][pb] & 15;
  396|  25.2k|              }
  397|   196k|            } else {
  398|   196k|              lastdata[j] = data[set_index + bs_data_pair][pb];
  399|   196k|            }
  400|   248k|          }
  401|   169k|        }
  402|       |
  403|  20.1k|        old_quant_coarse_xxx = frame_xxx_data->bs_quant_coarse_xxx[set_index];
  404|       |
  405|  20.1k|        if (bs_data_pair) {
  ------------------
  |  Branch (405:13): [True: 6.43k, False: 13.7k]
  ------------------
  406|  6.43k|          frame_xxx_data->bs_quant_coarse_xxx[set_index + 1] =
  407|  6.43k|              frame_xxx_data->bs_quant_coarse_xxx[set_index];
  408|  6.43k|          frame_xxx_data->bs_freq_res_stride_xxx[set_index + 1] =
  409|  6.43k|              frame_xxx_data->bs_freq_res_stride_xxx[set_index];
  410|  6.43k|        }
  411|  20.1k|        set_index += bs_data_pair + 1;
  412|  20.1k|      }
  413|  20.9k|    }
  414|   196k|  }
  415|   170k|  return err;
  416|   170k|}
ixheaacd_mps_parse.c:ixheaacd_mps_coarse2fine:
  256|  34.1k|                                     WORD32 band_start, WORD32 ixheaacd_num_bands) {
  257|  34.1k|  WORD32 i;
  258|       |
  259|   573k|  for (i = band_start; i < band_start + ixheaacd_num_bands; i++) {
  ------------------
  |  Branch (259:24): [True: 538k, False: 34.1k]
  ------------------
  260|   538k|    data[i] <<= 1;
  261|   538k|  }
  262|       |
  263|  34.1k|  if (data_type == CLD) {
  ------------------
  |  |   23|  34.1k|#define CLD (0)
  ------------------
  |  Branch (263:7): [True: 9.23k, False: 24.9k]
  ------------------
  264|   144k|    for (i = band_start; i < band_start + ixheaacd_num_bands; i++) {
  ------------------
  |  Branch (264:26): [True: 135k, False: 9.23k]
  ------------------
  265|   135k|      if (data[i] == -14)
  ------------------
  |  Branch (265:11): [True: 14.3k, False: 121k]
  ------------------
  266|  14.3k|        data[i] = -15;
  267|   121k|      else if (data[i] == 14)
  ------------------
  |  Branch (267:16): [True: 3.68k, False: 117k]
  ------------------
  268|  3.68k|        data[i] = 15;
  269|   135k|    }
  270|  9.23k|  }
  271|  34.1k|}
ixheaacd_mps_parse.c:ixheaacd_mps_fine2coarse:
  273|  7.98k|static VOID ixheaacd_mps_fine2coarse(WORD32 *data, WORD32 ixheaacd_num_bands) {
  274|  7.98k|  WORD32 i;
  275|       |
  276|  91.7k|  for (i = 0; i < ixheaacd_num_bands; i++) {
  ------------------
  |  Branch (276:15): [True: 83.8k, False: 7.98k]
  ------------------
  277|  83.8k|    data[i] /= 2;
  278|  83.8k|  }
  279|  7.98k|}
ixheaacd_mps_parse.c:ixheaacd_mps_getstridemap:
  282|  26.0k|                                     WORD32 band_stop, WORD32 *strides) {
  283|  26.0k|  WORD32 i, pb, ch_fac, data_bands, start_offset;
  284|       |
  285|  26.0k|  ch_fac = ixheaacd_mps_stride_table[freq_res_stride];
  286|  26.0k|  data_bands = (band_stop - band_start - 1) / ch_fac + 1;
  287|       |
  288|  26.0k|  strides[0] = band_start;
  289|   226k|  for (pb = 1; pb <= data_bands; pb++) {
  ------------------
  |  Branch (289:16): [True: 199k, False: 26.0k]
  ------------------
  290|   199k|    strides[pb] = strides[pb - 1] + ch_fac;
  291|   199k|  }
  292|  26.0k|  start_offset = 0;
  293|   122k|  while (strides[data_bands] > band_stop) {
  ------------------
  |  Branch (293:10): [True: 96.8k, False: 26.0k]
  ------------------
  294|  96.8k|    if (start_offset < data_bands)
  ------------------
  |  Branch (294:9): [True: 8.74k, False: 88.0k]
  ------------------
  295|  8.74k|      start_offset++;
  296|  88.0k|    else
  297|  88.0k|      start_offset = 1;
  298|       |
  299|   207k|    for (i = start_offset; i <= data_bands; i++) {
  ------------------
  |  Branch (299:28): [True: 110k, False: 96.8k]
  ------------------
  300|   110k|      strides[i]--;
  301|   110k|    }
  302|  96.8k|  }
  303|       |
  304|  26.0k|  return data_bands;
  305|  26.0k|}
ixheaacd_mps_parse.c:ixheaacd_longmult1:
  180|   979k|                               UWORD16 d[], WORD32 len) {
  181|   979k|  WORD32 k;
  182|   979k|  UWORD32 tmp;
  183|   979k|  UWORD32 b0 = (UWORD32)b;
  184|       |
  185|   979k|  tmp = ((UWORD32)a[0]) * b0;
  186|   979k|  d[0] = (UWORD16)tmp;
  187|       |
  188|  4.89M|  for (k = 1; k < len; k++) {
  ------------------
  |  Branch (188:15): [True: 3.91M, False: 979k]
  ------------------
  189|  3.91M|    tmp = (tmp >> 16) + ((UWORD32)a[k]) * b0;
  190|  3.91M|    d[k] = (UWORD16)tmp;
  191|  3.91M|  }
  192|   979k|}
ixheaacd_mps_parse.c:ixheaacd_longdiv:
  195|   979k|                             UWORD16 d[], UWORD16 *pr, WORD32 len) {
  196|   979k|  UWORD32 r;
  197|   979k|  UWORD32 tmp;
  198|   979k|  UWORD32 temp;
  199|   979k|  WORD32 k;
  200|       |
  201|   979k|  if (a == 0)
  ------------------
  |  Branch (201:7): [True: 0, False: 979k]
  ------------------
  202|      0|    return;
  203|       |
  204|   979k|  r = 0;
  205|       |
  206|  5.87M|  for (k = len - 1; k >= 0; k--) {
  ------------------
  |  Branch (206:21): [True: 4.89M, False: 979k]
  ------------------
  207|  4.89M|    tmp = ((UWORD32)b[k]) + (r << 16);
  208|       |
  209|  4.89M|    if (tmp) {
  ------------------
  |  Branch (209:9): [True: 1.53M, False: 3.36M]
  ------------------
  210|  1.53M|      d[k] = (UWORD16)(tmp / a);
  211|  1.53M|      temp = d[k] * a;
  212|  1.53M|      r = tmp - temp;
  213|  3.36M|    } else {
  214|  3.36M|      d[k] = 0;
  215|  3.36M|    }
  216|  4.89M|  }
  217|   979k|  *pr = (UWORD16)r;
  218|   979k|}
ixheaacd_mps_parse.c:ixheaacd_longcompare:
  246|   345k|                                WORD32 len) {
  247|   345k|  WORD32 i;
  248|       |
  249|  1.27M|  for (i = len - 1; i > 0; i--) {
  ------------------
  |  Branch (249:21): [True: 1.02M, False: 254k]
  ------------------
  250|  1.02M|    if (a[i] != b[i]) break;
  ------------------
  |  Branch (250:9): [True: 90.2k, False: 929k]
  ------------------
  251|  1.02M|  }
  252|   345k|  return (a[i] >= b[i]) ? 1 : 0;
  ------------------
  |  Branch (252:10): [True: 59.2k, False: 285k]
  ------------------
  253|   345k|}
ixheaacd_mps_parse.c:ixheaacd_longsub:
  221|  59.2k|                             WORD32 lenb) {
  222|  59.2k|  WORD32 h;
  223|  59.2k|  WORD32 carry = 0;
  224|       |
  225|  59.2k|  if (lenb > lena)
  ------------------
  |  Branch (225:7): [True: 0, False: 59.2k]
  ------------------
  226|      0|    return;
  227|       |
  228|   296k|  for (h = 0; h < lenb; h++) {
  ------------------
  |  Branch (228:15): [True: 237k, False: 59.2k]
  ------------------
  229|   237k|    carry = carry + (WORD32)(a[h] - b[h]);
  230|   237k|    a[h] = (UWORD16)carry;
  231|   237k|    carry = carry >> 16;
  232|   237k|  }
  233|       |
  234|  59.2k|  for (; h < lena; h++) {
  ------------------
  |  Branch (234:10): [True: 0, False: 59.2k]
  ------------------
  235|      0|    carry = ((UWORD32)a[h]) + carry;
  236|      0|    a[h] = (UWORD16)carry;
  237|      0|    carry = carry >> 16;
  238|      0|  }
  239|       |
  240|  59.2k|  if (carry != 0)
  ------------------
  |  Branch (240:7): [True: 0, False: 59.2k]
  ------------------
  241|      0|    return;
  242|  59.2k|  return;
  243|  59.2k|}
ixheaacd_mps_parse.c:ixheaacd_ld_mps_ecdata_decoding:
  690|  17.3k|    WORD32 start_band) {
  691|  17.3k|  WORD32 i, j, pb, set_index, bs_data_pair, data_bands, old_quant_coarse_xxx;
  692|  17.3k|  WORD32 strides[MAX_PARAMETER_BANDS + 1] = {0};
  693|  17.3k|  WORD32 band_stop = 0;
  694|       |
  695|  17.3k|  WORD32 *lastdata = NULL;
  696|  17.3k|  ia_mps_data_struct *frame_xxx_data = NULL;
  697|  17.3k|  WORD32 default_val = 0;
  698|       |
  699|  17.3k|  ia_mps_bs_frame *frame = &(self->bs_frame);
  700|       |
  701|  17.3k|  if (datatype == CLD) {
  ------------------
  |  |   23|  17.3k|#define CLD (0)
  ------------------
  |  Branch (701:7): [True: 11.9k, False: 5.34k]
  ------------------
  702|  11.9k|    frame_xxx_data = &frame->cld_data;
  703|  11.9k|    lastdata = frame->cmp_cld_idx_prev;
  704|  11.9k|    band_stop = self->bs_param_bands;
  705|  11.9k|  } else if (datatype == ICC) {
  ------------------
  |  |   24|  5.34k|#define ICC (1)
  ------------------
  |  Branch (705:14): [True: 5.34k, False: 0]
  ------------------
  706|  5.34k|    frame_xxx_data = &frame->icc_data;
  707|  5.34k|    lastdata = frame->cmp_icc_idx_prev;
  708|  5.34k|    band_stop = self->bs_param_bands;
  709|  5.34k|  } else if (datatype == IPD) {
  ------------------
  |  |   25|      0|#define IPD (2)
  ------------------
  |  Branch (709:14): [True: 0, False: 0]
  ------------------
  710|      0|    frame_xxx_data = &frame->ipd_data;
  711|      0|    lastdata = frame->ipd_idx_data_prev;
  712|      0|    band_stop = self->num_bands_ipd;
  713|      0|  } else {
  714|      0|    frame_xxx_data = &frame->cld_data;
  715|      0|    lastdata = frame->cmp_cld_idx_prev;
  716|      0|    band_stop = self->bs_param_bands;
  717|      0|  }
  718|  40.4k|  for (i = 0; i < self->num_parameter_sets; i++) {
  ------------------
  |  Branch (718:15): [True: 23.1k, False: 17.3k]
  ------------------
  719|  23.1k|    frame_xxx_data->bs_xxx_data_mode[i] =
  720|  23.1k|        ixheaacd_read_bits_buf(it_bit_buff, 2);
  721|  23.1k|  }
  722|       |
  723|  17.3k|  set_index = 0;
  724|  17.3k|  bs_data_pair = 0;
  725|  17.3k|  old_quant_coarse_xxx = frame_xxx_data->bs_quant_coarse_xxx_prev;
  726|       |
  727|  40.4k|  for (i = 0; i < self->num_parameter_sets; i++) {
  ------------------
  |  Branch (727:15): [True: 23.0k, False: 17.3k]
  ------------------
  728|  23.0k|    if (frame_xxx_data->bs_xxx_data_mode[i] == 0) {
  ------------------
  |  Branch (728:9): [True: 11.1k, False: 11.9k]
  ------------------
  729|  87.7k|      for (pb = 0; pb < band_stop; pb++) {
  ------------------
  |  Branch (729:20): [True: 76.5k, False: 11.1k]
  ------------------
  730|  76.5k|        lastdata[pb] = default_val;
  731|  76.5k|      }
  732|       |
  733|  11.1k|      old_quant_coarse_xxx = 0;
  734|  11.1k|    }
  735|       |
  736|  23.0k|    if (frame_xxx_data->bs_xxx_data_mode[i] == 3) {
  ------------------
  |  Branch (736:9): [True: 6.74k, False: 16.3k]
  ------------------
  737|  6.74k|      if (bs_data_pair) {
  ------------------
  |  Branch (737:11): [True: 839, False: 5.90k]
  ------------------
  738|    839|        bs_data_pair = 0;
  739|  5.90k|      } else {
  740|  5.90k|        bs_data_pair = ixheaacd_read_bits_buf(it_bit_buff, 1);
  741|  5.90k|        frame_xxx_data->bs_quant_coarse_xxx[set_index] =
  742|  5.90k|            ixheaacd_read_bits_buf(it_bit_buff, 1);
  743|  5.90k|        frame_xxx_data->bs_freq_res_stride_xxx[set_index] =
  744|  5.90k|            ixheaacd_read_bits_buf(it_bit_buff, 2);
  745|       |
  746|  5.90k|        if (frame_xxx_data->bs_quant_coarse_xxx[set_index] !=
  ------------------
  |  Branch (746:13): [True: 4.37k, False: 1.53k]
  ------------------
  747|  5.90k|            old_quant_coarse_xxx) {
  748|  4.37k|          if (old_quant_coarse_xxx) {
  ------------------
  |  Branch (748:15): [True: 665, False: 3.70k]
  ------------------
  749|    665|            ixheaacd_mps_coarse2fine(lastdata, datatype, 0, band_stop - 0);
  750|  3.70k|          } else {
  751|  3.70k|            ixheaacd_mps_fine2coarse(lastdata, band_stop);
  752|  3.70k|          }
  753|  4.37k|        }
  754|       |
  755|  5.90k|        data_bands = ixheaacd_mps_getstridemap(
  756|  5.90k|            frame_xxx_data->bs_freq_res_stride_xxx[set_index], start_band,
  757|  5.90k|            band_stop, strides);
  758|  35.7k|        for (pb = 0; pb < data_bands; pb++) {
  ------------------
  |  Branch (758:22): [True: 29.8k, False: 5.90k]
  ------------------
  759|  29.8k|          lastdata[pb] = lastdata[strides[pb]];
  760|  29.8k|        }
  761|       |
  762|  5.90k|        ixheaacd_mps_ecdatapairdec(
  763|  5.90k|            it_bit_buff, data, lastdata, datatype, set_index, 0, data_bands, bs_data_pair,
  764|  5.90k|            frame_xxx_data->bs_quant_coarse_xxx[set_index],
  765|  5.90k|            !(frame->independency_flag && (i == 0)) || (set_index > 0), 1, 0, self->ec_flag);
  ------------------
  |  Branch (765:15): [True: 3.63k, False: 2.27k]
  |  Branch (765:43): [True: 2.22k, False: 1.40k]
  |  Branch (765:56): [True: 0, False: 2.22k]
  ------------------
  766|       |
  767|  35.5k|        for (pb = 0; pb < data_bands; pb++) {
  ------------------
  |  Branch (767:22): [True: 29.6k, False: 5.90k]
  ------------------
  768|  86.7k|          for (j = strides[pb]; j < strides[pb + 1]; j++) {
  ------------------
  |  Branch (768:33): [True: 57.0k, False: 29.6k]
  ------------------
  769|  57.0k|            if (datatype == IPD) {
  ------------------
  |  |   25|  57.0k|#define IPD (2)
  ------------------
  |  Branch (769:17): [True: 0, False: 57.0k]
  ------------------
  770|      0|              if (frame_xxx_data->bs_quant_coarse_xxx[set_index]) {
  ------------------
  |  Branch (770:19): [True: 0, False: 0]
  ------------------
  771|      0|                lastdata[j] = data[set_index + bs_data_pair][pb] & 7;
  772|      0|              } else {
  773|      0|                lastdata[j] = data[set_index + bs_data_pair][pb] & 15;
  774|      0|              }
  775|  57.0k|            } else {
  776|  57.0k|              lastdata[j] = data[set_index + bs_data_pair][pb];
  777|  57.0k|            }
  778|  57.0k|          }
  779|  29.6k|        }
  780|       |
  781|  5.90k|        old_quant_coarse_xxx = frame_xxx_data->bs_quant_coarse_xxx[set_index];
  782|       |
  783|  5.90k|        if (bs_data_pair) {
  ------------------
  |  Branch (783:13): [True: 4.11k, False: 1.78k]
  ------------------
  784|  4.11k|          frame_xxx_data->bs_quant_coarse_xxx[set_index + 1] =
  785|  4.11k|              frame_xxx_data->bs_quant_coarse_xxx[set_index];
  786|  4.11k|          frame_xxx_data->bs_freq_res_stride_xxx[set_index + 1] =
  787|  4.11k|              frame_xxx_data->bs_freq_res_stride_xxx[set_index];
  788|  4.11k|        }
  789|  5.90k|        set_index += bs_data_pair + 1;
  790|  5.90k|      }
  791|  6.74k|    }
  792|  23.0k|  }
  793|  17.3k|}
ixheaacd_mps_parse.c:ixheaacd_mps_dec_and_mapframeott:
 1169|  79.6k|    ia_mps_dec_state_struct *self) {
 1170|  79.6k|  ia_mps_bs_frame *cur_bit_stream_ptr = &(self->bs_frame);
 1171|  79.6k|  IA_ERRORCODE err_code = 0;
 1172|       |
 1173|  79.6k|  err_code = ixheaacd_mps_mapindexdata(
 1174|  79.6k|      self, &cur_bit_stream_ptr->cld_data, self->cld_data,
 1175|  79.6k|      cur_bit_stream_ptr->cld_idx, cur_bit_stream_ptr->cmp_cld_idx,
 1176|  79.6k|      cur_bit_stream_ptr->cld_idx_pre, CLD);
  ------------------
  |  |   23|  79.6k|#define CLD (0)
  ------------------
 1177|  79.6k|  if (err_code != IA_NO_ERROR) return err_code;
  ------------------
  |  |   23|  79.6k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (1177:7): [True: 33, False: 79.5k]
  ------------------
 1178|  79.5k|  err_code = ixheaacd_mps_mapindexdata(
 1179|  79.5k|      self, &cur_bit_stream_ptr->icc_data, self->icc_data,
 1180|  79.5k|      cur_bit_stream_ptr->icc_idx, cur_bit_stream_ptr->cmp_icc_idx,
 1181|  79.5k|      cur_bit_stream_ptr->icc_idx_pre, ICC);
  ------------------
  |  |   24|  79.5k|#define ICC (1)
  ------------------
 1182|  79.5k|  if (err_code != IA_NO_ERROR) return err_code;
  ------------------
  |  |   23|  79.5k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (1182:7): [True: 23, False: 79.5k]
  ------------------
 1183|  79.5k|  if ((self->config->bs_phase_coding)) {
  ------------------
  |  Branch (1183:7): [True: 62.0k, False: 17.4k]
  ------------------
 1184|  62.0k|    err_code = ixheaacd_mps_mapindexdata(
 1185|  62.0k|        self, &cur_bit_stream_ptr->ipd_data, self->ipd_data,
 1186|  62.0k|        cur_bit_stream_ptr->ipd_idx, cur_bit_stream_ptr->ipd_idx_data,
 1187|  62.0k|        cur_bit_stream_ptr->ipd_idx_prev, IPD);
  ------------------
  |  |   25|  62.0k|#define IPD (2)
  ------------------
 1188|       |
 1189|  62.0k|    if (err_code != IA_NO_ERROR) return err_code;
  ------------------
  |  |   23|  62.0k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (1189:9): [True: 5, False: 62.0k]
  ------------------
 1190|  62.0k|  }
 1191|  79.5k|  return IA_NO_ERROR;
  ------------------
  |  |   23|  79.5k|#define IA_NO_ERROR 0x00000000
  ------------------
 1192|  79.5k|}
ixheaacd_mps_parse.c:ixheaacd_mps_mapindexdata:
 1016|   221k|    WORD32 idx_prev[MAX_PARAMETER_BANDS], WORD32 param_type) {
 1017|   221k|  WORD32 interpolate_local[MAX_PARAMETER_SETS_MPS] = {0};
 1018|   221k|  WORD32 map[MAX_PARAMETER_BANDS + 1];
 1019|       |
 1020|   221k|  WORD32 set_index, i, band, parm_slot;
 1021|   221k|  WORD32 data_bands, ch_fac;
 1022|   221k|  WORD32 ps;
 1023|       |
 1024|   221k|  WORD32 i1, i2, x1, xi, x2;
 1025|   221k|  WORD32 band_start = 0;
 1026|   221k|  WORD32 ext_frame_flag = self->ext_frame_flag;
 1027|   221k|  WORD32 *param_slots = self->param_slots;
 1028|   221k|  WORD32 num_parameter_sets = self->num_parameter_sets;
 1029|   221k|  WORD32 band_stop = self->bs_param_bands;
 1030|   221k|  WORD32 default_val = 0;
 1031|       |
 1032|   221k|  set_index = 0;
 1033|       |
 1034|   478k|  for (i = 0; i < num_parameter_sets; i++) {
  ------------------
  |  Branch (1034:15): [True: 257k, False: 221k]
  ------------------
 1035|   257k|    if (frame_xxx_data->bs_xxx_data_mode[i] == 0) {
  ------------------
  |  Branch (1035:9): [True: 147k, False: 109k]
  ------------------
 1036|   147k|      frame_xxx_data->quant_coarse_xxx_flag[i] = 0;
 1037|  2.08M|      for (band = band_start; band < band_stop; band++) {
  ------------------
  |  Branch (1037:31): [True: 1.94M, False: 147k]
  ------------------
 1038|  1.94M|        out_idx_data[i][band] = default_val;
 1039|  1.94M|      }
 1040|  2.08M|      for (band = band_start; band < band_stop; band++) {
  ------------------
  |  Branch (1040:31): [True: 1.94M, False: 147k]
  ------------------
 1041|  1.94M|        idx_prev[band] = out_idx_data[i][band];
 1042|  1.94M|      }
 1043|       |
 1044|   147k|      frame_xxx_data->bs_quant_coarse_xxx_prev = 0;
 1045|   147k|    }
 1046|       |
 1047|   257k|    if (frame_xxx_data->bs_xxx_data_mode[i] == 1) {
  ------------------
  |  Branch (1047:9): [True: 38.7k, False: 218k]
  ------------------
 1048|   557k|      for (band = band_start; band < band_stop; band++) {
  ------------------
  |  Branch (1048:31): [True: 518k, False: 38.7k]
  ------------------
 1049|   518k|        out_idx_data[i][band] = idx_prev[band];
 1050|   518k|      }
 1051|  38.7k|      frame_xxx_data->quant_coarse_xxx_flag[i] =
 1052|  38.7k|          frame_xxx_data->bs_quant_coarse_xxx_prev;
 1053|  38.7k|    }
 1054|       |
 1055|   257k|    if (frame_xxx_data->bs_xxx_data_mode[i] == 2) {
  ------------------
  |  Branch (1055:9): [True: 35.1k, False: 222k]
  ------------------
 1056|   536k|      for (band = band_start; band < band_stop; band++) {
  ------------------
  |  Branch (1056:31): [True: 501k, False: 35.1k]
  ------------------
 1057|   501k|        out_idx_data[i][band] = idx_prev[band];
 1058|   501k|      }
 1059|  35.1k|      frame_xxx_data->quant_coarse_xxx_flag[i] =
 1060|  35.1k|          frame_xxx_data->bs_quant_coarse_xxx_prev;
 1061|  35.1k|      interpolate_local[i] = 1;
 1062|   222k|    } else {
 1063|   222k|      interpolate_local[i] = 0;
 1064|   222k|    }
 1065|       |
 1066|   257k|    if (frame_xxx_data->bs_xxx_data_mode[i] == 3) {
  ------------------
  |  Branch (1066:9): [True: 35.8k, False: 221k]
  ------------------
 1067|  35.8k|      parm_slot = i;
 1068|  35.8k|      ch_fac =
 1069|  35.8k|          ixheaacd_mps_stride_table[frame_xxx_data
 1070|  35.8k|                                        ->bs_freq_res_stride_xxx[set_index]];
 1071|  35.8k|      data_bands = (band_stop - band_start - 1) / ch_fac + 1;
 1072|  35.8k|      ixheaacd_mps_createmapping(map, band_start, band_stop, ch_fac);
 1073|  35.8k|      ixheaacd_mps_mapfrequency(&cmp_idx_data[set_index][0],
 1074|  35.8k|                                &out_idx_data[parm_slot][0], map, data_bands);
 1075|       |
 1076|   538k|      for (band = band_start; band < band_stop; band++) {
  ------------------
  |  Branch (1076:31): [True: 502k, False: 35.8k]
  ------------------
 1077|   502k|        idx_prev[band] = out_idx_data[parm_slot][band];
 1078|   502k|      }
 1079|       |
 1080|  35.8k|      frame_xxx_data->bs_quant_coarse_xxx_prev =
 1081|  35.8k|          frame_xxx_data->bs_quant_coarse_xxx[set_index];
 1082|  35.8k|      frame_xxx_data->quant_coarse_xxx_flag[i] =
 1083|  35.8k|          frame_xxx_data->bs_quant_coarse_xxx[set_index];
 1084|       |
 1085|  35.8k|      set_index++;
 1086|  35.8k|    }
 1087|   257k|  }
 1088|       |
 1089|   478k|  for (i = 0; i < num_parameter_sets; i++) {
  ------------------
  |  Branch (1089:15): [True: 257k, False: 221k]
  ------------------
 1090|   257k|    if (frame_xxx_data->quant_coarse_xxx_flag[i] == 1) {
  ------------------
  |  Branch (1090:9): [True: 32.9k, False: 224k]
  ------------------
 1091|  32.9k|      ixheaacd_mps_coarse2fine(out_idx_data[i], param_type, band_start,
 1092|  32.9k|                               band_stop - band_start);
 1093|  32.9k|      frame_xxx_data->quant_coarse_xxx_flag[i] = 0;
 1094|  32.9k|    }
 1095|   257k|  }
 1096|       |
 1097|   221k|  i1 = -1;
 1098|   221k|  x1 = 0;
 1099|   221k|  i2 = 0;
 1100|   478k|  for (i = 0; i < num_parameter_sets; i++) {
  ------------------
  |  Branch (1100:15): [True: 257k, False: 221k]
  ------------------
 1101|   257k|    if (interpolate_local[i] != 1) {
  ------------------
  |  Branch (1101:9): [True: 221k, False: 35.1k]
  ------------------
 1102|   221k|      i1 = i;
 1103|   221k|    }
 1104|   257k|    i2 = i;
 1105|   292k|    while (interpolate_local[i2] == 1) {
  ------------------
  |  Branch (1105:12): [True: 35.3k, False: 257k]
  ------------------
 1106|  35.3k|      i2++;
 1107|  35.3k|    }
 1108|   257k|    if (i1 == -1) {
  ------------------
  |  Branch (1108:9): [True: 32.9k, False: 224k]
  ------------------
 1109|  32.9k|      x1 = 0;
 1110|  32.9k|      i1 = 0;
 1111|   224k|    } else {
 1112|   224k|      x1 = param_slots[i1];
 1113|   224k|    }
 1114|   257k|    xi = param_slots[i];
 1115|   257k|    x2 = param_slots[i2];
 1116|       |
 1117|   257k|    if (interpolate_local[i] == 1) {
  ------------------
  |  Branch (1117:9): [True: 35.1k, False: 221k]
  ------------------
 1118|  35.1k|      if (i2 < num_parameter_sets) {
  ------------------
  |  Branch (1118:11): [True: 61, False: 35.1k]
  ------------------
 1119|     61|        if (self->ec_flag == 0) {
  ------------------
  |  Branch (1119:13): [True: 61, False: 0]
  ------------------
 1120|     61|          return IA_FATAL_ERROR;
  ------------------
  |  |   25|     61|#define IA_FATAL_ERROR 0x80000000
  ------------------
 1121|     61|        }
 1122|     61|      }
 1123|       |
 1124|   535k|      for (band = band_start; band < band_stop; band++) {
  ------------------
  |  Branch (1124:31): [True: 500k, False: 35.1k]
  ------------------
 1125|   500k|        WORD32 yi, y1, y2;
 1126|   500k|        yi = 0;
 1127|   500k|        y1 = out_idx_data[i1][band];
 1128|   500k|        y2 = out_idx_data[i2][band];
 1129|   500k|        if (param_type == IPD) {
  ------------------
  |  |   25|   500k|#define IPD (2)
  ------------------
  |  Branch (1129:13): [True: 114k, False: 385k]
  ------------------
 1130|   114k|          if (y2 - y1 > 8) y1 += 16;
  ------------------
  |  Branch (1130:15): [True: 4.55k, False: 110k]
  ------------------
 1131|   114k|          if (y1 - y2 > 8) y2 += 16;
  ------------------
  |  Branch (1131:15): [True: 2.15k, False: 112k]
  ------------------
 1132|       |
 1133|   114k|          if (x2 != x1) yi = (y1 + (xi - x1) * (y2 - y1) / (x2 - x1)) % 16;
  ------------------
  |  Branch (1133:15): [True: 11.6k, False: 103k]
  ------------------
 1134|   385k|        } else {
 1135|   385k|          if (x2 != x1) {
  ------------------
  |  Branch (1135:15): [True: 34.0k, False: 351k]
  ------------------
 1136|  34.0k|            yi = y1 + (xi - x1) * (y2 - y1) / (x2 - x1);
 1137|  34.0k|          }
 1138|   385k|        }
 1139|   500k|        out_idx_data[i][band] = yi;
 1140|   500k|      }
 1141|  35.1k|    }
 1142|   257k|  }
 1143|       |
 1144|   478k|  for (ps = 0; ps < num_parameter_sets; ps++) {
  ------------------
  |  Branch (1144:16): [True: 256k, False: 221k]
  ------------------
 1145|  3.71M|    for (band = band_start; band < band_stop; band++) {
  ------------------
  |  Branch (1145:29): [True: 3.45M, False: 256k]
  ------------------
 1146|  3.45M|      if (param_type == CLD) {
  ------------------
  |  |   23|  3.45M|#define CLD (0)
  ------------------
  |  Branch (1146:11): [True: 1.23M, False: 2.22M]
  ------------------
 1147|  1.23M|        out_idx_data[ps][band] = bound_check(out_idx_data[ps][band], -15, 15);
 1148|  2.22M|      } else if (param_type == ICC)
  ------------------
  |  |   24|  2.22M|#define ICC (1)
  ------------------
  |  Branch (1148:18): [True: 1.23M, False: 997k]
  ------------------
 1149|  1.23M|      {
 1150|  1.23M|        out_idx_data[ps][band] = bound_check(out_idx_data[ps][band], 0, 7);
 1151|  1.23M|      }
 1152|  3.45M|      out_data[ps][band] =
 1153|  3.45M|          ixheaacd_mps_de_quantize(out_idx_data[ps][band], param_type);
 1154|  3.45M|    }
 1155|   256k|  }
 1156|       |
 1157|   221k|  if (ext_frame_flag) {
  ------------------
  |  Branch (1157:7): [True: 9.02k, False: 212k]
  ------------------
 1158|  93.1k|    for (band = band_start; band < band_stop; band++) {
  ------------------
  |  Branch (1158:29): [True: 84.1k, False: 9.02k]
  ------------------
 1159|  84.1k|      out_data[num_parameter_sets][band] =
 1160|  84.1k|          out_data[num_parameter_sets - 1][band];
 1161|  84.1k|      out_idx_data[num_parameter_sets][band] =
 1162|  84.1k|          out_idx_data[num_parameter_sets - 1][band];
 1163|  84.1k|    }
 1164|  9.02k|  }
 1165|   221k|  return IA_NO_ERROR;
  ------------------
  |  |   23|   221k|#define IA_NO_ERROR 0x00000000
  ------------------
 1166|   221k|}
ixheaacd_mps_parse.c:ixheaacd_mps_createmapping:
  937|  38.7k|                                       WORD32 ch_fac) {
  938|  38.7k|  WORD32 input_bands, out_bands, bands_achived, bands_diff, incr, k, i;
  939|  38.7k|  WORD32 vdk[MAX_PARAMETER_BANDS + 1];
  940|  38.7k|  input_bands = band_stop - band_start;
  941|  38.7k|  out_bands = (input_bands - 1) / ch_fac + 1;
  942|  38.7k|  if (out_bands < 1) {
  ------------------
  |  Branch (942:7): [True: 0, False: 38.7k]
  ------------------
  943|      0|    out_bands = 1;
  944|      0|  }
  945|       |
  946|  38.7k|  bands_achived = out_bands * ch_fac;
  947|  38.7k|  bands_diff = input_bands - bands_achived;
  948|   354k|  for (i = 0; i < out_bands; i++) {
  ------------------
  |  Branch (948:15): [True: 315k, False: 38.7k]
  ------------------
  949|   315k|    vdk[i] = ch_fac;
  950|   315k|  }
  951|       |
  952|  38.7k|  if (bands_diff > 0) {
  ------------------
  |  Branch (952:7): [True: 0, False: 38.7k]
  ------------------
  953|      0|    incr = -1;
  954|      0|    k = out_bands - 1;
  955|  38.7k|  } else {
  956|  38.7k|    incr = 1;
  957|  38.7k|    k = 0;
  958|  38.7k|  }
  959|       |
  960|   157k|  while (bands_diff != 0) {
  ------------------
  |  Branch (960:10): [True: 118k, False: 38.7k]
  ------------------
  961|   118k|    vdk[k] = vdk[k] - incr;
  962|   118k|    k = k + incr;
  963|   118k|    bands_diff = bands_diff + incr;
  964|   118k|    if (k >= out_bands) {
  ------------------
  |  Branch (964:9): [True: 110k, False: 8.62k]
  ------------------
  965|   110k|      if (bands_diff > 0) {
  ------------------
  |  Branch (965:11): [True: 0, False: 110k]
  ------------------
  966|      0|        k = out_bands - 1;
  967|   110k|      } else if (bands_diff < 0) {
  ------------------
  |  Branch (967:18): [True: 102k, False: 7.66k]
  ------------------
  968|   102k|        k = 0;
  969|   102k|      }
  970|   110k|    }
  971|   118k|  }
  972|  38.7k|  map[0] = band_start;
  973|   354k|  for (i = 0; i < out_bands; i++) {
  ------------------
  |  Branch (973:15): [True: 315k, False: 38.7k]
  ------------------
  974|   315k|    map[i + 1] = map[i] + vdk[i];
  975|   315k|  }
  976|  38.7k|}
ixheaacd_mps_parse.c:ixheaacd_mps_mapfrequency:
  979|  35.8k|                                      WORD32 data_bands) {
  980|  35.8k|  WORD32 i, j, band_start, band_stop, value;
  981|  35.8k|  WORD32 start_band_0 = map[0];
  982|       |
  983|   325k|  for (i = 0; i < data_bands; i++) {
  ------------------
  |  Branch (983:15): [True: 289k, False: 35.8k]
  ------------------
  984|   289k|    value = in[i + start_band_0];
  985|       |
  986|   289k|    band_start = map[i];
  987|   289k|    band_stop = map[i + 1];
  988|   792k|    for (j = band_start; j < band_stop; j++) {
  ------------------
  |  Branch (988:26): [True: 502k, False: 289k]
  ------------------
  989|   502k|      out[j] = value;
  990|   502k|    }
  991|   289k|  }
  992|  35.8k|}
ixheaacd_mps_parse.c:bound_check:
  173|  2.46M|static WORD32 bound_check(WORD32 var, WORD32 lower_bound, WORD32 upper_bound) {
  174|  2.46M|  var = min(var, upper_bound);
  ------------------
  |  |   75|  2.46M|#define min(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (75:20): [True: 2.43M, False: 26.3k]
  |  |  ------------------
  ------------------
  175|  2.46M|  var = max(var, lower_bound);
  ------------------
  |  |   74|  2.46M|#define max(a, b) (((a) > (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (74:20): [True: 1.34M, False: 1.11M]
  |  |  ------------------
  ------------------
  176|  2.46M|  return var;
  177|  2.46M|}
ixheaacd_mps_parse.c:ixheaacd_mps_de_quantize:
  994|  3.45M|static FLOAT32 ixheaacd_mps_de_quantize(WORD32 value, WORD32 param_type) {
  995|  3.45M|  switch (param_type) {
  996|  1.23M|    case CLD:
  ------------------
  |  |   23|  1.23M|#define CLD (0)
  ------------------
  |  Branch (996:5): [True: 1.23M, False: 2.22M]
  ------------------
  997|  1.23M|      return ixheaacd_cld_de_quant_table[(value + 15)];
  998|       |
  999|  1.23M|    case ICC:
  ------------------
  |  |   24|  1.23M|#define ICC (1)
  ------------------
  |  Branch (999:5): [True: 1.23M, False: 2.22M]
  ------------------
 1000|  1.23M|      return ixheaacd_icc_de_quant_table[value];
 1001|       |
 1002|   997k|    case IPD:
  ------------------
  |  |   25|   997k|#define IPD (2)
  ------------------
  |  Branch (1002:5): [True: 997k, False: 2.46M]
  ------------------
 1003|   997k|      return ixheaacd_ipd_de_quant_table[(value & 15)];
 1004|       |
 1005|      0|    default:
  ------------------
  |  Branch (1005:5): [True: 0, False: 3.45M]
  ------------------
 1006|      0|      return 0;
 1007|      0|      return 0;
 1008|  3.45M|  }
 1009|  3.45M|}
ixheaacd_mps_parse.c:ixheaacd_mps_dec_and_mapframesmg:
 1194|  79.5k|static VOID ixheaacd_mps_dec_and_mapframesmg(ia_mps_dec_state_struct *self) {
 1195|  79.5k|  WORD32 ps, pb, pg, ch_fac, data_bands, param_band_start, param_band_stop,
 1196|  79.5k|      group_to_band[MAX_PARAMETER_BANDS + 1];
 1197|  79.5k|  ia_mps_bs_frame *frame = &(self->bs_frame);
 1198|   172k|  for (ps = 0; ps < self->num_parameter_sets; ps++) {
  ------------------
  |  Branch (1198:16): [True: 92.6k, False: 79.5k]
  ------------------
 1199|  92.6k|    switch (frame->bs_smooth_mode[ps]) {
  ------------------
  |  Branch (1199:13): [True: 92.6k, False: 0]
  ------------------
 1200|  80.6k|      case 0:
  ------------------
  |  Branch (1200:7): [True: 80.6k, False: 12.0k]
  ------------------
 1201|  80.6k|        self->smoothing_time[ps] = 256;
 1202|  80.6k|        self->inv_smoothing_time[ps] = (FLOAT32)(1.0f / 256.0f);
 1203|       |
 1204|  1.15M|        for (pb = 0; pb < self->bs_param_bands; pb++) {
  ------------------
  |  Branch (1204:22): [True: 1.06M, False: 80.6k]
  ------------------
 1205|  1.06M|          self->smoothing_data[ps][pb] = 0;
 1206|  1.06M|        }
 1207|  80.6k|        break;
 1208|       |
 1209|  2.70k|      case 1:
  ------------------
  |  Branch (1209:7): [True: 2.70k, False: 89.9k]
  ------------------
 1210|  2.70k|        if (ps > 0) {
  ------------------
  |  Branch (1210:13): [True: 838, False: 1.86k]
  ------------------
 1211|    838|          self->smoothing_time[ps] = self->smoothing_time[ps - 1];
 1212|    838|          self->inv_smoothing_time[ps] = self->inv_smoothing_time[ps - 1];
 1213|  1.86k|        } else {
 1214|  1.86k|          self->smoothing_time[ps] = self->smoothing_filt_state.prev_smg_time;
 1215|  1.86k|          self->inv_smoothing_time[ps] =
 1216|  1.86k|              self->smoothing_filt_state.inv_prev_smg_time;
 1217|  1.86k|        }
 1218|       |
 1219|  35.8k|        for (pb = 0; pb < self->bs_param_bands; pb++) {
  ------------------
  |  Branch (1219:22): [True: 33.1k, False: 2.70k]
  ------------------
 1220|  33.1k|          if (ps > 0)
  ------------------
  |  Branch (1220:15): [True: 11.5k, False: 21.6k]
  ------------------
 1221|  11.5k|            self->smoothing_data[ps][pb] = self->smoothing_data[ps - 1][pb];
 1222|  21.6k|          else
 1223|  21.6k|            self->smoothing_data[ps][pb] =
 1224|  21.6k|                self->smoothing_filt_state.prev_smg_data[pb];
 1225|  33.1k|        }
 1226|  2.70k|        break;
 1227|       |
 1228|  6.39k|      case 2:
  ------------------
  |  Branch (1228:7): [True: 6.39k, False: 86.2k]
  ------------------
 1229|  6.39k|        self->smoothing_time[ps] =
 1230|  6.39k|            ixheaacd_smoothing_time_table[frame->bs_smooth_time[ps]];
 1231|  6.39k|        self->inv_smoothing_time[ps] =
 1232|  6.39k|            ixheaacd_inverse_smoothing_time_table[frame->bs_smooth_time[ps]];
 1233|  89.6k|        for (pb = 0; pb < self->bs_param_bands; pb++) {
  ------------------
  |  Branch (1233:22): [True: 83.2k, False: 6.39k]
  ------------------
 1234|  83.2k|          self->smoothing_data[ps][pb] = 1;
 1235|  83.2k|        }
 1236|  6.39k|        break;
 1237|       |
 1238|  2.94k|      case 3:
  ------------------
  |  Branch (1238:7): [True: 2.94k, False: 89.7k]
  ------------------
 1239|  2.94k|        self->smoothing_time[ps] =
 1240|  2.94k|            ixheaacd_smoothing_time_table[frame->bs_smooth_time[ps]];
 1241|  2.94k|        self->inv_smoothing_time[ps] =
 1242|  2.94k|            ixheaacd_inverse_smoothing_time_table[frame->bs_smooth_time[ps]];
 1243|       |
 1244|  2.94k|        ch_fac = ixheaacd_mps_stride_table[frame->bs_freq_res_stride_smg[ps]];
 1245|  2.94k|        data_bands = (self->bs_param_bands - 1) / ch_fac + 1;
 1246|  2.94k|        ixheaacd_mps_createmapping(group_to_band, 0, self->bs_param_bands,
 1247|  2.94k|                                   ch_fac);
 1248|  28.6k|        for (pg = 0; pg < data_bands; pg++) {
  ------------------
  |  Branch (1248:22): [True: 25.7k, False: 2.94k]
  ------------------
 1249|  25.7k|          param_band_start = group_to_band[pg];
 1250|  25.7k|          param_band_stop = group_to_band[pg + 1];
 1251|  69.6k|          for (pb = param_band_start; pb < param_band_stop; pb++) {
  ------------------
  |  Branch (1251:39): [True: 43.9k, False: 25.7k]
  ------------------
 1252|  43.9k|            self->smoothing_data[ps][pb] = frame->bs_smg_data[ps][pg];
 1253|  43.9k|          }
 1254|  25.7k|        }
 1255|  2.94k|        break;
 1256|  92.6k|    }
 1257|  92.6k|  }
 1258|       |
 1259|  79.5k|  self->smoothing_filt_state.prev_smg_time =
 1260|  79.5k|      self->smoothing_time[self->num_parameter_sets - 1];
 1261|  79.5k|  self->smoothing_filt_state.inv_prev_smg_time =
 1262|  79.5k|      self->inv_smoothing_time[self->num_parameter_sets - 1];
 1263|  1.12M|  for (pb = 0; pb < self->bs_param_bands; pb++) {
  ------------------
  |  Branch (1263:16): [True: 1.04M, False: 79.5k]
  ------------------
 1264|  1.04M|    self->smoothing_filt_state.prev_smg_data[pb] =
 1265|  1.04M|        self->smoothing_data[self->num_parameter_sets - 1][pb];
 1266|  1.04M|  }
 1267|       |
 1268|  79.5k|  if (self->ext_frame_flag) {
  ------------------
  |  Branch (1268:7): [True: 3.29k, False: 76.2k]
  ------------------
 1269|  3.29k|    self->smoothing_time[self->num_parameter_sets] =
 1270|  3.29k|        self->smoothing_time[self->num_parameter_sets - 1];
 1271|  3.29k|    self->inv_smoothing_time[self->num_parameter_sets] =
 1272|  3.29k|        self->inv_smoothing_time[self->num_parameter_sets - 1];
 1273|  34.2k|    for (pb = 0; pb < self->bs_param_bands; pb++) {
  ------------------
  |  Branch (1273:18): [True: 30.9k, False: 3.29k]
  ------------------
 1274|  30.9k|      self->smoothing_data[self->num_parameter_sets][pb] =
 1275|  30.9k|          self->smoothing_data[self->num_parameter_sets - 1][pb];
 1276|  30.9k|    }
 1277|  3.29k|  }
 1278|  79.5k|}

ixheaacd_mps_synt_init:
   53|  4.44k|VOID ixheaacd_mps_synt_init(FLOAT32 state[POLY_PHASE_SYNTH_SIZE]) {
   54|  4.44k|  memset(state, 0, sizeof(FLOAT32) * POLY_PHASE_SYNTH_SIZE);
  ------------------
  |  |   24|  4.44k|#define POLY_PHASE_SYNTH_SIZE (1280)
  ------------------
   55|  4.44k|}
ixheaacd_mps_synt_post_fft_twiddle_dec:
   61|  21.2k|  FLOAT32 *state) {
   62|  21.2k|  WORD32 l;
   63|  1.38M|  for (l = 0; l < 2 * resolution; l++) {
  ------------------
  |  Branch (63:15): [True: 1.36M, False: 21.2k]
  ------------------
   64|  1.36M|    state[2 * resolution - l - 1] =
   65|  1.36M|      ((fin_re[l] * table_re[l]) + (fin_im[l] * table_im[l]));
   66|  1.36M|  }
   67|  21.2k|}
ixheaacd_mps_synt_out_calc_dec:
   71|  5.86M|                                    const FLOAT32 *filter_coeff) {
   72|  5.86M|  WORD32 l, k;
   73|  5.86M|  FLOAT32 *out1, *out2, *state1, *state2;
   74|  5.86M|  out1 = out;
   75|  5.86M|  out2 = out + resolution;
   76|  5.86M|  state1 = state;
   77|  5.86M|  state2 = state + (3 * resolution);
   78|       |
   79|  35.2M|  for (k = 0; k < 5; k++) {
  ------------------
  |  Branch (79:15): [True: 29.3M, False: 5.86M]
  ------------------
   80|  1.90G|    for (l = 0; l < resolution; l++) {
  ------------------
  |  Branch (80:17): [True: 1.87G, False: 29.3M]
  ------------------
   81|  1.87G|      *out1++ = (*state1++) * (*filter_coeff++);
   82|  1.87G|      *out2++ = (*state2++) * (*filter_coeff++);
   83|  1.87G|    }
   84|  29.3M|    out1 += resolution;
   85|  29.3M|    out2 += resolution;
   86|  29.3M|    state1 += (3 * resolution);
   87|  29.3M|    state2 += (3 * resolution);
   88|  29.3M|  }
   89|  5.86M|}
ixheaacd_mps_synt_out_calc_dec_ldmps:
   92|  62.0k|  FLOAT32 *state, const FLOAT32 *filter_coeff) {
   93|  62.0k|  WORD32 l, k;
   94|  62.0k|  FLOAT32 *out1, *out2, *state1, *state2;
   95|  62.0k|  const FLOAT32 *filter1, *filter2;
   96|  62.0k|  filter1 = filter_coeff;
   97|  62.0k|  filter2 = filter_coeff + resolution;
   98|  62.0k|  out1 = out;
   99|  62.0k|  out2 = out + resolution;
  100|  62.0k|  state1 = state;
  101|  62.0k|  state2 = state + (3 * resolution);
  102|       |
  103|   372k|  for (k = 0; k < 5; k++) {
  ------------------
  |  Branch (103:15): [True: 310k, False: 62.0k]
  ------------------
  104|  20.1M|    for (l = 0; l < resolution; l++) {
  ------------------
  |  Branch (104:17): [True: 19.8M, False: 310k]
  ------------------
  105|  19.8M|      *out1++ = (*state1++) * (*filter1++);
  106|  19.8M|      *out2++ = (*state2++) * (*filter2++);
  107|  19.8M|    }
  108|   310k|    filter1 += resolution;
  109|   310k|    filter2 += resolution;
  110|   310k|    out1 += resolution;
  111|   310k|    out2 += resolution;
  112|   310k|    state1 += (3 * resolution);
  113|   310k|    state2 += (3 * resolution);
  114|   310k|  }
  115|  62.0k|}
ixheaacd_mps_synt_out_calc_dec_ldmps_32:
  118|  21.2k|  FLOAT32 *state, const FLOAT32 *filter_coeff) {
  119|  21.2k|  WORD32 l, k;
  120|  21.2k|  FLOAT32 *out1, *out2, *state1, *state2;
  121|  21.2k|  const FLOAT32 *filter1, *filter2;
  122|  21.2k|  filter1 = filter_coeff;
  123|  21.2k|  filter2 = filter_coeff + 2 * resolution;
  124|  21.2k|  out1 = out;
  125|  21.2k|  out2 = out + resolution;
  126|  21.2k|  state1 = state;
  127|  21.2k|  state2 = state + (3 * resolution);
  128|       |
  129|   127k|  for (k = 0; k < 5; k++) {
  ------------------
  |  Branch (129:15): [True: 106k, False: 21.2k]
  ------------------
  130|  3.51M|    for (l = 0; l < resolution; l++) {
  ------------------
  |  Branch (130:17): [True: 3.40M, False: 106k]
  ------------------
  131|  3.40M|      *out1++ = ((*state1++) * (filter1[2*l] + filter1[2*l+1])/2);
  132|  3.40M|      *out2++ = ((*state2++) *  (filter2[2 * l] + filter2[2 * l + 1])/2);
  133|  3.40M|    }
  134|   106k|    filter1 += 4 * resolution;
  135|   106k|    filter2 += 4 * resolution;
  136|   106k|    out1 += resolution;
  137|   106k|    out2 += resolution;
  138|   106k|    state1 += (3 * resolution);
  139|   106k|    state2 += (3 * resolution);
  140|   106k|  }
  141|  21.2k|}
ixheaacd_mps_synth_pre_twidle:
  144|  5.92M|                                   FLOAT32 *c_in, WORD32 len) {
  145|  5.92M|  WORD32 i;
  146|  5.92M|  FLOAT32 *c_s = c_in;
  147|  5.92M|  FLOAT32 *p_re_s = out_re;
  148|  5.92M|  FLOAT32 *p_im_s = out_im;
  149|  5.92M|  FLOAT32 *c_e = c_in + (len << 1) - 1;
  150|  5.92M|  FLOAT32 *p_im_e = out_im + len - 1;
  151|  5.92M|  FLOAT32 *p_re_e = out_re + len - 1;
  152|  5.92M|  const FLOAT32 *prtw = ixheaacd_mps_pre_twid;
  153|       |
  154|   100M|  for (i = 0; i < len; i += 4) {
  ------------------
  |  Branch (154:15): [True: 94.8M, False: 5.92M]
  ------------------
  155|  94.8M|    *p_re_s = ((*c_s++) * (*prtw));
  156|  94.8M|    p_re_s++;
  157|  94.8M|    *p_im_s = -((*c_s--) * (*prtw));
  158|  94.8M|    p_im_s++;
  159|  94.8M|    *p_im_s = ((*c_e--) * (*prtw));
  160|  94.8M|    p_im_s--;
  161|  94.8M|    *p_re_s = ((*c_e++) * (*prtw++));
  162|  94.8M|    p_re_s--;
  163|  94.8M|    *p_im_s += ((*c_e--) * (*prtw));
  164|  94.8M|    p_im_s++;
  165|  94.8M|    *p_re_s += ((*c_e--) * (*prtw));
  166|  94.8M|    p_re_s++;
  167|  94.8M|    *p_re_s -= ((*c_s++) * (*prtw));
  168|  94.8M|    p_re_s++;
  169|  94.8M|    *p_im_s += ((*c_s++) * (*prtw++));
  170|  94.8M|    p_im_s++;
  171|  94.8M|    *p_im_e = ((*c_e--) * (*prtw));
  172|  94.8M|    p_im_e--;
  173|  94.8M|    *p_re_e = -((*c_e++) * (*prtw));
  174|  94.8M|    p_re_e--;
  175|  94.8M|    *p_re_e = ((*c_s++) * (*prtw));
  176|  94.8M|    p_re_e++;
  177|  94.8M|    *p_im_e = ((*c_s--) * (*prtw++));
  178|  94.8M|    p_im_e++;
  179|  94.8M|    *p_re_e += ((*c_s++) * (*prtw));
  180|  94.8M|    p_re_e--;
  181|  94.8M|    *p_im_e += ((*c_s++) * (*prtw));
  182|  94.8M|    p_im_e--;
  183|  94.8M|    *p_im_e -= ((*c_e--) * (*prtw));
  184|  94.8M|    p_im_e--;
  185|  94.8M|    *p_re_e += ((*c_e--) * (*prtw++));
  186|  94.8M|    p_re_e--;
  187|  94.8M|  }
  188|  5.92M|}
ixheaacd_mps_synth_post_twidle:
  191|  5.92M|                                    FLOAT32 *out_im, WORD32 len) {
  192|  5.92M|  WORD32 i;
  193|  5.92M|  {
  194|  5.92M|    FLOAT32 x_0, x_1, x_2, x_3;
  195|  5.92M|    FLOAT32 *p_re_e, *p_im_e;
  196|  5.92M|    const FLOAT32 *potw = ixheaacd_mps_post_twid;
  197|  5.92M|    FLOAT32 *p_re_s = out_re;
  198|  5.92M|    FLOAT32 *p_im_s = out_im;
  199|       |
  200|  5.92M|    p_re_e = p_re_s + (len - 2);
  201|  5.92M|    p_im_e = p_im_s + (len - 2);
  202|  5.92M|    x_0 = *p_re_e;
  203|  5.92M|    x_1 = *(p_re_e + 1);
  204|  5.92M|    x_2 = *p_im_e;
  205|  5.92M|    x_3 = *(p_im_e + 1);
  206|       |
  207|  5.92M|    *(p_re_e + 1) = -*(p_re_s + 1);
  208|  5.92M|    *(p_im_e + 1) = -*p_im_s;
  209|  5.92M|    *p_im_s = *(p_im_s + 1);
  210|       |
  211|  94.8M|    for (i = 5; i < len; i += 4) {
  ------------------
  |  Branch (211:17): [True: 88.9M, False: 5.92M]
  ------------------
  212|  88.9M|      FLOAT32 twdr = *potw++;
  213|  88.9M|      FLOAT32 twdi = *potw++;
  214|  88.9M|      FLOAT32 tmp;
  215|       |
  216|  88.9M|      *p_re_e = (x_0 * twdi);
  217|  88.9M|      *p_re_e += (x_1 * twdr);
  218|  88.9M|      p_re_e--;
  219|  88.9M|      p_re_s++;
  220|  88.9M|      *p_re_s = (x_0 * twdr);
  221|  88.9M|      *p_re_s -= (x_1 * twdi);
  222|  88.9M|      p_re_s++;
  223|  88.9M|      x_1 = *p_re_e--;
  224|  88.9M|      x_0 = *p_re_e++;
  225|  88.9M|      *p_re_e = (*p_re_s++ * twdi);
  226|  88.9M|      *p_re_e += -(*p_re_s * twdr);
  227|  88.9M|      p_re_e--;
  228|  88.9M|      tmp = (*p_re_s-- * twdi);
  229|  88.9M|      *p_re_s = tmp + (*p_re_s * twdr);
  230|       |
  231|  88.9M|      *p_im_e = -(x_2 * twdr);
  232|  88.9M|      *p_im_e += (x_3 * twdi);
  233|  88.9M|      p_im_e--;
  234|  88.9M|      p_im_s++;
  235|  88.9M|      *p_im_s = -(x_2 * twdi);
  236|  88.9M|      *p_im_s -= (x_3 * twdr);
  237|  88.9M|      p_im_s++;
  238|  88.9M|      x_3 = *p_im_e--;
  239|  88.9M|      x_2 = *p_im_e++;
  240|  88.9M|      *p_im_e = -(*p_im_s++ * twdr);
  241|  88.9M|      *p_im_e -= (*p_im_s * twdi);
  242|  88.9M|      p_im_e--;
  243|  88.9M|      tmp = (*p_im_s-- * twdr);
  244|  88.9M|      *p_im_s = tmp - (*p_im_s * twdi);
  245|  88.9M|    }
  246|       |
  247|  5.92M|    *p_re_e = 0.7071067f * (x_1 + x_0);
  248|  5.92M|    *p_im_e = 0.7071067f * (x_3 - x_2);
  249|  5.92M|    *(p_re_s + 1) = -0.7071067f * (x_1 - x_0);
  250|  5.92M|    *(p_im_s + 1) = -0.7071067f * (x_3 + x_2);
  251|  5.92M|  }
  252|       |
  253|   385M|  for (i = 0; i < len; i++) {
  ------------------
  |  Branch (253:15): [True: 379M, False: 5.92M]
  ------------------
  254|   379M|    state[i] = out_im[i] - out_re[i];
  255|   379M|    state[len + i] = out_im[len - i - 1] + out_re[len - i - 1];
  256|   379M|    state[len - i - 1] = out_im[len - i - 1] - out_re[len - i - 1];
  257|   379M|    state[2 * len - i - 1] = out_im[i] + out_re[i];
  258|   379M|  }
  259|  5.92M|}
ixheaacd_mps_synt_pre_twiddle_dec:
  263|  21.2k|  WORD32 resolution) {
  264|  21.2k|  WORD32 k;
  265|  21.2k|  FLOAT32 *c_s = ptr_in;
  266|  21.2k|  FLOAT32 *p_re_s = fin_re;
  267|  21.2k|  FLOAT32 *p_im_s = fin_im;
  268|  21.2k|  FLOAT32 *c_e = ptr_in + (resolution << 1) - 1;
  269|  21.2k|  FLOAT32 *p_im_e = fin_im + resolution - 1;
  270|  21.2k|  FLOAT32 *p_re_e = fin_re + resolution - 1;
  271|       |
  272|   361k|  for (k = 0; k < resolution; k += 2) {
  ------------------
  |  Branch (272:15): [True: 340k, False: 21.2k]
  ------------------
  273|   340k|    *p_re_s = (*c_s++) * (*table);
  274|   340k|    *p_im_s = (*c_s) * (*table);
  275|       |
  276|   340k|    *p_re_e = (*c_e--) * (*table);
  277|   340k|    *p_im_e = -(*c_e) * (*table++);
  278|       |
  279|   340k|    *p_re_s += (*c_s--) * (*table);
  280|   340k|    *p_im_s += -(*c_s++) * (*table);
  281|   340k|    p_re_s++;
  282|   340k|    p_im_s++;
  283|   340k|    c_s++;
  284|       |
  285|   340k|    *p_re_e += (*c_e++) * (*table);
  286|   340k|    *p_im_e += (*c_e--) * (*table++);
  287|   340k|    p_re_e--;
  288|   340k|    p_im_e--;
  289|   340k|    c_e--;
  290|   340k|  }
  291|  21.2k|}
ixheaacd_mps_synt_calc:
  293|  79.4k|VOID ixheaacd_mps_synt_calc(ia_mps_dec_state_struct *self) {
  294|  79.4k|  WORD32 k, l, ts, ch;
  295|  79.4k|  FLOAT32 *state, *tmp_state, *out;
  296|  79.4k|  const FLOAT32 *filt_coeff;
  297|  79.4k|  FLOAT32 *tmp_buf = self->tmp_buf;
  298|  79.4k|  FLOAT32 fin_re[64] = {0};
  299|  79.4k|  FLOAT32 fin_im[64] = {0};
  300|       |
  301|  79.4k|  WORD32 resolution = self->resolution;
  302|  79.4k|  WORD32 m_resolution = resolution >> 1;
  303|  79.4k|  const FLOAT32 *ixheaacd_mps_post_re, *ixheaacd_mps_post_im;
  304|  79.4k|  VOID(*ixheaacd_mps_synt_out_calc_pointer)
  305|  79.4k|  (WORD32 resolution, FLOAT32 *out, FLOAT32 *state, const FLOAT32 *filter_coeff);
  306|       |
  307|  79.4k|  if (self->ldmps_config.ldmps_present_flag)
  ------------------
  |  Branch (307:7): [True: 2.15k, False: 77.3k]
  ------------------
  308|  2.15k|  {
  309|  2.15k|    ixheaacd_mps_synt_out_calc_pointer = &ixheaacd_mps_synt_out_calc_dec_ldmps;
  310|  2.15k|    filt_coeff = ixheaacd_ldmps_polyphase_filter_coeff;
  311|  2.15k|  }
  312|  77.3k|  else
  313|  77.3k|  {
  314|  77.3k|    ixheaacd_mps_synt_out_calc_pointer = ixheaacd_mps_synt_out_calc;
  315|  77.3k|    filt_coeff = ixheaacd_mps_polyphase_filter_coeff;
  316|  77.3k|  }
  317|  79.4k|  if (self->qmf_band_count == 32)
  ------------------
  |  Branch (317:7): [True: 952, False: 78.5k]
  ------------------
  318|    952|  {
  319|  2.85k|    for (ch = 0; ch < self->out_ch_count; ch++) {
  ------------------
  |  Branch (319:18): [True: 1.90k, False: 952]
  ------------------
  320|  1.90k|      tmp_state = self->qmf_filt_state[ch];
  321|  1.90k|      state = &tmp_buf[self->time_slots * 2 * resolution];
  322|  1.90k|      memcpy(state, tmp_state, sizeof(FLOAT32) * 18 * resolution);
  323|  1.90k|      out = &tmp_buf[74 * MAX_NUM_QMF_BANDS_SAC];
  ------------------
  |  |   23|  1.90k|#define MAX_NUM_QMF_BANDS_SAC (128)
  ------------------
  324|       |
  325|  1.90k|      ixheaacd_mps_post_re = ixheaacd_mps_post_re_32;
  326|  1.90k|      ixheaacd_mps_post_im = ixheaacd_mps_post_im_32;
  327|       |
  328|  23.1k|      for (ts = 0; ts < self->time_slots; ts++) {
  ------------------
  |  Branch (328:20): [True: 21.2k, False: 1.90k]
  ------------------
  329|       |
  330|  21.2k|        state -= (2 * resolution);
  331|       |
  332|  21.2k|        ixheaacd_mps_synt_pre_twiddle_dec(&self->qmf_out_dir[ch][ts][0].re,
  333|  21.2k|            ixheaacd_ldmps_pre_twid, fin_re, fin_im, resolution);
  334|       |
  335|   702k|        for (k = resolution; k < 2 * resolution; k++)
  ------------------
  |  Branch (335:30): [True: 680k, False: 21.2k]
  ------------------
  336|   680k|        {
  337|   680k|          fin_re[k] = 0;
  338|   680k|          fin_im[k] = 0;
  339|   680k|        }
  340|       |
  341|  21.2k|        ixheaacd_mps_complex_fft(fin_re, fin_im, 2 * resolution);
  342|       |
  343|  21.2k|        ixheaacd_mps_synt_post_fft_twiddle_dec(resolution, fin_re, fin_im,
  344|  21.2k|                                              ixheaacd_mps_post_re,
  345|  21.2k|                                              ixheaacd_mps_post_im, state);
  346|       |
  347|  21.2k|        ixheaacd_mps_synt_out_calc_dec_ldmps_32(resolution, out, state, filt_coeff);
  348|       |
  349|   702k|        for (k = 0; k < resolution; k++) {
  ------------------
  |  Branch (349:21): [True: 680k, False: 21.2k]
  ------------------
  350|   680k|          FLOAT32 acc = out[k];
  351|  6.80M|          for (l = 1; l < 10; l++) {
  ------------------
  |  Branch (351:23): [True: 6.12M, False: 680k]
  ------------------
  352|  6.12M|            acc += out[resolution * l + k];
  353|  6.12M|          }
  354|   680k|          self->output_buffer[ch][self->qmf_band_count * ts + k] = acc;
  355|   680k|        }
  356|  21.2k|      }
  357|  1.90k|      memcpy(tmp_state, state, sizeof(FLOAT32) * 18 * resolution);
  358|  1.90k|    }
  359|    952|  }
  360|  78.5k|  else
  361|  78.5k|  {
  362|   235k|    for (ch = 0; ch < self->out_ch_count; ch++) {
  ------------------
  |  Branch (362:18): [True: 157k, False: 78.5k]
  ------------------
  363|   157k|      tmp_state = self->qmf_filt_state[ch];
  364|   157k|      state = &tmp_buf[self->time_slots * 2 * resolution];
  365|   157k|      memcpy(state, tmp_state, sizeof(FLOAT32) * 18 * resolution);
  366|   157k|      out = &tmp_buf[74 * MAX_NUM_QMF_BANDS_SAC];
  ------------------
  |  |   23|   157k|#define MAX_NUM_QMF_BANDS_SAC (128)
  ------------------
  367|       |
  368|  6.08M|      for (ts = 0; ts < self->time_slots; ts++) {
  ------------------
  |  Branch (368:20): [True: 5.92M, False: 157k]
  ------------------
  369|       |
  370|  5.92M|        state -= (2 * resolution);
  371|       |
  372|  5.92M|        ixheaacd_mps_synth_pre_twidle(
  373|  5.92M|          fin_re, fin_im, &self->qmf_out_dir[ch][ts][0].re, resolution);
  374|       |
  375|  5.92M|        ixheaacd_mps_synth_calc_fft(fin_re, fin_im, m_resolution);
  376|       |
  377|  5.92M|        ixheaacd_mps_synth_post_twidle(state, fin_re, fin_im, resolution);
  378|  5.92M|        (*ixheaacd_mps_synt_out_calc_pointer)(resolution, out, state, filt_coeff);
  379|       |
  380|   385M|        for (k = 0; k < resolution; k++) {
  ------------------
  |  Branch (380:21): [True: 379M, False: 5.92M]
  ------------------
  381|   379M|          FLOAT32 acc = out[k];
  382|  3.79G|          for (l = 1; l < 10; l++) {
  ------------------
  |  Branch (382:23): [True: 3.41G, False: 379M]
  ------------------
  383|  3.41G|            acc += out[resolution * l + k];
  384|  3.41G|          }
  385|   379M|          self->output_buffer[ch][self->qmf_band_count * ts + k] = acc;
  386|   379M|        }
  387|  5.92M|      }
  388|   157k|      memcpy(tmp_state, state, sizeof(FLOAT32) * 18 * resolution);
  389|   157k|    }
  390|  78.5k|  }
  391|  79.4k|}

ixheaacd_calculate_syn_filt_bank_res64:
  809|  60.2k|                                            ia_mps_dec_qmf_tables_struct *qmf_table_ptr) {
  810|  60.2k|  WORD32 j, k;
  811|  60.2k|  WORD32 *synth_buf;
  812|  60.2k|  WORD32 *syn_buf_p1, *syn_buf_p2, *syn_buf_p3;
  813|  60.2k|  WORD32 val;
  814|  60.2k|  const WORD32 *p_filter_1, *p_filter_6;
  815|  60.2k|  const WORD32 *p_filter_2, *p_filter_7;
  816|  60.2k|  const WORD32 *p_filter_3, *p_filter_8;
  817|  60.2k|  const WORD32 *p_filter_4, *p_filter_9;
  818|  60.2k|  const WORD32 *p_filter_5, *p_filter_10;
  819|       |
  820|  60.2k|  WORD32 *p_sr, *p_si;
  821|       |
  822|  60.2k|  WORD32 *sbr_qmf_states_synthesis = syn->sbr_qmf_states_synthesis;
  823|  60.2k|  synth_buf = &(sbr_qmf_states_synthesis[channel * QMF_FILTER_STATE_SYN_SIZE_MPS]);
  ------------------
  |  |   88|  60.2k|#define QMF_FILTER_STATE_SYN_SIZE_MPS (576)
  ------------------
  824|       |
  825|  60.2k|  p_sr = sr;
  826|  60.2k|  p_si = si;
  827|  1.81M|  for (k = 0; k < nr_samples; k++) {
  ------------------
  |  Branch (827:15): [True: 1.75M, False: 60.2k]
  ------------------
  828|  1.75M|    WORD32 *new_samp = p_si;
  829|  1.75M|    WORD32 *new_samp2;
  830|       |
  831|  1.75M|    ixheaacd_inverse_modulation(p_sr, p_si, qmf_table_ptr);
  832|       |
  833|  1.75M|    p_filter_1 = syn->p_filter_syn;
  834|  1.75M|    p_filter_2 = p_filter_1 + 64;
  835|  1.75M|    p_filter_3 = p_filter_2 + 65;
  836|  1.75M|    p_filter_4 = p_filter_3 + 65;
  837|  1.75M|    p_filter_5 = p_filter_4 + 65;
  838|       |
  839|  1.75M|    syn_buf_p1 = &synth_buf[63];
  840|  1.75M|    val = *(p_sr);
  841|       |
  842|  1.75M|    {
  843|  1.75M|      WORD32 val1 = *(p_si + 63);
  844|  1.75M|      syn_buf_p2 = &synth_buf[63];
  845|       |
  846|  1.75M|      *time_sig++ = ixheaac_add32_sat(syn_buf_p1[512],
  847|  1.75M|                        ixheaacd_mps_mult32_shr_30(*(p_filter_5 + 65), val));
  848|  1.75M|      syn_buf_p1[512] = ixheaac_add32_sat(syn_buf_p2[448],
  849|  1.75M|                            ixheaacd_mps_mult32_shr_30(*(p_filter_5 + 64), val1));
  850|  1.75M|      syn_buf_p2[448] = ixheaac_add32_sat(syn_buf_p1[384],
  851|  1.75M|                            ixheaacd_mps_mult32_shr_30(*p_filter_5++, val));
  852|  1.75M|      syn_buf_p1[384] = ixheaac_add32_sat(syn_buf_p2[320],
  853|  1.75M|                            ixheaacd_mps_mult32_shr_30(*(p_filter_4 + 64), val1));
  854|  1.75M|      syn_buf_p2[320] = ixheaac_add32_sat(syn_buf_p1[256],
  855|  1.75M|                            ixheaacd_mps_mult32_shr_30(*p_filter_4++, val));
  856|  1.75M|      syn_buf_p1[256] = ixheaac_add32_sat(syn_buf_p2[192],
  857|  1.75M|                            ixheaacd_mps_mult32_shr_30(*(p_filter_3 + 64), val1));
  858|  1.75M|      syn_buf_p2[192] = ixheaac_add32_sat(syn_buf_p1[128],
  859|  1.75M|                            ixheaacd_mps_mult32_shr_30(*p_filter_3++, val));
  860|  1.75M|      syn_buf_p1[128] = ixheaac_add32_sat(syn_buf_p2[64],
  861|  1.75M|                            ixheaacd_mps_mult32_shr_30(*(p_filter_2 + 64), val1));
  862|  1.75M|      syn_buf_p2[64] = ixheaac_add32_sat(syn_buf_p1[0],
  863|  1.75M|                            ixheaacd_mps_mult32_shr_30(*p_filter_2++, val));
  864|  1.75M|      syn_buf_p1[0] = ixheaacd_mps_mult32_shr_30(*(p_filter_1 + 63), val1);
  865|  1.75M|    }
  866|  1.75M|    p_filter_6 = p_filter_1 + 62;
  867|  1.75M|    p_filter_7 = p_filter_2 + 62;
  868|  1.75M|    p_filter_8 = p_filter_3 + 62;
  869|  1.75M|    p_filter_9 = p_filter_4 + 62;
  870|  1.75M|    p_filter_10 = p_filter_5 + 62;
  871|  1.75M|    time_sig += 62;
  872|       |
  873|  1.75M|    syn_buf_p2 = synth_buf;
  874|  1.75M|    syn_buf_p3 = syn_buf_p2;
  875|  1.75M|    new_samp2 = p_sr + 63;
  876|   112M|    for (j = 0; j < resolution - 1; j++) {
  ------------------
  |  Branch (876:17): [True: 110M, False: 1.75M]
  ------------------
  877|   110M|      *time_sig-- = ixheaac_add32_sat(syn_buf_p3[512],
  878|   110M|                        ixheaacd_mps_mult32_shr_30(*p_filter_6--, (*new_samp2)));
  879|   110M|      syn_buf_p3[512] = ixheaac_add32_sat(syn_buf_p2[448],
  880|   110M|                            ixheaacd_mps_mult32_shr_30(*p_filter_5++, (*new_samp)));
  881|   110M|      syn_buf_p2[448] = ixheaac_add32_sat(syn_buf_p3[384],
  882|   110M|                            ixheaacd_mps_mult32_shr_30(*p_filter_7--, (*new_samp2)));
  883|   110M|      syn_buf_p3[384] = ixheaac_add32_sat(syn_buf_p2[320],
  884|   110M|                            ixheaacd_mps_mult32_shr_30(*p_filter_4++, (*new_samp)));
  885|   110M|      syn_buf_p2[320] = ixheaac_add32_sat(syn_buf_p3[256],
  886|   110M|                            ixheaacd_mps_mult32_shr_30(*p_filter_8--, (*new_samp2)));
  887|   110M|      syn_buf_p3[256] = ixheaac_add32_sat(syn_buf_p2[192],
  888|   110M|                            ixheaacd_mps_mult32_shr_30(*p_filter_3++, (*new_samp)));
  889|   110M|      syn_buf_p2[192] = ixheaac_add32_sat(syn_buf_p3[128],
  890|   110M|                            ixheaacd_mps_mult32_shr_30(*p_filter_9--, (*new_samp2)));
  891|   110M|      syn_buf_p3[128] = ixheaac_add32_sat(syn_buf_p2[64],
  892|   110M|                            ixheaacd_mps_mult32_shr_30(*p_filter_2++, (*new_samp)));
  893|   110M|      syn_buf_p2[64] = ixheaac_add32_sat(syn_buf_p3[0],
  894|   110M|                           ixheaacd_mps_mult32_shr_30(*p_filter_10--, (*new_samp2)));
  895|   110M|      syn_buf_p3[0] = ixheaacd_mps_mult32_shr_30(*p_filter_1++, (*new_samp));
  896|       |
  897|   110M|      new_samp++;
  898|   110M|      syn_buf_p2++;
  899|       |
  900|   110M|      new_samp2--;
  901|   110M|      syn_buf_p3++;
  902|   110M|    }
  903|       |
  904|  1.75M|    time_sig += 64;
  905|       |
  906|  1.75M|    p_sr += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  1.75M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  1.75M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  907|  1.75M|    p_si += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  1.75M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  1.75M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  908|  1.75M|  }
  909|  60.2k|}
ixheaacd_calculate_syn_filt_bank:
  914|  41.6k|                                      ia_mps_dec_qmf_tables_struct *qmf_table_ptr) {
  915|  41.6k|  WORD32 j, k;
  916|  41.6k|  WORD32 *synth_buf;
  917|  41.6k|  WORD32 *p_sr, *p_si;
  918|  41.6k|  WORD32 *buf_ptr;
  919|  41.6k|  WORD32 resx2 = resolution << 1;
  920|  41.6k|  WORD32 *sbr_qmf_states_synthesis = syn->sbr_qmf_states_synthesis;
  921|       |
  922|  41.6k|  synth_buf = &(sbr_qmf_states_synthesis[channel * QMF_FILTER_STATE_SYN_SIZE_MPS]);
  ------------------
  |  |   88|  41.6k|#define QMF_FILTER_STATE_SYN_SIZE_MPS (576)
  ------------------
  923|       |
  924|  41.6k|  p_sr = sr;
  925|  41.6k|  p_si = si;
  926|  1.06M|  for (k = 0; k < nr_samples; k++) {
  ------------------
  |  Branch (926:15): [True: 1.02M, False: 41.6k]
  ------------------
  927|  1.02M|    WORD32 *new_samp = p_si + 63;
  928|       |
  929|  1.02M|    const WORD32 *p_filter_1 = syn->p_filter_syn;
  930|  1.02M|    const WORD32 *p_filter_2 = p_filter_1 + 65;
  931|  1.02M|    const WORD32 *p_filter_3 = p_filter_2 + 65;
  932|  1.02M|    const WORD32 *p_filter_4 = p_filter_3 + 65;
  933|  1.02M|    const WORD32 *p_filter_5 = p_filter_4 + 65;
  934|       |
  935|  1.02M|    ixheaacd_inverse_modulation(p_sr, p_si, qmf_table_ptr);
  936|       |
  937|  33.6M|    for (j = 0; j < resolution; j++) {
  ------------------
  |  Branch (937:17): [True: 32.6M, False: 1.02M]
  ------------------
  938|  32.6M|      synth_buf[j] = ixheaacd_mps_mult32_shr_30(*p_filter_1++, (*new_samp));
  939|  32.6M|      synth_buf[resx2 + j] = ixheaac_add32_sat(synth_buf[resx2 + j],
  940|  32.6M|                                 ixheaacd_mps_mult32_shr_30(*p_filter_2++, (*new_samp)));
  941|  32.6M|      synth_buf[resx2 * 2 + j] = ixheaac_add32_sat(synth_buf[resx2 * 2 + j],
  942|  32.6M|                                     ixheaacd_mps_mult32_shr_30(*p_filter_3++, (*new_samp)));
  943|  32.6M|      synth_buf[resx2 * 3 + j] = ixheaac_add32_sat(synth_buf[resx2 * 3 + j],
  944|  32.6M|                                     ixheaacd_mps_mult32_shr_30(*p_filter_4++, (*new_samp)));
  945|  32.6M|      synth_buf[resx2 * 4 + j] = ixheaac_add32_sat(synth_buf[resx2 * 4 + j],
  946|  32.6M|                                     ixheaacd_mps_mult32_shr_30(*p_filter_5++, (*new_samp)));
  947|       |
  948|  32.6M|      new_samp--;
  949|  32.6M|    }
  950|       |
  951|  1.02M|    synth_buf[resx2 - 1] = ixheaac_add32_sat(synth_buf[resx2 - 1],
  952|  1.02M|                               ixheaacd_mps_mult32_shr_30(*p_filter_1++, *p_sr));
  953|  1.02M|    synth_buf[resx2 * 2 - 1] = ixheaac_add32_sat(synth_buf[resx2 * 2 - 1],
  954|  1.02M|                                   ixheaacd_mps_mult32_shr_30(*p_filter_2++, *p_sr));
  955|  1.02M|    synth_buf[3 * resx2 - 1] = ixheaac_add32_sat(synth_buf[3 * resx2 - 1],
  956|  1.02M|                                   ixheaacd_mps_mult32_shr_30(*p_filter_3++, *p_sr));
  957|  1.02M|    synth_buf[4 * resx2 - 1] = ixheaac_add32_sat(synth_buf[4 * resx2 - 1],
  958|  1.02M|                                   ixheaacd_mps_mult32_shr_30(*p_filter_4++, *p_sr));
  959|  1.02M|    *time_sig++ = ixheaac_add32_sat(synth_buf[5 * resx2 - 1],
  960|  1.02M|                      ixheaacd_mps_mult32_shr_30(*p_filter_5++, *p_sr));
  961|       |
  962|  1.02M|    p_filter_1 -= 2;
  963|  1.02M|    p_filter_2 -= 2;
  964|  1.02M|    p_filter_3 -= 2;
  965|  1.02M|    p_filter_4 -= 2;
  966|  1.02M|    p_filter_5 -= 2;
  967|       |
  968|  1.02M|    new_samp = p_sr + resolution - 1;
  969|       |
  970|  32.6M|    for (j = 0; j < resolution - 1; j++) {
  ------------------
  |  Branch (970:17): [True: 31.6M, False: 1.02M]
  ------------------
  971|  31.6M|      synth_buf[resolution + j] = ixheaac_add32_sat(synth_buf[resolution + j],
  972|  31.6M|                                      ixheaacd_mps_mult32_shr_30(*--p_filter_5, (*new_samp)));
  973|  31.6M|      synth_buf[resolution * (3) + j] =
  974|  31.6M|          ixheaac_add32_sat(synth_buf[resolution * (3) + j],
  975|  31.6M|              ixheaacd_mps_mult32_shr_30(*--p_filter_4, (*new_samp)));
  976|  31.6M|      synth_buf[resolution * (5) + j] =
  977|  31.6M|          ixheaac_add32_sat(synth_buf[resolution * (5) + j],
  978|  31.6M|              ixheaacd_mps_mult32_shr_30(*--p_filter_3, (*new_samp)));
  979|  31.6M|      synth_buf[resolution * (7) + j] =
  980|  31.6M|          ixheaac_add32_sat(synth_buf[resolution * (7) + j],
  981|  31.6M|              ixheaacd_mps_mult32_shr_30(*--p_filter_2, (*new_samp)));
  982|  31.6M|      synth_buf[resolution * (9) + j] =
  983|  31.6M|          ixheaac_add32_sat(synth_buf[resolution * (9) + j],
  984|  31.6M|              ixheaacd_mps_mult32_shr_30(*--p_filter_1, (*new_samp)));
  985|  31.6M|      new_samp--;
  986|  31.6M|    }
  987|       |
  988|  1.02M|    buf_ptr = synth_buf + 9 * resolution + resolution - 2;
  989|  32.6M|    for (j = 0; j < resolution - 1; j++) {
  ------------------
  |  Branch (989:17): [True: 31.6M, False: 1.02M]
  ------------------
  990|  31.6M|      *time_sig++ = *buf_ptr--;
  991|  31.6M|    }
  992|       |
  993|  1.02M|    memmove((synth_buf + resolution), synth_buf, (9 * resolution) * sizeof(WORD32));
  994|       |
  995|  1.02M|    p_sr += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  1.02M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  1.02M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  996|  1.02M|    p_si += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  1.02M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  1.02M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  997|  1.02M|  }
  998|  41.6k|}
ixheaacd_syn_filt_bank_init:
 1001|  3.23k|ixheaacd_syn_filt_bank_init(ia_mps_dec_synthesis_interface_handle self, WORD32 resolution) {
 1002|  3.23k|  switch (resolution) {
 1003|  2.45k|    case QMF_BANDS_32:
  ------------------
  |  |   25|  2.45k|#define QMF_BANDS_32 (32)
  ------------------
  |  Branch (1003:5): [True: 2.45k, False: 787]
  ------------------
 1004|  2.45k|      self->syn_filter_bank = ixheaacd_calculate_syn_filt_bank;
 1005|  2.45k|      break;
 1006|    787|    case QMF_BANDS_64:
  ------------------
  |  |   26|    787|#define QMF_BANDS_64 (64)
  ------------------
  |  Branch (1006:5): [True: 787, False: 2.45k]
  ------------------
 1007|    787|      self->syn_filter_bank = ixheaacd_calculate_syn_filt_bank_res64;
 1008|    787|      break;
 1009|      0|    case QMF_BANDS_128:
  ------------------
  |  |   27|      0|#define QMF_BANDS_128 (128)
  ------------------
  |  Branch (1009:5): [True: 0, False: 3.23k]
  ------------------
 1010|      0|      self->syn_filter_bank = ixheaacd_calculate_syn_filt_bank;
 1011|      0|      break;
 1012|      0|    default:
  ------------------
  |  Branch (1012:5): [True: 0, False: 3.23k]
  ------------------
 1013|      0|      return IA_XHEAAC_MPS_DEC_INIT_NONFATAL_INVALID_QMF_BAND;
  ------------------
  |  |   77|      0|#define IA_XHEAAC_MPS_DEC_INIT_NONFATAL_INVALID_QMF_BAND 0x00001001
  ------------------
 1014|      0|      break;
 1015|  3.23k|  }
 1016|  3.23k|  return IA_NO_ERROR;
  ------------------
  |  |   23|  3.23k|#define IA_NO_ERROR 0x00000000
  ------------------
 1017|  3.23k|}
ixheaacd_calc_ana_filt_bank:
 1032|  66.0k|                                 WORD32 *r_analysis, WORD32 *i_analysis, WORD32 channel) {
 1033|  66.0k|  ia_mps_dec_qmf_ana_filter_bank *qmf_bank = &pstr_mps_state->qmf_bank[channel];
 1034|  66.0k|  ia_mps_dec_qmf_tables_struct *qmf_table_ptr =
 1035|  66.0k|      pstr_mps_state->ia_mps_dec_mps_table.qmf_table_ptr;
 1036|  66.0k|  WORD32 i, k, m;
 1037|       |
 1038|  66.0k|  WORD32 *syn_buffer = pstr_mps_state->mps_scratch_mem_v;
 1039|  66.0k|  WORD64 accu1 = 0, accu2 = 0;
 1040|  66.0k|  WORD16 flag;
 1041|  66.0k|  WORD32 *fp1;
 1042|  66.0k|  WORD32 *fp2;
 1043|  66.0k|  WORD32 *temp;
 1044|  66.0k|  const WORD32 *start_co_eff_ptr_l;
 1045|  66.0k|  const WORD32 *start_co_eff_ptr_r;
 1046|  66.0k|  const WORD32 *ptr_pf_l, *ptr_pf_r;
 1047|  66.0k|  WORD32 *qmf_states_curr_pos;
 1048|  66.0k|  WORD32 offset = 0;
 1049|  66.0k|  WORD32 n_channels = pstr_mps_state->num_input_channels;
 1050|  66.0k|  WORD32 nr_samples = pstr_mps_state->time_slots;
 1051|  66.0k|  WORD32 qmf_bands = pstr_mps_state->qmf_bands;
 1052|  66.0k|  WORD32 shift = pstr_mps_state->bits_per_sample - 16;
 1053|  66.0k|  WORD32 gain = pstr_mps_state->clip_protect_gain;
 1054|       |
 1055|  66.0k|  WORD32 *p_ana_real = r_analysis;
 1056|  66.0k|  WORD32 *p_ana_imag = i_analysis;
 1057|       |
 1058|  66.0k|  WORD32 *p_ana_re, *p_ana_im;
 1059|       |
 1060|  66.0k|  flag = qmf_bank->flag;
 1061|  66.0k|  if (!flag) {
  ------------------
  |  Branch (1061:7): [True: 66.0k, False: 0]
  ------------------
 1062|  66.0k|    fp1 = qmf_bank->qmf_states_buffer;
 1063|  66.0k|    fp2 = qmf_bank->qmf_states_buffer + qmf_bands;
 1064|  66.0k|  } else {
 1065|      0|    fp2 = qmf_bank->qmf_states_buffer;
 1066|      0|    fp1 = qmf_bank->qmf_states_buffer + qmf_bands;
 1067|      0|  }
 1068|       |
 1069|  66.0k|  qmf_bank->qmf_states_curr_pos =
 1070|  66.0k|      ((WORD32 *)(qmf_bank->qmf_states_buffer) + (qmf_bank->offset * qmf_bands));
 1071|       |
 1072|  66.0k|  offset = qmf_bank->offset;
 1073|  66.0k|  start_co_eff_ptr_l = qmf_bank->ref_co_eff_ptr_l + qmf_bank->offset_l;
 1074|  66.0k|  start_co_eff_ptr_r = qmf_bank->ref_co_eff_ptr_r - qmf_bank->offset_r;
 1075|       |
 1076|  1.93M|  for (i = 0; i < nr_samples; i++) {
  ------------------
  |  Branch (1076:15): [True: 1.86M, False: 66.0k]
  ------------------
 1077|  1.86M|    const WORD16 *pcoz = qmf_table_ptr->ia_qmf_anl_addt_cos,
 1078|  1.86M|                 *psin = qmf_table_ptr->ia_qmf_anl_addt_sin;
 1079|  1.86M|    qmf_states_curr_pos = qmf_bank->qmf_states_curr_pos;
 1080|       |
 1081|  1.86M|    p_ana_re = p_ana_real;
 1082|  1.86M|    p_ana_im = p_ana_imag;
 1083|       |
 1084|  1.86M|    temp = fp1;
 1085|  1.86M|    fp1 = fp2;
 1086|  1.86M|    fp2 = temp;
 1087|       |
 1088|  1.86M|    if (flag) {
  ------------------
  |  Branch (1088:9): [True: 932k, False: 932k]
  ------------------
 1089|   932k|      start_co_eff_ptr_l--;
 1090|       |
 1091|   932k|      if (start_co_eff_ptr_l == qmf_bank->ref_co_eff_ptr_l) start_co_eff_ptr_l += 5;
  ------------------
  |  Branch (1091:11): [True: 182k, False: 750k]
  ------------------
 1092|   932k|    } else {
 1093|   932k|      start_co_eff_ptr_r++;
 1094|   932k|      if (start_co_eff_ptr_r == qmf_bank->ref_co_eff_ptr_r) start_co_eff_ptr_r -= 5;
  ------------------
  |  Branch (1094:11): [True: 182k, False: 750k]
  ------------------
 1095|   932k|    }
 1096|       |
 1097|  1.86M|    flag++;
 1098|  1.86M|    if ((flag & ONE_BIT_MASK) == 0) flag = 0;
  ------------------
  |  |  204|  1.86M|#define ONE_BIT_MASK (0x00000001)
  ------------------
  |  Branch (1098:9): [True: 932k, False: 932k]
  ------------------
 1099|       |
 1100|  1.86M|    if (shift == 0) {
  ------------------
  |  Branch (1100:9): [True: 1.86M, False: 0]
  ------------------
 1101|   103M|      for (k = 0; k < qmf_bands; k++) {
  ------------------
  |  Branch (1101:19): [True: 101M, False: 1.86M]
  ------------------
 1102|   101M|        qmf_states_curr_pos[k] = ixheaacd_mps_mult32_shr_15(
 1103|   101M|            (WORD32)time_in[n_channels * (i * qmf_bands + k) + channel], gain);
 1104|   101M|      }
 1105|  1.86M|    } else {
 1106|      0|      for (k = 0; k < qmf_bands; k++) {
  ------------------
  |  Branch (1106:19): [True: 0, False: 0]
  ------------------
 1107|      0|        WORD32 temp;
 1108|      0|        temp = ixheaacd_mps_mult32_shr_15(
 1109|      0|            (WORD32)time_in[n_channels * (i * qmf_bands + k) + channel], gain);
 1110|       |
 1111|      0|        qmf_states_curr_pos[k] = temp >> shift;
 1112|      0|      }
 1113|      0|    }
 1114|       |
 1115|  1.86M|    ptr_pf_l = start_co_eff_ptr_l;
 1116|  1.86M|    ptr_pf_r = start_co_eff_ptr_r;
 1117|       |
 1118|   103M|    for (k = 0; k < qmf_bands; k++) {
  ------------------
  |  Branch (1118:17): [True: 101M, False: 1.86M]
  ------------------
 1119|   101M|      {
 1120|   101M|        accu1 = (WORD64)((WORD64)ptr_pf_l[0] * (WORD64)fp1[k]);
 1121|   101M|        accu1 += (WORD64)((WORD64)ptr_pf_l[1] * (WORD64)fp1[128 + k]);
 1122|   101M|        accu1 += (WORD64)((WORD64)ptr_pf_l[2] * (WORD64)fp1[256 + k]);
 1123|   101M|        accu1 += (WORD64)((WORD64)ptr_pf_l[3] * (WORD64)fp1[384 + k]);
 1124|   101M|        accu1 += (WORD64)((WORD64)ptr_pf_l[4] * (WORD64)fp1[512 + k]);
 1125|       |
 1126|   101M|        accu2 = (WORD64)((WORD64)ptr_pf_r[-1] * (WORD64)fp2[k]);
 1127|   101M|        accu2 += (WORD64)((WORD64)ptr_pf_r[-2] * (WORD64)fp2[128 + k]);
 1128|   101M|        accu2 += (WORD64)((WORD64)ptr_pf_r[-3] * (WORD64)fp2[256 + k]);
 1129|   101M|        accu2 += (WORD64)((WORD64)ptr_pf_r[-4] * (WORD64)fp2[384 + k]);
 1130|   101M|        accu2 += (WORD64)((WORD64)ptr_pf_r[-5] * (WORD64)fp2[512 + k]);
 1131|   101M|      }
 1132|   101M|      syn_buffer[(qmf_bands << 1) - 1 - k] = (WORD32)((WORD64)accu1 >> 21);
 1133|   101M|      syn_buffer[qmf_bands - 1 - k] = (WORD32)((WORD64)accu2 >> 21);
 1134|   101M|      ptr_pf_l += 10;
 1135|   101M|      ptr_pf_r -= 10;
 1136|   101M|    }
 1137|       |
 1138|  1.86M|    ia_mps_enc_fwd_mod(syn_buffer, p_ana_re, p_ana_im, qmf_table_ptr);
 1139|       |
 1140|  52.6M|    for (m = 0; m < (qmf_bands >> 1); m++) {
  ------------------
  |  Branch (1140:17): [True: 50.7M, False: 1.86M]
  ------------------
 1141|  50.7M|      WORD32 a_cos, b_cos, a_sin, b_sin;
 1142|  50.7M|      WORD32 a_cos1, b_cos1, a_sin1, b_sin1;
 1143|       |
 1144|  50.7M|      WORD16 coz = *pcoz++, sin = *psin++;
 1145|       |
 1146|  50.7M|      a_cos = ixheaac_mult32x16in32(p_ana_re[m], coz);
 1147|  50.7M|      b_sin = ixheaac_mult32x16in32(p_ana_im[m], sin);
 1148|  50.7M|      b_cos = ixheaac_mult32x16in32(p_ana_im[m], coz);
 1149|  50.7M|      a_sin = ixheaac_mult32x16in32(p_ana_re[m], sin);
 1150|       |
 1151|  50.7M|      p_ana_re[m] = ((a_cos + b_sin) << 1);
 1152|  50.7M|      p_ana_im[m] = ((b_cos - a_sin) << 1);
 1153|       |
 1154|  50.7M|      a_cos1 = ixheaac_mult32x16in32(p_ana_re[qmf_bands - 1 - m], coz);
 1155|  50.7M|      b_sin1 = ixheaac_mult32x16in32(p_ana_im[qmf_bands - 1 - m], sin);
 1156|       |
 1157|  50.7M|      a_sin1 = ixheaac_mult32x16in32(p_ana_re[qmf_bands - 1 - m], sin);
 1158|  50.7M|      p_ana_re[qmf_bands - 1 - m] = ((-a_cos1 + b_sin1) << 1);
 1159|  50.7M|      b_cos1 = ixheaac_mult32x16in32(p_ana_im[qmf_bands - 1 - m], coz);
 1160|       |
 1161|  50.7M|      p_ana_im[qmf_bands - 1 - m] = ((-b_cos1 - a_sin1) << 1);
 1162|  50.7M|    }
 1163|       |
 1164|  1.86M|    qmf_bank->qmf_states_curr_pos = qmf_bank->qmf_states_curr_pos + qmf_bands;
 1165|  1.86M|    offset++;
 1166|  1.86M|    if (offset == 10) {
  ------------------
  |  Branch (1166:9): [True: 182k, False: 1.68M]
  ------------------
 1167|   182k|      offset = 0;
 1168|   182k|      qmf_bank->qmf_states_curr_pos = qmf_bank->qmf_states_buffer;
 1169|   182k|    }
 1170|       |
 1171|  1.86M|    p_ana_real += MAX_NUM_QMF_BANDS;
  ------------------
  |  |   62|  1.86M|#define MAX_NUM_QMF_BANDS (64)
  ------------------
 1172|  1.86M|    p_ana_imag += MAX_NUM_QMF_BANDS;
  ------------------
  |  |   62|  1.86M|#define MAX_NUM_QMF_BANDS (64)
  ------------------
 1173|  1.86M|  }
 1174|       |
 1175|  66.0k|  qmf_bank->offset_l = (WORD32)(start_co_eff_ptr_l - qmf_bank->ref_co_eff_ptr_l);
 1176|  66.0k|  qmf_bank->offset_r = (WORD32)(qmf_bank->ref_co_eff_ptr_r - start_co_eff_ptr_r);
 1177|       |
 1178|  66.0k|  qmf_bank->flag = flag;
 1179|  66.0k|  qmf_bank->offset = offset;
 1180|  66.0k|}
ixheaacd_mps_polyphase.c:ixheaacd_inverse_modulation:
  699|  2.77M|                                        ia_mps_dec_qmf_tables_struct *qmf_table_ptr) {
  700|  2.77M|  WORD32 i;
  701|       |
  702|  2.77M|  const WORD16 *ptr1, *ptr2, *ptr3, *ptr4;
  703|  2.77M|  const WORD16 *fft = qmf_table_ptr->fft_c;
  704|  2.77M|  WORD16 wre, wim;
  705|  2.77M|  WORD32 re1, im1, re2, im2;
  706|  2.77M|  WORD32 re12, im12, re22, im22;
  707|  2.77M|  WORD32 temp_1;
  708|       |
  709|  2.77M|  ptr1 = qmf_table_ptr->sbr_sin_twiddle;
  710|  2.77M|  ptr2 = qmf_table_ptr->sbr_cos_twiddle;
  711|  2.77M|  ptr3 = ptr1 + 31;
  712|  2.77M|  ptr4 = ptr2 + 31;
  713|       |
  714|  47.1M|  for (i = 0; i < 16; i++) {
  ------------------
  |  Branch (714:15): [True: 44.4M, False: 2.77M]
  ------------------
  715|  44.4M|    temp_1 = (i << 1);
  716|       |
  717|  44.4M|    re1 = qmf_real[temp_1];
  718|  44.4M|    im1 = qmf_real[63 - temp_1];
  719|       |
  720|  44.4M|    wim = *ptr1++;
  721|  44.4M|    wre = *ptr2++;
  722|       |
  723|  44.4M|    qmf_real[temp_1] = ixheaac_add32_sat(
  724|  44.4M|        ixheaac_mult32x16in32_shl(im1, wim), ixheaac_mult32x16in32_shl(re1, wre));
  725|       |
  726|  44.4M|    re12 = qmf_imag[temp_1];
  727|  44.4M|    im12 = qmf_imag[63 - temp_1];
  728|       |
  729|  44.4M|    qmf_imag[temp_1] = ixheaac_sub32_sat(
  730|  44.4M|        ixheaac_mult32x16in32_shl(im12, wim), ixheaac_mult32x16in32_shl(re12, wre));
  731|       |
  732|  44.4M|    im2 = qmf_real[temp_1 + 1];
  733|       |
  734|  44.4M|    qmf_real[temp_1 + 1] = ixheaac_sub32_sat(
  735|  44.4M|        ixheaac_mult32x16in32_shl(im1, wre), ixheaac_mult32x16in32_shl(re1, wim));
  736|       |
  737|  44.4M|    im22 = qmf_imag[temp_1 + 1];
  738|       |
  739|  44.4M|    qmf_imag[temp_1 + 1] = ixheaac_add32_sat(
  740|  44.4M|        ixheaac_mult32x16in32_shl(im12, wre), ixheaac_mult32x16in32_shl(re12, wim));
  741|       |
  742|  44.4M|    wim = *ptr3--;
  743|  44.4M|    wre = *ptr4--;
  744|       |
  745|  44.4M|    re2 = qmf_real[62 - temp_1];
  746|       |
  747|  44.4M|    qmf_real[62 - temp_1] = ixheaac_add32_sat(
  748|  44.4M|        ixheaac_mult32x16in32_shl(im2, wim), ixheaac_mult32x16in32_shl(re2, wre));
  749|       |
  750|  44.4M|    re22 = qmf_imag[62 - temp_1];
  751|       |
  752|  44.4M|    qmf_imag[62 - temp_1] = ixheaac_sub32_sat(
  753|  44.4M|        ixheaac_mult32x16in32_shl(im22, wim), ixheaac_mult32x16in32_shl(re22, wre));
  754|       |
  755|  44.4M|    qmf_real[63 - temp_1] = ixheaac_sub32_sat(
  756|  44.4M|        ixheaac_mult32x16in32_shl(im2, wre), ixheaac_mult32x16in32_shl(re2, wim));
  757|  44.4M|    qmf_imag[63 - temp_1] = ixheaac_add32_sat(
  758|  44.4M|        ixheaac_mult32x16in32_shl(im22, wre), ixheaac_mult32x16in32_shl(re22, wim));
  759|  44.4M|  }
  760|       |
  761|  2.77M|  ixheaacd_fft32(qmf_real, fft);
  762|  2.77M|  ixheaacd_fft32(qmf_imag, fft);
  763|       |
  764|  2.77M|  ptr1 = qmf_table_ptr->sbr_alt_sin_twiddle;
  765|  2.77M|  ptr2 = ptr1 + 32;
  766|       |
  767|  2.77M|  wim = *ptr1++;
  768|  2.77M|  wre = *ptr2--;
  769|  47.1M|  for (i = 0; i < 16; i++) {
  ------------------
  |  Branch (769:15): [True: 44.4M, False: 2.77M]
  ------------------
  770|  44.4M|    temp_1 = (i << 1);
  771|  44.4M|    re1 = qmf_real[temp_1];
  772|  44.4M|    im1 = qmf_real[temp_1 + 1];
  773|  44.4M|    re12 = qmf_imag[temp_1];
  774|  44.4M|    im12 = qmf_imag[temp_1 + 1];
  775|       |
  776|  44.4M|    qmf_real[temp_1] = ixheaac_sub32_sat(ixheaac_mult32x16in32_shl(ixheaac_sub32_sat(
  777|  44.4M|        im12, re1), wre), ixheaac_mult32x16in32_shl(ixheaac_add32_sat(im1, re12), wim));
  778|  44.4M|    qmf_imag[temp_1] = ixheaac_add32_sat(ixheaac_mult32x16in32_shl((ixheaac_add32_sat(
  779|  44.4M|        im12, re1)), wre), ixheaac_mult32x16in32_shl(ixheaac_sub32_sat(im1, re12), wim));
  780|       |
  781|  44.4M|    im2 = qmf_real[63 - temp_1];
  782|  44.4M|    im22 = qmf_imag[63 - temp_1];
  783|       |
  784|  44.4M|    qmf_real[63 - temp_1] = ixheaac_sub32_sat(ixheaac_mult32x16in32_shl(ixheaac_sub32_sat(
  785|  44.4M|        im1, re12), wre), ixheaac_mult32x16in32_shl(ixheaac_add32_sat(im12, re1), wim));
  786|  44.4M|    qmf_imag[63 - temp_1] = ixheaac_sub32_sat(ixheaac_mult32x16in32_shl(ixheaac_sub32_sat(
  787|  44.4M|        re1, im12), wim), ixheaac_mult32x16in32_shl(ixheaac_add32_sat(im1, re12), wre));
  788|       |
  789|  44.4M|    wim = *ptr1++;
  790|  44.4M|    wre = *ptr2--;
  791|  44.4M|    re2 = qmf_real[62 - temp_1];
  792|  44.4M|    re22 = qmf_imag[62 - temp_1];
  793|       |
  794|  44.4M|    qmf_real[temp_1 + 1] = ixheaac_sub32_sat(ixheaac_mult32x16in32_shl(ixheaac_sub32_sat(
  795|  44.4M|        im2, re22), wim), ixheaac_mult32x16in32_shl(ixheaac_add32_sat(im22, re2), wre));
  796|  44.4M|    qmf_imag[temp_1 + 1] = ixheaac_sub32_sat(ixheaac_mult32x16in32_shl(ixheaac_sub32_sat(
  797|  44.4M|        re2, im22), wre), ixheaac_mult32x16in32_shl(ixheaac_add32_sat(im2, re22), wim));
  798|       |
  799|  44.4M|    qmf_real[62 - temp_1] = ixheaac_sub32_sat(ixheaac_mult32x16in32_shl(ixheaac_sub32_sat(
  800|  44.4M|        im22, re2), wim), ixheaac_mult32x16in32_shl(ixheaac_add32_sat(im2, re22), wre));
  801|  44.4M|    qmf_imag[62 - temp_1] = ixheaac_add32_sat(ixheaac_mult32x16in32_shl(ixheaac_add32_sat(
  802|  44.4M|        re2, im22), wim), ixheaac_mult32x16in32_shl(ixheaac_sub32_sat(im2, re22), wre));
  803|  44.4M|  }
  804|  2.77M|}
ixheaacd_mps_polyphase.c:ixheaacd_fft32:
   46|  9.28M|static VOID ixheaacd_fft32(WORD32 *vec, const WORD16 *fft_c) {
   47|  9.28M|  WORD32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7, tmp8, tmp9, tmp10, tmp11, tmp12, tmp13,
   48|  9.28M|      tmp14, tmp15;
   49|  9.28M|  WORD32 temp10, temp11, temp12, temp13, temp14, temp15, temp16, temp17, temp18, temp19, temp110,
   50|  9.28M|      temp111, temp112, temp113, temp114, temp115;
   51|  9.28M|  WORD32 temp20, temp21, temp22, temp23, temp24, temp25, temp26, temp27, temp28, temp29, temp210,
   52|  9.28M|      temp211, temp212, temp213, temp214, temp215;
   53|  9.28M|  WORD32 temp30, temp31, temp32, temp33, temp34, temp35, temp36, temp37, temp38, temp39, temp310,
   54|  9.28M|      temp311, temp312, temp313, temp314, temp315;
   55|  9.28M|  WORD32 temp316, temp317, temp318, temp319, temp320, temp321, temp322, temp323, temp324, temp325,
   56|  9.28M|      temp326, temp327, temp328, temp329, temp330, temp331;
   57|  9.28M|  WORD32 temp40, temp41, temp42, temp43, temp44, temp45, temp46, temp47, temp48, temp49, temp410,
   58|  9.28M|      temp411, temp412, temp413, temp414, temp415;
   59|       |
   60|  9.28M|  temp20 = ixheaac_sub32_sat(vec[2], vec[34]);
   61|  9.28M|  temp21 = ixheaac_sub32_sat(vec[3], vec[35]);
   62|  9.28M|  temp30 = ixheaac_add32_sat(vec[0], vec[32]);
   63|  9.28M|  temp31 = ixheaac_add32_sat(vec[1], vec[33]);
   64|  9.28M|  temp32 = ixheaac_add32_sat(vec[2], vec[34]);
   65|  9.28M|  temp33 = ixheaac_add32_sat(vec[3], vec[35]);
   66|       |
   67|  9.28M|  temp22 = ixheaac_sub32_sat(vec[6], vec[38]);
   68|  9.28M|  temp23 = ixheaac_sub32_sat(vec[7], vec[39]);
   69|  9.28M|  temp34 = ixheaac_add32_sat(vec[4], vec[36]);
   70|  9.28M|  temp35 = ixheaac_add32_sat(vec[5], vec[37]);
   71|  9.28M|  temp36 = ixheaac_add32_sat(vec[6], vec[38]);
   72|  9.28M|  temp37 = ixheaac_add32_sat(vec[7], vec[39]);
   73|       |
   74|  9.28M|  temp24 = ixheaac_sub32_sat(vec[10], vec[42]);
   75|  9.28M|  temp25 = ixheaac_sub32_sat(vec[11], vec[43]);
   76|  9.28M|  temp38 = ixheaac_add32_sat(vec[8], vec[40]);
   77|  9.28M|  temp39 = ixheaac_add32_sat(vec[9], vec[41]);
   78|  9.28M|  temp310 = ixheaac_add32_sat(vec[10], vec[42]);
   79|  9.28M|  temp311 = ixheaac_add32_sat(vec[11], vec[43]);
   80|       |
   81|  9.28M|  temp26 = ixheaac_sub32_sat(vec[14], vec[46]);
   82|  9.28M|  temp27 = ixheaac_sub32_sat(vec[15], vec[47]);
   83|  9.28M|  temp312 = ixheaac_add32_sat(vec[12], vec[44]);
   84|  9.28M|  temp313 = ixheaac_add32_sat(vec[13], vec[45]);
   85|  9.28M|  temp314 = ixheaac_add32_sat(vec[14], vec[46]);
   86|  9.28M|  temp315 = ixheaac_add32_sat(vec[15], vec[47]);
   87|       |
   88|  9.28M|  temp28 = ixheaac_sub32_sat(vec[18], vec[50]);
   89|  9.28M|  temp29 = ixheaac_sub32_sat(vec[19], vec[51]);
   90|  9.28M|  temp316 = ixheaac_add32_sat(vec[16], vec[48]);
   91|  9.28M|  temp317 = ixheaac_add32_sat(vec[17], vec[49]);
   92|  9.28M|  temp318 = ixheaac_add32_sat(vec[18], vec[50]);
   93|  9.28M|  temp319 = ixheaac_add32_sat(vec[19], vec[51]);
   94|       |
   95|  9.28M|  temp210 = ixheaac_sub32_sat(vec[22], vec[54]);
   96|  9.28M|  temp211 = ixheaac_sub32_sat(vec[23], vec[55]);
   97|  9.28M|  temp320 = ixheaac_add32_sat(vec[20], vec[52]);
   98|  9.28M|  temp321 = ixheaac_add32_sat(vec[21], vec[53]);
   99|  9.28M|  temp322 = ixheaac_add32_sat(vec[22], vec[54]);
  100|  9.28M|  temp323 = ixheaac_add32_sat(vec[23], vec[55]);
  101|       |
  102|  9.28M|  temp212 = ixheaac_sub32_sat(vec[26], vec[58]);
  103|  9.28M|  temp213 = ixheaac_sub32_sat(vec[27], vec[59]);
  104|  9.28M|  temp324 = ixheaac_add32_sat(vec[24], vec[56]);
  105|  9.28M|  temp325 = ixheaac_add32_sat(vec[25], vec[57]);
  106|  9.28M|  temp326 = ixheaac_add32_sat(vec[26], vec[58]);
  107|  9.28M|  temp327 = ixheaac_add32_sat(vec[27], vec[59]);
  108|       |
  109|  9.28M|  temp214 = ixheaac_sub32_sat(vec[30], vec[62]);
  110|  9.28M|  temp215 = ixheaac_sub32_sat(vec[31], vec[63]);
  111|  9.28M|  temp328 = ixheaac_add32_sat(vec[28], vec[60]);
  112|  9.28M|  temp329 = ixheaac_add32_sat(vec[29], vec[61]);
  113|  9.28M|  temp330 = ixheaac_add32_sat(vec[30], vec[62]);
  114|  9.28M|  temp331 = ixheaac_add32_sat(vec[31], vec[63]);
  115|       |
  116|  9.28M|  temp41 = ixheaac_negate32_sat(ixheaac_add32_sat(temp20, temp214));
  117|  9.28M|  temp42 = ixheaac_sub32_sat(temp20, temp214);
  118|  9.28M|  temp40 = ixheaac_add32_sat(temp21, temp215);
  119|  9.28M|  temp43 = ixheaac_sub32_sat(temp21, temp215);
  120|  9.28M|  temp45 = ixheaac_negate32_sat(ixheaac_add32_sat(temp22, temp212));
  121|  9.28M|  temp46 = ixheaac_sub32_sat(temp22, temp212);
  122|  9.28M|  temp44 = ixheaac_add32_sat(temp23, temp213);
  123|  9.28M|  temp47 = ixheaac_sub32_sat(temp23, temp213);
  124|  9.28M|  temp49 = ixheaac_negate32_sat(ixheaac_add32_sat(temp24, temp210));
  125|  9.28M|  temp410 = ixheaac_sub32_sat(temp24, temp210);
  126|  9.28M|  temp48 = ixheaac_add32_sat(temp25, temp211);
  127|  9.28M|  temp411 = ixheaac_sub32_sat(temp25, temp211);
  128|  9.28M|  temp413 = ixheaac_negate32_sat(ixheaac_add32_sat(temp26, temp28));
  129|  9.28M|  temp414 = ixheaac_sub32_sat(temp26, temp28);
  130|  9.28M|  temp412 = ixheaac_add32_sat(temp27, temp29);
  131|  9.28M|  temp415 = ixheaac_sub32_sat(temp27, temp29);
  132|       |
  133|  9.28M|  temp20 = ixheaac_add32_sat(ixheaac_add32_sat(ixheaac_add32_sat(
  134|  9.28M|           ixheaac_mult32x16in32_shl(temp40, fft_c[3]),
  135|  9.28M|           ixheaac_mult32x16in32_shl(temp44, fft_c[2])),
  136|  9.28M|           ixheaac_mult32x16in32_shl(temp48, fft_c[1])),
  137|  9.28M|           ixheaac_mult32x16in32_shl(temp412, fft_c[0]));
  138|       |
  139|  9.28M|  temp24 = ixheaac_sub32_sat(ixheaac_add32_sat(ixheaac_add32_sat(
  140|  9.28M|           ixheaac_mult32x16in32_shl(temp40, fft_c[2]),
  141|  9.28M|           ixheaac_mult32x16in32_shl(temp44, fft_c[0])),
  142|  9.28M|           ixheaac_mult32x16in32_shl(temp48, fft_c[3])),
  143|  9.28M|           ixheaac_mult32x16in32_shl(temp412, fft_c[1]));
  144|       |
  145|  9.28M|  temp28 = ixheaac_add32_sat(ixheaac_sub32_sat(ixheaac_add32_sat(
  146|  9.28M|           ixheaac_mult32x16in32_shl(temp40, fft_c[1]),
  147|  9.28M|           ixheaac_mult32x16in32_shl(temp44, fft_c[3])),
  148|  9.28M|           ixheaac_mult32x16in32_shl(temp48, fft_c[0])),
  149|  9.28M|           ixheaac_mult32x16in32_shl(temp412, fft_c[2]));
  150|       |
  151|  9.28M|  temp212 = ixheaac_sub32_sat(ixheaac_add32_sat(ixheaac_sub32_sat(
  152|  9.28M|            ixheaac_mult32x16in32_shl(temp40, fft_c[0]),
  153|  9.28M|            ixheaac_mult32x16in32_shl(temp44, fft_c[1])),
  154|  9.28M|            ixheaac_mult32x16in32_shl(temp48, fft_c[2])),
  155|  9.28M|            ixheaac_mult32x16in32_shl(temp412, fft_c[3]));
  156|       |
  157|  9.28M|  temp21 = ixheaac_add32_sat(ixheaac_add32_sat(ixheaac_add32_sat(
  158|  9.28M|           ixheaac_mult32x16in32_shl(temp41, fft_c[3]),
  159|  9.28M|           ixheaac_mult32x16in32_shl(temp45, fft_c[2])),
  160|  9.28M|           ixheaac_mult32x16in32_shl(temp49, fft_c[1])),
  161|  9.28M|           ixheaac_mult32x16in32_shl(temp413, fft_c[0]));
  162|       |
  163|  9.28M|  temp25 = ixheaac_sub32_sat(ixheaac_add32_sat(ixheaac_add32_sat(
  164|  9.28M|           ixheaac_mult32x16in32_shl(temp41, fft_c[2]),
  165|  9.28M|           ixheaac_mult32x16in32_shl(temp45, fft_c[0])),
  166|  9.28M|           ixheaac_mult32x16in32_shl(temp49, fft_c[3])),
  167|  9.28M|           ixheaac_mult32x16in32_shl(temp413, fft_c[1]));
  168|       |
  169|  9.28M|  temp29 = ixheaac_add32_sat(ixheaac_sub32_sat(ixheaac_add32_sat(
  170|  9.28M|           ixheaac_mult32x16in32_shl(temp41, fft_c[1]),
  171|  9.28M|           ixheaac_mult32x16in32_shl(temp45, fft_c[3])),
  172|  9.28M|           ixheaac_mult32x16in32_shl(temp49, fft_c[0])),
  173|  9.28M|           ixheaac_mult32x16in32_shl(temp413, fft_c[2]));
  174|       |
  175|  9.28M|  temp213 = ixheaac_sub32_sat(ixheaac_add32_sat(ixheaac_sub32_sat(
  176|  9.28M|            ixheaac_mult32x16in32_shl(temp41, fft_c[0]),
  177|  9.28M|            ixheaac_mult32x16in32_shl(temp45, fft_c[1])),
  178|  9.28M|            ixheaac_mult32x16in32_shl(temp49, fft_c[2])),
  179|  9.28M|            ixheaac_mult32x16in32_shl(temp413, fft_c[3]));
  180|       |
  181|  9.28M|  temp22 = ixheaac_add32_sat(ixheaac_add32_sat(ixheaac_add32_sat(
  182|  9.28M|           ixheaac_mult32x16in32_shl(temp42, fft_c[0]),
  183|  9.28M|           ixheaac_mult32x16in32_shl(temp46, fft_c[1])),
  184|  9.28M|           ixheaac_mult32x16in32_shl(temp410, fft_c[2])),
  185|  9.28M|           ixheaac_mult32x16in32_shl(temp414, fft_c[3]));
  186|       |
  187|  9.28M|  temp26 = ixheaac_sub32_sat(ixheaac_sub32_sat(ixheaac_sub32_sat(
  188|  9.28M|           ixheaac_mult32x16in32_shl(temp42, fft_c[1]),
  189|  9.28M|           ixheaac_mult32x16in32_shl(temp46, fft_c[3])),
  190|  9.28M|           ixheaac_mult32x16in32_shl(temp410, fft_c[0])),
  191|  9.28M|           ixheaac_mult32x16in32_shl(temp414, fft_c[2]));
  192|       |
  193|  9.28M|  temp210 = ixheaac_add32_sat(ixheaac_add32_sat(ixheaac_sub32_sat(
  194|  9.28M|            ixheaac_mult32x16in32_shl(temp42, fft_c[2]),
  195|  9.28M|            ixheaac_mult32x16in32_shl(temp46, fft_c[0])),
  196|  9.28M|            ixheaac_mult32x16in32_shl(temp410, fft_c[3])),
  197|  9.28M|            ixheaac_mult32x16in32_shl(temp414, fft_c[1]));
  198|       |
  199|  9.28M|  temp214 = ixheaac_sub32_sat(ixheaac_add32_sat(ixheaac_sub32_sat(
  200|  9.28M|            ixheaac_mult32x16in32_shl(temp42, fft_c[3]),
  201|  9.28M|            ixheaac_mult32x16in32_shl(temp46, fft_c[2])),
  202|  9.28M|            ixheaac_mult32x16in32_shl(temp410, fft_c[1])),
  203|  9.28M|            ixheaac_mult32x16in32_shl(temp414, fft_c[0]));
  204|       |
  205|  9.28M|  temp23 = ixheaac_add32_sat(ixheaac_add32_sat(ixheaac_add32_sat(
  206|  9.28M|           ixheaac_mult32x16in32_shl(temp43, fft_c[0]),
  207|  9.28M|           ixheaac_mult32x16in32_shl(temp47, fft_c[1])),
  208|  9.28M|           ixheaac_mult32x16in32_shl(temp411, fft_c[2])),
  209|  9.28M|           ixheaac_mult32x16in32_shl(temp415, fft_c[3]));
  210|       |
  211|  9.28M|  temp27 = ixheaac_sub32_sat(ixheaac_sub32_sat(ixheaac_sub32_sat(
  212|  9.28M|           ixheaac_mult32x16in32_shl(temp43, fft_c[1]),
  213|  9.28M|           ixheaac_mult32x16in32_shl(temp47, fft_c[3])),
  214|  9.28M|           ixheaac_mult32x16in32_shl(temp411, fft_c[0])),
  215|  9.28M|           ixheaac_mult32x16in32_shl(temp415, fft_c[2]));
  216|       |
  217|  9.28M|  temp211 = ixheaac_add32_sat(ixheaac_add32_sat(ixheaac_sub32_sat(
  218|  9.28M|            ixheaac_mult32x16in32_shl(temp43, fft_c[2]),
  219|  9.28M|            ixheaac_mult32x16in32_shl(temp47, fft_c[0])),
  220|  9.28M|            ixheaac_mult32x16in32_shl(temp411, fft_c[3])),
  221|  9.28M|            ixheaac_mult32x16in32_shl(temp415, fft_c[1]));
  222|       |
  223|  9.28M|  temp215 = ixheaac_sub32_sat(ixheaac_add32_sat(ixheaac_sub32_sat(
  224|  9.28M|            ixheaac_mult32x16in32_shl(temp43, fft_c[3]),
  225|  9.28M|            ixheaac_mult32x16in32_shl(temp47, fft_c[2])),
  226|  9.28M|            ixheaac_mult32x16in32_shl(temp411, fft_c[1])),
  227|  9.28M|            ixheaac_mult32x16in32_shl(temp415, fft_c[0]));
  228|       |
  229|  9.28M|  temp40 = ixheaac_add32_sat(temp20, temp22);
  230|  9.28M|  temp414 = ixheaac_sub32_sat(temp20, temp22);
  231|  9.28M|  temp41 = ixheaac_add32_sat(temp21, temp23);
  232|  9.28M|  temp415 = ixheaac_sub32_sat(temp21, temp23);
  233|  9.28M|  temp42 = ixheaac_add32_sat(temp24, temp26);
  234|  9.28M|  temp412 = ixheaac_sub32_sat(temp24, temp26);
  235|  9.28M|  temp43 = ixheaac_add32_sat(temp25, temp27);
  236|  9.28M|  temp413 = ixheaac_sub32_sat(temp25, temp27);
  237|  9.28M|  temp44 = ixheaac_add32_sat(temp28, temp210);
  238|  9.28M|  temp410 = ixheaac_sub32_sat(temp28, temp210);
  239|  9.28M|  temp45 = ixheaac_add32_sat(temp29, temp211);
  240|  9.28M|  temp411 = ixheaac_sub32_sat(temp29, temp211);
  241|  9.28M|  temp46 = ixheaac_add32_sat(temp212, temp214);
  242|  9.28M|  temp48 = ixheaac_sub32_sat(temp212, temp214);
  243|  9.28M|  temp47 = ixheaac_add32_sat(temp213, temp215);
  244|  9.28M|  temp49 = ixheaac_sub32_sat(temp213, temp215);
  245|       |
  246|  9.28M|  temp10 = ixheaac_add32_sat(temp30, temp316);
  247|  9.28M|  temp11 = ixheaac_add32_sat(temp31, temp317);
  248|  9.28M|  temp12 = ixheaac_add32_sat(temp32, temp318);
  249|  9.28M|  temp13 = ixheaac_add32_sat(temp33, temp319);
  250|  9.28M|  temp14 = ixheaac_add32_sat(temp34, temp320);
  251|  9.28M|  temp15 = ixheaac_add32_sat(temp35, temp321);
  252|  9.28M|  temp16 = ixheaac_add32_sat(temp36, temp322);
  253|  9.28M|  temp17 = ixheaac_add32_sat(temp37, temp323);
  254|  9.28M|  temp18 = ixheaac_add32_sat(temp38, temp324);
  255|  9.28M|  temp19 = ixheaac_add32_sat(temp39, temp325);
  256|  9.28M|  temp110 = ixheaac_add32_sat(temp310, temp326);
  257|  9.28M|  temp111 = ixheaac_add32_sat(temp311, temp327);
  258|  9.28M|  temp112 = ixheaac_add32_sat(temp312, temp328);
  259|  9.28M|  temp113 = ixheaac_add32_sat(temp313, temp329);
  260|  9.28M|  temp114 = ixheaac_add32_sat(temp314, temp330);
  261|  9.28M|  temp115 = ixheaac_add32_sat(temp315, temp331);
  262|       |
  263|  9.28M|  tmp0 = ixheaac_add32_sat(temp10, temp18);
  264|  9.28M|  tmp2 = ixheaac_sub32_sat(temp10, temp18);
  265|  9.28M|  tmp1 = ixheaac_add32_sat(temp11, temp19);
  266|  9.28M|  tmp3 = ixheaac_sub32_sat(temp11, temp19);
  267|  9.28M|  tmp4 = ixheaac_add32_sat(temp12, temp110);
  268|  9.28M|  tmp6 = ixheaac_sub32_sat(temp12, temp110);
  269|  9.28M|  tmp5 = ixheaac_add32_sat(temp13, temp111);
  270|  9.28M|  tmp7 = ixheaac_sub32_sat(temp13, temp111);
  271|  9.28M|  tmp8 = ixheaac_add32_sat(temp14, temp112);
  272|  9.28M|  tmp10 = ixheaac_sub32_sat(temp14, temp112);
  273|  9.28M|  tmp9 = ixheaac_add32_sat(temp15, temp113);
  274|  9.28M|  tmp11 = ixheaac_sub32_sat(temp15, temp113);
  275|  9.28M|  tmp12 = ixheaac_add32_sat(temp16, temp114);
  276|  9.28M|  tmp14 = ixheaac_sub32_sat(temp16, temp114);
  277|  9.28M|  tmp13 = ixheaac_add32_sat(temp17, temp115);
  278|  9.28M|  tmp15 = ixheaac_sub32_sat(temp17, temp115);
  279|       |
  280|  9.28M|  temp20 = ixheaac_add32_sat(tmp0, tmp8);
  281|  9.28M|  temp24 = ixheaac_sub32_sat(tmp0, tmp8);
  282|  9.28M|  temp21 = ixheaac_add32_sat(tmp1, tmp9);
  283|  9.28M|  temp25 = ixheaac_sub32_sat(tmp1, tmp9);
  284|  9.28M|  temp28 = ixheaac_sub32_sat(tmp2, tmp11);
  285|  9.28M|  temp210 = ixheaac_add32_sat(tmp2, tmp11);
  286|  9.28M|  temp29 = ixheaac_add32_sat(tmp3, tmp10);
  287|  9.28M|  temp211 = ixheaac_sub32_sat(tmp3, tmp10);
  288|  9.28M|  temp22 = ixheaac_add32_sat(tmp4, tmp12);
  289|  9.28M|  temp27 = ixheaac_sub32_sat(tmp4, tmp12);
  290|  9.28M|  temp23 = ixheaac_add32_sat(tmp5, tmp13);
  291|  9.28M|  temp26 = ixheaac_sub32_sat(tmp13, tmp5);
  292|       |
  293|  9.28M|  tmp1 = ixheaac_add32_sat(tmp6, tmp14);
  294|  9.28M|  tmp2 = ixheaac_sub32_sat(tmp6, tmp14);
  295|  9.28M|  tmp0 = ixheaac_add32_sat(tmp7, tmp15);
  296|  9.28M|  tmp3 = ixheaac_sub32_sat(tmp7, tmp15);
  297|       |
  298|  9.28M|  temp212 = ixheaac_mult32x16in32_shl(ixheaac_add32_sat(tmp0, tmp2), INV_SQRT2_Q15);
  ------------------
  |  |   23|  9.28M|#define INV_SQRT2_Q15 23170
  ------------------
  299|  9.28M|  temp214 = ixheaac_mult32x16in32_shl(ixheaac_sub32_sat(tmp0, tmp2), INV_SQRT2_Q15);
  ------------------
  |  |   23|  9.28M|#define INV_SQRT2_Q15 23170
  ------------------
  300|  9.28M|  temp213 = ixheaac_mult32x16in32_shl(ixheaac_sub32_sat(tmp3, tmp1), INV_SQRT2_Q15);
  ------------------
  |  |   23|  9.28M|#define INV_SQRT2_Q15 23170
  ------------------
  301|  9.28M|  temp215 = ixheaac_mult32x16in32_shl(ixheaac_add32_sat(tmp1, tmp3), -INV_SQRT2_Q15);
  ------------------
  |  |   23|  9.28M|#define INV_SQRT2_Q15 23170
  ------------------
  302|       |
  303|  9.28M|  temp10 = ixheaac_sub32_sat(temp30, temp316);
  304|  9.28M|  temp11 = ixheaac_sub32_sat(temp31, temp317);
  305|  9.28M|  temp12 = ixheaac_sub32_sat(temp32, temp318);
  306|  9.28M|  temp13 = ixheaac_sub32_sat(temp33, temp319);
  307|  9.28M|  temp14 = ixheaac_sub32_sat(temp34, temp320);
  308|  9.28M|  temp15 = ixheaac_sub32_sat(temp35, temp321);
  309|  9.28M|  temp16 = ixheaac_sub32_sat(temp36, temp322);
  310|  9.28M|  temp17 = ixheaac_sub32_sat(temp37, temp323);
  311|  9.28M|  temp18 = ixheaac_sub32_sat(temp38, temp324);
  312|  9.28M|  temp19 = ixheaac_sub32_sat(temp39, temp325);
  313|  9.28M|  temp110 = ixheaac_sub32_sat(temp310, temp326);
  314|  9.28M|  temp111 = ixheaac_sub32_sat(temp311, temp327);
  315|  9.28M|  temp112 = ixheaac_sub32_sat(temp312, temp328);
  316|  9.28M|  temp113 = ixheaac_sub32_sat(temp313, temp329);
  317|  9.28M|  temp114 = ixheaac_sub32_sat(temp314, temp330);
  318|  9.28M|  temp115 = ixheaac_sub32_sat(temp315, temp331);
  319|       |
  320|  9.28M|  temp30 = ixheaac_add32_sat(temp20, temp22);
  321|  9.28M|  temp316 = ixheaac_sub32_sat(temp20, temp22);
  322|  9.28M|  temp31 = ixheaac_add32_sat(temp21, temp23);
  323|  9.28M|  temp317 = ixheaac_sub32_sat(temp21, temp23);
  324|  9.28M|  temp38 = ixheaac_sub32_sat(temp24, temp26);
  325|  9.28M|  temp324 = ixheaac_add32_sat(temp24, temp26);
  326|  9.28M|  temp39 = ixheaac_sub32_sat(temp25, temp27);
  327|  9.28M|  temp325 = ixheaac_add32_sat(temp25, temp27);
  328|  9.28M|  temp312 = ixheaac_add32_sat(temp28, temp214);
  329|  9.28M|  temp328 = ixheaac_sub32_sat(temp28, temp214);
  330|  9.28M|  temp313 = ixheaac_add32_sat(temp29, temp215);
  331|  9.28M|  temp329 = ixheaac_sub32_sat(temp29, temp215);
  332|  9.28M|  temp34 = ixheaac_add32_sat(temp210, temp212);
  333|  9.28M|  temp320 = ixheaac_sub32_sat(temp210, temp212);
  334|  9.28M|  temp35 = ixheaac_add32_sat(temp211, temp213);
  335|  9.28M|  temp321 = ixheaac_sub32_sat(temp211, temp213);
  336|       |
  337|  9.28M|  tmp9 = ixheaac_mult32x16in32_shl(ixheaac_add32_sat(temp12, temp114), -COS_3PI_BY_8_Q15);
  ------------------
  |  |   25|  9.28M|#define COS_3PI_BY_8_Q15 12540
  ------------------
  338|  9.28M|  tmp10 = ixheaac_mult32x16in32_shl(ixheaac_sub32_sat(temp12, temp114), COS_PI_BY_8_Q15);
  ------------------
  |  |   31|  9.28M|#define COS_PI_BY_8_Q15 30274
  ------------------
  339|  9.28M|  tmp8 = ixheaac_mult32x16in32_shl(ixheaac_add32_sat(temp13, temp115), COS_3PI_BY_8_Q15);
  ------------------
  |  |   25|  9.28M|#define COS_3PI_BY_8_Q15 12540
  ------------------
  340|  9.28M|  tmp11 = ixheaac_mult32x16in32_shl(ixheaac_sub32_sat(temp13, temp115), COS_PI_BY_8_Q15);
  ------------------
  |  |   31|  9.28M|#define COS_PI_BY_8_Q15 30274
  ------------------
  341|  9.28M|  tmp5 = ixheaac_mult32x16in32_shl(ixheaac_add32_sat(temp14, temp112), -INV_SQRT2_Q15);
  ------------------
  |  |   23|  9.28M|#define INV_SQRT2_Q15 23170
  ------------------
  342|  9.28M|  tmp6 = ixheaac_mult32x16in32_shl(ixheaac_sub32_sat(temp14, temp112), INV_SQRT2_Q15);
  ------------------
  |  |   23|  9.28M|#define INV_SQRT2_Q15 23170
  ------------------
  343|  9.28M|  tmp4 = ixheaac_mult32x16in32_shl(ixheaac_add32_sat(temp15, temp113), INV_SQRT2_Q15);
  ------------------
  |  |   23|  9.28M|#define INV_SQRT2_Q15 23170
  ------------------
  344|  9.28M|  tmp7 = ixheaac_mult32x16in32_shl(ixheaac_sub32_sat(temp15, temp113), INV_SQRT2_Q15);
  ------------------
  |  |   23|  9.28M|#define INV_SQRT2_Q15 23170
  ------------------
  345|  9.28M|  tmp13 = ixheaac_mult32x16in32_shl(ixheaac_add32_sat(temp16, temp110), -COS_PI_BY_8_Q15);
  ------------------
  |  |   31|  9.28M|#define COS_PI_BY_8_Q15 30274
  ------------------
  346|  9.28M|  tmp14 = ixheaac_mult32x16in32_shl(ixheaac_sub32_sat(temp16, temp110), COS_3PI_BY_8_Q15);
  ------------------
  |  |   25|  9.28M|#define COS_3PI_BY_8_Q15 12540
  ------------------
  347|  9.28M|  tmp12 = ixheaac_mult32x16in32_shl(ixheaac_add32_sat(temp17, temp111), COS_PI_BY_8_Q15);
  ------------------
  |  |   31|  9.28M|#define COS_PI_BY_8_Q15 30274
  ------------------
  348|  9.28M|  tmp15 = ixheaac_mult32x16in32_shl(ixheaac_sub32_sat(temp17, temp111), COS_3PI_BY_8_Q15);
  ------------------
  |  |   25|  9.28M|#define COS_3PI_BY_8_Q15 12540
  ------------------
  349|       |
  350|  9.28M|  temp12 = ixheaac_sub32_sat(ixheaac_shl32(ixheaac_mult32x16in32(tmp8, SQRT2PLUS1_Q13), 3),
  ------------------
  |  |   27|  9.28M|#define SQRT2PLUS1_Q13 19777
  ------------------
  351|  9.28M|           ixheaac_mult32x16in32_shl(tmp12, SQRT2MINUS1_Q15));
  ------------------
  |  |   29|  9.28M|#define SQRT2MINUS1_Q15 13573
  ------------------
  352|  9.28M|  temp13 = ixheaac_sub32_sat(ixheaac_shl32(ixheaac_mult32x16in32(tmp9, SQRT2PLUS1_Q13), 3),
  ------------------
  |  |   27|  9.28M|#define SQRT2PLUS1_Q13 19777
  ------------------
  353|  9.28M|           ixheaac_mult32x16in32_shl(tmp13, SQRT2MINUS1_Q15));
  ------------------
  |  |   29|  9.28M|#define SQRT2MINUS1_Q15 13573
  ------------------
  354|  9.28M|  temp14 = ixheaac_sub32_sat(ixheaac_mult32x16in32_shl(tmp10, SQRT2MINUS1_Q15),
  ------------------
  |  |   29|  9.28M|#define SQRT2MINUS1_Q15 13573
  ------------------
  355|  9.28M|           ixheaac_shl32(ixheaac_mult32x16in32(tmp14, SQRT2PLUS1_Q13), 3));
  ------------------
  |  |   27|  9.28M|#define SQRT2PLUS1_Q13 19777
  ------------------
  356|  9.28M|  temp15 = ixheaac_sub32_sat(ixheaac_mult32x16in32_shl(tmp11, SQRT2MINUS1_Q15),
  ------------------
  |  |   29|  9.28M|#define SQRT2MINUS1_Q15 13573
  ------------------
  357|  9.28M|           ixheaac_shl32(ixheaac_mult32x16in32(tmp15, SQRT2PLUS1_Q13), 3));
  ------------------
  |  |   27|  9.28M|#define SQRT2PLUS1_Q13 19777
  ------------------
  358|       |
  359|  9.28M|  tmp8 = ixheaac_add32_sat(tmp8, tmp12);
  360|  9.28M|  tmp9 = ixheaac_add32_sat(tmp9, tmp13);
  361|  9.28M|  tmp10 = ixheaac_add32_sat(tmp10, tmp14);
  362|  9.28M|  tmp11 = ixheaac_add32_sat(tmp11, tmp15);
  363|  9.28M|  temp16 = ixheaac_add32_sat(temp10, tmp4);
  364|  9.28M|  temp110 = ixheaac_sub32_sat(temp10, tmp4);
  365|  9.28M|  temp17 = ixheaac_add32_sat(temp11, tmp5);
  366|  9.28M|  temp111 = ixheaac_sub32_sat(temp11, tmp5);
  367|       |
  368|  9.28M|  temp112 = ixheaac_sub32_sat(tmp6, temp19);
  369|  9.28M|  temp114 = ixheaac_add32_sat(tmp6, temp19);
  370|  9.28M|  temp113 = ixheaac_add32_sat(temp18, tmp7);
  371|  9.28M|  temp115 = ixheaac_sub32_sat(temp18, tmp7);
  372|       |
  373|  9.28M|  tmp0 = ixheaac_sub32_sat(temp16, temp114);
  374|  9.28M|  tmp2 = ixheaac_add32_sat(temp16, temp114);
  375|  9.28M|  tmp1 = ixheaac_add32_sat(temp17, temp115);
  376|  9.28M|  tmp3 = ixheaac_sub32_sat(temp17, temp115);
  377|  9.28M|  tmp4 = ixheaac_add32_sat(temp110, temp112);
  378|  9.28M|  tmp6 = ixheaac_sub32_sat(temp110, temp112);
  379|  9.28M|  tmp5 = ixheaac_add32_sat(temp111, temp113);
  380|  9.28M|  tmp7 = ixheaac_sub32_sat(temp111, temp113);
  381|       |
  382|  9.28M|  temp110 = ixheaac_add32_sat(tmp8, tmp10);
  383|  9.28M|  tmp10 = ixheaac_sub32_sat(tmp8, tmp10);
  384|  9.28M|  temp111 = ixheaac_add32_sat(tmp9, tmp11);
  385|  9.28M|  tmp11 = ixheaac_sub32_sat(tmp9, tmp11);
  386|       |
  387|  9.28M|  tmp12 = ixheaac_add32_sat(temp12, temp14);
  388|  9.28M|  tmp14 = ixheaac_sub32_sat(temp12, temp14);
  389|  9.28M|  tmp13 = ixheaac_add32_sat(temp13, temp15);
  390|  9.28M|  tmp15 = ixheaac_sub32_sat(temp13, temp15);
  391|       |
  392|  9.28M|  temp32 = ixheaac_add32_sat(tmp2, temp110);
  393|  9.28M|  temp318 = ixheaac_sub32_sat(tmp2, temp110);
  394|  9.28M|  temp33 = ixheaac_add32_sat(tmp3, temp111);
  395|  9.28M|  temp319 = ixheaac_sub32_sat(tmp3, temp111);
  396|  9.28M|  temp36 = ixheaac_add32_sat(tmp0, tmp12);
  397|  9.28M|  temp322 = ixheaac_sub32_sat(tmp0, tmp12);
  398|  9.28M|  temp37 = ixheaac_add32_sat(tmp1, tmp13);
  399|  9.28M|  temp323 = ixheaac_sub32_sat(tmp1, tmp13);
  400|  9.28M|  temp314 = ixheaac_add32_sat(tmp4, tmp10);
  401|  9.28M|  temp330 = ixheaac_sub32_sat(tmp4, tmp10);
  402|  9.28M|  temp315 = ixheaac_add32_sat(tmp5, tmp11);
  403|  9.28M|  temp331 = ixheaac_sub32_sat(tmp5, tmp11);
  404|  9.28M|  temp310 = ixheaac_add32_sat(tmp6, tmp14);
  405|  9.28M|  temp326 = ixheaac_sub32_sat(tmp6, tmp14);
  406|  9.28M|  temp311 = ixheaac_add32_sat(tmp7, tmp15);
  407|  9.28M|  temp327 = ixheaac_sub32_sat(tmp7, tmp15);
  408|       |
  409|  9.28M|  temp10 = ixheaac_sub32_sat(vec[0], vec[32]);
  410|  9.28M|  temp11 = ixheaac_sub32_sat(vec[1], vec[33]);
  411|  9.28M|  temp12 = ixheaac_sub32_sat(vec[4], vec[36]);
  412|  9.28M|  temp13 = ixheaac_sub32_sat(vec[5], vec[37]);
  413|  9.28M|  temp14 = ixheaac_sub32_sat(vec[8], vec[40]);
  414|  9.28M|  temp15 = ixheaac_sub32_sat(vec[9], vec[41]);
  415|  9.28M|  temp16 = ixheaac_sub32_sat(vec[12], vec[44]);
  416|  9.28M|  temp17 = ixheaac_sub32_sat(vec[13], vec[45]);
  417|  9.28M|  temp18 = ixheaac_sub32_sat(vec[16], vec[48]);
  418|  9.28M|  temp19 = ixheaac_sub32_sat(vec[17], vec[49]);
  419|  9.28M|  temp110 = ixheaac_sub32_sat(vec[20], vec[52]);
  420|  9.28M|  temp111 = ixheaac_sub32_sat(vec[21], vec[53]);
  421|  9.28M|  temp112 = ixheaac_sub32_sat(vec[24], vec[56]);
  422|  9.28M|  temp113 = ixheaac_sub32_sat(vec[25], vec[57]);
  423|  9.28M|  temp114 = ixheaac_sub32_sat(vec[28], vec[60]);
  424|  9.28M|  temp115 = ixheaac_sub32_sat(vec[29], vec[61]);
  425|       |
  426|  9.28M|  tmp9 = ixheaac_mult32x16in32_shl(ixheaac_add32_sat(temp12, temp114), -COS_3PI_BY_8_Q15);
  ------------------
  |  |   25|  9.28M|#define COS_3PI_BY_8_Q15 12540
  ------------------
  427|  9.28M|  tmp10 = ixheaac_mult32x16in32_shl(ixheaac_sub32_sat(temp12, temp114), COS_PI_BY_8_Q15);
  ------------------
  |  |   31|  9.28M|#define COS_PI_BY_8_Q15 30274
  ------------------
  428|  9.28M|  tmp8 = ixheaac_mult32x16in32_shl(ixheaac_add32_sat(temp13, temp115), COS_3PI_BY_8_Q15);
  ------------------
  |  |   25|  9.28M|#define COS_3PI_BY_8_Q15 12540
  ------------------
  429|  9.28M|  tmp11 = ixheaac_mult32x16in32_shl(ixheaac_sub32_sat(temp13, temp115), COS_PI_BY_8_Q15);
  ------------------
  |  |   31|  9.28M|#define COS_PI_BY_8_Q15 30274
  ------------------
  430|  9.28M|  tmp5 = ixheaac_mult32x16in32_shl(ixheaac_add32_sat(temp14, temp112), -INV_SQRT2_Q15);
  ------------------
  |  |   23|  9.28M|#define INV_SQRT2_Q15 23170
  ------------------
  431|  9.28M|  tmp6 = ixheaac_mult32x16in32_shl(ixheaac_sub32_sat(temp14, temp112), INV_SQRT2_Q15);
  ------------------
  |  |   23|  9.28M|#define INV_SQRT2_Q15 23170
  ------------------
  432|  9.28M|  tmp4 = ixheaac_mult32x16in32_shl(ixheaac_add32_sat(temp15, temp113), INV_SQRT2_Q15);
  ------------------
  |  |   23|  9.28M|#define INV_SQRT2_Q15 23170
  ------------------
  433|  9.28M|  tmp7 = ixheaac_mult32x16in32_shl(ixheaac_sub32_sat(temp15, temp113), INV_SQRT2_Q15);
  ------------------
  |  |   23|  9.28M|#define INV_SQRT2_Q15 23170
  ------------------
  434|  9.28M|  tmp13 = ixheaac_mult32x16in32_shl(ixheaac_add32_sat(temp16, temp110), -COS_PI_BY_8_Q15);
  ------------------
  |  |   31|  9.28M|#define COS_PI_BY_8_Q15 30274
  ------------------
  435|  9.28M|  tmp14 = ixheaac_mult32x16in32_shl(ixheaac_sub32_sat(temp16, temp110), COS_3PI_BY_8_Q15);
  ------------------
  |  |   25|  9.28M|#define COS_3PI_BY_8_Q15 12540
  ------------------
  436|  9.28M|  tmp12 = ixheaac_mult32x16in32_shl(ixheaac_add32_sat(temp17, temp111), COS_PI_BY_8_Q15);
  ------------------
  |  |   31|  9.28M|#define COS_PI_BY_8_Q15 30274
  ------------------
  437|  9.28M|  tmp15 = ixheaac_mult32x16in32_shl(ixheaac_sub32_sat(temp17, temp111), COS_3PI_BY_8_Q15);
  ------------------
  |  |   25|  9.28M|#define COS_3PI_BY_8_Q15 12540
  ------------------
  438|       |
  439|  9.28M|  temp12 = ixheaac_sub32_sat(ixheaac_shl32(ixheaac_mult32x16in32(tmp8, SQRT2PLUS1_Q13), 3),
  ------------------
  |  |   27|  9.28M|#define SQRT2PLUS1_Q13 19777
  ------------------
  440|  9.28M|           ixheaac_mult32x16in32_shl(tmp12, SQRT2MINUS1_Q15));
  ------------------
  |  |   29|  9.28M|#define SQRT2MINUS1_Q15 13573
  ------------------
  441|  9.28M|  temp13 = ixheaac_sub32_sat(ixheaac_shl32(ixheaac_mult32x16in32(tmp9, SQRT2PLUS1_Q13), 3),
  ------------------
  |  |   27|  9.28M|#define SQRT2PLUS1_Q13 19777
  ------------------
  442|  9.28M|           ixheaac_mult32x16in32_shl(tmp13, SQRT2MINUS1_Q15));
  ------------------
  |  |   29|  9.28M|#define SQRT2MINUS1_Q15 13573
  ------------------
  443|  9.28M|  temp14 = ixheaac_sub32_sat(ixheaac_mult32x16in32_shl(tmp10, SQRT2MINUS1_Q15),
  ------------------
  |  |   29|  9.28M|#define SQRT2MINUS1_Q15 13573
  ------------------
  444|  9.28M|           ixheaac_shl32(ixheaac_mult32x16in32(tmp14, SQRT2PLUS1_Q13), 3));
  ------------------
  |  |   27|  9.28M|#define SQRT2PLUS1_Q13 19777
  ------------------
  445|  9.28M|  temp15 = ixheaac_sub32_sat(ixheaac_mult32x16in32_shl(tmp11, SQRT2MINUS1_Q15),
  ------------------
  |  |   29|  9.28M|#define SQRT2MINUS1_Q15 13573
  ------------------
  446|  9.28M|           ixheaac_shl32(ixheaac_mult32x16in32(tmp15, SQRT2PLUS1_Q13), 3));
  ------------------
  |  |   27|  9.28M|#define SQRT2PLUS1_Q13 19777
  ------------------
  447|       |
  448|  9.28M|  tmp8 = ixheaac_add32_sat(tmp8, tmp12);
  449|  9.28M|  tmp9 = ixheaac_add32_sat(tmp9, tmp13);
  450|  9.28M|  tmp10 = ixheaac_add32_sat(tmp10, tmp14);
  451|  9.28M|  tmp11 = ixheaac_add32_sat(tmp11, tmp15);
  452|  9.28M|  temp16 = ixheaac_add32_sat(temp10, tmp4);
  453|  9.28M|  temp110 = ixheaac_sub32_sat(temp10, tmp4);
  454|  9.28M|  temp17 = ixheaac_add32_sat(temp11, tmp5);
  455|  9.28M|  temp111 = ixheaac_sub32_sat(temp11, tmp5);
  456|       |
  457|  9.28M|  temp112 = ixheaac_sub32_sat(tmp6, temp19);
  458|  9.28M|  temp114 = ixheaac_add32_sat(tmp6, temp19);
  459|  9.28M|  temp113 = ixheaac_add32_sat(temp18, tmp7);
  460|  9.28M|  temp115 = ixheaac_sub32_sat(temp18, tmp7);
  461|       |
  462|  9.28M|  tmp0 = ixheaac_sub32_sat(temp16, temp114);
  463|  9.28M|  tmp2 = ixheaac_add32_sat(temp16, temp114);
  464|  9.28M|  tmp1 = ixheaac_add32_sat(temp17, temp115);
  465|  9.28M|  tmp3 = ixheaac_sub32_sat(temp17, temp115);
  466|  9.28M|  tmp4 = ixheaac_add32_sat(temp110, temp112);
  467|  9.28M|  tmp6 = ixheaac_sub32_sat(temp110, temp112);
  468|  9.28M|  tmp5 = ixheaac_add32_sat(temp111, temp113);
  469|  9.28M|  tmp7 = ixheaac_sub32_sat(temp111, temp113);
  470|       |
  471|  9.28M|  temp110 = ixheaac_add32_sat(tmp8, tmp10);
  472|  9.28M|  tmp10 = ixheaac_sub32_sat(tmp8, tmp10);
  473|  9.28M|  temp111 = ixheaac_add32_sat(tmp9, tmp11);
  474|  9.28M|  tmp11 = ixheaac_sub32_sat(tmp9, tmp11);
  475|       |
  476|  9.28M|  tmp12 = ixheaac_add32_sat(temp12, temp14);
  477|  9.28M|  tmp14 = ixheaac_sub32_sat(temp12, temp14);
  478|  9.28M|  tmp13 = ixheaac_add32_sat(temp13, temp15);
  479|  9.28M|  tmp15 = ixheaac_sub32_sat(temp13, temp15);
  480|       |
  481|  9.28M|  temp10 = ixheaac_add32_sat(tmp2, temp110);
  482|  9.28M|  temp18 = ixheaac_sub32_sat(tmp2, temp110);
  483|  9.28M|  temp11 = ixheaac_add32_sat(tmp3, temp111);
  484|  9.28M|  temp19 = ixheaac_sub32_sat(tmp3, temp111);
  485|  9.28M|  temp12 = ixheaac_add32_sat(tmp0, tmp12);
  486|  9.28M|  temp110 = ixheaac_sub32_sat(tmp0, tmp12);
  487|  9.28M|  temp13 = ixheaac_add32_sat(tmp1, tmp13);
  488|  9.28M|  temp111 = ixheaac_sub32_sat(tmp1, tmp13);
  489|  9.28M|  temp16 = ixheaac_add32_sat(tmp4, tmp10);
  490|  9.28M|  temp114 = ixheaac_sub32_sat(tmp4, tmp10);
  491|  9.28M|  temp17 = ixheaac_add32_sat(tmp5, tmp11);
  492|  9.28M|  temp115 = ixheaac_sub32_sat(tmp5, tmp11);
  493|  9.28M|  temp14 = ixheaac_add32_sat(tmp6, tmp14);
  494|  9.28M|  temp112 = ixheaac_sub32_sat(tmp6, tmp14);
  495|  9.28M|  temp15 = ixheaac_add32_sat(tmp7, tmp15);
  496|  9.28M|  temp113 = ixheaac_sub32_sat(tmp7, tmp15);
  497|       |
  498|  9.28M|  *vec++ = temp30;
  499|  9.28M|  *vec++ = temp31;
  500|  9.28M|  *vec++ = ixheaac_add32_sat(temp10, temp40);
  501|  9.28M|  *vec++ = ixheaac_add32_sat(temp11, temp41);
  502|  9.28M|  *vec++ = temp32;
  503|  9.28M|  *vec++ = temp33;
  504|  9.28M|  *vec++ = ixheaac_add32_sat(temp12, temp42);
  505|  9.28M|  *vec++ = ixheaac_add32_sat(temp13, temp43);
  506|  9.28M|  *vec++ = temp34;
  507|  9.28M|  *vec++ = temp35;
  508|  9.28M|  *vec++ = ixheaac_add32_sat(temp14, temp44);
  509|  9.28M|  *vec++ = ixheaac_add32_sat(temp15, temp45);
  510|  9.28M|  *vec++ = temp36;
  511|  9.28M|  *vec++ = temp37;
  512|  9.28M|  *vec++ = ixheaac_add32_sat(temp16, temp46);
  513|  9.28M|  *vec++ = ixheaac_add32_sat(temp17, temp47);
  514|  9.28M|  *vec++ = temp38;
  515|  9.28M|  *vec++ = temp39;
  516|  9.28M|  *vec++ = ixheaac_add32_sat(temp18, temp48);
  517|  9.28M|  *vec++ = ixheaac_add32_sat(temp19, temp49);
  518|  9.28M|  *vec++ = temp310;
  519|  9.28M|  *vec++ = temp311;
  520|  9.28M|  *vec++ = ixheaac_add32_sat(temp110, temp410);
  521|  9.28M|  *vec++ = ixheaac_add32_sat(temp111, temp411);
  522|  9.28M|  *vec++ = temp312;
  523|  9.28M|  *vec++ = temp313;
  524|  9.28M|  *vec++ = ixheaac_add32_sat(temp112, temp412);
  525|  9.28M|  *vec++ = ixheaac_add32_sat(temp113, temp413);
  526|  9.28M|  *vec++ = temp314;
  527|  9.28M|  *vec++ = temp315;
  528|  9.28M|  *vec++ = ixheaac_add32_sat(temp114, temp414);
  529|  9.28M|  *vec++ = ixheaac_add32_sat(temp115, temp415);
  530|  9.28M|  *vec++ = temp316;
  531|  9.28M|  *vec++ = temp317;
  532|  9.28M|  *vec++ = ixheaac_sub32_sat(temp10, temp40);
  533|  9.28M|  *vec++ = ixheaac_sub32_sat(temp11, temp41);
  534|  9.28M|  *vec++ = temp318;
  535|  9.28M|  *vec++ = temp319;
  536|  9.28M|  *vec++ = ixheaac_sub32_sat(temp12, temp42);
  537|  9.28M|  *vec++ = ixheaac_sub32_sat(temp13, temp43);
  538|  9.28M|  *vec++ = temp320;
  539|  9.28M|  *vec++ = temp321;
  540|  9.28M|  *vec++ = ixheaac_sub32_sat(temp14, temp44);
  541|  9.28M|  *vec++ = ixheaac_sub32_sat(temp15, temp45);
  542|  9.28M|  *vec++ = temp322;
  543|  9.28M|  *vec++ = temp323;
  544|  9.28M|  *vec++ = ixheaac_sub32_sat(temp16, temp46);
  545|  9.28M|  *vec++ = ixheaac_sub32_sat(temp17, temp47);
  546|  9.28M|  *vec++ = temp324;
  547|  9.28M|  *vec++ = temp325;
  548|  9.28M|  *vec++ = ixheaac_sub32_sat(temp18, temp48);
  549|  9.28M|  *vec++ = ixheaac_sub32_sat(temp19, temp49);
  550|  9.28M|  *vec++ = temp326;
  551|  9.28M|  *vec++ = temp327;
  552|  9.28M|  *vec++ = ixheaac_sub32_sat(temp110, temp410);
  553|  9.28M|  *vec++ = ixheaac_sub32_sat(temp111, temp411);
  554|  9.28M|  *vec++ = temp328;
  555|  9.28M|  *vec++ = temp329;
  556|  9.28M|  *vec++ = ixheaac_sub32_sat(temp112, temp412);
  557|  9.28M|  *vec++ = ixheaac_sub32_sat(temp113, temp413);
  558|  9.28M|  *vec++ = temp330;
  559|  9.28M|  *vec++ = temp331;
  560|  9.28M|  *vec++ = ixheaac_sub32_sat(temp114, temp414);
  561|  9.28M|  *vec++ = ixheaac_sub32_sat(temp115, temp415);
  562|  9.28M|}
ixheaacd_mps_polyphase.c:ia_mps_enc_fwd_mod:
 1020|  1.86M|                               ia_mps_dec_qmf_tables_struct *qmf_table_ptr) {
 1021|  1.86M|  WORD32 i;
 1022|       |
 1023|   121M|  for (i = 0; i < 64; i++) {
  ------------------
  |  Branch (1023:15): [True: 119M, False: 1.86M]
  ------------------
 1024|   119M|    r_subband[i] = time_in[i] - time_in[127 - i];
 1025|   119M|    i_subband[i] = time_in[i] + time_in[127 - i];
 1026|   119M|  }
 1027|  1.86M|  ixheaacd_cos_mod(r_subband, qmf_table_ptr);
 1028|  1.86M|  ixheaacd_sin_mod(i_subband, qmf_table_ptr);
 1029|  1.86M|}
ixheaacd_mps_polyphase.c:ixheaacd_cos_mod:
  564|  1.86M|static VOID ixheaacd_cos_mod(WORD32 *subband, ia_mps_dec_qmf_tables_struct *qmf_table_ptr) {
  565|  1.86M|  WORD32 i, m;
  566|  1.86M|  WORD16 wim, wre;
  567|  1.86M|  WORD32 temp_1;
  568|  1.86M|  const WORD16 *ptr1, *ptr2, *ptr3, *ptr4;
  569|  1.86M|  WORD32 re1, im1, re2, im2;
  570|       |
  571|  1.86M|  m = WORD_LENGTH;
  ------------------
  |  |  211|  1.86M|#define WORD_LENGTH (32)
  ------------------
  572|  1.86M|  ptr1 = qmf_table_ptr->sbr_sin_twiddle;
  573|  1.86M|  ptr2 = qmf_table_ptr->sbr_cos_twiddle;
  574|  1.86M|  ptr3 = qmf_table_ptr->sbr_sin_twiddle + 31;
  575|  1.86M|  ptr4 = qmf_table_ptr->sbr_cos_twiddle + 31;
  576|  31.7M|  for (i = 0; i < 16; i++) {
  ------------------
  |  Branch (576:15): [True: 29.8M, False: 1.86M]
  ------------------
  577|  29.8M|    temp_1 = (i << 1);
  578|  29.8M|    re1 = subband[temp_1];
  579|  29.8M|    im2 = subband[temp_1 + 1];
  580|  29.8M|    re2 = subband[62 - temp_1];
  581|  29.8M|    im1 = subband[63 - temp_1];
  582|       |
  583|  29.8M|    wim = *ptr1++;
  584|  29.8M|    wre = *ptr2++;
  585|       |
  586|  29.8M|    subband[temp_1] = ixheaac_add32_sat(
  587|  29.8M|        ixheaac_mult32x16in32_shl(im1, wim), ixheaac_mult32x16in32_shl(re1, wre));
  588|  29.8M|    subband[temp_1 + 1] = ixheaac_sub32_sat(
  589|  29.8M|        ixheaac_mult32x16in32_shl(im1, wre), ixheaac_mult32x16in32_shl(re1, wim));
  590|       |
  591|  29.8M|    wim = *ptr3--;
  592|  29.8M|    wre = *ptr4--;
  593|       |
  594|  29.8M|    subband[62 - temp_1] = ixheaac_add32_sat(
  595|  29.8M|        ixheaac_mult32x16in32_shl(im2, wim), ixheaac_mult32x16in32_shl(re2, wre));
  596|  29.8M|    subband[63 - temp_1] = ixheaac_sub32_sat(
  597|  29.8M|        ixheaac_mult32x16in32_shl(im2, wre), ixheaac_mult32x16in32_shl(re2, wim));
  598|  29.8M|  }
  599|       |
  600|  1.86M|  ixheaacd_fft32(subband, qmf_table_ptr->fft_c);
  601|       |
  602|  1.86M|  ptr1 = qmf_table_ptr->sbr_alt_sin_twiddle;
  603|  1.86M|  ptr2 = qmf_table_ptr->sbr_alt_sin_twiddle + m;
  604|  1.86M|  wim = *ptr1++;
  605|  1.86M|  wre = *ptr2--;
  606|       |
  607|  31.7M|  for (i = 0; i < 16; i++) {
  ------------------
  |  Branch (607:15): [True: 29.8M, False: 1.86M]
  ------------------
  608|  29.8M|    temp_1 = (i << 1);
  609|  29.8M|    re1 = subband[temp_1];
  610|  29.8M|    im1 = subband[temp_1 + 1];
  611|  29.8M|    re2 = subband[62 - temp_1];
  612|  29.8M|    im2 = subband[63 - temp_1];
  613|       |
  614|  29.8M|    subband[temp_1] = ixheaac_add32_sat(
  615|  29.8M|        ixheaac_mult32x16in32_shl(re1, wre), ixheaac_mult32x16in32_shl(im1, wim));
  616|  29.8M|    subband[63 - temp_1] = ixheaac_sub32_sat(
  617|  29.8M|        ixheaac_mult32x16in32_shl(re1, wim), ixheaac_mult32x16in32_shl(im1, wre));
  618|       |
  619|  29.8M|    wim = *ptr1++;
  620|  29.8M|    wre = *ptr2--;
  621|       |
  622|  29.8M|    subband[62 - temp_1] = ixheaac_add32_sat(
  623|  29.8M|        ixheaac_mult32x16in32_shl(re2, wim), ixheaac_mult32x16in32_shl(im2, wre));
  624|  29.8M|    subband[temp_1 + 1] = ixheaac_sub32_sat(
  625|  29.8M|        ixheaac_mult32x16in32_shl(re2, wre), ixheaac_mult32x16in32_shl(im2, wim));
  626|  29.8M|  }
  627|  1.86M|}
ixheaacd_mps_polyphase.c:ixheaacd_sin_mod:
  629|  1.86M|static VOID ixheaacd_sin_mod(WORD32 *subband, ia_mps_dec_qmf_tables_struct *qmf_table_ptr) {
  630|  1.86M|  WORD32 i, m;
  631|  1.86M|  WORD16 wre, wim;
  632|  1.86M|  WORD32 temp_1;
  633|  1.86M|  WORD32 re1, im1, re2, im2;
  634|  1.86M|  const WORD16 *ptr1, *ptr2, *ptr3, *ptr4;
  635|       |
  636|  1.86M|  ptr1 = qmf_table_ptr->sbr_sin_twiddle;
  637|  1.86M|  ptr2 = qmf_table_ptr->sbr_cos_twiddle;
  638|  1.86M|  ptr3 = qmf_table_ptr->sbr_sin_twiddle + 31;
  639|  1.86M|  ptr4 = qmf_table_ptr->sbr_cos_twiddle + 31;
  640|       |
  641|  1.86M|  m = WORD_LENGTH;
  ------------------
  |  |  211|  1.86M|#define WORD_LENGTH (32)
  ------------------
  642|       |
  643|  31.7M|  for (i = 0; i < 16; i++) {
  ------------------
  |  Branch (643:15): [True: 29.8M, False: 1.86M]
  ------------------
  644|  29.8M|    temp_1 = (i << 1);
  645|       |
  646|  29.8M|    re1 = subband[temp_1];
  647|  29.8M|    im2 = subband[temp_1 + 1];
  648|  29.8M|    re2 = subband[62 - temp_1];
  649|  29.8M|    im1 = subband[63 - temp_1];
  650|       |
  651|  29.8M|    wre = *ptr1++;
  652|  29.8M|    wim = *ptr2++;
  653|       |
  654|  29.8M|    subband[temp_1 + 1] = ixheaac_add32_sat(
  655|  29.8M|        ixheaac_mult32x16in32_shl(im1, wim), ixheaac_mult32x16in32_shl(re1, wre));
  656|  29.8M|    subband[temp_1] = ixheaac_sub32_sat(
  657|  29.8M|        ixheaac_mult32x16in32_shl(im1, wre), ixheaac_mult32x16in32_shl(re1, wim));
  658|       |
  659|  29.8M|    wre = *ptr3--;
  660|  29.8M|    wim = *ptr4--;
  661|       |
  662|  29.8M|    subband[63 - temp_1] = ixheaac_add32_sat(
  663|  29.8M|        ixheaac_mult32x16in32_shl(im2, wim), ixheaac_mult32x16in32_shl(re2, wre));
  664|  29.8M|    subband[62 - temp_1] = ixheaac_sub32_sat(
  665|  29.8M|        ixheaac_mult32x16in32_shl(im2, wre), ixheaac_mult32x16in32_shl(re2, wim));
  666|  29.8M|  }
  667|       |
  668|  1.86M|  ixheaacd_fft32(subband, qmf_table_ptr->fft_c);
  669|       |
  670|  1.86M|  ptr1 = qmf_table_ptr->sbr_alt_sin_twiddle;
  671|  1.86M|  ptr2 = qmf_table_ptr->sbr_alt_sin_twiddle + m;
  672|       |
  673|  1.86M|  wim = *ptr1++;
  674|  1.86M|  wre = *ptr2--;
  675|       |
  676|  31.7M|  for (i = 0; i < 16; i++) {
  ------------------
  |  Branch (676:15): [True: 29.8M, False: 1.86M]
  ------------------
  677|  29.8M|    temp_1 = (i << 1);
  678|  29.8M|    re1 = subband[temp_1];
  679|  29.8M|    im1 = subband[temp_1 + 1];
  680|  29.8M|    re2 = subband[62 - temp_1];
  681|  29.8M|    im2 = subband[63 - temp_1];
  682|       |
  683|  29.8M|    subband[63 - temp_1] = ixheaac_negate32_sat(ixheaac_add32_sat(
  684|  29.8M|        ixheaac_mult32x16in32_shl(re1, wre), ixheaac_mult32x16in32_shl(im1, wim)));
  685|  29.8M|    subband[temp_1] = ixheaac_negate32_sat(ixheaac_sub32_sat(
  686|  29.8M|        ixheaac_mult32x16in32_shl(re1, wim), ixheaac_mult32x16in32_shl(im1, wre)));
  687|       |
  688|  29.8M|    wim = *ptr1++;
  689|  29.8M|    wre = *ptr2--;
  690|       |
  691|  29.8M|    subband[temp_1 + 1] = ixheaac_negate32_sat(ixheaac_add32_sat(
  692|  29.8M|        ixheaac_mult32x16in32_shl(re2, wim), ixheaac_mult32x16in32_shl(im2, wre)));
  693|  29.8M|    subband[62 - temp_1] = ixheaac_negate32_sat(ixheaac_sub32_sat(
  694|  29.8M|        ixheaac_mult32x16in32_shl(re2, wre), ixheaac_mult32x16in32_shl(im2, wim)));
  695|  29.8M|  }
  696|  1.86M|}

ixheaacd_pre_and_mix_matrix_calculation:
  104|  77.4k|VOID ixheaacd_pre_and_mix_matrix_calculation(ia_mps_dec_state_struct *self) {
  105|  77.4k|  WORD32 ps, pb;
  106|  77.4k|  ia_mps_bs_frame *curr_bit_stream = &(self->bs_frame);
  107|  77.4k|  FLOAT32 h_imag[2 * MAX_PARAMETER_BANDS];
  108|  77.4k|  FLOAT32 h_real[6 * MAX_PARAMETER_BANDS];
  109|       |
  110|  77.4k|  ixheaacd_mps_buffer_pre_and_mix_matrix(self);
  111|       |
  112|   169k|  for (ps = 0; ps < self->num_parameter_sets; ps++) {
  ------------------
  |  Branch (112:16): [True: 92.0k, False: 77.4k]
  ------------------
  113|  92.0k|    FLOAT32 *h_im = &h_imag[0];
  114|  92.0k|    FLOAT32 *h_re = &h_real[0];
  115|       |
  116|  92.0k|    memset(h_real, 0, 6 * MAX_PARAMETER_BANDS * sizeof(FLOAT32));
  ------------------
  |  |   55|  92.0k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  117|  92.0k|    memset(h_imag, 0, 2 * MAX_PARAMETER_BANDS * sizeof(FLOAT32));
  ------------------
  |  |   55|  92.0k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  118|       |
  119|  92.0k|    switch (self->config->bs_phase_coding) {
  ------------------
  |  Branch (119:13): [True: 92.0k, False: 0]
  ------------------
  120|  18.1k|      case 0:
  ------------------
  |  Branch (120:7): [True: 18.1k, False: 73.9k]
  ------------------
  121|  18.1k|        if (self->residual_coding) {
  ------------------
  |  Branch (121:13): [True: 13.6k, False: 4.52k]
  ------------------
  122|  13.6k|          ixheaacd_mps_par2umx_pred(self, curr_bit_stream, h_imag, h_real, ps,
  123|  13.6k|                                    self->res_bands);
  124|  13.6k|        } else {
  125|  4.52k|          ixheaacd_mps_par2umx_ps(self, curr_bit_stream, h_real, ps);
  126|  4.52k|        }
  127|       |
  128|  18.1k|        break;
  129|  15.3k|      case 1:
  ------------------
  |  Branch (129:7): [True: 15.3k, False: 76.6k]
  ------------------
  130|  15.3k|        ixheaacd_mps_par2umx_ps_ipd_opd(self, curr_bit_stream, h_real, ps);
  131|  15.3k|        break;
  132|  58.5k|      case 2:
  ------------------
  |  Branch (132:7): [True: 58.5k, False: 33.5k]
  ------------------
  133|  58.5k|        ixheaacd_mps_par2umx_pred(self, curr_bit_stream, h_imag, h_real, ps,
  134|  58.5k|                                  self->res_bands);
  135|  58.5k|        break;
  136|  92.0k|    }
  137|       |
  138|  1.27M|    for (pb = 0; pb < self->bs_param_bands; pb++) {
  ------------------
  |  Branch (138:18): [True: 1.18M, False: 92.0k]
  ------------------
  139|  1.18M|      self->m1_param_re[ps][pb][0][0] = 1.0f;
  140|  1.18M|      self->m1_param_re[ps][pb][1][0] = 1.0f;
  141|       |
  142|  1.18M|      self->m1_param_im[ps][pb][0][0] = 0;
  143|  1.18M|      self->m1_param_im[ps][pb][1][0] = 0;
  144|       |
  145|  1.18M|      self->m2_resid_re[ps][pb][0][0] = *h_re++;
  146|  1.18M|      self->m2_resid_im[ps][pb][0][0] = *h_im++;
  147|  1.18M|      self->m2_resid_im[ps][pb][0][1] = 0;
  148|       |
  149|  1.18M|      self->m2_resid_re[ps][pb][1][0] = *h_re++;
  150|  1.18M|      self->m2_resid_im[ps][pb][1][0] = *h_im++;
  151|  1.18M|      self->m2_resid_im[ps][pb][1][1] = 0;
  152|       |
  153|  1.18M|      self->m2_decor_re[ps][pb][0][0] = 0;
  154|  1.18M|      self->m2_decor_im[ps][pb][0][0] = 0;
  155|  1.18M|      self->m2_decor_re[ps][pb][0][1] = *h_re++;
  156|  1.18M|      self->m2_decor_im[ps][pb][0][1] = 0;
  157|       |
  158|  1.18M|      self->m2_decor_re[ps][pb][1][0] = 0;
  159|  1.18M|      self->m2_decor_im[ps][pb][1][0] = 0;
  160|  1.18M|      self->m2_decor_re[ps][pb][1][1] = *h_re++;
  161|  1.18M|      self->m2_decor_im[ps][pb][1][1] = 0;
  162|       |
  163|  1.18M|      self->m2_resid_re[ps][pb][0][1] = *h_re++;
  164|  1.18M|      self->m2_resid_re[ps][pb][1][1] = *h_re++;
  165|  1.18M|    }
  166|  92.0k|  }
  167|  77.4k|  ixheaacd_mps_smoothing_opd(self);
  168|  77.4k|}
ixheaacd_mps_par2umx_ps:
  205|  4.52k|                             WORD32 param_set_idx) {
  206|  4.52k|  ixheaacd_mps_par2umx_ps_core(curr_bit_stream->cld_idx[param_set_idx],
  207|  4.52k|                               curr_bit_stream->icc_idx[param_set_idx],
  208|  4.52k|                               self->bs_param_bands, h_real);
  209|  4.52k|}
ixheaacd_mps_par2umx_ps_ipd_opd:
  231|  15.3k|                                     FLOAT32 *h_real, WORD32 param_set_idx) {
  232|  15.3k|  WORD32 opd[MAX_PARAMETER_BANDS];
  233|  15.3k|  WORD32 ott_band_count = self->bs_param_bands;
  234|  15.3k|  WORD32 num_bands_ipd = self->num_bands_ipd;
  235|  15.3k|  WORD32 band;
  236|       |
  237|  15.3k|  ixheaacd_mps_par2umx_ps_core(curr_bit_stream->cld_idx[param_set_idx],
  238|  15.3k|                               curr_bit_stream->icc_idx[param_set_idx],
  239|  15.3k|                               ott_band_count, h_real);
  240|       |
  241|  15.3k|  if (self->bs_phase_mode) {
  ------------------
  |  Branch (241:7): [True: 2.23k, False: 13.1k]
  ------------------
  242|  2.23k|    ixheaacd_mps_opd_calc(self, curr_bit_stream, param_set_idx, opd);
  243|       |
  244|  20.5k|    for (band = 0; band < num_bands_ipd; band++) {
  ------------------
  |  Branch (244:20): [True: 18.3k, False: 2.23k]
  ------------------
  245|  18.3k|      WORD32 ipd_idx = curr_bit_stream->ipd_idx[param_set_idx][band] & 15;
  246|  18.3k|      WORD32 ipd = ixheaacd_ipd_de_quant_table_q28[ipd_idx];
  247|       |
  248|  18.3k|      self->phase_l[param_set_idx][band] =
  249|  18.3k|          ixheaacd_mps_phase_wraping(opd[band]) * ONE_BY_Q28_FLOAT_VAL;
  ------------------
  |  |   48|  18.3k|#define ONE_BY_Q28_FLOAT_VAL (1.0f / Q28_FLOAT_VAL)
  |  |  ------------------
  |  |  |  |   47|  18.3k|#define Q28_FLOAT_VAL ((FLOAT32)(1 << 28))
  |  |  ------------------
  ------------------
  250|  18.3k|      self->phase_r[param_set_idx][band] =
  251|  18.3k|          ixheaacd_mps_phase_wraping(opd[band] - ipd) * ONE_BY_Q28_FLOAT_VAL;
  ------------------
  |  |   48|  18.3k|#define ONE_BY_Q28_FLOAT_VAL (1.0f / Q28_FLOAT_VAL)
  |  |  ------------------
  |  |  |  |   47|  18.3k|#define Q28_FLOAT_VAL ((FLOAT32)(1 << 28))
  |  |  ------------------
  ------------------
  252|  18.3k|    }
  253|  13.1k|  } else {
  254|  13.1k|    num_bands_ipd = 0;
  255|  13.1k|  }
  256|       |
  257|   193k|  for (band = num_bands_ipd; band < ott_band_count; band++) {
  ------------------
  |  Branch (257:30): [True: 178k, False: 15.3k]
  ------------------
  258|   178k|    self->phase_l[param_set_idx][band] = 0;
  259|   178k|    self->phase_r[param_set_idx][band] = 0;
  260|   178k|  }
  261|  15.3k|}
ixheaacd_mps_par2umx_pred:
  266|  72.1k|                               WORD32 param_set_idx, WORD32 res_bands) {
  267|  72.1k|  WORD32 band;
  268|       |
  269|  1.02M|  for (band = 0; band < self->bs_param_bands; band++) {
  ------------------
  |  Branch (269:18): [True: 955k, False: 72.1k]
  ------------------
  270|   955k|    WORD32 cld_idx = curr_bit_stream->cld_idx[param_set_idx][band] + 15;
  271|   955k|    WORD32 icc_idx = curr_bit_stream->icc_idx[param_set_idx][band];
  272|   955k|    WORD32 ipd_idx = curr_bit_stream->ipd_idx[param_set_idx][band] & 15;
  273|       |
  274|   955k|    if ((band < self->num_bands_ipd) && (cld_idx == 15) && (icc_idx == 0) &&
  ------------------
  |  Branch (274:9): [True: 562k, False: 392k]
  |  Branch (274:41): [True: 483k, False: 79.2k]
  |  Branch (274:60): [True: 436k, False: 47.1k]
  ------------------
  275|   436k|        (ipd_idx == 8)) {
  ------------------
  |  Branch (275:9): [True: 3.17k, False: 433k]
  ------------------
  276|  3.17k|      FLOAT32 gain = 0.416666667f;
  277|  3.17k|      *h_imag++ = 0;
  278|  3.17k|      *h_imag++ = 0;
  279|       |
  280|  3.17k|      if (band < res_bands) {
  ------------------
  |  Branch (280:11): [True: 628, False: 2.55k]
  ------------------
  281|    628|        *h_real++ = gain;
  282|    628|        *h_real++ = gain;
  283|    628|        h_real += 2;
  284|       |
  285|    628|        *h_real++ = gain;
  286|    628|        *h_real++ = -gain;
  287|  2.55k|      } else {
  288|  2.55k|        *h_real++ = gain;
  289|  2.55k|        *h_real++ = -gain;
  290|       |
  291|  2.55k|        h_real += 4;
  292|  2.55k|      }
  293|   952k|    } else {
  294|   952k|      FLOAT32 weight, re_weight, im_weight;
  295|       |
  296|   952k|      weight = ixheaacd_weight[ipd_idx][icc_idx][cld_idx];
  297|   952k|      re_weight = ixheaacd_re_weight[ipd_idx][icc_idx][cld_idx];
  298|   952k|      im_weight = ixheaacd_im_weight[ipd_idx][icc_idx][cld_idx];
  299|       |
  300|   952k|      if (band < self->num_bands_ipd) {
  ------------------
  |  Branch (300:11): [True: 559k, False: 392k]
  ------------------
  301|   559k|        weight = ixheaacd_weight[ipd_idx][icc_idx][cld_idx];
  302|   559k|        re_weight = ixheaacd_re_weight[ipd_idx][icc_idx][cld_idx];
  303|   559k|        im_weight = ixheaacd_im_weight[ipd_idx][icc_idx][cld_idx];
  304|   559k|      } else {
  305|   392k|        weight = ixheaacd_weight[0][icc_idx][cld_idx];
  306|   392k|        re_weight = ixheaacd_re_weight[0][icc_idx][cld_idx];
  307|   392k|        im_weight = ixheaacd_im_weight[0][icc_idx][cld_idx];
  308|   392k|      }
  309|       |
  310|   952k|      *h_real++ = weight - re_weight;
  311|   952k|      *h_imag++ = -im_weight;
  312|   952k|      *h_real++ = weight + re_weight;
  313|   952k|      *h_imag++ = im_weight;
  314|       |
  315|   952k|      if (band < res_bands) {
  ------------------
  |  Branch (315:11): [True: 449k, False: 502k]
  ------------------
  316|   449k|        h_real += 2;
  317|       |
  318|   449k|        *h_real++ = weight;
  319|   449k|        *h_real++ = -weight;
  320|   502k|      } else {
  321|   502k|        FLOAT32 beta = ixheaacd_beta[ipd_idx][icc_idx][cld_idx];
  322|       |
  323|   502k|        *h_real++ = beta;
  324|   502k|        *h_real++ = -beta;
  325|   502k|        h_real += 2;
  326|   502k|      }
  327|   952k|    }
  328|   955k|  }
  329|  72.1k|}
ixheaacd_mps_apply_pre_matrix:
  331|  15.1k|VOID ixheaacd_mps_apply_pre_matrix(ia_mps_dec_state_struct *self) {
  332|  15.1k|  WORD32 ts, qs, row;
  333|  15.1k|  if (self->pre_mix_req) {
  ------------------
  |  Branch (333:7): [True: 5.44k, False: 9.72k]
  ------------------
  334|  5.44k|    ixheaacd_mps_upmix_interp_type1(
  335|  5.44k|        self->m1_param_re, self->r_out_re_in_m1, self->m1_param_re_prev,
  336|  5.44k|        (self->dir_sig_count + self->decor_sig_count), 1, self, self->bs_high_rate_mode);
  337|       |
  338|   249k|    for (ts = 0; ts < self->time_slots; ts++) {
  ------------------
  |  Branch (338:18): [True: 243k, False: 5.44k]
  ------------------
  339|   731k|      for (qs = 0; qs < 2; qs++) {
  ------------------
  |  Branch (339:20): [True: 487k, False: 243k]
  ------------------
  340|   487k|        WORD32 indx = self->hyb_band_to_processing_band_table[qs];
  341|       |
  342|   487k|        FLOAT32 real =
  343|   487k|            self->hyb_in[0][qs][ts].re * self->r_out_re_in_m1[ts][indx][0][0];
  344|   487k|        FLOAT32 imag =
  345|   487k|            self->hyb_in[0][qs][ts].im * self->r_out_re_in_m1[ts][indx][0][0];
  346|  1.46M|        for (row = 0; row < (self->dir_sig_count + self->decor_sig_count);
  ------------------
  |  Branch (346:23): [True: 975k, False: 487k]
  ------------------
  347|   975k|             row++) {
  348|   975k|          self->v[row][ts][qs].re = real;
  349|   975k|          self->v[row][ts][qs].im = imag;
  350|   975k|        }
  351|   487k|      }
  352|  9.11M|      for (qs = 2; qs < self->hyb_band_count[0]; qs++) {
  ------------------
  |  Branch (352:20): [True: 8.87M, False: 243k]
  ------------------
  353|  8.87M|        WORD32 indx = self->hyb_band_to_processing_band_table[qs];
  354|  8.87M|        FLOAT32 real =
  355|  8.87M|            self->hyb_in[0][qs][ts].re * self->r_out_re_in_m1[ts][indx][0][0];
  356|  8.87M|        FLOAT32 imag =
  357|  8.87M|            self->hyb_in[0][qs][ts].im * self->r_out_re_in_m1[ts][indx][0][0];
  358|  26.6M|        for (row = 0; row < (self->dir_sig_count + self->decor_sig_count);
  ------------------
  |  Branch (358:23): [True: 17.7M, False: 8.87M]
  ------------------
  359|  17.7M|             row++) {
  360|  17.7M|          self->v[row][ts][qs].re = real;
  361|  17.7M|          self->v[row][ts][qs].im = imag;
  362|  17.7M|        }
  363|  8.87M|      }
  364|   243k|    }
  365|  9.72k|  } else {
  366|   426k|    for (ts = 0; ts < self->time_slots; ts++) {
  ------------------
  |  Branch (366:18): [True: 416k, False: 9.72k]
  ------------------
  367|  13.4M|      for (qs = 0; qs < self->hyb_band_count[0]; qs++) {
  ------------------
  |  Branch (367:20): [True: 13.0M, False: 416k]
  ------------------
  368|  13.0M|        FLOAT32 real = self->hyb_in[0][qs][ts].re;
  369|  13.0M|        FLOAT32 imag = self->hyb_in[0][qs][ts].im;
  370|  39.0M|        for (row = 0; row < (self->dir_sig_count + self->decor_sig_count);
  ------------------
  |  Branch (370:23): [True: 26.0M, False: 13.0M]
  ------------------
  371|  26.0M|             row++) {
  372|  26.0M|          self->v[row][ts][qs].re = real;
  373|  26.0M|          self->v[row][ts][qs].im = imag;
  374|  26.0M|        }
  375|  13.0M|      }
  376|   416k|    }
  377|  9.72k|  }
  378|  15.1k|  return;
  379|  15.1k|}
ixheaacd_mps_apply_mix_matrix_type1:
  587|  11.2k|VOID ixheaacd_mps_apply_mix_matrix_type1(ia_mps_dec_state_struct *self) {
  588|  11.2k|  WORD32 ts, qs, row;
  589|       |
  590|  11.2k|  ixheaacd_mps_upmix_interp_type2(self->m2_decor_re, self->r_out_diff_re_in_m2,
  591|  11.2k|                                  self->m2_decor_re_prev, self->out_ch_count, self, 1);
  592|       |
  593|  11.2k|  ixheaacd_mps_upmix_interp_type2(self->m2_resid_re, self->r_out_re_in_m2, self->m2_resid_re_prev,
  594|  11.2k|                                  self->out_ch_count, self, 0);
  595|       |
  596|   570k|  for (qs = 0; qs < self->hyb_band_count[0]; qs++) {
  ------------------
  |  Branch (596:16): [True: 558k, False: 11.2k]
  ------------------
  597|   558k|    WORD32 indx = self->hyb_band_to_processing_band_table[qs];
  598|  17.9M|    for (ts = 0; ts < self->time_slots; ts++) {
  ------------------
  |  Branch (598:18): [True: 17.4M, False: 558k]
  ------------------
  599|  52.2M|      for (row = 0; row < self->out_ch_count; row++) {
  ------------------
  |  Branch (599:21): [True: 34.8M, False: 17.4M]
  ------------------
  600|  34.8M|        self->hyb_dir_out[row][ts][qs].re =
  601|  34.8M|            self->w_dir[0][ts][qs].re * self->r_out_re_in_m2[ts][indx][row][0];
  602|  34.8M|        self->hyb_dir_out[row][ts][qs].im =
  603|  34.8M|            self->w_dir[0][ts][qs].im * self->r_out_re_in_m2[ts][indx][row][0];
  604|  34.8M|        self->hyb_diff_out[row][ts][qs].re =
  605|  34.8M|            self->w_diff[1][ts][qs].re *
  606|  34.8M|            self->r_out_diff_re_in_m2[ts][indx][row][1];
  607|  34.8M|        self->hyb_diff_out[row][ts][qs].im =
  608|  34.8M|            self->w_diff[1][ts][qs].im *
  609|  34.8M|            self->r_out_diff_re_in_m2[ts][indx][row][1];
  610|  34.8M|      }
  611|  17.4M|    }
  612|   558k|  }
  613|  11.2k|  return;
  614|  11.2k|}
ixheaacd_mps_apply_mix_matrix_type2:
  616|  5.44k|VOID ixheaacd_mps_apply_mix_matrix_type2(ia_mps_dec_state_struct *self) {
  617|  5.44k|  WORD32 ts, qs, row, col;
  618|  5.44k|  WORD32 complex_m2 = ((self->config->bs_phase_coding != 0));
  619|  5.44k|  WORD32 phase_interpolation = (self->config->bs_phase_coding == 1);
  620|  5.44k|  WORD32 num_col_iters = 0;
  621|       |
  622|  5.44k|  ixheaacd_mps_upmix_interp_type1(self->m2_decor_re, self->r_out_diff_re_in_m2,
  623|  5.44k|                                  self->m2_decor_re_prev, self->out_ch_count,
  624|  5.44k|                                  (self->dir_sig_count + self->decor_sig_count), self, 1);
  625|  5.44k|  ixheaacd_mps_upmix_interp_type1(self->m2_resid_re, self->r_out_re_in_m2, self->m2_resid_re_prev,
  626|  5.44k|                                  self->out_ch_count,
  627|  5.44k|                                  (self->dir_sig_count + self->decor_sig_count), self, 1);
  628|       |
  629|  5.44k|  if (complex_m2 && !phase_interpolation) {
  ------------------
  |  Branch (629:7): [True: 4.57k, False: 877]
  |  Branch (629:21): [True: 2.85k, False: 1.72k]
  ------------------
  630|  2.85k|    ixheaacd_mps_upmix_interp_type1(self->m2_decor_im, self->r_out_diff_im_in_m2,
  631|  2.85k|                                    self->m2_decor_im_prev, self->out_ch_count,
  632|  2.85k|                                    (self->dir_sig_count + self->decor_sig_count), self, 1);
  633|  2.85k|    ixheaacd_mps_upmix_interp_type1(self->m2_resid_im, self->r_out_im_in_m2,
  634|  2.85k|                                    self->m2_resid_im_prev, self->out_ch_count,
  635|  2.85k|                                    (self->dir_sig_count + self->decor_sig_count), self, 1);
  636|  2.85k|  }
  637|       |
  638|  5.44k|  if (phase_interpolation) {
  ------------------
  |  Branch (638:7): [True: 1.72k, False: 3.72k]
  ------------------
  639|  1.72k|    ixheaacd_mps_phase_interpolation(
  640|  1.72k|        self->phase_l, self->phase_r, self->phase_l_prev, self->phase_r_prev,
  641|  1.72k|        self->r_out_ph_re_in_m2, self->r_out_ph_im_in_m2, self);
  642|       |
  643|  56.9k|    for (ts = 0; ts < self->time_slots; ts++) {
  ------------------
  |  Branch (643:18): [True: 55.2k, False: 1.72k]
  ------------------
  644|  55.2k|      WORD32 pb;
  645|  1.00M|      for (pb = 0; pb < self->bs_param_bands; pb++) {
  ------------------
  |  Branch (645:20): [True: 951k, False: 55.2k]
  ------------------
  646|   951k|        self->r_out_im_in_m2[ts][pb][0][0] =
  647|   951k|            self->r_out_re_in_m2[ts][pb][0][0] *
  648|   951k|            self->r_out_ph_im_in_m2[ts][pb][0];
  649|       |
  650|   951k|        self->r_out_im_in_m2[ts][pb][0][1] =
  651|   951k|            self->r_out_re_in_m2[ts][pb][0][1] *
  652|   951k|            self->r_out_ph_im_in_m2[ts][pb][0];
  653|   951k|        self->r_out_im_in_m2[ts][pb][1][0] =
  654|   951k|            self->r_out_re_in_m2[ts][pb][1][0] *
  655|   951k|            self->r_out_ph_im_in_m2[ts][pb][1];
  656|       |
  657|   951k|        self->r_out_im_in_m2[ts][pb][1][1] =
  658|   951k|            self->r_out_re_in_m2[ts][pb][1][1] *
  659|   951k|            self->r_out_ph_im_in_m2[ts][pb][1];
  660|       |
  661|   951k|        self->r_out_re_in_m2[ts][pb][0][0] =
  662|   951k|            self->r_out_re_in_m2[ts][pb][0][0] *
  663|   951k|            self->r_out_ph_re_in_m2[ts][pb][0];
  664|       |
  665|   951k|        self->r_out_re_in_m2[ts][pb][0][1] =
  666|   951k|            self->r_out_re_in_m2[ts][pb][0][1] *
  667|   951k|            self->r_out_ph_re_in_m2[ts][pb][0];
  668|       |
  669|   951k|        self->r_out_re_in_m2[ts][pb][1][0] =
  670|   951k|            self->r_out_re_in_m2[ts][pb][1][0] *
  671|   951k|            self->r_out_ph_re_in_m2[ts][pb][1];
  672|       |
  673|   951k|        self->r_out_re_in_m2[ts][pb][1][1] =
  674|   951k|            self->r_out_re_in_m2[ts][pb][1][1] *
  675|   951k|            self->r_out_ph_re_in_m2[ts][pb][1];
  676|       |
  677|   951k|        self->r_out_diff_im_in_m2[ts][pb][0][0] = 0;
  678|   951k|        self->r_out_diff_im_in_m2[ts][pb][0][1] =
  679|   951k|            self->r_out_diff_re_in_m2[ts][pb][0][1] *
  680|   951k|            self->r_out_ph_im_in_m2[ts][pb][0];
  681|       |
  682|   951k|        self->r_out_diff_im_in_m2[ts][pb][1][0] = 0;
  683|   951k|        self->r_out_diff_im_in_m2[ts][pb][1][1] =
  684|   951k|            self->r_out_diff_re_in_m2[ts][pb][1][1] *
  685|   951k|            self->r_out_ph_im_in_m2[ts][pb][1];
  686|       |
  687|   951k|        self->r_out_diff_re_in_m2[ts][pb][0][0] = 0;
  688|   951k|        self->r_out_diff_re_in_m2[ts][pb][0][1] =
  689|   951k|            self->r_out_diff_re_in_m2[ts][pb][0][1] *
  690|   951k|            self->r_out_ph_re_in_m2[ts][pb][0];
  691|       |
  692|   951k|        self->r_out_diff_re_in_m2[ts][pb][1][0] = 0;
  693|   951k|        self->r_out_diff_re_in_m2[ts][pb][1][1] =
  694|   951k|            self->r_out_diff_re_in_m2[ts][pb][1][1] *
  695|   951k|            self->r_out_ph_re_in_m2[ts][pb][1];
  696|   951k|      }
  697|  55.2k|    }
  698|  1.72k|  }
  699|  5.44k|  if (self->res_bands == 0) {
  ------------------
  |  Branch (699:7): [True: 2.34k, False: 3.10k]
  ------------------
  700|  2.34k|    num_col_iters = self->dir_sig_count;
  701|  3.10k|  } else {
  702|  3.10k|    num_col_iters = (self->dir_sig_count + self->decor_sig_count);
  703|  3.10k|  }
  704|   249k|  for (ts = 0; ts < self->time_slots; ts++) {
  ------------------
  |  Branch (704:16): [True: 243k, False: 5.44k]
  ------------------
  705|  9.88M|    for (qs = 0; qs < self->hyb_band_count_max; qs++) {
  ------------------
  |  Branch (705:18): [True: 9.63M, False: 243k]
  ------------------
  706|  9.63M|      WORD32 indx = self->hyb_band_to_processing_band_table[qs];
  707|       |
  708|  28.9M|      for (row = 0; row < self->out_ch_count; row++) {
  ------------------
  |  Branch (708:21): [True: 19.2M, False: 9.63M]
  ------------------
  709|  19.2M|        FLOAT32 sum_re_dir = 0;
  710|  19.2M|        FLOAT32 sum_im_dir = 0;
  711|  48.9M|        for (col = 0; col < num_col_iters; col++) {
  ------------------
  |  Branch (711:23): [True: 29.7M, False: 19.2M]
  ------------------
  712|  29.7M|          sum_re_dir += self->w_dir[col][ts][qs].re *
  713|  29.7M|                        self->r_out_re_in_m2[ts][indx][row][col];
  714|  29.7M|          sum_im_dir += self->w_dir[col][ts][qs].im *
  715|  29.7M|                        self->r_out_re_in_m2[ts][indx][row][col];
  716|  29.7M|        }
  717|  19.2M|        self->hyb_dir_out[row][ts][qs].re = sum_re_dir;
  718|  19.2M|        self->hyb_dir_out[row][ts][qs].im = sum_im_dir;
  719|       |
  720|  19.2M|        self->hyb_diff_out[row][ts][qs].re =
  721|  19.2M|            self->w_diff[1][ts][qs].re *
  722|  19.2M|            self->r_out_diff_re_in_m2[ts][indx][row][1];
  723|  19.2M|        self->hyb_diff_out[row][ts][qs].im =
  724|  19.2M|            self->w_diff[1][ts][qs].im *
  725|  19.2M|            self->r_out_diff_re_in_m2[ts][indx][row][1];
  726|  19.2M|      }
  727|  9.63M|    }
  728|   243k|  }
  729|       |
  730|  5.44k|  if (complex_m2) {
  ------------------
  |  Branch (730:7): [True: 4.57k, False: 877]
  ------------------
  731|  4.57k|    if (phase_interpolation) {
  ------------------
  |  Branch (731:9): [True: 1.72k, False: 2.85k]
  ------------------
  732|  56.9k|      for (ts = 0; ts < self->time_slots; ts++) {
  ------------------
  |  Branch (732:20): [True: 55.2k, False: 1.72k]
  ------------------
  733|   165k|        for (qs = 0; qs < 2; qs++) {
  ------------------
  |  Branch (733:22): [True: 110k, False: 55.2k]
  ------------------
  734|   110k|          WORD32 indx = self->hyb_band_to_processing_band_table[qs];
  735|   331k|          for (row = 0; row < self->out_ch_count; row++) {
  ------------------
  |  Branch (735:25): [True: 220k, False: 110k]
  ------------------
  736|   220k|            FLOAT32 sum_re_dir = self->hyb_dir_out[row][ts][qs].re;
  737|   220k|            FLOAT32 sum_im_dir = self->hyb_dir_out[row][ts][qs].im;
  738|   441k|            for (col = 0; col < num_col_iters; col++) {
  ------------------
  |  Branch (738:27): [True: 220k, False: 220k]
  ------------------
  739|   220k|              sum_re_dir += self->w_dir[col][ts][qs].im *
  740|   220k|                            self->r_out_im_in_m2[ts][indx][row][col];
  741|   220k|              sum_im_dir -= self->w_dir[col][ts][qs].re *
  742|   220k|                            self->r_out_im_in_m2[ts][indx][row][col];
  743|   220k|            }
  744|   220k|            self->hyb_dir_out[row][ts][qs].re = sum_re_dir;
  745|   220k|            self->hyb_dir_out[row][ts][qs].im = sum_im_dir;
  746|   220k|            self->hyb_diff_out[row][ts][qs].re +=
  747|   220k|                self->w_diff[1][ts][qs].im *
  748|   220k|                self->r_out_diff_im_in_m2[ts][indx][row][1];
  749|   220k|            self->hyb_diff_out[row][ts][qs].im -=
  750|   220k|                self->w_diff[1][ts][qs].re *
  751|   220k|                self->r_out_diff_im_in_m2[ts][indx][row][1];
  752|   220k|          }
  753|   110k|        }
  754|  3.63M|        for (qs = 2; qs < self->hyb_band_count_max; qs++) {
  ------------------
  |  Branch (754:22): [True: 3.58M, False: 55.2k]
  ------------------
  755|  3.58M|          WORD32 indx = self->hyb_band_to_processing_band_table[qs];
  756|  10.7M|          for (row = 0; row < self->out_ch_count; row++) {
  ------------------
  |  Branch (756:25): [True: 7.16M, False: 3.58M]
  ------------------
  757|  7.16M|            FLOAT32 sum_re_dir = self->hyb_dir_out[row][ts][qs].re;
  758|  7.16M|            FLOAT32 sum_im_dir = self->hyb_dir_out[row][ts][qs].im;
  759|  14.3M|            for (col = 0; col < num_col_iters; col++) {
  ------------------
  |  Branch (759:27): [True: 7.16M, False: 7.16M]
  ------------------
  760|  7.16M|              sum_re_dir -= self->w_dir[col][ts][qs].im *
  761|  7.16M|                            self->r_out_im_in_m2[ts][indx][row][col];
  762|  7.16M|              sum_im_dir += self->w_dir[col][ts][qs].re *
  763|  7.16M|                            self->r_out_im_in_m2[ts][indx][row][col];
  764|  7.16M|            }
  765|  7.16M|            self->hyb_dir_out[row][ts][qs].re = sum_re_dir;
  766|  7.16M|            self->hyb_dir_out[row][ts][qs].im = sum_im_dir;
  767|  7.16M|            self->hyb_diff_out[row][ts][qs].re -=
  768|  7.16M|                self->w_diff[1][ts][qs].im *
  769|  7.16M|                self->r_out_diff_im_in_m2[ts][indx][row][1];
  770|  7.16M|            self->hyb_diff_out[row][ts][qs].im +=
  771|  7.16M|                self->w_diff[1][ts][qs].re *
  772|  7.16M|                self->r_out_diff_im_in_m2[ts][indx][row][1];
  773|  7.16M|          }
  774|  3.58M|        }
  775|  55.2k|      }
  776|  2.85k|    } else {
  777|  2.85k|      WORD32 num_cols = (self->dir_sig_count + self->decor_sig_count) > 1
  ------------------
  |  Branch (777:25): [True: 2.85k, False: 0]
  ------------------
  778|  2.85k|                         ? 1
  779|  2.85k|                         : (self->dir_sig_count + self->decor_sig_count);
  780|   167k|      for (ts = 0; ts < self->time_slots; ts++) {
  ------------------
  |  Branch (780:20): [True: 164k, False: 2.85k]
  ------------------
  781|   492k|        for (qs = 0; qs < 2; qs++) {
  ------------------
  |  Branch (781:22): [True: 328k, False: 164k]
  ------------------
  782|   328k|          WORD32 indx = self->hyb_band_to_processing_band_table[qs];
  783|   984k|          for (row = 0; row < self->out_ch_count; row++) {
  ------------------
  |  Branch (783:25): [True: 656k, False: 328k]
  ------------------
  784|   656k|            FLOAT32 sum_re_dir = self->hyb_dir_out[row][ts][qs].re;
  785|   656k|            FLOAT32 sum_im_dir = self->hyb_dir_out[row][ts][qs].im;
  786|   656k|            if (num_cols > 0) {
  ------------------
  |  Branch (786:17): [True: 656k, False: 0]
  ------------------
  787|   656k|              sum_re_dir += self->w_dir[0][ts][qs].im *
  788|   656k|                            self->r_out_im_in_m2[ts][indx][row][0];
  789|   656k|              sum_im_dir -= self->w_dir[0][ts][qs].re *
  790|   656k|                            self->r_out_im_in_m2[ts][indx][row][0];
  791|   656k|            }
  792|   656k|            self->hyb_dir_out[row][ts][qs].re = sum_re_dir;
  793|   656k|            self->hyb_dir_out[row][ts][qs].im = sum_im_dir;
  794|   656k|          }
  795|   328k|        }
  796|  4.65M|        for (qs = 2; qs < self->hyb_band_count_max; qs++) {
  ------------------
  |  Branch (796:22): [True: 4.49M, False: 164k]
  ------------------
  797|  4.49M|          WORD32 indx = self->hyb_band_to_processing_band_table[qs];
  798|  13.4M|          for (row = 0; row < self->out_ch_count; row++) {
  ------------------
  |  Branch (798:25): [True: 8.98M, False: 4.49M]
  ------------------
  799|  8.98M|            FLOAT32 sum_re_dir = self->hyb_dir_out[row][ts][qs].re;
  800|  8.98M|            FLOAT32 sum_im_dir = self->hyb_dir_out[row][ts][qs].im;
  801|  8.98M|            if (num_cols > 0) {
  ------------------
  |  Branch (801:17): [True: 8.98M, False: 0]
  ------------------
  802|  8.98M|              sum_re_dir -= self->w_dir[0][ts][qs].im *
  803|  8.98M|                            self->r_out_im_in_m2[ts][indx][row][0];
  804|  8.98M|              sum_im_dir += self->w_dir[0][ts][qs].re *
  805|  8.98M|                            self->r_out_im_in_m2[ts][indx][row][0];
  806|  8.98M|            }
  807|  8.98M|            self->hyb_dir_out[row][ts][qs].re = sum_re_dir;
  808|  8.98M|            self->hyb_dir_out[row][ts][qs].im = sum_im_dir;
  809|  8.98M|          }
  810|  4.49M|        }
  811|   164k|      }
  812|  2.85k|    }
  813|  4.57k|  }
  814|  5.44k|  return;
  815|  5.44k|}
ixheaacd_mps_apply_mix_matrix_type3:
  817|  62.7k|VOID ixheaacd_mps_apply_mix_matrix_type3(ia_mps_dec_state_struct *self) {
  818|  62.7k|  WORD32 ts, qs, row, col;
  819|  62.7k|  WORD32 complex_m2 = ((self->config->bs_phase_coding != 0));
  820|  62.7k|  WORD32 phase_interpolation = (self->config->bs_phase_coding == 1);
  821|  62.7k|  WORD32 num_col_iters = 0;
  822|       |
  823|  62.7k|  if (self->res_bands != 28) {
  ------------------
  |  Branch (823:7): [True: 52.0k, False: 10.7k]
  ------------------
  824|  52.0k|    ixheaacd_mps_upmix_interp_type2(self->m2_decor_re, self->r_out_diff_re_in_m2,
  825|  52.0k|                                    self->m2_decor_re_prev, self->out_ch_count, self, 1);
  826|  52.0k|  }
  827|  62.7k|  if (self->res_bands == 0) {
  ------------------
  |  Branch (827:7): [True: 19.7k, False: 43.0k]
  ------------------
  828|  19.7k|    num_col_iters = self->dir_sig_count;
  829|  19.7k|    ixheaacd_mps_upmix_interp_type2(self->m2_resid_re, self->r_out_re_in_m2,
  830|  19.7k|                                    self->m2_resid_re_prev, self->out_ch_count, self, 0);
  831|  43.0k|  } else {
  832|  43.0k|    num_col_iters = (self->dir_sig_count + self->decor_sig_count);
  833|  43.0k|    ixheaacd_mps_upmix_interp_type1(self->m2_resid_re, self->r_out_re_in_m2,
  834|  43.0k|                                    self->m2_resid_re_prev, self->out_ch_count,
  835|  43.0k|                                    (self->dir_sig_count + self->decor_sig_count), self, 1);
  836|  43.0k|  }
  837|       |
  838|  62.7k|  if (complex_m2 && !phase_interpolation) {
  ------------------
  |  Branch (838:7): [True: 57.4k, False: 5.29k]
  |  Branch (838:21): [True: 48.0k, False: 9.41k]
  ------------------
  839|  48.0k|    ixheaacd_mps_upmix_interp_type2(self->m2_resid_im, self->r_out_im_in_m2,
  840|  48.0k|                                    self->m2_resid_im_prev, self->out_ch_count, self, 0);
  841|  48.0k|  }
  842|       |
  843|  62.7k|  if (phase_interpolation) {
  ------------------
  |  Branch (843:7): [True: 9.41k, False: 53.3k]
  ------------------
  844|  9.41k|    ixheaacd_mps_phase_interpolation(
  845|  9.41k|        self->phase_l, self->phase_r, self->phase_l_prev, self->phase_r_prev,
  846|  9.41k|        self->r_out_ph_re_in_m2, self->r_out_ph_im_in_m2, self);
  847|       |
  848|  9.41k|    if (self->res_bands == 0) {
  ------------------
  |  Branch (848:9): [True: 9.41k, False: 0]
  ------------------
  849|   310k|      for (ts = 0; ts < self->time_slots; ts++) {
  ------------------
  |  Branch (849:20): [True: 301k, False: 9.41k]
  ------------------
  850|   301k|        WORD32 pb;
  851|  3.12M|        for (pb = 0; pb < self->bs_param_bands; pb++) {
  ------------------
  |  Branch (851:22): [True: 2.82M, False: 301k]
  ------------------
  852|  2.82M|          self->r_out_im_in_m2[ts][pb][0][0] =
  853|  2.82M|              self->r_out_re_in_m2[ts][pb][0][0] *
  854|  2.82M|              self->r_out_ph_im_in_m2[ts][pb][0];
  855|       |
  856|  2.82M|          self->r_out_im_in_m2[ts][pb][1][0] =
  857|  2.82M|              self->r_out_re_in_m2[ts][pb][1][0] *
  858|  2.82M|              self->r_out_ph_im_in_m2[ts][pb][1];
  859|       |
  860|  2.82M|          self->r_out_re_in_m2[ts][pb][0][0] =
  861|  2.82M|              self->r_out_re_in_m2[ts][pb][0][0] *
  862|  2.82M|              self->r_out_ph_re_in_m2[ts][pb][0];
  863|       |
  864|  2.82M|          self->r_out_re_in_m2[ts][pb][1][0] =
  865|  2.82M|              self->r_out_re_in_m2[ts][pb][1][0] *
  866|  2.82M|              self->r_out_ph_re_in_m2[ts][pb][1];
  867|       |
  868|  2.82M|          self->r_out_diff_im_in_m2[ts][pb][0][1] =
  869|  2.82M|              self->r_out_diff_re_in_m2[ts][pb][0][1] *
  870|  2.82M|              self->r_out_ph_im_in_m2[ts][pb][0];
  871|       |
  872|  2.82M|          self->r_out_diff_im_in_m2[ts][pb][1][1] =
  873|  2.82M|              self->r_out_diff_re_in_m2[ts][pb][1][1] *
  874|  2.82M|              self->r_out_ph_im_in_m2[ts][pb][1];
  875|       |
  876|  2.82M|          self->r_out_diff_re_in_m2[ts][pb][0][1] =
  877|  2.82M|              self->r_out_diff_re_in_m2[ts][pb][0][1] *
  878|  2.82M|              self->r_out_ph_re_in_m2[ts][pb][0];
  879|       |
  880|  2.82M|          self->r_out_diff_re_in_m2[ts][pb][1][1] =
  881|  2.82M|              self->r_out_diff_re_in_m2[ts][pb][1][1] *
  882|  2.82M|              self->r_out_ph_re_in_m2[ts][pb][1];
  883|  2.82M|        }
  884|   301k|      }
  885|  9.41k|    } else if (self->res_bands == 28) {
  ------------------
  |  Branch (885:16): [True: 0, False: 0]
  ------------------
  886|      0|      for (ts = 0; ts < self->time_slots; ts++) {
  ------------------
  |  Branch (886:20): [True: 0, False: 0]
  ------------------
  887|      0|        WORD32 pb;
  888|      0|        for (pb = 0; pb < self->bs_param_bands; pb++) {
  ------------------
  |  Branch (888:22): [True: 0, False: 0]
  ------------------
  889|      0|          self->r_out_im_in_m2[ts][pb][0][0] =
  890|      0|              self->r_out_re_in_m2[ts][pb][0][0] *
  891|      0|              self->r_out_ph_im_in_m2[ts][pb][0];
  892|       |
  893|      0|          self->r_out_im_in_m2[ts][pb][0][1] =
  894|      0|              self->r_out_re_in_m2[ts][pb][0][1] *
  895|      0|              self->r_out_ph_im_in_m2[ts][pb][0];
  896|       |
  897|      0|          self->r_out_im_in_m2[ts][pb][1][0] =
  898|      0|              self->r_out_re_in_m2[ts][pb][1][0] *
  899|      0|              self->r_out_ph_im_in_m2[ts][pb][1];
  900|       |
  901|      0|          self->r_out_im_in_m2[ts][pb][1][1] =
  902|      0|              self->r_out_re_in_m2[ts][pb][1][1] *
  903|      0|              self->r_out_ph_im_in_m2[ts][pb][1];
  904|       |
  905|      0|          self->r_out_re_in_m2[ts][pb][0][0] =
  906|      0|              self->r_out_re_in_m2[ts][pb][0][0] *
  907|      0|              self->r_out_ph_re_in_m2[ts][pb][0];
  908|       |
  909|      0|          self->r_out_re_in_m2[ts][pb][0][1] =
  910|      0|              self->r_out_re_in_m2[ts][pb][0][1] *
  911|      0|              self->r_out_ph_re_in_m2[ts][pb][0];
  912|       |
  913|      0|          self->r_out_re_in_m2[ts][pb][1][0] =
  914|      0|              self->r_out_re_in_m2[ts][pb][1][0] *
  915|      0|              self->r_out_ph_re_in_m2[ts][pb][1];
  916|       |
  917|      0|          self->r_out_re_in_m2[ts][pb][1][1] =
  918|      0|              self->r_out_re_in_m2[ts][pb][1][1] *
  919|      0|              self->r_out_ph_re_in_m2[ts][pb][1];
  920|      0|        }
  921|      0|      }
  922|      0|    } else {
  923|      0|      for (ts = 0; ts < self->time_slots; ts++) {
  ------------------
  |  Branch (923:20): [True: 0, False: 0]
  ------------------
  924|      0|        WORD32 pb;
  925|      0|        for (pb = 0; pb < self->bs_param_bands; pb++) {
  ------------------
  |  Branch (925:22): [True: 0, False: 0]
  ------------------
  926|      0|          self->r_out_im_in_m2[ts][pb][0][0] =
  927|      0|              self->r_out_re_in_m2[ts][pb][0][0] *
  928|      0|              self->r_out_ph_im_in_m2[ts][pb][0];
  929|       |
  930|      0|          self->r_out_im_in_m2[ts][pb][0][1] =
  931|      0|              self->r_out_re_in_m2[ts][pb][0][1] *
  932|      0|              self->r_out_ph_im_in_m2[ts][pb][0];
  933|       |
  934|      0|          self->r_out_im_in_m2[ts][pb][1][0] =
  935|      0|              self->r_out_re_in_m2[ts][pb][1][0] *
  936|      0|              self->r_out_ph_im_in_m2[ts][pb][1];
  937|       |
  938|      0|          self->r_out_im_in_m2[ts][pb][1][1] =
  939|      0|              self->r_out_re_in_m2[ts][pb][1][1] *
  940|      0|              self->r_out_ph_im_in_m2[ts][pb][1];
  941|       |
  942|      0|          self->r_out_re_in_m2[ts][pb][0][0] =
  943|      0|              self->r_out_re_in_m2[ts][pb][0][0] *
  944|      0|              self->r_out_ph_re_in_m2[ts][pb][0];
  945|       |
  946|      0|          self->r_out_re_in_m2[ts][pb][0][1] =
  947|      0|              self->r_out_re_in_m2[ts][pb][0][1] *
  948|      0|              self->r_out_ph_re_in_m2[ts][pb][0];
  949|       |
  950|      0|          self->r_out_re_in_m2[ts][pb][1][0] =
  951|      0|              self->r_out_re_in_m2[ts][pb][1][0] *
  952|      0|              self->r_out_ph_re_in_m2[ts][pb][1];
  953|       |
  954|      0|          self->r_out_re_in_m2[ts][pb][1][1] =
  955|      0|              self->r_out_re_in_m2[ts][pb][1][1] *
  956|      0|              self->r_out_ph_re_in_m2[ts][pb][1];
  957|       |
  958|      0|          self->r_out_diff_im_in_m2[ts][pb][0][1] =
  959|      0|              self->r_out_diff_re_in_m2[ts][pb][0][1] *
  960|      0|              self->r_out_ph_im_in_m2[ts][pb][0];
  961|       |
  962|      0|          self->r_out_diff_im_in_m2[ts][pb][1][1] =
  963|      0|              self->r_out_diff_re_in_m2[ts][pb][1][1] *
  964|      0|              self->r_out_ph_im_in_m2[ts][pb][1];
  965|       |
  966|      0|          self->r_out_diff_re_in_m2[ts][pb][0][1] =
  967|      0|              self->r_out_diff_re_in_m2[ts][pb][0][1] *
  968|      0|              self->r_out_ph_re_in_m2[ts][pb][0];
  969|       |
  970|      0|          self->r_out_diff_re_in_m2[ts][pb][1][1] =
  971|      0|              self->r_out_diff_re_in_m2[ts][pb][1][1] *
  972|      0|              self->r_out_ph_re_in_m2[ts][pb][1];
  973|      0|        }
  974|      0|      }
  975|      0|    }
  976|  9.41k|  }
  977|  62.7k|  if (self->res_bands == 0) {
  ------------------
  |  Branch (977:7): [True: 19.7k, False: 43.0k]
  ------------------
  978|   655k|    for (ts = 0; ts < self->time_slots; ts++) {
  ------------------
  |  Branch (978:18): [True: 635k, False: 19.7k]
  ------------------
  979|  27.3M|      for (qs = 0; qs < self->hyb_band_count[0]; qs++) {
  ------------------
  |  Branch (979:20): [True: 26.6M, False: 635k]
  ------------------
  980|  26.6M|        WORD32 indx = self->hyb_band_to_processing_band_table[qs];
  981|  80.0M|        for (row = 0; row < self->out_ch_count; row++) {
  ------------------
  |  Branch (981:23): [True: 53.3M, False: 26.6M]
  ------------------
  982|  53.3M|          self->hyb_dir_out[row][ts][qs].re =
  983|  53.3M|              self->w_dir[0][ts][qs].re *
  984|  53.3M|              self->r_out_re_in_m2[ts][indx][row][0];
  985|  53.3M|          self->hyb_dir_out[row][ts][qs].im =
  986|  53.3M|              self->w_dir[0][ts][qs].im *
  987|  53.3M|              self->r_out_re_in_m2[ts][indx][row][0];
  988|  53.3M|          self->hyb_diff_out[row][ts][qs].re =
  989|  53.3M|              self->w_diff[1][ts][qs].re *
  990|  53.3M|              self->r_out_diff_re_in_m2[ts][indx][row][1];
  991|  53.3M|          self->hyb_diff_out[row][ts][qs].im =
  992|  53.3M|              self->w_diff[1][ts][qs].im *
  993|  53.3M|              self->r_out_diff_re_in_m2[ts][indx][row][1];
  994|  53.3M|        }
  995|  26.6M|      }
  996|   635k|    }
  997|  43.0k|  } else if (self->res_bands == 28) {
  ------------------
  |  Branch (997:14): [True: 10.7k, False: 32.2k]
  ------------------
  998|   355k|    for (ts = 0; ts < self->time_slots; ts++) {
  ------------------
  |  Branch (998:18): [True: 345k, False: 10.7k]
  ------------------
  999|  13.7M|      for (qs = 0; qs < self->hyb_band_count[1]; qs++) {
  ------------------
  |  Branch (999:20): [True: 13.4M, False: 345k]
  ------------------
 1000|  13.4M|        WORD32 indx = self->hyb_band_to_processing_band_table[qs];
 1001|  40.2M|        for (row = 0; row < self->out_ch_count; row++) {
  ------------------
  |  Branch (1001:23): [True: 26.8M, False: 13.4M]
  ------------------
 1002|  26.8M|          FLOAT32 sum_re_dir = 0;
 1003|  26.8M|          FLOAT32 sum_im_dir = 0;
 1004|  80.5M|          for (col = 0; col < num_col_iters; col++) {
  ------------------
  |  Branch (1004:25): [True: 53.7M, False: 26.8M]
  ------------------
 1005|  53.7M|            sum_re_dir += self->w_dir[col][ts][qs].re *
 1006|  53.7M|                          self->r_out_re_in_m2[ts][indx][row][col];
 1007|  53.7M|            sum_im_dir += self->w_dir[col][ts][qs].im *
 1008|  53.7M|                          self->r_out_re_in_m2[ts][indx][row][col];
 1009|  53.7M|          }
 1010|  26.8M|          self->hyb_dir_out[row][ts][qs].re = sum_re_dir;
 1011|  26.8M|          self->hyb_dir_out[row][ts][qs].im = sum_im_dir;
 1012|  26.8M|        }
 1013|  13.4M|      }
 1014|   376k|      for (; qs < self->hyb_band_count[0]; qs++) {
  ------------------
  |  Branch (1014:14): [True: 31.2k, False: 345k]
  ------------------
 1015|  31.2k|        WORD32 indx = self->hyb_band_to_processing_band_table[qs];
 1016|  93.7k|        for (row = 0; row < self->out_ch_count; row++) {
  ------------------
  |  Branch (1016:23): [True: 62.5k, False: 31.2k]
  ------------------
 1017|  62.5k|          self->hyb_dir_out[row][ts][qs].re =
 1018|  62.5k|              self->w_dir[0][ts][qs].re *
 1019|  62.5k|              self->r_out_re_in_m2[ts][indx][row][0];
 1020|  62.5k|          self->hyb_dir_out[row][ts][qs].im =
 1021|  62.5k|              self->w_dir[0][ts][qs].im *
 1022|  62.5k|              self->r_out_re_in_m2[ts][indx][row][0];
 1023|  62.5k|        }
 1024|  31.2k|      }
 1025|   345k|    }
 1026|  32.2k|  } else {
 1027|  32.2k|    WORD32 dif_s = ixheaacd_mps_gain_set_indx[self->res_bands];
 1028|  1.43M|    for (ts = 0; ts < self->time_slots; ts++) {
  ------------------
  |  Branch (1028:18): [True: 1.40M, False: 32.2k]
  ------------------
 1029|  22.5M|      for (qs = 0; qs < dif_s; qs++) {
  ------------------
  |  Branch (1029:20): [True: 21.1M, False: 1.40M]
  ------------------
 1030|  21.1M|        WORD32 indx = self->hyb_band_to_processing_band_table[qs];
 1031|  63.3M|        for (row = 0; row < self->out_ch_count; row++) {
  ------------------
  |  Branch (1031:23): [True: 42.2M, False: 21.1M]
  ------------------
 1032|  42.2M|          FLOAT32 sum_re_dir = 0;
 1033|  42.2M|          FLOAT32 sum_im_dir = 0;
 1034|   126M|          for (col = 0; col < num_col_iters; col++) {
  ------------------
  |  Branch (1034:25): [True: 84.5M, False: 42.2M]
  ------------------
 1035|  84.5M|            sum_re_dir += self->w_dir[col][ts][qs].re *
 1036|  84.5M|                          self->r_out_re_in_m2[ts][indx][row][col];
 1037|  84.5M|            sum_im_dir += self->w_dir[col][ts][qs].im *
 1038|  84.5M|                          self->r_out_re_in_m2[ts][indx][row][col];
 1039|  84.5M|          }
 1040|  42.2M|          self->hyb_dir_out[row][ts][qs].re = sum_re_dir;
 1041|  42.2M|          self->hyb_dir_out[row][ts][qs].im = sum_im_dir;
 1042|  42.2M|        }
 1043|  21.1M|      }
 1044|  24.9M|      for (; qs < self->hyb_band_count[1]; qs++) {
  ------------------
  |  Branch (1044:14): [True: 23.5M, False: 1.40M]
  ------------------
 1045|  23.5M|        WORD32 indx = self->hyb_band_to_processing_band_table[qs];
 1046|  70.7M|        for (row = 0; row < self->out_ch_count; row++) {
  ------------------
  |  Branch (1046:23): [True: 47.1M, False: 23.5M]
  ------------------
 1047|  47.1M|          FLOAT32 sum_re_dir = 0;
 1048|  47.1M|          FLOAT32 sum_im_dir = 0;
 1049|   141M|          for (col = 0; col < num_col_iters; col++) {
  ------------------
  |  Branch (1049:25): [True: 94.3M, False: 47.1M]
  ------------------
 1050|  94.3M|            sum_re_dir += self->w_dir[col][ts][qs].re *
 1051|  94.3M|                          self->r_out_re_in_m2[ts][indx][row][col];
 1052|  94.3M|            sum_im_dir += self->w_dir[col][ts][qs].im *
 1053|  94.3M|                          self->r_out_re_in_m2[ts][indx][row][col];
 1054|  94.3M|          }
 1055|  47.1M|          self->hyb_dir_out[row][ts][qs].re = sum_re_dir;
 1056|  47.1M|          self->hyb_dir_out[row][ts][qs].im = sum_im_dir;
 1057|  47.1M|          self->hyb_diff_out[row][ts][qs].re =
 1058|  47.1M|              self->w_diff[1][ts][qs].re *
 1059|  47.1M|              self->r_out_diff_re_in_m2[ts][indx][row][1];
 1060|  47.1M|          self->hyb_diff_out[row][ts][qs].im =
 1061|  47.1M|              self->w_diff[1][ts][qs].im *
 1062|  47.1M|              self->r_out_diff_re_in_m2[ts][indx][row][1];
 1063|  47.1M|        }
 1064|  23.5M|      }
 1065|  17.4M|      for (; qs < self->hyb_band_count[0]; qs++) {
  ------------------
  |  Branch (1065:14): [True: 16.0M, False: 1.40M]
  ------------------
 1066|  16.0M|        WORD32 indx = self->hyb_band_to_processing_band_table[qs];
 1067|  48.2M|        for (row = 0; row < self->out_ch_count; row++) {
  ------------------
  |  Branch (1067:23): [True: 32.1M, False: 16.0M]
  ------------------
 1068|  32.1M|          self->hyb_dir_out[row][ts][qs].re =
 1069|  32.1M|              self->w_dir[0][ts][qs].re *
 1070|  32.1M|              self->r_out_re_in_m2[ts][indx][row][0];
 1071|  32.1M|          self->hyb_dir_out[row][ts][qs].im =
 1072|  32.1M|              self->w_dir[0][ts][qs].im *
 1073|  32.1M|              self->r_out_re_in_m2[ts][indx][row][0];
 1074|  32.1M|          self->hyb_diff_out[row][ts][qs].re =
 1075|  32.1M|              self->w_diff[1][ts][qs].re *
 1076|  32.1M|              self->r_out_diff_re_in_m2[ts][indx][row][1];
 1077|  32.1M|          self->hyb_diff_out[row][ts][qs].im =
 1078|  32.1M|              self->w_diff[1][ts][qs].im *
 1079|  32.1M|              self->r_out_diff_re_in_m2[ts][indx][row][1];
 1080|  32.1M|        }
 1081|  16.0M|      }
 1082|  1.40M|    }
 1083|  32.2k|  }
 1084|       |
 1085|  62.7k|  if (complex_m2) {
  ------------------
  |  Branch (1085:7): [True: 57.4k, False: 5.29k]
  ------------------
 1086|  57.4k|    if (phase_interpolation) {
  ------------------
  |  Branch (1086:9): [True: 9.41k, False: 48.0k]
  ------------------
 1087|   310k|      for (ts = 0; ts < self->time_slots; ts++) {
  ------------------
  |  Branch (1087:20): [True: 301k, False: 9.41k]
  ------------------
 1088|   903k|        for (qs = 0; qs < 2; qs++) {
  ------------------
  |  Branch (1088:22): [True: 602k, False: 301k]
  ------------------
 1089|   602k|          WORD32 indx = self->hyb_band_to_processing_band_table[qs];
 1090|  1.80M|          for (row = 0; row < self->out_ch_count; row++) {
  ------------------
  |  Branch (1090:25): [True: 1.20M, False: 602k]
  ------------------
 1091|  1.20M|            FLOAT32 sum_re_dir = self->hyb_dir_out[row][ts][qs].re;
 1092|  1.20M|            FLOAT32 sum_im_dir = self->hyb_dir_out[row][ts][qs].im;
 1093|  2.40M|            for (col = 0; col < num_col_iters; col++) {
  ------------------
  |  Branch (1093:27): [True: 1.20M, False: 1.20M]
  ------------------
 1094|  1.20M|              sum_re_dir += self->w_dir[col][ts][qs].im *
 1095|  1.20M|                            self->r_out_im_in_m2[ts][indx][row][col];
 1096|  1.20M|              sum_im_dir -= self->w_dir[col][ts][qs].re *
 1097|  1.20M|                            self->r_out_im_in_m2[ts][indx][row][col];
 1098|  1.20M|            }
 1099|  1.20M|            self->hyb_dir_out[row][ts][qs].re = sum_re_dir;
 1100|  1.20M|            self->hyb_dir_out[row][ts][qs].im = sum_im_dir;
 1101|  1.20M|            self->hyb_diff_out[row][ts][qs].re +=
 1102|  1.20M|                self->w_diff[1][ts][qs].im *
 1103|  1.20M|                self->r_out_diff_im_in_m2[ts][indx][row][1];
 1104|  1.20M|            self->hyb_diff_out[row][ts][qs].im -=
 1105|  1.20M|                self->w_diff[1][ts][qs].re *
 1106|  1.20M|                self->r_out_diff_im_in_m2[ts][indx][row][1];
 1107|  1.20M|          }
 1108|   602k|        }
 1109|  18.2M|        for (qs = 2; qs < self->hyb_band_count_max; qs++) {
  ------------------
  |  Branch (1109:22): [True: 17.9M, False: 301k]
  ------------------
 1110|  17.9M|          WORD32 indx = self->hyb_band_to_processing_band_table[qs];
 1111|  53.8M|          for (row = 0; row < self->out_ch_count; row++) {
  ------------------
  |  Branch (1111:25): [True: 35.8M, False: 17.9M]
  ------------------
 1112|  35.8M|            FLOAT32 sum_re_dir = self->hyb_dir_out[row][ts][qs].re;
 1113|  35.8M|            FLOAT32 sum_im_dir = self->hyb_dir_out[row][ts][qs].im;
 1114|  71.7M|            for (col = 0; col < num_col_iters; col++) {
  ------------------
  |  Branch (1114:27): [True: 35.8M, False: 35.8M]
  ------------------
 1115|  35.8M|              sum_re_dir -= self->w_dir[col][ts][qs].im *
 1116|  35.8M|                            self->r_out_im_in_m2[ts][indx][row][col];
 1117|  35.8M|              sum_im_dir += self->w_dir[col][ts][qs].re *
 1118|  35.8M|                            self->r_out_im_in_m2[ts][indx][row][col];
 1119|  35.8M|            }
 1120|  35.8M|            self->hyb_dir_out[row][ts][qs].re = sum_re_dir;
 1121|  35.8M|            self->hyb_dir_out[row][ts][qs].im = sum_im_dir;
 1122|  35.8M|            self->hyb_diff_out[row][ts][qs].re -=
 1123|  35.8M|                self->w_diff[1][ts][qs].im *
 1124|  35.8M|                self->r_out_diff_im_in_m2[ts][indx][row][1];
 1125|  35.8M|            self->hyb_diff_out[row][ts][qs].im +=
 1126|  35.8M|                self->w_diff[1][ts][qs].re *
 1127|  35.8M|                self->r_out_diff_im_in_m2[ts][indx][row][1];
 1128|  35.8M|          }
 1129|  17.9M|        }
 1130|   301k|      }
 1131|  48.0k|    } else {
 1132|  48.0k|      WORD32 num_cols = (self->dir_sig_count + self->decor_sig_count) > 1
  ------------------
  |  Branch (1132:25): [True: 48.0k, False: 0]
  ------------------
 1133|  48.0k|                         ? 1
 1134|  48.0k|                         : (self->dir_sig_count + self->decor_sig_count);
 1135|  1.92M|      for (ts = 0; ts < self->time_slots; ts++) {
  ------------------
  |  Branch (1135:20): [True: 1.87M, False: 48.0k]
  ------------------
 1136|  5.61M|        for (qs = 0; qs < 2; qs++) {
  ------------------
  |  Branch (1136:22): [True: 3.74M, False: 1.87M]
  ------------------
 1137|  3.74M|          WORD32 indx = self->hyb_band_to_processing_band_table[qs];
 1138|  11.2M|          for (row = 0; row < self->out_ch_count; row++) {
  ------------------
  |  Branch (1138:25): [True: 7.49M, False: 3.74M]
  ------------------
 1139|  7.49M|            FLOAT32 sum_re_dir = self->hyb_dir_out[row][ts][qs].re;
 1140|  7.49M|            FLOAT32 sum_im_dir = self->hyb_dir_out[row][ts][qs].im;
 1141|  7.49M|            if (num_cols > 0) {
  ------------------
  |  Branch (1141:17): [True: 7.49M, False: 0]
  ------------------
 1142|  7.49M|              sum_re_dir += self->w_dir[0][ts][qs].im *
 1143|  7.49M|                            self->r_out_im_in_m2[ts][indx][row][0];
 1144|  7.49M|              sum_im_dir -= self->w_dir[0][ts][qs].re *
 1145|  7.49M|                            self->r_out_im_in_m2[ts][indx][row][0];
 1146|  7.49M|            }
 1147|  7.49M|            self->hyb_dir_out[row][ts][qs].re = sum_re_dir;
 1148|  7.49M|            self->hyb_dir_out[row][ts][qs].im = sum_im_dir;
 1149|  7.49M|          }
 1150|  3.74M|        }
 1151|  73.6M|        for (qs = 2; qs < self->hyb_band_count_max; qs++) {
  ------------------
  |  Branch (1151:22): [True: 71.8M, False: 1.87M]
  ------------------
 1152|  71.8M|          WORD32 indx = self->hyb_band_to_processing_band_table[qs];
 1153|   215M|          for (row = 0; row < self->out_ch_count; row++) {
  ------------------
  |  Branch (1153:25): [True: 143M, False: 71.8M]
  ------------------
 1154|   143M|            FLOAT32 sum_re_dir = self->hyb_dir_out[row][ts][qs].re;
 1155|   143M|            FLOAT32 sum_im_dir = self->hyb_dir_out[row][ts][qs].im;
 1156|   143M|            if (num_cols > 0) {
  ------------------
  |  Branch (1156:17): [True: 143M, False: 0]
  ------------------
 1157|   143M|              sum_re_dir -= self->w_dir[0][ts][qs].im *
 1158|   143M|                            self->r_out_im_in_m2[ts][indx][row][0];
 1159|   143M|              sum_im_dir += self->w_dir[0][ts][qs].re *
 1160|   143M|                            self->r_out_im_in_m2[ts][indx][row][0];
 1161|   143M|            }
 1162|   143M|            self->hyb_dir_out[row][ts][qs].re = sum_re_dir;
 1163|   143M|            self->hyb_dir_out[row][ts][qs].im = sum_im_dir;
 1164|   143M|          }
 1165|  71.8M|        }
 1166|  1.87M|      }
 1167|  48.0k|    }
 1168|  57.4k|  }
 1169|  62.7k|  return;
 1170|  62.7k|}
ixheaacd_mps_upmix_interp_type1:
 1222|  65.0k|    WORD32 num_cols, ia_mps_dec_state_struct *self, WORD32 bs_high_rate_mode) {
 1223|  65.0k|  WORD32 ts, ps, pb, row, col, i;
 1224|  65.0k|  FLOAT32 ks, ms, ls;
 1225|  65.0k|  FLOAT32 fl_step, fl_base;
 1226|       |
 1227|   952k|  for (pb = 0; pb < self->bs_param_bands; pb++) {
  ------------------
  |  Branch (1227:16): [True: 887k, False: 65.0k]
  ------------------
 1228|  2.66M|    for (row = 0; row < num_rows; row++) {
  ------------------
  |  Branch (1228:19): [True: 1.77M, False: 887k]
  ------------------
 1229|  5.19M|      for (col = 0; col < num_cols; col++) {
  ------------------
  |  Branch (1229:21): [True: 3.41M, False: 1.77M]
  ------------------
 1230|  3.41M|        ts = 0;
 1231|  3.41M|        ps = 0;
 1232|  3.41M|        ks = self->inv_param_slot_diff[ps];
 1233|  3.41M|        ms = m_matrix[ps][pb][row][col];
 1234|  3.41M|        ls = m_matrix_prev[pb][row][col];
 1235|  3.41M|        fl_step = ks * (ms - ls);
 1236|  3.41M|        fl_base = ls + fl_step;
 1237|       |
 1238|   102M|        for (i = 1; i <= (WORD32)self->param_slot_diff[0]; i++) {
  ------------------
  |  Branch (1238:21): [True: 98.6M, False: 3.41M]
  ------------------
 1239|  98.6M|          r_matrix_float[ts][pb][row][col] = fl_base;
 1240|  98.6M|          fl_base += fl_step;
 1241|  98.6M|          ts++;
 1242|  98.6M|        }
 1243|  3.41M|        if (bs_high_rate_mode) {
  ------------------
  |  Branch (1243:13): [True: 3.40M, False: 18.4k]
  ------------------
 1244|  5.00M|          for (ps = 1; ps < self->num_parameter_sets; ps++) {
  ------------------
  |  Branch (1244:24): [True: 1.60M, False: 3.40M]
  ------------------
 1245|  1.60M|            ks = self->inv_param_slot_diff[ps];
 1246|  1.60M|            ms = m_matrix[ps][pb][row][col];
 1247|  1.60M|            ls = m_matrix[ps - 1][pb][row][col];
 1248|  1.60M|            fl_step = ks * (ms - ls);
 1249|  1.60M|            fl_base = ls + fl_step;
 1250|       |
 1251|  29.5M|            for (i = 1; i <= self->param_slot_diff[ps]; i++) {
  ------------------
  |  Branch (1251:25): [True: 27.9M, False: 1.60M]
  ------------------
 1252|  27.9M|              r_matrix_float[ts][pb][row][col] = fl_base;
 1253|  27.9M|              fl_base += fl_step;
 1254|  27.9M|              ts++;
 1255|  27.9M|            }
 1256|  1.60M|          }
 1257|  3.40M|        }
 1258|  3.41M|      }
 1259|  1.77M|    }
 1260|   887k|  }
 1261|  65.0k|  return;
 1262|  65.0k|}
ixheaacd_mps_upmix_interp_type2:
 1268|   142k|    ia_mps_dec_state_struct *self, WORD32 col) {
 1269|   142k|  WORD32 ts, ps, pb, row, i;
 1270|   142k|  FLOAT32 ks, ms, ls;
 1271|   142k|  FLOAT32 fl_step, fl_base;
 1272|       |
 1273|  1.98M|  for (pb = 0; pb < self->bs_param_bands; pb++) {
  ------------------
  |  Branch (1273:16): [True: 1.83M, False: 142k]
  ------------------
 1274|  5.51M|    for (row = 0; row < num_rows; row++) {
  ------------------
  |  Branch (1274:19): [True: 3.67M, False: 1.83M]
  ------------------
 1275|  3.67M|      ts = 0;
 1276|  3.67M|      ps = 0;
 1277|  3.67M|      ks = self->inv_param_slot_diff[ps];
 1278|  3.67M|      ms = m_matrix[ps][pb][row][col];
 1279|  3.67M|      ls = m_matrix_prev[pb][row][col];
 1280|  3.67M|      fl_step = ks * (ms - ls);
 1281|  3.67M|      fl_base = ls + fl_step;
 1282|       |
 1283|   122M|      for (i = 1; i <= (WORD32)self->param_slot_diff[0]; i++) {
  ------------------
  |  Branch (1283:19): [True: 118M, False: 3.67M]
  ------------------
 1284|   118M|        r_matrix_float[ts][pb][row][col] = fl_base;
 1285|   118M|        fl_base += fl_step;
 1286|   118M|        ts++;
 1287|   118M|      }
 1288|  4.06M|      for (ps = 1; ps < self->num_parameter_sets; ps++) {
  ------------------
  |  Branch (1288:20): [True: 387k, False: 3.67M]
  ------------------
 1289|   387k|        ks = self->inv_param_slot_diff[ps];
 1290|   387k|        ms = m_matrix[ps][pb][row][col];
 1291|   387k|        ls = m_matrix[ps - 1][pb][row][col];
 1292|   387k|        fl_step = ks * (ms - ls);
 1293|   387k|        fl_base = ls + fl_step;
 1294|       |
 1295|  6.03M|        for (i = 1; i <= (WORD32)self->param_slot_diff[ps]; i++) {
  ------------------
  |  Branch (1295:21): [True: 5.64M, False: 387k]
  ------------------
 1296|  5.64M|          r_matrix_float[ts][pb][row][col] = fl_base;
 1297|  5.64M|          fl_base += fl_step;
 1298|  5.64M|          ts++;
 1299|  5.64M|        }
 1300|   387k|      }
 1301|  3.67M|    }
 1302|  1.83M|  }
 1303|   142k|  return;
 1304|   142k|}
ixheaacd_mps_phase_interpolation:
 1324|  11.1k|    ia_mps_dec_state_struct *self) {
 1325|  11.1k|  WORD32 i, ts, ps, pb;
 1326|  11.1k|  FLOAT32 step_l, step_r, alpha, tl, tr;
 1327|   129k|  for (pb = 0; pb < self->bs_param_bands; pb++) {
  ------------------
  |  Branch (1327:16): [True: 118k, False: 11.1k]
  ------------------
 1328|   118k|    ps = 0;
 1329|   118k|    ts = 0;
 1330|   118k|    alpha = (FLOAT32)self->inv_param_slot_diff[ps];
 1331|   118k|    tl = ixheaacd_mps_angle_interpolation(pl_prev[pb], pl[ps][pb], alpha,
 1332|   118k|                                          &step_l);
 1333|   118k|    tr = ixheaacd_mps_angle_interpolation(pr_prev[pb], pr[ps][pb], alpha,
 1334|   118k|                                          &step_r);
 1335|   118k|    step_l *= alpha;
 1336|   118k|    step_r *= alpha;
 1337|       |
 1338|  3.06M|    for (i = 1; i <= self->param_slot_diff[ps]; i++) {
  ------------------
  |  Branch (1338:17): [True: 2.94M, False: 118k]
  ------------------
 1339|  2.94M|      r_re[ts][pb][0] = (FLOAT32)cos(tl);
 1340|  2.94M|      r_im[ts][pb][0] = (FLOAT32)sin(tl);
 1341|  2.94M|      tl += step_l;
 1342|       |
 1343|  2.94M|      r_re[ts][pb][1] = (FLOAT32)cos(tr);
 1344|  2.94M|      r_im[ts][pb][1] = (FLOAT32)sin(tr);
 1345|  2.94M|      tr += step_r;
 1346|  2.94M|      ts++;
 1347|  2.94M|    }
 1348|       |
 1349|   195k|    for (ps = 1; ps < self->num_parameter_sets; ps++) {
  ------------------
  |  Branch (1349:18): [True: 77.1k, False: 118k]
  ------------------
 1350|  77.1k|      FLOAT32 alpha = self->inv_param_slot_diff[ps];
 1351|  77.1k|      tl = ixheaacd_mps_angle_interpolation(pl[ps - 1][pb], pl[ps][pb], alpha,
 1352|  77.1k|                                            &step_l);
 1353|  77.1k|      tr = ixheaacd_mps_angle_interpolation(pr[ps - 1][pb], pr[ps][pb], alpha,
 1354|  77.1k|                                            &step_r);
 1355|  77.1k|      step_l *= alpha;
 1356|  77.1k|      step_r *= alpha;
 1357|   911k|      for (i = 1; i <= self->param_slot_diff[ps]; i++) {
  ------------------
  |  Branch (1357:19): [True: 834k, False: 77.1k]
  ------------------
 1358|   834k|        if (ts < 72 && pb < 28) {
  ------------------
  |  Branch (1358:13): [True: 834k, False: 0]
  |  Branch (1358:24): [True: 834k, False: 0]
  ------------------
 1359|   834k|          r_re[ts][pb][0] = (FLOAT32)cos(tl);
 1360|   834k|          r_im[ts][pb][0] = (FLOAT32)sin(tl);
 1361|   834k|          tl += step_l;
 1362|       |
 1363|   834k|          r_re[ts][pb][1] = (FLOAT32)cos(tr);
 1364|   834k|          r_im[ts][pb][1] = (FLOAT32)sin(tr);
 1365|   834k|          tr += step_r;
 1366|   834k|        }
 1367|   834k|        ts++;
 1368|       |
 1369|   834k|        if (ts > 71) {
  ------------------
  |  Branch (1369:13): [True: 0, False: 834k]
  ------------------
 1370|      0|          ts = 0;
 1371|      0|          break;
 1372|      0|        }
 1373|   834k|        if (pb > 27) {
  ------------------
  |  Branch (1373:13): [True: 0, False: 834k]
  ------------------
 1374|      0|          pb = 0;
 1375|      0|          break;
 1376|      0|        }
 1377|   834k|      }
 1378|  77.1k|    }
 1379|   118k|  }
 1380|  11.1k|}
ixheaacd_mps_init_pre_and_post_matrix:
 1382|  2.21k|VOID ixheaacd_mps_init_pre_and_post_matrix(ia_mps_dec_state_struct *self) {
 1383|  2.21k|  memset(self->m1_param_re_prev, 0,
 1384|  2.21k|         MAX_PARAMETER_BANDS * MAX_M_OUTPUT * MAX_M_INPUT * sizeof(WORD32));
  ------------------
  |  |   55|  2.21k|#define MAX_PARAMETER_BANDS (28)
  ------------------
                       MAX_PARAMETER_BANDS * MAX_M_OUTPUT * MAX_M_INPUT * sizeof(WORD32));
  ------------------
  |  |   63|  2.21k|#define MAX_M_OUTPUT (2)
  ------------------
                       MAX_PARAMETER_BANDS * MAX_M_OUTPUT * MAX_M_INPUT * sizeof(WORD32));
  ------------------
  |  |   62|  2.21k|#define MAX_M_INPUT (2)
  ------------------
 1385|  2.21k|  memset(self->m1_param_im_prev, 0,
 1386|  2.21k|         MAX_PARAMETER_BANDS * MAX_M_OUTPUT * MAX_M_INPUT * sizeof(WORD32));
  ------------------
  |  |   55|  2.21k|#define MAX_PARAMETER_BANDS (28)
  ------------------
                       MAX_PARAMETER_BANDS * MAX_M_OUTPUT * MAX_M_INPUT * sizeof(WORD32));
  ------------------
  |  |   63|  2.21k|#define MAX_M_OUTPUT (2)
  ------------------
                       MAX_PARAMETER_BANDS * MAX_M_OUTPUT * MAX_M_INPUT * sizeof(WORD32));
  ------------------
  |  |   62|  2.21k|#define MAX_M_INPUT (2)
  ------------------
 1387|  2.21k|  memset(self->m1_param_re_prev, 0,
 1388|  2.21k|         MAX_PARAMETER_BANDS * MAX_M_OUTPUT * MAX_M_INPUT * sizeof(WORD32));
  ------------------
  |  |   55|  2.21k|#define MAX_PARAMETER_BANDS (28)
  ------------------
                       MAX_PARAMETER_BANDS * MAX_M_OUTPUT * MAX_M_INPUT * sizeof(WORD32));
  ------------------
  |  |   63|  2.21k|#define MAX_M_OUTPUT (2)
  ------------------
                       MAX_PARAMETER_BANDS * MAX_M_OUTPUT * MAX_M_INPUT * sizeof(WORD32));
  ------------------
  |  |   62|  2.21k|#define MAX_M_INPUT (2)
  ------------------
 1389|  2.21k|  memset(self->m2_decor_re_prev, 0,
 1390|  2.21k|         MAX_PARAMETER_BANDS * MAX_M_OUTPUT * MAX_M_INPUT * sizeof(WORD32));
  ------------------
  |  |   55|  2.21k|#define MAX_PARAMETER_BANDS (28)
  ------------------
                       MAX_PARAMETER_BANDS * MAX_M_OUTPUT * MAX_M_INPUT * sizeof(WORD32));
  ------------------
  |  |   63|  2.21k|#define MAX_M_OUTPUT (2)
  ------------------
                       MAX_PARAMETER_BANDS * MAX_M_OUTPUT * MAX_M_INPUT * sizeof(WORD32));
  ------------------
  |  |   62|  2.21k|#define MAX_M_INPUT (2)
  ------------------
 1391|  2.21k|  memset(self->m2_resid_re_prev, 0,
 1392|  2.21k|         MAX_PARAMETER_BANDS * MAX_M_OUTPUT * MAX_M_INPUT * sizeof(WORD32));
  ------------------
  |  |   55|  2.21k|#define MAX_PARAMETER_BANDS (28)
  ------------------
                       MAX_PARAMETER_BANDS * MAX_M_OUTPUT * MAX_M_INPUT * sizeof(WORD32));
  ------------------
  |  |   63|  2.21k|#define MAX_M_OUTPUT (2)
  ------------------
                       MAX_PARAMETER_BANDS * MAX_M_OUTPUT * MAX_M_INPUT * sizeof(WORD32));
  ------------------
  |  |   62|  2.21k|#define MAX_M_INPUT (2)
  ------------------
 1393|  2.21k|  memset(self->m2_resid_im_prev, 0,
 1394|  2.21k|         MAX_PARAMETER_BANDS * MAX_M_OUTPUT * MAX_M_INPUT * sizeof(WORD32));
  ------------------
  |  |   55|  2.21k|#define MAX_PARAMETER_BANDS (28)
  ------------------
                       MAX_PARAMETER_BANDS * MAX_M_OUTPUT * MAX_M_INPUT * sizeof(WORD32));
  ------------------
  |  |   63|  2.21k|#define MAX_M_OUTPUT (2)
  ------------------
                       MAX_PARAMETER_BANDS * MAX_M_OUTPUT * MAX_M_INPUT * sizeof(WORD32));
  ------------------
  |  |   62|  2.21k|#define MAX_M_INPUT (2)
  ------------------
 1395|  2.21k|}
ixheaacd_mps_pre_mix.c:ixheaacd_mps_buffer_pre_and_mix_matrix:
   74|  77.4k|    ia_mps_dec_state_struct *self) {
   75|  77.4k|  WORD32 pb, row, col;
   76|       |
   77|  1.08M|  for (pb = 0; pb < self->bs_param_bands; pb++) {
  ------------------
  |  Branch (77:16): [True: 1.00M, False: 77.4k]
  ------------------
   78|  3.00M|    for (row = 0; row < MAX_M_INPUT; row++) {
  ------------------
  |  |   62|  3.00M|#define MAX_M_INPUT (2)
  ------------------
  |  Branch (78:19): [True: 2.00M, False: 1.00M]
  ------------------
   79|  6.01M|      for (col = 0; col < MAX_M_OUTPUT; col++) {
  ------------------
  |  |   63|  6.01M|#define MAX_M_OUTPUT (2)
  ------------------
  |  Branch (79:21): [True: 4.01M, False: 2.00M]
  ------------------
   80|  4.01M|        self->m1_param_re_prev[pb][row][col] =
   81|  4.01M|            self->m1_param_re[self->num_parameter_sets_prev - 1][pb][row][col];
   82|  4.01M|        self->m1_param_im_prev[pb][row][col] =
   83|  4.01M|            self->m1_param_im[self->num_parameter_sets_prev - 1][pb][row][col];
   84|  4.01M|        self->m2_decor_re_prev[pb][row][col] =
   85|  4.01M|            self->m2_decor_re[self->num_parameter_sets_prev - 1][pb][row][col];
   86|  4.01M|        self->m2_decor_im_prev[pb][row][col] =
   87|  4.01M|            self->m2_decor_im[self->num_parameter_sets_prev - 1][pb][row][col];
   88|  4.01M|        self->m2_resid_re_prev[pb][row][col] =
   89|  4.01M|            self->m2_resid_re[self->num_parameter_sets_prev - 1][pb][row][col];
   90|  4.01M|        self->m2_resid_im_prev[pb][row][col] =
   91|  4.01M|            self->m2_resid_im[self->num_parameter_sets_prev - 1][pb][row][col];
   92|  4.01M|      }
   93|  2.00M|    }
   94|  1.00M|  }
   95|       |
   96|  1.08M|  for (pb = 0; pb < self->bs_param_bands; pb++) {
  ------------------
  |  Branch (96:16): [True: 1.00M, False: 77.4k]
  ------------------
   97|  1.00M|    self->phase_l_prev[pb] =
   98|  1.00M|        self->phase_l[self->num_parameter_sets_prev - 1][pb];
   99|  1.00M|    self->phase_r_prev[pb] =
  100|  1.00M|        self->phase_r[self->num_parameter_sets_prev - 1][pb];
  101|  1.00M|  }
  102|  77.4k|}
ixheaacd_mps_pre_mix.c:ixheaacd_mps_par2umx_ps_core:
  173|  19.9k|                                         FLOAT32 *h_real) {
  174|  19.9k|  WORD32 band;
  175|  19.9k|  FLOAT32 c_l_temp, c_r_temp, temp;
  176|  19.9k|  WORD32 cld_idx, icc_idx;
  177|       |
  178|   246k|  for (band = 0; band < ott_band_count; band++) {
  ------------------
  |  Branch (178:18): [True: 226k, False: 19.9k]
  ------------------
  179|   226k|    cld_idx = *cld++ + 15;
  180|   226k|    icc_idx = *icc++;
  181|       |
  182|   226k|    icc_idx = icc_idx & 7;
  183|       |
  184|   226k|    c_l_temp = (ixheaacd_c_l_table[cld_idx]);
  185|   226k|    c_r_temp = (ixheaacd_c_l_table[30 - cld_idx]);
  186|       |
  187|   226k|    temp = ixheaacd_cos_table[icc_idx][cld_idx];
  188|   226k|    *h_real++ = MULT(temp, c_l_temp);
  ------------------
  |  |   46|   226k|#define MULT(a, b) (a * b)
  ------------------
  189|       |
  190|   226k|    temp = ixheaacd_cos_table[icc_idx][30 - cld_idx];
  191|   226k|    *h_real++ = MULT(temp, c_r_temp);
  ------------------
  |  |   46|   226k|#define MULT(a, b) (a * b)
  ------------------
  192|       |
  193|   226k|    temp = ixheaacd_sin_table[icc_idx][cld_idx];
  194|   226k|    *h_real++ = MULT(temp, c_l_temp);
  ------------------
  |  |   46|   226k|#define MULT(a, b) (a * b)
  ------------------
  195|       |
  196|   226k|    temp = -ixheaacd_sin_table[icc_idx][30 - cld_idx];
  197|   226k|    *h_real++ = MULT(temp, c_r_temp);
  ------------------
  |  |   46|   226k|#define MULT(a, b) (a * b)
  ------------------
  198|       |
  199|   226k|    h_real += 2;
  200|   226k|  }
  201|  19.9k|}
ixheaacd_mps_pre_mix.c:ixheaacd_mps_opd_calc:
  214|  2.23k|                                  WORD32 opd[MAX_PARAMETER_BANDS]) {
  215|  2.23k|  WORD32 band;
  216|       |
  217|  20.5k|  for (band = 0; band < self->num_bands_ipd; band++) {
  ------------------
  |  Branch (217:18): [True: 18.3k, False: 2.23k]
  ------------------
  218|  18.3k|    WORD32 cld_idx = curr_bit_stream->cld_idx[param_set_idx][band] + 15;
  219|  18.3k|    WORD32 ipd_idx = (curr_bit_stream->ipd_idx[param_set_idx][band]) & 15;
  220|  18.3k|    WORD32 icc_idx = curr_bit_stream->icc_idx[param_set_idx][band];
  221|       |
  222|  18.3k|    if ((cld_idx == 15) && (ipd_idx == 8))
  ------------------
  |  Branch (222:9): [True: 14.0k, False: 4.30k]
  |  Branch (222:28): [True: 412, False: 13.6k]
  ------------------
  223|    412|      opd[band] = 0;
  224|  17.9k|    else
  225|  17.9k|      opd[band] = ixheaacd_atan_table_Q28[ipd_idx][icc_idx][cld_idx];
  226|  18.3k|  }
  227|  2.23k|}
ixheaacd_mps_pre_mix.c:ixheaacd_mps_phase_wraping:
   63|  36.7k|static WORD32 ixheaacd_mps_phase_wraping(WORD32 phase) {
   64|  36.7k|  const WORD32 pi_2 = 2 * PI_IN_Q28;
  ------------------
  |  |   45|  36.7k|#define PI_IN_Q28 843314880
  ------------------
   65|       |
   66|  52.9k|  while (phase < 0) phase += pi_2;
  ------------------
  |  Branch (66:10): [True: 16.2k, False: 36.7k]
  ------------------
   67|  36.7k|  while (phase >= pi_2) phase -= pi_2;
  ------------------
  |  Branch (67:10): [True: 0, False: 36.7k]
  ------------------
   68|  36.7k|  assert((phase >= 0) && (phase < pi_2));
  ------------------
  |  Branch (68:3): [True: 0, False: 36.7k]
  |  Branch (68:3): [True: 0, False: 0]
  |  Branch (68:3): [True: 36.7k, False: 0]
  |  Branch (68:3): [True: 36.7k, False: 0]
  ------------------
   69|       |
   70|  36.7k|  return phase;
   71|  36.7k|}
ixheaacd_mps_pre_mix.c:ixheaacd_mps_angle_interpolation:
 1307|   390k|                                                FLOAT32 alpha, FLOAT32 *step) {
 1308|   394k|  while (angle2 - angle1 > (FLOAT32)P_PI) {
  ------------------
  |  |   44|   394k|#define P_PI 3.1415926535897932
  ------------------
  |  Branch (1308:10): [True: 4.37k, False: 390k]
  ------------------
 1309|  4.37k|    angle1 = angle1 + 2.0f * (FLOAT32)P_PI;
  ------------------
  |  |   44|  4.37k|#define P_PI 3.1415926535897932
  ------------------
 1310|  4.37k|  }
 1311|   394k|  while (angle1 - angle2 > (FLOAT32)P_PI) {
  ------------------
  |  |   44|   394k|#define P_PI 3.1415926535897932
  ------------------
  |  Branch (1311:10): [True: 3.68k, False: 390k]
  ------------------
 1312|  3.68k|    angle2 = angle2 + 2.0f * (FLOAT32)P_PI;
  ------------------
  |  |   44|  3.68k|#define P_PI 3.1415926535897932
  ------------------
 1313|  3.68k|  }
 1314|   390k|  *step = angle2 - angle1;
 1315|   390k|  return (1 - alpha) * angle1 + alpha * angle2;
 1316|   390k|}

ixheaacd_mdct_2_qmf:
   49|  13.1k|VOID ixheaacd_mdct_2_qmf(ia_heaac_mps_state_struct *pstr_mps_state) {
   50|  13.1k|  ia_mps_dec_reuse_array_struct *p_array_struct = pstr_mps_state->array_struct;
   51|  13.1k|  WORD32 ch, rfpsf, qb;
   52|  13.1k|  WORD32 qmf_global_offset;
   53|  13.1k|  WORD32 time_slots = pstr_mps_state->time_slots;
   54|  13.1k|  WORD32 time_slots_x4 = (time_slots << 2);
   55|  13.1k|  WORD32 qmf_bands = pstr_mps_state->qmf_bands;
   56|  13.1k|  WORD32 *p_qmf_residual_real_post, *p_qmf_residual_imag_post;
   57|  13.1k|  VOID *scratch = pstr_mps_state->mps_scratch_mem_v;
   58|       |
   59|  13.1k|  if (pstr_mps_state->up_mix_type != 2) {
  ------------------
  |  Branch (59:7): [True: 13.1k, False: 0]
  ------------------
   60|  13.1k|    WORD32 num_ch = pstr_mps_state->num_ott_boxes + pstr_mps_state->num_ttt_boxes;
   61|  13.1k|    WORD32 rfpsf_max = pstr_mps_state->residual_frames_per_spatial_frame;
   62|  13.1k|    WORD32 upd_qmf = pstr_mps_state->upd_qmf;
   63|       |
   64|  13.1k|    WORD32 *qmf_residual_real_pre = p_array_struct->qmf_residual_real_pre;
   65|  13.1k|    WORD32 *qmf_residual_real_post = p_array_struct->qmf_residual_real_post;
   66|       |
   67|  13.1k|    WORD32 *qmf_residual_imag_pre = p_array_struct->qmf_residual_imag_pre;
   68|  13.1k|    WORD32 *qmf_residual_imag_post = p_array_struct->qmf_residual_imag_post;
   69|       |
   70|  13.1k|    WORD32 *p_res_mdct = p_array_struct->res_mdct;
   71|       |
   72|  48.4k|    for (ch = 0; ch < num_ch; ch++) {
  ------------------
  |  Branch (72:18): [True: 35.3k, False: 13.1k]
  ------------------
   73|  35.3k|      if (pstr_mps_state->bs_config.bs_residual_present[ch]) {
  ------------------
  |  Branch (73:11): [True: 504, False: 34.8k]
  ------------------
   74|    504|        WORD32 *res_mdct = p_res_mdct;
   75|    504|        qmf_global_offset = 0;
   76|       |
   77|    504|        p_qmf_residual_real_post = qmf_residual_real_post;
   78|    504|        p_qmf_residual_imag_post = qmf_residual_imag_post;
   79|  16.6k|        for (qb = 0; qb < qmf_bands; qb++) {
  ------------------
  |  Branch (79:22): [True: 16.1k, False: 504]
  ------------------
   80|  16.1k|          memset(p_qmf_residual_real_post, 0, time_slots_x4);
   81|  16.1k|          memset(p_qmf_residual_imag_post, 0, time_slots_x4);
   82|       |
   83|  16.1k|          p_qmf_residual_real_post += MAX_TIME_SLOTS;
  ------------------
  |  |   48|  16.1k|#define MAX_TIME_SLOTS (72)
  ------------------
   84|  16.1k|          p_qmf_residual_imag_post += MAX_TIME_SLOTS;
  ------------------
  |  |   48|  16.1k|#define MAX_TIME_SLOTS (72)
  ------------------
   85|  16.1k|        }
   86|       |
   87|  1.03k|        for (rfpsf = 0; rfpsf < rfpsf_max; rfpsf++) {
  ------------------
  |  Branch (87:25): [True: 528, False: 504]
  ------------------
   88|    528|          ixheaacd_mdct2qmf_process(upd_qmf, res_mdct, qmf_residual_real_pre,
   89|    528|                                    qmf_residual_real_post, qmf_residual_imag_pre,
   90|    528|                                    qmf_residual_imag_post,
   91|    528|                                    pstr_mps_state->res_block_type[ch][rfpsf], qmf_global_offset,
   92|    528|                                    &(pstr_mps_state->ia_mps_dec_mps_table), scratch, time_slots);
   93|    528|          qmf_global_offset += upd_qmf;
   94|    528|          res_mdct += MDCTCOEFX2;
  ------------------
  |  |  198|    528|#define MDCTCOEFX2 (2048)
  ------------------
   95|    528|        }
   96|    504|      }
   97|       |
   98|  35.3k|      qmf_residual_real_pre += QBXTS;
  ------------------
  |  |   98|  35.3k|#define QBXTS (4608)
  ------------------
   99|  35.3k|      qmf_residual_imag_pre += QBXTS;
  ------------------
  |  |   98|  35.3k|#define QBXTS (4608)
  ------------------
  100|       |
  101|  35.3k|      qmf_residual_real_post += QBXTS;
  ------------------
  |  |   98|  35.3k|#define QBXTS (4608)
  ------------------
  102|  35.3k|      qmf_residual_imag_post += QBXTS;
  ------------------
  |  |   98|  35.3k|#define QBXTS (4608)
  ------------------
  103|       |
  104|  35.3k|      p_res_mdct += RFX2XMDCTCOEF;
  ------------------
  |  |  196|  35.3k|#define RFX2XMDCTCOEF (8192)
  ------------------
  105|  35.3k|    }
  106|  13.1k|  }
  107|       |
  108|  13.1k|  if (pstr_mps_state->arbitrary_downmix == 2) {
  ------------------
  |  Branch (108:7): [True: 139, False: 12.9k]
  ------------------
  109|    139|    WORD32 arbdmx_upd_qmf = pstr_mps_state->arbdmx_upd_qmf;
  110|    139|    WORD32 offset = pstr_mps_state->num_ott_boxes + pstr_mps_state->num_ttt_boxes;
  111|    139|    WORD32 in_ch = pstr_mps_state->num_input_channels;
  112|    139|    WORD32 rfpsf_max = pstr_mps_state->arbdmx_frames_per_spatial_frame;
  113|       |
  114|    139|    WORD32 *qmf_residual_real_pre = p_array_struct->qmf_residual_real_pre + offset * QBXTS;
  ------------------
  |  |   98|    139|#define QBXTS (4608)
  ------------------
  115|    139|    WORD32 *qmf_residual_imag_pre = p_array_struct->qmf_residual_imag_pre + offset * QBXTS;
  ------------------
  |  |   98|    139|#define QBXTS (4608)
  ------------------
  116|       |
  117|    139|    WORD32 *qmf_residual_real_post = p_array_struct->qmf_residual_real_post + offset * QBXTS;
  ------------------
  |  |   98|    139|#define QBXTS (4608)
  ------------------
  118|    139|    WORD32 *qmf_residual_imag_post = p_array_struct->qmf_residual_imag_post + offset * QBXTS;
  ------------------
  |  |   98|    139|#define QBXTS (4608)
  ------------------
  119|       |
  120|    139|    WORD32 *p_res_mdct = p_array_struct->res_mdct + offset * RFX2XMDCTCOEF;
  ------------------
  |  |  196|    139|#define RFX2XMDCTCOEF (8192)
  ------------------
  121|       |
  122|    339|    for (ch = 0; ch < in_ch; ch++) {
  ------------------
  |  Branch (122:18): [True: 200, False: 139]
  ------------------
  123|    200|      WORD32 *res_mdct = p_res_mdct;
  124|    200|      qmf_global_offset = 0;
  125|       |
  126|    200|      p_qmf_residual_real_post = qmf_residual_real_post;
  127|    200|      p_qmf_residual_imag_post = qmf_residual_imag_post;
  128|  6.66k|      for (qb = 0; qb < qmf_bands; qb++) {
  ------------------
  |  Branch (128:20): [True: 6.46k, False: 200]
  ------------------
  129|  6.46k|        memset(p_qmf_residual_real_post, 0, time_slots_x4);
  130|  6.46k|        memset(p_qmf_residual_imag_post, 0, time_slots_x4);
  131|       |
  132|  6.46k|        p_qmf_residual_real_post += MAX_TIME_SLOTS;
  ------------------
  |  |   48|  6.46k|#define MAX_TIME_SLOTS (72)
  ------------------
  133|  6.46k|        p_qmf_residual_imag_post += MAX_TIME_SLOTS;
  ------------------
  |  |   48|  6.46k|#define MAX_TIME_SLOTS (72)
  ------------------
  134|  6.46k|      }
  135|       |
  136|    424|      for (rfpsf = 0; rfpsf < rfpsf_max; rfpsf++) {
  ------------------
  |  Branch (136:23): [True: 224, False: 200]
  ------------------
  137|    224|        ixheaacd_mdct2qmf_process(
  138|    224|            arbdmx_upd_qmf, res_mdct, qmf_residual_real_pre, qmf_residual_real_post,
  139|    224|            qmf_residual_imag_pre, qmf_residual_imag_post,
  140|    224|            pstr_mps_state->res_block_type[offset + ch][rfpsf], qmf_global_offset,
  141|    224|            &(pstr_mps_state->ia_mps_dec_mps_table), scratch, time_slots);
  142|    224|        qmf_global_offset += arbdmx_upd_qmf;
  143|    224|        res_mdct += MDCTCOEFX2;
  ------------------
  |  |  198|    224|#define MDCTCOEFX2 (2048)
  ------------------
  144|    224|      }
  145|       |
  146|    200|      qmf_residual_real_pre += QBXTS;
  ------------------
  |  |   98|    200|#define QBXTS (4608)
  ------------------
  147|    200|      qmf_residual_imag_pre += QBXTS;
  ------------------
  |  |   98|    200|#define QBXTS (4608)
  ------------------
  148|       |
  149|    200|      qmf_residual_imag_post += QBXTS;
  ------------------
  |  |   98|    200|#define QBXTS (4608)
  ------------------
  150|    200|      qmf_residual_real_post += QBXTS;
  ------------------
  |  |   98|    200|#define QBXTS (4608)
  ------------------
  151|       |
  152|    200|      p_res_mdct += RFX2XMDCTCOEF;
  ------------------
  |  |  196|    200|#define RFX2XMDCTCOEF (8192)
  ------------------
  153|    200|    }
  154|    139|  }
  155|  13.1k|  return;
  156|  13.1k|}
ixheaacd_hybrid_qmf_analysis:
  158|  13.1k|VOID ixheaacd_hybrid_qmf_analysis(ia_heaac_mps_state_struct *pstr_mps_state) {
  159|  13.1k|  WORD32 ch;
  160|  13.1k|  WORD32 in_ch = pstr_mps_state->num_input_channels;
  161|  13.1k|  WORD32 num_ott_boxes = pstr_mps_state->num_ott_boxes;
  162|  13.1k|  WORD32 num_ttt_boxes = pstr_mps_state->num_ttt_boxes;
  163|  13.1k|  WORD32 num_input_channels = in_ch;
  164|  13.1k|  WORD32 qmf_bands = pstr_mps_state->qmf_bands;
  165|  13.1k|  WORD32 time_slots = pstr_mps_state->time_slots;
  166|  13.1k|  WORD32 hybrid_bands = pstr_mps_state->hybrid_bands;
  167|  13.1k|  WORD32 num_parameter_bands = pstr_mps_state->num_parameter_bands;
  168|  13.1k|  SIZE_T *kernels = pstr_mps_state->kernels;
  ------------------
  |  |   28|  13.1k|#define SIZE_T size_t
  ------------------
  169|  13.1k|  WORD32 *res_bands = pstr_mps_state->res_bands;
  170|  13.1k|  WORD32 *index = pstr_mps_state->index;
  171|       |
  172|  13.1k|  ia_mps_dec_thyb_filter_state_struct *hyb_filter_state =
  173|  13.1k|      pstr_mps_state->mps_persistent_mem.hyb_filter_state;
  174|  13.1k|  ia_mps_dec_reuse_array_struct *p_array_struct = pstr_mps_state->array_struct;
  175|       |
  176|  13.1k|  ia_mps_dec_hybrid_tables_struct *hybrid_table_ptr =
  177|  13.1k|      pstr_mps_state->ia_mps_dec_mps_table.hybrid_table_ptr;
  178|       |
  179|  13.1k|  WORD32 *p_buf_real = p_array_struct->buf_real;
  180|  13.1k|  WORD32 *p_buf_imag = p_array_struct->buf_imag;
  181|       |
  182|  13.1k|  WORD32 *p_x_real = p_array_struct->x_real;
  183|  13.1k|  WORD32 *p_x_imag = p_array_struct->x_imag;
  184|       |
  185|  79.6k|  for (ch = 0; ch < in_ch; ch++) {
  ------------------
  |  Branch (185:16): [True: 66.5k, False: 13.1k]
  ------------------
  186|  66.5k|    ixheaacd_apply_ana_hyb_filt_bank_create_x(&hyb_filter_state[ch], p_buf_real, p_buf_imag,
  187|  66.5k|                                              qmf_bands, time_slots, p_x_real, p_x_imag,
  188|  66.5k|                                              hybrid_table_ptr);
  189|  66.5k|    pstr_mps_state->index[ch] = hybrid_bands;
  190|       |
  191|  66.5k|    p_buf_real += TSXHB;
  ------------------
  |  |  106|  66.5k|#define TSXHB (5112)
  ------------------
  192|  66.5k|    p_buf_imag += TSXHB;
  ------------------
  |  |  106|  66.5k|#define TSXHB (5112)
  ------------------
  193|       |
  194|  66.5k|    p_x_real += TSXHB;
  ------------------
  |  |  106|  66.5k|#define TSXHB (5112)
  ------------------
  195|  66.5k|    p_x_imag += TSXHB;
  ------------------
  |  |  106|  66.5k|#define TSXHB (5112)
  ------------------
  196|  66.5k|  }
  197|       |
  198|  13.1k|  if ((pstr_mps_state->residual_coding) && (pstr_mps_state->up_mix_type != 2)) {
  ------------------
  |  Branch (198:7): [True: 372, False: 12.7k]
  |  Branch (198:44): [True: 372, False: 0]
  ------------------
  199|    372|    WORD32 *qmf_residual_real = p_array_struct->qmf_residual_real_pre;
  200|    372|    WORD32 *qmf_residual_imag = p_array_struct->qmf_residual_imag_pre;
  201|       |
  202|    372|    WORD32 *p_dry_real = p_array_struct->w_dry_real;
  203|    372|    WORD32 *p_dry_imag = p_array_struct->w_dry_imag;
  204|       |
  205|  1.68k|    for (ch = 0; ch < num_ott_boxes; ch++) {
  ------------------
  |  Branch (205:18): [True: 1.30k, False: 372]
  ------------------
  206|  1.30k|      if (res_bands[ch] > 0) {
  ------------------
  |  Branch (206:11): [True: 413, False: 895]
  ------------------
  207|    413|        ixheaacd_apply_ana_hyb_filt_bank_merge_res_decor(
  208|    413|            &hyb_filter_state[ch + num_input_channels], qmf_residual_real, qmf_residual_imag,
  209|    413|            qmf_bands, time_slots, p_dry_real, p_dry_imag, hybrid_table_ptr);
  210|    413|      }
  211|  1.30k|      qmf_residual_real += QBXTS;
  ------------------
  |  |   98|  1.30k|#define QBXTS (4608)
  ------------------
  212|  1.30k|      qmf_residual_imag += QBXTS;
  ------------------
  |  |   98|  1.30k|#define QBXTS (4608)
  ------------------
  213|       |
  214|  1.30k|      p_dry_real += TSXHB;
  ------------------
  |  |  106|  1.30k|#define TSXHB (5112)
  ------------------
  215|  1.30k|      p_dry_imag += TSXHB;
  ------------------
  |  |  106|  1.30k|#define TSXHB (5112)
  ------------------
  216|  1.30k|    }
  217|       |
  218|    665|    for (ch = num_ott_boxes; ch < num_ott_boxes + num_ttt_boxes; ch++, in_ch++) {
  ------------------
  |  Branch (218:30): [True: 293, False: 372]
  ------------------
  219|    293|      if (res_bands[ch] > 0) {
  ------------------
  |  Branch (219:11): [True: 26, False: 267]
  ------------------
  220|     26|        ixheaacd_apply_ana_hyb_filt_bank_create_x_res(
  221|     26|            &hyb_filter_state[ch + num_input_channels], qmf_residual_real, qmf_residual_imag,
  222|     26|            qmf_bands, time_slots, p_x_real, p_x_imag, kernels, res_bands[ch], hybrid_bands,
  223|     26|            num_parameter_bands, &index[in_ch], hybrid_table_ptr);
  224|     26|      } else
  225|    267|        index[in_ch] = 0;
  226|       |
  227|    293|      qmf_residual_real += QBXTS;
  ------------------
  |  |   98|    293|#define QBXTS (4608)
  ------------------
  228|    293|      qmf_residual_imag += QBXTS;
  ------------------
  |  |   98|    293|#define QBXTS (4608)
  ------------------
  229|       |
  230|    293|      p_x_real += TSXHB;
  ------------------
  |  |  106|    293|#define TSXHB (5112)
  ------------------
  231|    293|      p_x_imag += TSXHB;
  ------------------
  |  |  106|    293|#define TSXHB (5112)
  ------------------
  232|    293|    }
  233|    372|  }
  234|       |
  235|  13.1k|  in_ch = num_input_channels + num_ttt_boxes;
  236|  13.1k|  if (pstr_mps_state->arbitrary_downmix == 2) {
  ------------------
  |  Branch (236:7): [True: 139, False: 12.9k]
  ------------------
  237|    139|    WORD32 offset = num_ott_boxes + num_ttt_boxes;
  238|       |
  239|    139|    WORD32 *qmf_residual_real = p_array_struct->qmf_residual_real_pre + offset * QBXTS;
  ------------------
  |  |   98|    139|#define QBXTS (4608)
  ------------------
  240|    139|    WORD32 *qmf_residual_imag = p_array_struct->qmf_residual_imag_pre + offset * QBXTS;
  ------------------
  |  |   98|    139|#define QBXTS (4608)
  ------------------
  241|       |
  242|    139|    p_x_real = p_array_struct->x_real + in_ch * TSXHB;
  ------------------
  |  |  106|    139|#define TSXHB (5112)
  ------------------
  243|    139|    p_x_imag = p_array_struct->x_imag + in_ch * TSXHB;
  ------------------
  |  |  106|    139|#define TSXHB (5112)
  ------------------
  244|    339|    for (ch = 0; ch < num_input_channels; ch++, in_ch++) {
  ------------------
  |  Branch (244:18): [True: 200, False: 139]
  ------------------
  245|    200|      ixheaacd_apply_ana_hyb_filt_bank_create_x_res(
  246|    200|          &hyb_filter_state[offset + ch + num_input_channels], qmf_residual_real,
  247|    200|          qmf_residual_imag, qmf_bands, time_slots, p_x_real, p_x_imag, kernels,
  248|    200|          pstr_mps_state->arbdmx_residual_bands, hybrid_bands, num_parameter_bands, &index[in_ch],
  249|    200|          hybrid_table_ptr);
  250|       |
  251|    200|      qmf_residual_real += QBXTS;
  ------------------
  |  |   98|    200|#define QBXTS (4608)
  ------------------
  252|    200|      qmf_residual_imag += QBXTS;
  ------------------
  |  |   98|    200|#define QBXTS (4608)
  ------------------
  253|       |
  254|    200|      p_x_real += TSXHB;
  ------------------
  |  |  106|    200|#define TSXHB (5112)
  ------------------
  255|    200|      p_x_imag += TSXHB;
  ------------------
  |  |  106|    200|#define TSXHB (5112)
  ------------------
  256|    200|    }
  257|    139|  }
  258|  13.1k|}
ixheaacd_merge_res_decor:
  261|  13.1k|VOID ixheaacd_merge_res_decor(ia_heaac_mps_state_struct *pstr_mps_state) {
  262|  13.1k|  WORD32 ts, qs, row, res;
  263|       |
  264|  13.1k|  WORD32 temp_1;
  265|  13.1k|  SIZE_T *idx;
  ------------------
  |  |   28|  13.1k|#define SIZE_T size_t
  ------------------
  266|       |
  267|  13.1k|  ia_mps_dec_reuse_array_struct *p_array_struct = pstr_mps_state->array_struct;
  268|  13.1k|  ia_mps_dec_auxilary_struct *p_aux_struct = pstr_mps_state->aux_struct;
  269|  13.1k|  WORD32 time_slots = pstr_mps_state->time_slots;
  270|  13.1k|  WORD32 hybrid_bands = pstr_mps_state->hybrid_bands;
  271|  13.1k|  WORD32 num_direct_signals = pstr_mps_state->num_direct_signals;
  272|  13.1k|  WORD32 num_w_channels = pstr_mps_state->num_w_channels;
  273|  13.1k|  WORD32 num_parameter_bands = pstr_mps_state->num_parameter_bands;
  274|  13.1k|  SIZE_T *kernels_ptr = pstr_mps_state->kernels;
  ------------------
  |  |   28|  13.1k|#define SIZE_T size_t
  ------------------
  275|       |
  276|  13.1k|  WORD32 *p_buf_real, *p_buf_imag, *p_buf_re, *p_buf_im;
  277|  13.1k|  WORD32 *buf_real_ch4, *buf_imag_ch4;
  278|  13.1k|  WORD32 *buf_real_ch3, *buf_imag_ch3;
  279|       |
  280|  13.1k|  p_buf_real = p_array_struct->buffer_real + TSXHBX5;
  ------------------
  |  |  200|  13.1k|#define TSXHBX5 (25560)
  ------------------
  281|  13.1k|  p_buf_imag = p_array_struct->buffer_imag + TSXHBX5;
  ------------------
  |  |  200|  13.1k|#define TSXHBX5 (25560)
  ------------------
  282|       |
  283|   369k|  for (ts = 0; ts < time_slots; ts++) {
  ------------------
  |  Branch (283:16): [True: 356k, False: 13.1k]
  ------------------
  284|   356k|    p_buf_re = p_buf_real;
  285|   356k|    p_buf_im = p_buf_imag;
  286|       |
  287|   356k|    buf_real_ch4 = p_buf_real - TSXHB;
  ------------------
  |  |  106|   356k|#define TSXHB (5112)
  ------------------
  288|   356k|    buf_imag_ch4 = p_buf_imag - TSXHB;
  ------------------
  |  |  106|   356k|#define TSXHB (5112)
  ------------------
  289|       |
  290|   356k|    buf_real_ch3 = buf_real_ch4 - TSXHB;
  ------------------
  |  |  106|   356k|#define TSXHB (5112)
  ------------------
  291|   356k|    buf_imag_ch3 = buf_imag_ch4 - TSXHB;
  ------------------
  |  |  106|   356k|#define TSXHB (5112)
  ------------------
  292|       |
  293|  21.3M|    for (qs = 0; qs < hybrid_bands; qs++) {
  ------------------
  |  Branch (293:18): [True: 20.9M, False: 356k]
  ------------------
  294|  20.9M|      if ((kernels_ptr[qs] < ((UWORD32)(p_aux_struct->ttt_config[0][0].stop_band)) &&
  ------------------
  |  Branch (294:12): [True: 1.38M, False: 19.5M]
  ------------------
  295|  1.38M|           p_aux_struct->ttt_config[0][0].use_ttt_decorr) ||
  ------------------
  |  Branch (295:12): [True: 407k, False: 974k]
  ------------------
  296|  20.5M|          (kernels_ptr[qs] >= ((UWORD32)p_aux_struct->ttt_config[1][0].start_band) &&
  ------------------
  |  Branch (296:12): [True: 19.5M, False: 974k]
  ------------------
  297|  19.5M|           p_aux_struct->ttt_config[1][0].use_ttt_decorr)) {
  ------------------
  |  Branch (297:12): [True: 124k, False: 19.4M]
  ------------------
  298|   532k|        temp_1 = (WORD32)ONE_BY_SQRT_TWO_Q30;
  ------------------
  |  |   64|   532k|#define ONE_BY_SQRT_TWO_Q30 (759250125)
  ------------------
  299|       |
  300|   532k|        *p_buf_re = ixheaacd_mps_mult32_shr_30(*p_buf_re, temp_1);
  301|   532k|        *p_buf_re += (*buf_real_ch3 + *buf_real_ch4);
  302|       |
  303|   532k|        *p_buf_im = ixheaacd_mps_mult32_shr_30(*p_buf_im, temp_1);
  304|   532k|        *p_buf_im += (*buf_imag_ch3 + *buf_imag_ch4);
  305|   532k|      }
  306|  20.9M|      p_buf_re++;
  307|  20.9M|      p_buf_im++;
  308|       |
  309|  20.9M|      buf_real_ch4++;
  310|  20.9M|      buf_imag_ch4++;
  311|       |
  312|  20.9M|      buf_real_ch3++;
  313|  20.9M|      buf_imag_ch3++;
  314|  20.9M|    }
  315|   356k|    p_buf_real += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|   356k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|   356k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  316|   356k|    p_buf_imag += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|   356k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|   356k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  317|   356k|  }
  318|       |
  319|  13.1k|  if (pstr_mps_state->residual_coding) {
  ------------------
  |  Branch (319:7): [True: 372, False: 12.7k]
  ------------------
  320|  1.36k|    for (row = num_direct_signals; row < num_w_channels; row++) {
  ------------------
  |  Branch (320:36): [True: 988, False: 372]
  ------------------
  321|    988|      WORD32 resband;
  322|    988|      res = ixheaacd_get_res_idx(pstr_mps_state, row);
  323|    988|      resband = pstr_mps_state->res_bands[res];
  324|       |
  325|    988|      if (resband == 1 && (num_parameter_bands == 20 || num_parameter_bands == 28))
  ------------------
  |  Branch (325:11): [True: 12, False: 976]
  |  Branch (325:28): [True: 5, False: 7]
  |  Branch (325:57): [True: 3, False: 4]
  ------------------
  326|      8|        pstr_mps_state->index[res] = 3;
  327|    980|      else {
  328|    980|        idx = &kernels_ptr[0];
  329|  13.2k|        for (qs = 0; qs < hybrid_bands; qs++) {
  ------------------
  |  Branch (329:22): [True: 12.2k, False: 980]
  ------------------
  330|  12.2k|          if (*idx++ >= (SIZE_T)resband) {
  ------------------
  |  Branch (330:15): [True: 698, False: 11.5k]
  ------------------
  331|    698|            pstr_mps_state->index[res] = qs;
  332|    698|            qs = hybrid_bands;
  333|    698|          }
  334|  12.2k|        }
  335|    980|      }
  336|    988|    }
  337|    372|  }
  338|  13.1k|}
ixheaacd_create_w:
  340|  13.1k|VOID ixheaacd_create_w(ia_heaac_mps_state_struct *pstr_mps_state) {
  341|  13.1k|  WORD32 k;
  342|  13.1k|  ia_mps_dec_reuse_array_struct *p_array_struct = pstr_mps_state->array_struct;
  343|  13.1k|  WORD32 num_direct_signals = pstr_mps_state->num_direct_signals;
  344|  13.1k|  WORD32 counter = num_direct_signals + pstr_mps_state->num_decor_signals;
  345|  13.1k|  WORD32 time_slots = pstr_mps_state->time_slots;
  346|  13.1k|  WORD32 offset = num_direct_signals * TSXHB;
  ------------------
  |  |  106|  13.1k|#define TSXHB (5112)
  ------------------
  347|  13.1k|  WORD32 *p_buffer_real = p_array_struct->buf_real + offset;
  348|  13.1k|  WORD32 *p_buffer_imag = p_array_struct->buf_imag + offset;
  349|       |
  350|  13.1k|  WORD32 *p_buf_real = p_array_struct->buffer_real + offset;
  351|  13.1k|  WORD32 *p_buf_imag = p_array_struct->buffer_imag + offset;
  352|       |
  353|  42.6k|  for (k = num_direct_signals; k < counter; k++) {
  ------------------
  |  Branch (353:32): [True: 29.5k, False: 13.1k]
  ------------------
  354|  29.5k|    ixheaacd_decorr_apply(pstr_mps_state, time_slots, p_buffer_real, p_buffer_imag, p_buf_real,
  355|  29.5k|                          p_buf_imag, k);
  356|       |
  357|  29.5k|    p_buffer_real += TSXHB;
  ------------------
  |  |  106|  29.5k|#define TSXHB (5112)
  ------------------
  358|  29.5k|    p_buffer_imag += TSXHB;
  ------------------
  |  |  106|  29.5k|#define TSXHB (5112)
  ------------------
  359|       |
  360|  29.5k|    p_buf_real += TSXHB;
  ------------------
  |  |  106|  29.5k|#define TSXHB (5112)
  ------------------
  361|  29.5k|    p_buf_imag += TSXHB;
  ------------------
  |  |  106|  29.5k|#define TSXHB (5112)
  ------------------
  362|  29.5k|  }
  363|  13.1k|  ixheaacd_merge_res_decor(pstr_mps_state);
  364|  13.1k|}
ixheaacd_update_buffers:
  366|    498|VOID ixheaacd_update_buffers(ia_heaac_mps_state_struct *pstr_mps_state) {
  367|    498|  ia_mps_dec_reuse_array_struct *p_array_struct = pstr_mps_state->array_struct;
  368|    498|  WORD32 *temp_addr = p_array_struct->qmf_residual_real_post;
  369|    498|  p_array_struct->qmf_residual_real_post = p_array_struct->qmf_residual_real_pre;
  370|    498|  p_array_struct->qmf_residual_real_pre = temp_addr;
  371|       |
  372|    498|  temp_addr = p_array_struct->qmf_residual_imag_post;
  373|    498|  p_array_struct->qmf_residual_imag_post = p_array_struct->qmf_residual_imag_pre;
  374|    498|  p_array_struct->qmf_residual_imag_pre = temp_addr;
  375|       |
  376|    498|  p_array_struct->buffer_real = p_array_struct->qmf_residual_real_post;
  377|    498|  p_array_struct->buffer_imag = p_array_struct->qmf_residual_imag_post;
  378|       |
  379|    498|  p_array_struct->m1_param = (ia_mps_dec_m1_param_struct *)p_array_struct->buffer_real;
  380|    498|}

ixheaacd_res_inverse_quant_lb:
   68|     63|                                   WORD8 *pulse_data) {
   69|     63|  WORD32 j;
   70|     63|  WORD32 temp;
   71|     63|  WORD32 q_abs;
   72|       |
   73|  8.27k|  for (j = t_bands - 1; j >= 0; j--) {
  ------------------
  |  Branch (73:25): [True: 8.20k, False: 63]
  ------------------
   74|  8.20k|    q_abs = *pulse_data++;
   75|  8.20k|    temp = (pow_table_q17[q_abs]);
   76|  8.20k|    *x_invquant++ = -temp;
   77|  8.20k|  }
   78|     63|}
ixheaacd_res_c_block_decode_huff_word_all:
  888|    623|    WORD32 maximum_bins_short) {
  889|    623|  WORD ret_val = 0;
  890|    623|  WORD start_bit_pos = it_bit_buf->bit_pos;
  891|    623|  UWORD8 *start_read_pos = it_bit_buf->ptr_read_next;
  892|    623|  const UWORD16 *h_ori = (UWORD16 *)(aac_tables_ptr->code_book[code_no]);
  893|    623|  WORD32 *pow_table = (WORD32 *)aac_tables_ptr->res_block_tables_ptr->pow_table_q17;
  894|    623|  WORD32 no_bands = band - start - 1;
  895|    623|  WORD16 *p_band_off = band_offsets + start;
  896|       |
  897|    623|  if (code_no == 11) {
  ------------------
  |  Branch (897:7): [True: 96, False: 527]
  ------------------
  898|     96|    const UWORD16 *h_ori = aac_tables_ptr->res_huffmann_tables_ptr->huffman_codebook_11;
  899|     96|    ret_val =
  900|     96|        ixheaacd_res_c_block_decode_huff_word1(it_bit_buf, quantized_coef, p_band_off, no_bands,
  901|     96|                                               group_no, h_ori, pow_table, maximum_bins_short);
  902|    527|  } else if (code_no <= 4) {
  ------------------
  |  Branch (902:14): [True: 312, False: 215]
  ------------------
  903|    312|    WORD32 sign = 0;
  904|       |
  905|    312|    if (code_no > 2) sign = 1;
  ------------------
  |  Branch (905:9): [True: 225, False: 87]
  ------------------
  906|    312|    ret_val = ixheaacd_res_c_block_decode_huff_word2_4(it_bit_buf, quantized_coef, p_band_off,
  907|    312|                                                       no_bands, group_no, h_ori, pow_table, sign,
  908|    312|                                                       maximum_bins_short);
  909|    312|  }
  910|       |
  911|    215|  else if (code_no <= 10) {
  ------------------
  |  Branch (911:12): [True: 215, False: 0]
  ------------------
  912|    215|    WORD32 sign = 0;
  913|       |
  914|    215|    if (code_no > 6) sign = 1;
  ------------------
  |  Branch (914:9): [True: 135, False: 80]
  ------------------
  915|    215|    ret_val = ixheaacd_res_c_block_decode_huff_word2_2(it_bit_buf, quantized_coef, p_band_off,
  916|    215|                                                       no_bands, group_no, h_ori, pow_table, sign,
  917|    215|                                                       maximum_bins_short);
  918|    215|  }
  919|    623|  {
  920|    623|    WORD bits_cons;
  921|    623|    bits_cons = (WORD)(((it_bit_buf->ptr_read_next - start_read_pos) << 3) +
  922|    623|                       (it_bit_buf->bit_pos - start_bit_pos));
  923|    623|    it_bit_buf->cnt_bits -= bits_cons;
  924|    623|  }
  925|    623|  return ret_val;
  926|    623|}
ixheaacd_res_c_block_decode_huff_word_all_lb:
  930|    609|    ia_mps_dec_residual_aac_tables_struct *aac_tables_ptr, WORD32 *x_invquant, WORD8 *p_pul_arr) {
  931|    609|  WORD ret_val = 0;
  932|    609|  WORD start_bit_pos = it_bit_buf->bit_pos;
  933|    609|  WORD32 *pow_table = (WORD32 *)aac_tables_ptr->res_block_tables_ptr->pow_table_q17;
  934|    609|  UWORD8 *start_read_pos = it_bit_buf->ptr_read_next;
  935|       |
  936|    609|  const UWORD16 *h_ori = (UWORD16 *)(aac_tables_ptr->code_book[code_no]);
  937|       |
  938|    609|  if (code_no == 11) {
  ------------------
  |  Branch (938:7): [True: 67, False: 542]
  ------------------
  939|     67|    const UWORD16 *h_ori = aac_tables_ptr->res_huffmann_tables_ptr->huffman_codebook_11;
  940|     67|    ret_val = ixheaacd_res_c_block_decode_huff_word1_lb(it_bit_buf, len, h_ori, x_invquant,
  941|     67|                                                        pow_table, p_pul_arr);
  942|    542|  } else if (code_no <= 4) {
  ------------------
  |  Branch (942:14): [True: 273, False: 269]
  ------------------
  943|    273|    WORD32 sign = 0;
  944|    273|    if (code_no > 2) sign = 1;
  ------------------
  |  Branch (944:9): [True: 110, False: 163]
  ------------------
  945|    273|    ret_val = ixheaacd_res_c_block_decode_huff_word2_4_lb(it_bit_buf, len, h_ori, x_invquant,
  946|    273|                                                          pow_table, p_pul_arr, sign);
  947|    273|  } else if (code_no <= 10) {
  ------------------
  |  Branch (947:14): [True: 269, False: 0]
  ------------------
  948|    269|    WORD32 sign = 0;
  949|    269|    if (code_no > 6) sign = 1;
  ------------------
  |  Branch (949:9): [True: 145, False: 124]
  ------------------
  950|    269|    ret_val = ixheaacd_res_c_block_decode_huff_word2_2_lb(it_bit_buf, len, h_ori, x_invquant,
  951|    269|                                                          pow_table, p_pul_arr, sign);
  952|    269|  }
  953|       |
  954|    609|  {
  955|    609|    WORD bits_cons;
  956|    609|    if (it_bit_buf->bit_pos <= 7) {
  ------------------
  |  Branch (956:9): [True: 270, False: 339]
  ------------------
  957|    270|      bits_cons = (WORD)(((it_bit_buf->ptr_read_next - start_read_pos) << 3) +
  958|    270|                         (it_bit_buf->bit_pos - start_bit_pos));
  959|    270|      it_bit_buf->cnt_bits -= bits_cons;
  960|    339|    } else {
  961|    339|      it_bit_buf->ptr_read_next += (it_bit_buf->bit_pos) >> 3;
  962|    339|      it_bit_buf->bit_pos = it_bit_buf->bit_pos & 0x7;
  963|       |
  964|    339|      bits_cons = (WORD)(((it_bit_buf->ptr_read_next - start_read_pos) << 3) +
  965|    339|                         ((it_bit_buf->bit_pos - start_bit_pos)));
  966|    339|      it_bit_buf->cnt_bits -= bits_cons;
  967|    339|    }
  968|    609|  }
  969|    609|  return ret_val;
  970|    609|}
ixheaacd_res_apply_scfs:
 1060|  3.37k|                             WORD32 *scale_table_ptr) {
 1061|  3.37k|  WORD32 i;
 1062|  3.37k|  WORD16 scale_factor;
 1063|       |
 1064|  30.3k|  for (i = t_bands - 1; i >= 0; i--) {
  ------------------
  |  Branch (1064:25): [True: 27.0k, False: 3.37k]
  ------------------
 1065|  27.0k|    scale_factor = *sc_factor++;
 1066|  27.0k|    ixheaacd_res_apply_one_scf(scale_factor, x_invquant, *offset, scale_table_ptr);
 1067|  27.0k|    x_invquant += *offset;
 1068|  27.0k|    offset++;
 1069|  27.0k|  }
 1070|  3.37k|}
ixheaacd_mps_res_block.c:ixheaacd_res_c_block_decode_huff_word1:
   82|     96|    const UWORD16 *h_ori, WORD32 *pow_table_q17, WORD32 maximum_bins_short) {
   83|     96|  WORD32 sp1, sp2;
   84|     96|  WORD32 flush_cw;
   85|     96|  WORD32 i, value, norm_val, off;
   86|     96|  WORD idx, grp_idx;
   87|     96|  WORD32 out1, out2;
   88|     96|  WORD32 err_code = 0;
   89|     96|  WORD len_idx = 0;
   90|     96|  UWORD8 *ptr_read_next = it_bit_buf->ptr_read_next;
   91|     96|  WORD32 bit_pos = it_bit_buf->bit_pos;
   92|     96|  WORD32 read_word = ixheaacd_res_aac_showbits_32(ptr_read_next);
   93|     96|  ptr_read_next += 4;
   94|       |
   95|    308|  do {
   96|    308|    len_idx = offsets[1] - offsets[0];
   97|    308|    grp_idx = group_no;
   98|  1.87k|    do {
   99|  1.87k|      qp = qp + offsets[0];
  100|  1.87k|      idx = len_idx;
  101|  10.7k|      do {
  102|  10.7k|        {
  103|  10.7k|          UWORD16 first_offset;
  104|  10.7k|          WORD16 sign_ret_val;
  105|  10.7k|          UWORD32 read_word1;
  106|  10.7k|          UWORD16 *h;
  107|       |
  108|  10.7k|          read_word1 = read_word << bit_pos;
  109|       |
  110|  10.7k|          h = (UWORD16 *)h_ori;
  111|  10.7k|          h += (read_word1) >> (27);
  112|  10.7k|          sign_ret_val = *h;
  113|       |
  114|  10.7k|          first_offset = 5;
  115|  19.2k|          while (sign_ret_val > 0) {
  ------------------
  |  Branch (115:18): [True: 8.56k, False: 10.7k]
  ------------------
  116|  8.56k|            bit_pos += first_offset;
  117|  8.56k|            ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
  118|  8.56k|                                        it_bit_buf->ptr_bit_buf_end);
  119|  8.56k|            read_word1 = (read_word1) << (first_offset);
  120|  8.56k|            first_offset = (sign_ret_val >> 11);
  121|  8.56k|            h += sign_ret_val & (0x07FF);
  122|  8.56k|            h += (read_word1) >> (32 - first_offset);
  123|  8.56k|            sign_ret_val = *h;
  124|  8.56k|          }
  125|  10.7k|          bit_pos += ((sign_ret_val & 0x7fff) >> 11);
  126|  10.7k|          bit_pos = min(bit_pos, 31);
  ------------------
  |  |   75|  10.7k|#define min(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (75:20): [True: 1.84k, False: 8.86k]
  |  |  ------------------
  ------------------
  127|  10.7k|          value = sign_ret_val & (0x07FF);
  128|  10.7k|        }
  129|  10.7k|        out1 = (value & 0x3E0) >> 5;
  130|  10.7k|        out2 = value & 0x1F;
  131|       |
  132|  10.7k|        flush_cw = read_word << bit_pos;
  133|       |
  134|  10.7k|        sp1 = out1;
  135|  10.7k|        sp2 = out2;
  136|       |
  137|  10.7k|        if (out1) {
  ------------------
  |  Branch (137:13): [True: 8.57k, False: 2.13k]
  ------------------
  138|  8.57k|          if (flush_cw & 0x80000000) {
  ------------------
  |  Branch (138:15): [True: 7.92k, False: 651]
  ------------------
  139|  7.92k|            out1 = -out1;
  140|  7.92k|          }
  141|  8.57k|          bit_pos++;
  142|  8.57k|          flush_cw = (WORD32)flush_cw << 1;
  143|  8.57k|        }
  144|       |
  145|  10.7k|        if (out2) {
  ------------------
  |  Branch (145:13): [True: 8.56k, False: 2.14k]
  ------------------
  146|  8.56k|          bit_pos++;
  147|  8.56k|          if (flush_cw & 0x80000000) {
  ------------------
  |  Branch (147:15): [True: 581, False: 7.98k]
  ------------------
  148|    581|            out2 = -out2;
  149|    581|          }
  150|  8.56k|        }
  151|       |
  152|  10.7k|        ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
  153|  10.7k|                                    it_bit_buf->ptr_bit_buf_end);
  154|  10.7k|        if (sp1 == 16) {
  ------------------
  |  Branch (154:13): [True: 256, False: 10.4k]
  ------------------
  155|    256|          i = 4;
  156|    256|          value = ixheaac_extu(read_word, bit_pos, 23);
  157|    256|          value = value | 0xfffffe00;
  158|    256|          norm_val = ixheaac_norm32(value);
  159|       |
  160|    256|          i += (norm_val - 22);
  161|    256|          bit_pos += (norm_val - 21);
  162|       |
  163|    256|          ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
  164|    256|                                      it_bit_buf->ptr_bit_buf_end);
  165|       |
  166|    256|          off = ixheaac_extu(read_word, bit_pos, 32 - i);
  167|       |
  168|    256|          bit_pos += i;
  169|       |
  170|    256|          ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
  171|    256|                                      it_bit_buf->ptr_bit_buf_end);
  172|       |
  173|    256|          ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
  174|    256|                                      it_bit_buf->ptr_bit_buf_end);
  175|       |
  176|    256|          i = off + ((WORD32)1 << i);
  177|       |
  178|    256|          if (i <= IQ_TABLE_SIZE_HALF)
  ------------------
  |  |   23|    256|#define IQ_TABLE_SIZE_HALF 128
  ------------------
  |  Branch (178:15): [True: 209, False: 47]
  ------------------
  179|    209|            i = pow_table_q17[i];
  180|     47|          else {
  181|     47|            err_code |= ixheaacd_res_inv_quant(&i, pow_table_q17);
  182|     47|          }
  183|       |
  184|    256|          if (out1 < 0) {
  ------------------
  |  Branch (184:15): [True: 82, False: 174]
  ------------------
  185|     82|            out1 = -i;
  186|    174|          } else {
  187|    174|            out1 = i;
  188|    174|          }
  189|    256|          *qp++ = out1;
  190|  10.4k|        } else {
  191|  10.4k|          if (out1 <= 0) {
  ------------------
  |  Branch (191:15): [True: 9.97k, False: 477]
  ------------------
  192|  9.97k|            out1 = -out1;
  193|  9.97k|            out1 = pow_table_q17[out1];
  194|  9.97k|            *qp++ = -out1;
  195|  9.97k|          } else {
  196|    477|            out1 = pow_table_q17[out1];
  197|    477|            *qp++ = out1;
  198|    477|          }
  199|  10.4k|        }
  200|  10.7k|        if (sp2 == 16) {
  ------------------
  |  Branch (200:13): [True: 249, False: 10.4k]
  ------------------
  201|    249|          i = 4;
  202|    249|          value = ixheaac_extu(read_word, bit_pos, 23);
  203|    249|          value = value | 0xfffffe00;
  204|    249|          norm_val = ixheaac_norm32(value);
  205|       |
  206|    249|          i += (norm_val - 22);
  207|       |
  208|    249|          bit_pos += (norm_val - 21);
  209|       |
  210|    249|          ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
  211|    249|                                      it_bit_buf->ptr_bit_buf_end);
  212|       |
  213|    249|          off = ixheaac_extu(read_word, bit_pos, 32 - i);
  214|       |
  215|    249|          bit_pos += i;
  216|       |
  217|    249|          ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
  218|    249|                                      it_bit_buf->ptr_bit_buf_end);
  219|       |
  220|    249|          ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
  221|    249|                                      it_bit_buf->ptr_bit_buf_end);
  222|       |
  223|    249|          i = off + ((WORD32)1 << i);
  224|       |
  225|    249|          if (i <= IQ_TABLE_SIZE_HALF)
  ------------------
  |  |   23|    249|#define IQ_TABLE_SIZE_HALF 128
  ------------------
  |  Branch (225:15): [True: 190, False: 59]
  ------------------
  226|    190|            i = pow_table_q17[i];
  227|     59|          else {
  228|     59|            err_code |= ixheaacd_res_inv_quant(&i, pow_table_q17);
  229|     59|          }
  230|       |
  231|    249|          if (out2 < 0) {
  ------------------
  |  Branch (231:15): [True: 128, False: 121]
  ------------------
  232|    128|            out2 = -i;
  233|    128|          } else {
  234|    121|            out2 = i;
  235|    121|          }
  236|    249|          *qp++ = out2;
  237|  10.4k|        } else {
  238|  10.4k|          if (out2 <= 0) {
  ------------------
  |  Branch (238:15): [True: 2.59k, False: 7.86k]
  ------------------
  239|  2.59k|            out2 = -out2;
  240|  2.59k|            out2 = pow_table_q17[out2];
  241|  2.59k|            *qp++ = -out2;
  242|  7.86k|          } else {
  243|  7.86k|            out2 = pow_table_q17[out2];
  244|  7.86k|            *qp++ = out2;
  245|  7.86k|          }
  246|  10.4k|        }
  247|       |
  248|  10.7k|        idx -= 2;
  249|  10.7k|      } while (idx != 0);
  ------------------
  |  Branch (249:16): [True: 8.83k, False: 1.87k]
  ------------------
  250|       |
  251|  1.87k|      qp += (maximum_bins_short - offsets[1]);
  252|  1.87k|      grp_idx--;
  253|  1.87k|    } while (grp_idx != 0);
  ------------------
  |  Branch (253:14): [True: 1.56k, False: 308]
  ------------------
  254|       |
  255|    308|    offsets++;
  256|    308|    qp -= (maximum_bins_short * group_no);
  257|    308|    no_bands--;
  258|    308|  } while (no_bands >= 0);
  ------------------
  |  Branch (258:12): [True: 212, False: 96]
  ------------------
  259|       |
  260|     96|  it_bit_buf->bit_pos = bit_pos;
  261|     96|  it_bit_buf->ptr_read_next = ptr_read_next - 4;
  262|       |
  263|     96|  return err_code;
  264|     96|}
ixheaacd_mps_res_block.c:ixheaacd_res_c_block_decode_huff_word2_4:
  440|    312|    const UWORD16 *h_ori, WORD32 *pow_table_q17, WORD32 sign, WORD32 maximum_bins_short) {
  441|    312|  WORD32 value;
  442|    312|  WORD idx, grp_idx;
  443|    312|  WORD idx_len;
  444|    312|  WORD32 *qp_org;
  445|       |
  446|    312|  UWORD8 *ptr_read_next = it_bit_buf->ptr_read_next;
  447|    312|  WORD32 bit_pos = it_bit_buf->bit_pos;
  448|    312|  WORD32 read_word = ixheaacd_res_aac_showbits_32(ptr_read_next);
  449|    312|  ptr_read_next += 4;
  450|    312|  qp_org = qp;
  451|  1.67k|  do {
  452|  1.67k|    idx_len = offsets[1] - offsets[0];
  453|  1.67k|    grp_idx = group_no;
  454|       |
  455|  10.8k|    do {
  456|  10.8k|      qp = qp + offsets[0];
  457|  10.8k|      idx = idx_len;
  458|  18.2k|      do {
  459|  18.2k|        UWORD16 first_offset;
  460|  18.2k|        WORD16 sign_ret_val;
  461|  18.2k|        UWORD32 read_word1;
  462|  18.2k|        UWORD16 *h;
  463|       |
  464|  18.2k|        read_word1 = read_word << bit_pos;
  465|       |
  466|  18.2k|        h = (UWORD16 *)h_ori;
  467|  18.2k|        h += (read_word1) >> (27);
  468|  18.2k|        sign_ret_val = *h;
  469|       |
  470|  18.2k|        first_offset = 5;
  471|  20.3k|        while (sign_ret_val > 0) {
  ------------------
  |  Branch (471:16): [True: 2.10k, False: 18.2k]
  ------------------
  472|  2.10k|          bit_pos += first_offset;
  473|  2.10k|          ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
  474|  2.10k|                                      it_bit_buf->ptr_bit_buf_end);
  475|  2.10k|          read_word1 = (read_word1) << (first_offset);
  476|       |
  477|  2.10k|          first_offset = (sign_ret_val >> 11);
  478|  2.10k|          h += sign_ret_val & (0x07FF);
  479|       |
  480|  2.10k|          h += (read_word1) >> (32 - first_offset);
  481|  2.10k|          sign_ret_val = *h;
  482|  2.10k|        }
  483|  18.2k|        bit_pos += ((sign_ret_val & 0x7fff) >> 11);
  484|  18.2k|        bit_pos = min(bit_pos, 31);
  ------------------
  |  |   75|  18.2k|#define min(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (75:20): [True: 4.73k, False: 13.5k]
  |  |  ------------------
  ------------------
  485|  18.2k|        value = sign_ret_val & (0x07FF);
  486|       |
  487|  18.2k|        if (sign) {
  ------------------
  |  Branch (487:13): [True: 15.6k, False: 2.67k]
  ------------------
  488|  15.6k|          WORD32 temp_word;
  489|  15.6k|          temp_word = read_word << bit_pos;
  490|       |
  491|  15.6k|          *qp++ = ixheaacd_res_extract_signed_symbol(value, 24, 30, pow_table_q17, &temp_word,
  492|  15.6k|                                                     &bit_pos);
  493|  15.6k|          *qp++ = ixheaacd_res_extract_signed_symbol(value, 26, 30, pow_table_q17, &temp_word,
  494|  15.6k|                                                     &bit_pos);
  495|  15.6k|          *qp++ = ixheaacd_res_extract_signed_symbol(value, 28, 30, pow_table_q17, &temp_word,
  496|  15.6k|                                                     &bit_pos);
  497|  15.6k|          *qp++ = ixheaacd_res_extract_signed_symbol(value, 30, 30, pow_table_q17, &temp_word,
  498|  15.6k|                                                     &bit_pos);
  499|  15.6k|        } else {
  500|  2.67k|          *qp++ = ixheaacd_res_extract_symbol(value, 24, 30, pow_table_q17);
  501|  2.67k|          *qp++ = ixheaacd_res_extract_symbol(value, 26, 30, pow_table_q17);
  502|  2.67k|          *qp++ = ixheaacd_res_extract_symbol(value, 28, 30, pow_table_q17);
  503|  2.67k|          *qp++ = ixheaacd_res_extract_symbol(value, 30, 30, pow_table_q17);
  504|  2.67k|        }
  505|       |
  506|  18.2k|        ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
  507|  18.2k|                                    it_bit_buf->ptr_bit_buf_end);
  508|  18.2k|        idx -= 4;
  509|  18.2k|      } while (idx != 0);
  ------------------
  |  Branch (509:16): [True: 7.41k, False: 10.8k]
  ------------------
  510|       |
  511|  10.8k|      qp += (maximum_bins_short - offsets[1]);
  512|  10.8k|      grp_idx--;
  513|  10.8k|    } while (grp_idx != 0);
  ------------------
  |  Branch (513:14): [True: 9.18k, False: 1.67k]
  ------------------
  514|  1.67k|    offsets++;
  515|  1.67k|    qp = qp_org;
  516|  1.67k|    no_bands--;
  517|  1.67k|  } while (no_bands >= 0);
  ------------------
  |  Branch (517:12): [True: 1.36k, False: 312]
  ------------------
  518|       |
  519|    312|  it_bit_buf->ptr_read_next = ptr_read_next - 4;
  520|    312|  it_bit_buf->bit_pos = bit_pos;
  521|       |
  522|    312|  return 0;
  523|    312|}
ixheaacd_mps_res_block.c:ixheaacd_res_extract_signed_symbol:
   51|  89.4k|                                                                 WORD32 *pr_bit_pos) {
   52|  89.4k|  WORD32 out;
   53|  89.4k|  out = ixheaac_extu(value, l_shift, r_shift);
   54|  89.4k|  if (out) {
  ------------------
  |  Branch (54:7): [True: 32.4k, False: 56.9k]
  ------------------
   55|  32.4k|    WORD32 bit_pos = *pr_bit_pos;
   56|  32.4k|    out = pow_table_q17[out];
   57|  32.4k|    if (*temp_word & 0x80000000) {
  ------------------
  |  Branch (57:9): [True: 20.9k, False: 11.4k]
  ------------------
   58|  20.9k|      out = -out;
   59|  20.9k|    }
   60|  32.4k|    *temp_word = *temp_word << 1;
   61|  32.4k|    bit_pos++;
   62|  32.4k|    *pr_bit_pos = bit_pos;
   63|  32.4k|  }
   64|  89.4k|  return out;
   65|  89.4k|}
ixheaacd_mps_res_block.c:ixheaacd_res_extract_symbol:
   33|  24.7k|                                                          WORD32 r_shift, WORD32 *pow_table_q17) {
   34|  24.7k|  WORD32 out;
   35|  24.7k|  out = (WORD16)((value << l_shift) >> r_shift);
   36|       |
   37|  24.7k|  if (out < 0) {
  ------------------
  |  Branch (37:7): [True: 9.26k, False: 15.5k]
  ------------------
   38|  9.26k|    out = -out;
   39|  9.26k|    out = pow_table_q17[out];
   40|  9.26k|    out = -out;
   41|  9.26k|  } else
   42|  15.5k|    out = pow_table_q17[out];
   43|       |
   44|  24.7k|  return out;
   45|  24.7k|}
ixheaacd_mps_res_block.c:ixheaacd_res_c_block_decode_huff_word2_2:
  692|    215|{
  693|    215|  WORD32 value;
  694|    215|  WORD idx, grp_idx;
  695|    215|  WORD len_idx;
  696|       |
  697|    215|  WORD32 *qp_org = qp;
  698|       |
  699|    215|  UWORD8 *ptr_read_next = it_bif_buf->ptr_read_next;
  700|    215|  WORD32 bit_pos = it_bif_buf->bit_pos;
  701|    215|  WORD32 read_word = ixheaacd_res_aac_showbits_32(ptr_read_next);
  702|    215|  ptr_read_next += 4;
  703|       |
  704|    834|  do {
  705|    834|    len_idx = offsets[1] - offsets[0];
  706|    834|    grp_idx = group_no;
  707|  5.22k|    do {
  708|  5.22k|      qp += offsets[0];
  709|  5.22k|      idx = len_idx;
  710|  20.5k|      do {
  711|  20.5k|        UWORD16 first_offset;
  712|  20.5k|        WORD16 sign_ret_val;
  713|  20.5k|        UWORD32 read_word1;
  714|  20.5k|        UWORD16 *h;
  715|       |
  716|  20.5k|        read_word1 = read_word << bit_pos;
  717|       |
  718|  20.5k|        h = (UWORD16 *)h_ori;
  719|  20.5k|        h += (read_word1) >> (27);
  720|  20.5k|        sign_ret_val = *h;
  721|       |
  722|  20.5k|        first_offset = 5;
  723|  26.3k|        while (sign_ret_val > 0) {
  ------------------
  |  Branch (723:16): [True: 5.79k, False: 20.5k]
  ------------------
  724|  5.79k|          bit_pos += first_offset;
  725|  5.79k|          ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
  726|  5.79k|                                      it_bif_buf->ptr_bit_buf_end);
  727|  5.79k|          read_word1 = (read_word1) << (first_offset);
  728|       |
  729|  5.79k|          first_offset = (sign_ret_val >> 11);
  730|  5.79k|          h += sign_ret_val & (0x07FF);
  731|       |
  732|  5.79k|          h += (read_word1) >> (32 - first_offset);
  733|  5.79k|          sign_ret_val = *h;
  734|  5.79k|        }
  735|  20.5k|        bit_pos += ((sign_ret_val & 0x7fff) >> 11);
  736|  20.5k|        bit_pos = min(bit_pos, 31);
  ------------------
  |  |   75|  20.5k|#define min(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (75:20): [True: 2.09k, False: 18.4k]
  |  |  ------------------
  ------------------
  737|  20.5k|        value = sign_ret_val & (0x07FF);
  738|       |
  739|  20.5k|        if (sign) {
  ------------------
  |  Branch (739:13): [True: 13.4k, False: 7.04k]
  ------------------
  740|  13.4k|          WORD32 temp_word;
  741|  13.4k|          temp_word = read_word << bit_pos;
  742|       |
  743|  13.4k|          *qp++ = ixheaacd_res_extract_signed_symbol(value, 24, 28, pow_table_q17, &temp_word,
  744|  13.4k|                                                     &bit_pos);
  745|  13.4k|          *qp++ = ixheaacd_res_extract_signed_symbol(value, 28, 28, pow_table_q17, &temp_word,
  746|  13.4k|                                                     &bit_pos);
  747|  13.4k|        } else {
  748|  7.04k|          *qp++ = ixheaacd_res_extract_symbol(value, 24, 28, pow_table_q17);
  749|  7.04k|          *qp++ = ixheaacd_res_extract_symbol(value, 28, 28, pow_table_q17);
  750|  7.04k|        }
  751|       |
  752|  20.5k|        ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
  753|  20.5k|                                    it_bif_buf->ptr_bit_buf_end);
  754|  20.5k|        idx -= 2;
  755|  20.5k|      } while (idx != 0);
  ------------------
  |  Branch (755:16): [True: 15.3k, False: 5.22k]
  ------------------
  756|       |
  757|  5.22k|      qp += (maximum_bins_short - offsets[1]);
  758|  5.22k|      grp_idx--;
  759|  5.22k|    } while (grp_idx != 0);
  ------------------
  |  Branch (759:14): [True: 4.38k, False: 834]
  ------------------
  760|       |
  761|    834|    offsets++;
  762|    834|    qp = qp_org;
  763|    834|    no_bands--;
  764|    834|  } while (no_bands >= 0);
  ------------------
  |  Branch (764:12): [True: 619, False: 215]
  ------------------
  765|       |
  766|    215|  it_bif_buf->ptr_read_next = ptr_read_next - 4;
  767|    215|  it_bif_buf->bit_pos = bit_pos;
  768|       |
  769|    215|  return 0;
  770|    215|}
ixheaacd_mps_res_block.c:ixheaacd_res_c_block_decode_huff_word1_lb:
  268|     67|    WORD32 *pow_table_q17, WORD8 *p_pul_arr) {
  269|     67|  WORD32 sp1, sp2;
  270|     67|  WORD32 flush_cw;
  271|     67|  WORD32 i, value, norm_val, off;
  272|     67|  WORD idx;
  273|     67|  WORD32 out1, out2;
  274|     67|  WORD32 err_code = 0;
  275|     67|  UWORD8 *ptr_read_next = it_bif_buf->ptr_read_next;
  276|     67|  WORD32 bit_pos = it_bif_buf->bit_pos;
  277|     67|  WORD32 read_word = ixheaacd_res_aac_showbits_32(ptr_read_next);
  278|     67|  ptr_read_next += 4;
  279|       |
  280|  5.56k|  for (idx = len; idx != 0; idx -= 2) {
  ------------------
  |  Branch (280:19): [True: 5.50k, False: 67]
  ------------------
  281|  5.50k|    {
  282|  5.50k|      UWORD16 first_offset;
  283|  5.50k|      WORD16 sign_ret_val;
  284|  5.50k|      UWORD32 read_word1;
  285|  5.50k|      UWORD16 *h;
  286|       |
  287|  5.50k|      read_word1 = read_word << bit_pos;
  288|       |
  289|  5.50k|      h = (UWORD16 *)h_ori;
  290|  5.50k|      h += (read_word1) >> (27);
  291|  5.50k|      sign_ret_val = *h;
  292|       |
  293|  5.50k|      first_offset = 5;
  294|  9.29k|      while (sign_ret_val > 0) {
  ------------------
  |  Branch (294:14): [True: 3.79k, False: 5.50k]
  ------------------
  295|  3.79k|        bit_pos += first_offset;
  296|  3.79k|        ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
  297|  3.79k|                                    it_bif_buf->ptr_bit_buf_end);
  298|  3.79k|        read_word1 = (read_word1) << (first_offset);
  299|       |
  300|  3.79k|        first_offset = (sign_ret_val >> 11);
  301|  3.79k|        h += sign_ret_val & (0x07FF);
  302|       |
  303|  3.79k|        h += (read_word1) >> (32 - first_offset);
  304|  3.79k|        sign_ret_val = *h;
  305|  3.79k|      }
  306|  5.50k|      bit_pos += ((sign_ret_val & 0x7fff) >> 11);
  307|  5.50k|      bit_pos = min(bit_pos, 31);
  ------------------
  |  |   75|  5.50k|#define min(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (75:20): [True: 2.71k, False: 2.78k]
  |  |  ------------------
  ------------------
  308|  5.50k|      value = sign_ret_val & (0x07FF);
  309|  5.50k|    }
  310|       |
  311|  5.50k|    flush_cw = read_word << bit_pos;
  312|       |
  313|  5.50k|    out1 = (value & 0x3E0) >> 5;
  314|  5.50k|    out2 = value & 0x1F;
  315|       |
  316|  5.50k|    sp1 = out1;
  317|       |
  318|  5.50k|    if (out1) {
  ------------------
  |  Branch (318:9): [True: 3.22k, False: 2.27k]
  ------------------
  319|  3.22k|      if (flush_cw & 0x80000000) {
  ------------------
  |  Branch (319:11): [True: 2.23k, False: 990]
  ------------------
  320|  2.23k|        out1 = -out1;
  321|  2.23k|      }
  322|       |
  323|  3.22k|      bit_pos++;
  324|  3.22k|      flush_cw = (WORD32)flush_cw << 1;
  325|  3.22k|    }
  326|       |
  327|  5.50k|    sp2 = out2;
  328|  5.50k|    if (out2) {
  ------------------
  |  Branch (328:9): [True: 3.13k, False: 2.36k]
  ------------------
  329|  3.13k|      bit_pos++;
  330|  3.13k|      if (flush_cw & 0x80000000) {
  ------------------
  |  Branch (330:11): [True: 812, False: 2.32k]
  ------------------
  331|    812|        out2 = -out2;
  332|    812|      }
  333|  3.13k|    }
  334|       |
  335|  5.50k|    ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
  336|  5.50k|                                it_bif_buf->ptr_bit_buf_end);
  337|       |
  338|  5.50k|    if (sp1 == 16) {
  ------------------
  |  Branch (338:9): [True: 343, False: 5.15k]
  ------------------
  339|    343|      i = 4;
  340|    343|      value = ixheaac_extu(read_word, bit_pos, 23);
  341|    343|      value = value | 0xfffffe00;
  342|    343|      norm_val = ixheaac_norm32(value);
  343|    343|      i += (norm_val - 22);
  344|    343|      bit_pos += (norm_val - 21);
  345|       |
  346|    343|      ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
  347|    343|                                  it_bif_buf->ptr_bit_buf_end);
  348|       |
  349|    343|      off = ixheaac_extu(read_word, bit_pos, 32 - i);
  350|       |
  351|    343|      bit_pos += i;
  352|       |
  353|    343|      ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
  354|    343|                                  it_bif_buf->ptr_bit_buf_end);
  355|    343|      value = *p_pul_arr++;
  356|    343|      ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
  357|    343|                                  it_bif_buf->ptr_bit_buf_end);
  358|    343|      i = off + ((WORD32)1 << i);
  359|    343|      i = add_d(i, value);
  ------------------
  |  |   23|    343|#define add_d(a, b) ((a) + (b))
  ------------------
  360|       |
  361|    343|      if (i <= IQ_TABLE_SIZE_HALF)
  ------------------
  |  |   23|    343|#define IQ_TABLE_SIZE_HALF 128
  ------------------
  |  Branch (361:11): [True: 279, False: 64]
  ------------------
  362|    279|        i = pow_table_q17[i];
  363|     64|      else {
  364|     64|        err_code |= ixheaacd_res_inv_quant(&i, pow_table_q17);
  365|     64|      }
  366|    343|      if (out1 < 0) {
  ------------------
  |  Branch (366:11): [True: 176, False: 167]
  ------------------
  367|    176|        i = -i;
  368|    176|      }
  369|    343|      *x_invquant++ = i;
  370|  5.15k|    } else {
  371|  5.15k|      WORD8 temp = *p_pul_arr++;
  372|  5.15k|      if (out1 <= 0) {
  ------------------
  |  Branch (372:11): [True: 4.33k, False: 823]
  ------------------
  373|  4.33k|        out1 = sub_d(temp, out1);
  ------------------
  |  |   24|  4.33k|#define sub_d(a, b) ((a) - (b))
  ------------------
  374|  4.33k|        out1 = pow_table_q17[out1];
  375|  4.33k|        *x_invquant++ = -out1;
  376|  4.33k|      } else {
  377|    823|        out1 = add_d(out1, temp);
  ------------------
  |  |   23|    823|#define add_d(a, b) ((a) + (b))
  ------------------
  378|    823|        out1 = pow_table_q17[out1];
  379|    823|        *x_invquant++ = out1;
  380|    823|      }
  381|  5.15k|    }
  382|       |
  383|  5.50k|    if (sp2 == 16) {
  ------------------
  |  Branch (383:9): [True: 348, False: 5.15k]
  ------------------
  384|    348|      i = 4;
  385|    348|      value = ixheaac_extu(read_word, bit_pos, 23);
  386|    348|      value = value | 0xfffffe00;
  387|    348|      norm_val = ixheaac_norm32(value);
  388|       |
  389|    348|      i += (norm_val - 22);
  390|       |
  391|    348|      bit_pos += (norm_val - 21);
  392|       |
  393|    348|      ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
  394|    348|                                  it_bif_buf->ptr_bit_buf_end);
  395|       |
  396|    348|      off = ixheaac_extu(read_word, bit_pos, 32 - i);
  397|       |
  398|    348|      bit_pos += i;
  399|       |
  400|    348|      ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
  401|    348|                                  it_bif_buf->ptr_bit_buf_end);
  402|    348|      value = *p_pul_arr++;
  403|    348|      ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
  404|    348|                                  it_bif_buf->ptr_bit_buf_end);
  405|       |
  406|    348|      i = off + ((WORD32)1 << i);
  407|    348|      i = add_d(i, value);
  ------------------
  |  |   23|    348|#define add_d(a, b) ((a) + (b))
  ------------------
  408|    348|      if (i <= IQ_TABLE_SIZE_HALF)
  ------------------
  |  |   23|    348|#define IQ_TABLE_SIZE_HALF 128
  ------------------
  |  Branch (408:11): [True: 200, False: 148]
  ------------------
  409|    200|        i = pow_table_q17[i];
  410|    148|      else {
  411|    148|        err_code |= ixheaacd_res_inv_quant(&i, pow_table_q17);
  412|    148|      }
  413|       |
  414|    348|      if (out2 < 0) {
  ------------------
  |  Branch (414:11): [True: 147, False: 201]
  ------------------
  415|    147|        i = -i;
  416|    147|      }
  417|    348|      *x_invquant++ = i;
  418|  5.15k|    } else {
  419|  5.15k|      WORD8 temp = *p_pul_arr++;
  420|  5.15k|      if (out2 <= 0) {
  ------------------
  |  Branch (420:11): [True: 3.03k, False: 2.12k]
  ------------------
  421|  3.03k|        out2 = sub_d(temp, out2);
  ------------------
  |  |   24|  3.03k|#define sub_d(a, b) ((a) - (b))
  ------------------
  422|  3.03k|        out2 = pow_table_q17[out2];
  423|  3.03k|        *x_invquant++ = -out2;
  424|  3.03k|      } else {
  425|  2.12k|        out2 = add_d(out2, temp);
  ------------------
  |  |   23|  2.12k|#define add_d(a, b) ((a) + (b))
  ------------------
  426|  2.12k|        out2 = pow_table_q17[out2];
  427|  2.12k|        *x_invquant++ = out2;
  428|  2.12k|      }
  429|  5.15k|    }
  430|  5.50k|  }
  431|       |
  432|     67|  it_bif_buf->ptr_read_next = ptr_read_next - 4;
  433|     67|  it_bif_buf->bit_pos = bit_pos;
  434|       |
  435|     67|  return err_code;
  436|     67|}
ixheaacd_mps_res_block.c:ixheaacd_res_c_block_decode_huff_word2_4_lb:
  527|    273|    WORD32 *pow_table_q17, WORD8 *p_pul_arr, WORD32 sign) {
  528|    273|  WORD32 value;
  529|    273|  WORD idx;
  530|       |
  531|    273|  UWORD8 *ptr_read_next = it_bit_buf->ptr_read_next;
  532|    273|  WORD32 bit_pos = it_bit_buf->bit_pos;
  533|    273|  WORD32 read_word = ixheaacd_res_aac_showbits_32(ptr_read_next);
  534|    273|  ptr_read_next += 4;
  535|       |
  536|  7.74k|  for (idx = len; idx != 0; idx -= 4) {
  ------------------
  |  Branch (536:19): [True: 7.46k, False: 273]
  ------------------
  537|  7.46k|    WORD32 res;
  538|  7.46k|    WORD32 ampres, ampres1;
  539|  7.46k|    WORD32 ampres2, ampres3;
  540|  7.46k|    UWORD16 first_offset;
  541|  7.46k|    WORD16 sign_ret_val;
  542|  7.46k|    UWORD32 read_word1;
  543|  7.46k|    UWORD16 *h;
  544|       |
  545|  7.46k|    read_word1 = read_word << bit_pos;
  546|       |
  547|  7.46k|    h = (UWORD16 *)h_ori;
  548|  7.46k|    h += (read_word1) >> (27);
  549|  7.46k|    sign_ret_val = *h;
  550|       |
  551|  7.46k|    first_offset = 5;
  552|  9.23k|    while (sign_ret_val > 0) {
  ------------------
  |  Branch (552:12): [True: 1.76k, False: 7.46k]
  ------------------
  553|  1.76k|      bit_pos += first_offset;
  554|  1.76k|      ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
  555|  1.76k|                                  it_bit_buf->ptr_bit_buf_end);
  556|  1.76k|      read_word1 = (read_word1) << (first_offset);
  557|       |
  558|  1.76k|      first_offset = (sign_ret_val >> 11);
  559|  1.76k|      h += sign_ret_val & (0x07FF);
  560|       |
  561|  1.76k|      h += (read_word1) >> (32 - first_offset);
  562|  1.76k|      sign_ret_val = *h;
  563|  1.76k|    }
  564|  7.46k|    bit_pos += ((sign_ret_val & 0x7fff) >> 11);
  565|  7.46k|    bit_pos = min(bit_pos, 31);
  ------------------
  |  |   75|  7.46k|#define min(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (75:20): [True: 3.64k, False: 3.82k]
  |  |  ------------------
  ------------------
  566|       |
  567|  7.46k|    value = sign_ret_val & (0x07FF);
  568|       |
  569|  7.46k|    if (sign) {
  ------------------
  |  Branch (569:9): [True: 3.95k, False: 3.51k]
  ------------------
  570|  3.95k|      WORD32 out0, out1, out2, out3;
  571|  3.95k|      WORD32 ampout0, ampout1, ampout2, ampout3;
  572|  3.95k|      WORD32 temp_word;
  573|  3.95k|      temp_word = read_word << bit_pos;
  574|       |
  575|  3.95k|      out0 = (ixheaac_extu(value, 24, 30));
  576|  3.95k|      ampout0 = add_d(out0, *p_pul_arr++);
  ------------------
  |  |   23|  3.95k|#define add_d(a, b) ((a) + (b))
  ------------------
  577|  3.95k|      ampout0 = pow_table_q17[ampout0];
  578|       |
  579|  3.95k|      if (out0) {
  ------------------
  |  Branch (579:11): [True: 1.98k, False: 1.96k]
  ------------------
  580|  1.98k|        if (temp_word & 0x80000000) {
  ------------------
  |  Branch (580:13): [True: 545, False: 1.44k]
  ------------------
  581|    545|          ampout0 = -ampout0;
  582|    545|        }
  583|  1.98k|        temp_word = temp_word << 1;
  584|  1.98k|        bit_pos++;
  585|  1.98k|      } else {
  586|  1.96k|        ampout0 = -ampout0;
  587|  1.96k|      }
  588|       |
  589|  3.95k|      out1 = (ixheaac_extu(value, 26, 30));
  590|  3.95k|      ampout1 = add_d(out1, *p_pul_arr++);
  ------------------
  |  |   23|  3.95k|#define add_d(a, b) ((a) + (b))
  ------------------
  591|  3.95k|      ampout1 = pow_table_q17[ampout1];
  592|  3.95k|      if (out1) {
  ------------------
  |  Branch (592:11): [True: 1.65k, False: 2.29k]
  ------------------
  593|  1.65k|        if (temp_word & 0x80000000) {
  ------------------
  |  Branch (593:13): [True: 244, False: 1.41k]
  ------------------
  594|    244|          ampout1 = -(ampout1);
  595|    244|        }
  596|  1.65k|        temp_word = temp_word << 1;
  597|  1.65k|        bit_pos++;
  598|  2.29k|      } else {
  599|  2.29k|        ampout1 = -ampout1;
  600|  2.29k|      }
  601|  3.95k|      out2 = (ixheaac_extu(value, 28, 30));
  602|  3.95k|      ampout2 = add_d(out2, *p_pul_arr++);
  ------------------
  |  |   23|  3.95k|#define add_d(a, b) ((a) + (b))
  ------------------
  603|  3.95k|      ampout2 = pow_table_q17[ampout2];
  604|  3.95k|      if (out2) {
  ------------------
  |  Branch (604:11): [True: 1.96k, False: 1.98k]
  ------------------
  605|  1.96k|        if (temp_word & 0x80000000) {
  ------------------
  |  Branch (605:13): [True: 494, False: 1.47k]
  ------------------
  606|    494|          ampout2 = -(ampout2);
  607|    494|        }
  608|  1.96k|        temp_word = temp_word << 1;
  609|  1.96k|        bit_pos++;
  610|  1.98k|      } else {
  611|  1.98k|        ampout2 = -ampout2;
  612|  1.98k|      }
  613|       |
  614|  3.95k|      *x_invquant++ = ampout0;
  615|  3.95k|      *x_invquant++ = ampout1;
  616|  3.95k|      *x_invquant++ = ampout2;
  617|       |
  618|  3.95k|      out3 = (ixheaac_extu(value, 30, 30));
  619|  3.95k|      ampout3 = add_d(out3, *p_pul_arr++);
  ------------------
  |  |   23|  3.95k|#define add_d(a, b) ((a) + (b))
  ------------------
  620|  3.95k|      ampout3 = pow_table_q17[ampout3];
  621|  3.95k|      if (out3) {
  ------------------
  |  Branch (621:11): [True: 1.93k, False: 2.01k]
  ------------------
  622|  1.93k|        if (temp_word & 0x80000000) {
  ------------------
  |  Branch (622:13): [True: 288, False: 1.64k]
  ------------------
  623|    288|          ampout3 = -(ampout3);
  624|    288|        }
  625|  1.93k|        temp_word = temp_word << 1;
  626|  1.93k|        bit_pos++;
  627|  2.01k|      } else {
  628|  2.01k|        ampout3 = -ampout3;
  629|  2.01k|      }
  630|       |
  631|  3.95k|      *x_invquant++ = ampout3;
  632|  3.95k|    } else {
  633|  3.51k|      ampres = *p_pul_arr++;
  634|  3.51k|      res = (ixheaacd_res_exts(value, 24, 30));
  635|  3.51k|      if (res > 0) {
  ------------------
  |  Branch (635:11): [True: 277, False: 3.23k]
  ------------------
  636|    277|        ampres = add_d(res, ampres);
  ------------------
  |  |   23|    277|#define add_d(a, b) ((a) + (b))
  ------------------
  637|    277|        ampres = pow_table_q17[ampres];
  638|  3.23k|      } else {
  639|  3.23k|        ampres = sub_d(ampres, res);
  ------------------
  |  |   24|  3.23k|#define sub_d(a, b) ((a) - (b))
  ------------------
  640|  3.23k|        ampres = pow_table_q17[ampres];
  641|  3.23k|        ampres = -ampres;
  642|  3.23k|      }
  643|  3.51k|      res = (ixheaacd_res_exts(value, 26, 30));
  644|  3.51k|      ampres1 = *p_pul_arr++;
  645|  3.51k|      if (res > 0) {
  ------------------
  |  Branch (645:11): [True: 133, False: 3.38k]
  ------------------
  646|    133|        ampres1 = add_d(res, ampres1);
  ------------------
  |  |   23|    133|#define add_d(a, b) ((a) + (b))
  ------------------
  647|    133|        ampres1 = pow_table_q17[ampres1];
  648|  3.38k|      } else {
  649|  3.38k|        ampres1 = sub_d(ampres1, res);
  ------------------
  |  |   24|  3.38k|#define sub_d(a, b) ((a) - (b))
  ------------------
  650|  3.38k|        ampres1 = pow_table_q17[ampres1];
  651|  3.38k|        ampres1 = -ampres1;
  652|  3.38k|      }
  653|  3.51k|      res = (ixheaacd_res_exts(value, 28, 30));
  654|  3.51k|      ampres2 = *p_pul_arr++;
  655|  3.51k|      if (res > 0) {
  ------------------
  |  Branch (655:11): [True: 104, False: 3.41k]
  ------------------
  656|    104|        ampres2 = add_d(res, ampres2);
  ------------------
  |  |   23|    104|#define add_d(a, b) ((a) + (b))
  ------------------
  657|    104|        ampres2 = pow_table_q17[ampres2];
  658|  3.41k|      } else {
  659|  3.41k|        ampres2 = sub_d(ampres2, res);
  ------------------
  |  |   24|  3.41k|#define sub_d(a, b) ((a) - (b))
  ------------------
  660|  3.41k|        ampres2 = pow_table_q17[ampres2];
  661|  3.41k|        ampres2 = -ampres2;
  662|  3.41k|      }
  663|  3.51k|      res = (ixheaacd_res_exts(value, 30, 30));
  664|  3.51k|      ampres3 = *p_pul_arr++;
  665|  3.51k|      if (res > 0) {
  ------------------
  |  Branch (665:11): [True: 88, False: 3.42k]
  ------------------
  666|     88|        ampres3 = add_d(res, ampres3);
  ------------------
  |  |   23|     88|#define add_d(a, b) ((a) + (b))
  ------------------
  667|     88|        ampres3 = pow_table_q17[ampres3];
  668|  3.42k|      } else {
  669|  3.42k|        ampres3 = sub_d(ampres3, res);
  ------------------
  |  |   24|  3.42k|#define sub_d(a, b) ((a) - (b))
  ------------------
  670|  3.42k|        ampres3 = pow_table_q17[ampres3];
  671|  3.42k|        ampres3 = -ampres3;
  672|  3.42k|      }
  673|  3.51k|      *x_invquant++ = ampres;
  674|  3.51k|      *x_invquant++ = ampres1;
  675|  3.51k|      *x_invquant++ = ampres2;
  676|  3.51k|      *x_invquant++ = ampres3;
  677|  3.51k|    }
  678|  7.46k|    ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
  679|  7.46k|                                it_bit_buf->ptr_bit_buf_end);
  680|  7.46k|  }
  681|       |
  682|    273|  it_bit_buf->ptr_read_next = ptr_read_next - 4;
  683|    273|  it_bit_buf->bit_pos = bit_pos;
  684|       |
  685|    273|  return 0;
  686|    273|}
ixheaacd_mps_res_block.c:ixheaacd_res_c_block_decode_huff_word2_2_lb:
  774|    269|    WORD32 *pow_table_q17, WORD8 *p_pul_arr, WORD32 sign) {
  775|    269|  WORD32 value, res, ampres;
  776|    269|  WORD idx;
  777|       |
  778|    269|  UWORD8 *ptr_read_next = it_bit_buf->ptr_read_next;
  779|    269|  WORD32 bit_pos = it_bit_buf->bit_pos;
  780|    269|  WORD32 read_word = ixheaacd_res_aac_showbits_32(ptr_read_next);
  781|    269|  ptr_read_next += 4;
  782|       |
  783|  10.8k|  for (idx = len; idx != 0; idx -= 2) {
  ------------------
  |  Branch (783:19): [True: 10.5k, False: 269]
  ------------------
  784|  10.5k|    {
  785|  10.5k|      UWORD16 first_offset;
  786|  10.5k|      WORD16 sign_ret_val;
  787|  10.5k|      UWORD32 read_word1;
  788|  10.5k|      UWORD16 *h;
  789|       |
  790|  10.5k|      read_word1 = read_word << bit_pos;
  791|       |
  792|  10.5k|      h = (UWORD16 *)h_ori;
  793|  10.5k|      h += (read_word1) >> (27);
  794|  10.5k|      sign_ret_val = *h;
  795|       |
  796|  10.5k|      first_offset = 5;
  797|  12.1k|      while (sign_ret_val > 0) {
  ------------------
  |  Branch (797:14): [True: 1.64k, False: 10.5k]
  ------------------
  798|  1.64k|        bit_pos += first_offset;
  799|  1.64k|        ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
  800|  1.64k|                                    it_bit_buf->ptr_bit_buf_end);
  801|  1.64k|        read_word1 = (read_word1) << (first_offset);
  802|       |
  803|  1.64k|        first_offset = (sign_ret_val >> 11);
  804|  1.64k|        h += sign_ret_val & (0x07FF);
  805|       |
  806|  1.64k|        h += (read_word1) >> (32 - first_offset);
  807|  1.64k|        sign_ret_val = *h;
  808|  1.64k|      }
  809|  10.5k|      bit_pos += ((sign_ret_val & 0x7fff) >> 11);
  810|  10.5k|      bit_pos = min(bit_pos, 31);
  ------------------
  |  |   75|  10.5k|#define min(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (75:20): [True: 3.98k, False: 6.54k]
  |  |  ------------------
  ------------------
  811|       |
  812|  10.5k|      value = sign_ret_val & (0x07FF);
  813|  10.5k|    }
  814|       |
  815|  10.5k|    if (sign) {
  ------------------
  |  Branch (815:9): [True: 7.19k, False: 3.34k]
  ------------------
  816|  7.19k|      WORD32 out0, out1, temp_word;
  817|  7.19k|      WORD32 ampout0, ampout1;
  818|       |
  819|  7.19k|      ampout0 = *p_pul_arr++;
  820|  7.19k|      ampout1 = *p_pul_arr++;
  821|       |
  822|  7.19k|      out0 = value & 0xf0;
  823|       |
  824|  7.19k|      ampout0 = add_d(ampout0, (UWORD32)out0 >> 4);
  ------------------
  |  |   23|  7.19k|#define add_d(a, b) ((a) + (b))
  ------------------
  825|  7.19k|      ampout0 = pow_table_q17[ampout0];
  826|       |
  827|  7.19k|      out1 = value & 0xf;
  828|  7.19k|      ampout1 = add_d(out1, ampout1);
  ------------------
  |  |   23|  7.19k|#define add_d(a, b) ((a) + (b))
  ------------------
  829|  7.19k|      ampout1 = pow_table_q17[ampout1];
  830|       |
  831|  7.19k|      temp_word = read_word << bit_pos;
  832|  7.19k|      if (out0) {
  ------------------
  |  Branch (832:11): [True: 4.84k, False: 2.35k]
  ------------------
  833|  4.84k|        if (temp_word & 0x80000000) {
  ------------------
  |  Branch (833:13): [True: 1.77k, False: 3.07k]
  ------------------
  834|  1.77k|          ampout0 = -(ampout0);
  835|  1.77k|        }
  836|  4.84k|        bit_pos++;
  837|  4.84k|        temp_word = temp_word << 1;
  838|  4.84k|      } else {
  839|  2.35k|        ampout0 = -(ampout0);
  840|  2.35k|      }
  841|  7.19k|      if (out1) {
  ------------------
  |  Branch (841:11): [True: 4.33k, False: 2.85k]
  ------------------
  842|  4.33k|        if (temp_word & 0x80000000) {
  ------------------
  |  Branch (842:13): [True: 1.03k, False: 3.29k]
  ------------------
  843|  1.03k|          ampout1 = -(ampout1);
  844|  1.03k|        }
  845|  4.33k|        bit_pos++;
  846|  4.33k|      } else {
  847|  2.85k|        ampout1 = -(ampout1);
  848|  2.85k|      }
  849|  7.19k|      ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
  850|  7.19k|                                  it_bit_buf->ptr_bit_buf_end);
  851|  7.19k|      *x_invquant++ = ampout0;
  852|  7.19k|      *x_invquant++ = ampout1;
  853|  7.19k|    } else {
  854|  3.34k|      res = ((value << 24) >> 28);
  855|  3.34k|      ampres = *p_pul_arr++;
  856|  3.34k|      if (res > 0) {
  ------------------
  |  Branch (856:11): [True: 234, False: 3.10k]
  ------------------
  857|    234|        ampres = add_d(res, ampres);
  ------------------
  |  |   23|    234|#define add_d(a, b) ((a) + (b))
  ------------------
  858|    234|        *x_invquant++ = pow_table_q17[ampres];
  859|  3.10k|      } else {
  860|  3.10k|        ampres = sub_d(ampres, res);
  ------------------
  |  |   24|  3.10k|#define sub_d(a, b) ((a) - (b))
  ------------------
  861|  3.10k|        ampres = pow_table_q17[ampres];
  862|  3.10k|        *x_invquant++ = -ampres;
  863|  3.10k|      }
  864|       |
  865|  3.34k|      res = ((value << 28) >> 28);
  866|  3.34k|      value = *p_pul_arr++;
  867|  3.34k|      if (res > 0) {
  ------------------
  |  Branch (867:11): [True: 215, False: 3.12k]
  ------------------
  868|    215|        ampres = add_d(res, value);
  ------------------
  |  |   23|    215|#define add_d(a, b) ((a) + (b))
  ------------------
  869|    215|        *x_invquant++ = pow_table_q17[ampres];
  870|  3.12k|      } else {
  871|  3.12k|        ampres = sub_d(value, res);
  ------------------
  |  |   24|  3.12k|#define sub_d(a, b) ((a) - (b))
  ------------------
  872|  3.12k|        ampres = pow_table_q17[ampres];
  873|  3.12k|        *x_invquant++ = -ampres;
  874|  3.12k|      }
  875|  3.34k|    }
  876|  10.5k|    ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
  877|  10.5k|                                it_bit_buf->ptr_bit_buf_end);
  878|  10.5k|  }
  879|    269|  it_bit_buf->ptr_read_next = ptr_read_next - 4;
  880|    269|  it_bit_buf->bit_pos = bit_pos;
  881|       |
  882|    269|  return 0;
  883|    269|}
ixheaacd_mps_res_block.c:ixheaacd_res_apply_one_scf:
  973|  27.0k|                                       WORD32 *scale_table_ptr) {
  974|  27.0k|  WORD32 j;
  975|       |
  976|  27.0k|  WORD32 temp_1;
  977|  27.0k|  WORD32 q_factor;
  978|  27.0k|  WORD32 buffer1;
  979|  27.0k|  WORD16 scale_short;
  980|       |
  981|  27.0k|  if (scale_factor < 24) {
  ------------------
  |  Branch (981:7): [True: 6.06k, False: 20.9k]
  ------------------
  982|  60.9k|    for (j = end; j > 0; j--) {
  ------------------
  |  Branch (982:19): [True: 54.8k, False: 6.06k]
  ------------------
  983|  54.8k|      *x_invquant++ = 0;
  984|  54.8k|    }
  985|  20.9k|  } else {
  986|  20.9k|    WORD32 shift;
  987|  20.9k|    q_factor = 37 - (scale_factor >> 2);
  988|       |
  989|  20.9k|    scale_short = scale_table_ptr[(scale_factor & 0x0003)];
  990|       |
  991|  20.9k|    shift = q_factor;
  992|       |
  993|  20.9k|    if (shift > 0) {
  ------------------
  |  Branch (993:9): [True: 2.27k, False: 18.6k]
  ------------------
  994|  2.27k|      if (scale_short == (WORD16)0x8000) {
  ------------------
  |  Branch (994:11): [True: 0, False: 2.27k]
  ------------------
  995|      0|        for (j = end; j > 0; j--) {
  ------------------
  |  Branch (995:23): [True: 0, False: 0]
  ------------------
  996|      0|          temp_1 = *x_invquant;
  997|       |
  998|      0|          buffer1 = ixheaac_mult32x16in32_shl_sat(temp_1, scale_short);
  999|      0|          buffer1 = ixheaac_shr32(buffer1, shift);
 1000|      0|          *x_invquant++ = buffer1;
 1001|      0|        }
 1002|  2.27k|      } else {
 1003|  29.4k|        for (j = end; j > 0; j--) {
  ------------------
  |  Branch (1003:23): [True: 27.1k, False: 2.27k]
  ------------------
 1004|  27.1k|          temp_1 = *x_invquant;
 1005|       |
 1006|  27.1k|          buffer1 = ixheaac_mult32x16in32_shl(temp_1, scale_short);
 1007|       |
 1008|  27.1k|          buffer1 = ixheaac_shr32(buffer1, shift);
 1009|  27.1k|          *x_invquant++ = buffer1;
 1010|  27.1k|        }
 1011|  2.27k|      }
 1012|  18.6k|    } else {
 1013|  18.6k|      shift = -shift;
 1014|  18.6k|      if (shift > 0) {
  ------------------
  |  Branch (1014:11): [True: 18.5k, False: 163]
  ------------------
 1015|  18.5k|        if (scale_short == (WORD16)0x8000) {
  ------------------
  |  Branch (1015:13): [True: 0, False: 18.5k]
  ------------------
 1016|      0|          for (j = end; j > 0; j--) {
  ------------------
  |  Branch (1016:25): [True: 0, False: 0]
  ------------------
 1017|      0|            temp_1 = *x_invquant;
 1018|      0|            temp_1 = ixheaac_shl32(temp_1, shift - 1);
 1019|       |
 1020|      0|            buffer1 = ixheaac_mult32x16in32_shl_sat(temp_1, scale_short);
 1021|       |
 1022|      0|            buffer1 = ixheaac_shl32(buffer1, 1);
 1023|      0|            *x_invquant++ = buffer1;
 1024|      0|          }
 1025|  18.5k|        } else {
 1026|   170k|          for (j = end; j > 0; j--) {
  ------------------
  |  Branch (1026:25): [True: 151k, False: 18.5k]
  ------------------
 1027|   151k|            temp_1 = *x_invquant;
 1028|   151k|            temp_1 = ixheaac_shl32(temp_1, shift - 1);
 1029|       |
 1030|   151k|            buffer1 = ixheaac_mult32x16in32_shl(temp_1, scale_short);
 1031|       |
 1032|   151k|            buffer1 = ixheaac_shl32(buffer1, 1);
 1033|   151k|            *x_invquant++ = buffer1;
 1034|   151k|          }
 1035|  18.5k|        }
 1036|  18.5k|      } else {
 1037|    163|        if (scale_short == (WORD16)0x8000) {
  ------------------
  |  Branch (1037:13): [True: 0, False: 163]
  ------------------
 1038|      0|          for (j = end; j > 0; j--) {
  ------------------
  |  Branch (1038:25): [True: 0, False: 0]
  ------------------
 1039|      0|            temp_1 = *x_invquant;
 1040|       |
 1041|      0|            buffer1 = ixheaac_mult32x16in32_shl_sat(temp_1, scale_short);
 1042|       |
 1043|      0|            *x_invquant++ = buffer1;
 1044|      0|          }
 1045|    163|        } else {
 1046|  1.61k|          for (j = end; j > 0; j--) {
  ------------------
  |  Branch (1046:25): [True: 1.45k, False: 163]
  ------------------
 1047|  1.45k|            temp_1 = *x_invquant;
 1048|       |
 1049|  1.45k|            buffer1 = ixheaac_mult32x16in32_shl(temp_1, scale_short);
 1050|       |
 1051|  1.45k|            *x_invquant++ = buffer1;
 1052|  1.45k|          }
 1053|    163|        }
 1054|    163|      }
 1055|  18.6k|    }
 1056|  20.9k|  }
 1057|  27.0k|}

ixheaacd_res_aac_showbits_32:
   41|  2.23k|UWORD32 ixheaacd_res_aac_showbits_32(UWORD8 *p_read_next) {
   42|  2.23k|  UWORD8 *v = p_read_next;
   43|  2.23k|  UWORD32 b = 0;
   44|       |
   45|  2.23k|  _SWAP(v, b);
  ------------------
  |  |   24|  2.23k|  (b = (((WORD32)a[0] << 24) | ((WORD32)a[1] << 16) | ((WORD32)a[2] << 8) | ((WORD32)a[3])))
  ------------------
   46|  2.23k|  return b;
   47|  2.23k|}
ixheaacd_res_read_ics:
  102|  1.11k|    ia_mps_dec_residual_aac_tables_struct *aac_tables_ptr, WORD8 tot_sf_bands_ls[2]) {
  103|  1.11k|  WORD16 error_status = AAC_DEC_OK;
  ------------------
  |  |   25|  1.11k|#define AAC_DEC_OK IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR
  |  |  ------------------
  |  |  |  |   27|  1.11k|#define IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR 0x00000000
  |  |  ------------------
  ------------------
  104|  1.11k|  WORD32 ch;
  105|       |
  106|  2.14k|  for (ch = 0; ch < num_ch; ch++) {
  ------------------
  |  Branch (106:16): [True: 1.11k, False: 1.03k]
  ------------------
  107|  1.11k|    ia_mps_dec_residual_channel_info_struct *p_aac_dec_ch_info = p_aac_decoder_channel_info[ch];
  108|  1.11k|    ia_mps_dec_residual_ics_info_struct *p_ics_info = &p_aac_dec_ch_info->ics_info;
  109|       |
  110|  1.11k|    p_aac_dec_ch_info->global_gain = (WORD16)ixheaacd_read_bits_buf(it_bit_buf, 8);
  111|       |
  112|  1.11k|    if (!p_aac_decoder_channel_info[LEFT]->common_window) {
  ------------------
  |  |   23|  1.11k|#define LEFT 0
  ------------------
  |  Branch (112:9): [True: 1.09k, False: 21]
  ------------------
  113|  1.09k|      error_status = ixheaacd_res_ics_read(it_bit_buf, p_ics_info, tot_sf_bands_ls);
  114|  1.09k|      if (error_status) {
  ------------------
  |  Branch (114:11): [True: 13, False: 1.07k]
  ------------------
  115|     13|        if (it_bit_buf->cnt_bits < 0)
  ------------------
  |  Branch (115:13): [True: 0, False: 13]
  ------------------
  116|      0|          error_status = (WORD16)((WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|      0|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  117|     13|        return error_status;
  118|     13|      }
  119|  1.09k|    }
  120|       |
  121|  1.10k|    error_status = ixheaacd_res_c_block_read(it_bit_buf, p_aac_dec_ch_info,
  122|  1.10k|                                             p_aac_dec_ch_info->global_gain, aac_tables_ptr);
  123|  1.10k|    if (error_status) {
  ------------------
  |  Branch (123:9): [True: 67, False: 1.03k]
  ------------------
  124|     67|      if (it_bit_buf->cnt_bits < 0)
  ------------------
  |  Branch (124:11): [True: 0, False: 67]
  ------------------
  125|      0|        error_status = (WORD16)((WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|      0|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  126|       |
  127|     67|      return error_status;
  128|     67|    }
  129|  1.10k|  }
  130|       |
  131|  1.03k|  return error_status;
  132|  1.11k|}
ixheaacd_res_c_pulse_data_apply:
  136|    680|                                     const WORD16 *p_scale_factor_band_offsets) {
  137|    680|  WORD i, number_pulse;
  138|    680|  WORD32 k;
  139|       |
  140|    680|  memset(p_pulse_arr, 0, sizeof(WORD32) * 256);
  141|       |
  142|    680|  if (pulse_data->pulse_data_present) {
  ------------------
  |  Branch (142:7): [True: 65, False: 615]
  ------------------
  143|     65|    k = p_scale_factor_band_offsets[pulse_data->pulse_start_band];
  144|     65|    number_pulse = pulse_data->number_pulse;
  145|       |
  146|    196|    for (i = 0; i <= number_pulse; i++) {
  ------------------
  |  Branch (146:17): [True: 131, False: 65]
  ------------------
  147|    131|      k = add_d(k, pulse_data->pulse_offset[i]);
  ------------------
  |  |   23|    131|#define add_d(a, b) ((a) + (b))
  ------------------
  148|    131|      p_pulse_arr[k] = pulse_data->pulse_amp[i];
  149|    131|    }
  150|     65|  }
  151|    680|}
ixheaacd_res_c_block_read_spec_data:
  156|  1.03k|    ia_mps_dec_residual_aac_tables_struct *aac_tables_ptr) {
  157|  1.03k|  WORD band, tot_bands, tot_groups = 0;
  158|  1.03k|  WORD group, groupwin, groupoffset;
  159|       |
  160|  1.03k|  WORD index;
  161|  1.03k|  WORD8 *p_code_book, *p_codebook_tmp;
  162|  1.03k|  WORD16 *p_scale_factor;
  163|  1.03k|  WORD32 *p_spectral_coefficient;
  164|  1.03k|  ia_mps_dec_residual_ics_info_struct *p_ics_info = &p_aac_decoder_channel_info->ics_info;
  165|  1.03k|  WORD16 *band_offsets;
  166|  1.03k|  WORD32 maximum_bins_short = ixheaac_shr16_dir_sat(p_ics_info->frame_length, 3);
  167|       |
  168|  1.03k|  WORD32 *p_spec_coeff_out;
  169|       |
  170|  1.03k|  p_code_book = p_aac_decoder_channel_info->p_code_book;
  171|  1.03k|  p_scale_factor = p_aac_decoder_channel_info->p_scale_factor;
  172|  1.03k|  p_spectral_coefficient = p_aac_decoder_channel_info->p_spectral_coefficient;
  173|  1.03k|  tot_groups = p_ics_info->window_groups;
  174|  1.03k|  tot_bands = p_ics_info->max_sf_bands;
  175|  1.03k|  band_offsets = (WORD16 *)ixheaacd_res_get_sfb_offsets(p_ics_info, aac_tables_ptr);
  176|       |
  177|  1.03k|  if (p_aac_decoder_channel_info->ics_info.window_sequence != EIGHT_SHORT_SEQUENCE) {
  ------------------
  |  |  102|  1.03k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  |  Branch (177:7): [True: 680, False: 355]
  ------------------
  178|    680|    WORD8 *p_pul_arr = (WORD8 *)p_aac_decoder_channel_info->p_tns_scratch;
  179|    680|    ixheaacd_res_c_pulse_data_apply(&p_aac_decoder_channel_info->pulse_data, p_pul_arr,
  180|    680|                                    band_offsets);
  181|       |
  182|    680|    p_spec_coeff_out = &p_spectral_coefficient[0];
  183|  1.50k|    for (band = 0; band < tot_bands;) {
  ------------------
  |  Branch (183:20): [True: 849, False: 658]
  ------------------
  184|    849|      WORD ret_val;
  185|    849|      WORD32 len;
  186|    849|      WORD32 code_no = p_code_book[band];
  187|    849|      WORD start = band;
  188|       |
  189|  7.25k|      for (; band < tot_bands && (p_code_book[band] == code_no); band++)
  ------------------
  |  Branch (189:14): [True: 7.03k, False: 225]
  |  Branch (189:34): [True: 6.40k, False: 624]
  ------------------
  190|  6.40k|        ;
  191|       |
  192|    849|      len = band_offsets[band] - band_offsets[start];
  193|       |
  194|    849|      if (code_no > ZERO_HCB && (code_no < NOISE_HCB)) {
  ------------------
  |  |   33|  1.69k|#define ZERO_HCB 0
  ------------------
                    if (code_no > ZERO_HCB && (code_no < NOISE_HCB)) {
  ------------------
  |  |   38|    707|#define NOISE_HCB 13
  ------------------
  |  Branch (194:11): [True: 707, False: 142]
  |  Branch (194:33): [True: 609, False: 98]
  ------------------
  195|    609|        ret_val = ixheaacd_res_c_block_decode_huff_word_all_lb(
  196|    609|            it_bit_buf, code_no, len, aac_tables_ptr, p_spec_coeff_out, p_pul_arr);
  197|       |
  198|    609|        if (ret_val != 0)
  ------------------
  |  Branch (198:13): [True: 22, False: 587]
  ------------------
  199|     22|          return (WORD16)((WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_EXCEEDS_MAX_HUFFDEC_VAL);
  ------------------
  |  |  101|     22|#define IA_XHEAAC_DEC_EXE_NONFATAL_EXCEEDS_MAX_HUFFDEC_VAL 0x00001806
  ------------------
  200|    609|      } else {
  201|    240|        if (p_aac_decoder_channel_info->pulse_data.pulse_data_present)
  ------------------
  |  Branch (201:13): [True: 63, False: 177]
  ------------------
  202|     63|          ixheaacd_res_inverse_quant_lb(
  203|     63|              p_spec_coeff_out, len,
  204|     63|              (WORD32 *)aac_tables_ptr->res_block_tables_ptr->pow_table_q17, p_pul_arr);
  205|    177|        else
  206|    177|          memset(p_spec_coeff_out, 0, sizeof(WORD32) * len);
  207|    240|      }
  208|    827|      p_pul_arr += len;
  209|    827|      p_spec_coeff_out += len;
  210|    827|    }
  211|       |
  212|    658|    index = 1024 - band_offsets[tot_bands];
  213|    658|    memset(p_spec_coeff_out, 0, sizeof(WORD32) * index);
  214|    658|  } else {
  215|    355|    memset(p_spectral_coefficient, 0, sizeof(WORD32) * 1024);
  216|       |
  217|    355|    groupoffset = 0;
  218|       |
  219|  1.23k|    for (group = 0; group < tot_groups; group++) {
  ------------------
  |  Branch (219:21): [True: 896, False: 340]
  ------------------
  220|    896|      WORD grp_win = p_ics_info->window_group_length[group];
  221|    896|      p_codebook_tmp = &p_code_book[group * MAX_SFB_SHORT];
  ------------------
  |  |   27|    896|#define MAX_SFB_SHORT 16
  ------------------
  222|    896|      p_spec_coeff_out = &p_spectral_coefficient[groupoffset * maximum_bins_short];
  223|       |
  224|  1.72k|      for (band = 0; band < tot_bands;) {
  ------------------
  |  Branch (224:22): [True: 841, False: 881]
  ------------------
  225|    841|        WORD code_no = *p_codebook_tmp;
  226|    841|        WORD start = band;
  227|    841|        WORD ret_val;
  228|       |
  229|  4.41k|        for (; band < tot_bands && (*p_codebook_tmp == code_no); band++, p_codebook_tmp++)
  ------------------
  |  Branch (229:16): [True: 4.04k, False: 375]
  |  Branch (229:36): [True: 3.57k, False: 466]
  ------------------
  230|  3.57k|          ;
  231|       |
  232|    841|        if (code_no > ZERO_HCB && (code_no < NOISE_HCB)) {
  ------------------
  |  |   33|  1.68k|#define ZERO_HCB 0
  ------------------
                      if (code_no > ZERO_HCB && (code_no < NOISE_HCB)) {
  ------------------
  |  |   38|    704|#define NOISE_HCB 13
  ------------------
  |  Branch (232:13): [True: 704, False: 137]
  |  Branch (232:35): [True: 623, False: 81]
  ------------------
  233|    623|          ret_val = ixheaacd_res_c_block_decode_huff_word_all(
  234|    623|              it_bit_buf, code_no, p_spec_coeff_out, (WORD16 *)band_offsets, start, band, grp_win,
  235|    623|              aac_tables_ptr, maximum_bins_short);
  236|       |
  237|    623|          if (ret_val != 0)
  ------------------
  |  Branch (237:15): [True: 15, False: 608]
  ------------------
  238|     15|            return (WORD16)((WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_EXCEEDS_MAX_HUFFDEC_VAL);
  ------------------
  |  |  101|     15|#define IA_XHEAAC_DEC_EXE_NONFATAL_EXCEEDS_MAX_HUFFDEC_VAL 0x00001806
  ------------------
  239|    623|        }
  240|    841|      }
  241|    881|      groupoffset = (groupoffset + grp_win);
  242|    881|    }
  243|    355|  }
  244|       |
  245|    998|  {
  246|    998|    WORD8 *p_win_grp_len = &p_ics_info->window_group_length[0];
  247|    998|    WORD8 *psfb_width = (WORD8 *)ixheaacd_res_get_sfb_width(p_ics_info, aac_tables_ptr);
  248|    998|    WORD32 *scale_table_ptr;
  249|    998|    if (120 == maximum_bins_short) {
  ------------------
  |  Branch (249:9): [True: 0, False: 998]
  ------------------
  250|      0|      scale_table_ptr = aac_tables_ptr->res_block_tables_ptr->scale_table_960;
  251|    998|    } else {
  252|    998|      scale_table_ptr = aac_tables_ptr->res_block_tables_ptr->scale_table;
  253|    998|    }
  254|  1.53k|    do {
  255|  1.53k|      groupwin = *p_win_grp_len++;
  256|  3.37k|      do {
  257|  3.37k|        ixheaacd_res_apply_scfs(&p_spectral_coefficient[0], &p_scale_factor[0], tot_bands,
  258|  3.37k|                                (WORD8 *)psfb_width, scale_table_ptr);
  259|       |
  260|  3.37k|        p_spectral_coefficient += maximum_bins_short;
  261|  3.37k|        groupwin--;
  262|  3.37k|      } while (groupwin != 0);
  ------------------
  |  Branch (262:16): [True: 1.83k, False: 1.53k]
  ------------------
  263|       |
  264|  1.53k|      p_scale_factor += MAX_SFB_SHORT;
  ------------------
  |  |   27|  1.53k|#define MAX_SFB_SHORT 16
  ------------------
  265|  1.53k|      tot_groups--;
  266|  1.53k|    } while (tot_groups != 0);
  ------------------
  |  Branch (266:14): [True: 541, False: 998]
  ------------------
  267|    998|  }
  268|       |
  269|    998|  return AAC_DEC_OK;
  ------------------
  |  |   25|    998|#define AAC_DEC_OK IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR
  |  |  ------------------
  |  |  |  |   27|    998|#define IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR 0x00000000
  |  |  ------------------
  ------------------
  270|  1.03k|}
ixheaacd_res_c_tns_read:
  274|  1.04k|                        ia_mps_dec_residual_channel_info_struct *p_aac_decoder_channel_info) {
  275|  1.04k|  WORD window, window_per_frame;
  276|  1.04k|  WORD n_filt_bits, len_bits, order_bits;
  277|  1.04k|  WORD32 next_stop_band_tmp;
  278|       |
  279|  1.04k|  ia_mps_dec_residual_ics_info_struct *p_ics_info = &p_aac_decoder_channel_info->ics_info;
  280|  1.04k|  ia_mps_dec_residual_tns_data *p_tns_data = &p_aac_decoder_channel_info->tns_data;
  281|       |
  282|  1.04k|  if (!p_tns_data->tns_data_present) return AAC_DEC_OK;
  ------------------
  |  |   25|    818|#define AAC_DEC_OK IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR
  |  |  ------------------
  |  |  |  |   27|    818|#define IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR 0x00000000
  |  |  ------------------
  ------------------
  |  Branch (282:7): [True: 818, False: 227]
  ------------------
  283|       |
  284|    227|  if (p_ics_info->window_sequence != EIGHT_SHORT_SEQUENCE) {
  ------------------
  |  |  102|    227|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  |  Branch (284:7): [True: 73, False: 154]
  ------------------
  285|     73|    n_filt_bits = 2;
  286|     73|    len_bits = 6;
  287|     73|    order_bits = 5;
  288|     73|    window_per_frame = 1;
  289|    154|  } else {
  290|    154|    n_filt_bits = 1;
  291|    154|    len_bits = 4;
  292|    154|    order_bits = 3;
  293|    154|    window_per_frame = 8;
  294|    154|  }
  295|       |
  296|    227|  next_stop_band_tmp = p_ics_info->total_sf_bands;
  297|       |
  298|  1.50k|  for (window = 0; window < window_per_frame; window++) {
  ------------------
  |  Branch (298:20): [True: 1.28k, False: 222]
  ------------------
  299|  1.28k|    WORD n_filt;
  300|  1.28k|    WORD length, coef_res;
  301|  1.28k|    p_tns_data->number_of_filters[window] = n_filt =
  302|  1.28k|        (WORD16)ixheaacd_read_bits_buf(it_bit_buf, n_filt_bits);
  303|       |
  304|  1.28k|    if (n_filt) {
  ------------------
  |  Branch (304:9): [True: 486, False: 799]
  ------------------
  305|    486|      WORD32 accu;
  306|    486|      WORD index;
  307|    486|      WORD nextstopband;
  308|       |
  309|    486|      coef_res = ixheaacd_read_bits_buf(it_bit_buf, 1);
  310|       |
  311|    486|      nextstopband = next_stop_band_tmp;
  312|    993|      for (index = 0; index < n_filt; index++) {
  ------------------
  |  Branch (312:23): [True: 512, False: 481]
  ------------------
  313|    512|        WORD order;
  314|    512|        ia_mps_dec_residual_filter_struct *filter = &p_tns_data->filter[window][index];
  315|    512|        length = ixheaacd_read_bits_buf(it_bit_buf, len_bits);
  316|       |
  317|    512|        filter->start_band = nextstopband - length;
  318|    512|        filter->stop_band = nextstopband;
  319|       |
  320|    512|        nextstopband = filter->start_band;
  321|       |
  322|    512|        if (filter->start_band < 0) {
  ------------------
  |  Branch (322:13): [True: 4, False: 508]
  ------------------
  323|      4|          filter->order = -1;
  324|      4|          return (WORD16)((WORD32)AAC_DEC_TNS_RANGE_ERROR);
  ------------------
  |  |   31|      4|#define AAC_DEC_TNS_RANGE_ERROR IA_XHEAAC_DEC_EXE_FATAL_TNS_RANGE_ERROR
  |  |  ------------------
  |  |  |  |  120|      4|#define IA_XHEAAC_DEC_EXE_FATAL_TNS_RANGE_ERROR 0xFFFF9801
  |  |  ------------------
  ------------------
  325|      4|        }
  326|       |
  327|    508|        filter->order = order = ixheaacd_read_bits_buf(it_bit_buf, order_bits);
  328|    508|        accu = order - MAX_ORDER_LONG;
  ------------------
  |  |   25|    508|#define MAX_ORDER_LONG 12
  ------------------
  329|       |
  330|    508|        if (accu > 0) return (WORD16)((WORD32)AAC_DEC_TNS_ORDER_ERROR);
  ------------------
  |  |   32|      1|#define AAC_DEC_TNS_ORDER_ERROR IA_XHEAAC_DEC_EXE_NONFATAL_TNS_ORDER_ERROR
  |  |  ------------------
  |  |  |  |  105|      1|#define IA_XHEAAC_DEC_EXE_NONFATAL_TNS_ORDER_ERROR 0x0000180A
  |  |  ------------------
  ------------------
  |  Branch (330:13): [True: 1, False: 507]
  ------------------
  331|       |
  332|    507|        if (order) {
  ------------------
  |  Branch (332:13): [True: 400, False: 107]
  ------------------
  333|    400|          WORD i;
  334|    400|          WORD32 coef, coef_compress;
  335|    400|          WORD resolution, shift;
  336|       |
  337|    400|          filter->direction = (WORD8)(ixheaacd_read_bits_buf(it_bit_buf, 1) ? -1 : 1);
  ------------------
  |  Branch (337:39): [True: 210, False: 190]
  ------------------
  338|       |
  339|    400|          coef_compress = ixheaacd_read_bits_buf(it_bit_buf, 1);
  340|       |
  341|    400|          filter->resolution = coef_res;
  342|    400|          resolution = coef_res + 3 - coef_compress;
  343|    400|          shift = 32 - resolution;
  344|       |
  345|  2.17k|          for (i = 0; i < order; i++) {
  ------------------
  |  Branch (345:23): [True: 1.77k, False: 400]
  ------------------
  346|  1.77k|            coef = ixheaacd_read_bits_buf(it_bit_buf, resolution);
  347|  1.77k|            coef = coef << shift;
  348|  1.77k|            filter->coeff[i] = (WORD8)(coef >> shift);
  349|  1.77k|          }
  350|    400|        }
  351|    507|      }
  352|    486|    }
  353|  1.28k|  }
  354|    222|  return AAC_DEC_OK;
  ------------------
  |  |   25|    222|#define AAC_DEC_OK IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR
  |  |  ------------------
  |  |  |  |   27|    222|#define IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR 0x00000000
  |  |  ------------------
  ------------------
  355|    227|}
ixheaacd_res_inv_quant:
  359|    318|{
  360|    318|  WORD32 q1;
  361|    318|  WORD32 temp;
  362|    318|  WORD32 q_abs;
  363|    318|  WORD16 interp;
  364|    318|  WORD32 shift;
  365|       |
  366|    318|  q_abs = *px_quant;
  367|       |
  368|    318|  if (q_abs > (8191 + 32)) return IA_XHEAAC_DEC_EXE_NONFATAL_EXCEEDS_MAX_HUFFDEC_VAL;
  ------------------
  |  |  101|     92|#define IA_XHEAAC_DEC_EXE_NONFATAL_EXCEEDS_MAX_HUFFDEC_VAL 0x00001806
  ------------------
  |  Branch (368:7): [True: 92, False: 226]
  ------------------
  369|       |
  370|    226|  if (q_abs < 1024)
  ------------------
  |  Branch (370:7): [True: 170, False: 56]
  ------------------
  371|    170|    shift = 3;
  372|     56|  else
  373|     56|    shift = 6;
  374|       |
  375|    226|  q1 = (q_abs) >> shift;
  376|       |
  377|    226|  interp = q_abs - (q1 << shift);
  378|       |
  379|    226|  temp = pow_table_q17[q1 + 1] - pow_table_q17[q1];
  380|       |
  381|    226|  temp = (WORD32)(temp * (WORD32)interp);
  382|       |
  383|    226|  temp = temp + (pow_table_q17[q1] << shift);
  384|       |
  385|    226|  if (shift == 3)
  ------------------
  |  Branch (385:7): [True: 170, False: 56]
  ------------------
  386|    170|    temp = temp << 1;
  387|     56|  else
  388|     56|    temp = temp << 2;
  389|       |
  390|    226|  *px_quant = temp;
  391|       |
  392|    226|  return 0;
  393|    318|}
ixheaacd_mps_res_channel.c:ixheaacd_res_c_block_read:
   54|  1.07k|{
   55|  1.07k|  FLAG gain_control_data_present;
   56|  1.07k|  WORD16 error_status = AAC_DEC_OK;
  ------------------
  |  |   25|  1.07k|#define AAC_DEC_OK IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR
  |  |  ------------------
  |  |  |  |   27|  1.07k|#define IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR 0x00000000
  |  |  ------------------
  ------------------
   57|       |
   58|  1.07k|  if (p_aac_decoder_channel_info->ics_info.window_sequence == EIGHT_SHORT_SEQUENCE) {
  ------------------
  |  |  102|  1.07k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  |  Branch (58:7): [True: 381, False: 695]
  ------------------
   59|    381|    memset(p_aac_decoder_channel_info->p_scale_factor, 0, MAX_WINDOWS * MAX_SFB_SHORT * 3);
  ------------------
  |  |   26|    381|#define MAX_WINDOWS 8
  ------------------
                  memset(p_aac_decoder_channel_info->p_scale_factor, 0, MAX_WINDOWS * MAX_SFB_SHORT * 3);
  ------------------
  |  |   27|    381|#define MAX_SFB_SHORT 16
  ------------------
   60|    381|  }
   61|       |
   62|  1.07k|  error_status = ixheaacd_c_block_read_section_data(it_bit_buf, p_aac_decoder_channel_info);
   63|       |
   64|  1.07k|  if (error_status) return error_status;
  ------------------
  |  Branch (64:7): [True: 17, False: 1.05k]
  ------------------
   65|       |
   66|  1.05k|  ixheaacd_res_c_block_read_scf_data(it_bit_buf, p_aac_decoder_channel_info, global_gain,
   67|  1.05k|                                     aac_tables_ptr);
   68|       |
   69|  1.05k|  error_status = ixheaacd_res_c_pulse_data_read(
   70|  1.05k|      it_bit_buf, &p_aac_decoder_channel_info->pulse_data, aac_tables_ptr);
   71|  1.05k|  if (error_status) return error_status;
  ------------------
  |  Branch (71:7): [True: 5, False: 1.05k]
  ------------------
   72|       |
   73|  1.05k|  p_aac_decoder_channel_info->tns_data.tns_data_present =
   74|  1.05k|      (FLAG)ixheaacd_read_bits_buf(it_bit_buf, 1);
   75|       |
   76|  1.05k|  error_status = ixheaacd_res_c_tns_read(it_bit_buf, p_aac_decoder_channel_info);
   77|  1.05k|  if (error_status) {
  ------------------
  |  Branch (77:7): [True: 5, False: 1.04k]
  ------------------
   78|      5|    return error_status;
   79|      5|  }
   80|       |
   81|  1.04k|  gain_control_data_present = ixheaacd_read_bits_buf(it_bit_buf, 1);
   82|       |
   83|  1.04k|  if (gain_control_data_present) {
  ------------------
  |  Branch (83:7): [True: 3, False: 1.04k]
  ------------------
   84|      3|    return (WORD16)((WORD32)AAC_DEC_UNIMPLEMENTED_GAIN_CONTROL_DATA);
  ------------------
  |  |   30|      3|  IA_XHEAAC_DEC_EXE_NONFATAL_GAIN_CONTROL_DATA_PRESENT
  |  |  ------------------
  |  |  |  |  104|      3|#define IA_XHEAAC_DEC_EXE_NONFATAL_GAIN_CONTROL_DATA_PRESENT 0x00001809
  |  |  ------------------
  ------------------
   85|      3|  }
   86|       |
   87|  1.04k|  {
   88|  1.04k|    it_bit_buf->bit_pos = (7 - it_bit_buf->bit_pos);
   89|       |
   90|  1.04k|    error_status = ixheaacd_res_c_block_read_spec_data(it_bit_buf, p_aac_decoder_channel_info,
   91|  1.04k|                                                       aac_tables_ptr);
   92|       |
   93|  1.04k|    it_bit_buf->bit_pos = (7 - it_bit_buf->bit_pos);
   94|  1.04k|  }
   95|       |
   96|  1.04k|  return error_status;
   97|  1.04k|}

ixheaacd_res_get_sfb_offsets:
   30|  1.25k|    ia_mps_dec_residual_aac_tables_struct *aac_tables_ptr) {
   31|  1.25k|  if (p_ics_info->window_sequence != EIGHT_SHORT_SEQUENCE) {
  ------------------
  |  |  102|  1.25k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  |  Branch (31:7): [True: 747, False: 503]
  ------------------
   32|    747|    return aac_tables_ptr->sfb_index_long;
   33|    747|  } else {
   34|    503|    return aac_tables_ptr->sfb_index_short;
   35|    503|  }
   36|  1.25k|}
ixheaacd_res_get_sfb_width:
   39|    998|                                        ia_mps_dec_residual_aac_tables_struct *aac_tables_ptr) {
   40|    998|  if (p_ics_info->window_sequence != EIGHT_SHORT_SEQUENCE) {
  ------------------
  |  |  102|    998|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  |  Branch (40:7): [True: 658, False: 340]
  ------------------
   41|    658|    return aac_tables_ptr->sfb_index_long_width;
   42|    658|  } else {
   43|    340|    return aac_tables_ptr->sfb_index_short_width;
   44|    340|  }
   45|    998|}
ixheaacd_res_ics_read:
   49|  1.09k|                             WORD8 tot_sf_bands_ls[2]) {
   50|  1.09k|  WORD i;
   51|  1.09k|  WORD mask;
   52|  1.09k|  WORD tmp = 0;
   53|       |
   54|  1.09k|  tmp = ixheaacd_read_bits_buf(it_bif_buf, 4);
   55|  1.09k|  p_ics_info->window_sequence = (WORD16)((tmp & 0x6) >> 1);
   56|       |
   57|  1.09k|  if (p_ics_info->window_sequence != EIGHT_SHORT_SEQUENCE) {
  ------------------
  |  |  102|  1.09k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  |  Branch (57:7): [True: 709, False: 383]
  ------------------
   58|    709|    p_ics_info->total_sf_bands = tot_sf_bands_ls[0];
   59|       |
   60|    709|    p_ics_info->window_groups = 1;
   61|    709|    p_ics_info->window_group_length[0] = 1;
   62|       |
   63|    709|    tmp = ixheaacd_read_bits_buf(it_bif_buf, 7);
   64|    709|    p_ics_info->max_sf_bands = (tmp & 0x7E) >> 1;
   65|       |
   66|    709|    if (tmp & 1) {
  ------------------
  |  Branch (66:9): [True: 9, False: 700]
  ------------------
   67|      9|      return (WORD16)((WORD32)AAC_DEC_PREDICTION_NOT_SUPPORTED_IN_LC_AAC);
  ------------------
  |  |   28|      9|  IA_XHEAAC_DEC_EXE_NONFATAL_PREDICTION_DATA_PRESENT
  |  |  ------------------
  |  |  |  |  106|      9|#define IA_XHEAAC_DEC_EXE_NONFATAL_PREDICTION_DATA_PRESENT 0x0000180B
  |  |  ------------------
  ------------------
   68|      9|    }
   69|    709|  } else {
   70|    383|    WORD32 win_grp = 0, tmp2;
   71|    383|    p_ics_info->total_sf_bands = tot_sf_bands_ls[1];
   72|       |
   73|    383|    tmp = ixheaacd_read_bits_buf(it_bif_buf, 11);
   74|    383|    p_ics_info->max_sf_bands = (tmp & 0x780) >> 7;
   75|       |
   76|    383|    tmp2 = (tmp & 0x7F);
   77|       |
   78|  3.05k|    for (i = 0; i < 7; i++) {
  ------------------
  |  Branch (78:17): [True: 2.66k, False: 383]
  ------------------
   79|  2.66k|      mask = (1 << sub_d(6, i));
  ------------------
  |  |   24|  2.66k|#define sub_d(a, b) ((a) - (b))
  ------------------
   80|  2.66k|      p_ics_info->window_group_length[i] = 1;
   81|  2.66k|      if (tmp2 & mask) {
  ------------------
  |  Branch (81:11): [True: 2.06k, False: 600]
  ------------------
   82|  2.06k|        p_ics_info->window_group_length[win_grp] =
   83|  2.06k|            add_d(p_ics_info->window_group_length[win_grp], 1);
  ------------------
  |  |   23|  2.06k|#define add_d(a, b) ((a) + (b))
  ------------------
   84|  2.06k|      } else {
   85|    600|        win_grp = add_d(win_grp, 1);
  ------------------
  |  |   23|    600|#define add_d(a, b) ((a) + (b))
  ------------------
   86|    600|      }
   87|  2.66k|    }
   88|       |
   89|    383|    p_ics_info->window_group_length[7] = 1;
   90|    383|    p_ics_info->window_groups = add_d(win_grp, 1);
  ------------------
  |  |   23|    383|#define add_d(a, b) ((a) + (b))
  ------------------
   91|    383|  }
   92|       |
   93|  1.08k|  if (p_ics_info->max_sf_bands > p_ics_info->total_sf_bands)
  ------------------
  |  Branch (93:7): [True: 4, False: 1.07k]
  ------------------
   94|      4|    return (WORD16)IA_XHEAAC_DEC_EXE_NONFATAL_EXCEEDS_SFB_TRANSMITTED;
  ------------------
  |  |  103|      4|#define IA_XHEAAC_DEC_EXE_NONFATAL_EXCEEDS_SFB_TRANSMITTED 0x00001808
  ------------------
   95|       |
   96|  1.07k|  return AAC_DEC_OK;
  ------------------
  |  |   25|  1.07k|#define AAC_DEC_OK IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR
  |  |  ------------------
  |  |  |  |   27|  1.07k|#define IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR 0x00000000
  |  |  ------------------
  ------------------
   97|  1.08k|}

ixheaacd_mps_res_longblock.c:ixheaacd_aac_read_2bytes:
   38|     32|                                                        WORD32 *readword) {
   39|     32|  UWORD8 *v = *p_read_next;
   40|     32|  WORD32 bits_consumed = *r_bit_pos;
   41|       |
   42|     32|  if ((bits_consumed - 16) >= 0) {
  ------------------
  |  Branch (42:7): [True: 8, False: 24]
  ------------------
   43|      8|    *readword = (*readword << 8) | *v;
   44|      8|    v++;
   45|      8|    *readword = (*readword << 8) | *v;
   46|      8|    v++;
   47|      8|    bits_consumed -= 16;
   48|     24|  } else if ((bits_consumed - 8) >= 0) {
  ------------------
  |  Branch (48:14): [True: 24, False: 0]
  ------------------
   49|     24|    *readword = (*readword << 8) | *v;
   50|     24|    v++;
   51|     24|    bits_consumed -= 8;
   52|     24|  }
   53|       |
   54|     32|  *r_bit_pos = bits_consumed;
   55|     32|  *p_read_next = v;
   56|     32|  return 1;
   57|     32|}
ixheaacd_mps_res_block.c:ixheaacd_res_exts:
   29|  14.0k|                                                WORD32 shift_right) {
   30|  14.0k|  WORD32 x;
   31|  14.0k|  x = (UWORD32)a << shift_left;
   32|  14.0k|  x = (WORD32)x >> shift_right;
   33|       |
   34|  14.0k|  return x;
   35|  14.0k|}

ixheaacd_c_block_read_section_data:
   36|  1.07k|    ia_mps_dec_residual_channel_info_struct *p_aac_decoder_channel_info) {
   37|  1.07k|  WORD band;
   38|  1.07k|  WORD sect_cb;
   39|  1.07k|  WORD sect_len;
   40|  1.07k|  WORD sect_len_incr;
   41|  1.07k|  WORD sect_esc_val;
   42|  1.07k|  ia_mps_dec_residual_ics_info_struct *p_ics_info = &p_aac_decoder_channel_info->ics_info;
   43|  1.07k|  WORD sfb_transmitted = p_ics_info->max_sf_bands;
   44|  1.07k|  WORD win_group = p_ics_info->window_groups;
   45|       |
   46|  1.07k|  WORD8 *p_code_book = p_aac_decoder_channel_info->p_code_book;
   47|  1.07k|  WORD8 *p_code_book_temp = p_code_book;
   48|  1.07k|  WORD32 sect_bitlen = LONG_BLOCK_SECT_LEN;
  ------------------
  |  |   31|  1.07k|#define LONG_BLOCK_SECT_LEN 5
  ------------------
   49|       |
   50|  1.07k|  if (p_aac_decoder_channel_info->ics_info.window_sequence == EIGHT_SHORT_SEQUENCE)
  ------------------
  |  |  102|  1.07k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  |  Branch (50:7): [True: 381, False: 695]
  ------------------
   51|    381|    sect_bitlen = SHORT_BLOCK_SECT_LEN;
  ------------------
  |  |   32|    381|#define SHORT_BLOCK_SECT_LEN 3
  ------------------
   52|       |
   53|  1.07k|  sect_esc_val = (1 << sect_bitlen) - 1;
   54|       |
   55|  1.64k|  do {
   56|  1.64k|    band = 0;
   57|       |
   58|  4.76k|    while (band < sfb_transmitted) {
  ------------------
  |  Branch (58:12): [True: 3.13k, False: 1.63k]
  ------------------
   59|  3.13k|      WORD32 temp_word;
   60|  3.13k|      sect_len = 0;
   61|  3.13k|      temp_word = ixheaacd_read_bits_buf(it_bit_buf, 4 + sect_bitlen);
   62|  3.13k|      sect_cb = temp_word >> sect_bitlen;
   63|  3.13k|      sect_len_incr = temp_word & sect_esc_val;
   64|       |
   65|  3.66k|      while (sect_len_incr == sect_esc_val) {
  ------------------
  |  Branch (65:14): [True: 524, False: 3.13k]
  ------------------
   66|    524|        sect_len = (sect_len + sect_esc_val);
   67|    524|        sect_len_incr = ixheaacd_read_bits_buf(it_bit_buf, sect_bitlen);
   68|    524|      }
   69|       |
   70|  3.13k|      sect_len = (sect_len + sect_len_incr);
   71|       |
   72|  3.13k|      band = (band + sect_len);
   73|  3.13k|      if (band > sfb_transmitted) {
  ------------------
  |  Branch (73:11): [True: 15, False: 3.12k]
  ------------------
   74|     15|        return (WORD16)((WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_EXCEEDS_SFB_TRANSMITTED);
  ------------------
  |  |  103|     15|#define IA_XHEAAC_DEC_EXE_NONFATAL_EXCEEDS_SFB_TRANSMITTED 0x00001808
  ------------------
   75|     15|      }
   76|       |
   77|  3.12k|      if (sect_cb == BOOKSCL) {
  ------------------
  |  |   41|  3.12k|#define BOOKSCL 12
  ------------------
  |  Branch (77:11): [True: 2, False: 3.11k]
  ------------------
   78|      2|        return (WORD16)((WORD32)AAC_DEC_INVALID_CODE_BOOK);
  ------------------
  |  |   26|      2|#define AAC_DEC_INVALID_CODE_BOOK IA_XHEAAC_DEC_EXE_NONFATAL_INVALID_CODE_BOOK
  |  |  ------------------
  |  |  |  |  109|      2|#define IA_XHEAAC_DEC_EXE_NONFATAL_INVALID_CODE_BOOK 0x0000180E
  |  |  ------------------
  ------------------
   79|      2|      }
   80|       |
   81|  3.11k|      sect_len = sect_len - 1;
   82|  13.6k|      for (; sect_len >= 0; sect_len--) {
  ------------------
  |  Branch (82:14): [True: 10.5k, False: 3.11k]
  ------------------
   83|  10.5k|        *p_code_book_temp++ = sect_cb;
   84|  10.5k|      }
   85|  3.11k|    }
   86|  1.63k|    p_code_book += MAX_SFB_SHORT;
  ------------------
  |  |   27|  1.63k|#define MAX_SFB_SHORT 16
  ------------------
   87|  1.63k|    p_code_book_temp = p_code_book;
   88|  1.63k|    win_group--;
   89|  1.63k|  } while (win_group != 0);
  ------------------
  |  Branch (89:12): [True: 573, False: 1.05k]
  ------------------
   90|  1.05k|  return AAC_DEC_OK;
  ------------------
  |  |   25|  1.05k|#define AAC_DEC_OK IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR
  |  |  ------------------
  |  |  |  |   27|  1.05k|#define IA_XHEAAC_DEC_API_NONFATAL_NO_ERROR 0x00000000
  |  |  ------------------
  ------------------
   91|  1.07k|}
ixheaacd_res_c_block_read_scf_data:
   96|  1.05k|    ia_mps_dec_residual_aac_tables_struct *aac_tables_ptr) {
   97|  1.05k|  WORD band;
   98|  1.05k|  WORD16 position = 0;
   99|  1.05k|  WORD group;
  100|  1.05k|  WORD16 factor = global_gain;
  101|  1.05k|  WORD8 *p_code_book, *p_codebook_tmp;
  102|  1.05k|  WORD16 *p_scale_factor, *p_scale_factor_tmp;
  103|  1.05k|  WORD16 norm_value;
  104|  1.05k|  ia_mps_dec_residual_ics_info_struct *p_ics_info;
  105|  1.05k|  WORD window_groups, sfb_transmitted;
  106|  1.05k|  UWORD16 *h;
  107|       |
  108|  1.05k|  const UWORD16 *hscf = &aac_tables_ptr->res_huffmann_tables_ptr->huffman_code_book_scl[1];
  109|       |
  110|  1.05k|  WORD start_bit_pos = it_bit_buf->bit_pos;
  111|  1.05k|  UWORD8 *start_read_pos = it_bit_buf->ptr_read_next;
  112|  1.05k|  UWORD8 *ptr_read_next = it_bit_buf->ptr_read_next;
  113|  1.05k|  WORD32 bit_pos = 7 - it_bit_buf->bit_pos;
  114|       |
  115|  1.05k|  WORD32 read_word;
  116|  1.05k|  WORD32 diffbytes;
  117|       |
  118|  1.05k|  diffbytes = (WORD32)(it_bit_buf->ptr_bit_buf_end - ptr_read_next);
  119|  1.05k|  diffbytes++;
  120|  1.05k|  if (diffbytes >= 4) {
  ------------------
  |  Branch (120:7): [True: 1.00k, False: 53]
  ------------------
  121|  1.00k|    read_word = ixheaacd_res_aac_showbits_32(ptr_read_next);
  122|  1.00k|    diffbytes = 4;
  123|  1.00k|    ptr_read_next = it_bit_buf->ptr_read_next + 4;
  124|  1.00k|  } else {
  125|     53|    WORD32 ii;
  126|     53|    read_word = 0;
  127|    142|    for (ii = 0; ii < diffbytes; ii++) {
  ------------------
  |  Branch (127:18): [True: 89, False: 53]
  ------------------
  128|     89|      read_word = (read_word << 8) | (*ptr_read_next);
  129|     89|      ptr_read_next++;
  130|     89|    }
  131|     53|    read_word <<= ((4 - diffbytes) << 3);
  132|     53|  }
  133|  1.05k|  p_code_book = p_aac_decoder_channel_info->p_code_book;
  134|       |
  135|  1.05k|  p_ics_info = &p_aac_decoder_channel_info->ics_info;
  136|  1.05k|  sfb_transmitted = p_ics_info->max_sf_bands;
  137|       |
  138|  1.05k|  p_scale_factor = p_aac_decoder_channel_info->p_scale_factor;
  139|  1.05k|  window_groups = p_ics_info->window_groups;
  140|  1.05k|  band = sfb_transmitted - 1;
  141|       |
  142|  2.66k|  for (group = 0; group < window_groups; group++) {
  ------------------
  |  Branch (142:19): [True: 1.61k, False: 1.05k]
  ------------------
  143|  1.61k|    p_codebook_tmp = &p_code_book[group * MAX_SFB_SHORT];
  ------------------
  |  |   27|  1.61k|#define MAX_SFB_SHORT 16
  ------------------
  144|  1.61k|    p_scale_factor_tmp = &p_scale_factor[group * MAX_SFB_SHORT];
  ------------------
  |  |   27|  1.61k|#define MAX_SFB_SHORT 16
  ------------------
  145|  11.8k|    for (band = sfb_transmitted - 1; band >= 0; band--) {
  ------------------
  |  Branch (145:38): [True: 10.2k, False: 1.61k]
  ------------------
  146|  10.2k|      WORD32 cb_num = *p_codebook_tmp++;
  147|       |
  148|  10.2k|      if (cb_num == ZERO_HCB)
  ------------------
  |  |   33|  10.2k|#define ZERO_HCB 0
  ------------------
  |  Branch (148:11): [True: 1.38k, False: 8.88k]
  ------------------
  149|  1.38k|        *p_scale_factor_tmp++ = 0;
  150|  8.88k|      else {
  151|  8.88k|        {
  152|  8.88k|          WORD32 flag = 1;
  153|  8.88k|          WORD pns_band;
  154|  8.88k|          ia_mps_dec_residual_pns_data_struct *p_pns_data = &p_aac_decoder_channel_info->pns_data;
  155|  8.88k|          if (cb_num == NOISE_HCB && (p_pns_data->pns_active != 1)) flag = 0;
  ------------------
  |  |   38|  17.7k|#define NOISE_HCB 13
  ------------------
  |  Branch (155:15): [True: 143, False: 8.74k]
  |  Branch (155:38): [True: 32, False: 111]
  ------------------
  156|       |
  157|  8.88k|          if (flag) {
  ------------------
  |  Branch (157:15): [True: 8.85k, False: 32]
  ------------------
  158|  8.85k|            UWORD16 first_offset;
  159|  8.85k|            WORD16 sign_ret_val;
  160|  8.85k|            UWORD32 read_word1;
  161|       |
  162|  8.85k|            read_word1 = read_word << bit_pos;
  163|  8.85k|            h = (UWORD16 *)(hscf);
  164|  8.85k|            first_offset = 7;
  165|  8.85k|            h += (read_word1) >> (32 - first_offset);
  166|  8.85k|            sign_ret_val = *h;
  167|       |
  168|  10.1k|            while (sign_ret_val > 0) {
  ------------------
  |  Branch (168:20): [True: 1.32k, False: 8.85k]
  ------------------
  169|  1.32k|              bit_pos += first_offset;
  170|       |
  171|  1.32k|              ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
  172|  1.32k|                                          it_bit_buf->ptr_bit_buf_end);
  173|  1.32k|              read_word1 = (read_word1) << (first_offset);
  174|       |
  175|  1.32k|              first_offset = (sign_ret_val >> 11);
  176|  1.32k|              first_offset = (sign_ret_val >> 11);
  177|  1.32k|              h += sign_ret_val & (0x07FF);
  178|  1.32k|              h += (read_word1) >> (32 - first_offset);
  179|  1.32k|              sign_ret_val = *h;
  180|  1.32k|            }
  181|       |
  182|  8.85k|            bit_pos += ((sign_ret_val & 0x7fff) >> 11);
  183|       |
  184|  8.85k|            ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
  185|  8.85k|                                        it_bit_buf->ptr_bit_buf_end);
  186|  8.85k|            norm_value = (sign_ret_val & (0x07FF)) - 60;
  187|  8.85k|          } else {
  188|     32|            WORD32 noise_start_value;
  189|     32|            UWORD32 temp;
  190|     32|            temp = (read_word << bit_pos);
  191|     32|            temp = ((UWORD32)temp >> (32 - 9));
  192|     32|            noise_start_value = temp;
  193|     32|            bit_pos += 9;
  194|       |
  195|     32|            ixheaacd_aac_read_2bytes(&ptr_read_next, &bit_pos, &read_word);
  196|       |
  197|     32|            norm_value = noise_start_value - 256;
  198|     32|            p_pns_data->pns_active = 1;
  199|       |
  200|     32|            p_pns_data->current_energy = global_gain - NOISE_OFFSET;
  ------------------
  |  |   35|     32|#define NOISE_OFFSET 90
  ------------------
  201|     32|          }
  202|       |
  203|  8.88k|          if (cb_num > NOISE_HCB) {
  ------------------
  |  |   38|  8.88k|#define NOISE_HCB 13
  ------------------
  |  Branch (203:15): [True: 1.46k, False: 7.42k]
  ------------------
  204|  1.46k|            position = position + norm_value;
  205|  1.46k|            *p_scale_factor_tmp++ = -position;
  206|  7.42k|          } else if (cb_num < NOISE_HCB) {
  ------------------
  |  |   38|  7.42k|#define NOISE_HCB 13
  ------------------
  |  Branch (206:22): [True: 7.27k, False: 143]
  ------------------
  207|  7.27k|            factor = factor + norm_value;
  208|  7.27k|            *p_scale_factor_tmp++ = factor;
  209|  7.27k|          } else {
  210|    143|            p_pns_data->current_energy =
  211|    143|                ixheaac_add16_sat(p_pns_data->current_energy, norm_value);
  212|       |
  213|    143|            pns_band = (group << 4) + sfb_transmitted - band - 1;
  214|    143|            p_aac_decoder_channel_info->p_scale_factor[pns_band] = p_pns_data->current_energy;
  215|       |
  216|    143|            p_pns_data->pns_used[pns_band] = 1;
  217|    143|            p_scale_factor_tmp++;
  218|    143|          }
  219|  8.88k|        }
  220|  8.88k|      }
  221|  10.2k|    }
  222|  1.61k|  }
  223|       |
  224|  1.05k|  it_bit_buf->ptr_read_next = ptr_read_next - diffbytes;
  225|       |
  226|  1.05k|  it_bit_buf->bit_pos = 7 - bit_pos;
  227|  1.05k|  {
  228|  1.05k|    WORD bits_cons;
  229|  1.05k|    bits_cons = (WORD)(((it_bit_buf->ptr_read_next - start_read_pos) << 3) +
  230|  1.05k|                       (start_bit_pos - it_bit_buf->bit_pos));
  231|  1.05k|    it_bit_buf->cnt_bits -= bits_cons;
  232|  1.05k|  }
  233|  1.05k|}

ixheaacd_res_tns_decode_coeffs_32x16:
   48|    388|                                          ia_mps_dec_residual_aac_tables_struct *aac_tables_ptr) {
   49|    388|  WORD tmp;
   50|    388|  WORD16 *aptr = a;
   51|    388|  WORD16 *tns_coeff_ptr;
   52|    388|  WORD8 offset = 4;
   53|    388|  WORD8 *p_coeff = (WORD8 *)&filter->coeff[0];
   54|    388|  WORD32 tmp1;
   55|       |
   56|    388|  tmp = filter->resolution;
   57|    388|  tns_coeff_ptr = aac_tables_ptr->res_block_tables_ptr->tns_coeff3_16;
   58|    388|  if (tmp) {
  ------------------
  |  Branch (58:7): [True: 196, False: 192]
  ------------------
   59|    196|    tns_coeff_ptr = aac_tables_ptr->res_block_tables_ptr->tns_coeff4_16;
   60|    196|    offset = offset << 1;
   61|    196|  }
   62|    388|  tmp1 = filter->order;
   63|  1.73k|  do {
   64|  1.73k|    WORD8 temp = *p_coeff++;
   65|  1.73k|    *aptr++ = tns_coeff_ptr[temp + offset];
   66|  1.73k|    tmp1--;
   67|  1.73k|  } while (tmp1 != 0);
  ------------------
  |  Branch (67:12): [True: 1.34k, False: 388]
  ------------------
   68|    388|}
ixheaacd_res_ctns_apply:
   72|    215|                             ia_mps_dec_residual_aac_tables_struct *aac_tables_ptr) {
   73|    215|  WORD i;
   74|    215|  WORD16 scale_lpc;
   75|       |
   76|    215|  ia_mps_dec_residual_tns_data *p_tns_data = &p_aac_decoder_channel_info->tns_data;
   77|    215|  WORD32 *p_spectrum = p_aac_decoder_channel_info->p_spectral_coefficient;
   78|       |
   79|    215|  WORD window, index, start, stop, size, scale_spec;
   80|    215|  ia_mps_dec_residual_ics_info_struct *p_ics_info = &p_aac_decoder_channel_info->ics_info;
   81|    215|  WORD win_len, tns_max_bands;
   82|    215|  WORD16 maximum_bins_short = ixheaac_shr16_dir_sat(p_ics_info->frame_length, 3);
   83|       |
   84|    215|  WORD32 coeff_parc[MAX_ORDER + 1];
   85|    215|  WORD32 lpc[MAX_ORDER + 1];
   86|       |
   87|    215|  const WORD16 *scale_factor_bands_tbl;
   88|       |
   89|    215|  if (!p_tns_data->tns_data_present) return;
  ------------------
  |  Branch (89:7): [True: 0, False: 215]
  ------------------
   90|       |
   91|    215|  tns_max_bands = ixheaacd_res_get_maximum_tns_bands(p_ics_info, aac_tables_ptr, &win_len);
   92|       |
   93|    215|  scale_factor_bands_tbl =
   94|    215|      ixheaacd_res_get_sfb_offsets(&p_aac_decoder_channel_info->ics_info, aac_tables_ptr);
   95|       |
   96|  1.46k|  for (window = 0; window < win_len; window++) {
  ------------------
  |  Branch (96:20): [True: 1.25k, False: 215]
  ------------------
   97|  1.25k|    WORD ind_len = p_tns_data->number_of_filters[window];
   98|       |
   99|  1.74k|    for (index = 0; index < ind_len; index++) {
  ------------------
  |  Branch (99:21): [True: 491, False: 1.25k]
  ------------------
  100|    491|      ia_mps_dec_residual_filter_struct *filter = &p_tns_data->filter[window][index];
  101|       |
  102|    491|      if (filter->order <= 0 || filter->order > MAX_ORDER_LONG) continue;
  ------------------
  |  |   25|    388|#define MAX_ORDER_LONG 12
  ------------------
  |  Branch (102:11): [True: 103, False: 388]
  |  Branch (102:33): [True: 0, False: 388]
  ------------------
  103|       |
  104|    388|      ixheaacd_res_tns_decode_coeffs_32x16(filter, (WORD16 *)coeff_parc, aac_tables_ptr);
  105|       |
  106|    388|      start = ixheaac_min32(ixheaac_min32(filter->start_band, tns_max_bands), max_sfb);
  107|       |
  108|    388|      start = scale_factor_bands_tbl[start];
  109|       |
  110|    388|      stop = ixheaac_min32(ixheaac_min32(filter->stop_band, tns_max_bands), max_sfb);
  111|       |
  112|    388|      stop = scale_factor_bands_tbl[stop];
  113|       |
  114|    388|      size = (stop - start);
  115|    388|      if (size <= 0) continue;
  ------------------
  |  Branch (115:11): [True: 91, False: 297]
  ------------------
  116|       |
  117|    297|      ixheaacd_res_tns_parcor_2_lpc_32x16((WORD16 *)coeff_parc, (WORD16 *)lpc, &scale_lpc,
  118|    297|                                          filter->order);
  119|    297|      {
  120|    297|        WORD32 *p_tmp = p_spectrum + (window * maximum_bins_short) + start;
  121|    297|        scale_spec = ixheaacd_res_calc_max_spectral_line(p_tmp, size);
  122|    297|      }
  123|       |
  124|    297|      scale_spec = ((scale_spec - 4) - scale_lpc);
  125|       |
  126|    297|      if (scale_spec > 0) {
  ------------------
  |  Branch (126:11): [True: 124, False: 173]
  ------------------
  127|    124|        WORD shift;
  128|       |
  129|    124|        scale_spec = ixheaac_min32(scale_spec, 31);
  130|       |
  131|    124|        if (filter->direction == -1)
  ------------------
  |  Branch (131:13): [True: 63, False: 61]
  ------------------
  132|     63|          shift = stop - 1;
  133|     61|        else
  134|     61|          shift = start;
  135|       |
  136|    124|        ixheaacd_res_tns_ar_filter_fixed_32x16(&p_spectrum[(window * maximum_bins_short) + shift],
  137|    124|                                               size, filter->direction, (WORD16 *)lpc,
  138|    124|                                               filter->order, (WORD32)scale_lpc, scale_spec);
  139|    173|      } else {
  140|    173|        WORD shift;
  141|    173|        WORD32 *p_tmp = p_spectrum + (window * maximum_bins_short) + start;
  142|       |
  143|    173|        scale_spec = -scale_spec;
  144|    173|        scale_spec = ixheaac_min32(scale_spec, 31);
  145|       |
  146|  12.4k|        for (i = size; i != 0; i--) {
  ------------------
  |  Branch (146:24): [True: 12.2k, False: 173]
  ------------------
  147|  12.2k|          *p_tmp = (*p_tmp >> scale_spec);
  148|  12.2k|          p_tmp++;
  149|  12.2k|        }
  150|       |
  151|    173|        if (filter->direction == -1)
  ------------------
  |  Branch (151:13): [True: 100, False: 73]
  ------------------
  152|    100|          shift = stop - 1;
  153|     73|        else
  154|     73|          shift = start;
  155|       |
  156|    173|        {
  157|    173|          WORD32 shift_val = scale_lpc;
  158|       |
  159|    173|          ixheaacd_res_tns_ar_filter_fixed_32x16(
  160|    173|              &p_spectrum[(window * maximum_bins_short) + shift], size, filter->direction,
  161|    173|              (WORD16 *)lpc, filter->order, shift_val, 0);
  162|    173|        }
  163|    173|        {
  164|    173|          p_tmp = p_spectrum + (window * maximum_bins_short) + start;
  165|    173|          i = size;
  166|  12.2k|          do {
  167|  12.2k|            *p_tmp = (*p_tmp << scale_spec);
  168|  12.2k|            p_tmp++;
  169|  12.2k|            i--;
  170|  12.2k|          } while (i != 0);
  ------------------
  |  Branch (170:20): [True: 12.1k, False: 173]
  ------------------
  171|    173|        }
  172|    173|      }
  173|    297|    }
  174|  1.25k|  }
  175|    215|}
ixheaacd_mps_res_pns_js_thumb.c:ixheaacd_res_get_maximum_tns_bands:
   33|    215|    ia_mps_dec_residual_aac_tables_struct *aac_tables_ptr, WORD32 *win_len) {
   34|    215|  WORD32 i = 0;
   35|    215|  *win_len = 1;
   36|       |
   37|    215|  if (p_ics_info->window_sequence == EIGHT_SHORT_SEQUENCE) {
  ------------------
  |  |  102|    215|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  |  Branch (37:7): [True: 148, False: 67]
  ------------------
   38|    148|    *win_len = 8;
   39|    148|    i = 1;
   40|    148|  }
   41|       |
   42|    215|  return aac_tables_ptr->res_block_tables_ptr
   43|    215|      ->tns_max_bands_tbl[p_ics_info->sampling_rate_index][i];
   44|    215|}

ixheaacd_res_c_pulse_data_read:
   28|  1.05k|                                      ia_mps_dec_residual_aac_tables_struct *aac_tables_ptr) {
   29|  1.05k|  WORD32 i, k;
   30|  1.05k|  WORD32 error = 0;
   31|  1.05k|  pulse_data->pulse_data_present = (FLAG)ixheaacd_read_bits_buf(it_bit_buf, 1);
   32|  1.05k|  if (pulse_data->pulse_data_present) {
  ------------------
  |  Branch (32:7): [True: 138, False: 916]
  ------------------
   33|    138|    WORD32 tmp = ixheaacd_read_bits_buf(it_bit_buf, 8);
   34|    138|    pulse_data->number_pulse = tmp >> 6;
   35|    138|    pulse_data->pulse_start_band = tmp & 0x3F;
   36|       |
   37|    138|    if (pulse_data->pulse_start_band >= 52) {
  ------------------
  |  Branch (37:9): [True: 1, False: 137]
  ------------------
   38|      1|      return (WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_PULSEDATA_ERROR;
  ------------------
  |  |  108|      1|#define IA_XHEAAC_DEC_EXE_NONFATAL_PULSEDATA_ERROR 0x0000180D
  ------------------
   39|      1|    }
   40|       |
   41|    137|    k = aac_tables_ptr->sfb_index_long[pulse_data->pulse_start_band];
   42|       |
   43|    433|    for (i = 0; i <= pulse_data->number_pulse; i++) {
  ------------------
  |  Branch (43:17): [True: 296, False: 137]
  ------------------
   44|    296|      WORD32 tmp = ixheaacd_read_bits_buf(it_bit_buf, 9);
   45|    296|      pulse_data->pulse_offset[i] = tmp >> 4;
   46|    296|      pulse_data->pulse_amp[i] = tmp & 0xF;
   47|       |
   48|    296|      k += pulse_data->pulse_offset[i];
   49|    296|      if (k >= 1024) error = (WORD32)IA_XHEAAC_DEC_EXE_NONFATAL_PULSEDATA_ERROR;
  ------------------
  |  |  108|     10|#define IA_XHEAAC_DEC_EXE_NONFATAL_PULSEDATA_ERROR 0x0000180D
  ------------------
  |  Branch (49:11): [True: 10, False: 286]
  ------------------
   50|    296|    }
   51|    137|  }
   52|       |
   53|  1.05k|  return error;
   54|  1.05k|}

ixheaacd_res_tns_parcor_2_lpc_32x16:
   30|    297|{
   31|    297|  WORD i, j, status;
   32|    297|  WORD32 z1;
   33|    297|  WORD16 z[MAX_ORDER + 1];
   34|    297|  WORD16 w[MAX_ORDER + 1];
   35|    297|  WORD32 accu1, accu2;
   36|       |
   37|    297|  status = 1;
   38|    297|  *scale = 0;
   39|    982|  while (status) {
  ------------------
  |  Branch (39:10): [True: 685, False: 297]
  ------------------
   40|    685|    status = 0;
   41|       |
   42|  22.6k|    for (i = MAX_ORDER; i >= 0; i--) {
  ------------------
  |  |   24|    685|#define MAX_ORDER 31
  ------------------
  |  Branch (42:25): [True: 21.9k, False: 685]
  ------------------
   43|  21.9k|      z[i] = 0;
   44|  21.9k|      w[i] = 0;
   45|  21.9k|    }
   46|       |
   47|    685|    accu1 = (0x7fffffff >> *scale);
   48|       |
   49|  4.91k|    for (i = 0; i <= order; i++) {
  ------------------
  |  Branch (49:17): [True: 4.22k, False: 685]
  ------------------
   50|  4.22k|      z1 = accu1;
   51|       |
   52|  32.1k|      for (j = 0; j < order; j++) {
  ------------------
  |  Branch (52:19): [True: 27.8k, False: 4.22k]
  ------------------
   53|  27.8k|        w[j] = ixheaac_round16(accu1);
   54|       |
   55|  27.8k|        accu1 = ixheaac_mac16x16in32_shl_sat(accu1, parcor[j], z[j]);
   56|  27.8k|        if (ixheaac_abs32_sat(accu1) == 0x7fffffff) status = 1;
  ------------------
  |  Branch (56:13): [True: 3.17k, False: 24.7k]
  ------------------
   57|  27.8k|      }
   58|  32.1k|      for (j = (order - 1); j >= 0; j--) {
  ------------------
  |  Branch (58:29): [True: 27.8k, False: 4.22k]
  ------------------
   59|  27.8k|        accu2 = ixheaac_deposit16h_in32(z[j]);
   60|  27.8k|        accu2 = ixheaac_mac16x16in32_shl_sat(accu2, parcor[j], w[j]);
   61|  27.8k|        z[j + 1] = ixheaac_round16(accu2);
   62|  27.8k|        if (ixheaac_abs32_sat(accu2) == 0x7fffffff) status = 1;
  ------------------
  |  Branch (62:13): [True: 1.50k, False: 26.3k]
  ------------------
   63|  27.8k|      }
   64|       |
   65|  4.22k|      z[0] = ixheaac_round16(z1);
   66|  4.22k|      lpc[i] = ixheaac_round16(accu1);
   67|  4.22k|      accu1 = 0;
   68|  4.22k|    }
   69|    685|    accu1 = (status - 1);
   70|    685|    if (accu1 == 0) {
  ------------------
  |  Branch (70:9): [True: 388, False: 297]
  ------------------
   71|    388|      *scale = *scale + 1;
   72|    388|    }
   73|    685|  }
   74|    297|}
ixheaacd_res_tns_ar_filter_fixed_32x16:
   78|    297|                                            WORD scale_spec) {
   79|    297|  WORD32 i, j;
   80|    297|  WORD32 y, state[MAX_ORDER + 1];
   81|       |
   82|    297|  if ((order & 3) != 0) {
  ------------------
  |  Branch (82:7): [True: 249, False: 48]
  ------------------
   83|    491|    for (i = order + 1; i < ((WORD32)(order & 0xfffffffc) + 4); i++) {
  ------------------
  |  Branch (83:25): [True: 242, False: 249]
  ------------------
   84|    242|      lpc[i] = 0;
   85|    242|    }
   86|    249|    lpc[i] = 0;
   87|    249|    order = ((order & 0xfffffffc) + 4);
   88|    249|    order = order & 31;
   89|    249|  }
   90|       |
   91|  2.20k|  for (i = 0; i < order; i++) {
  ------------------
  |  Branch (91:15): [True: 1.90k, False: 297]
  ------------------
   92|  1.90k|    y = (*spectrum) << scale_spec;
   93|  7.90k|    for (j = i; j > 0; j--) {
  ------------------
  |  Branch (93:17): [True: 5.99k, False: 1.90k]
  ------------------
   94|  5.99k|      y = ixheaac_sub32_sat(y, ixheaac_mult32x16in32_shl_sat(state[j - 1], lpc[j]));
   95|  5.99k|      state[j] = state[j - 1];
   96|  5.99k|    }
   97|       |
   98|  1.90k|    state[0] = ixheaac_shl32_dir_sat_limit(y, shift_value);
   99|  1.90k|    *spectrum = y >> scale_spec;
  100|  1.90k|    spectrum += inc;
  101|  1.90k|  }
  102|       |
  103|  22.4k|  for (i = order; i < size; i++) {
  ------------------
  |  Branch (103:19): [True: 22.1k, False: 297]
  ------------------
  104|  22.1k|    y = (*spectrum) << scale_spec;
  105|       |
  106|   179k|    for (j = order; j > 0; j--) {
  ------------------
  |  Branch (106:21): [True: 157k, False: 22.1k]
  ------------------
  107|   157k|      y = ixheaac_sub32_sat(y, ixheaac_mult32x16in32_shl_sat(state[j - 1], lpc[j]));
  108|   157k|      state[j] = state[j - 1];
  109|   157k|    }
  110|       |
  111|  22.1k|    state[0] = ixheaac_shl32_dir_sat_limit(y, shift_value);
  112|  22.1k|    *spectrum = y >> scale_spec;
  113|  22.1k|    spectrum += inc;
  114|  22.1k|  }
  115|    297|}
ixheaacd_res_calc_max_spectral_line:
  117|    297|WORD32 ixheaacd_res_calc_max_spectral_line(WORD32 *p_tmp, WORD32 size) {
  118|    297|  WORD32 max_spectral_line = 0, i;
  119|    297|  WORD count, remaining, temp_1, temp_2, temp3, temp4;
  120|       |
  121|    297|  count = size >> 3;
  122|  3.21k|  for (i = count; i--;) {
  ------------------
  |  Branch (122:19): [True: 2.91k, False: 297]
  ------------------
  123|  2.91k|    temp_1 = *p_tmp++;
  124|  2.91k|    temp_2 = *p_tmp++;
  125|  2.91k|    temp3 = *p_tmp++;
  126|  2.91k|    temp4 = *p_tmp++;
  127|       |
  128|  2.91k|    max_spectral_line = ixheaac_abs32_nrm(temp_1) | max_spectral_line;
  129|  2.91k|    max_spectral_line = ixheaac_abs32_nrm(temp_2) | max_spectral_line;
  130|  2.91k|    max_spectral_line = ixheaac_abs32_nrm(temp3) | max_spectral_line;
  131|  2.91k|    max_spectral_line = ixheaac_abs32_nrm(temp4) | max_spectral_line;
  132|  2.91k|    temp_1 = *p_tmp++;
  133|  2.91k|    temp_2 = *p_tmp++;
  134|  2.91k|    temp3 = *p_tmp++;
  135|  2.91k|    temp4 = *p_tmp++;
  136|       |
  137|  2.91k|    max_spectral_line = ixheaac_abs32_nrm(temp_1) | max_spectral_line;
  138|  2.91k|    max_spectral_line = ixheaac_abs32_nrm(temp_2) | max_spectral_line;
  139|  2.91k|    max_spectral_line = ixheaac_abs32_nrm(temp3) | max_spectral_line;
  140|  2.91k|    max_spectral_line = ixheaac_abs32_nrm(temp4) | max_spectral_line;
  141|  2.91k|  }
  142|       |
  143|    297|  remaining = size - (count << 3);
  144|    297|  if (remaining) {
  ------------------
  |  Branch (144:7): [True: 187, False: 110]
  ------------------
  145|    935|    for (i = remaining; i--;) {
  ------------------
  |  Branch (145:25): [True: 748, False: 187]
  ------------------
  146|    748|      max_spectral_line = ixheaac_abs32_nrm(*p_tmp) | max_spectral_line;
  147|    748|      p_tmp++;
  148|    748|    }
  149|    187|  }
  150|       |
  151|    297|  return ixheaac_norm32(max_spectral_line);
  152|    297|}

ixheaacd_init_bb_env:
   48|  1.04k|VOID ixheaacd_init_bb_env(ia_heaac_mps_state_struct *pstr_mps_state) {
   49|  1.04k|  WORD32 k, j;
   50|  1.04k|  ia_mps_dec_reshape_bb_env_state_struct *reshape_bb_env_state =
   51|  1.04k|      pstr_mps_state->mps_persistent_mem.reshape_bb_env_state;
   52|       |
   53|  24.0k|  for (k = 0; k < 2 * MAX_OUTPUT_CHANNELS_MPS + MAX_INPUT_CHANNELS_MPS; k++) {
  ------------------
  |  |   71|  24.0k|#define MAX_OUTPUT_CHANNELS_MPS (8)
  ------------------
                for (k = 0; k < 2 * MAX_OUTPUT_CHANNELS_MPS + MAX_INPUT_CHANNELS_MPS; k++) {
  ------------------
  |  |   66|  24.0k|#define MAX_INPUT_CHANNELS_MPS (6)
  ------------------
  |  Branch (53:15): [True: 22.9k, False: 1.04k]
  ------------------
   54|  22.9k|    reshape_bb_env_state->norm_nrg_prev[k] = ONE_IN_Q30;
  ------------------
  |  |   43|  22.9k|#define ONE_IN_Q30 (1073741824)
  ------------------
   55|  22.9k|    reshape_bb_env_state->frame_nrg_prev[k] = 0;
   56|  22.9k|    reshape_bb_env_state->q_frame_nrg_prev[k] = 30;
   57|  22.9k|    reshape_bb_env_state->q_norm_nrg_prev[k] = 30;
   58|   666k|    for (j = 0; j < MAX_PARAMETER_BANDS; j++) {
  ------------------
  |  |   55|   666k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  |  Branch (58:17): [True: 643k, False: 22.9k]
  ------------------
   59|   643k|      reshape_bb_env_state->part_nrg_prev[k][j] = 0;
   60|   643k|      reshape_bb_env_state->q_part_nrg_prev[k][j] = 30;
   61|   643k|    }
   62|  22.9k|  }
   63|  1.04k|}
ixheaacd_reshape_bb_env:
  370|  6.64k|VOID ixheaacd_reshape_bb_env(ia_heaac_mps_state_struct *pstr_mps_state) {
  371|  6.64k|  WORD32 *env_dry;
  372|  6.64k|  WORD32 *env_dmx_0, *env_dmx_1;
  373|       |
  374|  6.64k|  WORD32 *p_buffer_real, *p_buffer_imag, *p_buffer_re, *p_buffer_im;
  375|  6.64k|  WORD32 *hyb_output_real_wet, *hyb_output_imag_wet;
  376|       |
  377|  6.64k|  WORD32 temp_1, temp_2;
  378|  6.64k|  WORD16 qtemp1, qtemp2;
  379|  6.64k|  WORD32 tmp, dry_fac, slot_amp_dry, slot_amp_wet;
  380|  6.64k|  WORD16 q_dry_fac, q_slot_amp_dry, q_slot_amp_wet;
  381|       |
  382|  6.64k|  WORD32 slot_amp_ratio;
  383|  6.64k|  WORD16 q_slot_amp_ratio;
  384|  6.64k|  WORD32 ch, ch2, ts, qs;
  385|  6.64k|  WORD32 *hyb_output_real_dry, *hyb_out_dry_real;
  386|  6.64k|  WORD32 *hyb_output_imag_dry, *hyb_out_dry_imag;
  387|  6.64k|  WORD64 *inter;
  388|       |
  389|  6.64k|  VOID *free_scratch;
  390|  6.64k|  const WORD32 *sqrt_tab = pstr_mps_state->ia_mps_dec_mps_table.common_table_ptr->sqrt_tab;
  391|  6.64k|  ia_mps_dec_auxilary_struct *p_aux_struct = pstr_mps_state->aux_struct;
  392|  6.64k|  WORD32 *temp_shape_enable_channel_ges = p_aux_struct->temp_shape_enable_channel_ges;
  393|       |
  394|  6.64k|  WORD32 start_hsb;
  395|  6.64k|  WORD32 time_slots = pstr_mps_state->time_slots;
  396|  6.64k|  WORD32 num_output_channels = pstr_mps_state->num_output_channels;
  397|  6.64k|  WORD32 tree_config = pstr_mps_state->tree_config;
  398|  6.64k|  WORD32 hybrid_bands = pstr_mps_state->hybrid_bands;
  399|       |
  400|  6.64k|  const WORD32 *ch_idx = &pstr_mps_state->ia_mps_dec_mps_table.m1_m2_table_ptr->idx_table
  401|  6.64k|                              .row_2_channel_ges[tree_config][0];
  402|  6.64k|  WORD64 acc, acc2;
  403|  6.64k|  start_hsb = 6;
  404|       |
  405|  6.64k|  free_scratch = pstr_mps_state->mps_scratch_mem_v;
  406|  6.64k|  env_dry = free_scratch;
  407|  6.64k|  env_dmx_0 = pstr_mps_state->array_struct->env_dmx_0;
  408|  6.64k|  env_dmx_1 = pstr_mps_state->array_struct->env_dmx_1;
  409|  6.64k|  inter = (WORD64 *)((WORD8 *)free_scratch +
  410|  6.64k|                     IXHEAAC_GET_SIZE_ALIGNED(MAX_TIME_SLOTSX12, BYTE_ALIGN_8));
  ------------------
  |  |   87|  6.64k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  411|  6.64k|  free_scratch =
  412|  6.64k|      inter + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_TIME_SLOTS, sizeof(*inter), BYTE_ALIGN_8);
  ------------------
  |  |   89|  6.64k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  413|       |
  414|  6.64k|  p_buffer_real = pstr_mps_state->array_struct->buf_real + start_hsb;
  415|  6.64k|  p_buffer_imag = pstr_mps_state->array_struct->buf_imag + start_hsb;
  416|       |
  417|  59.1k|  for (ch = 0; ch < num_output_channels; ch++) {
  ------------------
  |  Branch (417:16): [True: 52.4k, False: 6.64k]
  ------------------
  418|  52.4k|    ch2 = ch_idx[ch];
  419|       |
  420|  52.4k|    if (ch2 == -1) continue;
  ------------------
  |  Branch (420:9): [True: 25.1k, False: 27.2k]
  ------------------
  421|       |
  422|  27.2k|    p_buffer_re = p_buffer_real;
  423|  27.2k|    p_buffer_im = p_buffer_imag;
  424|       |
  425|  27.2k|    ixheaacd_extract_bb_env(pstr_mps_state, INP_DRY_WET, ch, env_dry, free_scratch,
  ------------------
  |  |   23|  27.2k|#define INP_DRY_WET (0)
  ------------------
  426|  27.2k|                                         temp_shape_enable_channel_ges[ch2]);
  427|       |
  428|  27.2k|    if (temp_shape_enable_channel_ges[ch2]) {
  ------------------
  |  Branch (428:9): [True: 915, False: 26.3k]
  ------------------
  429|    915|      WORD32 *env = &p_aux_struct->env_shape_data[ch2][0];
  430|    915|      switch (tree_config) {
  431|     46|        case TREE_5151:
  ------------------
  |  Branch (431:9): [True: 46, False: 869]
  ------------------
  432|    141|        case TREE_5152:
  ------------------
  |  Branch (432:9): [True: 95, False: 820]
  ------------------
  433|  3.80k|          for (ts = 0; ts < time_slots; ts++) {
  ------------------
  |  Branch (433:24): [True: 3.66k, False: 141]
  ------------------
  434|  3.66k|            inter[ts] = (WORD64)((WORD64)*env++ * (WORD64)env_dmx_0[ts]);
  435|  3.66k|          }
  436|    141|          break;
  437|       |
  438|    119|        case TREE_525:
  ------------------
  |  Branch (438:9): [True: 119, False: 796]
  ------------------
  439|    290|        case TREE_7271:
  ------------------
  |  Branch (439:9): [True: 171, False: 744]
  ------------------
  440|    322|        case TREE_7272:
  ------------------
  |  Branch (440:9): [True: 32, False: 883]
  ------------------
  441|       |
  442|    322|          switch (ch2) {
  443|     92|            case 0:
  ------------------
  |  Branch (443:13): [True: 92, False: 230]
  ------------------
  444|    134|            case 3:
  ------------------
  |  Branch (444:13): [True: 42, False: 280]
  ------------------
  445|    166|            case 5:
  ------------------
  |  Branch (445:13): [True: 32, False: 290]
  ------------------
  446|       |
  447|  5.26k|              for (ts = 0; ts < time_slots; ts++) {
  ------------------
  |  Branch (447:28): [True: 5.10k, False: 166]
  ------------------
  448|  5.10k|                inter[ts] = (WORD64)((WORD64)*env++ * (WORD64)env_dmx_0[ts]);
  449|  5.10k|              }
  450|    166|              break;
  451|     42|            case 1:
  ------------------
  |  Branch (451:13): [True: 42, False: 280]
  ------------------
  452|     85|            case 4:
  ------------------
  |  Branch (452:13): [True: 43, False: 279]
  ------------------
  453|    114|            case 6:
  ------------------
  |  Branch (453:13): [True: 29, False: 293]
  ------------------
  454|       |
  455|  3.55k|              for (ts = 0; ts < time_slots; ts++) {
  ------------------
  |  Branch (455:28): [True: 3.44k, False: 114]
  ------------------
  456|  3.44k|                inter[ts] = (WORD64)((WORD64)*env++ * (WORD64)env_dmx_1[ts]);
  457|  3.44k|              }
  458|    114|              break;
  459|     42|            case 2:
  ------------------
  |  Branch (459:13): [True: 42, False: 280]
  ------------------
  460|       |
  461|  1.29k|              for (ts = 0; ts < time_slots; ts++) {
  ------------------
  |  Branch (461:28): [True: 1.25k, False: 42]
  ------------------
  462|  1.25k|                temp_2 = ((WORD64)env_dmx_0[ts] + (WORD64)env_dmx_1[ts]) >> 1;
  463|  1.25k|                inter[ts] = (WORD64)((WORD64)*env++ * (WORD64)temp_2);
  464|  1.25k|              }
  465|     42|              break;
  466|      0|            default:
  ------------------
  |  Branch (466:13): [True: 0, False: 322]
  ------------------
  467|      0|              break;
  468|    322|          }
  469|    322|          break;
  470|       |
  471|    322|        case TREE_7571:
  ------------------
  |  Branch (471:9): [True: 12, False: 903]
  ------------------
  472|    452|        case TREE_7572:
  ------------------
  |  Branch (472:9): [True: 440, False: 475]
  ------------------
  473|    452|          switch (ch2) {
  474|    145|            case 0:
  ------------------
  |  Branch (474:13): [True: 145, False: 307]
  ------------------
  475|    271|            case 2:
  ------------------
  |  Branch (475:13): [True: 126, False: 326]
  ------------------
  476|  7.91k|              for (ts = 0; ts < time_slots; ts++) {
  ------------------
  |  Branch (476:28): [True: 7.64k, False: 271]
  ------------------
  477|  7.64k|                inter[ts] = (WORD64)((WORD64)*env++ * (WORD64)env_dmx_0[ts]);
  478|  7.64k|              }
  479|       |
  480|    271|              break;
  481|    128|            case 1:
  ------------------
  |  Branch (481:13): [True: 128, False: 324]
  ------------------
  482|    181|            case 3:
  ------------------
  |  Branch (482:13): [True: 53, False: 399]
  ------------------
  483|  5.17k|              for (ts = 0; ts < time_slots; ts++) {
  ------------------
  |  Branch (483:28): [True: 4.99k, False: 181]
  ------------------
  484|  4.99k|                inter[ts] = (WORD64)((WORD64)*env++ * (WORD64)env_dmx_1[ts]);
  485|  4.99k|              }
  486|    181|              break;
  487|      0|            default:
  ------------------
  |  Branch (487:13): [True: 0, False: 452]
  ------------------
  488|      0|              break;
  489|    452|          }
  490|    452|        default:
  ------------------
  |  Branch (490:9): [True: 0, False: 915]
  ------------------
  491|    452|          break;
  492|    915|      }
  493|       |
  494|    915|      hyb_out_dry_real =
  495|    915|          pstr_mps_state->array_struct->hyb_output_real_dry + ch * TSXHB + start_hsb;
  ------------------
  |  |  106|    915|#define TSXHB (5112)
  ------------------
  496|    915|      hyb_out_dry_imag =
  497|    915|          pstr_mps_state->array_struct->hyb_output_imag_dry + ch * TSXHB + start_hsb;
  ------------------
  |  |  106|    915|#define TSXHB (5112)
  ------------------
  498|       |
  499|  27.0k|      for (ts = 0; ts < time_slots; ts++) {
  ------------------
  |  Branch (499:20): [True: 26.1k, False: 915]
  ------------------
  500|  26.1k|        tmp = ixheaacd_mps_narrow(inter[ts], &qtemp1);
  501|       |
  502|  26.1k|        if (env_dry[ts] == 0) {
  ------------------
  |  Branch (502:13): [True: 11.6k, False: 14.4k]
  ------------------
  503|  11.6k|          q_dry_fac = 0;
  504|  11.6k|          dry_fac = MAX_32;
  ------------------
  |  |   60|  11.6k|#define MAX_32 (WORD32)0x7fffffffL
  ------------------
  505|  14.4k|        } else {
  506|  14.4k|          dry_fac = ixheaacd_mps_div_32(tmp, env_dry[ts], &q_dry_fac);
  507|  14.4k|          q_dry_fac += qtemp1 - 5;
  508|  14.4k|        }
  509|       |
  510|  26.1k|        hyb_output_real_wet = p_buffer_re;
  511|  26.1k|        hyb_output_imag_wet = p_buffer_im;
  512|       |
  513|  26.1k|        hyb_output_real_dry = hyb_out_dry_real;
  514|  26.1k|        hyb_output_imag_dry = hyb_out_dry_imag;
  515|  26.1k|        acc = 0;
  516|  26.1k|        acc2 = 0;
  517|       |
  518|  1.32M|        for (qs = start_hsb; qs < hybrid_bands; qs++) {
  ------------------
  |  Branch (518:30): [True: 1.29M, False: 26.1k]
  ------------------
  519|  1.29M|          acc = ixheaac_add64_sat(acc, ixheaac_mult32x32in64(*hyb_output_real_dry, *hyb_output_real_dry));
  520|  1.29M|          hyb_output_real_dry++;
  521|  1.29M|          acc = ixheaac_add64_sat(acc, ixheaac_mult32x32in64(*hyb_output_imag_dry, *hyb_output_imag_dry));
  522|  1.29M|          hyb_output_imag_dry++;
  523|       |
  524|  1.29M|          acc2 = ixheaac_add64_sat(acc2, ixheaac_mult32x32in64(*hyb_output_real_wet, *hyb_output_real_wet));
  525|  1.29M|          hyb_output_real_wet++;
  526|  1.29M|          acc2 = ixheaac_add64_sat(acc2, ixheaac_mult32x32in64(*hyb_output_imag_wet, *hyb_output_imag_wet));
  527|  1.29M|          hyb_output_imag_wet++;
  528|  1.29M|        }
  529|  26.1k|        slot_amp_dry = ixheaacd_mps_narrow(acc, &q_slot_amp_dry);
  530|  26.1k|        slot_amp_wet = ixheaacd_mps_narrow(acc2, &q_slot_amp_wet);
  531|       |
  532|  26.1k|        qtemp1 = q_slot_amp_dry;
  533|       |
  534|  26.1k|        temp_1 = ixheaacd_mps_add32(slot_amp_dry, ABS_THR_FIX, &qtemp1, 15);
  ------------------
  |  |   59|  26.1k|#define ABS_THR_FIX (35184)
  ------------------
  535|  26.1k|        temp_2 = ixheaacd_mps_div_32(slot_amp_wet, temp_1, &qtemp2);
  536|  26.1k|        q_slot_amp_ratio = qtemp2 + q_slot_amp_wet - qtemp1;
  537|  26.1k|        slot_amp_ratio = ixheaacd_mps_sqrt(temp_2, &q_slot_amp_ratio, sqrt_tab);
  538|       |
  539|  26.1k|        temp_1 = ixheaacd_mps_convert_to_qn(dry_fac, q_dry_fac, 15);
  540|  26.1k|        temp_1 -= ONE_IN_Q15;
  ------------------
  |  |   41|  26.1k|#define ONE_IN_Q15 (32768)
  ------------------
  541|  26.1k|        temp_1 = ixheaacd_mps_mult32_shr_16(temp_1, slot_amp_ratio);
  542|  26.1k|        q_slot_amp_ratio -= 1;
  543|       |
  544|  26.1k|        temp_1 = ixheaacd_mps_add32(temp_1, dry_fac, &q_slot_amp_ratio, q_dry_fac);
  545|       |
  546|  26.1k|        temp_1 = ixheaacd_mps_convert_to_qn(temp_1, q_slot_amp_ratio, 15);
  547|  26.1k|        temp_1 = max(ONE_IN_Q13, temp_1);
  ------------------
  |  |   74|  26.1k|#define max(a, b) (((a) > (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (74:20): [True: 12.5k, False: 13.5k]
  |  |  ------------------
  ------------------
  548|  26.1k|        dry_fac = min(FOUR_IN_Q15, temp_1);
  ------------------
  |  |   75|  26.1k|#define min(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (75:20): [True: 1.04k, False: 25.0k]
  |  |  ------------------
  ------------------
  549|       |
  550|  26.1k|        hyb_output_real_dry = hyb_out_dry_real;
  551|  26.1k|        hyb_output_imag_dry = hyb_out_dry_imag;
  552|       |
  553|  1.32M|        for (qs = start_hsb; qs < hybrid_bands; qs++) {
  ------------------
  |  Branch (553:30): [True: 1.29M, False: 26.1k]
  ------------------
  554|  1.29M|          *hyb_output_real_dry = ixheaacd_mps_mult32_shr_15(*hyb_output_real_dry, dry_fac);
  555|  1.29M|          hyb_output_real_dry++;
  556|  1.29M|          *hyb_output_imag_dry = ixheaacd_mps_mult32_shr_15(*hyb_output_imag_dry, dry_fac);
  557|  1.29M|          hyb_output_imag_dry++;
  558|  1.29M|        }
  559|  26.1k|        p_buffer_re += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  26.1k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  26.1k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  560|  26.1k|        p_buffer_im += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  26.1k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  26.1k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  561|  26.1k|        hyb_out_dry_real += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  26.1k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  26.1k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  562|  26.1k|        hyb_out_dry_imag += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  26.1k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  26.1k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  563|  26.1k|      }
  564|    915|    }
  565|  27.2k|    p_buffer_real += TSXHB;
  ------------------
  |  |  106|  27.2k|#define TSXHB (5112)
  ------------------
  566|  27.2k|    p_buffer_imag += TSXHB;
  ------------------
  |  |  106|  27.2k|#define TSXHB (5112)
  ------------------
  567|  27.2k|  }
  568|  6.64k|  return;
  569|  6.64k|}
ixheaacd_pre_reshape_bb_env:
  571|  6.64k|VOID ixheaacd_pre_reshape_bb_env(ia_heaac_mps_state_struct *pstr_mps_state) {
  572|  6.64k|  WORD32 *env_dmx_0, *env_dmx_1;
  573|       |
  574|  6.64k|  VOID *free_scratch;
  575|       |
  576|  6.64k|  WORD32 tree_config = pstr_mps_state->tree_config;
  577|       |
  578|  6.64k|  free_scratch = pstr_mps_state->mps_scratch_mem_v;
  579|  6.64k|  env_dmx_0 = pstr_mps_state->array_struct->env_dmx_0;
  580|  6.64k|  env_dmx_1 = pstr_mps_state->array_struct->env_dmx_1;
  581|       |
  582|  6.64k|  switch (tree_config) {
  583|  6.16k|    case TREE_7572:
  ------------------
  |  Branch (583:5): [True: 6.16k, False: 477]
  ------------------
  584|  6.16k|      ixheaacd_extract_bb_env(pstr_mps_state, INP_DMX, 0 + 4, env_dmx_0, free_scratch, 0);
  ------------------
  |  |   24|  6.16k|#define INP_DMX (1)
  ------------------
  585|  6.16k|      ixheaacd_extract_bb_env(pstr_mps_state, INP_DMX, 1 + 4, env_dmx_1, free_scratch, 0);
  ------------------
  |  |   24|  6.16k|#define INP_DMX (1)
  ------------------
  586|  6.16k|      break;
  587|    477|    default:
  ------------------
  |  Branch (587:5): [True: 477, False: 6.16k]
  ------------------
  588|    477|      ixheaacd_extract_bb_env(pstr_mps_state, INP_DMX, 0, env_dmx_0, free_scratch, 0);
  ------------------
  |  |   24|    477|#define INP_DMX (1)
  ------------------
  589|    477|      if (min(pstr_mps_state->num_input_channels, 2) == 2) {
  ------------------
  |  |   75|    477|#define min(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (75:20): [True: 114, False: 363]
  |  |  ------------------
  ------------------
  |  Branch (589:11): [True: 363, False: 114]
  ------------------
  590|    363|        ixheaacd_extract_bb_env(pstr_mps_state, INP_DMX, 1, env_dmx_1, free_scratch, 0);
  ------------------
  |  |   24|    363|#define INP_DMX (1)
  ------------------
  591|    363|      }
  592|  6.64k|  }
  593|  6.64k|  return;
  594|  6.64k|}
ixheaacd_mps_reshape_bb_env.c:ixheaacd_extract_bb_env:
   66|  40.4k|                                            WORD32 ch, WORD32 *env, VOID *scratch, WORD32 flag) {
   67|  40.4k|  ia_mps_dec_reshape_bb_env_state_struct *reshape_bb_env_state =
   68|  40.4k|      pstr_mps_state->mps_persistent_mem.reshape_bb_env_state;
   69|  40.4k|  WORD64 *slot_nrg_fix, *slot_nrg;
   70|  40.4k|  WORD16 *q_slot_nrg_fix, *q_slot_nrg;
   71|  40.4k|  WORD32 *part_nrg_fix;
   72|  40.4k|  WORD16 *q_part_nrg_fix;
   73|       |
   74|  40.4k|  WORD32 *p_buffer_real, *p_buffer_imag, *p_buffer_re, *p_buffer_im;
   75|  40.4k|  WORD32 ts, qs, pb;
   76|       |
   77|  40.4k|  WORD32 start_p = 10;
   78|  40.4k|  WORD32 end_p = 18;
   79|  40.4k|  WORD32 env_fix_l;
   80|  40.4k|  WORD16 q_env_fix_l;
   81|       |
   82|  40.4k|  WORD16 alpha_fix = ALPHA_Q15;
  ------------------
  |  |   26|  40.4k|#define ALPHA_Q15 (32649)
  ------------------
   83|  40.4k|  WORD16 beta_fix = BETA_Q15;
  ------------------
  |  |   27|  40.4k|#define BETA_Q15 (31600)
  ------------------
   84|       |
   85|  40.4k|  WORD16 one_min_alpha_fix = ONE_MINUS_ALPHA_Q16;
  ------------------
  |  |   28|  40.4k|#define ONE_MINUS_ALPHA_Q16 (238)
  ------------------
   86|  40.4k|  WORD16 one_min_beta_fix = ONE_MINUS_BETA_Q16;
  ------------------
  |  |   29|  40.4k|#define ONE_MINUS_BETA_Q16 (2336)
  ------------------
   87|  40.4k|  WORD16 one_by_nine = ONE_BY_NINE_Q16;
  ------------------
  |  |   46|  40.4k|#define ONE_BY_NINE_Q16 (7282)
  ------------------
   88|  40.4k|  WORD32 frame_nrg_fix = 0;
   89|  40.4k|  WORD32 *norm_nrg_fix;
   90|  40.4k|  WORD16 q_frame_nrg_fix = 0;
   91|  40.4k|  WORD16 *q_norm_nrg_fix;
   92|  40.4k|  WORD32 temp_1, temp4;
   93|  40.4k|  WORD16 qtemp1, q_env;
   94|       |
   95|  40.4k|  WORD32 prev_ch_offs;
   96|  40.4k|  WORD32 cnt = min(42, pstr_mps_state->hybrid_bands);
  ------------------
  |  |   75|  40.4k|#define min(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (75:20): [True: 37.0k, False: 3.42k]
  |  |  ------------------
  ------------------
   97|  40.4k|  WORD32 time_slots = pstr_mps_state->time_slots;
   98|  40.4k|  const WORD32 *sqrt_tab = pstr_mps_state->ia_mps_dec_mps_table.common_table_ptr->sqrt_tab;
   99|  40.4k|  WORD32 *hyb_output_real_dry, *n_slot_nrg;
  100|  40.4k|  WORD32 *hyb_output_imag_dry;
  101|       |
  102|  40.4k|  const WORD32 *bb_env_kernels =
  103|  40.4k|      pstr_mps_state->ia_mps_dec_mps_table.bitdec_table_ptr->kernel_table.bb_env_kernels;
  104|       |
  105|  40.4k|  q_slot_nrg_fix = (WORD16 *)scratch;
  106|  40.4k|  n_slot_nrg =
  107|  40.4k|      (WORD32 *)((WORD8 *)scratch + IXHEAAC_GET_SIZE_ALIGNED(RESHAPE_OFFSET_1, BYTE_ALIGN_8));
  ------------------
  |  |   87|  40.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  108|  40.4k|  slot_nrg_fix =
  109|  40.4k|      (WORD64 *)((WORD8 *)scratch + IXHEAAC_GET_SIZE_ALIGNED(RESHAPE_OFFSET_2, BYTE_ALIGN_8));
  ------------------
  |  |   87|  40.4k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  110|  40.4k|  switch (inp) {
  111|      0|    WORD32 frame_nrg_prev;
  112|      0|    WORD16 q_frame_nrg_prev;
  113|      0|    WORD32 *p_hyb_out_dry_real, *p_hyb_out_dry_imag;
  114|       |
  115|  27.2k|    case INP_DRY_WET:
  ------------------
  |  |   23|  27.2k|#define INP_DRY_WET (0)
  ------------------
  |  Branch (115:5): [True: 27.2k, False: 13.1k]
  ------------------
  116|  27.2k|      frame_nrg_prev = reshape_bb_env_state->frame_nrg_prev[ch];
  117|  27.2k|      q_frame_nrg_prev = reshape_bb_env_state->q_frame_nrg_prev[ch];
  118|       |
  119|  27.2k|      part_nrg_fix = &reshape_bb_env_state->part_nrg_prev[ch][0];
  120|  27.2k|      q_part_nrg_fix = &reshape_bb_env_state->q_part_nrg_prev[ch][0];
  121|       |
  122|  27.2k|      norm_nrg_fix = &reshape_bb_env_state->norm_nrg_prev[ch];
  123|  27.2k|      q_norm_nrg_fix = &reshape_bb_env_state->q_norm_nrg_prev[ch];
  124|       |
  125|  27.2k|      p_buffer_real = pstr_mps_state->array_struct->buf_real + ch * TSXHB + 12;
  ------------------
  |  |  106|  27.2k|#define TSXHB (5112)
  ------------------
  126|  27.2k|      p_buffer_imag = pstr_mps_state->array_struct->buf_imag + ch * TSXHB + 12;
  ------------------
  |  |  106|  27.2k|#define TSXHB (5112)
  ------------------
  127|       |
  128|  27.2k|      p_hyb_out_dry_real = pstr_mps_state->array_struct->hyb_output_real_dry + ch * TSXHB + 12;
  ------------------
  |  |  106|  27.2k|#define TSXHB (5112)
  ------------------
  129|  27.2k|      p_hyb_out_dry_imag = pstr_mps_state->array_struct->hyb_output_imag_dry + ch * TSXHB + 12;
  ------------------
  |  |  106|  27.2k|#define TSXHB (5112)
  ------------------
  130|       |
  131|   798k|      for (ts = 0; ts < time_slots; ts++) {
  ------------------
  |  Branch (131:20): [True: 770k, False: 27.2k]
  ------------------
  132|   770k|        WORD32 prev_idx = 10;
  133|       |
  134|   770k|        slot_nrg = slot_nrg_fix + 4;
  135|  4.62M|        for (pb = 14; pb <= end_p; pb++) *slot_nrg++ = 0;
  ------------------
  |  Branch (135:23): [True: 3.85M, False: 770k]
  ------------------
  136|       |
  137|   770k|        slot_nrg = slot_nrg_fix;
  138|       |
  139|   770k|        p_buffer_re = p_buffer_real;
  140|   770k|        p_buffer_im = p_buffer_imag;
  141|       |
  142|   770k|        hyb_output_real_dry = p_hyb_out_dry_real;
  143|   770k|        hyb_output_imag_dry = p_hyb_out_dry_imag;
  144|       |
  145|  3.85M|        for (qs = 12; qs < 16; qs++) {
  ------------------
  |  Branch (145:23): [True: 3.08M, False: 770k]
  ------------------
  146|  3.08M|          temp_1 = ixheaac_add32_sat(*hyb_output_real_dry, *p_buffer_re);
  147|  3.08M|          temp4 = ixheaac_add32_sat(*hyb_output_imag_dry, *p_buffer_im);
  148|       |
  149|  3.08M|          *slot_nrg++ = ixheaac_add64_sat(ixheaac_mult32x32in64(temp_1, temp_1), 
  150|  3.08M|		                ixheaac_mult32x32in64(temp4, temp4));
  151|       |
  152|  3.08M|          p_buffer_re++;
  153|  3.08M|          p_buffer_im++;
  154|  3.08M|          hyb_output_real_dry++;
  155|  3.08M|          hyb_output_imag_dry++;
  156|  3.08M|        }
  157|   770k|        prev_idx = 14;
  158|  11.5M|        for (; qs < 30; qs++) {
  ------------------
  |  Branch (158:16): [True: 10.7M, False: 770k]
  ------------------
  159|  10.7M|          WORD32 idx = bb_env_kernels[qs];
  160|  10.7M|          if (prev_idx != idx) {
  ------------------
  |  Branch (160:15): [True: 2.31M, False: 8.47M]
  ------------------
  161|  2.31M|            slot_nrg++;
  162|  2.31M|            prev_idx = idx;
  163|  2.31M|          }
  164|  10.7M|          temp_1 = ixheaac_add32_sat(*hyb_output_real_dry, *p_buffer_re);
  165|  10.7M|          temp4 = ixheaac_add32_sat(*hyb_output_imag_dry, *p_buffer_im);
  166|       |
  167|  10.7M|		  *slot_nrg = ixheaac_add64_sat(*slot_nrg, ixheaac_mult32x32in64(temp_1, temp_1));
  168|  10.7M|		  *slot_nrg = ixheaac_add64_sat(*slot_nrg, ixheaac_mult32x32in64(temp4, temp4));
  169|       |
  170|  10.7M|          p_buffer_re++;
  171|  10.7M|          p_buffer_im++;
  172|  10.7M|          hyb_output_real_dry++;
  173|  10.7M|          hyb_output_imag_dry++;
  174|  10.7M|        }
  175|   770k|        slot_nrg++;
  176|  9.82M|        for (; qs < cnt; qs++) {
  ------------------
  |  Branch (176:16): [True: 9.05M, False: 770k]
  ------------------
  177|  9.05M|          temp_1 = ixheaac_add32_sat(*hyb_output_real_dry, *p_buffer_re);
  178|  9.05M|          temp4 = ixheaac_add32_sat(*hyb_output_imag_dry, *p_buffer_im);
  179|       |
  180|  9.05M|		  *slot_nrg = ixheaac_add64_sat(*slot_nrg, ixheaac_mult32x32in64(temp_1, temp_1));
  181|  9.05M|		  *slot_nrg = ixheaac_add64_sat(*slot_nrg, ixheaac_mult32x32in64(temp4, temp4));
  182|       |
  183|  9.05M|          p_buffer_re++;
  184|  9.05M|          p_buffer_im++;
  185|  9.05M|          hyb_output_real_dry++;
  186|  9.05M|          hyb_output_imag_dry++;
  187|  9.05M|        }
  188|       |
  189|   770k|        slot_nrg = slot_nrg_fix;
  190|   770k|        q_slot_nrg = q_slot_nrg_fix;
  191|       |
  192|   770k|        frame_nrg_fix = 0;
  193|   770k|        q_frame_nrg_fix = 30;
  194|  7.70M|        for (pb = start_p; pb <= end_p; pb++) {
  ------------------
  |  Branch (194:28): [True: 6.93M, False: 770k]
  ------------------
  195|  6.93M|          *n_slot_nrg = ixheaacd_mps_narrow(*slot_nrg, q_slot_nrg);
  196|  6.93M|          slot_nrg++;
  197|  6.93M|          temp_1 = ixheaac_mult32x16in32(*n_slot_nrg, one_min_alpha_fix);
  198|  6.93M|          temp4 = ixheaac_mult32x16in32((part_nrg_fix[pb]) << 1, alpha_fix);
  199|  6.93M|          part_nrg_fix[pb] =
  200|  6.93M|              ixheaacd_mps_reshape_add32(temp4, temp_1, &q_part_nrg_fix[pb], *q_slot_nrg);
  201|       |
  202|  6.93M|          frame_nrg_fix = ixheaacd_mps_reshape_add32(frame_nrg_fix, *n_slot_nrg++,
  203|  6.93M|                                                     &q_frame_nrg_fix, *q_slot_nrg++);
  204|  6.93M|        }
  205|       |
  206|   770k|        frame_nrg_fix = ixheaac_mult32x16in32(frame_nrg_fix, one_by_nine);
  207|       |
  208|   770k|        temp_1 = ixheaac_mult32x16in32(frame_nrg_fix, one_min_alpha_fix);
  209|   770k|        temp4 = ixheaac_mult32x16in32((frame_nrg_prev) << 1, alpha_fix);
  210|   770k|        frame_nrg_fix =
  211|   770k|            ixheaacd_mps_reshape_add32(temp_1, temp4, &q_frame_nrg_fix, q_frame_nrg_prev);
  212|       |
  213|   770k|        frame_nrg_prev = frame_nrg_fix;
  214|   770k|        q_frame_nrg_prev = q_frame_nrg_fix;
  215|       |
  216|   770k|        env_fix_l = 0;
  217|   770k|        q_env_fix_l = 30;
  218|   770k|        q_slot_nrg = q_slot_nrg_fix;
  219|       |
  220|   770k|        n_slot_nrg -= PB_OFFSET;
  ------------------
  |  |  114|   770k|#define PB_OFFSET (9)
  ------------------
  221|  7.70M|        for (pb = start_p; pb <= end_p; pb++) {
  ------------------
  |  Branch (221:28): [True: 6.93M, False: 770k]
  ------------------
  222|  6.93M|          temp_1 = ixheaacd_mps_div_32(*n_slot_nrg++, part_nrg_fix[pb], &qtemp1);
  223|  6.93M|          qtemp1 = *q_slot_nrg++ + qtemp1 - q_part_nrg_fix[pb];
  224|  6.93M|          env_fix_l = ixheaacd_mps_reshape_add32(env_fix_l, temp_1, &q_env_fix_l, qtemp1);
  225|  6.93M|        }
  226|   770k|        n_slot_nrg -= PB_OFFSET;
  ------------------
  |  |  114|   770k|#define PB_OFFSET (9)
  ------------------
  227|       |
  228|   770k|        env_fix_l =
  229|   770k|            ixheaacd_mps_mult32x32(env_fix_l, frame_nrg_fix, &q_env_fix_l, q_frame_nrg_fix);
  230|       |
  231|   770k|        temp_1 = ixheaac_mult32x16in32(env_fix_l, one_min_beta_fix);
  232|   770k|        temp4 = ixheaac_mult32x16in32((*norm_nrg_fix) << 1, beta_fix);
  233|   770k|        *norm_nrg_fix = ixheaacd_mps_reshape_add32(temp4, temp_1, q_norm_nrg_fix, q_env_fix_l);
  234|       |
  235|   770k|        if (flag) {
  ------------------
  |  Branch (235:13): [True: 26.1k, False: 744k]
  ------------------
  236|  26.1k|          temp_1 = ixheaacd_mps_div_32(env_fix_l, *norm_nrg_fix, &qtemp1);
  237|  26.1k|          q_env = q_env_fix_l + qtemp1 - *q_norm_nrg_fix;
  238|  26.1k|          env[ts] = ixheaacd_mps_sqrt(temp_1, &(q_env), sqrt_tab);
  239|  26.1k|          env[ts] = ixheaacd_mps_convert_to_qn(env[ts], q_env, 15);
  240|  26.1k|        }
  241|       |
  242|   770k|        p_buffer_real += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|   770k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|   770k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  243|   770k|        p_buffer_imag += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|   770k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|   770k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  244|       |
  245|   770k|        p_hyb_out_dry_real += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|   770k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|   770k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  246|   770k|        p_hyb_out_dry_imag += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|   770k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|   770k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  247|   770k|      }
  248|  27.2k|      reshape_bb_env_state->frame_nrg_prev[ch] = frame_nrg_prev;
  249|  27.2k|      reshape_bb_env_state->q_frame_nrg_prev[ch] = q_frame_nrg_prev;
  250|       |
  251|  27.2k|      break;
  252|  13.1k|    case INP_DMX:
  ------------------
  |  |   24|  13.1k|#define INP_DMX (1)
  ------------------
  |  Branch (252:5): [True: 13.1k, False: 27.2k]
  ------------------
  253|  13.1k|      prev_ch_offs = ch + pstr_mps_state->num_output_channels;
  254|       |
  255|  13.1k|      frame_nrg_prev = reshape_bb_env_state->frame_nrg_prev[prev_ch_offs];
  256|  13.1k|      q_frame_nrg_prev = reshape_bb_env_state->q_frame_nrg_prev[prev_ch_offs];
  257|       |
  258|  13.1k|      part_nrg_fix = &reshape_bb_env_state->part_nrg_prev[prev_ch_offs][0];
  259|  13.1k|      q_part_nrg_fix = &reshape_bb_env_state->q_part_nrg_prev[prev_ch_offs][0];
  260|       |
  261|  13.1k|      norm_nrg_fix = &reshape_bb_env_state->norm_nrg_prev[prev_ch_offs];
  262|  13.1k|      q_norm_nrg_fix = &reshape_bb_env_state->q_norm_nrg_prev[prev_ch_offs];
  263|       |
  264|  13.1k|      p_buffer_real = pstr_mps_state->array_struct->x_real + ch * TSXHB + 12;
  ------------------
  |  |  106|  13.1k|#define TSXHB (5112)
  ------------------
  265|  13.1k|      p_buffer_imag = pstr_mps_state->array_struct->x_imag + ch * TSXHB + 12;
  ------------------
  |  |  106|  13.1k|#define TSXHB (5112)
  ------------------
  266|   387k|      for (ts = 0; ts < time_slots; ts++) {
  ------------------
  |  Branch (266:20): [True: 373k, False: 13.1k]
  ------------------
  267|   373k|        WORD32 prev_idx;
  268|       |
  269|   373k|        slot_nrg = slot_nrg_fix + 4;
  270|  2.24M|        for (pb = 14; pb <= end_p; pb++) *slot_nrg++ = 0;
  ------------------
  |  Branch (270:23): [True: 1.86M, False: 373k]
  ------------------
  271|       |
  272|   373k|        slot_nrg = slot_nrg_fix;
  273|       |
  274|   373k|        hyb_output_real_dry = p_buffer_real;
  275|   373k|        hyb_output_imag_dry = p_buffer_imag;
  276|       |
  277|  1.86M|        for (qs = 12; qs < 16; qs++) {
  ------------------
  |  Branch (277:23): [True: 1.49M, False: 373k]
  ------------------
  278|  1.49M|          *slot_nrg++ = ixheaac_add64_sat(ixheaac_mult32x32in64(*hyb_output_real_dry, *hyb_output_real_dry), 
  279|  1.49M|		                ixheaac_mult32x32in64(*hyb_output_imag_dry, *hyb_output_imag_dry));
  280|       |
  281|  1.49M|          hyb_output_real_dry++;
  282|  1.49M|          hyb_output_imag_dry++;
  283|  1.49M|        }
  284|   373k|        prev_idx = 14;
  285|  5.60M|        for (; qs < 30; qs++) {
  ------------------
  |  Branch (285:16): [True: 5.23M, False: 373k]
  ------------------
  286|  5.23M|          WORD32 idx = bb_env_kernels[qs];
  287|  5.23M|          if (prev_idx != idx) {
  ------------------
  |  Branch (287:15): [True: 1.12M, False: 4.11M]
  ------------------
  288|  1.12M|            slot_nrg++;
  289|  1.12M|            prev_idx = idx;
  290|  1.12M|          }
  291|       |
  292|  5.23M|		  *slot_nrg = ixheaac_add64_sat(*slot_nrg, ixheaac_mult32x32in64(*hyb_output_real_dry, *hyb_output_real_dry));
  293|  5.23M|		  *slot_nrg = ixheaac_add64_sat(*slot_nrg, ixheaac_mult32x32in64(*hyb_output_imag_dry, *hyb_output_imag_dry));
  294|       |
  295|  5.23M|          hyb_output_real_dry++;
  296|  5.23M|          hyb_output_imag_dry++;
  297|  5.23M|        }
  298|   373k|        slot_nrg++;
  299|  4.79M|        for (; qs < cnt; qs++) {
  ------------------
  |  Branch (299:16): [True: 4.42M, False: 373k]
  ------------------
  300|  4.42M|		  *slot_nrg = ixheaac_add64_sat(*slot_nrg, ixheaac_mult32x32in64(*hyb_output_real_dry, *hyb_output_real_dry));
  301|  4.42M|		  *slot_nrg = ixheaac_add64_sat(*slot_nrg, ixheaac_mult32x32in64(*hyb_output_imag_dry, *hyb_output_imag_dry));
  302|       |
  303|  4.42M|          hyb_output_real_dry++;
  304|  4.42M|          hyb_output_imag_dry++;
  305|  4.42M|        }
  306|       |
  307|   373k|        slot_nrg = slot_nrg_fix;
  308|   373k|        q_slot_nrg = q_slot_nrg_fix;
  309|       |
  310|   373k|        frame_nrg_fix = 0;
  311|   373k|        q_frame_nrg_fix = 30;
  312|  3.73M|        for (pb = start_p; pb <= end_p; pb++) {
  ------------------
  |  Branch (312:28): [True: 3.36M, False: 373k]
  ------------------
  313|  3.36M|          *n_slot_nrg = ixheaacd_mps_narrow(*slot_nrg, q_slot_nrg);
  314|  3.36M|          slot_nrg++;
  315|  3.36M|          temp_1 = ixheaac_mult32x16in32(*n_slot_nrg, one_min_alpha_fix);
  316|  3.36M|          temp4 = ixheaac_mult32x16in32((part_nrg_fix[pb]) << 1, alpha_fix);
  317|  3.36M|          part_nrg_fix[pb] =
  318|  3.36M|              ixheaacd_mps_reshape_add32(temp4, temp_1, &q_part_nrg_fix[pb], *q_slot_nrg);
  319|  3.36M|          frame_nrg_fix = ixheaacd_mps_reshape_add32(frame_nrg_fix, *n_slot_nrg++,
  320|  3.36M|                                                     &q_frame_nrg_fix, *q_slot_nrg++);
  321|  3.36M|        }
  322|       |
  323|   373k|        frame_nrg_fix = ixheaac_mult32x16in32(frame_nrg_fix, one_by_nine);
  324|       |
  325|   373k|        temp_1 = ixheaac_mult32x16in32(frame_nrg_fix, one_min_alpha_fix);
  326|   373k|        temp4 = ixheaac_mult32x16in32((frame_nrg_prev) << 1, alpha_fix);
  327|   373k|        frame_nrg_fix =
  328|   373k|            ixheaacd_mps_reshape_add32(temp_1, temp4, &q_frame_nrg_fix, q_frame_nrg_prev);
  329|       |
  330|   373k|        frame_nrg_prev = frame_nrg_fix;
  331|   373k|        q_frame_nrg_prev = q_frame_nrg_fix;
  332|       |
  333|   373k|        env_fix_l = 0;
  334|   373k|        q_env_fix_l = 30;
  335|       |
  336|   373k|        q_slot_nrg = q_slot_nrg_fix;
  337|   373k|        n_slot_nrg -= PB_OFFSET;
  ------------------
  |  |  114|   373k|#define PB_OFFSET (9)
  ------------------
  338|  3.73M|        for (pb = start_p; pb <= end_p; pb++) {
  ------------------
  |  Branch (338:28): [True: 3.36M, False: 373k]
  ------------------
  339|  3.36M|          temp_1 = ixheaacd_mps_div_32(*n_slot_nrg++, part_nrg_fix[pb], &qtemp1);
  340|  3.36M|          qtemp1 = *q_slot_nrg++ + qtemp1 - q_part_nrg_fix[pb];
  341|  3.36M|          env_fix_l = ixheaacd_mps_reshape_add32(env_fix_l, temp_1, &q_env_fix_l, qtemp1);
  342|  3.36M|        }
  343|   373k|        n_slot_nrg -= PB_OFFSET;
  ------------------
  |  |  114|   373k|#define PB_OFFSET (9)
  ------------------
  344|       |
  345|   373k|        env_fix_l =
  346|   373k|            ixheaacd_mps_mult32x32(env_fix_l, frame_nrg_fix, &q_env_fix_l, q_frame_nrg_fix);
  347|       |
  348|   373k|        temp_1 = ixheaac_mult32x16in32(env_fix_l, one_min_beta_fix);
  349|   373k|        temp4 = ixheaac_mult32x16in32((*norm_nrg_fix) << 1, beta_fix);
  350|   373k|        *norm_nrg_fix = ixheaacd_mps_reshape_add32(temp4, temp_1, q_norm_nrg_fix, q_env_fix_l);
  351|       |
  352|   373k|        temp_1 = ixheaacd_mps_div_32(env_fix_l, *norm_nrg_fix, &qtemp1);
  353|   373k|        q_env = q_env_fix_l + qtemp1 - *q_norm_nrg_fix;
  354|   373k|        env[ts] = ixheaacd_mps_sqrt(temp_1, &(q_env), sqrt_tab);
  355|   373k|        env[ts] = ixheaacd_mps_convert_to_qn(env[ts], q_env, 15);
  356|       |
  357|   373k|        p_buffer_real += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|   373k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|   373k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  358|   373k|        p_buffer_imag += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|   373k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|   373k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  359|   373k|      }
  360|  13.1k|      reshape_bb_env_state->frame_nrg_prev[prev_ch_offs] = frame_nrg_prev;
  361|  13.1k|      reshape_bb_env_state->q_frame_nrg_prev[prev_ch_offs] = q_frame_nrg_prev;
  362|       |
  363|  13.1k|      break;
  364|      0|    default:
  ------------------
  |  Branch (364:5): [True: 0, False: 40.4k]
  ------------------
  365|      0|      break;
  366|  40.4k|  }
  367|  40.4k|  return;
  368|  40.4k|}

ixheaacd_mps_pre_matrix_mix_matrix_smoothing:
   57|  77.4k|    ia_mps_dec_state_struct *self) {
   58|  77.4k|  WORD32 smooth_band;
   59|  77.4k|  FLOAT32 delta, one_minus_delta;
   60|  77.4k|  WORD32 ps = 0, pb, row, col;
   61|  77.4k|  WORD32 res_bands = 0;
   62|  77.4k|  WORD32 *p_smoothing_data;
   63|       |
   64|  77.4k|  if (self->residual_coding) res_bands = self->max_res_bands;
  ------------------
  |  Branch (64:7): [True: 61.9k, False: 15.5k]
  ------------------
   65|       |
   66|  77.4k|  p_smoothing_data = &self->smoothing_data[ps][res_bands];
   67|       |
   68|  77.4k|  delta = self->param_slot_diff[ps] * self->inv_smoothing_time[ps];
   69|  77.4k|  one_minus_delta = 1.0f - delta;
   70|       |
   71|   702k|  for (pb = res_bands; pb < self->bs_param_bands; pb++) {
  ------------------
  |  Branch (71:24): [True: 625k, False: 77.4k]
  ------------------
   72|   625k|    smooth_band = *p_smoothing_data++;
   73|   625k|    if (smooth_band) {
  ------------------
  |  Branch (73:9): [True: 33.6k, False: 591k]
  ------------------
   74|   100k|      for (row = 0; row < MAX_M_OUTPUT; row++) {
  ------------------
  |  |   63|   100k|#define MAX_M_OUTPUT (2)
  ------------------
  |  Branch (74:21): [True: 67.3k, False: 33.6k]
  ------------------
   75|   201k|        for (col = 0; col < MAX_M_INPUT; col++) {
  ------------------
  |  |   62|   201k|#define MAX_M_INPUT (2)
  ------------------
  |  Branch (75:23): [True: 134k, False: 67.3k]
  ------------------
   76|   134k|          self->m1_param_re[ps][pb][row][col] =
   77|   134k|              (MULT(delta, self->m1_param_re[ps][pb][row][col]) +
  ------------------
  |  |   45|   134k|#define MULT(a, b) (a * b)
  ------------------
   78|   134k|               MULT(one_minus_delta, self->m1_param_re_prev[pb][row][col]));
  ------------------
  |  |   45|   134k|#define MULT(a, b) (a * b)
  ------------------
   79|   134k|          self->m1_param_im[ps][pb][row][col] =
   80|   134k|              (MULT(delta, self->m1_param_im[ps][pb][row][col]) +
  ------------------
  |  |   45|   134k|#define MULT(a, b) (a * b)
  ------------------
   81|   134k|               MULT(one_minus_delta, self->m1_param_im_prev[pb][row][col]));
  ------------------
  |  |   45|   134k|#define MULT(a, b) (a * b)
  ------------------
   82|   134k|          self->m2_decor_re[ps][pb][row][col] =
   83|   134k|              (MULT(delta, self->m2_decor_re[ps][pb][row][col]) +
  ------------------
  |  |   45|   134k|#define MULT(a, b) (a * b)
  ------------------
   84|   134k|               MULT(one_minus_delta, self->m2_decor_re_prev[pb][row][col]));
  ------------------
  |  |   45|   134k|#define MULT(a, b) (a * b)
  ------------------
   85|   134k|          self->m2_decor_im[ps][pb][row][col] =
   86|   134k|              (MULT(delta, self->m2_decor_im[ps][pb][row][col]) +
  ------------------
  |  |   45|   134k|#define MULT(a, b) (a * b)
  ------------------
   87|   134k|               MULT(one_minus_delta, self->m2_decor_im_prev[pb][row][col]));
  ------------------
  |  |   45|   134k|#define MULT(a, b) (a * b)
  ------------------
   88|   134k|          self->m2_resid_re[ps][pb][row][col] =
   89|   134k|              (MULT(delta, self->m2_resid_re[ps][pb][row][col]) +
  ------------------
  |  |   45|   134k|#define MULT(a, b) (a * b)
  ------------------
   90|   134k|               MULT(one_minus_delta, self->m2_resid_re_prev[pb][row][col]));
  ------------------
  |  |   45|   134k|#define MULT(a, b) (a * b)
  ------------------
   91|   134k|          self->m2_resid_im[ps][pb][row][col] =
   92|   134k|              (MULT(delta, self->m2_resid_im[ps][pb][row][col]) +
  ------------------
  |  |   45|   134k|#define MULT(a, b) (a * b)
  ------------------
   93|   134k|               MULT(one_minus_delta, self->m2_resid_im_prev[pb][row][col]));
  ------------------
  |  |   45|   134k|#define MULT(a, b) (a * b)
  ------------------
   94|   134k|        }
   95|  67.3k|      }
   96|  33.6k|      self->pre_mix_req++;
   97|  33.6k|    }
   98|   625k|  }
   99|       |
  100|  92.0k|  for (ps = 1; ps < self->num_parameter_sets; ps++) {
  ------------------
  |  Branch (100:16): [True: 14.6k, False: 77.4k]
  ------------------
  101|  14.6k|    delta = self->param_slot_diff[ps] * self->inv_smoothing_time[ps];
  102|  14.6k|    one_minus_delta = 1.0f - delta;
  103|       |
  104|  14.6k|    p_smoothing_data = &self->smoothing_data[ps][res_bands];
  105|       |
  106|   120k|    for (pb = res_bands; pb < self->bs_param_bands; pb++) {
  ------------------
  |  Branch (106:26): [True: 106k, False: 14.6k]
  ------------------
  107|   106k|      smooth_band = *p_smoothing_data++;
  108|   106k|      if (smooth_band) {
  ------------------
  |  Branch (108:11): [True: 16.9k, False: 89.3k]
  ------------------
  109|  50.9k|        for (row = 0; row < MAX_M_OUTPUT; row++) {
  ------------------
  |  |   63|  50.9k|#define MAX_M_OUTPUT (2)
  ------------------
  |  Branch (109:23): [True: 33.9k, False: 16.9k]
  ------------------
  110|   101k|          for (col = 0; col < MAX_M_INPUT; col++) {
  ------------------
  |  |   62|   101k|#define MAX_M_INPUT (2)
  ------------------
  |  Branch (110:25): [True: 67.9k, False: 33.9k]
  ------------------
  111|  67.9k|            self->m1_param_re[ps][pb][row][col] =
  112|  67.9k|                (MULT(delta, self->m1_param_re[ps][pb][row][col]) +
  ------------------
  |  |   45|  67.9k|#define MULT(a, b) (a * b)
  ------------------
  113|  67.9k|                 MULT(one_minus_delta,
  ------------------
  |  |   45|  67.9k|#define MULT(a, b) (a * b)
  ------------------
  114|  67.9k|                      self->m1_param_re[ps - 1][pb][row][col]));
  115|  67.9k|            self->m1_param_im[ps][pb][row][col] =
  116|  67.9k|                (MULT(delta, self->m1_param_im[ps][pb][row][col]) +
  ------------------
  |  |   45|  67.9k|#define MULT(a, b) (a * b)
  ------------------
  117|  67.9k|                 MULT(one_minus_delta,
  ------------------
  |  |   45|  67.9k|#define MULT(a, b) (a * b)
  ------------------
  118|  67.9k|                      self->m1_param_im[ps - 1][pb][row][col]));
  119|  67.9k|            self->m2_resid_re[ps][pb][row][col] =
  120|  67.9k|                (MULT(delta, self->m2_resid_re[ps][pb][row][col]) +
  ------------------
  |  |   45|  67.9k|#define MULT(a, b) (a * b)
  ------------------
  121|  67.9k|                 MULT(one_minus_delta,
  ------------------
  |  |   45|  67.9k|#define MULT(a, b) (a * b)
  ------------------
  122|  67.9k|                      self->m2_resid_re[ps - 1][pb][row][col]));
  123|  67.9k|            self->m2_decor_re[ps][pb][row][col] =
  124|  67.9k|                (MULT(delta, self->m2_decor_re[ps][pb][row][col]) +
  ------------------
  |  |   45|  67.9k|#define MULT(a, b) (a * b)
  ------------------
  125|  67.9k|                 MULT(one_minus_delta,
  ------------------
  |  |   45|  67.9k|#define MULT(a, b) (a * b)
  ------------------
  126|  67.9k|                      self->m2_decor_re[ps - 1][pb][row][col]));
  127|  67.9k|            self->m2_decor_im[ps][pb][row][col] =
  128|  67.9k|                (MULT(delta, self->m2_decor_im[ps][pb][row][col]) +
  ------------------
  |  |   45|  67.9k|#define MULT(a, b) (a * b)
  ------------------
  129|  67.9k|                 MULT(one_minus_delta,
  ------------------
  |  |   45|  67.9k|#define MULT(a, b) (a * b)
  ------------------
  130|  67.9k|                      self->m2_decor_im[ps - 1][pb][row][col]));
  131|  67.9k|            self->m2_resid_im[ps][pb][row][col] =
  132|  67.9k|                (MULT(delta, self->m2_resid_im[ps][pb][row][col]) +
  ------------------
  |  |   45|  67.9k|#define MULT(a, b) (a * b)
  ------------------
  133|  67.9k|                 MULT(one_minus_delta,
  ------------------
  |  |   45|  67.9k|#define MULT(a, b) (a * b)
  ------------------
  134|  67.9k|                      self->m2_resid_im[ps - 1][pb][row][col]));
  135|  67.9k|          }
  136|  33.9k|        }
  137|  16.9k|        self->pre_mix_req++;
  138|  16.9k|      }
  139|   106k|    }
  140|  14.6k|  }
  141|  77.4k|}
ixheaacd_mps_smoothing_opd:
  143|  77.4k|VOID ixheaacd_mps_smoothing_opd(ia_mps_dec_state_struct *self) {
  144|  77.4k|  WORD32 ps, pb;
  145|  77.4k|  WORD32 delta, one_minus_delta;
  146|       |
  147|  77.4k|  if (self->opd_smoothing_mode == 0) {
  ------------------
  |  Branch (147:7): [True: 75.3k, False: 2.14k]
  ------------------
  148|  1.04M|    for (pb = 0; pb < self->bs_param_bands; pb++) {
  ------------------
  |  Branch (148:18): [True: 974k, False: 75.3k]
  ------------------
  149|   974k|      self->opd_smooth.smooth_l_phase[pb] =
  150|   974k|          ((WORD32)(self->phase_l[self->num_parameter_sets - 1][pb] *
  151|   974k|                    Q28_VALUE)) >>
  ------------------
  |  |   52|   974k|#define Q28_VALUE (1 << 28)
  ------------------
  152|   974k|          1;
  153|   974k|      self->opd_smooth.smooth_r_phase[pb] =
  154|   974k|          ((WORD32)(self->phase_r[self->num_parameter_sets - 1][pb] *
  155|   974k|                    Q28_VALUE)) >>
  ------------------
  |  |   52|   974k|#define Q28_VALUE (1 << 28)
  ------------------
  156|   974k|          1;
  157|   974k|    }
  158|  75.3k|    return;
  159|  75.3k|  }
  160|  6.65k|  for (ps = 0; ps < self->num_parameter_sets; ps++) {
  ------------------
  |  Branch (160:16): [True: 4.50k, False: 2.14k]
  ------------------
  161|  4.50k|    WORD32 thr = self->bs_frame.ipd_data.bs_quant_coarse_xxx[ps]
  ------------------
  |  Branch (161:18): [True: 1.69k, False: 2.81k]
  ------------------
  162|  4.50k|                  ? FIFTY_X_PI_BY_180_Q27
  ------------------
  |  |   50|  1.69k|#define FIFTY_X_PI_BY_180_Q27 (117127067)
  ------------------
  163|  4.50k|                  : TWENTY_FIVE_X_PI_BY_180_Q27;
  ------------------
  |  |   51|  2.81k|#define TWENTY_FIVE_X_PI_BY_180_Q27 (58563533)
  ------------------
  164|       |
  165|  4.50k|    delta = self->param_slot_diff[ps] * ONE_BY_128_IN_Q30;
  ------------------
  |  |   47|  4.50k|#define ONE_BY_128_IN_Q30 (8388608)
  ------------------
  166|  4.50k|    one_minus_delta = ONE_IN_Q30 - delta;
  ------------------
  |  |   48|  4.50k|#define ONE_IN_Q30 (1073741824)
  ------------------
  167|       |
  168|  77.2k|    for (pb = 0; pb < self->bs_param_bands; pb++) {
  ------------------
  |  Branch (168:18): [True: 72.7k, False: 4.50k]
  ------------------
  169|  72.7k|      WORD32 ltemp, rtemp, tmp;
  170|  72.7k|      ltemp = ((WORD32)(self->phase_l[ps][pb] * Q28_FLOAT_VAL)) >> 1;
  ------------------
  |  |   53|  72.7k|#define Q28_FLOAT_VAL ((FLOAT32)(1 << 28))
  ------------------
  171|  72.7k|      rtemp = ((WORD32)(self->phase_r[ps][pb] * Q28_FLOAT_VAL)) >> 1;
  ------------------
  |  |   53|  72.7k|#define Q28_FLOAT_VAL ((FLOAT32)(1 << 28))
  ------------------
  172|       |
  173|  75.2k|      while (ltemp > self->opd_smooth.smooth_l_phase[pb] + PI_IN_Q27)
  ------------------
  |  |   49|  75.2k|#define PI_IN_Q27 (421657440)
  ------------------
  |  Branch (173:14): [True: 2.45k, False: 72.7k]
  ------------------
  174|  2.45k|        ltemp -= 2 * PI_IN_Q27;
  ------------------
  |  |   49|  2.45k|#define PI_IN_Q27 (421657440)
  ------------------
  175|  75.4k|      while (ltemp < self->opd_smooth.smooth_l_phase[pb] - PI_IN_Q27)
  ------------------
  |  |   49|  75.4k|#define PI_IN_Q27 (421657440)
  ------------------
  |  Branch (175:14): [True: 2.67k, False: 72.7k]
  ------------------
  176|  2.67k|        ltemp += 2 * PI_IN_Q27;
  ------------------
  |  |   49|  2.67k|#define PI_IN_Q27 (421657440)
  ------------------
  177|  74.5k|      while (rtemp > self->opd_smooth.smooth_r_phase[pb] + PI_IN_Q27)
  ------------------
  |  |   49|  74.5k|#define PI_IN_Q27 (421657440)
  ------------------
  |  Branch (177:14): [True: 1.78k, False: 72.7k]
  ------------------
  178|  1.78k|        rtemp -= 2 * PI_IN_Q27;
  ------------------
  |  |   49|  1.78k|#define PI_IN_Q27 (421657440)
  ------------------
  179|  74.6k|      while (rtemp < self->opd_smooth.smooth_r_phase[pb] - PI_IN_Q27)
  ------------------
  |  |   49|  74.6k|#define PI_IN_Q27 (421657440)
  ------------------
  |  Branch (179:14): [True: 1.89k, False: 72.7k]
  ------------------
  180|  1.89k|        rtemp += 2 * PI_IN_Q27;
  ------------------
  |  |   49|  1.89k|#define PI_IN_Q27 (421657440)
  ------------------
  181|       |
  182|  72.7k|      self->opd_smooth.smooth_l_phase[pb] =
  183|  72.7k|          (ixheaac_mult32_shl(delta, ltemp) +
  184|  72.7k|           ixheaac_mult32_shl(one_minus_delta,
  185|  72.7k|                               self->opd_smooth.smooth_l_phase[pb]))
  186|  72.7k|          << 1;
  187|  72.7k|      self->opd_smooth.smooth_r_phase[pb] =
  188|  72.7k|          (ixheaac_mult32_shl(delta, rtemp) +
  189|  72.7k|           ixheaac_mult32_shl(one_minus_delta,
  190|  72.7k|                               self->opd_smooth.smooth_r_phase[pb]))
  191|  72.7k|          << 1;
  192|       |
  193|  72.7k|      tmp = (ltemp - rtemp) - (self->opd_smooth.smooth_l_phase[pb] -
  194|  72.7k|                               self->opd_smooth.smooth_r_phase[pb]);
  195|  72.8k|      while (tmp > PI_IN_Q27) tmp -= 2 * PI_IN_Q27;
  ------------------
  |  |   49|  72.8k|#define PI_IN_Q27 (421657440)
  ------------------
                    while (tmp > PI_IN_Q27) tmp -= 2 * PI_IN_Q27;
  ------------------
  |  |   49|     44|#define PI_IN_Q27 (421657440)
  ------------------
  |  Branch (195:14): [True: 44, False: 72.7k]
  ------------------
  196|  73.0k|      while (tmp < -PI_IN_Q27) tmp += 2 * PI_IN_Q27;
  ------------------
  |  |   49|  73.0k|#define PI_IN_Q27 (421657440)
  ------------------
                    while (tmp < -PI_IN_Q27) tmp += 2 * PI_IN_Q27;
  ------------------
  |  |   49|    223|#define PI_IN_Q27 (421657440)
  ------------------
  |  Branch (196:14): [True: 223, False: 72.7k]
  ------------------
  197|       |
  198|  72.7k|      if (ixheaac_abs32(tmp) > thr) {
  ------------------
  |  Branch (198:11): [True: 5.15k, False: 67.6k]
  ------------------
  199|  5.15k|        self->opd_smooth.smooth_l_phase[pb] = ltemp;
  200|  5.15k|        self->opd_smooth.smooth_r_phase[pb] = rtemp;
  201|  5.15k|      }
  202|       |
  203|  73.3k|      while (self->opd_smooth.smooth_l_phase[pb] > 2 * PI_IN_Q27)
  ------------------
  |  |   49|  73.3k|#define PI_IN_Q27 (421657440)
  ------------------
  |  Branch (203:14): [True: 616, False: 72.7k]
  ------------------
  204|    616|        self->opd_smooth.smooth_l_phase[pb] -= 2 * PI_IN_Q27;
  ------------------
  |  |   49|    616|#define PI_IN_Q27 (421657440)
  ------------------
  205|  75.1k|      while (self->opd_smooth.smooth_l_phase[pb] < 0)
  ------------------
  |  Branch (205:14): [True: 2.36k, False: 72.7k]
  ------------------
  206|  2.36k|        self->opd_smooth.smooth_l_phase[pb] += 2 * PI_IN_Q27;
  ------------------
  |  |   49|  2.36k|#define PI_IN_Q27 (421657440)
  ------------------
  207|  73.5k|      while (self->opd_smooth.smooth_r_phase[pb] > 2 * PI_IN_Q27)
  ------------------
  |  |   49|  73.5k|#define PI_IN_Q27 (421657440)
  ------------------
  |  Branch (207:14): [True: 812, False: 72.7k]
  ------------------
  208|    812|        self->opd_smooth.smooth_r_phase[pb] -= 2 * PI_IN_Q27;
  ------------------
  |  |   49|    812|#define PI_IN_Q27 (421657440)
  ------------------
  209|  74.3k|      while (self->opd_smooth.smooth_r_phase[pb] < 0)
  ------------------
  |  Branch (209:14): [True: 1.56k, False: 72.7k]
  ------------------
  210|  1.56k|        self->opd_smooth.smooth_r_phase[pb] += 2 * PI_IN_Q27;
  ------------------
  |  |   49|  1.56k|#define PI_IN_Q27 (421657440)
  ------------------
  211|       |
  212|  72.7k|      self->phase_l[ps][pb] =
  213|  72.7k|          (self->opd_smooth.smooth_l_phase[pb] << 1) * ONE_BY_Q28_FLOAT_VAL;
  ------------------
  |  |   54|  72.7k|#define ONE_BY_Q28_FLOAT_VAL (1.0f / Q28_FLOAT_VAL)
  |  |  ------------------
  |  |  |  |   53|  72.7k|#define Q28_FLOAT_VAL ((FLOAT32)(1 << 28))
  |  |  ------------------
  ------------------
  214|  72.7k|      self->phase_r[ps][pb] =
  215|  72.7k|          (self->opd_smooth.smooth_r_phase[pb] << 1) * ONE_BY_Q28_FLOAT_VAL;
  ------------------
  |  |   54|  72.7k|#define ONE_BY_Q28_FLOAT_VAL (1.0f / Q28_FLOAT_VAL)
  |  |  ------------------
  |  |  |  |   53|  72.7k|#define Q28_FLOAT_VAL ((FLOAT32)(1 << 28))
  |  |  ------------------
  ------------------
  216|  72.7k|    }
  217|  4.50k|  }
  218|  2.14k|}
ixheaacd_smooth_m1m2:
  255|  13.1k|VOID ixheaacd_smooth_m1m2(ia_heaac_mps_state_struct *pstr_mps_state) {
  256|  13.1k|  ia_heaac_mps_state_struct *curr_state = pstr_mps_state;
  257|  13.1k|  ia_mps_persistent_mem *persistent_mem = &curr_state->mps_persistent_mem;
  258|  13.1k|  ia_mps_dec_auxilary_struct *p_aux_struct = pstr_mps_state->aux_struct;
  259|  13.1k|  ia_mps_dec_m2_param_struct *m2_param = p_aux_struct->m2_param;
  260|  13.1k|  ia_mps_dec_m1_param_struct *m1_param = pstr_mps_state->array_struct->m1_param;
  261|  13.1k|  WORD32 *m1_param_real_prev = persistent_mem->m1_param_real_prev;
  262|  13.1k|  WORD32 *m2_decor_real_prev = persistent_mem->m2_decor_real_prev;
  263|  13.1k|  WORD32 *m2_resid_real_prev = persistent_mem->m2_resid_real_prev;
  264|       |
  265|  13.1k|  WORD32 num_parameter_bands = curr_state->num_parameter_bands;
  266|  13.1k|  WORD32 num_direct_signals = curr_state->num_direct_signals;
  267|  13.1k|  WORD32 num_decor_signals = curr_state->num_decor_signals;
  268|  13.1k|  WORD32 m1_param_imag_present = curr_state->m1_param_imag_present;
  269|  13.1k|  WORD32 m2_param_imag_present = curr_state->m2_param_imag_present;
  270|  13.1k|  WORD32 col_counter = num_direct_signals + num_decor_signals;
  271|  13.1k|  WORD32 num_parameter_sets = curr_state->num_parameter_sets;
  272|  13.1k|  WORD32 num_output_channels = curr_state->num_output_channels;
  273|  13.1k|  WORD32 num_v_channels = curr_state->num_v_channels;
  274|  13.1k|  WORD32 num_x_channels = curr_state->num_x_channels;
  275|  13.1k|  WORD32 smooth_control = curr_state->smooth_control;
  276|  13.1k|  WORD32 smooth_config = curr_state->smooth_config;
  277|  13.1k|  WORD32 resid_col_counter;
  278|  13.1k|  WORD32 smooth_band_arr[MAX_PARAMETER_SETS][MAX_PARAMETER_BANDS];
  279|       |
  280|  13.1k|  WORD32 *delta, *one_minus_delta, *delta_ptr, *one_minus_delta_ptr;
  281|  13.1k|  WORD32 *param_r, *param_i, *param_prev_r, *param_prev_i;
  282|       |
  283|  13.1k|  WORD32 *ton;
  284|  13.1k|  WORD32 i, ps, pb, row, col;
  285|  13.1k|  WORD32 res_bands = 0;
  286|  13.1k|  WORD32 idx = 0;
  287|       |
  288|  13.1k|  WORD32 *m2_decor_imag_prev = persistent_mem->m2_decor_imag_prev;
  289|  13.1k|  WORD32 *m2_resid_imag_prev = persistent_mem->m2_resid_imag_prev;
  290|  13.1k|  WORD32 *m1_param_imag_prev = persistent_mem->m1_param_imag_prev;
  291|       |
  292|  13.1k|  ton = pstr_mps_state->mps_scratch_mem_v;
  293|  13.1k|  delta = delta_ptr =
  294|  13.1k|      ton + IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_BANDS, sizeof(*delta), BYTE_ALIGN_8);
  ------------------
  |  |   89|  13.1k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  295|  13.1k|  one_minus_delta = one_minus_delta_ptr =
  296|  13.1k|      delta +
  297|  13.1k|      IXHEAAC_GET_SIZE_ALIGNED_TYPE(MAX_PARAMETER_SETS, sizeof(*one_minus_delta), BYTE_ALIGN_8);
  ------------------
  |  |   89|  13.1k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  298|       |
  299|  13.1k|  param_r = curr_state->res_bands;
  300|  13.1k|  if (curr_state->residual_coding) {
  ------------------
  |  Branch (300:7): [True: 372, False: 12.7k]
  ------------------
  301|  4.09k|    for (i = 0; i < MAX_RESIDUAL_CHANNELS_MPS; i++) {
  ------------------
  |  |   68|  4.09k|#define MAX_RESIDUAL_CHANNELS_MPS (10)
  ------------------
  |  Branch (301:17): [True: 3.72k, False: 372]
  ------------------
  302|  3.72k|      if (param_r[i] > res_bands) {
  ------------------
  |  Branch (302:11): [True: 414, False: 3.30k]
  ------------------
  303|    414|        res_bands = param_r[i];
  304|    414|      }
  305|  3.72k|    }
  306|    372|  }
  307|       |
  308|  13.1k|  if (curr_state->arbitrary_downmix == 2) {
  ------------------
  |  Branch (308:7): [True: 139, False: 12.9k]
  ------------------
  309|    139|    if (res_bands < curr_state->arbdmx_residual_bands) {
  ------------------
  |  Branch (309:9): [True: 123, False: 16]
  ------------------
  310|    123|      res_bands = curr_state->arbdmx_residual_bands;
  311|    123|    }
  312|    139|  }
  313|       |
  314|  13.1k|  if (smooth_config) {
  ------------------
  |  Branch (314:7): [True: 0, False: 13.1k]
  ------------------
  315|      0|    ixheaacd_measure_tonality(pstr_mps_state, ton);
  316|      0|  }
  317|       |
  318|  37.2k|  for (ps = 0; ps < num_parameter_sets; ps++) {
  ------------------
  |  Branch (318:16): [True: 24.0k, False: 13.1k]
  ------------------
  319|  24.0k|    ixheaacd_calc_filter_coeff(pstr_mps_state, ps, delta);
  320|  24.0k|    *one_minus_delta++ = (1 << 15) - *delta++;
  321|  24.0k|  }
  322|       |
  323|  13.1k|  if (smooth_control) {
  ------------------
  |  Branch (323:7): [True: 13.1k, False: 0]
  ------------------
  324|  37.2k|    for (ps = 0; ps < num_parameter_sets; ps++) {
  ------------------
  |  Branch (324:18): [True: 24.0k, False: 13.1k]
  ------------------
  325|  24.0k|      if (ps < 8) {
  ------------------
  |  Branch (325:11): [True: 24.0k, False: 0]
  ------------------
  326|   445k|        for (pb = 0; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (326:22): [True: 421k, False: 24.0k]
  ------------------
  327|   421k|          smooth_band_arr[ps][pb] = pstr_mps_state->aux_struct->smg_data[ps][pb];
  328|   421k|        }
  329|  24.0k|      }
  330|  24.0k|    }
  331|  13.1k|  } else if (smooth_config) {
  ------------------
  |  Branch (331:14): [True: 0, False: 0]
  ------------------
  332|      0|    for (ps = 0; ps < num_parameter_sets; ps++) {
  ------------------
  |  Branch (332:18): [True: 0, False: 0]
  ------------------
  333|      0|      for (pb = 0; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (333:20): [True: 0, False: 0]
  ------------------
  334|      0|        smooth_band_arr[ps][pb] = (ton[pb] > POINT_EIGHT_Q15);
  ------------------
  |  |   62|      0|#define POINT_EIGHT_Q15 (26214)
  ------------------
  335|      0|      }
  336|      0|    }
  337|      0|  }
  338|       |
  339|  13.1k|  if (!(smooth_control == 0 && smooth_config == 0)) {
  ------------------
  |  Branch (339:9): [True: 0, False: 13.1k]
  |  Branch (339:32): [True: 0, False: 0]
  ------------------
  340|  13.1k|    if (m1_param_imag_present) {
  ------------------
  |  Branch (340:9): [True: 9.82k, False: 3.29k]
  ------------------
  341|  9.82k|      WORD32 *ptr_r1 = &m1_param->m1_param_real[0][0][0][0];
  342|  9.82k|      WORD32 *ptr_i1 = &m1_param->m1_param_imag[0][0][0][0];
  343|  87.2k|      for (row = 0; row < num_v_channels; row++) {
  ------------------
  |  Branch (343:21): [True: 77.4k, False: 9.82k]
  ------------------
  344|  77.4k|        WORD32 *ptr_r2 = ptr_r1;
  345|  77.4k|        WORD32 *ptr_i2 = ptr_i1;
  346|   521k|        for (col = 0; col < num_x_channels; col++) {
  ------------------
  |  Branch (346:23): [True: 444k, False: 77.4k]
  ------------------
  347|   444k|          param_r = ptr_r2;
  348|   444k|          param_i = ptr_i2;
  349|   444k|          m1_param_real_prev += res_bands;
  350|   444k|          m1_param_imag_prev += res_bands;
  351|       |
  352|  9.16M|          for (pb = res_bands; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (352:32): [True: 8.71M, False: 444k]
  ------------------
  353|  8.71M|            if (smooth_band_arr[0][pb]) {
  ------------------
  |  Branch (353:17): [True: 3.43M, False: 5.28M]
  ------------------
  354|  3.43M|              WORD64 acc;
  355|       |
  356|  3.43M|              acc = (WORD64)((WORD64)param_r[pb] * (WORD64)(*delta_ptr) +
  357|  3.43M|                             (WORD64)(*m1_param_real_prev) *
  358|  3.43M|                                 (WORD64)(*one_minus_delta_ptr));
  359|       |
  360|  3.43M|              acc >>= 15;
  361|       |
  362|  3.43M|              param_r[pb] = (WORD32)acc;
  363|       |
  364|  3.43M|              acc = (WORD64)((WORD64)param_i[pb] * (WORD64)(*delta_ptr) +
  365|  3.43M|                             (WORD64)(*m1_param_imag_prev) *
  366|  3.43M|                                 (WORD64)(*one_minus_delta_ptr));
  367|       |
  368|  3.43M|              acc >>= 15;
  369|       |
  370|  3.43M|              param_i[pb] = (WORD32)acc;
  371|  3.43M|            }
  372|  8.71M|            m1_param_real_prev++;
  373|  8.71M|            m1_param_imag_prev++;
  374|  8.71M|          }
  375|   444k|          param_r += MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|   444k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  376|   444k|          param_i += MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|   444k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  377|       |
  378|   729k|          for (ps = 1; ps < num_parameter_sets; ps++) {
  ------------------
  |  Branch (378:24): [True: 285k, False: 444k]
  ------------------
  379|   285k|            WORD32 del = delta_ptr[ps];
  380|   285k|            WORD32 one_minus_del = one_minus_delta_ptr[ps];
  381|       |
  382|   285k|            param_prev_r = param_r - MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|   285k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  383|   285k|            param_prev_i = param_i - MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|   285k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  384|       |
  385|  5.77M|            for (pb = res_bands; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (385:34): [True: 5.48M, False: 285k]
  ------------------
  386|  5.48M|              if (smooth_band_arr[ps][pb]) {
  ------------------
  |  Branch (386:19): [True: 2.02M, False: 3.46M]
  ------------------
  387|  2.02M|                WORD64 acc;
  388|       |
  389|  2.02M|                acc = (WORD64)((WORD64)param_r[pb] * (WORD64)(del) +
  390|  2.02M|                               (WORD64)param_prev_r[pb] *
  391|  2.02M|                                   (WORD64)(one_minus_del));
  392|       |
  393|  2.02M|                acc >>= 15;
  394|       |
  395|  2.02M|                param_r[pb] = (WORD32)acc;
  396|       |
  397|  2.02M|                acc = (WORD64)((WORD64)param_i[pb] * (WORD64)(del) +
  398|  2.02M|                               (WORD64)param_prev_i[pb] *
  399|  2.02M|                                   (WORD64)(one_minus_del));
  400|       |
  401|  2.02M|                acc >>= 15;
  402|       |
  403|  2.02M|                param_i[pb] = (WORD32)acc;
  404|  2.02M|              }
  405|  5.48M|            }
  406|   285k|            param_r += MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|   285k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  407|   285k|            param_i += MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|   285k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  408|   285k|          }
  409|   444k|          ptr_r2 += PBXPS;
  ------------------
  |  |  168|   444k|#define PBXPS (224)
  ------------------
  410|   444k|          ptr_i2 += PBXPS;
  ------------------
  |  |  168|   444k|#define PBXPS (224)
  ------------------
  411|   444k|        }
  412|  77.4k|        ptr_r1 += INCHXPBXPS;
  ------------------
  |  |  202|  77.4k|#define INCHXPBXPS (1344)
  ------------------
  413|  77.4k|        ptr_i1 += INCHXPBXPS;
  ------------------
  |  |  202|  77.4k|#define INCHXPBXPS (1344)
  ------------------
  414|  77.4k|      }
  415|  9.82k|    } else {
  416|  3.29k|      WORD32 *ptr1 = (WORD32 *)m1_param;
  417|       |
  418|  23.8k|      for (row = 0; row < num_v_channels; row++) {
  ------------------
  |  Branch (418:21): [True: 20.5k, False: 3.29k]
  ------------------
  419|  20.5k|        WORD32 *ptr2 = ptr1;
  420|       |
  421|  99.6k|        for (col = 0; col < num_x_channels; col++) {
  ------------------
  |  Branch (421:23): [True: 79.0k, False: 20.5k]
  ------------------
  422|  79.0k|          WORD32 *param_r = ptr2;
  423|       |
  424|  79.0k|          WORD32 del = delta_ptr[0];
  425|  79.0k|          WORD32 one_minus_del = one_minus_delta_ptr[0];
  426|       |
  427|  79.0k|          m1_param_real_prev += res_bands;
  428|       |
  429|  1.40M|          for (pb = res_bands; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (429:32): [True: 1.32M, False: 79.0k]
  ------------------
  430|  1.32M|            if (smooth_band_arr[0][pb]) {
  ------------------
  |  Branch (430:17): [True: 714k, False: 611k]
  ------------------
  431|   714k|              WORD64 acc;
  432|       |
  433|   714k|              acc = (WORD64)((WORD64)(param_r[pb]) * (WORD64)(del)) +
  434|   714k|                    (WORD64)((WORD64)(*m1_param_real_prev) *
  435|   714k|                             (WORD64)(one_minus_del));
  436|       |
  437|   714k|              param_r[pb] = (WORD32)(acc >> 15);
  438|   714k|            }
  439|  1.32M|            m1_param_real_prev++;
  440|  1.32M|          }
  441|  79.0k|          param_r += MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|  79.0k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  442|       |
  443|   135k|          for (ps = 1; ps < num_parameter_sets; ps++) {
  ------------------
  |  Branch (443:24): [True: 56.4k, False: 79.0k]
  ------------------
  444|  56.4k|            WORD32 del = delta_ptr[ps];
  445|  56.4k|            WORD32 one_minus_del = one_minus_delta_ptr[ps];
  446|       |
  447|  56.4k|            param_prev_r = param_r - MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|  56.4k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  448|       |
  449|   832k|            for (pb = res_bands; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (449:34): [True: 775k, False: 56.4k]
  ------------------
  450|   775k|              if (smooth_band_arr[ps][pb]) {
  ------------------
  |  Branch (450:19): [True: 387k, False: 388k]
  ------------------
  451|   387k|                WORD64 acc;
  452|       |
  453|   387k|                acc = (WORD64)((WORD64)(param_r[pb]) * (WORD64)del) +
  454|   387k|                      (WORD64)((WORD64)(param_prev_r[pb]) *
  455|   387k|                               (WORD64)one_minus_del);
  456|       |
  457|   387k|                param_r[pb] = (WORD32)(acc >> 15);
  458|   387k|              }
  459|   775k|            }
  460|  56.4k|            param_r += MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|  56.4k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  461|  56.4k|          }
  462|  79.0k|          ptr2 += PBXPS;
  ------------------
  |  |  168|  79.0k|#define PBXPS (224)
  ------------------
  463|  79.0k|        }
  464|  20.5k|        ptr1 += INCHXPBXPS;
  ------------------
  |  |  202|  20.5k|#define INCHXPBXPS (1344)
  ------------------
  465|  20.5k|      }
  466|  3.29k|    }
  467|       |
  468|  13.1k|    if (curr_state->residual_coding)
  ------------------
  |  Branch (468:9): [True: 372, False: 12.7k]
  ------------------
  469|    372|      resid_col_counter = col_counter;
  470|  12.7k|    else
  471|  12.7k|      resid_col_counter = num_direct_signals;
  472|       |
  473|  13.1k|    idx = 0;
  474|  13.1k|    if (m2_param_imag_present) {
  ------------------
  |  Branch (474:9): [True: 0, False: 13.1k]
  ------------------
  475|      0|      WORD32 *ptr_r1 = &m2_param->m2_resid_real[0][0][0];
  476|      0|      WORD32 *ptr_i1 = &m2_param->m2_resid_imag[0][0][0];
  477|      0|      for (row = 0; row < num_output_channels; row++) {
  ------------------
  |  Branch (477:21): [True: 0, False: 0]
  ------------------
  478|      0|        for (col = 0; col < resid_col_counter; col++) {
  ------------------
  |  Branch (478:23): [True: 0, False: 0]
  ------------------
  479|      0|          if (curr_state->m2_param_present[row][col] & 2) {
  ------------------
  |  Branch (479:15): [True: 0, False: 0]
  ------------------
  480|      0|            WORD32 del = *delta_ptr;
  481|      0|            WORD32 one_minus_del = *one_minus_delta_ptr;
  482|       |
  483|      0|            param_r = ptr_r1;
  484|      0|            param_i = ptr_i1;
  485|       |
  486|      0|            m2_resid_real_prev += res_bands;
  487|      0|            m2_resid_imag_prev += res_bands;
  488|       |
  489|      0|            for (pb = res_bands; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (489:34): [True: 0, False: 0]
  ------------------
  490|      0|              if (smooth_band_arr[0][pb]) {
  ------------------
  |  Branch (490:19): [True: 0, False: 0]
  ------------------
  491|      0|                WORD64 acc;
  492|      0|                acc = (WORD64)((WORD64)(param_r[pb]) * (WORD64)(del) +
  493|      0|                               (WORD64)(*m2_resid_real_prev) *
  494|      0|                                   (WORD64)(one_minus_del));
  495|       |
  496|      0|                acc >>= 15;
  497|      0|                param_r[pb] = (WORD32)acc;
  498|       |
  499|      0|                acc = (WORD64)((WORD64)(param_i[pb]) * (WORD64)(del) +
  500|      0|                               (WORD64)(*m2_resid_imag_prev) *
  501|      0|                                   (WORD64)(one_minus_del));
  502|       |
  503|      0|                acc >>= 15;
  504|      0|                param_i[pb] = (WORD32)acc;
  505|      0|              }
  506|       |
  507|      0|              m2_resid_real_prev++;
  508|      0|              m2_resid_imag_prev++;
  509|      0|            }
  510|       |
  511|      0|            param_r += MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|      0|#define MAX_PARAMETER_BANDS (28)
  ------------------
  512|      0|            param_i += MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|      0|#define MAX_PARAMETER_BANDS (28)
  ------------------
  513|       |
  514|      0|            for (ps = 1; ps < num_parameter_sets; ps++) {
  ------------------
  |  Branch (514:26): [True: 0, False: 0]
  ------------------
  515|      0|              WORD32 del = delta_ptr[ps];
  516|      0|              WORD32 one_minus_del = one_minus_delta_ptr[ps];
  517|       |
  518|      0|              param_prev_r = param_r - MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|      0|#define MAX_PARAMETER_BANDS (28)
  ------------------
  519|      0|              param_prev_i = param_i - MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|      0|#define MAX_PARAMETER_BANDS (28)
  ------------------
  520|      0|              for (pb = res_bands; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (520:36): [True: 0, False: 0]
  ------------------
  521|      0|                if (smooth_band_arr[ps][pb]) {
  ------------------
  |  Branch (521:21): [True: 0, False: 0]
  ------------------
  522|      0|                  WORD64 acc;
  523|      0|                  acc = (WORD64)((WORD64)(param_r[pb]) * (WORD64)(del) +
  524|      0|                                 (WORD64)(param_prev_r[pb]) *
  525|      0|                                     (WORD64)(one_minus_del));
  526|       |
  527|      0|                  acc >>= 15;
  528|      0|                  param_r[pb] = (WORD32)acc;
  529|       |
  530|      0|                  acc = (WORD64)((WORD64)(param_i[pb]) * (WORD64)(del) +
  531|      0|                                 (WORD64)(param_prev_i[pb]) *
  532|      0|                                     (WORD64)(one_minus_del));
  533|       |
  534|      0|                  acc >>= 15;
  535|      0|                  param_i[pb] = (WORD32)acc;
  536|      0|                }
  537|      0|              }
  538|      0|              param_r += MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|      0|#define MAX_PARAMETER_BANDS (28)
  ------------------
  539|      0|              param_i += MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|      0|#define MAX_PARAMETER_BANDS (28)
  ------------------
  540|      0|            }
  541|      0|            idx++;
  542|      0|            ptr_r1 += PBXPS;
  ------------------
  |  |  168|      0|#define PBXPS (224)
  ------------------
  543|      0|            ptr_i1 += PBXPS;
  ------------------
  |  |  168|      0|#define PBXPS (224)
  ------------------
  544|      0|          }
  545|      0|        }
  546|      0|      }
  547|       |
  548|      0|      idx = 0;
  549|       |
  550|      0|      ptr_r1 = &m2_param->m2_resid_real[0][0][0];
  551|      0|      ptr_i1 = &m2_param->m2_resid_imag[0][0][0];
  552|      0|      for (row = 0; row < num_output_channels; row++) {
  ------------------
  |  Branch (552:21): [True: 0, False: 0]
  ------------------
  553|      0|        for (col = num_direct_signals; col < col_counter; col++) {
  ------------------
  |  Branch (553:40): [True: 0, False: 0]
  ------------------
  554|      0|          if (curr_state->m2_param_present[row][col] & 1) {
  ------------------
  |  Branch (554:15): [True: 0, False: 0]
  ------------------
  555|      0|            WORD32 del = *delta_ptr;
  556|      0|            WORD32 one_minus_del = *one_minus_delta_ptr;
  557|      0|            m2_decor_real_prev += res_bands;
  558|      0|            m2_decor_imag_prev += res_bands;
  559|       |
  560|      0|            param_r = ptr_r1;
  561|      0|            param_i = ptr_i1;
  562|       |
  563|      0|            for (pb = res_bands; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (563:34): [True: 0, False: 0]
  ------------------
  564|      0|              if (smooth_band_arr[0][pb]) {
  ------------------
  |  Branch (564:19): [True: 0, False: 0]
  ------------------
  565|      0|                WORD64 acc;
  566|      0|                acc = (WORD64)((WORD64)(param_r[pb]) * (WORD64)del +
  567|      0|                               (WORD64)(*m2_decor_real_prev) *
  568|      0|                                   (WORD64)one_minus_del);
  569|      0|                acc >>= 15;
  570|      0|                param_r[pb] = (WORD32)acc;
  571|       |
  572|      0|                acc = (WORD64)((WORD64)(param_i[pb]) * (WORD64)del +
  573|      0|                               (WORD64)(*m2_decor_imag_prev) *
  574|      0|                                   (WORD64)one_minus_del);
  575|      0|                acc >>= 15;
  576|      0|                param_i[pb] = (WORD32)acc;
  577|      0|              }
  578|      0|              m2_decor_real_prev++;
  579|      0|              m2_decor_imag_prev++;
  580|      0|            }
  581|       |
  582|      0|            param_r += MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|      0|#define MAX_PARAMETER_BANDS (28)
  ------------------
  583|      0|            param_i += MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|      0|#define MAX_PARAMETER_BANDS (28)
  ------------------
  584|       |
  585|      0|            for (ps = 1; ps < num_parameter_sets; ps++) {
  ------------------
  |  Branch (585:26): [True: 0, False: 0]
  ------------------
  586|      0|              WORD32 del = delta_ptr[ps];
  587|      0|              WORD32 one_minus_del = one_minus_delta_ptr[ps];
  588|      0|              param_prev_r = param_r - MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|      0|#define MAX_PARAMETER_BANDS (28)
  ------------------
  589|      0|              param_prev_i = param_i - MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|      0|#define MAX_PARAMETER_BANDS (28)
  ------------------
  590|      0|              for (pb = res_bands; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (590:36): [True: 0, False: 0]
  ------------------
  591|      0|                if (smooth_band_arr[ps][pb]) {
  ------------------
  |  Branch (591:21): [True: 0, False: 0]
  ------------------
  592|      0|                  WORD64 acc;
  593|       |
  594|      0|                  acc = (WORD64)((WORD64)(param_r[pb]) * (WORD64)del +
  595|      0|                                 (WORD64)(param_prev_r[pb]) *
  596|      0|                                     (WORD64)one_minus_del);
  597|      0|                  acc >>= 15;
  598|      0|                  param_r[pb] = (WORD32)acc;
  599|       |
  600|      0|                  acc = (WORD64)((WORD64)(param_i[pb]) * (WORD64)del +
  601|      0|                                 (WORD64)(param_prev_i[pb]) *
  602|      0|                                     (WORD64)one_minus_del);
  603|      0|                  acc >>= 15;
  604|      0|                  param_i[pb] = (WORD32)acc;
  605|      0|                }
  606|      0|              }
  607|      0|              param_r += MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|      0|#define MAX_PARAMETER_BANDS (28)
  ------------------
  608|      0|              param_i += MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|      0|#define MAX_PARAMETER_BANDS (28)
  ------------------
  609|      0|            }
  610|       |
  611|      0|            idx++;
  612|      0|            ptr_r1 += PBXPS;
  ------------------
  |  |  168|      0|#define PBXPS (224)
  ------------------
  613|      0|            ptr_i1 += PBXPS;
  ------------------
  |  |  168|      0|#define PBXPS (224)
  ------------------
  614|      0|          }
  615|      0|        }
  616|      0|      }
  617|  13.1k|    } else {
  618|  13.1k|      WORD32 *ptr1 = &m2_param->m2_resid_real[0][0][0];
  619|       |
  620|   115k|      for (row = 0; row < num_output_channels; row++) {
  ------------------
  |  Branch (620:21): [True: 101k, False: 13.1k]
  ------------------
  621|   652k|        for (col = 0; col < resid_col_counter; col++) {
  ------------------
  |  Branch (621:23): [True: 550k, False: 101k]
  ------------------
  622|   550k|          if (curr_state->m2_param_present[row][col] & 2) {
  ------------------
  |  Branch (622:15): [True: 104k, False: 446k]
  ------------------
  623|   104k|            WORD32 *ptr2 = ptr1;
  624|   104k|            WORD32 del = *delta_ptr;
  625|   104k|            WORD32 one_minus_del = *one_minus_delta_ptr;
  626|   104k|            m2_resid_real_prev += res_bands;
  627|       |
  628|  1.95M|            for (pb = res_bands; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (628:34): [True: 1.84M, False: 104k]
  ------------------
  629|  1.84M|              if (smooth_band_arr[0][pb]) {
  ------------------
  |  Branch (629:19): [True: 712k, False: 1.13M]
  ------------------
  630|   712k|                WORD64 acc;
  631|       |
  632|   712k|                acc = (WORD64)((WORD64)(ptr2[pb]) * (WORD64)(del) +
  633|   712k|                               (WORD64)(*m2_resid_real_prev) *
  634|   712k|                                   (WORD64)(one_minus_del));
  635|       |
  636|   712k|                acc >>= 15;
  637|   712k|                ptr2[pb] = (WORD32)acc;
  638|   712k|              }
  639|       |
  640|  1.84M|              m2_resid_real_prev++;
  641|  1.84M|            }
  642|       |
  643|   104k|            ptr2 += MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|   104k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  644|       |
  645|   188k|            for (ps = 1; ps < num_parameter_sets; ps++) {
  ------------------
  |  Branch (645:26): [True: 83.6k, False: 104k]
  ------------------
  646|  83.6k|              WORD32 del = delta_ptr[ps];
  647|  83.6k|              WORD32 one_minus_del = one_minus_delta_ptr[ps];
  648|       |
  649|  83.6k|              param_prev_r = ptr2 - MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|  83.6k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  650|       |
  651|  1.42M|              for (pb = res_bands; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (651:36): [True: 1.34M, False: 83.6k]
  ------------------
  652|  1.34M|                if (smooth_band_arr[ps][pb]) {
  ------------------
  |  Branch (652:21): [True: 497k, False: 849k]
  ------------------
  653|   497k|                  WORD64 acc;
  654|       |
  655|   497k|                  acc = (WORD64)((WORD64)(ptr2[pb]) * (WORD64)(del) +
  656|   497k|                                 (WORD64)(*param_prev_r) *
  657|   497k|                                     (WORD64)(one_minus_del));
  658|       |
  659|   497k|                  acc >>= 15;
  660|   497k|                  ptr2[pb] = (WORD32)acc;
  661|   497k|                }
  662|       |
  663|  1.34M|                param_prev_r++;
  664|  1.34M|              }
  665|  83.6k|              ptr2 += MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|  83.6k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  666|  83.6k|            }
  667|   104k|            idx++;
  668|   104k|            ptr1 += PBXPS;
  ------------------
  |  |  168|   104k|#define PBXPS (224)
  ------------------
  669|   104k|          }
  670|   550k|        }
  671|   101k|      }
  672|  13.1k|      idx = 0;
  673|  13.1k|      ptr1 = &m2_param->m2_decor_real[0][0][0];
  674|       |
  675|   115k|      for (row = 0; row < num_output_channels; row++) {
  ------------------
  |  Branch (675:21): [True: 101k, False: 13.1k]
  ------------------
  676|   328k|        for (col = num_direct_signals; col < col_counter; col++) {
  ------------------
  |  Branch (676:40): [True: 226k, False: 101k]
  ------------------
  677|   226k|          if (curr_state->m2_param_present[row][col] & 1) {
  ------------------
  |  Branch (677:15): [True: 63.3k, False: 163k]
  ------------------
  678|  63.3k|            WORD32 *ptr2 = ptr1;
  679|  63.3k|            m2_decor_real_prev += res_bands;
  680|       |
  681|  63.3k|            param_r = &m2_param->m2_decor_real[idx][0][res_bands];
  682|  1.11M|            for (pb = res_bands; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (682:34): [True: 1.05M, False: 63.3k]
  ------------------
  683|  1.05M|              if (smooth_band_arr[0][pb]) {
  ------------------
  |  Branch (683:19): [True: 377k, False: 672k]
  ------------------
  684|   377k|                WORD64 acc;
  685|   377k|                acc = (WORD64)((WORD64)(ptr2[pb]) * (WORD64)*delta_ptr +
  686|   377k|                               (WORD64)(*m2_decor_real_prev) *
  687|   377k|                                   (WORD64)*one_minus_delta_ptr);
  688|   377k|                acc >>= 15;
  689|   377k|                ptr2[pb] = (WORD32)acc;
  690|   377k|              }
  691|  1.05M|              m2_decor_real_prev++;
  692|  1.05M|            }
  693|  63.3k|            ptr2 += MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|  63.3k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  694|       |
  695|   128k|            for (ps = 1; ps < num_parameter_sets; ps++) {
  ------------------
  |  Branch (695:26): [True: 64.9k, False: 63.3k]
  ------------------
  696|  64.9k|              WORD32 del = delta_ptr[ps];
  697|  64.9k|              WORD32 one_minus_del = one_minus_delta_ptr[ps];
  698|       |
  699|  64.9k|              param_prev_r = ptr2 - MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|  64.9k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  700|  1.01M|              for (pb = res_bands; pb < num_parameter_bands; pb++) {
  ------------------
  |  Branch (700:36): [True: 951k, False: 64.9k]
  ------------------
  701|   951k|                if (smooth_band_arr[ps][pb]) {
  ------------------
  |  Branch (701:21): [True: 350k, False: 601k]
  ------------------
  702|   350k|                  WORD64 acc;
  703|       |
  704|   350k|                  acc =
  705|   350k|                      (WORD64)((WORD64)(ptr2[pb]) * (WORD64)del +
  706|   350k|                               (WORD64)(*param_prev_r) * (WORD64)one_minus_del);
  707|   350k|                  acc >>= 15;
  708|   350k|                  ptr2[pb] = (WORD32)acc;
  709|   350k|                }
  710|       |
  711|   951k|                param_prev_r++;
  712|   951k|              }
  713|       |
  714|  64.9k|              ptr2 += MAX_PARAMETER_BANDS;
  ------------------
  |  |   55|  64.9k|#define MAX_PARAMETER_BANDS (28)
  ------------------
  715|  64.9k|            }
  716|       |
  717|  63.3k|            idx++;
  718|       |
  719|  63.3k|            ptr1 += PBXPS;
  ------------------
  |  |  168|  63.3k|#define PBXPS (224)
  ------------------
  720|  63.3k|          }
  721|   226k|        }
  722|   101k|      }
  723|  13.1k|    }
  724|  13.1k|  }
  725|  13.1k|  return;
  726|  13.1k|}
ixheaacd_mps_smoothing.c:ixheaacd_calc_filter_coeff:
  221|  24.0k|    ia_heaac_mps_state_struct *pstr_mps_state, WORD32 ps, WORD32 *delta) {
  222|  24.0k|  WORD32 d_slots;
  223|  24.0k|  WORD32 *param_slot = pstr_mps_state->aux_struct->param_slot;
  224|  24.0k|  WORD32 *smg_time = pstr_mps_state->aux_struct->smg_time;
  225|       |
  226|  24.0k|  if (ps == 0)
  ------------------
  |  Branch (226:7): [True: 13.1k, False: 10.9k]
  ------------------
  227|  13.1k|    d_slots = param_slot[ps] + 1;
  228|  10.9k|  else
  229|  10.9k|    d_slots = param_slot[ps] - param_slot[ps - 1];
  230|       |
  231|  24.0k|  if (pstr_mps_state->smooth_control) {
  ------------------
  |  Branch (231:7): [True: 24.0k, False: 0]
  ------------------
  232|  24.0k|    switch (smg_time[ps]) {
  233|  1.31k|      case SMG_TIME_64:
  ------------------
  |  |   23|  1.31k|#define SMG_TIME_64 (64)
  ------------------
  |  Branch (233:7): [True: 1.31k, False: 22.7k]
  ------------------
  234|  1.31k|        *delta = d_slots << 9;
  235|  1.31k|        break;
  236|    445|      case SMG_TIME_128:
  ------------------
  |  |   24|    445|#define SMG_TIME_128 (128)
  ------------------
  |  Branch (236:7): [True: 445, False: 23.6k]
  ------------------
  237|    445|        *delta = d_slots << 8;
  238|    445|        break;
  239|  18.7k|      case SMG_TIME_256:
  ------------------
  |  |   25|  18.7k|#define SMG_TIME_256 (256)
  ------------------
  |  Branch (239:7): [True: 18.7k, False: 5.31k]
  ------------------
  240|  18.7k|        *delta = d_slots << 7;
  241|  18.7k|        break;
  242|  1.60k|      case SMG_TIME_512:
  ------------------
  |  |   26|  1.60k|#define SMG_TIME_512 (512)
  ------------------
  |  Branch (242:7): [True: 1.60k, False: 22.4k]
  ------------------
  243|  1.60k|        *delta = d_slots << 6;
  244|  1.60k|        break;
  245|  1.95k|      default:
  ------------------
  |  Branch (245:7): [True: 1.95k, False: 22.1k]
  ------------------
  246|  1.95k|        break;
  247|  24.0k|    }
  248|  24.0k|  } else {
  249|      0|    *delta = d_slots << 7;
  250|      0|  }
  251|       |
  252|  24.0k|  return;
  253|  24.0k|}

ixheaacd_mps_temp_process:
  232|  79.5k|WORD32 ixheaacd_mps_temp_process(ia_mps_dec_state_struct* self) {
  233|  79.5k|  WORD32 ch, ts, hyb;
  234|  79.5k|  WORD32 err = 0;
  235|  79.5k|  ia_sbr_frame_info_data_struct* ptr_frame_data =
  236|  79.5k|      (ia_sbr_frame_info_data_struct*)self->p_sbr_frame[0];
  237|  79.5k|  if (self->res_bands != 28) {
  ------------------
  |  Branch (237:7): [True: 68.6k, False: 10.8k]
  ------------------
  238|  68.6k|    if (self->config->bs_temp_shape_config == 1) {
  ------------------
  |  Branch (238:9): [True: 20.9k, False: 47.6k]
  ------------------
  239|  20.9k|      WORD32 dif_s = ((self->res_bands == 0)
  ------------------
  |  Branch (239:23): [True: 8.90k, False: 12.0k]
  ------------------
  240|  20.9k|                          ? 0
  241|  20.9k|                          : ixheaacd_mps_gain_set_indx[self->res_bands]);
  242|  62.9k|      for (ch = 0; ch < self->out_ch_count; ch++) {
  ------------------
  |  Branch (242:20): [True: 41.9k, False: 20.9k]
  ------------------
  243|  1.36M|        for (ts = 0; ts < self->time_slots; ts++) {
  ------------------
  |  Branch (243:22): [True: 1.32M, False: 41.9k]
  ------------------
  244|  11.2M|          for (hyb = dif_s; hyb < HYBRID_BAND_BORDER; hyb++) {
  ------------------
  |  |   33|  11.2M|#define HYBRID_BAND_BORDER (12)
  ------------------
  |  Branch (244:29): [True: 9.95M, False: 1.32M]
  ------------------
  245|  9.95M|            self->hyb_dir_out[ch][ts][hyb].re +=
  246|  9.95M|                self->hyb_diff_out[ch][ts][hyb].re;
  247|  9.95M|            self->hyb_dir_out[ch][ts][hyb].im +=
  248|  9.95M|                self->hyb_diff_out[ch][ts][hyb].im;
  249|  9.95M|            self->hyb_diff_out[ch][ts][hyb].re = 0;
  250|  9.95M|            self->hyb_diff_out[ch][ts][hyb].im = 0;
  251|  9.95M|          }
  252|  1.32M|        }
  253|  41.9k|      }
  254|       |
  255|   682k|      for (ts = 0; ts < self->time_slots; ts++)
  ------------------
  |  Branch (255:20): [True: 661k, False: 20.9k]
  ------------------
  256|   661k|        ixheaacd_mps_subbandtp(self, ts);
  257|       |
  258|  47.6k|    } else {
  259|  47.6k|      WORD32 dif_s = ((self->res_bands == 0)
  ------------------
  |  Branch (259:23): [True: 24.4k, False: 23.2k]
  ------------------
  260|  47.6k|                          ? 0
  261|  47.6k|                          : ixheaacd_mps_gain_set_indx[self->res_bands]);
  262|   143k|      for (ch = 0; ch < self->out_ch_count; ch++) {
  ------------------
  |  Branch (262:20): [True: 95.3k, False: 47.6k]
  ------------------
  263|  4.02M|        for (ts = 0; ts < self->time_slots; ts++) {
  ------------------
  |  Branch (263:22): [True: 3.93M, False: 95.3k]
  ------------------
  264|   124M|          for (hyb = dif_s; hyb < self->hyb_band_count_max; hyb++) {
  ------------------
  |  Branch (264:29): [True: 120M, False: 3.93M]
  ------------------
  265|   120M|            self->hyb_dir_out[ch][ts][hyb].re +=
  266|   120M|                self->hyb_diff_out[ch][ts][hyb].re;
  267|   120M|            self->hyb_dir_out[ch][ts][hyb].im +=
  268|   120M|                self->hyb_diff_out[ch][ts][hyb].im;
  269|   120M|          }
  270|  3.93M|        }
  271|  95.3k|      }
  272|  47.6k|    }
  273|  68.6k|  }
  274|       |
  275|  79.5k|  ixheaacd_mps_qmf_hyb_synthesis(self);
  276|       |
  277|  79.5k|  if (self->ldmps_config.ldmps_present_flag != 1) {
  ------------------
  |  Branch (277:7): [True: 77.3k, False: 2.15k]
  ------------------
  278|   232k|    for (ch = 0; ch < self->out_ch_count; ch++) {
  ------------------
  |  Branch (278:18): [True: 154k, False: 77.3k]
  ------------------
  279|   154k|      err =
  280|   154k|          ixheaacd_sbr_dec_from_mps(&self->qmf_out_dir[ch][0][0].re, self->p_sbr_dec[ch],
  281|   154k|                                    self->p_sbr_frame[ch], self->p_sbr_header[ch], self->ec_flag);
  282|   154k|      if (err) return err;
  ------------------
  |  Branch (282:11): [True: 12, False: 154k]
  ------------------
  283|   154k|    }
  284|  77.3k|  }
  285|       |
  286|  79.4k|  if (self->object_type == AOT_ER_AAC_ELD || self->object_type == AOT_ER_AAC_LD)
  ------------------
  |  Branch (286:7): [True: 2.15k, False: 77.3k]
  |  Branch (286:46): [True: 0, False: 77.3k]
  ------------------
  287|  2.15k|    self->synth_count = self->hyb_band_count[0];
  288|  77.3k|  else
  289|  77.3k|  {
  290|  77.3k|    if (ptr_frame_data->mps_sbr_flag) {
  ------------------
  |  Branch (290:9): [True: 39.5k, False: 37.7k]
  ------------------
  291|  39.5k|      self->synth_count =
  292|  39.5k|        ptr_frame_data->pstr_sbr_header->pstr_freq_band_data->sub_band_end;
  293|  39.5k|    }
  294|  37.7k|    else {
  295|  37.7k|      self->synth_count = self->band_count[0];
  296|  37.7k|    }
  297|  77.3k|  }
  298|       |
  299|  79.4k|  ixheaacd_mps_synt_calc(self);
  300|  79.4k|  return err;
  301|  79.5k|}
ixheaacd_tp_process:
 1235|  13.1k|VOID ixheaacd_tp_process(ia_heaac_mps_state_struct *pstr_mps_state) {
 1236|  13.1k|  WORD32 ch, ts, hyb, n;
 1237|  13.1k|  WORD32 temp, temp_1, temp_2;
 1238|  13.1k|  ia_mps_dec_synthesis_interface *syn = pstr_mps_state->syn;
 1239|  13.1k|  WORD32 *hyb_output_real_wet, *hyb_output_imag_wet;
 1240|  13.1k|  WORD32 *hyb_output_real_dry, *hyb_output_imag_dry;
 1241|       |
 1242|  13.1k|  WORD32 *p_buffer_real, *p_buffer_imag, *p_buffer_re, *p_buffer_im;
 1243|  13.1k|  WORD32 *p_buf_real, *p_buf_imag, *p_buf_re, *p_buf_im;
 1244|  13.1k|  WORD32 *buf_real, *buf_imag;
 1245|       |
 1246|  13.1k|  WORD32 num_output_channels = pstr_mps_state->num_output_channels;
 1247|  13.1k|  WORD32 time_slots = pstr_mps_state->time_slots;
 1248|  13.1k|  WORD32 qmf_bands = pstr_mps_state->qmf_bands;
 1249|  13.1k|  WORD32 num_output_channels_at = pstr_mps_state->num_output_channels_at;
 1250|  13.1k|  WORD32 tree_config = pstr_mps_state->tree_config;
 1251|  13.1k|  WORD32 up_mix_type = pstr_mps_state->up_mix_type;
 1252|  13.1k|  WORD32 tp_hyb_band_border = pstr_mps_state->tp_hyb_band_border;
 1253|       |
 1254|  13.1k|  ia_mps_dec_reuse_array_struct *p_array_struct = pstr_mps_state->array_struct;
 1255|  13.1k|  WORD32 *p_hyb_out_dry_real = p_array_struct->hyb_output_real_dry;
 1256|  13.1k|  WORD32 *p_hyb_out_dry_imag = p_array_struct->hyb_output_imag_dry;
 1257|  13.1k|  WORD32 *p_hyb_out_dry_re, *p_hyb_out_dry_im;
 1258|       |
 1259|  13.1k|  WORD32 *p_time_out;
 1260|       |
 1261|  13.1k|  p_buffer_real = p_array_struct->buf_real;
 1262|  13.1k|  p_buffer_imag = p_array_struct->buf_imag;
 1263|       |
 1264|  13.1k|  p_buf_real = p_array_struct->buffer_real;
 1265|  13.1k|  p_buf_imag = p_array_struct->buffer_imag;
 1266|       |
 1267|  13.1k|  if (!pstr_mps_state->scaling_enable) {
  ------------------
  |  Branch (1267:7): [True: 7.04k, False: 6.07k]
  ------------------
 1268|  62.2k|    for (ch = 0; ch < num_output_channels; ch++) {
  ------------------
  |  Branch (1268:18): [True: 55.2k, False: 7.04k]
  ------------------
 1269|  55.2k|      p_buffer_re = p_buffer_real;
 1270|  55.2k|      p_buffer_im = p_buffer_imag;
 1271|       |
 1272|  55.2k|      p_buf_re = p_buf_real;
 1273|  55.2k|      p_buf_im = p_buf_imag;
 1274|       |
 1275|  55.2k|      p_hyb_out_dry_re = p_hyb_out_dry_real;
 1276|  55.2k|      p_hyb_out_dry_im = p_hyb_out_dry_imag;
 1277|       |
 1278|  1.61M|      for (ts = 0; ts < time_slots; ts++) {
  ------------------
  |  Branch (1278:20): [True: 1.55M, False: 55.2k]
  ------------------
 1279|  1.55M|        hyb_output_real_wet = p_buffer_re;
 1280|  1.55M|        hyb_output_imag_wet = p_buffer_im;
 1281|  1.55M|        hyb_output_real_dry = p_hyb_out_dry_re;
 1282|  1.55M|        hyb_output_imag_dry = p_hyb_out_dry_im;
 1283|       |
 1284|  1.55M|        buf_real = p_buf_re;
 1285|  1.55M|        buf_imag = p_buf_im;
 1286|       |
 1287|  1.55M|        temp_1 = ixheaac_add32_sat(*hyb_output_real_dry++, *hyb_output_real_wet++);
 1288|  1.55M|        temp_2 = ixheaac_add32_sat(*hyb_output_imag_dry++, *hyb_output_imag_wet++);
 1289|  9.35M|        for (n = 1; n < 6; n++) {
  ------------------
  |  Branch (1289:21): [True: 7.79M, False: 1.55M]
  ------------------
 1290|  7.79M|          temp_1 = ixheaac_add32_sat(temp_1, *hyb_output_real_dry++);
 1291|  7.79M|          temp_1 = ixheaac_add32_sat(temp_1, *hyb_output_real_wet++);
 1292|  7.79M|          temp_2 = ixheaac_add32_sat(temp_2, *hyb_output_imag_dry++);
 1293|  7.79M|          temp_2 = ixheaac_add32_sat(temp_2, *hyb_output_imag_wet++);
 1294|  7.79M|        }
 1295|       |
 1296|  1.55M|        *buf_real++ = temp_1;
 1297|  1.55M|        *buf_imag++ = temp_2;
 1298|       |
 1299|  1.55M|        temp = ixheaac_add32_sat(*hyb_output_real_dry++, *hyb_output_real_wet++);
 1300|  1.55M|        *buf_real = ixheaac_add32_sat(temp, *hyb_output_real_dry++);
 1301|  1.55M|        *buf_real = ixheaac_add32_sat(*buf_real, *hyb_output_real_wet++);
 1302|  1.55M|        temp = ixheaac_add32_sat(*hyb_output_imag_dry++, *hyb_output_imag_wet++);
 1303|  1.55M|        *buf_imag = ixheaac_add32_sat(temp, *hyb_output_imag_dry++);
 1304|  1.55M|        *buf_imag = ixheaac_add32_sat(*buf_imag, *hyb_output_imag_wet++);
 1305|       |
 1306|  1.55M|        buf_real++;
 1307|  1.55M|        buf_imag++;
 1308|       |
 1309|  1.55M|        temp = ixheaac_add32_sat(*hyb_output_real_dry++, *hyb_output_real_wet++);
 1310|  1.55M|        *buf_real = ixheaac_add32_sat(temp, *hyb_output_real_dry++);
 1311|  1.55M|        *buf_real = ixheaac_add32_sat(*buf_real, *hyb_output_real_wet++);
 1312|  1.55M|        temp = ixheaac_add32_sat(*hyb_output_imag_dry++, *hyb_output_imag_wet++);
 1313|  1.55M|        *buf_imag = ixheaac_add32_sat(temp, *hyb_output_imag_dry++);
 1314|  1.55M|        *buf_imag = ixheaac_add32_sat(*buf_imag, *hyb_output_imag_wet++);
 1315|       |
 1316|  1.55M|        buf_real++;
 1317|  1.55M|        buf_imag++;
 1318|       |
 1319|  97.3M|        for (n = 0; n < qmf_bands; n++) {
  ------------------
  |  Branch (1319:21): [True: 95.8M, False: 1.55M]
  ------------------
 1320|  95.8M|          *buf_real++ = ixheaac_add32_sat(*hyb_output_real_dry++, *hyb_output_real_wet++);
 1321|  95.8M|          *buf_imag++ = ixheaac_add32_sat(*hyb_output_imag_dry++, *hyb_output_imag_wet++);
 1322|  95.8M|        }
 1323|       |
 1324|  1.55M|        p_buffer_re += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  1.55M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  1.55M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
 1325|  1.55M|        p_buffer_im += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  1.55M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  1.55M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
 1326|       |
 1327|  1.55M|        p_buf_re += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  1.55M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  1.55M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
 1328|  1.55M|        p_buf_im += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  1.55M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  1.55M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
 1329|       |
 1330|  1.55M|        p_hyb_out_dry_re += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  1.55M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  1.55M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
 1331|  1.55M|        p_hyb_out_dry_im += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  1.55M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  1.55M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
 1332|  1.55M|      }
 1333|  55.2k|      p_buffer_real += TSXHB;
  ------------------
  |  |  106|  55.2k|#define TSXHB (5112)
  ------------------
 1334|  55.2k|      p_buffer_imag += TSXHB;
  ------------------
  |  |  106|  55.2k|#define TSXHB (5112)
  ------------------
 1335|       |
 1336|  55.2k|      p_buf_real += TSXHB;
  ------------------
  |  |  106|  55.2k|#define TSXHB (5112)
  ------------------
 1337|  55.2k|      p_buf_imag += TSXHB;
  ------------------
  |  |  106|  55.2k|#define TSXHB (5112)
  ------------------
 1338|       |
 1339|  55.2k|      p_hyb_out_dry_real += TSXHB;
  ------------------
  |  |  106|  55.2k|#define TSXHB (5112)
  ------------------
 1340|  55.2k|      p_hyb_out_dry_imag += TSXHB;
  ------------------
  |  |  106|  55.2k|#define TSXHB (5112)
  ------------------
 1341|  55.2k|    }
 1342|  7.04k|  } else {
 1343|  52.7k|    for (ch = 0; ch < num_output_channels; ch++) {
  ------------------
  |  Branch (1343:18): [True: 46.6k, False: 6.07k]
  ------------------
 1344|  46.6k|      p_buffer_re = p_buffer_real;
 1345|  46.6k|      p_buffer_im = p_buffer_imag;
 1346|       |
 1347|  46.6k|      p_buf_re = p_buf_real;
 1348|  46.6k|      p_buf_im = p_buf_imag;
 1349|       |
 1350|  46.6k|      p_hyb_out_dry_re = p_hyb_out_dry_real;
 1351|  46.6k|      p_hyb_out_dry_im = p_hyb_out_dry_imag;
 1352|       |
 1353|  1.26M|      for (ts = 0; ts < time_slots; ts++) {
  ------------------
  |  Branch (1353:20): [True: 1.21M, False: 46.6k]
  ------------------
 1354|  1.21M|        hyb_output_real_wet = p_buffer_re;
 1355|  1.21M|        hyb_output_imag_wet = p_buffer_im;
 1356|  1.21M|        hyb_output_real_dry = p_hyb_out_dry_re;
 1357|  1.21M|        hyb_output_imag_dry = p_hyb_out_dry_im;
 1358|       |
 1359|  1.21M|        buf_real = p_buf_re;
 1360|  1.21M|        buf_imag = p_buf_im;
 1361|       |
 1362|  1.21M|        temp_1 = ixheaac_add32_sat(*hyb_output_real_dry++, *hyb_output_real_wet++);
 1363|  1.21M|        temp_2 = ixheaac_add32_sat(*hyb_output_imag_dry++, *hyb_output_imag_wet++);
 1364|  7.30M|        for (n = 1; n < 6; n++) {
  ------------------
  |  Branch (1364:21): [True: 6.08M, False: 1.21M]
  ------------------
 1365|  6.08M|          temp_1 = ixheaac_add32_sat(temp_1, *hyb_output_real_dry++);
 1366|  6.08M|          temp_1 = ixheaac_add32_sat(temp_1, *hyb_output_real_wet++);
 1367|  6.08M|          temp_2 = ixheaac_add32_sat(temp_2, *hyb_output_imag_dry++);
 1368|  6.08M|          temp_2 = ixheaac_add32_sat(temp_2, *hyb_output_imag_wet++);
 1369|  6.08M|        }
 1370|       |
 1371|  1.21M|        *buf_real++ = temp_1;
 1372|  1.21M|        *buf_imag++ = temp_2;
 1373|       |
 1374|  1.21M|        *buf_real = ixheaac_add32_sat(*hyb_output_real_dry++, *hyb_output_real_wet++);
 1375|  1.21M|        *buf_real = ixheaac_add32_sat(*buf_real, *hyb_output_real_dry++);
 1376|  1.21M|        *buf_real = ixheaac_add32_sat(*buf_real, *hyb_output_real_wet++);
 1377|       |
 1378|  1.21M|        *buf_imag = ixheaac_add32_sat(*hyb_output_imag_dry++, *hyb_output_imag_wet++);
 1379|  1.21M|        *buf_imag = ixheaac_add32_sat(*buf_imag, *hyb_output_imag_dry++);
 1380|  1.21M|        *buf_imag = ixheaac_add32_sat(*buf_imag, *hyb_output_imag_wet++);
 1381|       |
 1382|  1.21M|        buf_real++;
 1383|  1.21M|        buf_imag++;
 1384|       |
 1385|  1.21M|        *buf_real = ixheaac_add32_sat(*hyb_output_real_dry++, *hyb_output_real_wet++);
 1386|  1.21M|        *buf_real = ixheaac_add32_sat(*buf_real, *hyb_output_real_dry++);
 1387|  1.21M|        *buf_real = ixheaac_add32_sat(*buf_real, *hyb_output_real_wet++);
 1388|  1.21M|        *buf_imag = ixheaac_add32_sat(*hyb_output_imag_dry++, *hyb_output_imag_wet++);
 1389|  1.21M|        *buf_imag = ixheaac_add32_sat(*buf_imag, *hyb_output_imag_dry++);
 1390|  1.21M|        *buf_imag = ixheaac_add32_sat(*buf_imag, *hyb_output_imag_wet++);
 1391|       |
 1392|  1.21M|        buf_real++;
 1393|  1.21M|        buf_imag++;
 1394|       |
 1395|  3.65M|        for (hyb = 3; hyb < tp_hyb_band_border - QMF_TO_HYB_OFFSET; hyb++) {
  ------------------
  |  |   28|  3.65M|#define QMF_TO_HYB_OFFSET (7)
  ------------------
  |  Branch (1395:23): [True: 2.43M, False: 1.21M]
  ------------------
 1396|  2.43M|          *buf_real++ = ixheaac_add32_sat(*hyb_output_real_dry++, *hyb_output_real_wet++);
 1397|  2.43M|          *buf_imag++ = ixheaac_add32_sat(*hyb_output_imag_dry++, *hyb_output_imag_wet++);
 1398|  2.43M|        }
 1399|  1.21M|        p_buffer_re += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  1.21M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  1.21M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
 1400|  1.21M|        p_buffer_im += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  1.21M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  1.21M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
 1401|       |
 1402|  1.21M|        p_buf_re += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  1.21M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  1.21M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
 1403|  1.21M|        p_buf_im += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  1.21M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  1.21M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
 1404|       |
 1405|  1.21M|        p_hyb_out_dry_re += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  1.21M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  1.21M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
 1406|  1.21M|        p_hyb_out_dry_im += MAX_HYBRID_BANDS;
  ------------------
  |  |   65|  1.21M|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|  1.21M|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
 1407|  1.21M|      }
 1408|  46.6k|      p_buffer_real += TSXHB;
  ------------------
  |  |  106|  46.6k|#define TSXHB (5112)
  ------------------
 1409|  46.6k|      p_buffer_imag += TSXHB;
  ------------------
  |  |  106|  46.6k|#define TSXHB (5112)
  ------------------
 1410|       |
 1411|  46.6k|      p_buf_real += TSXHB;
  ------------------
  |  |  106|  46.6k|#define TSXHB (5112)
  ------------------
 1412|  46.6k|      p_buf_imag += TSXHB;
  ------------------
  |  |  106|  46.6k|#define TSXHB (5112)
  ------------------
 1413|       |
 1414|  46.6k|      p_hyb_out_dry_real += TSXHB;
  ------------------
  |  |  106|  46.6k|#define TSXHB (5112)
  ------------------
 1415|  46.6k|      p_hyb_out_dry_imag += TSXHB;
  ------------------
  |  |  106|  46.6k|#define TSXHB (5112)
  ------------------
 1416|  46.6k|    }
 1417|       |
 1418|   164k|    for (ts = 0; ts < time_slots; ts++) {
  ------------------
  |  Branch (1418:18): [True: 158k, False: 6.07k]
  ------------------
 1419|   158k|      ixheaacd_subband_tp(pstr_mps_state, ts);
 1420|   158k|    }
 1421|  6.07k|  }
 1422|       |
 1423|  13.1k|  if ((!pstr_mps_state->bs_config.arbitrary_tree) &&
  ------------------
  |  Branch (1423:7): [True: 13.1k, False: 6]
  ------------------
 1424|  13.1k|      ((up_mix_type != 2) && (up_mix_type != 3))) {
  ------------------
  |  Branch (1424:8): [True: 13.1k, False: 0]
  |  Branch (1424:30): [True: 13.1k, False: 0]
  ------------------
 1425|  13.1k|    WORD32 *time_out_5xxx =
 1426|  13.1k|        pstr_mps_state->ia_mps_dec_mps_table.tp_process_table_ptr->time_out_idx_5xxx;
 1427|  13.1k|    WORD32 *time_out_7xxx =
 1428|  13.1k|        pstr_mps_state->ia_mps_dec_mps_table.tp_process_table_ptr->time_out_idx_7xxx;
 1429|       |
 1430|  13.1k|    p_buf_real = p_array_struct->buffer_real;
 1431|  13.1k|    p_buf_imag = p_array_struct->buffer_imag;
 1432|       |
 1433|   114k|    for (ch = 0; ch < num_output_channels_at; ch++) {
  ------------------
  |  Branch (1433:18): [True: 101k, False: 13.1k]
  ------------------
 1434|   101k|      WORD32 tempch = 0;
 1435|   101k|      switch (tree_config) {
 1436|  1.62k|        case TREE_5151:
  ------------------
  |  Branch (1436:9): [True: 1.62k, False: 100k]
  ------------------
 1437|  1.62k|          tempch = ch;
 1438|  1.62k|          break;
 1439|  2.14k|        case TREE_5152:
  ------------------
  |  Branch (1439:9): [True: 2.14k, False: 99.7k]
  ------------------
 1440|  7.57k|        case TREE_525:
  ------------------
  |  Branch (1440:9): [True: 5.43k, False: 96.4k]
  ------------------
 1441|  7.57k|          tempch = time_out_5xxx[ch];
 1442|  7.57k|          break;
 1443|  8.31k|        case TREE_7271:
  ------------------
  |  Branch (1443:9): [True: 8.31k, False: 93.5k]
  ------------------
 1444|  10.7k|        case TREE_7272:
  ------------------
  |  Branch (1444:9): [True: 2.44k, False: 99.4k]
  ------------------
 1445|  14.9k|        case TREE_7571:
  ------------------
  |  Branch (1445:9): [True: 4.21k, False: 97.6k]
  ------------------
 1446|  92.6k|        case TREE_7572:
  ------------------
  |  Branch (1446:9): [True: 77.6k, False: 24.1k]
  ------------------
 1447|  92.6k|          tempch = time_out_7xxx[ch];
 1448|  92.6k|          break;
 1449|      0|        default:
  ------------------
  |  Branch (1449:9): [True: 0, False: 101k]
  ------------------
 1450|      0|          break;
 1451|   101k|      }
 1452|   101k|      p_time_out = p_array_struct->time_out + tempch * QBXTS;
  ------------------
  |  |   98|   101k|#define QBXTS (4608)
  ------------------
 1453|   101k|      syn->syn_filter_bank(&pstr_mps_state->syn_qmf_bank, p_buf_real, p_buf_imag,
 1454|   101k|                           p_time_out, ch, qmf_bands, time_slots,
 1455|   101k|                           pstr_mps_state->ia_mps_dec_mps_table.qmf_table_ptr);
 1456|       |
 1457|   101k|      p_buf_real += TSXHB;
  ------------------
  |  |  106|   101k|#define TSXHB (5112)
  ------------------
 1458|   101k|      p_buf_imag += TSXHB;
  ------------------
  |  |  106|   101k|#define TSXHB (5112)
  ------------------
 1459|   101k|    }
 1460|  13.1k|  } else {
 1461|      6|    p_time_out = p_array_struct->time_out;
 1462|     45|    for (ch = 0; ch < num_output_channels_at; ch++) {
  ------------------
  |  Branch (1462:18): [True: 39, False: 6]
  ------------------
 1463|     39|      syn->syn_filter_bank(&pstr_mps_state->syn_qmf_bank, p_buf_real, p_buf_imag,
 1464|     39|                           p_time_out, ch, qmf_bands, time_slots,
 1465|     39|                           pstr_mps_state->ia_mps_dec_mps_table.qmf_table_ptr);
 1466|       |
 1467|     39|      p_buf_real += TSXHB;
  ------------------
  |  |  106|     39|#define TSXHB (5112)
  ------------------
 1468|     39|      p_buf_imag += TSXHB;
  ------------------
  |  |  106|     39|#define TSXHB (5112)
  ------------------
 1469|     39|      p_time_out += QBXTS;
  ------------------
  |  |   98|     39|#define QBXTS (4608)
  ------------------
 1470|     39|    }
 1471|      6|  }
 1472|       |
 1473|  13.1k|  return;
 1474|  13.1k|}
ixheaacd_mps_temp_process.c:ixheaacd_mps_subbandtp:
  162|   661k|static VOID ixheaacd_mps_subbandtp(ia_mps_dec_state_struct* self, WORD32 ts) {
  163|   661k|  FLOAT32 scale[2];
  164|   661k|  WORD32 ch, n;
  165|   661k|  WORD32 no_scaling;
  166|   661k|  FLOAT32 temp;
  167|   661k|  const WORD32 ixheaacd_hybrid_to_qmf_map[] = {0, 0, 0, 0, 0, 0, 1, 1, 2, 2};
  168|   661k|  const WORD32 ixheaacd_hybrid_to_qmf_map_ldmps[] = {0, 1, 2};
  169|   661k|  const WORD32* ptr_ixheaacd_hybrid_to_qmf_map;
  170|   661k|  WORD32 loop_counter = 0;
  171|       |
  172|   661k|  if (self->ldmps_config.ldmps_present_flag) {
  ------------------
  |  Branch (172:7): [True: 9.76k, False: 652k]
  ------------------
  173|  9.76k|    ptr_ixheaacd_hybrid_to_qmf_map = ixheaacd_hybrid_to_qmf_map_ldmps;
  174|  9.76k|    loop_counter = 3;
  175|   652k|  } else {
  176|   652k|    ptr_ixheaacd_hybrid_to_qmf_map = ixheaacd_hybrid_to_qmf_map;
  177|   652k|    loop_counter = 10;
  178|   652k|  }
  179|       |
  180|   661k|  ixheaacd_mps_temp_process_scale_calc(self, ts, scale);
  181|       |
  182|  1.98M|  for (ch = 0; ch < self->out_ch_count; ch++) {
  ------------------
  |  Branch (182:16): [True: 1.32M, False: 661k]
  ------------------
  183|  1.32M|    no_scaling = 1;
  184|       |
  185|  1.32M|    if ((self->config->bs_temp_shape_config == 1) ||
  ------------------
  |  Branch (185:9): [True: 1.32M, False: 0]
  ------------------
  186|      0|        (self->config->bs_temp_shape_config == 2))
  ------------------
  |  Branch (186:9): [True: 0, False: 0]
  ------------------
  187|  1.32M|      no_scaling = !self->temp_shape_enable_ch_stp[ch];
  188|       |
  189|  1.32M|    if (no_scaling == 1) {
  ------------------
  |  Branch (189:9): [True: 1.24M, False: 76.5k]
  ------------------
  190|  79.8M|      for (n = 0; n < self->hyb_band_count_max; n++) {
  ------------------
  |  Branch (190:19): [True: 78.5M, False: 1.24M]
  ------------------
  191|  78.5M|        self->hyb_dir_out[ch][ts][n].re += self->hyb_diff_out[ch][ts][n].re;
  192|  78.5M|        self->hyb_dir_out[ch][ts][n].im += self->hyb_diff_out[ch][ts][n].im;
  193|  78.5M|      }
  194|  1.24M|    } else {
  195|  76.5k|      if (self->ldmps_config.ldmps_present_flag) {
  ------------------
  |  Branch (195:11): [True: 3.83k, False: 72.6k]
  ------------------
  196|  15.3k|        for (n = 0; n < 3; n++) {
  ------------------
  |  Branch (196:21): [True: 11.5k, False: 3.83k]
  ------------------
  197|  11.5k|          temp = (FLOAT32)(scale[ch] *
  198|  11.5k|                           ixheaacd_bp[ptr_ixheaacd_hybrid_to_qmf_map[n]]);
  199|  11.5k|          self->hyb_dir_out[ch][ts][n].re +=
  200|  11.5k|              (self->hyb_diff_out[ch][ts][n].re * temp);
  201|  11.5k|          self->hyb_dir_out[ch][ts][n].im +=
  202|  11.5k|              (self->hyb_diff_out[ch][ts][n].im * temp);
  203|  11.5k|        }
  204|  72.6k|      } else {
  205|   799k|        for (n = 0; n < loop_counter; n++) {
  ------------------
  |  Branch (205:21): [True: 726k, False: 72.6k]
  ------------------
  206|   726k|          temp = (FLOAT32)(scale[ch] *
  207|   726k|                           ixheaacd_bp[ptr_ixheaacd_hybrid_to_qmf_map[n]]);
  208|   726k|          self->hyb_dir_out[ch][ts][n].re +=
  209|   726k|              (self->hyb_diff_out[ch][ts][n].re * temp);
  210|   726k|          self->hyb_dir_out[ch][ts][n].im +=
  211|   726k|              (self->hyb_diff_out[ch][ts][n].im * temp);
  212|   726k|        }
  213|  72.6k|      }
  214|   765k|      for (n = 7; n < HP_SIZE - 3 + 10; n++) {
  ------------------
  |  |   54|   765k|#define HP_SIZE (9)
  ------------------
  |  Branch (214:19): [True: 688k, False: 76.5k]
  ------------------
  215|   688k|        temp = (FLOAT32)(scale[ch] * ixheaacd_bp[n + 3 - 10]);
  216|   688k|        self->hyb_dir_out[ch][ts][n].re +=
  217|   688k|            (self->hyb_diff_out[ch][ts][n].re * temp);
  218|   688k|        self->hyb_dir_out[ch][ts][n].im +=
  219|   688k|            (self->hyb_diff_out[ch][ts][n].im * temp);
  220|   688k|      }
  221|  3.02M|      for (; n < self->hyb_band_count_max; n++) {
  ------------------
  |  Branch (221:14): [True: 2.94M, False: 76.5k]
  ------------------
  222|  2.94M|        temp = (FLOAT32)(scale[ch]);
  223|  2.94M|        self->hyb_dir_out[ch][ts][n].re +=
  224|  2.94M|            (self->hyb_diff_out[ch][ts][n].re * temp);
  225|  2.94M|        self->hyb_dir_out[ch][ts][n].im +=
  226|  2.94M|            (self->hyb_diff_out[ch][ts][n].im * temp);
  227|  2.94M|      }
  228|  76.5k|    }
  229|  1.32M|  }
  230|   661k|}
ixheaacd_mps_temp_process.c:ixheaacd_mps_temp_process_scale_calc:
   78|   661k|                                                 WORD32 ts, FLOAT32* scale) {
   79|   661k|  FLOAT32 dir_energy;
   80|   661k|  FLOAT32 diff_energy[2];
   81|   661k|  FLOAT32 temp;
   82|       |
   83|   661k|  WORD32 ch, n;
   84|   661k|  WORD32 left_ch = 0, right_ch = 1;
   85|       |
   86|   661k|  if (self->subband_var.init_flag == 0) {
  ------------------
  |  Branch (86:7): [True: 444, False: 661k]
  ------------------
   87|  1.33k|    for (ch = 0; ch < 2; ch++) {
  ------------------
  |  Branch (87:18): [True: 888, False: 444]
  ------------------
   88|    888|      self->subband_var.tp_scale_last[ch] = 1.0f;
   89|    888|      self->subband_var.nrg_diff_prev[ch] = 32768 * 32768;
   90|    888|    }
   91|       |
   92|    444|    self->subband_var.nrg_dir_prev = 32768 * 32768;
   93|    444|    self->subband_var.init_flag = 1;
   94|    444|  }
   95|       |
   96|   661k|  if (self->subband_var.update_old_ener == STP_UPDATE_ENERGY_RATE) {
  ------------------
  |  |   58|   661k|#define STP_UPDATE_ENERGY_RATE (32)
  ------------------
  |  Branch (96:7): [True: 20.2k, False: 641k]
  ------------------
   97|  20.2k|    self->subband_var.update_old_ener = 1;
   98|  20.2k|    self->subband_var.nrg_dir_prev = self->subband_var.nrg_dir;
   99|  60.8k|    for (ch = 0; ch < self->out_ch_count; ch++)
  ------------------
  |  Branch (99:18): [True: 40.5k, False: 20.2k]
  ------------------
  100|  40.5k|      self->subband_var.nrg_diff_prev[ch] = self->subband_var.nrg_diff[ch];
  101|  20.2k|  } else
  102|   641k|    self->subband_var.update_old_ener++;
  103|       |
  104|   661k|  dir_energy = 0;
  105|       |
  106|  13.2M|  for (n = 6; n < BP_SIZE; n++) {
  ------------------
  |  |   94|  13.2M|#define BP_SIZE 25
  ------------------
  |  Branch (106:15): [True: 12.5M, False: 661k]
  ------------------
  107|  12.5M|    FLOAT32 dir_left_re = self->hyb_dir_out[left_ch][ts][n + 7].re;
  108|  12.5M|    FLOAT32 dir_right_re = self->hyb_dir_out[right_ch][ts][n + 7].re;
  109|  12.5M|    FLOAT32 dir_left_im = self->hyb_dir_out[left_ch][ts][n + 7].im;
  110|  12.5M|    FLOAT32 dir_right_im = self->hyb_dir_out[right_ch][ts][n + 7].im;
  111|       |
  112|  12.5M|    temp = ((dir_left_re + dir_right_re) * (dir_left_re + dir_right_re)) +
  113|  12.5M|           ((dir_left_im + dir_right_im) * (dir_left_im + dir_right_im));
  114|  12.5M|    dir_energy += temp * ixheaacd_bp[n] * ixheaacd_bp[n] * ixheaacd_gf[n] *
  115|  12.5M|                  ixheaacd_gf[n];
  116|  12.5M|  }
  117|       |
  118|   661k|  self->subband_var.nrg_dir =
  119|   661k|      (FLOAT32)(STP_LPF_COEFF1 * self->subband_var.nrg_dir +
  ------------------
  |  |   56|   661k|#define STP_LPF_COEFF1 (0.950f)
  ------------------
  120|   661k|                (1.0 - STP_LPF_COEFF1) * dir_energy);
  ------------------
  |  |   56|   661k|#define STP_LPF_COEFF1 (0.950f)
  ------------------
  121|       |
  122|   661k|  dir_energy /= (self->subband_var.nrg_dir_prev + ABS_THR);
  ------------------
  |  |   25|   661k|#define ABS_THR (1e-9f * 32768 * 32768)
  ------------------
  123|       |
  124|  1.98M|  for (ch = 0; ch < self->out_ch_count; ch++) {
  ------------------
  |  Branch (124:16): [True: 1.32M, False: 661k]
  ------------------
  125|  1.32M|    diff_energy[ch] = 0;
  126|  26.4M|    for (n = 6; n < BP_SIZE; n++) {
  ------------------
  |  |   94|  26.4M|#define BP_SIZE 25
  ------------------
  |  Branch (126:17): [True: 25.1M, False: 1.32M]
  ------------------
  127|  25.1M|      FLOAT32 diff_re = self->hyb_diff_out[ch][ts][n + 7].re;
  128|  25.1M|      FLOAT32 diff_im = self->hyb_diff_out[ch][ts][n + 7].im;
  129|       |
  130|  25.1M|      temp = (diff_re * diff_re) + (diff_im * diff_im);
  131|  25.1M|      diff_energy[ch] += temp * ixheaacd_bp[n] * ixheaacd_bp[n] *
  132|  25.1M|                         ixheaacd_gf[n] * ixheaacd_gf[n];
  133|  25.1M|    }
  134|       |
  135|  1.32M|    self->subband_var.nrg_diff[ch] =
  136|  1.32M|        (FLOAT32)(STP_LPF_COEFF1 * self->subband_var.nrg_diff[ch] +
  ------------------
  |  |   56|  1.32M|#define STP_LPF_COEFF1 (0.950f)
  ------------------
  137|  1.32M|                  (1.0 - STP_LPF_COEFF1) * diff_energy[ch]);
  ------------------
  |  |   56|  1.32M|#define STP_LPF_COEFF1 (0.950f)
  ------------------
  138|  1.32M|    diff_energy[ch] /= (self->subband_var.nrg_diff_prev[ch] + ABS_THR);
  ------------------
  |  |   25|  1.32M|#define ABS_THR (1e-9f * 32768 * 32768)
  ------------------
  139|  1.32M|  }
  140|       |
  141|   661k|  scale[left_ch] = (FLOAT32)sqrt((dir_energy) / (diff_energy[left_ch] + 1e-9));
  142|   661k|  scale[right_ch] =
  143|   661k|      (FLOAT32)sqrt((dir_energy) / (diff_energy[right_ch] + 1e-9));
  144|       |
  145|  1.98M|  for (ch = 0; ch < self->out_ch_count; ch++) {
  ------------------
  |  Branch (145:16): [True: 1.32M, False: 661k]
  ------------------
  146|  1.32M|    scale[ch] = STP_DAMP + (1 - STP_DAMP) * scale[ch];
  ------------------
  |  |   60|  1.32M|#define STP_DAMP (0.1f)
  ------------------
                  scale[ch] = STP_DAMP + (1 - STP_DAMP) * scale[ch];
  ------------------
  |  |   60|  1.32M|#define STP_DAMP (0.1f)
  ------------------
  147|  1.32M|  }
  148|       |
  149|  1.98M|  for (ch = 0; ch < self->out_ch_count; ch++) {
  ------------------
  |  Branch (149:16): [True: 1.32M, False: 661k]
  ------------------
  150|  1.32M|    scale[ch] =
  151|  1.32M|        min(max(scale[ch], (FLOAT32)(1.0 / STP_SCALE_LIMIT)), STP_SCALE_LIMIT);
  ------------------
  |  |   75|  2.64M|#define min(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (75:20): [True: 582k, False: 741k]
  |  |  |  Branch (75:22): [True: 794k, False: 529k]
  |  |  |  Branch (75:35): [True: 52.9k, False: 529k]
  |  |  ------------------
  ------------------
  152|  1.32M|  }
  153|       |
  154|  1.98M|  for (ch = 0; ch < self->out_ch_count; ch++) {
  ------------------
  |  Branch (154:16): [True: 1.32M, False: 661k]
  ------------------
  155|  1.32M|    scale[ch] =
  156|  1.32M|        (FLOAT32)(STP_LPF_COEFF2 * scale[ch] +
  ------------------
  |  |   57|  1.32M|#define STP_LPF_COEFF2 (0.450f)
  ------------------
  157|  1.32M|                  (1.0 - STP_LPF_COEFF2) * self->subband_var.tp_scale_last[ch]);
  ------------------
  |  |   57|  1.32M|#define STP_LPF_COEFF2 (0.450f)
  ------------------
  158|  1.32M|    self->subband_var.tp_scale_last[ch] = scale[ch];
  159|  1.32M|  }
  160|   661k|}
ixheaacd_mps_temp_process.c:ixheaacd_subband_tp:
  303|   158k|static VOID ixheaacd_subband_tp(ia_heaac_mps_state_struct *pstr_mps_state, WORD32 ts) {
  304|   158k|  ia_mps_dec_tp_process_tables_struct *tp_process_table_ptr =
  305|   158k|      pstr_mps_state->ia_mps_dec_mps_table.tp_process_table_ptr;
  306|   158k|  const WORD32 *sqrt_tab =
  307|   158k|      pstr_mps_state->ia_mps_dec_mps_table.common_table_ptr->sqrt_tab;
  308|   158k|  ia_mps_dec_subband_tp_params_struct *sub_band_tp =
  309|   158k|      pstr_mps_state->mps_persistent_mem.sub_band_params;
  310|   158k|  ia_mps_dec_reuse_array_struct *p_array_struct = pstr_mps_state->array_struct;
  311|       |
  312|   158k|  WORD32 temp_1, temp_2;
  313|   158k|  WORD16 qtemp1, qtemp2;
  314|   158k|  WORD32 *qmf_output_real_dry;
  315|   158k|  WORD32 *qmf_output_imag_dry;
  316|   158k|  WORD32 *qmf_output_real_wet;
  317|   158k|  WORD32 *qmf_output_imag_wet;
  318|       |
  319|   158k|  WORD32 *dmx_real;
  320|   158k|  WORD32 *dmx_imag;
  321|   158k|  WORD32 *dry_ener;
  322|   158k|  WORD32 *wet_ener;
  323|   158k|  WORD16 *q_dry_ener;
  324|   158k|  WORD16 *q_wet_ener;
  325|       |
  326|   158k|  WORD32 *p_buffer_real, *p_buffer_imag, *p_buffer_re, *p_buffer_im;
  327|   158k|  WORD32 *p_buf_real, *p_buf_imag, *p_buf_re, *p_buf_im;
  328|   158k|  WORD32 *scale;
  329|   158k|  WORD16 *q_scale;
  330|   158k|  WORD32 damp, one_minus_damp;
  331|   158k|  WORD32 temp;
  332|       |
  333|   158k|  WORD32 *prev_tp_scale = sub_band_tp->prev_tp_scale;
  334|       |
  335|   158k|  WORD32 *old_wet_ener = sub_band_tp->old_wet_ener;
  336|   158k|  WORD16 *q_old_wet_ener = sub_band_tp->q_old_wet_ener;
  337|       |
  338|   158k|  WORD32 *run_wet_ener = sub_band_tp->run_wet_ener;
  339|   158k|  WORD16 *q_run_wet_ener = sub_band_tp->q_run_wet_ener;
  340|       |
  341|   158k|  WORD32 *old_dry_ener = sub_band_tp->old_dry_ener;
  342|   158k|  WORD16 *q_old_dry_ener = sub_band_tp->q_old_dry_ener;
  343|       |
  344|   158k|  WORD32 *run_dry_ener = sub_band_tp->run_dry_ener;
  345|   158k|  WORD16 *q_run_dry_ener = sub_band_tp->q_run_dry_ener;
  346|       |
  347|   158k|  WORD32 *hyb_output_real_dry, *hyb_output_imag_dry;
  348|       |
  349|   158k|  WORD32 *p_hyb_out_dry_real, *p_hyb_out_dry_imag;
  350|       |
  351|   158k|  WORD32 ch, n, no_scaling, i, k = 0, offset;
  352|   158k|  WORD32 i_lf = 0, i_rf = 0, i_c = 0, i_lfe = 0, i_ls = 0, i_rs = 0, i_al = 0, i_ar = 0;
  353|       |
  354|   158k|  WORD32 loop_counter = 0;
  355|       |
  356|   158k|  WORD32 num_input_channels = pstr_mps_state->num_input_channels;
  357|   158k|  WORD32 num_output_channels = pstr_mps_state->num_output_channels;
  358|   158k|  WORD32 hybrid_bands = pstr_mps_state->hybrid_bands;
  359|       |
  360|   158k|  WORD32 tree_config = pstr_mps_state->tree_config;
  361|   158k|  WORD64 dmx_real64 = 0;
  362|   158k|  WORD64 dmx_imag64 = 0;
  363|       |
  364|   158k|  dry_ener = pstr_mps_state->mps_scratch_mem_v;
  365|   158k|  q_dry_ener = (WORD16 *)pstr_mps_state->mps_scratch_mem_v +
  366|   158k|               IXHEAAC_GET_SIZE_ALIGNED_TYPE(INPUT_CHX2, sizeof(*q_dry_ener), BYTE_ALIGN_8);
  ------------------
  |  |   89|   158k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  367|       |
  368|   158k|  wet_ener =
  369|   158k|      dry_ener + IXHEAAC_GET_SIZE_ALIGNED_TYPE(INPUT_CHX1_5, sizeof(*wet_ener), BYTE_ALIGN_8);
  ------------------
  |  |   89|   158k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  370|   158k|  q_wet_ener = q_dry_ener +
  371|   158k|               IXHEAAC_GET_SIZE_ALIGNED_TYPE(IN_CH_2XOUT_CH, sizeof(*q_wet_ener), BYTE_ALIGN_8);
  ------------------
  |  |   89|   158k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  372|       |
  373|   158k|  scale = wet_ener + IXHEAAC_GET_SIZE_ALIGNED_TYPE(OUTPUT_CHX1_5, sizeof(*scale), BYTE_ALIGN_8);
  ------------------
  |  |   89|   158k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  374|   158k|  q_scale =
  375|   158k|      q_wet_ener + IXHEAAC_GET_SIZE_ALIGNED_TYPE(OUTPUT_CHX3, sizeof(*q_scale), BYTE_ALIGN_8);
  ------------------
  |  |   89|   158k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  376|       |
  377|   158k|  dmx_real =
  378|   158k|      scale + IXHEAAC_GET_SIZE_ALIGNED_TYPE(OUTPUT_CHX1_5, sizeof(*dmx_real), BYTE_ALIGN_8);
  ------------------
  |  |   89|   158k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  379|   158k|  dmx_imag =
  380|   158k|      dmx_real + IXHEAAC_GET_SIZE_ALIGNED_TYPE(IN_CHXBP_SIZE, sizeof(*dmx_imag), BYTE_ALIGN_8);
  ------------------
  |  |   89|   158k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  381|       |
  382|   158k|  qmf_output_real_dry = dmx_imag + IXHEAAC_GET_SIZE_ALIGNED_TYPE(
  ------------------
  |  |   89|   158k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  383|   158k|                                       IN_CHXBP_SIZE, sizeof(*qmf_output_real_dry), BYTE_ALIGN_8);
  384|       |
  385|   158k|  qmf_output_imag_dry =
  386|   158k|      qmf_output_real_dry +
  387|   158k|      IXHEAAC_GET_SIZE_ALIGNED_TYPE(OUT_CHXQB, sizeof(*qmf_output_imag_dry), BYTE_ALIGN_8);
  ------------------
  |  |   89|   158k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  388|       |
  389|   158k|  qmf_output_real_wet =
  390|   158k|      qmf_output_imag_dry +
  391|   158k|      IXHEAAC_GET_SIZE_ALIGNED_TYPE(OUT_CHXQB, sizeof(*qmf_output_real_wet), BYTE_ALIGN_8);
  ------------------
  |  |   89|   158k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  392|       |
  393|   158k|  qmf_output_imag_wet =
  394|   158k|      qmf_output_real_wet +
  395|   158k|      IXHEAAC_GET_SIZE_ALIGNED_TYPE(OUT_CHXQB, sizeof(*qmf_output_imag_wet), BYTE_ALIGN_8);
  ------------------
  |  |   89|   158k|  ((((num_ele * ele_size) + (alignment - 1)) & ~(alignment - 1)) / ele_size)
  ------------------
  396|       |
  397|   158k|  if (sub_band_tp->update_old_ener == STP_UPDATE_ENERGY_RATE) {
  ------------------
  |  |   58|   158k|#define STP_UPDATE_ENERGY_RATE (32)
  ------------------
  |  Branch (397:7): [True: 3.74k, False: 154k]
  ------------------
  398|  3.74k|    sub_band_tp->update_old_ener = 1;
  399|  23.5k|    for (ch = 0; ch < num_input_channels; ch++) {
  ------------------
  |  Branch (399:18): [True: 19.8k, False: 3.74k]
  ------------------
  400|  19.8k|      old_dry_ener[ch] = run_dry_ener[ch];
  401|  19.8k|      q_old_dry_ener[ch] = q_run_dry_ener[ch];
  402|  19.8k|    }
  403|  33.2k|    for (ch = 0; ch < num_output_channels; ch++) {
  ------------------
  |  Branch (403:18): [True: 29.4k, False: 3.74k]
  ------------------
  404|  29.4k|      old_wet_ener[ch] = run_wet_ener[ch];
  405|  29.4k|      q_old_wet_ener[ch] = q_run_wet_ener[ch];
  406|  29.4k|    }
  407|  3.74k|  } else
  408|   154k|    sub_band_tp->update_old_ener++;
  409|       |
  410|  1.42M|  for (ch = 0; ch < MAX_OUTPUT_CHANNELS_MPS; ch++) {
  ------------------
  |  |   71|  1.42M|#define MAX_OUTPUT_CHANNELS_MPS (8)
  ------------------
  |  Branch (410:16): [True: 1.26M, False: 158k]
  ------------------
  411|  1.26M|    scale[ch] = ONE_IN_Q15;
  ------------------
  |  |   41|  1.26M|#define ONE_IN_Q15 (32768)
  ------------------
  412|  1.26M|    q_scale[ch] = 15;
  413|  1.26M|  }
  414|       |
  415|   158k|  switch (tree_config) {
  416|  4.08k|    case TREE_5151:
  ------------------
  |  Branch (416:5): [True: 4.08k, False: 153k]
  ------------------
  417|  4.08k|      i_lf = 0;
  418|  4.08k|      i_rf = 1;
  419|  4.08k|      i_c = 2;
  420|  4.08k|      i_lfe = 3;
  421|  4.08k|      i_ls = 4;
  422|  4.08k|      i_rs = 5;
  423|  4.08k|      loop_counter = 6;
  424|  4.08k|      break;
  425|  7.96k|    case TREE_5152:
  ------------------
  |  Branch (425:5): [True: 7.96k, False: 150k]
  ------------------
  426|  7.96k|      i_lf = 0;
  427|  7.96k|      i_rf = 2;
  428|  7.96k|      i_c = 4;
  429|  7.96k|      i_lfe = 5;
  430|  7.96k|      i_ls = 1;
  431|  7.96k|      i_rs = 3;
  432|  7.96k|      loop_counter = 5;
  433|  7.96k|      break;
  434|  11.3k|    case TREE_525:
  ------------------
  |  Branch (434:5): [True: 11.3k, False: 146k]
  ------------------
  435|  11.3k|      i_lf = 0;
  436|  11.3k|      i_rf = 2;
  437|  11.3k|      i_c = 4;
  438|  11.3k|      i_lfe = 5;
  439|  11.3k|      i_ls = 1;
  440|  11.3k|      i_rs = 3;
  441|  11.3k|      loop_counter = 4;
  442|  11.3k|      break;
  443|  16.1k|    case TREE_7271:
  ------------------
  |  Branch (443:5): [True: 16.1k, False: 141k]
  ------------------
  444|  21.9k|    case TREE_7272:
  ------------------
  |  Branch (444:5): [True: 5.85k, False: 152k]
  ------------------
  445|   122k|    case TREE_7572:
  ------------------
  |  Branch (445:5): [True: 100k, False: 57.8k]
  ------------------
  446|   122k|      i_lf = 0;
  447|   122k|      i_rf = 3;
  448|   122k|      i_c = 6;
  449|   122k|      i_lfe = 7;
  450|   122k|      i_ls = 2;
  451|   122k|      i_rs = 5;
  452|   122k|      i_al = 1;
  453|   122k|      i_ar = 4;
  454|   122k|      loop_counter = 6;
  455|   122k|      break;
  456|  12.4k|    case TREE_7571:
  ------------------
  |  Branch (456:5): [True: 12.4k, False: 145k]
  ------------------
  457|  12.4k|      i_lf = 0;
  458|  12.4k|      i_rf = 3;
  459|  12.4k|      i_c = 6;
  460|  12.4k|      i_lfe = 7;
  461|  12.4k|      i_ls = 2;
  462|  12.4k|      i_rs = 5;
  463|  12.4k|      i_al = 1;
  464|  12.4k|      i_ar = 4;
  465|  12.4k|      loop_counter = 5;
  466|  12.4k|      break;
  467|      0|    default:
  ------------------
  |  Branch (467:5): [True: 0, False: 158k]
  ------------------
  468|      0|      break;
  469|   158k|  }
  470|       |
  471|   158k|  offset = ts * MAX_HYBRID_BANDS;
  ------------------
  |  |   65|   158k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|   158k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  472|   158k|  p_buffer_real = p_array_struct->buf_real + offset + HYBRID_BAND_BORDER;
  ------------------
  |  |   33|   158k|#define HYBRID_BAND_BORDER (12)
  ------------------
  473|   158k|  p_buffer_imag = p_array_struct->buf_imag + offset + HYBRID_BAND_BORDER;
  ------------------
  |  |   33|   158k|#define HYBRID_BAND_BORDER (12)
  ------------------
  474|       |
  475|  1.37M|  for (ch = 0; ch < num_output_channels; ch++) {
  ------------------
  |  Branch (475:16): [True: 1.21M, False: 158k]
  ------------------
  476|  1.21M|    p_buffer_re = p_buffer_real;
  477|  1.21M|    p_buffer_im = p_buffer_imag;
  478|       |
  479|  25.5M|    for (i = QMF_OUT_START_IDX; i < BP_SIZE; i++) {
  ------------------
  |  |   31|  1.21M|#define QMF_OUT_START_IDX (5)
  ------------------
                  for (i = QMF_OUT_START_IDX; i < BP_SIZE; i++) {
  ------------------
  |  |   94|  25.5M|#define BP_SIZE 25
  ------------------
  |  Branch (479:33): [True: 24.3M, False: 1.21M]
  ------------------
  480|  24.3M|      *qmf_output_real_wet++ = *p_buffer_re++;
  481|  24.3M|      *qmf_output_imag_wet++ = *p_buffer_im++;
  482|  24.3M|    }
  483|  1.21M|    p_buffer_real += TSXHB;
  ------------------
  |  |  106|  1.21M|#define TSXHB (5112)
  ------------------
  484|  1.21M|    p_buffer_imag += TSXHB;
  ------------------
  |  |  106|  1.21M|#define TSXHB (5112)
  ------------------
  485|  1.21M|  }
  486|   158k|  i = QMF_OUT_OFFSET * num_output_channels;
  ------------------
  |  |   32|   158k|#define QMF_OUT_OFFSET (20)
  ------------------
  487|   158k|  qmf_output_real_wet -= i;
  488|   158k|  qmf_output_imag_wet -= i;
  489|       |
  490|   158k|  p_buffer_re = qmf_output_real_dry;
  491|   158k|  p_buffer_im = qmf_output_imag_dry;
  492|       |
  493|   158k|  hyb_output_real_dry =
  494|   158k|      p_array_struct->hyb_output_real_dry + ts * MAX_HYBRID_BANDS + 6;
  ------------------
  |  |   65|   158k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|   158k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  495|   158k|  hyb_output_imag_dry =
  496|   158k|      p_array_struct->hyb_output_imag_dry + ts * MAX_HYBRID_BANDS + 6;
  ------------------
  |  |   65|   158k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|   158k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  497|       |
  498|  1.06M|  for (ch = 0; ch < loop_counter; ch++) {
  ------------------
  |  Branch (498:16): [True: 904k, False: 158k]
  ------------------
  499|   904k|    *p_buffer_re++ = ixheaac_add32_sat(hyb_output_real_dry[0], hyb_output_real_dry[1]);
  500|   904k|    *p_buffer_im++ = ixheaac_add32_sat(hyb_output_imag_dry[0], hyb_output_imag_dry[1]);
  501|       |
  502|   904k|    hyb_output_real_dry += TSXHB;
  ------------------
  |  |  106|   904k|#define TSXHB (5112)
  ------------------
  503|   904k|    hyb_output_imag_dry += TSXHB;
  ------------------
  |  |  106|   904k|#define TSXHB (5112)
  ------------------
  504|   904k|  }
  505|       |
  506|   158k|  hyb_output_real_dry =
  507|   158k|      p_array_struct->hyb_output_real_dry + ts * MAX_HYBRID_BANDS + 8;
  ------------------
  |  |   65|   158k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|   158k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  508|   158k|  hyb_output_imag_dry =
  509|   158k|      p_array_struct->hyb_output_imag_dry + ts * MAX_HYBRID_BANDS + 8;
  ------------------
  |  |   65|   158k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|   158k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  510|       |
  511|  1.06M|  for (ch = 0; ch < loop_counter; ch++) {
  ------------------
  |  Branch (511:16): [True: 904k, False: 158k]
  ------------------
  512|   904k|    *p_buffer_re++ = ixheaac_add32_sat(hyb_output_real_dry[0], hyb_output_real_dry[1]);
  513|   904k|    *p_buffer_im++ = ixheaac_add32_sat(hyb_output_imag_dry[0], hyb_output_imag_dry[1]);
  514|       |
  515|   904k|    hyb_output_real_dry += TSXHB;
  ------------------
  |  |  106|   904k|#define TSXHB (5112)
  ------------------
  516|   904k|    hyb_output_imag_dry += TSXHB;
  ------------------
  |  |  106|   904k|#define TSXHB (5112)
  ------------------
  517|   904k|  }
  518|       |
  519|   158k|  p_hyb_out_dry_real =
  520|   158k|      p_array_struct->hyb_output_real_dry + ts * MAX_HYBRID_BANDS + 10;
  ------------------
  |  |   65|   158k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|   158k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  521|   158k|  p_hyb_out_dry_imag =
  522|   158k|      p_array_struct->hyb_output_imag_dry + ts * MAX_HYBRID_BANDS + 10;
  ------------------
  |  |   65|   158k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|   158k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
  523|       |
  524|  3.63M|  for (i = 3; i < BP_SIZE; i++) {
  ------------------
  |  |   94|  3.63M|#define BP_SIZE 25
  ------------------
  |  Branch (524:15): [True: 3.47M, False: 158k]
  ------------------
  525|  3.47M|    hyb_output_real_dry = p_hyb_out_dry_real;
  526|  3.47M|    hyb_output_imag_dry = p_hyb_out_dry_imag;
  527|       |
  528|  23.3M|    for (ch = 0; ch < loop_counter; ch++) {
  ------------------
  |  Branch (528:18): [True: 19.9M, False: 3.47M]
  ------------------
  529|  19.9M|      *p_buffer_re++ = *hyb_output_real_dry;
  530|  19.9M|      *p_buffer_im++ = *hyb_output_imag_dry;
  531|       |
  532|  19.9M|      hyb_output_real_dry += TSXHB;
  ------------------
  |  |  106|  19.9M|#define TSXHB (5112)
  ------------------
  533|  19.9M|      hyb_output_imag_dry += TSXHB;
  ------------------
  |  |  106|  19.9M|#define TSXHB (5112)
  ------------------
  534|  19.9M|    }
  535|  3.47M|    p_hyb_out_dry_real++;
  536|  3.47M|    p_hyb_out_dry_imag++;
  537|  3.47M|  }
  538|       |
  539|  3.95M|  for (n = 1; n < BP_SIZE; n++) {
  ------------------
  |  |   94|  3.95M|#define BP_SIZE 25
  ------------------
  |  Branch (539:15): [True: 3.79M, False: 158k]
  ------------------
  540|  3.79M|    switch (tree_config) {
  541|  97.9k|      case TREE_5151:
  ------------------
  |  Branch (541:7): [True: 97.9k, False: 3.69M]
  ------------------
  542|  97.9k|        dmx_real64 =
  543|  97.9k|            ixheaac_mult32x32in64(*qmf_output_real_dry++, tp_process_table_ptr->bpxgf[n]);
  544|  97.9k|        dmx_real64 = ixheaac_mac32x32in64(dmx_real64, *qmf_output_real_dry++,
  545|  97.9k|                                          tp_process_table_ptr->bpxgf[n]);
  546|  97.9k|        dmx_real64 = ixheaac_mac32x32in64(dmx_real64, *qmf_output_real_dry++,
  547|  97.9k|                                          tp_process_table_ptr->bpxgf[n]);	    
  548|  97.9k|        qmf_output_real_dry++;
  549|  97.9k|        dmx_real64 = ixheaac_mac32x32in64(dmx_real64, *qmf_output_real_dry++,
  550|  97.9k|                                          tp_process_table_ptr->bpxgf[n]);
  551|  97.9k|        dmx_real64 = ixheaac_mac32x32in64(dmx_real64, *qmf_output_real_dry++,
  552|  97.9k|                                          tp_process_table_ptr->bpxgf[n]);
  553|  97.9k|        *dmx_real = (WORD32)(dmx_real64 >> 30);
  554|  97.9k|        dmx_real++;
  555|  97.9k|        dmx_real++;
  556|       |
  557|  97.9k|        break;
  558|   191k|      case TREE_5152:
  ------------------
  |  Branch (558:7): [True: 191k, False: 3.60M]
  ------------------
  559|   191k|        dmx_real64 =
  560|   191k|            ixheaac_mult32x32in64(*qmf_output_real_dry++, tp_process_table_ptr->bpxgf[n]);
  561|   191k|        dmx_real64 = ixheaac_mac32x32in64(dmx_real64, *qmf_output_real_dry++,
  562|   191k|                                          tp_process_table_ptr->bpxgf[n]);
  563|   191k|        dmx_real64 = ixheaac_mac32x32in64(dmx_real64, *qmf_output_real_dry++,
  564|   191k|                                          tp_process_table_ptr->bpxgf[n]);
  565|   191k|        dmx_real64 = ixheaac_mac32x32in64(dmx_real64, *qmf_output_real_dry++,
  566|   191k|                                          tp_process_table_ptr->bpxgf[n]);
  567|   191k|        dmx_real64 = ixheaac_mac32x32in64(dmx_real64, *qmf_output_real_dry++,
  568|   191k|                                          tp_process_table_ptr->bpxgf[n]);
  569|   191k|        *dmx_real = (WORD32)(dmx_real64 >> 30);
  570|   191k|        dmx_real++;
  571|   191k|        dmx_real++;
  572|       |
  573|   191k|        break;
  574|   272k|      case TREE_525:
  ------------------
  |  Branch (574:7): [True: 272k, False: 3.51M]
  ------------------
  575|   272k|        dmx_real64 =
  576|   272k|            ixheaac_mult32x32in64(*qmf_output_real_dry++, tp_process_table_ptr->bpxgf[n]);
  577|   272k|        dmx_real64 = ixheaac_mac32x32in64(dmx_real64, *qmf_output_real_dry++,
  578|   272k|                                          tp_process_table_ptr->bpxgf[n]);
  579|   272k|        *dmx_real = (WORD32)(dmx_real64 >> 30);
  580|   272k|        dmx_real++;
  581|       |
  582|   272k|        dmx_real64 =
  583|   272k|            ixheaac_mult32x32in64(*qmf_output_real_dry++, tp_process_table_ptr->bpxgf[n]);
  584|   272k|        dmx_real64 = ixheaac_mac32x32in64(dmx_real64, *qmf_output_real_dry++,
  585|   272k|                                          tp_process_table_ptr->bpxgf[n]);
  586|   272k|        *dmx_real = (WORD32)(dmx_real64 >> 30);
  587|   272k|        dmx_real++;
  588|       |
  589|   272k|        break;
  590|   387k|      case TREE_7271:
  ------------------
  |  Branch (590:7): [True: 387k, False: 3.40M]
  ------------------
  591|   527k|      case TREE_7272:
  ------------------
  |  Branch (591:7): [True: 140k, False: 3.65M]
  ------------------
  592|   527k|        dmx_real64 =
  593|   527k|            ixheaac_mult32x32in64(*qmf_output_real_dry++, tp_process_table_ptr->bpxgf[n]);
  594|   527k|        dmx_real64 = ixheaac_mac32x32in64(dmx_real64, *qmf_output_real_dry++,
  595|   527k|                                          tp_process_table_ptr->bpxgf[n]);
  596|   527k|        dmx_real64 = ixheaac_mac32x32in64(dmx_real64, *qmf_output_real_dry++,
  597|   527k|                                          tp_process_table_ptr->bpxgf[n]);
  598|   527k|        *dmx_real = (WORD32)(dmx_real64 >> 30);
  599|   527k|        dmx_real++;
  600|       |
  601|   527k|        dmx_real64 =
  602|   527k|            ixheaac_mult32x32in64(*qmf_output_real_dry++, tp_process_table_ptr->bpxgf[n]);
  603|   527k|        dmx_real64 = ixheaac_mac32x32in64(dmx_real64, *qmf_output_real_dry++,
  604|   527k|                                          tp_process_table_ptr->bpxgf[n]);
  605|   527k|        dmx_real64 = ixheaac_mac32x32in64(dmx_real64, *qmf_output_real_dry++,
  606|   527k|                                          tp_process_table_ptr->bpxgf[n]);
  607|   527k|        *dmx_real = (WORD32)(dmx_real64 >> 30);
  608|   527k|        dmx_real++;
  609|       |
  610|   527k|        break;
  611|   297k|      case TREE_7571:
  ------------------
  |  Branch (611:7): [True: 297k, False: 3.49M]
  ------------------
  612|       |
  613|   297k|        dmx_real64 =
  614|   297k|            ixheaac_mult32x32in64(*qmf_output_real_dry++, tp_process_table_ptr->bpxgf[n]);
  615|   297k|        dmx_real64 = ixheaac_mac32x32in64(dmx_real64, *qmf_output_real_dry++,
  616|   297k|                                          tp_process_table_ptr->bpxgf[n]);
  617|   297k|        qmf_output_real_dry++;
  618|   297k|        *dmx_real = (WORD32)(dmx_real64 >> 30);
  619|       |		
  620|   297k|        dmx_real++;
  621|       |
  622|   297k|        dmx_real64 =
  623|   297k|            ixheaac_mult32x32in64(*qmf_output_real_dry++, tp_process_table_ptr->bpxgf[n]);
  624|   297k|        dmx_real64 = ixheaac_mac32x32in64(dmx_real64, *qmf_output_real_dry++,
  625|   297k|                                          tp_process_table_ptr->bpxgf[n]);
  626|   297k|        *dmx_real = (WORD32)(dmx_real64 >> 30);
  627|   297k|        dmx_real++;
  628|       |
  629|   297k|        break;
  630|  2.40M|      case TREE_7572:
  ------------------
  |  Branch (630:7): [True: 2.40M, False: 1.38M]
  ------------------
  631|  2.40M|        qmf_output_real_dry++;
  632|  2.40M|        dmx_real64 =
  633|  2.40M|            ixheaac_mult32x32in64(*qmf_output_real_dry++, tp_process_table_ptr->bpxgf[n]);
  634|  2.40M|        dmx_real64 = ixheaac_mac32x32in64(dmx_real64, *qmf_output_real_dry++,
  635|  2.40M|                                          tp_process_table_ptr->bpxgf[n]);
  636|  2.40M|        qmf_output_real_dry++;
  637|  2.40M|        *dmx_real = (WORD32)(dmx_real64 >> 30);
  638|  2.40M|        dmx_real++;
  639|       |
  640|  2.40M|        dmx_real64 =
  641|  2.40M|            ixheaac_mult32x32in64(*qmf_output_real_dry++, tp_process_table_ptr->bpxgf[n]);
  642|  2.40M|        dmx_real64 = ixheaac_mac32x32in64(dmx_real64, *qmf_output_real_dry++,
  643|  2.40M|                                          tp_process_table_ptr->bpxgf[n]);
  644|  2.40M|        *dmx_real = (WORD32)(dmx_real64 >> 30);
  645|  2.40M|        dmx_real++;
  646|       |
  647|  2.40M|        break;
  648|      0|      default:
  ------------------
  |  Branch (648:7): [True: 0, False: 3.79M]
  ------------------
  649|      0|        break;
  650|  3.79M|    }
  651|  3.79M|  }
  652|   158k|  dmx_real -= DMX_OFFSET;
  ------------------
  |  |   29|   158k|#define DMX_OFFSET (48)
  ------------------
  653|       |
  654|  3.95M|  for (n = 1; n < BP_SIZE; n++) {
  ------------------
  |  |   94|  3.95M|#define BP_SIZE 25
  ------------------
  |  Branch (654:15): [True: 3.79M, False: 158k]
  ------------------
  655|  3.79M|    switch (tree_config) {
  656|  97.9k|      case TREE_5151:
  ------------------
  |  Branch (656:7): [True: 97.9k, False: 3.69M]
  ------------------
  657|  97.9k|        dmx_imag64 =
  658|  97.9k|            ixheaac_mult32x32in64(*qmf_output_imag_dry++, tp_process_table_ptr->bpxgf[n]);
  659|  97.9k|        dmx_imag64 = ixheaac_mac32x32in64(dmx_imag64, *qmf_output_imag_dry++,
  660|  97.9k|                                          tp_process_table_ptr->bpxgf[n]);
  661|  97.9k|        dmx_imag64 = ixheaac_mac32x32in64(dmx_imag64, *qmf_output_imag_dry++,
  662|  97.9k|                                          tp_process_table_ptr->bpxgf[n]);	    
  663|  97.9k|        qmf_output_imag_dry++;
  664|  97.9k|        dmx_imag64 = ixheaac_mac32x32in64(dmx_imag64, *qmf_output_imag_dry++,
  665|  97.9k|                                          tp_process_table_ptr->bpxgf[n]);
  666|  97.9k|        dmx_imag64 = ixheaac_mac32x32in64(dmx_imag64, *qmf_output_imag_dry++,
  667|  97.9k|                                          tp_process_table_ptr->bpxgf[n]);
  668|  97.9k|        *dmx_imag = (WORD32)(dmx_imag64 >> 30);
  669|  97.9k|		dmx_imag++;
  670|  97.9k|		dmx_imag++;
  671|       |
  672|  97.9k|        break;
  673|   191k|      case TREE_5152:
  ------------------
  |  Branch (673:7): [True: 191k, False: 3.60M]
  ------------------
  674|       |
  675|   191k|        dmx_imag64 =
  676|   191k|            ixheaac_mult32x32in64(*qmf_output_imag_dry++, tp_process_table_ptr->bpxgf[n]);
  677|   191k|        dmx_imag64 = ixheaac_mac32x32in64(dmx_imag64, *qmf_output_imag_dry++,
  678|   191k|                                          tp_process_table_ptr->bpxgf[n]);
  679|   191k|        dmx_imag64 = ixheaac_mac32x32in64(dmx_imag64, *qmf_output_imag_dry++,
  680|   191k|                                          tp_process_table_ptr->bpxgf[n]);
  681|   191k|        dmx_imag64 = ixheaac_mac32x32in64(dmx_imag64, *qmf_output_imag_dry++,
  682|   191k|                                          tp_process_table_ptr->bpxgf[n]);
  683|   191k|        dmx_imag64 = ixheaac_mac32x32in64(dmx_imag64, *qmf_output_imag_dry++,
  684|   191k|                                          tp_process_table_ptr->bpxgf[n]);
  685|   191k|        *dmx_imag = (WORD32)(dmx_imag64 >> 30);
  686|   191k|        dmx_imag++;
  687|   191k|        dmx_imag++;
  688|       |		
  689|   191k|        break;
  690|   272k|      case TREE_525:
  ------------------
  |  Branch (690:7): [True: 272k, False: 3.51M]
  ------------------
  691|   272k|        dmx_imag64 =
  692|   272k|            ixheaac_mult32x32in64(*qmf_output_imag_dry++, tp_process_table_ptr->bpxgf[n]);
  693|   272k|        dmx_imag64 = ixheaac_mac32x32in64(dmx_imag64, *qmf_output_imag_dry++,
  694|   272k|                                          tp_process_table_ptr->bpxgf[n]);
  695|   272k|        *dmx_imag = (WORD32)(dmx_imag64 >> 30);
  696|   272k|        dmx_imag++;
  697|       |
  698|   272k|        dmx_imag64 =
  699|   272k|            ixheaac_mult32x32in64(*qmf_output_imag_dry++, tp_process_table_ptr->bpxgf[n]);
  700|   272k|        dmx_imag64 = ixheaac_mac32x32in64(dmx_imag64, *qmf_output_imag_dry++,
  701|   272k|                                          tp_process_table_ptr->bpxgf[n]);
  702|   272k|        *dmx_imag = (WORD32)(dmx_imag64 >> 30);
  703|   272k|        dmx_imag++;
  704|   272k|        break;
  705|   387k|      case TREE_7271:
  ------------------
  |  Branch (705:7): [True: 387k, False: 3.40M]
  ------------------
  706|   527k|      case TREE_7272:
  ------------------
  |  Branch (706:7): [True: 140k, False: 3.65M]
  ------------------
  707|   527k|        dmx_imag64 =
  708|   527k|            ixheaac_mult32x32in64(*qmf_output_imag_dry++, tp_process_table_ptr->bpxgf[n]);
  709|   527k|        dmx_imag64 = ixheaac_mac32x32in64(dmx_imag64, *qmf_output_imag_dry++,
  710|   527k|                                          tp_process_table_ptr->bpxgf[n]);
  711|   527k|        dmx_imag64 = ixheaac_mac32x32in64(dmx_imag64, *qmf_output_imag_dry++,
  712|   527k|                                          tp_process_table_ptr->bpxgf[n]);
  713|   527k|        *dmx_imag = (WORD32)(dmx_imag64 >> 30);
  714|   527k|        dmx_imag++;
  715|       |
  716|   527k|        dmx_imag64 =
  717|   527k|            ixheaac_mult32x32in64(*qmf_output_imag_dry++, tp_process_table_ptr->bpxgf[n]);
  718|   527k|        dmx_imag64 = ixheaac_mac32x32in64(dmx_imag64, *qmf_output_imag_dry++,
  719|   527k|                                          tp_process_table_ptr->bpxgf[n]);
  720|   527k|        dmx_imag64 = ixheaac_mac32x32in64(dmx_imag64, *qmf_output_imag_dry++,
  721|   527k|                                          tp_process_table_ptr->bpxgf[n]);
  722|   527k|        *dmx_imag = (WORD32)(dmx_imag64 >> 30);
  723|   527k|        dmx_imag++;
  724|       |
  725|   527k|        break;
  726|   297k|      case TREE_7571:
  ------------------
  |  Branch (726:7): [True: 297k, False: 3.49M]
  ------------------
  727|   297k|        dmx_imag64 =
  728|   297k|            ixheaac_mult32x32in64(*qmf_output_imag_dry++, tp_process_table_ptr->bpxgf[n]);
  729|   297k|        dmx_imag64 = ixheaac_mac32x32in64(dmx_imag64, *qmf_output_imag_dry++,
  730|   297k|                                          tp_process_table_ptr->bpxgf[n]);
  731|   297k|        qmf_output_imag_dry++;
  732|   297k|        *dmx_imag = (WORD32)(dmx_imag64 >> 30);
  733|       |		
  734|   297k|        dmx_imag++;
  735|       |
  736|   297k|        dmx_imag64 =
  737|   297k|            ixheaac_mult32x32in64(*qmf_output_imag_dry++, tp_process_table_ptr->bpxgf[n]);
  738|   297k|        dmx_imag64 = ixheaac_mac32x32in64(dmx_imag64, *qmf_output_imag_dry++,
  739|   297k|                                          tp_process_table_ptr->bpxgf[n]);
  740|   297k|        *dmx_imag = (WORD32)(dmx_imag64 >> 30);
  741|   297k|        dmx_imag++;
  742|       |
  743|       |
  744|   297k|        break;
  745|  2.40M|      case TREE_7572:
  ------------------
  |  Branch (745:7): [True: 2.40M, False: 1.38M]
  ------------------
  746|  2.40M|        qmf_output_imag_dry++;
  747|  2.40M|        dmx_imag64 =
  748|  2.40M|            ixheaac_mult32x32in64(*qmf_output_imag_dry++, tp_process_table_ptr->bpxgf[n]);
  749|  2.40M|        dmx_imag64 = ixheaac_mac32x32in64(dmx_imag64, *qmf_output_imag_dry++,
  750|  2.40M|                                          tp_process_table_ptr->bpxgf[n]);
  751|  2.40M|        qmf_output_imag_dry++;
  752|  2.40M|        *dmx_imag = (WORD32)(dmx_imag64 >> 30);
  753|  2.40M|        dmx_imag++;
  754|       |
  755|  2.40M|        dmx_imag64 =
  756|  2.40M|            ixheaac_mult32x32in64(*qmf_output_imag_dry++, tp_process_table_ptr->bpxgf[n]);
  757|  2.40M|        dmx_imag64 = ixheaac_mac32x32in64(dmx_imag64, *qmf_output_imag_dry++,
  758|  2.40M|                                          tp_process_table_ptr->bpxgf[n]);
  759|  2.40M|        *dmx_imag = (WORD32)(dmx_imag64 >> 30);
  760|  2.40M|        dmx_imag++;
  761|       |
  762|  2.40M|        break;
  763|      0|      default:
  ------------------
  |  Branch (763:7): [True: 0, False: 3.79M]
  ------------------
  764|      0|        break;
  765|  3.79M|    }
  766|  3.79M|  }
  767|   158k|  dmx_imag -= DMX_OFFSET;
  ------------------
  |  |   29|   158k|#define DMX_OFFSET (48)
  ------------------
  768|       |
  769|   461k|  for (ch = 0; ch < min(2, num_input_channels); ch++) {
  ------------------
  |  |   75|   461k|#define min(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (75:20): [True: 337k, False: 124k]
  |  |  ------------------
  ------------------
  |  Branch (769:16): [True: 303k, False: 158k]
  ------------------
  770|   303k|    dry_ener[ch] = 0;
  771|   303k|    q_dry_ener[ch] = 15;
  772|       |
  773|  7.59M|    for (n = 1; n < BP_SIZE; n++) {
  ------------------
  |  |   94|  7.59M|#define BP_SIZE 25
  ------------------
  |  Branch (773:17): [True: 7.29M, False: 303k]
  ------------------
  774|  7.29M|      qtemp1 = 10;
  775|  7.29M|      temp_1 = ixheaacd_mps_mult32(*dmx_real, *dmx_real, &qtemp1, qtemp1);
  776|  7.29M|      dmx_real += 2;
  777|  7.29M|      dry_ener[ch] =
  778|  7.29M|          ixheaacd_mps_add32(dry_ener[ch], temp_1, &q_dry_ener[ch], qtemp1);
  779|       |
  780|  7.29M|      qtemp1 = 10;
  781|  7.29M|      temp_1 = ixheaacd_mps_mult32(*dmx_imag, *dmx_imag, &qtemp1, qtemp1);
  782|  7.29M|      dmx_imag += 2;
  783|  7.29M|      dry_ener[ch] =
  784|  7.29M|          ixheaacd_mps_add32(dry_ener[ch], temp_1, &q_dry_ener[ch], qtemp1);
  785|  7.29M|    }
  786|   303k|    dmx_real -= DMX_OFFSET_MINUS_ONE;
  ------------------
  |  |   30|   303k|#define DMX_OFFSET_MINUS_ONE (47)
  ------------------
  787|   303k|    dmx_imag -= DMX_OFFSET_MINUS_ONE;
  ------------------
  |  |   30|   303k|#define DMX_OFFSET_MINUS_ONE (47)
  ------------------
  788|       |
  789|   303k|    temp_1 = ixheaacd_mps_mult32_shr_15(run_dry_ener[ch], STP_LPF_COEFF1_FIX);
  ------------------
  |  |   23|   303k|#define STP_LPF_COEFF1_FIX (31130)
  ------------------
  790|       |
  791|   303k|    temp_2 = ONE_IN_Q15 - STP_LPF_COEFF1_FIX;
  ------------------
  |  |   41|   303k|#define ONE_IN_Q15 (32768)
  ------------------
                  temp_2 = ONE_IN_Q15 - STP_LPF_COEFF1_FIX;
  ------------------
  |  |   23|   303k|#define STP_LPF_COEFF1_FIX (31130)
  ------------------
  792|   303k|    temp_2 = ixheaacd_mps_mult32_shr_15(temp_2, dry_ener[ch]);
  793|       |
  794|   303k|    run_dry_ener[ch] = ixheaacd_mps_add32(temp_1, temp_2, &(q_run_dry_ener[ch]),
  795|   303k|                                          q_dry_ener[ch]);
  796|       |
  797|   303k|    qtemp1 = q_old_dry_ener[ch];
  798|   303k|    temp_1 = ixheaacd_mps_add32(old_dry_ener[ch], ABS_THR_FIX, &qtemp1, 15);
  ------------------
  |  |   59|   303k|#define ABS_THR_FIX (35184)
  ------------------
  799|   303k|    ;
  800|       |
  801|   303k|    dry_ener[ch] = ixheaacd_mps_div_32(dry_ener[ch], temp_1, &qtemp2);
  802|   303k|    q_dry_ener[ch] = qtemp2 + q_dry_ener[ch] - qtemp1;
  803|   303k|  }
  804|       |
  805|  1.37M|  for (ch = 0; ch < num_output_channels; ch++) {
  ------------------
  |  Branch (805:16): [True: 1.21M, False: 158k]
  ------------------
  806|  1.21M|    if (ch == i_lfe) continue;
  ------------------
  |  Branch (806:9): [True: 158k, False: 1.05M]
  ------------------
  807|  1.05M|    if ((tree_config >= TREE_525) && (ch == i_c)) continue;
  ------------------
  |  Branch (807:9): [True: 999k, False: 60.2k]
  |  Branch (807:38): [True: 145k, False: 853k]
  ------------------
  808|   913k|    if ((tree_config == TREE_7571) && ((ch == i_ls) || (ch == i_rs))) continue;
  ------------------
  |  Branch (808:9): [True: 74.4k, False: 838k]
  |  Branch (808:40): [True: 12.4k, False: 62.0k]
  |  Branch (808:56): [True: 12.4k, False: 49.6k]
  ------------------
  809|   888k|    if ((tree_config == TREE_7572) && ((ch == i_lf) || (ch == i_rf))) continue;
  ------------------
  |  Branch (809:9): [True: 601k, False: 287k]
  |  Branch (809:40): [True: 100k, False: 501k]
  |  Branch (809:56): [True: 100k, False: 400k]
  ------------------
  810|       |
  811|   688k|    wet_ener[ch] = 0;
  812|   688k|    q_wet_ener[ch] = 15;
  813|       |
  814|   688k|    wet_ener[ch] = 0;
  815|   688k|    q_wet_ener[ch] = 15;
  816|  14.4M|    for (n = FIVE; n < BP_SIZE; n++) {
  ------------------
  |  |   34|   688k|#define FIVE (5)
  ------------------
                  for (n = FIVE; n < BP_SIZE; n++) {
  ------------------
  |  |   94|  14.4M|#define BP_SIZE 25
  ------------------
  |  Branch (816:20): [True: 13.7M, False: 688k]
  ------------------
  817|  13.7M|      qtemp1 = 10;
  818|  13.7M|      temp_1 = ixheaacd_mps_mult32(*qmf_output_real_wet, *qmf_output_real_wet,
  819|  13.7M|                                   &qtemp1, qtemp1);
  820|  13.7M|      qmf_output_real_wet++;
  821|       |
  822|  13.7M|      qtemp2 = 10;
  823|  13.7M|      temp_2 = ixheaacd_mps_mult32(*qmf_output_imag_wet, *qmf_output_imag_wet,
  824|  13.7M|                                   &qtemp2, qtemp2);
  825|  13.7M|      qmf_output_imag_wet++;
  826|       |
  827|  13.7M|      temp_1 = ixheaacd_mps_add32(temp_1, temp_2, &qtemp1, qtemp2);
  828|       |
  829|  13.7M|      temp_1 = ixheaacd_mps_mult32(temp_1, tp_process_table_ptr->bp2xgf2[n],
  830|  13.7M|                                   &qtemp1, 57);
  831|       |
  832|  13.7M|      wet_ener[ch] =
  833|  13.7M|          ixheaacd_mps_add32(wet_ener[ch], temp_1, &q_wet_ener[ch], qtemp1);
  834|  13.7M|    }
  835|   688k|    temp_1 = ixheaacd_mps_mult32_shr_15(run_wet_ener[ch], STP_LPF_COEFF1_FIX);
  ------------------
  |  |   23|   688k|#define STP_LPF_COEFF1_FIX (31130)
  ------------------
  836|       |
  837|   688k|    temp_2 = ONE_IN_Q15 - STP_LPF_COEFF1_FIX;
  ------------------
  |  |   41|   688k|#define ONE_IN_Q15 (32768)
  ------------------
                  temp_2 = ONE_IN_Q15 - STP_LPF_COEFF1_FIX;
  ------------------
  |  |   23|   688k|#define STP_LPF_COEFF1_FIX (31130)
  ------------------
  838|       |
  839|   688k|    temp_2 = ixheaacd_mps_mult32_shr_15(temp_2, wet_ener[ch]);
  840|       |
  841|   688k|    run_wet_ener[ch] =
  842|   688k|        ixheaacd_mps_add32(temp_1, temp_2, &q_run_wet_ener[ch], q_wet_ener[ch]);
  843|       |
  844|   688k|    qtemp1 = q_old_wet_ener[ch];
  845|   688k|    temp_1 = ixheaacd_mps_add32(old_wet_ener[ch], ABS_THR_FIX, &qtemp1, 15);
  ------------------
  |  |   59|   688k|#define ABS_THR_FIX (35184)
  ------------------
  846|       |
  847|   688k|    wet_ener[ch] = ixheaacd_mps_div_32(wet_ener[ch], temp_1, &qtemp2);
  848|   688k|    q_wet_ener[ch] = qtemp2 + q_wet_ener[ch] - qtemp1;
  849|   688k|  }
  850|       |
  851|   158k|  damp = POINT_ONE_Q15;
  ------------------
  |  |   68|   158k|#define POINT_ONE_Q15 (3277)
  ------------------
  852|   158k|  one_minus_damp = POINT_NINE_Q15;
  ------------------
  |  |   70|   158k|#define POINT_NINE_Q15 (29491)
  ------------------
  853|   158k|  switch (tree_config) {
  854|  4.08k|    case TREE_5151:
  ------------------
  |  Branch (854:5): [True: 4.08k, False: 153k]
  ------------------
  855|  12.0k|    case TREE_5152:
  ------------------
  |  Branch (855:5): [True: 7.96k, False: 150k]
  ------------------
  856|  12.0k|      if (wet_ener[i_lf] != 0) {
  ------------------
  |  Branch (856:11): [True: 5.17k, False: 6.86k]
  ------------------
  857|  5.17k|        scale[i_lf] = ixheaacd_mps_div_32(dry_ener[0], wet_ener[i_lf], &qtemp2);
  858|  5.17k|        q_scale[i_lf] = qtemp2 + q_dry_ener[0] - q_wet_ener[i_lf];
  859|  6.86k|      } else {
  860|  6.86k|        temp_1 = ixheaac_norm32(dry_ener[0]);
  861|  6.86k|        scale[i_lf] = dry_ener[0] << temp_1;
  862|  6.86k|        q_scale[i_lf] = q_dry_ener[0] + temp_1 - 30;
  863|  6.86k|      }
  864|  12.0k|      scale[i_lf] = ixheaacd_mps_sqrt(scale[i_lf], &(q_scale[i_lf]), sqrt_tab);
  865|       |
  866|  12.0k|      if (wet_ener[i_rf] != 0) {
  ------------------
  |  Branch (866:11): [True: 5.19k, False: 6.84k]
  ------------------
  867|  5.19k|        scale[i_rf] = ixheaacd_mps_div_32(dry_ener[0], wet_ener[i_rf], &qtemp2);
  868|  5.19k|        q_scale[i_rf] = qtemp2 + q_dry_ener[0] - q_wet_ener[i_rf];
  869|  6.84k|      } else {
  870|  6.84k|        temp_1 = ixheaac_norm32(dry_ener[0]);
  871|  6.84k|        scale[i_rf] = dry_ener[0] << temp_1;
  872|  6.84k|        q_scale[i_rf] = q_dry_ener[0] + temp_1 - 30;
  873|  6.84k|      }
  874|  12.0k|      scale[i_rf] = ixheaacd_mps_sqrt(scale[i_rf], &(q_scale[i_rf]), sqrt_tab);
  875|       |
  876|  12.0k|      if (wet_ener[i_c] != 0) {
  ------------------
  |  Branch (876:11): [True: 2.90k, False: 9.13k]
  ------------------
  877|  2.90k|        scale[i_c] = ixheaacd_mps_div_32(dry_ener[0], wet_ener[i_c], &qtemp2);
  878|  2.90k|        q_scale[i_c] = qtemp2 + q_dry_ener[0] - q_wet_ener[i_c];
  879|  9.13k|      } else {
  880|  9.13k|        temp_1 = ixheaac_norm32(dry_ener[0]);
  881|  9.13k|        scale[i_c] = dry_ener[0] << temp_1;
  882|  9.13k|        q_scale[i_c] = q_dry_ener[0] + temp_1 - 30;
  883|  9.13k|      }
  884|  12.0k|      scale[i_c] = ixheaacd_mps_sqrt(scale[i_c], &(q_scale[i_c]), sqrt_tab);
  885|       |
  886|  12.0k|      if (wet_ener[i_ls] != 0) {
  ------------------
  |  Branch (886:11): [True: 2.94k, False: 9.09k]
  ------------------
  887|  2.94k|        scale[i_ls] = ixheaacd_mps_div_32(dry_ener[0], wet_ener[i_ls], &qtemp2);
  888|  2.94k|        q_scale[i_ls] = qtemp2 + q_dry_ener[0] - q_wet_ener[i_ls];
  889|  9.09k|      } else {
  890|  9.09k|        temp_1 = ixheaac_norm32(dry_ener[0]);
  891|  9.09k|        scale[i_ls] = dry_ener[0] << temp_1;
  892|  9.09k|        q_scale[i_ls] = q_dry_ener[0] + temp_1 - 30;
  893|  9.09k|      }
  894|  12.0k|      scale[i_ls] = ixheaacd_mps_sqrt(scale[i_ls], &(q_scale[i_ls]), sqrt_tab);
  895|       |
  896|  12.0k|      if (wet_ener[i_rs] != 0) {
  ------------------
  |  Branch (896:11): [True: 3.25k, False: 8.78k]
  ------------------
  897|  3.25k|        scale[i_rs] = ixheaacd_mps_div_32(dry_ener[0], wet_ener[i_rs], &qtemp2);
  898|  3.25k|        q_scale[i_rs] = qtemp2 + q_dry_ener[0] - q_wet_ener[i_rs];
  899|  8.78k|      } else {
  900|  8.78k|        temp_1 = ixheaac_norm32(dry_ener[0]);
  901|  8.78k|        scale[i_rs] = dry_ener[0] << temp_1;
  902|  8.78k|        q_scale[i_rs] = q_dry_ener[0] + temp_1 - 30;
  903|  8.78k|      }
  904|  12.0k|      scale[i_rs] = ixheaacd_mps_sqrt(scale[i_rs], &(q_scale[i_rs]), sqrt_tab);
  905|       |
  906|  84.2k|      for (ch = 0; ch < 6; ch++) {
  ------------------
  |  Branch (906:20): [True: 72.2k, False: 12.0k]
  ------------------
  907|  72.2k|        if (ch == 3 && tree_config == 0) continue;
  ------------------
  |  Branch (907:13): [True: 12.0k, False: 60.2k]
  |  Branch (907:24): [True: 4.08k, False: 7.96k]
  ------------------
  908|  68.1k|        temp_1 = ixheaacd_mps_mult32_shr_15(scale[ch], one_minus_damp);
  909|  68.1k|        scale[ch] = ixheaacd_mps_add32(temp_1, damp, &(q_scale[ch]), 15);
  910|  68.1k|        scale[ch] = ixheaacd_mps_convert_to_qn(scale[ch], q_scale[ch], 15);
  911|  68.1k|        if (scale[ch] > STP_SCALE_LIMIT_FIX) scale[ch] = STP_SCALE_LIMIT_FIX;
  ------------------
  |  |   26|  68.1k|#define STP_SCALE_LIMIT_FIX (92406)
  ------------------
                      if (scale[ch] > STP_SCALE_LIMIT_FIX) scale[ch] = STP_SCALE_LIMIT_FIX;
  ------------------
  |  |   26|  23.7k|#define STP_SCALE_LIMIT_FIX (92406)
  ------------------
  |  Branch (911:13): [True: 23.7k, False: 44.4k]
  ------------------
  912|  68.1k|        if (scale[ch] < ONE_BY_STP_SCALE_LIMIT)
  ------------------
  |  |   27|  68.1k|#define ONE_BY_STP_SCALE_LIMIT (11620)
  ------------------
  |  Branch (912:13): [True: 28.9k, False: 39.2k]
  ------------------
  913|  28.9k|          scale[ch] = ONE_BY_STP_SCALE_LIMIT;
  ------------------
  |  |   27|  28.9k|#define ONE_BY_STP_SCALE_LIMIT (11620)
  ------------------
  914|  68.1k|      }
  915|       |
  916|  12.0k|      break;
  917|  11.3k|    case TREE_525:
  ------------------
  |  Branch (917:5): [True: 11.3k, False: 146k]
  ------------------
  918|  11.3k|      if (wet_ener[i_lf] != 0) {
  ------------------
  |  Branch (918:11): [True: 764, False: 10.6k]
  ------------------
  919|    764|        scale[i_lf] = ixheaacd_mps_div_32(dry_ener[0], wet_ener[i_lf], &qtemp2);
  920|    764|        q_scale[i_lf] = qtemp2 + q_dry_ener[0] - q_wet_ener[i_lf];
  921|  10.6k|      } else {
  922|  10.6k|        temp_1 = ixheaac_norm32(dry_ener[0]);
  923|  10.6k|        scale[i_lf] = dry_ener[0] << temp_1;
  924|  10.6k|        q_scale[i_lf] = q_dry_ener[0] + temp_1 - 30;
  925|  10.6k|      }
  926|  11.3k|      scale[i_lf] = ixheaacd_mps_sqrt(scale[i_lf], &(q_scale[i_lf]), sqrt_tab);
  927|       |
  928|  11.3k|      if (wet_ener[i_rf] != 0) {
  ------------------
  |  Branch (928:11): [True: 1.20k, False: 10.1k]
  ------------------
  929|  1.20k|        scale[i_rf] = ixheaacd_mps_div_32(dry_ener[1], wet_ener[i_rf], &qtemp2);
  930|  1.20k|        q_scale[i_rf] = qtemp2 + q_dry_ener[1] - q_wet_ener[i_rf];
  931|  10.1k|      } else {
  932|  10.1k|        temp_1 = ixheaac_norm32(dry_ener[1]);
  933|  10.1k|        scale[i_rf] = dry_ener[1] << temp_1;
  934|  10.1k|        q_scale[i_rf] = q_dry_ener[1] + temp_1 - 30;
  935|  10.1k|      }
  936|  11.3k|      scale[i_rf] = ixheaacd_mps_sqrt(scale[i_rf], &(q_scale[i_rf]), sqrt_tab);
  937|       |
  938|  11.3k|      if (wet_ener[i_ls] != 0) {
  ------------------
  |  Branch (938:11): [True: 579, False: 10.7k]
  ------------------
  939|    579|        scale[i_ls] = ixheaacd_mps_div_32(dry_ener[0], wet_ener[i_ls], &qtemp2);
  940|    579|        q_scale[i_ls] = qtemp2 + q_dry_ener[0] - q_wet_ener[i_ls];
  941|  10.7k|      } else {
  942|  10.7k|        temp_1 = ixheaac_norm32(dry_ener[0]);
  943|  10.7k|        scale[i_ls] = dry_ener[0] << temp_1;
  944|  10.7k|        q_scale[i_ls] = q_dry_ener[0] + temp_1 - 30;
  945|  10.7k|      }
  946|  11.3k|      scale[i_ls] = ixheaacd_mps_sqrt(scale[i_ls], &(q_scale[i_ls]), sqrt_tab);
  947|       |
  948|  11.3k|      if (wet_ener[i_rs] != 0) {
  ------------------
  |  Branch (948:11): [True: 1.02k, False: 10.3k]
  ------------------
  949|  1.02k|        scale[i_rs] = ixheaacd_mps_div_32(dry_ener[1], wet_ener[i_rs], &qtemp2);
  950|  1.02k|        q_scale[i_rs] = qtemp2 + q_dry_ener[1] - q_wet_ener[i_rs];
  951|  10.3k|      } else {
  952|  10.3k|        temp_1 = ixheaac_norm32(dry_ener[1]);
  953|  10.3k|        scale[i_rs] = dry_ener[1] << temp_1;
  954|  10.3k|        q_scale[i_rs] = q_dry_ener[1] + temp_1 - 30;
  955|  10.3k|      }
  956|  11.3k|      scale[i_rs] = ixheaacd_mps_sqrt(scale[i_rs], &(q_scale[i_rs]), sqrt_tab);
  957|       |
  958|  56.8k|      for (ch = 0; ch < 4; ch++) {
  ------------------
  |  Branch (958:20): [True: 45.4k, False: 11.3k]
  ------------------
  959|  45.4k|        temp_1 = ixheaacd_mps_mult32_shr_15(scale[ch], one_minus_damp);
  960|  45.4k|        scale[ch] = ixheaacd_mps_add32(temp_1, damp, &(q_scale[ch]), 15);
  961|  45.4k|        scale[ch] = ixheaacd_mps_convert_to_qn(scale[ch], q_scale[ch], 15);
  962|  45.4k|        if (scale[ch] > STP_SCALE_LIMIT_FIX) scale[ch] = STP_SCALE_LIMIT_FIX;
  ------------------
  |  |   26|  45.4k|#define STP_SCALE_LIMIT_FIX (92406)
  ------------------
                      if (scale[ch] > STP_SCALE_LIMIT_FIX) scale[ch] = STP_SCALE_LIMIT_FIX;
  ------------------
  |  |   26|  13.8k|#define STP_SCALE_LIMIT_FIX (92406)
  ------------------
  |  Branch (962:13): [True: 13.8k, False: 31.6k]
  ------------------
  963|  45.4k|        if (scale[ch] < ONE_BY_STP_SCALE_LIMIT)
  ------------------
  |  |   27|  45.4k|#define ONE_BY_STP_SCALE_LIMIT (11620)
  ------------------
  |  Branch (963:13): [True: 27.2k, False: 18.2k]
  ------------------
  964|  27.2k|          scale[ch] = ONE_BY_STP_SCALE_LIMIT;
  ------------------
  |  |   27|  27.2k|#define ONE_BY_STP_SCALE_LIMIT (11620)
  ------------------
  965|  45.4k|      }
  966|  11.3k|      break;
  967|  16.1k|    case TREE_7271:
  ------------------
  |  Branch (967:5): [True: 16.1k, False: 141k]
  ------------------
  968|  21.9k|    case TREE_7272:
  ------------------
  |  Branch (968:5): [True: 5.85k, False: 152k]
  ------------------
  969|  21.9k|      if (wet_ener[i_lf] != 0) {
  ------------------
  |  Branch (969:11): [True: 856, False: 21.1k]
  ------------------
  970|    856|        scale[i_lf] = ixheaacd_mps_div_32(dry_ener[0], wet_ener[i_lf], &qtemp2);
  971|    856|        q_scale[i_lf] = qtemp2 + q_dry_ener[0] - q_wet_ener[i_lf];
  972|  21.1k|      } else {
  973|  21.1k|        temp_1 = ixheaac_norm32(dry_ener[0]);
  974|  21.1k|        scale[i_lf] = dry_ener[0] << temp_1;
  975|  21.1k|        q_scale[i_lf] = q_dry_ener[0] + temp_1 - 30;
  976|  21.1k|      }
  977|  21.9k|      scale[i_lf] = ixheaacd_mps_sqrt(scale[i_lf], &(q_scale[i_lf]), sqrt_tab);
  978|       |
  979|  21.9k|      if (wet_ener[i_rf] != 0) {
  ------------------
  |  Branch (979:11): [True: 1.18k, False: 20.8k]
  ------------------
  980|  1.18k|        scale[i_rf] = ixheaacd_mps_div_32(dry_ener[1], wet_ener[i_rf], &qtemp2);
  981|  1.18k|        q_scale[i_rf] = qtemp2 + q_dry_ener[1] - q_wet_ener[i_rf];
  982|  20.8k|      } else {
  983|  20.8k|        temp_1 = ixheaac_norm32(dry_ener[1]);
  984|  20.8k|        scale[i_rf] = dry_ener[1] << temp_1;
  985|  20.8k|        q_scale[i_rf] = q_dry_ener[1] + temp_1 - 30;
  986|  20.8k|      }
  987|  21.9k|      scale[i_rf] = ixheaacd_mps_sqrt(scale[i_rf], &(q_scale[i_rf]), sqrt_tab);
  988|       |
  989|  21.9k|      if (wet_ener[i_ls] != 0) {
  ------------------
  |  Branch (989:11): [True: 370, False: 21.6k]
  ------------------
  990|    370|        scale[i_ls] = ixheaacd_mps_div_32(dry_ener[0], wet_ener[i_ls], &qtemp2);
  991|    370|        q_scale[i_ls] = qtemp2 + q_dry_ener[0] - q_wet_ener[i_ls];
  992|  21.6k|      } else {
  993|  21.6k|        temp_1 = ixheaac_norm32(dry_ener[0]);
  994|  21.6k|        scale[i_ls] = dry_ener[0] << temp_1;
  995|  21.6k|        q_scale[i_ls] = q_dry_ener[0] + temp_1 - 30;
  996|  21.6k|      }
  997|  21.9k|      scale[i_ls] = ixheaacd_mps_sqrt(scale[i_ls], &(q_scale[i_ls]), sqrt_tab);
  998|       |
  999|  21.9k|      if (wet_ener[i_rs] != 0) {
  ------------------
  |  Branch (999:11): [True: 853, False: 21.1k]
  ------------------
 1000|    853|        scale[i_rs] = ixheaacd_mps_div_32(dry_ener[1], wet_ener[i_rs], &qtemp2);
 1001|    853|        q_scale[i_rs] = qtemp2 + q_dry_ener[1] - q_wet_ener[i_rs];
 1002|  21.1k|      } else {
 1003|  21.1k|        temp_1 = ixheaac_norm32(dry_ener[1]);
 1004|  21.1k|        scale[i_rs] = dry_ener[1] << temp_1;
 1005|  21.1k|        q_scale[i_rs] = q_dry_ener[1] + temp_1 - 30;
 1006|  21.1k|      }
 1007|  21.9k|      scale[i_rs] = ixheaacd_mps_sqrt(scale[i_rs], &(q_scale[i_rs]), sqrt_tab);
 1008|       |
 1009|  21.9k|      if (wet_ener[i_al] != 0) {
  ------------------
  |  Branch (1009:11): [True: 802, False: 21.1k]
  ------------------
 1010|    802|        scale[i_al] = ixheaacd_mps_div_32(dry_ener[0], wet_ener[i_al], &qtemp2);
 1011|    802|        q_scale[i_al] = qtemp2 + q_dry_ener[0] - q_wet_ener[i_al];
 1012|  21.1k|      } else {
 1013|  21.1k|        temp_1 = ixheaac_norm32(dry_ener[0]);
 1014|  21.1k|        scale[i_al] = dry_ener[0] << temp_1;
 1015|  21.1k|        q_scale[i_al] = q_dry_ener[0] + temp_1 - 30;
 1016|  21.1k|      }
 1017|  21.9k|      scale[i_al] = ixheaacd_mps_sqrt(scale[i_al], &(q_scale[i_al]), sqrt_tab);
 1018|       |
 1019|  21.9k|      if (wet_ener[i_ar] != 0) {
  ------------------
  |  Branch (1019:11): [True: 508, False: 21.4k]
  ------------------
 1020|    508|        scale[i_ar] = ixheaacd_mps_div_32(dry_ener[1], wet_ener[i_ar], &qtemp2);
 1021|    508|        q_scale[i_ar] = qtemp2 + q_dry_ener[1] - q_wet_ener[i_ar];
 1022|  21.4k|      } else {
 1023|  21.4k|        temp_1 = ixheaac_norm32(dry_ener[1]);
 1024|  21.4k|        scale[i_ar] = dry_ener[1] << temp_1;
 1025|  21.4k|        q_scale[i_ar] = q_dry_ener[1] + temp_1 - 30;
 1026|  21.4k|      }
 1027|  21.9k|      scale[i_ar] = ixheaacd_mps_sqrt(scale[i_ar], &(q_scale[i_ar]), sqrt_tab);
 1028|       |
 1029|   153k|      for (ch = 0; ch < 6; ch++) {
  ------------------
  |  Branch (1029:20): [True: 131k, False: 21.9k]
  ------------------
 1030|   131k|        temp_1 = ixheaacd_mps_mult32_shr_15(scale[ch], one_minus_damp);
 1031|   131k|        scale[ch] = ixheaacd_mps_add32(temp_1, damp, &(q_scale[ch]), 15);
 1032|   131k|        scale[ch] = ixheaacd_mps_convert_to_qn(scale[ch], q_scale[ch], 15);
 1033|   131k|        if (scale[ch] > STP_SCALE_LIMIT_FIX) scale[ch] = STP_SCALE_LIMIT_FIX;
  ------------------
  |  |   26|   131k|#define STP_SCALE_LIMIT_FIX (92406)
  ------------------
                      if (scale[ch] > STP_SCALE_LIMIT_FIX) scale[ch] = STP_SCALE_LIMIT_FIX;
  ------------------
  |  |   26|  51.0k|#define STP_SCALE_LIMIT_FIX (92406)
  ------------------
  |  Branch (1033:13): [True: 51.0k, False: 80.8k]
  ------------------
 1034|   131k|        if (scale[ch] < ONE_BY_STP_SCALE_LIMIT)
  ------------------
  |  |   27|   131k|#define ONE_BY_STP_SCALE_LIMIT (11620)
  ------------------
  |  Branch (1034:13): [True: 73.7k, False: 58.2k]
  ------------------
 1035|  73.7k|          scale[ch] = ONE_BY_STP_SCALE_LIMIT;
  ------------------
  |  |   27|  73.7k|#define ONE_BY_STP_SCALE_LIMIT (11620)
  ------------------
 1036|   131k|      }
 1037|       |
 1038|  21.9k|      break;
 1039|  12.4k|    case TREE_7571:
  ------------------
  |  Branch (1039:5): [True: 12.4k, False: 145k]
  ------------------
 1040|  12.4k|      if (wet_ener[i_lf] != 0) {
  ------------------
  |  Branch (1040:11): [True: 406, False: 12.0k]
  ------------------
 1041|    406|        scale[i_lf] = ixheaacd_mps_div_32(dry_ener[0], wet_ener[i_lf], &qtemp2);
 1042|    406|        q_scale[i_lf] = qtemp2 + q_dry_ener[0] - q_wet_ener[i_lf];
 1043|  12.0k|      } else {
 1044|  12.0k|        temp_1 = ixheaac_norm32(dry_ener[0]);
 1045|  12.0k|        scale[i_lf] = dry_ener[0] << temp_1;
 1046|  12.0k|        q_scale[i_lf] = q_dry_ener[0] + temp_1 - 30;
 1047|  12.0k|      }
 1048|  12.4k|      scale[i_lf] = ixheaacd_mps_sqrt(scale[i_lf], &(q_scale[i_lf]), sqrt_tab);
 1049|       |
 1050|  12.4k|      if (wet_ener[i_rf] != 0) {
  ------------------
  |  Branch (1050:11): [True: 0, False: 12.4k]
  ------------------
 1051|      0|        scale[i_rf] = ixheaacd_mps_div_32(dry_ener[1], wet_ener[i_rf], &qtemp2);
 1052|      0|        q_scale[i_rf] = qtemp2 + q_dry_ener[1] - q_wet_ener[i_rf];
 1053|  12.4k|      } else {
 1054|  12.4k|        temp_1 = ixheaac_norm32(dry_ener[1]);
 1055|  12.4k|        scale[i_rf] = dry_ener[1] << temp_1;
 1056|  12.4k|        q_scale[i_rf] = q_dry_ener[1] + temp_1 - 30;
 1057|  12.4k|      }
 1058|  12.4k|      scale[i_rf] = ixheaacd_mps_sqrt(scale[i_rf], &(q_scale[i_rf]), sqrt_tab);
 1059|       |
 1060|  12.4k|      if (wet_ener[i_al] != 0) {
  ------------------
  |  Branch (1060:11): [True: 409, False: 11.9k]
  ------------------
 1061|    409|        scale[i_al] = ixheaacd_mps_div_32(dry_ener[0], wet_ener[i_al], &qtemp2);
 1062|    409|        q_scale[i_al] = qtemp2 + q_dry_ener[0] - q_wet_ener[i_al];
 1063|  11.9k|      } else {
 1064|  11.9k|        temp_1 = ixheaac_norm32(dry_ener[0]);
 1065|  11.9k|        scale[i_al] = dry_ener[0] << temp_1;
 1066|  11.9k|        q_scale[i_al] = q_dry_ener[0] + temp_1 - 30;
 1067|  11.9k|      }
 1068|  12.4k|      scale[i_al] = ixheaacd_mps_sqrt(scale[i_al], &(q_scale[i_al]), sqrt_tab);
 1069|       |
 1070|  12.4k|      if (wet_ener[i_ar] != 0) {
  ------------------
  |  Branch (1070:11): [True: 247, False: 12.1k]
  ------------------
 1071|    247|        scale[i_ar] = ixheaacd_mps_div_32(dry_ener[1], wet_ener[i_ar], &qtemp2);
 1072|    247|        q_scale[i_ar] = qtemp2 + q_dry_ener[1] - q_wet_ener[i_ar];
 1073|  12.1k|      } else {
 1074|  12.1k|        temp_1 = ixheaac_norm32(dry_ener[1]);
 1075|  12.1k|        scale[i_ar] = dry_ener[1] << temp_1;
 1076|  12.1k|        q_scale[i_ar] = q_dry_ener[1] + temp_1 - 30;
 1077|  12.1k|      }
 1078|  12.4k|      scale[i_ar] = ixheaacd_mps_sqrt(scale[i_ar], &(q_scale[i_ar]), sqrt_tab);
 1079|  74.4k|      for (ch = 0; ch < FIVE; ch++) {
  ------------------
  |  |   34|  74.4k|#define FIVE (5)
  ------------------
  |  Branch (1079:20): [True: 62.0k, False: 12.4k]
  ------------------
 1080|  62.0k|        if (ch == 2) continue;
  ------------------
  |  Branch (1080:13): [True: 12.4k, False: 49.6k]
  ------------------
 1081|  49.6k|        temp_1 = ixheaacd_mps_mult32_shr_15(scale[ch], one_minus_damp);
 1082|  49.6k|        scale[ch] = ixheaacd_mps_add32(temp_1, damp, &(q_scale[ch]), 15);
 1083|  49.6k|        scale[ch] = ixheaacd_mps_convert_to_qn(scale[ch], q_scale[ch], 15);
 1084|  49.6k|        if (scale[ch] > STP_SCALE_LIMIT_FIX) scale[ch] = STP_SCALE_LIMIT_FIX;
  ------------------
  |  |   26|  49.6k|#define STP_SCALE_LIMIT_FIX (92406)
  ------------------
                      if (scale[ch] > STP_SCALE_LIMIT_FIX) scale[ch] = STP_SCALE_LIMIT_FIX;
  ------------------
  |  |   26|  36.1k|#define STP_SCALE_LIMIT_FIX (92406)
  ------------------
  |  Branch (1084:13): [True: 36.1k, False: 13.5k]
  ------------------
 1085|  49.6k|        if (scale[ch] < ONE_BY_STP_SCALE_LIMIT)
  ------------------
  |  |   27|  49.6k|#define ONE_BY_STP_SCALE_LIMIT (11620)
  ------------------
  |  Branch (1085:13): [True: 12.4k, False: 37.1k]
  ------------------
 1086|  12.4k|          scale[ch] = ONE_BY_STP_SCALE_LIMIT;
  ------------------
  |  |   27|  12.4k|#define ONE_BY_STP_SCALE_LIMIT (11620)
  ------------------
 1087|  49.6k|      }
 1088|       |
 1089|  12.4k|      break;
 1090|   100k|    case TREE_7572:
  ------------------
  |  Branch (1090:5): [True: 100k, False: 57.8k]
  ------------------
 1091|   100k|      if (wet_ener[i_ls] != 0) {
  ------------------
  |  Branch (1091:11): [True: 2.19k, False: 98.0k]
  ------------------
 1092|  2.19k|        scale[i_ls] = ixheaacd_mps_div_32(dry_ener[0], wet_ener[i_ls], &qtemp2);
 1093|  2.19k|        q_scale[i_ls] = qtemp2 + q_dry_ener[0] - q_wet_ener[i_ls];
 1094|  98.0k|      } else {
 1095|  98.0k|        temp_1 = ixheaac_norm32(dry_ener[0]);
 1096|  98.0k|        scale[i_ls] = dry_ener[0] << temp_1;
 1097|  98.0k|        q_scale[i_ls] = q_dry_ener[0] + temp_1 - 30;
 1098|  98.0k|      }
 1099|   100k|      scale[i_ls] = ixheaacd_mps_sqrt(scale[i_ls], &(q_scale[i_ls]), sqrt_tab);
 1100|       |
 1101|   100k|      if (wet_ener[i_rs] != 0) {
  ------------------
  |  Branch (1101:11): [True: 0, False: 100k]
  ------------------
 1102|      0|        scale[i_rs] = ixheaacd_mps_div_32(dry_ener[1], wet_ener[i_rs], &qtemp2);
 1103|      0|        q_scale[i_rs] = qtemp2 + q_dry_ener[1] - q_wet_ener[i_rs];
 1104|   100k|      } else {
 1105|   100k|        temp_1 = ixheaac_norm32(dry_ener[1]);
 1106|   100k|        scale[i_rs] = dry_ener[1] << temp_1;
 1107|   100k|        q_scale[i_rs] = q_dry_ener[1] + temp_1 - 30;
 1108|   100k|      }
 1109|   100k|      scale[i_rs] = ixheaacd_mps_sqrt(scale[i_rs], &(q_scale[i_rs]), sqrt_tab);
 1110|       |
 1111|   100k|      if (wet_ener[i_al] != 0) {
  ------------------
  |  Branch (1111:11): [True: 0, False: 100k]
  ------------------
 1112|      0|        scale[i_al] = ixheaacd_mps_div_32(dry_ener[0], wet_ener[i_al], &qtemp2);
 1113|      0|        q_scale[i_al] = qtemp2 + q_dry_ener[0] - q_wet_ener[i_al];
 1114|   100k|      } else {
 1115|   100k|        temp_1 = ixheaac_norm32(dry_ener[0]);
 1116|   100k|        scale[i_al] = dry_ener[0] << temp_1;
 1117|   100k|        q_scale[i_al] = q_dry_ener[0] + temp_1 - 30;
 1118|   100k|      }
 1119|   100k|      scale[i_al] = ixheaacd_mps_sqrt(scale[i_al], &(q_scale[i_al]), sqrt_tab);
 1120|       |
 1121|   100k|      if (wet_ener[i_ar] != 0) {
  ------------------
  |  Branch (1121:11): [True: 2.19k, False: 98.0k]
  ------------------
 1122|  2.19k|        scale[i_ar] = ixheaacd_mps_div_32(dry_ener[1], wet_ener[i_ar], &qtemp2);
 1123|  2.19k|        q_scale[i_ar] = qtemp2 + q_dry_ener[1] - q_wet_ener[i_ar];
 1124|  98.0k|      } else {
 1125|  98.0k|        temp_1 = ixheaac_norm32(dry_ener[1]);
 1126|  98.0k|        scale[i_ar] = dry_ener[1] << temp_1;
 1127|  98.0k|        q_scale[i_ar] = q_dry_ener[1] + temp_1 - 30;
 1128|  98.0k|      }
 1129|   100k|      scale[i_ar] = ixheaacd_mps_sqrt(scale[i_ar], &(q_scale[i_ar]), sqrt_tab);
 1130|   701k|      for (ch = 0; ch < 6; ch++) {
  ------------------
  |  Branch (1130:20): [True: 601k, False: 100k]
  ------------------
 1131|   601k|        if (ch == 3 || ch == 0) continue;
  ------------------
  |  Branch (1131:13): [True: 100k, False: 501k]
  |  Branch (1131:24): [True: 100k, False: 400k]
  ------------------
 1132|   400k|        temp_1 = ixheaacd_mps_mult32_shr_15(scale[ch], one_minus_damp);
 1133|   400k|        scale[ch] = ixheaacd_mps_add32(temp_1, damp, &(q_scale[ch]), 15);
 1134|   400k|        scale[ch] = ixheaacd_mps_convert_to_qn(scale[ch], q_scale[ch], 15);
 1135|   400k|        if (scale[ch] > STP_SCALE_LIMIT_FIX) scale[ch] = STP_SCALE_LIMIT_FIX;
  ------------------
  |  |   26|   400k|#define STP_SCALE_LIMIT_FIX (92406)
  ------------------
                      if (scale[ch] > STP_SCALE_LIMIT_FIX) scale[ch] = STP_SCALE_LIMIT_FIX;
  ------------------
  |  |   26|   356k|#define STP_SCALE_LIMIT_FIX (92406)
  ------------------
  |  Branch (1135:13): [True: 356k, False: 44.4k]
  ------------------
 1136|   400k|        if (scale[ch] < ONE_BY_STP_SCALE_LIMIT)
  ------------------
  |  |   27|   400k|#define ONE_BY_STP_SCALE_LIMIT (11620)
  ------------------
  |  Branch (1136:13): [True: 38.8k, False: 361k]
  ------------------
 1137|  38.8k|          scale[ch] = ONE_BY_STP_SCALE_LIMIT;
  ------------------
  |  |   27|  38.8k|#define ONE_BY_STP_SCALE_LIMIT (11620)
  ------------------
 1138|   400k|      }
 1139|       |
 1140|   100k|      break;
 1141|      0|    default:
  ------------------
  |  Branch (1141:5): [True: 0, False: 158k]
  ------------------
 1142|      0|      break;
 1143|   158k|  }
 1144|       |
 1145|  1.37M|  for (ch = 0; ch < num_output_channels; ch++) {
  ------------------
  |  Branch (1145:16): [True: 1.21M, False: 158k]
  ------------------
 1146|  1.21M|    temp_1 = ixheaacd_mps_mult32_shr_15(STP_LPF_COEFF2_FIX, scale[ch]);
  ------------------
  |  |   24|  1.21M|#define STP_LPF_COEFF2_FIX (14746)
  ------------------
 1147|  1.21M|    temp_2 =
 1148|  1.21M|        ixheaacd_mps_mult32_shr_15(ONE_MINUS_STP_LPF_COEFF2, prev_tp_scale[ch]);
  ------------------
  |  |   25|  1.21M|#define ONE_MINUS_STP_LPF_COEFF2 (18022)
  ------------------
 1149|  1.21M|    scale[ch] = ixheaac_add32_sat(temp_1, temp_2);
 1150|  1.21M|    prev_tp_scale[ch] = scale[ch];
 1151|  1.21M|  }
 1152|       |
 1153|   158k|  offset = ts * MAX_HYBRID_BANDS;
  ------------------
  |  |   65|   158k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|   158k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
 1154|   158k|  p_buffer_real = p_array_struct->buf_real + offset + HYBRID_BAND_BORDER;
  ------------------
  |  |   33|   158k|#define HYBRID_BAND_BORDER (12)
  ------------------
 1155|   158k|  p_buffer_imag = p_array_struct->buf_imag + offset + HYBRID_BAND_BORDER;
  ------------------
  |  |   33|   158k|#define HYBRID_BAND_BORDER (12)
  ------------------
 1156|       |
 1157|   158k|  p_buf_real = p_array_struct->buffer_real + offset + FIVE;
  ------------------
  |  |   34|   158k|#define FIVE (5)
  ------------------
 1158|   158k|  p_buf_imag = p_array_struct->buffer_imag + offset + FIVE;
  ------------------
  |  |   34|   158k|#define FIVE (5)
  ------------------
 1159|       |
 1160|   158k|  p_hyb_out_dry_real = p_array_struct->hyb_output_real_dry +
 1161|   158k|                       ts * MAX_HYBRID_BANDS + HYBRID_BAND_BORDER;
  ------------------
  |  |   65|   158k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|   158k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
                                     ts * MAX_HYBRID_BANDS + HYBRID_BAND_BORDER;
  ------------------
  |  |   33|   158k|#define HYBRID_BAND_BORDER (12)
  ------------------
 1162|   158k|  p_hyb_out_dry_imag = p_array_struct->hyb_output_imag_dry +
 1163|   158k|                       ts * MAX_HYBRID_BANDS + HYBRID_BAND_BORDER;
  ------------------
  |  |   65|   158k|#define MAX_HYBRID_BANDS (MAX_NUM_QMF_BANDS - 3 + 10)
  |  |  ------------------
  |  |  |  |   62|   158k|#define MAX_NUM_QMF_BANDS (64)
  |  |  ------------------
  ------------------
                                     ts * MAX_HYBRID_BANDS + HYBRID_BAND_BORDER;
  ------------------
  |  |   33|   158k|#define HYBRID_BAND_BORDER (12)
  ------------------
 1164|       |
 1165|  1.37M|  for (ch = 0; ch < num_output_channels; ch++) {
  ------------------
  |  Branch (1165:16): [True: 1.21M, False: 158k]
  ------------------
 1166|  1.21M|    no_scaling = 1;
 1167|       |
 1168|  1.21M|    ixheaacd_get_ch_idx(pstr_mps_state, ch, &i);
 1169|  1.21M|    if (i != -1) {
  ------------------
  |  Branch (1169:9): [True: 688k, False: 529k]
  ------------------
 1170|   688k|      no_scaling = !pstr_mps_state->aux_struct->temp_shape_enable_channel_stp[i];
 1171|   688k|    }
 1172|  1.21M|    p_buffer_re = p_buffer_real;
 1173|  1.21M|    p_buffer_im = p_buffer_imag;
 1174|       |
 1175|  1.21M|    p_buf_re = p_buf_real;
 1176|  1.21M|    p_buf_im = p_buf_imag;
 1177|       |
 1178|  1.21M|    hyb_output_real_dry = p_hyb_out_dry_real;
 1179|  1.21M|    hyb_output_imag_dry = p_hyb_out_dry_imag;
 1180|       |
 1181|  1.21M|    if (no_scaling == 1) {
  ------------------
  |  Branch (1181:9): [True: 1.17M, False: 38.7k]
  ------------------
 1182|  5.89M|      for (n = HYBRID_BAND_BORDER; n < (HP_SIZE + QMF_TO_HYB_OFFSET); n++) {
  ------------------
  |  |   33|  1.17M|#define HYBRID_BAND_BORDER (12)
  ------------------
                    for (n = HYBRID_BAND_BORDER; n < (HP_SIZE + QMF_TO_HYB_OFFSET); n++) {
  ------------------
  |  |   54|  5.89M|#define HP_SIZE (9)
  ------------------
                    for (n = HYBRID_BAND_BORDER; n < (HP_SIZE + QMF_TO_HYB_OFFSET); n++) {
  ------------------
  |  |   28|  5.89M|#define QMF_TO_HYB_OFFSET (7)
  ------------------
  |  Branch (1182:36): [True: 4.71M, False: 1.17M]
  ------------------
 1183|  4.71M|        *p_buf_re++ = ixheaac_add32_sat(*hyb_output_real_dry++, *p_buffer_re++);
 1184|       |
 1185|  4.71M|        *p_buf_im++ = ixheaac_add32_sat(*hyb_output_imag_dry++, *p_buffer_im++);
 1186|  4.71M|      }
 1187|       |
 1188|  38.2M|      for (; n < hybrid_bands; n++, k++) {
  ------------------
  |  Branch (1188:14): [True: 37.0M, False: 1.17M]
  ------------------
 1189|  37.0M|        temp = (no_scaling ? ONE_IN_Q15 : scale[ch]);
  ------------------
  |  |   41|  37.0M|#define ONE_IN_Q15 (32768)
  ------------------
  |  Branch (1189:17): [True: 37.0M, False: 0]
  ------------------
 1190|       |
 1191|  37.0M|        *p_buf_re++ = ixheaac_add32_sat(*hyb_output_real_dry++, *p_buffer_re++);
 1192|       |
 1193|  37.0M|        *p_buf_im++ = ixheaac_add32_sat(*hyb_output_imag_dry++, *p_buffer_im++);
 1194|  37.0M|      }
 1195|  1.17M|    } else {
 1196|   193k|      for (n = HYBRID_BAND_BORDER; n < (HP_SIZE + QMF_TO_HYB_OFFSET); n++) {
  ------------------
  |  |   33|  38.7k|#define HYBRID_BAND_BORDER (12)
  ------------------
                    for (n = HYBRID_BAND_BORDER; n < (HP_SIZE + QMF_TO_HYB_OFFSET); n++) {
  ------------------
  |  |   54|   193k|#define HP_SIZE (9)
  ------------------
                    for (n = HYBRID_BAND_BORDER; n < (HP_SIZE + QMF_TO_HYB_OFFSET); n++) {
  ------------------
  |  |   28|   193k|#define QMF_TO_HYB_OFFSET (7)
  ------------------
  |  Branch (1196:36): [True: 155k, False: 38.7k]
  ------------------
 1197|   155k|        temp = ixheaacd_mps_mult32_shr_30(
 1198|   155k|            scale[ch], tp_process_table_ptr->bp[n - QMF_TO_HYB_OFFSET]);
  ------------------
  |  |   28|   155k|#define QMF_TO_HYB_OFFSET (7)
  ------------------
 1199|       |
 1200|   155k|        *p_buf_re++ = ixheaac_add32_sat(*hyb_output_real_dry++, 
 1201|   155k|		              ixheaacd_mps_mult32_shr_15(temp, *p_buffer_re));
 1202|   155k|        p_buffer_re++;
 1203|       |
 1204|   155k|        *p_buf_im++ = ixheaac_add32_sat(*hyb_output_imag_dry++, 
 1205|   155k|                      ixheaacd_mps_mult32_shr_15(temp, *p_buffer_im));
 1206|   155k|        p_buffer_im++;
 1207|   155k|      }
 1208|       |
 1209|  1.23M|      for (; n < hybrid_bands; n++, k++) {
  ------------------
  |  Branch (1209:14): [True: 1.19M, False: 38.7k]
  ------------------
 1210|  1.19M|        temp = (no_scaling ? ONE_IN_Q15 : scale[ch]);
  ------------------
  |  |   41|      0|#define ONE_IN_Q15 (32768)
  ------------------
  |  Branch (1210:17): [True: 0, False: 1.19M]
  ------------------
 1211|       |
 1212|  1.19M|        *p_buf_re++ = ixheaac_add32_sat(*hyb_output_real_dry++, 
 1213|  1.19M|                      ixheaacd_mps_mult32_shr_15(temp, *p_buffer_re));
 1214|  1.19M|        p_buffer_re++;
 1215|       |
 1216|  1.19M|        *p_buf_im++ = ixheaac_add32_sat(*hyb_output_imag_dry++, 
 1217|  1.19M|                      ixheaacd_mps_mult32_shr_15(temp, *p_buffer_im));
 1218|  1.19M|        p_buffer_im++;
 1219|  1.19M|      }
 1220|  38.7k|    }
 1221|       |
 1222|  1.21M|    p_buffer_real += TSXHB;
  ------------------
  |  |  106|  1.21M|#define TSXHB (5112)
  ------------------
 1223|  1.21M|    p_buffer_imag += TSXHB;
  ------------------
  |  |  106|  1.21M|#define TSXHB (5112)
  ------------------
 1224|       |
 1225|  1.21M|    p_buf_real += TSXHB;
  ------------------
  |  |  106|  1.21M|#define TSXHB (5112)
  ------------------
 1226|  1.21M|    p_buf_imag += TSXHB;
  ------------------
  |  |  106|  1.21M|#define TSXHB (5112)
  ------------------
 1227|       |
 1228|  1.21M|    p_hyb_out_dry_real += TSXHB;
  ------------------
  |  |  106|  1.21M|#define TSXHB (5112)
  ------------------
 1229|  1.21M|    p_hyb_out_dry_imag += TSXHB;
  ------------------
  |  |  106|  1.21M|#define TSXHB (5112)
  ------------------
 1230|  1.21M|  }
 1231|       |
 1232|   158k|  return;
 1233|   158k|}

ixheaacd_mps_env_init:
   49|  2.22k|VOID ixheaacd_mps_env_init(ia_mps_dec_state_struct *self) {
   50|  2.22k|  WORD32 i;
   51|  8.88k|  for (i = 0; i < 3; i++) {
  ------------------
  |  Branch (51:15): [True: 6.66k, False: 2.22k]
  ------------------
   52|  6.66k|    self->guided_env_shaping.avg_energy_prev[i] = 32768.f * 32768.f;
   53|  6.66k|  }
   54|  2.22k|}
ixheaacd_mps_time_env_shaping:
  161|  4.50k|VOID ixheaacd_mps_time_env_shaping(ia_mps_dec_state_struct *self) {
  162|  4.50k|  FLOAT32 dir_energy[MAX_TIME_SLOTS];
  163|  4.50k|  FLOAT32 dmx_energy[MAX_TIME_SLOTS];
  164|  4.50k|  WORD32 ch, time_slot, jj;
  165|       |
  166|  4.50k|  WORD32 band_start;
  167|  4.50k|  FLOAT32 gain, ratio;
  168|       |
  169|  4.50k|  FLOAT32 amp_direct = 0;
  170|  4.50k|  FLOAT32 amp_diff = 0;
  171|  4.50k|  FLOAT32 amp_ratio;
  172|       |
  173|  4.50k|  band_start = 6;
  174|       |
  175|  4.50k|  ixheaacd_mps_est_normalized_envelope(self, DOWNMIX_IN, 0, dmx_energy);
  ------------------
  |  |   40|  4.50k|#define DOWNMIX_IN 1
  ------------------
  176|       |
  177|  13.5k|  for (ch = 0; ch < self->out_ch_count; ch++) {
  ------------------
  |  Branch (177:16): [True: 9.00k, False: 4.50k]
  ------------------
  178|  9.00k|    ixheaacd_mps_est_normalized_envelope(self, DIR_DIFF_IN, ch, dir_energy);
  ------------------
  |  |   39|  9.00k|#define DIR_DIFF_IN 0
  ------------------
  179|       |
  180|  9.00k|    if (self->temp_shape_enable_ch_ges[ch]) {
  ------------------
  |  Branch (180:9): [True: 783, False: 8.21k]
  ------------------
  181|  24.8k|      for (time_slot = 0; time_slot < self->time_slots; time_slot++) {
  ------------------
  |  Branch (181:27): [True: 24.0k, False: 783]
  ------------------
  182|  24.0k|        gain = self->env_shape_data[ch][time_slot] * dmx_energy[time_slot] /
  183|  24.0k|               (dir_energy[time_slot] + 1e-9f);
  184|       |
  185|  24.0k|        amp_direct = 0;
  186|  24.0k|        amp_diff = 0;
  187|       |
  188|   933k|        for (jj = band_start; jj < self->hyb_band_count_max; jj++) {
  ------------------
  |  Branch (188:31): [True: 909k, False: 24.0k]
  ------------------
  189|   909k|          amp_direct += self->hyb_dir_out[ch][time_slot][jj].re *
  190|   909k|                            self->hyb_dir_out[ch][time_slot][jj].re +
  191|   909k|                        self->hyb_dir_out[ch][time_slot][jj].im *
  192|   909k|                            self->hyb_dir_out[ch][time_slot][jj].im;
  193|       |
  194|   909k|          amp_diff += self->hyb_diff_out[ch][time_slot][jj].re *
  195|   909k|                          self->hyb_diff_out[ch][time_slot][jj].re +
  196|   909k|                      self->hyb_diff_out[ch][time_slot][jj].im *
  197|   909k|                          self->hyb_diff_out[ch][time_slot][jj].im;
  198|   909k|        }
  199|       |
  200|  24.0k|        amp_ratio = (FLOAT32)sqrt(amp_diff / (amp_direct + ABS_THR));
  ------------------
  |  |   25|  24.0k|#define ABS_THR (1e-9f * 32768 * 32768)
  ------------------
  201|       |
  202|  24.0k|        ratio = min(max((gain + amp_ratio * (gain - 1)), 1 / LAMDA), LAMDA);
  ------------------
  |  |   75|  48.1k|#define min(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (75:20): [True: 19.7k, False: 4.29k]
  |  |  |  Branch (75:22): [True: 12.3k, False: 11.7k]
  |  |  |  Branch (75:35): [True: 8.00k, False: 11.7k]
  |  |  ------------------
  ------------------
  203|       |
  204|   933k|        for (jj = band_start; jj < self->hyb_band_count_max; jj++) {
  ------------------
  |  Branch (204:31): [True: 909k, False: 24.0k]
  ------------------
  205|   909k|          self->hyb_dir_out[ch][time_slot][jj].re *= ratio;
  206|   909k|          self->hyb_dir_out[ch][time_slot][jj].im *= ratio;
  207|   909k|        }
  208|  24.0k|      }
  209|    783|    }
  210|  9.00k|  }
  211|  4.50k|}
ixheaacd_mps_temp_reshape.c:ixheaacd_mps_est_normalized_envelope:
   58|  13.5k|                                                 FLOAT32 *env) {
   59|  13.5k|  FLOAT32 slot_energy[MAX_TIME_SLOTS][MAX_PARAMETER_BANDS] = {{0}};
   60|  13.5k|  FLOAT32 pb_energy[MAX_PARAMETER_BANDS] = {0};
   61|  13.5k|  FLOAT32 whitening_weight[MAX_PARAMETER_BANDS];
   62|  13.5k|  WORD32 ii, jj, param_band;
   63|       |
   64|  13.5k|  WORD32 k_start = 10;
   65|  13.5k|  WORD32 k_stop = 18;
   66|       |
   67|  13.5k|  FLOAT32 total_energy = 0, avg_energy = 0;
   68|       |
   69|  13.5k|  WORD32 ch_offset;
   70|       |
   71|  13.5k|  switch (inp) {
   72|  9.00k|    case DIR_DIFF_IN:
  ------------------
  |  |   39|  9.00k|#define DIR_DIFF_IN 0
  ------------------
  |  Branch (72:5): [True: 9.00k, False: 4.50k]
  ------------------
   73|  9.00k|      ch_offset = 0;
   74|   318k|      for (ii = 0; ii < self->time_slots; ii++) {
  ------------------
  |  Branch (74:20): [True: 309k, False: 9.00k]
  ------------------
   75|  12.1M|        for (jj = 0; jj < self->hyb_band_count_max; jj++) {
  ------------------
  |  Branch (75:22): [True: 11.8M, False: 309k]
  ------------------
   76|  11.8M|          slot_energy[ii]
   77|  11.8M|                     [ixheaacd_hybrid_band_71_to_processing_band_20_map[jj]] +=
   78|  11.8M|              ((self->hyb_dir_out[ch][ii][jj].re +
   79|  11.8M|                self->hyb_diff_out[ch][ii][jj].re) *
   80|  11.8M|               (self->hyb_dir_out[ch][ii][jj].re +
   81|  11.8M|                self->hyb_diff_out[ch][ii][jj].re)) +
   82|  11.8M|              ((self->hyb_dir_out[ch][ii][jj].im +
   83|  11.8M|                self->hyb_diff_out[ch][ii][jj].im) *
   84|  11.8M|               (self->hyb_dir_out[ch][ii][jj].im +
   85|  11.8M|                self->hyb_diff_out[ch][ii][jj].im));
   86|  11.8M|        }
   87|   309k|      }
   88|  9.00k|      break;
   89|  4.50k|    case DOWNMIX_IN:
  ------------------
  |  |   40|  4.50k|#define DOWNMIX_IN 1
  ------------------
  |  Branch (89:5): [True: 4.50k, False: 9.00k]
  ------------------
   90|  4.50k|      ch_offset = self->out_ch_count;
   91|  4.50k|      if ((self->pre_mix_req | self->bs_tsd_enable)) {
  ------------------
  |  Branch (91:11): [True: 500, False: 4.00k]
  ------------------
   92|  16.2k|        for (ii = 0; ii < self->time_slots; ii++) {
  ------------------
  |  Branch (92:22): [True: 15.7k, False: 500]
  ------------------
   93|   811k|          for (jj = 0; jj < self->hyb_band_count_max; jj++) {
  ------------------
  |  Branch (93:24): [True: 796k, False: 15.7k]
  ------------------
   94|   796k|            slot_energy
   95|   796k|                [ii][ixheaacd_hybrid_band_71_to_processing_band_20_map[jj]] +=
   96|   796k|                self->hyb_in[ch][jj][ii].re * self->hyb_in[ch][jj][ii].re +
   97|   796k|                self->hyb_in[ch][jj][ii].im * self->hyb_in[ch][jj][ii].im;
   98|   796k|          }
   99|  15.7k|        }
  100|  4.00k|      } else {
  101|   142k|        for (ii = 0; ii < self->time_slots; ii++) {
  ------------------
  |  Branch (101:22): [True: 138k, False: 4.00k]
  ------------------
  102|  5.27M|          for (jj = 0; jj < self->hyb_band_count_max; jj++) {
  ------------------
  |  Branch (102:24): [True: 5.13M, False: 138k]
  ------------------
  103|  5.13M|            slot_energy
  104|  5.13M|                [ii][ixheaacd_hybrid_band_71_to_processing_band_20_map[jj]] +=
  105|  5.13M|                self->w_dir[ch][ii][jj].re * self->w_dir[ch][ii][jj].re +
  106|  5.13M|                self->w_dir[ch][ii][jj].im * self->w_dir[ch][ii][jj].im;
  107|  5.13M|          }
  108|   138k|        }
  109|  4.00k|      }
  110|       |
  111|  4.50k|      break;
  112|      0|    default:
  ------------------
  |  Branch (112:5): [True: 0, False: 13.5k]
  ------------------
  113|      0|      ch_offset = 0;
  114|      0|      break;
  115|  13.5k|  }
  116|       |
  117|   135k|  for (param_band = k_start; param_band <= k_stop; param_band++)
  ------------------
  |  Branch (117:30): [True: 121k, False: 13.5k]
  ------------------
  118|   121k|    pb_energy[param_band] =
  119|   121k|        self->guided_env_shaping.pb_energy_prev[ch + ch_offset][param_band];
  120|       |
  121|  13.5k|  avg_energy = self->guided_env_shaping.avg_energy_prev[ch + ch_offset];
  122|       |
  123|   477k|  for (ii = 0; ii < self->time_slots; ii++) {
  ------------------
  |  Branch (123:16): [True: 464k, False: 13.5k]
  ------------------
  124|   464k|    total_energy = 0;
  125|  4.64M|    for (param_band = k_start; param_band <= k_stop; param_band++) {
  ------------------
  |  Branch (125:32): [True: 4.17M, False: 464k]
  ------------------
  126|  4.17M|      pb_energy[param_band] = (1 - GES_ALPHA) * slot_energy[ii][param_band] +
  ------------------
  |  |   43|  4.17M|#define GES_ALPHA (0.99637864f)
  ------------------
  127|  4.17M|                              GES_ALPHA * pb_energy[param_band];
  ------------------
  |  |   43|  4.17M|#define GES_ALPHA (0.99637864f)
  ------------------
  128|       |
  129|  4.17M|      total_energy += slot_energy[ii][param_band];
  130|  4.17M|    }
  131|   464k|    total_energy /= (k_stop - k_start + 1);
  132|       |
  133|   464k|    total_energy =
  134|   464k|        (1 - GES_ALPHA) * total_energy +
  ------------------
  |  |   43|   464k|#define GES_ALPHA (0.99637864f)
  ------------------
  135|   464k|        GES_ALPHA * self->guided_env_shaping.frame_energy_prev[ch + ch_offset];
  ------------------
  |  |   43|   464k|#define GES_ALPHA (0.99637864f)
  ------------------
  136|       |
  137|   464k|    self->guided_env_shaping.frame_energy_prev[ch + ch_offset] = total_energy;
  138|       |
  139|  4.64M|    for (param_band = k_start; param_band <= k_stop; param_band++) {
  ------------------
  |  Branch (139:32): [True: 4.17M, False: 464k]
  ------------------
  140|  4.17M|      whitening_weight[param_band] =
  141|  4.17M|          total_energy / (pb_energy[param_band] + ABS_THR);
  ------------------
  |  |   25|  4.17M|#define ABS_THR (1e-9f * 32768 * 32768)
  ------------------
  142|  4.17M|    }
  143|       |
  144|   464k|    env[ii] = 0;
  145|  4.64M|    for (param_band = k_start; param_band <= k_stop; param_band++) {
  ------------------
  |  Branch (145:32): [True: 4.17M, False: 464k]
  ------------------
  146|  4.17M|      env[ii] += slot_energy[ii][param_band] * whitening_weight[param_band];
  147|  4.17M|    }
  148|       |
  149|   464k|    avg_energy = (1 - GES_BETA) * env[ii] + GES_BETA * avg_energy;
  ------------------
  |  |   44|   464k|#define GES_BETA (0.9643691f)
  ------------------
                  avg_energy = (1 - GES_BETA) * env[ii] + GES_BETA * avg_energy;
  ------------------
  |  |   44|   464k|#define GES_BETA (0.9643691f)
  ------------------
  150|       |
  151|   464k|    env[ii] = (FLOAT32)sqrt(env[ii] / (avg_energy + ABS_THR));
  ------------------
  |  |   25|   464k|#define ABS_THR (1e-9f * 32768 * 32768)
  ------------------
  152|   464k|  }
  153|       |
  154|   135k|  for (param_band = k_start; param_band <= k_stop; param_band++)
  ------------------
  |  Branch (154:30): [True: 121k, False: 13.5k]
  ------------------
  155|   121k|    self->guided_env_shaping.pb_energy_prev[ch + ch_offset][param_band] =
  156|   121k|        pb_energy[param_band];
  157|       |
  158|  13.5k|  self->guided_env_shaping.avg_energy_prev[ch + ch_offset] = avg_energy;
  159|  13.5k|}

ixheaacd_dec_coupling_channel_element:
  149|    884|    ia_eld_specific_config_struct eld_specific_config, WORD32 ele_type) {
  150|    884|  WORD32 element_instance_tag;
  151|    884|  LOOPIDX c;
  152|       |
  153|    884|  WORD ind_sw_cce_flag, num_coupled_elements;
  154|       |
  155|    884|  WORD num_gain_element_lists = 0;
  156|    884|  WORD gain_element_scale;
  157|       |
  158|    884|  const UWORD16 *hcod_sf =
  159|    884|      ptr_aac_tables->pstr_huffmann_tables->huffman_code_book_scl;
  160|    884|  const UWORD32 *table_idx =
  161|    884|      ptr_aac_tables->pstr_huffmann_tables->huffman_code_book_scl_index;
  162|    884|  WORD16 index, length;
  163|       |
  164|    884|  IA_ERRORCODE error_status = IA_NO_ERROR;
  ------------------
  |  |   23|    884|#define IA_NO_ERROR 0x00000000
  ------------------
  165|       |
  166|    884|  element_instance_tag = ixheaacd_read_bits_buf(it_bit_buf, 4);
  167|    884|  element_index_order[0] = element_instance_tag;
  168|       |
  169|    884|  ind_sw_cce_flag = ixheaacd_read_bits_buf(it_bit_buf, 1);
  170|    884|  num_coupled_elements = ixheaacd_read_bits_buf(it_bit_buf, 3);
  171|       |
  172|  9.63k|  for (c = 0; c < MAX_BS_ELEMENT; c++)
  ------------------
  |  |   24|  9.63k|#define MAX_BS_ELEMENT (8 + MAX_CC_CHANNEL_NUM)
  |  |  ------------------
  |  |  |  |   23|  9.63k|#define MAX_CC_CHANNEL_NUM (2)
  |  |  ------------------
  ------------------
  |  Branch (172:15): [True: 8.75k, False: 884]
  ------------------
  173|  8.75k|    ind_channel_info->elements_coupled[c] = -1;
  174|       |
  175|    884|  ind_channel_info->num_coupled_elements = num_coupled_elements;
  176|       |
  177|  4.09k|  for (c = 0; c < (num_coupled_elements + 1); c++) {
  ------------------
  |  Branch (177:15): [True: 3.20k, False: 884]
  ------------------
  178|  3.20k|    num_gain_element_lists++;
  179|       |
  180|  3.20k|    ind_channel_info->cc_target_is_cpe[c] = ixheaacd_read_bits_buf(it_bit_buf, 1);
  181|  3.20k|    ind_channel_info->cc_target_tag_select[c] = ixheaacd_read_bits_buf(it_bit_buf, 4);
  182|  3.20k|    if (ind_channel_info->cc_target_is_cpe[c]) {
  ------------------
  |  Branch (182:9): [True: 1.21k, False: 1.99k]
  ------------------
  183|  1.21k|      ind_channel_info->cc_l[c] = ixheaacd_read_bits_buf(it_bit_buf, 1);
  184|  1.21k|      ind_channel_info->cc_r[c] = ixheaacd_read_bits_buf(it_bit_buf, 1);
  185|  1.21k|      if (ind_channel_info->cc_l[c] && ind_channel_info->cc_r[c])
  ------------------
  |  Branch (185:11): [True: 669, False: 543]
  |  Branch (185:40): [True: 467, False: 202]
  ------------------
  186|    467|        num_gain_element_lists++;
  187|  1.21k|      ind_channel_info->elements_coupled[c] = 1;
  188|  1.21k|    } else
  189|  1.99k|      ind_channel_info->elements_coupled[c] = 0;
  190|  3.20k|  }
  191|    884|  if ((ind_sw_cce_flag == 0) && (num_gain_element_lists > MAX_BS_ELEMENT)) {
  ------------------
  |  |   24|    294|#define MAX_BS_ELEMENT (8 + MAX_CC_CHANNEL_NUM)
  |  |  ------------------
  |  |  |  |   23|    294|#define MAX_CC_CHANNEL_NUM (2)
  |  |  ------------------
  ------------------
  |  Branch (191:7): [True: 294, False: 590]
  |  Branch (191:33): [True: 1, False: 293]
  ------------------
  192|      1|    return IA_FATAL_ERROR;
  ------------------
  |  |   25|      1|#define IA_FATAL_ERROR 0x80000000
  ------------------
  193|      1|  }
  194|    883|  ixheaacd_read_bits_buf(it_bit_buf, 1);/*cc_domain*/
  195|    883|  ixheaacd_read_bits_buf(it_bit_buf, 1);/*gain_element_sign*/
  196|    883|  gain_element_scale = ixheaacd_read_bits_buf(it_bit_buf, 2);
  197|       |
  198|    883|  aac_handle->pstr_aac_dec_ch_info[0]->str_ics_info.num_swb_window = 0;
  199|    883|  aac_handle->pstr_aac_dec_ch_info[0]->str_ics_info.sampling_rate_index =
  200|    883|      samp_rate_idx;
  201|       |
  202|    883|  aac_handle->pstr_aac_dec_ch_info[0]->common_window = 0;
  203|       |
  204|    883|  error_status = ixheaacd_individual_ch_stream(
  205|    883|      it_bit_buf, aac_handle, 1, frame_size, total_channels, audio_object_type,
  206|    883|      eld_specific_config, ele_type);
  207|       |
  208|    883|  if (error_status) return error_status;
  ------------------
  |  Branch (208:7): [True: 21, False: 862]
  ------------------
  209|       |
  210|    862|  ind_channel_info->cc_gain[0] = 1 << 29;
  211|  3.53k|  for (c = 1; c < num_gain_element_lists; c++) {
  ------------------
  |  Branch (211:15): [True: 2.67k, False: 859]
  ------------------
  212|  2.67k|    WORD cge;
  213|  2.67k|    WORD common_gain_element_present[MAX_BS_ELEMENT];
  214|  2.67k|    WORD16 norm_value;
  215|       |
  216|  2.67k|    if (ind_sw_cce_flag)
  ------------------
  |  Branch (216:9): [True: 2.67k, False: 3]
  ------------------
  217|  2.67k|      cge = 1;
  218|      3|    else {
  219|      3|      common_gain_element_present[c] = ixheaacd_read_bits_buf(it_bit_buf, 1);
  220|      3|      cge = common_gain_element_present[c];
  221|      3|      return IA_XHEAAC_DEC_EXE_FATAL_UNIMPLEMENTED_CCE;
  ------------------
  |  |  119|      3|#define IA_XHEAAC_DEC_EXE_FATAL_UNIMPLEMENTED_CCE 0xFFFF9800
  ------------------
  222|      3|    }
  223|  2.67k|    if (cge) {
  ------------------
  |  Branch (223:9): [True: 2.67k, False: 0]
  ------------------
  224|  2.67k|      UWORD8 *ptr_read_next = it_bit_buf->ptr_read_next;
  225|  2.67k|      WORD32 bit_pos = 7 - it_bit_buf->bit_pos;
  226|  2.67k|      WORD32 read_word =
  227|  2.67k|          ixheaacd_aac_showbits_32(it_bit_buf->ptr_read_next, it_bit_buf->cnt_bits, NULL);
  228|  2.67k|      UWORD32 read_word1;
  229|       |
  230|  2.67k|      read_word1 = read_word << bit_pos;
  231|  2.67k|      ixheaacd_huffman_decode(read_word1, &index, &length, hcod_sf, table_idx);
  232|       |
  233|  2.67k|      bit_pos += length;
  234|       |
  235|  2.67k|      ixheaacd_aac_read_byte(&ptr_read_next, &bit_pos, &read_word);
  236|  2.76k|      while (bit_pos > 8)
  ------------------
  |  Branch (236:14): [True: 94, False: 2.67k]
  ------------------
  237|     94|        ixheaacd_aac_read_byte(&ptr_read_next, &bit_pos, &read_word);
  238|       |
  239|  2.67k|      it_bit_buf->ptr_read_next = ptr_read_next;
  240|  2.67k|      it_bit_buf->bit_pos = 7 - bit_pos;
  241|  2.67k|      it_bit_buf->cnt_bits -= length;
  242|       |
  243|  2.67k|      norm_value = index - 60;
  244|  2.67k|      if (norm_value == -1)
  ------------------
  |  Branch (244:11): [True: 45, False: 2.62k]
  ------------------
  245|     45|        ind_channel_info->cc_gain[c] =
  246|     45|            common_tables_ptr->cc_gain_scale[gain_element_scale];
  247|  2.62k|      else {
  248|  2.62k|        int i;
  249|  2.62k|        ind_channel_info->cc_gain[c] =
  250|  2.62k|            common_tables_ptr->cc_gain_scale[gain_element_scale];
  251|  5.98k|        for (i = 0; i < (-norm_value) - 1; i++) {
  ------------------
  |  Branch (251:21): [True: 3.35k, False: 2.62k]
  ------------------
  252|  3.35k|          ind_channel_info->cc_gain[c] = ixheaac_mul32_sh(
  253|  3.35k|              ind_channel_info->cc_gain[c],
  254|  3.35k|              common_tables_ptr->cc_gain_scale[gain_element_scale], 29);
  255|  3.35k|        }
  256|  2.62k|      }
  257|  2.67k|    } else {
  258|      0|      return IA_XHEAAC_DEC_EXE_FATAL_UNIMPLEMENTED_CCE;
  ------------------
  |  |  119|      0|#define IA_XHEAAC_DEC_EXE_FATAL_UNIMPLEMENTED_CCE 0xFFFF9800
  ------------------
  259|      0|    }
  260|  2.67k|  }
  261|    859|  if (it_bit_buf->cnt_bits < 0) {
  ------------------
  |  Branch (261:7): [True: 17, False: 842]
  ------------------
  262|     17|    return IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES;
  ------------------
  |  |   98|     17|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  263|     17|  }
  264|    842|  return error_status;
  265|    859|}
ixheaacd_dec_couple_channel:
  271|    281|{
  272|    281|  WORD i;
  273|    281|  WORD32 out_cc;
  274|    281|  WORD32 *ptr_out_samp = &out_samp_cc[0];
  275|   251k|  for (i = frame_size - 1; i >= 0; i--) {
  ------------------
  |  Branch (275:28): [True: 251k, False: 281]
  ------------------
  276|   251k|    out_cc = (ixheaac_shl32_sat(
  277|   251k|        ixheaac_mult32x16in32(*ptr_out_samp++, gain_cc), 3));
  278|   251k|    *p_time_data = ixheaac_add32_sat(out_cc, *p_time_data);
  279|   251k|    p_time_data += total_channels;
  280|   251k|  }
  281|    281|}
ixheaacd_dec_ind_coupling:
  287|    301|{
  288|    301|  WORD c, j, k;
  289|    301|  WORD l;
  290|    301|  WORD32 *out_samp_cc, err = 0;
  291|       |
  292|    301|  ia_enhaacplus_dec_ind_cc *ind_channel_info;
  293|       |
  294|    301|  WORD32 *ptr_time_data = (WORD32 *)ptr_time_data_tmp;
  295|       |
  296|    301|  {
  297|    301|    ind_channel_info = &p_obj_exhaacplus_dec->p_state_aac->ind_cc_info;
  298|       |
  299|    301|    out_samp_cc = coup_ch_output;
  300|       |
  301|    301|    if (ind_channel_info->num_coupled_elements > 0 && coup_ch_output == NULL) {
  ------------------
  |  Branch (301:9): [True: 98, False: 203]
  |  Branch (301:55): [True: 11, False: 87]
  ------------------
  302|     11|      if (p_obj_exhaacplus_dec->p_state_aac->ec_enable) {
  ------------------
  |  Branch (302:11): [True: 0, False: 11]
  ------------------
  303|      0|        ind_channel_info->num_coupled_elements = 0;
  304|      0|        p_obj_exhaacplus_dec->aac_config.frame_status = 0;
  305|     11|      } else {
  306|     11|        return IA_FATAL_ERROR;
  ------------------
  |  |   25|     11|#define IA_FATAL_ERROR 0x80000000
  ------------------
  307|     11|      }
  308|     11|    }
  309|       |
  310|    290|    j = 0;
  311|  1.11k|    for (c = 0; c < ind_channel_info->num_coupled_elements + 1; c++) {
  ------------------
  |  Branch (311:17): [True: 820, False: 290]
  ------------------
  312|  7.15k|      for (l = 0; l < MAX_BS_ELEMENT; l++) {
  ------------------
  |  |   24|  7.15k|#define MAX_BS_ELEMENT (8 + MAX_CC_CHANNEL_NUM)
  |  |  ------------------
  |  |  |  |   23|  7.15k|#define MAX_CC_CHANNEL_NUM (2)
  |  |  ------------------
  ------------------
  |  Branch (312:19): [True: 6.59k, False: 560]
  ------------------
  313|  6.59k|        if (p_obj_exhaacplus_dec->aac_config.element_type[l] ==
  ------------------
  |  Branch (313:13): [True: 1.70k, False: 4.89k]
  ------------------
  314|  6.59k|                ind_channel_info->elements_coupled[c] &&
  315|  1.70k|            p_obj_exhaacplus_dec->aac_config.element_instance_order[l] ==
  ------------------
  |  Branch (315:13): [True: 260, False: 1.44k]
  ------------------
  316|  1.70k|                ind_channel_info->cc_target_tag_select[c]) {
  317|    260|          break;
  318|    260|        }
  319|  6.59k|      }
  320|    820|      if (l == MAX_BS_ELEMENT) {
  ------------------
  |  |   24|    820|#define MAX_BS_ELEMENT (8 + MAX_CC_CHANNEL_NUM)
  |  |  ------------------
  |  |  |  |   23|    820|#define MAX_CC_CHANNEL_NUM (2)
  |  |  ------------------
  ------------------
  |  Branch (320:11): [True: 560, False: 260]
  ------------------
  321|    560|        continue;
  322|    560|      }
  323|       |
  324|    260|      k = p_obj_exhaacplus_dec->aac_config.slot_element[l];
  325|       |
  326|    260|      if (ind_channel_info->cc_target_is_cpe[c] == 0) {
  ------------------
  |  Branch (326:11): [True: 199, False: 61]
  ------------------
  327|    199|        WORD32 *p_time_data = &ptr_time_data[k];
  328|       |
  329|    199|        WORD16 gain_cc = ixheaac_round16(ind_channel_info->cc_gain[j]);
  330|       |
  331|    199|        ixheaacd_dec_couple_channel(p_time_data, out_samp_cc, frame_size,
  332|    199|                                    total_channels, gain_cc);
  333|    199|      }
  334|    260|      if (ind_channel_info->cc_target_is_cpe[c] == 1) {
  ------------------
  |  Branch (334:11): [True: 61, False: 199]
  ------------------
  335|     61|        if (ind_channel_info->cc_l[c] == 1) {
  ------------------
  |  Branch (335:13): [True: 50, False: 11]
  ------------------
  336|     50|          WORD32 *p_time_data = &ptr_time_data[k];
  337|       |
  338|     50|          WORD16 gain_cc = ixheaac_round16(ind_channel_info->cc_gain[j]);
  339|       |
  340|     50|          ixheaacd_dec_couple_channel(p_time_data, out_samp_cc, frame_size,
  341|     50|                                      total_channels, gain_cc);
  342|     50|        }
  343|       |
  344|     61|        k = p_obj_exhaacplus_dec->aac_config.slot_element[l];
  345|       |
  346|     61|        if (ind_channel_info->cc_r[c] == 1) {
  ------------------
  |  Branch (346:13): [True: 32, False: 29]
  ------------------
  347|     32|          WORD32 *p_time_data = &ptr_time_data[k + 1];
  348|     32|          WORD16 gain_cc = ixheaac_round16(ind_channel_info->cc_gain[j + 1]);
  349|       |
  350|     32|          ixheaacd_dec_couple_channel(p_time_data, out_samp_cc, frame_size,
  351|     32|                                      total_channels, gain_cc);
  352|     32|        }
  353|     61|      }
  354|    260|      if (ind_channel_info->cc_target_is_cpe[c] == 1) {
  ------------------
  |  Branch (354:11): [True: 61, False: 199]
  ------------------
  355|     61|        j += 2;
  356|    199|      } else {
  357|    199|        j += 1;
  358|    199|      }
  359|    260|    }
  360|    290|  }
  361|      0|  return err;
  362|    301|}

ixheaacd_peak_limiter_init:
   47|  6.43k|                                  FLOAT32 *buffer, UWORD32 *delay_in_samples) {
   48|  6.43k|  UWORD32 attack;
   49|       |
   50|  6.43k|  attack = (UWORD32)(DEFAULT_ATTACK_TIME_MS * sample_rate / 1000);
  ------------------
  |  |   24|  6.43k|#define DEFAULT_ATTACK_TIME_MS (5.0f)
  ------------------
   51|  6.43k|  *delay_in_samples = attack;
   52|       |
   53|  6.43k|  if (attack < 1) return 0;
  ------------------
  |  Branch (53:7): [True: 75, False: 6.36k]
  ------------------
   54|       |
   55|  6.36k|  peak_limiter->max_buf = buffer;
   56|  6.36k|  peak_limiter->max_idx = 0;
   57|  6.36k|  peak_limiter->cir_buf_pnt = 0;
   58|  6.36k|  peak_limiter->delayed_input = buffer + attack * 4 + 32;
   59|       |
   60|  6.36k|  peak_limiter->delayed_input_index = 0;
   61|  6.36k|  peak_limiter->attack_time = DEFAULT_ATTACK_TIME_MS;
  ------------------
  |  |   24|  6.36k|#define DEFAULT_ATTACK_TIME_MS (5.0f)
  ------------------
   62|  6.36k|  peak_limiter->release_time = DEFAULT_RELEASE_TIME_MS;
  ------------------
  |  |   25|  6.36k|#define DEFAULT_RELEASE_TIME_MS (50.0f)
  ------------------
   63|  6.36k|  peak_limiter->attack_time_samples = attack;
   64|  6.36k|  peak_limiter->attack_constant = (FLOAT32)pow(0.1, 1.0 / (attack + 1));
   65|  6.36k|  peak_limiter->release_constant = (FLOAT32)pow(
   66|  6.36k|      0.1, 1.0 / (DEFAULT_RELEASE_TIME_MS * sample_rate / 1000 + 1));
  ------------------
  |  |   25|  6.36k|#define DEFAULT_RELEASE_TIME_MS (50.0f)
  ------------------
   67|  6.36k|  peak_limiter->num_channels = num_channels;
   68|  6.36k|  peak_limiter->sample_rate = sample_rate;
   69|  6.36k|  peak_limiter->min_gain = 1.0f;
   70|  6.36k|  peak_limiter->limiter_on = 1;
   71|  6.36k|  peak_limiter->pre_smoothed_gain = 1.0f;
   72|  6.36k|  peak_limiter->gain_modified = 1.0f;
   73|       |
   74|  6.36k|  return 0;
   75|  6.43k|}
ixheaacd_peak_limiter_process:
  194|  85.0k|                                   UWORD8 *qshift_adj) {
  195|  85.0k|  UWORD32 i, j;
  196|  85.0k|  FLOAT32 tmp, gain;
  197|  85.0k|  FLOAT32 min_gain = 1.0f;
  198|  85.0k|  FLOAT32 maximum;
  199|  85.0k|  UWORD32 num_channels = peak_limiter->num_channels;
  200|  85.0k|  UWORD32 attack_time_samples = peak_limiter->attack_time_samples;
  201|  85.0k|  FLOAT32 attack_constant = peak_limiter->attack_constant;
  202|  85.0k|  FLOAT32 release_constant = peak_limiter->release_constant;
  203|  85.0k|  FLOAT32 *max_buf = peak_limiter->max_buf;
  204|  85.0k|  FLOAT32 gain_modified = peak_limiter->gain_modified;
  205|  85.0k|  FLOAT32 *delayed_input = peak_limiter->delayed_input;
  206|  85.0k|  UWORD32 delayed_input_index = peak_limiter->delayed_input_index;
  207|  85.0k|  FLOAT64 pre_smoothed_gain = peak_limiter->pre_smoothed_gain;
  208|  85.0k|  WORD32 limit_threshold = PEAK_LIM_THR_FIX;
  ------------------
  |  |   27|  85.0k|#define PEAK_LIM_THR_FIX (2147483647)
  ------------------
  209|       |
  210|  85.0k|  WORD32 *samples = (WORD32 *)samples_t;
  211|       |
  212|  85.0k|  if (peak_limiter->limiter_on || (FLOAT32)pre_smoothed_gain) {
  ------------------
  |  Branch (212:7): [True: 85.0k, False: 0]
  |  Branch (212:35): [True: 0, False: 0]
  ------------------
  213|  73.0M|    for (i = 0; i < frame_len; i++) {
  ------------------
  |  Branch (213:17): [True: 72.9M, False: 85.0k]
  ------------------
  214|  72.9M|      tmp = 0.0f;
  215|   165M|      for (j = 0; j < num_channels; j++) {
  ------------------
  |  Branch (215:19): [True: 92.4M, False: 72.9M]
  ------------------
  216|  92.4M|        FLOAT32 gain_t = (FLOAT32)(1 << *(qshift_adj + j));
  217|  92.4M|        tmp = (FLOAT32)MAX(tmp, fabs((samples[i * num_channels + j] * gain_t)));
  ------------------
  |  |   29|  92.4M|#define MAX(x, y) ((x) > (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (29:20): [True: 2.69M, False: 89.7M]
  |  |  ------------------
  ------------------
  218|  92.4M|      }
  219|  72.9M|      max_buf[peak_limiter->cir_buf_pnt] = tmp;
  220|       |
  221|  72.9M|      if (peak_limiter->max_idx == peak_limiter->cir_buf_pnt) {
  ------------------
  |  Branch (221:11): [True: 4.94M, False: 68.0M]
  ------------------
  222|  4.94M|        peak_limiter->max_idx = 0;
  223|   510M|        for (j = 1; j < (attack_time_samples); j++) {
  ------------------
  |  Branch (223:21): [True: 505M, False: 4.94M]
  ------------------
  224|   505M|          if (max_buf[j] > max_buf[peak_limiter->max_idx])
  ------------------
  |  Branch (224:15): [True: 13.6M, False: 491M]
  ------------------
  225|  13.6M|            peak_limiter->max_idx = j;
  226|   505M|        }
  227|  68.0M|      } else if (tmp >= max_buf[peak_limiter->max_idx]) {
  ------------------
  |  Branch (227:18): [True: 32.5M, False: 35.4M]
  ------------------
  228|  32.5M|        peak_limiter->max_idx = peak_limiter->cir_buf_pnt;
  229|  32.5M|      }
  230|  72.9M|      peak_limiter->cir_buf_pnt++;
  231|       |
  232|  72.9M|      if (peak_limiter->cir_buf_pnt == (WORD32)(attack_time_samples))
  ------------------
  |  Branch (232:11): [True: 641k, False: 72.3M]
  ------------------
  233|   641k|        peak_limiter->cir_buf_pnt = 0;
  234|  72.9M|      maximum = max_buf[peak_limiter->max_idx];
  235|       |
  236|  72.9M|      if (maximum > limit_threshold) {
  ------------------
  |  Branch (236:11): [True: 31.8M, False: 41.1M]
  ------------------
  237|  31.8M|        gain = limit_threshold / maximum;
  238|  41.1M|      } else {
  239|  41.1M|        gain = 1;
  240|  41.1M|      }
  241|       |
  242|  72.9M|      if (gain < pre_smoothed_gain) {
  ------------------
  |  Branch (242:11): [True: 5.97M, False: 67.0M]
  ------------------
  243|  5.97M|        gain_modified =
  244|  5.97M|            MIN(gain_modified,
  ------------------
  |  |   30|  5.97M|#define MIN(x, y) ((x) > (y) ? (y) : (x))
  |  |  ------------------
  |  |  |  Branch (30:20): [True: 177k, False: 5.79M]
  |  |  ------------------
  ------------------
  245|  5.97M|                (gain - 0.1f * (FLOAT32)pre_smoothed_gain) * 1.11111111f);
  246|       |
  247|  67.0M|      } else {
  248|  67.0M|        gain_modified = gain;
  249|  67.0M|      }
  250|       |
  251|  72.9M|      if (gain_modified < pre_smoothed_gain) {
  ------------------
  |  Branch (251:11): [True: 5.97M, False: 67.0M]
  ------------------
  252|  5.97M|        pre_smoothed_gain =
  253|  5.97M|            attack_constant * (pre_smoothed_gain - gain_modified) +
  254|  5.97M|            gain_modified;
  255|  5.97M|        pre_smoothed_gain = MAX(pre_smoothed_gain, gain);
  ------------------
  |  |   29|  5.97M|#define MAX(x, y) ((x) > (y) ? (x) : (y))
  |  |  ------------------
  |  |  |  Branch (29:20): [True: 5.94M, False: 26.5k]
  |  |  ------------------
  ------------------
  256|  67.0M|      } else {
  257|  67.0M|        pre_smoothed_gain =
  258|  67.0M|            release_constant * (pre_smoothed_gain - gain_modified) +
  259|  67.0M|            gain_modified;
  260|  67.0M|      }
  261|       |
  262|  72.9M|      gain = (FLOAT32)pre_smoothed_gain;
  263|       |
  264|   165M|      for (j = 0; j < num_channels; j++) {
  ------------------
  |  Branch (264:19): [True: 92.4M, False: 72.9M]
  ------------------
  265|  92.4M|        WORD64 tmp_fix;
  266|  92.4M|        tmp = delayed_input[delayed_input_index * num_channels + j];
  267|  92.4M|        FLOAT32 gain_t = (FLOAT32)(1 << *(qshift_adj + j));
  268|  92.4M|        delayed_input[delayed_input_index * num_channels + j] =
  269|  92.4M|            samples[i * num_channels + j] * gain_t;
  270|       |
  271|  92.4M|        tmp *= gain;
  272|       |
  273|  92.4M|        tmp_fix = (WORD64)tmp;
  274|       |
  275|  92.4M|        if (tmp_fix > limit_threshold)
  ------------------
  |  Branch (275:13): [True: 6.75M, False: 85.6M]
  ------------------
  276|  6.75M|          tmp_fix = limit_threshold;
  277|  85.6M|        else if (tmp_fix < -limit_threshold)
  ------------------
  |  Branch (277:18): [True: 7.02M, False: 78.6M]
  ------------------
  278|  7.02M|          tmp_fix = -limit_threshold;
  279|       |
  280|  92.4M|        samples[i * num_channels + j] = (WORD32)tmp_fix;
  281|  92.4M|      }
  282|       |
  283|  72.9M|      delayed_input_index++;
  284|  72.9M|      if (delayed_input_index >= attack_time_samples) delayed_input_index = 0;
  ------------------
  |  Branch (284:11): [True: 641k, False: 72.3M]
  ------------------
  285|       |
  286|  72.9M|      if (gain < min_gain) min_gain = gain;
  ------------------
  |  Branch (286:11): [True: 3.27M, False: 69.7M]
  ------------------
  287|  72.9M|    }
  288|  85.0k|  } else {
  289|      0|    for (i = 0; i < frame_len; i++) {
  ------------------
  |  Branch (289:17): [True: 0, False: 0]
  ------------------
  290|      0|      for (j = 0; j < num_channels; j++) {
  ------------------
  |  Branch (290:19): [True: 0, False: 0]
  ------------------
  291|      0|        tmp = delayed_input[delayed_input_index * num_channels + j];
  292|      0|        FLOAT32 gain_t = (FLOAT32)(1 << *(qshift_adj + j));
  293|      0|        delayed_input[delayed_input_index * num_channels + j] =
  294|      0|            samples[i * num_channels + j] * gain_t;
  295|      0|        samples[i * num_channels + j] = (WORD32)tmp;
  296|      0|      }
  297|       |
  298|      0|      delayed_input_index++;
  299|      0|      if (delayed_input_index >= attack_time_samples) delayed_input_index = 0;
  ------------------
  |  Branch (299:11): [True: 0, False: 0]
  ------------------
  300|      0|    }
  301|      0|  }
  302|       |
  303|  85.0k|  peak_limiter->gain_modified = gain_modified;
  304|  85.0k|  peak_limiter->delayed_input_index = delayed_input_index;
  305|  85.0k|  peak_limiter->pre_smoothed_gain = pre_smoothed_gain;
  306|  85.0k|  peak_limiter->min_gain = min_gain;
  307|       |
  308|  85.0k|  return;
  309|  85.0k|}

ixheaacd_gen_rand_vec:
   75|   544k|                           WORD32 sfb_width, WORD32 *seed) {
   76|   544k|  WORD nrg_scale;
   77|   544k|  WORD32 nrg = 0;
   78|   544k|  WORD32 *spec = ptr_spec_coef;
   79|   544k|  WORD32 sfb;
   80|       |
   81|  6.82M|  for (sfb = 0; sfb <= sfb_width; sfb++) {
  ------------------
  |  Branch (81:17): [True: 6.27M, False: 544k]
  ------------------
   82|  6.27M|    *seed = (WORD32)(((WORD64)1664525 * (WORD64)(*seed)) + (WORD64)1013904223);
   83|       |
   84|  6.27M|    *spec = (*seed >> 3);
   85|       |
   86|  6.27M|    nrg = ixheaac_add32_sat(nrg, ixheaac_mult32_shl_sat(*spec, *spec));
   87|       |
   88|  6.27M|    spec++;
   89|  6.27M|  }
   90|       |
   91|   544k|  nrg_scale = ixheaac_norm32(nrg);
   92|       |
   93|   544k|  if (nrg_scale > 0) {
  ------------------
  |  Branch (93:7): [True: 544k, False: 0]
  ------------------
   94|   544k|    nrg_scale &= ~1;
   95|   544k|    nrg = ixheaac_shl32_sat(nrg, nrg_scale);
   96|   544k|    shift = shift - (nrg_scale >> 1);
   97|   544k|  }
   98|       |
   99|   544k|  nrg = ixheaacd_sqrt(nrg);
  100|   544k|  scale = ixheaac_div32_pos_normb(scale, nrg);
  101|       |
  102|   544k|  spec = ptr_spec_coef;
  103|       |
  104|   544k|  if (shift < -31) {
  ------------------
  |  Branch (104:7): [True: 19.4k, False: 524k]
  ------------------
  105|  19.4k|    shift = -31;
  106|  19.4k|  }
  107|  6.82M|  for (sfb = 0; sfb <= sfb_width; sfb++) {
  ------------------
  |  Branch (107:17): [True: 6.27M, False: 544k]
  ------------------
  108|  6.27M|    *spec = ixheaac_shr32_dir_sat_limit(ixheaac_mult32_shl_sat(*spec, scale),
  109|  6.27M|                                         shift);
  110|  6.27M|    spec++;
  111|  6.27M|  }
  112|   544k|}
ixheaacd_pns_process:
  115|   212k|                          WORD32 channel, ia_aac_dec_tables_struct *ptr_aac_tables) {
  116|   212k|  ia_pns_info_struct *ptr_pns_info =
  117|   212k|      &ptr_aac_dec_channel_info[channel]->str_pns_info;
  118|   212k|  ia_ics_info_struct *ptr_ics_info =
  119|   212k|      &ptr_aac_dec_channel_info[channel]->str_ics_info;
  120|   212k|  WORD16 maximum_bins_short = ptr_ics_info->frame_length >> 3;
  121|   212k|  WORD32 *ptr_scale_mant_tab =
  122|   212k|      ptr_aac_tables->pstr_block_tables->scale_mant_tab;
  123|       |
  124|   212k|  if (ptr_pns_info->pns_active) {
  ------------------
  |  Branch (124:7): [True: 34.9k, False: 177k]
  ------------------
  125|  34.9k|    const WORD16 *swb_offset =
  126|  34.9k|        ptr_aac_tables->str_aac_sfb_info[ptr_ics_info->window_sequence]
  127|  34.9k|            .sfb_index;
  128|       |
  129|  34.9k|    WORD num_win_group, grp_len, sfb;
  130|  34.9k|    WORD32 *spec = &ptr_aac_dec_channel_info[channel]->ptr_spec_coeff[0];
  131|       |
  132|  74.7k|    for (num_win_group = 0; num_win_group < ptr_ics_info->num_window_groups;
  ------------------
  |  Branch (132:29): [True: 39.7k, False: 34.9k]
  ------------------
  133|  39.7k|         num_win_group++) {
  134|  39.7k|      grp_len = ptr_ics_info->window_group_length[num_win_group];
  135|       |
  136|  39.7k|      for (grp_len = 0;
  137|   114k|           grp_len < ptr_ics_info->window_group_length[num_win_group];
  ------------------
  |  Branch (137:12): [True: 74.7k, False: 39.7k]
  ------------------
  138|  74.7k|           grp_len++) {
  139|  1.34M|        for (sfb = 0; sfb < ptr_ics_info->max_sfb; sfb++) {
  ------------------
  |  Branch (139:23): [True: 1.26M, False: 74.7k]
  ------------------
  140|  1.26M|          WORD16 pns_band = ((num_win_group << 4) + sfb);
  141|       |
  142|  1.26M|          if (ptr_aac_dec_channel_info[channel]
  ------------------
  |  Branch (142:15): [True: 544k, False: 721k]
  ------------------
  143|  1.26M|                  ->str_pns_info.pns_used[pns_band]) {
  144|   544k|            WORD32 scale_mant;
  145|   544k|            WORD32 scale_exp;
  146|   544k|            WORD32 sfb_width = swb_offset[sfb + 1] - swb_offset[sfb] - 1;
  147|   544k|            WORD32 *ptr_spec = &spec[swb_offset[sfb]];
  148|       |
  149|   544k|            scale_mant = ptr_scale_mant_tab[ptr_aac_dec_channel_info[channel]
  150|   544k|                                                ->ptr_scale_factor[pns_band] &
  151|   544k|                                            PNS_SCALE_MANT_TAB_MASK];
  ------------------
  |  |   29|   544k|#define PNS_SCALE_MANT_TAB_MASK (PNS_SCALE_MANT_TAB_SIZE - 1)
  |  |  ------------------
  |  |  |  |   28|   544k|#define PNS_SCALE_MANT_TAB_SIZE 4
  |  |  ------------------
  ------------------
  152|   544k|            scale_exp = add_d(sub_d(31, (ptr_aac_dec_channel_info[channel]
  ------------------
  |  |   23|   544k|#define add_d(a, b) ((a) + (b))
  ------------------
  153|   544k|                                             ->ptr_scale_factor[pns_band] >>
  154|   544k|                                         PNS_SCALEFACTOR_SCALING)),
  155|   544k|                              PNS_SCALE_MANT_TAB_SCALING);
  156|       |
  157|   544k|            if (ixheaacd_is_correlation(ptr_aac_dec_channel_info[LEFT],
  ------------------
  |  |   40|   544k|#define LEFT 0
  ------------------
  |  Branch (157:17): [True: 51.8k, False: 492k]
  ------------------
  158|   544k|                                        pns_band)) {
  159|  51.8k|              if (channel == 0) {
  ------------------
  |  Branch (159:19): [True: 32.9k, False: 18.8k]
  ------------------
  160|  32.9k|                ptr_aac_dec_channel_info[LEFT]
  ------------------
  |  |   40|  32.9k|#define LEFT 0
  ------------------
  161|  32.9k|                    ->pstr_pns_corr_info->random_vector[pns_band] =
  162|  32.9k|                    ptr_aac_dec_channel_info[LEFT]
  ------------------
  |  |   40|  32.9k|#define LEFT 0
  ------------------
  163|  32.9k|                        ->pstr_pns_rand_vec_data->current_seed;
  164|       |
  165|  32.9k|                ixheaacd_gen_rand_vec(
  166|  32.9k|                    scale_mant, scale_exp, ptr_spec, sfb_width,
  167|  32.9k|                    &(ptr_aac_dec_channel_info[LEFT]
  ------------------
  |  |   40|  32.9k|#define LEFT 0
  ------------------
  168|  32.9k|                          ->pstr_pns_rand_vec_data->current_seed));
  169|  32.9k|              }
  170|       |
  171|  18.8k|              else {
  172|  18.8k|                ixheaacd_gen_rand_vec(
  173|  18.8k|                    scale_mant, scale_exp, ptr_spec, sfb_width,
  174|  18.8k|                    &(ptr_aac_dec_channel_info[LEFT]
  ------------------
  |  |   40|  18.8k|#define LEFT 0
  ------------------
  175|  18.8k|                          ->pstr_pns_corr_info->random_vector[pns_band]));
  176|  18.8k|              }
  177|       |
  178|  51.8k|            }
  179|       |
  180|   492k|            else {
  181|   492k|              ixheaacd_gen_rand_vec(
  182|   492k|                  scale_mant, scale_exp, ptr_spec, sfb_width,
  183|   492k|                  &(ptr_aac_dec_channel_info[LEFT]
  ------------------
  |  |   40|   492k|#define LEFT 0
  ------------------
  184|   492k|                        ->pstr_pns_rand_vec_data->current_seed));
  185|   492k|            }
  186|   544k|          }
  187|  1.26M|        }
  188|       |
  189|  74.7k|        if (maximum_bins_short == 120)
  ------------------
  |  Branch (189:13): [True: 19.3k, False: 55.4k]
  ------------------
  190|  19.3k|          spec += maximum_bins_short;
  191|  55.4k|        else
  192|  55.4k|          spec += 128;
  193|  74.7k|      }
  194|  39.7k|    }
  195|  34.9k|  }
  196|       |
  197|   212k|  if (channel == 0) {
  ------------------
  |  Branch (197:7): [True: 194k, False: 18.5k]
  ------------------
  198|   194k|    ptr_aac_dec_channel_info[0]->pstr_pns_rand_vec_data->pns_frame_number++;
  199|   194k|  }
  200|   212k|}
ixheaacd_tns_decode_coef:
  204|  30.0k|                              ia_aac_dec_tables_struct *ptr_aac_tables) {
  205|  30.0k|  WORD order, resolution;
  206|  30.0k|  WORD16 *ptr_par_coef = parcor_coef;
  207|  30.0k|  WORD16 *tns_coeff_ptr;
  208|  30.0k|  WORD8 ixheaacd_drc_offset = 4;
  209|  30.0k|  WORD8 *ptr_coef = (WORD8 *)filter->coef;
  210|       |
  211|  30.0k|  resolution = filter->resolution;
  212|  30.0k|  tns_coeff_ptr = ptr_aac_tables->pstr_block_tables->tns_coeff3_16;
  213|       |
  214|  30.0k|  if (resolution) {
  ------------------
  |  Branch (214:7): [True: 21.7k, False: 8.26k]
  ------------------
  215|  21.7k|    tns_coeff_ptr = ptr_aac_tables->pstr_block_tables->tns_coeff4_16;
  216|  21.7k|    ixheaacd_drc_offset = ixheaacd_drc_offset << 1;
  217|  21.7k|  }
  218|       |
  219|   207k|  for (order = 0; order < filter->order; order++) {
  ------------------
  |  Branch (219:19): [True: 177k, False: 30.0k]
  ------------------
  220|   177k|    WORD8 temp = *ptr_coef++;
  221|   177k|    *ptr_par_coef++ = tns_coeff_ptr[temp + ixheaacd_drc_offset];
  222|   177k|  }
  223|  30.0k|}
ixheaacd_aac_tns_process:
  251|  59.8k|    WORD32 ar_flag, WORD32 *predicted_spectrum) {
  252|  59.8k|  WORD i;
  253|  59.8k|  WORD16 scale_lpc;
  254|       |
  255|  59.8k|  ia_tns_info_aac_struct *ptr_tns_info =
  256|  59.8k|      &ptr_aac_dec_channel_info->str_tns_info;
  257|  59.8k|  WORD32 *spec = ptr_aac_dec_channel_info->ptr_spec_coeff;
  258|  59.8k|  WORD32 *scratch_buf = ptr_aac_dec_channel_info->scratch_buf_ptr;
  259|       |
  260|  59.8k|  WORD win, filt, start, stop, size, scale_spec;
  261|  59.8k|  ia_ics_info_struct *ptr_ics_info = &ptr_aac_dec_channel_info->str_ics_info;
  262|  59.8k|  WORD num_window, tns_max_bands, win_seq;
  263|  59.8k|  WORD16 maximum_bins_short = ptr_ics_info->frame_length >> 3;
  264|  59.8k|  WORD position;
  265|       |
  266|  59.8k|  WORD32 parcor_coef[MAX_ORDER + 1];
  267|  59.8k|  WORD16 parcor_coef_16[MAX_ORDER + 1];
  268|       |
  269|  59.8k|  WORD32 lpc_coef[MAX_ORDER + 1];
  270|  59.8k|  WORD16 lpc_coef_16[MAX_ORDER + 1];
  271|       |
  272|  59.8k|  const WORD16 *ptr_sfb_table;
  273|       |
  274|  59.8k|  WORD16 max_bin_long = ptr_ics_info->frame_length;
  275|       |
  276|  59.8k|  win_seq = ptr_ics_info->window_sequence == 0
  ------------------
  |  Branch (276:13): [True: 28.5k, False: 31.2k]
  ------------------
  277|  59.8k|                ? 0
  278|  59.8k|                : (ptr_ics_info->window_sequence % 2 == 0);
  279|       |
  280|  59.8k|  if (ar_flag)
  ------------------
  |  Branch (280:7): [True: 50.6k, False: 9.19k]
  ------------------
  281|  50.6k|    spec = ptr_aac_dec_channel_info->ptr_spec_coeff;
  282|  9.19k|  else {
  283|  9.19k|    spec = predicted_spectrum;
  284|  9.19k|  }
  285|       |
  286|  59.8k|  if (object_type == AOT_ER_AAC_ELD || object_type == AOT_ER_AAC_LD ||
  ------------------
  |  Branch (286:7): [True: 4.05k, False: 55.7k]
  |  Branch (286:40): [True: 26.2k, False: 29.5k]
  ------------------
  287|  33.6k|      object_type == AOT_AAC_LTP) {
  ------------------
  |  Branch (287:7): [True: 3.35k, False: 26.1k]
  ------------------
  288|  33.6k|    if (512 == ptr_ics_info->frame_length) {
  ------------------
  |  Branch (288:9): [True: 23.0k, False: 10.5k]
  ------------------
  289|  23.0k|      tns_max_bands =
  290|  23.0k|          ptr_aac_tables->pstr_block_tables
  291|  23.0k|              ->tns_max_bands_tbl_ld[ptr_ics_info->sampling_rate_index];
  292|  23.0k|      win_seq = 1;
  293|  23.0k|      num_window = win_seq;
  294|  23.0k|    } else if (480 == ptr_ics_info->frame_length) {
  ------------------
  |  Branch (294:16): [True: 4.36k, False: 6.23k]
  ------------------
  295|  4.36k|      tns_max_bands =
  296|  4.36k|          ptr_aac_tables->pstr_block_tables
  297|  4.36k|              ->tns_max_bands_tbl_480[ptr_ics_info->sampling_rate_index];
  298|  4.36k|      win_seq = 1;
  299|  4.36k|      num_window = win_seq;
  300|  6.23k|    } else {
  301|  6.23k|      tns_max_bands =
  302|  6.23k|          ptr_aac_tables->pstr_block_tables
  303|  6.23k|              ->tns_max_bands_tbl[ptr_ics_info->sampling_rate_index][win_seq];
  304|       |
  305|  6.23k|      num_window = win_seq ? 8 : 1;
  ------------------
  |  Branch (305:20): [True: 639, False: 5.59k]
  ------------------
  306|  6.23k|    }
  307|  33.6k|  } else {
  308|  26.1k|    tns_max_bands =
  309|  26.1k|        ptr_aac_tables->pstr_block_tables
  310|  26.1k|            ->tns_max_bands_tbl[ptr_ics_info->sampling_rate_index][win_seq];
  311|       |
  312|  26.1k|    num_window = win_seq ? 8 : 1;
  ------------------
  |  Branch (312:18): [True: 7.18k, False: 19.0k]
  ------------------
  313|  26.1k|  }
  314|       |
  315|  59.8k|  ptr_sfb_table =
  316|  59.8k|      ptr_aac_tables->str_aac_sfb_info[ptr_ics_info->window_sequence].sfb_index;
  317|       |
  318|   174k|  for (win = 0; win < num_window; win++) {
  ------------------
  |  Branch (318:17): [True: 114k, False: 59.8k]
  ------------------
  319|   114k|    WORD n_filt = ptr_tns_info->n_filt[win];
  320|       |
  321|   178k|    for (filt = 0; filt < n_filt; filt++) {
  ------------------
  |  Branch (321:20): [True: 64.3k, False: 114k]
  ------------------
  322|  64.3k|      ia_filter_info_struct *filter = &ptr_tns_info->str_filter[win][filt];
  323|       |
  324|  64.3k|      if (filter->order <= 0) {
  ------------------
  |  Branch (324:11): [True: 8.66k, False: 55.6k]
  ------------------
  325|  8.66k|        continue;
  326|  8.66k|      }
  327|       |
  328|  55.6k|      if ((object_type == AOT_ER_AAC_LD) || (object_type == AOT_AAC_LTP) ||
  ------------------
  |  Branch (328:11): [True: 25.1k, False: 30.5k]
  |  Branch (328:45): [True: 366, False: 30.1k]
  ------------------
  329|  30.1k|          (num_ch > 2)) {
  ------------------
  |  Branch (329:11): [True: 131, False: 30.0k]
  ------------------
  330|  25.6k|        ixheaacd_tns_decode_coefficients(filter, parcor_coef, ptr_aac_tables);
  331|       |
  332|  30.0k|      } else {
  333|  30.0k|        ixheaacd_tns_decode_coef(filter, parcor_coef_16, ptr_aac_tables);
  334|  30.0k|      }
  335|       |
  336|  55.6k|      start = ixheaac_min32(ixheaac_min32(filter->start_band, tns_max_bands),
  337|  55.6k|                             ptr_ics_info->max_sfb);
  338|       |
  339|  55.6k|      start = ptr_sfb_table[start];
  340|       |
  341|  55.6k|      stop = ixheaac_min32(ixheaac_min32(filter->stop_band, tns_max_bands),
  342|  55.6k|                            ptr_ics_info->max_sfb);
  343|       |
  344|  55.6k|      stop = ptr_sfb_table[stop];
  345|       |
  346|  55.6k|      size = (stop - start);
  347|       |
  348|  55.6k|      if (size <= 0) {
  ------------------
  |  Branch (348:11): [True: 9.07k, False: 46.5k]
  ------------------
  349|  9.07k|        continue;
  350|  9.07k|      }
  351|  46.5k|      if ((object_type == AOT_ER_AAC_LD) || (object_type == AOT_AAC_LTP) ||
  ------------------
  |  Branch (351:11): [True: 20.5k, False: 26.0k]
  |  Branch (351:45): [True: 319, False: 25.7k]
  ------------------
  352|  25.7k|          (num_ch > 2)) {
  ------------------
  |  Branch (352:11): [True: 83, False: 25.6k]
  ------------------
  353|  20.9k|        ixheaacd_tns_parcor_to_lpc(parcor_coef, lpc_coef, &scale_lpc,
  354|  20.9k|                                   filter->order);
  355|       |
  356|  25.6k|      } else {
  357|  25.6k|        (*ixheaacd_tns_parcor_lpc_convert)(parcor_coef_16, lpc_coef_16,
  358|  25.6k|                                           &scale_lpc, filter->order);
  359|  25.6k|      }
  360|       |
  361|  46.5k|      {
  362|  46.5k|        WORD32 *ptr_tmp;
  363|       |
  364|  46.5k|        if (maximum_bins_short == 120)
  ------------------
  |  Branch (364:13): [True: 13.2k, False: 33.3k]
  ------------------
  365|  13.2k|          ptr_tmp = spec + (win * maximum_bins_short) + start;
  366|  33.3k|        else
  367|  33.3k|          ptr_tmp = spec + (win << 7) + start;
  368|       |
  369|  46.5k|        scale_spec = (*ixheaacd_calc_max_spectral_line)(ptr_tmp, size);
  370|  46.5k|      }
  371|       |
  372|  46.5k|      if (filter->direction == -1) {
  ------------------
  |  Branch (372:11): [True: 25.6k, False: 20.9k]
  ------------------
  373|  25.6k|        position = stop - 1;
  374|       |
  375|  25.6k|        if (maximum_bins_short == 120) {
  ------------------
  |  Branch (375:13): [True: 11.0k, False: 14.6k]
  ------------------
  376|  11.0k|          if (((win * maximum_bins_short) + position) < filter->order) continue;
  ------------------
  |  Branch (376:15): [True: 1.68k, False: 9.32k]
  ------------------
  377|  14.6k|        } else {
  378|  14.6k|          if (((win << 7) + position) < filter->order) continue;
  ------------------
  |  Branch (378:15): [True: 818, False: 13.8k]
  ------------------
  379|  14.6k|        }
  380|       |
  381|  25.6k|      } else {
  382|  20.9k|        position = start;
  383|  20.9k|        if (maximum_bins_short == 120) {
  ------------------
  |  Branch (383:13): [True: 2.20k, False: 18.7k]
  ------------------
  384|  2.20k|          if ((((win * maximum_bins_short) + position) + filter->order) > max_bin_long)
  ------------------
  |  Branch (384:15): [True: 0, False: 2.20k]
  ------------------
  385|      0|            continue;
  386|  18.7k|        } else {
  387|  18.7k|          if ((((win << 7) + position) + filter->order) > MAX_BINS_LONG) continue;
  ------------------
  |  |   28|  18.7k|#define MAX_BINS_LONG 1024
  ------------------
  |  Branch (387:15): [True: 0, False: 18.7k]
  ------------------
  388|  18.7k|        }
  389|  20.9k|      }
  390|       |
  391|  44.0k|      if ((num_ch <= 2) &&
  ------------------
  |  Branch (391:11): [True: 43.9k, False: 116]
  ------------------
  392|  43.9k|          ((object_type != AOT_ER_AAC_LD) && (object_type != AOT_AAC_LTP)))
  ------------------
  |  Branch (392:12): [True: 23.4k, False: 20.5k]
  |  Branch (392:46): [True: 23.1k, False: 286]
  ------------------
  393|  23.1k|        scale_spec = ((scale_spec - 4) - scale_lpc);
  394|  20.9k|      else {
  395|  20.9k|        if (scale_spec > 17)
  ------------------
  |  Branch (395:13): [True: 1.40k, False: 19.5k]
  ------------------
  396|  1.40k|          scale_spec = ((scale_spec - 6) - scale_lpc);
  397|  19.5k|        else if (scale_spec > 11)
  ------------------
  |  Branch (397:18): [True: 244, False: 19.2k]
  ------------------
  398|    244|          scale_spec = ((scale_spec - 5) - scale_lpc);
  399|  19.2k|        else
  400|  19.2k|          scale_spec = ((scale_spec - 4) - scale_lpc);
  401|  20.9k|      }
  402|       |
  403|  44.0k|      if (scale_spec > 0) {
  ------------------
  |  Branch (403:11): [True: 15.0k, False: 29.0k]
  ------------------
  404|  15.0k|        scale_spec = ixheaac_min32(scale_spec, 31);
  405|       |
  406|  15.0k|        if ((object_type == AOT_ER_AAC_LD) || (object_type == AOT_AAC_LTP) ||
  ------------------
  |  Branch (406:13): [True: 4.13k, False: 10.9k]
  |  Branch (406:47): [True: 237, False: 10.6k]
  ------------------
  407|  10.6k|            (num_ch > 2)) {
  ------------------
  |  Branch (407:13): [True: 34, False: 10.6k]
  ------------------
  408|  4.40k|          if (ar_flag)
  ------------------
  |  Branch (408:15): [True: 3.48k, False: 921]
  ------------------
  409|  3.48k|          {
  410|  3.48k|            if (maximum_bins_short == 120) {
  ------------------
  |  Branch (410:17): [True: 187, False: 3.29k]
  ------------------
  411|    187|              (*ixheaacd_tns_ar_filter_fixed)(&spec[(win * maximum_bins_short) + position],
  412|    187|                                              size, filter->direction,
  413|    187|                                              (WORD32 *)lpc_coef, filter->order,
  414|    187|                                              (WORD32)scale_lpc, scale_spec);
  415|  3.29k|            } else {
  416|  3.29k|              (*ixheaacd_tns_ar_filter_fixed)(&spec[(win << 7) + position], size,
  417|  3.29k|                                              filter->direction,
  418|  3.29k|                                              (WORD32 *)lpc_coef, filter->order,
  419|  3.29k|                                              (WORD32)scale_lpc, scale_spec);
  420|  3.29k|            }
  421|  3.48k|          } else {
  422|    921|            if (maximum_bins_short == 120) {
  ------------------
  |  Branch (422:17): [True: 42, False: 879]
  ------------------
  423|     42|              ixheaacd_tns_ma_filter_fixed_ld(&spec[(win * maximum_bins_short) + position],
  424|     42|                                              size, filter->direction, lpc_coef,
  425|     42|                                              filter->order, scale_lpc);
  426|    879|            } else {
  427|    879|              ixheaacd_tns_ma_filter_fixed_ld(&spec[(win << 7) + position], size,
  428|    879|                                              filter->direction, lpc_coef,
  429|    879|                                              filter->order, scale_lpc);
  430|    879|            }
  431|    921|          }
  432|  10.6k|        } else {
  433|  10.6k|          if (object_type == AOT_ER_AAC_ELD) scale_spec = scale_spec - 1;
  ------------------
  |  Branch (433:15): [True: 792, False: 9.85k]
  ------------------
  434|  10.6k|          if (maximum_bins_short == 120) {
  ------------------
  |  Branch (434:15): [True: 7.90k, False: 2.73k]
  ------------------
  435|  7.90k|            (*ixheaacd_tns_ar_filter)(&spec[(win * maximum_bins_short) + position], size,
  436|  7.90k|                                      filter->direction, lpc_coef_16,
  437|  7.90k|                                      filter->order, (WORD32)scale_lpc,
  438|  7.90k|                                      scale_spec, scratch_buf);
  439|  7.90k|          } else {
  440|  2.73k|            (*ixheaacd_tns_ar_filter)(&spec[(win << 7) + position], size,
  441|  2.73k|                                      filter->direction, lpc_coef_16,
  442|  2.73k|                                      filter->order, (WORD32)scale_lpc,
  443|  2.73k|                                      scale_spec, scratch_buf);
  444|  2.73k|          }
  445|  10.6k|        }
  446|  15.0k|      }
  447|       |
  448|  29.0k|      else {
  449|  29.0k|        WORD32 *ptr_tmp;
  450|       |
  451|  29.0k|        if (maximum_bins_short == 120)
  ------------------
  |  Branch (451:13): [True: 3.39k, False: 25.6k]
  ------------------
  452|  3.39k|          ptr_tmp = spec + (win * maximum_bins_short) + start;
  453|  25.6k|        else
  454|  25.6k|          ptr_tmp = spec + (win >> 7) + start;
  455|       |
  456|  29.0k|        scale_spec = -scale_spec;
  457|  29.0k|        scale_spec = ixheaac_min32(scale_spec, 31);
  458|       |
  459|  4.31M|        for (i = size; i != 0; i--) {
  ------------------
  |  Branch (459:24): [True: 4.28M, False: 29.0k]
  ------------------
  460|  4.28M|          *ptr_tmp = (*ptr_tmp >> scale_spec);
  461|  4.28M|          ptr_tmp++;
  462|  4.28M|        }
  463|       |
  464|  29.0k|        if ((object_type == AOT_ER_AAC_LD) || (object_type == AOT_AAC_LTP) ||
  ------------------
  |  Branch (464:13): [True: 16.3k, False: 12.6k]
  |  Branch (464:47): [True: 82, False: 12.5k]
  ------------------
  465|  16.5k|            num_ch > 2) {
  ------------------
  |  Branch (465:13): [True: 49, False: 12.5k]
  ------------------
  466|  16.5k|          if (ar_flag) {
  ------------------
  |  Branch (466:15): [True: 7.12k, False: 9.39k]
  ------------------
  467|  7.12k|            if (maximum_bins_short == 120) {
  ------------------
  |  Branch (467:17): [True: 59, False: 7.06k]
  ------------------
  468|     59|              (*ixheaacd_tns_ar_filter_fixed)(
  469|     59|                  &spec[(win * maximum_bins_short) + position], size, filter->direction,
  470|     59|                  (WORD32 *)lpc_coef, filter->order, scale_lpc, 0);
  471|  7.06k|            } else {
  472|  7.06k|              (*ixheaacd_tns_ar_filter_fixed)(
  473|  7.06k|                  &spec[(win << 7) + position], size, filter->direction,
  474|  7.06k|                  (WORD32 *)lpc_coef, filter->order, scale_lpc, 0);
  475|  7.06k|            }
  476|  9.39k|          } else {
  477|  9.39k|            if (maximum_bins_short == 120) {
  ------------------
  |  Branch (477:17): [True: 16, False: 9.37k]
  ------------------
  478|     16|              ixheaacd_tns_ma_filter_fixed_ld(&spec[(win * maximum_bins_short) + position],
  479|     16|                                              size, filter->direction, lpc_coef,
  480|     16|                                              filter->order, scale_lpc);
  481|  9.37k|            } else {
  482|  9.37k|              ixheaacd_tns_ma_filter_fixed_ld(&spec[(win << 7) + position], size,
  483|  9.37k|                                              filter->direction, lpc_coef,
  484|  9.37k|                                              filter->order, scale_lpc);
  485|  9.37k|            }
  486|  9.39k|          }
  487|  16.5k|        } else {
  488|  12.5k|          if (object_type == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (488:15): [True: 2.35k, False: 10.1k]
  ------------------
  489|  2.35k|            scale_lpc = scale_lpc - 1;
  490|  2.35k|          }
  491|       |
  492|  12.5k|          if (maximum_bins_short == 120) {
  ------------------
  |  Branch (492:15): [True: 3.31k, False: 9.19k]
  ------------------
  493|  3.31k|            (*ixheaacd_tns_ar_filter)(&spec[(win * maximum_bins_short) + position], size,
  494|  3.31k|                                      filter->direction, lpc_coef_16,
  495|  3.31k|                                      filter->order, scale_lpc, 0, scratch_buf);
  496|  9.19k|          } else {
  497|  9.19k|            (*ixheaacd_tns_ar_filter)(&spec[(win << 7) + position], size,
  498|  9.19k|                                      filter->direction, lpc_coef_16,
  499|  9.19k|                                      filter->order, scale_lpc, 0, scratch_buf);
  500|  9.19k|          }
  501|  12.5k|        }
  502|       |
  503|  29.0k|        if (maximum_bins_short == 120)
  ------------------
  |  Branch (503:13): [True: 3.39k, False: 25.6k]
  ------------------
  504|  3.39k|          ptr_tmp = spec + (win * maximum_bins_short) + start;
  505|  25.6k|        else
  506|  25.6k|          ptr_tmp = spec + (win << 7) + start;
  507|       |
  508|  4.31M|        for (i = size; i != 0; i--) {
  ------------------
  |  Branch (508:24): [True: 4.28M, False: 29.0k]
  ------------------
  509|  4.28M|          *ptr_tmp = (*ptr_tmp << scale_spec);
  510|  4.28M|          ptr_tmp++;
  511|  4.28M|        }
  512|  29.0k|      }
  513|  44.0k|    }
  514|   114k|  }
  515|  59.8k|}
ixheaacd_pns_js_thumb.c:ixheaacd_is_correlation:
   65|   544k|    ia_aac_dec_channel_info_struct *ptr_aac_dec_channel_info, WORD16 pns_band) {
   66|   544k|  ia_pns_correlation_info_struct *ptr_corr_info =
   67|   544k|      ptr_aac_dec_channel_info->pstr_pns_corr_info;
   68|       |
   69|   544k|  return ((ptr_corr_info->correlated[(pns_band >> PNS_BAND_FLAGS_SHIFT)] >>
  ------------------
  |  |   26|   544k|#define PNS_BAND_FLAGS_SHIFT 3
  ------------------
   70|   544k|           (pns_band & PNS_BAND_FLAGS_MASK)) &
  ------------------
  |  |   25|   544k|  ((WORD16)((((WORD16)1) << PNS_BAND_FLAGS_SHIFT) - 1))
  |  |  ------------------
  |  |  |  |   26|   544k|#define PNS_BAND_FLAGS_SHIFT 3
  |  |  ------------------
  ------------------
   71|   544k|          1);
   72|   544k|}

ixheaacd_pvc_process:
  178|  63.4k|                            FLOAT32 *p_qmf_ener, FLOAT32 *p_qmfh) {
  179|  63.4k|  switch (ptr_pvc_data->pvc_mode) {
  180|  2.54k|    case 1:
  ------------------
  |  Branch (180:5): [True: 2.54k, False: 60.8k]
  ------------------
  181|  2.54k|      ptr_pvc_data->nb_high = PVC_NB_HIGH_MODE1;
  ------------------
  |  |  187|  2.54k|#define PVC_NB_HIGH_MODE1 8
  ------------------
  182|  2.54k|      ptr_pvc_data->nb_high_per_grp = 8 / ptr_pvc_data->pvc_rate;
  183|  2.54k|      ptr_pvc_data->p_pred_coeff_tab_1 =
  184|  2.54k|          (WORD8 *)ixheaacd_pred_coeff_table_1_mode_1;
  185|  2.54k|      ptr_pvc_data->p_pred_coeff_tab_2 =
  186|  2.54k|          (WORD8 *)ixheaacd_pred_coeff_table_2_mode_1;
  187|  2.54k|      ptr_pvc_data->p_pvc_id_boundary =
  188|  2.54k|          (UWORD8 *)ixheaacd_pred_coeff_pvc_id_boundaries_1;
  189|  2.54k|      ptr_pvc_data->p_q_fac = (FLOAT32 *)ixheaacd_q_factor_table_mode_1;
  190|  2.54k|      if (ptr_pvc_data->ns_mode) {
  ------------------
  |  Branch (190:11): [True: 172, False: 2.37k]
  ------------------
  191|    172|        ptr_pvc_data->num_time_slots = 4;
  192|    172|        ptr_pvc_data->p_smth_wind_coeff =
  193|    172|            (FLOAT32 *)ixheaacd_pvc_smoothing_wind_tab_ns4;
  194|  2.37k|      } else {
  195|  2.37k|        ptr_pvc_data->num_time_slots = 16;
  196|  2.37k|        ptr_pvc_data->p_smth_wind_coeff =
  197|  2.37k|            (FLOAT32 *)ixheaacd_pvc_smoothing_wind_tab_ns16;
  198|  2.37k|      }
  199|  2.54k|      break;
  200|  60.8k|    case 2:
  ------------------
  |  Branch (200:5): [True: 60.8k, False: 2.57k]
  ------------------
  201|  60.8k|      ptr_pvc_data->nb_high = PVC_NB_HIGH_MODE2;
  ------------------
  |  |  188|  60.8k|#define PVC_NB_HIGH_MODE2 6
  ------------------
  202|  60.8k|      ptr_pvc_data->nb_high_per_grp = 12 / ptr_pvc_data->pvc_rate;
  203|  60.8k|      ptr_pvc_data->p_pred_coeff_tab_1 =
  204|  60.8k|          (WORD8 *)ixheaacd_pred_coeff_table_1_mode_2;
  205|  60.8k|      ptr_pvc_data->p_pred_coeff_tab_2 =
  206|  60.8k|          (WORD8 *)ixheaacd_pred_coeff_table_2_mode_2;
  207|  60.8k|      ptr_pvc_data->p_pvc_id_boundary =
  208|  60.8k|          (UWORD8 *)ixheaacd_pred_coeff_pvc_id_boundaries_2;
  209|  60.8k|      ptr_pvc_data->p_q_fac = (FLOAT32 *)ixheaacd_q_factor_table_mode_2;
  210|  60.8k|      if (ptr_pvc_data->ns_mode) {
  ------------------
  |  Branch (210:11): [True: 12.8k, False: 48.0k]
  ------------------
  211|  12.8k|        ptr_pvc_data->num_time_slots = 3;
  212|  12.8k|        ptr_pvc_data->p_smth_wind_coeff =
  213|  12.8k|            (FLOAT32 *)ixheaacd_pvc_smoothing_wind_tab_ns3;
  214|  48.0k|      } else {
  215|  48.0k|        ptr_pvc_data->num_time_slots = 12;
  216|  48.0k|        ptr_pvc_data->p_smth_wind_coeff =
  217|  48.0k|            (FLOAT32 *)ixheaacd_pvc_smoothing_wind_tab_ns12;
  218|  48.0k|      }
  219|  60.8k|      break;
  220|     36|    default:
  ------------------
  |  Branch (220:5): [True: 36, False: 63.3k]
  ------------------
  221|     36|      return -1;
  222|  63.4k|  }
  223|  63.3k|  ptr_pvc_data->prev_pvc_id = ptr_pvc_data->pvc_id[PVC_NUM_TIME_SLOTS - 1];
  ------------------
  |  |  177|  63.3k|#define PVC_NUM_TIME_SLOTS 16
  ------------------
  224|       |
  225|  63.3k|  ixheaacd_pvc_qmf_grouping(ptr_pvc_data, first_bnd_idx, p_qmf_ener,
  226|  63.3k|                            first_pvc_timeslot);
  227|       |
  228|  63.3k|  ixheaacd_pvc_time_smoothing(ptr_pvc_data);
  229|       |
  230|  63.3k|  ixheaacd_pvc_pred_env_sf(ptr_pvc_data);
  231|       |
  232|  63.3k|  ixheaacd_pvc_sb_parsing(ptr_pvc_data, first_bnd_idx, p_qmfh);
  233|       |
  234|  63.3k|  memcpy((FLOAT32 *)(&ptr_pvc_data->esg[0][0]),
  235|  63.3k|         (FLOAT32 *)(&ptr_pvc_data->esg[PVC_NUM_TIME_SLOTS][0]),
  ------------------
  |  |  177|  63.3k|#define PVC_NUM_TIME_SLOTS 16
  ------------------
  236|  63.3k|         sizeof(FLOAT32) * (PVC_NUM_TIME_SLOTS - 1) * 3);
  ------------------
  |  |  177|  63.3k|#define PVC_NUM_TIME_SLOTS 16
  ------------------
  237|       |
  238|  63.3k|  return 0;
  239|  63.4k|}
ixheaacd_pred_vec_block.c:ixheaacd_pvc_qmf_grouping:
   64|  63.3k|                                      WORD32 first_pvc_timeslot) {
   65|  63.3k|  WORD32 ksg, time_slot, ib;
   66|  63.3k|  WORD32 lbw, start_band, end_band;
   67|  63.3k|  FLOAT32 esg;
   68|  63.3k|  FLOAT32 *p_esg = (FLOAT32 *)ptr_pvc_data->esg;
   69|       |
   70|  63.3k|  lbw = 8 / ptr_pvc_data->pvc_rate;
   71|       |
   72|  1.07M|  for (time_slot = 0; time_slot < PVC_NUM_TIME_SLOTS; time_slot++) {
  ------------------
  |  |  177|  1.07M|#define PVC_NUM_TIME_SLOTS 16
  ------------------
  |  Branch (72:23): [True: 1.01M, False: 63.3k]
  ------------------
   73|  4.05M|    for (ksg = 0; ksg < PVC_NB_LOW; ksg++) {
  ------------------
  |  |  190|  4.05M|#define PVC_NB_LOW 3
  ------------------
  |  Branch (73:19): [True: 3.04M, False: 1.01M]
  ------------------
   74|  3.04M|      start_band = first_bnd_idx - lbw * PVC_NB_LOW + lbw * ksg;
  ------------------
  |  |  190|  3.04M|#define PVC_NB_LOW 3
  ------------------
   75|  3.04M|      end_band = start_band + lbw - 1;
   76|  3.04M|      if (start_band >= 0) {
  ------------------
  |  Branch (76:11): [True: 2.35M, False: 690k]
  ------------------
   77|  2.35M|        esg = 0.0f;
   78|  11.1M|        for (ib = start_band; ib <= end_band; ib++) {
  ------------------
  |  Branch (78:31): [True: 8.78M, False: 2.35M]
  ------------------
   79|  8.78M|          esg += p_qmf_ener[ib];
   80|  8.78M|        }
   81|  2.35M|        esg = esg / lbw;
   82|  2.35M|      } else {
   83|   690k|        esg = PVC_ESG_MIN_VAL;
  ------------------
  |  |  178|   690k|#define PVC_ESG_MIN_VAL 0.1f
  ------------------
   84|   690k|      }
   85|       |
   86|  3.04M|      if (esg > PVC_ESG_MIN_VAL) {
  ------------------
  |  |  178|  3.04M|#define PVC_ESG_MIN_VAL 0.1f
  ------------------
  |  Branch (86:11): [True: 1.02M, False: 2.01M]
  ------------------
   87|  1.02M|        p_esg[(time_slot + 16 - 1) * 3 + ksg] = 10 * ((FLOAT32)log10(esg));
   88|  2.01M|      } else {
   89|  2.01M|        p_esg[(time_slot + 16 - 1) * 3 + ksg] = PVC_10LOG10_ESG_MIN_VAL;
  ------------------
  |  |  180|  2.01M|#define PVC_10LOG10_ESG_MIN_VAL -10.0f
  ------------------
   90|  2.01M|      }
   91|  3.04M|    }
   92|  1.01M|    p_qmf_ener = p_qmf_ener + SBR_NUM_QMF_BANDS_2;
  ------------------
  |  |  175|  1.01M|#define SBR_NUM_QMF_BANDS_2 32
  ------------------
   93|  1.01M|  }
   94|       |
   95|  63.3k|  if ((ptr_pvc_data->prev_pvc_flg == 0) ||
  ------------------
  |  Branch (95:7): [True: 1.37k, False: 62.0k]
  ------------------
   96|  62.0k|      ((first_bnd_idx * ptr_pvc_data->pvc_rate) !=
  ------------------
  |  Branch (96:7): [True: 6.87k, False: 55.1k]
  ------------------
   97|  62.0k|       (ptr_pvc_data->prev_first_bnd_idx * ptr_pvc_data->prev_pvc_rate))) {
   98|   132k|    for (time_slot = 0; time_slot < 16 - 1 + first_pvc_timeslot; time_slot++) {
  ------------------
  |  Branch (98:25): [True: 124k, False: 8.24k]
  ------------------
   99|   496k|      for (ksg = 0; ksg < PVC_NB_LOW; ksg++) {
  ------------------
  |  |  190|   496k|#define PVC_NB_LOW 3
  ------------------
  |  Branch (99:21): [True: 372k, False: 124k]
  ------------------
  100|   372k|        p_esg[time_slot * 3 + ksg] =
  101|   372k|            p_esg[(16 - 1 + first_pvc_timeslot) * 3 + ksg];
  102|   372k|      }
  103|   124k|    }
  104|  8.24k|  }
  105|       |
  106|  63.3k|  return;
  107|  63.3k|}
ixheaacd_pred_vec_block.c:ixheaacd_pvc_time_smoothing:
  109|  63.3k|static VOID ixheaacd_pvc_time_smoothing(ia_pvc_data_struct *ptr_pvc_data) {
  110|  63.3k|  WORD32 time_slot;
  111|  63.3k|  FLOAT32 *p_smooth_esg = (FLOAT32 *)&ptr_pvc_data->smooth_esg_arr[0];
  112|  1.07M|  for (time_slot = 0; time_slot < PVC_NUM_TIME_SLOTS; time_slot++) {
  ------------------
  |  |  177|  1.07M|#define PVC_NUM_TIME_SLOTS 16
  ------------------
  |  Branch (112:23): [True: 1.01M, False: 63.3k]
  ------------------
  113|  1.01M|    WORD32 ksg, time_slot_idx;
  114|  1.01M|    FLOAT32 *p_esg = (FLOAT32 *)&ptr_pvc_data->esg[time_slot + 16 - 1][2];
  115|  1.01M|    FLOAT32 *p_smth_wind_coeff = (FLOAT32 *)&ptr_pvc_data->p_smth_wind_coeff[0];
  116|  1.01M|    memset(p_smooth_esg, (WORD32)0.f, sizeof(FLOAT32) * PVC_NB_LOW);
  ------------------
  |  |  190|  1.01M|#define PVC_NB_LOW 3
  ------------------
  117|  11.4M|    for (time_slot_idx = 0; time_slot_idx < ptr_pvc_data->num_time_slots;
  ------------------
  |  Branch (117:29): [True: 10.4M, False: 1.01M]
  ------------------
  118|  10.4M|         time_slot_idx++) {
  119|  10.4M|      ksg = PVC_NB_LOW - 1;
  ------------------
  |  |  190|  10.4M|#define PVC_NB_LOW 3
  ------------------
  120|  41.7M|      for (; ksg >= 0; ksg--) {
  ------------------
  |  Branch (120:14): [True: 31.3M, False: 10.4M]
  ------------------
  121|  31.3M|        p_smooth_esg[ksg] += (*p_esg) * (*p_smth_wind_coeff);
  122|  31.3M|        p_esg--;
  123|  31.3M|      }
  124|  10.4M|      p_smth_wind_coeff++;
  125|  10.4M|    }
  126|  1.01M|    p_smooth_esg = p_smooth_esg + 3;
  127|  1.01M|  }
  128|  63.3k|  return;
  129|  63.3k|}
ixheaacd_pred_vec_block.c:ixheaacd_pvc_pred_env_sf:
  131|  63.3k|static VOID ixheaacd_pvc_pred_env_sf(ia_pvc_data_struct *ptr_pvc_data) {
  132|  63.3k|  WORD32 ksg, kb;
  133|  63.3k|  WORD32 tab_1_index, tab_2_index;
  134|  63.3k|  WORD32 time_slot;
  135|  63.3k|  WORD8 *pred_tab_1, *pred_tab_2;
  136|       |
  137|  63.3k|  FLOAT32 temp;
  138|  63.3k|  FLOAT32 *p_smooth_esg = &ptr_pvc_data->smooth_esg_arr[0];
  139|  63.3k|  FLOAT32 *p_sbr_range_esg = &ptr_pvc_data->sbr_range_esg_arr[0];
  140|       |
  141|  1.07M|  for (time_slot = 0; time_slot < PVC_NUM_TIME_SLOTS; time_slot++) {
  ------------------
  |  |  177|  1.07M|#define PVC_NUM_TIME_SLOTS 16
  ------------------
  |  Branch (141:23): [True: 1.01M, False: 63.3k]
  ------------------
  142|  1.01M|    tab_2_index = ptr_pvc_data->pvc_id[time_slot];
  143|       |
  144|  1.01M|    if (tab_2_index < ptr_pvc_data->p_pvc_id_boundary[0]) {
  ------------------
  |  Branch (144:9): [True: 378k, False: 635k]
  ------------------
  145|   378k|      tab_1_index = 0;
  146|   635k|    } else if (tab_2_index < ptr_pvc_data->p_pvc_id_boundary[1]) {
  ------------------
  |  Branch (146:16): [True: 422k, False: 212k]
  ------------------
  147|   422k|      tab_1_index = 1;
  148|   422k|    } else {
  149|   212k|      tab_1_index = 2;
  150|   212k|    }
  151|       |
  152|  1.01M|    pred_tab_1 =
  153|  1.01M|        (WORD8 *)(&(ptr_pvc_data->p_pred_coeff_tab_1[tab_1_index * PVC_NB_LOW *
  ------------------
  |  |  190|  1.01M|#define PVC_NB_LOW 3
  ------------------
  154|  1.01M|                                                     ptr_pvc_data->nb_high]));
  155|  1.01M|    pred_tab_2 = (WORD8 *)(&(
  156|  1.01M|        ptr_pvc_data->p_pred_coeff_tab_2[tab_2_index * ptr_pvc_data->nb_high]));
  157|       |
  158|  7.17M|    for (ksg = 0; ksg < ptr_pvc_data->nb_high; ksg++) {
  ------------------
  |  Branch (158:19): [True: 6.16M, False: 1.01M]
  ------------------
  159|  6.16M|      temp =
  160|  6.16M|          (FLOAT32)(WORD8)(*(pred_tab_2++)) * ptr_pvc_data->p_q_fac[PVC_NB_LOW];
  ------------------
  |  |  190|  6.16M|#define PVC_NB_LOW 3
  ------------------
  161|  6.16M|      p_sbr_range_esg[ksg] = temp;
  162|  6.16M|    }
  163|  4.05M|    for (kb = 0; kb < PVC_NB_LOW; kb++) {
  ------------------
  |  |  190|  4.05M|#define PVC_NB_LOW 3
  ------------------
  |  Branch (163:18): [True: 3.04M, False: 1.01M]
  ------------------
  164|  21.5M|      for (ksg = 0; ksg < ptr_pvc_data->nb_high; ksg++) {
  ------------------
  |  Branch (164:21): [True: 18.4M, False: 3.04M]
  ------------------
  165|  18.4M|        temp = (FLOAT32)(WORD8)(*(pred_tab_1++)) * ptr_pvc_data->p_q_fac[kb];
  166|  18.4M|        p_sbr_range_esg[ksg] += temp * p_smooth_esg[kb];
  167|  18.4M|      }
  168|  3.04M|    }
  169|  1.01M|    p_smooth_esg = p_smooth_esg + 3;
  170|  1.01M|    p_sbr_range_esg = p_sbr_range_esg + 8;
  171|  1.01M|  }
  172|       |
  173|  63.3k|  return;
  174|  63.3k|}
ixheaacd_pred_vec_block.c:ixheaacd_pvc_sb_parsing:
   31|  63.3k|                                    WORD16 first_bnd_idx, FLOAT32 *p_qmfh) {
   32|  63.3k|  WORD32 ksg, k;
   33|  63.3k|  WORD32 start_band, end_band;
   34|  63.3k|  WORD32 time_slot;
   35|       |
   36|  63.3k|  FLOAT32 *p_sbr_range_esg = &ptr_pvc_data->sbr_range_esg_arr[0];
   37|       |
   38|  1.07M|  for (time_slot = 0; time_slot < PVC_NUM_TIME_SLOTS; time_slot++) {
  ------------------
  |  |  177|  1.07M|#define PVC_NUM_TIME_SLOTS 16
  ------------------
  |  Branch (38:23): [True: 1.01M, False: 63.3k]
  ------------------
   39|  1.01M|    start_band = first_bnd_idx;
   40|  1.01M|    end_band = start_band + ptr_pvc_data->nb_high_per_grp - 1;
   41|       |
   42|  7.17M|    for (ksg = 0; ksg < ptr_pvc_data->nb_high; ksg++) {
  ------------------
  |  Branch (42:19): [True: 6.16M, False: 1.01M]
  ------------------
   43|  57.4M|      for (k = start_band; k <= end_band; k++) {
  ------------------
  |  Branch (43:28): [True: 51.2M, False: 6.16M]
  ------------------
   44|  51.2M|        p_qmfh[k] = (FLOAT32)pow(10.0f, (p_sbr_range_esg[ksg] / 10.0));
   45|  51.2M|      }
   46|  6.16M|      start_band += ptr_pvc_data->nb_high_per_grp;
   47|  6.16M|      if (ksg >= ptr_pvc_data->nb_high - 2) {
  ------------------
  |  Branch (47:11): [True: 2.02M, False: 4.13M]
  ------------------
   48|  2.02M|        end_band = SBR_NUM_QMF_BANDS - 1;
  ------------------
  |  |  174|  2.02M|#define SBR_NUM_QMF_BANDS 64
  ------------------
   49|  4.13M|      } else {
   50|  4.13M|        end_band = start_band + ptr_pvc_data->nb_high_per_grp - 1;
   51|  4.13M|        if (end_band >= SBR_NUM_QMF_BANDS - 1) {
  ------------------
  |  |  174|  4.13M|#define SBR_NUM_QMF_BANDS 64
  ------------------
  |  Branch (51:13): [True: 0, False: 4.13M]
  ------------------
   52|      0|          end_band = SBR_NUM_QMF_BANDS - 1;
  ------------------
  |  |  174|      0|#define SBR_NUM_QMF_BANDS 64
  ------------------
   53|      0|        }
   54|  4.13M|      }
   55|  6.16M|    }
   56|  1.01M|    p_sbr_range_esg = p_sbr_range_esg + 8;
   57|  1.01M|    p_qmfh = p_qmfh + SBR_NUM_QMF_BANDS;
  ------------------
  |  |  174|  1.01M|#define SBR_NUM_QMF_BANDS 64
  ------------------
   58|  1.01M|  }
   59|  63.3k|  return;
   60|  63.3k|}

ixheaacd_esbr_process:
  115|   161k|                                   WORD32 heaac_mps_present) {
  116|   161k|  WORD32 ch;
  117|   161k|  WORD32 err_code = 0;
  118|   161k|  ia_aac_dec_sbr_bitstream_struct *esbr_bit_str = &usac_data->esbr_bit_str[0];
  119|   161k|  ia_handle_sbr_dec_inst_struct self = usac_data->pstr_esbr_dec;
  120|       |
  121|   161k|  ia_sbr_scr_struct sbr_scratch_struct;
  122|   161k|  ixheaacd_allocate_sbr_scr(&sbr_scratch_struct, usac_data->sbr_scratch_mem_base, NULL, 0, NULL,
  123|   161k|                            0, 0);
  124|       |
  125|   161k|  self->usac_independency_flag = usac_data->usac_independency_flg;
  126|       |
  127|   161k|  self->time_sample_buf[0] = usac_data->time_sample_vector[0];
  128|   161k|  self->time_sample_buf[1] = usac_data->time_sample_vector[1];
  129|   161k|  self->stereo_config_idx = stereo_config_idx;
  130|       |
  131|   161k|  self->sbr_mode = usac_data->sbr_mode;
  132|   161k|  self->aot_usac_flag = usac_data->usac_flag;
  133|   161k|  self->esbr_hq = usac_data->esbr_hq;
  134|   161k|  self->enh_sbr = usac_data->enh_sbr;
  135|   161k|  self->enh_sbr_ps = usac_data->enh_sbr_ps;
  136|   161k|  self->ec_flag = usac_data->ec_flag;
  137|   161k|  self->first_frame = usac_data->first_frame;
  138|   161k|  self->frame_ok = usac_data->frame_ok;
  139|   161k|  self->sbr_parse_complete = usac_data->sbr_parse_complete;
  140|       |
  141|   396k|  for (ch = 0; ch < num_channels; ch++) {
  ------------------
  |  Branch (141:16): [True: 234k, False: 161k]
  ------------------
  142|   234k|    if ((self->pstr_sbr_channel[ch]
  ------------------
  |  Branch (142:9): [True: 0, False: 234k]
  ------------------
  143|   234k|             ->str_sbr_dec.str_synthesis_qmf_bank.qmf_filter_state_size) <
  144|   234k|        QMF_FILTER_STATE_SYN_SIZE)
  ------------------
  |  |   32|   234k|#define QMF_FILTER_STATE_SYN_SIZE 1280
  ------------------
  145|      0|      return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
  146|   234k|  }
  147|       |
  148|   161k|  err_code = ixheaacd_applysbr(self, esbr_bit_str, NULL, &num_channels, 1, 0, 0,
  149|   161k|                               &sbr_scratch_struct, 0, 1, 0, it_bit_buff, NULL,
  150|   161k|                               0, audio_object_type, 0, 0, 1024,
  151|   161k|                               heaac_mps_present, self->ec_flag, self->first_frame);
  152|       |
  153|   161k|  usac_data->sbr_mode = self->sbr_mode;
  154|       |
  155|   161k|  return err_code;
  156|   161k|}
ixheaacd_ms_processing:
  339|  39.7k|VOID ixheaacd_ms_processing(ia_usac_data_struct *pstr_usac_data) {
  340|  39.7k|  WORD32 i;
  341|       |
  342|  39.7k|  FLOAT32 tmp, tmp1;
  343|  39.7k|  FLOAT32 ms_factor = (FLOAT32)0.7071067812;
  344|  40.6M|  for (i = 0; i < pstr_usac_data->ccfl; i++) {
  ------------------
  |  Branch (344:15): [True: 40.6M, False: 39.7k]
  ------------------
  345|  40.6M|    tmp = (FLOAT32)((pstr_usac_data->time_sample_vector[0][i] +
  346|  40.6M|                     pstr_usac_data->time_sample_vector[1][i]) *
  347|  40.6M|                    ms_factor);
  348|  40.6M|    tmp1 = (FLOAT32)((pstr_usac_data->time_sample_vector[0][i] -
  349|  40.6M|                      pstr_usac_data->time_sample_vector[1][i]) *
  350|  40.6M|                     ms_factor);
  351|  40.6M|    pstr_usac_data->time_sample_vector[1][i] = tmp1;
  352|  40.6M|    pstr_usac_data->time_sample_vector[0][i] = tmp;
  353|  40.6M|  }
  354|  39.7k|}
ixheaacd_usac_process:
  357|   183k|                             WORD32 *num_out_channels, VOID *codec_handle) {
  358|   183k|  WORD32 ele_id = 0;
  359|   183k|  WORD32 err_code = 0;
  360|       |
  361|   183k|  ia_aac_dec_state_struct *p_state_aac_dec =
  362|   183k|      (ia_aac_dec_state_struct *)codec_handle;
  363|       |
  364|   183k|  ia_usac_data_struct *pstr_usac_data = &(pstr_dec_data->str_usac_data);
  365|   183k|  ia_bit_buf_struct *it_bit_buff = &pstr_dec_data->dec_bit_buf;
  366|       |
  367|   183k|  ia_frame_data_struct *fd = &(pstr_dec_data->str_frame_data);
  368|       |
  369|   183k|  ia_usac_config_struct *pstr_usac_config =
  370|   183k|      &(fd->str_audio_specific_config.str_usac_config);
  371|   183k|  ia_usac_decoder_config_struct *pstr_usac_dec_config =
  372|   183k|      &(fd->str_audio_specific_config.str_usac_config.str_usac_dec_config);
  373|       |
  374|   183k|  WORD32 err = 0;
  375|   183k|  WORD16 nr_core_coder_channels = 0;
  376|   183k|  WORD32 ch_offset = 0;
  377|       |
  378|   183k|  WORD32 elem_idx = 0;
  379|   183k|  WORD32 num_ch_out = 0;
  380|   183k|  WORD32 num_elements = pstr_usac_dec_config->num_elements;
  381|   183k|  UWORD32 ec_flag = p_state_aac_dec->p_config->ui_err_conceal;
  382|       |
  383|   183k|  if (ec_flag) {
  ------------------
  |  Branch (383:7): [True: 0, False: 183k]
  ------------------
  384|      0|    if (it_bit_buff->cnt_bits < 16) {
  ------------------
  |  Branch (384:9): [True: 0, False: 0]
  ------------------
  385|      0|      pstr_dec_data->str_usac_data.frame_ok = 0;
  386|      0|    }
  387|      0|    if (pstr_dec_data->str_usac_data.frame_ok == 1) {
  ------------------
  |  Branch (387:9): [True: 0, False: 0]
  ------------------
  388|      0|      pstr_usac_data->usac_independency_flg = ixheaacd_read_bits_buf(it_bit_buff, 1);
  389|      0|    }
  390|   183k|  } else {
  391|   183k|    pstr_usac_data->usac_independency_flg = ixheaacd_read_bits_buf(it_bit_buff, 1);
  392|   183k|  }
  393|       |
  394|   183k|  if (pstr_usac_data->ec_flag && pstr_dec_data->str_usac_data.frame_ok == 1) {
  ------------------
  |  Branch (394:7): [True: 0, False: 183k]
  |  Branch (394:34): [True: 0, False: 0]
  ------------------
  395|      0|    if (!(pstr_usac_data->last_frame_ok) && !(pstr_usac_data->usac_independency_flg)) {
  ------------------
  |  Branch (395:9): [True: 0, False: 0]
  |  Branch (395:45): [True: 0, False: 0]
  ------------------
  396|      0|      pstr_dec_data->str_usac_data.frame_ok = 0;
  397|      0|    } else {
  398|      0|      pstr_dec_data->str_usac_data.frame_ok = 1;
  399|      0|    }
  400|      0|  }
  401|       |
  402|   687k|  for (elem_idx = 0; elem_idx < num_elements; elem_idx++) {
  ------------------
  |  Branch (402:22): [True: 506k, False: 181k]
  ------------------
  403|   506k|    WORD32 stereo_config_index =
  404|   506k|        pstr_usac_config->str_usac_dec_config.str_usac_element_config[elem_idx]
  405|   506k|            .stereo_config_index;
  406|   506k|    jmp_buf local;
  407|   506k|    if (ec_flag) {
  ------------------
  |  Branch (407:9): [True: 0, False: 506k]
  ------------------
  408|      0|      err = setjmp(local);
  409|      0|    }
  410|       |
  411|   506k|    pstr_usac_data->esbr_bit_str[0].no_elements = 0;
  412|   506k|    pstr_usac_data->esbr_bit_str[1].no_elements = 0;
  413|       |
  414|   506k|    if (!err) {
  ------------------
  |  Branch (414:9): [True: 506k, False: 0]
  ------------------
  415|   506k|      if (ec_flag) {
  ------------------
  |  Branch (415:11): [True: 0, False: 506k]
  ------------------
  416|      0|        it_bit_buff->xaac_jmp_buf = &local;
  417|      0|      }
  418|   506k|      switch (ele_id = pstr_usac_dec_config->usac_element_type[elem_idx]) {
  419|  75.1k|        case ID_USAC_SCE:
  ------------------
  |  |   27|  75.1k|#define ID_USAC_SCE 0
  ------------------
  |  Branch (419:9): [True: 75.1k, False: 431k]
  ------------------
  420|  75.1k|          nr_core_coder_channels = 1;
  421|  75.1k|          num_ch_out += 1;
  422|  75.1k|          goto core_data_extracting;
  423|       |
  424|   122k|        case ID_USAC_CPE:
  ------------------
  |  |   28|   122k|#define ID_USAC_CPE 1
  ------------------
  |  Branch (424:9): [True: 122k, False: 383k]
  ------------------
  425|   122k|          nr_core_coder_channels = (stereo_config_index == 1) ? 1 : 2;
  ------------------
  |  Branch (425:36): [True: 15.6k, False: 106k]
  ------------------
  426|   122k|          if (((stereo_config_index > 1) || (stereo_config_index == 0)) &&
  ------------------
  |  Branch (426:16): [True: 62.5k, False: 59.8k]
  |  Branch (426:45): [True: 44.1k, False: 15.6k]
  ------------------
  427|   106k|              (p_state_aac_dec->num_of_output_ch < 2))
  ------------------
  |  Branch (427:15): [True: 2, False: 106k]
  ------------------
  428|      2|            return -1;
  429|   122k|          num_ch_out += 2;
  430|   122k|          goto core_data_extracting;
  431|  1.65k|        case ID_USAC_LFE:
  ------------------
  |  |   29|  1.65k|#define ID_USAC_LFE 2
  ------------------
  |  Branch (431:9): [True: 1.65k, False: 504k]
  ------------------
  432|  1.65k|          nr_core_coder_channels = 1;
  433|  1.65k|          num_ch_out += 1;
  434|       |
  435|   199k|        core_data_extracting:
  436|   199k|          if (!ec_flag) {
  ------------------
  |  Branch (436:15): [True: 199k, False: 0]
  ------------------
  437|   199k|            if (ch_offset >= MAX_NUM_CHANNELS_USAC_LVL2) return -1;
  ------------------
  |  |  112|   199k|#define MAX_NUM_CHANNELS_USAC_LVL2 2
  ------------------
  |  Branch (437:17): [True: 0, False: 199k]
  ------------------
  438|   199k|            if (num_ch_out > MAX_NUM_CHANNELS_USAC_LVL2) return -1;
  ------------------
  |  |  112|   199k|#define MAX_NUM_CHANNELS_USAC_LVL2 2
  ------------------
  |  Branch (438:17): [True: 0, False: 199k]
  ------------------
  439|   199k|          } else {
  440|      0|            if ((ch_offset >= MAX_NUM_CHANNELS_USAC_LVL2) ||
  ------------------
  |  |  112|      0|#define MAX_NUM_CHANNELS_USAC_LVL2 2
  ------------------
  |  Branch (440:17): [True: 0, False: 0]
  ------------------
  441|      0|                (num_ch_out > MAX_NUM_CHANNELS_USAC_LVL2)) {
  ------------------
  |  |  112|      0|#define MAX_NUM_CHANNELS_USAC_LVL2 2
  ------------------
  |  Branch (441:17): [True: 0, False: 0]
  ------------------
  442|      0|              pstr_usac_data->frame_ok = 0;
  443|      0|            }
  444|      0|          }
  445|       |
  446|   199k|          err = ixheaacd_core_coder_data(ele_id, pstr_usac_data, elem_idx, ch_offset, it_bit_buff,
  447|   199k|                                         nr_core_coder_channels);
  448|   199k|          if (!ec_flag) {
  ------------------
  |  Branch (448:15): [True: 197k, False: 1.28k]
  ------------------
  449|   197k|            if (err != 0) return -1;
  ------------------
  |  Branch (449:17): [True: 365, False: 197k]
  ------------------
  450|   197k|          } else {
  451|  1.28k|            if (err != 0) pstr_usac_data->frame_ok = 0;
  ------------------
  |  Branch (451:17): [True: 0, False: 1.28k]
  ------------------
  452|  1.28k|          }
  453|       |
  454|   198k|          ixheaacd_sbr_ele_type_set(&pstr_usac_data->esbr_bit_str[0],
  455|   198k|                                    &pstr_usac_data->esbr_bit_str[1], ele_id,
  456|   198k|                                    stereo_config_index);
  457|       |
  458|   198k|          if (pstr_usac_data->mps_pseudo_lr[elem_idx]) ixheaacd_ms_processing(pstr_usac_data);
  ------------------
  |  Branch (458:15): [True: 39.7k, False: 159k]
  ------------------
  459|       |
  460|   198k|          if (ele_id != ID_USAC_LFE) {
  ------------------
  |  |   29|   198k|#define ID_USAC_LFE 2
  ------------------
  |  Branch (460:15): [True: 195k, False: 2.90k]
  ------------------
  461|   195k|            if (pstr_usac_data->sbr_ratio_idx > 0)
  ------------------
  |  Branch (461:17): [True: 160k, False: 35.0k]
  ------------------
  462|   160k|              ixheaacd_sbr_ext_data_read(it_bit_buff, &pstr_usac_data->esbr_bit_str[0]);
  463|   195k|          }
  464|       |
  465|   198k|          if ((pstr_usac_data->sbr_ratio_idx > 0) &&
  ------------------
  |  Branch (465:15): [True: 162k, False: 36.7k]
  ------------------
  466|   162k|              (pstr_usac_data->esbr_bit_str[0].no_elements != 0)) {
  ------------------
  |  Branch (466:15): [True: 161k, False: 31]
  ------------------
  467|   161k|            if (ec_flag) {
  ------------------
  |  Branch (467:17): [True: 0, False: 161k]
  ------------------
  468|      0|              pstr_usac_data->first_frame = p_state_aac_dec->first_frame;
  469|      0|            }
  470|   161k|            err_code = ixheaacd_esbr_process(
  471|   161k|                pstr_usac_data, it_bit_buff, stereo_config_index, nr_core_coder_channels,
  472|   161k|                pstr_dec_data->str_frame_data.str_audio_specific_config.audio_object_type,
  473|   161k|                p_state_aac_dec->heaac_mps_handle.heaac_mps_present);
  474|   161k|            if (!ec_flag) {
  ------------------
  |  Branch (474:17): [True: 161k, False: 185]
  ------------------
  475|   161k|              if (err_code < 0) return err_code;
  ------------------
  |  Branch (475:19): [True: 330, False: 161k]
  ------------------
  476|   161k|            } else {
  477|    185|              if (err_code < 0) pstr_usac_data->frame_ok = 0;
  ------------------
  |  Branch (477:19): [True: 0, False: 185]
  ------------------
  478|    185|            }
  479|   161k|          }
  480|       |
  481|   198k|          if (stereo_config_index > 0 && pstr_usac_data->sbr_ratio_idx > 0) {
  ------------------
  |  Branch (481:15): [True: 77.5k, False: 120k]
  |  Branch (481:42): [True: 77.5k, False: 0]
  ------------------
  482|  77.5k|            FLOAT32 **ptr_inp[2 * 2];
  483|  77.5k|            WORD32 ch;
  484|       |
  485|  77.5k|            *num_out_channels = p_state_aac_dec->mps_dec_handle.out_ch_count;
  486|       |
  487|  77.5k|            if (!ec_flag && pstr_usac_data->frame_ok == 1) {
  ------------------
  |  Branch (487:17): [True: 77.5k, False: 0]
  |  Branch (487:29): [True: 77.5k, False: 0]
  ------------------
  488|  77.5k|              if (ec_flag) {
  ------------------
  |  Branch (488:19): [True: 0, False: 77.5k]
  ------------------
  489|      0|                it_bit_buff->xaac_jmp_buf = &local;
  490|      0|              }
  491|  77.5k|              err =
  492|  77.5k|                  ixheaacd_mps_frame_parsing(&p_state_aac_dec->mps_dec_handle,
  493|  77.5k|                                             pstr_usac_data->usac_independency_flg, it_bit_buff);
  494|  77.5k|              if (err) return err;
  ------------------
  |  Branch (494:19): [True: 36, False: 77.5k]
  ------------------
  495|  77.5k|            }
  496|       |
  497|  77.5k|            p_state_aac_dec->mps_dec_handle.band_count[0] =
  498|  77.5k|                pstr_usac_data->pstr_esbr_dec->pstr_sbr_channel[0]->str_sbr_dec.band_count;
  499|  77.5k|            p_state_aac_dec->mps_dec_handle.band_count[1] =
  500|  77.5k|                pstr_usac_data->pstr_esbr_dec->pstr_sbr_channel[1]->str_sbr_dec.band_count;
  501|       |
  502|   216k|            for (ch = 0; ch < nr_core_coder_channels; ch++) {
  ------------------
  |  Branch (502:26): [True: 139k, False: 77.5k]
  ------------------
  503|   139k|              ptr_inp[2 * ch] = pstr_usac_data->pstr_esbr_dec->pstr_sbr_channel[ch]
  504|   139k|                                    ->str_sbr_dec.pp_qmf_buf_real;
  505|   139k|              ptr_inp[2 * ch + 1] = pstr_usac_data->pstr_esbr_dec->pstr_sbr_channel[ch]
  506|   139k|                                        ->str_sbr_dec.pp_qmf_buf_imag;
  507|   139k|              p_state_aac_dec->mps_dec_handle.p_sbr_dec[ch] =
  508|   139k|                  (VOID *)(&pstr_usac_data->pstr_esbr_dec->pstr_sbr_channel[ch]->str_sbr_dec);
  509|   139k|              p_state_aac_dec->mps_dec_handle.p_sbr_header[ch] =
  510|   139k|                  (VOID *)(pstr_usac_data->pstr_esbr_dec->pstr_sbr_header[ch]);
  511|   139k|              p_state_aac_dec->mps_dec_handle.p_sbr_frame[ch] =
  512|   139k|                  (VOID *)(pstr_usac_data->pstr_esbr_dec->frame_buffer[ch]);
  513|   139k|            }
  514|  77.5k|            if (nr_core_coder_channels == 1) {
  ------------------
  |  Branch (514:17): [True: 15.4k, False: 62.0k]
  ------------------
  515|  15.4k|              if (p_state_aac_dec->mps_dec_handle.res_ch_count != 0) {
  ------------------
  |  Branch (515:19): [True: 0, False: 15.4k]
  ------------------
  516|      0|                ptr_inp[2] = pstr_usac_data->pstr_esbr_dec->pstr_sbr_channel[1]
  517|      0|                                 ->str_sbr_dec.pp_qmf_buf_real;
  518|      0|                ptr_inp[2 + 1] = pstr_usac_data->pstr_esbr_dec->pstr_sbr_channel[1]
  519|      0|                                     ->str_sbr_dec.pp_qmf_buf_imag;
  520|      0|              }
  521|  15.4k|              p_state_aac_dec->mps_dec_handle.p_sbr_dec[1] =
  522|  15.4k|                  (VOID *)(&pstr_usac_data->pstr_esbr_dec->pstr_sbr_channel[1]->str_sbr_dec);
  523|  15.4k|              p_state_aac_dec->mps_dec_handle.p_sbr_header[1] =
  524|  15.4k|                  (VOID *)(pstr_usac_data->pstr_esbr_dec->pstr_sbr_header[1]);
  525|  15.4k|              p_state_aac_dec->mps_dec_handle.p_sbr_frame[1] =
  526|  15.4k|                  (VOID *)(pstr_usac_data->pstr_esbr_dec->frame_buffer[1]);
  527|  15.4k|            }
  528|  77.5k|            if ((!ec_flag || !p_state_aac_dec->first_frame) &&
  ------------------
  |  Branch (528:18): [True: 77.5k, False: 0]
  |  Branch (528:30): [True: 0, False: 0]
  ------------------
  529|  77.4k|                p_state_aac_dec->mps_dec_handle.mps_init_done == 1) {
  ------------------
  |  Branch (529:17): [True: 77.4k, False: 0]
  ------------------
  530|  77.4k|              err = ixheaacd_mps_apply(&p_state_aac_dec->mps_dec_handle, ptr_inp,
  531|  77.4k|                                       pstr_usac_data->time_sample_vector);
  532|  77.4k|              if (!ec_flag) {
  ------------------
  |  Branch (532:19): [True: 77.4k, False: 0]
  ------------------
  533|  77.4k|                if (err) return err;
  ------------------
  |  Branch (533:21): [True: 66, False: 77.3k]
  ------------------
  534|  77.4k|              } else {
  535|      0|                if (err) pstr_usac_data->frame_ok = 0;
  ------------------
  |  Branch (535:21): [True: 0, False: 0]
  ------------------
  536|      0|              }
  537|  77.4k|            }
  538|  77.4k|            if (ec_flag) {
  ------------------
  |  Branch (538:17): [True: 0, False: 77.4k]
  ------------------
  539|      0|              pstr_usac_data->first_frame = p_state_aac_dec->first_frame;
  540|      0|              err_code = ixheaacd_esbr_parse(
  541|      0|                  pstr_usac_data, it_bit_buff, stereo_config_index, nr_core_coder_channels,
  542|      0|                  pstr_dec_data->str_frame_data.str_audio_specific_config.audio_object_type);
  543|       |
  544|      0|              if (err_code < 0) pstr_usac_data->frame_ok = 0;
  ------------------
  |  Branch (544:19): [True: 0, False: 0]
  ------------------
  545|      0|              if (ec_flag) {
  ------------------
  |  Branch (545:19): [True: 0, False: 0]
  ------------------
  546|      0|                err = setjmp(local);
  547|      0|              }
  548|      0|              if (err == 0 && pstr_usac_data->frame_ok == 1) {
  ------------------
  |  Branch (548:19): [True: 0, False: 0]
  |  Branch (548:31): [True: 0, False: 0]
  ------------------
  549|      0|                if (ec_flag) {
  ------------------
  |  Branch (549:21): [True: 0, False: 0]
  ------------------
  550|      0|                  it_bit_buff->xaac_jmp_buf = &local;
  551|      0|                }
  552|      0|                err = ixheaacd_mps_frame_parsing(&p_state_aac_dec->mps_dec_handle,
  553|      0|                                                 pstr_usac_data->usac_independency_flg,
  554|      0|                                                 it_bit_buff);
  555|      0|                if (err) pstr_usac_data->frame_ok = 0;
  ------------------
  |  Branch (555:21): [True: 0, False: 0]
  ------------------
  556|      0|              } else {
  557|      0|                pstr_usac_data->frame_ok = 0;
  558|      0|                if (p_state_aac_dec->mps_dec_handle.num_parameter_sets_prev < 1) {
  ------------------
  |  Branch (558:21): [True: 0, False: 0]
  ------------------
  559|      0|                  p_state_aac_dec->mps_dec_handle.num_parameter_sets_prev = 1;
  560|      0|                }
  561|      0|              }
  562|      0|            }
  563|   120k|          } else if ((pstr_usac_data->sbr_ratio_idx > 0) &&
  ------------------
  |  Branch (563:22): [True: 83.9k, False: 36.9k]
  ------------------
  564|  83.9k|                     (pstr_usac_data->esbr_bit_str[0].no_elements != 0) && ec_flag) {
  ------------------
  |  Branch (564:22): [True: 83.9k, False: 27]
  |  Branch (564:76): [True: 0, False: 83.9k]
  ------------------
  565|      0|            pstr_usac_data->first_frame = p_state_aac_dec->first_frame;
  566|      0|            err_code = ixheaacd_esbr_parse(
  567|      0|                pstr_usac_data, it_bit_buff, stereo_config_index, nr_core_coder_channels,
  568|      0|                pstr_dec_data->str_frame_data.str_audio_specific_config.audio_object_type);
  569|      0|            if (err_code < 0) pstr_usac_data->frame_ok = 0;
  ------------------
  |  Branch (569:17): [True: 0, False: 0]
  ------------------
  570|      0|          }
  571|   198k|          if (ec_flag) {
  ------------------
  |  Branch (571:15): [True: 0, False: 198k]
  ------------------
  572|      0|            p_state_aac_dec->first_frame = 0;
  573|      0|          }
  574|       |
  575|   198k|          ch_offset += nr_core_coder_channels;
  576|   198k|          break;
  577|       |
  578|   307k|        case ID_USAC_EXT: {
  ------------------
  |  |   30|   307k|#define ID_USAC_EXT 3
  ------------------
  |  Branch (578:9): [True: 307k, False: 199k]
  ------------------
  579|   307k|          ia_usac_dec_element_config_struct *pusac_element_config =
  580|   307k|              &pstr_usac_dec_config->str_usac_element_config[elem_idx];
  581|   307k|          if (pstr_usac_data->frame_ok) {
  ------------------
  |  Branch (581:15): [True: 307k, False: 0]
  ------------------
  582|   307k|            err = ixheaacd_read_ext_element(pusac_element_config->usac_ext_eleme_def_len,
  583|   307k|                                            pusac_element_config->usac_ext_elem_pld_frag,
  584|   307k|                                            it_bit_buff, pstr_usac_dec_config, elem_idx,
  585|   307k|                                            &pstr_usac_data->frame_ok);
  586|   307k|            if (!ec_flag) {
  ------------------
  |  Branch (586:17): [True: 306k, False: 178]
  ------------------
  587|   306k|              if (err != 0) return err;
  ------------------
  |  Branch (587:19): [True: 0, False: 306k]
  ------------------
  588|   306k|            } else {
  589|    178|              if (err) pstr_usac_data->frame_ok = 0;
  ------------------
  |  Branch (589:19): [True: 0, False: 178]
  ------------------
  590|    178|            }
  591|   307k|          }
  592|   307k|          break;
  593|   307k|        }
  594|       |
  595|   307k|        default:
  ------------------
  |  Branch (595:9): [True: 0, False: 506k]
  ------------------
  596|       |
  597|      0|          return -1;
  598|       |
  599|      0|          break;
  600|   506k|      }
  601|   506k|    }
  602|   506k|  }
  603|   181k|  pstr_usac_data->last_frame_ok = pstr_usac_data->frame_ok;
  604|       |
  605|   181k|  return 0;
  606|   183k|}
ixheaacd_process.c:ixheaacd_sbr_ele_type_set:
  308|   197k|    WORD32 st_config_idx) {
  309|   197k|  if (ele_id == ID_USAC_SCE) {
  ------------------
  |  |   27|   197k|#define ID_USAC_SCE 0
  ------------------
  |  Branch (309:7): [True: 74.5k, False: 122k]
  ------------------
  310|  74.5k|    esbr_bit_str0->str_sbr_ele[esbr_bit_str0->no_elements].sbr_ele_id =
  311|  74.5k|        SBR_ID_SCE;
  312|  74.5k|    esbr_bit_str1->str_sbr_ele[esbr_bit_str1->no_elements].sbr_ele_id =
  313|  74.5k|        SBR_ID_SCE;
  314|  74.5k|  }
  315|   197k|  if (ele_id == ID_USAC_CPE) {
  ------------------
  |  |   28|   197k|#define ID_USAC_CPE 1
  ------------------
  |  Branch (315:7): [True: 121k, False: 76.1k]
  ------------------
  316|   121k|    if ((st_config_idx == 0) || (st_config_idx == 3)) {
  ------------------
  |  Branch (316:9): [True: 43.4k, False: 77.8k]
  |  Branch (316:33): [True: 39.7k, False: 38.0k]
  ------------------
  317|  83.2k|      esbr_bit_str0->str_sbr_ele[esbr_bit_str0->no_elements].sbr_ele_id =
  318|  83.2k|          SBR_ID_CPE;
  319|  83.2k|      esbr_bit_str1->str_sbr_ele[esbr_bit_str1->no_elements].sbr_ele_id =
  320|  83.2k|          SBR_ID_CPE;
  321|  83.2k|    } else {
  322|  38.0k|      esbr_bit_str0->str_sbr_ele[esbr_bit_str0->no_elements].sbr_ele_id =
  323|  38.0k|          SBR_ID_SCE;
  324|  38.0k|      esbr_bit_str1->str_sbr_ele[esbr_bit_str1->no_elements].sbr_ele_id =
  325|  38.0k|          SBR_ID_SCE;
  326|  38.0k|    }
  327|   121k|  }
  328|   197k|  if (ele_id == ID_USAC_LFE) {
  ------------------
  |  |   29|   197k|#define ID_USAC_LFE 2
  ------------------
  |  Branch (328:7): [True: 1.61k, False: 195k]
  ------------------
  329|  1.61k|    esbr_bit_str0->str_sbr_ele[esbr_bit_str0->no_elements].sbr_ele_id =
  330|  1.61k|        SBR_ID_SCE;
  331|  1.61k|    esbr_bit_str1->str_sbr_ele[esbr_bit_str1->no_elements].sbr_ele_id =
  332|  1.61k|        SBR_ID_SCE;
  333|       |
  334|  1.61k|    esbr_bit_str0->no_elements++;
  335|  1.61k|    esbr_bit_str0->str_sbr_ele[0].size_payload = 0;
  336|  1.61k|  }
  337|   197k|}
ixheaacd_process.c:ixheaacd_sbr_ext_data_read:
  211|   160k|    ia_aac_dec_sbr_bitstream_struct *esbr_bit_str) {
  212|   160k|  WORD32 count = 0;
  213|   160k|  WORD32 read_bits = 0;
  214|   160k|  WORD32 unaligned_bits = 0;
  215|   160k|  WORD32 cnt_bits_in;
  216|       |
  217|   160k|  cnt_bits_in = it_bit_buff->cnt_bits;
  218|   160k|  count = (it_bit_buff->cnt_bits) >> 3;
  219|   160k|  if (count > 0) {
  ------------------
  |  Branch (219:7): [True: 160k, False: 31]
  ------------------
  220|   160k|    if ((esbr_bit_str->no_elements < MAXNRSBRELEMENTS)) {
  ------------------
  |  |  104|   160k|#define MAXNRSBRELEMENTS 6
  ------------------
  |  Branch (220:9): [True: 160k, False: 0]
  ------------------
  221|   160k|      esbr_bit_str->str_sbr_ele[esbr_bit_str->no_elements].extension_type =
  222|   160k|          EXT_SBR_DATA;
  ------------------
  |  |   23|   160k|#define EXT_SBR_DATA 13
  ------------------
  223|   160k|      esbr_bit_str->str_sbr_ele[esbr_bit_str->no_elements].size_payload = count;
  224|       |
  225|   160k|      read_bits = count << 3;
  226|       |
  227|   160k|      unaligned_bits = (cnt_bits_in - read_bits);
  228|   160k|      if (unaligned_bits > 0 && unaligned_bits < 8) {
  ------------------
  |  Branch (228:11): [True: 145k, False: 14.9k]
  |  Branch (228:33): [True: 145k, False: 0]
  ------------------
  229|   145k|        count++;
  230|   145k|        esbr_bit_str->str_sbr_ele[esbr_bit_str->no_elements].size_payload =
  231|   145k|            count;
  232|   145k|      }
  233|   160k|      esbr_bit_str->no_elements += 1;
  234|   160k|    }
  235|   160k|  }
  236|   160k|}
ixheaacd_process.c:ixheaacd_read_ext_element:
  244|   307k|                                        WORD32 *frame_ok) {
  245|   307k|  UWORD32 usac_ext_element_present;
  246|   307k|  UWORD32 usac_ext_element_use_dft_length;
  247|   307k|  UWORD32 pay_load_length;
  248|   307k|  WORD32 i;
  249|   307k|  usac_ext_element_present = ixheaacd_read_bits_buf(it_bit_buff, 1);
  250|       |
  251|   307k|  if (usac_ext_element_present) {
  ------------------
  |  Branch (251:7): [True: 17.8k, False: 289k]
  ------------------
  252|  17.8k|    usac_ext_element_use_dft_length = ixheaacd_read_bits_buf(it_bit_buff, 1);
  253|       |
  254|  17.8k|    if (usac_ext_element_use_dft_length) {
  ------------------
  |  Branch (254:9): [True: 7.84k, False: 10.0k]
  ------------------
  255|  7.84k|      pay_load_length = usac_ext_element_default_length;
  256|  10.0k|    } else {
  257|  10.0k|      pay_load_length = ixheaacd_read_bits_buf(it_bit_buff, 8);
  258|       |
  259|  10.0k|      if (pay_load_length == 255) {
  ------------------
  |  Branch (259:11): [True: 29, False: 9.99k]
  ------------------
  260|     29|        WORD32 val_add = 0;
  261|     29|        val_add = ixheaacd_read_bits_buf(it_bit_buff, 16);
  262|     29|        pay_load_length = (UWORD32)((WORD32)pay_load_length + val_add - 2);
  263|     29|      }
  264|  10.0k|    }
  265|  17.8k|    if ((it_bit_buff->cnt_bits >> 3) < (WORD32)pay_load_length) {
  ------------------
  |  Branch (265:9): [True: 134, False: 17.7k]
  ------------------
  266|    134|      *frame_ok = 0;
  267|    134|      longjmp(*(it_bit_buff->xaac_jmp_buf), IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|    134|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  268|    134|    }
  269|  17.7k|    if (pay_load_length > 0) {
  ------------------
  |  Branch (269:9): [True: 10.6k, False: 7.08k]
  ------------------
  270|  10.6k|      if (usac_ext_element_payload_frag)
  ------------------
  |  Branch (270:11): [True: 4.31k, False: 6.34k]
  ------------------
  271|  4.31k|        ixheaacd_read_bits_buf(it_bit_buff, 2);
  272|       |
  273|  10.6k|      if (pstr_usac_dec_config->usac_ext_ele_payload_present[elem_idx]) {
  ------------------
  |  Branch (273:11): [True: 1.53k, False: 9.11k]
  ------------------
  274|  1.53k|        WORD32 preroll_counter = pstr_usac_dec_config->preroll_counter;
  275|  1.53k|        int payload_buffer_offeset = 0;
  276|  1.53k|        for (i = 0; i < preroll_counter; i++)
  ------------------
  |  Branch (276:21): [True: 0, False: 1.53k]
  ------------------
  277|      0|          payload_buffer_offeset +=
  278|      0|              pstr_usac_dec_config->usac_ext_gain_payload_len[i] *
  279|      0|              sizeof(WORD8);
  280|  1.53k|        if ((pay_load_length + payload_buffer_offeset) >
  ------------------
  |  Branch (280:13): [True: 0, False: 1.53k]
  ------------------
  281|  1.53k|            (MAX_AUDIO_PREROLLS * 768))
  ------------------
  |  |  249|  1.53k|#define MAX_AUDIO_PREROLLS 3
  ------------------
  282|      0|          return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
  283|  83.9k|        for (i = 0; i < ((WORD32)pay_load_length); i++) {
  ------------------
  |  Branch (283:21): [True: 82.4k, False: 1.53k]
  ------------------
  284|  82.4k|          pstr_usac_dec_config
  285|  82.4k|              ->usac_ext_gain_payload_buf[i + payload_buffer_offeset] =
  286|  82.4k|              ixheaacd_read_bits_buf(it_bit_buff, 8);
  287|  82.4k|        }
  288|  1.53k|        pstr_usac_dec_config->usac_ext_gain_payload_len[preroll_counter] +=
  289|  1.53k|            pay_load_length;
  290|  9.11k|      } else {
  291|  9.11k|        if (it_bit_buff->cnt_bits < (WORD32)(pay_load_length << 3)) {
  ------------------
  |  Branch (291:13): [True: 5, False: 9.11k]
  ------------------
  292|      5|          longjmp(*(it_bit_buff->xaac_jmp_buf),
  293|      5|                  IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|      5|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  294|      5|        }
  295|  9.11k|        it_bit_buff->ptr_read_next =
  296|  9.11k|            it_bit_buff->ptr_read_next + pay_load_length;
  297|  9.11k|        it_bit_buff->cnt_bits =
  298|  9.11k|            it_bit_buff->cnt_bits - (WORD32)(pay_load_length << 3);
  299|  9.11k|      }
  300|  10.6k|    }
  301|  17.7k|  }
  302|   307k|  return 0;
  303|   307k|}

ixheaacd_divideby2:
   61|  17.3k|WORD16 ixheaacd_divideby2(WORD op) {
   62|  17.3k|  FLAG sign = (op < 0);
   63|       |
   64|  17.3k|  if (sign) {
  ------------------
  |  Branch (64:7): [True: 34, False: 17.3k]
  ------------------
   65|     34|    op = -(op);
   66|     34|  }
   67|       |
   68|  17.3k|  op = (op >> 1);
   69|       |
   70|  17.3k|  if (sign) {
  ------------------
  |  Branch (70:7): [True: 34, False: 17.3k]
  ------------------
   71|     34|    op = -op;
   72|     34|  }
   73|       |
   74|  17.3k|  return (WORD16)op;
   75|  17.3k|}
ixheaacd_divideby3:
   77|  6.30k|WORD16 ixheaacd_divideby3(WORD op) {
   78|  6.30k|  WORD16 temp, ret;
   79|  6.30k|  FLAG sign = (op < 0);
   80|       |
   81|  6.30k|  if (sign) {
  ------------------
  |  Branch (81:7): [True: 35, False: 6.27k]
  ------------------
   82|     35|    op = -(op);
   83|     35|  }
   84|       |
   85|  6.30k|  temp = (WORD16)(op << 2);
   86|       |
   87|  6.30k|  temp = ixheaac_mult16_shl(temp, 0x2aab);
   88|       |
   89|  6.30k|  ret = (temp >> 2);
   90|       |
   91|  6.30k|  if (sign) {
  ------------------
  |  Branch (91:7): [True: 35, False: 6.27k]
  ------------------
   92|     35|    ret = -(ret);
   93|     35|  }
   94|       |
   95|  6.30k|  return (WORD16)ret;
   96|  6.30k|}
ixheaacd_decode_ps_data:
   98|  8.19k|VOID ixheaacd_decode_ps_data(ia_ps_dec_struct *ptr_ps_dec, WORD32 frame_size) {
   99|  8.19k|  WORD e, i, temp;
  100|  8.19k|  WORD16 iid_mode = (WORD16)((ptr_ps_dec->iid_mode) ? 1 : 2);
  ------------------
  |  Branch (100:30): [True: 1.72k, False: 6.47k]
  ------------------
  101|  8.19k|  WORD16 icc_mode = (WORD16)((ptr_ps_dec->icc_mode) ? 1 : 2);
  ------------------
  |  Branch (101:30): [True: 1.88k, False: 6.31k]
  ------------------
  102|  8.19k|  WORD16 num_iid_levels =
  103|  8.19k|      (WORD16)(ptr_ps_dec->iid_quant ? NUM_IID_LEVELS_FINE : NUM_IID_LEVELS);
  ------------------
  |  |   30|    637|#define NUM_IID_LEVELS_FINE (15)
  ------------------
                    (WORD16)(ptr_ps_dec->iid_quant ? NUM_IID_LEVELS_FINE : NUM_IID_LEVELS);
  ------------------
  |  |   29|  7.56k|#define NUM_IID_LEVELS (7)
  ------------------
  |  Branch (103:16): [True: 637, False: 7.56k]
  ------------------
  104|  8.19k|  WORD32 max_num_columns;
  105|       |
  106|  8.19k|  if (frame_size == 960)
  ------------------
  |  Branch (106:7): [True: 0, False: 8.19k]
  ------------------
  107|      0|    max_num_columns = MAX_NUM_COLUMNS_960;
  ------------------
  |  |   25|      0|#define MAX_NUM_COLUMNS_960 30
  ------------------
  108|  8.19k|  else
  109|  8.19k|    max_num_columns = MAX_NUM_COLUMNS;
  ------------------
  |  |   23|  8.19k|#define MAX_NUM_COLUMNS 32
  ------------------
  110|       |
  111|  8.19k|  if (!ptr_ps_dec->ps_data_present) {
  ------------------
  |  Branch (111:7): [True: 6.82k, False: 1.37k]
  ------------------
  112|  6.82k|    ptr_ps_dec->num_env = 0;
  113|  6.82k|  }
  114|       |
  115|  9.61k|  for (e = 0; e < ptr_ps_dec->num_env; e++) {
  ------------------
  |  Branch (115:15): [True: 1.41k, False: 8.19k]
  ------------------
  116|  1.41k|    WORD16 *p_iid_par_prev;
  117|  1.41k|    WORD16 *p_icc_par_prev;
  118|       |
  119|  1.41k|    if (e == 0) {
  ------------------
  |  Branch (119:9): [True: 1.31k, False: 99]
  ------------------
  120|  1.31k|      p_iid_par_prev = ptr_ps_dec->iid_par_prev;
  121|  1.31k|      p_icc_par_prev = ptr_ps_dec->icc_par_prev;
  122|  1.31k|    } else {
  123|     99|      p_iid_par_prev = ptr_ps_dec->iid_par_table[e - 1];
  124|     99|      p_icc_par_prev = ptr_ps_dec->icc_par_table[e - 1];
  125|     99|    }
  126|       |
  127|  1.41k|    if (ptr_ps_dec->enable_iid) {
  ------------------
  |  Branch (127:9): [True: 199, False: 1.21k]
  ------------------
  128|    199|      if (ptr_ps_dec->iid_dt[e]) {
  ------------------
  |  Branch (128:11): [True: 167, False: 32]
  ------------------
  129|  2.12k|        for (i = 0; i < ixheaacd_num_bands[ptr_ps_dec->iid_mode]; i++) {
  ------------------
  |  Branch (129:21): [True: 1.96k, False: 167]
  ------------------
  130|  1.96k|          temp =
  131|  1.96k|              ixheaac_add16(*p_iid_par_prev, ptr_ps_dec->iid_par_table[e][i]);
  132|  1.96k|          ptr_ps_dec->iid_par_table[e][i] = ixheaacd_clamp(
  133|  1.96k|              temp, ixheaac_negate16(num_iid_levels), num_iid_levels);
  134|  1.96k|          p_iid_par_prev += iid_mode;
  135|  1.96k|        }
  136|    167|      } else {
  137|     32|        ptr_ps_dec->iid_par_table[e][0] =
  138|     32|            ixheaacd_clamp(ptr_ps_dec->iid_par_table[e][0],
  139|     32|                           ixheaac_negate16(num_iid_levels), num_iid_levels);
  140|    320|        for (i = 1; i < ixheaacd_num_bands[ptr_ps_dec->iid_mode]; i++) {
  ------------------
  |  Branch (140:21): [True: 288, False: 32]
  ------------------
  141|    288|          temp = ixheaac_add16(ptr_ps_dec->iid_par_table[e][i - 1],
  142|    288|                                ptr_ps_dec->iid_par_table[e][i]);
  143|    288|          ptr_ps_dec->iid_par_table[e][i] = ixheaacd_clamp(
  144|    288|              temp, ixheaac_negate16(num_iid_levels), num_iid_levels);
  145|    288|        }
  146|     32|      }
  147|  1.21k|    } else {
  148|  1.21k|      memset(ptr_ps_dec->iid_par_table[e], 0,
  149|  1.21k|             sizeof(WORD16) * ixheaacd_num_bands[ptr_ps_dec->iid_mode]);
  150|  1.21k|    }
  151|       |
  152|  1.41k|    if (iid_mode == 2) {
  ------------------
  |  Branch (152:9): [True: 1.35k, False: 59]
  ------------------
  153|  1.35k|      for (i = (ixheaacd_num_bands[ptr_ps_dec->iid_mode] * iid_mode - 1);
  154|  27.1k|           i != 0; i--) {
  ------------------
  |  Branch (154:12): [True: 25.7k, False: 1.35k]
  ------------------
  155|  25.7k|        ptr_ps_dec->iid_par_table[e][i] =
  156|  25.7k|            ptr_ps_dec->iid_par_table[e][ixheaac_shr32(i, 1)];
  157|  25.7k|      }
  158|  1.35k|    }
  159|       |
  160|  1.41k|    if (ptr_ps_dec->enable_icc) {
  ------------------
  |  Branch (160:9): [True: 64, False: 1.35k]
  ------------------
  161|     64|      if (ptr_ps_dec->icc_dt[e]) {
  ------------------
  |  Branch (161:11): [True: 62, False: 2]
  ------------------
  162|  1.27k|        for (i = 0; i < ixheaacd_num_bands[ptr_ps_dec->icc_mode]; i++) {
  ------------------
  |  Branch (162:21): [True: 1.21k, False: 62]
  ------------------
  163|  1.21k|          temp =
  164|  1.21k|              ixheaac_add16(*p_icc_par_prev, ptr_ps_dec->icc_par_table[e][i]);
  165|  1.21k|          ptr_ps_dec->icc_par_table[e][i] =
  166|  1.21k|              ixheaacd_clamp(temp, 0, (WORD16)(NUM_ICC_LEVELS - 1));
  ------------------
  |  |   31|  1.21k|#define NUM_ICC_LEVELS (8)
  ------------------
  167|  1.21k|          p_icc_par_prev += icc_mode;
  168|  1.21k|        }
  169|     62|      } else {
  170|      2|        ptr_ps_dec->icc_par_table[e][0] = ixheaacd_clamp(
  171|      2|            ptr_ps_dec->icc_par_table[e][0], 0, (WORD16)(NUM_ICC_LEVELS - 1));
  ------------------
  |  |   31|      2|#define NUM_ICC_LEVELS (8)
  ------------------
  172|     20|        for (i = 1; i < ixheaacd_num_bands[ptr_ps_dec->icc_mode]; i++) {
  ------------------
  |  Branch (172:21): [True: 18, False: 2]
  ------------------
  173|     18|          temp = ixheaac_add16(ptr_ps_dec->icc_par_table[e][i - 1],
  174|     18|                                ptr_ps_dec->icc_par_table[e][i]);
  175|     18|          ptr_ps_dec->icc_par_table[e][i] =
  176|     18|              ixheaacd_clamp(temp, 0, (WORD16)(NUM_ICC_LEVELS - 1));
  ------------------
  |  |   31|     18|#define NUM_ICC_LEVELS (8)
  ------------------
  177|     18|        }
  178|      2|      }
  179|  1.35k|    } else {
  180|  1.35k|      memset(ptr_ps_dec->icc_par_table[e], 0,
  181|  1.35k|             sizeof(WORD16) * ixheaacd_num_bands[ptr_ps_dec->icc_mode]);
  182|  1.35k|    }
  183|       |
  184|  1.41k|    if (icc_mode == 2) {
  ------------------
  |  Branch (184:9): [True: 1.33k, False: 80]
  ------------------
  185|  1.33k|      for (i = (ixheaacd_num_bands[ptr_ps_dec->icc_mode] * icc_mode - 1);
  186|  26.7k|           i != 0; i--) {
  ------------------
  |  Branch (186:12): [True: 25.3k, False: 1.33k]
  ------------------
  187|  25.3k|        ptr_ps_dec->icc_par_table[e][i] =
  188|  25.3k|            ptr_ps_dec->icc_par_table[e][ixheaac_shr32(i, 1)];
  189|  25.3k|      }
  190|  1.33k|    }
  191|  1.41k|  }
  192|       |
  193|  8.19k|  if (ptr_ps_dec->num_env == 0) {
  ------------------
  |  Branch (193:7): [True: 6.88k, False: 1.31k]
  ------------------
  194|  6.88k|    ptr_ps_dec->num_env = 1;
  195|       |
  196|  6.88k|    if (ptr_ps_dec->enable_iid) {
  ------------------
  |  Branch (196:9): [True: 2.32k, False: 4.55k]
  ------------------
  197|  2.32k|      memcpy(ptr_ps_dec->iid_par_table[0], ptr_ps_dec->iid_par_prev,
  198|  2.32k|             sizeof(WORD16) * NUM_BANDS_FINE);
  ------------------
  |  |   43|  2.32k|#define NUM_BANDS_FINE (34)
  ------------------
  199|  4.55k|    } else {
  200|  4.55k|      memset(ptr_ps_dec->iid_par_table[0], 0, sizeof(WORD16) * NUM_BANDS_FINE);
  ------------------
  |  |   43|  4.55k|#define NUM_BANDS_FINE (34)
  ------------------
  201|  4.55k|    }
  202|       |
  203|  6.88k|    if (ptr_ps_dec->enable_icc) {
  ------------------
  |  Branch (203:9): [True: 1.63k, False: 5.24k]
  ------------------
  204|  1.63k|      memcpy(ptr_ps_dec->icc_par_table[0], ptr_ps_dec->icc_par_prev,
  205|  1.63k|             sizeof(WORD16) * NUM_BANDS_FINE);
  ------------------
  |  |   43|  1.63k|#define NUM_BANDS_FINE (34)
  ------------------
  206|  5.24k|    } else {
  207|  5.24k|      memset(ptr_ps_dec->icc_par_table[0], 0, sizeof(WORD16) * NUM_BANDS_FINE);
  ------------------
  |  |   43|  5.24k|#define NUM_BANDS_FINE (34)
  ------------------
  208|  5.24k|    }
  209|  6.88k|  }
  210|       |
  211|  8.19k|  memcpy(ptr_ps_dec->iid_par_prev,
  212|  8.19k|         ptr_ps_dec->iid_par_table[ptr_ps_dec->num_env - 1],
  213|  8.19k|         sizeof(WORD16) * NUM_BANDS_FINE);
  ------------------
  |  |   43|  8.19k|#define NUM_BANDS_FINE (34)
  ------------------
  214|       |
  215|  8.19k|  memcpy(ptr_ps_dec->icc_par_prev,
  216|  8.19k|         ptr_ps_dec->icc_par_table[ptr_ps_dec->num_env - 1],
  217|  8.19k|         sizeof(WORD16) * NUM_BANDS_FINE);
  ------------------
  |  |   43|  8.19k|#define NUM_BANDS_FINE (34)
  ------------------
  218|       |
  219|  8.19k|  ptr_ps_dec->ps_data_present = 0;
  220|       |
  221|  8.19k|  if (ptr_ps_dec->frame_class == 0) {
  ------------------
  |  Branch (221:7): [True: 7.86k, False: 339]
  ------------------
  222|  7.86k|    WORD env_count;
  223|  7.86k|    WORD16 shift = 0;
  224|       |
  225|  7.86k|    switch (ptr_ps_dec->num_env) {
  ------------------
  |  Branch (225:13): [True: 7.86k, False: 0]
  ------------------
  226|  7.83k|      case 1:
  ------------------
  |  Branch (226:7): [True: 7.83k, False: 25]
  ------------------
  227|  7.83k|        shift = 0;
  228|  7.83k|        break;
  229|     23|      case 2:
  ------------------
  |  Branch (229:7): [True: 23, False: 7.83k]
  ------------------
  230|     23|        shift = 1;
  231|     23|        break;
  232|      2|      case 4:
  ------------------
  |  Branch (232:7): [True: 2, False: 7.85k]
  ------------------
  233|      2|        shift = 2;
  234|      2|        break;
  235|  7.86k|    }
  236|  7.86k|    ptr_ps_dec->border_position[0] = 0;
  237|  7.86k|    env_count = 0;
  238|       |
  239|  7.88k|    for (e = 1; e < ptr_ps_dec->num_env; e++) {
  ------------------
  |  Branch (239:17): [True: 29, False: 7.86k]
  ------------------
  240|     29|      env_count = add_d(env_count, max_num_columns);
  ------------------
  |  |   23|     29|#define add_d(a, b) ((a) + (b))
  ------------------
  241|     29|      ptr_ps_dec->border_position[e] = (WORD16)(env_count >> shift);
  242|     29|    }
  243|  7.86k|    ptr_ps_dec->border_position[ptr_ps_dec->num_env] = max_num_columns;
  244|  7.86k|  } else {
  245|    339|    ptr_ps_dec->border_position[0] = 0;
  246|       |
  247|    339|    if (ptr_ps_dec->border_position[ptr_ps_dec->num_env] < max_num_columns) {
  ------------------
  |  Branch (247:9): [True: 312, False: 27]
  ------------------
  248|    312|      ptr_ps_dec->num_env++;
  249|    312|      ptr_ps_dec->border_position[ptr_ps_dec->num_env] = max_num_columns;
  250|       |
  251|    312|      memcpy(ptr_ps_dec->iid_par_table[ptr_ps_dec->num_env - 1],
  252|    312|             ptr_ps_dec->iid_par_table[ptr_ps_dec->num_env - 2],
  253|    312|             sizeof(WORD16) * NUM_BANDS_FINE);
  ------------------
  |  |   43|    312|#define NUM_BANDS_FINE (34)
  ------------------
  254|       |
  255|    312|      memcpy(ptr_ps_dec->icc_par_table[ptr_ps_dec->num_env - 1],
  256|    312|             ptr_ps_dec->icc_par_table[ptr_ps_dec->num_env - 2],
  257|    312|             sizeof(WORD16) * NUM_BANDS_FINE);
  ------------------
  |  |   43|    312|#define NUM_BANDS_FINE (34)
  ------------------
  258|    312|    }
  259|       |
  260|    721|    for (e = 1; e < ptr_ps_dec->num_env; e++) {
  ------------------
  |  Branch (260:17): [True: 382, False: 339]
  ------------------
  261|    382|      WORD threshold;
  262|    382|      threshold = sub_d(max_num_columns, sub_d(ptr_ps_dec->num_env, e));
  ------------------
  |  |   24|    382|#define sub_d(a, b) ((a) - (b))
  ------------------
  263|       |
  264|    382|      if (ptr_ps_dec->border_position[e] > threshold) {
  ------------------
  |  Branch (264:11): [True: 1, False: 381]
  ------------------
  265|      1|        ptr_ps_dec->border_position[e] = threshold;
  266|    381|      } else {
  267|    381|        threshold = add_d(ptr_ps_dec->border_position[e - 1], 1);
  ------------------
  |  |   23|    381|#define add_d(a, b) ((a) + (b))
  ------------------
  268|       |
  269|    381|        if (ptr_ps_dec->border_position[e] < threshold) {
  ------------------
  |  Branch (269:13): [True: 70, False: 311]
  ------------------
  270|     70|          ptr_ps_dec->border_position[e] = threshold;
  271|     70|        }
  272|    381|      }
  273|    382|    }
  274|    339|  }
  275|       |
  276|  16.8k|  for (e = 0; e < ptr_ps_dec->num_env; e++) {
  ------------------
  |  Branch (276:15): [True: 8.61k, False: 8.19k]
  ------------------
  277|  8.61k|    if (ptr_ps_dec->iid_mode == 2)
  ------------------
  |  Branch (277:9): [True: 1.53k, False: 7.08k]
  ------------------
  278|  1.53k|      ixheaacd_map_34_params_to_20(ptr_ps_dec->iid_par_table[e]);
  279|       |
  280|  8.61k|    if (ptr_ps_dec->icc_mode == 2)
  ------------------
  |  Branch (280:9): [True: 47, False: 8.56k]
  ------------------
  281|     47|      ixheaacd_map_34_params_to_20(ptr_ps_dec->icc_par_table[e]);
  282|  8.61k|  }
  283|  8.19k|}
ixheaacd_ps_bitdec.c:ixheaacd_clamp:
   47|  3.51k|static WORD32 ixheaacd_clamp(WORD32 i, WORD16 min, WORD16 max) {
   48|  3.51k|  WORD32 result = i;
   49|       |
   50|  3.51k|  if (i < min) {
  ------------------
  |  Branch (50:7): [True: 89, False: 3.42k]
  ------------------
   51|     89|    result = min;
   52|  3.42k|  } else {
   53|  3.42k|    if (i > max) {
  ------------------
  |  Branch (53:9): [True: 39, False: 3.38k]
  ------------------
   54|     39|      result = max;
   55|     39|    }
   56|  3.42k|  }
   57|       |
   58|  3.51k|  return result;
   59|  3.51k|}

ixheaacd_k_chan_filt:
   79|  24.6k|                          FLOAT32 *cos_sin_mod_tbl) {
   80|  24.6k|  WORD32 i, n, q;
   81|  24.6k|  FLOAT32 real, imag;
   82|  24.6k|  FLOAT32 cos_val, sin_val;
   83|  24.6k|  FLOAT32 *p_real_imag = cos_sin_mod_tbl;
   84|       |
   85|  24.6k|  if (bCplx) {
  ------------------
  |  Branch (85:7): [True: 8.20k, False: 16.4k]
  ------------------
   86|   270k|    for (i = 0; i < nSamples; i++) {
  ------------------
  |  Branch (86:17): [True: 262k, False: 8.20k]
  ------------------
   87|  2.36M|      for (q = 0; q < k; q++) {
  ------------------
  |  Branch (87:19): [True: 2.10M, False: 262k]
  ------------------
   88|  2.10M|        real = 0;
   89|  2.10M|        imag = 0;
   90|  29.4M|        for (n = 0; n < 13; n++) {
  ------------------
  |  Branch (90:21): [True: 27.3M, False: 2.10M]
  ------------------
   91|  27.3M|          cos_val = *p_real_imag++;
   92|  27.3M|          sin_val = *p_real_imag++;
   93|  27.3M|          real += p[n] * (ptr_qmf_re[n + i] * cos_val - ptr_qmf_im[n + i] * sin_val);
   94|  27.3M|          imag += p[n] * (ptr_qmf_im[n + i] * cos_val + ptr_qmf_re[n + i] * sin_val);
   95|  27.3M|        }
   96|  2.10M|        ptr_tmp_hyb_re[i][q] = real;
   97|  2.10M|        ptr_tmp_hyb_im[i][q] = imag;
   98|  2.10M|      }
   99|   262k|      p_real_imag -= (13 * k * 2);
  100|   262k|    }
  101|  16.4k|  } else {
  102|   541k|    for (i = 0; i < nSamples; i++) {
  ------------------
  |  Branch (102:17): [True: 525k, False: 16.4k]
  ------------------
  103|  1.57M|      for (q = 0; q < k; q++) {
  ------------------
  |  Branch (103:19): [True: 1.05M, False: 525k]
  ------------------
  104|  1.05M|        real = 0;
  105|  1.05M|        imag = 0;
  106|  14.7M|        for (n = 0; n < 13; n++) {
  ------------------
  |  Branch (106:21): [True: 13.6M, False: 1.05M]
  ------------------
  107|  13.6M|          cos_val = *p_real_imag++;
  108|  13.6M|          real += p[n] * (ptr_qmf_re[n + i] * cos_val);
  109|  13.6M|          imag += p[n] * (ptr_qmf_im[n + i] * cos_val);
  110|  13.6M|        }
  111|  1.05M|        ptr_tmp_hyb_re[i][q] = real;
  112|  1.05M|        ptr_tmp_hyb_im[i][q] = imag;
  113|  1.05M|      }
  114|   525k|      p_real_imag -= (13 * k);
  115|   525k|    }
  116|  16.4k|  }
  117|  24.6k|}
ixheaacd_hyb_anal:
  121|  16.4k|                       WORD32 use_34_st_bands) {
  122|  16.4k|  WORD32 k, n, band;
  123|  16.4k|  WORD32 band_res;
  124|  16.4k|  WORD32 frame_size;
  125|  16.4k|  WORD32 ch_offset = 0;
  126|  16.4k|  FLOAT32(*ptr_tmp_hyb_re)[MAX_NUM_COLUMNS];
  127|  16.4k|  FLOAT32(*ptr_tmp_hyb_im)[MAX_NUM_COLUMNS];
  128|  16.4k|  ia_hybrid_flt_struct *ptr_hybrid;
  129|  16.4k|  if (!use_34_st_bands) {
  ------------------
  |  Branch (129:7): [True: 8.20k, False: 8.20k]
  ------------------
  130|  8.20k|    ptr_tmp_hyb_re = ptr_ps_dec->hyb_left_re;
  131|  8.20k|    ptr_tmp_hyb_im = ptr_ps_dec->hyb_left_im;
  132|  8.20k|    ptr_hybrid = &ptr_ps_dec->str_flt_hybrid20;
  133|  8.20k|  } else {
  134|  8.20k|    ptr_tmp_hyb_re = NULL;
  135|  8.20k|    ptr_tmp_hyb_im = ptr_ps_dec->hyb_left_im;
  136|  8.20k|    ptr_hybrid = &ptr_ps_dec->str_flt_hybrid34;
  137|  8.20k|  }
  138|  16.4k|  frame_size = ptr_hybrid->frame_size;
  139|  82.0k|  for (band = 0; band < ptr_hybrid->num_qmf_bands; band++) {
  ------------------
  |  Branch (139:18): [True: 65.6k, False: 16.4k]
  ------------------
  140|  65.6k|    band_res = ptr_hybrid->ptr_resol[band];
  141|       |
  142|  65.6k|    memcpy(ptr_hybrid->ptr_work_re, ptr_hybrid->ptr_qmf_buf_re[band],
  143|  65.6k|           (HYBRID_FILTER_LENGTH - 1) * sizeof(ptr_hybrid->ptr_work_re[0]));
  ------------------
  |  |   23|  65.6k|#define HYBRID_FILTER_LENGTH 13
  ------------------
  144|  65.6k|    memcpy(ptr_hybrid->ptr_work_im, ptr_hybrid->ptr_qmf_buf_im[band],
  145|  65.6k|           (HYBRID_FILTER_LENGTH - 1) * sizeof(ptr_hybrid->ptr_work_im[0]));
  ------------------
  |  |   23|  65.6k|#define HYBRID_FILTER_LENGTH 13
  ------------------
  146|       |
  147|  2.16M|    for (n = 0; n < frame_size; n++) {
  ------------------
  |  Branch (147:17): [True: 2.10M, False: 65.6k]
  ------------------
  148|  2.10M|      ptr_hybrid->ptr_work_re[(HYBRID_FILTER_LENGTH - 1) + n] =
  ------------------
  |  |   23|  2.10M|#define HYBRID_FILTER_LENGTH 13
  ------------------
  149|  2.10M|          ptr_qmf_re[n + HYBRID_FILTER_DELAY][band];
  ------------------
  |  |   24|  2.10M|#define HYBRID_FILTER_DELAY 6
  ------------------
  150|  2.10M|      ptr_hybrid->ptr_work_im[(HYBRID_FILTER_LENGTH - 1) + n] =
  ------------------
  |  |   23|  2.10M|#define HYBRID_FILTER_LENGTH 13
  ------------------
  151|  2.10M|          ptr_qmf_im[n + HYBRID_FILTER_DELAY][band];
  ------------------
  |  |   24|  2.10M|#define HYBRID_FILTER_DELAY 6
  ------------------
  152|  2.10M|    }
  153|       |
  154|  65.6k|    memcpy(ptr_hybrid->ptr_qmf_buf_re[band], ptr_hybrid->ptr_work_re + frame_size,
  155|  65.6k|           (HYBRID_FILTER_LENGTH - 1) * sizeof(ptr_hybrid->ptr_qmf_buf_re[band][0]));
  ------------------
  |  |   23|  65.6k|#define HYBRID_FILTER_LENGTH 13
  ------------------
  156|  65.6k|    memcpy(ptr_hybrid->ptr_qmf_buf_im[band], ptr_hybrid->ptr_work_im + frame_size,
  157|  65.6k|           (HYBRID_FILTER_LENGTH - 1) * sizeof(ptr_hybrid->ptr_qmf_buf_im[band][0]));
  ------------------
  |  |   23|  65.6k|#define HYBRID_FILTER_LENGTH 13
  ------------------
  158|       |
  159|  65.6k|    if (ptr_tmp_hyb_re) {
  ------------------
  |  Branch (159:9): [True: 24.6k, False: 41.0k]
  ------------------
  160|  24.6k|      switch (band_res) {
  161|  16.4k|        case NO_HYBRID_CHANNELS_2:
  ------------------
  |  |   29|  16.4k|#define NO_HYBRID_CHANNELS_2 2
  ------------------
  |  Branch (161:9): [True: 16.4k, False: 8.20k]
  ------------------
  162|  16.4k|          ixheaacd_k_chan_filt(
  163|  16.4k|              ptr_hybrid->ptr_work_re, ptr_hybrid->ptr_work_im, ptr_hybrid->ptr_temp_re,
  164|  16.4k|              ptr_hybrid->ptr_temp_im, frame_size, NO_HYBRID_CHANNELS_2, REAL,
  ------------------
  |  |   29|  16.4k|#define NO_HYBRID_CHANNELS_2 2
  ------------------
                            ptr_hybrid->ptr_temp_im, frame_size, NO_HYBRID_CHANNELS_2, REAL,
  ------------------
  |  |   35|  16.4k|#define REAL 0
  ------------------
  165|  16.4k|              ptr_ps_tables->p2_13_20,
  166|  16.4k|              &ptr_ps_tables->cos_mod_2channel[0][0]);
  167|  16.4k|          break;
  168|      0|        case NO_HYBRID_CHANNELS_4:
  ------------------
  |  |   30|      0|#define NO_HYBRID_CHANNELS_4 4
  ------------------
  |  Branch (168:9): [True: 0, False: 24.6k]
  ------------------
  169|      0|          ixheaacd_k_chan_filt(
  170|      0|              ptr_hybrid->ptr_work_re, ptr_hybrid->ptr_work_im, ptr_hybrid->ptr_temp_re,
  171|      0|              ptr_hybrid->ptr_temp_im, frame_size, NO_HYBRID_CHANNELS_4, CPLX,
  ------------------
  |  |   30|      0|#define NO_HYBRID_CHANNELS_4 4
  ------------------
                            ptr_hybrid->ptr_temp_im, frame_size, NO_HYBRID_CHANNELS_4, CPLX,
  ------------------
  |  |   36|      0|#define CPLX 1
  ------------------
  172|      0|              ptr_ps_tables->p4_13_34,
  173|      0|              &ptr_ps_tables->cos_sin_mod_4channel[0][0]);
  174|      0|          break;
  175|  8.20k|        case NO_HYBRID_CHANNELS_8:
  ------------------
  |  |   31|  8.20k|#define NO_HYBRID_CHANNELS_8 8
  ------------------
  |  Branch (175:9): [True: 8.20k, False: 16.4k]
  ------------------
  176|  8.20k|          ixheaacd_k_chan_filt(
  177|  8.20k|              ptr_hybrid->ptr_work_re, ptr_hybrid->ptr_work_im, ptr_hybrid->ptr_temp_re,
  178|  8.20k|              ptr_hybrid->ptr_temp_im, frame_size, NO_HYBRID_CHANNELS_8, CPLX,
  ------------------
  |  |   31|  8.20k|#define NO_HYBRID_CHANNELS_8 8
  ------------------
                            ptr_hybrid->ptr_temp_im, frame_size, NO_HYBRID_CHANNELS_8, CPLX,
  ------------------
  |  |   36|  8.20k|#define CPLX 1
  ------------------
  179|  8.20k|              use_34_st_bands ? ptr_ps_tables->p8_13_34 : ptr_ps_tables->p8_13_20,
  ------------------
  |  Branch (179:15): [True: 0, False: 8.20k]
  ------------------
  180|  8.20k|              &ptr_ps_tables->cos_sin_mod_8channel[0][0]);
  181|  8.20k|          break;
  182|      0|        case NO_HYBRID_CHANNELS_12:
  ------------------
  |  |   32|      0|#define NO_HYBRID_CHANNELS_12 12
  ------------------
  |  Branch (182:9): [True: 0, False: 24.6k]
  ------------------
  183|      0|          ixheaacd_k_chan_filt(ptr_hybrid->ptr_work_re, ptr_hybrid->ptr_work_im,
  184|      0|                               ptr_hybrid->ptr_temp_re, ptr_hybrid->ptr_temp_im, frame_size,
  185|      0|                               NO_HYBRID_CHANNELS_12, CPLX, ptr_ps_tables->p12_13_34,
  ------------------
  |  |   32|      0|#define NO_HYBRID_CHANNELS_12 12
  ------------------
                                             NO_HYBRID_CHANNELS_12, CPLX, ptr_ps_tables->p12_13_34,
  ------------------
  |  |   36|      0|#define CPLX 1
  ------------------
  186|      0|                               &ptr_ps_tables->cos_sin_mod_12channel[0][0]);
  187|      0|          break;
  188|      0|        default:
  ------------------
  |  Branch (188:9): [True: 0, False: 24.6k]
  ------------------
  189|      0|          break;
  190|  24.6k|      }
  191|       |
  192|   812k|      for (n = 0; n < frame_size; n++) {
  ------------------
  |  Branch (192:19): [True: 787k, False: 24.6k]
  ------------------
  193|  3.93M|        for (k = 0; k < (WORD32)band_res; k++) {
  ------------------
  |  Branch (193:21): [True: 3.15M, False: 787k]
  ------------------
  194|  3.15M|          ptr_tmp_hyb_re[n][ch_offset + k] = ptr_hybrid->ptr_temp_re[n][k];
  195|  3.15M|          ptr_tmp_hyb_im[n][ch_offset + k] = ptr_hybrid->ptr_temp_im[n][k];
  196|  3.15M|        }
  197|   787k|      }
  198|  24.6k|      ch_offset += band_res;
  199|  24.6k|    }
  200|  65.6k|  }
  201|  16.4k|}
ixheaacd_hyb_synth:
  208|  16.4k|    ia_hybrid_flt_struct *ptr_hybrid) {
  209|  16.4k|  WORD32 k, n, band;
  210|  16.4k|  WORD16 band_res;
  211|  16.4k|  WORD32 frame_size = ptr_hybrid->frame_size;
  212|  16.4k|  WORD32 ch_offset = 0;
  213|       |
  214|  65.6k|  for (band = 0; band < ptr_hybrid->num_qmf_bands; band++) {
  ------------------
  |  Branch (214:18): [True: 49.2k, False: 16.4k]
  ------------------
  215|  49.2k|    band_res = ptr_hybrid->ptr_resol[band];
  216|       |
  217|  1.62M|    for (n = 0; n < frame_size; n++) {
  ------------------
  |  Branch (217:17): [True: 1.57M, False: 49.2k]
  ------------------
  218|  1.57M|      ptr_qmf_re[n][band] = ptr_qmf_im[n][band] = 0;
  219|       |
  220|  7.87M|      for (k = 0; k < (WORD32)band_res; k++) {
  ------------------
  |  Branch (220:19): [True: 6.30M, False: 1.57M]
  ------------------
  221|  6.30M|        ptr_qmf_re[n][band] += ptr_tmp_hyb_re[n][ch_offset + k];
  222|  6.30M|        ptr_qmf_im[n][band] += ptr_tmp_hyb_im[n][ch_offset + k];
  223|  6.30M|      }
  224|  1.57M|    }
  225|  49.2k|    ch_offset += band_res;
  226|  49.2k|  }
  227|  16.4k|}
ixheaacd_create_ps_esbr_dec:
  298|  10.3k|                                   UWORD32 num_sub_samples, WORD32 ps_mode) {
  299|  10.3k|  UWORD32 i;
  300|  10.3k|  ia_ps_dec_struct *ptr_ps_dec = ptr_ps_dec_struct;
  301|       |
  302|  10.3k|  ptr_ps_dec = ptr_ps_dec_struct;
  303|       |
  304|  10.3k|  ptr_ps_dec->num_sub_samples = num_sub_samples;
  305|  10.3k|  ptr_ps_dec->num_chans = noQmfChans;
  306|  10.3k|  ptr_ps_dec->ps_mode = ps_mode;
  307|       |
  308|  10.3k|  ptr_ps_dec->ps_data_present = 0;
  309|  10.3k|  ptr_ps_dec->enable_iid = 0;
  310|  10.3k|  ptr_ps_dec->iid_mode = 0;
  311|  10.3k|  ptr_ps_dec->enable_icc = 0;
  312|  10.3k|  ptr_ps_dec->icc_mode = 0;
  313|  10.3k|  ptr_ps_dec->enable_ext = 0;
  314|       |
  315|  10.3k|  ptr_ps_dec->use_pca_rot_flg = 0;
  316|  10.3k|  ptr_ps_dec->freq_res_ipd = 0;
  317|  10.3k|  ptr_ps_dec->use_34_st_bands = 0;
  318|  10.3k|  ptr_ps_dec->use_34_st_bands_prev = 0;
  319|       |
  320|  10.3k|  ptr_ps_dec->str_flt_hybrid20.frame_size = ptr_ps_dec->num_sub_samples;
  321|  10.3k|  ptr_ps_dec->str_flt_hybrid20.num_qmf_bands = NUM_QMF_BANDS_IN_HYBRID20;
  ------------------
  |  |   86|  10.3k|#define NUM_QMF_BANDS_IN_HYBRID20 3
  ------------------
  322|  10.3k|  ptr_ps_dec->str_flt_hybrid20.ptr_resol = (WORD16 *)&ptr_ps_tables->band_res_hyb20[0];
  323|  10.3k|  ptr_ps_dec->str_flt_hybrid20.ptr_work_re = &ptr_ps_dec->hyb_work_re_20[0];
  324|  10.3k|  ptr_ps_dec->str_flt_hybrid20.ptr_work_im = &ptr_ps_dec->hyb_work_im_20[0];
  325|  10.3k|  ptr_ps_dec->str_flt_hybrid20.ptr_qmf_buf_re = ptr_ps_dec->hyb_qmf_buf_re_20;
  326|  10.3k|  ptr_ps_dec->str_flt_hybrid20.ptr_qmf_buf_im = ptr_ps_dec->hyb_qmf_buf_im_20;
  327|  10.3k|  ptr_ps_dec->str_flt_hybrid20.ptr_temp_re = ptr_ps_dec->hyb_temp_re_20;
  328|  10.3k|  ptr_ps_dec->str_flt_hybrid20.ptr_temp_im = ptr_ps_dec->hyb_temp_im_20;
  329|       |
  330|  10.3k|  ptr_ps_dec->str_flt_hybrid34.frame_size = ptr_ps_dec->num_sub_samples;
  331|  10.3k|  ptr_ps_dec->str_flt_hybrid34.num_qmf_bands = NUM_QMF_BANDS_IN_HYBRID34;
  ------------------
  |  |   87|  10.3k|#define NUM_QMF_BANDS_IN_HYBRID34 5
  ------------------
  332|  10.3k|  ptr_ps_dec->str_flt_hybrid34.ptr_resol = (WORD16 *)&ptr_ps_tables->band_res_hyb34[0];
  333|  10.3k|  ptr_ps_dec->str_flt_hybrid34.ptr_work_re = &ptr_ps_dec->hyb_work_re_34[0];
  334|  10.3k|  ptr_ps_dec->str_flt_hybrid34.ptr_work_im = &ptr_ps_dec->hyb_work_im_34[0];
  335|  10.3k|  ptr_ps_dec->str_flt_hybrid34.ptr_qmf_buf_re = ptr_ps_dec->hyb_qmf_buf_re_34;
  336|  10.3k|  ptr_ps_dec->str_flt_hybrid34.ptr_qmf_buf_im = ptr_ps_dec->hyb_qmf_buf_im_34;
  337|  10.3k|  ptr_ps_dec->str_flt_hybrid34.ptr_temp_re = ptr_ps_dec->hyb_temp_re_34;
  338|  10.3k|  ptr_ps_dec->str_flt_hybrid34.ptr_temp_im = ptr_ps_dec->hyb_temp_im_34;
  339|       |
  340|  10.3k|  ptr_ps_dec->delay_buf_idx = 0;
  341|       |
  342|   673k|  for (i = 0; i < NUM_OF_QUAD_MIRROR_FILTER_CHNLS; i++) {
  ------------------
  |  |   26|   673k|#define NUM_OF_QUAD_MIRROR_FILTER_CHNLS 64
  ------------------
  |  Branch (342:15): [True: 662k, False: 10.3k]
  ------------------
  343|   662k|    ptr_ps_dec->delay_qmf_delay_buf_idx[i] = 0;
  344|   662k|    ptr_ps_dec->delay_qmf_delay_num_samp[i] = ptr_ps_tables->qmf_delay_idx_tbl[i];
  345|   662k|  }
  346|       |
  347|   362k|  for (i = 0; i < NUM_HI_RES_BINS; i++) {
  ------------------
  |  |   57|   362k|#define NUM_HI_RES_BINS (34)
  ------------------
  |  Branch (347:15): [True: 352k, False: 10.3k]
  ------------------
  348|   352k|    ptr_ps_dec->h11_re_prev[i] = 1.0f;
  349|   352k|    ptr_ps_dec->h12_re_prev[i] = 1.0f;
  350|   352k|  }
  351|       |
  352|  10.3k|  memset(ptr_ps_dec->h11_im_prev, 0, sizeof(ptr_ps_dec->h11_im_prev));
  353|  10.3k|  memset(ptr_ps_dec->h12_im_prev, 0, sizeof(ptr_ps_dec->h12_im_prev));
  354|  10.3k|  memset(ptr_ps_dec->h21_re_prev, 0, sizeof(ptr_ps_dec->h21_re_prev));
  355|  10.3k|  memset(ptr_ps_dec->h22_re_prev, 0, sizeof(ptr_ps_dec->h22_re_prev));
  356|  10.3k|  memset(ptr_ps_dec->h21_im_prev, 0, sizeof(ptr_ps_dec->h21_im_prev));
  357|  10.3k|  memset(ptr_ps_dec->h22_im_prev, 0, sizeof(ptr_ps_dec->h22_im_prev));
  358|       |
  359|  10.3k|  memset(ptr_ps_dec->ipd_idx_map_1, 0, sizeof(ptr_ps_dec->ipd_idx_map_1));
  360|  10.3k|  memset(ptr_ps_dec->opd_idx_map_1, 0, sizeof(ptr_ps_dec->opd_idx_map_1));
  361|  10.3k|  memset(ptr_ps_dec->ipd_idx_map_2, 0, sizeof(ptr_ps_dec->ipd_idx_map_2));
  362|  10.3k|  memset(ptr_ps_dec->opd_idx_map_2, 0, sizeof(ptr_ps_dec->opd_idx_map_2));
  363|       |
  364|   362k|  for (i = 0; i < NUM_HI_RES_BINS; i++) {
  ------------------
  |  |   57|   362k|#define NUM_HI_RES_BINS (34)
  ------------------
  |  Branch (364:15): [True: 352k, False: 10.3k]
  ------------------
  365|   352k|    ptr_ps_dec->peak_decay_fast_bin[i] = 0.0f;
  366|   352k|    ptr_ps_dec->prev_nrg_bin[i] = 0.0f;
  367|   352k|    ptr_ps_dec->prev_peak_diff_bin[i] = 0.0f;
  368|   352k|  }
  369|       |
  370|  10.3k|  memset(ptr_ps_dec->qmf_delay_buf_re, 0, sizeof(ptr_ps_dec->qmf_delay_buf_re));
  371|  10.3k|  memset(ptr_ps_dec->qmf_delay_buf_im, 0, sizeof(ptr_ps_dec->qmf_delay_buf_im));
  372|  10.3k|  memset(ptr_ps_dec->sub_qmf_delay_buf_re, 0, sizeof(ptr_ps_dec->sub_qmf_delay_buf_re));
  373|  10.3k|  memset(ptr_ps_dec->sub_qmf_delay_buf_im, 0, sizeof(ptr_ps_dec->sub_qmf_delay_buf_im));
  374|       |
  375|  41.4k|  for (i = 0; i < NUM_SER_AP_LINKS; i++) {
  ------------------
  |  |   25|  41.4k|#define NUM_SER_AP_LINKS 3
  ------------------
  |  Branch (375:15): [True: 31.0k, False: 10.3k]
  ------------------
  376|  31.0k|    memset(&ptr_ps_dec->ser_qmf_delay_buf_re[i][0][0], 0,
  377|  31.0k|           sizeof(ptr_ps_dec->ser_qmf_delay_buf_re[i]));
  378|  31.0k|    memset(&ptr_ps_dec->ser_qmf_delay_buf_im[i][0][0], 0,
  379|  31.0k|           sizeof(ptr_ps_dec->ser_qmf_delay_buf_im[i]));
  380|  31.0k|    memset(&ptr_ps_dec->ser_sub_qmf_dealy_buf_re[i][0][0], 0,
  381|  31.0k|           sizeof(ptr_ps_dec->ser_sub_qmf_dealy_buf_re[i]));
  382|  31.0k|    memset(&ptr_ps_dec->ser_sub_qmf_dealy_buf_im[i][0][0], 0,
  383|  31.0k|           sizeof(ptr_ps_dec->ser_sub_qmf_dealy_buf_im[i]));
  384|  31.0k|  }
  385|       |
  386|  10.3k|  return 0;
  387|  10.3k|}
ixheaacd_esbr_apply_ps:
  395|  8.20k|                            WORD32 num_time_slot) {
  396|  8.20k|  WORD32 sb;
  397|  8.20k|  WORD32 i, k;
  398|       |
  399|  8.20k|  WORD32 max_num_column;
  400|       |
  401|  8.20k|  if (num_time_slot == 15)
  ------------------
  |  Branch (401:7): [True: 0, False: 8.20k]
  ------------------
  402|      0|    max_num_column = MAX_NUM_COLUMNS_960;
  ------------------
  |  |   25|      0|#define MAX_NUM_COLUMNS_960 30
  ------------------
  403|  8.20k|  else
  404|  8.20k|    max_num_column = MAX_NUM_COLUMNS;
  ------------------
  |  |   23|  8.20k|#define MAX_NUM_COLUMNS 32
  ------------------
  405|       |
  406|  8.20k|  if (ptr_ps_dec->use_34_st_bands) {
  ------------------
  |  Branch (406:7): [True: 0, False: 8.20k]
  ------------------
  407|      0|    ptr_ps_dec->ptr_group_borders = (WORD32 *)&ptr_ps_tables->group_borders_34_tbl[0];
  408|      0|    ptr_ps_dec->ptr_bins_group_map = (WORD32 *)&ptr_ps_tables->bin_group_map_34[0];
  409|      0|    ptr_ps_dec->ptr_hybrid = &ptr_ps_dec->str_flt_hybrid34;
  410|      0|    ptr_ps_dec->num_groups = NUM_IID_GROUPS_HI_RES;
  ------------------
  |  |   45|      0|#define NUM_IID_GROUPS_HI_RES (SUBQMF_GROUPS_HI_RES + QMF_GROUPS_HI_RES)
  |  |  ------------------
  |  |  |  |   38|      0|#define SUBQMF_GROUPS_HI_RES (32)
  |  |  ------------------
  |  |               #define NUM_IID_GROUPS_HI_RES (SUBQMF_GROUPS_HI_RES + QMF_GROUPS_HI_RES)
  |  |  ------------------
  |  |  |  |   39|      0|#define QMF_GROUPS_HI_RES (18)
  |  |  ------------------
  ------------------
  411|      0|    ptr_ps_dec->num_sub_qmf_groups = SUBQMF_GROUPS_HI_RES;
  ------------------
  |  |   38|      0|#define SUBQMF_GROUPS_HI_RES (32)
  ------------------
  412|      0|    ptr_ps_dec->num_bins = NUM_HI_RES_BINS;
  ------------------
  |  |   57|      0|#define NUM_HI_RES_BINS (34)
  ------------------
  413|      0|    ptr_ps_dec->first_delay_gr = SUBQMF_GROUPS_HI_RES;
  ------------------
  |  |   38|      0|#define SUBQMF_GROUPS_HI_RES (32)
  ------------------
  414|  8.20k|  } else {
  415|  8.20k|    ptr_ps_dec->ptr_group_borders = (WORD32 *)&ptr_ps_tables->group_borders_20_tbl[0];
  416|  8.20k|    ptr_ps_dec->ptr_bins_group_map = (WORD32 *)&ptr_ps_tables->bin_group_map_20[0];
  417|  8.20k|    ptr_ps_dec->ptr_hybrid = &ptr_ps_dec->str_flt_hybrid20;
  418|  8.20k|    ptr_ps_dec->num_groups = NUM_IID_GROUPS;
  ------------------
  |  |   42|  8.20k|#define NUM_IID_GROUPS (SUBQMF_GROUPS + QMF_GROUPS)
  |  |  ------------------
  |  |  |  |   26|  8.20k|#define SUBQMF_GROUPS (10)
  |  |  ------------------
  |  |               #define NUM_IID_GROUPS (SUBQMF_GROUPS + QMF_GROUPS)
  |  |  ------------------
  |  |  |  |   27|  8.20k|#define QMF_GROUPS (12)
  |  |  ------------------
  ------------------
  419|  8.20k|    ptr_ps_dec->num_sub_qmf_groups = SUBQMF_GROUPS;
  ------------------
  |  |   26|  8.20k|#define SUBQMF_GROUPS (10)
  ------------------
  420|  8.20k|    ptr_ps_dec->num_bins = NUM_MID_RES_BINS;
  ------------------
  |  |   58|  8.20k|#define NUM_MID_RES_BINS (20)
  ------------------
  421|  8.20k|    ptr_ps_dec->first_delay_gr = SUBQMF_GROUPS;
  ------------------
  |  |   26|  8.20k|#define SUBQMF_GROUPS (10)
  ------------------
  422|  8.20k|  }
  423|       |
  424|   336k|  for (sb = usb; sb < ptr_ps_dec->num_chans; sb++) {
  ------------------
  |  Branch (424:18): [True: 328k, False: 8.20k]
  ------------------
  425|  1.31M|    for (i = 0; i < NUM_SER_AP_LINKS; i++) {
  ------------------
  |  |   25|  1.31M|#define NUM_SER_AP_LINKS 3
  ------------------
  |  Branch (425:17): [True: 984k, False: 328k]
  ------------------
  426|  4.92M|      for (k = 0; k < ptr_ps_dec->delay_sample_ser[i]; k++) {
  ------------------
  |  Branch (426:19): [True: 3.93M, False: 984k]
  ------------------
  427|  3.93M|        ptr_ps_dec->ser_qmf_delay_buf_re[i][k][sb] = 0;
  428|  3.93M|        ptr_ps_dec->ser_qmf_delay_buf_im[i][k][sb] = 0;
  429|  3.93M|      }
  430|   984k|    }
  431|  4.92M|    for (k = 0; k < HIGH_DEL; k++) {
  ------------------
  |  |   33|  4.92M|#define HIGH_DEL 14
  ------------------
  |  Branch (431:17): [True: 4.59M, False: 328k]
  ------------------
  432|  4.59M|      ptr_ps_dec->qmf_delay_buf_re[k][sb] = 0;
  433|  4.59M|      ptr_ps_dec->qmf_delay_buf_im[k][sb] = 0;
  434|  4.59M|    }
  435|   328k|  }
  436|  8.20k|  ixheaacd_hyb_anal((const FLOAT32 **)pp_qmf_buf_re_left,
  437|  8.20k|                    (const FLOAT32 **)pp_qmf_buf_im_left,
  438|  8.20k|                    ptr_ps_dec, ptr_ps_tables, 0);
  439|  8.20k|  ixheaacd_hyb_anal((const FLOAT32 **)pp_qmf_buf_re_left,
  440|  8.20k|                    (const FLOAT32 **)pp_qmf_buf_im_left,
  441|  8.20k|                    ptr_ps_dec, ptr_ps_tables, 1);
  442|       |
  443|  8.20k|  if (!ptr_ps_dec->use_34_st_bands) {
  ------------------
  |  Branch (443:7): [True: 8.20k, False: 0]
  ------------------
  444|  8.20k|    WORD32 k;
  445|   270k|    for (k = 0; k < (WORD32)ptr_ps_dec->num_sub_samples; k++) {
  ------------------
  |  Branch (445:17): [True: 262k, False: 8.20k]
  ------------------
  446|   262k|      ptr_ps_dec->hyb_left_re[k][3] += ptr_ps_dec->hyb_left_re[k][4];
  447|   262k|      ptr_ps_dec->hyb_left_im[k][3] += ptr_ps_dec->hyb_left_im[k][4];
  448|   262k|      ptr_ps_dec->hyb_left_re[k][4] = 0.;
  449|   262k|      ptr_ps_dec->hyb_left_im[k][4] = 0.;
  450|       |
  451|   262k|      ptr_ps_dec->hyb_left_re[k][2] += ptr_ps_dec->hyb_left_re[k][5];
  452|   262k|      ptr_ps_dec->hyb_left_im[k][2] += ptr_ps_dec->hyb_left_im[k][5];
  453|   262k|      ptr_ps_dec->hyb_left_re[k][5] = 0.;
  454|   262k|      ptr_ps_dec->hyb_left_im[k][5] = 0.;
  455|   262k|    }
  456|  8.20k|  }
  457|       |
  458|  8.20k|  if (ptr_ps_dec->ps_mode & 0x0080) {
  ------------------
  |  Branch (458:7): [True: 0, False: 8.20k]
  ------------------
  459|      0|    WORD32 i, j;
  460|      0|    for (i = 0; i < max_num_column; i++) {
  ------------------
  |  Branch (460:17): [True: 0, False: 0]
  ------------------
  461|      0|      for (j = 0; j < NUM_OF_QUAD_MIRROR_FILTER_CHNLS; j++) {
  ------------------
  |  |   26|      0|#define NUM_OF_QUAD_MIRROR_FILTER_CHNLS 64
  ------------------
  |  Branch (461:19): [True: 0, False: 0]
  ------------------
  462|      0|        pp_qmf_buf_im_right[i][j] = pp_qmf_buf_im_left[i][j];
  463|      0|        pp_qmf_buf_re_right[i][j] = pp_qmf_buf_re_left[i][j];
  464|      0|      }
  465|      0|    }
  466|      0|    for (i = 0; i < max_num_column; i++) {
  ------------------
  |  Branch (466:17): [True: 0, False: 0]
  ------------------
  467|      0|      for (j = 0; j < NUM_SUB_QMF_CHANNELS_HI_RES; j++) {
  ------------------
  |  |   49|      0|#define NUM_SUB_QMF_CHANNELS_HI_RES 32
  ------------------
  |  Branch (467:19): [True: 0, False: 0]
  ------------------
  468|      0|        ptr_ps_dec->hyb_right_re[i][j] = ptr_ps_dec->hyb_left_re[i][j];
  469|      0|        ptr_ps_dec->hyb_right_im[i][j] = ptr_ps_dec->hyb_left_im[i][j];
  470|      0|      }
  471|      0|    }
  472|  8.20k|  } else {
  473|  8.20k|    if (ptr_ps_dec->ps_mode & 0x0002) {
  ------------------
  |  Branch (473:9): [True: 0, False: 8.20k]
  ------------------
  474|      0|      WORD32 i, j;
  475|      0|      for (i = 0; i < max_num_column; i++) {
  ------------------
  |  Branch (475:19): [True: 0, False: 0]
  ------------------
  476|      0|        for (j = 0; j < NUM_OF_QUAD_MIRROR_FILTER_CHNLS; j++) {
  ------------------
  |  |   26|      0|#define NUM_OF_QUAD_MIRROR_FILTER_CHNLS 64
  ------------------
  |  Branch (476:21): [True: 0, False: 0]
  ------------------
  477|      0|          pp_qmf_buf_im_right[i][j] = 0.;
  478|      0|          pp_qmf_buf_re_right[i][j] = 0.;
  479|      0|        }
  480|      0|      }
  481|      0|      for (i = 0; i < max_num_column; i++) {
  ------------------
  |  Branch (481:19): [True: 0, False: 0]
  ------------------
  482|      0|        for (j = 0; j < NUM_SUB_QMF_CHANNELS_HI_RES; j++) {
  ------------------
  |  |   49|      0|#define NUM_SUB_QMF_CHANNELS_HI_RES 32
  ------------------
  |  Branch (482:21): [True: 0, False: 0]
  ------------------
  483|      0|          ptr_ps_dec->hyb_right_re[i][j] = 0.;
  484|      0|          ptr_ps_dec->hyb_right_im[i][j] = 0.;
  485|      0|        }
  486|      0|      }
  487|  8.20k|    } else {
  488|  8.20k|      ixheaacd_esbr_ps_de_correlate(ptr_ps_dec, pp_qmf_buf_re_left, pp_qmf_buf_im_left,
  489|  8.20k|                                    pp_qmf_buf_re_right, pp_qmf_buf_im_right,
  490|  8.20k|                                    ptr_ps_tables);
  491|  8.20k|    }
  492|       |
  493|  8.20k|    if (!(ptr_ps_dec->ps_mode & 0x0040)) {
  ------------------
  |  Branch (493:9): [True: 8.20k, False: 0]
  ------------------
  494|  8.20k|      ixheaacd_esbr_ps_apply_rotation(ptr_ps_dec, pp_qmf_buf_re_left, pp_qmf_buf_im_left,
  495|  8.20k|                                      pp_qmf_buf_re_right, pp_qmf_buf_im_right,
  496|  8.20k|                                      ptr_ps_tables);
  497|  8.20k|    }
  498|  8.20k|  }
  499|       |
  500|  8.20k|  ixheaacd_hyb_synth(ptr_ps_dec->hyb_left_re, ptr_ps_dec->hyb_left_im,
  501|  8.20k|                     pp_qmf_buf_re_left, pp_qmf_buf_im_left, ptr_ps_dec->ptr_hybrid);
  502|       |
  503|  8.20k|  ixheaacd_hyb_synth(ptr_ps_dec->hyb_right_re, ptr_ps_dec->hyb_right_im,
  504|  8.20k|                     pp_qmf_buf_re_right, pp_qmf_buf_im_right, ptr_ps_dec->ptr_hybrid);
  505|       |
  506|  8.20k|  ptr_ps_dec->use_34_st_bands_prev = ptr_ps_dec->use_34_st_bands;
  507|       |
  508|  8.20k|}
ixheaacd_esbr_ps_de_correlate:
  516|  8.20k|    ia_ps_tables_struct *ptr_ps_tables) {
  517|  8.20k|  WORD32 sb, maxsb, gr, k;
  518|  8.20k|  WORD32 m;
  519|  8.20k|  WORD32 l_delay = 0;
  520|  8.20k|  WORD32 l_ser_delay_arr[NUM_SER_AP_LINKS] = {0};
  521|  8.20k|  FLOAT32 re_left;
  522|  8.20k|  FLOAT32 im_left;
  523|  8.20k|  FLOAT32 peak_diff, nrg, trans_ratio;
  524|       |
  525|  8.20k|  FLOAT32(*pp_hyb_left_re)[MAX_NUM_COLUMNS];
  526|  8.20k|  FLOAT32(*pp_hyb_left_im)[MAX_NUM_COLUMNS];
  527|  8.20k|  FLOAT32(*pp_hyb_right_re)[MAX_NUM_COLUMNS];
  528|  8.20k|  FLOAT32(*pp_hyb_right_im)[MAX_NUM_COLUMNS];
  529|       |
  530|  8.20k|  FLOAT32(*ppp_ser_sub_qmf_dealy_buf_re)[5][NUM_OF_QUAD_MIRROR_FILTER_CHNLS];
  531|  8.20k|  FLOAT32(*ppp_ser_sub_qmf_dealy_buf_im)[5][NUM_OF_QUAD_MIRROR_FILTER_CHNLS];
  532|  8.20k|  FLOAT32(*pp_sub_qmf_delay_buf_re)[NUM_OF_QUAD_MIRROR_FILTER_CHNLS];
  533|  8.20k|  FLOAT32(*pp_sub_qmf_delay_buf_im)[NUM_OF_QUAD_MIRROR_FILTER_CHNLS];
  534|       |
  535|  8.20k|  FLOAT32 *pp_frac_delay_phase_fac_re;
  536|  8.20k|  FLOAT32 *pp_frac_delay_phase_fac_im;
  537|  8.20k|  FLOAT32(*pp_frac_delay_phase_fac_ser_re)[NUM_SER_AP_LINKS];
  538|  8.20k|  FLOAT32(*pp_frac_delay_phase_fac_ser_im)[NUM_SER_AP_LINKS];
  539|       |
  540|  8.20k|  WORD32 *p_delay_qmf_delay_num_samp = NULL;
  541|  8.20k|  WORD32 *p_delay_qmf_delay_buf_idx = NULL;
  542|       |
  543|  8.20k|  FLOAT32 pow_arr[32][NUM_HI_RES_BINS];
  544|  8.20k|  FLOAT32 trans_ratio_arr[32][NUM_HI_RES_BINS];
  545|  8.20k|  WORD32 bin;
  546|  8.20k|  FLOAT32 decay_cutoff;
  547|       |
  548|  8.20k|  pp_hyb_left_re = ptr_ps_dec->hyb_left_re;
  549|  8.20k|  pp_hyb_left_im = ptr_ps_dec->hyb_left_im;
  550|  8.20k|  pp_hyb_right_re = ptr_ps_dec->hyb_right_re;
  551|  8.20k|  pp_hyb_right_im = ptr_ps_dec->hyb_right_im;
  552|       |
  553|  8.20k|  ppp_ser_sub_qmf_dealy_buf_re = ptr_ps_dec->ser_sub_qmf_dealy_buf_re;
  554|  8.20k|  ppp_ser_sub_qmf_dealy_buf_im = ptr_ps_dec->ser_sub_qmf_dealy_buf_im;
  555|       |
  556|  8.20k|  pp_sub_qmf_delay_buf_re = ptr_ps_dec->sub_qmf_delay_buf_re;
  557|  8.20k|  pp_sub_qmf_delay_buf_im = ptr_ps_dec->sub_qmf_delay_buf_im;
  558|       |
  559|  8.20k|  if (ptr_ps_dec->use_34_st_bands != ptr_ps_dec->use_34_st_bands_prev) {
  ------------------
  |  Branch (559:7): [True: 0, False: 8.20k]
  ------------------
  560|      0|    if (ptr_ps_dec->use_34_st_bands) {
  ------------------
  |  Branch (560:9): [True: 0, False: 0]
  ------------------
  561|      0|      WORD32 i;
  562|      0|      for (i = 0; i < NUM_SER_AP_LINKS; i++) {
  ------------------
  |  |   25|      0|#define NUM_SER_AP_LINKS 3
  ------------------
  |  Branch (562:19): [True: 0, False: 0]
  ------------------
  563|      0|        memset(&ptr_ps_dec->ser_qmf_delay_buf_re[i][0][0], 0,
  564|      0|               sizeof(ptr_ps_dec->ser_qmf_delay_buf_re[i]));
  565|      0|        memset(&ptr_ps_dec->ser_qmf_delay_buf_im[i][0][0], 0,
  566|      0|               sizeof(ptr_ps_dec->ser_qmf_delay_buf_im[i]));
  567|      0|        memset(&ptr_ps_dec->ser_sub_qmf_dealy_buf_re[i][0][0], 0,
  568|      0|               sizeof(ptr_ps_dec->ser_sub_qmf_dealy_buf_re[i]));
  569|      0|        memset(&ptr_ps_dec->ser_sub_qmf_dealy_buf_im[i][0][0], 0,
  570|      0|               sizeof(ptr_ps_dec->ser_sub_qmf_dealy_buf_im[i]));
  571|      0|      }
  572|      0|      return;
  573|      0|    } else {
  574|      0|      WORD32 i;
  575|      0|      for (i = 0; i < NUM_SER_AP_LINKS; i++) {
  ------------------
  |  |   25|      0|#define NUM_SER_AP_LINKS 3
  ------------------
  |  Branch (575:19): [True: 0, False: 0]
  ------------------
  576|      0|        memset(&ptr_ps_dec->ser_qmf_delay_buf_re[i][0][0], 0,
  577|      0|               sizeof(ptr_ps_dec->ser_qmf_delay_buf_re[i]));
  578|      0|        memset(&ptr_ps_dec->ser_qmf_delay_buf_im[i][0][0], 0,
  579|      0|               sizeof(ptr_ps_dec->ser_qmf_delay_buf_im[i]));
  580|      0|        memset(&ptr_ps_dec->ser_sub_qmf_dealy_buf_re[i][0][0], 0,
  581|      0|               sizeof(ptr_ps_dec->ser_sub_qmf_dealy_buf_re[i]));
  582|      0|        memset(&ptr_ps_dec->ser_sub_qmf_dealy_buf_im[i][0][0], 0,
  583|      0|               sizeof(ptr_ps_dec->ser_sub_qmf_dealy_buf_im[i]));
  584|      0|      }
  585|       |
  586|      0|      return;
  587|      0|    }
  588|      0|  }
  589|       |
  590|  8.20k|  if (ptr_ps_dec->use_34_st_bands) {
  ------------------
  |  Branch (590:7): [True: 0, False: 8.20k]
  ------------------
  591|      0|    pp_frac_delay_phase_fac_re = ptr_ps_tables->frac_delay_phase_fac_qmf_sub_re_34;
  592|      0|    pp_frac_delay_phase_fac_im = ptr_ps_tables->frac_delay_phase_fac_qmf_sub_im_34;
  593|      0|    pp_frac_delay_phase_fac_ser_re = ptr_ps_tables->frac_delay_phase_fac_ser_qmf_sub_re_34;
  594|      0|    pp_frac_delay_phase_fac_ser_im = ptr_ps_tables->frac_delay_phase_fac_ser_qmf_sub_im_34;
  595|  8.20k|  } else {
  596|  8.20k|    pp_frac_delay_phase_fac_re = ptr_ps_tables->frac_delay_phase_fac_qmf_sub_re_20;
  597|  8.20k|    pp_frac_delay_phase_fac_im = ptr_ps_tables->frac_delay_phase_fac_qmf_sub_im_20;
  598|  8.20k|    pp_frac_delay_phase_fac_ser_re = ptr_ps_tables->frac_delay_phase_fac_ser_qmf_sub_re_20;
  599|  8.20k|    pp_frac_delay_phase_fac_ser_im = ptr_ps_tables->frac_delay_phase_fac_ser_qmf_sub_im_20;
  600|  8.20k|  }
  601|       |
  602|   270k|  for (k = 0; k < 32; k++) {
  ------------------
  |  Branch (602:15): [True: 262k, False: 8.20k]
  ------------------
  603|  9.19M|    for (bin = 0; bin < NUM_HI_RES_BINS; bin++) {
  ------------------
  |  |   57|  9.19M|#define NUM_HI_RES_BINS (34)
  ------------------
  |  Branch (603:19): [True: 8.92M, False: 262k]
  ------------------
  604|  8.92M|      pow_arr[k][bin] = 0;
  605|  8.92M|    }
  606|   262k|  }
  607|       |
  608|  90.2k|  for (gr = 0; gr < ptr_ps_dec->num_sub_qmf_groups; gr++) {
  ------------------
  |  Branch (608:16): [True: 82.0k, False: 8.20k]
  ------------------
  609|  82.0k|    bin = (~NEGATE_IPD_MASK) & ptr_ps_dec->ptr_bins_group_map[gr];
  ------------------
  |  |   77|  82.0k|#define NEGATE_IPD_MASK (0x00001000)
  ------------------
  610|  82.0k|    maxsb = ptr_ps_dec->ptr_group_borders[gr] + 1;
  611|   164k|    for (sb = ptr_ps_dec->ptr_group_borders[gr]; sb < maxsb; sb++) {
  ------------------
  |  Branch (611:50): [True: 82.0k, False: 82.0k]
  ------------------
  612|  82.0k|      for (k = ptr_ps_dec->border_position[0];
  613|  2.70M|           k < ptr_ps_dec->border_position[ptr_ps_dec->num_env]; k++) {
  ------------------
  |  Branch (613:12): [True: 2.62M, False: 82.0k]
  ------------------
  614|  2.62M|        im_left = pp_hyb_left_re[k][sb];
  615|  2.62M|        re_left = pp_hyb_left_im[k][sb];
  616|  2.62M|        pow_arr[k][bin] += im_left * im_left + re_left * re_left;
  617|  2.62M|      }
  618|  82.0k|    }
  619|  82.0k|  }
  620|   106k|  for (; gr < ptr_ps_dec->num_groups; gr++) {
  ------------------
  |  Branch (620:10): [True: 98.4k, False: 8.20k]
  ------------------
  621|  98.4k|    bin = (~NEGATE_IPD_MASK) & ptr_ps_dec->ptr_bins_group_map[gr];
  ------------------
  |  |   77|  98.4k|#define NEGATE_IPD_MASK (0x00001000)
  ------------------
  622|  98.4k|    maxsb = ptr_ps_dec->ptr_group_borders[gr + 1];
  623|   599k|    for (sb = ptr_ps_dec->ptr_group_borders[gr]; sb < maxsb; sb++) {
  ------------------
  |  Branch (623:50): [True: 500k, False: 98.4k]
  ------------------
  624|   500k|      for (k = ptr_ps_dec->border_position[0];
  625|  16.5M|           k < ptr_ps_dec->border_position[ptr_ps_dec->num_env]; k++) {
  ------------------
  |  Branch (625:12): [True: 16.0M, False: 500k]
  ------------------
  626|  16.0M|        im_left = pp_qmf_buf_re_left[k][sb];
  627|  16.0M|        re_left = pp_qmf_buf_im_left[k][sb];
  628|  16.0M|        pow_arr[k][bin] += im_left * im_left + re_left * re_left;
  629|  16.0M|      }
  630|   500k|    }
  631|  98.4k|  }
  632|       |
  633|   172k|  for (bin = 0; bin < ptr_ps_dec->num_bins; bin++) {
  ------------------
  |  Branch (633:17): [True: 164k, False: 8.20k]
  ------------------
  634|   164k|    for (k = ptr_ps_dec->border_position[0];
  635|  5.41M|         k < ptr_ps_dec->border_position[ptr_ps_dec->num_env]; k++) {
  ------------------
  |  Branch (635:10): [True: 5.25M, False: 164k]
  ------------------
  636|  5.25M|      FLOAT32 q = 1.5f;
  637|       |
  638|  5.25M|      ptr_ps_dec->peak_decay_fast_bin[bin] *= PEAK_DECAY_FACTOR_FAST;
  ------------------
  |  |   91|  5.25M|#define PEAK_DECAY_FACTOR_FAST (0.765928338364649f)
  ------------------
  639|  5.25M|      if (ptr_ps_dec->peak_decay_fast_bin[bin] < pow_arr[k][bin])
  ------------------
  |  Branch (639:11): [True: 162k, False: 5.08M]
  ------------------
  640|   162k|        ptr_ps_dec->peak_decay_fast_bin[bin] = pow_arr[k][bin];
  641|       |
  642|  5.25M|      peak_diff = ptr_ps_dec->prev_peak_diff_bin[bin];
  643|  5.25M|      peak_diff += INIT_FILT_COEFF * (ptr_ps_dec->peak_decay_fast_bin[bin] -
  ------------------
  |  |   50|  5.25M|#define INIT_FILT_COEFF (1.0f - NRG_INT_COEFF)
  |  |  ------------------
  |  |  |  |   49|  5.25M|#define NRG_INT_COEFF 0.75f
  |  |  ------------------
  ------------------
  644|  5.25M|                                      pow_arr[k][bin] -
  645|  5.25M|                                      ptr_ps_dec->prev_peak_diff_bin[bin]);
  646|  5.25M|      ptr_ps_dec->prev_peak_diff_bin[bin] = peak_diff;
  647|       |
  648|  5.25M|      nrg = ptr_ps_dec->prev_nrg_bin[bin];
  649|  5.25M|      nrg += INIT_FILT_COEFF * (pow_arr[k][bin] - ptr_ps_dec->prev_nrg_bin[bin]);
  ------------------
  |  |   50|  5.25M|#define INIT_FILT_COEFF (1.0f - NRG_INT_COEFF)
  |  |  ------------------
  |  |  |  |   49|  5.25M|#define NRG_INT_COEFF 0.75f
  |  |  ------------------
  ------------------
  650|  5.25M|      ptr_ps_dec->prev_nrg_bin[bin] = nrg;
  651|  5.25M|      if (q * peak_diff <= nrg) {
  ------------------
  |  Branch (651:11): [True: 4.79M, False: 458k]
  ------------------
  652|  4.79M|        trans_ratio_arr[k][bin] = 1.0f;
  653|  4.79M|      } else {
  654|   458k|        trans_ratio_arr[k][bin] = nrg / (q * peak_diff);
  655|   458k|      }
  656|  5.25M|    }
  657|   164k|  }
  658|       |
  659|  8.20k|  if (ptr_ps_dec->use_34_st_bands) {
  ------------------
  |  Branch (659:7): [True: 0, False: 8.20k]
  ------------------
  660|      0|    decay_cutoff = DECAY_CUTOFF_HI_RES;
  ------------------
  |  |   80|      0|#define DECAY_CUTOFF_HI_RES 5
  ------------------
  661|  8.20k|  } else {
  662|  8.20k|    decay_cutoff = DECAY_CUTOFF;
  ------------------
  |  |   79|  8.20k|#define DECAY_CUTOFF 3
  ------------------
  663|  8.20k|  }
  664|       |
  665|  90.2k|  for (gr = 0; gr < ptr_ps_dec->num_sub_qmf_groups; gr++) {
  ------------------
  |  Branch (665:16): [True: 82.0k, False: 8.20k]
  ------------------
  666|  82.0k|    maxsb = ptr_ps_dec->ptr_group_borders[gr] + 1;
  667|       |
  668|   164k|    for (sb = ptr_ps_dec->ptr_group_borders[gr]; sb < maxsb; sb++) {
  ------------------
  |  Branch (668:50): [True: 82.0k, False: 82.0k]
  ------------------
  669|  82.0k|      FLOAT32 decay_scale_factor;
  670|       |
  671|  82.0k|      decay_scale_factor = 1.0f;
  672|       |
  673|  82.0k|      decay_scale_factor = max(decay_scale_factor, 0.0f);
  ------------------
  |  |   74|  82.0k|#define max(a, b) (((a) > (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (74:20): [True: 82.0k, False: 0]
  |  |  ------------------
  ------------------
  674|       |
  675|  82.0k|      l_delay = ptr_ps_dec->delay_buf_idx;
  676|   328k|      for (k = 0; k < NUM_SER_AP_LINKS; k++)
  ------------------
  |  |   25|   328k|#define NUM_SER_AP_LINKS 3
  ------------------
  |  Branch (676:19): [True: 246k, False: 82.0k]
  ------------------
  677|   246k|        l_ser_delay_arr[k] = ptr_ps_dec->delay_buf_idx_ser[k];
  678|       |
  679|  82.0k|      for (k = ptr_ps_dec->border_position[0];
  680|  2.70M|           k < ptr_ps_dec->border_position[ptr_ps_dec->num_env]; k++) {
  ------------------
  |  Branch (680:12): [True: 2.62M, False: 82.0k]
  ------------------
  681|  2.62M|        FLOAT32 real, imag, real0, imag0, r_r0, i_r0;
  682|       |
  683|  2.62M|        im_left = pp_hyb_left_re[k][sb];
  684|  2.62M|        re_left = pp_hyb_left_im[k][sb];
  685|       |
  686|  2.62M|        {
  687|  2.62M|          real0 = pp_sub_qmf_delay_buf_re[l_delay][sb];
  688|  2.62M|          imag0 = pp_sub_qmf_delay_buf_im[l_delay][sb];
  689|  2.62M|          pp_sub_qmf_delay_buf_re[l_delay][sb] = im_left;
  690|  2.62M|          pp_sub_qmf_delay_buf_im[l_delay][sb] = re_left;
  691|       |
  692|  2.62M|          real = real0 * pp_frac_delay_phase_fac_re[sb] - imag0 *
  693|  2.62M|                 pp_frac_delay_phase_fac_im[sb];
  694|  2.62M|          imag = real0 * pp_frac_delay_phase_fac_im[sb] + imag0 *
  695|  2.62M|                 pp_frac_delay_phase_fac_re[sb];
  696|       |
  697|  2.62M|          r_r0 = real;
  698|  2.62M|          i_r0 = imag;
  699|  10.5M|          for (m = 0; m < NUM_SER_AP_LINKS; m++) {
  ------------------
  |  |   25|  10.5M|#define NUM_SER_AP_LINKS 3
  ------------------
  |  Branch (699:23): [True: 7.87M, False: 2.62M]
  ------------------
  700|  7.87M|            real0 = ppp_ser_sub_qmf_dealy_buf_re[m][l_ser_delay_arr[m]][sb];
  701|  7.87M|            imag0 = ppp_ser_sub_qmf_dealy_buf_im[m][l_ser_delay_arr[m]][sb];
  702|  7.87M|            real = real0 * pp_frac_delay_phase_fac_ser_re[sb][m] -
  703|  7.87M|                   imag0 * pp_frac_delay_phase_fac_ser_im[sb][m];
  704|  7.87M|            imag = real0 * pp_frac_delay_phase_fac_ser_im[sb][m] +
  705|  7.87M|                   imag0 * pp_frac_delay_phase_fac_ser_re[sb][m];
  706|       |
  707|  7.87M|            real += -decay_scale_factor * ptr_ps_tables->all_pass_link_decay_ser[m] * r_r0;
  708|  7.87M|            imag += -decay_scale_factor * ptr_ps_tables->all_pass_link_decay_ser[m] * i_r0;
  709|  7.87M|            ppp_ser_sub_qmf_dealy_buf_re[m][l_ser_delay_arr[m]][sb] =
  710|  7.87M|                r_r0 + decay_scale_factor * ptr_ps_tables->all_pass_link_decay_ser[m] * real;
  711|  7.87M|            ppp_ser_sub_qmf_dealy_buf_im[m][l_ser_delay_arr[m]][sb] =
  712|  7.87M|                i_r0 + decay_scale_factor * ptr_ps_tables->all_pass_link_decay_ser[m] * imag;
  713|  7.87M|            r_r0 = real;
  714|  7.87M|            i_r0 = imag;
  715|  7.87M|          }
  716|  2.62M|        }
  717|       |
  718|  2.62M|        bin = (~NEGATE_IPD_MASK) & ptr_ps_dec->ptr_bins_group_map[gr];
  ------------------
  |  |   77|  2.62M|#define NEGATE_IPD_MASK (0x00001000)
  ------------------
  719|  2.62M|        trans_ratio = trans_ratio_arr[k][bin];
  720|       |
  721|  2.62M|        pp_hyb_right_re[k][sb] = trans_ratio * r_r0;
  722|  2.62M|        pp_hyb_right_im[k][sb] = trans_ratio * i_r0;
  723|       |
  724|  2.62M|        if (++l_delay >= DEL_ALL_PASS) l_delay = 0;
  ------------------
  |  |   30|  2.62M|#define DEL_ALL_PASS 2
  ------------------
  |  Branch (724:13): [True: 1.31M, False: 1.31M]
  ------------------
  725|       |
  726|  10.5M|        for (m = 0; m < NUM_SER_AP_LINKS; m++) {
  ------------------
  |  |   25|  10.5M|#define NUM_SER_AP_LINKS 3
  ------------------
  |  Branch (726:21): [True: 7.87M, False: 2.62M]
  ------------------
  727|  7.87M|          if (++l_ser_delay_arr[m] >= ptr_ps_dec->delay_sample_ser[m]) {
  ------------------
  |  Branch (727:15): [True: 2.05M, False: 5.82M]
  ------------------
  728|  2.05M|            l_ser_delay_arr[m] = 0;
  729|  2.05M|          }
  730|  7.87M|        }
  731|  2.62M|      }
  732|  82.0k|    }
  733|  82.0k|  }
  734|  8.20k|  {
  735|  8.20k|    ppp_ser_sub_qmf_dealy_buf_re = ptr_ps_dec->ser_qmf_delay_buf_re;
  736|  8.20k|    ppp_ser_sub_qmf_dealy_buf_im = ptr_ps_dec->ser_qmf_delay_buf_im;
  737|       |
  738|  8.20k|    pp_sub_qmf_delay_buf_re = ptr_ps_dec->qmf_delay_buf_re;
  739|  8.20k|    pp_sub_qmf_delay_buf_im = ptr_ps_dec->qmf_delay_buf_im;
  740|       |
  741|  8.20k|    pp_frac_delay_phase_fac_re = ptr_ps_tables->qmf_fract_delay_phase_factor_re;
  742|  8.20k|    pp_frac_delay_phase_fac_im = ptr_ps_tables->qmf_fract_delay_phase_factor_im;
  743|       |
  744|  8.20k|    pp_frac_delay_phase_fac_ser_re = ptr_ps_tables->qmf_ser_fract_delay_phase_factor_re;
  745|  8.20k|    pp_frac_delay_phase_fac_ser_im = ptr_ps_tables->qmf_ser_fract_delay_phase_factor_im;
  746|       |
  747|  8.20k|    p_delay_qmf_delay_buf_idx = ptr_ps_dec->delay_qmf_delay_buf_idx;
  748|  8.20k|    p_delay_qmf_delay_num_samp = ptr_ps_dec->delay_qmf_delay_num_samp;
  749|  8.20k|  }
  750|   106k|  for (; gr < ptr_ps_dec->num_groups; gr++) {
  ------------------
  |  Branch (750:10): [True: 98.4k, False: 8.20k]
  ------------------
  751|  98.4k|    maxsb = ptr_ps_dec->ptr_group_borders[gr + 1];
  752|       |
  753|   599k|    for (sb = ptr_ps_dec->ptr_group_borders[gr]; sb < maxsb; sb++) {
  ------------------
  |  Branch (753:50): [True: 500k, False: 98.4k]
  ------------------
  754|   500k|      FLOAT32 decay_scale_factor;
  755|   500k|      if (sb <= decay_cutoff)
  ------------------
  |  Branch (755:11): [True: 8.20k, False: 492k]
  ------------------
  756|  8.20k|        decay_scale_factor = 1.0f;
  757|   492k|      else
  758|   492k|        decay_scale_factor = 1.0f + decay_cutoff * DECAY_SLOPE - DECAY_SLOPE * sb;
  ------------------
  |  |   81|   492k|#define DECAY_SLOPE 0.05f
  ------------------
                      decay_scale_factor = 1.0f + decay_cutoff * DECAY_SLOPE - DECAY_SLOPE * sb;
  ------------------
  |  |   81|   492k|#define DECAY_SLOPE 0.05f
  ------------------
  759|       |
  760|   500k|      decay_scale_factor = max(decay_scale_factor, 0.0f);
  ------------------
  |  |   74|   500k|#define max(a, b) (((a) > (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (74:20): [True: 164k, False: 336k]
  |  |  ------------------
  ------------------
  761|       |
  762|   500k|      l_delay = ptr_ps_dec->delay_buf_idx;
  763|  2.00M|      for (k = 0; k < NUM_SER_AP_LINKS; k++)
  ------------------
  |  |   25|  2.00M|#define NUM_SER_AP_LINKS 3
  ------------------
  |  Branch (763:19): [True: 1.50M, False: 500k]
  ------------------
  764|  1.50M|        l_ser_delay_arr[k] = ptr_ps_dec->delay_buf_idx_ser[k];
  765|       |
  766|   500k|      for (k = ptr_ps_dec->border_position[0];
  767|  16.5M|           k < ptr_ps_dec->border_position[ptr_ps_dec->num_env]; k++) {
  ------------------
  |  Branch (767:12): [True: 16.0M, False: 500k]
  ------------------
  768|  16.0M|        FLOAT32 real, imag, real0, imag0, r_r0, i_r0;
  769|       |
  770|  16.0M|        im_left = pp_qmf_buf_re_left[k][sb];
  771|  16.0M|        re_left = pp_qmf_buf_im_left[k][sb];
  772|       |
  773|  16.0M|        if (gr >= ptr_ps_dec->first_delay_gr && sb >= NUM_OF_ALL_PASS_CHNLS) {
  ------------------
  |  |   27|  16.0M|#define NUM_OF_ALL_PASS_CHNLS 23
  ------------------
  |  Branch (773:13): [True: 16.0M, False: 0]
  |  Branch (773:49): [True: 10.7M, False: 5.25M]
  ------------------
  774|  10.7M|          real = pp_sub_qmf_delay_buf_re[p_delay_qmf_delay_buf_idx[sb]][sb];
  775|  10.7M|          imag = pp_sub_qmf_delay_buf_im[p_delay_qmf_delay_buf_idx[sb]][sb];
  776|  10.7M|          r_r0 = real;
  777|  10.7M|          i_r0 = imag;
  778|  10.7M|          pp_sub_qmf_delay_buf_re[p_delay_qmf_delay_buf_idx[sb]][sb] = im_left;
  779|  10.7M|          pp_sub_qmf_delay_buf_im[p_delay_qmf_delay_buf_idx[sb]][sb] = re_left;
  780|  10.7M|        } else {
  781|  5.25M|          real0 = pp_sub_qmf_delay_buf_re[l_delay][sb];
  782|  5.25M|          imag0 = pp_sub_qmf_delay_buf_im[l_delay][sb];
  783|  5.25M|          pp_sub_qmf_delay_buf_re[l_delay][sb] = im_left;
  784|  5.25M|          pp_sub_qmf_delay_buf_im[l_delay][sb] = re_left;
  785|       |
  786|  5.25M|          real = real0 * pp_frac_delay_phase_fac_re[sb] - imag0 *
  787|  5.25M|                 pp_frac_delay_phase_fac_im[sb];
  788|  5.25M|          imag = real0 * pp_frac_delay_phase_fac_im[sb] + imag0 *
  789|  5.25M|                 pp_frac_delay_phase_fac_re[sb];
  790|       |
  791|  5.25M|          r_r0 = real;
  792|  5.25M|          i_r0 = imag;
  793|  21.0M|          for (m = 0; m < NUM_SER_AP_LINKS; m++) {
  ------------------
  |  |   25|  21.0M|#define NUM_SER_AP_LINKS 3
  ------------------
  |  Branch (793:23): [True: 15.7M, False: 5.25M]
  ------------------
  794|  15.7M|            real0 = ppp_ser_sub_qmf_dealy_buf_re[m][l_ser_delay_arr[m]][sb];
  795|  15.7M|            imag0 = ppp_ser_sub_qmf_dealy_buf_im[m][l_ser_delay_arr[m]][sb];
  796|  15.7M|            real = real0 * pp_frac_delay_phase_fac_ser_re[sb][m] -
  797|  15.7M|                   imag0 * pp_frac_delay_phase_fac_ser_im[sb][m];
  798|  15.7M|            imag = real0 * pp_frac_delay_phase_fac_ser_im[sb][m] +
  799|  15.7M|                   imag0 * pp_frac_delay_phase_fac_ser_re[sb][m];
  800|       |
  801|  15.7M|            real += -decay_scale_factor * ptr_ps_tables->all_pass_link_decay_ser[m] * r_r0;
  802|  15.7M|            imag += -decay_scale_factor * ptr_ps_tables->all_pass_link_decay_ser[m] * i_r0;
  803|  15.7M|            ppp_ser_sub_qmf_dealy_buf_re[m][l_ser_delay_arr[m]][sb] =
  804|  15.7M|                r_r0 + decay_scale_factor * ptr_ps_tables->all_pass_link_decay_ser[m] * real;
  805|  15.7M|            ppp_ser_sub_qmf_dealy_buf_im[m][l_ser_delay_arr[m]][sb] =
  806|  15.7M|                i_r0 + decay_scale_factor * ptr_ps_tables->all_pass_link_decay_ser[m] * imag;
  807|  15.7M|            r_r0 = real;
  808|  15.7M|            i_r0 = imag;
  809|  15.7M|          }
  810|  5.25M|        }
  811|       |
  812|  16.0M|        bin = (~NEGATE_IPD_MASK) & ptr_ps_dec->ptr_bins_group_map[gr];
  ------------------
  |  |   77|  16.0M|#define NEGATE_IPD_MASK (0x00001000)
  ------------------
  813|  16.0M|        trans_ratio = trans_ratio_arr[k][bin];
  814|       |
  815|  16.0M|        pp_qmf_buf_re_right[k][sb] = trans_ratio * r_r0;
  816|  16.0M|        pp_qmf_buf_im_right[k][sb] = trans_ratio * i_r0;
  817|       |
  818|  16.0M|        if (++l_delay >= DEL_ALL_PASS) l_delay = 0;
  ------------------
  |  |   30|  16.0M|#define DEL_ALL_PASS 2
  ------------------
  |  Branch (818:13): [True: 8.00M, False: 8.00M]
  ------------------
  819|       |
  820|  16.0M|        if (gr >= ptr_ps_dec->first_delay_gr && sb >= NUM_OF_ALL_PASS_CHNLS) {
  ------------------
  |  |   27|  16.0M|#define NUM_OF_ALL_PASS_CHNLS 23
  ------------------
  |  Branch (820:13): [True: 16.0M, False: 0]
  |  Branch (820:49): [True: 10.7M, False: 5.25M]
  ------------------
  821|  10.7M|          if (++p_delay_qmf_delay_buf_idx[sb] >= p_delay_qmf_delay_num_samp[sb]) {
  ------------------
  |  Branch (821:15): [True: 7.83M, False: 2.92M]
  ------------------
  822|  7.83M|            p_delay_qmf_delay_buf_idx[sb] = 0;
  823|  7.83M|          }
  824|  10.7M|        }
  825|       |
  826|  64.0M|        for (m = 0; m < NUM_SER_AP_LINKS; m++) {
  ------------------
  |  |   25|  64.0M|#define NUM_SER_AP_LINKS 3
  ------------------
  |  Branch (826:21): [True: 48.0M, False: 16.0M]
  ------------------
  827|  48.0M|          if (++l_ser_delay_arr[m] >= ptr_ps_dec->delay_sample_ser[m]) {
  ------------------
  |  Branch (827:15): [True: 12.5M, False: 35.5M]
  ------------------
  828|  12.5M|            l_ser_delay_arr[m] = 0;
  829|  12.5M|          }
  830|  48.0M|        }
  831|  16.0M|      }
  832|   500k|    }
  833|  98.4k|  }
  834|       |
  835|  8.20k|  ptr_ps_dec->delay_buf_idx = l_delay;
  836|  32.8k|  for (m = 0; m < NUM_SER_AP_LINKS; m++) {
  ------------------
  |  |   25|  32.8k|#define NUM_SER_AP_LINKS 3
  ------------------
  |  Branch (836:15): [True: 24.6k, False: 8.20k]
  ------------------
  837|  24.6k|    ptr_ps_dec->delay_buf_idx_ser[m] = l_ser_delay_arr[m];
  838|  24.6k|  }
  839|  8.20k|}
ixheaacd_esbr_ps_apply_rotation:
  847|  8.20k|    ia_ps_tables_struct *ptr_ps_tables) {
  848|  8.20k|  WORD32 i;
  849|  8.20k|  WORD32 group;
  850|  8.20k|  WORD32 bin = 0;
  851|  8.20k|  WORD32 subband, max_subband;
  852|  8.20k|  WORD32 env;
  853|  8.20k|  FLOAT32(*p_hyb_left_re)[MAX_NUM_COLUMNS];
  854|  8.20k|  FLOAT32(*p_hyb_left_im)[MAX_NUM_COLUMNS];
  855|  8.20k|  FLOAT32(*p_hyb_rigth_re)[MAX_NUM_COLUMNS];
  856|  8.20k|  FLOAT32(*p_hyb_rigth_im)[MAX_NUM_COLUMNS];
  857|  8.20k|  FLOAT32 scale_fac_l, scale_fac_r;
  858|  8.20k|  FLOAT32 alpha, beta;
  859|  8.20k|  FLOAT32 ipd, opd;
  860|  8.20k|  FLOAT32 ipd1, opd1;
  861|  8.20k|  FLOAT32 ipd2, opd2;
  862|       |
  863|  8.20k|  FLOAT32 h11r, h12r, h21r, h22r;
  864|  8.20k|  FLOAT32 h11i, h12i, h21i, h22i;
  865|  8.20k|  FLOAT32 H11r, H12r, H21r, H22r;
  866|  8.20k|  FLOAT32 H11i, H12i, H21i, H22i;
  867|  8.20k|  FLOAT32 deltaH11r, deltaH12r, deltaH21r, deltaH22r;
  868|  8.20k|  FLOAT32 deltaH11i, deltaH12i, deltaH21i, deltaH22i;
  869|  8.20k|  FLOAT32 l_left_re, l_left_im;
  870|  8.20k|  FLOAT32 l_right_re, l_right_im;
  871|       |
  872|  8.20k|  WORD32 L;
  873|  8.20k|  FLOAT32 *ptr_scale_factors;
  874|  8.20k|  const WORD32 *ptr_quantized_iids;
  875|  8.20k|  WORD32 num_iid_steps;
  876|       |
  877|  8.20k|  if (ptr_ps_dec->iid_quant) {
  ------------------
  |  Branch (877:7): [True: 638, False: 7.56k]
  ------------------
  878|    638|    num_iid_steps = NUM_IID_STEPS_FINE;
  ------------------
  |  |   54|    638|#define NUM_IID_STEPS_FINE (15)
  ------------------
  879|    638|    ptr_scale_factors = ptr_ps_tables->scale_factors_fine_flt;
  880|    638|    ptr_quantized_iids = ptr_ps_tables->quantized_iids_fine;
  881|  7.56k|  } else {
  882|  7.56k|    num_iid_steps = NUM_IID_STEPS;
  ------------------
  |  |   53|  7.56k|#define NUM_IID_STEPS (7)
  ------------------
  883|  7.56k|    ptr_scale_factors = ptr_ps_tables->scale_factors_flt;
  884|  7.56k|    ptr_quantized_iids = ptr_ps_tables->quantized_iids;
  885|  7.56k|  }
  886|       |
  887|  8.20k|  if (ptr_ps_dec->use_34_st_bands != ptr_ps_dec->use_34_st_bands_prev) {
  ------------------
  |  Branch (887:7): [True: 0, False: 8.20k]
  ------------------
  888|      0|    if (ptr_ps_dec->use_34_st_bands) {
  ------------------
  |  Branch (888:9): [True: 0, False: 0]
  ------------------
  889|      0|      ixheaacd_map_20_float_to_34(ptr_ps_dec->h11_re_prev);
  890|      0|      ixheaacd_map_20_float_to_34(ptr_ps_dec->h12_re_prev);
  891|      0|      ixheaacd_map_20_float_to_34(ptr_ps_dec->h21_re_prev);
  892|      0|      ixheaacd_map_20_float_to_34(ptr_ps_dec->h22_re_prev);
  893|       |
  894|      0|      ixheaacd_map_20_float_to_34(ptr_ps_dec->h11_im_prev);
  895|      0|      ixheaacd_map_20_float_to_34(ptr_ps_dec->h12_im_prev);
  896|      0|      ixheaacd_map_20_float_to_34(ptr_ps_dec->h21_im_prev);
  897|      0|      ixheaacd_map_20_float_to_34(ptr_ps_dec->h22_im_prev);
  898|       |
  899|      0|      memset(ptr_ps_dec->ipd_idx_map_1, 0, sizeof(ptr_ps_dec->ipd_idx_map_1));
  900|      0|      memset(ptr_ps_dec->opd_idx_map_1, 0, sizeof(ptr_ps_dec->opd_idx_map_1));
  901|      0|      memset(ptr_ps_dec->ipd_idx_map_2, 0, sizeof(ptr_ps_dec->ipd_idx_map_2));
  902|      0|      memset(ptr_ps_dec->opd_idx_map_2, 0, sizeof(ptr_ps_dec->opd_idx_map_2));
  903|      0|    } else {
  904|      0|      ixheaacd_map_34_float_to_20(ptr_ps_dec->h11_re_prev);
  905|      0|      ixheaacd_map_34_float_to_20(ptr_ps_dec->h12_re_prev);
  906|      0|      ixheaacd_map_34_float_to_20(ptr_ps_dec->h21_re_prev);
  907|      0|      ixheaacd_map_34_float_to_20(ptr_ps_dec->h22_re_prev);
  908|       |
  909|      0|      ixheaacd_map_34_float_to_20(ptr_ps_dec->h11_im_prev);
  910|      0|      ixheaacd_map_34_float_to_20(ptr_ps_dec->h12_im_prev);
  911|      0|      ixheaacd_map_34_float_to_20(ptr_ps_dec->h21_im_prev);
  912|      0|      ixheaacd_map_34_float_to_20(ptr_ps_dec->h22_im_prev);
  913|       |
  914|      0|      memset(ptr_ps_dec->ipd_idx_map_1, 0, sizeof(ptr_ps_dec->ipd_idx_map_1));
  915|      0|      memset(ptr_ps_dec->opd_idx_map_1, 0, sizeof(ptr_ps_dec->opd_idx_map_1));
  916|      0|      memset(ptr_ps_dec->ipd_idx_map_2, 0, sizeof(ptr_ps_dec->ipd_idx_map_2));
  917|      0|      memset(ptr_ps_dec->opd_idx_map_2, 0, sizeof(ptr_ps_dec->opd_idx_map_2));
  918|      0|    }
  919|      0|  }
  920|       |
  921|  16.8k|  for (env = 0; env < ptr_ps_dec->num_env; env++) {
  ------------------
  |  Branch (921:17): [True: 8.61k, False: 8.20k]
  ------------------
  922|   180k|    for (bin = 0; bin < ptr_ps_dec->num_bins; bin++) {
  ------------------
  |  Branch (922:19): [True: 172k, False: 8.61k]
  ------------------
  923|   172k|      if (!ptr_ps_dec->use_pca_rot_flg) {
  ------------------
  |  Branch (923:11): [True: 172k, False: 0]
  ------------------
  924|   172k|        scale_fac_r = ptr_scale_factors[num_iid_steps +
  925|   172k|                      ptr_ps_dec->iid_par_table[env][bin]];
  926|   172k|        scale_fac_l = ptr_scale_factors[num_iid_steps -
  927|   172k|                      ptr_ps_dec->iid_par_table[env][bin]];
  928|       |
  929|   172k|        alpha = ptr_ps_tables->alphas[ptr_ps_dec->icc_par_table[env][bin]];
  930|       |
  931|   172k|        beta = alpha * (scale_fac_r - scale_fac_l) / PSC_SQRT2F;
  ------------------
  |  |   71|   172k|#define PSC_SQRT2F ((FLOAT32)PSC_SQRT2)
  |  |  ------------------
  |  |  |  |   69|   172k|#define PSC_SQRT2  (1.41421356237309504880)
  |  |  ------------------
  ------------------
  932|       |
  933|   172k|        h11r = (FLOAT32)(scale_fac_l * cos(beta + alpha));
  934|   172k|        h12r = (FLOAT32)(scale_fac_r * cos(beta - alpha));
  935|   172k|        h21r = (FLOAT32)(scale_fac_l * sin(beta + alpha));
  936|   172k|        h22r = (FLOAT32)(scale_fac_r * sin(beta - alpha));
  937|   172k|      } else {
  938|      0|        FLOAT32 c, rho, mu, alpha, gamma;
  939|      0|        WORD32 i;
  940|       |
  941|      0|        i = ptr_ps_dec->iid_par_table[env][bin];
  942|      0|        c = (FLOAT32)pow(
  943|      0|            10.0,
  944|      0|            ((i) ? (((i > 0) ? 1 : -1) * ptr_quantized_iids[((i > 0) ? i : -i) - 1]) : 0.) /
  ------------------
  |  Branch (944:14): [True: 0, False: 0]
  |  Branch (944:22): [True: 0, False: 0]
  |  Branch (944:62): [True: 0, False: 0]
  ------------------
  945|      0|                20.0);
  946|      0|        rho = ptr_ps_tables->quantized_rhos[ptr_ps_dec->icc_par_table[env][bin]];
  947|      0|        rho = max(rho, 0.05f);
  ------------------
  |  |   74|      0|#define max(a, b) (((a) > (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (74:20): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  948|       |
  949|      0|        if (rho == 0.0f && c == 1.) {
  ------------------
  |  Branch (949:13): [True: 0, False: 0]
  |  Branch (949:28): [True: 0, False: 0]
  ------------------
  950|      0|          alpha = (FLOAT32)PI / 4.0f;
  ------------------
  |  |  153|      0|#define PI 3.14159265358979323846264338327950288
  ------------------
  951|      0|        } else {
  952|      0|          if (rho <= 0.05f) {
  ------------------
  |  Branch (952:15): [True: 0, False: 0]
  ------------------
  953|      0|            rho = 0.05f;
  954|      0|          }
  955|      0|          alpha = 0.5f * (FLOAT32)atan((2.0f * c * rho) / (c * c - 1.0f));
  956|       |
  957|      0|          if (alpha < 0.) {
  ------------------
  |  Branch (957:15): [True: 0, False: 0]
  ------------------
  958|      0|            alpha += (FLOAT32)PI / 2.0f;
  ------------------
  |  |  153|      0|#define PI 3.14159265358979323846264338327950288
  ------------------
  959|      0|          }
  960|      0|        }
  961|      0|        mu = c + 1.0f / c;
  962|      0|        mu = 1 + (4.0f * rho * rho - 4.0f) / (mu * mu);
  963|      0|        gamma = (FLOAT32)atan(sqrt((1.0f - sqrt(mu)) / (1.0f + sqrt(mu))));
  964|       |
  965|      0|        h11r = (FLOAT32)(sqrt(2.) * cos(alpha) * cos(gamma));
  966|      0|        h12r = (FLOAT32)(sqrt(2.) * sin(alpha) * cos(gamma));
  967|      0|        h21r = (FLOAT32)(sqrt(2.) * -sin(alpha) * sin(gamma));
  968|      0|        h22r = (FLOAT32)(sqrt(2.) * cos(alpha) * sin(gamma));
  969|      0|      }
  970|       |
  971|   172k|      if (bin >= ptr_ps_tables->ipd_bins_tbl[ptr_ps_dec->freq_res_ipd]) {
  ------------------
  |  Branch (971:11): [True: 109k, False: 62.7k]
  ------------------
  972|   109k|        h11i = h12i = h21i = h22i = 0.0f;
  973|   109k|      } else {
  974|  62.7k|        ipd = (IPD_SCALE_FACTOR * 2.0f) * ptr_ps_dec->ipd_idx_map[env][bin];
  ------------------
  |  |   74|  62.7k|#define IPD_SCALE_FACTOR (IPD_HALF_RANGE / NUM_IPD_STEPS)
  |  |  ------------------
  |  |  |  |   73|  62.7k|#define IPD_HALF_RANGE (PSC_PIF)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|  62.7k|#define PSC_PIF ((FLOAT32)_M_PI_)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|  62.7k|#define _M_PI_ (3.141592653589793238462643383279)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IPD_SCALE_FACTOR (IPD_HALF_RANGE / NUM_IPD_STEPS)
  |  |  ------------------
  |  |  |  |   54|  62.7k|#define NUM_IPD_STEPS (8)
  |  |  ------------------
  ------------------
  975|  62.7k|        opd = (OPD_SCALE_FACTOR * 2.0f) * ptr_ps_dec->opd_idx_map[env][bin];
  ------------------
  |  |   76|  62.7k|#define OPD_SCALE_FACTOR (OPD_HALF_RANGE / NUM_OPD_STEPS)
  |  |  ------------------
  |  |  |  |   75|  62.7k|#define OPD_HALF_RANGE (PSC_PIF)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|  62.7k|#define PSC_PIF ((FLOAT32)_M_PI_)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|  62.7k|#define _M_PI_ (3.141592653589793238462643383279)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define OPD_SCALE_FACTOR (OPD_HALF_RANGE / NUM_OPD_STEPS)
  |  |  ------------------
  |  |  |  |   55|  62.7k|#define NUM_OPD_STEPS (8)
  |  |  ------------------
  ------------------
  976|  62.7k|        ipd1 = (IPD_SCALE_FACTOR * 2.0f) * ptr_ps_dec->ipd_idx_map_1[bin];
  ------------------
  |  |   74|  62.7k|#define IPD_SCALE_FACTOR (IPD_HALF_RANGE / NUM_IPD_STEPS)
  |  |  ------------------
  |  |  |  |   73|  62.7k|#define IPD_HALF_RANGE (PSC_PIF)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|  62.7k|#define PSC_PIF ((FLOAT32)_M_PI_)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|  62.7k|#define _M_PI_ (3.141592653589793238462643383279)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IPD_SCALE_FACTOR (IPD_HALF_RANGE / NUM_IPD_STEPS)
  |  |  ------------------
  |  |  |  |   54|  62.7k|#define NUM_IPD_STEPS (8)
  |  |  ------------------
  ------------------
  977|  62.7k|        opd1 = (OPD_SCALE_FACTOR * 2.0f) * ptr_ps_dec->opd_idx_map_1[bin];
  ------------------
  |  |   76|  62.7k|#define OPD_SCALE_FACTOR (OPD_HALF_RANGE / NUM_OPD_STEPS)
  |  |  ------------------
  |  |  |  |   75|  62.7k|#define OPD_HALF_RANGE (PSC_PIF)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|  62.7k|#define PSC_PIF ((FLOAT32)_M_PI_)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|  62.7k|#define _M_PI_ (3.141592653589793238462643383279)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define OPD_SCALE_FACTOR (OPD_HALF_RANGE / NUM_OPD_STEPS)
  |  |  ------------------
  |  |  |  |   55|  62.7k|#define NUM_OPD_STEPS (8)
  |  |  ------------------
  ------------------
  978|  62.7k|        ipd2 = (IPD_SCALE_FACTOR * 2.0f) * ptr_ps_dec->ipd_idx_map_2[bin];
  ------------------
  |  |   74|  62.7k|#define IPD_SCALE_FACTOR (IPD_HALF_RANGE / NUM_IPD_STEPS)
  |  |  ------------------
  |  |  |  |   73|  62.7k|#define IPD_HALF_RANGE (PSC_PIF)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|  62.7k|#define PSC_PIF ((FLOAT32)_M_PI_)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|  62.7k|#define _M_PI_ (3.141592653589793238462643383279)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define IPD_SCALE_FACTOR (IPD_HALF_RANGE / NUM_IPD_STEPS)
  |  |  ------------------
  |  |  |  |   54|  62.7k|#define NUM_IPD_STEPS (8)
  |  |  ------------------
  ------------------
  979|  62.7k|        opd2 = (OPD_SCALE_FACTOR * 2.0f) * ptr_ps_dec->opd_idx_map_2[bin];
  ------------------
  |  |   76|  62.7k|#define OPD_SCALE_FACTOR (OPD_HALF_RANGE / NUM_OPD_STEPS)
  |  |  ------------------
  |  |  |  |   75|  62.7k|#define OPD_HALF_RANGE (PSC_PIF)
  |  |  |  |  ------------------
  |  |  |  |  |  |   70|  62.7k|#define PSC_PIF ((FLOAT32)_M_PI_)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   67|  62.7k|#define _M_PI_ (3.141592653589793238462643383279)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define OPD_SCALE_FACTOR (OPD_HALF_RANGE / NUM_OPD_STEPS)
  |  |  ------------------
  |  |  |  |   55|  62.7k|#define NUM_OPD_STEPS (8)
  |  |  ------------------
  ------------------
  980|       |
  981|  62.7k|        l_left_re = (FLOAT32)cos(ipd);
  982|  62.7k|        l_left_im = (FLOAT32)sin(ipd);
  983|  62.7k|        l_right_re = (FLOAT32)cos(opd);
  984|  62.7k|        l_right_im = (FLOAT32)sin(opd);
  985|       |
  986|  62.7k|        l_left_re += PHASE_SMOOTH_HIST1 * (FLOAT32)cos(ipd1);
  ------------------
  |  |   83|  62.7k|#define PHASE_SMOOTH_HIST1 (0.5f)
  ------------------
  987|  62.7k|        l_left_im += PHASE_SMOOTH_HIST1 * (FLOAT32)sin(ipd1);
  ------------------
  |  |   83|  62.7k|#define PHASE_SMOOTH_HIST1 (0.5f)
  ------------------
  988|  62.7k|        l_right_re += PHASE_SMOOTH_HIST1 * (FLOAT32)cos(opd1);
  ------------------
  |  |   83|  62.7k|#define PHASE_SMOOTH_HIST1 (0.5f)
  ------------------
  989|  62.7k|        l_right_im += PHASE_SMOOTH_HIST1 * (FLOAT32)sin(opd1);
  ------------------
  |  |   83|  62.7k|#define PHASE_SMOOTH_HIST1 (0.5f)
  ------------------
  990|       |
  991|  62.7k|        l_left_re += PHASE_SMOOTH_HIST2 * (FLOAT32)cos(ipd2);
  ------------------
  |  |   84|  62.7k|#define PHASE_SMOOTH_HIST2 (0.25f)
  ------------------
  992|  62.7k|        l_left_im += PHASE_SMOOTH_HIST2 * (FLOAT32)sin(ipd2);
  ------------------
  |  |   84|  62.7k|#define PHASE_SMOOTH_HIST2 (0.25f)
  ------------------
  993|  62.7k|        l_right_re += PHASE_SMOOTH_HIST2 * (FLOAT32)cos(opd2);
  ------------------
  |  |   84|  62.7k|#define PHASE_SMOOTH_HIST2 (0.25f)
  ------------------
  994|  62.7k|        l_right_im += PHASE_SMOOTH_HIST2 * (FLOAT32)sin(opd2);
  ------------------
  |  |   84|  62.7k|#define PHASE_SMOOTH_HIST2 (0.25f)
  ------------------
  995|       |
  996|  62.7k|        ipd = (FLOAT32)atan2(l_left_im, l_left_re);
  997|  62.7k|        opd = (FLOAT32)atan2(l_right_im, l_right_re);
  998|       |
  999|  62.7k|        l_left_re = (FLOAT32)cos(opd);
 1000|  62.7k|        l_left_im = (FLOAT32)sin(opd);
 1001|  62.7k|        opd -= ipd;
 1002|  62.7k|        l_right_re = (FLOAT32)cos(opd);
 1003|  62.7k|        l_right_im = (FLOAT32)sin(opd);
 1004|       |
 1005|  62.7k|        h11i = h11r * l_left_im;
 1006|  62.7k|        h12i = h12r * l_right_im;
 1007|  62.7k|        h21i = h21r * l_left_im;
 1008|  62.7k|        h22i = h22r * l_right_im;
 1009|       |
 1010|  62.7k|        h11r *= l_left_re;
 1011|  62.7k|        h12r *= l_right_re;
 1012|  62.7k|        h21r *= l_left_re;
 1013|  62.7k|        h22r *= l_right_re;
 1014|  62.7k|      }
 1015|       |
 1016|   172k|      ptr_ps_dec->h11_re_vec[bin] = h11r;
 1017|   172k|      ptr_ps_dec->h12_re_vec[bin] = h12r;
 1018|   172k|      ptr_ps_dec->h21_re_vec[bin] = h21r;
 1019|   172k|      ptr_ps_dec->h22_re_vec[bin] = h22r;
 1020|   172k|      ptr_ps_dec->h11_im_vec[bin] = h11i;
 1021|   172k|      ptr_ps_dec->h12_im_vec[bin] = h12i;
 1022|   172k|      ptr_ps_dec->h21_im_vec[bin] = h21i;
 1023|   172k|      ptr_ps_dec->h22_im_vec[bin] = h22i;
 1024|       |
 1025|   172k|    }
 1026|       |
 1027|  8.61k|    p_hyb_left_re = ptr_ps_dec->hyb_left_re;
 1028|  8.61k|    p_hyb_left_im = ptr_ps_dec->hyb_left_im;
 1029|  8.61k|    p_hyb_rigth_re = ptr_ps_dec->hyb_right_re;
 1030|  8.61k|    p_hyb_rigth_im = ptr_ps_dec->hyb_right_im;
 1031|       |
 1032|  94.7k|    for (group = 0; group < ptr_ps_dec->num_sub_qmf_groups; group++) {
  ------------------
  |  Branch (1032:21): [True: 86.1k, False: 8.61k]
  ------------------
 1033|  86.1k|      bin = (~NEGATE_IPD_MASK) & ptr_ps_dec->ptr_bins_group_map[group];
  ------------------
  |  |   77|  86.1k|#define NEGATE_IPD_MASK (0x00001000)
  ------------------
 1034|       |
 1035|  86.1k|      max_subband = ptr_ps_dec->ptr_group_borders[group] + 1;
 1036|       |
 1037|  86.1k|      L = ptr_ps_dec->border_position[env + 1] - ptr_ps_dec->border_position[env];
 1038|       |
 1039|  86.1k|      H11r = ptr_ps_dec->h11_re_prev[bin];
 1040|  86.1k|      H12r = ptr_ps_dec->h12_re_prev[bin];
 1041|  86.1k|      H21r = ptr_ps_dec->h21_re_prev[bin];
 1042|  86.1k|      H22r = ptr_ps_dec->h22_re_prev[bin];
 1043|  86.1k|      if ((NEGATE_IPD_MASK & ptr_ps_dec->ptr_bins_group_map[group]) != 0) {
  ------------------
  |  |   77|  86.1k|#define NEGATE_IPD_MASK (0x00001000)
  ------------------
  |  Branch (1043:11): [True: 17.2k, False: 68.9k]
  ------------------
 1044|  17.2k|        H11i = -ptr_ps_dec->h11_im_prev[bin];
 1045|  17.2k|        H12i = -ptr_ps_dec->h12_im_prev[bin];
 1046|  17.2k|        H21i = -ptr_ps_dec->h21_im_prev[bin];
 1047|  17.2k|        H22i = -ptr_ps_dec->h22_im_prev[bin];
 1048|  68.9k|      } else {
 1049|  68.9k|        H11i = ptr_ps_dec->h11_im_prev[bin];
 1050|  68.9k|        H12i = ptr_ps_dec->h12_im_prev[bin];
 1051|  68.9k|        H21i = ptr_ps_dec->h21_im_prev[bin];
 1052|  68.9k|        H22i = ptr_ps_dec->h22_im_prev[bin];
 1053|  68.9k|      }
 1054|       |
 1055|  86.1k|      h11r = ptr_ps_dec->h11_re_vec[bin];
 1056|  86.1k|      h12r = ptr_ps_dec->h12_re_vec[bin];
 1057|  86.1k|      h21r = ptr_ps_dec->h21_re_vec[bin];
 1058|  86.1k|      h22r = ptr_ps_dec->h22_re_vec[bin];
 1059|  86.1k|      if ((NEGATE_IPD_MASK & ptr_ps_dec->ptr_bins_group_map[group]) != 0) {
  ------------------
  |  |   77|  86.1k|#define NEGATE_IPD_MASK (0x00001000)
  ------------------
  |  Branch (1059:11): [True: 17.2k, False: 68.9k]
  ------------------
 1060|  17.2k|        h11i = -ptr_ps_dec->h11_im_vec[bin];
 1061|  17.2k|        h12i = -ptr_ps_dec->h12_im_vec[bin];
 1062|  17.2k|        h21i = -ptr_ps_dec->h21_im_vec[bin];
 1063|  17.2k|        h22i = -ptr_ps_dec->h22_im_vec[bin];
 1064|  68.9k|      } else {
 1065|  68.9k|        h11i = ptr_ps_dec->h11_im_vec[bin];
 1066|  68.9k|        h12i = ptr_ps_dec->h12_im_vec[bin];
 1067|  68.9k|        h21i = ptr_ps_dec->h21_im_vec[bin];
 1068|  68.9k|        h22i = ptr_ps_dec->h22_im_vec[bin];
 1069|  68.9k|      }
 1070|       |
 1071|  86.1k|      deltaH11r = (h11r - H11r) / L;
 1072|  86.1k|      deltaH12r = (h12r - H12r) / L;
 1073|  86.1k|      deltaH21r = (h21r - H21r) / L;
 1074|  86.1k|      deltaH22r = (h22r - H22r) / L;
 1075|       |
 1076|  86.1k|      deltaH11i = (h11i - H11i) / L;
 1077|  86.1k|      deltaH12i = (h12i - H12i) / L;
 1078|  86.1k|      deltaH21i = (h21i - H21i) / L;
 1079|  86.1k|      deltaH22i = (h22i - H22i) / L;
 1080|       |
 1081|  2.71M|      for (i = ptr_ps_dec->border_position[env]; i < ptr_ps_dec->border_position[env + 1];
  ------------------
  |  Branch (1081:50): [True: 2.62M, False: 86.1k]
  ------------------
 1082|  2.62M|           i++) {
 1083|  2.62M|        H11r += deltaH11r;
 1084|  2.62M|        H12r += deltaH12r;
 1085|  2.62M|        H21r += deltaH21r;
 1086|  2.62M|        H22r += deltaH22r;
 1087|       |
 1088|  2.62M|        H11i += deltaH11i;
 1089|  2.62M|        H12i += deltaH12i;
 1090|  2.62M|        H21i += deltaH21i;
 1091|  2.62M|        H22i += deltaH22i;
 1092|       |
 1093|  5.25M|        for (subband = ptr_ps_dec->ptr_group_borders[group]; subband < max_subband;
  ------------------
  |  Branch (1093:62): [True: 2.62M, False: 2.62M]
  ------------------
 1094|  2.62M|             subband++) {
 1095|  2.62M|          l_left_re = H11r * p_hyb_left_re[i][subband] - H11i * p_hyb_left_im[i][subband] +
 1096|  2.62M|                      H21r * p_hyb_rigth_re[i][subband] - H21i * p_hyb_rigth_im[i][subband];
 1097|       |
 1098|  2.62M|          l_left_im = H11i * p_hyb_left_re[i][subband] + H11r * p_hyb_left_im[i][subband] +
 1099|  2.62M|                      H21i * p_hyb_rigth_re[i][subband] + H21r * p_hyb_rigth_im[i][subband];
 1100|       |
 1101|  2.62M|          l_right_re = H12r * p_hyb_left_re[i][subband] - H12i * p_hyb_left_im[i][subband] +
 1102|  2.62M|                       H22r * p_hyb_rigth_re[i][subband] - H22i * p_hyb_rigth_im[i][subband];
 1103|       |
 1104|  2.62M|          l_right_im = H12i * p_hyb_left_re[i][subband] + H12r * p_hyb_left_im[i][subband] +
 1105|  2.62M|                       H22i * p_hyb_rigth_re[i][subband] + H22r * p_hyb_rigth_im[i][subband];
 1106|       |
 1107|  2.62M|          p_hyb_left_re[i][subband] = l_left_re;
 1108|  2.62M|          p_hyb_left_im[i][subband] = l_left_im;
 1109|  2.62M|          p_hyb_rigth_re[i][subband] = l_right_re;
 1110|  2.62M|          p_hyb_rigth_im[i][subband] = l_right_im;
 1111|  2.62M|        }
 1112|  2.62M|      }
 1113|  86.1k|    }
 1114|       |
 1115|   112k|    for (; group < ptr_ps_dec->num_groups; group++) {
  ------------------
  |  Branch (1115:12): [True: 103k, False: 8.61k]
  ------------------
 1116|   103k|      bin = (~NEGATE_IPD_MASK) & ptr_ps_dec->ptr_bins_group_map[group];
  ------------------
  |  |   77|   103k|#define NEGATE_IPD_MASK (0x00001000)
  ------------------
 1117|       |
 1118|   103k|      max_subband = ptr_ps_dec->ptr_group_borders[group + 1];
 1119|       |
 1120|   103k|      L = ptr_ps_dec->border_position[env + 1] - ptr_ps_dec->border_position[env];
 1121|       |
 1122|   103k|      H11r = ptr_ps_dec->h11_re_prev[bin];
 1123|   103k|      H12r = ptr_ps_dec->h12_re_prev[bin];
 1124|   103k|      H21r = ptr_ps_dec->h21_re_prev[bin];
 1125|   103k|      H22r = ptr_ps_dec->h22_re_prev[bin];
 1126|   103k|      if ((NEGATE_IPD_MASK & ptr_ps_dec->ptr_bins_group_map[group]) != 0) {
  ------------------
  |  |   77|   103k|#define NEGATE_IPD_MASK (0x00001000)
  ------------------
  |  Branch (1126:11): [True: 0, False: 103k]
  ------------------
 1127|      0|        H11i = -ptr_ps_dec->h11_im_prev[bin];
 1128|      0|        H12i = -ptr_ps_dec->h12_im_prev[bin];
 1129|      0|        H21i = -ptr_ps_dec->h21_im_prev[bin];
 1130|      0|        H22i = -ptr_ps_dec->h22_im_prev[bin];
 1131|   103k|      } else {
 1132|   103k|        H11i = ptr_ps_dec->h11_im_prev[bin];
 1133|   103k|        H12i = ptr_ps_dec->h12_im_prev[bin];
 1134|   103k|        H21i = ptr_ps_dec->h21_im_prev[bin];
 1135|   103k|        H22i = ptr_ps_dec->h22_im_prev[bin];
 1136|   103k|      }
 1137|       |
 1138|   103k|      h11r = ptr_ps_dec->h11_re_vec[bin];
 1139|   103k|      h12r = ptr_ps_dec->h12_re_vec[bin];
 1140|   103k|      h21r = ptr_ps_dec->h21_re_vec[bin];
 1141|   103k|      h22r = ptr_ps_dec->h22_re_vec[bin];
 1142|   103k|      if ((NEGATE_IPD_MASK & ptr_ps_dec->ptr_bins_group_map[group]) != 0) {
  ------------------
  |  |   77|   103k|#define NEGATE_IPD_MASK (0x00001000)
  ------------------
  |  Branch (1142:11): [True: 0, False: 103k]
  ------------------
 1143|      0|        h11i = -ptr_ps_dec->h11_im_vec[bin];
 1144|      0|        h12i = -ptr_ps_dec->h12_im_vec[bin];
 1145|      0|        h21i = -ptr_ps_dec->h21_im_vec[bin];
 1146|      0|        h22i = -ptr_ps_dec->h22_im_vec[bin];
 1147|   103k|      } else {
 1148|   103k|        h11i = ptr_ps_dec->h11_im_vec[bin];
 1149|   103k|        h12i = ptr_ps_dec->h12_im_vec[bin];
 1150|   103k|        h21i = ptr_ps_dec->h21_im_vec[bin];
 1151|   103k|        h22i = ptr_ps_dec->h22_im_vec[bin];
 1152|   103k|      }
 1153|       |
 1154|   103k|      deltaH11r = (h11r - H11r) / L;
 1155|   103k|      deltaH12r = (h12r - H12r) / L;
 1156|   103k|      deltaH21r = (h21r - H21r) / L;
 1157|   103k|      deltaH22r = (h22r - H22r) / L;
 1158|       |
 1159|   103k|      deltaH11i = (h11i - H11i) / L;
 1160|   103k|      deltaH12i = (h12i - H12i) / L;
 1161|   103k|      deltaH21i = (h21i - H21i) / L;
 1162|   103k|      deltaH22i = (h22i - H22i) / L;
 1163|       |
 1164|  3.25M|      for (i = ptr_ps_dec->border_position[env]; i < ptr_ps_dec->border_position[env + 1];
  ------------------
  |  Branch (1164:50): [True: 3.15M, False: 103k]
  ------------------
 1165|  3.15M|           i++) {
 1166|  3.15M|        H11r += deltaH11r;
 1167|  3.15M|        H12r += deltaH12r;
 1168|  3.15M|        H21r += deltaH21r;
 1169|  3.15M|        H22r += deltaH22r;
 1170|       |
 1171|  3.15M|        H11i += deltaH11i;
 1172|  3.15M|        H12i += deltaH12i;
 1173|  3.15M|        H21i += deltaH21i;
 1174|  3.15M|        H22i += deltaH22i;
 1175|       |
 1176|  19.1M|        for (subband = ptr_ps_dec->ptr_group_borders[group]; subband < max_subband;
  ------------------
  |  Branch (1176:62): [True: 16.0M, False: 3.15M]
  ------------------
 1177|  16.0M|             subband++) {
 1178|  16.0M|          l_left_re = H11r * pp_qmf_buf_re_left[i][subband] - H11i *
 1179|  16.0M|                      pp_qmf_buf_im_left[i][subband] +
 1180|  16.0M|                      H21r * pp_qmf_buf_re_right[i][subband] - H21i *
 1181|  16.0M|                      pp_qmf_buf_im_right[i][subband];
 1182|       |
 1183|  16.0M|          l_left_im = H11i * pp_qmf_buf_re_left[i][subband] + H11r *
 1184|  16.0M|                      pp_qmf_buf_im_left[i][subband] +
 1185|  16.0M|                      H21i * pp_qmf_buf_re_right[i][subband] + H21r *
 1186|  16.0M|                      pp_qmf_buf_im_right[i][subband];
 1187|       |
 1188|  16.0M|          l_right_re = H12r * pp_qmf_buf_re_left[i][subband] - H12i *
 1189|  16.0M|                       pp_qmf_buf_im_left[i][subband] +
 1190|  16.0M|                       H22r * pp_qmf_buf_re_right[i][subband] - H22i *
 1191|  16.0M|                       pp_qmf_buf_im_right[i][subband];
 1192|       |
 1193|  16.0M|          l_right_im = H12i * pp_qmf_buf_re_left[i][subband] + H12r *
 1194|  16.0M|                       pp_qmf_buf_im_left[i][subband] +
 1195|  16.0M|                       H22i * pp_qmf_buf_re_right[i][subband] + H22r *
 1196|  16.0M|                       pp_qmf_buf_im_right[i][subband];
 1197|       |
 1198|  16.0M|          pp_qmf_buf_re_left[i][subband] = l_left_re;
 1199|  16.0M|          pp_qmf_buf_im_left[i][subband] = l_left_im;
 1200|  16.0M|          pp_qmf_buf_re_right[i][subband] = l_right_re;
 1201|  16.0M|          pp_qmf_buf_im_right[i][subband] = l_right_im;
 1202|  16.0M|        }
 1203|  3.15M|      }
 1204|   103k|    }
 1205|   180k|    for (bin = 0; bin < ptr_ps_dec->num_bins; bin++) {
  ------------------
  |  Branch (1205:19): [True: 172k, False: 8.61k]
  ------------------
 1206|   172k|      ptr_ps_dec->h11_re_prev[bin] = ptr_ps_dec->h11_re_vec[bin];
 1207|   172k|      ptr_ps_dec->h12_re_prev[bin] = ptr_ps_dec->h12_re_vec[bin];
 1208|   172k|      ptr_ps_dec->h21_re_prev[bin] = ptr_ps_dec->h21_re_vec[bin];
 1209|   172k|      ptr_ps_dec->h22_re_prev[bin] = ptr_ps_dec->h22_re_vec[bin];
 1210|       |
 1211|   172k|      ptr_ps_dec->h11_im_prev[bin] = ptr_ps_dec->h11_im_vec[bin];
 1212|   172k|      ptr_ps_dec->h12_im_prev[bin] = ptr_ps_dec->h12_im_vec[bin];
 1213|   172k|      ptr_ps_dec->h21_im_prev[bin] = ptr_ps_dec->h21_im_vec[bin];
 1214|   172k|      ptr_ps_dec->h22_im_prev[bin] = ptr_ps_dec->h22_im_vec[bin];
 1215|   172k|    }
 1216|       |
 1217|  71.3k|    for (bin = 0; bin < ptr_ps_tables->ipd_bins_tbl[ptr_ps_dec->freq_res_ipd]; bin++) {
  ------------------
  |  Branch (1217:19): [True: 62.7k, False: 8.61k]
  ------------------
 1218|  62.7k|      ptr_ps_dec->ipd_idx_map_2[bin] = ptr_ps_dec->ipd_idx_map_1[bin];
 1219|  62.7k|      ptr_ps_dec->opd_idx_map_2[bin] = ptr_ps_dec->opd_idx_map_1[bin];
 1220|  62.7k|      ptr_ps_dec->ipd_idx_map_1[bin] = ptr_ps_dec->ipd_idx_map[env][bin];
 1221|  62.7k|      ptr_ps_dec->opd_idx_map_1[bin] = ptr_ps_dec->opd_idx_map[env][bin];
 1222|  62.7k|    }
 1223|  8.61k|  }
 1224|  8.20k|}

ixheaacd_sbr_qmfanal32_winadd_eld_mps:
  363|  2.14k|                                           WORD32 *p_out) {
  364|  2.14k|  WORD32 n;
  365|  2.14k|  WORD32 resolution = 64;
  366|       |
  367|  70.8k|  for (n = 0; n < 64; n += 2) {
  ------------------
  |  Branch (367:15): [True: 68.7k, False: 2.14k]
  ------------------
  368|  68.7k|    WORD32 accu;
  369|  68.7k|    accu = ixheaac_mul32_sh(inp1[n + 0], p_qmf1[(n + 0)], 31);
  370|  68.7k|    accu = ixheaac_add32_sat(
  371|  68.7k|        accu, ixheaac_mul32_sh(inp1[n + 2 * resolution],
  372|  68.7k|                                p_qmf1[(n + 2 * resolution)], 31));
  373|  68.7k|    accu = ixheaac_add32_sat(
  374|  68.7k|        accu, ixheaac_mul32_sh(inp1[n + 4 * resolution],
  375|  68.7k|                                p_qmf1[(n + 4 * resolution)], 31));
  376|  68.7k|    accu = ixheaac_add32_sat(
  377|  68.7k|        accu, ixheaac_mul32_sh(inp1[n + 6 * resolution],
  378|  68.7k|                                p_qmf1[(n + 6 * resolution)], 31));
  379|  68.7k|    accu = ixheaac_add32_sat(
  380|  68.7k|        accu, ixheaac_mul32_sh(inp1[n + 8 * resolution],
  381|  68.7k|                                p_qmf1[(n + 8 * resolution)], 31));
  382|  68.7k|    p_out[n] = accu;
  383|       |
  384|  68.7k|    accu = ixheaac_mul32_sh(inp1[n + 1 + 0], p_qmf1[(n + 1 + 0)], 31);
  385|  68.7k|    accu = ixheaac_add32_sat(
  386|  68.7k|        accu, ixheaac_mul32_sh(inp1[n + 1 + 2 * resolution],
  387|  68.7k|                                p_qmf1[(n + 1 + 2 * resolution)], 31));
  388|  68.7k|    accu = ixheaac_add32_sat(
  389|  68.7k|        accu, ixheaac_mul32_sh(inp1[n + 1 + 4 * resolution],
  390|  68.7k|                                p_qmf1[(n + 1 + 4 * resolution)], 31));
  391|  68.7k|    accu = ixheaac_add32_sat(
  392|  68.7k|        accu, ixheaac_mul32_sh(inp1[n + 1 + 6 * resolution],
  393|  68.7k|                                p_qmf1[(n + 1 + 6 * resolution)], 31));
  394|  68.7k|    accu = ixheaac_add32_sat(
  395|  68.7k|        accu, ixheaac_mul32_sh(inp1[n + 1 + 8 * resolution],
  396|  68.7k|                                p_qmf1[(n + 1 + 8 * resolution)], 31));
  397|  68.7k|    p_out[n + 1] = accu;
  398|       |
  399|  68.7k|    accu = ixheaac_mul32_sh(inp2[n + 0], p_qmf2[(n + 0)], 31);
  400|  68.7k|    accu = ixheaac_add32_sat(
  401|  68.7k|        accu, ixheaac_mul32_sh(inp2[n + 2 * resolution],
  402|  68.7k|                                p_qmf2[(n + 2 * resolution)], 31));
  403|  68.7k|    accu = ixheaac_add32_sat(
  404|  68.7k|        accu, ixheaac_mul32_sh(inp2[n + 4 * resolution],
  405|  68.7k|                                p_qmf2[(n + 4 * resolution)], 31));
  406|  68.7k|    accu = ixheaac_add32_sat(
  407|  68.7k|        accu, ixheaac_mul32_sh(inp2[n + 6 * resolution],
  408|  68.7k|                                p_qmf2[(n + 6 * resolution)], 31));
  409|  68.7k|    accu = ixheaac_add32_sat(
  410|  68.7k|        accu, ixheaac_mul32_sh(inp2[n + 8 * resolution],
  411|  68.7k|                                p_qmf2[(n + 8 * resolution)], 31));
  412|  68.7k|    p_out[n + 64] = accu;
  413|       |
  414|  68.7k|    accu = ixheaac_mul32_sh(inp2[n + 1 + 0], p_qmf2[(n + 1 + 0)], 31);
  415|  68.7k|    accu = ixheaac_add32_sat(
  416|  68.7k|        accu, ixheaac_mul32_sh(inp2[n + 1 + 2 * resolution],
  417|  68.7k|                                p_qmf2[(n + 1 + 2 * resolution)], 31));
  418|  68.7k|    accu = ixheaac_add32_sat(
  419|  68.7k|        accu, ixheaac_mul32_sh(inp2[n + 1 + 4 * resolution],
  420|  68.7k|                                p_qmf2[(n + 1 + 4 * resolution)], 31));
  421|  68.7k|    accu = ixheaac_add32_sat(
  422|  68.7k|        accu, ixheaac_mul32_sh(inp2[n + 1 + 6 * resolution],
  423|  68.7k|                                p_qmf2[(n + 1 + 6 * resolution)], 31));
  424|  68.7k|    accu = ixheaac_add32_sat(
  425|  68.7k|        accu, ixheaac_mul32_sh(inp2[n + 1 + 8 * resolution],
  426|  68.7k|                                p_qmf2[(n + 1 + 8 * resolution)], 31));
  427|  68.7k|    p_out[n + 1 + 64] = accu;
  428|  68.7k|  }
  429|  2.14k|}
ixheaacd_sbr_qmfanal32_winadd_eld_32:
  433|  64.1k|                                          const WORD32 *p_qmf2, WORD32 *p_out) {
  434|  64.1k|  WORD32 n;
  435|       |
  436|  1.09M|  for (n = 0; n < 32; n += 2) {
  ------------------
  |  Branch (436:15): [True: 1.02M, False: 64.1k]
  ------------------
  437|  1.02M|    WORD32 accu;
  438|  1.02M|    accu = ixheaac_mul32_sh(inp1[n + 0], p_qmf1[(n + 0)], 31);
  439|  1.02M|    accu = ixheaac_add32_sat(
  440|  1.02M|        accu, ixheaac_mul32_sh(inp1[n + 64], p_qmf1[(n + 64)], 31));
  441|  1.02M|    accu = ixheaac_add32_sat(
  442|  1.02M|        accu, ixheaac_mul32_sh(inp1[n + 128], p_qmf1[(n + 128)], 31));
  443|  1.02M|    accu = ixheaac_add32_sat(
  444|  1.02M|        accu, ixheaac_mul32_sh(inp1[n + 192], p_qmf1[(n + 192)], 31));
  445|  1.02M|    accu = ixheaac_add32_sat(
  446|  1.02M|        accu, ixheaac_mul32_sh(inp1[n + 256], p_qmf1[(n + 256)], 31));
  447|  1.02M|    p_out[n] = accu;
  448|       |
  449|  1.02M|    accu = ixheaac_mul32_sh(inp1[n + 1 + 0], p_qmf1[(n + 1 + 0)], 31);
  450|  1.02M|    accu = ixheaac_add32_sat(
  451|  1.02M|        accu, ixheaac_mul32_sh(inp1[n + 1 + 64], p_qmf1[(n + 1 + 64)], 31));
  452|  1.02M|    accu = ixheaac_add32_sat(
  453|  1.02M|        accu, ixheaac_mul32_sh(inp1[n + 1 + 128], p_qmf1[(n + 1 + 128)], 31));
  454|  1.02M|    accu = ixheaac_add32_sat(
  455|  1.02M|        accu, ixheaac_mul32_sh(inp1[n + 1 + 192], p_qmf1[(n + 1 + 192)], 31));
  456|  1.02M|    accu = ixheaac_add32_sat(
  457|  1.02M|        accu, ixheaac_mul32_sh(inp1[n + 1 + 256], p_qmf1[(n + 1 + 256)], 31));
  458|  1.02M|    p_out[n + 1] = accu;
  459|       |
  460|  1.02M|    accu = ixheaac_mul32_sh(inp2[n + 0], p_qmf2[(n + 0)], 31);
  461|  1.02M|    accu = ixheaac_add32_sat(
  462|  1.02M|        accu, ixheaac_mul32_sh(inp2[n + 64], p_qmf2[(n + 64)], 31));
  463|  1.02M|    accu = ixheaac_add32_sat(
  464|  1.02M|        accu, ixheaac_mul32_sh(inp2[n + 128], p_qmf2[(n + 128)], 31));
  465|  1.02M|    accu = ixheaac_add32_sat(
  466|  1.02M|        accu, ixheaac_mul32_sh(inp2[n + 192], p_qmf2[(n + 192)], 31));
  467|  1.02M|    accu = ixheaac_add32_sat(
  468|  1.02M|        accu, ixheaac_mul32_sh(inp2[n + 256], p_qmf2[(n + 256)], 31));
  469|  1.02M|    p_out[n + 32] = accu;
  470|       |
  471|  1.02M|    accu = ixheaac_mul32_sh(inp2[n + 1 + 0], p_qmf2[(n + 1 + 0)], 31);
  472|  1.02M|    accu = ixheaac_add32_sat(
  473|  1.02M|        accu, ixheaac_mul32_sh(inp2[n + 1 + 64], p_qmf2[(n + 1 + 64)], 31));
  474|  1.02M|    accu = ixheaac_add32_sat(
  475|  1.02M|        accu, ixheaac_mul32_sh(inp2[n + 1 + 128], p_qmf2[(n + 1 + 128)], 31));
  476|  1.02M|    accu = ixheaac_add32_sat(
  477|  1.02M|        accu, ixheaac_mul32_sh(inp2[n + 1 + 192], p_qmf2[(n + 1 + 192)], 31));
  478|  1.02M|    accu = ixheaac_add32_sat(
  479|  1.02M|        accu, ixheaac_mul32_sh(inp2[n + 1 + 256], p_qmf2[(n + 1 + 256)], 31));
  480|  1.02M|    p_out[n + 1 + 32] = accu;
  481|  1.02M|  }
  482|  64.1k|}
ixheaacd_sbr_qmfanal32_winadd_eld:
  486|   723k|                                       const WORD16 *p_qmf2, WORD32 *p_out) {
  487|   723k|  WORD32 n;
  488|       |
  489|  12.3M|  for (n = 0; n < 32; n += 2) {
  ------------------
  |  Branch (489:15): [True: 11.5M, False: 723k]
  ------------------
  490|  11.5M|    WORD32 accu;
  491|  11.5M|    accu = ixheaac_mult16x16in32(inp1[n + 0], p_qmf1[(n + 0)]);
  492|  11.5M|    accu = ixheaac_add32_sat(
  493|  11.5M|        accu, ixheaac_mult16x16in32(inp1[n + 64], p_qmf1[(n + 64)]));
  494|  11.5M|    accu = ixheaac_add32_sat(
  495|  11.5M|        accu, ixheaac_mult16x16in32(inp1[n + 128], p_qmf1[(n + 128)]));
  496|  11.5M|    accu = ixheaac_add32_sat(
  497|  11.5M|        accu, ixheaac_mult16x16in32(inp1[n + 192], p_qmf1[(n + 192)]));
  498|  11.5M|    accu = ixheaac_add32_sat(
  499|  11.5M|        accu, ixheaac_mult16x16in32(inp1[n + 256], p_qmf1[(n + 256)]));
  500|  11.5M|    p_out[n] = accu;
  501|       |
  502|  11.5M|    accu = ixheaac_mult16x16in32(inp1[n + 1 + 0], p_qmf1[(n + 1 + 0)]);
  503|  11.5M|    accu = ixheaac_add32_sat(
  504|  11.5M|        accu, ixheaac_mult16x16in32(inp1[n + 1 + 64], p_qmf1[(n + 1 + 64)]));
  505|  11.5M|    accu = ixheaac_add32_sat(
  506|  11.5M|        accu, ixheaac_mult16x16in32(inp1[n + 1 + 128], p_qmf1[(n + 1 + 128)]));
  507|  11.5M|    accu = ixheaac_add32_sat(
  508|  11.5M|        accu, ixheaac_mult16x16in32(inp1[n + 1 + 192], p_qmf1[(n + 1 + 192)]));
  509|  11.5M|    accu = ixheaac_add32_sat(
  510|  11.5M|        accu, ixheaac_mult16x16in32(inp1[n + 1 + 256], p_qmf1[(n + 1 + 256)]));
  511|  11.5M|    p_out[n + 1] = accu;
  512|       |
  513|  11.5M|    accu = ixheaac_mult16x16in32(inp2[n + 0], p_qmf2[(n + 0)]);
  514|  11.5M|    accu = ixheaac_add32_sat(
  515|  11.5M|        accu, ixheaac_mult16x16in32(inp2[n + 64], p_qmf2[(n + 64)]));
  516|  11.5M|    accu = ixheaac_add32_sat(
  517|  11.5M|        accu, ixheaac_mult16x16in32(inp2[n + 128], p_qmf2[(n + 128)]));
  518|  11.5M|    accu = ixheaac_add32_sat(
  519|  11.5M|        accu, ixheaac_mult16x16in32(inp2[n + 192], p_qmf2[(n + 192)]));
  520|  11.5M|    accu = ixheaac_add32_sat(
  521|  11.5M|        accu, ixheaac_mult16x16in32(inp2[n + 256], p_qmf2[(n + 256)]));
  522|  11.5M|    p_out[n + 32] = accu;
  523|       |
  524|  11.5M|    accu = ixheaac_mult16x16in32(inp2[n + 1 + 0], p_qmf2[(n + 1 + 0)]);
  525|  11.5M|    accu = ixheaac_add32_sat(
  526|  11.5M|        accu, ixheaac_mult16x16in32(inp2[n + 1 + 64], p_qmf2[(n + 1 + 64)]));
  527|  11.5M|    accu = ixheaac_add32_sat(
  528|  11.5M|        accu, ixheaac_mult16x16in32(inp2[n + 1 + 128], p_qmf2[(n + 1 + 128)]));
  529|  11.5M|    accu = ixheaac_add32_sat(
  530|  11.5M|        accu, ixheaac_mult16x16in32(inp2[n + 1 + 192], p_qmf2[(n + 1 + 192)]));
  531|  11.5M|    accu = ixheaac_add32_sat(
  532|  11.5M|        accu, ixheaac_mult16x16in32(inp2[n + 1 + 256], p_qmf2[(n + 1 + 256)]));
  533|  11.5M|    p_out[n + 1 + 32] = accu;
  534|  11.5M|  }
  535|   723k|}
ixheaacd_esbr_qmfanal32_winadd:
  539|  8.84M|                                    WORD32 num_band_anal_qmf) {
  540|  8.84M|  WORD32 n;
  541|  8.84M|  WORD64 accu;
  542|       |
  543|  8.84M|  if (num_band_anal_qmf == 32) {
  ------------------
  |  Branch (543:7): [True: 6.40M, False: 2.43M]
  ------------------
  544|   108M|    for (n = 0; n < num_band_anal_qmf; n += 2) {
  ------------------
  |  Branch (544:17): [True: 102M, False: 6.40M]
  ------------------
  545|   102M|      accu = ixheaac_mult64(inp1[n + 0], p_qmf1[2 * (n + 0)]);
  546|   102M|      accu = ixheaac_add64(
  547|   102M|          accu, ixheaac_mult64(inp1[n + 2 * num_band_anal_qmf],
  548|   102M|                                p_qmf1[2 * (n + 2 * num_band_anal_qmf)]));
  549|   102M|      accu = ixheaac_add64(
  550|   102M|          accu, ixheaac_mult64(inp1[n + 4 * num_band_anal_qmf],
  551|   102M|                                p_qmf1[2 * (n + 4 * num_band_anal_qmf)]));
  552|   102M|      accu = ixheaac_add64(
  553|   102M|          accu, ixheaac_mult64(inp1[n + 6 * num_band_anal_qmf],
  554|   102M|                                p_qmf1[2 * (n + 6 * num_band_anal_qmf)]));
  555|   102M|      accu = ixheaac_add64(
  556|   102M|          accu, ixheaac_mult64(inp1[n + 8 * num_band_anal_qmf],
  557|   102M|                                p_qmf1[2 * (n + 8 * num_band_anal_qmf)]));
  558|   102M|      p_out[n] = (WORD32)(accu >> 31);
  559|       |
  560|   102M|      accu = ixheaac_mult64(inp1[n + 1 + 0], p_qmf1[2 * (n + 1 + 0)]);
  561|   102M|      accu = ixheaac_add64(
  562|   102M|          accu, ixheaac_mult64(inp1[n + 1 + 2 * num_band_anal_qmf],
  563|   102M|                                p_qmf1[2 * (n + 1 + 2 * num_band_anal_qmf)]));
  564|   102M|      accu = ixheaac_add64(
  565|   102M|          accu, ixheaac_mult64(inp1[n + 1 + 4 * num_band_anal_qmf],
  566|   102M|                                p_qmf1[2 * (n + 1 + 4 * num_band_anal_qmf)]));
  567|   102M|      accu = ixheaac_add64(
  568|   102M|          accu, ixheaac_mult64(inp1[n + 1 + 6 * num_band_anal_qmf],
  569|   102M|                                p_qmf1[2 * (n + 1 + 6 * num_band_anal_qmf)]));
  570|   102M|      accu = ixheaac_add64(
  571|   102M|          accu, ixheaac_mult64(inp1[n + 1 + 8 * num_band_anal_qmf],
  572|   102M|                                p_qmf1[2 * (n + 1 + 8 * num_band_anal_qmf)]));
  573|   102M|      p_out[n + 1] = (WORD32)(accu >> 31);
  574|       |
  575|   102M|      accu = ixheaac_mult64(inp2[n + 0], p_qmf2[2 * (n + 0)]);
  576|   102M|      accu = ixheaac_add64(
  577|   102M|          accu, ixheaac_mult64(inp2[n + 2 * num_band_anal_qmf],
  578|   102M|                                p_qmf2[2 * (n + 2 * num_band_anal_qmf)]));
  579|   102M|      accu = ixheaac_add64(
  580|   102M|          accu, ixheaac_mult64(inp2[n + 4 * num_band_anal_qmf],
  581|   102M|                                p_qmf2[2 * (n + 4 * num_band_anal_qmf)]));
  582|   102M|      accu = ixheaac_add64(
  583|   102M|          accu, ixheaac_mult64(inp2[n + 6 * num_band_anal_qmf],
  584|   102M|                                p_qmf2[2 * (n + 6 * num_band_anal_qmf)]));
  585|   102M|      accu = ixheaac_add64(
  586|   102M|          accu, ixheaac_mult64(inp2[n + 8 * num_band_anal_qmf],
  587|   102M|                                p_qmf2[2 * (n + 8 * num_band_anal_qmf)]));
  588|   102M|      p_out[n + num_band_anal_qmf] = (WORD32)(accu >> 31);
  589|       |
  590|   102M|      accu = ixheaac_mult64(inp2[n + 1 + 0], p_qmf2[2 * (n + 1 + 0)]);
  591|   102M|      accu = ixheaac_add64(
  592|   102M|          accu, ixheaac_mult64(inp2[n + 1 + 2 * num_band_anal_qmf],
  593|   102M|                                p_qmf2[2 * (n + 1 + 2 * num_band_anal_qmf)]));
  594|   102M|      accu = ixheaac_add64(
  595|   102M|          accu, ixheaac_mult64(inp2[n + 1 + 4 * num_band_anal_qmf],
  596|   102M|                                p_qmf2[2 * (n + 1 + 4 * num_band_anal_qmf)]));
  597|   102M|      accu = ixheaac_add64(
  598|   102M|          accu, ixheaac_mult64(inp2[n + 1 + 6 * num_band_anal_qmf],
  599|   102M|                                p_qmf2[2 * (n + 1 + 6 * num_band_anal_qmf)]));
  600|   102M|      accu = ixheaac_add64(
  601|   102M|          accu, ixheaac_mult64(inp2[n + 1 + 8 * num_band_anal_qmf],
  602|   102M|                                p_qmf2[2 * (n + 1 + 8 * num_band_anal_qmf)]));
  603|   102M|      p_out[n + 1 + num_band_anal_qmf] = (WORD32)(accu >> 31);
  604|   102M|    }
  605|  6.40M|  } else if (num_band_anal_qmf == 24) {
  ------------------
  |  Branch (605:14): [True: 575k, False: 1.86M]
  ------------------
  606|  7.48M|    for (n = 0; n < num_band_anal_qmf; n += 2) {
  ------------------
  |  Branch (606:17): [True: 6.90M, False: 575k]
  ------------------
  607|  6.90M|      accu = ixheaac_mult64(inp1[n + 0], p_qmf1[(n + 0)]);
  608|  6.90M|      accu = ixheaac_add64(
  609|  6.90M|          accu, ixheaac_mult64(inp1[n + 2 * num_band_anal_qmf],
  610|  6.90M|                                p_qmf1[(n + 2 * num_band_anal_qmf)]));
  611|  6.90M|      accu = ixheaac_add64(
  612|  6.90M|          accu, ixheaac_mult64(inp1[n + 4 * num_band_anal_qmf],
  613|  6.90M|                                p_qmf1[(n + 4 * num_band_anal_qmf)]));
  614|  6.90M|      accu = ixheaac_add64(
  615|  6.90M|          accu, ixheaac_mult64(inp1[n + 6 * num_band_anal_qmf],
  616|  6.90M|                                p_qmf1[(n + 6 * num_band_anal_qmf)]));
  617|  6.90M|      accu = ixheaac_add64(
  618|  6.90M|          accu, ixheaac_mult64(inp1[n + 8 * num_band_anal_qmf],
  619|  6.90M|                                p_qmf1[(n + 8 * num_band_anal_qmf)]));
  620|  6.90M|      p_out[n] = (WORD32)(accu >> 31);
  621|       |
  622|  6.90M|      accu = ixheaac_mult64(inp1[n + 1 + 0], p_qmf1[(n + 1 + 0)]);
  623|  6.90M|      accu = ixheaac_add64(
  624|  6.90M|          accu, ixheaac_mult64(inp1[n + 1 + 2 * num_band_anal_qmf],
  625|  6.90M|                                p_qmf1[(n + 1 + 2 * num_band_anal_qmf)]));
  626|  6.90M|      accu = ixheaac_add64(
  627|  6.90M|          accu, ixheaac_mult64(inp1[n + 1 + 4 * num_band_anal_qmf],
  628|  6.90M|                                p_qmf1[(n + 1 + 4 * num_band_anal_qmf)]));
  629|  6.90M|      accu = ixheaac_add64(
  630|  6.90M|          accu, ixheaac_mult64(inp1[n + 1 + 6 * num_band_anal_qmf],
  631|  6.90M|                                p_qmf1[(n + 1 + 6 * num_band_anal_qmf)]));
  632|  6.90M|      accu = ixheaac_add64(
  633|  6.90M|          accu, ixheaac_mult64(inp1[n + 1 + 8 * num_band_anal_qmf],
  634|  6.90M|                                p_qmf1[(n + 1 + 8 * num_band_anal_qmf)]));
  635|  6.90M|      p_out[n + 1] = (WORD32)(accu >> 31);
  636|       |
  637|  6.90M|      accu = ixheaac_mult64(inp2[n + 0], p_qmf2[(n + 0)]);
  638|  6.90M|      accu = ixheaac_add64(
  639|  6.90M|          accu, ixheaac_mult64(inp2[n + 2 * num_band_anal_qmf],
  640|  6.90M|                                p_qmf2[(n + 2 * num_band_anal_qmf)]));
  641|  6.90M|      accu = ixheaac_add64(
  642|  6.90M|          accu, ixheaac_mult64(inp2[n + 4 * num_band_anal_qmf],
  643|  6.90M|                                p_qmf2[(n + 4 * num_band_anal_qmf)]));
  644|  6.90M|      accu = ixheaac_add64(
  645|  6.90M|          accu, ixheaac_mult64(inp2[n + 6 * num_band_anal_qmf],
  646|  6.90M|                                p_qmf2[(n + 6 * num_band_anal_qmf)]));
  647|  6.90M|      accu = ixheaac_add64(
  648|  6.90M|          accu, ixheaac_mult64(inp2[n + 8 * num_band_anal_qmf],
  649|  6.90M|                                p_qmf2[(n + 8 * num_band_anal_qmf)]));
  650|  6.90M|      p_out[n + num_band_anal_qmf] = (WORD32)(accu >> 31);
  651|       |
  652|  6.90M|      accu = ixheaac_mult64(inp2[n + 1 + 0], p_qmf2[(n + 1 + 0)]);
  653|  6.90M|      accu = ixheaac_add64(
  654|  6.90M|          accu, ixheaac_mult64(inp2[n + 1 + 2 * num_band_anal_qmf],
  655|  6.90M|                                p_qmf2[(n + 1 + 2 * num_band_anal_qmf)]));
  656|  6.90M|      accu = ixheaac_add64(
  657|  6.90M|          accu, ixheaac_mult64(inp2[n + 1 + 4 * num_band_anal_qmf],
  658|  6.90M|                                p_qmf2[(n + 1 + 4 * num_band_anal_qmf)]));
  659|  6.90M|      accu = ixheaac_add64(
  660|  6.90M|          accu, ixheaac_mult64(inp2[n + 1 + 6 * num_band_anal_qmf],
  661|  6.90M|                                p_qmf2[(n + 1 + 6 * num_band_anal_qmf)]));
  662|  6.90M|      accu = ixheaac_add64(
  663|  6.90M|          accu, ixheaac_mult64(inp2[n + 1 + 8 * num_band_anal_qmf],
  664|  6.90M|                                p_qmf2[(n + 1 + 8 * num_band_anal_qmf)]));
  665|  6.90M|      p_out[n + 1 + num_band_anal_qmf] = (WORD32)(accu >> 31);
  666|  6.90M|    }
  667|       |
  668|  1.86M|  } else {
  669|  16.7M|    for (n = 0; n < num_band_anal_qmf; n += 2) {
  ------------------
  |  Branch (669:17): [True: 14.8M, False: 1.86M]
  ------------------
  670|  14.8M|      accu = ixheaac_mult64(inp1[n + 0], p_qmf1[4 * (n + 0)]);
  671|  14.8M|      accu = ixheaac_add64(
  672|  14.8M|          accu, ixheaac_mult64(inp1[n + 2 * num_band_anal_qmf],
  673|  14.8M|                                p_qmf1[4 * (n + 2 * num_band_anal_qmf)]));
  674|  14.8M|      accu = ixheaac_add64(
  675|  14.8M|          accu, ixheaac_mult64(inp1[n + 4 * num_band_anal_qmf],
  676|  14.8M|                                p_qmf1[4 * (n + 4 * num_band_anal_qmf)]));
  677|  14.8M|      accu = ixheaac_add64(
  678|  14.8M|          accu, ixheaac_mult64(inp1[n + 6 * num_band_anal_qmf],
  679|  14.8M|                                p_qmf1[4 * (n + 6 * num_band_anal_qmf)]));
  680|  14.8M|      accu = ixheaac_add64(
  681|  14.8M|          accu, ixheaac_mult64(inp1[n + 8 * num_band_anal_qmf],
  682|  14.8M|                                p_qmf1[4 * (n + 8 * num_band_anal_qmf)]));
  683|  14.8M|      p_out[n] = (WORD32)(accu >> 31);
  684|       |
  685|  14.8M|      accu = ixheaac_mult64(inp1[n + 1 + 0], p_qmf1[4 * (n + 1 + 0)]);
  686|  14.8M|      accu = ixheaac_add64(
  687|  14.8M|          accu, ixheaac_mult64(inp1[n + 1 + 2 * num_band_anal_qmf],
  688|  14.8M|                                p_qmf1[4 * (n + 1 + 2 * num_band_anal_qmf)]));
  689|  14.8M|      accu = ixheaac_add64(
  690|  14.8M|          accu, ixheaac_mult64(inp1[n + 1 + 4 * num_band_anal_qmf],
  691|  14.8M|                                p_qmf1[4 * (n + 1 + 4 * num_band_anal_qmf)]));
  692|  14.8M|      accu = ixheaac_add64(
  693|  14.8M|          accu, ixheaac_mult64(inp1[n + 1 + 6 * num_band_anal_qmf],
  694|  14.8M|                                p_qmf1[4 * (n + 1 + 6 * num_band_anal_qmf)]));
  695|  14.8M|      accu = ixheaac_add64(
  696|  14.8M|          accu, ixheaac_mult64(inp1[n + 1 + 8 * num_band_anal_qmf],
  697|  14.8M|                                p_qmf1[4 * (n + 1 + 8 * num_band_anal_qmf)]));
  698|  14.8M|      p_out[n + 1] = (WORD32)(accu >> 31);
  699|       |
  700|  14.8M|      accu = ixheaac_mult64(inp2[n + 0], p_qmf2[4 * (n + 0)]);
  701|  14.8M|      accu = ixheaac_add64(
  702|  14.8M|          accu, ixheaac_mult64(inp2[n + 2 * num_band_anal_qmf],
  703|  14.8M|                                p_qmf2[4 * (n + 2 * num_band_anal_qmf)]));
  704|  14.8M|      accu = ixheaac_add64(
  705|  14.8M|          accu, ixheaac_mult64(inp2[n + 4 * num_band_anal_qmf],
  706|  14.8M|                                p_qmf2[4 * (n + 4 * num_band_anal_qmf)]));
  707|  14.8M|      accu = ixheaac_add64(
  708|  14.8M|          accu, ixheaac_mult64(inp2[n + 6 * num_band_anal_qmf],
  709|  14.8M|                                p_qmf2[4 * (n + 6 * num_band_anal_qmf)]));
  710|  14.8M|      accu = ixheaac_add64(
  711|  14.8M|          accu, ixheaac_mult64(inp2[n + 8 * num_band_anal_qmf],
  712|  14.8M|                                p_qmf2[4 * (n + 8 * num_band_anal_qmf)]));
  713|  14.8M|      p_out[n + num_band_anal_qmf] = (WORD32)(accu >> 31);
  714|       |
  715|  14.8M|      accu = ixheaac_mult64(inp2[n + 1 + 0], p_qmf2[4 * (n + 1 + 0)]);
  716|  14.8M|      accu = ixheaac_add64(
  717|  14.8M|          accu, ixheaac_mult64(inp2[n + 1 + 2 * num_band_anal_qmf],
  718|  14.8M|                                p_qmf2[4 * (n + 1 + 2 * num_band_anal_qmf)]));
  719|  14.8M|      accu = ixheaac_add64(
  720|  14.8M|          accu, ixheaac_mult64(inp2[n + 1 + 4 * num_band_anal_qmf],
  721|  14.8M|                                p_qmf2[4 * (n + 1 + 4 * num_band_anal_qmf)]));
  722|  14.8M|      accu = ixheaac_add64(
  723|  14.8M|          accu, ixheaac_mult64(inp2[n + 1 + 6 * num_band_anal_qmf],
  724|  14.8M|                                p_qmf2[4 * (n + 1 + 6 * num_band_anal_qmf)]));
  725|  14.8M|      accu = ixheaac_add64(
  726|  14.8M|          accu, ixheaac_mult64(inp2[n + 1 + 8 * num_band_anal_qmf],
  727|  14.8M|                                p_qmf2[4 * (n + 1 + 8 * num_band_anal_qmf)]));
  728|  14.8M|      p_out[n + 1 + num_band_anal_qmf] = (WORD32)(accu >> 31);
  729|  14.8M|    }
  730|  1.86M|  }
  731|  8.84M|}
ixheaacd_esbr_inv_modulation:
  735|  3.71M|    ia_qmf_dec_tables_struct *qmf_dec_tables_ptr, WORD32 no_synthesis_channels) {
  736|       |
  737|  3.71M|    if (no_synthesis_channels == NO_SYNTHESIS_CHANNELS_DOWN_SAMPLED)
  ------------------
  |  |   38|  3.71M|#define NO_SYNTHESIS_CHANNELS_DOWN_SAMPLED (NO_SYNTHESIS_CHANNELS / 2)
  |  |  ------------------
  |  |  |  |   34|  3.71M|#define NO_SYNTHESIS_CHANNELS 64
  |  |  ------------------
  ------------------
  |  Branch (737:9): [True: 7.04k, False: 3.71M]
  ------------------
  738|  7.04k|    {
  739|  7.04k|      ixheaacd_esbr_cos_sin_mod(qmf_real, syn_qmf, qmf_dec_tables_ptr->esbr_w_16,
  740|  7.04k|        qmf_dec_tables_ptr->dig_rev_table4_16);
  741|  7.04k|    }
  742|  3.71M|    else
  743|  3.71M|    {
  744|  3.71M|      ixheaacd_esbr_cos_sin_mod(qmf_real, syn_qmf, qmf_dec_tables_ptr->esbr_w_32,
  745|  3.71M|        qmf_dec_tables_ptr->dig_rev_table2_32);
  746|  3.71M|    }
  747|  3.71M|}
ixheaacd_sbr_qmfsyn32_winadd:
  751|   486k|                                  WORD32 ch_fac) {
  752|   486k|  WORD32 k;
  753|   486k|  WORD32 rounding_fac = 0x8000;
  754|   486k|  rounding_fac = rounding_fac >> shift;
  755|       |
  756|  16.0M|  for (k = 0; k < 32; k++) {
  ------------------
  |  Branch (756:15): [True: 15.5M, False: 486k]
  ------------------
  757|  15.5M|    WORD32 syn_out = rounding_fac;
  758|       |
  759|  15.5M|    syn_out = ixheaac_add32(
  760|  15.5M|        syn_out, ixheaac_mult16x16in32(tmp1[0 + k], inp1[2 * (k + 0)]));
  761|  15.5M|    syn_out = ixheaac_add32(
  762|  15.5M|        syn_out, ixheaac_mult16x16in32(tmp1[128 + k], inp1[2 * (k + 64)]));
  763|  15.5M|    syn_out = ixheaac_add32(
  764|  15.5M|        syn_out, ixheaac_mult16x16in32(tmp1[256 + k], inp1[2 * (k + 128)]));
  765|  15.5M|    syn_out = ixheaac_add32(
  766|  15.5M|        syn_out, ixheaac_mult16x16in32(tmp1[384 + k], inp1[2 * (k + 192)]));
  767|  15.5M|    syn_out = ixheaac_add32(
  768|  15.5M|        syn_out, ixheaac_mult16x16in32(tmp1[512 + k], inp1[2 * (k + 256)]));
  769|       |
  770|  15.5M|    syn_out = ixheaac_add32(
  771|  15.5M|        syn_out, ixheaac_mult16x16in32(tmp2[64 + k], inp1[2 * (k + 32)]));
  772|  15.5M|    syn_out = ixheaac_add32(
  773|  15.5M|        syn_out, ixheaac_mult16x16in32(tmp2[192 + k], inp1[2 * (k + 96)]));
  774|  15.5M|    syn_out = ixheaac_add32(
  775|  15.5M|        syn_out, ixheaac_mult16x16in32(tmp2[320 + k], inp1[2 * (k + 160)]));
  776|  15.5M|    syn_out = ixheaac_add32(
  777|  15.5M|        syn_out, ixheaac_mult16x16in32(tmp2[448 + k], inp1[2 * (k + 224)]));
  778|  15.5M|    syn_out = ixheaac_add32(
  779|  15.5M|        syn_out, ixheaac_mult16x16in32(tmp2[576 + k], inp1[2 * (k + 288)]));
  780|  15.5M|    syn_out = ixheaac_add32_sat(syn_out, syn_out);
  781|  15.5M|    if (shift == 2) {
  ------------------
  |  Branch (781:9): [True: 15.5M, False: 0]
  ------------------
  782|  15.5M|      syn_out = ixheaac_add32_sat(syn_out, syn_out);
  783|  15.5M|    }
  784|  15.5M|    sample_buffer[ch_fac * k] = (syn_out >> 16);
  785|  15.5M|  }
  786|   486k|}
ixheaacd_sbr_pre_twiddle:
  789|   787k|                              WORD16 *p_twiddles) {
  790|   787k|  int k;
  791|       |
  792|  50.4M|  for (k = 62; k >= 0; k--) {
  ------------------
  |  Branch (792:16): [True: 49.6M, False: 787k]
  ------------------
  793|  49.6M|    WORD32 x_re = *p_xre;
  794|  49.6M|    WORD32 x_im = *p_xim;
  795|       |
  796|  49.6M|    WORD16 ixheaacd_cosine = *p_twiddles++;
  797|  49.6M|    WORD16 ixheaacd_sine = *p_twiddles++;
  798|       |
  799|  49.6M|    WORD32 re, im;
  800|       |
  801|  49.6M|    re = ixheaac_mac32x16in32_shl_sat(
  802|  49.6M|        ixheaac_mult32x16in32_shl(x_re, ixheaacd_cosine), x_im, ixheaacd_sine);
  803|  49.6M|    im = ixheaac_sub32_sat(ixheaac_mult32x16in32_shl(x_im, ixheaacd_cosine),
  804|  49.6M|                            ixheaac_mult32x16in32_shl(x_re, ixheaacd_sine));
  805|       |
  806|  49.6M|    *p_xre++ = re;
  807|  49.6M|    *p_xim++ = im;
  808|  49.6M|  }
  809|   787k|}
ixheaacd_cplx_synt_qmffilt:
  818|  50.4k|    WORD32 drc_sbr_factors[][64], WORD32 audio_object_type) {
  819|  50.4k|  WORD32 i, j;
  820|       |
  821|  50.4k|  WORD32 code_scale_factor;
  822|  50.4k|  WORD32 scale_factor;
  823|  50.4k|  WORD32 out_scale_factor;
  824|  50.4k|  WORD32 low_band_scale_factor;
  825|  50.4k|  WORD32 high_band_scale_factor;
  826|  50.4k|  WORD16 *filter_states = qmf_bank->filter_states;
  827|  50.4k|  WORD32 **ptr_qmf_imag_temp;
  828|  50.4k|  WORD32 qmf_real2[2 * NO_SYNTHESIS_CHANNELS];
  829|       |
  830|  50.4k|  WORD32 no_synthesis_channels = qmf_bank->no_channels;
  831|  50.4k|  WORD32 p1;
  832|       |
  833|  50.4k|  WORD16 *fp1;
  834|  50.4k|  WORD16 *fp2;
  835|       |
  836|  50.4k|  WORD32 sixty4 = NO_SYNTHESIS_CHANNELS;
  ------------------
  |  |   34|  50.4k|#define NO_SYNTHESIS_CHANNELS 64
  ------------------
  837|  50.4k|  WORD32 thirty2 = qmf_bank->no_channels;
  838|       |
  839|  50.4k|  WORD16 *filter_coeff;
  840|  50.4k|  WORD32 num_time_slots = qmf_bank->num_time_slots;
  841|  50.4k|  WORD32 ixheaacd_drc_offset;
  842|  50.4k|  WORD32 ov_lb_scale = sbr_scale_factor->ov_lb_scale;
  843|  50.4k|  WORD32 lb_scale = sbr_scale_factor->lb_scale;
  844|  50.4k|  WORD32 st_syn_scale = sbr_scale_factor->st_syn_scale;
  845|  50.4k|  WORD32 ov_lb_shift, lb_shift, hb_shift;
  846|       |
  847|  50.4k|  WORD32 *qmf_real_tmp = qmf_real2;
  848|  50.4k|  WORD32 *qmf_imag_tmp = &qmf_real2[NO_SYNTHESIS_CHANNELS];
  ------------------
  |  |   34|  50.4k|#define NO_SYNTHESIS_CHANNELS 64
  ------------------
  849|  50.4k|  WORD32 env = 0;
  850|       |
  851|  50.4k|  WORD32 common_shift = 0;
  852|       |
  853|  50.4k|  if (no_synthesis_channels == 32) {
  ------------------
  |  Branch (853:7): [True: 31.0k, False: 19.4k]
  ------------------
  854|  31.0k|    qmf_bank->cos_twiddle =
  855|  31.0k|        (WORD16 *)sbr_tables_ptr->qmf_dec_tables_ptr->sbr_sin_cos_twiddle_l32;
  856|  31.0k|    qmf_bank->alt_sin_twiddle =
  857|  31.0k|        (WORD16 *)sbr_tables_ptr->qmf_dec_tables_ptr->sbr_alt_sin_twiddle_l32;
  858|  31.0k|    qmf_bank->t_cos =
  859|  31.0k|        (WORD16 *)
  860|  31.0k|            sbr_tables_ptr->qmf_dec_tables_ptr->sbr_cos_sin_twiddle_ds_l32;
  861|  31.0k|  } else {
  862|  19.4k|    qmf_bank->cos_twiddle =
  863|  19.4k|        (WORD16 *)sbr_tables_ptr->qmf_dec_tables_ptr->sbr_sin_cos_twiddle_l64;
  864|  19.4k|    qmf_bank->alt_sin_twiddle =
  865|  19.4k|        (WORD16 *)sbr_tables_ptr->qmf_dec_tables_ptr->sbr_alt_sin_twiddle_l64;
  866|  19.4k|  }
  867|  50.4k|  if (audio_object_type != AOT_ER_AAC_ELD &&
  ------------------
  |  Branch (867:7): [True: 0, False: 50.4k]
  ------------------
  868|      0|      audio_object_type != AOT_ER_AAC_LD) {
  ------------------
  |  Branch (868:7): [True: 0, False: 0]
  ------------------
  869|      0|    qmf_bank->filter_pos_syn +=
  870|      0|        (sbr_tables_ptr->qmf_dec_tables_ptr->qmf_c - qmf_bank->p_filter);
  871|      0|    qmf_bank->p_filter = sbr_tables_ptr->qmf_dec_tables_ptr->qmf_c;
  872|  50.4k|  } else {
  873|  50.4k|    qmf_bank->filter_pos_syn +=
  874|  50.4k|        (sbr_tables_ptr->qmf_dec_tables_ptr->qmf_c_eld - qmf_bank->p_filter);
  875|  50.4k|    qmf_bank->p_filter = sbr_tables_ptr->qmf_dec_tables_ptr->qmf_c_eld;
  876|  50.4k|  }
  877|       |
  878|  50.4k|  fp1 = &filter_states[0];
  879|  50.4k|  fp2 = fp1 + no_synthesis_channels;
  880|       |
  881|  50.4k|  if (audio_object_type == AOT_ER_AAC_ELD ||
  ------------------
  |  Branch (881:7): [True: 50.4k, False: 0]
  ------------------
  882|  50.4k|      audio_object_type == AOT_ER_AAC_LD) {
  ------------------
  |  Branch (882:7): [True: 0, False: 0]
  ------------------
  883|  50.4k|    fp1 = qmf_bank->fp1_syn;
  884|  50.4k|    fp2 = qmf_bank->fp2_syn;
  885|  50.4k|    sixty4 = qmf_bank->sixty4;
  886|  50.4k|  }
  887|       |
  888|  50.4k|  filter_coeff = qmf_bank->filter_pos_syn;
  889|       |
  890|  50.4k|  if (active) {
  ------------------
  |  Branch (890:7): [True: 0, False: 50.4k]
  ------------------
  891|      0|    code_scale_factor = scale_factor = sbr_scale_factor->ps_scale;
  892|  50.4k|  } else {
  893|  50.4k|    code_scale_factor = ixheaac_min32(lb_scale, ov_lb_scale);
  894|  50.4k|    scale_factor = sbr_scale_factor->hb_scale;
  895|  50.4k|  }
  896|       |
  897|  50.4k|  low_band_scale_factor = (st_syn_scale - code_scale_factor);
  898|  50.4k|  high_band_scale_factor = (st_syn_scale - scale_factor);
  899|       |
  900|  50.4k|  p1 = 0;
  901|       |
  902|  50.4k|  if (low_pow_flag)
  ------------------
  |  Branch (902:7): [True: 0, False: 50.4k]
  ------------------
  903|       |
  904|      0|  {
  905|      0|    ov_lb_shift = (st_syn_scale - ov_lb_scale) - 4;
  906|      0|    lb_shift = (st_syn_scale - lb_scale) - 4;
  907|      0|    hb_shift = high_band_scale_factor - 4;
  908|      0|    out_scale_factor = -((sbr_scale_factor->st_syn_scale - 1));
  909|      0|    ptr_qmf_imag_temp = 0;
  910|       |
  911|      0|  }
  912|       |
  913|  50.4k|  else {
  914|  50.4k|    out_scale_factor = -((sbr_scale_factor->st_syn_scale - 3));
  915|  50.4k|    if (active) {
  ------------------
  |  Branch (915:9): [True: 0, False: 50.4k]
  ------------------
  916|      0|      ov_lb_shift = (sbr_scale_factor->ps_scale - ov_lb_scale);
  917|      0|      lb_shift = (sbr_scale_factor->ps_scale - lb_scale);
  918|      0|      hb_shift = (sbr_scale_factor->ps_scale - sbr_scale_factor->hb_scale);
  919|      0|      common_shift = low_band_scale_factor - 8;
  920|       |
  921|  50.4k|    } else {
  922|  50.4k|      if (audio_object_type != AOT_ER_AAC_ELD &&
  ------------------
  |  Branch (922:11): [True: 0, False: 50.4k]
  ------------------
  923|      0|          audio_object_type != AOT_ER_AAC_LD) {
  ------------------
  |  Branch (923:11): [True: 0, False: 0]
  ------------------
  924|      0|        ov_lb_shift = (st_syn_scale - ov_lb_scale) - 8;
  925|      0|        lb_shift = (st_syn_scale - lb_scale) - 8;
  926|      0|        hb_shift = high_band_scale_factor - 8;
  927|  50.4k|      } else {
  928|  50.4k|        ov_lb_shift = (st_syn_scale - ov_lb_scale) - 7;
  929|  50.4k|        lb_shift = (st_syn_scale - lb_scale) - 7;
  930|  50.4k|        hb_shift = high_band_scale_factor - 7;
  931|  50.4k|      }
  932|  50.4k|      common_shift = 0;
  933|  50.4k|    }
  934|  50.4k|    ptr_qmf_imag_temp = qmf_imag;
  935|  50.4k|  }
  936|       |
  937|  50.4k|  {
  938|  50.4k|    if (ov_lb_shift == lb_shift) {
  ------------------
  |  Branch (938:9): [True: 50.4k, False: 0]
  ------------------
  939|  50.4k|      (*ixheaacd_adjust_scale)(qmf_real, ptr_qmf_imag_temp, 0, qmf_bank->lsb, 0,
  940|  50.4k|                               num_time_slots, ov_lb_shift, low_pow_flag);
  941|       |
  942|  50.4k|    } else {
  943|      0|      (*ixheaacd_adjust_scale)(qmf_real, ptr_qmf_imag_temp, 0, qmf_bank->lsb, 0,
  944|      0|                               split, ov_lb_shift, low_pow_flag);
  945|       |
  946|      0|      (*ixheaacd_adjust_scale)(qmf_real, ptr_qmf_imag_temp, 0, qmf_bank->lsb,
  947|      0|                               split, num_time_slots, lb_shift, low_pow_flag);
  948|      0|    }
  949|       |
  950|  50.4k|    (*ixheaacd_adjust_scale)(qmf_real, ptr_qmf_imag_temp, qmf_bank->lsb,
  951|  50.4k|                             qmf_bank->usb, 0, num_time_slots, hb_shift,
  952|  50.4k|                             low_pow_flag);
  953|  50.4k|  }
  954|       |
  955|  50.4k|  ixheaacd_drc_offset = qmf_bank->ixheaacd_drc_offset;
  956|       |
  957|  50.4k|  if (1 == drc_on) {
  ------------------
  |  Branch (957:7): [True: 48.2k, False: 2.22k]
  ------------------
  958|   801k|    for (i = 0; i < num_time_slots; i++) {
  ------------------
  |  Branch (958:17): [True: 753k, False: 48.2k]
  ------------------
  959|   753k|      WORD32 loop_val;
  960|  48.9M|      for (loop_val = 0; loop_val < 64; loop_val++) {
  ------------------
  |  Branch (960:26): [True: 48.2M, False: 753k]
  ------------------
  961|  48.2M|        qmf_real[i][loop_val] = ixheaacd_mult32x32in32_shift25(
  962|  48.2M|            qmf_real[i][loop_val], drc_sbr_factors[6 + i][loop_val]);
  963|  48.2M|      }
  964|   753k|    }
  965|  48.2k|  }
  966|   838k|  for (i = 0; i < num_time_slots; i++)
  ------------------
  |  Branch (966:15): [True: 787k, False: 50.4k]
  ------------------
  967|   787k|  {
  968|  35.6M|    for (j = 0; j < no_synthesis_channels; j++)
  ------------------
  |  Branch (968:17): [True: 34.8M, False: 787k]
  ------------------
  969|  34.8M|    {
  970|  34.8M|      qmf_real_out[i][j] = qmf_real[i][j];
  971|  34.8M|      if (!low_pow_flag)
  ------------------
  |  Branch (971:11): [True: 34.8M, False: 0]
  ------------------
  972|  34.8M|      {
  973|  34.8M|        qmf_imag_out[i][j] = qmf_imag[i][j];
  974|  34.8M|      }
  975|  34.8M|    }
  976|   787k|  }
  977|  50.4k|  if (low_pow_flag)
  ------------------
  |  Branch (977:7): [True: 0, False: 50.4k]
  ------------------
  978|      0|  {
  979|      0|    WORD16 *fptemp;
  980|       |
  981|      0|    VOID(*sbr_qmf_syn_winadd)
  982|      0|    (WORD16 *, WORD16 *, WORD16 *, WORD16 *, FLAG, WORD32);
  983|      0|    ia_qmf_dec_tables_struct *qmf_tab_ptr = sbr_tables_ptr->qmf_dec_tables_ptr;
  984|       |
  985|      0|    if (no_synthesis_channels == NO_SYNTHESIS_CHANNELS_DOWN_SAMPLED)
  ------------------
  |  |   38|      0|#define NO_SYNTHESIS_CHANNELS_DOWN_SAMPLED (NO_SYNTHESIS_CHANNELS / 2)
  |  |  ------------------
  |  |  |  |   34|      0|#define NO_SYNTHESIS_CHANNELS 64
  |  |  ------------------
  ------------------
  |  Branch (985:9): [True: 0, False: 0]
  ------------------
  986|      0|      sbr_qmf_syn_winadd = ixheaacd_sbr_qmfsyn32_winadd;
  987|      0|    else
  988|      0|      sbr_qmf_syn_winadd = ixheaacd_sbr_qmfsyn64_winadd;
  989|       |
  990|      0|    for (i = 0; i < num_time_slots; i++) {
  ------------------
  |  Branch (990:17): [True: 0, False: 0]
  ------------------
  991|      0|      ixheaacd_inv_modulation_lp(qmf_real[i],
  992|      0|                                 &filter_states[ixheaacd_drc_offset], qmf_bank,
  993|      0|                                 qmf_tab_ptr);
  994|       |
  995|      0|      sbr_qmf_syn_winadd(fp1, fp2, filter_coeff, &time_out[ch_fac * p1], 2,
  996|      0|                         ch_fac);
  997|       |
  998|      0|      ixheaacd_drc_offset -= no_synthesis_channels << 1;
  999|       |
 1000|      0|      if (ixheaacd_drc_offset < 0)
  ------------------
  |  Branch (1000:11): [True: 0, False: 0]
  ------------------
 1001|      0|        ixheaacd_drc_offset += ((no_synthesis_channels << 1) * 10);
 1002|       |
 1003|      0|      fptemp = fp1;
 1004|      0|      fp1 = fp2;
 1005|      0|      fp2 = fptemp;
 1006|       |
 1007|      0|      filter_coeff += 64;
 1008|       |
 1009|      0|      if (filter_coeff == qmf_bank->p_filter + 640)
  ------------------
  |  Branch (1009:11): [True: 0, False: 0]
  ------------------
 1010|      0|        filter_coeff = (WORD16 *)qmf_bank->p_filter;
 1011|       |
 1012|      0|      p1 += no_synthesis_channels;
 1013|      0|    }
 1014|       |
 1015|  50.4k|  } else {
 1016|   838k|    for (i = 0; i < num_time_slots; i++) {
  ------------------
  |  Branch (1016:17): [True: 787k, False: 50.4k]
  ------------------
 1017|   787k|      WORD32 *t_qmf_imag;
 1018|   787k|      t_qmf_imag = qmf_imag[i];
 1019|       |
 1020|   787k|      if (active) {
  ------------------
  |  Branch (1020:11): [True: 0, False: 787k]
  ------------------
 1021|      0|        if (i == ptr_ps_dec->border_position[env]) {
  ------------------
  |  Branch (1021:13): [True: 0, False: 0]
  ------------------
 1022|      0|          ixheaacd_init_rot_env(ptr_ps_dec, (WORD16)env, qmf_bank->usb,
 1023|      0|                                sbr_tables_ptr, pstr_common_tables->trig_data);
 1024|      0|          env++;
 1025|      0|        }
 1026|       |
 1027|      0|        ixheaacd_apply_ps(ptr_ps_dec, &qmf_real[i], &qmf_imag[i], qmf_real_tmp,
 1028|      0|                          qmf_imag_tmp, sbr_scale_factor, (WORD16)i,
 1029|      0|                          sbr_tables_ptr, num_time_slots);
 1030|      0|      }
 1031|   787k|      if (1 == drc_on) {
  ------------------
  |  Branch (1031:11): [True: 753k, False: 34.6k]
  ------------------
 1032|   753k|        WORD32 loop_val;
 1033|  48.9M|        for (loop_val = 0; loop_val < 64; loop_val++) {
  ------------------
  |  Branch (1033:28): [True: 48.2M, False: 753k]
  ------------------
 1034|  48.2M|          qmf_real[i][loop_val] = ixheaacd_mult32x32in32_shift25(
 1035|  48.2M|              qmf_real[i][loop_val], drc_sbr_factors[6 + i][loop_val]);
 1036|  48.2M|        }
 1037|   753k|      }
 1038|       |
 1039|   787k|      if (active) {
  ------------------
  |  Branch (1039:11): [True: 0, False: 787k]
  ------------------
 1040|      0|        if (common_shift)
  ------------------
  |  Branch (1040:13): [True: 0, False: 0]
  ------------------
 1041|      0|          ixheaacd_shiftrountine(qmf_real[i], t_qmf_imag, no_synthesis_channels,
 1042|      0|                                 common_shift);
 1043|      0|      }
 1044|       |
 1045|   787k|      if (audio_object_type == AOT_ER_AAC_ELD ||
  ------------------
  |  Branch (1045:11): [True: 787k, False: 0]
  ------------------
 1046|      0|          audio_object_type == AOT_ER_AAC_LD)
  ------------------
  |  Branch (1046:11): [True: 0, False: 0]
  ------------------
 1047|   787k|        ixheaacd_sbr_pre_twiddle(
 1048|   787k|            qmf_real[i], t_qmf_imag,
 1049|   787k|            sbr_tables_ptr->qmf_dec_tables_ptr->ixheaacd_sbr_synth_cos_sin_l32);
 1050|       |
 1051|   787k|      ixheaacd_inv_emodulation(qmf_real[i], qmf_bank,
 1052|   787k|                               sbr_tables_ptr->qmf_dec_tables_ptr);
 1053|       |
 1054|   787k|      {
 1055|   787k|        WORD32 temp_out_scale_fac = out_scale_factor + 1;
 1056|   787k|        if (audio_object_type == AOT_ER_AAC_LD ||
  ------------------
  |  Branch (1056:13): [True: 0, False: 787k]
  ------------------
 1057|   787k|            audio_object_type == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (1057:13): [True: 787k, False: 0]
  ------------------
 1058|   787k|          temp_out_scale_fac = temp_out_scale_fac - 1;
 1059|       |
 1060|   787k|          ixheaacd_shiftrountine_with_rnd_eld(
 1061|   787k|              qmf_real[i], t_qmf_imag, &filter_states[ixheaacd_drc_offset],
 1062|   787k|              no_synthesis_channels, temp_out_scale_fac);
 1063|       |
 1064|   787k|        }
 1065|       |
 1066|      0|        else {
 1067|      0|          ixheaacd_shiftrountine_with_rnd(
 1068|      0|              qmf_real[i], t_qmf_imag, &filter_states[ixheaacd_drc_offset],
 1069|      0|              no_synthesis_channels, temp_out_scale_fac);
 1070|      0|        }
 1071|   787k|      }
 1072|       |
 1073|   787k|      if (no_synthesis_channels == NO_SYNTHESIS_CHANNELS_DOWN_SAMPLED) {
  ------------------
  |  |   38|   787k|#define NO_SYNTHESIS_CHANNELS_DOWN_SAMPLED (NO_SYNTHESIS_CHANNELS / 2)
  |  |  ------------------
  |  |  |  |   34|   787k|#define NO_SYNTHESIS_CHANNELS 64
  |  |  ------------------
  ------------------
  |  Branch (1073:11): [True: 486k, False: 301k]
  ------------------
 1074|   486k|        WORD32 temp = 1;
 1075|   486k|        if (audio_object_type == AOT_ER_AAC_LD ||
  ------------------
  |  Branch (1075:13): [True: 0, False: 486k]
  ------------------
 1076|   486k|            audio_object_type == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (1076:13): [True: 486k, False: 0]
  ------------------
 1077|   486k|          temp = 2;
 1078|   486k|        }
 1079|   486k|        ixheaacd_sbr_qmfsyn32_winadd(fp1, fp2, filter_coeff,
 1080|   486k|                                     &time_out[ch_fac * p1], temp, ch_fac);
 1081|       |
 1082|   486k|        fp1 += thirty2;
 1083|   486k|        fp2 -= thirty2;
 1084|   486k|        thirty2 = -thirty2;
 1085|       |
 1086|   486k|        ixheaacd_drc_offset -= 64;
 1087|       |
 1088|   486k|        if (ixheaacd_drc_offset < 0) ixheaacd_drc_offset += 640;
  ------------------
  |  Branch (1088:13): [True: 49.6k, False: 436k]
  ------------------
 1089|       |
 1090|   486k|      } else {
 1091|   301k|        WORD32 temp = 1;
 1092|   301k|        if (audio_object_type == AOT_ER_AAC_LD ||
  ------------------
  |  Branch (1092:13): [True: 0, False: 301k]
  ------------------
 1093|   301k|            audio_object_type == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (1093:13): [True: 301k, False: 0]
  ------------------
 1094|   301k|          temp = 2;
 1095|   301k|        }
 1096|   301k|        ixheaacd_sbr_qmfsyn64_winadd(fp1, fp2, filter_coeff,
 1097|   301k|                                     &time_out[ch_fac * p1], temp, ch_fac);
 1098|       |
 1099|   301k|        fp1 += sixty4;
 1100|   301k|        fp2 -= sixty4;
 1101|   301k|        sixty4 = -sixty4;
 1102|   301k|        ixheaacd_drc_offset -= 128;
 1103|       |
 1104|   301k|        if (ixheaacd_drc_offset < 0) ixheaacd_drc_offset += 1280;
  ------------------
  |  Branch (1104:13): [True: 30.9k, False: 270k]
  ------------------
 1105|   301k|      }
 1106|       |
 1107|   787k|      filter_coeff += 64;
 1108|       |
 1109|   787k|      if (filter_coeff == qmf_bank->p_filter + 640)
  ------------------
  |  Branch (1109:11): [True: 76.7k, False: 711k]
  ------------------
 1110|  76.7k|        filter_coeff = (WORD16 *)qmf_bank->p_filter;
 1111|       |
 1112|   787k|      p1 += no_synthesis_channels;
 1113|       |
 1114|   787k|      if (active)
  ------------------
  |  Branch (1114:11): [True: 0, False: 787k]
  ------------------
 1115|      0|        memcpy(qmf_real[i], qmf_real_tmp,
 1116|      0|               2 * no_synthesis_channels * sizeof(WORD32));
 1117|   787k|    }
 1118|  50.4k|  }
 1119|       |
 1120|  50.4k|  if (audio_object_type == AOT_ER_AAC_LD ||
  ------------------
  |  Branch (1120:7): [True: 0, False: 50.4k]
  ------------------
 1121|  50.4k|      audio_object_type == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (1121:7): [True: 50.4k, False: 0]
  ------------------
 1122|  50.4k|    qmf_bank->fp1_syn = fp1;
 1123|  50.4k|    qmf_bank->fp2_syn = fp2;
 1124|  50.4k|    qmf_bank->sixty4 = sixty4;
 1125|  50.4k|  }
 1126|       |
 1127|  50.4k|  qmf_bank->filter_pos_syn = filter_coeff;
 1128|  50.4k|  qmf_bank->ixheaacd_drc_offset = ixheaacd_drc_offset;
 1129|  50.4k|}
ixheaacd_qmf_dec.c:ixheaacd_mult32x32in32_shift25:
   61|  96.4M|                                                             WORD32 b) {
   62|  96.4M|  WORD32 result;
   63|  96.4M|  WORD64 temp_result;
   64|       |
   65|  96.4M|  temp_result = (WORD64)a * (WORD64)b;
   66|       |
   67|  96.4M|  result = (WORD32)(temp_result >> 25);
   68|       |
   69|  96.4M|  return (result);
   70|  96.4M|}

ixheaacd_rvlc_read_bits:
  408|  5.96M|                               UWORD16 *ptr_position, UWORD8 read_direction) {
  409|  5.96M|  UWORD32 bit;
  410|  5.96M|  WORD32 read_bit_offset =
  411|  5.96M|      *ptr_position - (it_bit_buff->size - it_bit_buff->cnt_bits);
  412|       |
  413|  5.96M|  if (read_bit_offset) it_bit_buff->cnt_bits -= read_bit_offset;
  ------------------
  |  Branch (413:7): [True: 99.5k, False: 5.86M]
  ------------------
  414|       |
  415|  5.96M|  it_bit_buff->ptr_read_next =
  416|  5.96M|      it_bit_buff->ptr_bit_buf_base +
  417|  5.96M|      ((it_bit_buff->size - it_bit_buff->cnt_bits) >> 3);
  418|  5.96M|  it_bit_buff->bit_pos = ((it_bit_buff->size - it_bit_buff->cnt_bits) & 7);
  419|       |
  420|  5.96M|  if (read_direction == 0) {
  ------------------
  |  Branch (420:7): [True: 4.77M, False: 1.19M]
  ------------------
  421|  4.77M|    bit = ixheaacd_aac_read_bit_rev(it_bit_buff);
  422|       |
  423|  4.77M|    *ptr_position += 1;
  424|  4.77M|  } else {
  425|  1.19M|    bit = ixheaacd_aac_read_bit(it_bit_buff);
  426|       |
  427|  1.19M|    *ptr_position -= 1;
  428|  1.19M|  }
  429|       |
  430|  5.96M|  return (bit);
  431|  5.96M|}
ixheaacd_decode_rvlc_code_word:
  494|  1.05M|                                     ia_rvlc_info_struct *ptr_rvlc) {
  495|  1.05M|  WORD32 i;
  496|       |
  497|  1.05M|  UWORD8 carry_bit;
  498|       |
  499|  1.05M|  UWORD8 direction = ptr_rvlc->direction;
  500|  1.05M|  UWORD16 *ptr_bit_str_idx_rvl = ptr_rvlc->ptr_rvl_bit_str_idx;
  501|       |
  502|  1.05M|  int len = 0;
  503|  1.05M|  short codeword = 0;
  504|  1.05M|  int found = 0;
  505|  1.05M|  int indx;
  506|       |
  507|  2.62M|  for (i = MAX_LEN_RVLC_CODE_WORD - 1; i >= 0; i--) {
  ------------------
  |  |   89|  1.05M|#define MAX_LEN_RVLC_CODE_WORD 9
  ------------------
  |  Branch (507:40): [True: 2.59M, False: 32.5k]
  ------------------
  508|  2.59M|    carry_bit =
  509|  2.59M|        ixheaacd_rvlc_read_bits(it_bit_buff, ptr_bit_str_idx_rvl, direction);
  510|       |
  511|  2.59M|    len++;
  512|  2.59M|    codeword = codeword << 1 | carry_bit;
  513|  2.59M|    indx = ixheaacd_rvlc_decode(codeword, len, &found);
  514|  2.59M|    if (found) {
  ------------------
  |  Branch (514:9): [True: 1.02M, False: 1.56M]
  ------------------
  515|  1.02M|      indx = indx + 7;
  516|  1.02M|      *ptr_rvlc->ptr_rvl_bit_cnt -= (MAX_LEN_RVLC_CODE_WORD - i);
  ------------------
  |  |   89|  1.02M|#define MAX_LEN_RVLC_CODE_WORD 9
  ------------------
  517|  1.02M|      return indx;
  518|  1.02M|    }
  519|  2.59M|  }
  520|       |
  521|  32.5k|  return -1;
  522|  1.05M|}
ixheaacd_rvlc_read:
  861|  55.7k|    ia_aac_dec_channel_info_struct *ptr_aac_dec_channel_info) {
  862|  55.7k|  ia_rvlc_info_struct *ptr_rvlc = &ptr_aac_dec_channel_info->ptr_rvlc_info;
  863|       |
  864|  55.7k|  WORD32 group, band;
  865|       |
  866|  55.7k|  ptr_rvlc->num_wind_grps =
  867|  55.7k|      ptr_aac_dec_channel_info->str_ics_info.num_window_groups;
  868|  55.7k|  ptr_rvlc->max_sfb_transmitted =
  869|  55.7k|      ptr_aac_dec_channel_info->str_ics_info.max_sfb;
  870|  55.7k|  ptr_rvlc->noise_used = 0;
  871|  55.7k|  ptr_rvlc->dpcm_noise_nrg = 0;
  872|  55.7k|  ptr_rvlc->dpcm_noise_last_pos = 0;
  873|  55.7k|  ptr_rvlc->rvlc_esc_len = -1;
  874|  55.7k|  ptr_rvlc->dpcm_is_last_pos = 0;
  875|       |
  876|  55.7k|  ptr_rvlc->sf_concealment = ixheaacd_read_bits_buf(it_bit_buff, 1);
  877|  55.7k|  ptr_rvlc->rev_global_gain = ixheaacd_read_bits_buf(it_bit_buff, 8);
  878|       |
  879|  55.7k|  if (ptr_aac_dec_channel_info->str_ics_info.window_sequence ==
  ------------------
  |  Branch (879:7): [True: 2.84k, False: 52.9k]
  ------------------
  880|  55.7k|      EIGHT_SHORT_SEQUENCE) {
  ------------------
  |  |  102|  55.7k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  881|  2.84k|    ptr_rvlc->rvlc_sf_len = ixheaacd_read_bits_buf(it_bit_buff, 11);
  882|  52.9k|  } else {
  883|  52.9k|    ptr_rvlc->rvlc_sf_len = ixheaacd_read_bits_buf(it_bit_buff, 9);
  884|  52.9k|  }
  885|       |
  886|   123k|  for (group = 0; group < ptr_rvlc->num_wind_grps; group++) {
  ------------------
  |  Branch (886:19): [True: 67.3k, False: 55.7k]
  ------------------
  887|   550k|    for (band = 0; band < ptr_rvlc->max_sfb_transmitted; band++) {
  ------------------
  |  Branch (887:20): [True: 509k, False: 41.4k]
  ------------------
  888|   509k|      if (ptr_aac_dec_channel_info->ptr_code_book[16 * group + band] ==
  ------------------
  |  Branch (888:11): [True: 25.9k, False: 483k]
  ------------------
  889|   509k|          NOISE_HCB) {
  ------------------
  |  |   38|   509k|#define NOISE_HCB 13
  ------------------
  890|  25.9k|        ptr_rvlc->noise_used = 1;
  891|  25.9k|        break;
  892|  25.9k|      }
  893|   509k|    }
  894|  67.3k|  }
  895|       |
  896|  55.7k|  if (ptr_rvlc->noise_used)
  ------------------
  |  Branch (896:7): [True: 25.9k, False: 29.8k]
  ------------------
  897|  25.9k|    ptr_rvlc->dpcm_noise_nrg = ixheaacd_read_bits_buf(it_bit_buff, 9);
  898|       |
  899|  55.7k|  ptr_rvlc->sf_esc_present = ixheaacd_read_bits_buf(it_bit_buff, 1);
  900|       |
  901|  55.7k|  if (ptr_rvlc->sf_esc_present) {
  ------------------
  |  Branch (901:7): [True: 27.0k, False: 28.7k]
  ------------------
  902|  27.0k|    ptr_rvlc->rvlc_esc_len = ixheaacd_read_bits_buf(it_bit_buff, 8);
  903|  27.0k|  }
  904|       |
  905|  55.7k|  if (ptr_rvlc->noise_used) {
  ------------------
  |  Branch (905:7): [True: 25.9k, False: 29.8k]
  ------------------
  906|  25.9k|    ptr_rvlc->dpcm_noise_last_pos = ixheaacd_read_bits_buf(it_bit_buff, 9);
  907|  25.9k|    ptr_rvlc->rvlc_sf_len -= 9;
  908|  25.9k|  }
  909|       |
  910|  55.7k|  ptr_rvlc->rvlc_sf_fwd_len = ptr_rvlc->rvlc_sf_len;
  911|  55.7k|  ptr_rvlc->rvlc_sf_bwd_len = ptr_rvlc->rvlc_sf_len;
  912|  55.7k|}
ixheaacd_hcr_read:
  916|  42.4k|                       WORD32 ele_type) {
  917|  42.4k|  WORD16 len_reordered_spec_data;
  918|  42.4k|  WORD8 len_longest_code_word;
  919|       |
  920|  42.4k|  ptr_aac_dec_channel_info->reorder_spect_data_len = 0;
  921|  42.4k|  ptr_aac_dec_channel_info->longest_cw_len = 0;
  922|       |
  923|  42.4k|  len_reordered_spec_data = ixheaacd_read_bits_buf(it_bit_buff, 14);
  924|  42.4k|  if (ele_type == ID_CPE) {
  ------------------
  |  Branch (924:7): [True: 362, False: 42.1k]
  ------------------
  925|    362|    if ((len_reordered_spec_data >= 0) && (len_reordered_spec_data <= 12288)) {
  ------------------
  |  Branch (925:9): [True: 362, False: 0]
  |  Branch (925:43): [True: 347, False: 15]
  ------------------
  926|    347|      ptr_aac_dec_channel_info->reorder_spect_data_len =
  927|    347|          len_reordered_spec_data;
  928|    347|    } else {
  929|     15|      if (len_reordered_spec_data > 12288) {
  ------------------
  |  Branch (929:11): [True: 15, False: 0]
  ------------------
  930|     15|        ptr_aac_dec_channel_info->reorder_spect_data_len = 12288;
  931|     15|      }
  932|     15|    }
  933|  42.1k|  } else if (ele_type == ID_SCE || ele_type == ID_LFE || ele_type == ID_CCE) {
  ------------------
  |  Branch (933:14): [True: 42.1k, False: 0]
  |  Branch (933:36): [True: 0, False: 0]
  |  Branch (933:58): [True: 0, False: 0]
  ------------------
  934|  42.1k|    if ((len_reordered_spec_data >= 0) && (len_reordered_spec_data <= 6144)) {
  ------------------
  |  Branch (934:9): [True: 42.1k, False: 0]
  |  Branch (934:43): [True: 38.2k, False: 3.90k]
  ------------------
  935|  38.2k|      ptr_aac_dec_channel_info->reorder_spect_data_len =
  936|  38.2k|          len_reordered_spec_data;
  937|  38.2k|    } else {
  938|  3.90k|      if (len_reordered_spec_data > 6144) {
  ------------------
  |  Branch (938:11): [True: 3.90k, False: 0]
  ------------------
  939|  3.90k|        ptr_aac_dec_channel_info->reorder_spect_data_len = 6144;
  940|  3.90k|      }
  941|  3.90k|    }
  942|  42.1k|  }
  943|       |
  944|  42.4k|  len_longest_code_word = ixheaacd_read_bits_buf(it_bit_buff, 6);
  945|  42.4k|  if ((len_longest_code_word >= 0) && (len_longest_code_word <= 49)) {
  ------------------
  |  Branch (945:7): [True: 42.4k, False: 3]
  |  Branch (945:39): [True: 34.8k, False: 7.64k]
  ------------------
  946|  34.8k|    ptr_aac_dec_channel_info->longest_cw_len = len_longest_code_word;
  947|  34.8k|  } else {
  948|  7.64k|    if (len_longest_code_word > 49) {
  ------------------
  |  Branch (948:9): [True: 7.64k, False: 3]
  ------------------
  949|  7.64k|      ptr_aac_dec_channel_info->longest_cw_len = 49;
  950|  7.64k|    }
  951|  7.64k|  }
  952|  42.4k|}
ixheaacd_bi_dir_est_lower_scf_cur_frame:
 1258|  14.6k|    ia_aac_dec_channel_info_struct *ptr_aac_dec_channel_info) {
 1259|  14.6k|  ia_rvlc_info_struct *ptr_rvlc = &ptr_aac_dec_channel_info->ptr_rvlc_info;
 1260|  14.6k|  WORD32 band, bnds, start_band, end_band, group;
 1261|  14.6k|  WORD32 conceal_min, conceal_max;
 1262|  14.6k|  WORD32 conceal_group_min, conceal_group_max;
 1263|  14.6k|  WORD32 max_scf_bands;
 1264|       |
 1265|  14.6k|  if (ptr_aac_dec_channel_info->str_ics_info.window_sequence ==
  ------------------
  |  Branch (1265:7): [True: 86, False: 14.5k]
  ------------------
 1266|  14.6k|      EIGHT_SHORT_SEQUENCE) {
  ------------------
  |  |  102|  14.6k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
 1267|     86|    max_scf_bands = 16;
 1268|  14.5k|  } else {
 1269|  14.5k|    max_scf_bands = 64;
 1270|  14.5k|  }
 1271|       |
 1272|  14.6k|  if (ptr_rvlc->conceal_min == CONCEAL_MIN_INIT) ptr_rvlc->conceal_min = 0;
  ------------------
  |  |   93|  14.6k|#define CONCEAL_MIN_INIT -1311
  ------------------
  |  Branch (1272:7): [True: 9.24k, False: 5.44k]
  ------------------
 1273|       |
 1274|  14.6k|  if (ptr_rvlc->conceal_max == CONCEAL_MAX_INIT)
  ------------------
  |  |   92|  14.6k|#define CONCEAL_MAX_INIT 1311
  ------------------
  |  Branch (1274:7): [True: 2.01k, False: 12.6k]
  ------------------
 1275|  2.01k|    ptr_rvlc->conceal_max =
 1276|  2.01k|        (ptr_rvlc->num_wind_grps - 1) * 16 + ptr_rvlc->max_sfb_transmitted - 1;
 1277|       |
 1278|  14.6k|  conceal_min = ptr_rvlc->conceal_min % max_scf_bands;
 1279|  14.6k|  conceal_group_min = ptr_rvlc->conceal_min / max_scf_bands;
 1280|  14.6k|  conceal_max = ptr_rvlc->conceal_max % max_scf_bands;
 1281|  14.6k|  conceal_group_max = ptr_rvlc->conceal_max / max_scf_bands;
 1282|       |
 1283|  14.6k|  if (ptr_rvlc->conceal_min == ptr_rvlc->conceal_max) {
  ------------------
  |  Branch (1283:7): [True: 9.02k, False: 5.66k]
  ------------------
 1284|  9.02k|    WORD32 ref_fwd = 0, ref_nrg_fwd = 0, ref_scf_fwd = 0;
 1285|  9.02k|    WORD32 ref_bwd = 0, ref_nrg_bwd = 0, ref_scf_bwd = 0;
 1286|       |
 1287|  9.02k|    bnds = ptr_rvlc->conceal_min;
 1288|  9.02k|    ixheaacd_calc_ref_val_fwd(ptr_rvlc, ptr_aac_dec_channel_info, &ref_fwd,
 1289|  9.02k|                              &ref_nrg_fwd, &ref_scf_fwd);
 1290|  9.02k|    ixheaacd_calc_ref_val_bwd(ptr_rvlc, ptr_aac_dec_channel_info, &ref_bwd,
 1291|  9.02k|                              &ref_nrg_bwd, &ref_scf_bwd);
 1292|       |
 1293|  9.02k|    switch (ptr_aac_dec_channel_info->ptr_code_book[bnds]) {
 1294|  1.74k|      case ZERO_HCB:
  ------------------
  |  |   33|  1.74k|#define ZERO_HCB 0
  ------------------
  |  Branch (1294:7): [True: 1.74k, False: 7.27k]
  ------------------
 1295|  1.74k|        break;
 1296|    457|      case INTENSITY_HCB:
  ------------------
  |  |   40|    457|#define INTENSITY_HCB 15
  ------------------
  |  Branch (1296:7): [True: 457, False: 8.56k]
  ------------------
 1297|  3.02k|      case INTENSITY_HCB2:
  ------------------
  |  |   39|  3.02k|#define INTENSITY_HCB2 14
  ------------------
  |  Branch (1297:7): [True: 2.56k, False: 6.45k]
  ------------------
 1298|  3.02k|        if (ref_fwd < ref_bwd)
  ------------------
  |  Branch (1298:13): [True: 1.16k, False: 1.86k]
  ------------------
 1299|  1.16k|          ptr_aac_dec_channel_info->ptr_scale_factor[bnds] = ref_fwd;
 1300|  1.86k|        else
 1301|  1.86k|          ptr_aac_dec_channel_info->ptr_scale_factor[bnds] = ref_bwd;
 1302|  3.02k|        break;
 1303|  1.92k|      case NOISE_HCB:
  ------------------
  |  |   38|  1.92k|#define NOISE_HCB 13
  ------------------
  |  Branch (1303:7): [True: 1.92k, False: 7.09k]
  ------------------
 1304|  1.92k|        if (ref_nrg_fwd < ref_nrg_bwd)
  ------------------
  |  Branch (1304:13): [True: 782, False: 1.14k]
  ------------------
 1305|    782|          ptr_aac_dec_channel_info->ptr_scale_factor[bnds] = ref_nrg_fwd;
 1306|  1.14k|        else
 1307|  1.14k|          ptr_aac_dec_channel_info->ptr_scale_factor[bnds] = ref_nrg_bwd;
 1308|  1.92k|        break;
 1309|  2.32k|      default:
  ------------------
  |  Branch (1309:7): [True: 2.32k, False: 6.70k]
  ------------------
 1310|  2.32k|        if (ref_scf_fwd < ref_scf_bwd)
  ------------------
  |  Branch (1310:13): [True: 1.05k, False: 1.26k]
  ------------------
 1311|  1.05k|          ptr_aac_dec_channel_info->ptr_scale_factor[bnds] = ref_scf_fwd;
 1312|  1.26k|        else
 1313|  1.26k|          ptr_aac_dec_channel_info->ptr_scale_factor[bnds] = ref_scf_bwd;
 1314|  2.32k|        break;
 1315|  9.02k|    }
 1316|  9.02k|  } else {
 1317|  5.66k|    ptr_aac_dec_channel_info->rvlc_scf_fwd_arr[ptr_rvlc->conceal_max] =
 1318|  5.66k|        ptr_aac_dec_channel_info->rvlc_scf_bwd_arr[ptr_rvlc->conceal_max];
 1319|  5.66k|    ptr_aac_dec_channel_info->rvlc_scf_bwd_arr[ptr_rvlc->conceal_min] =
 1320|  5.66k|        ptr_aac_dec_channel_info->rvlc_scf_fwd_arr[ptr_rvlc->conceal_min];
 1321|       |
 1322|  5.66k|    start_band = conceal_min;
 1323|  5.66k|    if (conceal_group_min == conceal_group_max)
  ------------------
  |  Branch (1323:9): [True: 5.66k, False: 0]
  ------------------
 1324|  5.66k|      end_band = conceal_max;
 1325|      0|    else
 1326|      0|      end_band = ptr_rvlc->max_sfb_transmitted - 1;
 1327|       |
 1328|  11.3k|    for (group = conceal_group_min; group <= conceal_group_max; group++) {
  ------------------
  |  Branch (1328:37): [True: 5.66k, False: 5.66k]
  ------------------
 1329|   100k|      for (band = start_band; band <= end_band; band++) {
  ------------------
  |  Branch (1329:31): [True: 94.4k, False: 5.66k]
  ------------------
 1330|  94.4k|        bnds = 16 * group + band;
 1331|  94.4k|        if (ptr_aac_dec_channel_info->rvlc_scf_fwd_arr[bnds] <
  ------------------
  |  Branch (1331:13): [True: 23.2k, False: 71.2k]
  ------------------
 1332|  94.4k|            ptr_aac_dec_channel_info->rvlc_scf_bwd_arr[bnds])
 1333|  23.2k|          ptr_aac_dec_channel_info->ptr_scale_factor[bnds] =
 1334|  23.2k|              ptr_aac_dec_channel_info->rvlc_scf_fwd_arr[bnds];
 1335|  71.2k|        else
 1336|  71.2k|          ptr_aac_dec_channel_info->ptr_scale_factor[bnds] =
 1337|  71.2k|              ptr_aac_dec_channel_info->rvlc_scf_bwd_arr[bnds];
 1338|  94.4k|      }
 1339|  5.66k|      start_band = 0;
 1340|  5.66k|      if ((group + 1) == conceal_group_max) end_band = conceal_max;
  ------------------
  |  Branch (1340:11): [True: 0, False: 5.66k]
  ------------------
 1341|  5.66k|    }
 1342|  5.66k|  }
 1343|       |
 1344|  14.6k|  if (conceal_group_min == 0)
  ------------------
  |  Branch (1344:7): [True: 14.6k, False: 0]
  ------------------
 1345|  14.6k|    end_band = conceal_min;
 1346|      0|  else
 1347|      0|    end_band = ptr_rvlc->max_sfb_transmitted;
 1348|  29.3k|  for (group = 0; group <= conceal_group_min; group++) {
  ------------------
  |  Branch (1348:19): [True: 14.6k, False: 14.6k]
  ------------------
 1349|  71.3k|    for (band = 0; band < end_band; band++) {
  ------------------
  |  Branch (1349:20): [True: 56.6k, False: 14.6k]
  ------------------
 1350|  56.6k|      bnds = 16 * group + band;
 1351|  56.6k|      ptr_aac_dec_channel_info->ptr_scale_factor[bnds] =
 1352|  56.6k|          ptr_aac_dec_channel_info->rvlc_scf_fwd_arr[bnds];
 1353|  56.6k|    }
 1354|  14.6k|    if ((group + 1) == conceal_group_min) end_band = conceal_min;
  ------------------
  |  Branch (1354:9): [True: 0, False: 14.6k]
  ------------------
 1355|  14.6k|  }
 1356|       |
 1357|  14.6k|  start_band = conceal_max + 1;
 1358|  29.3k|  for (group = conceal_group_max; group < ptr_rvlc->num_wind_grps; group++) {
  ------------------
  |  Branch (1358:35): [True: 14.6k, False: 14.6k]
  ------------------
 1359|   143k|    for (band = start_band; band < ptr_rvlc->max_sfb_transmitted; band++) {
  ------------------
  |  Branch (1359:29): [True: 128k, False: 14.6k]
  ------------------
 1360|   128k|      bnds = 16 * group + band;
 1361|   128k|      ptr_aac_dec_channel_info->ptr_scale_factor[bnds] =
 1362|   128k|          ptr_aac_dec_channel_info->rvlc_scf_bwd_arr[bnds];
 1363|   128k|    }
 1364|  14.6k|    start_band = 0;
 1365|  14.6k|  }
 1366|  14.6k|}
ixheaacd_statistical_estimation:
 1369|  5.46k|    ia_aac_dec_channel_info_struct *ptr_aac_dec_channel_info) {
 1370|  5.46k|  ia_rvlc_info_struct *ptr_rvlc = &ptr_aac_dec_channel_info->ptr_rvlc_info;
 1371|  5.46k|  WORD32 band, bnds, group;
 1372|  5.46k|  WORD32 sum_fwd, sum_bwd;
 1373|  5.46k|  WORD32 sum_nrg_fwd, sum_nrg_bwd;
 1374|  5.46k|  WORD32 sum_scf_fwd, sum_scf_bwd;
 1375|  5.46k|  WORD32 use_fwd, use_nrg_fwd, use_scf_fwd;
 1376|       |
 1377|  5.46k|  sum_fwd = sum_bwd = sum_nrg_fwd = sum_nrg_bwd = sum_scf_fwd = sum_scf_bwd = 0;
 1378|  5.46k|  use_fwd = use_nrg_fwd = use_scf_fwd = 0;
 1379|       |
 1380|  10.9k|  for (group = 0; group < ptr_rvlc->num_wind_grps; group++) {
  ------------------
  |  Branch (1380:19): [True: 5.46k, False: 5.46k]
  ------------------
 1381|   149k|    for (band = 0; band < ptr_rvlc->max_sfb_transmitted; band++) {
  ------------------
  |  Branch (1381:20): [True: 143k, False: 5.46k]
  ------------------
 1382|   143k|      bnds = 16 * group + band;
 1383|   143k|      switch (ptr_aac_dec_channel_info->ptr_code_book[bnds]) {
 1384|  17.1k|        case ZERO_HCB:
  ------------------
  |  |   33|  17.1k|#define ZERO_HCB 0
  ------------------
  |  Branch (1384:9): [True: 17.1k, False: 126k]
  ------------------
 1385|  17.1k|          break;
 1386|       |
 1387|  51.3k|        case INTENSITY_HCB:
  ------------------
  |  |   40|  51.3k|#define INTENSITY_HCB 15
  ------------------
  |  Branch (1387:9): [True: 51.3k, False: 92.4k]
  ------------------
 1388|  53.9k|        case INTENSITY_HCB2:
  ------------------
  |  |   39|  53.9k|#define INTENSITY_HCB2 14
  ------------------
  |  Branch (1388:9): [True: 2.59k, False: 141k]
  ------------------
 1389|  53.9k|          sum_fwd += ptr_aac_dec_channel_info->rvlc_scf_fwd_arr[bnds];
 1390|  53.9k|          sum_bwd += ptr_aac_dec_channel_info->rvlc_scf_bwd_arr[bnds];
 1391|  53.9k|          break;
 1392|       |
 1393|  64.1k|        case NOISE_HCB:
  ------------------
  |  |   38|  64.1k|#define NOISE_HCB 13
  ------------------
  |  Branch (1393:9): [True: 64.1k, False: 79.7k]
  ------------------
 1394|  64.1k|          sum_nrg_fwd += ptr_aac_dec_channel_info->rvlc_scf_fwd_arr[bnds];
 1395|  64.1k|          sum_nrg_bwd += ptr_aac_dec_channel_info->rvlc_scf_bwd_arr[bnds];
 1396|  64.1k|          break;
 1397|       |
 1398|  8.56k|        default:
  ------------------
  |  Branch (1398:9): [True: 8.56k, False: 135k]
  ------------------
 1399|  8.56k|          sum_scf_fwd += ptr_aac_dec_channel_info->rvlc_scf_fwd_arr[bnds];
 1400|  8.56k|          sum_scf_bwd += ptr_aac_dec_channel_info->rvlc_scf_bwd_arr[bnds];
 1401|  8.56k|          break;
 1402|   143k|      }
 1403|   143k|    }
 1404|  5.46k|  }
 1405|       |
 1406|  5.46k|  if (sum_fwd < sum_bwd) use_fwd = 1;
  ------------------
  |  Branch (1406:7): [True: 1.54k, False: 3.92k]
  ------------------
 1407|       |
 1408|  5.46k|  if (sum_nrg_fwd < sum_nrg_bwd) use_nrg_fwd = 1;
  ------------------
  |  Branch (1408:7): [True: 2.01k, False: 3.45k]
  ------------------
 1409|       |
 1410|  5.46k|  if (sum_scf_fwd < sum_scf_bwd) use_scf_fwd = 1;
  ------------------
  |  Branch (1410:7): [True: 246, False: 5.22k]
  ------------------
 1411|       |
 1412|  10.9k|  for (group = 0; group < ptr_rvlc->num_wind_grps; group++) {
  ------------------
  |  Branch (1412:19): [True: 5.46k, False: 5.46k]
  ------------------
 1413|   149k|    for (band = 0; band < ptr_rvlc->max_sfb_transmitted; band++) {
  ------------------
  |  Branch (1413:20): [True: 143k, False: 5.46k]
  ------------------
 1414|   143k|      bnds = 16 * group + band;
 1415|   143k|      switch (ptr_aac_dec_channel_info->ptr_code_book[bnds]) {
 1416|  17.1k|        case ZERO_HCB:
  ------------------
  |  |   33|  17.1k|#define ZERO_HCB 0
  ------------------
  |  Branch (1416:9): [True: 17.1k, False: 126k]
  ------------------
 1417|  17.1k|          break;
 1418|       |
 1419|  51.3k|        case INTENSITY_HCB:
  ------------------
  |  |   40|  51.3k|#define INTENSITY_HCB 15
  ------------------
  |  Branch (1419:9): [True: 51.3k, False: 92.4k]
  ------------------
 1420|  53.9k|        case INTENSITY_HCB2:
  ------------------
  |  |   39|  53.9k|#define INTENSITY_HCB2 14
  ------------------
  |  Branch (1420:9): [True: 2.59k, False: 141k]
  ------------------
 1421|  53.9k|          if (use_fwd)
  ------------------
  |  Branch (1421:15): [True: 20.9k, False: 33.0k]
  ------------------
 1422|  20.9k|            ptr_aac_dec_channel_info->ptr_scale_factor[bnds] =
 1423|  20.9k|                ptr_aac_dec_channel_info->rvlc_scf_fwd_arr[bnds];
 1424|  33.0k|          else
 1425|  33.0k|            ptr_aac_dec_channel_info->ptr_scale_factor[bnds] =
 1426|  33.0k|                ptr_aac_dec_channel_info->rvlc_scf_bwd_arr[bnds];
 1427|  53.9k|          break;
 1428|       |
 1429|  64.1k|        case NOISE_HCB:
  ------------------
  |  |   38|  64.1k|#define NOISE_HCB 13
  ------------------
  |  Branch (1429:9): [True: 64.1k, False: 79.7k]
  ------------------
 1430|  64.1k|          if (use_nrg_fwd)
  ------------------
  |  Branch (1430:15): [True: 13.4k, False: 50.6k]
  ------------------
 1431|  13.4k|            ptr_aac_dec_channel_info->ptr_scale_factor[bnds] =
 1432|  13.4k|                ptr_aac_dec_channel_info->rvlc_scf_fwd_arr[bnds];
 1433|  50.6k|          else
 1434|  50.6k|            ptr_aac_dec_channel_info->ptr_scale_factor[bnds] =
 1435|  50.6k|                ptr_aac_dec_channel_info->rvlc_scf_bwd_arr[bnds];
 1436|  64.1k|          break;
 1437|       |
 1438|  8.56k|        default:
  ------------------
  |  Branch (1438:9): [True: 8.56k, False: 135k]
  ------------------
 1439|  8.56k|          if (use_scf_fwd)
  ------------------
  |  Branch (1439:15): [True: 674, False: 7.88k]
  ------------------
 1440|    674|            ptr_aac_dec_channel_info->ptr_scale_factor[bnds] =
 1441|    674|                ptr_aac_dec_channel_info->rvlc_scf_fwd_arr[bnds];
 1442|  7.88k|          else
 1443|  7.88k|            ptr_aac_dec_channel_info->ptr_scale_factor[bnds] =
 1444|  7.88k|                ptr_aac_dec_channel_info->rvlc_scf_bwd_arr[bnds];
 1445|  8.56k|          break;
 1446|   143k|      }
 1447|   143k|    }
 1448|  5.46k|  }
 1449|  5.46k|}
ixheaacd_rvlc_dec:
 1731|  55.6k|    ia_bit_buf_struct *it_bit_buff) {
 1732|  55.6k|  ia_rvlc_info_struct *ptr_rvlc = &ptr_aac_dec_channel_info->ptr_rvlc_info;
 1733|  55.6k|  ia_bit_buf_struct saved_it_bit_buff;
 1734|  55.6k|  IA_ERRORCODE error_code = 0;
 1735|  55.6k|  error_code =
 1736|  55.6k|      ixheaacd_rvlc_init(ptr_rvlc, ptr_aac_dec_channel_info, it_bit_buff);
 1737|  55.6k|  if (error_code) return error_code;
  ------------------
  |  Branch (1737:7): [True: 87, False: 55.5k]
  ------------------
 1738|       |
 1739|  55.5k|  ixheaacd_bitbuf_checkpoint(*it_bit_buff, saved_it_bit_buff);
  ------------------
  |  |  103|  55.5k|  (saved_bit_buf) = (it_bit_buf)
  ------------------
 1740|  55.5k|  if (ptr_rvlc->sf_esc_present)
  ------------------
  |  Branch (1740:7): [True: 26.9k, False: 28.6k]
  ------------------
 1741|  26.9k|    ixheaacd_rvlc_decode_escape(
 1742|  26.9k|        ptr_rvlc, ptr_aac_dec_channel_info->rvlc_scf_esc_arr, it_bit_buff);
 1743|       |
 1744|  55.5k|  ixheaacd_rvlc_decode_forward(ptr_rvlc, ptr_aac_dec_channel_info, it_bit_buff);
 1745|  55.5k|  ixheaacd_rvlc_decode_backward(ptr_rvlc, ptr_aac_dec_channel_info,
 1746|  55.5k|                                it_bit_buff);
 1747|  55.5k|  ixheaacd_rvlc_final_error_detection(ptr_aac_dec_channel_info,
 1748|  55.5k|                                      ptr_aac_dec_static_channel_info);
 1749|       |
 1750|  55.5k|  ptr_aac_dec_channel_info->rvlc_intensity_used = ptr_rvlc->intensity_used;
 1751|  55.5k|  ptr_aac_dec_channel_info->str_pns_info.pns_active = ptr_rvlc->noise_used;
 1752|       |
 1753|  55.5k|  ixheaacd_bitbuf_restore(*it_bit_buff, saved_it_bit_buff);
  ------------------
  |  |  105|  55.5k|  (it_bit_buf) = (saved_bit_buf)
  ------------------
 1754|  55.5k|  return error_code;
 1755|  55.6k|}
ixheaacd_rev_vlc.c:ixheaacd_rvlc_decode:
  107|  2.59M|static WORD32 ixheaacd_rvlc_decode(WORD16 cw, WORD32 len, WORD32 *found) {
  108|  2.59M|  WORD16 indx = 0;
  109|  2.59M|  *found = 0;
  110|  2.59M|  switch (len) {
  111|  1.05M|    case 1:
  ------------------
  |  Branch (111:5): [True: 1.05M, False: 1.53M]
  ------------------
  112|  1.05M|      if (cw == 0)
  ------------------
  |  Branch (112:11): [True: 643k, False: 416k]
  ------------------
  113|   643k|        indx = 0;
  114|   416k|      else
  115|   416k|        return 3;
  116|   643k|      break;
  117|   643k|    case 3:
  ------------------
  |  Branch (117:5): [True: 416k, False: 2.17M]
  ------------------
  118|   416k|      switch (cw) {
  119|  80.4k|        case 5:
  ------------------
  |  Branch (119:9): [True: 80.4k, False: 335k]
  ------------------
  120|  80.4k|          indx = -1;
  121|  80.4k|          break;
  122|   152k|        case 7:
  ------------------
  |  Branch (122:9): [True: 152k, False: 263k]
  ------------------
  123|   152k|          indx = 1;
  124|   152k|          break;
  125|   182k|        default:
  ------------------
  |  Branch (125:9): [True: 182k, False: 233k]
  ------------------
  126|   182k|          return 4;
  127|   416k|      }
  128|   233k|      break;
  129|   233k|    case 4:
  ------------------
  |  Branch (129:5): [True: 182k, False: 2.41M]
  ------------------
  130|   182k|      if (cw == 9)
  ------------------
  |  Branch (130:11): [True: 18.6k, False: 164k]
  ------------------
  131|  18.6k|        indx = -2;
  132|   164k|      else
  133|   164k|        return 5;
  134|  18.6k|      break;
  135|   164k|    case 5:
  ------------------
  |  Branch (135:5): [True: 164k, False: 2.43M]
  ------------------
  136|   164k|      switch (cw) {
  137|  24.2k|        case 17:
  ------------------
  |  Branch (137:9): [True: 24.2k, False: 140k]
  ------------------
  138|  24.2k|          indx = -3;
  139|  24.2k|          break;
  140|  18.6k|        case 27:
  ------------------
  |  Branch (140:9): [True: 18.6k, False: 145k]
  ------------------
  141|  18.6k|          indx = 2;
  142|  18.6k|          break;
  143|   121k|        default:
  ------------------
  |  Branch (143:9): [True: 121k, False: 42.8k]
  ------------------
  144|   121k|          return 6;
  145|   164k|      }
  146|  42.8k|      break;
  147|   121k|    case 6:
  ------------------
  |  Branch (147:5): [True: 121k, False: 2.47M]
  ------------------
  148|   121k|      switch (cw) {
  149|  5.26k|        case 33:
  ------------------
  |  Branch (149:9): [True: 5.26k, False: 116k]
  ------------------
  150|  5.26k|          indx = -4;
  151|  5.26k|          break;
  152|  3.37k|        case 51:
  ------------------
  |  Branch (152:9): [True: 3.37k, False: 118k]
  ------------------
  153|  3.37k|          indx = 3;
  154|  3.37k|          break;
  155|   112k|        default:
  ------------------
  |  Branch (155:9): [True: 112k, False: 8.63k]
  ------------------
  156|   112k|          return 7;
  157|   121k|      }
  158|  8.63k|      break;
  159|   112k|    case 7:
  ------------------
  |  Branch (159:5): [True: 112k, False: 2.48M]
  ------------------
  160|   112k|      switch (cw) {
  161|  15.2k|        case 65:
  ------------------
  |  Branch (161:9): [True: 15.2k, False: 97.5k]
  ------------------
  162|  15.2k|          indx = -7;
  163|  15.2k|          break;
  164|  21.2k|        case 107:
  ------------------
  |  Branch (164:9): [True: 21.2k, False: 91.5k]
  ------------------
  165|  21.2k|          indx = 4;
  166|  21.2k|          break;
  167|  13.9k|        case 99:
  ------------------
  |  Branch (167:9): [True: 13.9k, False: 98.8k]
  ------------------
  168|  13.9k|          indx = 7;
  169|  13.9k|          break;
  170|  62.3k|        default:
  ------------------
  |  Branch (170:9): [True: 62.3k, False: 50.4k]
  ------------------
  171|  62.3k|          return 8;
  172|   112k|      }
  173|  50.4k|      break;
  174|  62.3k|    case 8:
  ------------------
  |  Branch (174:5): [True: 62.3k, False: 2.53M]
  ------------------
  175|  62.3k|      switch (cw) {
  176|  1.32k|        case 129:
  ------------------
  |  Branch (176:9): [True: 1.32k, False: 61.0k]
  ------------------
  177|  1.32k|          indx = -5;
  178|  1.32k|          break;
  179|  1.44k|        case 195:
  ------------------
  |  Branch (179:9): [True: 1.44k, False: 60.9k]
  ------------------
  180|  1.44k|          indx = 5;
  181|  1.44k|          break;
  182|  59.5k|        default:
  ------------------
  |  Branch (182:9): [True: 59.5k, False: 2.76k]
  ------------------
  183|  59.5k|          return 9;
  184|  62.3k|      }
  185|  2.76k|      break;
  186|  59.5k|    case 9:
  ------------------
  |  Branch (186:5): [True: 59.5k, False: 2.53M]
  ------------------
  187|  59.5k|      switch (cw) {
  188|  9.52k|        case 257:
  ------------------
  |  Branch (188:9): [True: 9.52k, False: 50.0k]
  ------------------
  189|  9.52k|          indx = -6;
  190|  9.52k|          break;
  191|  17.5k|        case 427:
  ------------------
  |  Branch (191:9): [True: 17.5k, False: 42.0k]
  ------------------
  192|  17.5k|          indx = 6;
  193|  17.5k|          break;
  194|  32.5k|        default:
  ------------------
  |  Branch (194:9): [True: 32.5k, False: 27.0k]
  ------------------
  195|  32.5k|          return -1;
  196|  59.5k|      }
  197|  27.0k|      break;
  198|   416k|    default:
  ------------------
  |  Branch (198:5): [True: 416k, False: 2.17M]
  ------------------
  199|   416k|      return -1;
  200|  2.59M|  }
  201|  1.02M|  *found = 1;
  202|  1.02M|  return indx;
  203|  2.59M|}
ixheaacd_rev_vlc.c:ixheaacd_calc_ref_val_fwd:
 1147|  9.02k|    WORD32 *ref_nrg_fwd, WORD32 *ref_scf_fwd) {
 1148|  9.02k|  WORD32 band, bnds, group, start_band;
 1149|  9.02k|  WORD32 id_is, id_nrg, id_scf;
 1150|  9.02k|  WORD32 conceal_min, conceal_group_min;
 1151|  9.02k|  WORD32 max_scf_bands;
 1152|       |
 1153|  9.02k|  if (ptr_aac_dec_channel_info->str_ics_info.window_sequence ==
  ------------------
  |  Branch (1153:7): [True: 86, False: 8.93k]
  ------------------
 1154|  9.02k|      EIGHT_SHORT_SEQUENCE)
  ------------------
  |  |  102|  9.02k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
 1155|     86|    max_scf_bands = 16;
 1156|  8.93k|  else
 1157|  8.93k|    max_scf_bands = 64;
 1158|       |
 1159|  9.02k|  conceal_min = ptr_rvlc->conceal_min % max_scf_bands;
 1160|  9.02k|  conceal_group_min = ptr_rvlc->conceal_min / max_scf_bands;
 1161|       |
 1162|  9.02k|  id_is = id_nrg = id_scf = 1;
 1163|       |
 1164|  9.02k|  *ref_nrg_fwd = ptr_aac_dec_channel_info->global_gain - 90 - 256;
 1165|  9.02k|  *ref_scf_fwd = ptr_aac_dec_channel_info->global_gain;
 1166|       |
 1167|  9.02k|  start_band = conceal_min - 1;
 1168|  18.0k|  for (group = conceal_group_min; group >= 0; group--) {
  ------------------
  |  Branch (1168:35): [True: 9.02k, False: 9.02k]
  ------------------
 1169|  65.6k|    for (band = start_band; band >= 0; band--) {
  ------------------
  |  Branch (1169:29): [True: 56.6k, False: 9.02k]
  ------------------
 1170|  56.6k|      bnds = 16 * group + band;
 1171|  56.6k|      switch (ptr_aac_dec_channel_info->ptr_code_book[bnds]) {
 1172|  2.14k|        case ZERO_HCB:
  ------------------
  |  |   33|  2.14k|#define ZERO_HCB 0
  ------------------
  |  Branch (1172:9): [True: 2.14k, False: 54.4k]
  ------------------
 1173|  2.14k|          break;
 1174|  16.2k|        case INTENSITY_HCB:
  ------------------
  |  |   40|  16.2k|#define INTENSITY_HCB 15
  ------------------
  |  Branch (1174:9): [True: 16.2k, False: 40.3k]
  ------------------
 1175|  32.6k|        case INTENSITY_HCB2:
  ------------------
  |  |   39|  32.6k|#define INTENSITY_HCB2 14
  ------------------
  |  Branch (1175:9): [True: 16.3k, False: 40.2k]
  ------------------
 1176|  32.6k|          if (id_is) {
  ------------------
  |  Branch (1176:15): [True: 2.60k, False: 29.9k]
  ------------------
 1177|  2.60k|            *ref_fwd = ptr_aac_dec_channel_info->rvlc_scf_fwd_arr[bnds];
 1178|  2.60k|            id_is = 0;
 1179|  2.60k|          }
 1180|  32.6k|          break;
 1181|  18.9k|        case NOISE_HCB:
  ------------------
  |  |   38|  18.9k|#define NOISE_HCB 13
  ------------------
  |  Branch (1181:9): [True: 18.9k, False: 37.6k]
  ------------------
 1182|  18.9k|          if (id_nrg) {
  ------------------
  |  Branch (1182:15): [True: 2.29k, False: 16.6k]
  ------------------
 1183|  2.29k|            *ref_nrg_fwd = ptr_aac_dec_channel_info->rvlc_scf_fwd_arr[bnds];
 1184|  2.29k|            id_nrg = 0;
 1185|  2.29k|          }
 1186|  18.9k|          break;
 1187|  2.93k|        default:
  ------------------
  |  Branch (1187:9): [True: 2.93k, False: 53.6k]
  ------------------
 1188|  2.93k|          if (id_scf) {
  ------------------
  |  Branch (1188:15): [True: 1.10k, False: 1.83k]
  ------------------
 1189|  1.10k|            *ref_scf_fwd = ptr_aac_dec_channel_info->rvlc_scf_fwd_arr[bnds];
 1190|  1.10k|            id_scf = 0;
 1191|  1.10k|          }
 1192|  2.93k|          break;
 1193|  56.6k|      }
 1194|  56.6k|    }
 1195|  9.02k|    start_band = ptr_rvlc->max_sfb_transmitted - 1;
 1196|  9.02k|  }
 1197|  9.02k|}
ixheaacd_rev_vlc.c:ixheaacd_calc_ref_val_bwd:
 1202|  9.02k|    WORD32 *ref_nrg_bwd, WORD32 *ref_scf_bwd) {
 1203|  9.02k|  WORD32 band, bnds, group, start_band;
 1204|  9.02k|  WORD32 id_is, id_nrg, id_scf;
 1205|  9.02k|  WORD32 conceal_max, conceal_group_max;
 1206|  9.02k|  WORD32 max_scf_bands;
 1207|       |
 1208|  9.02k|  if (ptr_aac_dec_channel_info->str_ics_info.window_sequence ==
  ------------------
  |  Branch (1208:7): [True: 86, False: 8.93k]
  ------------------
 1209|  9.02k|      EIGHT_SHORT_SEQUENCE)
  ------------------
  |  |  102|  9.02k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
 1210|     86|    max_scf_bands = 16;
 1211|  8.93k|  else
 1212|  8.93k|    max_scf_bands = 64;
 1213|       |
 1214|  9.02k|  conceal_max = ptr_rvlc->conceal_max % max_scf_bands;
 1215|  9.02k|  conceal_group_max = ptr_rvlc->conceal_max / max_scf_bands;
 1216|       |
 1217|  9.02k|  id_is = id_nrg = id_scf = 1;
 1218|       |
 1219|  9.02k|  *ref_bwd = ptr_rvlc->dpcm_is_last_pos;
 1220|  9.02k|  *ref_nrg_bwd = ptr_rvlc->rev_global_gain + ptr_rvlc->dpcm_noise_last_pos -
 1221|  9.02k|                 90 - 256 + ptr_rvlc->dpcm_noise_nrg;
 1222|  9.02k|  *ref_scf_bwd = ptr_rvlc->rev_global_gain;
 1223|       |
 1224|  9.02k|  start_band = conceal_max + 1;
 1225|       |
 1226|  18.0k|  for (group = conceal_group_max; group < ptr_rvlc->num_wind_grps; group++) {
  ------------------
  |  Branch (1226:35): [True: 9.02k, False: 9.02k]
  ------------------
 1227|  74.4k|    for (band = start_band; band < ptr_rvlc->max_sfb_transmitted; band++) {
  ------------------
  |  Branch (1227:29): [True: 65.4k, False: 9.02k]
  ------------------
 1228|  65.4k|      bnds = 16 * group + band;
 1229|  65.4k|      switch (ptr_aac_dec_channel_info->ptr_code_book[bnds]) {
 1230|    361|        case ZERO_HCB:
  ------------------
  |  |   33|    361|#define ZERO_HCB 0
  ------------------
  |  Branch (1230:9): [True: 361, False: 65.0k]
  ------------------
 1231|    361|          break;
 1232|  7.27k|        case INTENSITY_HCB:
  ------------------
  |  |   40|  7.27k|#define INTENSITY_HCB 15
  ------------------
  |  Branch (1232:9): [True: 7.27k, False: 58.1k]
  ------------------
 1233|  55.0k|        case INTENSITY_HCB2:
  ------------------
  |  |   39|  55.0k|#define INTENSITY_HCB2 14
  ------------------
  |  Branch (1233:9): [True: 47.7k, False: 17.6k]
  ------------------
 1234|  55.0k|          if (id_is) {
  ------------------
  |  Branch (1234:15): [True: 3.57k, False: 51.4k]
  ------------------
 1235|  3.57k|            *ref_bwd = ptr_aac_dec_channel_info->rvlc_scf_bwd_arr[bnds];
 1236|  3.57k|            id_is = 0;
 1237|  3.57k|          }
 1238|  55.0k|          break;
 1239|  8.87k|        case NOISE_HCB:
  ------------------
  |  |   38|  8.87k|#define NOISE_HCB 13
  ------------------
  |  Branch (1239:9): [True: 8.87k, False: 56.5k]
  ------------------
 1240|  8.87k|          if (id_nrg) {
  ------------------
  |  Branch (1240:15): [True: 867, False: 8.00k]
  ------------------
 1241|    867|            *ref_nrg_bwd = ptr_aac_dec_channel_info->rvlc_scf_bwd_arr[bnds];
 1242|    867|            id_nrg = 0;
 1243|    867|          }
 1244|  8.87k|          break;
 1245|  1.17k|        default:
  ------------------
  |  Branch (1245:9): [True: 1.17k, False: 64.2k]
  ------------------
 1246|  1.17k|          if (id_scf) {
  ------------------
  |  Branch (1246:15): [True: 334, False: 840]
  ------------------
 1247|    334|            *ref_scf_bwd = ptr_aac_dec_channel_info->rvlc_scf_bwd_arr[bnds];
 1248|    334|            id_scf = 0;
 1249|    334|          }
 1250|  1.17k|          break;
 1251|  65.4k|      }
 1252|  65.4k|    }
 1253|  9.02k|    start_band = 0;
 1254|  9.02k|  }
 1255|  9.02k|}
ixheaacd_rev_vlc.c:ixheaacd_rvlc_init:
  957|  55.6k|    ia_bit_buf_struct *it_bit_buff) {
  958|  55.6k|  WORD16 *ptr_scf_esc = ptr_aac_dec_channel_info->rvlc_scf_esc_arr;
  959|  55.6k|  WORD16 *ptr_scf_fwd = ptr_aac_dec_channel_info->rvlc_scf_fwd_arr;
  960|  55.6k|  WORD16 *ptr_scf_bwd = ptr_aac_dec_channel_info->rvlc_scf_bwd_arr;
  961|  55.6k|  WORD16 *ptr_scale_factor = ptr_aac_dec_channel_info->ptr_scale_factor;
  962|  55.6k|  WORD32 bnds;
  963|       |
  964|  55.6k|  ptr_aac_dec_channel_info->rvlc_intensity_used = 0;
  965|       |
  966|  55.6k|  ptr_rvlc->num_esc_words_decoded = 0;
  967|  55.6k|  ptr_rvlc->num_fwd_esc_words_decoded = 0;
  968|  55.6k|  ptr_rvlc->num_bwd_esc_words_decoded = 0;
  969|       |
  970|  55.6k|  ptr_rvlc->intensity_used = 0;
  971|  55.6k|  ptr_rvlc->rvlc_err_log = 0;
  972|       |
  973|  55.6k|  ptr_rvlc->conceal_max = CONCEAL_MAX_INIT;
  ------------------
  |  |   92|  55.6k|#define CONCEAL_MAX_INIT 1311
  ------------------
  974|  55.6k|  ptr_rvlc->conceal_min = CONCEAL_MIN_INIT;
  ------------------
  |  |   93|  55.6k|#define CONCEAL_MIN_INIT -1311
  ------------------
  975|       |
  976|  55.6k|  ptr_rvlc->conceal_max_esc = CONCEAL_MAX_INIT;
  ------------------
  |  |   92|  55.6k|#define CONCEAL_MAX_INIT 1311
  ------------------
  977|  55.6k|  ptr_rvlc->conceal_min_esc = CONCEAL_MIN_INIT;
  ------------------
  |  |   93|  55.6k|#define CONCEAL_MIN_INIT -1311
  ------------------
  978|       |
  979|  7.17M|  for (bnds = 0; bnds < RVLC_MAX_SFB; bnds++) {
  ------------------
  |  |   95|  7.17M|#define RVLC_MAX_SFB ((8) * (16))
  ------------------
  |  Branch (979:18): [True: 7.12M, False: 55.6k]
  ------------------
  980|  7.12M|    ptr_scf_fwd[bnds] = 0;
  981|  7.12M|    ptr_scf_bwd[bnds] = 0;
  982|  7.12M|    ptr_scf_esc[bnds] = 0;
  983|  7.12M|    ptr_scale_factor[bnds] = 0;
  984|  7.12M|  }
  985|       |
  986|  55.6k|  ptr_rvlc->rvl_fwd_bit_str_idx = it_bit_buff->size - it_bit_buff->cnt_bits;
  987|  55.6k|  ptr_rvlc->rvl_bwd_bit_str_idx =
  988|  55.6k|      it_bit_buff->size - it_bit_buff->cnt_bits + ptr_rvlc->rvlc_sf_len - 1;
  989|       |
  990|  55.6k|  it_bit_buff->cnt_bits -= ptr_rvlc->rvlc_sf_len;
  991|  55.6k|  it_bit_buff->ptr_read_next =
  992|  55.6k|      it_bit_buff->ptr_bit_buf_base +
  993|  55.6k|      ((it_bit_buff->size - it_bit_buff->cnt_bits) >> 3);
  994|  55.6k|  it_bit_buff->bit_pos = ((it_bit_buff->size - it_bit_buff->cnt_bits) & 7);
  995|       |
  996|  55.6k|  if (ptr_rvlc->sf_esc_present != 0) {
  ------------------
  |  Branch (996:7): [True: 26.9k, False: 28.6k]
  ------------------
  997|  26.9k|    ptr_rvlc->esc_bit_str_idx = it_bit_buff->size - it_bit_buff->cnt_bits;
  998|       |
  999|  26.9k|    it_bit_buff->cnt_bits -= ptr_rvlc->rvlc_esc_len;
 1000|  26.9k|    it_bit_buff->ptr_read_next =
 1001|  26.9k|        it_bit_buff->ptr_bit_buf_base +
 1002|  26.9k|        ((it_bit_buff->size - it_bit_buff->cnt_bits) >> 3);
 1003|  26.9k|    it_bit_buff->bit_pos = ((it_bit_buff->size - it_bit_buff->cnt_bits) & 7);
 1004|  26.9k|  }
 1005|  55.6k|  if (it_bit_buff->cnt_bits < 0) {
  ------------------
  |  Branch (1005:7): [True: 87, False: 55.5k]
  ------------------
 1006|     87|    return IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES;
  ------------------
  |  |   98|     87|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
 1007|     87|  } else
 1008|  55.5k|    return IA_NO_ERROR;
  ------------------
  |  |   23|  55.5k|#define IA_NO_ERROR 0x00000000
  ------------------
 1009|  55.6k|}
ixheaacd_rev_vlc.c:ixheaacd_rvlc_decode_escape:
  469|  26.9k|                                        ia_bit_buf_struct *it_bit_buff) {
  470|  26.9k|  WORD8 esc_word;
  471|  26.9k|  WORD8 esc_cnt = 0;
  472|  26.9k|  WORD16 *ptr_esc_bit_cnt_sum;
  473|       |
  474|  26.9k|  ptr_esc_bit_cnt_sum = &(ptr_rvlc->rvlc_esc_len);
  475|       |
  476|  1.13M|  while (*ptr_esc_bit_cnt_sum > 0) {
  ------------------
  |  Branch (476:10): [True: 1.10M, False: 26.9k]
  ------------------
  477|  1.10M|    esc_word = ixheaacd_rvlc_decode_escape_word(ptr_rvlc, it_bit_buff);
  478|       |
  479|  1.10M|    if (esc_word >= 0) {
  ------------------
  |  Branch (479:9): [True: 1.10M, False: 0]
  ------------------
  480|  1.10M|      ptr_escape[esc_cnt] = esc_word;
  481|  1.10M|      esc_cnt++;
  482|  1.10M|    } else {
  483|      0|      ptr_rvlc->rvlc_err_log |= RVLC_ERROR_ALL_ESCAPE_WORDS_INVALID;
  ------------------
  |  |   82|      0|#define RVLC_ERROR_ALL_ESCAPE_WORDS_INVALID 0x80000000
  ------------------
  484|      0|      ptr_rvlc->num_esc_words_decoded = esc_cnt;
  485|       |
  486|      0|      return;
  487|      0|    }
  488|  1.10M|  }
  489|       |
  490|  26.9k|  ptr_rvlc->num_esc_words_decoded = esc_cnt;
  491|  26.9k|}
ixheaacd_rev_vlc.c:ixheaacd_rvlc_decode_escape_word:
  434|  1.10M|                                              ia_bit_buf_struct *it_bit_buff) {
  435|  1.10M|  WORD32 i;
  436|       |
  437|  1.10M|  UWORD8 carry_bit;
  438|       |
  439|  1.10M|  UWORD16 *ptr_bitstream_index_esc;
  440|       |
  441|  1.10M|  int len = 0;
  442|  1.10M|  int codeword = 0;
  443|  1.10M|  int found = 0;
  444|  1.10M|  int indx;
  445|       |
  446|  1.10M|  ptr_bitstream_index_esc = &(ptr_rvlc->esc_bit_str_idx);
  447|       |
  448|  3.37M|  for (i = MAX_LEN_RVLC_ESCAPE_WORD - 1; i >= 0; i--) {
  ------------------
  |  |   90|  1.10M|#define MAX_LEN_RVLC_ESCAPE_WORD 20
  ------------------
  |  Branch (448:42): [True: 3.37M, False: 0]
  ------------------
  449|  3.37M|    carry_bit =
  450|  3.37M|        ixheaacd_rvlc_read_bits(it_bit_buff, ptr_bitstream_index_esc, FWD);
  ------------------
  |  |   86|  3.37M|#define FWD 0
  ------------------
  451|       |
  452|  3.37M|    len++;
  453|  3.37M|    codeword = codeword << 1 | carry_bit;
  454|  3.37M|    indx = ixheaacd_rvlc_decode_esc(codeword, len, &found);
  455|       |
  456|  3.37M|    if (found) {
  ------------------
  |  Branch (456:9): [True: 1.10M, False: 2.26M]
  ------------------
  457|  1.10M|      ptr_rvlc->rvlc_esc_len -= (MAX_LEN_RVLC_ESCAPE_WORD - i);
  ------------------
  |  |   90|  1.10M|#define MAX_LEN_RVLC_ESCAPE_WORD 20
  ------------------
  458|  1.10M|      return indx;
  459|  1.10M|    }
  460|  3.37M|  }
  461|       |
  462|      0|  ptr_rvlc->rvlc_err_log |= RVLC_ERROR_ALL_ESCAPE_WORDS_INVALID;
  ------------------
  |  |   82|      0|#define RVLC_ERROR_ALL_ESCAPE_WORDS_INVALID 0x80000000
  ------------------
  463|       |
  464|      0|  return -1;
  465|  1.10M|}
ixheaacd_rev_vlc.c:ixheaacd_rvlc_decode_esc:
  205|  3.37M|static WORD32 ixheaacd_rvlc_decode_esc(WORD32 cw, WORD32 len, WORD32 *found) {
  206|  3.37M|  WORD16 indx = 0;
  207|  3.37M|  *found = 0;
  208|  3.37M|  switch (len) {
  209|  1.10M|    case 2:
  ------------------
  |  Branch (209:5): [True: 1.10M, False: 2.26M]
  ------------------
  210|  1.10M|      switch (cw) {
  211|   187k|        case 2:
  ------------------
  |  Branch (211:9): [True: 187k, False: 916k]
  ------------------
  212|   187k|          indx = 0;
  213|   187k|          break;
  214|   431k|        case 0:
  ------------------
  |  Branch (214:9): [True: 431k, False: 672k]
  ------------------
  215|   431k|          indx = 1;
  216|   431k|          break;
  217|   485k|        default:
  ------------------
  |  Branch (217:9): [True: 485k, False: 618k]
  ------------------
  218|   485k|          return 3;
  219|  1.10M|      }
  220|   618k|      break;
  221|   618k|    case 3:
  ------------------
  |  Branch (221:5): [True: 485k, False: 2.88M]
  ------------------
  222|   485k|      switch (cw) {
  223|   107k|        case 6:
  ------------------
  |  Branch (223:9): [True: 107k, False: 378k]
  ------------------
  224|   107k|          indx = 2;
  225|   107k|          break;
  226|  66.1k|        case 2:
  ------------------
  |  Branch (226:9): [True: 66.1k, False: 419k]
  ------------------
  227|  66.1k|          indx = 3;
  228|  66.1k|          break;
  229|   312k|        default:
  ------------------
  |  Branch (229:9): [True: 312k, False: 173k]
  ------------------
  230|   312k|          return 4;
  231|   485k|      }
  232|   173k|      break;
  233|   312k|    case 4:
  ------------------
  |  Branch (233:5): [True: 312k, False: 3.05M]
  ------------------
  234|   312k|      if (cw == 14)
  ------------------
  |  Branch (234:11): [True: 51.8k, False: 260k]
  ------------------
  235|  51.8k|        indx = 4;
  236|   260k|      else
  237|   260k|        return 5;
  238|  51.8k|      break;
  239|   260k|    case 5:
  ------------------
  |  Branch (239:5): [True: 260k, False: 3.11M]
  ------------------
  240|   260k|      switch (cw) {
  241|   166k|        case 31:
  ------------------
  |  Branch (241:9): [True: 166k, False: 93.5k]
  ------------------
  242|   166k|          indx = 5;
  243|   166k|          break;
  244|  25.8k|        case 15:
  ------------------
  |  Branch (244:9): [True: 25.8k, False: 234k]
  ------------------
  245|  25.8k|          indx = 6;
  246|  25.8k|          break;
  247|  11.9k|        case 13:
  ------------------
  |  Branch (247:9): [True: 11.9k, False: 248k]
  ------------------
  248|  11.9k|          indx = 7;
  249|  11.9k|          break;
  250|  55.6k|        default:
  ------------------
  |  Branch (250:9): [True: 55.6k, False: 204k]
  ------------------
  251|  55.6k|          return 6;
  252|   260k|      }
  253|   204k|      break;
  254|   204k|    case 6:
  ------------------
  |  Branch (254:5): [True: 55.6k, False: 3.31M]
  ------------------
  255|  55.6k|      switch (cw) {
  256|  8.61k|        case 61:
  ------------------
  |  Branch (256:9): [True: 8.61k, False: 47.0k]
  ------------------
  257|  8.61k|          indx = 8;
  258|  8.61k|          break;
  259|  8.08k|        case 29:
  ------------------
  |  Branch (259:9): [True: 8.08k, False: 47.5k]
  ------------------
  260|  8.08k|          indx = 9;
  261|  8.08k|          break;
  262|  10.6k|        case 25:
  ------------------
  |  Branch (262:9): [True: 10.6k, False: 44.9k]
  ------------------
  263|  10.6k|          indx = 10;
  264|  10.6k|          break;
  265|  5.32k|        case 24:
  ------------------
  |  Branch (265:9): [True: 5.32k, False: 50.3k]
  ------------------
  266|  5.32k|          indx = 11;
  267|  5.32k|          break;
  268|  22.9k|        default:
  ------------------
  |  Branch (268:9): [True: 22.9k, False: 32.7k]
  ------------------
  269|  22.9k|          return 7;
  270|  55.6k|      }
  271|  32.7k|      break;
  272|  32.7k|    case 7:
  ------------------
  |  Branch (272:5): [True: 22.9k, False: 3.34M]
  ------------------
  273|  22.9k|      switch (cw) {
  274|  9.91k|        case 120:
  ------------------
  |  Branch (274:9): [True: 9.91k, False: 13.0k]
  ------------------
  275|  9.91k|          indx = 12;
  276|  9.91k|          break;
  277|  5.55k|        case 56:
  ------------------
  |  Branch (277:9): [True: 5.55k, False: 17.4k]
  ------------------
  278|  5.55k|          indx = 13;
  279|  5.55k|          break;
  280|  7.50k|        default:
  ------------------
  |  Branch (280:9): [True: 7.50k, False: 15.4k]
  ------------------
  281|  7.50k|          return 8;
  282|  22.9k|      }
  283|  15.4k|      break;
  284|  15.4k|    case 8:
  ------------------
  |  Branch (284:5): [True: 7.50k, False: 3.36M]
  ------------------
  285|  7.50k|      switch (cw) {
  286|  1.45k|        case 242:
  ------------------
  |  Branch (286:9): [True: 1.45k, False: 6.05k]
  ------------------
  287|  1.45k|          indx = 14;
  288|  1.45k|          break;
  289|  1.36k|        case 114:
  ------------------
  |  Branch (289:9): [True: 1.36k, False: 6.13k]
  ------------------
  290|  1.36k|          indx = 15;
  291|  1.36k|          break;
  292|  4.68k|        default:
  ------------------
  |  Branch (292:9): [True: 4.68k, False: 2.81k]
  ------------------
  293|  4.68k|          return 9;
  294|  7.50k|      }
  295|  2.81k|      break;
  296|  4.68k|    case 9:
  ------------------
  |  Branch (296:5): [True: 4.68k, False: 3.36M]
  ------------------
  297|  4.68k|      switch (cw) {
  298|    287|        case 486:
  ------------------
  |  Branch (298:9): [True: 287, False: 4.39k]
  ------------------
  299|    287|          indx = 16;
  300|    287|          break;
  301|  1.27k|        case 230:
  ------------------
  |  Branch (301:9): [True: 1.27k, False: 3.41k]
  ------------------
  302|  1.27k|          indx = 17;
  303|  1.27k|          break;
  304|  3.12k|        default:
  ------------------
  |  Branch (304:9): [True: 3.12k, False: 1.55k]
  ------------------
  305|  3.12k|          return 10;
  306|  4.68k|      }
  307|  1.55k|      break;
  308|  3.12k|    case 10:
  ------------------
  |  Branch (308:5): [True: 3.12k, False: 3.36M]
  ------------------
  309|  3.12k|      switch (cw) {
  310|    252|        case 974:
  ------------------
  |  Branch (310:9): [True: 252, False: 2.87k]
  ------------------
  311|    252|          indx = 18;
  312|    252|          break;
  313|     97|        case 463:
  ------------------
  |  Branch (313:9): [True: 97, False: 3.03k]
  ------------------
  314|     97|          indx = 19;
  315|     97|          break;
  316|  2.78k|        default:
  ------------------
  |  Branch (316:9): [True: 2.78k, False: 349]
  ------------------
  317|  2.78k|          return 11;
  318|  3.12k|      }
  319|    349|      break;
  320|  2.78k|    case 11:
  ------------------
  |  Branch (320:5): [True: 2.78k, False: 3.36M]
  ------------------
  321|  2.78k|      switch (cw) {
  322|    274|        case 1950:
  ------------------
  |  Branch (322:9): [True: 274, False: 2.50k]
  ------------------
  323|    274|          indx = 20;
  324|    274|          break;
  325|     97|        case 1951:
  ------------------
  |  Branch (325:9): [True: 97, False: 2.68k]
  ------------------
  326|     97|          indx = 21;
  327|     97|          break;
  328|    898|        case 925:
  ------------------
  |  Branch (328:9): [True: 898, False: 1.88k]
  ------------------
  329|    898|          indx = 22;
  330|    898|          break;
  331|  1.51k|        default:
  ------------------
  |  Branch (331:9): [True: 1.51k, False: 1.26k]
  ------------------
  332|  1.51k|          return 12;
  333|  2.78k|      }
  334|  1.26k|      break;
  335|  1.51k|    case 12:
  ------------------
  |  Branch (335:5): [True: 1.51k, False: 3.37M]
  ------------------
  336|  1.51k|      if (cw == 1848)
  ------------------
  |  Branch (336:11): [True: 231, False: 1.28k]
  ------------------
  337|    231|        indx = 23;
  338|  1.28k|      else
  339|  1.28k|        return 13;
  340|    231|      break;
  341|  1.28k|    case 13:
  ------------------
  |  Branch (341:5): [True: 1.28k, False: 3.37M]
  ------------------
  342|  1.28k|      if (cw == 3698)
  ------------------
  |  Branch (342:11): [True: 300, False: 980]
  ------------------
  343|    300|        indx = 25;
  344|    980|      else
  345|    980|        return 14;
  346|    300|      break;
  347|    980|    case 14:
  ------------------
  |  Branch (347:5): [True: 980, False: 3.37M]
  ------------------
  348|    980|      if (cw == 7399)
  ------------------
  |  Branch (348:11): [True: 49, False: 931]
  ------------------
  349|     49|        indx = 24;
  350|    931|      else
  351|    931|        return 15;
  352|     49|      break;
  353|    931|    case 15:
  ------------------
  |  Branch (353:5): [True: 931, False: 3.37M]
  ------------------
  354|    931|      if (cw == 14797)
  ------------------
  |  Branch (354:11): [True: 104, False: 827]
  ------------------
  355|    104|        indx = 26;
  356|    827|      else
  357|    827|        return 19;
  358|    104|      break;
  359|    827|    case 19:
  ------------------
  |  Branch (359:5): [True: 827, False: 3.37M]
  ------------------
  360|    827|      if ((cw >= 236736) && (cw <= 236740))
  ------------------
  |  Branch (360:11): [True: 827, False: 0]
  |  Branch (360:29): [True: 319, False: 508]
  ------------------
  361|    319|        indx = 53 - (236740 - cw);
  362|    508|      else
  363|    508|        return 20;
  364|    319|      break;
  365|    508|    case 20:
  ------------------
  |  Branch (365:5): [True: 508, False: 3.37M]
  ------------------
  366|    508|      if ((cw >= 473482) && (cw <= 473503))
  ------------------
  |  Branch (366:11): [True: 508, False: 0]
  |  Branch (366:29): [True: 508, False: 0]
  ------------------
  367|    508|        indx = 48 - (473503 - cw);
  368|      0|      else
  369|      0|        return -1;
  370|    508|      break;
  371|  1.10M|    default:
  ------------------
  |  Branch (371:5): [True: 1.10M, False: 2.26M]
  ------------------
  372|  1.10M|      return -1;
  373|  3.37M|  }
  374|  1.10M|  *found = 1;
  375|  1.10M|  return indx;
  376|  3.37M|}
ixheaacd_rev_vlc.c:ixheaacd_rvlc_decode_forward:
  527|  55.5k|    ia_bit_buf_struct *it_bit_buff) {
  528|  55.5k|  WORD32 band = 0;
  529|  55.5k|  WORD32 group = 0;
  530|  55.5k|  WORD32 bnds = 0;
  531|       |
  532|  55.5k|  WORD16 dpcm;
  533|       |
  534|  55.5k|  ia_bit_buf_struct temp_buf = {0};
  535|       |
  536|  55.5k|  WORD16 factor = ptr_aac_dec_channel_info->global_gain;
  537|  55.5k|  WORD16 position = 0;
  538|  55.5k|  WORD16 noise_energy = ptr_aac_dec_channel_info->global_gain - 90 - 256;
  539|       |
  540|  55.5k|  WORD16 *ptr_scf_fwd = ptr_aac_dec_channel_info->rvlc_scf_fwd_arr;
  541|  55.5k|  WORD16 *ptr_scf_esc = ptr_aac_dec_channel_info->rvlc_scf_esc_arr;
  542|  55.5k|  UWORD8 *ptr_esc_fwd_cnt = &(ptr_rvlc->num_fwd_esc_words_decoded);
  543|       |
  544|  55.5k|  ptr_rvlc->ptr_rvl_bit_cnt = &(ptr_rvlc->rvlc_sf_fwd_len);
  545|  55.5k|  ptr_rvlc->ptr_rvl_bit_str_idx = &(ptr_rvlc->rvl_fwd_bit_str_idx);
  546|       |
  547|  55.5k|  *ptr_esc_fwd_cnt = 0;
  548|  55.5k|  ptr_rvlc->direction = 0;
  549|  55.5k|  ptr_rvlc->noise_used = 0;
  550|  55.5k|  ptr_rvlc->sf_used = 0;
  551|  55.5k|  ptr_rvlc->last_scale_fac = 0;
  552|  55.5k|  ptr_rvlc->last_nrg = 0;
  553|  55.5k|  ptr_rvlc->is_last = 0;
  554|       |
  555|  55.5k|  ixheaacd_rvlc_check_intensity_cb(ptr_rvlc, ptr_aac_dec_channel_info);
  556|       |
  557|   105k|  for (group = 0; group < ptr_rvlc->num_wind_grps; group++) {
  ------------------
  |  Branch (557:19): [True: 67.0k, False: 38.7k]
  ------------------
  558|   733k|    for (band = 0; band < ptr_rvlc->max_sfb_transmitted; band++) {
  ------------------
  |  Branch (558:20): [True: 683k, False: 50.2k]
  ------------------
  559|   683k|      bnds = 16 * group + band;
  560|       |
  561|   683k|      switch (ptr_aac_dec_channel_info->ptr_code_book[bnds]) {
  562|  74.7k|        case ZERO_HCB:
  ------------------
  |  |   33|  74.7k|#define ZERO_HCB 0
  ------------------
  |  Branch (562:9): [True: 74.7k, False: 608k]
  ------------------
  563|  74.7k|          ptr_scf_fwd[bnds] = 0;
  564|  74.7k|          break;
  565|       |
  566|  54.2k|        case INTENSITY_HCB2:
  ------------------
  |  |   39|  54.2k|#define INTENSITY_HCB2 14
  ------------------
  |  Branch (566:9): [True: 54.2k, False: 629k]
  ------------------
  567|   202k|        case INTENSITY_HCB:
  ------------------
  |  |   40|   202k|#define INTENSITY_HCB 15
  ------------------
  |  Branch (567:9): [True: 148k, False: 534k]
  ------------------
  568|       |
  569|   202k|        {
  570|   202k|          dpcm = ixheaacd_decode_rvlc_code_word(it_bit_buff, ptr_rvlc);
  571|   202k|          if (dpcm < 0) {
  ------------------
  |  Branch (571:15): [True: 5.28k, False: 197k]
  ------------------
  572|  5.28k|            ptr_rvlc->conceal_max = bnds;
  573|  5.28k|            return;
  574|  5.28k|          }
  575|   197k|          dpcm -= 7;
  576|   197k|        }
  577|   197k|          if ((dpcm == -7) || (dpcm == 7)) {
  ------------------
  |  Branch (577:15): [True: 2.38k, False: 195k]
  |  Branch (577:31): [True: 2.92k, False: 192k]
  ------------------
  578|  5.30k|            if (ptr_rvlc->rvlc_esc_len) {
  ------------------
  |  Branch (578:17): [True: 1.12k, False: 4.18k]
  ------------------
  579|  1.12k|              ptr_rvlc->conceal_max = bnds;
  580|  1.12k|              return;
  581|  4.18k|            } else {
  582|  4.18k|              if (dpcm == -7) {
  ------------------
  |  Branch (582:19): [True: 2.27k, False: 1.91k]
  ------------------
  583|  2.27k|                dpcm -= *ptr_scf_esc++;
  584|  2.27k|              } else {
  585|  1.91k|                dpcm += *ptr_scf_esc++;
  586|  1.91k|              }
  587|  4.18k|              (*ptr_esc_fwd_cnt)++;
  588|  4.18k|              if (ptr_rvlc->conceal_max_esc == 1311) {
  ------------------
  |  Branch (588:19): [True: 668, False: 3.51k]
  ------------------
  589|    668|                ptr_rvlc->conceal_max_esc = bnds;
  590|    668|              }
  591|  4.18k|            }
  592|  5.30k|          }
  593|   196k|          position += dpcm;
  594|   196k|          ptr_scf_fwd[bnds] = position;
  595|   196k|          ptr_rvlc->is_last = position;
  596|   196k|          break;
  597|       |
  598|   296k|        case NOISE_HCB:
  ------------------
  |  |   38|   296k|#define NOISE_HCB 13
  ------------------
  |  Branch (598:9): [True: 296k, False: 386k]
  ------------------
  599|   296k|          if (ptr_rvlc->noise_used == 0) {
  ------------------
  |  Branch (599:15): [True: 22.6k, False: 273k]
  ------------------
  600|  22.6k|            ptr_rvlc->noise_used = 1;
  601|  22.6k|            ptr_rvlc->first_noise_band = bnds;
  602|  22.6k|            noise_energy += ptr_rvlc->dpcm_noise_nrg;
  603|  22.6k|            ptr_scf_fwd[bnds] = noise_energy;
  604|  22.6k|            ptr_rvlc->last_nrg = noise_energy;
  605|   273k|          } else {
  606|   273k|            dpcm = ixheaacd_decode_rvlc_code_word(it_bit_buff, ptr_rvlc);
  607|   273k|            if (dpcm < 0) {
  ------------------
  |  Branch (607:17): [True: 4.65k, False: 269k]
  ------------------
  608|  4.65k|              ptr_rvlc->conceal_max = bnds;
  609|  4.65k|              return;
  610|  4.65k|            }
  611|   269k|            dpcm -= 7;
  612|   269k|            if ((dpcm == -7) || (dpcm == 7)) {
  ------------------
  |  Branch (612:17): [True: 3.41k, False: 265k]
  |  Branch (612:33): [True: 1.56k, False: 264k]
  ------------------
  613|  4.98k|              if (ptr_rvlc->rvlc_esc_len) {
  ------------------
  |  Branch (613:19): [True: 1.80k, False: 3.18k]
  ------------------
  614|  1.80k|                ptr_rvlc->conceal_max = bnds;
  615|  1.80k|                return;
  616|  3.18k|              } else {
  617|  3.18k|                if (dpcm == -7) {
  ------------------
  |  Branch (617:21): [True: 1.62k, False: 1.55k]
  ------------------
  618|  1.62k|                  dpcm -= *ptr_scf_esc++;
  619|  1.62k|                } else {
  620|  1.55k|                  dpcm += *ptr_scf_esc++;
  621|  1.55k|                }
  622|  3.18k|                (*ptr_esc_fwd_cnt)++;
  623|  3.18k|                if (ptr_rvlc->conceal_max_esc == 1311) {
  ------------------
  |  Branch (623:21): [True: 1.62k, False: 1.55k]
  ------------------
  624|  1.62k|                  ptr_rvlc->conceal_max_esc = bnds;
  625|  1.62k|                }
  626|  3.18k|              }
  627|  4.98k|            }
  628|   267k|            noise_energy += dpcm;
  629|   267k|            ptr_scf_fwd[bnds] = noise_energy;
  630|   267k|            ptr_rvlc->last_nrg = noise_energy;
  631|   267k|          }
  632|   290k|          ptr_aac_dec_channel_info->str_pns_info.pns_used[bnds] = 1;
  633|   290k|          break;
  634|       |
  635|   109k|        default:
  ------------------
  |  Branch (635:9): [True: 109k, False: 574k]
  ------------------
  636|   109k|          ptr_rvlc->sf_used = 1;
  637|   109k|          {
  638|   109k|            memcpy(&temp_buf, it_bit_buff, sizeof(ia_bit_buf_struct));
  639|       |
  640|   109k|            dpcm = ixheaacd_decode_rvlc_code_word(it_bit_buff, ptr_rvlc);
  641|   109k|            if (dpcm < 0) {
  ------------------
  |  Branch (641:17): [True: 2.47k, False: 106k]
  ------------------
  642|  2.47k|              ptr_rvlc->conceal_max = bnds;
  643|  2.47k|              return;
  644|  2.47k|            }
  645|   106k|            dpcm -= 7;
  646|   106k|          }
  647|   106k|          if ((dpcm == -7) || (dpcm == 7)) {
  ------------------
  |  Branch (647:15): [True: 2.53k, False: 104k]
  |  Branch (647:31): [True: 870, False: 103k]
  ------------------
  648|  3.40k|            if (ptr_rvlc->rvlc_esc_len) {
  ------------------
  |  Branch (648:17): [True: 1.46k, False: 1.94k]
  ------------------
  649|  1.46k|              ptr_rvlc->conceal_max = bnds;
  650|  1.46k|              return;
  651|  1.94k|            } else {
  652|  1.94k|              if (dpcm == -7) {
  ------------------
  |  Branch (652:19): [True: 1.22k, False: 713]
  ------------------
  653|  1.22k|                dpcm -= *ptr_scf_esc++;
  654|  1.22k|              } else {
  655|    713|                dpcm += *ptr_scf_esc++;
  656|    713|              }
  657|  1.94k|              (*ptr_esc_fwd_cnt)++;
  658|  1.94k|              if (ptr_rvlc->conceal_max_esc == 1311) {
  ------------------
  |  Branch (658:19): [True: 1.75k, False: 188]
  ------------------
  659|  1.75k|                ptr_rvlc->conceal_max_esc = bnds;
  660|  1.75k|              }
  661|  1.94k|            }
  662|  3.40k|          }
  663|   105k|          factor += dpcm;
  664|   105k|          ptr_scf_fwd[bnds] = factor;
  665|   105k|          ptr_rvlc->last_scale_fac = factor;
  666|   105k|          break;
  667|   683k|      }
  668|   683k|    }
  669|  67.0k|  }
  670|       |
  671|  38.7k|  if (ptr_rvlc->intensity_used) {
  ------------------
  |  Branch (671:7): [True: 10.6k, False: 28.1k]
  ------------------
  672|  10.6k|    dpcm = ixheaacd_decode_rvlc_code_word(it_bit_buff, ptr_rvlc);
  673|  10.6k|    if (dpcm < 0) {
  ------------------
  |  Branch (673:9): [True: 740, False: 9.91k]
  ------------------
  674|    740|      ptr_rvlc->conceal_max = bnds;
  675|    740|      return;
  676|    740|    }
  677|  9.91k|    dpcm -= 7;
  678|  9.91k|    if ((dpcm == -7) || (dpcm == 7)) {
  ------------------
  |  Branch (678:9): [True: 294, False: 9.62k]
  |  Branch (678:25): [True: 439, False: 9.18k]
  ------------------
  679|    733|      if (ptr_rvlc->rvlc_esc_len) {
  ------------------
  |  Branch (679:11): [True: 95, False: 638]
  ------------------
  680|     95|        ptr_rvlc->conceal_max = bnds;
  681|     95|        return;
  682|    638|      } else {
  683|    638|        if (dpcm == -7) {
  ------------------
  |  Branch (683:13): [True: 293, False: 345]
  ------------------
  684|    293|          dpcm -= *ptr_scf_esc++;
  685|    345|        } else {
  686|    345|          dpcm += *ptr_scf_esc++;
  687|    345|        }
  688|    638|        (*ptr_esc_fwd_cnt)++;
  689|    638|        if (ptr_rvlc->conceal_max_esc == 1311) {
  ------------------
  |  Branch (689:13): [True: 402, False: 236]
  ------------------
  690|    402|          ptr_rvlc->conceal_max_esc = bnds;
  691|    402|        }
  692|    638|      }
  693|    733|    }
  694|  9.82k|    ptr_rvlc->dpcm_is_last_pos = dpcm;
  695|  9.82k|  }
  696|  38.7k|}
ixheaacd_rev_vlc.c:ixheaacd_rvlc_check_intensity_cb:
  379|  55.5k|    ia_aac_dec_channel_info_struct *ptr_aac_dec_channel_info) {
  380|  55.5k|  WORD32 group, band, bnds;
  381|       |
  382|  55.5k|  ptr_rvlc->intensity_used = 0;
  383|       |
  384|   122k|  for (group = 0; group < ptr_rvlc->num_wind_grps; group++) {
  ------------------
  |  Branch (384:19): [True: 67.0k, False: 55.5k]
  ------------------
  385|   483k|    for (band = 0; band < ptr_rvlc->max_sfb_transmitted; band++) {
  ------------------
  |  Branch (385:20): [True: 437k, False: 46.4k]
  ------------------
  386|   437k|      bnds = 16 * group + band;
  387|   437k|      if ((ptr_aac_dec_channel_info->ptr_code_book[bnds] == INTENSITY_HCB) ||
  ------------------
  |  |   40|   437k|#define INTENSITY_HCB 15
  ------------------
  |  Branch (387:11): [True: 11.0k, False: 426k]
  ------------------
  388|   426k|          (ptr_aac_dec_channel_info->ptr_code_book[bnds] == INTENSITY_HCB2)) {
  ------------------
  |  |   39|   426k|#define INTENSITY_HCB2 14
  ------------------
  |  Branch (388:11): [True: 9.51k, False: 416k]
  ------------------
  389|  20.5k|        ptr_rvlc->intensity_used = 1;
  390|  20.5k|        break;
  391|  20.5k|      }
  392|   437k|    }
  393|  67.0k|  }
  394|  55.5k|}
ixheaacd_rev_vlc.c:ixheaacd_rvlc_decode_backward:
  701|  55.5k|    ia_bit_buf_struct *it_bit_buff) {
  702|  55.5k|  WORD16 band, group, dpcm;
  703|  55.5k|  WORD16 bnds = ptr_rvlc->max_sfb_transmitted - 1;
  704|       |
  705|  55.5k|  WORD16 factor = ptr_rvlc->rev_global_gain;
  706|  55.5k|  WORD16 position = ptr_rvlc->dpcm_is_last_pos;
  707|  55.5k|  WORD16 noise_energy =
  708|  55.5k|      ptr_rvlc->rev_global_gain + ptr_rvlc->dpcm_noise_last_pos - 90 - 256;
  709|       |
  710|  55.5k|  WORD16 *ptr_scf_bwd = ptr_aac_dec_channel_info->rvlc_scf_bwd_arr;
  711|  55.5k|  WORD16 *ptr_scf_esc = ptr_aac_dec_channel_info->rvlc_scf_esc_arr;
  712|  55.5k|  UWORD8 *ptr_esc_cnt = &(ptr_rvlc->num_esc_words_decoded);
  713|  55.5k|  UWORD8 *ptr_esc_bwd_cnt = &(ptr_rvlc->num_bwd_esc_words_decoded);
  714|       |
  715|  55.5k|  ptr_rvlc->ptr_rvl_bit_cnt = &(ptr_rvlc->rvlc_sf_bwd_len);
  716|  55.5k|  ptr_rvlc->ptr_rvl_bit_str_idx = &(ptr_rvlc->rvl_bwd_bit_str_idx);
  717|       |
  718|  55.5k|  *ptr_esc_bwd_cnt = 0;
  719|  55.5k|  ptr_rvlc->direction = 1;
  720|  55.5k|  ptr_scf_esc += *ptr_esc_cnt - 1;
  721|  55.5k|  ptr_rvlc->firt_scale_fac = 0;
  722|  55.5k|  ptr_rvlc->first_nrg = 0;
  723|  55.5k|  ptr_rvlc->is_first = 0;
  724|       |
  725|  55.5k|  if (ptr_rvlc->intensity_used) {
  ------------------
  |  Branch (725:7): [True: 20.5k, False: 34.9k]
  ------------------
  726|  20.5k|    dpcm = ixheaacd_decode_rvlc_code_word(it_bit_buff, ptr_rvlc);
  727|  20.5k|    if (dpcm < 0) {
  ------------------
  |  Branch (727:9): [True: 3.13k, False: 17.4k]
  ------------------
  728|  3.13k|      ptr_rvlc->dpcm_is_last_pos = 0;
  729|  3.13k|      ptr_rvlc->conceal_min = bnds;
  730|  3.13k|      return;
  731|  3.13k|    }
  732|  17.4k|    dpcm -= 7;
  733|  17.4k|    if ((dpcm == -7) || (dpcm == 7)) {
  ------------------
  |  Branch (733:9): [True: 574, False: 16.8k]
  |  Branch (733:25): [True: 630, False: 16.2k]
  ------------------
  734|  1.20k|      if (ptr_rvlc->rvlc_esc_len) {
  ------------------
  |  Branch (734:11): [True: 979, False: 225]
  ------------------
  735|    979|        ptr_rvlc->conceal_min = bnds;
  736|    979|        return;
  737|    979|      } else {
  738|    225|        if (dpcm == -7) {
  ------------------
  |  Branch (738:13): [True: 156, False: 69]
  ------------------
  739|    156|          dpcm -= *ptr_scf_esc--;
  740|    156|        } else {
  741|     69|          dpcm += *ptr_scf_esc--;
  742|     69|        }
  743|    225|        (*ptr_esc_bwd_cnt)++;
  744|    225|        if (ptr_rvlc->conceal_min_esc == -1311) {
  ------------------
  |  Branch (744:13): [True: 225, False: 0]
  ------------------
  745|    225|          ptr_rvlc->conceal_min_esc = bnds;
  746|    225|        }
  747|    225|      }
  748|  1.20k|    }
  749|  16.4k|    ptr_rvlc->dpcm_is_last_pos = dpcm;
  750|  16.4k|  }
  751|       |
  752|  93.9k|  for (group = ptr_rvlc->num_wind_grps - 1; group >= 0; group--) {
  ------------------
  |  Branch (752:45): [True: 62.9k, False: 30.9k]
  ------------------
  753|   528k|    for (band = ptr_rvlc->max_sfb_transmitted - 1; band >= 0; band--) {
  ------------------
  |  Branch (753:52): [True: 486k, False: 42.4k]
  ------------------
  754|   486k|      bnds = 16 * group + band;
  755|       |
  756|   486k|      switch (ptr_aac_dec_channel_info->ptr_code_book[bnds]) {
  757|  32.9k|        case ZERO_HCB:
  ------------------
  |  |   33|  32.9k|#define ZERO_HCB 0
  ------------------
  |  Branch (757:9): [True: 32.9k, False: 453k]
  ------------------
  758|  32.9k|          ptr_scf_bwd[bnds] = 0;
  759|  32.9k|          break;
  760|       |
  761|  66.0k|        case INTENSITY_HCB2:
  ------------------
  |  |   39|  66.0k|#define INTENSITY_HCB2 14
  ------------------
  |  Branch (761:9): [True: 66.0k, False: 420k]
  ------------------
  762|   157k|        case INTENSITY_HCB:
  ------------------
  |  |   40|   157k|#define INTENSITY_HCB 15
  ------------------
  |  Branch (762:9): [True: 91.3k, False: 395k]
  ------------------
  763|       |
  764|   157k|          dpcm = ixheaacd_decode_rvlc_code_word(it_bit_buff, ptr_rvlc);
  765|   157k|          if (dpcm < 0) {
  ------------------
  |  Branch (765:15): [True: 3.97k, False: 153k]
  ------------------
  766|  3.97k|            ptr_scf_bwd[bnds] = position;
  767|       |
  768|  3.97k|            return;
  769|  3.97k|          }
  770|   153k|          dpcm -= 7;
  771|   153k|          if ((dpcm == -7) || (dpcm == 7)) {
  ------------------
  |  Branch (771:15): [True: 707, False: 152k]
  |  Branch (771:31): [True: 3.16k, False: 149k]
  ------------------
  772|  3.86k|            if (ptr_rvlc->rvlc_esc_len) {
  ------------------
  |  Branch (772:17): [True: 1.56k, False: 2.30k]
  ------------------
  773|  1.56k|              ptr_scf_bwd[bnds] = position;
  774|       |
  775|  1.56k|              return;
  776|  2.30k|            } else {
  777|  2.30k|              if (dpcm == -7) {
  ------------------
  |  Branch (777:19): [True: 175, False: 2.13k]
  ------------------
  778|    175|                dpcm -= *ptr_scf_esc--;
  779|  2.13k|              } else {
  780|  2.13k|                dpcm += *ptr_scf_esc--;
  781|  2.13k|              }
  782|  2.30k|              (*ptr_esc_bwd_cnt)++;
  783|  2.30k|              if (ptr_rvlc->conceal_min_esc == -1311) {
  ------------------
  |  Branch (783:19): [True: 1.84k, False: 462]
  ------------------
  784|  1.84k|              }
  785|  2.30k|            }
  786|  3.86k|          }
  787|   151k|          ptr_scf_bwd[bnds] = position;
  788|   151k|          position -= dpcm;
  789|   151k|          ptr_rvlc->is_first = position;
  790|   151k|          break;
  791|       |
  792|   224k|        case NOISE_HCB:
  ------------------
  |  |   38|   224k|#define NOISE_HCB 13
  ------------------
  |  Branch (792:9): [True: 224k, False: 262k]
  ------------------
  793|   224k|          if (bnds == ptr_rvlc->first_noise_band) {
  ------------------
  |  Branch (793:15): [True: 11.2k, False: 212k]
  ------------------
  794|  11.2k|            ptr_scf_bwd[bnds] = ptr_rvlc->dpcm_noise_nrg +
  795|  11.2k|                                ptr_aac_dec_channel_info->global_gain - 90 -
  796|  11.2k|                                256;
  797|  11.2k|            ptr_rvlc->first_nrg = ptr_scf_bwd[bnds];
  798|   212k|          } else {
  799|   212k|            dpcm = ixheaacd_decode_rvlc_code_word(it_bit_buff, ptr_rvlc);
  800|   212k|            if (dpcm < 0) {
  ------------------
  |  Branch (800:17): [True: 9.97k, False: 202k]
  ------------------
  801|  9.97k|              ptr_scf_bwd[bnds] = noise_energy;
  802|  9.97k|              return;
  803|  9.97k|            }
  804|   202k|            dpcm -= 7;
  805|   202k|            if ((dpcm == -7) || (dpcm == 7)) {
  ------------------
  |  Branch (805:17): [True: 4.03k, False: 198k]
  |  Branch (805:33): [True: 2.00k, False: 196k]
  ------------------
  806|  6.03k|              if (ptr_rvlc->rvlc_esc_len) {
  ------------------
  |  Branch (806:19): [True: 634, False: 5.39k]
  ------------------
  807|    634|                ptr_scf_bwd[bnds] = noise_energy;
  808|    634|                return;
  809|  5.39k|              } else {
  810|  5.39k|                if (dpcm == -7) {
  ------------------
  |  Branch (810:21): [True: 3.74k, False: 1.65k]
  ------------------
  811|  3.74k|                  dpcm -= *ptr_scf_esc--;
  812|  3.74k|                } else {
  813|  1.65k|                  dpcm += *ptr_scf_esc--;
  814|  1.65k|                }
  815|  5.39k|                (*ptr_esc_bwd_cnt)++;
  816|  5.39k|                if (ptr_rvlc->conceal_min_esc == -1311) {
  ------------------
  |  Branch (816:21): [True: 5.39k, False: 0]
  ------------------
  817|  5.39k|                }
  818|  5.39k|              }
  819|  6.03k|            }
  820|   202k|            ptr_scf_bwd[bnds] = noise_energy;
  821|   202k|            noise_energy -= dpcm;
  822|   202k|            ptr_rvlc->first_nrg = noise_energy;
  823|   202k|          }
  824|   213k|          break;
  825|       |
  826|   213k|        default:
  ------------------
  |  Branch (826:9): [True: 71.9k, False: 414k]
  ------------------
  827|  71.9k|          dpcm = ixheaacd_decode_rvlc_code_word(it_bit_buff, ptr_rvlc);
  828|  71.9k|          if (dpcm < 0) {
  ------------------
  |  Branch (828:15): [True: 2.32k, False: 69.5k]
  ------------------
  829|  2.32k|            ptr_scf_bwd[bnds] = factor;
  830|       |
  831|  2.32k|            return;
  832|  2.32k|          }
  833|  69.5k|          dpcm -= 7;
  834|  69.5k|          if ((dpcm == -7) || (dpcm == 7)) {
  ------------------
  |  Branch (834:15): [True: 1.29k, False: 68.2k]
  |  Branch (834:31): [True: 2.36k, False: 65.9k]
  ------------------
  835|  3.66k|            if (ptr_rvlc->rvlc_esc_len) {
  ------------------
  |  Branch (835:17): [True: 2.04k, False: 1.61k]
  ------------------
  836|  2.04k|              ptr_scf_bwd[bnds] = factor;
  837|       |
  838|  2.04k|              return;
  839|  2.04k|            } else {
  840|  1.61k|              if (dpcm == -7) {
  ------------------
  |  Branch (840:19): [True: 814, False: 802]
  ------------------
  841|    814|                dpcm -= *ptr_scf_esc--;
  842|    814|              } else {
  843|    802|                dpcm += *ptr_scf_esc--;
  844|    802|              }
  845|  1.61k|              (*ptr_esc_bwd_cnt)++;
  846|  1.61k|              if (ptr_rvlc->conceal_min_esc == -1311) {
  ------------------
  |  Branch (846:19): [True: 1.61k, False: 0]
  ------------------
  847|  1.61k|              }
  848|  1.61k|            }
  849|  3.66k|          }
  850|  67.5k|          ptr_scf_bwd[bnds] = factor;
  851|  67.5k|          factor -= dpcm;
  852|  67.5k|          ptr_rvlc->firt_scale_fac = factor;
  853|  67.5k|          break;
  854|   486k|      }
  855|   486k|    }
  856|  62.9k|  }
  857|  51.4k|}
ixheaacd_rev_vlc.c:ixheaacd_rvlc_final_error_detection:
 1522|  55.5k|    ia_aac_dec_overlap_info *ptr_aac_dec_static_channel_info) {
 1523|  55.5k|  ia_rvlc_info_struct *ptr_rvlc = &ptr_aac_dec_channel_info->ptr_rvlc_info;
 1524|  55.5k|  UWORD8 err_status_complete = 0;
 1525|  55.5k|  UWORD8 err_status_length_fwd = 0;
 1526|  55.5k|  UWORD8 err_status_length_bwd = 0;
 1527|  55.5k|  UWORD8 err_status_length_escape = 0;
 1528|  55.5k|  UWORD8 err_status_first_scf = 0;
 1529|  55.5k|  UWORD8 err_status_last_scf = 0;
 1530|  55.5k|  UWORD8 err_status_first_nrg = 0;
 1531|  55.5k|  UWORD8 err_status_last_nrg = 0;
 1532|  55.5k|  UWORD8 err_status_first_is = 0;
 1533|  55.5k|  UWORD8 err_status_last_is = 0;
 1534|  55.5k|  UWORD8 err_status_forbidden_cw_fwd = 0;
 1535|  55.5k|  UWORD8 err_status_forbidden_cw_bwd = 0;
 1536|  55.5k|  UWORD8 err_status_num_escapes_fwd = 0;
 1537|  55.5k|  UWORD8 err_status_num_escapes_bwd = 0;
 1538|  55.5k|  UWORD8 conceal_status = 1;
 1539|  55.5k|  UWORD8 current_block_type;
 1540|       |
 1541|  55.5k|  ptr_aac_dec_channel_info->rvlc_curr_sf_flag = 1;
 1542|       |
 1543|  55.5k|  if (ptr_rvlc->rvlc_err_log & RVLC_ERROR_FORBIDDEN_CW_DETECTED_FWD)
  ------------------
  |  |   83|  55.5k|#define RVLC_ERROR_FORBIDDEN_CW_DETECTED_FWD 0x08000000
  ------------------
  |  Branch (1543:7): [True: 0, False: 55.5k]
  ------------------
 1544|      0|    err_status_forbidden_cw_fwd = 1;
 1545|       |
 1546|  55.5k|  if (ptr_rvlc->rvlc_err_log & RVLC_ERROR_FORBIDDEN_CW_DETECTED_BWD)
  ------------------
  |  |   84|  55.5k|#define RVLC_ERROR_FORBIDDEN_CW_DETECTED_BWD 0x04000000
  ------------------
  |  Branch (1546:7): [True: 0, False: 55.5k]
  ------------------
 1547|      0|    err_status_forbidden_cw_bwd = 1;
 1548|       |
 1549|  55.5k|  if (ptr_rvlc->rvlc_sf_fwd_len) err_status_length_fwd = 1;
  ------------------
  |  Branch (1549:7): [True: 49.9k, False: 5.61k]
  ------------------
 1550|       |
 1551|  55.5k|  if (ptr_rvlc->rvlc_sf_bwd_len) err_status_length_bwd = 1;
  ------------------
  |  Branch (1551:7): [True: 50.0k, False: 5.49k]
  ------------------
 1552|       |
 1553|  55.5k|  if (ptr_rvlc->sf_esc_present)
  ------------------
  |  Branch (1553:7): [True: 26.9k, False: 28.6k]
  ------------------
 1554|  26.9k|    if (ptr_rvlc->rvlc_esc_len) err_status_length_escape = 1;
  ------------------
  |  Branch (1554:9): [True: 13.7k, False: 13.1k]
  ------------------
 1555|       |
 1556|  55.5k|  if (ptr_rvlc->sf_used) {
  ------------------
  |  Branch (1556:7): [True: 18.7k, False: 36.8k]
  ------------------
 1557|  18.7k|    if (ptr_rvlc->firt_scale_fac != (ptr_aac_dec_channel_info->global_gain))
  ------------------
  |  Branch (1557:9): [True: 18.5k, False: 103]
  ------------------
 1558|  18.5k|      err_status_first_scf = 1;
 1559|       |
 1560|  18.7k|    if (ptr_rvlc->last_scale_fac != (ptr_rvlc->rev_global_gain))
  ------------------
  |  Branch (1560:9): [True: 18.4k, False: 298]
  ------------------
 1561|  18.4k|      err_status_last_scf = 1;
 1562|  18.7k|  }
 1563|       |
 1564|  55.5k|  if (ptr_rvlc->noise_used) {
  ------------------
  |  Branch (1564:7): [True: 22.6k, False: 32.9k]
  ------------------
 1565|  22.6k|    if (ptr_rvlc->first_nrg != (ptr_aac_dec_channel_info->global_gain +
  ------------------
  |  Branch (1565:9): [True: 12.8k, False: 9.74k]
  ------------------
 1566|  22.6k|                                ptr_rvlc->dpcm_noise_nrg - 90 - 256))
 1567|  12.8k|      err_status_first_nrg = 1;
 1568|       |
 1569|  22.6k|    if (ptr_rvlc->last_nrg !=
  ------------------
  |  Branch (1569:9): [True: 21.9k, False: 652]
  ------------------
 1570|  22.6k|        (ptr_rvlc->rev_global_gain + ptr_rvlc->dpcm_noise_last_pos - 90 - 256))
 1571|  21.9k|      err_status_last_nrg = 1;
 1572|  22.6k|  }
 1573|       |
 1574|  55.5k|  if (ptr_rvlc->intensity_used) {
  ------------------
  |  Branch (1574:7): [True: 20.5k, False: 34.9k]
  ------------------
 1575|  20.5k|    if (ptr_rvlc->is_first != 0) err_status_first_is = 1;
  ------------------
  |  Branch (1575:9): [True: 10.1k, False: 10.4k]
  ------------------
 1576|       |
 1577|  20.5k|    if (ptr_rvlc->is_last != (ptr_rvlc->dpcm_is_last_pos))
  ------------------
  |  Branch (1577:9): [True: 13.4k, False: 7.11k]
  ------------------
 1578|  13.4k|      err_status_last_is = 1;
 1579|  20.5k|  }
 1580|       |
 1581|  55.5k|  if ((ptr_rvlc->num_fwd_esc_words_decoded !=
  ------------------
  |  Branch (1581:7): [True: 24.9k, False: 30.6k]
  ------------------
 1582|  55.5k|       ptr_rvlc->num_esc_words_decoded) &&
 1583|  24.9k|      (ptr_rvlc->conceal_max == CONCEAL_MAX_INIT)) {
  ------------------
  |  |   92|  24.9k|#define CONCEAL_MAX_INIT 1311
  ------------------
  |  Branch (1583:7): [True: 17.7k, False: 7.21k]
  ------------------
 1584|  17.7k|    err_status_num_escapes_fwd = 1;
 1585|  17.7k|  }
 1586|       |
 1587|  55.5k|  if ((ptr_rvlc->num_bwd_esc_words_decoded !=
  ------------------
  |  Branch (1587:7): [True: 24.1k, False: 31.3k]
  ------------------
 1588|  55.5k|       ptr_rvlc->num_esc_words_decoded) &&
 1589|  24.1k|      (ptr_rvlc->conceal_min == CONCEAL_MIN_INIT)) {
  ------------------
  |  |   93|  24.1k|#define CONCEAL_MIN_INIT -1311
  ------------------
  |  Branch (1589:7): [True: 21.5k, False: 2.60k]
  ------------------
 1590|  21.5k|    err_status_num_escapes_bwd = 1;
 1591|  21.5k|  }
 1592|       |
 1593|  55.5k|  if (err_status_length_escape ||
  ------------------
  |  Branch (1593:7): [True: 13.7k, False: 41.7k]
  ------------------
 1594|  41.7k|      (((ptr_rvlc->conceal_max == CONCEAL_MAX_INIT) &&
  ------------------
  |  |   92|  41.7k|#define CONCEAL_MAX_INIT 1311
  ------------------
  |  Branch (1594:9): [True: 29.9k, False: 11.8k]
  ------------------
 1595|  29.9k|        (ptr_rvlc->num_fwd_esc_words_decoded !=
  ------------------
  |  Branch (1595:9): [True: 9.72k, False: 20.2k]
  ------------------
 1596|  29.9k|         ptr_rvlc->num_esc_words_decoded) &&
 1597|  9.72k|        (err_status_last_scf || err_status_last_nrg || err_status_last_is))
  ------------------
  |  Branch (1597:10): [True: 3.25k, False: 6.47k]
  |  Branch (1597:33): [True: 3.44k, False: 3.02k]
  |  Branch (1597:56): [True: 398, False: 2.62k]
  ------------------
 1598|       |
 1599|  7.10k|       &&
 1600|       |
 1601|  7.10k|       ((ptr_rvlc->conceal_min == CONCEAL_MIN_INIT) &&
  ------------------
  |  |   93|  7.10k|#define CONCEAL_MIN_INIT -1311
  ------------------
  |  Branch (1601:9): [True: 5.92k, False: 1.17k]
  ------------------
 1602|  5.92k|        (ptr_rvlc->num_bwd_esc_words_decoded !=
  ------------------
  |  Branch (1602:9): [True: 5.40k, False: 519]
  ------------------
 1603|  5.92k|         ptr_rvlc->num_esc_words_decoded) &&
 1604|  5.40k|        (err_status_first_scf || err_status_first_nrg ||
  ------------------
  |  Branch (1604:10): [True: 2.73k, False: 2.67k]
  |  Branch (1604:34): [True: 1.58k, False: 1.09k]
  ------------------
 1605|  1.09k|         err_status_first_is))) ||
  ------------------
  |  Branch (1605:10): [True: 565, False: 533]
  ------------------
 1606|  36.9k|      ((ptr_rvlc->conceal_max == CONCEAL_MAX_INIT) &&
  ------------------
  |  |   92|  36.9k|#define CONCEAL_MAX_INIT 1311
  ------------------
  |  Branch (1606:8): [True: 25.0k, False: 11.8k]
  ------------------
 1607|  25.0k|       ((ptr_rvlc->rev_global_gain - ptr_rvlc->last_scale_fac) < -15)) ||
  ------------------
  |  Branch (1607:8): [True: 603, False: 24.4k]
  ------------------
 1608|  36.3k|      ((ptr_rvlc->conceal_min == CONCEAL_MIN_INIT) &&
  ------------------
  |  |   93|  36.3k|#define CONCEAL_MIN_INIT -1311
  ------------------
  |  Branch (1608:8): [True: 33.4k, False: 2.83k]
  ------------------
 1609|  33.4k|       ((ptr_aac_dec_channel_info->global_gain - ptr_rvlc->firt_scale_fac) <
  ------------------
  |  Branch (1609:8): [True: 4.43k, False: 29.0k]
  ------------------
 1610|  33.4k|        -15))) {
 1611|  23.6k|    if ((ptr_rvlc->conceal_max == CONCEAL_MAX_INIT) ||
  ------------------
  |  |   92|  23.6k|#define CONCEAL_MAX_INIT 1311
  ------------------
  |  Branch (1611:9): [True: 16.1k, False: 7.57k]
  ------------------
 1612|  22.7k|        (ptr_rvlc->conceal_min == CONCEAL_MIN_INIT)) {
  ------------------
  |  |   93|  7.57k|#define CONCEAL_MIN_INIT -1311
  ------------------
  |  Branch (1612:9): [True: 6.60k, False: 972]
  ------------------
 1613|  22.7k|      ptr_rvlc->conceal_max = 0;
 1614|  22.7k|      ptr_rvlc->conceal_min =
 1615|  22.7k|          ixheaac_max32(0, (ptr_rvlc->num_wind_grps - 1) * 16 +
 1616|  22.7k|                                ptr_rvlc->max_sfb_transmitted - 1);
 1617|  22.7k|    } else {
 1618|    972|      ptr_rvlc->conceal_max =
 1619|    972|          ixheaac_min32(ptr_rvlc->conceal_max, ptr_rvlc->conceal_max_esc);
 1620|    972|      ptr_rvlc->conceal_min =
 1621|    972|          ixheaac_max32(ptr_rvlc->conceal_min, ptr_rvlc->conceal_min_esc);
 1622|    972|    }
 1623|  23.6k|  }
 1624|       |
 1625|  55.5k|  err_status_complete =
 1626|  55.5k|      err_status_last_scf || err_status_first_scf || err_status_last_nrg ||
  ------------------
  |  Branch (1626:7): [True: 18.4k, False: 37.1k]
  |  Branch (1626:30): [True: 239, False: 36.9k]
  |  Branch (1626:54): [True: 12.3k, False: 24.6k]
  ------------------
 1627|  24.6k|      err_status_first_nrg || err_status_last_is || err_status_first_is ||
  ------------------
  |  Branch (1627:7): [True: 649, False: 23.9k]
  |  Branch (1627:31): [True: 4.11k, False: 19.8k]
  |  Branch (1627:53): [True: 1.94k, False: 17.9k]
  ------------------
 1628|  17.9k|      err_status_forbidden_cw_fwd || err_status_forbidden_cw_bwd ||
  ------------------
  |  Branch (1628:7): [True: 0, False: 17.9k]
  |  Branch (1628:38): [True: 0, False: 17.9k]
  ------------------
 1629|  17.9k|      err_status_length_fwd || err_status_length_bwd ||
  ------------------
  |  Branch (1629:7): [True: 12.4k, False: 5.47k]
  |  Branch (1629:32): [True: 110, False: 5.36k]
  ------------------
 1630|  5.36k|      err_status_length_escape || err_status_num_escapes_fwd ||
  ------------------
  |  Branch (1630:7): [True: 21, False: 5.34k]
  |  Branch (1630:35): [True: 50, False: 5.29k]
  ------------------
 1631|  5.29k|      err_status_num_escapes_bwd;
  ------------------
  |  Branch (1631:7): [True: 0, False: 5.29k]
  ------------------
 1632|       |
 1633|  55.5k|  current_block_type =
 1634|  55.5k|      (ptr_aac_dec_channel_info->str_ics_info.window_sequence ==
  ------------------
  |  Branch (1634:7): [True: 2.81k, False: 52.7k]
  ------------------
 1635|  55.5k|       EIGHT_SHORT_SEQUENCE)
  ------------------
  |  |  102|  55.5k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
 1636|  55.5k|          ? 0
 1637|  55.5k|          : 1;
 1638|       |
 1639|  55.5k|  if (!err_status_complete) {
  ------------------
  |  Branch (1639:7): [True: 5.29k, False: 50.2k]
  ------------------
 1640|  5.29k|    WORD32 band;
 1641|  5.29k|    WORD32 group;
 1642|  5.29k|    WORD32 bnds;
 1643|  5.29k|    WORD32 last_sfb_idx;
 1644|       |
 1645|  5.29k|    last_sfb_idx = (ptr_rvlc->num_wind_grps > 1) ? 16 : 64;
  ------------------
  |  Branch (1645:20): [True: 134, False: 5.16k]
  ------------------
 1646|       |
 1647|  11.1k|    for (group = 0; group < ptr_rvlc->num_wind_grps; group++) {
  ------------------
  |  Branch (1647:21): [True: 5.87k, False: 5.29k]
  ------------------
 1648|  14.6k|      for (band = 0; band < ptr_rvlc->max_sfb_transmitted; band++) {
  ------------------
  |  Branch (1648:22): [True: 8.75k, False: 5.87k]
  ------------------
 1649|  8.75k|        bnds = 16 * group + band;
 1650|  8.75k|        ptr_aac_dec_channel_info->ptr_scale_factor[bnds] =
 1651|  8.75k|            ptr_aac_dec_static_channel_info->rvlc_prev_sf[bnds] =
 1652|  8.75k|                ptr_aac_dec_channel_info->rvlc_scf_fwd_arr[bnds];
 1653|  8.75k|      }
 1654|  5.87k|    }
 1655|       |
 1656|  11.1k|    for (group = 0; group < ptr_rvlc->num_wind_grps; group++) {
  ------------------
  |  Branch (1656:21): [True: 5.87k, False: 5.29k]
  ------------------
 1657|  14.6k|      for (band = 0; band < ptr_rvlc->max_sfb_transmitted; band++) {
  ------------------
  |  Branch (1657:22): [True: 8.75k, False: 5.87k]
  ------------------
 1658|  8.75k|        bnds = 16 * group + band;
 1659|  8.75k|        ptr_aac_dec_static_channel_info->rvlc_prev_cb[bnds] =
 1660|  8.75k|            ptr_aac_dec_channel_info->ptr_code_book[bnds];
 1661|  8.75k|      }
 1662|   338k|      for (; band < last_sfb_idx; band++) {
  ------------------
  |  Branch (1662:14): [True: 333k, False: 5.87k]
  ------------------
 1663|   333k|        bnds = 16 * group + band;
 1664|   333k|        ptr_aac_dec_static_channel_info->rvlc_prev_cb[bnds] = ZERO_HCB;
  ------------------
  |  |   33|   333k|#define ZERO_HCB 0
  ------------------
 1665|   333k|      }
 1666|  5.87k|    }
 1667|  50.2k|  } else {
 1668|  50.2k|    WORD32 band;
 1669|  50.2k|    WORD32 group;
 1670|       |
 1671|  50.2k|    if (((ptr_rvlc->conceal_min != CONCEAL_MIN_INIT) ||
  ------------------
  |  |   93|  50.2k|#define CONCEAL_MIN_INIT -1311
  ------------------
  |  Branch (1671:10): [True: 26.5k, False: 23.7k]
  ------------------
 1672|  23.7k|         (ptr_rvlc->conceal_max != CONCEAL_MAX_INIT)) &&
  ------------------
  |  |   92|  23.7k|#define CONCEAL_MAX_INIT 1311
  ------------------
  |  Branch (1672:10): [True: 9.24k, False: 14.5k]
  ------------------
 1673|  35.7k|        (ptr_rvlc->conceal_min <= ptr_rvlc->conceal_max) &&
  ------------------
  |  Branch (1673:9): [True: 14.6k, False: 21.0k]
  ------------------
 1674|  14.6k|        (ptr_aac_dec_static_channel_info->rvlc_prev_blk_type ==
  ------------------
  |  Branch (1674:9): [True: 86, False: 14.5k]
  ------------------
 1675|  14.6k|         current_block_type) &&
 1676|     86|        ptr_aac_dec_static_channel_info->rvlc_prev_sf_ok &&
  ------------------
  |  Branch (1676:9): [True: 0, False: 86]
  ------------------
 1677|      0|        ptr_rvlc->sf_concealment && conceal_status) {
  ------------------
  |  Branch (1677:9): [True: 0, False: 0]
  |  Branch (1677:37): [True: 0, False: 0]
  ------------------
 1678|      0|      ixheaacd_bi_dir_est_scf_prev_frame_reference(
 1679|      0|          ptr_aac_dec_channel_info, ptr_aac_dec_static_channel_info);
 1680|      0|      conceal_status = 0;
 1681|      0|    }
 1682|       |
 1683|  50.2k|    if ((ptr_rvlc->conceal_min <= ptr_rvlc->conceal_max) &&
  ------------------
  |  Branch (1683:9): [True: 29.1k, False: 21.0k]
  ------------------
 1684|  29.1k|        ((ptr_rvlc->conceal_min != CONCEAL_MIN_INIT) ||
  ------------------
  |  |   93|  29.1k|#define CONCEAL_MIN_INIT -1311
  ------------------
  |  Branch (1684:10): [True: 5.44k, False: 23.7k]
  ------------------
 1685|  23.7k|         (ptr_rvlc->conceal_max != CONCEAL_MAX_INIT)) &&
  ------------------
  |  |   92|  23.7k|#define CONCEAL_MAX_INIT 1311
  ------------------
  |  Branch (1685:10): [True: 9.24k, False: 14.5k]
  ------------------
 1686|  14.6k|        !(ptr_aac_dec_static_channel_info->rvlc_prev_sf_ok &&
  ------------------
  |  Branch (1686:11): [True: 0, False: 14.6k]
  ------------------
 1687|      0|          ptr_rvlc->sf_concealment &&
  ------------------
  |  Branch (1687:11): [True: 0, False: 0]
  ------------------
 1688|      0|          (ptr_aac_dec_static_channel_info->rvlc_prev_blk_type ==
  ------------------
  |  Branch (1688:11): [True: 0, False: 0]
  ------------------
 1689|      0|           current_block_type)) &&
 1690|  14.6k|        conceal_status) {
  ------------------
  |  Branch (1690:9): [True: 14.6k, False: 0]
  ------------------
 1691|  14.6k|      ixheaacd_bi_dir_est_lower_scf_cur_frame(ptr_aac_dec_channel_info);
 1692|  14.6k|      conceal_status = 0;
 1693|  14.6k|    }
 1694|       |
 1695|  50.2k|    if ((ptr_rvlc->conceal_min <= ptr_rvlc->conceal_max) &&
  ------------------
  |  Branch (1695:9): [True: 29.1k, False: 21.0k]
  ------------------
 1696|  29.1k|        ((err_status_last_scf && err_status_first_scf) ||
  ------------------
  |  Branch (1696:11): [True: 5.91k, False: 23.2k]
  |  Branch (1696:34): [True: 5.87k, False: 44]
  ------------------
 1697|  23.3k|         (err_status_last_nrg && err_status_first_nrg) ||
  ------------------
  |  Branch (1697:11): [True: 7.22k, False: 16.0k]
  |  Branch (1697:34): [True: 3.69k, False: 3.52k]
  ------------------
 1698|  19.6k|         (err_status_last_is && err_status_first_is)) &&
  ------------------
  |  Branch (1698:11): [True: 5.27k, False: 14.3k]
  |  Branch (1698:33): [True: 3.68k, False: 1.59k]
  ------------------
 1699|  13.2k|        !(err_status_forbidden_cw_fwd || err_status_forbidden_cw_bwd ||
  ------------------
  |  Branch (1699:11): [True: 0, False: 13.2k]
  |  Branch (1699:42): [True: 0, False: 13.2k]
  ------------------
 1700|  13.2k|          err_status_length_escape) &&
  ------------------
  |  Branch (1700:11): [True: 33, False: 13.2k]
  ------------------
 1701|  13.2k|        conceal_status) {
  ------------------
  |  Branch (1701:9): [True: 5.46k, False: 7.75k]
  ------------------
 1702|  5.46k|      ixheaacd_statistical_estimation(ptr_aac_dec_channel_info);
 1703|  5.46k|      conceal_status = 0;
 1704|  5.46k|    }
 1705|       |
 1706|  50.2k|    if ((ptr_rvlc->conceal_min <= ptr_rvlc->conceal_max) &&
  ------------------
  |  Branch (1706:9): [True: 29.1k, False: 21.0k]
  ------------------
 1707|  29.1k|        ptr_aac_dec_static_channel_info->rvlc_prev_sf_ok &&
  ------------------
  |  Branch (1707:9): [True: 0, False: 29.1k]
  ------------------
 1708|      0|        ptr_rvlc->sf_concealment &&
  ------------------
  |  Branch (1708:9): [True: 0, False: 0]
  ------------------
 1709|      0|        (ptr_aac_dec_static_channel_info->rvlc_prev_blk_type ==
  ------------------
  |  Branch (1709:9): [True: 0, False: 0]
  ------------------
 1710|      0|         current_block_type) &&
 1711|      0|        conceal_status) {
  ------------------
  |  Branch (1711:9): [True: 0, False: 0]
  ------------------
 1712|      0|      ixheaacd_predictive_interpolation(ptr_aac_dec_channel_info,
 1713|      0|                                        ptr_aac_dec_static_channel_info);
 1714|      0|      conceal_status = 0;
 1715|      0|    }
 1716|       |
 1717|  50.2k|    if (conceal_status) {
  ------------------
  |  Branch (1717:9): [True: 30.1k, False: 20.1k]
  ------------------
 1718|  71.1k|      for (group = 0; group < ptr_rvlc->num_wind_grps; group++) {
  ------------------
  |  Branch (1718:23): [True: 41.0k, False: 30.1k]
  ------------------
 1719|   489k|        for (band = 0; band < ptr_rvlc->max_sfb_transmitted; band++) {
  ------------------
  |  Branch (1719:24): [True: 447k, False: 41.0k]
  ------------------
 1720|   447k|          ptr_aac_dec_channel_info->ptr_scale_factor[16 * group + band] = 0;
 1721|   447k|        }
 1722|  41.0k|      }
 1723|  30.1k|      ptr_aac_dec_channel_info->rvlc_curr_sf_flag = 0;
 1724|  30.1k|    }
 1725|  50.2k|  }
 1726|  55.5k|}

ixheaacd_sbr_crccheck:
   71|  8.46k|                           WORD32 crc_bits_len) {
   72|  8.46k|  struct ia_bit_buf_struct it_bit_buff_local = {0};
   73|  8.46k|  WORD32 num_crc_bits;
   74|  8.46k|  WORD32 calc_crc_sum;
   75|  8.46k|  WORD32 bits_available;
   76|  8.46k|  WORD32 crc_check_sum;
   77|       |
   78|  8.46k|  crc_check_sum = ixheaacd_read_bits_buf(it_bit_buff, SBR_CYC_REDCY_CHK_BITS);
  ------------------
  |  |   33|  8.46k|#define SBR_CYC_REDCY_CHK_BITS 10
  ------------------
   79|       |
   80|  8.46k|  it_bit_buff_local = *it_bit_buff;
   81|       |
   82|  8.46k|  bits_available = it_bit_buff->cnt_bits;
   83|       |
   84|  8.46k|  if (bits_available <= 0) {
  ------------------
  |  Branch (84:7): [True: 0, False: 8.46k]
  ------------------
   85|      0|    return 0;
   86|      0|  }
   87|       |
   88|  8.46k|  num_crc_bits =
   89|  8.46k|      (crc_bits_len > bits_available) ? bits_available : crc_bits_len;
  ------------------
  |  Branch (89:7): [True: 0, False: 8.46k]
  ------------------
   90|       |
   91|  8.46k|  calc_crc_sum = ixheaacd_sbr_crc(&it_bit_buff_local, num_crc_bits);
   92|       |
   93|  8.46k|  if (calc_crc_sum != crc_check_sum) {
  ------------------
  |  Branch (93:7): [True: 8.45k, False: 8]
  ------------------
   94|  8.45k|    return 0;
   95|  8.45k|  }
   96|      8|  return 1;
   97|  8.46k|}
ixheaacd_sbr_crc.c:ixheaacd_sbr_crc:
   50|  8.46k|                                               WORD32 num_crc_bits) {
   51|  8.46k|  WORD32 i;
   52|  8.46k|  WORD32 num_full_bytes, rem_bits;
   53|  8.46k|  WORD32 byte_value;
   54|  8.46k|  WORD16 crc_state = 0;
   55|       |
   56|  8.46k|  num_full_bytes = (num_crc_bits >> 3);
   57|  8.46k|  rem_bits = (num_crc_bits & 0x7);
   58|       |
   59|  1.09M|  for (i = 0; i < num_full_bytes; i++) {
  ------------------
  |  Branch (59:15): [True: 1.08M, False: 8.46k]
  ------------------
   60|  1.08M|    byte_value = ixheaacd_read_bits_buf(it_bit_buff, 8);
   61|  1.08M|    ixheaacd_calc_chk_sum(&crc_state, byte_value, 8);
   62|  1.08M|  }
   63|       |
   64|  8.46k|  byte_value = ixheaacd_read_bits_buf(it_bit_buff, rem_bits);
   65|  8.46k|  ixheaacd_calc_chk_sum(&crc_state, byte_value, rem_bits);
   66|       |
   67|  8.46k|  return (crc_state & 0x03FF);
   68|  8.46k|}
ixheaacd_sbr_crc.c:ixheaacd_calc_chk_sum:
   27|  1.09M|                                  WORD32 num_bits) {
   28|  1.09M|  WORD32 i;
   29|  1.09M|  WORD32 data_bit_mask = (1 << (num_bits - 1));
   30|  1.09M|  WORD16 crc10 = SBR_CRC_POLY;
  ------------------
  |  |   23|  1.09M|#define SBR_CRC_POLY 0x0233
  ------------------
   31|  1.09M|  WORD16 crc_mask = (1 << 9);
   32|  1.09M|  WORD16 crc_state_local = *crc_state;
   33|       |
   34|  9.81M|  for (i = 0; i < num_bits; i++) {
  ------------------
  |  Branch (34:15): [True: 8.71M, False: 1.09M]
  ------------------
   35|  8.71M|    WORD32 bit0, bit1;
   36|  8.71M|    bit0 = ((crc_state_local & crc_mask) ? 1 : 0);
  ------------------
  |  Branch (36:13): [True: 4.34M, False: 4.37M]
  ------------------
   37|  8.71M|    bit1 = ((data_bit_mask & stream_data) ? 1 : 0);
  ------------------
  |  Branch (37:13): [True: 3.73M, False: 4.98M]
  ------------------
   38|  8.71M|    bit0 ^= bit1;
   39|  8.71M|    crc_state_local = (WORD16)((WORD32)(crc_state_local & 0x0000FFFF) << 1);
   40|  8.71M|    if (bit0) {
  ------------------
  |  Branch (40:9): [True: 4.34M, False: 4.37M]
  ------------------
   41|  4.34M|      crc_state_local ^= crc10;
   42|  4.34M|    }
   43|  8.71M|    data_bit_mask = (data_bit_mask >> 1);
   44|  8.71M|  }
   45|  1.09M|  *crc_state = crc_state_local;
   46|  1.09M|  return;
   47|  1.09M|}

ixheaacd_qmf_enrg_calc:
   82|  85.8k|                            WORD32 upsample_ratio_idx, WORD32 low_pow_flag) {
   83|  85.8k|  WORD32 i, j;
   84|  85.8k|  if (upsample_ratio_idx == SBR_UPSAMPLE_IDX_4_1) {
  ------------------
  |  |   28|  85.8k|#define SBR_UPSAMPLE_IDX_4_1 3
  ------------------
  |  Branch (84:7): [True: 13.6k, False: 72.1k]
  ------------------
   85|   887k|    for (i = 0; i < ptr_sbr_dec->str_codec_qmf_bank.num_time_slots; i++) {
  ------------------
  |  Branch (85:17): [True: 873k, False: 13.6k]
  ------------------
   86|  14.8M|      for (j = 0; j < 16; j++) {
  ------------------
  |  Branch (86:19): [True: 13.9M, False: 873k]
  ------------------
   87|  13.9M|        ptr_sbr_dec->qmf_energy_buf[i][j] =
   88|  13.9M|            ptr_sbr_dec->qmf_buf_real[2 + i][j] *
   89|  13.9M|            ptr_sbr_dec->qmf_buf_real[2 + i][j];
   90|  13.9M|        if (!low_pow_flag)
  ------------------
  |  Branch (90:13): [True: 13.9M, False: 0]
  ------------------
   91|  13.9M|          ptr_sbr_dec->qmf_energy_buf[i][j] +=
   92|  13.9M|              (ptr_sbr_dec->qmf_buf_imag[2 + i][j] *
   93|  13.9M|               ptr_sbr_dec->qmf_buf_imag[2 + i][j]);
   94|  13.9M|      }
   95|   873k|    }
   96|       |
   97|   232k|    for (i = 0; i < 16; i++) {
  ------------------
  |  Branch (97:17): [True: 218k, False: 13.6k]
  ------------------
   98|  3.71M|      for (j = 0; j < 16; j++) {
  ------------------
  |  Branch (98:19): [True: 3.49M, False: 218k]
  ------------------
   99|  3.49M|        ptr_sbr_dec->pvc_qmf_enrg_arr[32 * i + j] =
  100|  3.49M|            (ptr_sbr_dec->qmf_energy_buf[4 * i + 0][j] +
  101|  3.49M|             ptr_sbr_dec->qmf_energy_buf[4 * i + 1][j] +
  102|  3.49M|             ptr_sbr_dec->qmf_energy_buf[4 * i + 2][j] +
  103|  3.49M|             ptr_sbr_dec->qmf_energy_buf[4 * i + 3][j]) *
  104|  3.49M|            0.25f;
  105|  3.49M|      }
  106|   218k|    }
  107|  72.1k|  } else {
  108|  2.38M|    for (i = 0; i < ptr_sbr_dec->str_codec_qmf_bank.num_time_slots; i++) {
  ------------------
  |  Branch (108:17): [True: 2.30M, False: 72.1k]
  ------------------
  109|  76.2M|      for (j = 0; j < 32; j++) {
  ------------------
  |  Branch (109:19): [True: 73.8M, False: 2.30M]
  ------------------
  110|  73.8M|        ptr_sbr_dec->qmf_energy_buf[i][j] =
  111|  73.8M|            ptr_sbr_dec->qmf_buf_real[2 + i][j] *
  112|  73.8M|            ptr_sbr_dec->qmf_buf_real[2 + i][j];
  113|  73.8M|        if (!low_pow_flag)
  ------------------
  |  Branch (113:13): [True: 73.8M, False: 0]
  ------------------
  114|  73.8M|          ptr_sbr_dec->qmf_energy_buf[i][j] +=
  115|  73.8M|              (ptr_sbr_dec->qmf_buf_imag[2 + i][j] *
  116|  73.8M|               ptr_sbr_dec->qmf_buf_imag[2 + i][j]);
  117|  73.8M|      }
  118|  2.30M|    }
  119|       |
  120|  1.22M|    for (i = 0; i < 16; i++) {
  ------------------
  |  Branch (120:17): [True: 1.15M, False: 72.1k]
  ------------------
  121|  38.1M|      for (j = 0; j < 32; j++) {
  ------------------
  |  Branch (121:19): [True: 36.9M, False: 1.15M]
  ------------------
  122|  36.9M|        ptr_sbr_dec->pvc_qmf_enrg_arr[32 * i + j] =
  123|  36.9M|            (ptr_sbr_dec->qmf_energy_buf[2 * i + 0][j] +
  124|  36.9M|             ptr_sbr_dec->qmf_energy_buf[2 * i + 1][j]) *
  125|  36.9M|            0.5f;
  126|  36.9M|      }
  127|  1.15M|    }
  128|  72.1k|  }
  129|  85.8k|}
ixheaacd_hbe_repl_spec:
  134|  32.7k|                            WORD32 max_stretch) {
  135|  32.7k|  WORD32 patch_bands;
  136|  32.7k|  WORD32 patch, band, col, target, source_bands, i;
  137|  32.7k|  WORD32 num_patches = 0;
  138|       |
  139|   196k|  for (i = 1; i < MAX_NUM_PATCHES; i++) {
  ------------------
  |  |   23|   196k|#define MAX_NUM_PATCHES 6
  ------------------
  |  Branch (139:15): [True: 163k, False: 32.7k]
  ------------------
  140|   163k|    if (x_over_qmf[i] != 0) {
  ------------------
  |  Branch (140:9): [True: 76.9k, False: 87.0k]
  ------------------
  141|  76.9k|      num_patches++;
  142|  76.9k|    }
  143|   163k|  }
  144|       |
  145|  40.6k|  for (patch = (max_stretch - 1); patch < num_patches; patch++) {
  ------------------
  |  Branch (145:35): [True: 7.82k, False: 32.7k]
  ------------------
  146|  7.82k|    patch_bands = x_over_qmf[patch + 1] - x_over_qmf[patch];
  147|  7.82k|    target = x_over_qmf[patch];
  148|  7.82k|    source_bands = x_over_qmf[max_stretch - 1] - x_over_qmf[max_stretch - 2];
  149|  24.5k|    while (patch_bands > 0) {
  ------------------
  |  Branch (149:12): [True: 16.6k, False: 7.82k]
  ------------------
  150|  16.6k|      WORD32 ixheaacd_num_bands = source_bands;
  151|  16.6k|      WORD32 start_band = x_over_qmf[max_stretch - 1] - 1;
  152|  16.6k|      if (target + ixheaacd_num_bands >= x_over_qmf[patch + 1]) {
  ------------------
  |  Branch (152:11): [True: 10.6k, False: 6.06k]
  ------------------
  153|  10.6k|        ixheaacd_num_bands = x_over_qmf[patch + 1] - target;
  154|  10.6k|      }
  155|  16.6k|      if ((((target + ixheaacd_num_bands - 1) & 1) +
  ------------------
  |  Branch (155:11): [True: 12.4k, False: 4.27k]
  ------------------
  156|  16.6k|           ((x_over_qmf[max_stretch - 1] - 1) & 1)) &
  157|  16.6k|          1) {
  158|  12.4k|        if (ixheaacd_num_bands == source_bands) {
  ------------------
  |  Branch (158:13): [True: 8.65k, False: 3.76k]
  ------------------
  159|  8.65k|          ixheaacd_num_bands--;
  160|  8.65k|        } else {
  161|  3.76k|          start_band--;
  162|  3.76k|        }
  163|  12.4k|      }
  164|  16.6k|      if (!ixheaacd_num_bands) break;
  ------------------
  |  Branch (164:11): [True: 0, False: 16.6k]
  ------------------
  165|  1.08M|      for (col = 0; col < no_bins; col++) {
  ------------------
  |  Branch (165:21): [True: 1.06M, False: 16.6k]
  ------------------
  166|  1.06M|        WORD32 i = 0;
  167|  1.06M|        band = target + ixheaacd_num_bands - 1;
  168|  1.06M|        if (64 <= band) {
  ------------------
  |  Branch (168:13): [True: 0, False: 1.06M]
  ------------------
  169|      0|          band = 63;
  170|      0|        }
  171|  1.06M|        if (x_over_qmf[patch + 1] <= band) {
  ------------------
  |  Branch (171:13): [True: 0, False: 1.06M]
  ------------------
  172|      0|          band = x_over_qmf[patch + 1] - 1;
  173|      0|        }
  174|  4.69M|        for (i = 0; i < ixheaacd_num_bands; i++, band--) {
  ------------------
  |  Branch (174:21): [True: 3.62M, False: 1.06M]
  ------------------
  175|  3.62M|          qmf_buf_real[col][band] = qmf_buf_real[col][start_band - i];
  176|  3.62M|          qmf_buf_imag[col][band] = qmf_buf_imag[col][start_band - i];
  177|  3.62M|        }
  178|  1.06M|      }
  179|  16.6k|      target += ixheaacd_num_bands;
  180|  16.6k|      patch_bands -= ixheaacd_num_bands;
  181|  16.6k|    }
  182|  7.82k|  }
  183|  32.7k|}
ixheaacd_esbr_analysis_filt_block:
  187|   247k|                                       WORD32 op_delay) {
  188|   247k|  FLOAT32 *core_coder_samples;
  189|   247k|  WORD32 *ptr_filt_states;
  190|   247k|  WORD32 *ptr_filt_states_1;
  191|   247k|  WORD32 *ptr_filt_states_2;
  192|   247k|  WORD32 *ptr_temp;
  193|   247k|  WORD32 *ptr_win_coeffs_1;
  194|   247k|  WORD32 *ptr_win_coeffs_2;
  195|   247k|  WORD32 *ptr_win_coeffs;
  196|   247k|  WORD32 *ploc_qmf_buf_real;
  197|   247k|  WORD32 *ploc_qmf_buf_imag;
  198|   247k|  WORD32 local_qmf_buffer[128] = {0};
  199|   247k|  WORD32 anal_buf[2 * 32];
  200|   247k|  WORD32 idx, z;
  201|   247k|  WORD32 core_syn_ch_index;
  202|   247k|  FLOAT32 gain;
  203|   247k|  WORD32 filt_offset;
  204|   247k|  WORD32 num_columns;
  205|   247k|  ia_qmf_dec_tables_struct *qmf_dec_tables_ptr =
  206|   247k|      sbr_tables_ptr->qmf_dec_tables_ptr;
  207|   247k|  ia_sbr_qmf_filter_bank_struct *pstr_qmf_anal_bank =
  208|   247k|      &ptr_sbr_dec->str_codec_qmf_bank;
  209|   247k|  core_coder_samples = ptr_sbr_dec->time_sample_buf;
  210|   247k|  ptr_filt_states = pstr_qmf_anal_bank->state_new_samples_pos_low_32;
  211|   247k|  ptr_win_coeffs_1 = pstr_qmf_anal_bank->filter_pos_32;
  212|   247k|  num_columns = pstr_qmf_anal_bank->no_channels;
  213|       |
  214|   247k|  switch (num_columns) {
  215|  29.0k|    case 16:
  ------------------
  |  Branch (215:5): [True: 29.0k, False: 218k]
  ------------------
  216|  29.0k|      ptr_win_coeffs_2 = ptr_win_coeffs_1 + 64;
  217|  29.0k|      gain = 128.0f;
  218|  29.0k|      filt_offset = 64;
  219|  29.0k|      break;
  220|  17.9k|    case 24:
  ------------------
  |  Branch (220:5): [True: 17.9k, False: 229k]
  ------------------
  221|  17.9k|      ptr_win_coeffs_2 = ptr_win_coeffs_1 + 24;
  222|  17.9k|      gain = 12.0f;
  223|  17.9k|      filt_offset = 24;
  224|  17.9k|      break;
  225|   200k|    case 32:
  ------------------
  |  Branch (225:5): [True: 200k, False: 47.0k]
  ------------------
  226|   200k|      ptr_win_coeffs_2 = ptr_win_coeffs_1 + 64;
  227|   200k|      gain = 256.0f;
  228|   200k|      filt_offset = 64;
  229|   200k|      break;
  230|      0|    default:
  ------------------
  |  Branch (230:5): [True: 0, False: 247k]
  ------------------
  231|      0|      ptr_win_coeffs_2 = ptr_win_coeffs_1 + 64;
  232|      0|      gain = 256.0f;
  233|      0|      filt_offset = 64;
  234|      0|      break;
  235|   247k|  }
  236|   247k|  gain = 1.0f / gain;
  237|       |
  238|   247k|  pstr_qmf_anal_bank->usb = num_columns;
  239|       |
  240|   247k|  ploc_qmf_buf_real = &local_qmf_buffer[0];
  241|   247k|  ploc_qmf_buf_imag = &local_qmf_buffer[64];
  242|       |
  243|   247k|  ptr_filt_states_1 = pstr_qmf_anal_bank->anal_filter_states_32;
  244|   247k|  ptr_filt_states_2 = pstr_qmf_anal_bank->anal_filter_states_32 + num_columns;
  245|       |
  246|  9.08M|  for (idx = 0; idx < ptr_sbr_dec->str_codec_qmf_bank.num_time_slots; idx++) {
  ------------------
  |  Branch (246:17): [True: 8.84M, False: 247k]
  ------------------
  247|   257M|    for (z = 0; z < num_columns; z++) {
  ------------------
  |  Branch (247:17): [True: 248M, False: 8.84M]
  ------------------
  248|   248M|      ptr_filt_states[num_columns - 1 - z] =
  249|   248M|          (WORD32)(core_coder_samples[z] * (1 << 15));
  250|   248M|    }
  251|  8.84M|    ixheaacd_esbr_qmfanal32_winadd(ptr_filt_states_1, ptr_filt_states_2,
  252|  8.84M|                                   ptr_win_coeffs_1, ptr_win_coeffs_2, anal_buf,
  253|  8.84M|                                   num_columns);
  254|       |
  255|  8.84M|    core_coder_samples += num_columns;
  256|       |
  257|  8.84M|    ptr_filt_states -= num_columns;
  258|  8.84M|    if (ptr_filt_states < pstr_qmf_anal_bank->anal_filter_states_32) {
  ------------------
  |  Branch (258:9): [True: 886k, False: 7.95M]
  ------------------
  259|   886k|      ptr_filt_states = pstr_qmf_anal_bank->anal_filter_states_32 +
  260|   886k|                        10 * num_columns - num_columns;
  261|   886k|    }
  262|       |
  263|  8.84M|    ptr_temp = ptr_filt_states_1;
  264|  8.84M|    ptr_filt_states_1 = ptr_filt_states_2;
  265|  8.84M|    ptr_filt_states_2 = ptr_temp;
  266|       |
  267|  8.84M|    ptr_win_coeffs_1 += filt_offset;
  268|  8.84M|    ptr_win_coeffs_2 += filt_offset;
  269|       |
  270|  8.84M|    ptr_win_coeffs = ptr_win_coeffs_1;
  271|  8.84M|    ptr_win_coeffs_1 = ptr_win_coeffs_2;
  272|  8.84M|    ptr_win_coeffs_2 = ptr_win_coeffs;
  273|       |
  274|  8.84M|    if (ptr_win_coeffs_2 >
  ------------------
  |  Branch (274:9): [True: 882k, False: 7.95M]
  ------------------
  275|  8.84M|        (pstr_qmf_anal_bank->analy_win_coeff_32 + filt_offset * 10)) {
  276|   882k|      ptr_win_coeffs_1 = pstr_qmf_anal_bank->analy_win_coeff_32;
  277|   882k|      ptr_win_coeffs_2 = pstr_qmf_anal_bank->analy_win_coeff_32 + filt_offset;
  278|   882k|    }
  279|       |
  280|  8.84M|    ixheaacd_esbr_fwd_modulation(anal_buf, &ploc_qmf_buf_real[0],
  281|  8.84M|                                 &ploc_qmf_buf_imag[0], pstr_qmf_anal_bank,
  282|  8.84M|                                 qmf_dec_tables_ptr);
  283|  8.84M|    core_syn_ch_index = num_columns;
  284|       |
  285|   257M|    for (z = 0; z < core_syn_ch_index; z++) {
  ------------------
  |  Branch (285:17): [True: 248M, False: 8.84M]
  ------------------
  286|   248M|      ptr_sbr_dec->qmf_buf_real[op_delay + idx][z] =
  287|   248M|          ((FLOAT32)ploc_qmf_buf_real[z] * gain);
  288|   248M|      ptr_sbr_dec->qmf_buf_imag[op_delay + idx][z] =
  289|   248M|          ((FLOAT32)ploc_qmf_buf_imag[z] * gain);
  290|   248M|    }
  291|  8.84M|  }
  292|       |
  293|   247k|  pstr_qmf_anal_bank->filter_pos_32 = ptr_win_coeffs_1;
  294|   247k|  pstr_qmf_anal_bank->state_new_samples_pos_low_32 = ptr_filt_states;
  295|   247k|}
ixheaacd_esbr_synthesis_regrp:
  302|   167k|    WORD32 apply_processing) {
  303|   167k|  WORD32 i, k;
  304|   167k|  WORD32 stop_border = 0;
  305|   167k|  WORD32 num_anal_bands = ptr_sbr_dec->str_codec_qmf_bank.no_channels;
  306|   167k|  WORD32 x_over_band = num_anal_bands;
  307|       |
  308|   167k|  if (apply_processing) {
  ------------------
  |  Branch (308:7): [True: 139k, False: 28.7k]
  ------------------
  309|   139k|    if (ptr_header_data->sbr_ratio_idx == SBR_UPSAMPLE_IDX_4_1) {
  ------------------
  |  |   28|   139k|#define SBR_UPSAMPLE_IDX_4_1 3
  ------------------
  |  Branch (309:9): [True: 7.53k, False: 131k]
  ------------------
  310|  7.53k|      stop_border = 4 * ptr_frame_data->str_frame_info_details.border_vec[0];
  311|   131k|    } else {
  312|   131k|      stop_border = 2 * ptr_frame_data->str_frame_info_details.border_vec[0];
  313|   131k|    }
  314|   139k|    x_over_band = ptr_header_data->pstr_freq_band_data->qmf_sb_prev;
  315|   139k|  }
  316|       |
  317|   167k|  if (stereo_config_idx > 0) {
  ------------------
  |  Branch (317:7): [True: 60.3k, False: 107k]
  ------------------
  318|  80.0k|    for (i = 0; i < stop_border; i++) {
  ------------------
  |  Branch (318:17): [True: 19.7k, False: 60.3k]
  ------------------
  319|  78.8k|      for (k = 0; k < 3; k++) {
  ------------------
  |  Branch (319:19): [True: 59.1k, False: 19.7k]
  ------------------
  320|  59.1k|        *qmf_buf_real++ =
  321|  59.1k|            ptr_sbr_dec->qmf_buf_real[(2) + i + HYBRID_FILTER_DELAY][k];
  ------------------
  |  |   24|  59.1k|#define HYBRID_FILTER_DELAY 6
  ------------------
  322|  59.1k|        *qmf_buf_imag++ =
  323|  59.1k|            ptr_sbr_dec->qmf_buf_imag[(2) + i + HYBRID_FILTER_DELAY][k];
  ------------------
  |  |   24|  59.1k|#define HYBRID_FILTER_DELAY 6
  ------------------
  324|  59.1k|      }
  325|       |
  326|   336k|      for (; k < x_over_band; k++) {
  ------------------
  |  Branch (326:14): [True: 316k, False: 19.7k]
  ------------------
  327|   316k|        *qmf_buf_real++ = ptr_sbr_dec->qmf_buf_real[(2) + i][k];
  328|   316k|        *qmf_buf_imag++ = ptr_sbr_dec->qmf_buf_imag[(2) + i][k];
  329|   316k|      }
  330|       |
  331|   905k|      for (; k < 64; k++) {
  ------------------
  |  Branch (331:14): [True: 885k, False: 19.7k]
  ------------------
  332|   885k|        *qmf_buf_real++ = ptr_sbr_dec->sbr_qmf_out_real[(2) + i][k];
  333|   885k|        *qmf_buf_imag++ = ptr_sbr_dec->sbr_qmf_out_imag[(2) + i][k];
  334|   885k|      }
  335|       |
  336|  19.7k|      qmf_buf_real += 14;
  337|  19.7k|      qmf_buf_imag += 14;
  338|  19.7k|    }
  339|       |
  340|  60.3k|    x_over_band = ptr_header_data->pstr_freq_band_data->sub_band_start;
  341|       |
  342|  2.43M|    for (; i < ptr_sbr_dec->str_codec_qmf_bank.num_time_slots; i++) {
  ------------------
  |  Branch (342:12): [True: 2.37M, False: 60.3k]
  ------------------
  343|  9.48M|      for (k = 0; k < 3; k++) {
  ------------------
  |  Branch (343:19): [True: 7.11M, False: 2.37M]
  ------------------
  344|  7.11M|        *qmf_buf_real++ =
  345|  7.11M|            ptr_sbr_dec->qmf_buf_real[(2) + i + HYBRID_FILTER_DELAY][k];
  ------------------
  |  |   24|  7.11M|#define HYBRID_FILTER_DELAY 6
  ------------------
  346|  7.11M|        *qmf_buf_imag++ =
  347|  7.11M|            ptr_sbr_dec->qmf_buf_imag[(2) + i + HYBRID_FILTER_DELAY][k];
  ------------------
  |  |   24|  7.11M|#define HYBRID_FILTER_DELAY 6
  ------------------
  348|  7.11M|      }
  349|       |
  350|  78.5M|      for (; k < x_over_band; k++) {
  ------------------
  |  Branch (350:14): [True: 76.1M, False: 2.37M]
  ------------------
  351|  76.1M|        *qmf_buf_real++ = ptr_sbr_dec->qmf_buf_real[(2) + i][k];
  352|  76.1M|        *qmf_buf_imag++ = ptr_sbr_dec->qmf_buf_imag[(2) + i][k];
  353|  76.1M|      }
  354|       |
  355|  70.8M|      for (; k < 64; k++) {
  ------------------
  |  Branch (355:14): [True: 68.4M, False: 2.37M]
  ------------------
  356|  68.4M|        *qmf_buf_real++ = ptr_sbr_dec->sbr_qmf_out_real[(2) + i][k];
  357|  68.4M|        *qmf_buf_imag++ = ptr_sbr_dec->sbr_qmf_out_imag[(2) + i][k];
  358|  68.4M|      }
  359|       |
  360|  2.37M|      qmf_buf_real += 14;
  361|  2.37M|      qmf_buf_imag += 14;
  362|  2.37M|    }
  363|       |
  364|   107k|  } else {
  365|   156k|    for (i = 0; i < stop_border; i++) {
  ------------------
  |  Branch (365:17): [True: 48.4k, False: 107k]
  ------------------
  366|   939k|      for (k = 0; k < x_over_band; k++) {
  ------------------
  |  Branch (366:19): [True: 890k, False: 48.4k]
  ------------------
  367|   890k|        *qmf_buf_real++ = ptr_sbr_dec->qmf_buf_real[(2) + i][k];
  368|   890k|        *qmf_buf_imag++ = ptr_sbr_dec->qmf_buf_imag[(2) + i][k];
  369|   890k|      }
  370|       |
  371|  2.25M|      for (; k < 64; k++) {
  ------------------
  |  Branch (371:14): [True: 2.20M, False: 48.4k]
  ------------------
  372|  2.20M|        *qmf_buf_real++ = ptr_sbr_dec->sbr_qmf_out_real[(2) + i][k];
  373|  2.20M|        *qmf_buf_imag++ = ptr_sbr_dec->sbr_qmf_out_imag[(2) + i][k];
  374|  2.20M|      }
  375|       |
  376|  48.4k|      qmf_buf_real += 14;
  377|  48.4k|      qmf_buf_imag += 14;
  378|  48.4k|    }
  379|       |
  380|   107k|    x_over_band = ptr_header_data->pstr_freq_band_data->sub_band_start;
  381|       |
  382|  3.51M|    for (; i < ptr_sbr_dec->str_codec_qmf_bank.num_time_slots; i++) {
  ------------------
  |  Branch (382:12): [True: 3.40M, False: 107k]
  ------------------
  383|  52.6M|      for (k = 0; k < x_over_band; k++) {
  ------------------
  |  Branch (383:19): [True: 49.2M, False: 3.40M]
  ------------------
  384|  49.2M|        *qmf_buf_real++ = ptr_sbr_dec->qmf_buf_real[(2) + i][k];
  385|  49.2M|        *qmf_buf_imag++ = ptr_sbr_dec->qmf_buf_imag[(2) + i][k];
  386|  49.2M|      }
  387|       |
  388|   172M|      for (; k < 64; k++) {
  ------------------
  |  Branch (388:14): [True: 168M, False: 3.40M]
  ------------------
  389|   168M|        *qmf_buf_real++ = ptr_sbr_dec->sbr_qmf_out_real[(2) + i][k];
  390|   168M|        *qmf_buf_imag++ = ptr_sbr_dec->sbr_qmf_out_imag[(2) + i][k];
  391|   168M|      }
  392|       |
  393|  3.40M|      qmf_buf_real += 14;
  394|  3.40M|      qmf_buf_imag += 14;
  395|  3.40M|    }
  396|   107k|  }
  397|   167k|}
ixheaacd_mps_esbr_synthesis_regrp:
  402|  79.2k|                                       WORD32 stereo_config_idx) {
  403|  79.2k|  WORD32 i, k;
  404|  79.2k|  WORD32 num_anal_bands = ptr_sbr_dec->str_codec_qmf_bank.no_channels;
  405|  79.2k|  WORD32 x_over_band = num_anal_bands;
  406|       |
  407|  79.2k|  if (stereo_config_idx > 0) {
  ------------------
  |  Branch (407:7): [True: 79.2k, False: 0]
  ------------------
  408|  3.07M|    for (i = 0; i < ptr_sbr_dec->str_codec_qmf_bank.num_time_slots; i++) {
  ------------------
  |  Branch (408:17): [True: 2.99M, False: 79.2k]
  ------------------
  409|  11.9M|      for (k = 0; k < 3; k++) {
  ------------------
  |  Branch (409:19): [True: 8.98M, False: 2.99M]
  ------------------
  410|  8.98M|        *qmf_buf_real++ =
  411|  8.98M|            ptr_sbr_dec->qmf_buf_real[(2) + i + HYBRID_FILTER_DELAY][k];
  ------------------
  |  |   24|  8.98M|#define HYBRID_FILTER_DELAY 6
  ------------------
  412|  8.98M|        *qmf_buf_imag++ =
  413|  8.98M|            ptr_sbr_dec->qmf_buf_imag[(2) + i + HYBRID_FILTER_DELAY][k];
  ------------------
  |  |   24|  8.98M|#define HYBRID_FILTER_DELAY 6
  ------------------
  414|  8.98M|      }
  415|       |
  416|  74.3M|      for (; k < x_over_band; k++) {
  ------------------
  |  Branch (416:14): [True: 71.3M, False: 2.99M]
  ------------------
  417|  71.3M|        *qmf_buf_real++ = ptr_sbr_dec->qmf_buf_real[(2) + i][k];
  418|  71.3M|        *qmf_buf_imag++ = ptr_sbr_dec->qmf_buf_imag[(2) + i][k];
  419|  71.3M|      }
  420|       |
  421|   114M|      for (; k < 64; k++) {
  ------------------
  |  Branch (421:14): [True: 111M, False: 2.99M]
  ------------------
  422|   111M|        *qmf_buf_real++ = 0;
  423|   111M|        *qmf_buf_imag++ = 0;
  424|   111M|      }
  425|       |
  426|  2.99M|      qmf_buf_real += 14;
  427|  2.99M|      qmf_buf_imag += 14;
  428|  2.99M|    }
  429|  79.2k|  } else {
  430|      0|    for (i = 0; i < ptr_sbr_dec->str_codec_qmf_bank.num_time_slots; i++) {
  ------------------
  |  Branch (430:17): [True: 0, False: 0]
  ------------------
  431|      0|      for (k = 0; k < x_over_band; k++) {
  ------------------
  |  Branch (431:19): [True: 0, False: 0]
  ------------------
  432|      0|        *qmf_buf_real++ = ptr_sbr_dec->qmf_buf_real[(2) + i][k];
  433|      0|        *qmf_buf_imag++ = ptr_sbr_dec->qmf_buf_imag[(2) + i][k];
  434|      0|      }
  435|       |
  436|      0|      for (; k < 64; k++) {
  ------------------
  |  Branch (436:14): [True: 0, False: 0]
  ------------------
  437|      0|        *qmf_buf_real++ = 0.0f;
  438|      0|        *qmf_buf_imag++ = 0.0f;
  439|      0|      }
  440|       |
  441|      0|      qmf_buf_real += 14;
  442|      0|      qmf_buf_imag += 14;
  443|      0|    }
  444|      0|  }
  445|  79.2k|}
ixheaacd_esbr_synthesis_filt_block:
  453|   255k|    FLAG drc_on, WORD32 drc_sbr_factors[][64]) {
  454|       |
  455|   255k|    WORD32 i, k;
  456|   255k|    WORD32 *ptr_filt_states;
  457|   255k|    WORD32 *ptr_filt_states_1;
  458|   255k|    WORD32 *ptr_filt_states_2;
  459|   255k|    WORD32 *filter_l;
  460|   255k|    WORD32 *ploc_qmf_buf_real;
  461|   255k|    WORD32 *ploc_qmf_buf_imag;
  462|   255k|    WORD32 out_scalefactor;
  463|   255k|    WORD32 sixty4, thrity2;
  464|   255k|    WORD32 no_synthesis_channels;
  465|   255k|    WORD32 ixheaacd_drc_offset;
  466|   255k|    FLOAT32 *syn_buffer;
  467|   255k|    WORD32 *local_qmf_buffer = ptr_sbr_dec->sbr_scratch_local;
  468|   255k|    WORD32 *time_out = &(ptr_sbr_dec->sbr_scratch_local[128]);
  469|   255k|  FLOAT32 *time_sample_buf;
  470|   255k|  if (ps_enable) {
  ------------------
  |  Branch (470:7): [True: 16.4k, False: 238k]
  ------------------
  471|  16.4k|    time_sample_buf = ptr_ps_dec->time_sample_buf[0];
  472|   238k|  } else {
  473|   238k|    time_sample_buf = ptr_sbr_dec->time_sample_buf;
  474|   238k|  }
  475|   255k|    ia_sbr_qmf_filter_bank_struct *qmf_bank =
  476|   255k|        &ptr_sbr_dec->str_synthesis_qmf_bank;
  477|   255k|    ia_qmf_dec_tables_struct *qmf_dec_tables_ptr =
  478|   255k|        sbr_tables_ptr->qmf_dec_tables_ptr;
  479|       |
  480|   255k|  if (!skip_re_grouping) {
  ------------------
  |  Branch (480:7): [True: 247k, False: 8.22k]
  ------------------
  481|   247k|    if (!mps_sbr_flag) {
  ------------------
  |  Branch (481:9): [True: 167k, False: 79.2k]
  ------------------
  482|   167k|      ixheaacd_esbr_synthesis_regrp(&qmf_buf_real[0][0], &qmf_buf_imag[0][0],
  483|   167k|                                    ptr_sbr_dec, ptr_frame_data, ptr_header_data,
  484|   167k|                                    stereo_config_idx, apply_processing);
  485|   167k|      if (ps_enable) {
  ------------------
  |  Branch (485:11): [True: 8.22k, False: 159k]
  ------------------
  486|  8.22k|        FLOAT32 factor = 1.0f;
  487|  57.5k|        for (i = ptr_ps_dec->num_sub_samples;i < (WORD32)ptr_ps_dec->num_sub_samples + 6;i++) {
  ------------------
  |  Branch (487:46): [True: 49.3k, False: 8.22k]
  ------------------
  488|   296k|          for (k = 0; k < 5; k++)
  ------------------
  |  Branch (488:23): [True: 246k, False: 49.3k]
  ------------------
  489|   246k|          {
  490|   246k|            if (drc_on)
  ------------------
  |  Branch (490:17): [True: 246k, False: 0]
  ------------------
  491|   246k|            {
  492|   246k|              if (ptr_sbr_dec->str_codec_qmf_bank.num_time_slots == 30)
  ------------------
  |  Branch (492:19): [True: 0, False: 246k]
  ------------------
  493|      0|              {
  494|      0|                factor = (FLOAT32)drc_sbr_factors[i + 30 - 25][k] / Q25;
  ------------------
  |  |   45|      0|#define Q25 33554432
  ------------------
  495|      0|              }
  496|   246k|              else
  497|   246k|              {
  498|   246k|                factor = (FLOAT32)drc_sbr_factors[i + 32 - 26][k] / Q25;
  ------------------
  |  |   45|   246k|#define Q25 33554432
  ------------------
  499|   246k|              }
  500|   246k|            }
  501|   246k|            ptr_ps_dec->pp_qmf_buf_real[0][i][k] =
  502|   246k|              factor * ptr_sbr_dec->qmf_buf_real[SBR_HF_ADJ_OFFSET + i][k];
  ------------------
  |  |   99|   246k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
  503|   246k|            ptr_ps_dec->pp_qmf_buf_imag[0][i][k] =
  504|   246k|              factor * ptr_sbr_dec->qmf_buf_imag[SBR_HF_ADJ_OFFSET + i][k];
  ------------------
  |  |   99|   246k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
  505|   246k|          }
  506|  49.3k|        }
  507|  8.22k|      }
  508|   167k|      if (ps_enable && apply_processing) {
  ------------------
  |  Branch (508:11): [True: 8.22k, False: 159k]
  |  Branch (508:24): [True: 8.20k, False: 18]
  ------------------
  509|  8.20k|        WORD32 usb = ptr_header_data->pstr_freq_band_data->sub_band_end;
  510|       |
  511|  8.20k|        ixheaacd_esbr_apply_ps(ptr_ps_dec,
  512|  8.20k|                               ptr_ps_dec->pp_qmf_buf_real[0],
  513|  8.20k|                               ptr_ps_dec->pp_qmf_buf_imag[0],
  514|  8.20k|                               ptr_ps_dec->pp_qmf_buf_real[1],
  515|  8.20k|                               ptr_ps_dec->pp_qmf_buf_imag[1],
  516|  8.20k|                               usb, sbr_tables_ptr->ps_tables_ptr,
  517|  8.20k|                               ptr_header_data->num_time_slots);
  518|   159k|      } else if (ps_enable) {
  ------------------
  |  Branch (518:18): [True: 18, False: 159k]
  ------------------
  519|    594|        for (i = 0; i < (ptr_header_data->num_time_slots * 2); i++) {
  ------------------
  |  Branch (519:21): [True: 576, False: 18]
  ------------------
  520|  37.4k|          for (k = 0; k < 64; k++) {
  ------------------
  |  Branch (520:23): [True: 36.8k, False: 576]
  ------------------
  521|  36.8k|            ptr_ps_dec->pp_qmf_buf_real[1][i][k] = ptr_ps_dec->pp_qmf_buf_real[0][i][k];
  522|  36.8k|            ptr_ps_dec->pp_qmf_buf_imag[1][i][k] = ptr_ps_dec->pp_qmf_buf_imag[0][i][k];
  523|  36.8k|          }
  524|    576|        }
  525|     18|      }
  526|   167k|    } else {
  527|  79.2k|      ixheaacd_mps_esbr_synthesis_regrp(&qmf_buf_real[0][0], &qmf_buf_imag[0][0],
  528|  79.2k|                                        ptr_sbr_dec, stereo_config_idx);
  529|  79.2k|    }
  530|   247k|  } else {
  531|  8.22k|    if (ps_enable) {
  ------------------
  |  Branch (531:9): [True: 8.22k, False: 0]
  ------------------
  532|  8.22k|      time_sample_buf = ptr_ps_dec->time_sample_buf[1];
  533|  8.22k|    }
  534|  8.22k|  }
  535|       |
  536|   255k|  if (drc_on)
  ------------------
  |  Branch (536:7): [True: 21.3k, False: 234k]
  ------------------
  537|  21.3k|  {
  538|  21.3k|    FLOAT32 factor = 1.0f;
  539|   703k|    for (i = 0; i < ptr_sbr_dec->str_codec_qmf_bank.num_time_slots; i++)
  ------------------
  |  Branch (539:17): [True: 681k, False: 21.3k]
  ------------------
  540|   681k|    {
  541|  44.3M|      for (k = 0; k < 64; k++)
  ------------------
  |  Branch (541:19): [True: 43.6M, False: 681k]
  ------------------
  542|  43.6M|      {
  543|  43.6M|        if (ptr_sbr_dec->str_codec_qmf_bank.num_time_slots == 30)
  ------------------
  |  Branch (543:13): [True: 28.8k, False: 43.6M]
  ------------------
  544|  28.8k|        {
  545|  28.8k|          factor = (FLOAT32)drc_sbr_factors[i + 30 - 25][k] / Q25;
  ------------------
  |  |   45|  28.8k|#define Q25 33554432
  ------------------
  546|  28.8k|        }
  547|  43.6M|        else
  548|  43.6M|        {
  549|  43.6M|          factor = (FLOAT32)drc_sbr_factors[i + 32 - 26][k] / Q25;
  ------------------
  |  |   45|  43.6M|#define Q25 33554432
  ------------------
  550|  43.6M|        }
  551|  43.6M|        qmf_buf_real[i][k] *= factor;
  552|  43.6M|        qmf_buf_imag[i][k] *= factor;
  553|  43.6M|      }
  554|   681k|    }
  555|  21.3k|  }
  556|       |
  557|   255k|  if (stereo_config_idx <= 0) {
  ------------------
  |  Branch (557:7): [True: 115k, False: 139k]
  ------------------
  558|   115k|    out_scalefactor = 5;
  559|   115k|    no_synthesis_channels = qmf_bank->no_channels;
  560|   115k|    sixty4 = NO_SYNTHESIS_CHANNELS;
  ------------------
  |  |   34|   115k|#define NO_SYNTHESIS_CHANNELS 64
  ------------------
  561|   115k|    thrity2 = qmf_bank->no_channels;
  562|       |
  563|   115k|    if (no_synthesis_channels == NO_SYNTHESIS_CHANNELS_DOWN_SAMPLED)
  ------------------
  |  |   38|   115k|#define NO_SYNTHESIS_CHANNELS_DOWN_SAMPLED (NO_SYNTHESIS_CHANNELS / 2)
  |  |  ------------------
  |  |  |  |   34|   115k|#define NO_SYNTHESIS_CHANNELS 64
  |  |  ------------------
  ------------------
  |  Branch (563:9): [True: 220, False: 115k]
  ------------------
  564|    220|    {
  565|    220|        qmf_bank->esbr_cos_twiddle =
  566|    220|          (WORD32 *)qmf_dec_tables_ptr->esbr_sin_cos_twiddle_l32;
  567|    220|        qmf_bank->esbr_alt_sin_twiddle =
  568|    220|          (WORD32 *)qmf_dec_tables_ptr->esbr_alt_sin_twiddle_l32;
  569|    220|    }
  570|   115k|    else
  571|   115k|    {
  572|   115k|      qmf_bank->esbr_cos_twiddle =
  573|   115k|        (WORD32 *)qmf_dec_tables_ptr->esbr_sin_cos_twiddle_l64;
  574|   115k|      qmf_bank->esbr_alt_sin_twiddle =
  575|   115k|        (WORD32 *)qmf_dec_tables_ptr->esbr_alt_sin_twiddle_l64;
  576|   115k|    }
  577|       |
  578|   115k|    qmf_bank->filter_pos_syn_32 +=
  579|   115k|        qmf_dec_tables_ptr->esbr_qmf_c - qmf_bank->p_filter_32;
  580|   115k|    qmf_bank->p_filter_32 = qmf_dec_tables_ptr->esbr_qmf_c;
  581|       |
  582|   115k|    ptr_filt_states = qmf_bank->filter_states_32;
  583|       |
  584|   115k|    ptr_filt_states_1 = &ptr_filt_states[0];
  585|   115k|    ptr_filt_states_2 = ptr_filt_states_1 + no_synthesis_channels;
  586|       |
  587|   115k|    filter_l = qmf_bank->filter_pos_syn_32;
  588|       |
  589|   115k|    ixheaacd_drc_offset = qmf_bank->ixheaacd_drc_offset;
  590|       |
  591|  3.83M|    for (i = 0; i < ptr_sbr_dec->str_codec_qmf_bank.num_time_slots; i++) {
  ------------------
  |  Branch (591:17): [True: 3.71M, False: 115k]
  ------------------
  592|   241M|      for (k = 0; k < 64; k++) {
  ------------------
  |  Branch (592:19): [True: 237M, False: 3.71M]
  ------------------
  593|   237M|        local_qmf_buffer[k + 0] = (WORD32)(qmf_buf_real[i][k] * 64);
  594|   237M|        local_qmf_buffer[k + 64] = (WORD32)(qmf_buf_imag[i][k] * 64);
  595|   237M|      }
  596|  3.71M|      ploc_qmf_buf_real = local_qmf_buffer;
  597|  3.71M|      ploc_qmf_buf_imag = local_qmf_buffer + 64;
  598|       |
  599|  3.71M|      ixheaacd_esbr_inv_modulation(ploc_qmf_buf_real,
  600|  3.71M|                                   &ptr_sbr_dec->str_synthesis_qmf_bank,
  601|  3.71M|                                   sbr_tables_ptr->qmf_dec_tables_ptr,
  602|  3.71M|                                   no_synthesis_channels);
  603|       |
  604|  3.71M|      ixheaacd_shiftrountine_with_rnd_hq(ploc_qmf_buf_real, ploc_qmf_buf_imag,
  605|  3.71M|                                         &ptr_filt_states[ixheaacd_drc_offset],
  606|  3.71M|                                         no_synthesis_channels,
  607|  3.71M|                                         out_scalefactor + 1);
  608|       |
  609|  3.71M|      if (no_synthesis_channels == NO_SYNTHESIS_CHANNELS_DOWN_SAMPLED) {
  ------------------
  |  |   38|  3.71M|#define NO_SYNTHESIS_CHANNELS_DOWN_SAMPLED (NO_SYNTHESIS_CHANNELS / 2)
  |  |  ------------------
  |  |  |  |   34|  3.71M|#define NO_SYNTHESIS_CHANNELS 64
  |  |  ------------------
  ------------------
  |  Branch (609:11): [True: 7.04k, False: 3.71M]
  ------------------
  610|  7.04k|        ixheaacd_esbr_qmfsyn32_winadd(ptr_filt_states_1, ptr_filt_states_2,
  611|  7.04k|                                      filter_l, &time_out[0], ch_fac);
  612|       |
  613|  7.04k|        if (!mps_sbr_flag) {
  ------------------
  |  Branch (613:13): [True: 7.04k, False: 0]
  ------------------
  614|  7.04k|          syn_buffer = time_sample_buf + i * 32;
  615|  7.04k|        } else {
  616|      0|          syn_buffer = ptr_sbr_dec->time_sample_buf + i * 32;
  617|      0|        }
  618|   232k|        for (k = 0; k < 32; k++) {
  ------------------
  |  Branch (618:21): [True: 225k, False: 7.04k]
  ------------------
  619|   225k|          syn_buffer[k] = (FLOAT32)time_out[k] / (1 << 16);
  620|   225k|        }
  621|       |
  622|  7.04k|        ptr_filt_states_1 += thrity2;
  623|  7.04k|        ptr_filt_states_2 -= thrity2;
  624|  7.04k|        thrity2 = -thrity2;
  625|  7.04k|        ixheaacd_drc_offset -= 64;
  626|       |
  627|  7.04k|        if (ixheaacd_drc_offset < 0) ixheaacd_drc_offset += 640;
  ------------------
  |  Branch (627:13): [True: 865, False: 6.17k]
  ------------------
  628|  3.71M|      } else {
  629|  3.71M|        ixheaacd_esbr_qmfsyn64_winadd(ptr_filt_states_1, ptr_filt_states_2,
  630|  3.71M|                                      filter_l, &time_out[0], ch_fac);
  631|       |
  632|  3.71M|        if (!mps_sbr_flag) {
  ------------------
  |  Branch (632:13): [True: 3.71M, False: 0]
  ------------------
  633|  3.71M|          syn_buffer = time_sample_buf + i * 64;
  634|  3.71M|        } else {
  635|      0|          syn_buffer = ptr_sbr_dec->time_sample_buf + i * 64;
  636|      0|        }
  637|   241M|        for (k = 0; k < 64; k++) {
  ------------------
  |  Branch (637:21): [True: 237M, False: 3.71M]
  ------------------
  638|   237M|          syn_buffer[k] = (FLOAT32)time_out[k] / (1 << 16);
  639|   237M|        }
  640|       |
  641|  3.71M|        ptr_filt_states_1 += sixty4;
  642|  3.71M|        ptr_filt_states_2 -= sixty4;
  643|  3.71M|        sixty4 = -sixty4;
  644|  3.71M|        ixheaacd_drc_offset -= 128;
  645|       |
  646|  3.71M|        if (ixheaacd_drc_offset < 0) ixheaacd_drc_offset += 1280;
  ------------------
  |  Branch (646:13): [True: 372k, False: 3.33M]
  ------------------
  647|  3.71M|      }
  648|       |
  649|  3.71M|      filter_l += 64;
  650|       |
  651|  3.71M|      if (filter_l == qmf_bank->p_filter_32 + 640)
  ------------------
  |  Branch (651:11): [True: 370k, False: 3.34M]
  ------------------
  652|   370k|        filter_l = (WORD32 *)qmf_bank->p_filter_32;
  653|  3.71M|    }
  654|       |
  655|   115k|    qmf_bank->filter_pos_syn_32 = filter_l;
  656|   115k|    qmf_bank->ixheaacd_drc_offset = ixheaacd_drc_offset;
  657|   115k|  }
  658|       |
  659|   255k|  if (!mps_sbr_flag) ptr_frame_data->reset_flag = 0;
  ------------------
  |  Branch (659:7): [True: 176k, False: 79.2k]
  ------------------
  660|   255k|}
ixheaacd_sbr_dec:
  671|   275k|    WORD32 ec_flag) {
  672|   275k|  WORD i, j, k;
  673|   275k|  WORD slot, reserve;
  674|   275k|  WORD save_lb_scale;
  675|   275k|  WORD op_delay;
  676|   275k|  IA_ERRORCODE err_code = IA_NO_ERROR;
  ------------------
  |  |   23|   275k|#define IA_NO_ERROR 0x00000000
  ------------------
  677|       |
  678|   275k|  WORD32 *p_arr_qmf_buf_real[MAX_ENV_COLS] = {0};
  679|   275k|  WORD32 *p_arr_qmf_buf_imag[MAX_ENV_COLS] = {0};
  680|   275k|  WORD32 *ptr;
  681|   275k|  WORD hbe_flag = ptr_header_data->hbe_flag;
  682|       |
  683|   275k|  FLOAT32 **pp_qmf_buf_real = NULL;
  684|   275k|  FLOAT32 **pp_qmf_buf_imag = NULL;
  685|   275k|  FLOAT32 pvc_dec_out_buf[16 * 64];
  686|       |
  687|   275k|  WORD upsample_ratio_idx = ptr_header_data->sbr_ratio_idx;
  688|   275k|  WORD no_bins;
  689|   275k|  WORD mps_sbr_flag = ptr_frame_data->mps_sbr_flag;
  690|   275k|  WORD stereo_config_idx = ptr_frame_data->stereo_config_idx;
  691|   275k|  WORD sbr_mode = ptr_frame_data->sbr_mode;
  692|   275k|  WORD usac_flag = ptr_header_data->usac_flag;
  693|   275k|  WORD add_slot = 0;
  694|       |
  695|   275k|  FLOAT32 *pvc_qmf_enrg_arr = (FLOAT32 *)ptr_sbr_dec->pvc_qmf_enrg_arr;
  696|       |
  697|   275k|  WORD32 dft_hbe_flag = ptr_header_data->esbr_hq;
  698|   275k|  WORD32 esbr_hbe_delay_offsets;
  699|   275k|  if (ptr_header_data->num_time_slots == 15)
  ------------------
  |  Branch (699:7): [True: 19.3k, False: 255k]
  ------------------
  700|  19.3k|    esbr_hbe_delay_offsets = ESBR_HBE_DELAY_OFFSET_960;
  ------------------
  |  |  106|  19.3k|#define ESBR_HBE_DELAY_OFFSET_960 30
  ------------------
  701|   255k|  else
  702|   255k|    esbr_hbe_delay_offsets = ESBR_HBE_DELAY_OFFSET;
  ------------------
  |  |  104|   255k|#define ESBR_HBE_DELAY_OFFSET (32)
  ------------------
  703|       |
  704|   275k|  memset(pvc_dec_out_buf, 0, 1024 * sizeof(FLOAT32));
  705|   275k|  memset(pvc_qmf_enrg_arr, 0, 512 * sizeof(FLOAT32));
  706|   275k|  if (audio_object_type == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (706:7): [True: 50.4k, False: 224k]
  ------------------
  707|  50.4k|    op_delay = 0;
  708|   224k|  } else {
  709|   224k|    op_delay = 6;
  710|   224k|  }
  711|       |
  712|   275k|  if (ldmps_present == 1) add_slot = SBR_HF_ADJ_OFFSET;
  ------------------
  |  |   99|  4.10k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
  |  Branch (712:7): [True: 4.10k, False: 271k]
  ------------------
  713|       |
  714|   275k|  if (!((audio_object_type == AOT_ER_AAC_ELD) || (audio_object_type == AOT_ER_AAC_LD))
  ------------------
  |  Branch (714:9): [True: 50.4k, False: 224k]
  |  Branch (714:50): [True: 0, False: 224k]
  ------------------
  715|   224k|      && ptr_header_data->enh_sbr) {
  ------------------
  |  Branch (715:10): [True: 224k, False: 0]
  ------------------
  716|   224k|    ch_fac = 1;
  717|   224k|    pp_qmf_buf_real = ptr_sbr_dec->pp_qmf_buf_real;
  718|   224k|    pp_qmf_buf_imag = ptr_sbr_dec->pp_qmf_buf_imag;
  719|   224k|    if (upsample_ratio_idx == SBR_UPSAMPLE_IDX_4_1) {
  ------------------
  |  |   28|   224k|#define SBR_UPSAMPLE_IDX_4_1 3
  ------------------
  |  Branch (719:9): [True: 21.8k, False: 202k]
  ------------------
  720|  21.8k|      op_delay = 2 * 6;
  721|  21.8k|    }
  722|   224k|  }
  723|       |
  724|   275k|  no_bins = (ptr_header_data->num_time_slots * ptr_header_data->time_step);
  725|       |
  726|   275k|  if ((audio_object_type == AOT_ER_AAC_ELD) ||
  ------------------
  |  Branch (726:7): [True: 50.4k, False: 224k]
  ------------------
  727|   224k|      (audio_object_type == AOT_ER_AAC_LD)  ||
  ------------------
  |  Branch (727:7): [True: 0, False: 224k]
  ------------------
  728|   224k|      !ptr_header_data->enh_sbr) {
  ------------------
  |  Branch (728:7): [True: 0, False: 224k]
  ------------------
  729|  50.4k|    WORD32 num = op_delay;
  730|  50.4k|    WORD32 *ptr_pers_qmf_real = ptr_sbr_dec->ptr_sbr_overlap_buf;
  731|  50.4k|    WORD32 *p_scr_qmf_real = ptr_work_buf_core + (2 << (6 + !low_pow_flag));
  732|       |
  733|  50.4k|    if (ptr_header_data->num_time_slots != 15) {
  ------------------
  |  Branch (733:9): [True: 31.2k, False: 19.2k]
  ------------------
  734|  31.2k|      if ((no_bins < LPC_ORDER) || ((no_bins + op_delay) > MAX_ENV_COLS)) {
  ------------------
  |  |   65|  31.2k|#define LPC_ORDER 2
  ------------------
                    if ((no_bins < LPC_ORDER) || ((no_bins + op_delay) > MAX_ENV_COLS)) {
  ------------------
  |  |   71|  31.2k|#define MAX_ENV_COLS (MAX_COLS + MAX_OV_COLS)
  |  |  ------------------
  |  |  |  |   69|  31.2k|#define MAX_COLS (MAX_FRAME_SIZE / NO_ANALYSIS_CHANNELS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|  31.2k|#define MAX_FRAME_SIZE 1024
  |  |  |  |  ------------------
  |  |  |  |               #define MAX_COLS (MAX_FRAME_SIZE / NO_ANALYSIS_CHANNELS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   35|  31.2k|#define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|  31.2k|#define NO_SYNTHESIS_CHANNELS 64
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   23|  31.2k|#define SBR_UPSAMPLE_FAC 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define MAX_ENV_COLS (MAX_COLS + MAX_OV_COLS)
  |  |  ------------------
  |  |  |  |   70|  31.2k|#define MAX_OV_COLS 6
  |  |  ------------------
  ------------------
  |  Branch (734:11): [True: 0, False: 31.2k]
  |  Branch (734:36): [True: 0, False: 31.2k]
  ------------------
  735|      0|        if (ec_flag)
  ------------------
  |  Branch (735:13): [True: 0, False: 0]
  ------------------
  736|      0|          no_bins = LPC_ORDER;
  ------------------
  |  |   65|      0|#define LPC_ORDER 2
  ------------------
  737|      0|        else
  738|      0|          return -1;
  739|      0|      }
  740|  31.2k|    } else {
  741|  19.2k|      if ((no_bins < LPC_ORDER) || ((no_bins + op_delay) > MAX_ENV_COLS_960)) {
  ------------------
  |  |   65|  19.2k|#define LPC_ORDER 2
  ------------------
                    if ((no_bins < LPC_ORDER) || ((no_bins + op_delay) > MAX_ENV_COLS_960)) {
  ------------------
  |  |   73|  19.2k|#define MAX_ENV_COLS_960 (30 + MAX_OV_COLS)
  |  |  ------------------
  |  |  |  |   70|  19.2k|#define MAX_OV_COLS 6
  |  |  ------------------
  ------------------
  |  Branch (741:11): [True: 0, False: 19.2k]
  |  Branch (741:36): [True: 0, False: 19.2k]
  ------------------
  742|      0|        if (ec_flag)
  ------------------
  |  Branch (742:13): [True: 0, False: 0]
  ------------------
  743|      0|          no_bins = LPC_ORDER;
  ------------------
  |  |   65|      0|#define LPC_ORDER 2
  ------------------
  744|      0|        else
  745|      0|          return -1;
  746|      0|      }
  747|  19.2k|    }
  748|       |
  749|  50.4k|    if (!low_pow_flag) {
  ------------------
  |  Branch (749:9): [True: 50.4k, False: 0]
  ------------------
  750|  50.4k|      num = num << 1;
  751|  50.4k|    }
  752|  50.4k|    if (audio_object_type != AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (752:9): [True: 0, False: 50.4k]
  ------------------
  753|      0|      memcpy(p_scr_qmf_real, ptr_pers_qmf_real,
  754|      0|             sizeof(WORD32) * NO_SYNTHESIS_CHANNELS * num);
  ------------------
  |  |   34|      0|#define NO_SYNTHESIS_CHANNELS 64
  ------------------
  755|      0|    }
  756|  50.4k|    ptr = p_scr_qmf_real;
  757|       |
  758|   847k|    for (slot = 0; slot < op_delay + no_bins + add_slot; slot++) {
  ------------------
  |  Branch (758:20): [True: 796k, False: 50.4k]
  ------------------
  759|   796k|      p_arr_qmf_buf_real[slot] = ptr;
  760|   796k|      ptr += NO_SYNTHESIS_CHANNELS;
  ------------------
  |  |   34|   796k|#define NO_SYNTHESIS_CHANNELS 64
  ------------------
  761|       |
  762|   796k|      if (!low_pow_flag) {
  ------------------
  |  Branch (762:11): [True: 796k, False: 0]
  ------------------
  763|   796k|        p_arr_qmf_buf_imag[slot] = ptr;
  764|   796k|        ptr += NO_SYNTHESIS_CHANNELS;
  ------------------
  |  |   34|   796k|#define NO_SYNTHESIS_CHANNELS 64
  ------------------
  765|   796k|      }
  766|   796k|    }
  767|       |
  768|  50.4k|    ptr_sbr_dec->str_sbr_scale_fact.lb_scale = 0;
  769|       |
  770|  50.4k|    if (apply_processing) {
  ------------------
  |  Branch (770:9): [True: 50.4k, False: 0]
  ------------------
  771|  50.4k|      ixheaacd_rescale_x_overlap(ptr_sbr_dec, ptr_header_data, ptr_frame_data,
  772|  50.4k|                                 ptr_frame_data_prev, p_arr_qmf_buf_real,
  773|  50.4k|                                 p_arr_qmf_buf_imag, low_pow_flag);
  774|  50.4k|    }
  775|  50.4k|  }
  776|       |
  777|   275k|  if ((audio_object_type == AOT_AAC_LC) && (heaac_mps_present == 1) && ptr_header_data->enh_sbr) {
  ------------------
  |  Branch (777:7): [True: 13.4k, False: 261k]
  |  Branch (777:44): [True: 1.28k, False: 12.1k]
  |  Branch (777:72): [True: 1.28k, False: 0]
  ------------------
  778|  1.28k|    WORD32 num_anal_bands = ptr_sbr_dec->str_codec_qmf_bank.no_channels;
  779|  1.28k|    WORD32 frame_move = 9 * num_anal_bands;
  780|  1.28k|    WORD32 core_frame_size = ptr_header_data->core_frame_size;
  781|       |
  782|  1.28k|    memcpy(&ptr_sbr_dec->core_sample_buf[core_frame_size],
  783|  1.28k|           &ptr_sbr_dec->time_sample_buf[core_frame_size - frame_move],
  784|  1.28k|           frame_move * sizeof(FLOAT32));
  785|       |
  786|  1.28k|    memmove(&ptr_sbr_dec->time_sample_buf[frame_move], &ptr_sbr_dec->time_sample_buf[0],
  787|  1.28k|            (core_frame_size - frame_move));
  788|       |
  789|  1.28k|    memcpy(&ptr_sbr_dec->time_sample_buf[0], &ptr_sbr_dec->core_sample_buf[0],
  790|  1.28k|           frame_move * sizeof(FLOAT32));
  791|       |
  792|  1.28k|    memcpy(&ptr_sbr_dec->core_sample_buf[0], &ptr_sbr_dec->core_sample_buf[core_frame_size],
  793|  1.28k|           frame_move * sizeof(FLOAT32));
  794|  1.28k|  }
  795|   275k|  if ((audio_object_type == AOT_AAC_LC) && (heaac_mps_present == 1) &&
  ------------------
  |  Branch (795:7): [True: 13.4k, False: 261k]
  |  Branch (795:44): [True: 1.28k, False: 12.1k]
  ------------------
  796|  1.28k|    !ptr_header_data->enh_sbr) {
  ------------------
  |  Branch (796:5): [True: 0, False: 1.28k]
  ------------------
  797|      0|    WORD32 num_anal_bands = ptr_sbr_dec->str_codec_qmf_bank.no_channels;
  798|      0|    WORD32 frame_move = 9 * num_anal_bands;
  799|      0|    WORD32 core_frame_size = ptr_header_data->core_frame_size;
  800|       |
  801|      0|    memcpy(&ptr_sbr_dec->core_sample_buf_sbr[core_frame_size],
  802|      0|           &ptr_time_data[core_frame_size - frame_move],
  803|      0|           frame_move * sizeof(WORD16));
  804|       |
  805|      0|    memmove(&ptr_time_data[frame_move], &ptr_time_data[0],
  806|      0|            (core_frame_size - frame_move));
  807|       |
  808|      0|    memcpy(&ptr_time_data[0], &ptr_sbr_dec->core_sample_buf_sbr[0],
  809|      0|           frame_move * sizeof(WORD16));
  810|       |
  811|      0|    memcpy(&ptr_sbr_dec->core_sample_buf_sbr[0],
  812|      0|           &ptr_sbr_dec->core_sample_buf_sbr[core_frame_size],
  813|      0|           frame_move * sizeof(WORD16));
  814|      0|  }
  815|       |
  816|   275k|  if ((audio_object_type != AOT_ER_AAC_ELD) &&
  ------------------
  |  Branch (816:7): [True: 224k, False: 50.4k]
  ------------------
  817|   224k|      (audio_object_type != AOT_ER_AAC_LD) &&
  ------------------
  |  Branch (817:7): [True: 224k, False: 0]
  ------------------
  818|   224k|      ptr_header_data->enh_sbr) {
  ------------------
  |  Branch (818:7): [True: 224k, False: 0]
  ------------------
  819|   224k|    WORD32 codec_x_delay = 0;
  820|       |
  821|   224k|    if (hbe_flag || !usac_flag) {
  ------------------
  |  Branch (821:9): [True: 147k, False: 77.8k]
  |  Branch (821:21): [True: 0, False: 77.8k]
  ------------------
  822|   147k|      codec_x_delay = esbr_hbe_delay_offsets;
  823|   147k|    }
  824|   224k|    if (upsample_ratio_idx == SBR_UPSAMPLE_IDX_4_1) {
  ------------------
  |  |   28|   224k|#define SBR_UPSAMPLE_IDX_4_1 3
  ------------------
  |  Branch (824:9): [True: 21.8k, False: 202k]
  ------------------
  825|  21.8k|      codec_x_delay = 2 * codec_x_delay;
  826|  21.8k|    }
  827|       |    /* fixed decoder delay for bitstreams with SBR 4:1 and stereoConfigIndex 3
  828|       |     */
  829|   224k|    if (ptr_header_data->num_time_slots != 15) {
  ------------------
  |  Branch (829:9): [True: 224k, False: 40]
  ------------------
  830|   224k|      if (mps_sbr_flag) op_delay = MPS_SBR_DELAY;
  ------------------
  |  |  100|  79.2k|#define MPS_SBR_DELAY (6)
  ------------------
  |  Branch (830:11): [True: 79.2k, False: 145k]
  ------------------
  831|   224k|    } else {
  832|     40|      if (mps_sbr_flag) op_delay = MPS_SBR_DELAY_960;
  ------------------
  |  |  102|      0|#define MPS_SBR_DELAY_960 5
  ------------------
  |  Branch (832:11): [True: 0, False: 40]
  ------------------
  833|     40|    }
  834|       |
  835|   224k|    {
  836|   224k|    memmove(
  837|   224k|        &ptr_sbr_dec->qmf_buf_real[0][0],
  838|   224k|        &ptr_sbr_dec
  839|   224k|             ->qmf_buf_real[ptr_sbr_dec->str_codec_qmf_bank.num_time_slots][0],
  840|   224k|        (op_delay + SBR_HF_ADJ_OFFSET + codec_x_delay) * sizeof(FLOAT32) * 64);
  ------------------
  |  |   99|   224k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
  841|       |
  842|   224k|    memmove(
  843|   224k|        &ptr_sbr_dec->qmf_buf_imag[0][0],
  844|   224k|        &ptr_sbr_dec
  845|   224k|             ->qmf_buf_imag[ptr_sbr_dec->str_codec_qmf_bank.num_time_slots][0],
  846|   224k|        (op_delay + SBR_HF_ADJ_OFFSET + codec_x_delay) * sizeof(FLOAT32) * 64);
  ------------------
  |  |   99|   224k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
  847|       |
  848|   224k|    memmove(&ptr_sbr_dec->sbr_qmf_out_real[0][0],
  849|   224k|            &ptr_sbr_dec->sbr_qmf_out_real[ptr_sbr_dec->str_codec_qmf_bank
  850|   224k|                                               .num_time_slots][0],
  851|   224k|            (op_delay + SBR_HF_ADJ_OFFSET) * sizeof(FLOAT32) * 64);
  ------------------
  |  |   99|   224k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
  852|       |
  853|   224k|    memmove(&ptr_sbr_dec->sbr_qmf_out_imag[0][0],
  854|   224k|            &ptr_sbr_dec->sbr_qmf_out_imag[ptr_sbr_dec->str_codec_qmf_bank
  855|   224k|                                               .num_time_slots][0],
  856|   224k|            (op_delay + SBR_HF_ADJ_OFFSET) * sizeof(FLOAT32) * 64);
  ------------------
  |  |   99|   224k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
  857|       |
  858|   224k|    if (hbe_flag) {
  ------------------
  |  Branch (858:9): [True: 147k, False: 77.8k]
  ------------------
  859|   147k|      memmove(&ptr_sbr_dec->ph_vocod_qmf_real[0][0],
  860|   147k|              &ptr_sbr_dec->ph_vocod_qmf_real[ptr_sbr_dec->str_codec_qmf_bank
  861|   147k|                                                  .num_time_slots][0],
  862|   147k|              64 * sizeof(FLOAT32) * (op_delay + SBR_HF_ADJ_OFFSET));
  ------------------
  |  |   99|   147k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
  863|       |
  864|   147k|      memmove(ptr_sbr_dec->ph_vocod_qmf_imag,
  865|   147k|              ptr_sbr_dec->ph_vocod_qmf_imag +
  866|   147k|                  ptr_sbr_dec->str_codec_qmf_bank.num_time_slots,
  867|   147k|              64 * sizeof(FLOAT32) * (op_delay + SBR_HF_ADJ_OFFSET));
  ------------------
  |  |   99|   147k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
  868|   147k|        if (!usac_flag) {
  ------------------
  |  Branch (868:13): [True: 13.5k, False: 133k]
  ------------------
  869|  13.5k|          WORD32 qmf_sb_prev = ptr_header_data->pstr_freq_band_data->qmf_sb_prev;
  870|  94.5k|          for (i = SBR_HF_ADJ_OFFSET; i < op_delay + SBR_HF_ADJ_OFFSET; ++i) {
  ------------------
  |  |   99|  13.5k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
                        for (i = SBR_HF_ADJ_OFFSET; i < op_delay + SBR_HF_ADJ_OFFSET; ++i) {
  ------------------
  |  |   99|  94.5k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
  |  Branch (870:39): [True: 81.0k, False: 13.5k]
  ------------------
  871|  81.0k|            memset(&ptr_sbr_dec->qmf_buf_real[i][qmf_sb_prev], 0, (64 - qmf_sb_prev));
  872|  81.0k|            memset(&ptr_sbr_dec->qmf_buf_imag[i][qmf_sb_prev], 0, (64 - qmf_sb_prev));
  873|  81.0k|          }
  874|  13.5k|        }
  875|   147k|      }
  876|   224k|    }
  877|   224k|    ixheaacd_esbr_analysis_filt_block(
  878|   224k|        ptr_sbr_dec, sbr_tables_ptr,
  879|   224k|        op_delay + codec_x_delay + SBR_HF_ADJ_OFFSET);
  ------------------
  |  |   99|   224k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
  880|       |
  881|   224k|    if (hbe_flag && apply_processing) {
  ------------------
  |  Branch (881:9): [True: 147k, False: 77.8k]
  |  Branch (881:21): [True: 139k, False: 7.84k]
  ------------------
  882|   139k|      if (dft_hbe_flag == 1) {
  ------------------
  |  Branch (882:11): [True: 0, False: 139k]
  ------------------
  883|      0|        WORD32 err_code = 0;
  884|      0|        ptr_sbr_dec->p_hbe_txposer->oversampling_flag =
  885|      0|            ptr_frame_data->over_sampling_flag;
  886|      0|        err_code = ixheaacd_dft_hbe_apply(
  887|      0|          ptr_sbr_dec->p_hbe_txposer,
  888|      0|          ptr_sbr_dec->qmf_buf_real + (op_delay + SBR_HF_ADJ_OFFSET) +
  ------------------
  |  |   99|      0|#define SBR_HF_ADJ_OFFSET 2
  ------------------
  889|      0|          esbr_hbe_delay_offsets,
  890|      0|          ptr_sbr_dec->qmf_buf_imag + (op_delay + SBR_HF_ADJ_OFFSET) +
  ------------------
  |  |   99|      0|#define SBR_HF_ADJ_OFFSET 2
  ------------------
  891|      0|          esbr_hbe_delay_offsets,
  892|      0|          ptr_sbr_dec->str_codec_qmf_bank.num_time_slots,
  893|      0|          ptr_sbr_dec->ph_vocod_qmf_real + (op_delay + SBR_HF_ADJ_OFFSET),
  ------------------
  |  |   99|      0|#define SBR_HF_ADJ_OFFSET 2
  ------------------
  894|      0|          ptr_sbr_dec->ph_vocod_qmf_imag + (op_delay + SBR_HF_ADJ_OFFSET),
  ------------------
  |  |   99|      0|#define SBR_HF_ADJ_OFFSET 2
  ------------------
  895|      0|          ptr_frame_data->pitch_in_bins, (FLOAT32 *)ptr_work_buf_core);
  896|      0|        if (err_code) return err_code;
  ------------------
  |  Branch (896:13): [True: 0, False: 0]
  ------------------
  897|   139k|      } else {
  898|   139k|          WORD32 err_code = ixheaacd_qmf_hbe_apply(
  899|   139k|              ptr_sbr_dec->p_hbe_txposer,
  900|   139k|              ptr_sbr_dec->qmf_buf_real + (op_delay + SBR_HF_ADJ_OFFSET) +
  ------------------
  |  |   99|   139k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
  901|   139k|              esbr_hbe_delay_offsets,
  902|   139k|              ptr_sbr_dec->qmf_buf_imag + (op_delay + SBR_HF_ADJ_OFFSET) +
  ------------------
  |  |   99|   139k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
  903|   139k|              esbr_hbe_delay_offsets,
  904|   139k|              ptr_sbr_dec->str_codec_qmf_bank.num_time_slots,
  905|   139k|              ptr_sbr_dec->ph_vocod_qmf_real + (op_delay + SBR_HF_ADJ_OFFSET),
  ------------------
  |  |   99|   139k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
  906|   139k|              ptr_sbr_dec->ph_vocod_qmf_imag + (op_delay + SBR_HF_ADJ_OFFSET),
  ------------------
  |  |   99|   139k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
  907|   139k|              ptr_frame_data->pitch_in_bins, ptr_header_data);
  908|   139k|          if (err_code) return err_code;
  ------------------
  |  Branch (908:15): [True: 4, False: 139k]
  ------------------
  909|       |
  910|   139k|        if (upsample_ratio_idx == SBR_UPSAMPLE_IDX_4_1) {
  ------------------
  |  |   28|   139k|#define SBR_UPSAMPLE_IDX_4_1 3
  ------------------
  |  Branch (910:13): [True: 21.6k, False: 117k]
  ------------------
  911|  21.6k|          ixheaacd_hbe_repl_spec(
  912|  21.6k|              &ptr_sbr_dec->p_hbe_txposer->x_over_qmf[0],
  913|  21.6k|              ptr_sbr_dec->ph_vocod_qmf_real + (op_delay + SBR_HF_ADJ_OFFSET),
  ------------------
  |  |   99|  21.6k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
  914|  21.6k|              ptr_sbr_dec->ph_vocod_qmf_imag + (op_delay + SBR_HF_ADJ_OFFSET),
  ------------------
  |  |   99|  21.6k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
  915|  21.6k|              ptr_sbr_dec->str_codec_qmf_bank.num_time_slots,
  916|  21.6k|              ptr_sbr_dec->p_hbe_txposer->max_stretch);
  917|  21.6k|        }
  918|   139k|      }
  919|   139k|    }
  920|   224k|    if (!mps_sbr_flag && apply_processing) {
  ------------------
  |  Branch (920:9): [True: 145k, False: 79.2k]
  |  Branch (920:26): [True: 139k, False: 6.29k]
  ------------------
  921|   139k|      err_code = ixheaacd_generate_hf(ptr_sbr_dec->qmf_buf_real + (SBR_HF_ADJ_OFFSET),
  ------------------
  |  |   99|   139k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
  922|   139k|                                      ptr_sbr_dec->qmf_buf_imag + (SBR_HF_ADJ_OFFSET),
  ------------------
  |  |   99|   139k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
  923|   139k|                                      ptr_sbr_dec->ph_vocod_qmf_real + (SBR_HF_ADJ_OFFSET),
  ------------------
  |  |   99|   139k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
  924|   139k|                                      ptr_sbr_dec->ph_vocod_qmf_imag + (SBR_HF_ADJ_OFFSET),
  ------------------
  |  |   99|   139k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
  925|   139k|                                      ptr_sbr_dec->sbr_qmf_out_real + (SBR_HF_ADJ_OFFSET),
  ------------------
  |  |   99|   139k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
  926|   139k|                                      ptr_sbr_dec->sbr_qmf_out_imag + (SBR_HF_ADJ_OFFSET),
  ------------------
  |  |   99|   139k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
  927|   139k|                                      ptr_frame_data, ptr_header_data, ldmps_present,
  928|   139k|                                      ptr_sbr_dec->str_codec_qmf_bank.num_time_slots, ec_flag);
  929|   139k|      if (err_code) return err_code;
  ------------------
  |  Branch (929:11): [True: 11, False: 139k]
  ------------------
  930|       |
  931|   139k|      ptr_pvc_data->pvc_rate = ptr_header_data->upsamp_fac;
  932|       |
  933|   139k|      if (sbr_mode == PVC_SBR) {
  ------------------
  |  Branch (933:11): [True: 63.4k, False: 75.8k]
  ------------------
  934|  63.4k|        ixheaacd_qmf_enrg_calc(ptr_sbr_dec, upsample_ratio_idx, low_pow_flag);
  935|  63.4k|        if (ec_flag) {
  ------------------
  |  Branch (935:13): [True: 0, False: 63.4k]
  ------------------
  936|      0|          ptr_pvc_data->pvc_mode = 1;
  937|      0|        }
  938|  63.4k|        err_code = ixheaacd_pvc_process(
  939|  63.4k|            ptr_pvc_data, ptr_header_data->pstr_freq_band_data->sub_band_start,
  940|  63.4k|            ptr_frame_data->str_pvc_frame_info.border_vec[0],
  941|  63.4k|            &pvc_qmf_enrg_arr[0], &pvc_dec_out_buf[0]);
  942|       |
  943|  63.4k|        if (err_code) return err_code;
  ------------------
  |  Branch (943:13): [True: 36, False: 63.3k]
  ------------------
  944|       |
  945|  63.3k|        ptr_pvc_data->prev_pvc_flg = 1;
  946|  75.8k|      } else {
  947|  75.8k|        memset(pvc_dec_out_buf, 0, 1024 * sizeof(FLOAT32));
  948|  75.8k|        ptr_pvc_data->prev_pvc_flg = 0;
  949|  75.8k|      }
  950|       |
  951|   139k|      ptr_pvc_data->prev_first_bnd_idx =
  952|   139k|          ptr_header_data->pstr_freq_band_data->sub_band_start;
  953|   139k|      ptr_pvc_data->prev_pvc_rate = ptr_pvc_data->pvc_rate;
  954|       |
  955|   139k|      ptr_frame_data->pstr_sbr_header = ptr_header_data;
  956|   139k|      err_code = ixheaacd_sbr_env_calc(
  957|   139k|          ptr_frame_data, ptr_sbr_dec->sbr_qmf_out_real + (SBR_HF_ADJ_OFFSET),
  ------------------
  |  |   99|   139k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
  958|   139k|          ptr_sbr_dec->sbr_qmf_out_imag + (SBR_HF_ADJ_OFFSET),
  ------------------
  |  |   99|   139k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
  959|   139k|          ptr_sbr_dec->qmf_buf_real + (SBR_HF_ADJ_OFFSET),
  ------------------
  |  |   99|   139k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
  960|   139k|          ptr_sbr_dec->qmf_buf_imag + (SBR_HF_ADJ_OFFSET),
  ------------------
  |  |   99|   139k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
  961|   139k|          (ptr_header_data->hbe_flag == 0) ? NULL : ptr_sbr_dec->p_hbe_txposer->x_over_qmf,
  ------------------
  |  Branch (961:11): [True: 33.6k, False: 105k]
  ------------------
  962|   139k|          ptr_sbr_dec->scratch_buff, pvc_dec_out_buf, ldmps_present, ec_flag);
  963|       |
  964|   139k|      if (err_code) return err_code;
  ------------------
  |  Branch (964:11): [True: 7, False: 139k]
  ------------------
  965|       |
  966|   139k|    } else {
  967|  5.55M|      for (i = 0; i < 64; i++) {
  ------------------
  |  Branch (967:19): [True: 5.47M, False: 85.5k]
  ------------------
  968|  5.47M|        memset(ptr_sbr_dec->sbr_qmf_out_real[i], 0, 64 * sizeof(FLOAT32));
  969|  5.47M|        memset(ptr_sbr_dec->sbr_qmf_out_imag[i], 0, 64 * sizeof(FLOAT32));
  970|  5.47M|      }
  971|  85.5k|    }
  972|       |
  973|   224k|    if (!mps_sbr_flag) {
  ------------------
  |  Branch (973:9): [True: 145k, False: 79.2k]
  ------------------
  974|   145k|      ptr_sbr_dec->band_count =
  975|   145k|          ptr_header_data->pstr_freq_band_data->sub_band_end;
  976|   145k|    } else
  977|  79.2k|      ptr_sbr_dec->band_count = ptr_sbr_dec->str_codec_qmf_bank.no_channels;
  978|       |
  979|   224k|    ixheaacd_esbr_synthesis_filt_block(
  980|   224k|        ptr_sbr_dec, ptr_header_data, ptr_frame_data, apply_processing,
  981|   224k|        pp_qmf_buf_real, pp_qmf_buf_imag, stereo_config_idx, sbr_tables_ptr,
  982|   224k|        mps_sbr_flag, ch_fac,
  983|   224k|        ((ptr_header_data->channel_mode == PS_STEREO) || ptr_header_data->enh_sbr_ps),
  ------------------
  |  |   29|   224k|#define PS_STEREO 3
  ------------------
  |  Branch (983:10): [True: 8.21k, False: 216k]
  |  Branch (983:58): [True: 13, False: 216k]
  ------------------
  984|   224k|        0, ptr_ps_dec, drc_on, drc_sbr_factors);
  985|       |
  986|   224k|    if (ptr_header_data->enh_sbr_ps || ptr_header_data->channel_mode == PS_STEREO) {
  ------------------
  |  |   29|   216k|#define PS_STEREO 3
  ------------------
  |  Branch (986:9): [True: 8.22k, False: 216k]
  |  Branch (986:40): [True: 0, False: 216k]
  ------------------
  987|  8.22k|      pp_qmf_buf_real = ptr_ps_dec->pp_qmf_buf_real[1];
  988|  8.22k|      pp_qmf_buf_imag = ptr_ps_dec->pp_qmf_buf_imag[1];
  989|  8.22k|      ixheaacd_esbr_synthesis_filt_block(
  990|  8.22k|          (ia_sbr_dec_struct *)
  991|  8.22k|          (&(((ia_handle_sbr_dec_inst_struct)self)->pstr_sbr_channel[1]->str_sbr_dec)),
  992|  8.22k|          (ia_sbr_header_data_struct *)
  993|  8.22k|          (&(((ia_handle_sbr_dec_inst_struct)self)->pstr_sbr_header[1])),
  994|  8.22k|          (ia_sbr_frame_info_data_struct *)
  995|  8.22k|          (&(((ia_handle_sbr_dec_inst_struct)self)->frame_buffer[1])), apply_processing,
  996|  8.22k|          pp_qmf_buf_real, pp_qmf_buf_imag, stereo_config_idx, sbr_tables_ptr,
  997|  8.22k|          mps_sbr_flag, ch_fac,
  998|  8.22k|          ((ptr_header_data->channel_mode == PS_STEREO) || ptr_header_data->enh_sbr_ps),
  ------------------
  |  |   29|  8.22k|#define PS_STEREO 3
  ------------------
  |  Branch (998:12): [True: 8.21k, False: 13]
  |  Branch (998:60): [True: 13, False: 0]
  ------------------
  999|  8.22k|          1, ptr_ps_dec, drc_on, drc_sbr_factors);
 1000|  8.22k|    }
 1001|   224k|    if (apply_processing && ec_flag) {
  ------------------
  |  Branch (1001:9): [True: 213k, False: 11.0k]
  |  Branch (1001:29): [True: 0, False: 213k]
  ------------------
 1002|      0|      WORD16 *border_vec = ptr_frame_data->str_frame_info_details.border_vec;
 1003|      0|      ptr_frame_data_prev->end_position =
 1004|      0|          border_vec[ptr_frame_data->str_frame_info_details.num_env];
 1005|      0|    }
 1006|   224k|    ptr_frame_data->prev_sbr_mode = sbr_mode;
 1007|       |
 1008|   224k|    return 0;
 1009|   224k|  }
 1010|       |
 1011|  50.4k|  if (ldmps_present) {
  ------------------
  |  Branch (1011:7): [True: 4.10k, False: 46.3k]
  ------------------
 1012|  4.10k|    if (ptr_sbr_dec->str_codec_qmf_bank.no_channels > 32) {
  ------------------
  |  Branch (1012:9): [True: 37, False: 4.06k]
  ------------------
 1013|     37|      if (ec_flag) {
  ------------------
  |  Branch (1013:11): [True: 0, False: 37]
  ------------------
 1014|      0|        ptr_sbr_dec->str_codec_qmf_bank.no_channels = 32;
 1015|     37|      } else {
 1016|     37|        return IA_FATAL_ERROR;
  ------------------
  |  |   25|     37|#define IA_FATAL_ERROR 0x80000000
  ------------------
 1017|     37|      }
 1018|     37|    }
 1019|  4.06k|    ixheaacd_cplx_anal_qmffilt_32(
 1020|  4.06k|        (WORD32 *)ptr_time_data, &ptr_sbr_dec->str_sbr_scale_fact,
 1021|  4.06k|        &p_arr_qmf_buf_real[op_delay], &p_arr_qmf_buf_imag[op_delay],
 1022|  4.06k|        &ptr_sbr_dec->str_codec_qmf_bank, sbr_tables_ptr->qmf_dec_tables_ptr,
 1023|  4.06k|        ch_fac, 1);
 1024|  46.3k|  } else {
 1025|  46.3k|    ixheaacd_cplx_anal_qmffilt(
 1026|  46.3k|        ptr_time_data, &ptr_sbr_dec->str_sbr_scale_fact, &p_arr_qmf_buf_real[op_delay],
 1027|  46.3k|        &p_arr_qmf_buf_imag[op_delay], &ptr_sbr_dec->str_codec_qmf_bank,
 1028|  46.3k|        sbr_tables_ptr->qmf_dec_tables_ptr, ch_fac, low_pow_flag, audio_object_type);
 1029|  46.3k|  }
 1030|       |
 1031|  50.4k|  if (ldmps_present == 1) {
  ------------------
  |  Branch (1031:7): [True: 4.06k, False: 46.3k]
  ------------------
 1032|  4.06k|    for (j = SBR_HF_ADJ_OFFSET;
  ------------------
  |  |   99|  4.06k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
 1033|  68.2k|         j < ptr_sbr_dec->str_codec_qmf_bank.num_time_slots + SBR_HF_ADJ_OFFSET;
  ------------------
  |  |   99|  68.2k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
  |  Branch (1033:10): [True: 64.1k, False: 4.06k]
  ------------------
 1034|  64.1k|         j++) {
 1035|  4.17M|      for (k = 0; k < 64; k++) {
  ------------------
  |  Branch (1035:19): [True: 4.10M, False: 64.1k]
  ------------------
 1036|  4.10M|        WORD32 scale = 7;
 1037|  4.10M|        ptr_sbr_dec->mps_qmf_buf_real[j][k] = 0.0f;
 1038|  4.10M|        ptr_sbr_dec->mps_qmf_buf_imag[j][k] = 0.0f;
 1039|  4.10M|        if (k < ptr_sbr_dec->str_codec_qmf_bank.usb) {
  ------------------
  |  Branch (1039:13): [True: 1.56M, False: 2.54M]
  ------------------
 1040|  1.56M|          ptr_sbr_dec->mps_qmf_buf_real[j][k] +=
 1041|  1.56M|              (FLOAT32)(p_arr_qmf_buf_real[j][k] / (FLOAT32)(1 << scale));
 1042|  1.56M|          ptr_sbr_dec->mps_qmf_buf_imag[j][k] +=
 1043|  1.56M|              (FLOAT32)(p_arr_qmf_buf_imag[j][k] / (FLOAT32)(1 << scale));
 1044|  1.56M|        }
 1045|  4.10M|      }
 1046|  64.1k|    }
 1047|  4.06k|  }
 1048|       |  /*ITTIAM : the size of real and img coeff are not same as that of the mps
 1049|       |   * analysis.*/
 1050|  50.4k|  {
 1051|  50.4k|    WORD shift1, shift2;
 1052|  50.4k|    WORD min_shift;
 1053|  50.4k|    WORD shift_over;
 1054|  50.4k|    WORD reserve_ov1, reserve_ov2;
 1055|  50.4k|    WORD reservea[2];
 1056|  50.4k|    WORD i = 0;
 1057|  50.4k|    WORD usb = ptr_sbr_dec->str_codec_qmf_bank.usb;
 1058|  50.4k|    WORD iter_val = 1;
 1059|  50.4k|    if (audio_object_type == AOT_ER_AAC_ELD ||
  ------------------
  |  Branch (1059:9): [True: 50.4k, False: 0]
  ------------------
 1060|  50.4k|        audio_object_type == AOT_ER_AAC_LD) {
  ------------------
  |  Branch (1060:9): [True: 0, False: 0]
  ------------------
 1061|  50.4k|      iter_val = 0;
 1062|  50.4k|    }
 1063|  50.4k|    do {
 1064|  50.4k|      WORD t1 = op_delay;
 1065|  50.4k|      WORD t2 = no_bins + op_delay;
 1066|  50.4k|      if (i) {
  ------------------
  |  Branch (1066:11): [True: 0, False: 50.4k]
  ------------------
 1067|      0|        t1 = 0;
 1068|      0|        t2 = op_delay;
 1069|      0|      }
 1070|  50.4k|      reservea[i] = (*ixheaacd_ixheaacd_expsubbandsamples)(
 1071|  50.4k|          p_arr_qmf_buf_real, p_arr_qmf_buf_imag, 0, usb, t1, t2, low_pow_flag);
 1072|  50.4k|      i++;
 1073|  50.4k|    } while (i <= iter_val);
  ------------------
  |  Branch (1073:14): [True: 0, False: 50.4k]
  ------------------
 1074|  50.4k|    ;
 1075|       |
 1076|  50.4k|    reserve = reservea[0];
 1077|  50.4k|    if (audio_object_type != AOT_ER_AAC_ELD &&
  ------------------
  |  Branch (1077:9): [True: 0, False: 50.4k]
  ------------------
 1078|      0|        audio_object_type != AOT_ER_AAC_LD)
  ------------------
  |  Branch (1078:9): [True: 0, False: 0]
  ------------------
 1079|      0|      reserve_ov1 = reservea[1];
 1080|  50.4k|    else
 1081|  50.4k|      reserve_ov1 = reserve;
 1082|  50.4k|    ptr_sbr_dec->max_samp_val = ixheaac_min32(reserve, reserve_ov1);
 1083|       |
 1084|  50.4k|    reserve_ov2 = (*ixheaacd_ixheaacd_expsubbandsamples)(
 1085|  50.4k|        ptr_sbr_dec->str_hf_generator.lpc_filt_states_real,
 1086|  50.4k|        ptr_sbr_dec->str_hf_generator.lpc_filt_states_imag, 0, usb, 0,
 1087|  50.4k|        LPC_ORDER, low_pow_flag);
  ------------------
  |  |   65|  50.4k|#define LPC_ORDER 2
  ------------------
 1088|       |
 1089|  50.4k|    reserve_ov1 = ixheaac_min32(reserve_ov1, reserve_ov2);
 1090|       |
 1091|  50.4k|    shift1 = ptr_sbr_dec->str_sbr_scale_fact.lb_scale + reserve;
 1092|       |
 1093|  50.4k|    shift2 = ptr_sbr_dec->str_sbr_scale_fact.ov_lb_scale + reserve_ov1;
 1094|  50.4k|    min_shift = ixheaac_min32(shift1, shift2);
 1095|  50.4k|    shift_over = (shift2 - min_shift);
 1096|  50.4k|    reserve -= (shift1 - min_shift);
 1097|       |
 1098|  50.4k|    ptr_sbr_dec->str_sbr_scale_fact.ov_lb_scale += (reserve_ov1 - shift_over);
 1099|       |
 1100|  50.4k|    (*ixheaacd_adjust_scale)(p_arr_qmf_buf_real, p_arr_qmf_buf_imag, 0, usb, 0,
 1101|  50.4k|                             op_delay, reserve_ov1 - shift_over, low_pow_flag);
 1102|       |
 1103|  50.4k|    (*ixheaacd_adjust_scale)(p_arr_qmf_buf_real, p_arr_qmf_buf_imag, 0, usb,
 1104|  50.4k|                             op_delay, (no_bins + op_delay), reserve,
 1105|  50.4k|                             low_pow_flag);
 1106|       |
 1107|  50.4k|    (*ixheaacd_adjust_scale)(ptr_sbr_dec->str_hf_generator.lpc_filt_states_real,
 1108|  50.4k|                             ptr_sbr_dec->str_hf_generator.lpc_filt_states_imag,
 1109|  50.4k|                             0, usb, 0, LPC_ORDER, reserve_ov1 - shift_over,
  ------------------
  |  |   65|  50.4k|#define LPC_ORDER 2
  ------------------
 1110|  50.4k|                             low_pow_flag);
 1111|       |
 1112|  50.4k|    ptr_sbr_dec->str_sbr_scale_fact.lb_scale += reserve;
 1113|       |
 1114|  50.4k|    save_lb_scale = ptr_sbr_dec->str_sbr_scale_fact.lb_scale;
 1115|  50.4k|  }
 1116|       |
 1117|  50.4k|  {
 1118|  50.4k|    WORD32 num = no_bins;
 1119|  50.4k|    WORD32 *p_loc_qmf_real =
 1120|  50.4k|        &p_arr_qmf_buf_real[op_delay][NO_ANALYSIS_CHANNELS];
  ------------------
  |  |   35|  50.4k|#define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  ------------------
  |  |  |  |   34|  50.4k|#define NO_SYNTHESIS_CHANNELS 64
  |  |  ------------------
  |  |               #define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  ------------------
  |  |  |  |   23|  50.4k|#define SBR_UPSAMPLE_FAC 2
  |  |  ------------------
  ------------------
 1121|       |
 1122|  50.4k|    if (!low_pow_flag) {
  ------------------
  |  Branch (1122:9): [True: 50.4k, False: 0]
  ------------------
 1123|  50.4k|      num = num << 1;
 1124|  50.4k|    }
 1125|       |
 1126|  50.4k|    ixheaacd_clr_subsamples(p_loc_qmf_real, num - 1, (NO_SYN_ANA_CHANNELS));
  ------------------
  |  |   40|  50.4k|#define NO_SYN_ANA_CHANNELS (NO_SYNTHESIS_CHANNELS - NO_ANALYSIS_CHANNELS)
  |  |  ------------------
  |  |  |  |   34|  50.4k|#define NO_SYNTHESIS_CHANNELS 64
  |  |  ------------------
  |  |               #define NO_SYN_ANA_CHANNELS (NO_SYNTHESIS_CHANNELS - NO_ANALYSIS_CHANNELS)
  |  |  ------------------
  |  |  |  |   35|  50.4k|#define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  |  |  ------------------
  |  |  |  |  |  |   34|  50.4k|#define NO_SYNTHESIS_CHANNELS 64
  |  |  |  |  ------------------
  |  |  |  |               #define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  |  |  ------------------
  |  |  |  |  |  |   23|  50.4k|#define SBR_UPSAMPLE_FAC 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1127|  50.4k|  }
 1128|       |
 1129|  50.4k|  if (apply_processing) {
  ------------------
  |  Branch (1129:7): [True: 50.4k, False: 0]
  ------------------
 1130|  50.4k|    WORD16 degree_alias[NO_SYNTHESIS_CHANNELS];
 1131|  50.4k|    WORD16 *border_vec = ptr_frame_data->str_frame_info_details.border_vec;
 1132|       |
 1133|  50.4k|    if (low_pow_flag) {
  ------------------
  |  Branch (1133:9): [True: 0, False: 50.4k]
  ------------------
 1134|      0|      memset(degree_alias, 0, NO_SYNTHESIS_CHANNELS * sizeof(WORD16));
  ------------------
  |  |   34|      0|#define NO_SYNTHESIS_CHANNELS 64
  ------------------
 1135|      0|    }
 1136|       |
 1137|  50.4k|    if (low_pow_flag) {
  ------------------
  |  Branch (1137:9): [True: 0, False: 50.4k]
  ------------------
 1138|      0|      WORD32 com_low_band_scale;
 1139|      0|      ixheaacd_low_pow_hf_generator(
 1140|      0|          &ptr_sbr_dec->str_hf_generator, p_arr_qmf_buf_real, degree_alias,
 1141|      0|          border_vec[0] * ptr_header_data->time_step,
 1142|      0|          ptr_header_data->time_step *
 1143|      0|              ixheaac_sub16_sat(
 1144|      0|                  border_vec[ptr_frame_data->str_frame_info_details.num_env],
 1145|      0|                  ptr_header_data->num_time_slots),
 1146|      0|          ptr_header_data->pstr_freq_band_data->num_if_bands,
 1147|      0|          ptr_frame_data->max_qmf_subband_aac, ptr_frame_data->sbr_invf_mode,
 1148|      0|          ptr_frame_data_prev->sbr_invf_mode, ptr_sbr_dec->max_samp_val,
 1149|      0|          ptr_work_buf_core);
 1150|       |
 1151|      0|      com_low_band_scale =
 1152|      0|          ixheaac_min32(ptr_sbr_dec->str_sbr_scale_fact.ov_lb_scale,
 1153|      0|                         ptr_sbr_dec->str_sbr_scale_fact.lb_scale);
 1154|       |
 1155|      0|      ptr_sbr_dec->str_sbr_scale_fact.hb_scale =
 1156|      0|          (WORD16)(com_low_band_scale - 2);
 1157|  50.4k|    } else {
 1158|  50.4k|      if (ldmps_present == 1) {
  ------------------
  |  Branch (1158:11): [True: 4.06k, False: 46.3k]
  ------------------
 1159|  4.06k|        err_code = ixheaacd_generate_hf(ptr_sbr_dec->mps_qmf_buf_real + (SBR_HF_ADJ_OFFSET),
  ------------------
  |  |   99|  4.06k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
 1160|  4.06k|                                        ptr_sbr_dec->mps_qmf_buf_imag + (SBR_HF_ADJ_OFFSET),
  ------------------
  |  |   99|  4.06k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
 1161|  4.06k|                                        ptr_sbr_dec->ph_vocod_qmf_real + (SBR_HF_ADJ_OFFSET),
  ------------------
  |  |   99|  4.06k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
 1162|  4.06k|                                        ptr_sbr_dec->ph_vocod_qmf_imag + (SBR_HF_ADJ_OFFSET),
  ------------------
  |  |   99|  4.06k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
 1163|  4.06k|                                        ptr_sbr_dec->sbr_qmf_out_real + (SBR_HF_ADJ_OFFSET),
  ------------------
  |  |   99|  4.06k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
 1164|  4.06k|                                        ptr_sbr_dec->sbr_qmf_out_imag + (SBR_HF_ADJ_OFFSET),
  ------------------
  |  |   99|  4.06k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
 1165|  4.06k|                                        ptr_frame_data, ptr_header_data, ldmps_present,
 1166|  4.06k|                                        ptr_sbr_dec->str_codec_qmf_bank.num_time_slots, ec_flag);
 1167|  4.06k|        if (err_code) return err_code;
  ------------------
  |  Branch (1167:13): [True: 7, False: 4.06k]
  ------------------
 1168|  46.3k|      } else {
 1169|  46.3k|        ixheaacd_hf_generator(
 1170|  46.3k|            &ptr_sbr_dec->str_hf_generator, &ptr_sbr_dec->str_sbr_scale_fact,
 1171|  46.3k|            p_arr_qmf_buf_real, p_arr_qmf_buf_imag, ptr_header_data->time_step,
 1172|  46.3k|            border_vec[0],
 1173|  46.3k|            ixheaac_sub16_sat(
 1174|  46.3k|                border_vec[ptr_frame_data->str_frame_info_details.num_env],
 1175|  46.3k|                ptr_header_data->num_time_slots),
 1176|  46.3k|            ptr_header_data->pstr_freq_band_data->num_if_bands,
 1177|  46.3k|            ptr_frame_data->max_qmf_subband_aac, ptr_frame_data->sbr_invf_mode,
 1178|  46.3k|            ptr_frame_data_prev->sbr_invf_mode, ptr_work_buf_core,
 1179|  46.3k|            audio_object_type);
 1180|  46.3k|      }
 1181|  50.4k|    }
 1182|  50.4k|    if (ldmps_present == 1) {
  ------------------
  |  Branch (1182:9): [True: 4.06k, False: 46.3k]
  ------------------
 1183|  4.06k|      ptr_frame_data->pstr_sbr_header = ptr_header_data;
 1184|  4.06k|      err_code = ixheaacd_sbr_env_calc(
 1185|  4.06k|          ptr_frame_data, ptr_sbr_dec->sbr_qmf_out_real + (SBR_HF_ADJ_OFFSET),
  ------------------
  |  |   99|  4.06k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
 1186|  4.06k|          ptr_sbr_dec->sbr_qmf_out_imag + (SBR_HF_ADJ_OFFSET),
  ------------------
  |  |   99|  4.06k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
 1187|  4.06k|          ptr_sbr_dec->qmf_buf_real + (SBR_HF_ADJ_OFFSET),
  ------------------
  |  |   99|  4.06k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
 1188|  4.06k|          ptr_sbr_dec->qmf_buf_imag + (SBR_HF_ADJ_OFFSET), NULL, ptr_sbr_dec->scratch_buff,
  ------------------
  |  |   99|  4.06k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
 1189|  4.06k|          pvc_dec_out_buf, ldmps_present, ec_flag);
 1190|       |
 1191|  76.2k|      for (j = 0; j < ptr_sbr_dec->str_codec_qmf_bank.num_time_slots + 2; j++) {
  ------------------
  |  Branch (1191:19): [True: 72.1k, False: 4.06k]
  ------------------
 1192|  2.93M|        for (k = ptr_sbr_dec->str_codec_qmf_bank.usb; k < 64; k++) {
  ------------------
  |  Branch (1192:55): [True: 2.85M, False: 72.1k]
  ------------------
 1193|  2.85M|          ptr_sbr_dec->mps_qmf_buf_real[j][k] +=
 1194|  2.85M|              ptr_sbr_dec->sbr_qmf_out_real[j][k];
 1195|  2.85M|          ptr_sbr_dec->mps_qmf_buf_imag[j][k] +=
 1196|  2.85M|              ptr_sbr_dec->sbr_qmf_out_imag[j][k];
 1197|  2.85M|        }
 1198|  72.1k|      }
 1199|  46.3k|    } else {
 1200|  46.3k|      err_code = ixheaacd_calc_sbrenvelope(
 1201|  46.3k|          &ptr_sbr_dec->str_sbr_scale_fact, &ptr_sbr_dec->str_sbr_calc_env,
 1202|  46.3k|          ptr_header_data, ptr_frame_data, ptr_frame_data_prev,
 1203|  46.3k|          p_arr_qmf_buf_real, p_arr_qmf_buf_imag, degree_alias, low_pow_flag,
 1204|  46.3k|          sbr_tables_ptr, pstr_common_tables,
 1205|  46.3k|          ptr_work_buf_core + (LPC_ORDER << (6 + !low_pow_flag)),
  ------------------
  |  |   65|  46.3k|#define LPC_ORDER 2
  ------------------
 1206|  46.3k|          audio_object_type);
 1207|  46.3k|      if (err_code) return err_code;
  ------------------
  |  Branch (1207:11): [True: 0, False: 46.3k]
  ------------------
 1208|  46.3k|    }
 1209|       |
 1210|  50.4k|    memcpy(ptr_frame_data_prev->sbr_invf_mode, ptr_frame_data->sbr_invf_mode,
 1211|  50.4k|           ptr_header_data->pstr_freq_band_data->num_if_bands * sizeof(WORD32));
 1212|       |
 1213|  50.4k|    ptr_frame_data_prev->coupling_mode = ptr_frame_data->coupling_mode;
 1214|  50.4k|    ptr_frame_data_prev->max_qmf_subband_aac =
 1215|  50.4k|        ptr_frame_data->max_qmf_subband_aac;
 1216|  50.4k|    ptr_frame_data_prev->end_position =
 1217|  50.4k|        border_vec[ptr_frame_data->str_frame_info_details.num_env];
 1218|  50.4k|    ptr_frame_data_prev->amp_res = ptr_frame_data->amp_res;
 1219|  50.4k|  } else {
 1220|      0|    ptr_sbr_dec->str_sbr_scale_fact.hb_scale = save_lb_scale;
 1221|      0|  }
 1222|       |
 1223|  50.4k|  if (!low_pow_flag) {
  ------------------
  |  Branch (1223:7): [True: 50.4k, False: 0]
  ------------------
 1224|   151k|    for (i = 0; i < LPC_ORDER; i++) {
  ------------------
  |  |   65|   151k|#define LPC_ORDER 2
  ------------------
  |  Branch (1224:17): [True: 100k, False: 50.4k]
  ------------------
 1225|   100k|      WORD32 *p_loc_qmf_real = &p_arr_qmf_buf_real[no_bins - LPC_ORDER + i][0];
  ------------------
  |  |   65|   100k|#define LPC_ORDER 2
  ------------------
 1226|   100k|      WORD32 *p_loc_qmf_imag = &p_arr_qmf_buf_imag[no_bins - LPC_ORDER + i][0];
  ------------------
  |  |   65|   100k|#define LPC_ORDER 2
  ------------------
 1227|   100k|      WORD32 *plpc_filt_states_real =
 1228|   100k|          &ptr_sbr_dec->str_hf_generator.lpc_filt_states_real[i][0];
 1229|   100k|      WORD32 *plpc_filt_states_imag =
 1230|   100k|          &ptr_sbr_dec->str_hf_generator.lpc_filt_states_imag[i][0];
 1231|       |
 1232|   100k|      memcpy(plpc_filt_states_real, p_loc_qmf_real,
 1233|   100k|             sizeof(WORD32) * (ptr_sbr_dec->str_codec_qmf_bank.usb));
 1234|   100k|      memcpy(plpc_filt_states_imag, p_loc_qmf_imag,
 1235|   100k|             sizeof(WORD32) * (ptr_sbr_dec->str_codec_qmf_bank.usb));
 1236|   100k|    }
 1237|  50.4k|  } else {
 1238|      0|    for (i = 0; i < LPC_ORDER; i++) {
  ------------------
  |  |   65|      0|#define LPC_ORDER 2
  ------------------
  |  Branch (1238:17): [True: 0, False: 0]
  ------------------
 1239|      0|      WORD32 *p_loc_qmf_real = &p_arr_qmf_buf_real[no_bins - LPC_ORDER + i][0];
  ------------------
  |  |   65|      0|#define LPC_ORDER 2
  ------------------
 1240|      0|      WORD32 *plpc_filt_states_real =
 1241|      0|          &ptr_sbr_dec->str_hf_generator.lpc_filt_states_real[i][0];
 1242|      0|      memcpy(plpc_filt_states_real, p_loc_qmf_real,
 1243|      0|             sizeof(WORD32) * (ptr_sbr_dec->str_codec_qmf_bank.usb));
 1244|      0|    }
 1245|      0|  }
 1246|       |
 1247|  50.4k|  if (apply_processing && ptr_header_data->channel_mode == PS_STEREO &&
  ------------------
  |  |   29|   100k|#define PS_STEREO 3
  ------------------
  |  Branch (1247:7): [True: 50.4k, False: 0]
  |  Branch (1247:27): [True: 1.41k, False: 49.0k]
  ------------------
 1248|  1.41k|      ((audio_object_type != AOT_ER_AAC_ELD) &&
  ------------------
  |  Branch (1248:8): [True: 0, False: 1.41k]
  ------------------
 1249|      0|       (audio_object_type != AOT_ER_AAC_LD))) {
  ------------------
  |  Branch (1249:8): [True: 0, False: 0]
  ------------------
 1250|      0|    WORD32 ps_scale;
 1251|       |
 1252|      0|    ixheaacd_init_ps_scale(ptr_ps_dec, &ptr_sbr_dec->str_sbr_scale_fact);
 1253|       |
 1254|      0|    ixheaacd_cplx_synt_qmffilt(p_arr_qmf_buf_real, p_arr_qmf_buf_imag, op_delay,
 1255|      0|                               ptr_sbr_dec->p_arr_qmf_buf_real, ptr_sbr_dec->p_arr_qmf_buf_imag,
 1256|      0|                               &ptr_sbr_dec->str_sbr_scale_fact, ptr_time_data,
 1257|      0|                               &ptr_sbr_dec->str_synthesis_qmf_bank, ptr_ps_dec,
 1258|      0|                               1, 0, sbr_tables_ptr, pstr_common_tables, ch_fac,
 1259|      0|                               drc_on, drc_sbr_factors, audio_object_type);
 1260|       |
 1261|      0|    ps_scale = ptr_sbr_dec->str_sbr_scale_fact.ps_scale;
 1262|      0|    ptr_sbr_sf_r->ov_lb_scale = ps_scale;
 1263|      0|    ptr_sbr_sf_r->lb_scale = ps_scale;
 1264|      0|    ptr_sbr_sf_r->hb_scale = ps_scale;
 1265|       |
 1266|      0|    ixheaacd_cplx_synt_qmffilt(p_arr_qmf_buf_real, p_arr_qmf_buf_imag, op_delay,
 1267|      0|                               ptr_sbr_dec->p_arr_qmf_buf_real, ptr_sbr_dec->p_arr_qmf_buf_imag,
 1268|      0|                               ptr_sbr_sf_r, ptr_time_data + 1,
 1269|      0|                               ptr_qmf_synth_bank_r, ptr_ps_dec, 0, 0,
 1270|      0|                               sbr_tables_ptr, pstr_common_tables, ch_fac,
 1271|      0|                               drc_on, drc_sbr_factors, audio_object_type);
 1272|  50.4k|  } else {
 1273|  50.4k|    ixheaacd_cplx_synt_qmffilt(p_arr_qmf_buf_real, p_arr_qmf_buf_imag, op_delay,
 1274|  50.4k|                               ptr_sbr_dec->p_arr_qmf_buf_real, ptr_sbr_dec->p_arr_qmf_buf_imag,
 1275|  50.4k|                               &ptr_sbr_dec->str_sbr_scale_fact, ptr_time_data,
 1276|  50.4k|                               &ptr_sbr_dec->str_synthesis_qmf_bank, ptr_ps_dec,
 1277|  50.4k|                               0, low_pow_flag, sbr_tables_ptr,
 1278|  50.4k|                               pstr_common_tables, ch_fac, drc_on,
 1279|  50.4k|                               drc_sbr_factors, audio_object_type);
 1280|  50.4k|  }
 1281|       |
 1282|  50.4k|  {
 1283|  50.4k|    WORD32 num = op_delay;
 1284|  50.4k|    if (audio_object_type != AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (1284:9): [True: 0, False: 50.4k]
  ------------------
 1285|      0|      WORD32 *p_loc_qmf_real = ptr_sbr_dec->ptr_sbr_overlap_buf;
 1286|      0|      WORD32 *p_loc_qmf_real_1 = &p_arr_qmf_buf_real[no_bins][0];
 1287|      0|      memcpy(p_loc_qmf_real, p_loc_qmf_real_1,
 1288|      0|             sizeof(WORD32) * NO_SYNTHESIS_CHANNELS * num);
  ------------------
  |  |   34|      0|#define NO_SYNTHESIS_CHANNELS 64
  ------------------
 1289|      0|    }
 1290|       |
 1291|  50.4k|    if (!low_pow_flag) {
  ------------------
  |  Branch (1291:9): [True: 50.4k, False: 0]
  ------------------
 1292|  50.4k|      num = num << 1;
 1293|  50.4k|    }
 1294|       |
 1295|  50.4k|    if (ldmps_present == 1) {
  ------------------
  |  Branch (1295:9): [True: 4.06k, False: 46.3k]
  ------------------
 1296|  4.06k|      memmove(&ptr_sbr_dec->mps_qmf_buf_real[0][0],
 1297|  4.06k|              &ptr_sbr_dec->mps_qmf_buf_real[ptr_sbr_dec->str_codec_qmf_bank
 1298|  4.06k|                                                 .num_time_slots][0],
 1299|  4.06k|              SBR_HF_ADJ_OFFSET * sizeof(FLOAT32) * 64);
  ------------------
  |  |   99|  4.06k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
 1300|       |
 1301|  4.06k|      memmove(&ptr_sbr_dec->mps_qmf_buf_imag[0][0],
 1302|  4.06k|              &ptr_sbr_dec->mps_qmf_buf_imag[ptr_sbr_dec->str_codec_qmf_bank
 1303|  4.06k|                                                 .num_time_slots][0],
 1304|  4.06k|              SBR_HF_ADJ_OFFSET * sizeof(FLOAT32) * 64);
  ------------------
  |  |   99|  4.06k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
 1305|  4.06k|    }
 1306|  50.4k|  }
 1307|       |
 1308|  50.4k|  ptr_sbr_dec->str_sbr_scale_fact.ov_lb_scale = save_lb_scale;
 1309|  50.4k|  return 0;
 1310|  50.4k|}
ixheaacd_esbr_dec:
 1316|  22.4k|                         ia_sbr_tables_struct *ptr_sbr_tables, WORD ch_fac) {
 1317|  22.4k|  WORD32 i;
 1318|  22.4k|  WORD32 op_delay;
 1319|       |
 1320|  22.4k|  WORD32 codec_x_delay = 0;
 1321|       |
 1322|  22.4k|  FLOAT32 **pp_qmf_buf_real = ptr_sbr_dec->pp_qmf_buf_real;
 1323|  22.4k|  FLOAT32 **pp_qmf_buf_imag = ptr_sbr_dec->pp_qmf_buf_imag;
 1324|       |
 1325|  22.4k|  WORD32 upsample_ratio_idx = ptr_header_data->sbr_ratio_idx;
 1326|       |
 1327|  22.4k|  WORD32 mps_sbr_flag = ptr_frame_data->mps_sbr_flag;
 1328|  22.4k|  WORD32 stereo_config_idx = ptr_frame_data->stereo_config_idx;
 1329|  22.4k|  WORD32 hbe_flag = ptr_header_data->hbe_flag;
 1330|  22.4k|  WORD32 sbr_mode = ptr_frame_data->sbr_mode;
 1331|       |
 1332|  22.4k|  op_delay = 6;
 1333|  22.4k|  if (upsample_ratio_idx == SBR_UPSAMPLE_IDX_4_1) {
  ------------------
  |  |   28|  22.4k|#define SBR_UPSAMPLE_IDX_4_1 3
  ------------------
  |  Branch (1333:7): [True: 7.19k, False: 15.2k]
  ------------------
 1334|  7.19k|    op_delay = 2 * 6;
 1335|  7.19k|  }
 1336|       |
 1337|  22.4k|  ptr_sbr_dec->str_sbr_scale_fact.lb_scale = 0;
 1338|  22.4k|  {
 1339|  22.4k|    if (hbe_flag) {
  ------------------
  |  Branch (1339:9): [True: 10.3k, False: 12.0k]
  ------------------
 1340|  10.3k|      codec_x_delay = 32;
 1341|  10.3k|    }
 1342|  22.4k|    if (upsample_ratio_idx == SBR_UPSAMPLE_IDX_4_1) {
  ------------------
  |  |   28|  22.4k|#define SBR_UPSAMPLE_IDX_4_1 3
  ------------------
  |  Branch (1342:9): [True: 7.19k, False: 15.2k]
  ------------------
 1343|  7.19k|      codec_x_delay = 2 * codec_x_delay;
 1344|  7.19k|    }
 1345|       |
 1346|  22.4k|    memmove(
 1347|  22.4k|        &ptr_sbr_dec->qmf_buf_real[0][0],
 1348|  22.4k|        &ptr_sbr_dec
 1349|  22.4k|             ->qmf_buf_real[ptr_sbr_dec->str_codec_qmf_bank.num_time_slots][0],
 1350|  22.4k|        (op_delay + SBR_HF_ADJ_OFFSET + codec_x_delay) * sizeof(FLOAT32) * 64);
  ------------------
  |  |   99|  22.4k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
 1351|  22.4k|    memmove(
 1352|  22.4k|        &ptr_sbr_dec->qmf_buf_imag[0][0],
 1353|  22.4k|        &ptr_sbr_dec
 1354|  22.4k|             ->qmf_buf_imag[ptr_sbr_dec->str_codec_qmf_bank.num_time_slots][0],
 1355|  22.4k|        (op_delay + SBR_HF_ADJ_OFFSET + codec_x_delay) * sizeof(FLOAT32) * 64);
  ------------------
  |  |   99|  22.4k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
 1356|       |
 1357|  22.4k|    memmove(&ptr_sbr_dec->sbr_qmf_out_real[0][0],
 1358|  22.4k|            &ptr_sbr_dec->sbr_qmf_out_real[ptr_sbr_dec->str_codec_qmf_bank
 1359|  22.4k|                                               .num_time_slots][0],
 1360|  22.4k|            (op_delay + SBR_HF_ADJ_OFFSET) * sizeof(FLOAT32) * 64);
  ------------------
  |  |   99|  22.4k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
 1361|  22.4k|    memmove(&ptr_sbr_dec->sbr_qmf_out_imag[0][0],
 1362|  22.4k|            &ptr_sbr_dec->sbr_qmf_out_imag[ptr_sbr_dec->str_codec_qmf_bank
 1363|  22.4k|                                               .num_time_slots][0],
 1364|  22.4k|            (op_delay + SBR_HF_ADJ_OFFSET) * sizeof(FLOAT32) * 64);
  ------------------
  |  |   99|  22.4k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
 1365|       |
 1366|  22.4k|    if (hbe_flag) {
  ------------------
  |  Branch (1366:9): [True: 10.3k, False: 12.0k]
  ------------------
 1367|  10.3k|      memmove(&ptr_sbr_dec->ph_vocod_qmf_real[0][0],
 1368|  10.3k|              &ptr_sbr_dec->ph_vocod_qmf_real[ptr_sbr_dec->str_codec_qmf_bank
 1369|  10.3k|                                                  .num_time_slots][0],
 1370|  10.3k|              64 * sizeof(FLOAT32) * (op_delay + SBR_HF_ADJ_OFFSET));
  ------------------
  |  |   99|  10.3k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
 1371|  10.3k|      memmove(ptr_sbr_dec->ph_vocod_qmf_imag,
 1372|  10.3k|              ptr_sbr_dec->ph_vocod_qmf_imag +
 1373|  10.3k|                  ptr_sbr_dec->str_codec_qmf_bank.num_time_slots,
 1374|  10.3k|              64 * sizeof(FLOAT32) * (op_delay + SBR_HF_ADJ_OFFSET));
  ------------------
  |  |   99|  10.3k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
 1375|  10.3k|    }
 1376|  22.4k|  }
 1377|       |
 1378|  22.4k|  ixheaacd_esbr_analysis_filt_block(
 1379|  22.4k|      ptr_sbr_dec, ptr_sbr_tables,
 1380|  22.4k|      op_delay + codec_x_delay + SBR_HF_ADJ_OFFSET);
  ------------------
  |  |   99|  22.4k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
 1381|       |
 1382|  22.4k|  if (hbe_flag) {
  ------------------
  |  Branch (1382:7): [True: 10.3k, False: 12.0k]
  ------------------
 1383|  10.3k|    WORD32 err = ixheaacd_qmf_hbe_apply(
 1384|  10.3k|        ptr_sbr_dec->p_hbe_txposer,
 1385|  10.3k|        ptr_sbr_dec->qmf_buf_real + (op_delay + SBR_HF_ADJ_OFFSET) +
  ------------------
  |  |   99|  10.3k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
 1386|  10.3k|            ESBR_HBE_DELAY_OFFSET,
  ------------------
  |  |  104|  10.3k|#define ESBR_HBE_DELAY_OFFSET (32)
  ------------------
 1387|  10.3k|        ptr_sbr_dec->qmf_buf_imag + (op_delay + SBR_HF_ADJ_OFFSET) +
  ------------------
  |  |   99|  10.3k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
 1388|  10.3k|            ESBR_HBE_DELAY_OFFSET,
  ------------------
  |  |  104|  10.3k|#define ESBR_HBE_DELAY_OFFSET (32)
  ------------------
 1389|  10.3k|        ptr_sbr_dec->str_codec_qmf_bank.num_time_slots,
 1390|  10.3k|        ptr_sbr_dec->ph_vocod_qmf_real + (op_delay + SBR_HF_ADJ_OFFSET),
  ------------------
  |  |   99|  10.3k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
 1391|  10.3k|        ptr_sbr_dec->ph_vocod_qmf_imag + (op_delay + SBR_HF_ADJ_OFFSET),
  ------------------
  |  |   99|  10.3k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
 1392|  10.3k|        ptr_frame_data->pitch_in_bins, ptr_header_data);
 1393|  10.3k|    if (err) return err;
  ------------------
  |  Branch (1393:9): [True: 0, False: 10.3k]
  ------------------
 1394|       |
 1395|  10.3k|    if (upsample_ratio_idx == SBR_UPSAMPLE_IDX_4_1) {
  ------------------
  |  |   28|  10.3k|#define SBR_UPSAMPLE_IDX_4_1 3
  ------------------
  |  Branch (1395:9): [True: 7.19k, False: 3.20k]
  ------------------
 1396|  7.19k|      ixheaacd_hbe_repl_spec(
 1397|  7.19k|          &ptr_sbr_dec->p_hbe_txposer->x_over_qmf[0],
 1398|  7.19k|          ptr_sbr_dec->ph_vocod_qmf_real + (op_delay + SBR_HF_ADJ_OFFSET),
  ------------------
  |  |   99|  7.19k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
 1399|  7.19k|          ptr_sbr_dec->ph_vocod_qmf_imag + (op_delay + SBR_HF_ADJ_OFFSET),
  ------------------
  |  |   99|  7.19k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
 1400|  7.19k|          ptr_sbr_dec->str_codec_qmf_bank.num_time_slots,
 1401|  7.19k|          ptr_sbr_dec->p_hbe_txposer->max_stretch);
 1402|  7.19k|    }
 1403|  10.3k|  }
 1404|  22.4k|  ixheaacd_qmf_enrg_calc(ptr_sbr_dec, upsample_ratio_idx, low_pow_flag);
 1405|       |
 1406|  1.45M|  for (i = 0; i < 64; i++) {
  ------------------
  |  Branch (1406:15): [True: 1.43M, False: 22.4k]
  ------------------
 1407|  1.43M|    memset(ptr_sbr_dec->sbr_qmf_out_real[i], 0, 64 * sizeof(FLOAT32));
 1408|  1.43M|    memset(ptr_sbr_dec->sbr_qmf_out_imag[i], 0, 64 * sizeof(FLOAT32));
 1409|  1.43M|  }
 1410|       |
 1411|  22.4k|  ptr_sbr_dec->band_count = ptr_sbr_dec->str_codec_qmf_bank.no_channels;
 1412|       |
 1413|  22.4k|  ixheaacd_esbr_synthesis_filt_block(
 1414|  22.4k|      ptr_sbr_dec, ptr_header_data, ptr_frame_data, apply_processing,
 1415|  22.4k|      pp_qmf_buf_real, pp_qmf_buf_imag, stereo_config_idx, ptr_sbr_tables,
 1416|  22.4k|      mps_sbr_flag, ch_fac, 0, 0, NULL, 0, NULL);
 1417|       |
 1418|  22.4k|  ptr_frame_data->prev_sbr_mode = sbr_mode;
 1419|  22.4k|  return 0;
 1420|  22.4k|}
ixheaacd_sbr_dec_from_mps:
 1423|   154k|                                 VOID *p_sbr_header, WORD32 ec_flag) {
 1424|   154k|  WORD32 i, k;
 1425|   154k|  ia_sbr_frame_info_data_struct *ptr_frame_data =
 1426|   154k|      (ia_sbr_frame_info_data_struct *)p_sbr_frame;
 1427|   154k|  ia_sbr_header_data_struct *ptr_header_data =
 1428|   154k|      (ia_sbr_header_data_struct *)p_sbr_header;
 1429|   154k|  ia_sbr_dec_struct *ptr_sbr_dec = (ia_sbr_dec_struct *)p_sbr_dec;
 1430|   154k|  ia_frame_info_struct *p_frame_info = &ptr_frame_data->str_frame_info_details;
 1431|   154k|  WORD32 no_bins;
 1432|   154k|  WORD32 upsample_ratio_idx = ptr_header_data->sbr_ratio_idx;
 1433|   154k|  WORD32 op_delay = 6 + SBR_HF_ADJ_OFFSET;
  ------------------
  |  |   99|   154k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
 1434|   154k|  WORD32 num_anal_bands = 40;
 1435|   154k|  WORD32 mps_sbr_flag = ptr_frame_data->mps_sbr_flag;
 1436|   154k|  WORD32 err = 0;
 1437|       |
 1438|   154k|  if (ptr_header_data->is_usf_4) {
  ------------------
  |  Branch (1438:7): [True: 28.6k, False: 126k]
  ------------------
 1439|  28.6k|    op_delay += 6;
 1440|  28.6k|  }
 1441|       |
 1442|   154k|  num_anal_bands = num_anal_bands - (upsample_ratio_idx << 3);
 1443|       |
 1444|   154k|  if (!mps_sbr_flag) {
  ------------------
  |  Branch (1444:7): [True: 75.5k, False: 79.1k]
  ------------------
 1445|  75.5k|    return 0;
 1446|  79.1k|  } else {
 1447|  79.1k|    ptr_frame_data->cov_count = ptr_sbr_dec->str_codec_qmf_bank.no_channels;
 1448|  79.1k|  }
 1449|       |
 1450|  79.1k|  no_bins = ptr_header_data->output_framesize / 64;
 1451|       |
 1452|  3.07M|  for (i = 0; i < no_bins; i++) {
  ------------------
  |  Branch (1452:15): [True: 2.99M, False: 79.1k]
  ------------------
 1453|  2.99M|    FLOAT32 *p_loc_mps_qmf_output =
 1454|  2.99M|        p_mps_qmf_output + i * (MAX_NUM_QMF_BANDS_ESBR * 2);
  ------------------
  |  |  237|  2.99M|#define MAX_NUM_QMF_BANDS_ESBR 128
  ------------------
 1455|  57.9M|    for (k = 0; k < ptr_header_data->pstr_freq_band_data->sub_band_start; k++) {
  ------------------
  |  Branch (1455:17): [True: 54.9M, False: 2.99M]
  ------------------
 1456|  54.9M|      ptr_sbr_dec->mps_qmf_buf_real[op_delay + i][k] = *p_loc_mps_qmf_output++;
 1457|  54.9M|      ptr_sbr_dec->mps_qmf_buf_imag[op_delay + i][k] = *p_loc_mps_qmf_output++;
 1458|       |
 1459|  54.9M|      ptr_sbr_dec->mps_sbr_qmf_buf_real[SBR_HF_ADJ_OFFSET + i][k] =
  ------------------
  |  |   99|  54.9M|#define SBR_HF_ADJ_OFFSET 2
  ------------------
 1460|  54.9M|          ptr_sbr_dec->qmf_buf_real[SBR_HF_ADJ_OFFSET + i][k];
  ------------------
  |  |   99|  54.9M|#define SBR_HF_ADJ_OFFSET 2
  ------------------
 1461|  54.9M|      ptr_sbr_dec->mps_sbr_qmf_buf_imag[SBR_HF_ADJ_OFFSET + i][k] =
  ------------------
  |  |   99|  54.9M|#define SBR_HF_ADJ_OFFSET 2
  ------------------
 1462|  54.9M|          ptr_sbr_dec->qmf_buf_real[SBR_HF_ADJ_OFFSET + i][k];
  ------------------
  |  |   99|  54.9M|#define SBR_HF_ADJ_OFFSET 2
  ------------------
 1463|  54.9M|    }
 1464|  2.99M|  }
 1465|       |
 1466|  79.1k|  if (ptr_frame_data->reset_flag) {
  ------------------
  |  Branch (1466:7): [True: 16.8k, False: 62.2k]
  ------------------
 1467|  16.8k|    WORD32 l;
 1468|  16.8k|    WORD32 start_band = ptr_header_data->pstr_freq_band_data->qmf_sb_prev;
 1469|  16.8k|    WORD32 end_band = num_anal_bands;
 1470|  16.8k|    WORD32 start_slot =
 1471|  16.8k|        SBR_HF_ADJ_OFFSET + ptr_frame_data->rate * p_frame_info->border_vec[0];
  ------------------
  |  |   99|  16.8k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
 1472|       |
 1473|   135k|    for (l = start_slot; l < op_delay; l++) {
  ------------------
  |  Branch (1473:26): [True: 118k, False: 16.8k]
  ------------------
 1474|   918k|      for (k = start_band; k < end_band; k++) {
  ------------------
  |  Branch (1474:28): [True: 799k, False: 118k]
  ------------------
 1475|   799k|        ptr_sbr_dec->mps_qmf_buf_real[l][k] = 0.0;
 1476|   799k|        ptr_sbr_dec->mps_qmf_buf_imag[l][k] = 0.0;
 1477|   799k|      }
 1478|   118k|    }
 1479|       |
 1480|  50.6k|    for (l = 0; l < SBR_HF_ADJ_OFFSET; l++) {
  ------------------
  |  |   99|  50.6k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
  |  Branch (1480:17): [True: 33.7k, False: 16.8k]
  ------------------
 1481|   259k|      for (k = start_band; k < end_band; k++) {
  ------------------
  |  Branch (1481:28): [True: 225k, False: 33.7k]
  ------------------
 1482|   225k|        ptr_sbr_dec->mps_qmf_buf_real[l][k] = 0.0;
 1483|   225k|        ptr_sbr_dec->mps_qmf_buf_imag[l][k] = 0.0;
 1484|   225k|      }
 1485|  33.7k|    }
 1486|  16.8k|  }
 1487|  79.1k|  ptr_header_data->pstr_freq_band_data->qmf_sb_prev =
 1488|  79.1k|      ptr_header_data->pstr_freq_band_data->sub_band_start;
 1489|       |
 1490|  79.1k|  err = ixheaacd_generate_hf(ptr_sbr_dec->mps_qmf_buf_real + SBR_HF_ADJ_OFFSET,
  ------------------
  |  |   99|  79.1k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
 1491|  79.1k|                             ptr_sbr_dec->mps_qmf_buf_imag + SBR_HF_ADJ_OFFSET, NULL, NULL,
  ------------------
  |  |   99|  79.1k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
 1492|  79.1k|                             ptr_sbr_dec->mps_sbr_qmf_buf_real + SBR_HF_ADJ_OFFSET,
  ------------------
  |  |   99|  79.1k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
 1493|  79.1k|                             ptr_sbr_dec->mps_sbr_qmf_buf_imag + SBR_HF_ADJ_OFFSET,
  ------------------
  |  |   99|  79.1k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
 1494|  79.1k|                             ptr_frame_data, ptr_header_data, 0,
 1495|  79.1k|                             ptr_sbr_dec->str_codec_qmf_bank.num_time_slots, ec_flag);
 1496|  79.1k|  if (err) return err;
  ------------------
  |  Branch (1496:7): [True: 10, False: 79.1k]
  ------------------
 1497|       |
 1498|  79.1k|  ptr_frame_data->pstr_sbr_header = ptr_header_data;
 1499|  79.1k|  ptr_frame_data->sbr_mode = ORIG_SBR;
 1500|  79.1k|  ptr_frame_data->prev_sbr_mode = ORIG_SBR;
 1501|  79.1k|  err = ixheaacd_sbr_env_calc(
 1502|  79.1k|      ptr_frame_data, ptr_sbr_dec->mps_sbr_qmf_buf_real + SBR_HF_ADJ_OFFSET,
  ------------------
  |  |   99|  79.1k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
 1503|  79.1k|      ptr_sbr_dec->mps_sbr_qmf_buf_imag + SBR_HF_ADJ_OFFSET,
  ------------------
  |  |   99|  79.1k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
 1504|  79.1k|      ptr_sbr_dec->mps_qmf_buf_real + SBR_HF_ADJ_OFFSET,
  ------------------
  |  |   99|  79.1k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
 1505|  79.1k|      ptr_sbr_dec->mps_qmf_buf_imag + SBR_HF_ADJ_OFFSET,
  ------------------
  |  |   99|  79.1k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
 1506|  79.1k|      (ptr_header_data->hbe_flag == 0) ? NULL : ptr_sbr_dec->p_hbe_txposer->x_over_qmf,
  ------------------
  |  Branch (1506:7): [True: 40.9k, False: 38.1k]
  ------------------
 1507|  79.1k|      ptr_sbr_dec->scratch_buff, NULL, 0, ec_flag);
 1508|       |
 1509|  79.1k|  if (err) return err;
  ------------------
  |  Branch (1509:7): [True: 2, False: 79.1k]
  ------------------
 1510|  3.06M|  for (i = 0; i < no_bins; i++) {
  ------------------
  |  Branch (1510:15): [True: 2.99M, False: 79.1k]
  ------------------
 1511|  2.99M|    FLOAT32 *p_loc_mps_qmf_output =
 1512|  2.99M|        p_mps_qmf_output + i * (MAX_NUM_QMF_BANDS_ESBR * 2);
  ------------------
  |  |  237|  2.99M|#define MAX_NUM_QMF_BANDS_ESBR 128
  ------------------
 1513|  57.9M|    for (k = 0; k < ptr_header_data->pstr_freq_band_data->sub_band_start; k++) {
  ------------------
  |  Branch (1513:17): [True: 54.9M, False: 2.99M]
  ------------------
 1514|  54.9M|      *p_loc_mps_qmf_output++ =
 1515|  54.9M|          ptr_sbr_dec->mps_qmf_buf_real[SBR_HF_ADJ_OFFSET + i][k];
  ------------------
  |  |   99|  54.9M|#define SBR_HF_ADJ_OFFSET 2
  ------------------
 1516|  54.9M|      *p_loc_mps_qmf_output++ =
 1517|  54.9M|          ptr_sbr_dec->mps_qmf_buf_imag[SBR_HF_ADJ_OFFSET + i][k];
  ------------------
  |  |   99|  54.9M|#define SBR_HF_ADJ_OFFSET 2
  ------------------
 1518|  54.9M|    }
 1519|   139M|    for (k = ptr_header_data->pstr_freq_band_data->sub_band_start; k < 64;
  ------------------
  |  Branch (1519:68): [True: 136M, False: 2.99M]
  ------------------
 1520|   136M|         k++) {
 1521|   136M|      *p_loc_mps_qmf_output++ =
 1522|   136M|          ptr_sbr_dec->mps_sbr_qmf_buf_real[SBR_HF_ADJ_OFFSET + i][k];
  ------------------
  |  |   99|   136M|#define SBR_HF_ADJ_OFFSET 2
  ------------------
 1523|   136M|      *p_loc_mps_qmf_output++ =
 1524|   136M|          ptr_sbr_dec->mps_sbr_qmf_buf_imag[SBR_HF_ADJ_OFFSET + i][k];
  ------------------
  |  |   99|   136M|#define SBR_HF_ADJ_OFFSET 2
  ------------------
 1525|   136M|    }
 1526|  2.99M|  }
 1527|       |
 1528|   798k|  for (i = 0; i < op_delay; i++) {
  ------------------
  |  Branch (1528:15): [True: 719k, False: 79.1k]
  ------------------
 1529|   719k|    memmove(ptr_sbr_dec->mps_qmf_buf_real[i],
 1530|   719k|            ptr_sbr_dec->mps_qmf_buf_real[no_bins + i], 64 * sizeof(FLOAT32));
 1531|       |
 1532|   719k|    memmove(ptr_sbr_dec->mps_qmf_buf_imag[i],
 1533|   719k|            ptr_sbr_dec->mps_qmf_buf_imag[no_bins + i], 64 * sizeof(FLOAT32));
 1534|       |
 1535|   719k|    memmove(ptr_sbr_dec->mps_sbr_qmf_buf_real[i],
 1536|   719k|            ptr_sbr_dec->mps_sbr_qmf_buf_real[no_bins + i],
 1537|   719k|            64 * sizeof(FLOAT32));
 1538|       |
 1539|   719k|    memmove(ptr_sbr_dec->mps_sbr_qmf_buf_imag[i],
 1540|   719k|            ptr_sbr_dec->mps_sbr_qmf_buf_imag[no_bins + i],
 1541|   719k|            64 * sizeof(FLOAT32));
 1542|   719k|  }
 1543|       |
 1544|  79.1k|  ptr_frame_data->reset_flag = 0;
 1545|  79.1k|  return err;
 1546|  79.1k|}

ixheaacd_getsize_sbr_persistent:
   83|  37.0k|WORD32 ixheaacd_getsize_sbr_persistent() {
   84|  37.0k|  return (IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_sbr_pers_struct), BYTE_ALIGN_8));
  ------------------
  |  |   87|  37.0k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
   85|  37.0k|}
ixheaacd_esbr_hbe_data_init:
   91|  19.0k|    WORD32 *total_persistant) {
   92|  19.0k|  WORD32 i;
   93|  19.0k|  WORD32 used_persistent = 0;
   94|       |
   95|  19.0k|  if (pstr_esbr_hbe_txposer) {
  ------------------
  |  Branch (95:7): [True: 19.0k, False: 0]
  ------------------
   96|  19.0k|    memset(pstr_esbr_hbe_txposer, 0,
   97|  19.0k|           IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_esbr_hbe_txposer_struct), BYTE_ALIGN_8));
  ------------------
  |  |   87|  19.0k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
   98|       |
   99|  19.0k|    pstr_esbr_hbe_txposer->core_frame_length = num_aac_samples;
  100|       |
  101|  19.0k|    pstr_esbr_hbe_txposer->no_bins = num_out_samples / NO_QMF_SYNTH_CHANNELS;
  ------------------
  |  |  109|  19.0k|#define NO_QMF_SYNTH_CHANNELS 64
  ------------------
  102|  19.0k|    pstr_esbr_hbe_txposer->hbe_qmf_in_len =
  103|  19.0k|        pstr_esbr_hbe_txposer->no_bins;
  104|  19.0k|    pstr_esbr_hbe_txposer->hbe_qmf_out_len =
  105|  19.0k|        2 * pstr_esbr_hbe_txposer->hbe_qmf_in_len;
  106|       |
  107|  19.0k|    pstr_esbr_hbe_txposer->ptr_input_buf =
  108|  19.0k|        (FLOAT32 *)((WORD8 *)persistent_hbe_mem);
  109|  19.0k|    used_persistent +=
  110|  19.0k|        (num_aac_samples + NO_QMF_SYNTH_CHANNELS) * sizeof(FLOAT32);
  ------------------
  |  |  109|  19.0k|#define NO_QMF_SYNTH_CHANNELS 64
  ------------------
  111|       |
  112|  19.0k|    pstr_esbr_hbe_txposer->qmf_in_buf =
  113|  19.0k|        (FLOAT32 **)((WORD8 *)persistent_hbe_mem + used_persistent);
  114|  19.0k|    used_persistent +=
  115|  19.0k|        pstr_esbr_hbe_txposer->hbe_qmf_in_len * sizeof(FLOAT32 *);
  116|       |
  117|   642k|    for (i = 0; i < pstr_esbr_hbe_txposer->hbe_qmf_in_len; i++) {
  ------------------
  |  Branch (117:17): [True: 623k, False: 19.0k]
  ------------------
  118|   623k|      pstr_esbr_hbe_txposer->qmf_in_buf[i] =
  119|   623k|          (FLOAT32 *)((WORD8 *)persistent_hbe_mem + used_persistent);
  120|       |
  121|   623k|      used_persistent += (TWICE_QMF_SYNTH_CHANNELS_NUM * sizeof(FLOAT32));
  ------------------
  |  |  110|   623k|#define TWICE_QMF_SYNTH_CHANNELS_NUM 128
  ------------------
  122|   623k|    }
  123|       |
  124|  19.0k|    pstr_esbr_hbe_txposer->qmf_out_buf =
  125|  19.0k|        (FLOAT32 **)((WORD8 *)persistent_hbe_mem + used_persistent);
  126|  19.0k|    used_persistent +=
  127|  19.0k|        (pstr_esbr_hbe_txposer->hbe_qmf_out_len * sizeof(FLOAT32 *));
  128|       |
  129|  1.26M|    for (i = 0; i < pstr_esbr_hbe_txposer->hbe_qmf_out_len; i++) {
  ------------------
  |  Branch (129:17): [True: 1.24M, False: 19.0k]
  ------------------
  130|  1.24M|      pstr_esbr_hbe_txposer->qmf_out_buf[i] =
  131|  1.24M|          (FLOAT32 *)((WORD8 *)persistent_hbe_mem + used_persistent);
  132|  1.24M|      used_persistent += (TWICE_QMF_SYNTH_CHANNELS_NUM * sizeof(FLOAT32));
  ------------------
  |  |  110|  1.24M|#define TWICE_QMF_SYNTH_CHANNELS_NUM 128
  ------------------
  133|  1.24M|    }
  134|  19.0k|    pstr_esbr_hbe_txposer->upsamp_4_flag = samp_fac_4_flag;
  135|  19.0k|    if (pstr_esbr_hbe_txposer) {
  ------------------
  |  Branch (135:9): [True: 19.0k, False: 0]
  ------------------
  136|  19.0k|      pstr_esbr_hbe_txposer->fft_size[0] = num_aac_samples;
  137|  19.0k|      pstr_esbr_hbe_txposer->fft_size[1] = (WORD32)(FD_OVERSAMPLING_FAC * num_aac_samples);
  ------------------
  |  |   81|  19.0k|#define FD_OVERSAMPLING_FAC (1.5f)
  ------------------
  138|       |
  139|  19.0k|      pstr_esbr_hbe_txposer->ptr_spectrum = &pstr_esbr_hbe_txposer->spectrum_buf[0];
  140|  19.0k|      pstr_esbr_hbe_txposer->ptr_spectrum_tx =
  141|  19.0k|          &pstr_esbr_hbe_txposer->spectrum_transposed_buf[0];
  142|  19.0k|      pstr_esbr_hbe_txposer->mag = &pstr_esbr_hbe_txposer->mag_buf[0];
  143|  19.0k|      pstr_esbr_hbe_txposer->phase = &pstr_esbr_hbe_txposer->phase_buf[0];
  144|  19.0k|      pstr_esbr_hbe_txposer->ptr_output_buf = &pstr_esbr_hbe_txposer->output_buf[0];
  145|  19.0k|    }
  146|  19.0k|  }
  147|  19.0k|  *total_persistant = used_persistent;
  148|  19.0k|  return;
  149|  19.0k|}
ixheaacd_set_sbr_persistent_table_pointer:
  153|  22.8k|    ixheaacd_misc_tables *pstr_common_tables) {
  154|  22.8k|  ia_sbr_pers_struct *sbr_persistent_mem =
  155|  22.8k|      (ia_sbr_pers_struct *)sbr_persistent_mem_v;
  156|  22.8k|  sbr_persistent_mem->str_sbr_dec_inst.pstr_sbr_tables = sbr_tables_ptr;
  157|  22.8k|  sbr_persistent_mem->str_sbr_dec_inst.pstr_common_tables = pstr_common_tables;
  158|  22.8k|}
ixheaacd_set_sbr_persistent_buffers:
  162|  22.8k|                                         WORD32 num_channel, WORD ps_enable) {
  163|  22.8k|  WORD32 i = 0;
  164|  22.8k|  WORD32 used_persistent = *persistent_used;
  165|  22.8k|  WORD32 temp, temp1, temp2, temp3;
  166|  22.8k|  struct ia_sbr_pers_struct *sbr_persistent_mem =
  167|  22.8k|      (struct ia_sbr_pers_struct *)sbr_persistent_mem_v;
  168|       |
  169|  22.8k|  struct ia_sbr_dec_inst_struct *p_str_sbr_dec_inst =
  170|  22.8k|      &sbr_persistent_mem->str_sbr_dec_inst;
  171|       |
  172|  22.8k|  num_channel = max(2, num_channel);
  ------------------
  |  |   74|  22.8k|#define max(a, b) (((a) > (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (74:20): [True: 1.36k, False: 21.4k]
  |  |  ------------------
  ------------------
  173|  22.8k|  memset(sbr_persistent_mem, 0,
  174|  22.8k|         IXHEAAC_GET_SIZE_ALIGNED(sizeof(struct ia_sbr_pers_struct), BYTE_ALIGN_8));
  ------------------
  |  |   87|  22.8k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  175|       |
  176|  22.8k|  sbr_persistent_mem->sbr_qmf_analy_states =
  177|  22.8k|      (WORD16 *)((WORD8 *)sbr_persistent_mem_v + used_persistent);
  178|  22.8k|  temp = num_channel *
  179|  22.8k|         IXHEAAC_GET_SIZE_ALIGNED((QMF_FILTER_STATE_ANA_SIZE + 2 * NO_ANALYSIS_CHANNELS) *
  ------------------
  |  |   87|  22.8k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  180|  22.8k|                                      sizeof(sbr_persistent_mem->sbr_qmf_analy_states[0]),
  181|  22.8k|                                  BYTE_ALIGN_8);
  182|  22.8k|  used_persistent += temp;
  183|       |
  184|  22.8k|  sbr_persistent_mem->sbr_qmf_analy_states_32 =
  185|  22.8k|      (WORD32 *)((WORD8 *)sbr_persistent_mem_v + used_persistent);
  186|  22.8k|  temp1 = num_channel *
  187|  22.8k|          IXHEAAC_GET_SIZE_ALIGNED((QMF_FILTER_STATE_ANA_SIZE + 2 * NO_ANALYSIS_CHANNELS) *
  ------------------
  |  |   87|  22.8k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  188|  22.8k|                                       sizeof(sbr_persistent_mem->sbr_qmf_analy_states_32[0]),
  189|  22.8k|                                   BYTE_ALIGN_8);
  190|  22.8k|  used_persistent += temp1;
  191|       |
  192|  22.8k|  sbr_persistent_mem->sbr_qmf_synth_states =
  193|  22.8k|      (WORD16 *)((WORD8 *)sbr_persistent_mem_v + used_persistent);
  194|       |
  195|  22.8k|  temp2 = (num_channel *
  196|  22.8k|           IXHEAAC_GET_SIZE_ALIGNED((QMF_FILTER_STATE_SYN_SIZE + 2 * NO_SYNTHESIS_CHANNELS) *
  ------------------
  |  |   87|  22.8k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  197|  22.8k|                                        sizeof(sbr_persistent_mem->sbr_qmf_synth_states[0]),
  198|  22.8k|                                    BYTE_ALIGN_8));
  199|  22.8k|  used_persistent += temp2;
  200|       |
  201|  22.8k|  sbr_persistent_mem->sbr_qmf_synth_states_32 =
  202|  22.8k|      (WORD32 *)((WORD8 *)sbr_persistent_mem_v + used_persistent);
  203|       |
  204|  22.8k|  temp3 = (num_channel *
  205|  22.8k|           IXHEAAC_GET_SIZE_ALIGNED((QMF_FILTER_STATE_SYN_SIZE + 2 * NO_SYNTHESIS_CHANNELS) *
  ------------------
  |  |   87|  22.8k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  206|  22.8k|                                        sizeof(sbr_persistent_mem->sbr_qmf_synth_states_32[0]),
  207|  22.8k|                                    BYTE_ALIGN_8));
  208|  22.8k|  used_persistent += temp3;
  209|       |
  210|  22.8k|  memset(sbr_persistent_mem->sbr_qmf_analy_states, 0,
  211|  22.8k|         (temp + temp1 + temp2 + temp3));
  212|       |
  213|  68.4k|  for (i = 0; i < num_channel; i++) {
  ------------------
  |  Branch (213:15): [True: 45.6k, False: 22.8k]
  ------------------
  214|  45.6k|    sbr_persistent_mem->ptr_sbr_overlap_buf[i] =
  215|  45.6k|        (WORD32 *)((WORD8 *)sbr_persistent_mem_v + used_persistent);
  216|       |
  217|  45.6k|    if (ps_enable) {
  ------------------
  |  Branch (217:9): [True: 42.5k, False: 3.07k]
  ------------------
  218|  42.5k|      memset(
  219|  42.5k|          sbr_persistent_mem->ptr_sbr_overlap_buf[i], 0,
  220|  42.5k|          2 * IXHEAAC_GET_SIZE_ALIGNED(MAX_OV_COLS * NO_SYNTHESIS_CHANNELS *
  ------------------
  |  |   87|  42.5k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  221|  42.5k|                                           sizeof(sbr_persistent_mem->ptr_sbr_overlap_buf[i][0]),
  222|  42.5k|                                       BYTE_ALIGN_8));
  223|  42.5k|      used_persistent +=
  224|  42.5k|          2 * IXHEAAC_GET_SIZE_ALIGNED(MAX_OV_COLS * NO_SYNTHESIS_CHANNELS *
  ------------------
  |  |   87|  42.5k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  225|  42.5k|                                           sizeof(sbr_persistent_mem->ptr_sbr_overlap_buf[i][0]),
  226|  42.5k|                                       BYTE_ALIGN_8);
  227|  42.5k|    } else {
  228|  3.07k|      memset(sbr_persistent_mem->ptr_sbr_overlap_buf[i], 0,
  229|  3.07k|             IXHEAAC_GET_SIZE_ALIGNED(MAX_OV_COLS * NO_SYNTHESIS_CHANNELS *
  ------------------
  |  |   87|  3.07k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  230|  3.07k|                                          sizeof(sbr_persistent_mem->ptr_sbr_overlap_buf[i][0]),
  231|  3.07k|                                      BYTE_ALIGN_8));
  232|  3.07k|      used_persistent +=
  233|  3.07k|          IXHEAAC_GET_SIZE_ALIGNED(MAX_OV_COLS * NO_SYNTHESIS_CHANNELS *
  ------------------
  |  |   87|  3.07k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  234|  3.07k|                                       sizeof(sbr_persistent_mem->ptr_sbr_overlap_buf[i][0]),
  235|  3.07k|                                   BYTE_ALIGN_8);
  236|  3.07k|    }
  237|  45.6k|  }
  238|       |
  239|  68.4k|  for (i = 0; i < num_channel; i++) {
  ------------------
  |  Branch (239:15): [True: 45.6k, False: 22.8k]
  ------------------
  240|  45.6k|    WORD32 j;
  241|  45.6k|    sbr_persistent_mem->sbr_lpc_filter_states_real[i] =
  242|  45.6k|        (WORD32 **)((WORD8 *)sbr_persistent_mem_v + used_persistent);
  243|  45.6k|    used_persistent += IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|  45.6k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  244|  45.6k|        LPC_ORDER * sizeof(sbr_persistent_mem->sbr_lpc_filter_states_real[i][0]), BYTE_ALIGN_8);
  245|   136k|    for (j = 0; j < LPC_ORDER; j++) {
  ------------------
  |  |   65|   136k|#define LPC_ORDER 2
  ------------------
  |  Branch (245:17): [True: 91.2k, False: 45.6k]
  ------------------
  246|  91.2k|      sbr_persistent_mem->sbr_lpc_filter_states_real[i][j] =
  247|  91.2k|          (WORD32 *)((WORD8 *)sbr_persistent_mem_v + used_persistent);
  248|       |
  249|  91.2k|      used_persistent += IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|  91.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  250|  91.2k|          NO_ANALYSIS_CHANNELS * sizeof(sbr_persistent_mem->sbr_lpc_filter_states_real[i][j][0]),
  251|  91.2k|          BYTE_ALIGN_8);
  252|       |
  253|  91.2k|      memset(sbr_persistent_mem->sbr_lpc_filter_states_real[i][j], 0,
  254|  91.2k|             IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|  91.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  255|  91.2k|                 NO_ANALYSIS_CHANNELS *
  256|  91.2k|                     sizeof(sbr_persistent_mem->sbr_lpc_filter_states_real[i][j][0]),
  257|  91.2k|                 BYTE_ALIGN_8));
  258|  91.2k|    }
  259|  45.6k|  }
  260|       |
  261|  22.8k|  if (ps_enable) {
  ------------------
  |  Branch (261:7): [True: 21.2k, False: 1.53k]
  ------------------
  262|  63.7k|    for (i = 0; i < num_channel; i++) {
  ------------------
  |  Branch (262:17): [True: 42.5k, False: 21.2k]
  ------------------
  263|  42.5k|      WORD32 j;
  264|       |
  265|  42.5k|      sbr_persistent_mem->sbr_lpc_filter_states_imag[i] =
  266|  42.5k|          (WORD32 **)((WORD8 *)sbr_persistent_mem_v + used_persistent);
  267|  42.5k|      used_persistent += IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|  42.5k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  268|  42.5k|          LPC_ORDER * sizeof(sbr_persistent_mem->sbr_lpc_filter_states_imag[i][0]), BYTE_ALIGN_8);
  269|   127k|      for (j = 0; j < LPC_ORDER; j++) {
  ------------------
  |  |   65|   127k|#define LPC_ORDER 2
  ------------------
  |  Branch (269:19): [True: 85.0k, False: 42.5k]
  ------------------
  270|  85.0k|        sbr_persistent_mem->sbr_lpc_filter_states_imag[i][j] =
  271|  85.0k|            (WORD32 *)((WORD8 *)sbr_persistent_mem_v + used_persistent);
  272|       |
  273|  85.0k|        used_persistent += IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|  85.0k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  274|  85.0k|            NO_ANALYSIS_CHANNELS *
  275|  85.0k|                sizeof(sbr_persistent_mem->sbr_lpc_filter_states_imag[i][j][0]),
  276|  85.0k|            BYTE_ALIGN_8);
  277|       |
  278|  85.0k|        memset(sbr_persistent_mem->sbr_lpc_filter_states_imag[i][j], 0,
  279|  85.0k|               IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|  85.0k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  280|  85.0k|                   NO_ANALYSIS_CHANNELS *
  281|  85.0k|                       sizeof(sbr_persistent_mem->sbr_lpc_filter_states_imag[i][j][0]),
  282|  85.0k|                   BYTE_ALIGN_8));
  283|  85.0k|      }
  284|  42.5k|    }
  285|  21.2k|  }
  286|  68.4k|  for (i = 0; i < num_channel; i++) {
  ------------------
  |  Branch (286:15): [True: 45.6k, False: 22.8k]
  ------------------
  287|  45.6k|    WORD32 initial_used = used_persistent;
  288|  45.6k|    WORD32 temp_used = used_persistent;
  289|       |
  290|  45.6k|    sbr_persistent_mem->sbr_smooth_gain_buf[i] =
  291|  45.6k|        (WORD16 *)((WORD8 *)sbr_persistent_mem_v + temp_used);
  292|  45.6k|    temp_used += 2 * IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|  45.6k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  293|  45.6k|                         MAX_FREQ_COEFFS * sizeof(sbr_persistent_mem->sbr_smooth_gain_buf[i][0]),
  294|  45.6k|                         BYTE_ALIGN_8);
  295|       |
  296|  45.6k|    sbr_persistent_mem->sbr_smooth_noise_buf[i] =
  297|  45.6k|        (WORD16 *)((WORD8 *)sbr_persistent_mem_v + temp_used);
  298|       |
  299|  45.6k|    temp_used += IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|  45.6k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  300|  45.6k|        MAX_FREQ_COEFFS * sizeof(sbr_persistent_mem->sbr_smooth_noise_buf[i][0]), BYTE_ALIGN_8);
  301|       |
  302|  45.6k|    p_str_sbr_dec_inst->pstr_freq_band_data[i] =
  303|  45.6k|        (VOID *)((WORD8 *)sbr_persistent_mem_v + temp_used);
  304|       |
  305|  45.6k|    temp_used += IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_freq_band_data_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  45.6k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  306|       |
  307|  45.6k|    sbr_persistent_mem->pstr_prev_frame_data[i] =
  308|  45.6k|        (VOID *)((WORD8 *)sbr_persistent_mem_v + temp_used);
  309|       |
  310|  45.6k|    temp_used += IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_sbr_prev_frame_data_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  45.6k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  311|       |
  312|  45.6k|    p_str_sbr_dec_inst->pstr_sbr_channel[i] =
  313|  45.6k|        (VOID *)((WORD8 *)sbr_persistent_mem_v + temp_used);
  314|       |
  315|  45.6k|    temp_used += IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_sbr_channel_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  45.6k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  316|       |
  317|  45.6k|    p_str_sbr_dec_inst->pstr_sbr_header[i] =
  318|  45.6k|        (VOID *)((WORD8 *)sbr_persistent_mem_v + temp_used);
  319|       |
  320|  45.6k|    temp_used += IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_sbr_header_data_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  45.6k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  321|       |
  322|  45.6k|    memset(sbr_persistent_mem->sbr_smooth_gain_buf[i], 0,
  323|  45.6k|           temp_used - initial_used);
  324|       |
  325|  45.6k|    used_persistent = temp_used;
  326|  45.6k|  }
  327|       |
  328|  22.8k|  if (ps_enable) {
  ------------------
  |  Branch (328:7): [True: 21.2k, False: 1.53k]
  ------------------
  329|  21.2k|    p_str_sbr_dec_inst->pstr_ps_stereo_dec =
  330|  21.2k|        (ia_ps_dec_struct *)((WORD8 *)sbr_persistent_mem_v + used_persistent);
  331|       |
  332|  21.2k|    memset(p_str_sbr_dec_inst->pstr_ps_stereo_dec, 0,
  333|  21.2k|           IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_ps_dec_struct), BYTE_ALIGN_8));
  ------------------
  |  |   87|  21.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  334|       |
  335|  21.2k|    used_persistent += IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_ps_dec_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  21.2k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  336|  21.2k|  }
  337|       |
  338|  22.8k|  p_str_sbr_dec_inst->frame_buffer[0] =
  339|  22.8k|      (VOID *)((WORD8 *)sbr_persistent_mem_v + used_persistent);
  340|  22.8k|  memset(p_str_sbr_dec_inst->frame_buffer[0], 0,
  341|  22.8k|         IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|  22.8k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  342|  22.8k|             sizeof(ia_sbr_frame_info_data_struct) + MAX_FREQ_COEFFS * sizeof(WORD32) * 2 + 8,
  343|  22.8k|             BYTE_ALIGN_8));
  344|  22.8k|  used_persistent =
  345|  22.8k|      used_persistent + IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_sbr_frame_info_data_struct) +
  ------------------
  |  |   87|  22.8k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  346|  22.8k|                                                     MAX_FREQ_COEFFS * sizeof(WORD32) + 8,
  347|  22.8k|                                                 BYTE_ALIGN_8);
  348|       |
  349|  22.8k|  p_str_sbr_dec_inst->frame_buffer[1] =
  350|  22.8k|      (VOID *)((WORD8 *)sbr_persistent_mem_v + used_persistent);
  351|  22.8k|  memset(p_str_sbr_dec_inst->frame_buffer[1], 0,
  352|  22.8k|         IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|  22.8k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  353|  22.8k|             sizeof(ia_sbr_frame_info_data_struct) + MAX_FREQ_COEFFS * sizeof(WORD32) * 2 + 8,
  354|  22.8k|             BYTE_ALIGN_8));
  355|  22.8k|  used_persistent =
  356|  22.8k|      used_persistent + IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_sbr_frame_info_data_struct) +
  ------------------
  |  |   87|  22.8k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  357|  22.8k|                                                     MAX_FREQ_COEFFS * sizeof(WORD32) + 8,
  358|  22.8k|                                                 BYTE_ALIGN_8);
  359|       |
  360|  22.8k|  {
  361|  22.8k|    WORD32 index = 0;
  362|  22.8k|    p_str_sbr_dec_inst->ptr_pvc_data_str =
  363|  22.8k|        (ia_pvc_data_struct *)((WORD8 *)sbr_persistent_mem_v + used_persistent);
  364|  22.8k|    memset(p_str_sbr_dec_inst->ptr_pvc_data_str, 0,
  365|  22.8k|           IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_pvc_data_struct), BYTE_ALIGN_8));
  ------------------
  |  |   87|  22.8k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  366|  22.8k|    used_persistent += IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_pvc_data_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  22.8k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  367|       |
  368|  22.8k|    p_str_sbr_dec_inst->pstr_sbr_channel[0]->str_sbr_dec.p_hbe_txposer =
  369|  22.8k|        (ia_esbr_hbe_txposer_struct *)((WORD8 *)sbr_persistent_mem_v + used_persistent);
  370|  22.8k|    memset(p_str_sbr_dec_inst->pstr_sbr_channel[0]->str_sbr_dec.p_hbe_txposer, 0,
  371|  22.8k|           IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_esbr_hbe_txposer_struct), BYTE_ALIGN_8));
  ------------------
  |  |   87|  22.8k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  372|  22.8k|    used_persistent += IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_esbr_hbe_txposer_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  22.8k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  373|       |
  374|  22.8k|    if (num_channel == 2) {
  ------------------
  |  Branch (374:9): [True: 22.8k, False: 0]
  ------------------
  375|  22.8k|      p_str_sbr_dec_inst->pstr_sbr_channel[1]->str_sbr_dec.p_hbe_txposer =
  376|  22.8k|          (ia_esbr_hbe_txposer_struct *)((WORD8 *)sbr_persistent_mem_v + used_persistent);
  377|  22.8k|      memset(p_str_sbr_dec_inst->pstr_sbr_channel[1]->str_sbr_dec.p_hbe_txposer, 0,
  378|  22.8k|             IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_esbr_hbe_txposer_struct), BYTE_ALIGN_8));
  ------------------
  |  |   87|  22.8k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  379|  22.8k|      used_persistent +=
  380|  22.8k|          IXHEAAC_GET_SIZE_ALIGNED(sizeof(ia_esbr_hbe_txposer_struct), BYTE_ALIGN_8);
  ------------------
  |  |   87|  22.8k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  381|  22.8k|    }
  382|       |
  383|  22.8k|    p_str_sbr_dec_inst->hbe_txposer_buffers =
  384|  22.8k|        (VOID *)((WORD8 *)sbr_persistent_mem_v + used_persistent);
  385|  22.8k|    memset(p_str_sbr_dec_inst->hbe_txposer_buffers, 0,
  386|  22.8k|           num_channel * IXHEAAC_GET_SIZE_ALIGNED(MAX_HBE_PERSISTENT_SIZE, BYTE_ALIGN_8));
  ------------------
  |  |   87|  22.8k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  387|  22.8k|    used_persistent +=
  388|  22.8k|        num_channel * IXHEAAC_GET_SIZE_ALIGNED(MAX_HBE_PERSISTENT_SIZE, BYTE_ALIGN_8);
  ------------------
  |  |   87|  22.8k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  389|       |
  390|  22.8k|    p_str_sbr_dec_inst->pstr_sbr_channel[0]->str_sbr_dec.pp_qmf_buf_real =
  391|  22.8k|        (FLOAT32 **)((WORD8 *)sbr_persistent_mem_v + used_persistent);
  392|  22.8k|    memset(
  393|  22.8k|        p_str_sbr_dec_inst->pstr_sbr_channel[0]->str_sbr_dec.pp_qmf_buf_real, 0,
  394|  22.8k|        IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|  22.8k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  395|  22.8k|            MAX_QMF_BUF_LEN *
  396|  22.8k|                sizeof(p_str_sbr_dec_inst->pstr_sbr_channel[0]->str_sbr_dec.pp_qmf_buf_real[0]),
  397|  22.8k|            BYTE_ALIGN_8));
  398|  22.8k|    used_persistent += IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|  22.8k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  399|  22.8k|        MAX_QMF_BUF_LEN *
  400|  22.8k|            sizeof(p_str_sbr_dec_inst->pstr_sbr_channel[0]->str_sbr_dec.pp_qmf_buf_real[0]),
  401|  22.8k|        BYTE_ALIGN_8);
  402|       |
  403|  22.8k|    p_str_sbr_dec_inst->pstr_sbr_channel[0]->str_sbr_dec.pp_qmf_buf_imag =
  404|  22.8k|        (FLOAT32 **)((WORD8 *)sbr_persistent_mem_v + used_persistent);
  405|  22.8k|    memset(
  406|  22.8k|        p_str_sbr_dec_inst->pstr_sbr_channel[0]->str_sbr_dec.pp_qmf_buf_imag, 0,
  407|  22.8k|        IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|  22.8k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  408|  22.8k|            MAX_QMF_BUF_LEN *
  409|  22.8k|                sizeof(p_str_sbr_dec_inst->pstr_sbr_channel[0]->str_sbr_dec.pp_qmf_buf_imag[0]),
  410|  22.8k|            BYTE_ALIGN_8));
  411|  22.8k|    used_persistent += IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|  22.8k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  412|  22.8k|        MAX_QMF_BUF_LEN *
  413|  22.8k|            sizeof(p_str_sbr_dec_inst->pstr_sbr_channel[0]->str_sbr_dec.pp_qmf_buf_imag[0]),
  414|  22.8k|        BYTE_ALIGN_8);
  415|       |
  416|  22.8k|    if (num_channel == 2) {
  ------------------
  |  Branch (416:9): [True: 22.8k, False: 0]
  ------------------
  417|  22.8k|      p_str_sbr_dec_inst->pstr_sbr_channel[1]->str_sbr_dec.pp_qmf_buf_real =
  418|  22.8k|          (FLOAT32 **)((WORD8 *)sbr_persistent_mem_v + used_persistent);
  419|  22.8k|      memset(
  420|  22.8k|          p_str_sbr_dec_inst->pstr_sbr_channel[1]->str_sbr_dec.pp_qmf_buf_real, 0,
  421|  22.8k|          IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|  22.8k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  422|  22.8k|              MAX_QMF_BUF_LEN *
  423|  22.8k|                  sizeof(p_str_sbr_dec_inst->pstr_sbr_channel[1]->str_sbr_dec.pp_qmf_buf_real[0]),
  424|  22.8k|              BYTE_ALIGN_8));
  425|  22.8k|      used_persistent += IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|  22.8k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  426|  22.8k|          MAX_QMF_BUF_LEN *
  427|  22.8k|              sizeof(p_str_sbr_dec_inst->pstr_sbr_channel[1]->str_sbr_dec.pp_qmf_buf_real[0]),
  428|  22.8k|          BYTE_ALIGN_8);
  429|       |
  430|  22.8k|      p_str_sbr_dec_inst->pstr_sbr_channel[1]->str_sbr_dec.pp_qmf_buf_imag =
  431|  22.8k|          (FLOAT32 **)((WORD8 *)sbr_persistent_mem_v + used_persistent);
  432|  22.8k|      memset(
  433|  22.8k|          p_str_sbr_dec_inst->pstr_sbr_channel[1]->str_sbr_dec.pp_qmf_buf_imag, 0,
  434|  22.8k|          IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|  22.8k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  435|  22.8k|              MAX_QMF_BUF_LEN *
  436|  22.8k|                  sizeof(p_str_sbr_dec_inst->pstr_sbr_channel[1]->str_sbr_dec.pp_qmf_buf_imag[0]),
  437|  22.8k|              BYTE_ALIGN_8));
  438|  22.8k|      used_persistent += IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|  22.8k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  439|  22.8k|          MAX_QMF_BUF_LEN *
  440|  22.8k|              sizeof(p_str_sbr_dec_inst->pstr_sbr_channel[1]->str_sbr_dec.pp_qmf_buf_imag[0]),
  441|  22.8k|          BYTE_ALIGN_8);
  442|  22.8k|    }
  443|       |
  444|  1.80M|    for (index = 0; index < MAX_QMF_BUF_LEN; index++) {
  ------------------
  |  |  137|  1.80M|#define MAX_QMF_BUF_LEN 78
  ------------------
  |  Branch (444:21): [True: 1.77M, False: 22.8k]
  ------------------
  445|  1.77M|      p_str_sbr_dec_inst->pstr_sbr_channel[0]
  446|  1.77M|          ->str_sbr_dec.pp_qmf_buf_real[index] =
  447|  1.77M|          (FLOAT32 *)((WORD8 *)sbr_persistent_mem_v + used_persistent);
  448|  1.77M|      used_persistent += IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|  1.77M|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  449|  1.77M|          MAX_QMF_BUF_LEN *
  450|  1.77M|              sizeof(
  451|  1.77M|                  p_str_sbr_dec_inst->pstr_sbr_channel[0]->str_sbr_dec.pp_qmf_buf_real[index][0]),
  452|  1.77M|          BYTE_ALIGN_8);
  453|  1.77M|    }
  454|       |
  455|  1.80M|    for (index = 0; index < MAX_QMF_BUF_LEN; index++) {
  ------------------
  |  |  137|  1.80M|#define MAX_QMF_BUF_LEN 78
  ------------------
  |  Branch (455:21): [True: 1.77M, False: 22.8k]
  ------------------
  456|  1.77M|      p_str_sbr_dec_inst->pstr_sbr_channel[0]
  457|  1.77M|          ->str_sbr_dec.pp_qmf_buf_imag[index] =
  458|  1.77M|          (FLOAT32 *)((WORD8 *)sbr_persistent_mem_v + used_persistent);
  459|  1.77M|      used_persistent += IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|  1.77M|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  460|  1.77M|          MAX_QMF_BUF_LEN *
  461|  1.77M|              sizeof(
  462|  1.77M|                  p_str_sbr_dec_inst->pstr_sbr_channel[0]->str_sbr_dec.pp_qmf_buf_imag[index][0]),
  463|  1.77M|          BYTE_ALIGN_8);
  464|  1.77M|    }
  465|       |
  466|  22.8k|    if (num_channel == 2) {
  ------------------
  |  Branch (466:9): [True: 22.8k, False: 0]
  ------------------
  467|  1.80M|      for (index = 0; index < MAX_QMF_BUF_LEN; index++) {
  ------------------
  |  |  137|  1.80M|#define MAX_QMF_BUF_LEN 78
  ------------------
  |  Branch (467:23): [True: 1.77M, False: 22.8k]
  ------------------
  468|  1.77M|        p_str_sbr_dec_inst->pstr_sbr_channel[1]
  469|  1.77M|            ->str_sbr_dec.pp_qmf_buf_real[index] =
  470|  1.77M|            (FLOAT32 *)((WORD8 *)sbr_persistent_mem_v + used_persistent);
  471|  1.77M|        used_persistent += IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|  1.77M|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  472|  1.77M|            MAX_QMF_BUF_LEN * sizeof(p_str_sbr_dec_inst->pstr_sbr_channel[1]
  473|  1.77M|                                         ->str_sbr_dec.pp_qmf_buf_real[index][0]),
  474|  1.77M|            BYTE_ALIGN_8);
  475|  1.77M|      }
  476|       |
  477|  1.80M|      for (index = 0; index < MAX_QMF_BUF_LEN; index++) {
  ------------------
  |  |  137|  1.80M|#define MAX_QMF_BUF_LEN 78
  ------------------
  |  Branch (477:23): [True: 1.77M, False: 22.8k]
  ------------------
  478|  1.77M|        p_str_sbr_dec_inst->pstr_sbr_channel[1]
  479|  1.77M|            ->str_sbr_dec.pp_qmf_buf_imag[index] =
  480|  1.77M|            (FLOAT32 *)((WORD8 *)sbr_persistent_mem_v + used_persistent);
  481|  1.77M|        used_persistent += IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|  1.77M|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  482|  1.77M|            MAX_QMF_BUF_LEN * sizeof(p_str_sbr_dec_inst->pstr_sbr_channel[1]
  483|  1.77M|                                         ->str_sbr_dec.pp_qmf_buf_imag[index][0]),
  484|  1.77M|            BYTE_ALIGN_8);
  485|  1.77M|      }
  486|  22.8k|    }
  487|       |
  488|   889k|    for (i = 0; i < MAX_ENV_COLS; i++) {
  ------------------
  |  |   71|   889k|#define MAX_ENV_COLS (MAX_COLS + MAX_OV_COLS)
  |  |  ------------------
  |  |  |  |   69|   889k|#define MAX_COLS (MAX_FRAME_SIZE / NO_ANALYSIS_CHANNELS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|   889k|#define MAX_FRAME_SIZE 1024
  |  |  |  |  ------------------
  |  |  |  |               #define MAX_COLS (MAX_FRAME_SIZE / NO_ANALYSIS_CHANNELS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   35|   889k|#define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|   889k|#define NO_SYNTHESIS_CHANNELS 64
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   23|   889k|#define SBR_UPSAMPLE_FAC 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define MAX_ENV_COLS (MAX_COLS + MAX_OV_COLS)
  |  |  ------------------
  |  |  |  |   70|   889k|#define MAX_OV_COLS 6
  |  |  ------------------
  ------------------
  |  Branch (488:17): [True: 866k, False: 22.8k]
  ------------------
  489|   866k|      p_str_sbr_dec_inst->pstr_sbr_channel[0]->str_sbr_dec.p_arr_qmf_buf_real[i] =
  490|   866k|          (WORD32 *)((WORD8 *)sbr_persistent_mem_v + used_persistent);
  491|   866k|      memset(p_str_sbr_dec_inst->pstr_sbr_channel[0]->str_sbr_dec.p_arr_qmf_buf_real[i], 0,
  492|   866k|             IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|   866k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  493|   866k|                 MAX_QMF_BUF_LEN * sizeof(p_str_sbr_dec_inst->pstr_sbr_channel[0]
  494|   866k|                                              ->str_sbr_dec.p_arr_qmf_buf_real[i][0]),
  495|   866k|                 BYTE_ALIGN_8));
  496|   866k|      used_persistent += IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|   866k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  497|   866k|          MAX_QMF_BUF_LEN *
  498|   866k|              sizeof(
  499|   866k|                  p_str_sbr_dec_inst->pstr_sbr_channel[0]->str_sbr_dec.p_arr_qmf_buf_real[i][0]),
  500|   866k|          BYTE_ALIGN_8);
  501|       |
  502|   866k|      p_str_sbr_dec_inst->pstr_sbr_channel[0]->str_sbr_dec.p_arr_qmf_buf_imag[i] =
  503|   866k|          (WORD32 *)((WORD8 *)sbr_persistent_mem_v + used_persistent);
  504|   866k|      memset(p_str_sbr_dec_inst->pstr_sbr_channel[0]->str_sbr_dec.p_arr_qmf_buf_imag[i], 0,
  505|   866k|             IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|   866k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  506|   866k|                 MAX_QMF_BUF_LEN * sizeof(p_str_sbr_dec_inst->pstr_sbr_channel[0]
  507|   866k|                                              ->str_sbr_dec.p_arr_qmf_buf_imag[i][0]),
  508|   866k|                 BYTE_ALIGN_8));
  509|   866k|      used_persistent += IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|   866k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  510|   866k|          MAX_QMF_BUF_LEN *
  511|   866k|              sizeof(
  512|   866k|                  p_str_sbr_dec_inst->pstr_sbr_channel[0]->str_sbr_dec.p_arr_qmf_buf_imag[i][0]),
  513|   866k|          BYTE_ALIGN_8);
  514|   866k|    }
  515|       |
  516|  22.8k|    if (num_channel == 2) {
  ------------------
  |  Branch (516:9): [True: 22.8k, False: 0]
  ------------------
  517|   889k|      for (i = 0; i < MAX_ENV_COLS; i++) {
  ------------------
  |  |   71|   889k|#define MAX_ENV_COLS (MAX_COLS + MAX_OV_COLS)
  |  |  ------------------
  |  |  |  |   69|   889k|#define MAX_COLS (MAX_FRAME_SIZE / NO_ANALYSIS_CHANNELS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|   889k|#define MAX_FRAME_SIZE 1024
  |  |  |  |  ------------------
  |  |  |  |               #define MAX_COLS (MAX_FRAME_SIZE / NO_ANALYSIS_CHANNELS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   35|   889k|#define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   34|   889k|#define NO_SYNTHESIS_CHANNELS 64
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   23|   889k|#define SBR_UPSAMPLE_FAC 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define MAX_ENV_COLS (MAX_COLS + MAX_OV_COLS)
  |  |  ------------------
  |  |  |  |   70|   889k|#define MAX_OV_COLS 6
  |  |  ------------------
  ------------------
  |  Branch (517:19): [True: 866k, False: 22.8k]
  ------------------
  518|   866k|        p_str_sbr_dec_inst->pstr_sbr_channel[1]->str_sbr_dec.p_arr_qmf_buf_real[i] =
  519|   866k|            (WORD32 *)((WORD8 *)sbr_persistent_mem_v + used_persistent);
  520|   866k|        memset(p_str_sbr_dec_inst->pstr_sbr_channel[1]->str_sbr_dec.p_arr_qmf_buf_real[i], 0,
  521|   866k|               IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|   866k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  522|   866k|                   MAX_QMF_BUF_LEN * sizeof(p_str_sbr_dec_inst->pstr_sbr_channel[1]
  523|   866k|                                                ->str_sbr_dec.p_arr_qmf_buf_real[i][0]),
  524|   866k|                   BYTE_ALIGN_8));
  525|   866k|        used_persistent += IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|   866k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  526|   866k|            MAX_QMF_BUF_LEN * sizeof(p_str_sbr_dec_inst->pstr_sbr_channel[1]
  527|   866k|                                         ->str_sbr_dec.p_arr_qmf_buf_real[i][0]),
  528|   866k|            BYTE_ALIGN_8);
  529|       |
  530|   866k|        p_str_sbr_dec_inst->pstr_sbr_channel[1]->str_sbr_dec.p_arr_qmf_buf_imag[i] =
  531|   866k|            (WORD32 *)((WORD8 *)sbr_persistent_mem_v + used_persistent);
  532|   866k|        memset(p_str_sbr_dec_inst->pstr_sbr_channel[1]->str_sbr_dec.p_arr_qmf_buf_imag[i], 0,
  533|   866k|               IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|   866k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  534|   866k|                   MAX_QMF_BUF_LEN * sizeof(p_str_sbr_dec_inst->pstr_sbr_channel[1]
  535|   866k|                                                ->str_sbr_dec.p_arr_qmf_buf_imag[i][0]),
  536|   866k|                   BYTE_ALIGN_8));
  537|   866k|        used_persistent += IXHEAAC_GET_SIZE_ALIGNED(
  ------------------
  |  |   87|   866k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  538|   866k|            MAX_QMF_BUF_LEN * sizeof(p_str_sbr_dec_inst->pstr_sbr_channel[1]
  539|   866k|                                         ->str_sbr_dec.p_arr_qmf_buf_imag[i][0]),
  540|   866k|            BYTE_ALIGN_8);
  541|   866k|      }
  542|  22.8k|    }
  543|  22.8k|  }
  544|       |
  545|  22.8k|  *persistent_used = used_persistent;
  546|  22.8k|}
ixheaacd_setesbr_flags:
  590|  2.85k|                            FLAG hbe_flag, FLAG inter_tes_flag) {
  591|  2.85k|  ia_sbr_pers_struct *sbr_persistent_mem;
  592|  2.85k|  sbr_persistent_mem = (ia_sbr_pers_struct *)sbr_persistent_mem_v;
  593|  2.85k|  sbr_persistent_mem->str_sbr_dec_inst.hbe_flag = hbe_flag;
  594|  2.85k|  sbr_persistent_mem->str_sbr_dec_inst.pvc_flag = pvc_flag;
  595|  2.85k|  sbr_persistent_mem->str_sbr_dec_inst.inter_tes_flag = inter_tes_flag;
  596|  2.85k|  return;
  597|  2.85k|}
ixheaacd_init_sbr:
  605|  14.8k|    WORD32 ldmps_present, WORD32 ldsbr_present) {
  606|  14.8k|  WORD16 i;
  607|  14.8k|  WORD16 err;
  608|  14.8k|  ia_sbr_header_data_struct *ptr_header_data[MAXNRSBRCHANNELS];
  609|  14.8k|  ia_sbr_dec_struct *ptr_sbr_dec[2];
  610|  14.8k|  ia_qmf_dec_tables_struct *qmf_dec_tables_ptr;
  611|  14.8k|  ia_sbr_pers_struct *sbr_persistent_mem;
  612|       |
  613|  14.8k|  sbr_persistent_mem = (ia_sbr_pers_struct *)sbr_persistent_mem_v;
  614|  14.8k|  ptr_sbr_dec[0] =
  615|  14.8k|      &sbr_persistent_mem->str_sbr_dec_inst.pstr_sbr_channel[0]->str_sbr_dec;
  616|  14.8k|  ptr_sbr_dec[1] =
  617|  14.8k|      &sbr_persistent_mem->str_sbr_dec_inst.pstr_sbr_channel[1]->str_sbr_dec;
  618|       |
  619|  14.8k|  qmf_dec_tables_ptr =
  620|  14.8k|      sbr_persistent_mem->str_sbr_dec_inst.pstr_sbr_tables->qmf_dec_tables_ptr;
  621|       |
  622|  14.8k|  if (sample_rate_dec > 48000) {
  ------------------
  |  Branch (622:7): [True: 719, False: 14.1k]
  ------------------
  623|    719|    *down_sample_flag = 1;
  624|    719|  }
  625|       |
  626|  42.1k|  for (i = 0; i < channel; i++) {
  ------------------
  |  Branch (626:15): [True: 27.4k, False: 14.7k]
  ------------------
  627|  27.4k|    if (audio_object_type == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (627:9): [True: 8.64k, False: 18.8k]
  ------------------
  628|  8.64k|      memcpy(sbr_persistent_mem->str_sbr_dec_inst.pstr_sbr_header[i],
  629|  8.64k|             &str_sbr_config, sizeof(ia_sbr_header_data_struct));
  630|  8.64k|    }
  631|  27.4k|    ptr_header_data[i] =
  632|  27.4k|        sbr_persistent_mem->str_sbr_dec_inst.pstr_sbr_header[i];
  633|       |
  634|  27.4k|    ixheaacd_init_headerdata(
  635|  27.4k|        ptr_header_data[i], sample_rate_dec, samp_per_frame,
  636|  27.4k|        sbr_persistent_mem->str_sbr_dec_inst.pstr_freq_band_data[i],
  637|  27.4k|        sbr_persistent_mem->str_sbr_dec_inst.pstr_sbr_tables,
  638|  27.4k|        audio_object_type);
  639|       |
  640|  27.4k|    err = ixheaacd_create_sbrdec(
  641|       |
  642|  27.4k|        sbr_persistent_mem->str_sbr_dec_inst.pstr_common_tables,
  643|  27.4k|        sbr_persistent_mem->str_sbr_dec_inst.pstr_sbr_channel[i],
  644|  27.4k|        ptr_header_data[i], i, *down_sample_flag, sbr_persistent_mem, ps_enable,
  645|  27.4k|        audio_object_type, ldmps_present, ldsbr_present);
  646|       |
  647|  27.4k|    ptr_header_data[i]->status = 1;
  648|  27.4k|    ptr_sbr_dec[i]->band_count = 64;
  649|  27.4k|    ptr_header_data[i]->pstr_freq_band_data[0].qmf_sb_prev = 64;
  650|  27.4k|    ptr_header_data[i]->pstr_freq_band_data[1].qmf_sb_prev = 64;
  651|       |
  652|  27.4k|    if (err) {
  ------------------
  |  Branch (652:9): [True: 74, False: 27.3k]
  ------------------
  653|     74|      return NULL;
  654|     74|    }
  655|  27.4k|  }
  656|       |
  657|  14.7k|  if (channel != 1) {
  ------------------
  |  Branch (657:7): [True: 12.6k, False: 2.14k]
  ------------------
  658|  12.6k|    if (ps_enable) {
  ------------------
  |  Branch (658:9): [True: 10.3k, False: 2.25k]
  ------------------
  659|  10.3k|      if (audio_object_type == AOT_ER_AAC_ELD)
  ------------------
  |  Branch (659:11): [True: 4.28k, False: 6.07k]
  ------------------
  660|  4.28k|        ixheaacd_create_psdec(
  661|  4.28k|            sbr_persistent_mem->str_sbr_dec_inst.pstr_ps_stereo_dec,
  662|  4.28k|            sbr_persistent_mem, &ptr_overlap_buf[512 * 4], samp_per_frame);
  663|  6.07k|      else
  664|  6.07k|        ixheaacd_create_psdec(
  665|  6.07k|            sbr_persistent_mem->str_sbr_dec_inst.pstr_ps_stereo_dec,
  666|  6.07k|            sbr_persistent_mem, ptr_overlap_buf, samp_per_frame);
  667|  10.3k|    }
  668|  12.6k|  }
  669|       |
  670|  14.7k|  if ((use_hbe != NULL) && !((audio_object_type == AOT_ER_AAC_ELD) ||
  ------------------
  |  Branch (670:7): [True: 14.7k, False: 0]
  |  Branch (670:30): [True: 4.28k, False: 10.4k]
  ------------------
  671|  10.4k|     (audio_object_type == AOT_ER_AAC_LD))) {
  ------------------
  |  Branch (671:6): [True: 928, False: 9.54k]
  ------------------
  672|  9.54k|    ia_sbr_header_data_struct *ptr_sbr_dflt_header =
  673|  9.54k|        &sbr_persistent_mem->str_sbr_dec_inst.str_sbr_dflt_header;
  674|  9.54k|    ia_sbr_header_data_struct *ptr_usac_dflt_header =
  675|  9.54k|        (ia_sbr_header_data_struct *)p_usac_dflt_header;
  676|  9.54k|    struct ia_sbr_dec_inst_struct *p_str_sbr_dec_inst =
  677|  9.54k|        &sbr_persistent_mem->str_sbr_dec_inst;
  678|  9.54k|    VOID *hbe_txposer_buffers = p_str_sbr_dec_inst->hbe_txposer_buffers;
  679|       |
  680|  9.54k|    ptr_header_data[0] = p_str_sbr_dec_inst->pstr_sbr_header[0];
  681|  9.54k|    ptr_header_data[1] = p_str_sbr_dec_inst->pstr_sbr_header[1];
  682|       |
  683|  9.54k|    ptr_header_data[0]->sbr_ratio_idx = sbr_ratio_idx;
  684|  9.54k|    ptr_header_data[0]->output_framesize = output_frame_size;
  685|  9.54k|    ptr_header_data[0]->pstr_freq_band_data->sub_band_start = 64;
  686|  9.54k|    ptr_header_data[0]->esbr_start_up = 1;
  687|  9.54k|    ptr_header_data[0]->esbr_start_up_pvc = 1;
  688|       |
  689|  9.54k|    if (channel > 1) {
  ------------------
  |  Branch (689:9): [True: 7.40k, False: 2.14k]
  ------------------
  690|  7.40k|      ptr_header_data[1]->sbr_ratio_idx = sbr_ratio_idx;
  691|  7.40k|      ptr_header_data[1]->output_framesize = output_frame_size;
  692|  7.40k|      ptr_header_data[1]->pstr_freq_band_data->sub_band_start = 64;
  693|  7.40k|      ptr_header_data[1]->esbr_start_up = 1;
  694|  7.40k|      ptr_header_data[1]->esbr_start_up_pvc = 1;
  695|  7.40k|    }
  696|  9.54k|    if (hbe_txposer_buffers != NULL) {
  ------------------
  |  Branch (696:9): [True: 9.54k, False: 0]
  ------------------
  697|  9.54k|      WORD32 persistant_used = 0;
  698|  9.54k|      ixheaacd_esbr_hbe_data_init(ptr_sbr_dec[0]->p_hbe_txposer, samp_per_frame,
  699|  9.54k|                                  sbr_ratio_idx == SBR_UPSAMPLE_IDX_4_1 ? 1 : 0,
  ------------------
  |  |   28|  9.54k|#define SBR_UPSAMPLE_IDX_4_1 3
  ------------------
  |  Branch (699:35): [True: 261, False: 9.28k]
  ------------------
  700|  9.54k|                                  output_frame_size, hbe_txposer_buffers, &persistant_used);
  701|       |
  702|  9.54k|      hbe_txposer_buffers = (WORD8 *)hbe_txposer_buffers +
  703|  9.54k|                            IXHEAAC_GET_SIZE_ALIGNED(MAX_HBE_PERSISTENT_SIZE, BYTE_ALIGN_8);
  ------------------
  |  |   87|  9.54k|#define IXHEAAC_GET_SIZE_ALIGNED(size, alignment) ((size + (alignment - 1)) & ~(alignment - 1))
  ------------------
  704|       |
  705|  9.54k|      ixheaacd_esbr_hbe_data_init(ptr_sbr_dec[1]->p_hbe_txposer, samp_per_frame,
  706|  9.54k|                                  sbr_ratio_idx == SBR_UPSAMPLE_IDX_4_1 ? 1 : 0,
  ------------------
  |  |   28|  9.54k|#define SBR_UPSAMPLE_IDX_4_1 3
  ------------------
  |  Branch (706:35): [True: 261, False: 9.28k]
  ------------------
  707|  9.54k|                                  output_frame_size, hbe_txposer_buffers, &persistant_used);
  708|  9.54k|    }
  709|       |
  710|  9.54k|    p_str_sbr_dec_inst->ptr_pvc_data_str->prev_first_bnd_idx = -1;
  711|  9.54k|    p_str_sbr_dec_inst->ptr_pvc_data_str->prev_pvc_rate = -1;
  712|  9.54k|    p_str_sbr_dec_inst->ptr_pvc_data_str->prev_sbr_mode = UNKNOWN_SBR;
  713|       |
  714|  9.54k|    p_str_sbr_dec_inst->pstr_sbr_channel[0]
  715|  9.54k|        ->str_sbr_dec.str_codec_qmf_bank.num_time_slots =
  716|  9.54k|        output_frame_size / 64;
  717|  9.54k|    p_str_sbr_dec_inst->pstr_sbr_channel[1]
  718|  9.54k|        ->str_sbr_dec.str_codec_qmf_bank.num_time_slots =
  719|  9.54k|        output_frame_size / 64;
  720|       |
  721|  9.54k|    ptr_header_data[0]->core_frame_size = samp_per_frame;
  722|  9.54k|    ptr_header_data[1]->core_frame_size = samp_per_frame;
  723|       |
  724|  9.54k|    switch (sbr_ratio_idx) {
  ------------------
  |  Branch (724:13): [True: 9.54k, False: 0]
  ------------------
  725|      0|      case SBR_UPSAMPLE_IDX_0_0:
  ------------------
  |  |   25|      0|#define SBR_UPSAMPLE_IDX_0_0 0
  ------------------
  |  Branch (725:7): [True: 0, False: 9.54k]
  ------------------
  726|      0|        ptr_sbr_dec[0]->str_codec_qmf_bank.no_channels = 32;
  727|      0|        ptr_sbr_dec[0]->str_codec_qmf_bank.esbr_cos_twiddle =
  728|      0|            (WORD32 *)qmf_dec_tables_ptr->esbr_sin_cos_twiddle_l32;
  729|      0|        ptr_sbr_dec[0]->str_codec_qmf_bank.esbr_alt_sin_twiddle =
  730|      0|            (WORD32 *)qmf_dec_tables_ptr->esbr_alt_sin_twiddle_l32;
  731|      0|        ptr_sbr_dec[0]->str_codec_qmf_bank.esbr_t_cos =
  732|      0|            (WORD32 *)qmf_dec_tables_ptr->esbr_t_cos_sin_l32;
  733|      0|        ptr_header_data[0]->is_usf_4 = 0;
  734|      0|        ptr_header_data[0]->upsamp_fac = 1;
  735|       |
  736|      0|        ptr_sbr_dec[1]->str_codec_qmf_bank.no_channels = 32;
  737|      0|        ptr_sbr_dec[1]->str_codec_qmf_bank.esbr_cos_twiddle =
  738|      0|            (WORD32 *)qmf_dec_tables_ptr->esbr_sin_cos_twiddle_l32;
  739|      0|        ptr_sbr_dec[1]->str_codec_qmf_bank.esbr_alt_sin_twiddle =
  740|      0|            (WORD32 *)qmf_dec_tables_ptr->esbr_alt_sin_twiddle_l32;
  741|      0|        ptr_sbr_dec[1]->str_codec_qmf_bank.esbr_t_cos =
  742|      0|            (WORD32 *)qmf_dec_tables_ptr->esbr_t_cos_sin_l32;
  743|      0|        ptr_header_data[1]->is_usf_4 = 0;
  744|      0|        ptr_header_data[1]->upsamp_fac = 1;
  745|      0|        break;
  746|  8.67k|      case SBR_UPSAMPLE_IDX_2_1:
  ------------------
  |  |   26|  8.67k|#define SBR_UPSAMPLE_IDX_2_1 1
  ------------------
  |  Branch (746:7): [True: 8.67k, False: 873]
  ------------------
  747|  8.67k|        ptr_sbr_dec[0]->str_codec_qmf_bank.no_channels = 32;
  748|  8.67k|        ptr_sbr_dec[0]->str_codec_qmf_bank.esbr_cos_twiddle =
  749|  8.67k|            (WORD32 *)qmf_dec_tables_ptr->esbr_sin_cos_twiddle_l32;
  750|  8.67k|        ptr_sbr_dec[0]->str_codec_qmf_bank.esbr_alt_sin_twiddle =
  751|  8.67k|            (WORD32 *)qmf_dec_tables_ptr->esbr_alt_sin_twiddle_l32;
  752|  8.67k|        ptr_sbr_dec[0]->str_codec_qmf_bank.esbr_t_cos =
  753|  8.67k|            (WORD32 *)qmf_dec_tables_ptr->esbr_t_cos_sin_l32;
  754|  8.67k|        ptr_header_data[0]->is_usf_4 = 0;
  755|  8.67k|        ptr_header_data[0]->upsamp_fac = 2;
  756|       |
  757|  8.67k|        ptr_sbr_dec[1]->str_codec_qmf_bank.no_channels = 32;
  758|  8.67k|        ptr_sbr_dec[1]->str_codec_qmf_bank.esbr_cos_twiddle =
  759|  8.67k|            (WORD32 *)qmf_dec_tables_ptr->esbr_sin_cos_twiddle_l32;
  760|  8.67k|        ptr_sbr_dec[1]->str_codec_qmf_bank.esbr_alt_sin_twiddle =
  761|  8.67k|            (WORD32 *)qmf_dec_tables_ptr->esbr_alt_sin_twiddle_l32;
  762|  8.67k|        ptr_sbr_dec[1]->str_codec_qmf_bank.esbr_t_cos =
  763|  8.67k|            (WORD32 *)qmf_dec_tables_ptr->esbr_t_cos_sin_l32;
  764|  8.67k|        ptr_header_data[1]->is_usf_4 = 0;
  765|  8.67k|        ptr_header_data[1]->upsamp_fac = 2;
  766|  8.67k|        break;
  767|    612|      case SBR_UPSAMPLE_IDX_8_3:
  ------------------
  |  |   27|    612|#define SBR_UPSAMPLE_IDX_8_3 2
  ------------------
  |  Branch (767:7): [True: 612, False: 8.93k]
  ------------------
  768|    612|        ptr_sbr_dec[0]->str_codec_qmf_bank.no_channels = 24;
  769|    612|        ptr_sbr_dec[0]->str_codec_qmf_bank.filter_pos_32 =
  770|    612|            qmf_dec_tables_ptr->esbr_qmf_c_24;
  771|    612|        ptr_sbr_dec[0]->str_codec_qmf_bank.analy_win_coeff_32 =
  772|    612|            qmf_dec_tables_ptr->esbr_qmf_c_24;
  773|    612|        ptr_sbr_dec[0]->str_codec_qmf_bank.esbr_cos_twiddle =
  774|    612|            (WORD32 *)qmf_dec_tables_ptr->esbr_sin_cos_twiddle_l24;
  775|    612|        ptr_sbr_dec[0]->str_codec_qmf_bank.esbr_alt_sin_twiddle =
  776|    612|            (WORD32 *)qmf_dec_tables_ptr->esbr_alt_sin_twiddle_l24;
  777|    612|        ptr_sbr_dec[0]->str_codec_qmf_bank.esbr_t_cos =
  778|    612|            (WORD32 *)qmf_dec_tables_ptr->esbr_t_cos_sin_l24;
  779|       |
  780|    612|        ptr_header_data[0]->is_usf_4 = 0;
  781|    612|        ptr_header_data[0]->upsamp_fac = 2;
  782|       |
  783|    612|        ptr_sbr_dec[1]->str_codec_qmf_bank.no_channels = 24;
  784|    612|        ptr_sbr_dec[1]->str_codec_qmf_bank.filter_pos_32 =
  785|    612|            qmf_dec_tables_ptr->esbr_qmf_c_24;
  786|    612|        ptr_sbr_dec[1]->str_codec_qmf_bank.analy_win_coeff_32 =
  787|    612|            qmf_dec_tables_ptr->esbr_qmf_c_24;
  788|    612|        ptr_sbr_dec[1]->str_codec_qmf_bank.esbr_cos_twiddle =
  789|    612|            (WORD32 *)qmf_dec_tables_ptr->esbr_sin_cos_twiddle_l24;
  790|    612|        ptr_sbr_dec[1]->str_codec_qmf_bank.esbr_alt_sin_twiddle =
  791|    612|            (WORD32 *)qmf_dec_tables_ptr->esbr_alt_sin_twiddle_l24;
  792|    612|        ptr_sbr_dec[1]->str_codec_qmf_bank.esbr_t_cos =
  793|    612|            (WORD32 *)qmf_dec_tables_ptr->esbr_t_cos_sin_l24;
  794|       |
  795|    612|        ptr_header_data[1]->is_usf_4 = 0;
  796|    612|        ptr_header_data[1]->upsamp_fac = 2;
  797|    612|        break;
  798|    261|      case SBR_UPSAMPLE_IDX_4_1:
  ------------------
  |  |   28|    261|#define SBR_UPSAMPLE_IDX_4_1 3
  ------------------
  |  Branch (798:7): [True: 261, False: 9.28k]
  ------------------
  799|    261|        ptr_sbr_dec[0]->str_codec_qmf_bank.no_channels = 16;
  800|    261|        ptr_sbr_dec[0]->str_codec_qmf_bank.esbr_cos_twiddle =
  801|    261|            (WORD32 *)qmf_dec_tables_ptr->esbr_sin_cos_twiddle_l16;
  802|    261|        ptr_sbr_dec[0]->str_codec_qmf_bank.esbr_alt_sin_twiddle =
  803|    261|            (WORD32 *)qmf_dec_tables_ptr->esbr_alt_sin_twiddle_l16;
  804|    261|        ptr_sbr_dec[0]->str_codec_qmf_bank.esbr_t_cos =
  805|    261|            (WORD32 *)qmf_dec_tables_ptr->esbr_t_cos_sin_l16;
  806|    261|        ptr_header_data[0]->is_usf_4 = 1;
  807|    261|        ptr_header_data[0]->upsamp_fac = 4;
  808|    261|        ptr_header_data[0]->out_sampling_freq =
  809|    261|            ptr_header_data[0]->out_sampling_freq * 2;
  810|       |
  811|    261|        ptr_sbr_dec[1]->str_codec_qmf_bank.no_channels = 16;
  812|    261|        ptr_sbr_dec[1]->str_codec_qmf_bank.esbr_cos_twiddle =
  813|    261|            (WORD32 *)qmf_dec_tables_ptr->esbr_sin_cos_twiddle_l16;
  814|    261|        ptr_sbr_dec[1]->str_codec_qmf_bank.esbr_alt_sin_twiddle =
  815|    261|            (WORD32 *)qmf_dec_tables_ptr->esbr_alt_sin_twiddle_l16;
  816|    261|        ptr_sbr_dec[1]->str_codec_qmf_bank.esbr_t_cos =
  817|    261|            (WORD32 *)qmf_dec_tables_ptr->esbr_t_cos_sin_l16;
  818|    261|        ptr_header_data[1]->is_usf_4 = 1;
  819|    261|        ptr_header_data[1]->upsamp_fac = 4;
  820|    261|        ptr_header_data[1]->out_sampling_freq =
  821|    261|            ptr_header_data[1]->out_sampling_freq * 2;
  822|    261|        break;
  823|  9.54k|    }
  824|       |
  825|  9.54k|    if (ptr_usac_dflt_header != NULL) {
  ------------------
  |  Branch (825:9): [True: 2.85k, False: 6.68k]
  ------------------
  826|  2.85k|      ptr_sbr_dflt_header->start_freq = ptr_usac_dflt_header->start_freq;
  827|  2.85k|      ptr_sbr_dflt_header->stop_freq = ptr_usac_dflt_header->stop_freq;
  828|       |
  829|  2.85k|      if (ptr_usac_dflt_header->header_extra_1) {
  ------------------
  |  Branch (829:11): [True: 1.37k, False: 1.47k]
  ------------------
  830|  1.37k|        ptr_sbr_dflt_header->freq_scale = ptr_usac_dflt_header->freq_scale;
  831|  1.37k|        ptr_sbr_dflt_header->alter_scale = ptr_usac_dflt_header->alter_scale;
  832|  1.37k|        ptr_sbr_dflt_header->noise_bands = ptr_usac_dflt_header->noise_bands;
  833|  1.47k|      } else {
  834|  1.47k|        ptr_sbr_dflt_header->freq_scale = SBR_FREQ_SCALE_DEFAULT;
  ------------------
  |  |   75|  1.47k|#define SBR_FREQ_SCALE_DEFAULT 2
  ------------------
  835|  1.47k|        ptr_sbr_dflt_header->alter_scale = SBR_ALTER_SCALE_DEFAULT;
  ------------------
  |  |   76|  1.47k|#define SBR_ALTER_SCALE_DEFAULT 1
  ------------------
  836|  1.47k|        ptr_sbr_dflt_header->noise_bands = SBR_NOISE_BANDS_DEFAULT;
  ------------------
  |  |   77|  1.47k|#define SBR_NOISE_BANDS_DEFAULT 2
  ------------------
  837|  1.47k|      }
  838|       |
  839|  2.85k|      if (ptr_usac_dflt_header->header_extra_2) {
  ------------------
  |  Branch (839:11): [True: 487, False: 2.37k]
  ------------------
  840|    487|        ptr_sbr_dflt_header->limiter_bands = ptr_usac_dflt_header->limiter_bands;
  841|    487|        ptr_sbr_dflt_header->limiter_gains = ptr_usac_dflt_header->limiter_gains;
  842|    487|        ptr_sbr_dflt_header->interpol_freq = ptr_usac_dflt_header->interpol_freq;
  843|    487|        ptr_sbr_dflt_header->smoothing_mode =
  844|    487|            ptr_usac_dflt_header->smoothing_mode;
  845|  2.37k|      } else {
  846|  2.37k|        ptr_sbr_dflt_header->limiter_bands = SBR_LIMITER_BANDS_DEFAULT;
  ------------------
  |  |   79|  2.37k|#define SBR_LIMITER_BANDS_DEFAULT 2
  ------------------
  847|  2.37k|        ptr_sbr_dflt_header->limiter_gains = SBR_LIMITER_GAINS_DEFAULT;
  ------------------
  |  |   80|  2.37k|#define SBR_LIMITER_GAINS_DEFAULT 2
  ------------------
  848|  2.37k|        ptr_sbr_dflt_header->interpol_freq = SBR_INTERPOL_FREQ_DEFAULT;
  ------------------
  |  |   81|  2.37k|#define SBR_INTERPOL_FREQ_DEFAULT 1
  ------------------
  849|  2.37k|        ptr_sbr_dflt_header->smoothing_mode = SBR_SMOOTHING_LENGTH_DEFAULT;
  ------------------
  |  |   82|  2.37k|#define SBR_SMOOTHING_LENGTH_DEFAULT 1
  ------------------
  850|  2.37k|      }
  851|  2.85k|    }
  852|  9.54k|  }
  853|  14.7k|  return &(sbr_persistent_mem->str_sbr_dec_inst);
  854|  14.7k|}
ixheaacd_create_psdec:
  978|  10.3k|                           WORD32 *ptr_overlap_buf, WORD32 frame_size) {
  979|  10.3k|  ia_sbr_pers_struct *sbr_persistent_mem =
  980|  10.3k|      (ia_sbr_pers_struct *)sbr_persistent_mem_v;
  981|       |
  982|  10.3k|  WORD16 *ptr1 = (WORD16 *)&(
  983|  10.3k|      sbr_persistent_mem->ptr_sbr_overlap_buf[MAXNRSBRCHANNELS - 1][0]);
  ------------------
  |  |   30|  10.3k|#define MAXNRSBRCHANNELS 2
  ------------------
  984|  10.3k|  WORD32 *ptr2 = (WORD32 *)&ptr_overlap_buf[512];
  985|  10.3k|  WORD16 *initial_ptr;
  986|  10.3k|  WORD16 delay;
  987|  10.3k|  WORD32 temp;
  988|       |
  989|  10.3k|  ia_sbr_tables_struct *sbr_tables_ptr =
  990|  10.3k|      sbr_persistent_mem->str_sbr_dec_inst.pstr_sbr_tables;
  991|       |
  992|  10.3k|  memset(ptr_ps_dec, 0, sizeof(ia_ps_dec_struct));
  993|       |
  994|  10.3k|  ptr_ps_dec->ps_data_present = 0;
  995|  10.3k|  ptr_ps_dec->enable_iid = 0;
  996|  10.3k|  ptr_ps_dec->enable_icc = 0;
  997|  10.3k|  ptr_ps_dec->enable_ext = 0;
  998|  10.3k|  ptr_ps_dec->iid_mode = 0;
  999|  10.3k|  ptr_ps_dec->icc_mode = 0;
 1000|       |
 1001|  10.3k|  ptr_ps_dec->ptr_hyb_left_re = ptr2;
 1002|  10.3k|  ptr2 += 16;
 1003|  10.3k|  ptr_ps_dec->ptr_hyb_left_im = ptr2;
 1004|  10.3k|  ptr2 += 16;
 1005|  10.3k|  ptr_ps_dec->ptr_hyb_right_re = ptr2;
 1006|  10.3k|  ptr2 += 16;
 1007|  10.3k|  ptr_ps_dec->ptr_hyb_right_im = ptr2;
 1008|  10.3k|  ptr2 += 16;
 1009|       |
 1010|  10.3k|  memset(ptr_ps_dec->ptr_hyb_left_re, 0, sizeof(WORD32) * 16 * 4);
 1011|       |
 1012|  10.3k|  ixheaacd_create_hyb_filterbank(&ptr_ps_dec->str_hybrid, &ptr2,
 1013|  10.3k|                                 sbr_tables_ptr);
 1014|       |
 1015|  10.3k|  ptr_ps_dec->peak_decay_diff = ptr2;
 1016|  10.3k|  ptr2 += NUM_OF_BINS;
  ------------------
  |  |   42|  10.3k|#define NUM_OF_BINS (20)
  ------------------
 1017|  10.3k|  ptr_ps_dec->energy_prev = ptr2;
 1018|  10.3k|  ptr2 += NUM_OF_BINS;
  ------------------
  |  |   42|  10.3k|#define NUM_OF_BINS (20)
  ------------------
 1019|  10.3k|  ptr_ps_dec->peak_decay_diff_prev = ptr2;
 1020|  10.3k|  ptr2 += NUM_OF_BINS;
  ------------------
  |  |   42|  10.3k|#define NUM_OF_BINS (20)
  ------------------
 1021|       |
 1022|  10.3k|  memset(ptr_ps_dec->peak_decay_diff, 0, 3 * sizeof(WORD32) * NUM_OF_BINS);
  ------------------
  |  |   42|  10.3k|#define NUM_OF_BINS (20)
  ------------------
 1023|       |
 1024|  10.3k|  ptr_ps_dec->delay_buf_idx = 0;
 1025|  10.3k|  ptr_ps_dec->delay_buf_idx_long = 0;
 1026|       |
 1027|  10.3k|  memset(ptr_ps_dec->delay_buf_qmf_sub_re_im, 0,
 1028|  10.3k|         2 * 16 * DEL_ALL_PASS * sizeof(WORD16));
  ------------------
  |  |   30|  10.3k|#define DEL_ALL_PASS 2
  ------------------
 1029|  10.3k|  memset(ptr_ps_dec->delay_buf_qmf_sub_ser_re_im, 0,
 1030|  10.3k|         2 * 16 * NUM_SER_AP_LINKS * 5 * sizeof(WORD16));
  ------------------
  |  |   25|  10.3k|#define NUM_SER_AP_LINKS 3
  ------------------
 1031|       |
 1032|  10.3k|  initial_ptr = ptr1;
 1033|  10.3k|  ptr_ps_dec->delay_buf_qmf_ser_re_im = (VOID *)ptr1;
 1034|  10.3k|  ptr1 += 2 * NUM_SER_AP_LINKS * 32 * 5;
  ------------------
  |  |   25|  10.3k|#define NUM_SER_AP_LINKS 3
  ------------------
 1035|       |
 1036|  10.3k|  delay = 2;
 1037|  10.3k|  ptr_ps_dec->delay_buf_qmf_ap_re_im = (VOID *)ptr1;
 1038|  10.3k|  ptr1 += 2 * delay * 32;
 1039|       |
 1040|  10.3k|  delay = HIGH_DEL;
  ------------------
  |  |   33|  10.3k|#define HIGH_DEL 14
  ------------------
 1041|  10.3k|  ptr_ps_dec->delay_buf_qmf_ld_re_im = (VOID *)ptr1;
 1042|  10.3k|  ptr1 += 2 * delay * SMALL_DEL_STRT;
  ------------------
  |  |   31|  10.3k|#define SMALL_DEL_STRT 12
  ------------------
 1043|       |
 1044|  10.3k|  delay = SMALL_DEL;
  ------------------
  |  |   32|  10.3k|#define SMALL_DEL 1
  ------------------
 1045|  10.3k|  ptr_ps_dec->delay_buf_qmf_sd_re_im = (VOID *)ptr1;
 1046|  10.3k|  ptr1 +=
 1047|  10.3k|      2 * delay * (NUM_OF_QUAD_MIRROR_FILTER_ICC_CHNLS -
  ------------------
  |  |   37|  10.3k|  (NUM_OF_QUAD_MIRROR_FILTER_ALL_PASS_CHNLS + NUM_OF_DEL_CHNLS)
  |  |  ------------------
  |  |  |  |   35|  10.3k|  (NUM_OF_ALL_PASS_CHNLS - NO_QMF_CHANNELS_IN_HYBRID)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  10.3k|#define NUM_OF_ALL_PASS_CHNLS 23
  |  |  |  |  ------------------
  |  |  |  |                 (NUM_OF_ALL_PASS_CHNLS - NO_QMF_CHANNELS_IN_HYBRID)
  |  |  |  |  ------------------
  |  |  |  |  |  |   25|  10.3k|#define NO_QMF_CHANNELS_IN_HYBRID 3
  |  |  |  |  ------------------
  |  |  ------------------
  |  |                 (NUM_OF_QUAD_MIRROR_FILTER_ALL_PASS_CHNLS + NUM_OF_DEL_CHNLS)
  |  |  ------------------
  |  |  |  |   29|  10.3k|  (NUM_OF_QUAD_MIRROR_FILTER_CHNLS - NUM_OF_ALL_PASS_CHNLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   26|  10.3k|#define NUM_OF_QUAD_MIRROR_FILTER_CHNLS 64
  |  |  |  |  ------------------
  |  |  |  |                 (NUM_OF_QUAD_MIRROR_FILTER_CHNLS - NUM_OF_ALL_PASS_CHNLS)
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|  10.3k|#define NUM_OF_ALL_PASS_CHNLS 23
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1048|  10.3k|                   (NUM_OF_QUAD_MIRROR_FILTER_ALL_PASS_CHNLS + SMALL_DEL_STRT));
  ------------------
  |  |   35|  10.3k|  (NUM_OF_ALL_PASS_CHNLS - NO_QMF_CHANNELS_IN_HYBRID)
  |  |  ------------------
  |  |  |  |   27|  10.3k|#define NUM_OF_ALL_PASS_CHNLS 23
  |  |  ------------------
  |  |                 (NUM_OF_ALL_PASS_CHNLS - NO_QMF_CHANNELS_IN_HYBRID)
  |  |  ------------------
  |  |  |  |   25|  10.3k|#define NO_QMF_CHANNELS_IN_HYBRID 3
  |  |  ------------------
  ------------------
                                 (NUM_OF_QUAD_MIRROR_FILTER_ALL_PASS_CHNLS + SMALL_DEL_STRT));
  ------------------
  |  |   31|  10.3k|#define SMALL_DEL_STRT 12
  ------------------
 1049|       |
 1050|  10.3k|  temp = (WORD32)(ptr1 - initial_ptr);
 1051|  10.3k|  memset(ptr_ps_dec->delay_buf_qmf_ser_re_im, 0, temp * sizeof(WORD16));
 1052|       |
 1053|  10.3k|  memset(ptr_ps_dec->delay_buf_idx_ser, 0, NUM_SER_AP_LINKS * sizeof(WORD16));
  ------------------
  |  |   25|  10.3k|#define NUM_SER_AP_LINKS 3
  ------------------
 1054|  10.3k|  memcpy(ptr_ps_dec->delay_sample_ser,
 1055|  10.3k|         sbr_tables_ptr->ps_tables_ptr->rev_link_delay_ser,
 1056|  10.3k|         NUM_SER_AP_LINKS * sizeof(WORD16));
  ------------------
  |  |   25|  10.3k|#define NUM_SER_AP_LINKS 3
  ------------------
 1057|       |
 1058|  10.3k|  memset(ptr_ps_dec->h11_h12_vec, 0xff,
 1059|  10.3k|         (NO_IID_GROUPS + 2) * 2 * sizeof(WORD16));
  ------------------
  |  |   28|  10.3k|#define NO_IID_GROUPS (SUBQMF_GROUPS + QMF_GROUPS)
  |  |  ------------------
  |  |  |  |   26|  10.3k|#define SUBQMF_GROUPS (10)
  |  |  ------------------
  |  |               #define NO_IID_GROUPS (SUBQMF_GROUPS + QMF_GROUPS)
  |  |  ------------------
  |  |  |  |   27|  10.3k|#define QMF_GROUPS (12)
  |  |  ------------------
  ------------------
 1060|  10.3k|  memset(ptr_ps_dec->h21_h22_vec, 0, sizeof(ptr_ps_dec->h21_h22_vec));
 1061|       |
 1062|  10.3k|  if (frame_size == 960)
  ------------------
  |  Branch (1062:7): [True: 571, False: 9.78k]
  ------------------
 1063|    571|    ptr_ps_dec->num_sub_samples = NUM_SUB_SAMPLES_960;
  ------------------
  |  |   45|    571|#define NUM_SUB_SAMPLES_960 30
  ------------------
 1064|  9.78k|  else
 1065|  9.78k|    ptr_ps_dec->num_sub_samples = NUM_SUB_SAMPLES;
  ------------------
  |  |   47|  9.78k|#define NUM_SUB_SAMPLES (CORE_CODEC_FRAME_SIZE / 32)
  |  |  ------------------
  |  |  |  |   46|  9.78k|#define CORE_CODEC_FRAME_SIZE 1024
  |  |  ------------------
  ------------------
 1066|       |
 1067|       |
 1068|  10.3k|  ixheaacd_create_ps_esbr_dec(ptr_ps_dec, sbr_tables_ptr->ps_tables_ptr,
 1069|  10.3k|                              64, ptr_ps_dec->num_sub_samples, 0);
 1070|       |
 1071|  10.3k|  return;
 1072|  10.3k|}
ixheaacd_create_sbrdec:
 1223|  27.4k|{
 1224|  27.4k|  WORD16 err;
 1225|  27.4k|  WORD16 time_slots;
 1226|  27.4k|  WORD16 no_bins;
 1227|  27.4k|  ia_sbr_pers_struct *sbr_persistent_mem =
 1228|  27.4k|      (ia_sbr_pers_struct *)sbr_persistent_mem_v;
 1229|  27.4k|  ia_sbr_dec_struct *hs = &(ptr_sbr_channel->str_sbr_dec);
 1230|       |
 1231|  27.4k|  time_slots = ptr_header_data->num_time_slots;
 1232|       |
 1233|  27.4k|  no_bins = (WORD16)(time_slots * ptr_header_data->time_step);
 1234|       |
 1235|  27.4k|  hs->str_sbr_scale_fact.ov_lb_scale = INT_BITS - 1;
  ------------------
  |  |   24|  27.4k|#define INT_BITS 32
  ------------------
 1236|  27.4k|  hs->str_sbr_scale_fact.hb_scale = INT_BITS - 1;
  ------------------
  |  |   24|  27.4k|#define INT_BITS 32
  ------------------
 1237|  27.4k|  hs->str_sbr_scale_fact.ov_hb_scale = INT_BITS - 1;
  ------------------
  |  |   24|  27.4k|#define INT_BITS 32
  ------------------
 1238|  27.4k|  hs->str_sbr_scale_fact.st_syn_scale = INT_BITS - 1;
  ------------------
  |  |   24|  27.4k|#define INT_BITS 32
  ------------------
 1239|       |
 1240|  27.4k|  ptr_sbr_channel->pstr_prev_frame_data =
 1241|  27.4k|      sbr_persistent_mem->pstr_prev_frame_data[chan];
 1242|       |
 1243|  27.4k|  err = ixheaacd_create_sbr_env_calc(pstr_common_table, &hs->str_sbr_calc_env,
 1244|  27.4k|                                     chan, sbr_persistent_mem, ptr_header_data,
 1245|  27.4k|                                     audio_object_type);
 1246|       |
 1247|  27.4k|  if (err) {
  ------------------
  |  Branch (1247:7): [True: 74, False: 27.3k]
  ------------------
 1248|     74|    return (-1);
 1249|     74|  }
 1250|       |
 1251|  27.3k|  ixheaacd_create_cplx_anal_qmfbank(
 1252|  27.3k|      &hs->str_codec_qmf_bank, &hs->str_sbr_scale_fact, no_bins,
 1253|  27.3k|      ptr_header_data->pstr_freq_band_data->sub_band_start, chan,
 1254|  27.3k|      sbr_persistent_mem->sbr_qmf_analy_states,
 1255|  27.3k|      sbr_persistent_mem->sbr_qmf_analy_states_32,
 1256|  27.3k|      sbr_persistent_mem->str_sbr_dec_inst.pstr_sbr_tables->qmf_dec_tables_ptr,
 1257|  27.3k|      audio_object_type, ldmps_present, ldsbr_present);
 1258|       |
 1259|  27.3k|  ixheaacd_create_cplx_synt_qmfbank(
 1260|  27.3k|      &hs->str_synthesis_qmf_bank, no_bins,
 1261|  27.3k|      ptr_header_data->pstr_freq_band_data->sub_band_start,
 1262|  27.3k|      ptr_header_data->pstr_freq_band_data->sub_band_end, chan,
 1263|  27.3k|      down_sample_flag, sbr_persistent_mem->sbr_qmf_synth_states,
 1264|  27.3k|      sbr_persistent_mem->sbr_qmf_synth_states_32,
 1265|  27.3k|      sbr_persistent_mem->str_sbr_dec_inst.pstr_sbr_tables->qmf_dec_tables_ptr,
 1266|  27.3k|      audio_object_type);
 1267|       |
 1268|  27.3k|  ixheaacd_init_sbr_prev_framedata(ptr_sbr_channel->pstr_prev_frame_data,
 1269|  27.3k|                                   time_slots);
 1270|       |
 1271|  27.3k|  ixheaacd_create_hf_generator(&hs->str_hf_generator,
 1272|  27.3k|                               hs->str_codec_qmf_bank.num_time_slots, chan,
 1273|  27.3k|                               sbr_persistent_mem, ps_enable);
 1274|       |
 1275|  27.3k|  hs->ptr_sbr_overlap_buf = sbr_persistent_mem->ptr_sbr_overlap_buf[chan];
 1276|       |
 1277|  27.3k|  return 0;
 1278|  27.4k|}
ixheaacd_sbrdec_initfuncs.c:ixheaacd_init_headerdata:
  551|  27.4k|    ia_sbr_tables_struct *sbr_tables, WORD audio_obj_type) {
  552|  27.4k|  ia_freq_band_data_struct *pstr_freq_band_data = freq_band_data;
  553|  27.4k|  WORD32 tmp;
  554|       |
  555|  27.4k|  if (audio_obj_type != AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (555:7): [True: 18.8k, False: 8.64k]
  ------------------
  556|  18.8k|    memcpy(ptr_header_data,
  557|  18.8k|           &sbr_tables->env_extr_tables_ptr->str_sbr_default_header,
  558|  18.8k|           sizeof(ia_sbr_header_data_struct));
  559|  18.8k|  }
  560|       |
  561|  27.4k|  if (audio_obj_type == AOT_ER_AAC_ELD) ptr_header_data->time_step -= 1;
  ------------------
  |  Branch (561:7): [True: 8.64k, False: 18.8k]
  ------------------
  562|       |
  563|  27.4k|  pstr_freq_band_data->freq_band_table[LOW] =
  ------------------
  |  |   27|  27.4k|#define LOW 0
  ------------------
  564|  27.4k|      pstr_freq_band_data->freq_band_tbl_lo;
  565|  27.4k|  pstr_freq_band_data->freq_band_table[HIGH] =
  ------------------
  |  |   28|  27.4k|#define HIGH 1
  ------------------
  566|  27.4k|      pstr_freq_band_data->freq_band_tbl_hi;
  567|  27.4k|  ptr_header_data->pstr_freq_band_data = pstr_freq_band_data;
  568|       |
  569|  27.4k|  ptr_header_data->core_frame_size = samp_per_frame;
  570|  27.4k|  ptr_header_data->out_sampling_freq = sample_rate_dec << 1;
  571|       |
  572|  27.4k|  if (audio_obj_type != AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (572:7): [True: 18.8k, False: 8.64k]
  ------------------
  573|  18.8k|    tmp = ptr_header_data->time_step + 4;
  574|       |
  575|  18.8k|    if (tmp < 0)
  ------------------
  |  Branch (575:9): [True: 0, False: 18.8k]
  ------------------
  576|      0|      ptr_header_data->num_time_slots =
  577|      0|          ixheaac_extract16l(samp_per_frame << (-tmp));
  578|  18.8k|    else
  579|  18.8k|      ptr_header_data->num_time_slots =
  580|  18.8k|          ixheaac_extract16l(samp_per_frame >> tmp);
  581|  18.8k|  } else {
  582|  8.64k|    ptr_header_data->time_step = 1;
  583|       |
  584|  8.64k|    ptr_header_data->num_time_slots =
  585|  8.64k|        (samp_per_frame / 32 >> (ptr_header_data->time_step - 1));
  586|  8.64k|  }
  587|  27.4k|}
ixheaacd_sbrdec_initfuncs.c:ixheaacd_create_hyb_filterbank:
  902|  10.3k|                               ia_sbr_tables_struct *sbr_tables_ptr) {
  903|  10.3k|  WORD16 i;
  904|  10.3k|  WORD32 *ptr = (WORD32 *)*p_ptr;
  905|       |
  906|  10.3k|  ptr_hybrid->ptr_resol = sbr_tables_ptr->ps_tables_ptr->hyb_resol;
  907|  10.3k|  ptr_hybrid->ptr_qmf_buf = HYBRID_FILTER_LENGTH - 1;
  ------------------
  |  |   23|  10.3k|#define HYBRID_FILTER_LENGTH 13
  ------------------
  908|       |
  909|  10.3k|  ptr_hybrid->ptr_temp_re = ptr;
  910|  10.3k|  ptr += NO_HYBRID_CHANNELS_HIGH;
  ------------------
  |  |   27|  10.3k|#define NO_HYBRID_CHANNELS_HIGH 8
  ------------------
  911|  10.3k|  ptr_hybrid->ptr_temp_im = ptr;
  912|  10.3k|  ptr += NO_HYBRID_CHANNELS_HIGH;
  ------------------
  |  |   27|  10.3k|#define NO_HYBRID_CHANNELS_HIGH 8
  ------------------
  913|       |
  914|  10.3k|  memset(ptr_hybrid->ptr_temp_re, 0,
  915|  10.3k|         2 * NO_HYBRID_CHANNELS_HIGH * sizeof(WORD32));
  ------------------
  |  |   27|  10.3k|#define NO_HYBRID_CHANNELS_HIGH 8
  ------------------
  916|       |
  917|  10.3k|  ptr_hybrid->ptr_work_re = ptr;
  918|  10.3k|  ptr += 16;
  919|  10.3k|  ptr_hybrid->ptr_work_im = ptr;
  920|  10.3k|  ptr += 16;
  921|       |
  922|  41.4k|  for (i = 0; i < NO_QMF_CHANNELS_IN_HYBRID; i++) {
  ------------------
  |  |   25|  41.4k|#define NO_QMF_CHANNELS_IN_HYBRID 3
  ------------------
  |  Branch (922:15): [True: 31.0k, False: 10.3k]
  ------------------
  923|  31.0k|    ptr_hybrid->ptr_qmf_buf_re[i] = ptr;
  924|  31.0k|    ptr += ptr_hybrid->ptr_qmf_buf;
  925|       |
  926|  31.0k|    ptr_hybrid->ptr_qmf_buf_im[i] = ptr;
  927|  31.0k|    ptr += ptr_hybrid->ptr_qmf_buf;
  928|       |
  929|  31.0k|    memset(ptr_hybrid->ptr_qmf_buf_re[i], 0,
  930|  31.0k|           2 * ptr_hybrid->ptr_qmf_buf * sizeof(WORD32));
  931|  31.0k|  }
  932|       |
  933|  10.3k|  *p_ptr = ptr;
  934|       |
  935|  10.3k|  return;
  936|  10.3k|}
ixheaacd_sbrdec_initfuncs.c:ixheaacd_create_sbr_env_calc:
  860|  27.4k|    ia_sbr_header_data_struct *ptr_header_data, WORD audio_object_type) {
  861|  27.4k|  WORD16 err;
  862|  27.4k|  ia_sbr_pers_struct *sbr_persistent_mem =
  863|  27.4k|      (ia_sbr_pers_struct *)sbr_persistent_mem_v;
  864|       |
  865|  27.4k|  err = 0;
  866|  27.4k|  memset(&hs->harm_flags_prev[0], 0, sizeof(WORD8) * MAX_FREQ_COEFFS);
  ------------------
  |  |   51|  27.4k|#define MAX_FREQ_COEFFS 56
  ------------------
  867|       |
  868|  27.4k|  hs->harm_index = 0;
  869|       |
  870|  27.4k|  hs->filt_buf_me = sbr_persistent_mem->sbr_smooth_gain_buf[chan];
  871|  27.4k|  hs->filt_buf_noise_m = sbr_persistent_mem->sbr_smooth_noise_buf[chan];
  872|  27.4k|  hs->tansient_env_prev = -1;
  873|       |
  874|  27.4k|  ixheaacd_reset_sbrenvelope_calc(hs);
  875|       |
  876|  27.4k|  if ((chan == 0) && (audio_object_type == AOT_ER_AAC_ELD)) {
  ------------------
  |  Branch (876:7): [True: 14.8k, False: 12.6k]
  |  Branch (876:22): [True: 4.35k, False: 10.4k]
  ------------------
  877|  4.35k|    err = ixheaacd_calc_frq_bnd_tbls(ptr_header_data, pstr_common_table);
  878|  4.35k|  }
  879|       |
  880|  27.4k|  return err;
  881|  27.4k|}
ixheaacd_sbrdec_initfuncs.c:ixheaacd_create_cplx_anal_qmfbank:
 1079|  27.3k|    WORD32 ldmps_present, WORD32 no_ldsbr) {
 1080|  27.3k|  memset(ptr_sbr_qmf, 0, sizeof(ia_sbr_qmf_filter_bank_struct));
 1081|       |
 1082|  27.3k|  ptr_sbr_qmf->analy_win_coeff_32 = qmf_dec_tables_ptr->esbr_qmf_c;
 1083|  27.3k|  if (audio_object_type != AOT_ER_AAC_ELD &&
  ------------------
  |  Branch (1083:7): [True: 18.8k, False: 8.56k]
  ------------------
 1084|  18.8k|      audio_object_type != AOT_ER_AAC_LD) {
  ------------------
  |  Branch (1084:7): [True: 16.9k, False: 1.85k]
  ------------------
 1085|  16.9k|    ptr_sbr_qmf->analy_win_coeff = qmf_dec_tables_ptr->qmf_c;
 1086|  16.9k|  } else {
 1087|  10.4k|    ptr_sbr_qmf->analy_win_coeff = qmf_dec_tables_ptr->qmf_c_eld3;
 1088|  10.4k|    if (ldmps_present == 1)
  ------------------
  |  Branch (1088:9): [True: 1.63k, False: 8.78k]
  ------------------
 1089|  1.63k|      ptr_sbr_qmf->analy_win_coeff_32 = qmf_dec_tables_ptr->qmf_c_ldsbr_mps;
 1090|  10.4k|    if (no_ldsbr == 1)
  ------------------
  |  Branch (1090:9): [True: 2.61k, False: 7.81k]
  ------------------
 1091|  2.61k|      ptr_sbr_qmf->analy_win_coeff_32 =
 1092|  2.61k|          (WORD32 *)ixheaacd_ldmps_polyphase_filter_coeff_fix;
 1093|  10.4k|  }
 1094|       |
 1095|  27.3k|  ptr_sbr_qmf->no_channels = NO_ANALYSIS_CHANNELS;
  ------------------
  |  |   35|  27.3k|#define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  ------------------
  |  |  |  |   34|  27.3k|#define NO_SYNTHESIS_CHANNELS 64
  |  |  ------------------
  |  |               #define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  ------------------
  |  |  |  |   23|  27.3k|#define SBR_UPSAMPLE_FAC 2
  |  |  ------------------
  ------------------
 1096|  27.3k|  if (no_ldsbr) ptr_sbr_qmf->no_channels = 64;
  ------------------
  |  Branch (1096:7): [True: 12.6k, False: 14.7k]
  ------------------
 1097|  27.3k|  ptr_sbr_qmf->num_time_slots = no_bins;
 1098|       |
 1099|  27.3k|  ptr_sbr_qmf->lsb = 0;
 1100|  27.3k|  ptr_sbr_qmf->usb = usb;
 1101|       |
 1102|  27.3k|  ptr_sbr_qmf->anal_filter_states =
 1103|  27.3k|      &(sbr_qmf_analy_states[chan ? QMF_FILTER_STATE_ANA_SIZE : 0]);
  ------------------
  |  |   33|  12.6k|#define QMF_FILTER_STATE_ANA_SIZE 320
  ------------------
  |  Branch (1103:30): [True: 12.6k, False: 14.7k]
  ------------------
 1104|       |
 1105|  27.3k|  memset(ptr_sbr_qmf->anal_filter_states, 0,
 1106|  27.3k|         sizeof(WORD16) * QMF_FILTER_STATE_ANA_SIZE);
  ------------------
  |  |   33|  27.3k|#define QMF_FILTER_STATE_ANA_SIZE 320
  ------------------
 1107|       |
 1108|  27.3k|  ptr_sbr_qmf->anal_filter_states_32 =
 1109|  27.3k|      &(sbr_qmf_analy_states_32[chan ? QMF_FILTER_STATE_ANA_SIZE : 0]);
  ------------------
  |  |   33|  12.6k|#define QMF_FILTER_STATE_ANA_SIZE 320
  ------------------
  |  Branch (1109:33): [True: 12.6k, False: 14.7k]
  ------------------
 1110|       |
 1111|  27.3k|  memset(ptr_sbr_qmf->anal_filter_states_32, 0,
 1112|  27.3k|         sizeof(WORD32) * QMF_FILTER_STATE_ANA_SIZE);
  ------------------
  |  |   33|  27.3k|#define QMF_FILTER_STATE_ANA_SIZE 320
  ------------------
 1113|       |
 1114|  27.3k|  ptr_sbr_qmf->core_samples_buffer = ptr_sbr_qmf->anal_filter_states;
 1115|  27.3k|  ptr_sbr_qmf->core_samples_buffer_32 = ptr_sbr_qmf->anal_filter_states_32;
 1116|       |
 1117|  27.3k|  ptr_sbr_qmf->filter_pos_32 = (WORD32 *)qmf_dec_tables_ptr->esbr_qmf_c;
 1118|  27.3k|  ptr_sbr_qmf->state_new_samples_pos_low_32 =
 1119|  27.3k|      ptr_sbr_qmf->anal_filter_states_32;
 1120|  27.3k|  if (audio_object_type != AOT_ER_AAC_ELD &&
  ------------------
  |  Branch (1120:7): [True: 18.8k, False: 8.56k]
  ------------------
 1121|  18.8k|      audio_object_type != AOT_ER_AAC_LD) {
  ------------------
  |  Branch (1121:7): [True: 16.9k, False: 1.85k]
  ------------------
 1122|  16.9k|    ptr_sbr_qmf->filter_pos = (WORD16 *)qmf_dec_tables_ptr->qmf_c;
 1123|  16.9k|  } else {
 1124|  10.4k|    ptr_sbr_qmf->filter_pos = (WORD16 *)qmf_dec_tables_ptr->qmf_c_eld3;
 1125|  10.4k|    if (ldmps_present == 1)
  ------------------
  |  Branch (1125:9): [True: 1.63k, False: 8.78k]
  ------------------
 1126|  1.63k|      ptr_sbr_qmf->filter_pos_32 =
 1127|  1.63k|          (WORD32 *)qmf_dec_tables_ptr->qmf_c_ldsbr_mps;
 1128|  10.4k|    if (no_ldsbr == 1)
  ------------------
  |  Branch (1128:9): [True: 2.61k, False: 7.81k]
  ------------------
 1129|  2.61k|      ptr_sbr_qmf->filter_pos_32 =
 1130|  2.61k|          (WORD32 *)ixheaacd_ldmps_polyphase_filter_coeff_fix;
 1131|  10.4k|  }
 1132|       |
 1133|  27.3k|  sbr_scale_factor->st_lb_scale = 0;
 1134|       |
 1135|  27.3k|  sbr_scale_factor->st_syn_scale = -6;
 1136|       |
 1137|  27.3k|  if (audio_object_type == AOT_ER_AAC_ELD ||
  ------------------
  |  Branch (1137:7): [True: 8.56k, False: 18.8k]
  ------------------
 1138|  18.8k|      audio_object_type == AOT_ER_AAC_LD) {
  ------------------
  |  Branch (1138:7): [True: 1.85k, False: 16.9k]
  ------------------
 1139|  10.4k|    ptr_sbr_qmf->filter_2_32 =
 1140|  10.4k|        ptr_sbr_qmf->filter_pos_32 + ptr_sbr_qmf->no_channels;
 1141|  10.4k|    ptr_sbr_qmf->fp1_anal_32 = ptr_sbr_qmf->anal_filter_states_32;
 1142|  10.4k|    ptr_sbr_qmf->fp2_anal_32 =
 1143|  10.4k|        ptr_sbr_qmf->anal_filter_states_32 + ptr_sbr_qmf->no_channels;
 1144|       |
 1145|  10.4k|    ptr_sbr_qmf->filter_2 = ptr_sbr_qmf->filter_pos + ptr_sbr_qmf->no_channels;
 1146|  10.4k|    ptr_sbr_qmf->fp1_anal = ptr_sbr_qmf->anal_filter_states;
 1147|  10.4k|    ptr_sbr_qmf->fp2_anal =
 1148|  10.4k|        ptr_sbr_qmf->anal_filter_states + ptr_sbr_qmf->no_channels;
 1149|  10.4k|  }
 1150|       |
 1151|  27.3k|  return;
 1152|  27.3k|}
ixheaacd_sbrdec_initfuncs.c:ixheaacd_create_cplx_synt_qmfbank:
 1158|  27.3k|    ia_qmf_dec_tables_struct *qmf_dec_tables_ptr, WORD32 audio_object_type) {
 1159|  27.3k|  WORD32 L;
 1160|       |
 1161|  27.3k|  WORD32 qmf_filter_state_size;
 1162|       |
 1163|  27.3k|  memset(ptr_sbr_qmf, 0, sizeof(ia_sbr_qmf_filter_bank_struct));
 1164|       |
 1165|  27.3k|  if (down_sample_flag) {
  ------------------
  |  Branch (1165:7): [True: 5.79k, False: 21.5k]
  ------------------
 1166|  5.79k|    L = NO_SYNTHESIS_CHANNELS_DOWN_SAMPLED;
  ------------------
  |  |   38|  5.79k|#define NO_SYNTHESIS_CHANNELS_DOWN_SAMPLED (NO_SYNTHESIS_CHANNELS / 2)
  |  |  ------------------
  |  |  |  |   34|  5.79k|#define NO_SYNTHESIS_CHANNELS 64
  |  |  ------------------
  ------------------
 1167|  5.79k|    qmf_filter_state_size = QMF_FILTER_STATE_SYN_SIZE_DOWN_SAMPLED;
  ------------------
  |  |   39|  5.79k|#define QMF_FILTER_STATE_SYN_SIZE_DOWN_SAMPLED (QMF_FILTER_STATE_SYN_SIZE / 2)
  |  |  ------------------
  |  |  |  |   32|  5.79k|#define QMF_FILTER_STATE_SYN_SIZE 1280
  |  |  ------------------
  ------------------
 1168|  5.79k|    ptr_sbr_qmf->usb = NO_SYNTHESIS_CHANNELS_DOWN_SAMPLED;
  ------------------
  |  |   38|  5.79k|#define NO_SYNTHESIS_CHANNELS_DOWN_SAMPLED (NO_SYNTHESIS_CHANNELS / 2)
  |  |  ------------------
  |  |  |  |   34|  5.79k|#define NO_SYNTHESIS_CHANNELS 64
  |  |  ------------------
  ------------------
 1169|  21.5k|  } else {
 1170|  21.5k|    L = NO_SYNTHESIS_CHANNELS;
  ------------------
  |  |   34|  21.5k|#define NO_SYNTHESIS_CHANNELS 64
  ------------------
 1171|  21.5k|    qmf_filter_state_size = QMF_FILTER_STATE_SYN_SIZE;
  ------------------
  |  |   32|  21.5k|#define QMF_FILTER_STATE_SYN_SIZE 1280
  ------------------
 1172|  21.5k|    ptr_sbr_qmf->usb = usb;
 1173|  21.5k|  }
 1174|       |
 1175|  27.3k|  ptr_sbr_qmf->ixheaacd_drc_offset = 0;
 1176|  27.3k|  if (audio_object_type != AOT_ER_AAC_ELD &&
  ------------------
  |  Branch (1176:7): [True: 18.8k, False: 8.56k]
  ------------------
 1177|  18.8k|      audio_object_type != AOT_ER_AAC_LD) {
  ------------------
  |  Branch (1177:7): [True: 16.9k, False: 1.85k]
  ------------------
 1178|  16.9k|    ptr_sbr_qmf->filter_pos_syn = (WORD16 *)qmf_dec_tables_ptr->qmf_c;
 1179|  16.9k|    ptr_sbr_qmf->p_filter = qmf_dec_tables_ptr->qmf_c;
 1180|  16.9k|  } else {
 1181|  10.4k|    ptr_sbr_qmf->filter_pos_syn = (WORD16 *)qmf_dec_tables_ptr->qmf_c_eld;
 1182|  10.4k|    ptr_sbr_qmf->p_filter = qmf_dec_tables_ptr->qmf_c_eld;
 1183|  10.4k|  }
 1184|       |
 1185|  27.3k|  ptr_sbr_qmf->filter_pos_syn_32 = (WORD32 *)qmf_dec_tables_ptr->esbr_qmf_c;
 1186|  27.3k|  ptr_sbr_qmf->p_filter_32 = qmf_dec_tables_ptr->esbr_qmf_c;
 1187|       |
 1188|  27.3k|  ptr_sbr_qmf->no_channels = L;
 1189|  27.3k|  ptr_sbr_qmf->qmf_filter_state_size = qmf_filter_state_size;
 1190|  27.3k|  ptr_sbr_qmf->num_time_slots = no_bins;
 1191|  27.3k|  ptr_sbr_qmf->lsb = lsb;
 1192|       |
 1193|  27.3k|  ptr_sbr_qmf->filter_states =
 1194|  27.3k|      &sbr_qmf_synth_states[chan ? qmf_filter_state_size : 0];
  ------------------
  |  Branch (1194:29): [True: 12.6k, False: 14.7k]
  ------------------
 1195|       |
 1196|  27.3k|  memset(ptr_sbr_qmf->filter_states, 0, sizeof(WORD16) * qmf_filter_state_size);
 1197|       |
 1198|  27.3k|  ptr_sbr_qmf->filter_states_32 =
 1199|  27.3k|      &sbr_qmf_synth_states_32[chan ? qmf_filter_state_size : 0];
  ------------------
  |  Branch (1199:32): [True: 12.6k, False: 14.7k]
  ------------------
 1200|       |
 1201|  27.3k|  memset(ptr_sbr_qmf->filter_states_32, 0,
 1202|  27.3k|         sizeof(WORD32) * qmf_filter_state_size);
 1203|       |
 1204|  27.3k|  if (audio_object_type == AOT_ER_AAC_ELD ||
  ------------------
  |  Branch (1204:7): [True: 8.56k, False: 18.8k]
  ------------------
 1205|  18.8k|      audio_object_type == AOT_ER_AAC_LD) {
  ------------------
  |  Branch (1205:7): [True: 1.85k, False: 16.9k]
  ------------------
 1206|  10.4k|    ptr_sbr_qmf->fp1_syn = ptr_sbr_qmf->filter_states;
 1207|  10.4k|    ptr_sbr_qmf->fp2_syn =
 1208|  10.4k|        ptr_sbr_qmf->filter_states + ptr_sbr_qmf->no_channels;
 1209|  10.4k|    ptr_sbr_qmf->sixty4 = NO_SYNTHESIS_CHANNELS;
  ------------------
  |  |   34|  10.4k|#define NO_SYNTHESIS_CHANNELS 64
  ------------------
 1210|  10.4k|  }
 1211|       |
 1212|  27.3k|  return;
 1213|  27.3k|}
ixheaacd_sbrdec_initfuncs.c:ixheaacd_init_sbr_prev_framedata:
  884|  27.3k|    ia_sbr_prev_frame_data_struct *ptr_prev_data, WORD16 time_slots) {
  885|  27.3k|  WORD16 *psfb_nrg_prev = ptr_prev_data->sfb_nrg_prev;
  886|  27.3k|  WORD16 *psfb_noise_level = ptr_prev_data->prev_noise_level;
  887|  27.3k|  WORD32 *ppsbr_invf_mode = ptr_prev_data->sbr_invf_mode;
  888|       |
  889|  27.3k|  memset(psfb_nrg_prev, 0, sizeof(WORD16) * (MAX_FREQ_COEFFS));
  ------------------
  |  |   51|  27.3k|#define MAX_FREQ_COEFFS 56
  ------------------
  890|  27.3k|  memset(psfb_noise_level, 0, sizeof(WORD16) * (MAX_NOISE_COEFFS));
  ------------------
  |  |   45|  27.3k|#define MAX_NOISE_COEFFS 5
  ------------------
  891|       |
  892|  27.3k|  memset(ppsbr_invf_mode, 0, sizeof(WORD32) * MAX_INVF_BANDS);
  ------------------
  |  |   42|  27.3k|#define MAX_INVF_BANDS MAX_NOISE_COEFFS
  |  |  ------------------
  |  |  |  |   45|  27.3k|#define MAX_NOISE_COEFFS 5
  |  |  ------------------
  ------------------
  893|       |
  894|  27.3k|  ptr_prev_data->end_position = time_slots;
  895|  27.3k|  ptr_prev_data->coupling_mode = COUPLING_OFF;
  ------------------
  |  |   38|  27.3k|#define COUPLING_OFF 0
  ------------------
  896|  27.3k|  ptr_prev_data->amp_res = 0;
  897|  27.3k|  ptr_prev_data->max_qmf_subband_aac = 0;
  898|  27.3k|}
ixheaacd_sbrdec_initfuncs.c:ixheaacd_create_hf_generator:
  940|  27.3k|    VOID *sbr_persistent_mem_v, WORD32 ps_enable) {
  941|  27.3k|  WORD16 i;
  942|  27.3k|  ia_sbr_pers_struct *sbr_persistent_mem =
  943|  27.3k|      (ia_sbr_pers_struct *)sbr_persistent_mem_v;
  944|       |
  945|  27.3k|  ptr_hf_gen_str->pstr_settings = &sbr_persistent_mem->str_sbr_tran_settings;
  946|       |
  947|  27.3k|  ptr_hf_gen_str->lpc_filt_states_real[0] =
  948|  27.3k|      sbr_persistent_mem->sbr_lpc_filter_states_real[chan][0];
  949|  27.3k|  ptr_hf_gen_str->lpc_filt_states_real[1] =
  950|  27.3k|      sbr_persistent_mem->sbr_lpc_filter_states_real[chan][1];
  951|       |
  952|  27.3k|  if (ps_enable) {
  ------------------
  |  Branch (952:7): [True: 20.7k, False: 6.64k]
  ------------------
  953|  20.7k|    ptr_hf_gen_str->lpc_filt_states_imag[0] =
  954|  20.7k|        sbr_persistent_mem->sbr_lpc_filter_states_imag[chan][0];
  955|  20.7k|    ptr_hf_gen_str->lpc_filt_states_imag[1] =
  956|  20.7k|        sbr_persistent_mem->sbr_lpc_filter_states_imag[chan][1];
  957|  20.7k|  }
  958|       |
  959|  82.1k|  for (i = 0; i < LPC_ORDER; i++) {
  ------------------
  |  |   65|  82.1k|#define LPC_ORDER 2
  ------------------
  |  Branch (959:15): [True: 54.7k, False: 27.3k]
  ------------------
  960|  54.7k|    if (ptr_hf_gen_str->lpc_filt_states_real[i] != NULL) {
  ------------------
  |  Branch (960:9): [True: 54.7k, False: 0]
  ------------------
  961|  54.7k|      memset(ptr_hf_gen_str->lpc_filt_states_real[i], 0,
  962|  54.7k|             NO_ANALYSIS_CHANNELS * sizeof(WORD32));
  ------------------
  |  |   35|  54.7k|#define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  ------------------
  |  |  |  |   34|  54.7k|#define NO_SYNTHESIS_CHANNELS 64
  |  |  ------------------
  |  |               #define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  ------------------
  |  |  |  |   23|  54.7k|#define SBR_UPSAMPLE_FAC 2
  |  |  ------------------
  ------------------
  963|  54.7k|    }
  964|       |
  965|  54.7k|    if (ps_enable)
  ------------------
  |  Branch (965:9): [True: 41.4k, False: 13.2k]
  ------------------
  966|  41.4k|      memset(ptr_hf_gen_str->lpc_filt_states_imag[i], 0,
  967|  41.4k|             NO_ANALYSIS_CHANNELS * sizeof(WORD32));
  ------------------
  |  |   35|  41.4k|#define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  ------------------
  |  |  |  |   34|  41.4k|#define NO_SYNTHESIS_CHANNELS 64
  |  |  ------------------
  |  |               #define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  ------------------
  |  |  |  |   23|  41.4k|#define SBR_UPSAMPLE_FAC 2
  |  |  ------------------
  ------------------
  968|  54.7k|  }
  969|       |
  970|  27.3k|  if (chan == 0) {
  ------------------
  |  Branch (970:7): [True: 14.7k, False: 12.6k]
  ------------------
  971|  14.7k|    ptr_hf_gen_str->pstr_settings->num_columns = num_columns;
  972|  14.7k|  }
  973|  27.3k|  return;
  974|  27.3k|}

ixheaacd_reset_sbrenvelope_calc:
   91|  89.8k|VOID ixheaacd_reset_sbrenvelope_calc(ia_sbr_calc_env_struct *h_cal_env) {
   92|  89.8k|  h_cal_env->ph_index = 0;
   93|  89.8k|  h_cal_env->filt_buf_noise_e = 0;
   94|  89.8k|  h_cal_env->start_up = 1;
   95|  89.8k|}
ixheaacd_derive_lim_band_tbl:
  100|  17.0k|    ixheaacd_misc_tables *pstr_common_tables) {
  101|  17.0k|  WORD32 i, k, k_1;
  102|  17.0k|  WORD32 nr_lim, patch_border_k, patch_border_k_1, temp_nr_lim;
  103|       |
  104|  17.0k|  WORD16 lim_table[MAX_FREQ_COEFFS / 2 + MAX_NUM_PATCHES + 1];
  105|  17.0k|  WORD16 patch_borders[MAX_NUM_PATCHES + 1];
  106|  17.0k|  WORD16 kx, k2;
  107|  17.0k|  WORD16 temp, lim_bands, num_octaves;
  108|       |
  109|  17.0k|  WORD16 *f_lim_tbl = ptr_header_data->pstr_freq_band_data->freq_band_tbl_lim;
  110|  17.0k|  WORD16 *num_lf_bands = &ptr_header_data->pstr_freq_band_data->num_lf_bands;
  111|  17.0k|  WORD16 *f_low_tbl =
  112|  17.0k|      ptr_header_data->pstr_freq_band_data->freq_band_table[LOW];
  ------------------
  |  |   27|  17.0k|#define LOW 0
  ------------------
  113|  17.0k|  WORD16 num_low_bnd = ptr_header_data->pstr_freq_band_data->num_sf_bands[LOW];
  ------------------
  |  |   27|  17.0k|#define LOW 0
  ------------------
  114|  17.0k|  WORD16 limiter_bands = ptr_header_data->limiter_bands;
  115|       |
  116|  17.0k|  WORD16 sub_band_start = f_low_tbl[0];
  117|  17.0k|  WORD16 sub_band_end = f_low_tbl[num_low_bnd];
  118|  17.0k|  const WORD16 limbnd_per_oct[4] = {(WORD16)0x2000, (WORD16)0x2666, (WORD16)0x4000,
  119|  17.0k|                                    (WORD16)0x6000};
  120|       |
  121|  17.0k|  if (limiter_bands == 0) {
  ------------------
  |  Branch (121:7): [True: 2.20k, False: 14.8k]
  ------------------
  122|  2.20k|    f_lim_tbl[0] = 0;
  123|  2.20k|    f_lim_tbl[1] = sub_band_end - sub_band_start;
  124|  2.20k|    nr_lim = 1;
  125|  14.8k|  } else {
  126|  52.0k|    for (k = 0; k < num_patches; k++) {
  ------------------
  |  Branch (126:17): [True: 37.1k, False: 14.8k]
  ------------------
  127|  37.1k|      patch_borders[k] = p_str_patch_param[k].guard_start_band - sub_band_start;
  128|  37.1k|    }
  129|  14.8k|    patch_borders[k] = sub_band_end - sub_band_start;
  130|       |
  131|   118k|    for (k = 0; k <= num_low_bnd; k++) {
  ------------------
  |  Branch (131:17): [True: 104k, False: 14.8k]
  ------------------
  132|   104k|      lim_table[k] = f_low_tbl[k] - sub_band_start;
  133|   104k|    }
  134|  37.6k|    for (k = 1; k < num_patches; k++) {
  ------------------
  |  Branch (134:17): [True: 22.7k, False: 14.8k]
  ------------------
  135|  22.7k|      lim_table[num_low_bnd + k] = patch_borders[k];
  136|  22.7k|    }
  137|       |
  138|  14.8k|    temp_nr_lim = nr_lim = (num_low_bnd + num_patches) - 1;
  139|  14.8k|    ixheaacd_aac_shellsort(lim_table, (temp_nr_lim + 1));
  140|       |
  141|  14.8k|    k = 1;
  142|  14.8k|    k_1 = 0;
  143|       |
  144|  14.8k|    lim_bands = limbnd_per_oct[limiter_bands];
  145|       |
  146|   126k|    while ((k - temp_nr_lim) <= 0) {
  ------------------
  |  Branch (146:12): [True: 111k, False: 14.8k]
  ------------------
  147|   111k|      k2 = lim_table[k] + sub_band_start;
  148|   111k|      kx = lim_table[k_1] + sub_band_start;
  149|       |
  150|   111k|      num_octaves = pstr_common_tables->log_dual_is_table[k2];
  151|   111k|      num_octaves -= pstr_common_tables->log_dual_is_table[kx];
  152|       |
  153|   111k|      temp = (WORD16)(((WORD32)lim_bands * (WORD32)num_octaves) >> 15);
  154|       |
  155|   111k|      if (temp < 0x01f6) {
  ------------------
  |  Branch (155:11): [True: 69.5k, False: 41.9k]
  ------------------
  156|  69.5k|        if (lim_table[k_1] == lim_table[k]) {
  ------------------
  |  Branch (156:13): [True: 9.72k, False: 59.7k]
  ------------------
  157|  9.72k|          lim_table[k] = sub_band_end;
  158|  9.72k|          nr_lim = nr_lim - 1;
  159|  9.72k|          k = (k + 1);
  160|  9.72k|          continue;
  161|  9.72k|        }
  162|  59.7k|        patch_border_k_1 = patch_border_k = 0;
  163|       |
  164|   296k|        for (i = 0; i <= num_patches; i++) {
  ------------------
  |  Branch (164:21): [True: 236k, False: 59.7k]
  ------------------
  165|   236k|          if (lim_table[k] == patch_borders[i]) {
  ------------------
  |  Branch (165:15): [True: 20.7k, False: 216k]
  ------------------
  166|  20.7k|            patch_border_k = 1;
  167|  20.7k|          }
  168|   236k|          if (lim_table[k_1] == patch_borders[i]) {
  ------------------
  |  Branch (168:15): [True: 35.2k, False: 201k]
  ------------------
  169|  35.2k|            patch_border_k_1 = 1;
  170|  35.2k|          }
  171|   236k|        }
  172|  59.7k|        if (!patch_border_k) {
  ------------------
  |  Branch (172:13): [True: 38.9k, False: 20.7k]
  ------------------
  173|  38.9k|          lim_table[k] = sub_band_end;
  174|  38.9k|          nr_lim = nr_lim - 1;
  175|  38.9k|          k = (k + 1);
  176|  38.9k|          continue;
  177|  38.9k|        }
  178|       |
  179|  20.7k|        if (!patch_border_k_1) {
  ------------------
  |  Branch (179:13): [True: 13.1k, False: 7.67k]
  ------------------
  180|  13.1k|          lim_table[k_1] = sub_band_end;
  181|  13.1k|          nr_lim = nr_lim - 1;
  182|  13.1k|        }
  183|  20.7k|      }
  184|  62.7k|      k_1 = k;
  185|  62.7k|      k = (k + 1);
  186|  62.7k|    }
  187|  14.8k|    ixheaacd_aac_shellsort(lim_table, (temp_nr_lim + 1));
  188|       |
  189|  14.8k|    memcpy(f_lim_tbl, lim_table, sizeof(WORD16) * (nr_lim + 1));
  190|  14.8k|  }
  191|  17.0k|  *num_lf_bands = nr_lim;
  192|       |
  193|  17.0k|  return;
  194|  17.0k|}
ixheaacd_lean_sbrconcealment:
  199|  34.9k|    ia_sbr_prev_frame_data_struct *ptr_prev_data) {
  200|  34.9k|  WORD32 target;
  201|  34.9k|  WORD32 step;
  202|  34.9k|  WORD32 i;
  203|       |
  204|  34.9k|  WORD16 cur_start_pos;
  205|  34.9k|  WORD16 cur_stop_pos;
  206|       |
  207|  34.9k|  ptr_sbr_data->amp_res = ptr_prev_data->amp_res;
  208|  34.9k|  ptr_sbr_data->coupling_mode = ptr_prev_data->coupling_mode;
  209|  34.9k|  ptr_sbr_data->max_qmf_subband_aac = ptr_prev_data->max_qmf_subband_aac;
  210|       |
  211|  34.9k|  memcpy(ptr_sbr_data->sbr_invf_mode, ptr_prev_data->sbr_invf_mode,
  212|  34.9k|         sizeof(WORD32) * MAX_INVF_BANDS);
  ------------------
  |  |   42|  34.9k|#define MAX_INVF_BANDS MAX_NOISE_COEFFS
  |  |  ------------------
  |  |  |  |   45|  34.9k|#define MAX_NOISE_COEFFS 5
  |  |  ------------------
  ------------------
  213|       |
  214|  34.9k|  ptr_sbr_data->str_frame_info_details.num_env = 1;
  215|       |
  216|  34.9k|  cur_start_pos = ptr_prev_data->end_position - ptr_header_data->num_time_slots;
  217|  34.9k|  cur_stop_pos = ptr_header_data->num_time_slots;
  218|       |
  219|  34.9k|  ptr_sbr_data->str_frame_info_details.border_vec[0] = cur_start_pos;
  220|  34.9k|  ptr_sbr_data->str_frame_info_details.border_vec[1] = cur_stop_pos;
  221|       |
  222|  34.9k|  ptr_sbr_data->str_frame_info_details.noise_border_vec[0] = cur_start_pos;
  223|  34.9k|  ptr_sbr_data->str_frame_info_details.noise_border_vec[1] = cur_stop_pos;
  224|  34.9k|  ;
  225|       |
  226|  34.9k|  ptr_sbr_data->str_frame_info_details.freq_res[0] = 1;
  227|  34.9k|  ptr_sbr_data->str_frame_info_details.transient_env = -1;
  228|  34.9k|  ptr_sbr_data->str_frame_info_details.num_noise_env = 1;
  229|       |
  230|  34.9k|  ptr_sbr_data->num_env_sfac =
  231|  34.9k|      ptr_header_data->pstr_freq_band_data->num_sf_bands[1];
  232|       |
  233|  34.9k|  ptr_sbr_data->del_cod_dir_arr[0] = DTDF_DIR_TIME;
  ------------------
  |  |   30|  34.9k|#define DTDF_DIR_TIME 1
  ------------------
  234|       |
  235|  34.9k|  if (ptr_sbr_data->coupling_mode == COUPLING_BAL) {
  ------------------
  |  |   40|  34.9k|#define COUPLING_BAL 2
  ------------------
  |  Branch (235:7): [True: 5.34k, False: 29.5k]
  ------------------
  236|  5.34k|    target = SBR_ENERGY_PAN_OFFSET;
  ------------------
  |  |  199|  5.34k|#define SBR_ENERGY_PAN_OFFSET 12
  ------------------
  237|  29.5k|  } else {
  238|  29.5k|    target = 0;
  239|  29.5k|  }
  240|       |
  241|  34.9k|  step = 1;
  242|       |
  243|  34.9k|  if (ptr_header_data->amp_res - SBR_AMPLITUDE_RESOLUTION_1_5 == 0) {
  ------------------
  |  |   23|  34.9k|#define SBR_AMPLITUDE_RESOLUTION_1_5 0
  ------------------
  |  Branch (243:7): [True: 21.0k, False: 13.8k]
  ------------------
  244|  21.0k|    target = (target << 1);
  245|  21.0k|    step = (step << 1);
  246|  21.0k|  }
  247|       |
  248|   419k|  for (i = 0; i < ptr_sbr_data->num_env_sfac; i++) {
  ------------------
  |  Branch (248:15): [True: 384k, False: 34.9k]
  ------------------
  249|   384k|    if (ptr_prev_data->sfb_nrg_prev[i] > target)
  ------------------
  |  Branch (249:9): [True: 226k, False: 158k]
  ------------------
  250|   226k|      ptr_sbr_data->int_env_sf_arr[i] = -(step);
  251|   158k|    else
  252|   158k|      ptr_sbr_data->int_env_sf_arr[i] = step;
  253|   384k|  }
  254|       |
  255|  34.9k|  ptr_sbr_data->del_cod_dir_noise_arr[0] = DTDF_DIR_TIME;
  ------------------
  |  |   30|  34.9k|#define DTDF_DIR_TIME 1
  ------------------
  256|       |
  257|  34.9k|  memset(ptr_sbr_data->int_noise_floor, 0,
  258|  34.9k|         sizeof(ptr_sbr_data->int_noise_floor));
  259|       |
  260|  34.9k|  memset(ptr_sbr_data->add_harmonics, 0, sizeof(FLAG) * MAX_FREQ_COEFFS);
  ------------------
  |  |   51|  34.9k|#define MAX_FREQ_COEFFS 56
  ------------------
  261|  34.9k|}
ixheaacd_reset_hf_generator:
  289|  17.0k|                                   WORD audio_object_type) {
  290|  17.0k|  WORD32 patch, sb;
  291|  17.0k|  WORD32 temp;
  292|  17.0k|  WORD16 *ptr_noise_freq_tbl;
  293|  17.0k|  WORD32 num_nf_bands;
  294|       |
  295|  17.0k|  ia_transposer_settings_struct *pstr_transposer_settings =
  296|  17.0k|      ptr_hf_gen_str->pstr_settings;
  297|  17.0k|  ia_patch_param_struct *p_str_patch_param =
  298|  17.0k|      pstr_transposer_settings->str_patch_param;
  299|       |
  300|  17.0k|  WORD32 sub_band_start = ptr_header_data->pstr_freq_band_data->sub_band_start;
  301|  17.0k|  WORD16 *f_master_tbl = ptr_header_data->pstr_freq_band_data->f_master_tbl;
  302|  17.0k|  WORD16 num_mf_bands = ptr_header_data->pstr_freq_band_data->num_mf_bands;
  303|  17.0k|  WORD16 usb = ptr_header_data->pstr_freq_band_data->sub_band_end;
  304|       |
  305|  17.0k|  WORD32 src_start_band;
  306|  17.0k|  WORD32 patch_stride;
  307|  17.0k|  WORD32 num_bands_in_patch;
  308|       |
  309|  17.0k|  WORD32 lsb = f_master_tbl[0];
  310|  17.0k|  WORD16 xover_offset = sub_band_start - lsb;
  311|       |
  312|  17.0k|  WORD16 goal_sb, flag_break_1 = 0;
  313|  17.0k|  WORD32 fs = ptr_header_data->out_sampling_freq;
  314|       |
  315|  17.0k|  if (lsb < (SHIFT_START_SB + 4)) {
  ------------------
  |  |   25|  17.0k|#define SHIFT_START_SB 1
  ------------------
  |  Branch (315:7): [True: 0, False: 17.0k]
  ------------------
  316|      0|    return (1);
  317|      0|  }
  318|  17.0k|  switch (fs) {
  319|  1.31k|    case 16000:
  ------------------
  |  Branch (319:5): [True: 1.31k, False: 15.7k]
  ------------------
  320|  1.75k|    case 22050:
  ------------------
  |  Branch (320:5): [True: 444, False: 16.6k]
  ------------------
  321|  2.04k|    case 24000:
  ------------------
  |  Branch (321:5): [True: 287, False: 16.7k]
  ------------------
  322|  14.6k|    case 32000:
  ------------------
  |  Branch (322:5): [True: 12.6k, False: 4.45k]
  ------------------
  323|  14.6k|      goal_sb = 64;
  324|  14.6k|      break;
  325|     40|    case 44100:
  ------------------
  |  Branch (325:5): [True: 40, False: 17.0k]
  ------------------
  326|     40|      goal_sb = 46;
  327|     40|      break;
  328|     17|    case 48000:
  ------------------
  |  Branch (328:5): [True: 17, False: 17.0k]
  ------------------
  329|     17|      goal_sb = 43;
  330|     17|      break;
  331|     58|    case 64000:
  ------------------
  |  Branch (331:5): [True: 58, False: 17.0k]
  ------------------
  332|     58|      goal_sb = 32;
  333|     58|      break;
  334|    835|    case 88200:
  ------------------
  |  Branch (334:5): [True: 835, False: 16.2k]
  ------------------
  335|    835|      goal_sb = 23;
  336|    835|      break;
  337|    889|    case 96000:
  ------------------
  |  Branch (337:5): [True: 889, False: 16.1k]
  ------------------
  338|    889|      goal_sb = 21;
  339|    889|      break;
  340|    567|    default:
  ------------------
  |  Branch (340:5): [True: 567, False: 16.5k]
  ------------------
  341|    567|      return (0);
  342|  17.0k|  }
  343|       |
  344|  16.5k|  goal_sb = ixheaacd_find_closest_entry(goal_sb, f_master_tbl, num_mf_bands, 1);
  345|  16.5k|  if (audio_object_type != AOT_ER_AAC_ELD &&
  ------------------
  |  Branch (345:7): [True: 520, False: 15.9k]
  ------------------
  346|    520|      audio_object_type != AOT_ER_AAC_LD) {
  ------------------
  |  Branch (346:7): [True: 520, False: 0]
  ------------------
  347|    520|    if (ixheaac_abs16_sat((WORD16)(goal_sb - usb)) < 4) {
  ------------------
  |  Branch (347:9): [True: 458, False: 62]
  ------------------
  348|    458|      goal_sb = usb;
  349|    458|    }
  350|    520|  }
  351|       |
  352|  16.5k|  src_start_band = SHIFT_START_SB + xover_offset;
  ------------------
  |  |   25|  16.5k|#define SHIFT_START_SB 1
  ------------------
  353|  16.5k|  sb = (lsb + xover_offset);
  354|       |
  355|  16.5k|  patch = 0;
  356|       |
  357|  16.5k|  if ((goal_sb < sb) && (lsb > src_start_band)) {
  ------------------
  |  Branch (357:7): [True: 15, False: 16.5k]
  |  Branch (357:25): [True: 11, False: 4]
  ------------------
  358|     11|    return -1;
  359|     11|  }
  360|       |
  361|  60.7k|  while (((sb - usb) < 0) && (patch < MAX_NUM_PATCHES)) {
  ------------------
  |  |   23|  45.0k|#define MAX_NUM_PATCHES 6
  ------------------
  |  Branch (361:10): [True: 45.0k, False: 15.7k]
  |  Branch (361:30): [True: 44.2k, False: 776]
  ------------------
  362|  44.2k|    ia_patch_param_struct *ptr_loc_patch_param = &p_str_patch_param[patch];
  363|  44.2k|    WORD16 abs_sb, flag_break = 0;
  364|  44.2k|    ptr_loc_patch_param->guard_start_band = sb;
  365|  44.2k|    sb = (sb + GUARDBANDS);
  ------------------
  |  |   24|  44.2k|#define GUARDBANDS 0
  ------------------
  366|  44.2k|    ptr_loc_patch_param->dst_start_band = sb;
  367|       |
  368|  44.2k|    num_bands_in_patch = (goal_sb - sb);
  369|  44.2k|    if ((num_bands_in_patch <= 0) &&
  ------------------
  |  Branch (369:9): [True: 78, False: 44.2k]
  ------------------
  370|     78|        ((num_bands_in_patch - (lsb - src_start_band)) < 0)) {
  ------------------
  |  Branch (370:9): [True: 78, False: 0]
  ------------------
  371|     78|      flag_break = 1;
  372|     78|    }
  373|  44.2k|    if ((num_bands_in_patch - (lsb - src_start_band)) >= 0) {
  ------------------
  |  Branch (373:9): [True: 28.7k, False: 15.5k]
  ------------------
  374|  28.7k|      patch_stride = sb - src_start_band;
  375|  28.7k|      patch_stride = (WORD16)(patch_stride & ~1);
  376|  28.7k|      num_bands_in_patch = (lsb - (sb - patch_stride));
  377|  28.7k|      num_bands_in_patch = ixheaacd_find_closest_entry(
  378|  28.7k|          sb + num_bands_in_patch, f_master_tbl, num_mf_bands, 0);
  379|  28.7k|      num_bands_in_patch -= sb;
  380|  28.7k|    }
  381|       |
  382|  44.2k|    patch_stride = ((num_bands_in_patch + sb) - lsb);
  383|  44.2k|    patch_stride = (WORD16)((patch_stride + 1) & ~1);
  384|       |
  385|  44.2k|    if (num_bands_in_patch > 0) {
  ------------------
  |  Branch (385:9): [True: 43.4k, False: 801]
  ------------------
  386|  43.4k|      ptr_loc_patch_param->src_start_band = (sb - patch_stride);
  387|  43.4k|      ptr_loc_patch_param->dst_end_band = patch_stride;
  388|  43.4k|      ptr_loc_patch_param->num_bands_in_patch = num_bands_in_patch;
  389|  43.4k|      ptr_loc_patch_param->src_end_band =
  390|  43.4k|          (ptr_loc_patch_param->src_start_band + num_bands_in_patch);
  391|       |
  392|  43.4k|      sb = (sb + ptr_loc_patch_param->num_bands_in_patch);
  393|  43.4k|      patch++;
  394|  43.4k|    }
  395|       |
  396|  44.2k|    src_start_band = SHIFT_START_SB;
  ------------------
  |  |   25|  44.2k|#define SHIFT_START_SB 1
  ------------------
  397|  44.2k|    abs_sb = ixheaac_abs16_sat((WORD16)((sb - goal_sb))) - 3;
  398|       |
  399|  44.2k|    if (num_bands_in_patch <= 0 && flag_break_1 == 1) {
  ------------------
  |  Branch (399:9): [True: 801, False: 43.4k]
  |  Branch (399:36): [True: 0, False: 801]
  ------------------
  400|      0|      break;
  401|      0|    }
  402|       |
  403|  44.2k|    if (abs_sb < 0) {
  ------------------
  |  Branch (403:9): [True: 17.3k, False: 26.9k]
  ------------------
  404|  17.3k|      goal_sb = usb;
  405|  26.9k|    } else {
  406|  26.9k|      if (flag_break == 1) break;
  ------------------
  |  Branch (406:11): [True: 4, False: 26.9k]
  ------------------
  407|  26.9k|    }
  408|       |
  409|  44.2k|    if (num_bands_in_patch <= 0) {
  ------------------
  |  Branch (409:9): [True: 797, False: 43.4k]
  ------------------
  410|    797|      flag_break_1 = 1;
  411|  43.4k|    } else {
  412|  43.4k|      flag_break_1 = 0;
  413|  43.4k|    }
  414|  44.2k|  }
  415|       |
  416|  16.5k|  patch--;
  417|       |
  418|  16.5k|  if ((patch > 0) && (p_str_patch_param[patch].num_bands_in_patch < 3)) {
  ------------------
  |  Branch (418:7): [True: 12.7k, False: 3.73k]
  |  Branch (418:22): [True: 1.04k, False: 11.7k]
  ------------------
  419|  1.04k|    patch--;
  420|  1.04k|    sb = p_str_patch_param[patch].dst_start_band +
  421|  1.04k|         p_str_patch_param[patch].num_bands_in_patch;
  422|  1.04k|  }
  423|       |
  424|  16.5k|  if (patch >= MAX_NUM_PATCHES) {
  ------------------
  |  |   23|  16.5k|#define MAX_NUM_PATCHES 6
  ------------------
  |  Branch (424:7): [True: 0, False: 16.5k]
  ------------------
  425|      0|    return -1;
  426|      0|  }
  427|       |
  428|  16.5k|  pstr_transposer_settings->num_patches = patch + 1;
  429|       |
  430|  16.5k|  temp = 0;
  431|       |
  432|  58.9k|  for (patch = 0; patch < pstr_transposer_settings->num_patches; patch++) {
  ------------------
  |  Branch (432:19): [True: 42.4k, False: 16.5k]
  ------------------
  433|  42.4k|    sb = ixheaac_min32(sb, p_str_patch_param[patch].src_start_band);
  434|  42.4k|    temp = ixheaac_max32(temp, p_str_patch_param[patch].src_end_band);
  435|  42.4k|  }
  436|       |
  437|  16.5k|  if (sb > temp) return IA_FATAL_ERROR;
  ------------------
  |  |   25|      4|#define IA_FATAL_ERROR 0x80000000
  ------------------
  |  Branch (437:7): [True: 4, False: 16.5k]
  ------------------
  438|       |
  439|  16.5k|  pstr_transposer_settings->start_patch = sb;
  440|  16.5k|  pstr_transposer_settings->stop_patch = temp;
  441|       |
  442|  16.5k|  ptr_noise_freq_tbl =
  443|  16.5k|      ptr_header_data->pstr_freq_band_data->freq_band_tbl_noise;
  444|  16.5k|  num_nf_bands = ptr_header_data->pstr_freq_band_data->num_nf_bands;
  445|       |
  446|  16.5k|  memcpy(&pstr_transposer_settings->bw_borders[0], &ptr_noise_freq_tbl[1],
  447|  16.5k|         sizeof(WORD16) * num_nf_bands);
  448|       |
  449|  16.5k|  memset(ptr_hf_gen_str->bw_array_prev, 0, sizeof(WORD32) * MAX_NUM_PATCHES);
  ------------------
  |  |   23|  16.5k|#define MAX_NUM_PATCHES 6
  ------------------
  450|       |
  451|  16.5k|  return 0;
  452|  16.5k|}
ixheaacd_rescale_x_overlap:
  458|  50.4k|    FLAG low_pow_flag) {
  459|  50.4k|  WORD32 k, l;
  460|  50.4k|  WORD32 start_band, end_band;
  461|  50.4k|  WORD32 target_lsb, target_usb;
  462|  50.4k|  WORD32 source_scale, target_scale, delta_scale, reserve;
  463|       |
  464|  50.4k|  WORD32 old_lsb = ptr_frame_data_prev->max_qmf_subband_aac;
  465|  50.4k|  WORD32 start_slot =
  466|  50.4k|      (ptr_header_data->time_step *
  467|  50.4k|       (ptr_frame_data_prev->end_position - ptr_header_data->num_time_slots));
  468|  50.4k|  WORD32 new_lsb = ptr_frame_data->max_qmf_subband_aac;
  469|       |
  470|  50.4k|  ptr_sbr_dec->str_codec_qmf_bank.usb = new_lsb;
  471|  50.4k|  ptr_sbr_dec->str_synthesis_qmf_bank.lsb = new_lsb;
  472|       |
  473|  50.4k|  start_band = ixheaac_min32(old_lsb, new_lsb);
  474|  50.4k|  end_band = ixheaac_max32(old_lsb, new_lsb);
  475|       |
  476|  50.4k|  if (new_lsb != old_lsb && old_lsb > 0) {
  ------------------
  |  Branch (476:7): [True: 12.7k, False: 37.7k]
  |  Branch (476:29): [True: 7.95k, False: 4.78k]
  ------------------
  477|  55.7k|    for (l = start_slot; l < 6; l++) {
  ------------------
  |  Branch (477:26): [True: 47.7k, False: 7.95k]
  ------------------
  478|   206k|      for (k = old_lsb; k < new_lsb; k++) {
  ------------------
  |  Branch (478:25): [True: 158k, False: 47.7k]
  ------------------
  479|   158k|        pp_overlap_buffer_real[l][k] = 0L;
  480|       |
  481|   158k|        if (!low_pow_flag) {
  ------------------
  |  Branch (481:13): [True: 158k, False: 0]
  ------------------
  482|   158k|          pp_overlap_buffer_imag[l][k] = 0L;
  483|   158k|        }
  484|   158k|      }
  485|  47.7k|    }
  486|       |
  487|  7.95k|    if (new_lsb > old_lsb) {
  ------------------
  |  Branch (487:9): [True: 3.74k, False: 4.21k]
  ------------------
  488|  3.74k|      source_scale = ptr_sbr_dec->str_sbr_scale_fact.ov_hb_scale;
  489|  3.74k|      target_scale = ptr_sbr_dec->str_sbr_scale_fact.ov_lb_scale;
  490|  3.74k|      target_lsb = 0;
  491|  3.74k|      target_usb = old_lsb;
  492|  4.21k|    } else {
  493|  4.21k|      source_scale = ptr_sbr_dec->str_sbr_scale_fact.ov_lb_scale;
  494|  4.21k|      target_scale = ptr_sbr_dec->str_sbr_scale_fact.ov_hb_scale;
  495|  4.21k|      target_lsb = old_lsb;
  496|  4.21k|      target_usb = ptr_sbr_dec->str_synthesis_qmf_bank.usb;
  497|  4.21k|    }
  498|       |
  499|  7.95k|    reserve = (*ixheaacd_ixheaacd_expsubbandsamples)(
  500|  7.95k|        pp_overlap_buffer_real, pp_overlap_buffer_imag, start_band, end_band, 0,
  501|  7.95k|        start_slot, low_pow_flag);
  502|       |
  503|  7.95k|    (*ixheaacd_adjust_scale)(pp_overlap_buffer_real, pp_overlap_buffer_imag,
  504|  7.95k|                             start_band, end_band, 0, start_slot, reserve,
  505|  7.95k|                             low_pow_flag);
  506|       |
  507|  7.95k|    source_scale += reserve;
  508|       |
  509|  7.95k|    delta_scale = (target_scale - source_scale);
  510|       |
  511|  7.95k|    if (delta_scale > 0) {
  ------------------
  |  Branch (511:9): [True: 42, False: 7.91k]
  ------------------
  512|     42|      delta_scale = -(delta_scale);
  513|     42|      start_band = target_lsb;
  514|     42|      end_band = target_usb;
  515|       |
  516|     42|      if (new_lsb > old_lsb) {
  ------------------
  |  Branch (516:11): [True: 0, False: 42]
  ------------------
  517|      0|        ptr_sbr_dec->str_sbr_scale_fact.ov_lb_scale = source_scale;
  518|     42|      } else {
  519|     42|        ptr_sbr_dec->str_sbr_scale_fact.ov_hb_scale = source_scale;
  520|     42|      }
  521|     42|    }
  522|       |
  523|  7.95k|    (*ixheaacd_adjust_scale)(pp_overlap_buffer_real, pp_overlap_buffer_imag,
  524|  7.95k|                             start_band, end_band, 0, start_slot, delta_scale,
  525|  7.95k|                             low_pow_flag);
  526|  7.95k|  }
  527|  50.4k|}
ixheaacd_map_sineflags:
  533|  46.3k|{
  534|  46.3k|  WORD32 qmfband2, li, ui, i;
  535|  46.3k|  WORD32 low_subband_sec;
  536|  46.3k|  WORD32 oldflags;
  537|       |
  538|  46.3k|  low_subband_sec = (freq_band_table[0] << 1);
  539|       |
  540|  46.3k|  memset(sine_mapped, MAX_ENVELOPES, sizeof(WORD8) * MAX_FREQ_COEFFS);
  ------------------
  |  |   50|  46.3k|#define MAX_ENVELOPES 8
  ------------------
                memset(sine_mapped, MAX_ENVELOPES, sizeof(WORD8) * MAX_FREQ_COEFFS);
  ------------------
  |  |   51|  46.3k|#define MAX_FREQ_COEFFS 56
  ------------------
  541|       |
  542|   587k|  for (i = (num_sf_bands - 1); i >= 0; i--) {
  ------------------
  |  Branch (542:32): [True: 540k, False: 46.3k]
  ------------------
  543|   540k|    oldflags = *harm_flags_prev;
  544|   540k|    *harm_flags_prev++ = add_harmonics[i];
  545|       |
  546|   540k|    if (add_harmonics[i]) {
  ------------------
  |  Branch (546:9): [True: 24.7k, False: 516k]
  ------------------
  547|  24.7k|      li = freq_band_table[i];
  548|       |
  549|  24.7k|      ui = freq_band_table[i + 1];
  550|       |
  551|  24.7k|      qmfband2 = ((ui + li) - low_subband_sec) >> 1;
  552|       |
  553|  24.7k|      if (oldflags)
  ------------------
  |  Branch (553:11): [True: 2.63k, False: 22.0k]
  ------------------
  554|  2.63k|        sine_mapped[qmfband2] = 0;
  555|  22.0k|      else
  556|  22.0k|        sine_mapped[qmfband2] = (WORD8)transient_env;
  557|  24.7k|    }
  558|   540k|  }
  559|  46.3k|}
ixheaacd_map_34_params_to_20:
  561|  1.57k|VOID ixheaacd_map_34_params_to_20(WORD16 *params) {
  562|  1.57k|  params[0] = ixheaacd_divideby3(params[0] + params[0] + params[1]);
  563|  1.57k|  params[1] = ixheaacd_divideby3(params[1] + params[2] + params[2]);
  564|  1.57k|  params[2] = ixheaacd_divideby3(params[3] + params[3] + params[4]);
  565|  1.57k|  params[3] = ixheaacd_divideby3(params[4] + params[5] + params[5]);
  566|  1.57k|  params[4] = ixheaacd_divideby2(params[6] + params[7]);
  567|  1.57k|  params[5] = ixheaacd_divideby2(params[8] + params[9]);
  568|  1.57k|  params[6] = params[10];
  569|  1.57k|  params[7] = params[11];
  570|  1.57k|  params[8] = ixheaacd_divideby2(params[12] + params[13]);
  571|  1.57k|  params[9] = ixheaacd_divideby2(params[14] + params[15]);
  572|  1.57k|  params[10] = params[16];
  573|  1.57k|  params[11] = params[17];
  574|  1.57k|  params[12] = params[18];
  575|  1.57k|  params[13] = params[19];
  576|  1.57k|  params[14] = ixheaacd_divideby2(params[20] + params[21]);
  577|  1.57k|  params[15] = ixheaacd_divideby2(params[22] + params[23]);
  578|  1.57k|  params[16] = ixheaacd_divideby2(params[24] + params[25]);
  579|  1.57k|  params[17] = ixheaacd_divideby2(params[26] + params[27]);
  580|  1.57k|  params[18] = ixheaacd_divideby2(
  581|  1.57k|      ixheaacd_divideby2(params[28] + params[29] + params[30] + params[31]));
  582|  1.57k|  params[19] = ixheaacd_divideby2(params[32] + params[33]);
  583|  1.57k|}
ixheaacd_read_ps_data:
  589|  2.70k|{
  590|  2.70k|  WORD b, e, temp;
  591|  2.70k|  const WORD16 num_env_tab[4] = {0, 1, 2, 4};
  592|  2.70k|  WORD cnt_bits;
  593|  2.70k|  ia_huffman_data_type huffman_table, huffman_df_table, huffman_dt_table;
  594|  2.70k|  FLAG enable_ps_header;
  595|       |
  596|  2.70k|  if (!ptr_ps_dec) {
  ------------------
  |  Branch (596:7): [True: 0, False: 2.70k]
  ------------------
  597|      0|    return 0;
  598|      0|  }
  599|       |
  600|  2.70k|  cnt_bits = it_bit_buff->cnt_bits;
  601|       |
  602|  2.70k|  enable_ps_header = ixheaacd_read_bits_buf(it_bit_buff, 1);
  603|       |
  604|  2.70k|  if (enable_ps_header) {
  ------------------
  |  Branch (604:7): [True: 698, False: 2.00k]
  ------------------
  605|    698|    ptr_ps_dec->enable_iid = ixheaacd_read_bits_buf(it_bit_buff, 1);
  606|    698|    if (ptr_ps_dec->enable_iid) {
  ------------------
  |  Branch (606:9): [True: 581, False: 117]
  ------------------
  607|    581|      ptr_ps_dec->iid_mode = ixheaacd_read_bits_buf(it_bit_buff, 3);
  608|    581|    }
  609|       |
  610|    698|    if (ptr_ps_dec->iid_mode > 2) {
  ------------------
  |  Branch (610:9): [True: 443, False: 255]
  ------------------
  611|    443|      ptr_ps_dec->iid_quant = 1;
  612|    443|      ptr_ps_dec->iid_mode -= 3;
  613|    443|    } else {
  614|    255|      ptr_ps_dec->iid_quant = 0;
  615|    255|    }
  616|       |
  617|    698|    ptr_ps_dec->enable_icc = ixheaacd_read_bits_buf(it_bit_buff, 1);
  618|    698|    if (ptr_ps_dec->enable_icc) {
  ------------------
  |  Branch (618:9): [True: 411, False: 287]
  ------------------
  619|    411|      ptr_ps_dec->icc_mode = ixheaacd_read_bits_buf(it_bit_buff, 3);
  620|    411|    }
  621|       |
  622|    698|    ptr_ps_dec->enable_ext = ixheaacd_read_bits_buf(it_bit_buff, 1);
  623|       |
  624|    698|    if (ptr_ps_dec->icc_mode > 2) {
  ------------------
  |  Branch (624:9): [True: 338, False: 360]
  ------------------
  625|    338|      ptr_ps_dec->icc_mode -= 3;
  626|    338|      ptr_ps_dec->use_pca_rot_flg = 1;
  627|    360|    } else {
  628|    360|      ptr_ps_dec->use_pca_rot_flg = 0;
  629|    360|    }
  630|    698|    ptr_ps_dec->freq_res_ipd = ptr_ps_dec->iid_mode;
  631|    698|    if (ptr_ps_dec->freq_res_ipd > 2) {
  ------------------
  |  Branch (631:9): [True: 2, False: 696]
  ------------------
  632|      2|      return IA_FATAL_ERROR;
  ------------------
  |  |   25|      2|#define IA_FATAL_ERROR 0x80000000
  ------------------
  633|      2|    }
  634|    698|  }
  635|       |
  636|  2.70k|  ptr_ps_dec->use_34_st_bands = 0;
  637|  2.70k|  ptr_ps_dec->use_pca_rot_flg = 0;
  638|       |
  639|  2.70k|  if ((ptr_ps_dec->enable_iid && ptr_ps_dec->iid_mode > 2) ||
  ------------------
  |  Branch (639:8): [True: 1.20k, False: 1.49k]
  |  Branch (639:34): [True: 0, False: 1.20k]
  ------------------
  640|  2.70k|      (ptr_ps_dec->enable_icc && ptr_ps_dec->icc_mode > 2)) {
  ------------------
  |  Branch (640:8): [True: 958, False: 1.74k]
  |  Branch (640:34): [True: 389, False: 569]
  ------------------
  641|    389|    ptr_ps_dec->ps_data_present = 0;
  642|       |
  643|    389|    num_bits_left -= (cnt_bits - it_bit_buff->cnt_bits);
  644|       |
  645|  2.07k|    while (num_bits_left > 8) {
  ------------------
  |  Branch (645:12): [True: 1.68k, False: 389]
  ------------------
  646|  1.68k|      ixheaacd_read_bits_buf(it_bit_buff, 8);
  647|  1.68k|      num_bits_left -= 8;
  648|  1.68k|    }
  649|    389|    if (num_bits_left >= 0) {
  ------------------
  |  Branch (649:9): [True: 342, False: 47]
  ------------------
  650|    342|      ixheaacd_read_bits_buf(it_bit_buff, num_bits_left);
  651|    342|    }
  652|       |
  653|    389|    return (cnt_bits - it_bit_buff->cnt_bits);
  654|    389|  }
  655|       |
  656|  2.31k|  ptr_ps_dec->frame_class = (FLAG)ixheaacd_read_bits_buf(it_bit_buff, 1);
  657|       |
  658|  2.31k|  temp = ixheaacd_read_bits_buf(it_bit_buff, 2);
  659|       |
  660|  2.31k|  if (ptr_ps_dec->frame_class == 0) {
  ------------------
  |  Branch (660:7): [True: 1.80k, False: 507]
  ------------------
  661|  1.80k|    ptr_ps_dec->num_env = num_env_tab[temp];
  662|  1.80k|  } else {
  663|    507|    ptr_ps_dec->num_env = (((1 + temp) << 8) >> 8);
  664|       |
  665|  2.11k|    for (e = 1; e < ptr_ps_dec->num_env + 1; e++) {
  ------------------
  |  Branch (665:17): [True: 1.61k, False: 507]
  ------------------
  666|  1.61k|      ptr_ps_dec->border_position[e] =
  667|  1.61k|          (((ixheaacd_read_bits_buf(it_bit_buff, 5) + 1) << 8) >> 8);
  668|  1.61k|    }
  669|    507|  }
  670|       |
  671|  2.31k|  if (ptr_ps_dec->enable_iid) {
  ------------------
  |  Branch (671:7): [True: 843, False: 1.46k]
  ------------------
  672|    843|    if (ptr_ps_dec->iid_quant) {
  ------------------
  |  Branch (672:9): [True: 680, False: 163]
  ------------------
  673|    680|      huffman_df_table = (ia_huffman_data_type)&ps_tables_ptr->huff_iid_df_fine;
  674|    680|      huffman_dt_table = (ia_huffman_data_type)&ps_tables_ptr->huff_iid_dt_fine;
  675|    680|    } else {
  676|    163|      huffman_df_table = (ia_huffman_data_type)&ps_tables_ptr->huff_iid_df;
  677|    163|      huffman_dt_table = (ia_huffman_data_type)&ps_tables_ptr->huff_iid_dt;
  678|    163|    }
  679|       |
  680|  2.17k|    for (e = 0; e < ptr_ps_dec->num_env; e++) {
  ------------------
  |  Branch (680:17): [True: 1.33k, False: 843]
  ------------------
  681|  1.33k|      ptr_ps_dec->iid_dt[e] = (FLAG)ixheaacd_read_bits_buf(it_bit_buff, 1);
  682|       |
  683|  1.33k|      if (ptr_ps_dec->iid_dt[e]) {
  ------------------
  |  Branch (683:11): [True: 703, False: 631]
  ------------------
  684|    703|        huffman_table = huffman_dt_table;
  685|    703|      } else {
  686|    631|        huffman_table = huffman_df_table;
  687|    631|      }
  688|       |
  689|  37.1k|      for (b = 0; b < ixheaacd_num_bands[ptr_ps_dec->iid_mode]; b++) {
  ------------------
  |  Branch (689:19): [True: 35.7k, False: 1.33k]
  ------------------
  690|  35.7k|        ptr_ps_dec->iid_par_table[e][b] =
  691|  35.7k|            ixheaacd_ssc_huff_dec(huffman_table, it_bit_buff);
  692|  35.7k|      }
  693|  1.33k|    }
  694|    843|  }
  695|       |
  696|  2.31k|  if (ptr_ps_dec->enable_icc) {
  ------------------
  |  Branch (696:7): [True: 556, False: 1.75k]
  ------------------
  697|    556|    huffman_df_table = (ia_huffman_data_type)&ps_tables_ptr->huff_icc_df;
  698|    556|    huffman_dt_table = (ia_huffman_data_type)&ps_tables_ptr->huff_icc_dt;
  699|       |
  700|  1.90k|    for (e = 0; e < ptr_ps_dec->num_env; e++) {
  ------------------
  |  Branch (700:17): [True: 1.35k, False: 556]
  ------------------
  701|  1.35k|      ptr_ps_dec->icc_dt[e] = ixheaacd_read_bits_buf(it_bit_buff, 1);
  702|       |
  703|  1.35k|      if (ptr_ps_dec->icc_dt[e]) {
  ------------------
  |  Branch (703:11): [True: 449, False: 901]
  ------------------
  704|    449|        huffman_table = huffman_dt_table;
  705|    901|      } else {
  706|    901|        huffman_table = huffman_df_table;
  707|    901|      }
  708|       |
  709|  16.6k|      for (b = 0; b < ixheaacd_num_bands[ptr_ps_dec->icc_mode]; b++) {
  ------------------
  |  Branch (709:19): [True: 15.3k, False: 1.35k]
  ------------------
  710|  15.3k|        ptr_ps_dec->icc_par_table[e][b] = ixheaacd_ssc_huff_dec(huffman_table, it_bit_buff);
  711|  15.3k|      }
  712|  1.35k|    }
  713|    556|  }
  714|       |
  715|  2.31k|  if (ptr_ps_dec->enable_ext) {
  ------------------
  |  Branch (715:7): [True: 342, False: 1.96k]
  ------------------
  716|    342|    WORD32 cnt;
  717|    342|    if (it_bit_buff->cnt_bits < 4)
  ------------------
  |  Branch (717:9): [True: 3, False: 339]
  ------------------
  718|      3|      cnt = ixheaacd_read_bits_buf(it_bit_buff, it_bit_buff->cnt_bits);
  719|    339|    else
  720|    339|      cnt = ixheaacd_read_bits_buf(it_bit_buff, 4);
  721|       |
  722|    342|    if (cnt == 15) {
  ------------------
  |  Branch (722:9): [True: 60, False: 282]
  ------------------
  723|     60|      cnt += ixheaacd_read_bits_buf(it_bit_buff, 8);
  724|     60|    }
  725|  14.4k|    while (cnt--) {
  ------------------
  |  Branch (725:12): [True: 14.0k, False: 342]
  ------------------
  726|  14.0k|      ixheaacd_read_bits_buf(it_bit_buff, 8);
  727|  14.0k|    }
  728|    342|  }
  729|       |
  730|  2.31k|  ptr_ps_dec->ps_data_present = 1;
  731|       |
  732|  2.31k|  return (cnt_bits - it_bit_buff->cnt_bits);
  733|  2.70k|}
ixheaacd_invfilt_level_emphasis:
  738|  46.3k|                                     WORD32 *bw_array) {
  739|  46.3k|  WORD32 i;
  740|  46.3k|  WORD32 accu;
  741|  46.3k|  WORD16 w1, w2;
  742|       |
  743|   148k|  for (i = 0; i < num_if_bands; i++) {
  ------------------
  |  Branch (743:15): [True: 102k, False: 46.3k]
  ------------------
  744|   102k|    bw_array[i] =
  745|   102k|        ixheaacd_inew_bw_table[inv_filt_mode_prev[i]][inv_filt_mode[i]];
  746|       |
  747|   102k|    if (bw_array[i] < ptr_hf_gen_str->bw_array_prev[i]) {
  ------------------
  |  Branch (747:9): [True: 9.45k, False: 92.9k]
  ------------------
  748|  9.45k|      w1 = 0x6000;
  749|  9.45k|      w2 = 0x2000;
  750|  92.9k|    } else {
  751|  92.9k|      w1 = 0x7400;
  752|  92.9k|      w2 = 0x0c00;
  753|  92.9k|    }
  754|   102k|    accu = ixheaac_add32(
  755|   102k|        ixheaac_mult32x16in32_shl(bw_array[i], w1),
  756|   102k|        ixheaac_mult32x16in32_shl(ptr_hf_gen_str->bw_array_prev[i], w2));
  757|       |
  758|   102k|    if (accu < 0x02000000) {
  ------------------
  |  Branch (758:9): [True: 70.4k, False: 31.9k]
  ------------------
  759|  70.4k|      accu = 0;
  760|  70.4k|    }
  761|       |
  762|   102k|    if (accu >= 0x7f800000) {
  ------------------
  |  Branch (762:9): [True: 0, False: 102k]
  ------------------
  763|      0|      accu = 0x7f800000;
  764|      0|    }
  765|   102k|    bw_array[i] = accu;
  766|   102k|  }
  767|  46.3k|}
ixheaacd_polyfit:
  898|  22.6k|void ixheaacd_polyfit(WORD32 n, FLOAT32 y[], FLOAT32 p[]) {
  899|  22.6k|  WORD32 i, j, k;
  900|  22.6k|  FLOAT32 a[MAXDEG + 1][MAXDEG + 1];
  901|  22.6k|  FLOAT32 b[MAXDEG + 1];
  902|  22.6k|  FLOAT32 v[2 * MAXDEG + 1];
  903|       |
  904|   113k|  for (i = 0; i <= MAXDEG; i++) {
  ------------------
  |  |  158|   113k|#define MAXDEG 3
  ------------------
  |  Branch (904:15): [True: 90.6k, False: 22.6k]
  ------------------
  905|  90.6k|    b[i] = 0.0f;
  906|   453k|    for (j = 0; j <= MAXDEG; j++) {
  ------------------
  |  |  158|   453k|#define MAXDEG 3
  ------------------
  |  Branch (906:17): [True: 362k, False: 90.6k]
  ------------------
  907|   362k|      a[i][j] = 0.0f;
  908|   362k|    }
  909|  90.6k|  }
  910|       |
  911|   409k|  for (k = 0; k < n; k++) {
  ------------------
  |  Branch (911:15): [True: 386k, False: 22.6k]
  ------------------
  912|   386k|    v[0] = 1.0;
  913|  2.70M|    for (i = 1; i <= 2 * MAXDEG; i++) {
  ------------------
  |  |  158|  2.70M|#define MAXDEG 3
  ------------------
  |  Branch (913:17): [True: 2.32M, False: 386k]
  ------------------
  914|  2.32M|      v[i] = k * v[i - 1];
  915|  2.32M|    }
  916|       |
  917|  1.93M|    for (i = 0; i <= MAXDEG; i++) {
  ------------------
  |  |  158|  1.93M|#define MAXDEG 3
  ------------------
  |  Branch (917:17): [True: 1.54M, False: 386k]
  ------------------
  918|  1.54M|      b[i] += v[MAXDEG - i] * y[k];
  ------------------
  |  |  158|  1.54M|#define MAXDEG 3
  ------------------
  919|  7.73M|      for (j = 0; j <= MAXDEG; j++) {
  ------------------
  |  |  158|  7.73M|#define MAXDEG 3
  ------------------
  |  Branch (919:19): [True: 6.18M, False: 1.54M]
  ------------------
  920|  6.18M|        a[i][j] += v[2 * MAXDEG - i - j];
  ------------------
  |  |  158|  6.18M|#define MAXDEG 3
  ------------------
  921|  6.18M|      }
  922|  1.54M|    }
  923|   386k|  }
  924|       |
  925|  22.6k|  ixheaacd_gausssolve(MAXDEG + 1, a, b, p);
  ------------------
  |  |  158|  22.6k|#define MAXDEG 3
  ------------------
  926|  22.6k|}
ixheaacd_pre_processing:
  931|  22.6k|                             WORD32 start_sample, WORD32 end_sample) {
  932|  22.6k|  WORD32 k, i;
  933|  22.6k|  FLOAT32 poly_coeff[4];
  934|  22.6k|  FLOAT32 mean_enrg = 0;
  935|  22.6k|  FLOAT32 low_env_slope[64];
  936|  22.6k|  FLOAT32 low_env[64] = {0};
  937|  22.6k|  FLOAT32 a0;
  938|  22.6k|  FLOAT32 a1;
  939|  22.6k|  FLOAT32 a2;
  940|  22.6k|  FLOAT32 a3;
  941|       |
  942|  22.6k|  if (num_bands != 0 && end_sample != start_sample) {
  ------------------
  |  Branch (942:7): [True: 22.6k, False: 0]
  |  Branch (942:25): [True: 22.4k, False: 177]
  ------------------
  943|   405k|    for (k = 0; k < num_bands; k++) {
  ------------------
  |  Branch (943:17): [True: 383k, False: 22.4k]
  ------------------
  944|   383k|      FLOAT32 temp = 0;
  945|  12.7M|      for (i = start_sample; i < end_sample; i++) {
  ------------------
  |  Branch (945:30): [True: 12.3M, False: 383k]
  ------------------
  946|  12.3M|        temp += ptr_src_buf_real[i][k] * ptr_src_buf_real[i][k] +
  947|  12.3M|                ptr_src_buf_imag[i][k] * ptr_src_buf_imag[i][k];
  948|  12.3M|      }
  949|   383k|      temp /= (end_sample - start_sample);
  950|   383k|      low_env[k] = (FLOAT32)(10 * log10(temp + 1));
  951|   383k|      mean_enrg = mean_enrg + low_env[k];
  952|   383k|    }
  953|  22.4k|    mean_enrg /= num_bands;
  954|  22.4k|  }
  955|       |
  956|  22.6k|  ixheaacd_polyfit(num_bands, low_env, poly_coeff);
  957|       |
  958|  22.6k|  a0 = poly_coeff[0];
  959|  22.6k|  a1 = poly_coeff[1];
  960|  22.6k|  a2 = poly_coeff[2];
  961|  22.6k|  a3 = poly_coeff[3];
  962|   409k|  for (k = 0; k < num_bands; k++) {
  ------------------
  |  Branch (962:15): [True: 386k, False: 22.6k]
  ------------------
  963|   386k|    FLOAT32 x_low_l = (FLOAT32)k;
  964|   386k|    FLOAT32 low_env_slope_l = a3;
  965|   386k|    low_env_slope_l = low_env_slope_l + a2 * x_low_l;
  966|       |
  967|   386k|    x_low_l = x_low_l * x_low_l;
  968|   386k|    low_env_slope_l = low_env_slope_l + a1 * x_low_l;
  969|       |
  970|   386k|    x_low_l = x_low_l * (FLOAT32)k;
  971|   386k|    low_env_slope_l = low_env_slope_l + a0 * x_low_l;
  972|       |
  973|   386k|    low_env_slope[k] = low_env_slope_l;
  974|   386k|  }
  975|       |
  976|   409k|  for (i = 0; i < num_bands; i++) {
  ------------------
  |  Branch (976:15): [True: 386k, False: 22.6k]
  ------------------
  977|   386k|    gain_vector[i] = (FLOAT32)pow(10, (mean_enrg - low_env_slope[i]) / 20.0f);
  978|   386k|  }
  979|  22.6k|}
ixheaacd_generate_hf:
  987|   222k|                            WORD32 time_slots, WORD32 ec_flag) {
  988|   222k|  WORD32 bw_index, i, k, k2, patch = 0;
  989|   222k|  WORD32 co_var_len;
  990|   222k|  WORD32 start_sample, end_sample, goal_sb;
  991|   222k|  WORD32 sb, source_start_band, patch_stride, num_bands_in_patch;
  992|   222k|  WORD32 hbe_flag = ptr_header_data->hbe_flag;
  993|   222k|  FLOAT32 a0r, a0i, a1r, a1i;
  994|   222k|  FLOAT32 bw_array[MAX_NUM_PATCHES] = {0};
  995|       |
  996|   222k|  ia_auto_corr_ele_struct str_auto_corr;
  997|       |
  998|   222k|  WORD16 *ptr_invf_band_tbl =
  999|   222k|      &ptr_header_data->pstr_freq_band_data
 1000|   222k|           ->freq_band_tbl_noise[1];  // offest 1 used as base address of
 1001|       |                                      // ptr_invf_band_tbl
 1002|   222k|  WORD32 num_if_bands = ptr_header_data->pstr_freq_band_data->num_nf_bands;
 1003|   222k|  WORD32 sub_band_start = ptr_header_data->pstr_freq_band_data->sub_band_start;
 1004|   222k|  WORD16 *f_master_tbl = ptr_header_data->pstr_freq_band_data->f_master_tbl;
 1005|   222k|  WORD32 num_mf_bands = ptr_header_data->pstr_freq_band_data->num_mf_bands;
 1006|   222k|  WORD32 *inv_filt_mode = ptr_frame_data->sbr_invf_mode;
 1007|   222k|  WORD32 *inv_filt_mode_prev = ptr_frame_data->sbr_invf_mode_prev;
 1008|   222k|  WORD32 sbr_patching_mode = ptr_frame_data->sbr_patching_mode;
 1009|   222k|  ia_frame_info_struct *p_frame_info = &ptr_frame_data->str_frame_info_details;
 1010|   222k|  WORD32 pre_proc_flag = ptr_header_data->pre_proc_flag;
 1011|   222k|  WORD32 is_usf_4 = ptr_header_data->is_usf_4;
 1012|   222k|  WORD32 fs = ptr_header_data->out_sampling_freq;
 1013|   222k|  WORD32 cov_count;
 1014|   222k|  WORD32 lsb = f_master_tbl[0];
 1015|   222k|  WORD32 usb = f_master_tbl[num_mf_bands];
 1016|   222k|  WORD32 xover_offset = sub_band_start - f_master_tbl[0];
 1017|       |
 1018|   222k|  FLOAT32 bw = 0.0f;
 1019|   222k|  FLOAT32 fac = 0.0f;
 1020|       |
 1021|   222k|  FLOAT32 gain;
 1022|   222k|  FLOAT32 gain_vector[64];
 1023|       |
 1024|   222k|  WORD32 slope_length = 0;
 1025|   222k|  WORD32 first_slot_offset = p_frame_info->border_vec[0];
 1026|   222k|  WORD32 end_slot_offs = 0;
 1027|       |
 1028|   222k|  FLOAT32 *bw_array_prev = ptr_frame_data->bw_array_prev;
 1029|       |
 1030|   222k|  end_slot_offs = p_frame_info->border_vec[p_frame_info->num_env] - 16;
 1031|       |
 1032|   222k|  if (ldmps_present == 1)
  ------------------
  |  Branch (1032:7): [True: 4.06k, False: 218k]
  ------------------
 1033|  4.06k|    end_slot_offs =
 1034|  4.06k|        p_frame_info->border_vec[p_frame_info->num_env] - time_slots;
 1035|       |
 1036|   222k|  if (is_usf_4) {
  ------------------
  |  Branch (1036:7): [True: 21.8k, False: 200k]
  ------------------
 1037|  21.8k|    start_sample = first_slot_offset * 4;
 1038|  21.8k|    end_sample = 64 + end_slot_offs * 4;
 1039|  21.8k|    co_var_len = 76;
 1040|   200k|  } else {
 1041|   200k|    start_sample = first_slot_offset * 2;
 1042|   200k|    end_sample = 32 + end_slot_offs * 2;
 1043|   200k|    co_var_len = 38;
 1044|   200k|  }
 1045|       |
 1046|   222k|  if (ldmps_present == 1) {
  ------------------
  |  Branch (1046:7): [True: 4.06k, False: 218k]
  ------------------
 1047|  4.06k|    start_sample = 0;
 1048|  4.06k|    end_sample = time_slots;
 1049|  4.06k|    co_var_len = time_slots;
 1050|  4.06k|  }
 1051|       |
 1052|   222k|  if (pre_proc_flag) {
  ------------------
  |  Branch (1052:7): [True: 22.6k, False: 199k]
  ------------------
 1053|  22.6k|    ixheaacd_pre_processing(ptr_src_buf_real, ptr_src_buf_imag, gain_vector,
 1054|  22.6k|                            f_master_tbl[0], start_sample, end_sample);
 1055|  22.6k|  }
 1056|       |
 1057|   222k|  ixheaacd_esbr_chirp_fac_calc(inv_filt_mode, inv_filt_mode_prev, num_if_bands,
 1058|   222k|                               bw_array, bw_array_prev);
 1059|       |
 1060|  7.96M|  for (i = start_sample; i < end_sample; i++) {
  ------------------
  |  Branch (1060:26): [True: 7.73M, False: 222k]
  ------------------
 1061|  7.73M|    memset(ptr_dst_buf_real[i] + usb, 0, (64 - usb) * sizeof(FLOAT32));
 1062|  7.73M|    memset(ptr_dst_buf_imag[i] + usb, 0, (64 - usb) * sizeof(FLOAT32));
 1063|  7.73M|  }
 1064|       |
 1065|   222k|  if (sbr_patching_mode || !hbe_flag) {
  ------------------
  |  Branch (1065:7): [True: 53.4k, False: 169k]
  |  Branch (1065:28): [True: 77.3k, False: 91.6k]
  ------------------
 1066|   130k|    WORD32 flag_break = 0;
 1067|   130k|    FLOAT32 alpha_real[64][2] = {{0}}, alpha_imag[64][2] = {{0}};
 1068|   130k|    if (ptr_frame_data->mps_sbr_flag) {
  ------------------
  |  Branch (1068:9): [True: 53.0k, False: 77.7k]
  ------------------
 1069|  53.0k|      cov_count = (f_master_tbl[0] < ptr_frame_data->cov_count)
  ------------------
  |  Branch (1069:19): [True: 50.4k, False: 2.66k]
  ------------------
 1070|  53.0k|                      ? f_master_tbl[0]
 1071|  53.0k|                      : ptr_frame_data->cov_count;
 1072|  77.7k|    } else {
 1073|  77.7k|      cov_count = f_master_tbl[0];
 1074|  77.7k|    }
 1075|       |
 1076|  2.08M|    for (k = 1; k < cov_count; k++) {
  ------------------
  |  Branch (1076:17): [True: 1.95M, False: 130k]
  ------------------
 1077|  1.95M|      ixheaacd_esbr_calc_co_variance(&str_auto_corr, &ptr_src_buf_real[0],
 1078|  1.95M|                                     &ptr_src_buf_imag[0], k, co_var_len);
 1079|  1.95M|      if (str_auto_corr.det == 0.0f) {
  ------------------
  |  Branch (1079:11): [True: 799k, False: 1.15M]
  ------------------
 1080|   799k|        alpha_real[k][1] = alpha_imag[k][1] = 0;
 1081|  1.15M|      } else {
 1082|  1.15M|        fac = 1.0f / str_auto_corr.det;
 1083|  1.15M|        alpha_real[k][1] =
 1084|  1.15M|            (str_auto_corr.phi_0_1_real * str_auto_corr.phi_1_2_real -
 1085|  1.15M|             str_auto_corr.phi_0_1_imag * str_auto_corr.phi_1_2_imag -
 1086|  1.15M|             str_auto_corr.phi_0_2_real * str_auto_corr.phi_1_1) *
 1087|  1.15M|            fac;
 1088|  1.15M|        alpha_imag[k][1] =
 1089|  1.15M|            (str_auto_corr.phi_0_1_imag * str_auto_corr.phi_1_2_real +
 1090|  1.15M|             str_auto_corr.phi_0_1_real * str_auto_corr.phi_1_2_imag -
 1091|  1.15M|             str_auto_corr.phi_0_2_imag * str_auto_corr.phi_1_1) *
 1092|  1.15M|            fac;
 1093|  1.15M|      }
 1094|       |
 1095|  1.95M|      if (str_auto_corr.phi_1_1 == 0) {
  ------------------
  |  Branch (1095:11): [True: 798k, False: 1.15M]
  ------------------
 1096|   798k|        alpha_real[k][0] = alpha_imag[k][0] = 0;
 1097|  1.15M|      } else {
 1098|  1.15M|        fac = 1.0f / str_auto_corr.phi_1_1;
 1099|  1.15M|        alpha_real[k][0] = -(str_auto_corr.phi_0_1_real +
 1100|  1.15M|                             alpha_real[k][1] * str_auto_corr.phi_1_2_real +
 1101|  1.15M|                             alpha_imag[k][1] * str_auto_corr.phi_1_2_imag) *
 1102|  1.15M|                           fac;
 1103|  1.15M|        alpha_imag[k][0] = -(str_auto_corr.phi_0_1_imag +
 1104|  1.15M|                             alpha_imag[k][1] * str_auto_corr.phi_1_2_real -
 1105|  1.15M|                             alpha_real[k][1] * str_auto_corr.phi_1_2_imag) *
 1106|  1.15M|                           fac;
 1107|  1.15M|      }
 1108|       |
 1109|  1.95M|      if ((alpha_real[k][0] * alpha_real[k][0] +
  ------------------
  |  Branch (1109:11): [True: 1.41k, False: 1.95M]
  ------------------
 1110|  1.95M|               alpha_imag[k][0] * alpha_imag[k][0] >=
 1111|  1.95M|           16.0f) ||
 1112|  1.95M|          (alpha_real[k][1] * alpha_real[k][1] +
  ------------------
  |  Branch (1112:11): [True: 1.88k, False: 1.95M]
  ------------------
 1113|  1.95M|               alpha_imag[k][1] * alpha_imag[k][1] >=
 1114|  1.95M|           16.0f)) {
 1115|  3.29k|        alpha_real[k][0] = 0.0f;
 1116|  3.29k|        alpha_imag[k][0] = 0.0f;
 1117|  3.29k|        alpha_real[k][1] = 0.0f;
 1118|  3.29k|        alpha_imag[k][1] = 0.0f;
 1119|  3.29k|      }
 1120|  1.95M|    }
 1121|       |
 1122|   130k|    goal_sb = (WORD32)(2.048e6f / fs + 0.5f);
 1123|   130k|    {
 1124|   130k|      WORD32 index;
 1125|   130k|      if (goal_sb < f_master_tbl[num_mf_bands]) {
  ------------------
  |  Branch (1125:11): [True: 6.33k, False: 124k]
  ------------------
 1126|  55.2k|        for (index = 0; (f_master_tbl[index] < goal_sb); index++)
  ------------------
  |  Branch (1126:25): [True: 48.9k, False: 6.33k]
  ------------------
 1127|  48.9k|          ;
 1128|  6.33k|        goal_sb = f_master_tbl[index];
 1129|   124k|      } else {
 1130|   124k|        goal_sb = f_master_tbl[num_mf_bands];
 1131|   124k|      }
 1132|   130k|    }
 1133|       |
 1134|   130k|    source_start_band = xover_offset + 1;
 1135|   130k|    sb = lsb + xover_offset;
 1136|       |
 1137|   130k|    patch = 0;
 1138|   491k|    while (sb < usb) {
  ------------------
  |  Branch (1138:12): [True: 400k, False: 90.4k]
  ------------------
 1139|   400k|      if (MAX_NUM_PATCHES <= patch) {
  ------------------
  |  |   23|   400k|#define MAX_NUM_PATCHES 6
  ------------------
  |  Branch (1139:11): [True: 28, False: 400k]
  ------------------
 1140|     28|        if (ec_flag) {
  ------------------
  |  Branch (1140:13): [True: 0, False: 28]
  ------------------
 1141|      0|          break;
 1142|     28|        } else {
 1143|     28|          return -1;
 1144|     28|        }
 1145|     28|      }
 1146|   400k|      ptr_frame_data->patch_param.start_subband[patch] = sb;
 1147|   400k|      num_bands_in_patch = goal_sb - sb;
 1148|       |
 1149|   400k|      if (num_bands_in_patch >= lsb - source_start_band) {
  ------------------
  |  Branch (1149:11): [True: 279k, False: 120k]
  ------------------
 1150|   279k|        patch_stride = sb - source_start_band;
 1151|   279k|        patch_stride = patch_stride & ~1;
 1152|   279k|        num_bands_in_patch = lsb - (sb - patch_stride);
 1153|   279k|        num_bands_in_patch =
 1154|   279k|            ixheaacd_find_closest_entry(sb + num_bands_in_patch, f_master_tbl,
 1155|   279k|                                        (WORD16)(num_mf_bands), 0) -
 1156|   279k|            (WORD32)(sb);
 1157|   279k|      }
 1158|       |
 1159|   400k|      patch_stride = num_bands_in_patch + sb - lsb;
 1160|   400k|      patch_stride = (patch_stride + 1) & ~1;
 1161|       |
 1162|   400k|      source_start_band = 1;
 1163|       |
 1164|   400k|      if (goal_sb - (sb + num_bands_in_patch) < 3) {
  ------------------
  |  Branch (1164:11): [True: 171k, False: 228k]
  ------------------
 1165|   171k|        goal_sb = usb;
 1166|   171k|      }
 1167|       |
 1168|   400k|      if ((num_bands_in_patch < 3) && (patch > 0) &&
  ------------------
  |  Branch (1168:11): [True: 62.9k, False: 337k]
  |  Branch (1168:39): [True: 41.3k, False: 21.6k]
  ------------------
 1169|  41.3k|          (sb + num_bands_in_patch == usb)) {
  ------------------
  |  Branch (1169:11): [True: 39.0k, False: 2.30k]
  ------------------
 1170|  1.30M|        for (i = start_sample + slope_length; i < end_sample + slope_length;
  ------------------
  |  Branch (1170:47): [True: 1.26M, False: 39.0k]
  ------------------
 1171|  1.26M|             i++) {
 1172|  3.78M|          for (k2 = sb; k2 < sb + num_bands_in_patch; k2++) {
  ------------------
  |  Branch (1172:25): [True: 2.52M, False: 1.26M]
  ------------------
 1173|  2.52M|            ptr_dst_buf_real[i][k2] = 0.0f;
 1174|  2.52M|            ptr_dst_buf_imag[i][k2] = 0.0f;
 1175|  2.52M|          }
 1176|  1.26M|        }
 1177|       |
 1178|  39.0k|        break;
 1179|  39.0k|      }
 1180|       |
 1181|   361k|      if (num_bands_in_patch < 0 && flag_break == 1) {
  ------------------
  |  Branch (1181:11): [True: 11.1k, False: 350k]
  |  Branch (1181:37): [True: 1.28k, False: 9.90k]
  ------------------
 1182|  1.28k|        break;
 1183|  1.28k|      }
 1184|       |
 1185|   360k|      if (num_bands_in_patch < 0) {
  ------------------
  |  Branch (1185:11): [True: 9.90k, False: 350k]
  ------------------
 1186|  9.90k|        flag_break = 1;
 1187|  9.90k|        continue;
 1188|   350k|      } else {
 1189|   350k|        flag_break = 0;
 1190|   350k|      }
 1191|       |
 1192|  3.64M|      for (k2 = sb; k2 < sb + num_bands_in_patch; k2++) {
  ------------------
  |  Branch (1192:21): [True: 3.29M, False: 350k]
  ------------------
 1193|  3.29M|        k = k2 - patch_stride;
 1194|  3.29M|        bw_index = 0;
 1195|  7.89M|        while (k2 >= ptr_invf_band_tbl[bw_index]) {
  ------------------
  |  Branch (1195:16): [True: 4.59M, False: 3.29M]
  ------------------
 1196|  4.59M|          bw_index++;
 1197|  4.59M|          if (bw_index >= MAX_NOISE_COEFFS) {
  ------------------
  |  |   45|  4.59M|#define MAX_NOISE_COEFFS 5
  ------------------
  |  Branch (1197:15): [True: 0, False: 4.59M]
  ------------------
 1198|      0|            if (ec_flag) {
  ------------------
  |  Branch (1198:17): [True: 0, False: 0]
  ------------------
 1199|      0|              bw_index = MAX_NOISE_COEFFS - 1;
  ------------------
  |  |   45|      0|#define MAX_NOISE_COEFFS 5
  ------------------
 1200|      0|              break;
 1201|      0|            } else
 1202|      0|              return -1;
 1203|      0|          }
 1204|  4.59M|        }
 1205|       |
 1206|  3.29M|        if (bw_index >= MAX_NUM_PATCHES) {
  ------------------
  |  |   23|  3.29M|#define MAX_NUM_PATCHES 6
  ------------------
  |  Branch (1206:13): [True: 0, False: 3.29M]
  ------------------
 1207|      0|          if (ec_flag)
  ------------------
  |  Branch (1207:15): [True: 0, False: 0]
  ------------------
 1208|      0|            bw_index = MAX_NUM_PATCHES - 1;
  ------------------
  |  |   23|      0|#define MAX_NUM_PATCHES 6
  ------------------
 1209|      0|          else
 1210|      0|            return -1;
 1211|      0|        }
 1212|  3.29M|        bw = bw_array[bw_index];
 1213|       |
 1214|  3.29M|        a0r = bw * alpha_real[k][0];
 1215|  3.29M|        a0i = bw * alpha_imag[k][0];
 1216|  3.29M|        bw *= bw;
 1217|  3.29M|        a1r = bw * alpha_real[k][1];
 1218|  3.29M|        a1i = bw * alpha_imag[k][1];
 1219|       |
 1220|  3.29M|        if (pre_proc_flag) {
  ------------------
  |  Branch (1220:13): [True: 354k, False: 2.94M]
  ------------------
 1221|   354k|          gain = gain_vector[k];
 1222|  2.94M|        } else {
 1223|  2.94M|          gain = 1.0f;
 1224|  2.94M|        }
 1225|       |
 1226|   108M|        for (i = start_sample + slope_length; i < end_sample + slope_length;
  ------------------
  |  Branch (1226:47): [True: 105M, False: 3.29M]
  ------------------
 1227|   105M|             i++) {
 1228|   105M|          ptr_dst_buf_real[i][k2] = ptr_src_buf_real[i][k] * gain;
 1229|       |
 1230|   105M|          ptr_dst_buf_imag[i][k2] = ptr_src_buf_imag[i][k] * gain;
 1231|       |
 1232|   105M|          if (bw > 0.0f) {
  ------------------
  |  Branch (1232:15): [True: 69.7M, False: 35.6M]
  ------------------
 1233|  69.7M|            ptr_dst_buf_real[i][k2] += (a0r * ptr_src_buf_real[i - 1][k] -
 1234|  69.7M|                                        a0i * ptr_src_buf_imag[i - 1][k] +
 1235|  69.7M|                                        a1r * ptr_src_buf_real[i - 2][k] -
 1236|  69.7M|                                        a1i * ptr_src_buf_imag[i - 2][k]) *
 1237|  69.7M|                                       gain;
 1238|  69.7M|            ptr_dst_buf_imag[i][k2] += (a0i * ptr_src_buf_real[i - 1][k] +
 1239|  69.7M|                                        a0r * ptr_src_buf_imag[i - 1][k] +
 1240|  69.7M|                                        a1i * ptr_src_buf_real[i - 2][k] +
 1241|  69.7M|                                        a1r * ptr_src_buf_imag[i - 2][k]) *
 1242|  69.7M|                                       gain;
 1243|  69.7M|          }
 1244|   105M|        }
 1245|  3.29M|      }
 1246|   350k|      sb += num_bands_in_patch;
 1247|   350k|      patch++;
 1248|   350k|    }
 1249|   130k|  }
 1250|       |
 1251|   222k|  if (NULL != ptr_ph_vocod_buf_real && NULL != ptr_ph_vocod_buf_imag) {
  ------------------
  |  Branch (1251:7): [True: 143k, False: 79.1k]
  |  Branch (1251:40): [True: 143k, False: 0]
  ------------------
 1252|   143k|    if (hbe_flag && !sbr_patching_mode) {
  ------------------
  |  Branch (1252:9): [True: 106k, False: 36.6k]
  |  Branch (1252:21): [True: 65.6k, False: 41.0k]
  ------------------
 1253|  65.6k|      FLOAT32 alpha_real[2], alpha_imag[2];
 1254|       |
 1255|  65.6k|      bw_index = 0, patch = 1;
 1256|       |
 1257|  1.83M|      for (k2 = sub_band_start; k2 < f_master_tbl[num_mf_bands]; k2++) {
  ------------------
  |  Branch (1257:33): [True: 1.76M, False: 65.6k]
  ------------------
 1258|  1.76M|        ixheaacd_esbr_calc_co_variance(&str_auto_corr, &ptr_ph_vocod_buf_real[0],
 1259|  1.76M|                                       &ptr_ph_vocod_buf_imag[0], k2, co_var_len);
 1260|       |
 1261|  1.76M|        if (str_auto_corr.det == 0.0f) {
  ------------------
  |  Branch (1261:13): [True: 717k, False: 1.04M]
  ------------------
 1262|   717k|          alpha_real[1] = alpha_imag[1] = 0;
 1263|  1.04M|        } else {
 1264|  1.04M|          fac = 1.0f / str_auto_corr.det;
 1265|  1.04M|          alpha_real[1] = (str_auto_corr.phi_0_1_real * str_auto_corr.phi_1_2_real -
 1266|  1.04M|                           str_auto_corr.phi_0_1_imag * str_auto_corr.phi_1_2_imag -
 1267|  1.04M|                           str_auto_corr.phi_0_2_real * str_auto_corr.phi_1_1) *
 1268|  1.04M|                          fac;
 1269|  1.04M|          alpha_imag[1] = (str_auto_corr.phi_0_1_imag * str_auto_corr.phi_1_2_real +
 1270|  1.04M|                           str_auto_corr.phi_0_1_real * str_auto_corr.phi_1_2_imag -
 1271|  1.04M|                           str_auto_corr.phi_0_2_imag * str_auto_corr.phi_1_1) *
 1272|  1.04M|                          fac;
 1273|  1.04M|        }
 1274|       |
 1275|  1.76M|        if (str_auto_corr.phi_1_1 == 0) {
  ------------------
  |  Branch (1275:13): [True: 709k, False: 1.05M]
  ------------------
 1276|   709k|          alpha_real[0] = alpha_imag[0] = 0;
 1277|  1.05M|        } else {
 1278|  1.05M|          fac = 1.0f / str_auto_corr.phi_1_1;
 1279|  1.05M|          alpha_real[0] =
 1280|  1.05M|              -(str_auto_corr.phi_0_1_real + alpha_real[1] * str_auto_corr.phi_1_2_real +
 1281|  1.05M|                alpha_imag[1] * str_auto_corr.phi_1_2_imag) *
 1282|  1.05M|              fac;
 1283|  1.05M|          alpha_imag[0] =
 1284|  1.05M|              -(str_auto_corr.phi_0_1_imag + alpha_imag[1] * str_auto_corr.phi_1_2_real -
 1285|  1.05M|                alpha_real[1] * str_auto_corr.phi_1_2_imag) *
 1286|  1.05M|              fac;
 1287|  1.05M|        }
 1288|       |
 1289|  1.76M|        if (alpha_real[0] * alpha_real[0] + alpha_imag[0] * alpha_imag[0] >= 16.0f ||
  ------------------
  |  Branch (1289:13): [True: 11.0k, False: 1.75M]
  ------------------
 1290|  1.75M|            alpha_real[1] * alpha_real[1] + alpha_imag[1] * alpha_imag[1] >= 16.0f) {
  ------------------
  |  Branch (1290:13): [True: 26.6k, False: 1.72M]
  ------------------
 1291|  37.6k|          alpha_real[0] = 0.0f;
 1292|  37.6k|          alpha_imag[0] = 0.0f;
 1293|  37.6k|          alpha_real[1] = 0.0f;
 1294|  37.6k|          alpha_imag[1] = 0.0f;
 1295|  37.6k|        }
 1296|       |
 1297|  1.90M|        while (k2 >= ptr_invf_band_tbl[bw_index]) {
  ------------------
  |  Branch (1297:16): [True: 140k, False: 1.76M]
  ------------------
 1298|   140k|          bw_index++;
 1299|   140k|          if (bw_index >= MAX_NOISE_COEFFS) {
  ------------------
  |  |   45|   140k|#define MAX_NOISE_COEFFS 5
  ------------------
  |  Branch (1299:15): [True: 0, False: 140k]
  ------------------
 1300|      0|            if (ec_flag) {
  ------------------
  |  Branch (1300:17): [True: 0, False: 0]
  ------------------
 1301|      0|              bw_index = MAX_NOISE_COEFFS - 1;
  ------------------
  |  |   45|      0|#define MAX_NOISE_COEFFS 5
  ------------------
 1302|      0|              break;
 1303|      0|            } else
 1304|      0|              return -1;
 1305|      0|          }
 1306|   140k|        }
 1307|       |
 1308|  1.76M|        if (bw_index >= MAX_NUM_PATCHES) {
  ------------------
  |  |   23|  1.76M|#define MAX_NUM_PATCHES 6
  ------------------
  |  Branch (1308:13): [True: 0, False: 1.76M]
  ------------------
 1309|      0|          if (ec_flag)
  ------------------
  |  Branch (1309:15): [True: 0, False: 0]
  ------------------
 1310|      0|            bw_index = MAX_NUM_PATCHES - 1;
  ------------------
  |  |   23|      0|#define MAX_NUM_PATCHES 6
  ------------------
 1311|      0|          else
 1312|      0|            return -1;
 1313|      0|        }
 1314|  1.76M|        bw = bw_array[bw_index];
 1315|       |
 1316|  1.76M|        a0r = bw * alpha_real[0];
 1317|  1.76M|        a0i = bw * alpha_imag[0];
 1318|  1.76M|        bw *= bw;
 1319|  1.76M|        a1r = bw * alpha_real[1];
 1320|  1.76M|        a1i = bw * alpha_imag[1];
 1321|       |
 1322|  1.76M|        if (bw > 0.0f) {
  ------------------
  |  Branch (1322:13): [True: 918k, False: 847k]
  ------------------
 1323|  31.2M|          for (i = start_sample; i < end_sample; i++) {
  ------------------
  |  Branch (1323:34): [True: 30.3M, False: 918k]
  ------------------
 1324|  30.3M|            FLOAT32 real1, imag1, real2, imag2, realTarget, imag_target;
 1325|       |
 1326|  30.3M|            realTarget = ptr_ph_vocod_buf_real[i][k2];
 1327|  30.3M|            imag_target = ptr_ph_vocod_buf_imag[i][k2];
 1328|  30.3M|            real1 = ptr_ph_vocod_buf_real[i - 1][k2];
 1329|  30.3M|            imag1 = ptr_ph_vocod_buf_imag[i - 1][k2];
 1330|  30.3M|            real2 = ptr_ph_vocod_buf_real[i - 2][k2];
 1331|  30.3M|            imag2 = ptr_ph_vocod_buf_imag[i - 2][k2];
 1332|  30.3M|            realTarget += ((a0r * real1 - a0i * imag1) + (a1r * real2 - a1i * imag2));
 1333|  30.3M|            imag_target += ((a0i * real1 + a0r * imag1) + (a1i * real2 + a1r * imag2));
 1334|       |
 1335|  30.3M|            ptr_dst_buf_real[i][k2] = realTarget;
 1336|  30.3M|            ptr_dst_buf_imag[i][k2] = imag_target;
 1337|  30.3M|          }
 1338|   918k|        } else {
 1339|  30.2M|          for (i = start_sample; i < end_sample; i++) {
  ------------------
  |  Branch (1339:34): [True: 29.3M, False: 847k]
  ------------------
 1340|  29.3M|            ptr_dst_buf_real[i][k2] = ptr_ph_vocod_buf_real[i][k2];
 1341|  29.3M|            ptr_dst_buf_imag[i][k2] = ptr_ph_vocod_buf_imag[i][k2];
 1342|  29.3M|          }
 1343|   847k|        }
 1344|  1.76M|      }
 1345|  65.6k|    }
 1346|   143k|  }
 1347|   222k|  if ((MAX_NUM_PATCHES + 1) <= patch) {
  ------------------
  |  |   23|   222k|#define MAX_NUM_PATCHES 6
  ------------------
  |  Branch (1347:7): [True: 0, False: 222k]
  ------------------
 1348|      0|    if (ec_flag) {
  ------------------
  |  Branch (1348:9): [True: 0, False: 0]
  ------------------
 1349|      0|      patch = MAX_NUM_PATCHES;
  ------------------
  |  |   23|      0|#define MAX_NUM_PATCHES 6
  ------------------
 1350|      0|    } else {
 1351|      0|      return -1;
 1352|      0|    }
 1353|      0|  }
 1354|   222k|  ptr_frame_data->patch_param.num_patches = patch;
 1355|   810k|  for (i = 0; i < num_if_bands; i++) {
  ------------------
  |  Branch (1355:15): [True: 587k, False: 222k]
  ------------------
 1356|   587k|    bw_array_prev[i] = bw_array[i];
 1357|   587k|  }
 1358|   222k|  return 0;
 1359|   222k|}
ixheaacd_sbrdec_lpfuncs.c:ixheaacd_find_closest_entry:
  265|   325k|                                          WORD16 direction) {
  266|   325k|  WORD32 index;
  267|       |
  268|   325k|  if (goal_sb <= f_master_tbl[0]) return f_master_tbl[0];
  ------------------
  |  Branch (268:7): [True: 65, False: 325k]
  ------------------
  269|       |
  270|   325k|  if (goal_sb >= f_master_tbl[num_mf_bands]) return f_master_tbl[num_mf_bands];
  ------------------
  |  Branch (270:7): [True: 30.9k, False: 294k]
  ------------------
  271|       |
  272|   294k|  if (direction) {
  ------------------
  |  Branch (272:7): [True: 890, False: 293k]
  ------------------
  273|    890|    index = 0;
  274|  6.26k|    while (f_master_tbl[index] < goal_sb) {
  ------------------
  |  Branch (274:12): [True: 5.37k, False: 890]
  ------------------
  275|  5.37k|      index++;
  276|  5.37k|    }
  277|   293k|  } else {
  278|   293k|    index = num_mf_bands;
  279|  1.80M|    while (f_master_tbl[index] > goal_sb) {
  ------------------
  |  Branch (279:12): [True: 1.51M, False: 293k]
  ------------------
  280|  1.51M|      index--;
  281|  1.51M|    }
  282|   293k|  }
  283|       |
  284|   294k|  return f_master_tbl[index];
  285|   325k|}
ixheaacd_sbrdec_lpfuncs.c:ixheaacd_gausssolve:
  852|  22.6k|                                FLOAT32 y[]) {
  853|  22.6k|  WORD32 i, j, k, imax;
  854|  22.6k|  FLOAT32 v;
  855|       |
  856|   113k|  for (i = 0; i < n; i++) {
  ------------------
  |  Branch (856:15): [True: 90.6k, False: 22.6k]
  ------------------
  857|  90.6k|    imax = i;
  858|   226k|    for (k = i + 1; k < n; k++) {
  ------------------
  |  Branch (858:21): [True: 136k, False: 90.6k]
  ------------------
  859|   136k|      if (fabs(a[k][i]) > fabs(a[imax][i])) {
  ------------------
  |  Branch (859:11): [True: 4.02k, False: 131k]
  ------------------
  860|  4.02k|        imax = k;
  861|  4.02k|      }
  862|   136k|    }
  863|  90.6k|    if (imax != i) {
  ------------------
  |  Branch (863:9): [True: 3.99k, False: 86.6k]
  ------------------
  864|  3.99k|      v = b[imax];
  865|  3.99k|      b[imax] = b[i];
  866|  3.99k|      b[i] = v;
  867|  12.0k|      for (j = i; j < n; j++) {
  ------------------
  |  Branch (867:19): [True: 8.02k, False: 3.99k]
  ------------------
  868|  8.02k|        v = a[imax][j];
  869|  8.02k|        a[imax][j] = a[i][j];
  870|  8.02k|        a[i][j] = v;
  871|  8.02k|      }
  872|  3.99k|    }
  873|       |
  874|  90.6k|    v = a[i][i];
  875|       |
  876|  90.6k|    b[i] /= v;
  877|   317k|    for (j = i; j < n; j++) {
  ------------------
  |  Branch (877:17): [True: 226k, False: 90.6k]
  ------------------
  878|   226k|      a[i][j] /= v;
  879|   226k|    }
  880|       |
  881|   226k|    for (k = i + 1; k < n; k++) {
  ------------------
  |  Branch (881:21): [True: 136k, False: 90.6k]
  ------------------
  882|   136k|      v = a[k][i];
  883|   136k|      b[k] -= v * b[i];
  884|   453k|      for (j = i + 1; j < n; j++) {
  ------------------
  |  Branch (884:23): [True: 317k, False: 136k]
  ------------------
  885|   317k|        a[k][j] -= v * a[i][j];
  886|   317k|      }
  887|   136k|    }
  888|  90.6k|  }
  889|       |
  890|   113k|  for (i = n - 1; i >= 0; i--) {
  ------------------
  |  Branch (890:19): [True: 90.6k, False: 22.6k]
  ------------------
  891|  90.6k|    y[i] = b[i];
  892|   226k|    for (j = i + 1; j < n; j++) {
  ------------------
  |  Branch (892:21): [True: 136k, False: 90.6k]
  ------------------
  893|   136k|      y[i] -= a[i][j] * y[j];
  894|   136k|    }
  895|  90.6k|  }
  896|  22.6k|}
ixheaacd_sbrdec_lpfuncs.c:ixheaacd_esbr_chirp_fac_calc:
  835|   222k|                                         FLOAT32 *bw_array_prev) {
  836|   222k|  WORD32 i;
  837|       |
  838|   810k|  for (i = 0; i < num_if_bands; i++) {
  ------------------
  |  Branch (838:15): [True: 587k, False: 222k]
  ------------------
  839|   587k|    bw_array[i] =
  840|   587k|        ixheaacd_new_bw_table[inv_filt_mode_prev[i]][inv_filt_mode[i]];
  841|       |
  842|   587k|    if (bw_array[i] < bw_array_prev[i])
  ------------------
  |  Branch (842:9): [True: 180k, False: 407k]
  ------------------
  843|   180k|      bw_array[i] = 0.75000f * bw_array[i] + 0.25000f * bw_array_prev[i];
  844|   407k|    else
  845|   407k|      bw_array[i] = 0.90625f * bw_array[i] + 0.09375f * bw_array_prev[i];
  846|       |
  847|   587k|    if (bw_array[i] < 0.015625) bw_array[i] = 0;
  ------------------
  |  Branch (847:9): [True: 218k, False: 369k]
  ------------------
  848|   587k|  }
  849|   222k|}
ixheaacd_sbrdec_lpfuncs.c:ixheaacd_esbr_calc_co_variance:
  783|  3.72M|    FLOAT32 vec_x_imag[][64], WORD32 bd, WORD32 len) {
  784|  3.72M|  WORD32 j, jminus1, jminus2;
  785|       |
  786|  3.72M|  memset(pstr_auto_corr, 0, sizeof(ia_auto_corr_ele_struct));
  787|       |
  788|   148M|  for (j = 0; j < len; j++) {
  ------------------
  |  Branch (788:15): [True: 144M, False: 3.72M]
  ------------------
  789|   144M|    jminus1 = j - 1;
  790|   144M|    jminus2 = jminus1 - 1;
  791|       |
  792|   144M|    pstr_auto_corr->phi_0_1_real +=
  793|   144M|        vec_x_real[j][bd] * vec_x_real[jminus1][bd] +
  794|   144M|        vec_x_imag[j][bd] * vec_x_imag[jminus1][bd];
  795|       |
  796|   144M|    pstr_auto_corr->phi_0_1_imag +=
  797|   144M|        vec_x_imag[j][bd] * vec_x_real[jminus1][bd] -
  798|   144M|        vec_x_real[j][bd] * vec_x_imag[jminus1][bd];
  799|       |
  800|   144M|    pstr_auto_corr->phi_0_2_real +=
  801|   144M|        vec_x_real[j][bd] * vec_x_real[jminus2][bd] +
  802|   144M|        vec_x_imag[j][bd] * vec_x_imag[jminus2][bd];
  803|       |
  804|   144M|    pstr_auto_corr->phi_0_2_imag +=
  805|   144M|        vec_x_imag[j][bd] * vec_x_real[jminus2][bd] -
  806|   144M|        vec_x_real[j][bd] * vec_x_imag[jminus2][bd];
  807|       |
  808|   144M|    pstr_auto_corr->phi_1_1 +=
  809|   144M|        vec_x_real[jminus1][bd] * vec_x_real[jminus1][bd] +
  810|   144M|        vec_x_imag[jminus1][bd] * vec_x_imag[jminus1][bd];
  811|       |
  812|   144M|    pstr_auto_corr->phi_1_2_real +=
  813|   144M|        vec_x_real[jminus1][bd] * vec_x_real[jminus2][bd] +
  814|   144M|        vec_x_imag[jminus1][bd] * vec_x_imag[jminus2][bd];
  815|       |
  816|   144M|    pstr_auto_corr->phi_1_2_imag +=
  817|   144M|        vec_x_imag[jminus1][bd] * vec_x_real[jminus2][bd] -
  818|   144M|        vec_x_real[jminus1][bd] * vec_x_imag[jminus2][bd];
  819|       |
  820|   144M|    pstr_auto_corr->phi_2_2 +=
  821|   144M|        vec_x_real[jminus2][bd] * vec_x_real[jminus2][bd] +
  822|   144M|        vec_x_imag[jminus2][bd] * vec_x_imag[jminus2][bd];
  823|   144M|  }
  824|       |
  825|  3.72M|  pstr_auto_corr->det =
  826|  3.72M|      pstr_auto_corr->phi_1_1 * pstr_auto_corr->phi_2_2 -
  827|  3.72M|      (pstr_auto_corr->phi_1_2_real * pstr_auto_corr->phi_1_2_real +
  828|  3.72M|       pstr_auto_corr->phi_1_2_imag * pstr_auto_corr->phi_1_2_imag) *
  829|  3.72M|          SBR_HF_RELAXATION_PARAM;
  ------------------
  |  |  162|  3.72M|#define SBR_HF_RELAXATION_PARAM 0.999999f
  ------------------
  830|  3.72M|}

ixheaacd_prepare_upsamp:
  256|  3.05k|                             WORD32 num_channels) {
  257|  3.05k|  WORD32 lr;
  258|  3.05k|  ia_sbr_qmf_filter_bank_struct *sbr_qmf_bank;
  259|       |
  260|  9.00k|  for (lr = 0; lr < num_channels; lr++) {
  ------------------
  |  Branch (260:16): [True: 5.95k, False: 3.05k]
  ------------------
  261|  5.95k|    ptr_header_data[lr]->pstr_freq_band_data->sub_band_start =
  262|  5.95k|        NO_ANALYSIS_CHANNELS;
  ------------------
  |  |   35|  5.95k|#define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  ------------------
  |  |  |  |   34|  5.95k|#define NO_SYNTHESIS_CHANNELS 64
  |  |  ------------------
  |  |               #define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  ------------------
  |  |  |  |   23|  5.95k|#define SBR_UPSAMPLE_FAC 2
  |  |  ------------------
  ------------------
  263|  5.95k|    ptr_header_data[lr]->pstr_freq_band_data->sub_band_end =
  264|  5.95k|        NO_SYNTHESIS_CHANNELS;
  ------------------
  |  |   34|  5.95k|#define NO_SYNTHESIS_CHANNELS 64
  ------------------
  265|       |
  266|  5.95k|    sbr_qmf_bank = &pstr_sbr_channel[lr]->str_sbr_dec.str_synthesis_qmf_bank;
  267|  5.95k|    sbr_qmf_bank->lsb = NO_ANALYSIS_CHANNELS;
  ------------------
  |  |   35|  5.95k|#define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  ------------------
  |  |  |  |   34|  5.95k|#define NO_SYNTHESIS_CHANNELS 64
  |  |  ------------------
  |  |               #define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  ------------------
  |  |  |  |   23|  5.95k|#define SBR_UPSAMPLE_FAC 2
  |  |  ------------------
  ------------------
  268|  5.95k|    sbr_qmf_bank->usb = NO_SYNTHESIS_CHANNELS;
  ------------------
  |  |   34|  5.95k|#define NO_SYNTHESIS_CHANNELS 64
  ------------------
  269|       |
  270|  5.95k|    sbr_qmf_bank = &pstr_sbr_channel[lr]->str_sbr_dec.str_codec_qmf_bank;
  271|  5.95k|    sbr_qmf_bank->lsb = 0;
  272|  5.95k|    sbr_qmf_bank->usb = NO_ANALYSIS_CHANNELS;
  ------------------
  |  |   35|  5.95k|#define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  ------------------
  |  |  |  |   34|  5.95k|#define NO_SYNTHESIS_CHANNELS 64
  |  |  ------------------
  |  |               #define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC)
  |  |  ------------------
  |  |  |  |   23|  5.95k|#define SBR_UPSAMPLE_FAC 2
  |  |  ------------------
  ------------------
  273|  5.95k|    ptr_header_data[lr]->sync_state = UPSAMPLING;
  ------------------
  |  |   24|  5.95k|#define UPSAMPLING 1
  ------------------
  274|  5.95k|  }
  275|  3.05k|  return;
  276|  3.05k|}
ixheaacd_applysbr:
  319|   204k|    WORD32 frame_size, WORD32 heaac_mps_present, WORD32 ec_flag, FLAG first_frame) {
  320|   204k|  WORD32 k;
  321|   204k|  FLAG prev_ps_flag = 0;
  322|   204k|  FLAG ps_flag = 0;
  323|   204k|  FLAG stereo = 0;
  324|   204k|  FLAG low_pow_flag = 0;
  325|   204k|  FLAG header_flag = 1;
  326|   204k|  FLAG dual_mono = 0;
  327|   204k|  WORD32 err = 0;
  328|   204k|  WORD32 num_channels = *codec_num_channels;
  329|   204k|  FLAG prev_stereo;
  330|   204k|  WORD32 ele_channels = 0;
  331|   204k|  WORD32 num_elements = p_sbr_bit_stream->no_elements;
  332|   204k|  WORD32 usac_flag = self->aot_usac_flag;
  333|   204k|  WORD32 total_bits_left = 0;
  334|       |
  335|   204k|  ia_sbr_channel_struct *pstr_sbr_channel[2];
  336|   204k|  ia_sbr_header_data_struct *ptr_header_data[MAXNRSBRCHANNELS];
  337|       |
  338|   204k|  WORD32 initial_sync_state;
  339|       |
  340|   204k|  ia_sbr_header_data_struct *ptr_sbr_dflt_header =
  341|   204k|      (ia_sbr_header_data_struct *)(&self->str_sbr_dflt_header);
  342|       |
  343|   204k|  ia_sbr_frame_info_data_struct *ptr_frame_data[2];
  344|   204k|  self->num_delay_frames = 1;
  345|   204k|  self->ptr_mps_data = NULL;
  346|       |
  347|   204k|  if (!ec_flag || !usac_flag) {
  ------------------
  |  Branch (347:7): [True: 204k, False: 0]
  |  Branch (347:19): [True: 0, False: 0]
  ------------------
  348|   612k|    for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (348:17): [True: 408k, False: 204k]
  ------------------
  349|   408k|      ptr_frame_data[k] = (ia_sbr_frame_info_data_struct *)self->frame_buffer[k];
  350|       |
  351|   408k|      pstr_sbr_channel[k] = self->pstr_sbr_channel[k];
  352|       |
  353|   408k|      ptr_header_data[k] = self->pstr_sbr_header[k];
  354|       |
  355|   408k|      if (audio_object_type == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (355:11): [True: 57.4k, False: 350k]
  ------------------
  356|  57.4k|        ptr_frame_data[k]->eld_sbr_flag = eld_sbr_flag;
  357|  57.4k|        ptr_frame_data[k]->num_time_slots = ptr_header_data[0]->num_time_slots;
  358|  57.4k|      }
  359|       |
  360|   408k|      ptr_frame_data[k]->usac_independency_flag = self->usac_independency_flag;
  361|   408k|      ptr_frame_data[k]->mps_sbr_flag = (self->stereo_config_idx == 3) ? 1 : 0;
  ------------------
  |  Branch (361:41): [True: 79.4k, False: 328k]
  ------------------
  362|   408k|      ptr_frame_data[k]->stereo_config_idx = self->stereo_config_idx;
  363|   408k|      ptr_frame_data[k]->inter_tes_flag = self->inter_tes_flag;
  364|   408k|      ptr_frame_data[k]->sbr_mode = self->sbr_mode;
  365|       |
  366|   408k|      if (!usac_flag) {
  ------------------
  |  Branch (366:11): [True: 84.2k, False: 323k]
  ------------------
  367|  84.2k|        ptr_frame_data[k]->usac_independency_flag = 0;
  368|  84.2k|        ptr_frame_data[k]->mps_sbr_flag = 0;
  369|  84.2k|        ptr_frame_data[k]->stereo_config_idx = -1;
  370|  84.2k|        ptr_frame_data[k]->inter_tes_flag = 0;
  371|  84.2k|        ptr_frame_data[k]->sbr_mode = ORIG_SBR;
  372|  84.2k|      }
  373|   408k|    }
  374|       |
  375|   204k|    if (init_flag) {
  ------------------
  |  Branch (375:9): [True: 1.72k, False: 202k]
  ------------------
  376|  1.72k|      ptr_frame_data[1]->reset_flag = 1;
  377|  1.72k|      ptr_frame_data[0]->reset_flag = 1;
  378|  1.72k|    }
  379|       |
  380|   503k|    for (k = 0; k < *codec_num_channels; k++) {
  ------------------
  |  Branch (380:17): [True: 299k, False: 204k]
  ------------------
  381|   299k|      ptr_header_data[k]->usac_flag = self->aot_usac_flag;
  382|   299k|      ptr_header_data[k]->enh_sbr = self->enh_sbr;
  383|   299k|      ptr_header_data[k]->enh_sbr_ps =
  384|   299k|          ((self->enh_sbr_ps) | (ptr_header_data[k]->channel_mode == PS_STEREO));
  ------------------
  |  |   29|   299k|#define PS_STEREO 3
  ------------------
  385|       |
  386|   299k|      ptr_header_data[k]->usac_independency_flag = self->usac_independency_flag;
  387|   299k|      ptr_header_data[k]->hbe_flag = self->hbe_flag;
  388|   299k|      ptr_header_data[k]->pvc_flag = self->pvc_flag;
  389|       |
  390|   299k|      if (!usac_flag) {
  ------------------
  |  Branch (390:11): [True: 64.8k, False: 234k]
  ------------------
  391|  64.8k|        ptr_header_data[k]->usac_independency_flag = 0;
  392|  64.8k|        ptr_header_data[k]->hbe_flag = 0;
  393|  64.8k|        ptr_header_data[k]->pvc_flag = 0;
  394|  64.8k|      }
  395|   299k|      if (self->enh_sbr)
  ------------------
  |  Branch (395:11): [True: 299k, False: 0]
  ------------------
  396|   299k|      {
  397|   299k|        ptr_header_data[k]->esbr_hq = self->esbr_hq;
  398|   299k|      }
  399|       |
  400|   299k|      if (!usac_flag && (!(audio_object_type == AOT_ER_AAC_ELD ||
  ------------------
  |  Branch (400:11): [True: 64.8k, False: 234k]
  |  Branch (400:28): [True: 51.2k, False: 13.5k]
  ------------------
  401|  13.5k|          audio_object_type == AOT_ER_AAC_LD)) && self->enh_sbr) {
  ------------------
  |  Branch (401:11): [True: 0, False: 13.5k]
  |  Branch (401:51): [True: 13.5k, False: 0]
  ------------------
  402|  13.5k|        ptr_header_data[k]->hbe_flag = 1;
  403|  13.5k|      }
  404|   299k|    }
  405|       |
  406|   204k|    initial_sync_state = ptr_header_data[0]->sync_state;
  407|       |
  408|   204k|    low_pow_flag = !usac_flag;
  409|   204k|    self->pstr_sbr_tables->sbr_rand_ph = self->pstr_sbr_tables->env_calc_tables_ptr->sbr_rand_ph;
  410|       |
  411|   204k|    if (ps_enable) {
  ------------------
  |  Branch (411:9): [True: 41.9k, False: 162k]
  ------------------
  412|  41.9k|      if (num_channels == 1) {
  ------------------
  |  Branch (412:11): [True: 19.2k, False: 22.6k]
  ------------------
  413|  19.2k|        low_pow_flag = 0;
  414|  19.2k|      }
  415|  41.9k|    }
  416|       |
  417|   204k|    if (audio_object_type == AOT_ER_AAC_ELD || (ps_enable && heaac_mps_present)) {
  ------------------
  |  Branch (417:9): [True: 28.7k, False: 175k]
  |  Branch (417:49): [True: 13.2k, False: 162k]
  |  Branch (417:62): [True: 1.28k, False: 11.9k]
  ------------------
  418|  29.9k|      low_pow_flag = 0;
  419|  29.9k|    }
  420|       |
  421|   204k|    prev_stereo = (ptr_header_data[0]->channel_mode == SBR_STEREO);
  ------------------
  |  |   28|   204k|#define SBR_STEREO 2
  ------------------
  422|       |
  423|   204k|    if (ps_enable) prev_ps_flag = (ptr_header_data[0]->channel_mode == PS_STEREO);
  ------------------
  |  |   29|  41.9k|#define PS_STEREO 3
  ------------------
  |  Branch (423:9): [True: 41.9k, False: 162k]
  ------------------
  424|       |
  425|   204k|    ptr_header_data[0]->err_flag_prev = ptr_header_data[0]->err_flag;
  426|       |
  427|   204k|    if (p_sbr_bit_stream->no_elements == 0) {
  ------------------
  |  Branch (427:9): [True: 82, False: 203k]
  ------------------
  428|     82|      frame_status = 0;
  429|     82|      ptr_header_data[0]->sync_state = UPSAMPLING;
  ------------------
  |  |   24|     82|#define UPSAMPLING 1
  ------------------
  430|     82|      if (num_channels == 2) ptr_header_data[1]->sync_state = UPSAMPLING;
  ------------------
  |  |   24|     15|#define UPSAMPLING 1
  ------------------
  |  Branch (430:11): [True: 15, False: 67]
  ------------------
  431|     82|    }
  432|       |
  433|   204k|    if ((usac_flag)) {
  ------------------
  |  Branch (433:9): [True: 161k, False: 42.1k]
  ------------------
  434|   161k|      if ((p_sbr_bit_stream->no_elements) && (p_sbr_bit_stream->str_sbr_ele->size_payload > 0)) {
  ------------------
  |  Branch (434:11): [True: 161k, False: 0]
  |  Branch (434:46): [True: 160k, False: 1.18k]
  ------------------
  435|   160k|        num_elements = p_sbr_bit_stream->no_elements;
  436|   160k|      } else {
  437|  1.18k|        num_elements = 0;
  438|  1.18k|      }
  439|   161k|    }
  440|       |
  441|   406k|    for (k = 0; k < num_elements; k++) {
  ------------------
  |  Branch (441:17): [True: 202k, False: 203k]
  ------------------
  442|   202k|      struct ia_bit_buf_struct local_bit_buf = {0};
  443|   202k|      ia_sbr_element_stream_struct *ptr_bit_str_ele = &p_sbr_bit_stream->str_sbr_ele[k];
  444|   202k|      ele_channels = (p_sbr_bit_stream->str_sbr_ele[0].sbr_ele_id == SBR_ID_CPE) ? 2 : 1;
  ------------------
  |  Branch (444:22): [True: 72.6k, False: 130k]
  ------------------
  445|   202k|      if (!frame_status && ptr_header_data[k]->sync_state == SBR_ACTIVE && ec_flag) {
  ------------------
  |  |   25|   202k|#define SBR_ACTIVE 2
  ------------------
  |  Branch (445:11): [True: 0, False: 202k]
  |  Branch (445:28): [True: 0, False: 0]
  |  Branch (445:76): [True: 0, False: 0]
  ------------------
  446|      0|        ixheaacd_ec_set_frame_error_flag(ptr_bit_str_ele, FRAME_ERROR_ALLSLOTS);
  ------------------
  |  |   43|      0|#define FRAME_ERROR_ALLSLOTS (2)
  ------------------
  447|      0|      }
  448|       |
  449|   202k|      switch (ptr_bit_str_ele->sbr_ele_id) {
  450|   124k|        case SBR_ID_SCE:
  ------------------
  |  Branch (450:9): [True: 124k, False: 78.7k]
  ------------------
  451|   130k|        case SBR_ID_CCE:
  ------------------
  |  Branch (451:9): [True: 6.10k, False: 196k]
  ------------------
  452|   130k|          if (num_channels == 2) {
  ------------------
  |  Branch (452:15): [True: 22.4k, False: 107k]
  ------------------
  453|  22.4k|            dual_mono = 1;
  454|  22.4k|          }
  455|   130k|          stereo = 0;
  456|   130k|          break;
  457|  72.6k|        case SBR_ID_CPE:
  ------------------
  |  Branch (457:9): [True: 72.6k, False: 130k]
  ------------------
  458|  72.6k|          stereo = 1;
  459|  72.6k|          ptr_header_data[1] = ptr_header_data[0];
  460|       |
  461|  72.6k|          memcpy(self->pstr_sbr_header[1], self->pstr_sbr_header[0],
  462|  72.6k|                 sizeof(ia_sbr_header_data_struct));
  463|  72.6k|          break;
  464|      0|        default:
  ------------------
  |  Branch (464:9): [True: 0, False: 202k]
  ------------------
  465|      0|          frame_status = 0;
  466|   202k|      }
  467|       |
  468|   202k|      if (frame_status) {
  ------------------
  |  Branch (468:11): [True: 202k, False: 0]
  ------------------
  469|   202k|        if (!usac_flag) {
  ------------------
  |  Branch (469:13): [True: 42.0k, False: 160k]
  ------------------
  470|  42.0k|          if (!(audio_object_type == AOT_ER_AAC_LD || audio_object_type == AOT_ER_AAC_ELD)
  ------------------
  |  Branch (470:17): [True: 0, False: 42.0k]
  |  Branch (470:55): [True: 28.7k, False: 13.3k]
  ------------------
  471|  13.3k|              && self->enh_sbr) {
  ------------------
  |  Branch (471:18): [True: 13.3k, False: 0]
  ------------------
  472|  13.3k|            WORD8 tmp[1024];
  473|  13.3k|            WORD32 tmp_payload;
  474|  13.3k|            memcpy(&tmp[0], ptr_bit_str_ele->ptr_sbr_data, ptr_bit_str_ele->size_payload);
  475|  13.3k|            memcpy(ptr_bit_str_ele->ptr_sbr_data, ptr_bit_str_ele->ptr_prev_sbr_data,
  476|  13.3k|                   ptr_bit_str_ele->prev_size_payload);
  477|  13.3k|            memcpy(ptr_bit_str_ele->ptr_prev_sbr_data, &tmp[0], ptr_bit_str_ele->size_payload);
  478|  13.3k|            tmp_payload = ptr_bit_str_ele->size_payload;
  479|  13.3k|            ptr_bit_str_ele->size_payload = ptr_bit_str_ele->prev_size_payload;
  480|  13.3k|            ptr_bit_str_ele->prev_size_payload = tmp_payload;
  481|  13.3k|          }
  482|  42.0k|          if (!ptr_bit_str_ele->size_payload) {
  ------------------
  |  Branch (482:15): [True: 866, False: 41.1k]
  ------------------
  483|    866|            continue;
  484|    866|          }
  485|       |
  486|  41.1k|          ixheaacd_create_init_bit_buf(&local_bit_buf, (UWORD8 *)ptr_bit_str_ele->ptr_sbr_data,
  487|  41.1k|                                       ptr_bit_str_ele->size_payload);
  488|  41.1k|          it_bit_buff = &local_bit_buf;
  489|  41.1k|          it_bit_buff->xaac_jmp_buf = self->xaac_jmp_buf;
  490|  41.1k|          total_bits_left = it_bit_buff->cnt_bits;
  491|       |
  492|  41.1k|          if (audio_object_type == AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (492:15): [True: 28.7k, False: 12.4k]
  ------------------
  493|  28.7k|            if (eld_sbr_flag != 1) {
  ------------------
  |  Branch (493:17): [True: 0, False: 28.7k]
  ------------------
  494|      0|              ixheaacd_read_bits_buf(&local_bit_buf, LEN_NIBBLE);
  ------------------
  |  |  230|      0|#define LEN_NIBBLE (4)
  ------------------
  495|      0|            }
  496|  28.7k|          } else {
  497|  12.4k|            ixheaacd_read_bits_buf(&local_bit_buf, LEN_NIBBLE);
  ------------------
  |  |  230|  12.4k|#define LEN_NIBBLE (4)
  ------------------
  498|  12.4k|          }
  499|  41.1k|        }
  500|   201k|        if (ptr_bit_str_ele->extension_type == SBR_EXTENSION_CRC) {
  ------------------
  |  |   27|   201k|#define SBR_EXTENSION_CRC 14
  ------------------
  |  Branch (500:13): [True: 8.47k, False: 193k]
  ------------------
  501|  8.47k|          WORD32 crc_bits = 0;
  502|  8.47k|          WORD32 crc_check_flag = 0;
  503|  8.47k|          crc_check_flag = 1;
  504|  8.47k|          crc_bits = (((ptr_bit_str_ele->size_payload - 1) << 3) + (4 - SBR_CYC_REDCY_CHK_BITS));
  ------------------
  |  |   33|  8.47k|#define SBR_CYC_REDCY_CHK_BITS 10
  ------------------
  505|       |
  506|  8.47k|          if (crc_bits < 0) {
  ------------------
  |  Branch (506:15): [True: 15, False: 8.46k]
  ------------------
  507|     15|            crc_check_flag = 0;
  508|     15|            frame_status = 0;
  509|     15|          }
  510|  8.47k|          if (crc_check_flag) frame_status = ixheaacd_sbr_crccheck(it_bit_buff, crc_bits);
  ------------------
  |  Branch (510:15): [True: 8.46k, False: 15]
  ------------------
  511|  8.47k|        }
  512|       |
  513|   201k|        if (!usac_flag) header_flag = ixheaacd_read_bits_buf(it_bit_buff, 1);
  ------------------
  |  Branch (513:13): [True: 41.1k, False: 160k]
  ------------------
  514|       |
  515|   201k|        if (audio_object_type != AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (515:13): [True: 173k, False: 28.7k]
  ------------------
  516|   173k|          if (header_flag) {
  ------------------
  |  Branch (516:15): [True: 161k, False: 11.7k]
  ------------------
  517|   161k|            header_flag = ixheaacd_sbr_read_header_data(ptr_header_data[k], it_bit_buff, stereo,
  518|   161k|                                                        ptr_sbr_dflt_header);
  519|   161k|            if (usac_flag) {
  ------------------
  |  Branch (519:17): [True: 160k, False: 684]
  ------------------
  520|   160k|              if ((self->ptr_pvc_data_str->prev_pvc_mode == 0) &&
  ------------------
  |  Branch (520:19): [True: 80.3k, False: 80.4k]
  ------------------
  521|  80.3k|                  (ptr_header_data[k]->pvc_mode != 0)) {
  ------------------
  |  Branch (521:19): [True: 2.17k, False: 78.1k]
  ------------------
  522|  2.17k|                self->ptr_pvc_data_str->prev_pvc_id = 0;
  523|  2.17k|              }
  524|   160k|              self->ptr_pvc_data_str->prev_pvc_mode = ptr_header_data[k]->pvc_mode;
  525|   160k|              if (ptr_header_data[k]->pvc_mode == 0) {
  ------------------
  |  Branch (525:19): [True: 79.2k, False: 81.5k]
  ------------------
  526|  79.2k|                ptr_frame_data[k]->sbr_mode = ORIG_SBR;
  527|  81.5k|              } else {
  528|  81.5k|                ptr_frame_data[k]->sbr_mode = PVC_SBR;
  529|  81.5k|              }
  530|   160k|            }
  531|   161k|            if (header_flag == SBR_RESET) {
  ------------------
  |  |   31|   161k|#define SBR_RESET 1
  ------------------
  |  Branch (531:17): [True: 32.4k, False: 128k]
  ------------------
  532|  32.4k|              err = ixheaacd_calc_frq_bnd_tbls(ptr_header_data[k],
  533|       |
  534|  32.4k|                                               self->pstr_common_tables);
  535|  32.4k|              if (!err) {
  ------------------
  |  Branch (535:19): [True: 32.3k, False: 136]
  ------------------
  536|  32.3k|                WORD32 lr;
  537|  32.3k|                WORD32 lr1 = ps_enable ? 2 : num_channels;
  ------------------
  |  Branch (537:30): [True: 261, False: 32.1k]
  ------------------
  538|  78.2k|                for (lr = 0; lr < lr1; lr++) {
  ------------------
  |  Branch (538:30): [True: 45.8k, False: 32.3k]
  ------------------
  539|  45.8k|                  if (ldmps_present != 1) ptr_frame_data[lr]->reset_flag = 1;
  ------------------
  |  Branch (539:23): [True: 45.8k, False: 0]
  ------------------
  540|  45.8k|                  if ((SBR_NOT_INITIALIZED == ptr_header_data[lr]->sync_state) && !usac_flag) {
  ------------------
  |  |   23|  45.8k|#define SBR_NOT_INITIALIZED 0
  ------------------
  |  Branch (540:23): [True: 14.9k, False: 30.9k]
  |  Branch (540:83): [True: 251, False: 14.6k]
  ------------------
  541|    251|                    ptr_frame_data[lr]->sbr_patching_mode = 1;
  542|    251|                    ptr_frame_data[lr]->over_sampling_flag = 0;
  543|    251|                    ptr_frame_data[lr]->pitch_in_bins = 0;
  544|    251|                    ptr_header_data[lr]->pre_proc_flag = 0;
  545|    251|                  }
  546|  45.8k|                  err |= ixheaacd_sbr_dec_reset(
  547|  45.8k|                      &(pstr_sbr_channel[lr]->str_sbr_dec), ptr_header_data[k], low_pow_flag,
  548|  45.8k|                      self->pstr_common_tables, ptr_frame_data[k]->pitch_in_bins,
  549|  45.8k|                      audio_object_type, sbr_scratch_struct->ptr_work_buf_core);
  550|  45.8k|                  if (err < 0) return err;
  ------------------
  |  Branch (550:23): [True: 4, False: 45.8k]
  ------------------
  551|  45.8k|                }
  552|  32.3k|              }
  553|       |
  554|  32.4k|              if (err == 0) {
  ------------------
  |  Branch (554:19): [True: 32.3k, False: 136]
  ------------------
  555|  32.3k|                ptr_header_data[k]->sync_state = SBR_ACTIVE;
  ------------------
  |  |   25|  32.3k|#define SBR_ACTIVE 2
  ------------------
  556|  32.3k|              }
  557|  32.4k|            }
  558|   161k|          }
  559|   173k|        } else {
  560|  28.7k|          if (header_flag) {
  ------------------
  |  Branch (560:15): [True: 7.90k, False: 20.8k]
  ------------------
  561|  7.90k|            header_flag = ixheaacd_sbr_read_header_data(ptr_header_data[k], it_bit_buff, stereo,
  562|  7.90k|                                                        ptr_sbr_dflt_header);
  563|  7.90k|            if (usac_flag) {
  ------------------
  |  Branch (563:17): [True: 0, False: 7.90k]
  ------------------
  564|      0|              if ((self->ptr_pvc_data_str->prev_pvc_mode == 0) &&
  ------------------
  |  Branch (564:19): [True: 0, False: 0]
  ------------------
  565|      0|                  (ptr_header_data[k]->pvc_mode != 0)) {
  ------------------
  |  Branch (565:19): [True: 0, False: 0]
  ------------------
  566|      0|                self->ptr_pvc_data_str->prev_pvc_id = 0;
  567|      0|              }
  568|      0|              self->ptr_pvc_data_str->prev_pvc_mode = ptr_header_data[k]->pvc_mode;
  569|      0|              if (ptr_header_data[k]->pvc_mode == 0) {
  ------------------
  |  Branch (569:19): [True: 0, False: 0]
  ------------------
  570|      0|                ptr_frame_data[k]->sbr_mode = ORIG_SBR;
  571|      0|              } else {
  572|      0|                ptr_frame_data[k]->sbr_mode = PVC_SBR;
  573|      0|              }
  574|      0|            }
  575|       |
  576|  7.90k|            if (header_flag == SBR_RESET) {
  ------------------
  |  |   31|  7.90k|#define SBR_RESET 1
  ------------------
  |  Branch (576:17): [True: 6.55k, False: 1.35k]
  ------------------
  577|  6.55k|              err = ixheaacd_calc_frq_bnd_tbls(ptr_header_data[k],
  578|       |
  579|  6.55k|                                               self->pstr_common_tables);
  580|  6.55k|              if (err) {
  ------------------
  |  Branch (580:19): [True: 103, False: 6.45k]
  ------------------
  581|    103|                return err;
  582|    103|              }
  583|  6.55k|            }
  584|  7.90k|          }
  585|       |
  586|  28.6k|          {
  587|  28.6k|            WORD32 lr;
  588|  28.6k|            WORD32 lr1 = ps_enable ? 2 : num_channels;
  ------------------
  |  Branch (588:26): [True: 28.6k, False: 6]
  ------------------
  589|  85.7k|            for (lr = 0; lr < lr1; lr++) {
  ------------------
  |  Branch (589:26): [True: 57.1k, False: 28.5k]
  ------------------
  590|  57.1k|              if (ldmps_present != 1) ptr_frame_data[lr]->reset_flag = 1;
  ------------------
  |  Branch (590:19): [True: 52.4k, False: 4.76k]
  ------------------
  591|  57.1k|              if (ptr_header_data[k]->status) {
  ------------------
  |  Branch (591:19): [True: 16.5k, False: 40.6k]
  ------------------
  592|  16.5k|                err |= ixheaacd_sbr_dec_reset(
  593|  16.5k|                    &(pstr_sbr_channel[lr]->str_sbr_dec), ptr_header_data[k], low_pow_flag,
  594|  16.5k|                    self->pstr_common_tables, ptr_frame_data[k]->pitch_in_bins, audio_object_type,
  595|  16.5k|                    sbr_scratch_struct->ptr_work_buf_core);
  596|  16.5k|                if (err < 0) return err;
  ------------------
  |  Branch (596:21): [True: 11, False: 16.5k]
  ------------------
  597|  16.5k|              }
  598|  57.1k|            }
  599|  28.5k|            ptr_header_data[k]->status = 0;
  600|  28.5k|          }
  601|       |
  602|  28.5k|          if (err == 0) {
  ------------------
  |  Branch (602:15): [True: 28.5k, False: 6]
  ------------------
  603|  28.5k|            ptr_header_data[k]->sync_state = SBR_ACTIVE;
  ------------------
  |  |   25|  28.5k|#define SBR_ACTIVE 2
  ------------------
  604|  28.5k|          }
  605|  28.5k|        }
  606|   201k|      }
  607|       |
  608|   201k|      if (err || (ptr_header_data[k]->sync_state == SBR_NOT_INITIALIZED)) {
  ------------------
  |  |   23|   201k|#define SBR_NOT_INITIALIZED 0
  ------------------
  |  Branch (608:11): [True: 150, False: 201k]
  |  Branch (608:18): [True: 2.04k, False: 199k]
  ------------------
  609|  2.18k|        WORD32 lr1 = ps_enable ? 2 : num_channels;
  ------------------
  |  Branch (609:22): [True: 2.04k, False: 144]
  ------------------
  610|  2.18k|        ixheaacd_prepare_upsamp(ptr_header_data, pstr_sbr_channel, lr1);
  611|  2.18k|        if (err) return err;
  ------------------
  |  Branch (611:13): [True: 136, False: 2.04k]
  ------------------
  612|  2.18k|      }
  613|       |
  614|   201k|      if (frame_status && (ptr_header_data[k]->sync_state == SBR_ACTIVE)) {
  ------------------
  |  |   25|   193k|#define SBR_ACTIVE 2
  ------------------
  |  Branch (614:11): [True: 193k, False: 8.43k]
  |  Branch (614:27): [True: 191k, False: 1.27k]
  ------------------
  615|   191k|        if (stereo) {
  ------------------
  |  Branch (615:13): [True: 70.7k, False: 121k]
  ------------------
  616|  70.7k|          frame_status = ixheaacd_sbr_read_cpe(ptr_header_data[0], ptr_frame_data, it_bit_buff,
  617|  70.7k|                                               self->pstr_sbr_tables, audio_object_type);
  618|  70.7k|          if (usac_flag && (frame_status == 0)) return -1;
  ------------------
  |  Branch (618:15): [True: 49.8k, False: 20.9k]
  |  Branch (618:28): [True: 42, False: 49.7k]
  ------------------
  619|  70.7k|          if (frame_status < 0) return frame_status;
  ------------------
  |  Branch (619:15): [True: 4, False: 70.7k]
  ------------------
  620|   121k|        } else {
  621|   121k|          if (ps_enable) {
  ------------------
  |  Branch (621:15): [True: 10.4k, False: 110k]
  ------------------
  622|  10.4k|            if (down_mix_flag) {
  ------------------
  |  Branch (622:17): [True: 0, False: 10.4k]
  ------------------
  623|      0|              self->pstr_ps_stereo_dec->force_mono = 1;
  624|  10.4k|            } else {
  625|  10.4k|              self->pstr_ps_stereo_dec->force_mono = 0;
  626|  10.4k|            }
  627|   110k|          } else {
  628|   110k|            self->pstr_ps_stereo_dec = 0;
  629|   110k|          }
  630|   121k|          if (ptr_frame_data[k]->sbr_mode == ORIG_SBR) {
  ------------------
  |  Branch (630:15): [True: 55.6k, False: 65.5k]
  ------------------
  631|  55.6k|            frame_status = ixheaacd_sbr_read_sce(
  632|  55.6k|                ptr_header_data[k], ptr_frame_data[k], self->pstr_ps_stereo_dec, it_bit_buff,
  633|  55.6k|                self->pstr_sbr_tables, audio_object_type, ec_flag);
  634|  55.6k|            if (usac_flag && (frame_status == 0)) return -1;
  ------------------
  |  Branch (634:17): [True: 45.0k, False: 10.5k]
  |  Branch (634:30): [True: 54, False: 45.0k]
  ------------------
  635|  55.5k|            if (frame_status < 0) return frame_status;
  ------------------
  |  Branch (635:17): [True: 3, False: 55.5k]
  ------------------
  636|  55.5k|            if (ec_flag && self->pstr_ps_stereo_dec != NULL) {
  ------------------
  |  Branch (636:17): [True: 0, False: 55.5k]
  |  Branch (636:28): [True: 0, False: 0]
  ------------------
  637|      0|              ixheaacd_copy_prev_ps_params(self->pstr_ps_stereo_dec, &self->str_ps_config_prev,
  638|      0|                                           frame_status);
  639|      0|            }
  640|  65.5k|          } else if (ptr_frame_data[k]->sbr_mode == PVC_SBR) {
  ------------------
  |  Branch (640:22): [True: 65.5k, False: 0]
  ------------------
  641|  65.5k|            frame_status = ixheaacd_sbr_read_pvc_sce(
  642|  65.5k|                ptr_frame_data[k], it_bit_buff, ptr_header_data[k]->hbe_flag,
  643|  65.5k|                self->ptr_pvc_data_str, self->pstr_sbr_tables, ptr_header_data[k]);
  644|  65.5k|            if (frame_status < 0) return frame_status;
  ------------------
  |  Branch (644:17): [True: 48, False: 65.5k]
  ------------------
  645|  65.5k|          }
  646|   121k|        }
  647|   191k|        ptr_header_data[k]->enh_sbr_ps =
  648|   191k|            ((self->enh_sbr_ps) | (ptr_header_data[0]->channel_mode == PS_STEREO));
  ------------------
  |  |   29|   191k|#define PS_STEREO 3
  ------------------
  649|   191k|        if ((audio_object_type != AOT_ER_AAC_ELD) && (audio_object_type != AOT_USAC)) {
  ------------------
  |  Branch (649:13): [True: 165k, False: 25.8k]
  |  Branch (649:54): [True: 5.65k, False: 160k]
  ------------------
  650|  5.65k|          WORD32 total_bits_read;
  651|  5.65k|          total_bits_read = ixheaacd_no_bits_read(it_bit_buff);
  ------------------
  |  |  128|  5.65k|  ((it_bit_buff)->size - (it_bit_buff)->cnt_bits)
  ------------------
  652|  5.65k|          if (total_bits_read > (ptr_bit_str_ele->size_payload << 3) ||
  ------------------
  |  Branch (652:15): [True: 0, False: 5.65k]
  ------------------
  653|  5.65k|              total_bits_read < ((ptr_bit_str_ele->size_payload << 3) - 8)) {
  ------------------
  |  Branch (653:15): [True: 4.45k, False: 1.19k]
  ------------------
  654|  4.45k|            frame_status = 0;
  655|  4.45k|          }
  656|  5.65k|          if (ec_flag) {
  ------------------
  |  Branch (656:15): [True: 0, False: 5.65k]
  ------------------
  657|      0|            if (!frame_status) {
  ------------------
  |  Branch (657:17): [True: 0, False: 0]
  ------------------
  658|      0|              ixheaacd_ec_set_frame_error_flag(ptr_bit_str_ele, FRAME_ERROR);
  ------------------
  |  |   42|      0|#define FRAME_ERROR (1)
  ------------------
  659|      0|            } else {
  660|      0|              ixheaacd_ec_set_frame_error_flag(ptr_bit_str_ele, FRAME_OK);
  ------------------
  |  |   41|      0|#define FRAME_OK (0)
  ------------------
  661|      0|            }
  662|      0|          }
  663|  5.65k|        }
  664|   191k|      }
  665|   201k|      if ((ldmps_present == 1) && (it_bit_buff)) {
  ------------------
  |  Branch (665:11): [True: 2.36k, False: 199k]
  |  Branch (665:35): [True: 2.36k, False: 0]
  ------------------
  666|  2.36k|        WORD32 bits_decoded = (it_bit_buff->size - it_bit_buff->cnt_bits);
  667|  2.36k|        self->ptr_mps_data = (WORD8 *)it_bit_buff->ptr_read_next;
  668|  2.36k|        self->left_mps_bits = (total_bits_left - bits_decoded);
  669|  2.36k|        self->mps_bits_pos = it_bit_buff->bit_pos;
  670|  2.36k|      }
  671|   201k|      if (ec_flag) {
  ------------------
  |  Branch (671:11): [True: 0, False: 201k]
  ------------------
  672|      0|        if (frame_status && !init_flag) {
  ------------------
  |  Branch (672:13): [True: 0, False: 0]
  |  Branch (672:29): [True: 0, False: 0]
  ------------------
  673|      0|          ptr_bit_str_ele->use_frame_slot =
  674|      0|              (ptr_bit_str_ele->use_frame_slot + 1) % (self->num_delay_frames + 1);
  675|      0|        }
  676|      0|        if (ptr_header_data[0]->sync_state == SBR_ACTIVE) {
  ------------------
  |  |   25|      0|#define SBR_ACTIVE 2
  ------------------
  |  Branch (676:13): [True: 0, False: 0]
  ------------------
  677|      0|          ptr_header_data[k]->err_flag =
  678|      0|              ptr_bit_str_ele->frame_error_flag[ptr_bit_str_ele->use_frame_slot];
  679|      0|        }
  680|      0|      }
  681|   201k|    }
  682|       |
  683|   203k|    if (!usac_flag) {
  ------------------
  |  Branch (683:9): [True: 41.6k, False: 162k]
  ------------------
  684|  41.6k|      if (!frame_status || (ptr_header_data[0]->sync_state != SBR_ACTIVE) ||
  ------------------
  |  |   25|  28.6k|#define SBR_ACTIVE 2
  ------------------
  |  Branch (684:11): [True: 12.9k, False: 28.6k]
  |  Branch (684:28): [True: 2.13k, False: 26.5k]
  ------------------
  685|  26.5k|          ptr_header_data[0]->err_flag) {
  ------------------
  |  Branch (685:11): [True: 9.19k, False: 17.3k]
  ------------------
  686|  24.2k|        ptr_header_data[0]->err_flag = 1;
  687|  24.2k|        stereo = (num_channels == 2) ? 1 : 0;
  ------------------
  |  Branch (687:18): [True: 10.7k, False: 13.5k]
  ------------------
  688|  24.2k|        if (ptr_header_data[0]->channel_mode == 0) {
  ------------------
  |  Branch (688:13): [True: 1.43k, False: 22.8k]
  ------------------
  689|  1.43k|          ptr_header_data[0]->channel_mode = stereo ? SBR_STEREO : SBR_MONO;
  ------------------
  |  |   28|    410|#define SBR_STEREO 2
  ------------------
                        ptr_header_data[0]->channel_mode = stereo ? SBR_STEREO : SBR_MONO;
  ------------------
  |  |   27|  2.46k|#define SBR_MONO 1
  ------------------
  |  Branch (689:46): [True: 410, False: 1.02k]
  ------------------
  690|  1.43k|        }
  691|  24.2k|      }
  692|       |
  693|  41.6k|      if (!(stereo || dual_mono)) {
  ------------------
  |  Branch (693:13): [True: 22.3k, False: 19.2k]
  |  Branch (693:23): [True: 0, False: 19.2k]
  ------------------
  694|  19.2k|        ptr_frame_data[0]->coupling_mode = COUPLING_OFF;
  ------------------
  |  |   38|  19.2k|#define COUPLING_OFF 0
  ------------------
  695|  19.2k|        ptr_frame_data[1]->coupling_mode = COUPLING_OFF;
  ------------------
  |  |   38|  19.2k|#define COUPLING_OFF 0
  ------------------
  696|  19.2k|      }
  697|       |
  698|  41.6k|      if (ptr_header_data[0]->sync_state == SBR_NOT_INITIALIZED && (!ec_flag || init_flag)) {
  ------------------
  |  |   23|  83.2k|#define SBR_NOT_INITIALIZED 0
  ------------------
  |  Branch (698:11): [True: 866, False: 40.7k]
  |  Branch (698:69): [True: 866, False: 0]
  |  Branch (698:81): [True: 0, False: 0]
  ------------------
  699|    866|        WORD32 lr1 = ps_enable ? 2 : num_channels;
  ------------------
  |  Branch (699:22): [True: 788, False: 78]
  ------------------
  700|    866|        ixheaacd_prepare_upsamp(ptr_header_data, pstr_sbr_channel, lr1);
  701|    866|      }
  702|  41.6k|    }
  703|       |
  704|   203k|    if (ptr_header_data[0]->sync_state == SBR_ACTIVE) {
  ------------------
  |  |   25|   203k|#define SBR_ACTIVE 2
  ------------------
  |  Branch (704:9): [True: 199k, False: 3.70k]
  ------------------
  705|   199k|      if (ptr_frame_data[0]->sbr_mode == PVC_SBR) {
  ------------------
  |  Branch (705:11): [True: 82.1k, False: 117k]
  ------------------
  706|  82.1k|        err = ixheaacd_dec_sbrdata_for_pvc(ptr_header_data[0], ptr_frame_data[0],
  707|  82.1k|                                           pstr_sbr_channel[0]->pstr_prev_frame_data,
  708|  82.1k|                                           audio_object_type);
  709|  82.1k|        if (err) return err;
  ------------------
  |  Branch (709:13): [True: 0, False: 82.1k]
  ------------------
  710|   117k|      } else if (ptr_frame_data[0]->sbr_mode == ORIG_SBR) {
  ------------------
  |  Branch (710:18): [True: 117k, False: 0]
  ------------------
  711|   117k|        err = ixheaacd_dec_sbrdata(
  712|   117k|            ptr_header_data[0], ptr_header_data[1], ptr_frame_data[0],
  713|   117k|            pstr_sbr_channel[0]->pstr_prev_frame_data,
  714|   117k|            (stereo || dual_mono) ? ptr_frame_data[1] : NULL,
  ------------------
  |  Branch (714:14): [True: 56.2k, False: 61.5k]
  |  Branch (714:24): [True: 3.58k, False: 58.0k]
  ------------------
  715|   117k|            (stereo || dual_mono) ? pstr_sbr_channel[1]->pstr_prev_frame_data : NULL,
  ------------------
  |  Branch (715:14): [True: 56.2k, False: 61.5k]
  |  Branch (715:24): [True: 3.58k, False: 58.0k]
  ------------------
  716|   117k|            self->pstr_common_tables, ldmps_present, audio_object_type, ec_flag);
  717|       |
  718|   117k|        if (err) return err;
  ------------------
  |  Branch (718:13): [True: 18, False: 117k]
  ------------------
  719|   117k|      }
  720|       |
  721|   199k|      if (ptr_header_data[0]->channel_mode == PS_STEREO &&
  ------------------
  |  |   29|   399k|#define PS_STEREO 3
  ------------------
  |  Branch (721:11): [True: 9.62k, False: 190k]
  ------------------
  722|  9.62k|          (audio_object_type != AOT_ER_AAC_ELD && audio_object_type != AOT_ER_AAC_LD)) {
  ------------------
  |  Branch (722:12): [True: 8.19k, False: 1.42k]
  |  Branch (722:51): [True: 8.19k, False: 0]
  ------------------
  723|  8.19k|        ixheaacd_decode_ps_data(self->pstr_ps_stereo_dec, frame_size);
  724|  8.19k|        ps_flag = 1;
  725|  8.19k|        self->ps_present = ps_flag;
  726|  8.19k|      }
  727|   199k|      if (ptr_header_data[0]->enh_sbr_ps && self->enh_sbr) {
  ------------------
  |  Branch (727:11): [True: 9.63k, False: 190k]
  |  Branch (727:45): [True: 9.63k, False: 0]
  ------------------
  728|  9.63k|        ps_flag = 1;
  729|  9.63k|        self->ps_present = ps_flag;
  730|  9.63k|      }
  731|   199k|      ptr_frame_data[0]->max_qmf_subband_aac =
  732|   199k|          ptr_header_data[0]->pstr_freq_band_data->sub_band_start;
  733|   199k|      if (stereo) {
  ------------------
  |  Branch (733:11): [True: 72.0k, False: 127k]
  ------------------
  734|  72.0k|        ptr_frame_data[1]->max_qmf_subband_aac =
  735|  72.0k|            ptr_header_data[1]->pstr_freq_band_data->sub_band_start;
  736|  72.0k|      }
  737|   199k|      if (ldmps_present == 1) {
  ------------------
  |  Branch (737:11): [True: 2.36k, False: 197k]
  ------------------
  738|  2.36k|        ptr_frame_data[0]->rate = 1;
  739|  2.36k|        if (stereo) {
  ------------------
  |  Branch (739:13): [True: 1.74k, False: 622]
  ------------------
  740|  1.74k|          ptr_frame_data[1]->rate = 1;
  741|  1.74k|        }
  742|  2.36k|      }
  743|   199k|    }
  744|   203k|    if (audio_object_type == AOT_ER_AAC_ELD && ec_flag) {
  ------------------
  |  Branch (744:9): [True: 28.2k, False: 175k]
  |  Branch (744:48): [True: 0, False: 28.2k]
  ------------------
  745|      0|      if ((initial_sync_state == SBR_NOT_INITIALIZED) && ptr_header_data[0]->err_flag) {
  ------------------
  |  |   23|      0|#define SBR_NOT_INITIALIZED 0
  ------------------
  |  Branch (745:11): [True: 0, False: 0]
  |  Branch (745:58): [True: 0, False: 0]
  ------------------
  746|      0|        ptr_header_data[0]->sync_state = SBR_NOT_INITIALIZED;
  ------------------
  |  |   23|      0|#define SBR_NOT_INITIALIZED 0
  ------------------
  747|      0|      }
  748|   203k|    } else {
  749|   203k|      if (audio_object_type != AOT_ER_AAC_ELD) {
  ------------------
  |  Branch (749:11): [True: 174k, False: 28.7k]
  ------------------
  750|   174k|        if ((initial_sync_state == SBR_NOT_INITIALIZED) && ptr_header_data[0]->err_flag) {
  ------------------
  |  |   23|   174k|#define SBR_NOT_INITIALIZED 0
  ------------------
  |  Branch (750:13): [True: 10.8k, False: 164k]
  |  Branch (750:60): [True: 8.35k, False: 2.50k]
  ------------------
  751|  8.35k|          ptr_header_data[0]->sync_state = SBR_NOT_INITIALIZED;
  ------------------
  |  |   23|  8.35k|#define SBR_NOT_INITIALIZED 0
  ------------------
  752|  8.35k|        }
  753|   174k|      } else {
  754|  28.7k|        ptr_header_data[0]->sync_state = SBR_ACTIVE;
  ------------------
  |  |   25|  28.7k|#define SBR_ACTIVE 2
  ------------------
  755|  28.7k|      }
  756|   203k|    }
  757|       |
  758|   203k|    if ((num_channels == 2) && !(stereo || dual_mono)) {
  ------------------
  |  Branch (758:9): [True: 94.6k, False: 109k]
  |  Branch (758:34): [True: 72.1k, False: 22.4k]
  |  Branch (758:44): [True: 22.4k, False: 0]
  ------------------
  759|      0|      ixheaacd_downmix_to_monosbr(&core_sample_buf[slot_element], ch_fac);
  760|      0|    }
  761|       |
  762|   203k|    if ((!prev_stereo && !prev_ps_flag) && (ps_flag)) {
  ------------------
  |  Branch (762:10): [True: 183k, False: 19.7k]
  |  Branch (762:26): [True: 174k, False: 9.40k]
  |  Branch (762:44): [True: 829, False: 173k]
  ------------------
  763|    829|      WORD32 copy_size;
  764|    829|      if (down_samp_flag)
  ------------------
  |  Branch (764:11): [True: 212, False: 617]
  ------------------
  765|    212|        copy_size = QMF_FILTER_STATE_SYN_SIZE_DOWN_SAMPLED;
  ------------------
  |  |   39|    212|#define QMF_FILTER_STATE_SYN_SIZE_DOWN_SAMPLED (QMF_FILTER_STATE_SYN_SIZE / 2)
  |  |  ------------------
  |  |  |  |   32|    212|#define QMF_FILTER_STATE_SYN_SIZE 1280
  |  |  ------------------
  ------------------
  766|    617|      else
  767|    617|        copy_size = QMF_FILTER_STATE_SYN_SIZE;
  ------------------
  |  |   32|    617|#define QMF_FILTER_STATE_SYN_SIZE 1280
  ------------------
  768|       |
  769|    829|      memcpy(pstr_sbr_channel[1]->str_sbr_dec.str_synthesis_qmf_bank.filter_states,
  770|    829|             pstr_sbr_channel[0]->str_sbr_dec.str_synthesis_qmf_bank.filter_states,
  771|    829|             copy_size * sizeof(WORD16));
  772|       |
  773|    829|      pstr_sbr_channel[1]->str_sbr_dec.str_sbr_scale_fact.st_syn_scale =
  774|    829|          pstr_sbr_channel[0]->str_sbr_dec.str_sbr_scale_fact.st_syn_scale;
  775|    829|    }
  776|       |
  777|   203k|    if ((!prev_stereo && stereo && (num_channels == 2)) &&
  ------------------
  |  Branch (777:10): [True: 183k, False: 19.7k]
  |  Branch (777:26): [True: 53.0k, False: 130k]
  |  Branch (777:36): [True: 53.0k, False: 0]
  ------------------
  778|  53.0k|        (audio_object_type != AOT_ER_AAC_ELD)) {
  ------------------
  |  Branch (778:9): [True: 49.9k, False: 3.10k]
  ------------------
  779|  49.9k|      WORD32 copy_size;
  780|  49.9k|      if (down_samp_flag)
  ------------------
  |  Branch (780:11): [True: 28, False: 49.8k]
  ------------------
  781|     28|        copy_size = QMF_FILTER_STATE_SYN_SIZE_DOWN_SAMPLED;
  ------------------
  |  |   39|     28|#define QMF_FILTER_STATE_SYN_SIZE_DOWN_SAMPLED (QMF_FILTER_STATE_SYN_SIZE / 2)
  |  |  ------------------
  |  |  |  |   32|     28|#define QMF_FILTER_STATE_SYN_SIZE 1280
  |  |  ------------------
  ------------------
  782|  49.8k|      else
  783|  49.8k|        copy_size = QMF_FILTER_STATE_SYN_SIZE;
  ------------------
  |  |   32|  49.8k|#define QMF_FILTER_STATE_SYN_SIZE 1280
  ------------------
  784|       |
  785|  49.9k|      memcpy(pstr_sbr_channel[1]->str_sbr_dec.str_synthesis_qmf_bank.filter_states,
  786|  49.9k|             pstr_sbr_channel[0]->str_sbr_dec.str_synthesis_qmf_bank.filter_states,
  787|  49.9k|             copy_size * sizeof(WORD16));
  788|       |
  789|  49.9k|      pstr_sbr_channel[1]->str_sbr_dec.str_sbr_scale_fact.st_syn_scale =
  790|  49.9k|          pstr_sbr_channel[0]->str_sbr_dec.str_sbr_scale_fact.st_syn_scale;
  791|       |
  792|  49.9k|      memcpy(pstr_sbr_channel[1]->str_sbr_dec.str_codec_qmf_bank.anal_filter_states,
  793|  49.9k|             pstr_sbr_channel[0]->str_sbr_dec.str_codec_qmf_bank.anal_filter_states,
  794|  49.9k|             QMF_FILTER_STATE_ANA_SIZE * sizeof(WORD16));
  ------------------
  |  |   33|  49.9k|#define QMF_FILTER_STATE_ANA_SIZE 320
  ------------------
  795|       |
  796|  49.9k|      pstr_sbr_channel[1]->str_sbr_dec.str_sbr_scale_fact.st_lb_scale =
  797|  49.9k|          pstr_sbr_channel[0]->str_sbr_dec.str_sbr_scale_fact.st_lb_scale;
  798|       |
  799|  49.9k|      memcpy(pstr_sbr_channel[1]->str_sbr_dec.ptr_sbr_overlap_buf,
  800|  49.9k|             pstr_sbr_channel[0]->str_sbr_dec.ptr_sbr_overlap_buf,
  801|  49.9k|             MAX_OV_COLS * NO_SYNTHESIS_CHANNELS * sizeof(WORD32));
  ------------------
  |  |   70|  49.9k|#define MAX_OV_COLS 6
  ------------------
                           MAX_OV_COLS * NO_SYNTHESIS_CHANNELS * sizeof(WORD32));
  ------------------
  |  |   34|  49.9k|#define NO_SYNTHESIS_CHANNELS 64
  ------------------
  802|       |
  803|  49.9k|      pstr_sbr_channel[1]->str_sbr_dec.str_sbr_scale_fact.ov_lb_scale =
  804|  49.9k|          pstr_sbr_channel[0]->str_sbr_dec.str_sbr_scale_fact.ov_lb_scale;
  805|  49.9k|      pstr_sbr_channel[1]->str_sbr_dec.str_sbr_scale_fact.ov_hb_scale =
  806|  49.9k|          pstr_sbr_channel[0]->str_sbr_dec.str_sbr_scale_fact.ov_hb_scale;
  807|  49.9k|    }
  808|   203k|    pstr_sbr_channel[0]->str_sbr_dec.time_sample_buf = self->time_sample_buf[0];
  809|   203k|    if (self->pstr_ps_stereo_dec != NULL &&
  ------------------
  |  Branch (809:9): [True: 91.4k, False: 112k]
  ------------------
  810|  91.4k|        (ps_enable || self->enh_sbr_ps) && self->enh_sbr) {
  ------------------
  |  Branch (810:10): [True: 41.4k, False: 49.9k]
  |  Branch (810:23): [True: 0, False: 49.9k]
  |  Branch (810:44): [True: 41.4k, False: 0]
  ------------------
  811|  41.4k|      self->pstr_ps_stereo_dec->pp_qmf_buf_real[0] =
  812|  41.4k|          pstr_sbr_channel[0]->str_sbr_dec.pp_qmf_buf_real;
  813|  41.4k|      self->pstr_ps_stereo_dec->pp_qmf_buf_imag[0] =
  814|  41.4k|          pstr_sbr_channel[0]->str_sbr_dec.pp_qmf_buf_imag;
  815|  41.4k|      self->pstr_ps_stereo_dec->pp_qmf_buf_real[1] =
  816|  41.4k|          pstr_sbr_channel[1]->str_sbr_dec.pp_qmf_buf_real;
  817|  41.4k|      self->pstr_ps_stereo_dec->pp_qmf_buf_imag[1] =
  818|  41.4k|          pstr_sbr_channel[1]->str_sbr_dec.pp_qmf_buf_imag;
  819|  41.4k|      self->pstr_ps_stereo_dec->time_sample_buf[0] = self->time_sample_buf[0];
  820|  41.4k|      self->pstr_ps_stereo_dec->time_sample_buf[1] = self->time_sample_buf[1];
  821|  41.4k|    }
  822|   203k|  } else {
  823|      0|    for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (823:17): [True: 0, False: 0]
  ------------------
  824|      0|      ptr_frame_data[k] = (ia_sbr_frame_info_data_struct *)self->frame_buffer[k];
  825|       |
  826|      0|      pstr_sbr_channel[k] = self->pstr_sbr_channel[k];
  827|       |
  828|      0|      ptr_header_data[k] = self->pstr_sbr_header[k];
  829|      0|      ptr_header_data[k]->usac_flag = self->aot_usac_flag;
  830|      0|    }
  831|       |
  832|      0|    if ((p_sbr_bit_stream->no_elements) && (p_sbr_bit_stream->str_sbr_ele->size_payload > 0)) {
  ------------------
  |  Branch (832:9): [True: 0, False: 0]
  |  Branch (832:44): [True: 0, False: 0]
  ------------------
  833|      0|      num_elements = p_sbr_bit_stream->no_elements;
  834|      0|    } else {
  835|      0|      num_elements = 0;
  836|      0|    }
  837|       |
  838|      0|    for (k = 0; k < num_elements; k++) {
  ------------------
  |  Branch (838:17): [True: 0, False: 0]
  ------------------
  839|      0|      ia_sbr_element_stream_struct *ptr_bit_str_ele = &p_sbr_bit_stream->str_sbr_ele[k];
  840|      0|      ele_channels = (p_sbr_bit_stream->str_sbr_ele[0].sbr_ele_id == SBR_ID_CPE) ? 2 : 1;
  ------------------
  |  Branch (840:22): [True: 0, False: 0]
  ------------------
  841|      0|      {
  842|      0|        switch (ptr_bit_str_ele->sbr_ele_id) {
  843|      0|          case SBR_ID_SCE:
  ------------------
  |  Branch (843:11): [True: 0, False: 0]
  ------------------
  844|      0|          case SBR_ID_CCE:
  ------------------
  |  Branch (844:11): [True: 0, False: 0]
  ------------------
  845|      0|            if (num_channels == 2) {
  ------------------
  |  Branch (845:17): [True: 0, False: 0]
  ------------------
  846|      0|              dual_mono = 1;
  847|      0|            }
  848|      0|            stereo = 0;
  849|      0|            break;
  850|      0|          case SBR_ID_CPE:
  ------------------
  |  Branch (850:11): [True: 0, False: 0]
  ------------------
  851|      0|            stereo = 1;
  852|      0|            ptr_header_data[1] = ptr_header_data[0];
  853|       |
  854|      0|            memcpy(self->pstr_sbr_header[1], self->pstr_sbr_header[0],
  855|      0|                   sizeof(ia_sbr_header_data_struct));
  856|      0|            break;
  857|      0|          default:
  ------------------
  |  Branch (857:11): [True: 0, False: 0]
  ------------------
  858|      0|            frame_status = 0;
  859|      0|        }
  860|      0|      }
  861|      0|    }
  862|      0|  }
  863|   203k|  if (ec_flag) {
  ------------------
  |  Branch (863:7): [True: 0, False: 203k]
  ------------------
  864|      0|    for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (864:17): [True: 0, False: 0]
  ------------------
  865|      0|      if (pstr_sbr_channel[k]->str_sbr_dec.band_count == 0) {
  ------------------
  |  Branch (865:11): [True: 0, False: 0]
  ------------------
  866|      0|        pstr_sbr_channel[k]->str_sbr_dec.band_count =
  867|      0|            pstr_sbr_channel[k]->str_sbr_dec.str_codec_qmf_bank.no_channels;
  868|      0|      }
  869|      0|    }
  870|      0|  }
  871|   203k|  if (ec_flag && usac_flag && !first_frame && !self->sbr_parse_complete) {
  ------------------
  |  Branch (871:7): [True: 0, False: 203k]
  |  Branch (871:18): [True: 0, False: 0]
  |  Branch (871:31): [True: 0, False: 0]
  |  Branch (871:47): [True: 0, False: 0]
  ------------------
  872|      0|    return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
  873|      0|  }
  874|   203k|  if (!ec_flag || !first_frame || init_flag) {
  ------------------
  |  Branch (874:7): [True: 203k, False: 0]
  |  Branch (874:19): [True: 0, False: 0]
  |  Branch (874:35): [True: 0, False: 0]
  ------------------
  875|   203k|    if (pstr_drc_dec == NULL) {
  ------------------
  |  Branch (875:9): [True: 163k, False: 39.9k]
  ------------------
  876|   163k|      WORD32 err_code = 0;
  877|   163k|      err_code = ixheaacd_sbr_dec(
  878|   163k|          &pstr_sbr_channel[0]->str_sbr_dec, core_sample_buf + slot_element, ptr_header_data[0],
  879|   163k|          ptr_frame_data[0], pstr_sbr_channel[0]->pstr_prev_frame_data, self->pstr_ps_stereo_dec,
  880|   163k|          &pstr_sbr_channel[1]->str_sbr_dec.str_synthesis_qmf_bank,
  881|   163k|          &pstr_sbr_channel[1]->str_sbr_dec.str_sbr_scale_fact,
  882|   163k|          (ptr_header_data[0]->sync_state == SBR_ACTIVE), low_pow_flag,
  ------------------
  |  |   25|   163k|#define SBR_ACTIVE 2
  ------------------
  883|   163k|          sbr_scratch_struct->ptr_work_buf_core, self->pstr_sbr_tables, self->pstr_common_tables,
  884|   163k|          ch_fac, self->ptr_pvc_data_str, 0, NULL, audio_object_type, ldmps_present, self,
  885|   163k|          heaac_mps_present, ec_flag);
  886|   163k|      if (err_code) return err_code;
  ------------------
  |  Branch (886:11): [True: 54, False: 163k]
  ------------------
  887|   163k|      if (self->enh_sbr)
  ------------------
  |  Branch (887:11): [True: 163k, False: 0]
  ------------------
  888|   163k|      {
  889|   163k|        if (!self->enh_sbr_ps) {
  ------------------
  |  Branch (889:13): [True: 163k, False: 0]
  ------------------
  890|   163k|          if ((ptr_header_data[0]->sync_state == SBR_ACTIVE) && !ptr_frame_data[0]->mps_sbr_flag
  ------------------
  |  |   25|   163k|#define SBR_ACTIVE 2
  ------------------
  |  Branch (890:15): [True: 157k, False: 5.89k]
  |  Branch (890:65): [True: 119k, False: 37.2k]
  ------------------
  891|   119k|              && ch_fac != 2) {
  ------------------
  |  Branch (891:18): [True: 119k, False: 0]
  ------------------
  892|   119k|            ptr_header_data[0]->pstr_freq_band_data[0].qmf_sb_prev =
  893|   119k|                ptr_header_data[0]->pstr_freq_band_data->sub_band_start;
  894|   119k|          }
  895|   163k|        } else {
  896|      0|          if (ptr_header_data[0]->sync_state == SBR_ACTIVE) {
  ------------------
  |  |   25|      0|#define SBR_ACTIVE 2
  ------------------
  |  Branch (896:15): [True: 0, False: 0]
  ------------------
  897|      0|            ptr_header_data[0]->pstr_freq_band_data[0].qmf_sb_prev =
  898|      0|                ptr_header_data[0]->pstr_freq_band_data->sub_band_start;
  899|      0|          }
  900|      0|        }
  901|   163k|      }
  902|   163k|    } else {
  903|  39.9k|      WORD32 err_code = 0;
  904|  39.9k|      err_code = ixheaacd_sbr_dec(
  905|  39.9k|          &pstr_sbr_channel[0]->str_sbr_dec, core_sample_buf + slot_element, ptr_header_data[0],
  906|  39.9k|          ptr_frame_data[0], pstr_sbr_channel[0]->pstr_prev_frame_data, self->pstr_ps_stereo_dec,
  907|  39.9k|          &pstr_sbr_channel[1]->str_sbr_dec.str_synthesis_qmf_bank,
  908|  39.9k|          &pstr_sbr_channel[1]->str_sbr_dec.str_sbr_scale_fact,
  909|  39.9k|          (ptr_header_data[0]->sync_state == SBR_ACTIVE), low_pow_flag,
  ------------------
  |  |   25|  39.9k|#define SBR_ACTIVE 2
  ------------------
  910|  39.9k|          sbr_scratch_struct->ptr_work_buf_core, self->pstr_sbr_tables, self->pstr_common_tables,
  911|  39.9k|          ch_fac, self->ptr_pvc_data_str, pstr_drc_dec->drc_on,
  912|  39.9k|          pstr_drc_dec->str_drc_channel_data[0].drc_factors_sbr, audio_object_type, ldmps_present,
  913|  39.9k|          self, heaac_mps_present, ec_flag);
  914|  39.9k|      if (err_code) return err_code;
  ------------------
  |  Branch (914:11): [True: 45, False: 39.8k]
  ------------------
  915|  39.8k|      if (self->enh_sbr)
  ------------------
  |  Branch (915:11): [True: 39.8k, False: 0]
  ------------------
  916|  39.8k|      {
  917|  39.8k|        if (!self->enh_sbr_ps) {
  ------------------
  |  Branch (917:13): [True: 39.8k, False: 0]
  ------------------
  918|  39.8k|          if ((ptr_header_data[0]->sync_state == SBR_ACTIVE) && !ptr_frame_data[0]->mps_sbr_flag
  ------------------
  |  |   25|  39.8k|#define SBR_ACTIVE 2
  ------------------
  |  Branch (918:15): [True: 37.2k, False: 2.64k]
  |  Branch (918:65): [True: 37.2k, False: 0]
  ------------------
  919|  37.2k|              && num_channels != 2) {
  ------------------
  |  Branch (919:18): [True: 15.9k, False: 21.3k]
  ------------------
  920|  15.9k|            ptr_header_data[0]->pstr_freq_band_data[0].qmf_sb_prev =
  921|  15.9k|                ptr_header_data[0]->pstr_freq_band_data->sub_band_start;
  922|  15.9k|          }
  923|  39.8k|        } else {
  924|      0|          if (ptr_header_data[0]->sync_state == SBR_ACTIVE) {
  ------------------
  |  |   25|      0|#define SBR_ACTIVE 2
  ------------------
  |  Branch (924:15): [True: 0, False: 0]
  ------------------
  925|      0|            ptr_header_data[0]->pstr_freq_band_data[0].qmf_sb_prev =
  926|      0|                ptr_header_data[0]->pstr_freq_band_data->sub_band_start;
  927|      0|          }
  928|      0|        }
  929|  39.8k|      }
  930|  39.8k|    }
  931|       |
  932|   203k|    if (!down_mix_flag && (stereo || dual_mono) && (num_channels == 2)) {
  ------------------
  |  Branch (932:9): [True: 203k, False: 0]
  |  Branch (932:28): [True: 72.1k, False: 130k]
  |  Branch (932:38): [True: 22.4k, False: 108k]
  |  Branch (932:52): [True: 94.5k, False: 0]
  ------------------
  933|  94.5k|      pstr_sbr_channel[1]->str_sbr_dec.time_sample_buf = self->time_sample_buf[1];
  934|       |
  935|  94.5k|      if (ele_channels == 1 && usac_flag) {
  ------------------
  |  Branch (935:11): [True: 22.4k, False: 72.1k]
  |  Branch (935:32): [True: 22.4k, False: 0]
  ------------------
  936|  22.4k|        WORD32 err_code =
  937|  22.4k|            ixheaacd_esbr_dec(&pstr_sbr_channel[1]->str_sbr_dec, ptr_header_data[1],
  938|  22.4k|                              ptr_frame_data[1], (ptr_header_data[1]->sync_state == SBR_ACTIVE),
  ------------------
  |  |   25|  22.4k|#define SBR_ACTIVE 2
  ------------------
  939|  22.4k|                              low_pow_flag, self->pstr_sbr_tables, ch_fac);
  940|  22.4k|        if (err_code) return err_code;
  ------------------
  |  Branch (940:13): [True: 0, False: 22.4k]
  ------------------
  941|  72.1k|      } else {
  942|  72.1k|        if (pstr_drc_dec == NULL) {
  ------------------
  |  Branch (942:13): [True: 50.7k, False: 21.4k]
  ------------------
  943|  50.7k|          WORD32 err_code = ixheaacd_sbr_dec(
  944|  50.7k|              &pstr_sbr_channel[1]->str_sbr_dec, core_sample_buf + slot_element + 1,
  945|  50.7k|              ptr_header_data[1], ptr_frame_data[1], pstr_sbr_channel[1]->pstr_prev_frame_data,
  946|  50.7k|              NULL, NULL, NULL, (ptr_header_data[1]->sync_state == SBR_ACTIVE), low_pow_flag,
  ------------------
  |  |   25|  50.7k|#define SBR_ACTIVE 2
  ------------------
  947|  50.7k|              sbr_scratch_struct->ptr_work_buf_core, self->pstr_sbr_tables,
  948|  50.7k|              self->pstr_common_tables, ch_fac, self->ptr_pvc_data_str, 0, NULL,
  949|  50.7k|              audio_object_type, ldmps_present, self, heaac_mps_present, ec_flag);
  950|  50.7k|          if (err_code) return err_code;
  ------------------
  |  Branch (950:15): [True: 1, False: 50.7k]
  ------------------
  951|  50.7k|          if (self->enh_sbr)
  ------------------
  |  Branch (951:15): [True: 50.7k, False: 0]
  ------------------
  952|  50.7k|          {
  953|  50.7k|            if (!self->enh_sbr_ps) {
  ------------------
  |  Branch (953:17): [True: 50.7k, False: 0]
  ------------------
  954|  50.7k|              if ((ptr_header_data[1]->sync_state == SBR_ACTIVE) &&
  ------------------
  |  |   25|  50.7k|#define SBR_ACTIVE 2
  ------------------
  |  Branch (954:19): [True: 48.3k, False: 2.41k]
  ------------------
  955|  48.3k|                  !ptr_frame_data[0]->mps_sbr_flag) {
  ------------------
  |  Branch (955:19): [True: 11.1k, False: 37.2k]
  ------------------
  956|  11.1k|                ptr_header_data[1]->pstr_freq_band_data[0].qmf_sb_prev =
  957|  11.1k|                    ptr_header_data[1]->pstr_freq_band_data->sub_band_start;
  958|  11.1k|              }
  959|  50.7k|            } else {
  960|      0|              if (ptr_header_data[1]->sync_state == SBR_ACTIVE) {
  ------------------
  |  |   25|      0|#define SBR_ACTIVE 2
  ------------------
  |  Branch (960:19): [True: 0, False: 0]
  ------------------
  961|      0|                ptr_header_data[1]->pstr_freq_band_data[0].qmf_sb_prev =
  962|      0|                    ptr_header_data[1]->pstr_freq_band_data->sub_band_start;
  963|      0|              }
  964|      0|            }
  965|  50.7k|          }
  966|  50.7k|        } else {
  967|  21.4k|          WORD32 err_code = ixheaacd_sbr_dec(
  968|  21.4k|              &pstr_sbr_channel[1]->str_sbr_dec, core_sample_buf + slot_element + 1,
  969|  21.4k|              ptr_header_data[1], ptr_frame_data[1], pstr_sbr_channel[1]->pstr_prev_frame_data,
  970|  21.4k|              NULL, NULL, NULL, (ptr_header_data[1]->sync_state == SBR_ACTIVE), low_pow_flag,
  ------------------
  |  |   25|  21.4k|#define SBR_ACTIVE 2
  ------------------
  971|  21.4k|              sbr_scratch_struct->ptr_work_buf_core, self->pstr_sbr_tables,
  972|  21.4k|              self->pstr_common_tables, ch_fac, self->ptr_pvc_data_str, pstr_drc_dec->drc_on,
  973|  21.4k|              pstr_drc_dec->str_drc_channel_data[1].drc_factors_sbr, audio_object_type,
  974|  21.4k|              ldmps_present, self, heaac_mps_present, ec_flag);
  975|  21.4k|          if (err_code) return err_code;
  ------------------
  |  Branch (975:15): [True: 2, False: 21.4k]
  ------------------
  976|  21.4k|          if (self->enh_sbr)
  ------------------
  |  Branch (976:15): [True: 21.4k, False: 0]
  ------------------
  977|  21.4k|          {
  978|  21.4k|            if (!self->enh_sbr_ps) {
  ------------------
  |  Branch (978:17): [True: 21.4k, False: 0]
  ------------------
  979|  21.4k|              if ((ptr_header_data[1]->sync_state == SBR_ACTIVE) &&
  ------------------
  |  |   25|  21.4k|#define SBR_ACTIVE 2
  ------------------
  |  Branch (979:19): [True: 21.3k, False: 75]
  ------------------
  980|  21.3k|                  !ptr_frame_data[0]->mps_sbr_flag) {
  ------------------
  |  Branch (980:19): [True: 21.3k, False: 0]
  ------------------
  981|  21.3k|                ptr_header_data[1]->pstr_freq_band_data[0].qmf_sb_prev =
  982|  21.3k|                    ptr_header_data[1]->pstr_freq_band_data->sub_band_start;
  983|  21.3k|              }
  984|  21.4k|            } else {
  985|      0|              if (ptr_header_data[1]->sync_state == SBR_ACTIVE) {
  ------------------
  |  |   25|      0|#define SBR_ACTIVE 2
  ------------------
  |  Branch (985:19): [True: 0, False: 0]
  ------------------
  986|      0|                ptr_header_data[1]->pstr_freq_band_data[0].qmf_sb_prev =
  987|      0|                    ptr_header_data[1]->pstr_freq_band_data->sub_band_start;
  988|      0|              }
  989|      0|            }
  990|  21.4k|          }
  991|  21.4k|        }
  992|  72.1k|      }
  993|       |
  994|   108k|    } else {
  995|   108k|      if (audio_object_type != AOT_ER_AAC_ELD && audio_object_type != AOT_ER_AAC_LD)
  ------------------
  |  Branch (995:11): [True: 102k, False: 5.97k]
  |  Branch (995:50): [True: 102k, False: 0]
  ------------------
  996|       |
  997|   102k|      {
  998|   102k|        if (sub_d((WORD16)ptr_header_data[0]->channel_mode, PS_STEREO) == 0) {
  ------------------
  |  |   24|   102k|#define sub_d(a, b) ((a) - (b))
  ------------------
  |  Branch (998:13): [True: 8.21k, False: 94.2k]
  ------------------
  999|  8.21k|          num_channels = 2;
 1000|  8.21k|        }
 1001|   102k|        if (ptr_header_data[0]->enh_sbr_ps && self->enh_sbr) {
  ------------------
  |  Branch (1001:13): [True: 8.22k, False: 94.2k]
  |  Branch (1001:47): [True: 8.22k, False: 0]
  ------------------
 1002|  8.22k|          num_channels = 2;
 1003|  8.22k|        }
 1004|   102k|      }
 1005|   108k|    }
 1006|   203k|    *codec_num_channels = num_channels;
 1007|   203k|    self->sbr_mode = ptr_frame_data[0]->sbr_mode;
 1008|       |
 1009|   203k|    if ((audio_object_type == AOT_ER_AAC_ELD) || (audio_object_type == AOT_ER_AAC_LD) ||
  ------------------
  |  Branch (1009:9): [True: 28.2k, False: 174k]
  |  Branch (1009:50): [True: 0, False: 174k]
  ------------------
 1010|   174k|        !self->enh_sbr) {
  ------------------
  |  Branch (1010:9): [True: 0, False: 174k]
  ------------------
 1011|  28.2k|      if (pstr_drc_dec != NULL) {
  ------------------
  |  Branch (1011:11): [True: 26.9k, False: 1.30k]
  ------------------
 1012|  26.9k|        WORD32 i, j;
 1013|  75.1k|        for (i = 0; i < *codec_num_channels; i++) {
  ------------------
  |  Branch (1013:21): [True: 48.2k, False: 26.9k]
  ------------------
 1014|  1.59M|          for (j = 0; j < 32; j++) {
  ------------------
  |  Branch (1014:23): [True: 1.54M, False: 48.2k]
  ------------------
 1015|  1.54M|            memcpy(pstr_drc_dec->str_drc_channel_data[i].drc_factors_sbr[j],
 1016|  1.54M|                   pstr_drc_dec->str_drc_channel_data[i].drc_factors_sbr[j + 32],
 1017|  1.54M|                   64 * sizeof(WORD32));
 1018|  1.54M|          }
 1019|  48.2k|        }
 1020|  26.9k|      }
 1021|  28.2k|    }
 1022|   203k|    if (ec_flag) {
  ------------------
  |  Branch (1022:9): [True: 0, False: 203k]
  ------------------
 1023|      0|      self->band_count[0] = pstr_sbr_channel[0]->str_sbr_dec.band_count;
 1024|      0|      self->band_count[1] = pstr_sbr_channel[1]->str_sbr_dec.band_count;
 1025|      0|    }
 1026|   203k|  }
 1027|       |
 1028|   203k|  return SBRDEC_OK;
  ------------------
  |  |   33|   203k|#define SBRDEC_OK 0
  ------------------
 1029|   203k|}
ixheaacd_sbrdecoder.c:ixheaacd_sbr_dec_reset:
  109|  62.3k|                                     WORD32 *ptr_work_buf_core) {
  110|  62.3k|  WORD32 old_lsb, new_lsb;
  111|  62.3k|  WORD32 l;
  112|  62.3k|  WORD32 err = 0;
  113|  62.3k|  WORD32 num_time_slots = ptr_sbr_dec->str_codec_qmf_bank.num_time_slots;
  114|  62.3k|  WORD32 upsample_ratio_idx = ptr_header_data->sbr_ratio_idx;
  115|  62.3k|  WORD32 op_delay = 6 + SBR_HF_ADJ_OFFSET;
  ------------------
  |  |   99|  62.3k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
  116|  62.3k|  WORD32 hbe_flag = ptr_header_data->hbe_flag;
  117|  62.3k|  WORD32 usac_flag = ptr_header_data->usac_flag;
  118|       |
  119|  62.3k|  if (ptr_header_data->is_usf_4) {
  ------------------
  |  Branch (119:7): [True: 3.99k, False: 58.4k]
  ------------------
  120|  3.99k|    op_delay = op_delay + 6;
  121|  3.99k|  }
  122|       |
  123|  62.3k|  ixheaacd_reset_sbrenvelope_calc(&ptr_sbr_dec->str_sbr_calc_env);
  124|       |
  125|  62.3k|  new_lsb = ptr_header_data->pstr_freq_band_data->sub_band_start;
  126|  62.3k|  ptr_sbr_dec->str_synthesis_qmf_bank.lsb = new_lsb;
  127|  62.3k|  ptr_sbr_dec->str_synthesis_qmf_bank.usb =
  128|  62.3k|      ptr_header_data->pstr_freq_band_data->sub_band_end;
  129|       |
  130|  62.3k|  old_lsb = ptr_sbr_dec->str_synthesis_qmf_bank.lsb;
  131|  62.3k|  ptr_sbr_dec->str_codec_qmf_bank.lsb = 0;
  132|  62.3k|  ptr_sbr_dec->str_codec_qmf_bank.usb = old_lsb;
  133|       |
  134|  62.3k|  {
  135|  62.3k|    WORD32 *plpc_filt_states_real =
  136|  62.3k|        &ptr_sbr_dec->str_hf_generator.lpc_filt_states_real[0][old_lsb];
  137|  62.3k|    WORD32 *plpc_filt_states_real_1 =
  138|  62.3k|        &ptr_sbr_dec->str_hf_generator.lpc_filt_states_real[1][old_lsb];
  139|       |
  140|  62.3k|    WORD32 *plpc_filt_states_imag =
  141|  62.3k|        &ptr_sbr_dec->str_hf_generator.lpc_filt_states_imag[0][old_lsb];
  142|  62.3k|    WORD32 *plpc_filt_states_imag_1 =
  143|  62.3k|        &ptr_sbr_dec->str_hf_generator.lpc_filt_states_imag[1][old_lsb];
  144|       |
  145|  62.3k|    for (l = new_lsb - old_lsb - 1; l >= 0; l--) {
  ------------------
  |  Branch (145:37): [True: 0, False: 62.3k]
  ------------------
  146|      0|      *plpc_filt_states_real++ = *plpc_filt_states_real_1++ = 0L;
  147|       |
  148|      0|      if (!low_pow_flag) {
  ------------------
  |  Branch (148:11): [True: 0, False: 0]
  ------------------
  149|      0|        *plpc_filt_states_imag++ = *plpc_filt_states_imag_1++ = 0L;
  150|      0|      }
  151|      0|    }
  152|  62.3k|  }
  153|  62.3k|  if (1) {
  ------------------
  |  Branch (153:7): [True: 62.3k, Folded]
  ------------------
  154|  62.3k|    WORD32 start_band;
  155|  62.3k|    WORD32 stop_band;
  156|  62.3k|    WORD32 start_slot = SBR_HF_ADJ_OFFSET;
  ------------------
  |  |   99|  62.3k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
  157|  62.3k|    WORD32 k;
  158|       |
  159|  62.3k|    start_band = ptr_header_data->pstr_freq_band_data->qmf_sb_prev;
  160|  62.3k|    stop_band = ptr_header_data->pstr_freq_band_data->sub_band_start;
  161|  62.3k|    if (usac_flag && !hbe_flag) {
  ------------------
  |  Branch (161:9): [True: 45.3k, False: 17.0k]
  |  Branch (161:22): [True: 20.4k, False: 24.8k]
  ------------------
  162|  61.4k|      for (l = 0; l < SBR_HF_ADJ_OFFSET; l++) {
  ------------------
  |  |   99|  61.4k|#define SBR_HF_ADJ_OFFSET 2
  ------------------
  |  Branch (162:19): [True: 40.9k, False: 20.4k]
  ------------------
  163|   116k|        for (k = start_band; k < stop_band; k++) {
  ------------------
  |  Branch (163:30): [True: 75.4k, False: 40.9k]
  ------------------
  164|  75.4k|          ptr_sbr_dec->qmf_buf_real[l][k] = 0.0;
  165|  75.4k|          ptr_sbr_dec->qmf_buf_imag[l][k] = 0.0;
  166|  75.4k|        }
  167|  40.9k|      }
  168|   143k|      for (l = start_slot; l < op_delay; l++) {
  ------------------
  |  Branch (168:28): [True: 123k, False: 20.4k]
  ------------------
  169|   350k|        for (k = start_band; k < stop_band; k++) {
  ------------------
  |  Branch (169:30): [True: 227k, False: 123k]
  ------------------
  170|   227k|          ptr_sbr_dec->qmf_buf_real[l][k] = 0.0;
  171|   227k|          ptr_sbr_dec->qmf_buf_imag[l][k] = 0.0;
  172|   227k|        }
  173|   123k|      }
  174|  20.4k|    }
  175|  62.3k|    if (ptr_sbr_dec->p_hbe_txposer != NULL && (usac_flag || hbe_flag)) {
  ------------------
  |  Branch (175:9): [True: 62.3k, False: 0]
  |  Branch (175:48): [True: 45.3k, False: 17.0k]
  |  Branch (175:61): [True: 535, False: 16.5k]
  ------------------
  176|  45.8k|      WORD32 k, i;
  177|  45.8k|      WORD32 dft_hbe_flag = ptr_header_data->esbr_hq;
  178|  45.8k|      if (dft_hbe_flag == 1) {
  ------------------
  |  Branch (178:11): [True: 0, False: 45.8k]
  ------------------
  179|      0|        err = ixheaacd_dft_hbe_data_reinit(
  180|      0|            ptr_sbr_dec->p_hbe_txposer,
  181|      0|            ptr_header_data->pstr_freq_band_data->freq_band_table,
  182|      0|            ptr_header_data->pstr_freq_band_data->num_sf_bands);
  183|  45.8k|      } else {
  184|  45.8k|        err = ixheaacd_qmf_hbe_data_reinit(
  185|  45.8k|            ptr_sbr_dec->p_hbe_txposer,
  186|  45.8k|            ptr_header_data->pstr_freq_band_data->freq_band_table,
  187|  45.8k|            ptr_header_data->pstr_freq_band_data->num_sf_bands,
  188|  45.8k|            ptr_header_data->is_usf_4);
  189|  45.8k|      }
  190|  45.8k|      if (err) return err;
  ------------------
  |  Branch (190:11): [True: 0, False: 45.8k]
  ------------------
  191|       |
  192|   137k|      for (k = 0; k < 2; k++) {
  ------------------
  |  Branch (192:19): [True: 91.6k, False: 45.8k]
  ------------------
  193|  91.6k|        if (!((upsample_ratio_idx == SBR_UPSAMPLE_IDX_4_1) && (k == 0))) {
  ------------------
  |  |   28|  91.6k|#define SBR_UPSAMPLE_IDX_4_1 3
  ------------------
  |  Branch (193:15): [True: 7.98k, False: 83.7k]
  |  Branch (193:63): [True: 3.99k, False: 3.99k]
  ------------------
  194|  87.7k|          WORD32 xpos_delay = num_time_slots * k;
  195|  87.7k|          if (upsample_ratio_idx == SBR_UPSAMPLE_IDX_4_1) {
  ------------------
  |  |   28|  87.7k|#define SBR_UPSAMPLE_IDX_4_1 3
  ------------------
  |  Branch (195:15): [True: 3.99k, False: 83.7k]
  ------------------
  196|  3.99k|            xpos_delay = num_time_slots * k - 32;
  197|  3.99k|          }
  198|       |
  199|   789k|          for (i = 0; i < 8; i++) {
  ------------------
  |  Branch (199:23): [True: 701k, False: 87.7k]
  ------------------
  200|   701k|            memmove(ptr_sbr_dec->ph_vocod_qmf_real[i],
  201|   701k|                    ptr_sbr_dec->ph_vocod_qmf_real[num_time_slots + i],
  202|   701k|                    64 * sizeof(FLOAT32));
  203|   701k|            memmove(ptr_sbr_dec->ph_vocod_qmf_imag[i],
  204|   701k|                    ptr_sbr_dec->ph_vocod_qmf_imag[num_time_slots + i],
  205|   701k|                    64 * sizeof(FLOAT32));
  206|   701k|          }
  207|  87.7k|          if (dft_hbe_flag == 1) {
  ------------------
  |  Branch (207:15): [True: 0, False: 87.7k]
  ------------------
  208|      0|            err = ixheaacd_dft_hbe_apply(
  209|      0|                ptr_sbr_dec->p_hbe_txposer,
  210|      0|                ptr_sbr_dec->qmf_buf_real + op_delay + xpos_delay,
  211|      0|                ptr_sbr_dec->qmf_buf_imag + op_delay + xpos_delay, num_time_slots,
  212|      0|                ptr_sbr_dec->ph_vocod_qmf_real + op_delay,
  213|      0|                ptr_sbr_dec->ph_vocod_qmf_imag + op_delay, pitch_in_bins,
  214|      0|                (FLOAT32 *)ptr_work_buf_core);
  215|      0|            if (err)
  ------------------
  |  Branch (215:17): [True: 0, False: 0]
  ------------------
  216|      0|                return err;
  217|  87.7k|          } else {
  218|  87.7k|            err = ixheaacd_qmf_hbe_apply(
  219|  87.7k|                ptr_sbr_dec->p_hbe_txposer,
  220|  87.7k|                ptr_sbr_dec->qmf_buf_real + op_delay + xpos_delay,
  221|  87.7k|                ptr_sbr_dec->qmf_buf_imag + op_delay + xpos_delay, num_time_slots,
  222|  87.7k|                ptr_sbr_dec->ph_vocod_qmf_real + op_delay,
  223|  87.7k|                ptr_sbr_dec->ph_vocod_qmf_imag + op_delay, pitch_in_bins,
  224|  87.7k|                ptr_header_data);
  225|  87.7k|          if (err) return err;
  ------------------
  |  Branch (225:15): [True: 0, False: 87.7k]
  ------------------
  226|  87.7k|          }
  227|       |
  228|  87.7k|          if (upsample_ratio_idx == SBR_UPSAMPLE_IDX_4_1) {
  ------------------
  |  |   28|  87.7k|#define SBR_UPSAMPLE_IDX_4_1 3
  ------------------
  |  Branch (228:15): [True: 3.99k, False: 83.7k]
  ------------------
  229|  3.99k|            ixheaacd_hbe_repl_spec(&ptr_sbr_dec->p_hbe_txposer->x_over_qmf[0],
  230|  3.99k|                                   ptr_sbr_dec->ph_vocod_qmf_real + op_delay,
  231|  3.99k|                                   ptr_sbr_dec->ph_vocod_qmf_imag + op_delay,
  232|  3.99k|                                   num_time_slots,
  233|  3.99k|                                   ptr_sbr_dec->p_hbe_txposer->max_stretch);
  234|  3.99k|          }
  235|  87.7k|        }
  236|  91.6k|      }
  237|  45.8k|    }
  238|  62.3k|  }
  239|       |
  240|  62.3k|  if (!usac_flag) {
  ------------------
  |  Branch (240:7): [True: 17.0k, False: 45.3k]
  ------------------
  241|  17.0k|    err |= ixheaacd_reset_hf_generator(&ptr_sbr_dec->str_hf_generator,
  242|  17.0k|                                       ptr_header_data, audio_object_type);
  243|       |
  244|  17.0k|    ixheaacd_derive_lim_band_tbl(
  245|  17.0k|        ptr_header_data,
  246|  17.0k|        ptr_sbr_dec->str_hf_generator.pstr_settings->str_patch_param,
  247|  17.0k|        ptr_sbr_dec->str_hf_generator.pstr_settings->num_patches,
  248|  17.0k|        pstr_common_tables);
  249|  17.0k|  }
  250|       |
  251|  62.3k|  return err;
  252|  62.3k|}

ixheaacd_calc_grp_offset:
   57|  58.5k|VOID ixheaacd_calc_grp_offset(ia_sfb_info_struct *ptr_sfb_info, pUWORD8 group) {
   58|  58.5k|  WORD32 group_offset;
   59|  58.5k|  WORD32 group_idx;
   60|  58.5k|  WORD32 ixheaacd_drc_offset;
   61|  58.5k|  WORD16 *group_offset_p;
   62|  58.5k|  WORD32 sfb, len;
   63|       |
   64|  58.5k|  group_offset = 0;
   65|  58.5k|  group_idx = 0;
   66|   331k|  do {
   67|   331k|    ptr_sfb_info->group_len[group_idx] = group[group_idx] - group_offset;
   68|   331k|    group_offset = group[group_idx];
   69|   331k|    group_idx++;
   70|   331k|  } while (group_offset < 8);
  ------------------
  |  Branch (70:12): [True: 273k, False: 58.5k]
  ------------------
   71|  58.5k|  ptr_sfb_info->num_groups = group_idx;
   72|  58.5k|  group_offset_p = ptr_sfb_info->sfb_idx_tbl;
   73|  58.5k|  ixheaacd_drc_offset = 0;
   74|   390k|  for (group_idx = 0; group_idx < ptr_sfb_info->num_groups; group_idx++) {
  ------------------
  |  Branch (74:23): [True: 331k, False: 58.5k]
  ------------------
   75|   331k|    len = ptr_sfb_info->group_len[group_idx];
   76|  5.24M|    for (sfb = 0; sfb < ptr_sfb_info->sfb_per_sbk; sfb++) {
  ------------------
  |  Branch (76:19): [True: 4.91M, False: 331k]
  ------------------
   77|  4.91M|      ixheaacd_drc_offset += ptr_sfb_info->sfb_width[sfb] * len;
   78|  4.91M|      *group_offset_p++ = ixheaacd_drc_offset;
   79|  4.91M|    }
   80|   331k|  }
   81|  58.5k|}
ixheaacd_read_tns_u:
   85|  41.9k|                         ia_bit_buf_struct *it_bit_buff) {
   86|  41.9k|  WORD32 j, k, top, coef_res, resolution, compress;
   87|  41.9k|  WORD32 short_flag, i;
   88|  41.9k|  WORD16 *sp, tmp, s_mask, n_mask;
   89|  41.9k|  ia_tns_filter_struct *tns_filt;
   90|  41.9k|  ia_tns_info_struct *pstr_tns_info;
   91|  41.9k|  static const WORD16 sgn_mask[] = {0x2, 0x4, 0x8};
   92|  41.9k|  static const WORD16 neg_mask[] = {(WORD16)0xfffc, (WORD16)0xfff8,
   93|  41.9k|                                    (WORD16)0xfff0};
   94|       |
   95|  41.9k|  WORD16 n_filt_bits;
   96|  41.9k|  WORD16 start_band_bits;
   97|  41.9k|  WORD16 order_bits;
   98|       |
   99|  41.9k|  short_flag = (!ptr_sfb_info->islong);
  100|  41.9k|  pstr_tns_frame_info->n_subblocks = ptr_sfb_info->max_win_len;
  101|       |
  102|  41.9k|  if (!short_flag) {
  ------------------
  |  Branch (102:7): [True: 14.7k, False: 27.1k]
  ------------------
  103|  14.7k|    n_filt_bits = 2;
  104|  14.7k|    start_band_bits = 6;
  105|  14.7k|    order_bits = 4;
  106|  27.1k|  } else {
  107|  27.1k|    n_filt_bits = 1;
  108|  27.1k|    start_band_bits = 4;
  109|  27.1k|    order_bits = 3;
  110|  27.1k|  }
  111|       |
  112|   273k|  for (i = 0; i < pstr_tns_frame_info->n_subblocks; i++) {
  ------------------
  |  Branch (112:15): [True: 232k, False: 41.9k]
  ------------------
  113|   232k|    pstr_tns_info = &pstr_tns_frame_info->str_tns_info[i];
  114|   232k|    if (!(pstr_tns_info->n_filt =
  ------------------
  |  Branch (114:9): [True: 143k, False: 88.8k]
  ------------------
  115|   232k|              ixheaacd_read_bits_buf(it_bit_buff, n_filt_bits)))
  116|   143k|      continue;
  117|       |
  118|  88.8k|    pstr_tns_info->coef_res = coef_res =
  119|  88.8k|        ixheaacd_read_bits_buf(it_bit_buff, 1) + 3;
  120|  88.8k|    top = ptr_sfb_info->sfb_per_sbk;
  121|  88.8k|    tns_filt = &pstr_tns_info->str_filter[0];
  122|       |
  123|   186k|    for (j = pstr_tns_info->n_filt; j > 0; j--) {
  ------------------
  |  Branch (123:37): [True: 97.8k, False: 88.8k]
  ------------------
  124|  97.8k|      tns_filt->stop_band = top;
  125|  97.8k|      top = tns_filt->start_band =
  126|  97.8k|          top - ixheaacd_read_bits_buf(it_bit_buff, start_band_bits);
  127|  97.8k|      tns_filt->order = ixheaacd_read_bits_buf(it_bit_buff, order_bits);
  128|       |
  129|  97.8k|      if (tns_filt->order) {
  ------------------
  |  Branch (129:11): [True: 92.1k, False: 5.63k]
  ------------------
  130|  92.1k|        tns_filt->direction = ixheaacd_read_bits_buf(it_bit_buff, 1);
  131|  92.1k|        compress = ixheaacd_read_bits_buf(it_bit_buff, 1);
  132|  92.1k|        resolution = coef_res - compress;
  133|  92.1k|        s_mask = sgn_mask[resolution - 2];
  134|  92.1k|        n_mask = neg_mask[resolution - 2];
  135|  92.1k|        sp = tns_filt->coef;
  136|       |
  137|   439k|        for (k = tns_filt->order; k > 0; k--) {
  ------------------
  |  Branch (137:35): [True: 347k, False: 92.1k]
  ------------------
  138|   347k|          tmp = ixheaacd_read_bits_buf(it_bit_buff, resolution);
  139|   347k|          *sp++ = (tmp & s_mask) ? (tmp | n_mask) : tmp;
  ------------------
  |  Branch (139:19): [True: 140k, False: 206k]
  ------------------
  140|   347k|        }
  141|  92.1k|      }
  142|       |
  143|  97.8k|      tns_filt++;
  144|  97.8k|    }
  145|  88.8k|  }
  146|  41.9k|}
ixheaacd_scale_factor_data:
  149|   230k|                                WORD8 *ptr_code_book) {
  150|   230k|  WORD band;
  151|   230k|  WORD sect_cb;
  152|   230k|  WORD sect_len;
  153|   230k|  WORD8 *ptr_codebook = ptr_code_book;
  154|   230k|  WORD8 *temp_ptr_codebook = ptr_codebook;
  155|   230k|  WORD32 win_group = info->max_win_len;
  156|       |
  157|   230k|  memset(ptr_codebook, 0, 128);
  158|       |
  159|   230k|  band = 0;
  160|  1.03M|  while (band < tot_sfb || win_group != 0) {
  ------------------
  |  Branch (160:10): [True: 348k, False: 687k]
  |  Branch (160:28): [True: 457k, False: 230k]
  ------------------
  161|   806k|    sect_cb = 11;
  162|   806k|    sect_len = max_sfb;
  163|       |
  164|   806k|    band = band + sfb_per_sbk;
  165|       |
  166|   806k|    sect_len = sect_len - 1;
  167|  4.85M|    for (; sect_len >= 0; sect_len--) {
  ------------------
  |  Branch (167:12): [True: 4.04M, False: 806k]
  ------------------
  168|  4.04M|      *temp_ptr_codebook++ = sect_cb;
  169|  4.04M|    }
  170|   806k|    ptr_codebook += 16;
  171|   806k|    temp_ptr_codebook = ptr_codebook;
  172|   806k|    win_group--;
  173|   806k|  }
  174|   230k|  return;
  175|   230k|}
ixheaacd_win_seq_select:
  179|   196k|                        WORD32 window_sequence_last) {
  180|   196k|  WORD32 window_sequence;
  181|       |
  182|   196k|  switch (window_sequence_curr) {
  183|  95.8k|    case ONLY_LONG_SEQUENCE:
  ------------------
  |  |  100|  95.8k|#define ONLY_LONG_SEQUENCE 0
  ------------------
  |  Branch (183:5): [True: 95.8k, False: 100k]
  ------------------
  184|  95.8k|      window_sequence = ONLY_LONG_SEQUENCE;
  ------------------
  |  |  100|  95.8k|#define ONLY_LONG_SEQUENCE 0
  ------------------
  185|  95.8k|      break;
  186|       |
  187|  26.2k|    case LONG_START_SEQUENCE:
  ------------------
  |  |  101|  26.2k|#define LONG_START_SEQUENCE 1
  ------------------
  |  Branch (187:5): [True: 26.2k, False: 169k]
  ------------------
  188|  26.2k|      if ((window_sequence_last == LONG_START_SEQUENCE) ||
  ------------------
  |  |  101|  26.2k|#define LONG_START_SEQUENCE 1
  ------------------
  |  Branch (188:11): [True: 877, False: 25.4k]
  ------------------
  189|  25.4k|          (window_sequence_last == EIGHT_SHORT_SEQUENCE) ||
  ------------------
  |  |  102|  25.4k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  |  Branch (189:11): [True: 4.83k, False: 20.5k]
  ------------------
  190|  22.2k|          (window_sequence_last == STOP_START_SEQUENCE)) {
  ------------------
  |  |  104|  20.5k|#define STOP_START_SEQUENCE 4
  ------------------
  |  Branch (190:11): [True: 16.5k, False: 3.99k]
  ------------------
  191|  22.2k|        window_sequence = STOP_START_SEQUENCE;
  ------------------
  |  |  104|  22.2k|#define STOP_START_SEQUENCE 4
  ------------------
  192|  22.2k|      } else {
  193|  3.99k|        window_sequence = LONG_START_SEQUENCE;
  ------------------
  |  |  101|  3.99k|#define LONG_START_SEQUENCE 1
  ------------------
  194|  3.99k|      }
  195|  26.2k|      break;
  196|       |
  197|  15.4k|    case LONG_STOP_SEQUENCE:
  ------------------
  |  |  103|  15.4k|#define LONG_STOP_SEQUENCE 3
  ------------------
  |  Branch (197:5): [True: 15.4k, False: 180k]
  ------------------
  198|  15.4k|      window_sequence = LONG_STOP_SEQUENCE;
  ------------------
  |  |  103|  15.4k|#define LONG_STOP_SEQUENCE 3
  ------------------
  199|  15.4k|      break;
  200|       |
  201|  58.5k|    case EIGHT_SHORT_SEQUENCE:
  ------------------
  |  |  102|  58.5k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  |  Branch (201:5): [True: 58.5k, False: 137k]
  ------------------
  202|  58.5k|      window_sequence = EIGHT_SHORT_SEQUENCE;
  ------------------
  |  |  102|  58.5k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  203|  58.5k|      break;
  204|       |
  205|      0|    default:
  ------------------
  |  Branch (205:5): [True: 0, False: 196k]
  ------------------
  206|      0|      return -1;
  207|   196k|  }
  208|       |
  209|   196k|  return window_sequence;
  210|   196k|}
ixheaacd_tns_reset:
  213|   184k|                        ia_tns_frame_info_struct *pstr_tns_frame_info) {
  214|   184k|  WORD32 s;
  215|       |
  216|   184k|  pstr_tns_frame_info->n_subblocks = ptr_sfb_info->max_win_len;
  217|   733k|  for (s = 0; s < pstr_tns_frame_info->n_subblocks; s++)
  ------------------
  |  Branch (217:15): [True: 548k, False: 184k]
  ------------------
  218|   548k|    pstr_tns_frame_info->str_tns_info[s].n_filt = 0;
  219|   184k|}
ixheaacd_section_data:
  224|   230k|                           WORD8 *ptr_code_book) {
  225|   230k|  WORD32 band;
  226|   230k|  WORD16 position = 0;
  227|   230k|  WORD32 group;
  228|   230k|  WORD16 factor = global_gain;
  229|   230k|  WORD8 *temp_codebook_ptr;
  230|   230k|  WORD16 *ptr_scale_fac, *temp_ptr_scale_fac;
  231|   230k|  WORD16 norm_val;
  232|   230k|  WORD32 window_grps, trans_sfb;
  233|   230k|  WORD16 index, length;
  234|   230k|  const UWORD16 *hscf = usac_data->huffman_code_book_scl;
  235|   230k|  const UWORD32 *idx_tab = usac_data->huffman_code_book_scl_index;
  236|       |
  237|   230k|  WORD32 start_bit_pos = g_bs->bit_pos;
  238|   230k|  UWORD8 *start_read_pos = g_bs->ptr_read_next;
  239|   230k|  UWORD8 *ptr_read_next = g_bs->ptr_read_next;
  240|   230k|  WORD32 bit_pos = 7 - g_bs->bit_pos;
  241|   230k|  WORD32 is_1_group = 1;
  242|       |
  243|   230k|  WORD32 bb = 0, i;
  244|   230k|  WORD32 increment;
  245|   230k|  WORD32 read_word =
  246|   230k|      ixheaacd_aac_showbits_32(ptr_read_next, g_bs->cnt_bits, &increment);
  247|   230k|  ptr_read_next = g_bs->ptr_read_next + increment;
  248|       |
  249|   230k|  trans_sfb = info->sfb_per_sbk;
  250|   230k|  temp_ptr_scale_fac = factors;
  251|   230k|  window_grps = info->max_win_len;
  252|   230k|  memset(factors, 0, MAXBANDS);
  253|   230k|  band = trans_sfb - 1;
  254|       |
  255|   826k|  for (group = 0; group < window_grps;) {
  ------------------
  |  Branch (255:19): [True: 595k, False: 230k]
  ------------------
  256|   595k|    temp_codebook_ptr = &ptr_code_book[group * 16];
  257|   595k|    ptr_scale_fac = temp_ptr_scale_fac;
  258|   595k|    group = *groups++;
  259|  13.5M|    for (band = trans_sfb - 1; band >= 0; band--) {
  ------------------
  |  Branch (259:32): [True: 12.9M, False: 595k]
  ------------------
  260|  12.9M|      WORD32 cb_num = *temp_codebook_ptr++;
  261|       |
  262|  12.9M|      if ((band == trans_sfb - 1) && (is_1_group == 1)) {
  ------------------
  |  Branch (262:11): [True: 595k, False: 12.3M]
  |  Branch (262:38): [True: 230k, False: 365k]
  ------------------
  263|   230k|        *temp_ptr_scale_fac = factor;
  264|   230k|        temp_ptr_scale_fac++;
  265|   230k|        continue;
  266|   230k|      }
  267|       |
  268|  12.6M|      if (cb_num == ZERO_HCB)
  ------------------
  |  |   33|  12.6M|#define ZERO_HCB 0
  ------------------
  |  Branch (268:11): [True: 10.1M, False: 2.50M]
  ------------------
  269|  10.1M|        *temp_ptr_scale_fac++ = 0;
  270|  2.50M|      else {
  271|  2.50M|        WORD32 pns_band;
  272|  2.50M|        WORD16 curr_energy = 0;
  273|       |
  274|  2.50M|        UWORD32 read_word1;
  275|       |
  276|  2.50M|        read_word1 = read_word << bit_pos;
  277|       |
  278|  2.50M|        ixheaacd_huffman_decode(read_word1, &index, &length, hscf, idx_tab);
  279|       |
  280|  2.50M|        bit_pos += length;
  281|  2.50M|        ixheaacd_aac_read_byte_corr1(&ptr_read_next, &bit_pos, &read_word,
  282|  2.50M|                                     g_bs->ptr_bit_buf_end);
  283|  2.50M|        norm_val = index - 60;
  284|       |
  285|  2.50M|        if (cb_num > NOISE_HCB) {
  ------------------
  |  |   38|  2.50M|#define NOISE_HCB 13
  ------------------
  |  Branch (285:13): [True: 0, False: 2.50M]
  ------------------
  286|      0|          position = position + norm_val;
  287|      0|          *temp_ptr_scale_fac++ = -position;
  288|       |
  289|  2.50M|        } else if (cb_num < NOISE_HCB) {
  ------------------
  |  |   38|  2.50M|#define NOISE_HCB 13
  ------------------
  |  Branch (289:20): [True: 2.50M, False: 0]
  ------------------
  290|  2.50M|          factor = factor + norm_val;
  291|  2.50M|          *temp_ptr_scale_fac++ = factor;
  292|       |
  293|  2.50M|        } else {
  294|      0|          curr_energy += norm_val;
  295|       |
  296|      0|          pns_band = (group << 4) + trans_sfb - band - 1;
  297|       |
  298|      0|          temp_ptr_scale_fac[pns_band] = curr_energy;
  299|       |
  300|      0|          temp_ptr_scale_fac++;
  301|      0|        }
  302|  2.50M|      }
  303|  12.6M|    }
  304|   595k|    is_1_group = 0;
  305|       |
  306|   595k|    if (!(info->islong)) {
  ------------------
  |  Branch (306:9): [True: 448k, False: 147k]
  ------------------
  307|   658k|      for (bb++; bb < group; bb++) {
  ------------------
  |  Branch (307:18): [True: 210k, False: 448k]
  ------------------
  308|  3.33M|        for (i = 0; i < trans_sfb; i++) {
  ------------------
  |  Branch (308:21): [True: 3.12M, False: 210k]
  ------------------
  309|  3.12M|          ptr_scale_fac[i + trans_sfb] = ptr_scale_fac[i];
  310|  3.12M|        }
  311|   210k|        temp_ptr_scale_fac += trans_sfb;
  312|   210k|        ptr_scale_fac += trans_sfb;
  313|   210k|      }
  314|   448k|    }
  315|   595k|  }
  316|   230k|  ptr_read_next = ptr_read_next - increment;
  317|   230k|  ixheaacd_aac_read_byte_corr1(&ptr_read_next, &bit_pos, &read_word,
  318|   230k|                               g_bs->ptr_bit_buf_end);
  319|       |
  320|   230k|  g_bs->ptr_read_next = ptr_read_next;
  321|       |
  322|   230k|  g_bs->bit_pos = 7 - bit_pos;
  323|   230k|  {
  324|   230k|    WORD32 bits_consumed;
  325|   230k|    bits_consumed = (WORD32)(((g_bs->ptr_read_next - start_read_pos) << 3) +
  326|   230k|                             (start_bit_pos - g_bs->bit_pos));
  327|   230k|    g_bs->cnt_bits -= bits_consumed;
  328|   230k|  }
  329|   230k|}
ixheaacd_fd_channel_stream:
  339|   230k|{
  340|   230k|  WORD32 i;
  341|       |
  342|   230k|  WORD32 tot_sfb;
  343|   230k|  WORD32 noise_level = 0;
  344|   230k|  WORD32 arith_reset_flag;
  345|       |
  346|   230k|  WORD32 arth_size;
  347|   230k|  WORD16 global_gain;
  348|   230k|  WORD32 max_spec_coefficients;
  349|   230k|  WORD32 err_code = 0;
  350|   230k|  WORD32 noise_offset;
  351|       |
  352|   230k|  WORD32 *fac_data;
  353|   230k|  ia_sfb_info_struct *info;
  354|       |
  355|   230k|  WORD8 *ptr_code_book = (WORD8 *)&usac_data->scratch_buffer;
  356|       |
  357|   230k|  global_gain = ixheaacd_read_bits_buf(it_bit_buff, 8);
  358|       |
  359|   230k|  if (noise_filling) {
  ------------------
  |  Branch (359:7): [True: 148k, False: 81.9k]
  ------------------
  360|   148k|    noise_level = ixheaacd_read_bits_buf(it_bit_buff, 3);
  361|   148k|    noise_offset = ixheaacd_read_bits_buf(it_bit_buff, 5);
  362|       |
  363|   148k|  } else {
  364|  81.9k|    noise_level = 0;
  365|  81.9k|    noise_offset = 0;
  366|  81.9k|  }
  367|       |
  368|   230k|  if (!pstr_core_coder->common_window) {
  ------------------
  |  Branch (368:7): [True: 161k, False: 68.4k]
  ------------------
  369|   161k|    err_code = ixheaacd_ics_info(usac_data, chn, max_sfb, it_bit_buff,
  370|   161k|                                 window_sequence_last);
  371|       |
  372|   161k|    if (err_code == -1) {
  ------------------
  |  Branch (372:9): [True: 254, False: 161k]
  ------------------
  373|    254|      if (usac_data->ec_flag) {
  ------------------
  |  Branch (373:11): [True: 0, False: 254]
  ------------------
  374|      0|        memcpy(usac_data->max_sfb, pstr_core_coder->max_sfb, sizeof(pstr_core_coder->max_sfb));
  375|      0|        longjmp(*(it_bit_buff->xaac_jmp_buf),
  376|      0|                IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES);
  ------------------
  |  |   98|      0|#define IA_XHEAAC_DEC_EXE_NONFATAL_INSUFFICIENT_INPUT_BYTES 0x00001804
  ------------------
  377|    254|      } else {
  378|    254|        return err_code;
  379|    254|      }
  380|    254|    }
  381|   161k|  }
  382|   230k|  info = usac_data->pstr_sfb_info[chn];
  383|       |
  384|   230k|  if (!pstr_core_coder->common_tw && usac_data->tw_mdct[0] == 1) {
  ------------------
  |  Branch (384:7): [True: 230k, False: 48]
  |  Branch (384:38): [True: 0, False: 230k]
  ------------------
  385|      0|    usac_data->tw_data_present[chn] = ixheaacd_read_bits_buf(it_bit_buff, 1);
  386|      0|    if (usac_data->tw_data_present[chn]) {
  ------------------
  |  Branch (386:9): [True: 0, False: 0]
  ------------------
  387|      0|      WORD32 i;
  388|      0|      for (i = 0; i < NUM_TW_NODES; i++) {
  ------------------
  |  |   95|      0|#define NUM_TW_NODES 16
  ------------------
  |  Branch (388:19): [True: 0, False: 0]
  ------------------
  389|      0|        usac_data->tw_ratio[chn][i] = ixheaacd_read_bits_buf(it_bit_buff, 3);
  390|      0|      }
  391|      0|    }
  392|      0|  }
  393|       |
  394|   230k|  if (*max_sfb == 0) {
  ------------------
  |  Branch (394:7): [True: 93.1k, False: 136k]
  ------------------
  395|  93.1k|    tot_sfb = 0;
  396|   136k|  } else {
  397|   136k|    i = 0;
  398|   136k|    tot_sfb = info->sfb_per_sbk;
  399|       |
  400|   348k|    while (usac_data->group_dis[chn][i++] < info->max_win_len) {
  ------------------
  |  Branch (400:12): [True: 211k, False: 136k]
  ------------------
  401|   211k|      tot_sfb += info->sfb_per_sbk;
  402|   211k|    }
  403|   136k|  }
  404|       |
  405|   230k|  ixheaacd_scale_factor_data(info, tot_sfb, *max_sfb, info->sfb_per_sbk,
  406|   230k|                             ptr_code_book);
  407|       |
  408|   230k|  if ((it_bit_buff->ptr_read_next > it_bit_buff->ptr_bit_buf_end - 3) &&
  ------------------
  |  Branch (408:7): [True: 74, False: 230k]
  ------------------
  409|     74|      (it_bit_buff->size == it_bit_buff->max_size)) {
  ------------------
  |  Branch (409:7): [True: 1, False: 73]
  ------------------
  410|      1|    return -1;
  411|      1|  }
  412|       |
  413|   230k|  ixheaacd_section_data(usac_data, it_bit_buff, info, global_gain,
  414|   230k|                        usac_data->factors[chn], usac_data->group_dis[chn],
  415|   230k|                        ptr_code_book);
  416|       |
  417|   230k|  if (pstr_core_coder->tns_data_present[ch] == 0)
  ------------------
  |  Branch (417:7): [True: 184k, False: 45.5k]
  ------------------
  418|   184k|    ixheaacd_tns_reset(info, usac_data->pstr_tns[chn]);
  419|       |
  420|   230k|  if (pstr_core_coder->tns_data_present[ch] == 1)
  ------------------
  |  Branch (420:7): [True: 38.2k, False: 191k]
  ------------------
  421|  38.2k|    ixheaacd_read_tns_u(info, usac_data->pstr_tns[chn], it_bit_buff);
  422|       |
  423|   230k|  if (*max_sfb > 0) {
  ------------------
  |  Branch (423:7): [True: 136k, False: 93.2k]
  ------------------
  424|   136k|    max_spec_coefficients =
  425|   136k|        info->sfb_idx_tbl[*max_sfb - 1] / info->group_len[0];
  426|   136k|  } else {
  427|  93.2k|    max_spec_coefficients = 0;
  428|  93.2k|  }
  429|       |
  430|   230k|  if (usac_data->usac_independency_flg)
  ------------------
  |  Branch (430:7): [True: 19.0k, False: 211k]
  ------------------
  431|  19.0k|    arith_reset_flag = 1;
  432|   211k|  else
  433|   211k|    arith_reset_flag = ixheaacd_read_bits_buf(it_bit_buff, 1);
  434|       |
  435|   230k|  switch (usac_data->window_sequence[chn]) {
  436|  82.2k|    case EIGHT_SHORT_SEQUENCE:
  ------------------
  |  |  102|  82.2k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  |  Branch (436:5): [True: 82.2k, False: 147k]
  ------------------
  437|  82.2k|      arth_size = usac_data->ccfl / 8;
  438|  82.2k|      break;
  439|   147k|    default:
  ------------------
  |  Branch (439:5): [True: 147k, False: 82.3k]
  ------------------
  440|   147k|      arth_size = usac_data->ccfl;
  441|   147k|      break;
  442|   230k|  }
  443|       |
  444|   230k|  err_code = ixheaacd_ac_spectral_data(
  445|   230k|      usac_data, max_spec_coefficients, noise_level, noise_offset, arth_size,
  446|   230k|      it_bit_buff, *max_sfb, arith_reset_flag, noise_filling, chn);
  447|       |
  448|   230k|  if (err_code != 0) return err_code;
  ------------------
  |  Branch (448:7): [True: 0, False: 230k]
  ------------------
  449|       |
  450|   230k|  usac_data->fac_data_present[chn] = ixheaacd_read_bits_buf(it_bit_buff, 1);
  451|       |
  452|   230k|  if (usac_data->fac_data_present[chn]) {
  ------------------
  |  Branch (452:7): [True: 72.9k, False: 157k]
  ------------------
  453|  72.9k|    WORD32 fac_len;
  454|  72.9k|    if ((usac_data->window_sequence[chn]) == EIGHT_SHORT_SEQUENCE) {
  ------------------
  |  |  102|  72.9k|#define EIGHT_SHORT_SEQUENCE 2
  ------------------
  |  Branch (454:9): [True: 25.1k, False: 47.7k]
  ------------------
  455|  25.1k|      fac_len = (usac_data->ccfl) / 16;
  456|  47.7k|    } else {
  457|  47.7k|      fac_len = (usac_data->ccfl) / 8;
  458|  47.7k|    }
  459|       |
  460|  72.9k|    fac_data = usac_data->fac_data[chn];
  461|  72.9k|    fac_data[0] = ixheaacd_read_bits_buf(it_bit_buff, 7);
  462|  72.9k|    ixheaacd_fac_decoding(fac_len, 0, &fac_data[1], it_bit_buff);
  463|  72.9k|  }
  464|       |
  465|   230k|  return 0;
  466|   230k|}

ixheaacd_ms_stereo_process:
   58|  15.8k|{
   59|  15.8k|  WORD32 win_grp, grp_len, k;
   60|  15.8k|  WORD32 *l_spec = ptr_aac_dec_channel_info[LEFT]->ptr_spec_coeff;
  ------------------
  |  |   40|  15.8k|#define LEFT 0
  ------------------
   61|  15.8k|  WORD32 *r_spec = ptr_aac_dec_channel_info[RIGHT]->ptr_spec_coeff;
  ------------------
  |  |   41|  15.8k|#define RIGHT 1
  ------------------
   62|  15.8k|  WORD16 maximum_bins_short =
   63|  15.8k|      (ptr_aac_dec_channel_info[LEFT]->str_ics_info.frame_length) >> 3;
  ------------------
  |  |   40|  15.8k|#define LEFT 0
  ------------------
   64|  15.8k|  WORD8 *ptr_group_len =
   65|  15.8k|      ptr_aac_dec_channel_info[LEFT]->str_ics_info.window_group_length;
  ------------------
  |  |   40|  15.8k|#define LEFT 0
  ------------------
   66|  15.8k|  const WORD8 *ptr_sfb_width =
   67|  15.8k|      ptr_aac_tables
   68|  15.8k|          ->str_aac_sfb_info[ptr_aac_dec_channel_info[RIGHT]
  ------------------
  |  |   41|  15.8k|#define RIGHT 1
  ------------------
   69|  15.8k|                                 ->str_ics_info.window_sequence]
   70|  15.8k|          .sfb_width;
   71|       |
   72|  15.8k|  UWORD8 *ptr_ms_used =
   73|  15.8k|      &ptr_aac_dec_channel_info[LEFT]->pstr_stereo_info->ms_used[0][0];
  ------------------
  |  |   40|  15.8k|#define LEFT 0
  ------------------
   74|       |
   75|  15.8k|  for (win_grp = 0;
   76|  52.2k|       win_grp < ptr_aac_dec_channel_info[LEFT]->str_ics_info.num_window_groups;
  ------------------
  |  |   40|  52.2k|#define LEFT 0
  ------------------
  |  Branch (76:8): [True: 36.4k, False: 15.8k]
  ------------------
   77|  36.4k|       win_grp++) {
   78|  76.2k|    for (grp_len = 0; grp_len < ptr_group_len[win_grp]; grp_len++) {
  ------------------
  |  Branch (78:23): [True: 39.8k, False: 36.4k]
  ------------------
   79|  39.8k|      WORD32 sfb;
   80|  39.8k|      WORD32 ixheaacd_drc_offset = 0;
   81|       |
   82|   124k|      for (sfb = 0; sfb < ptr_aac_dec_channel_info[LEFT]->str_ics_info.max_sfb;
  ------------------
  |  |   40|   124k|#define LEFT 0
  ------------------
  |  Branch (82:21): [True: 84.4k, False: 39.8k]
  ------------------
   83|  84.4k|           sfb++) {
   84|  84.4k|        ixheaacd_drc_offset += ptr_sfb_width[sfb];
   85|       |
   86|  84.4k|        if (*ptr_ms_used++) {
  ------------------
  |  Branch (86:13): [True: 54.9k, False: 29.4k]
  ------------------
   87|   259k|          for (k = 0; k < ptr_sfb_width[sfb]; k = k + 2) {
  ------------------
  |  Branch (87:23): [True: 204k, False: 54.9k]
  ------------------
   88|   204k|            WORD32 left_coef = *l_spec;
   89|   204k|            WORD32 right_coef = *r_spec;
   90|   204k|            WORD32 left_coef2 = *(l_spec + 1);
   91|   204k|            WORD32 right_coef2 = *(r_spec + 1);
   92|       |
   93|   204k|            *l_spec++ = ixheaac_add32_sat(left_coef, right_coef);
   94|   204k|            *r_spec++ = ixheaac_sub32_sat(left_coef, right_coef);
   95|   204k|            *l_spec++ = ixheaac_add32_sat(left_coef2, right_coef2);
   96|   204k|            *r_spec++ = ixheaac_sub32_sat(left_coef2, right_coef2);
   97|   204k|          }
   98|  54.9k|        } else {
   99|  29.4k|          l_spec += ptr_sfb_width[sfb];
  100|  29.4k|          r_spec += ptr_sfb_width[sfb];
  101|  29.4k|        }
  102|  84.4k|      }
  103|  39.8k|      ptr_ms_used -= ptr_aac_dec_channel_info[LEFT]->str_ics_info.max_sfb;
  ------------------
  |  |   40|  39.8k|#define LEFT 0
  ------------------
  104|       |
  105|  39.8k|      if (maximum_bins_short == 120) {
  ------------------
  |  Branch (105:11): [True: 10.0k, False: 29.8k]
  ------------------
  106|  10.0k|        l_spec = l_spec + maximum_bins_short - ixheaacd_drc_offset;
  107|  10.0k|        r_spec = r_spec + maximum_bins_short - ixheaacd_drc_offset;
  108|  29.8k|      } else {
  109|  29.8k|        l_spec = l_spec + 128 - ixheaacd_drc_offset;
  110|  29.8k|        r_spec = r_spec + 128 - ixheaacd_drc_offset;
  111|  29.8k|      }
  112|  39.8k|    }
  113|       |
  114|  36.4k|    ptr_ms_used += JOINT_STEREO_MAX_BANDS;
  ------------------
  |  |   31|  36.4k|#define JOINT_STEREO_MAX_BANDS 64
  ------------------
  115|  36.4k|  }
  116|  15.8k|}
ixheaacd_intensity_stereo_process:
  132|  18.5k|    WORD16 framelength) {
  133|  18.5k|  UWORD8 *ptr_ms_used =
  134|  18.5k|      &ptr_aac_dec_channel_info[LEFT]->pstr_stereo_info->ms_used[0][0];
  ------------------
  |  |   40|  18.5k|#define LEFT 0
  ------------------
  135|  18.5k|  WORD8 *ptr_code_book = &ptr_aac_dec_channel_info[RIGHT]->ptr_code_book[0];
  ------------------
  |  |   41|  18.5k|#define RIGHT 1
  ------------------
  136|  18.5k|  WORD16 *ptr_scale_factor =
  137|  18.5k|      &ptr_aac_dec_channel_info[RIGHT]->ptr_scale_factor[0];
  ------------------
  |  |   41|  18.5k|#define RIGHT 1
  ------------------
  138|  18.5k|  WORD32 *r_spec = &ptr_aac_dec_channel_info[RIGHT]->ptr_spec_coeff[0];
  ------------------
  |  |   41|  18.5k|#define RIGHT 1
  ------------------
  139|  18.5k|  WORD32 *l_spec = &ptr_aac_dec_channel_info[LEFT]->ptr_spec_coeff[0];
  ------------------
  |  |   40|  18.5k|#define LEFT 0
  ------------------
  140|  18.5k|  WORD16 maximum_bins_short =
  141|  18.5k|      (ptr_aac_dec_channel_info[LEFT]->str_ics_info.frame_length) >> 3;
  ------------------
  |  |   40|  18.5k|#define LEFT 0
  ------------------
  142|  18.5k|  WORD8 *ptr_group_len =
  143|  18.5k|      ptr_aac_dec_channel_info[RIGHT]->str_ics_info.window_group_length;
  ------------------
  |  |   41|  18.5k|#define RIGHT 1
  ------------------
  144|  18.5k|  const WORD8 *ptr_sfb_width =
  145|  18.5k|      ptr_aac_tables
  146|  18.5k|          ->str_aac_sfb_info[ptr_aac_dec_channel_info[RIGHT]
  ------------------
  |  |   41|  18.5k|#define RIGHT 1
  ------------------
  147|  18.5k|                                 ->str_ics_info.window_sequence]
  148|  18.5k|          .sfb_width;
  149|       |
  150|  18.5k|  WORD32 *ptr_scale_table;
  151|       |
  152|  18.5k|  if (960 == framelength)
  ------------------
  |  Branch (152:7): [True: 2.33k, False: 16.2k]
  ------------------
  153|  2.33k|    ptr_scale_table = ptr_aac_tables->pstr_block_tables->scale_table_960;
  154|  16.2k|  else
  155|  16.2k|    ptr_scale_table = ptr_aac_tables->pstr_block_tables->scale_table;
  156|       |
  157|  18.5k|  WORD32 win_grp, grp_len, k;
  158|       |
  159|  18.5k|  for (win_grp = 0;
  160|  58.1k|       win_grp <
  ------------------
  |  Branch (160:8): [True: 39.5k, False: 18.5k]
  ------------------
  161|  58.1k|       ptr_aac_dec_channel_info[RIGHT]->str_ics_info.num_window_groups;
  ------------------
  |  |   41|  58.1k|#define RIGHT 1
  ------------------
  162|  39.5k|       win_grp++) {
  163|  82.7k|    for (grp_len = 0; grp_len < ptr_group_len[win_grp]; grp_len++) {
  ------------------
  |  Branch (163:23): [True: 43.1k, False: 39.5k]
  ------------------
  164|  43.1k|      WORD32 sfb;
  165|  43.1k|      WORD32 ixheaacd_drc_offset = 0;
  166|       |
  167|   133k|      for (sfb = 0; sfb < ptr_aac_dec_channel_info[RIGHT]->str_ics_info.max_sfb;
  ------------------
  |  |   41|   133k|#define RIGHT 1
  ------------------
  |  Branch (167:21): [True: 90.2k, False: 43.1k]
  ------------------
  168|  90.2k|           sfb++) {
  169|  90.2k|        WORD8 code_book = ptr_code_book[sfb];
  170|  90.2k|        ixheaacd_drc_offset += ptr_sfb_width[sfb];
  171|       |
  172|  90.2k|        if (((code_book >= INTENSITY_HCB2) &&
  ------------------
  |  |   39|  90.2k|#define INTENSITY_HCB2 14
  ------------------
  |  Branch (172:14): [True: 35.8k, False: 54.4k]
  ------------------
  173|  35.8k|             ((object_type != AOT_ER_AAC_ELD) &&
  ------------------
  |  Branch (173:15): [True: 5.94k, False: 29.8k]
  ------------------
  174|  5.94k|              (object_type != AOT_ER_AAC_LD))) ||
  ------------------
  |  Branch (174:15): [True: 1.37k, False: 4.56k]
  ------------------
  175|  88.8k|            (((code_book == INTENSITY_HCB2) || (code_book == INTENSITY_HCB)) &&
  ------------------
  |  |   39|  88.8k|#define INTENSITY_HCB2 14
  ------------------
                          (((code_book == INTENSITY_HCB2) || (code_book == INTENSITY_HCB)) &&
  ------------------
  |  |   40|  59.1k|#define INTENSITY_HCB 15
  ------------------
  |  Branch (175:15): [True: 29.6k, False: 59.1k]
  |  Branch (175:48): [True: 4.72k, False: 54.4k]
  ------------------
  176|  34.4k|             ((object_type == AOT_ER_AAC_ELD) ||
  ------------------
  |  Branch (176:15): [True: 29.8k, False: 4.56k]
  ------------------
  177|  4.56k|              (object_type == AOT_ER_AAC_LD))))
  ------------------
  |  Branch (177:15): [True: 4.56k, False: 0]
  ------------------
  178|       |
  179|  35.7k|        {
  180|  35.7k|          WORD32 sfb_factor, scale;
  181|  35.7k|          WORD32 scf_exp;
  182|       |
  183|  35.7k|          sfb_factor = (ptr_scale_factor[sfb]);
  184|  35.7k|          if (aac_sf_data_resil_flag) sfb_factor = -sfb_factor;
  ------------------
  |  Branch (184:15): [True: 29.8k, False: 5.94k]
  ------------------
  185|       |
  186|  35.7k|          scf_exp = (sfb_factor >> 2);
  187|  35.7k|          scale = *(ptr_scale_table + (sfb_factor & 3));
  188|  35.7k|          if (!((ptr_ms_used[sfb]) ^ (code_book & 0x1))) {
  ------------------
  |  Branch (188:15): [True: 1.57k, False: 34.2k]
  ------------------
  189|  1.57k|            scale = ixheaac_negate32(scale);
  190|  1.57k|          }
  191|       |
  192|  35.7k|          scf_exp = -(scf_exp + 2);
  193|       |
  194|   195k|          for (k = 0; k < ptr_sfb_width[sfb]; k++) {
  ------------------
  |  Branch (194:23): [True: 159k, False: 35.7k]
  ------------------
  195|   159k|            WORD32 temp, shift_val;
  196|   159k|            temp = *l_spec++;
  197|       |
  198|   159k|            shift_val = ixheaac_norm32(temp);
  199|   159k|            temp = ixheaac_shl32(temp, shift_val);
  200|       |
  201|   159k|            temp = ixheaacd_mult32x16in32l(temp, scale);
  202|   159k|            shift_val = shift_val + scf_exp;
  203|       |
  204|   159k|            if (shift_val < 0) {
  ------------------
  |  Branch (204:17): [True: 2.19k, False: 157k]
  ------------------
  205|  2.19k|              if (shift_val < -31) {
  ------------------
  |  Branch (205:19): [True: 745, False: 1.44k]
  ------------------
  206|    745|                shift_val = -31;
  207|    745|              }
  208|  2.19k|              temp = ixheaac_shl32_sat(temp, -shift_val);
  209|   157k|            } else {
  210|   157k|              if (shift_val > 31) {
  ------------------
  |  Branch (210:19): [True: 6.26k, False: 151k]
  ------------------
  211|  6.26k|                shift_val = 31;
  212|  6.26k|              }
  213|   157k|              temp = ixheaac_shr32(temp, shift_val);
  214|   157k|            }
  215|   159k|            *r_spec++ = temp;
  216|   159k|          }
  217|       |
  218|  54.4k|        } else {
  219|  54.4k|          l_spec += ptr_sfb_width[sfb];
  220|  54.4k|          r_spec += ptr_sfb_width[sfb];
  221|  54.4k|        }
  222|  90.2k|      }
  223|       |
  224|  43.1k|      if (maximum_bins_short == 120) {
  ------------------
  |  Branch (224:11): [True: 10.4k, False: 32.7k]
  ------------------
  225|  10.4k|        l_spec += maximum_bins_short - ixheaacd_drc_offset;
  226|  10.4k|        r_spec += maximum_bins_short - ixheaacd_drc_offset;
  227|  32.7k|      } else {
  228|  32.7k|        l_spec += 128 - ixheaacd_drc_offset;
  229|  32.7k|        r_spec += 128 - ixheaacd_drc_offset;
  230|  32.7k|      }
  231|  43.1k|    }
  232|  39.5k|    ptr_ms_used += 64;
  233|  39.5k|    ptr_code_book += 16;
  234|  39.5k|    ptr_scale_factor += 16;
  235|  39.5k|  }
  236|  18.5k|}
ixheaacd_stereo.c:ixheaacd_mult32x16in32l:
  118|   159k|static PLATFORM_INLINE WORD32 ixheaacd_mult32x16in32l(WORD32 a, WORD32 b) {
  119|   159k|  WORD32 result;
  120|   159k|  WORD64 temp_result;
  121|       |
  122|   159k|  temp_result = (WORD64)a * (WORD64)b;
  123|       |
  124|   159k|  result = (WORD32)(temp_result >> 16);
  125|       |
  126|   159k|  return (result);
  127|   159k|}

ixheaacd_lpc_coeff_wt_apply:
   60|   284k|VOID ixheaacd_lpc_coeff_wt_apply(FLOAT32 *a, FLOAT32 *ap) {
   61|   284k|  FLOAT32 f;
   62|   284k|  WORD32 i;
   63|   284k|  ap[0] = a[0];
   64|   284k|  f = 0.92f;
   65|  4.82M|  for (i = 1; i <= 16; i++) {
  ------------------
  |  Branch (65:15): [True: 4.54M, False: 284k]
  ------------------
   66|  4.54M|    ap[i] = f * a[i];
   67|  4.54M|    f *= 0.92f;
   68|  4.54M|  }
   69|   284k|  return;
   70|   284k|}
ixheaacd_float2fix:
   72|   223k|WORD8 ixheaacd_float2fix(FLOAT32 *x, WORD32 *int_x, WORD32 length) {
   73|   223k|  WORD32 k, itemp;
   74|   223k|  FLOAT32 ftemp = 0.0;
   75|   223k|  WORD8 shiftp;
   76|  45.9M|  for (k = 0; k < length; k++) {
  ------------------
  |  Branch (76:15): [True: 45.7M, False: 223k]
  ------------------
   77|  45.7M|    if (ABS(x[k]) > ftemp) ftemp = ABS(x[k]);
  ------------------
  |  |   58|  45.7M|#define ABS(A) ((A) < 0 ? (-A) : (A))
  |  |  ------------------
  |  |  |  Branch (58:17): [True: 17.5M, False: 28.1M]
  |  |  ------------------
  ------------------
                  if (ABS(x[k]) > ftemp) ftemp = ABS(x[k]);
  ------------------
  |  |   58|   804k|#define ABS(A) ((A) < 0 ? (-A) : (A))
  |  |  ------------------
  |  |  |  Branch (58:17): [True: 411k, False: 393k]
  |  |  ------------------
  ------------------
  |  Branch (77:9): [True: 804k, False: 44.8M]
  ------------------
   78|  45.7M|  }
   79|       |
   80|   223k|  itemp = (WORD32)(ftemp);
   81|   223k|  shiftp = ixheaac_norm32(itemp);
   82|       |
   83|  45.9M|  for (k = 0; k < length; k++) {
  ------------------
  |  Branch (83:15): [True: 45.7M, False: 223k]
  ------------------
   84|  45.7M|    int_x[k] = (WORD32)(x[k] * (FLOAT32)((WORD64)1 << shiftp));
   85|  45.7M|  }
   86|       |
   87|   223k|  return (shiftp);
   88|   223k|}
ixheaacd_fix2float:
   91|   223k|                        WORD8 *shiftp, WORD32 *preshift) {
   92|   223k|  WORD32 k;
   93|   223k|  FLOAT32 qfac;
   94|   223k|  if ((*shiftp - *preshift) > 0) {
  ------------------
  |  Branch (94:7): [True: 222k, False: 643]
  ------------------
   95|   222k|    qfac = 1.0f / (FLOAT32)((WORD64)1 << (*shiftp - *preshift));
   96|  70.5M|    for (k = 0; k < length; k++) {
  ------------------
  |  Branch (96:17): [True: 70.2M, False: 222k]
  ------------------
   97|  70.2M|      xn1[k] = (FLOAT32)((FLOAT32)int_xn1[k] * qfac);
   98|  70.2M|    }
   99|   222k|  } else {
  100|   112k|    for (k = 0; k < length; k++) {
  ------------------
  |  Branch (100:17): [True: 111k, False: 643]
  ------------------
  101|   111k|      xn1[k] = (FLOAT32)((FLOAT32)int_xn1[k] *
  102|   111k|                         (FLOAT32)((WORD64)1 << (*preshift - *shiftp)));
  103|   111k|    }
  104|    643|  }
  105|   223k|}
ixheaacd_tcx_mdct:
  173|   105k|                         ia_usac_lpd_decoder_handle st) {
  174|   105k|  WORD32 i, mode;
  175|   105k|  WORD32 *ptr_tcx_quant;
  176|   105k|  FLOAT32 tmp, gain_tcx = 0.0f, noise_level, energy, temp;
  177|   105k|  FLOAT32 *ptr_a, i_ap[ORDER + 1];
  178|   105k|  const FLOAT32 *sine_window_prev, *sine_window;
  179|   105k|  WORD32 fac_length_prev;
  180|   105k|  FLOAT32 alfd_gains[LEN_SUPERFRAME / (4 * 8)] = {0};
  181|   105k|  FLOAT32 x[LEN_SUPERFRAME], buf[ORDER + LEN_SUPERFRAME];
  182|   105k|  WORD32 int_x[LEN_SUPERFRAME + (2 * FAC_LENGTH)];
  183|   105k|  WORD32 int_xn1[LEN_SUPERFRAME + (2 * FAC_LENGTH)];
  184|   105k|  FLOAT32 gain1[LEN_SUPERFRAME], gain2[LEN_SUPERFRAME];
  185|   105k|  FLOAT32 xn_buf[LEN_SUPERFRAME + (2 * FAC_LENGTH)];
  186|   105k|  FLOAT32 *xn;
  187|   105k|  FLOAT32 xn1[2 * FAC_LENGTH], facwindow[2 * FAC_LENGTH];
  188|   105k|  WORD32 TTT;
  189|   105k|  WORD8 shiftp = 0;
  190|   105k|  WORD32 preshift = 0;
  191|   105k|  WORD32 loop_count = 0;
  192|   105k|  FLOAT32 *exc = &usac_data->exc_buf[usac_data->len_subfrm * frame_index +
  193|   105k|                                     MAX_PITCH + INTER_LP_FIL_ORDER + 1];
  ------------------
  |  |   55|   105k|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|   105k|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|   105k|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|   105k|   (6 *           \
  |  |   57|   105k|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|   105k|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|   105k|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|   105k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|   105k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|   105k|#define TMIN 34
  |  |  ------------------
  ------------------
                                                   MAX_PITCH + INTER_LP_FIL_ORDER + 1];
  ------------------
  |  |   51|   105k|#define INTER_LP_FIL_ORDER 16
  ------------------
  194|   105k|  FLOAT32 *synth =
  195|   105k|      &usac_data->synth_buf[usac_data->len_subfrm * frame_index + MAX_PITCH +
  ------------------
  |  |   55|   105k|  (TMAX +         \
  |  |  ------------------
  |  |  |  |   48|   105k|#define TMAX (27 + 6 * TMIN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|   105k|#define TMIN 34
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   56|   105k|   (6 *           \
  |  |   57|   105k|    ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   40|   105k|#define FAC_FSCALE_MAX 24000
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|   105k|#define TMIN 34
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|   105k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   39|   105k|#define FSCALE_DENOM 12800
  |  |  ------------------
  |  |                   ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN)))
  |  |  ------------------
  |  |  |  |   45|   105k|#define TMIN 34
  |  |  ------------------
  ------------------
  196|   105k|                            (((NUM_FRAMES * usac_data->num_subfrm) / 2) - 1) *
  ------------------
  |  |   27|   105k|#define NUM_FRAMES 4
  ------------------
  197|   105k|                                LEN_SUBFR];
  ------------------
  |  |  118|   105k|#define LEN_SUBFR 64
  ------------------
  198|       |
  199|   105k|  WORD32 *ptr_scratch = &usac_data->scratch_buffer[0];
  200|       |
  201|   105k|  WORD32 fac_length = (usac_data->len_subfrm) / 2;
  202|   105k|  WORD32 err = 0;
  203|       |
  204|   105k|  mode = lg / (usac_data->len_subfrm);
  205|   105k|  if (mode > 2) mode = 3;
  ------------------
  |  Branch (205:7): [True: 306, False: 105k]
  ------------------
  206|       |
  207|   105k|  if (st->mode_prev == -2)
  ------------------
  |  Branch (207:7): [True: 3.85k, False: 101k]
  ------------------
  208|  3.85k|    fac_length_prev = (usac_data->ccfl) / 16;
  209|       |
  210|   101k|  else
  211|   101k|    fac_length_prev = fac_length;
  212|       |
  213|   105k|  if (fac_length == 96)
  ------------------
  |  Branch (213:7): [True: 36.9k, False: 68.7k]
  ------------------
  214|  36.9k|    sine_window = ixheaacd_sine_window192;
  215|  68.7k|  else
  216|  68.7k|    sine_window = ixheaacd__sine_window256;
  217|       |
  218|   105k|  if (fac_length_prev == 48)
  ------------------
  |  Branch (218:7): [True: 659, False: 105k]
  ------------------
  219|    659|    sine_window_prev = ixheaacd_sine_window96;
  220|       |
  221|   105k|  else if (fac_length_prev == 64)
  ------------------
  |  Branch (221:12): [True: 3.19k, False: 101k]
  ------------------
  222|  3.19k|    sine_window_prev = ixheaacd_sine_window128;
  223|       |
  224|   101k|  else if (fac_length_prev == 96)
  ------------------
  |  Branch (224:12): [True: 36.2k, False: 65.5k]
  ------------------
  225|  36.2k|    sine_window_prev = ixheaacd_sine_window192;
  226|       |
  227|  65.5k|  else
  228|  65.5k|    sine_window_prev = ixheaacd__sine_window256;
  229|       |
  230|   105k|  xn = xn_buf + fac_length;
  231|       |
  232|   105k|  if (st->mode_prev != 0) {
  ------------------
  |  Branch (232:7): [True: 49.5k, False: 56.0k]
  ------------------
  233|  49.5k|    if (st->mode_prev > 0) {
  ------------------
  |  Branch (233:9): [True: 40.7k, False: 8.85k]
  ------------------
  234|  9.51M|      for (i = 0; i < (2 * fac_length_prev); i++) {
  ------------------
  |  Branch (234:19): [True: 9.46M, False: 40.7k]
  ------------------
  235|  9.46M|        st->exc_prev[i + fac_length - fac_length_prev + 1] *=
  236|  9.46M|            sine_window_prev[(2 * fac_length_prev) - 1 - i];
  237|  9.46M|      }
  238|  40.7k|    }
  239|   285k|    for (i = 0; i < fac_length - fac_length_prev; i++) {
  ------------------
  |  Branch (239:17): [True: 236k, False: 49.5k]
  ------------------
  240|   236k|      st->exc_prev[i + fac_length + fac_length_prev + 1] = 0.0f;
  241|   236k|    }
  242|  49.5k|  }
  243|   105k|  if (usac_data->frame_ok == 1) {
  ------------------
  |  Branch (243:7): [True: 105k, False: 0]
  ------------------
  244|   105k|    noise_level = 0.0625f * (8.0f - ((FLOAT32)pstr_td_frame_data->noise_factor[frame_index]));
  245|       |
  246|   105k|  ptr_tcx_quant = pstr_td_frame_data->x_tcx_invquant;
  247|   226k|  for (i = 0; i < frame_index; i++)
  ------------------
  |  Branch (247:15): [True: 120k, False: 105k]
  ------------------
  248|   120k|    ptr_tcx_quant += pstr_td_frame_data->tcx_lg[i];
  249|       |
  250|  32.1M|  for (i = 0; i < lg; i++) x[i] = (FLOAT32)ptr_tcx_quant[i];
  ------------------
  |  Branch (250:15): [True: 32.0M, False: 105k]
  ------------------
  251|       |
  252|   105k|    if (usac_data->ec_flag) {
  ------------------
  |  Branch (252:9): [True: 0, False: 105k]
  ------------------
  253|      0|      st->last_tcx_pitch = ixheaacd_calc_max_pitch(x, (lg >> 5));
  254|      0|    }
  255|       |
  256|  3.46M|  for (i = lg / 6; i < lg; i += 8) {
  ------------------
  |  Branch (256:20): [True: 3.36M, False: 105k]
  ------------------
  257|  3.36M|    WORD32 k, max_k = min(lg, i + 8);
  ------------------
  |  |   75|  3.36M|#define min(a, b) (((a) < (b)) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (75:20): [True: 68.7k, False: 3.29M]
  |  |  ------------------
  ------------------
  258|  3.36M|    FLOAT32 tmp = 0.0f;
  259|  30.0M|    for (k = i; k < max_k; k++) tmp += ptr_tcx_quant[k] * ptr_tcx_quant[k];
  ------------------
  |  Branch (259:17): [True: 26.7M, False: 3.36M]
  ------------------
  260|       |
  261|  3.36M|    if (tmp == 0.0f) {
  ------------------
  |  Branch (261:9): [True: 1.55M, False: 1.80M]
  ------------------
  262|  13.8M|      for (k = i; k < max_k; k++)
  ------------------
  |  Branch (262:19): [True: 12.2M, False: 1.55M]
  ------------------
  263|  12.2M|        x[k] = noise_level *
  264|  12.2M|               ixheaacd_randomsign(
  265|  12.2M|                   &(usac_data->seed_value[usac_data->present_chan]));
  266|  1.55M|    }
  267|  3.36M|  }
  268|       |
  269|   105k|  ixheaacd_low_fq_deemphasis(x, lg, alfd_gains);
  270|       |
  271|   105k|  ixheaacd_lpc_coeff_wt_apply(lp_flt_coff_a + (ORDER + 1), i_ap);
  ------------------
  |  |   30|   105k|#define ORDER 16
  ------------------
  272|   105k|  ixheaacd_lpc_to_td(i_ap, ORDER, gain1, usac_data->len_subfrm / 4);
  ------------------
  |  |   30|   105k|#define ORDER 16
  ------------------
  273|       |
  274|   105k|  ixheaacd_lpc_coeff_wt_apply(lp_flt_coff_a + (2 * (ORDER + 1)), i_ap);
  ------------------
  |  |   30|   105k|#define ORDER 16
  ------------------
  275|   105k|  ixheaacd_lpc_to_td(i_ap, ORDER, gain2, usac_data->len_subfrm / 4);
  ------------------
  |  |   30|   105k|#define ORDER 16
  ------------------
  276|       |
  277|   105k|  energy = 0.01f;
  278|  32.1M|  for (i = 0; i < lg; i++) energy += x[i] * x[i];
  ------------------
  |  Branch (278:15): [True: 32.0M, False: 105k]
  ------------------
  279|       |
  280|   105k|  temp = (FLOAT32)sqrt(energy) / lg;
  281|       |
  282|   105k|  gain_tcx =
  283|   105k|      (FLOAT32)pow(
  284|   105k|          10.0f,
  285|   105k|          ((FLOAT32)pstr_td_frame_data->global_gain[frame_index]) / 28.0f) /
  286|   105k|      (temp * 2.0f);
  287|   105k|  }
  288|   105k|  if (usac_data->ec_flag) {
  ------------------
  |  Branch (288:7): [True: 0, False: 105k]
  ------------------
  289|      0|    if (usac_data->frame_ok == 1) {
  ------------------
  |  Branch (289:9): [True: 0, False: 0]
  ------------------
  290|      0|      usac_data->past_gain_tcx[usac_data->present_chan] = gain_tcx;
  291|      0|    } else {
  292|      0|      gain_tcx = usac_data->past_gain_tcx[usac_data->present_chan];
  293|      0|    }
  294|      0|  }
  295|   105k|  if (usac_data->frame_ok == 1) {
  ------------------
  |  Branch (295:7): [True: 105k, False: 0]
  ------------------
  296|   105k|  ixheaacd_noise_shaping(x, lg, (usac_data->len_subfrm) / 4, gain1, gain2);
  297|   105k|  shiftp = ixheaacd_float2fix(x, int_x, lg);
  298|   105k|  }
  299|   105k|  if (usac_data->ec_flag == 1) {
  ------------------
  |  Branch (299:7): [True: 0, False: 105k]
  ------------------
  300|      0|    if (st->mode_prev != 0) {
  ------------------
  |  Branch (300:9): [True: 0, False: 0]
  ------------------
  301|      0|      if (usac_data->frame_ok == 1) {
  ------------------
  |  Branch (301:11): [True: 0, False: 0]
  ------------------
  302|      0|        memcpy(usac_data->tcx_spec_coeffs[usac_data->present_chan], int_x, lg * sizeof(int_x[0]));
  303|      0|        usac_data->last_shiftp = shiftp;
  304|      0|      } else {
  305|      0|        memcpy(int_x, usac_data->tcx_spec_coeffs[usac_data->present_chan], lg * sizeof(int_x[0]));
  306|      0|        shiftp = usac_data->last_shiftp;
  307|      0|      }
  308|      0|    }
  309|   105k|  } else {
  310|   105k|    if (lg & (lg - 1)) {
  ------------------
  |  Branch (310:9): [True: 36.9k, False: 68.7k]
  ------------------
  311|  36.9k|      if ((lg != 48) && (lg != 96) && (lg != 192) && (lg != 384) && (lg != 768)) {
  ------------------
  |  Branch (311:11): [True: 36.9k, False: 0]
  |  Branch (311:25): [True: 36.9k, False: 0]
  |  Branch (311:39): [True: 12.4k, False: 24.4k]
  |  Branch (311:54): [True: 139, False: 12.3k]
  |  Branch (311:69): [True: 0, False: 139]
  ------------------
  312|      0|        return -1;
  313|      0|      }
  314|  36.9k|    }
  315|   105k|  }
  316|       |
  317|   105k|  ixheaacd_acelp_mdct_main(usac_data, int_x, int_xn1, (2 * fac_length), lg - (2 * fac_length),
  318|   105k|                           &preshift);
  319|       |
  320|   105k|  ixheaacd_fix2float(int_xn1, xn_buf, (lg + (2 * fac_length)), &shiftp,
  321|   105k|                     &preshift);
  322|       |
  323|   105k|  ixheaacd_vec_cnst_mul((2.0f / lg), xn_buf, xn_buf, lg + (2 * fac_length));
  324|       |
  325|   105k|  st->fac_gain =
  326|   105k|      gain_tcx * 0.5f * (FLOAT32)sqrt(((FLOAT32)fac_length) / (FLOAT32)lg);
  327|       |
  328|  3.19M|  for (i = 0; i < fac_length / 4; i++)
  ------------------
  |  Branch (328:15): [True: 3.08M, False: 105k]
  ------------------
  329|  3.08M|    st->fac_fd_data[i] = alfd_gains[i * lg / (8 * fac_length)];
  330|       |
  331|   105k|  if (st->mode_prev == 0) {
  ------------------
  |  Branch (331:7): [True: 56.0k, False: 49.5k]
  ------------------
  332|  6.58M|    for (i = 0; i < fac_length_prev; i++) {
  ------------------
  |  Branch (332:17): [True: 6.52M, False: 56.0k]
  ------------------
  333|  6.52M|      facwindow[i] =
  334|  6.52M|          sine_window_prev[i] * sine_window_prev[(2 * fac_length_prev) - 1 - i];
  335|  6.52M|      facwindow[fac_length_prev + i] =
  336|  6.52M|          1.0f - (sine_window_prev[fac_length_prev + i] *
  337|  6.52M|                  sine_window_prev[fac_length_prev + i]);
  338|  6.52M|    }
  339|       |
  340|  3.31M|    for (i = 0; i < fac_length / 2; i++) {
  ------------------
  |  Branch (340:17): [True: 3.26M, False: 56.0k]
  ------------------
  341|  3.26M|      x[i] = st->fac_gain *
  342|  3.26M|             (FLOAT32)pstr_td_frame_data->fac[frame_index * FAC_LENGTH + 2 * i];
  ------------------
  |  |   33|  3.26M|#define FAC_LENGTH 128
  ------------------
  343|  3.26M|      x[fac_length / 2 + i] =
  344|  3.26M|          st->fac_gain *
  345|  3.26M|          (FLOAT32)pstr_td_frame_data
  346|  3.26M|              ->fac[frame_index * FAC_LENGTH + fac_length - 2 * i - 1];
  ------------------
  |  |   33|  3.26M|#define FAC_LENGTH 128
  ------------------
  347|  3.26M|    }
  348|       |
  349|   871k|    for (i = 0; i < fac_length / 8; i++) {
  ------------------
  |  Branch (349:17): [True: 815k, False: 56.0k]
  ------------------
  350|   815k|      x[i] *= st->fac_fd_data[2 * i];
  351|   815k|      x[fac_length - i - 1] *= st->fac_fd_data[2 * i + 1];
  352|   815k|    }
  353|       |
  354|  56.0k|    preshift = 0;
  355|  56.0k|    shiftp = ixheaacd_float2fix(x, int_x, fac_length);
  356|       |
  357|  56.0k|    if (usac_data->ec_flag == 0) {
  ------------------
  |  Branch (357:9): [True: 56.0k, False: 0]
  ------------------
  358|  56.0k|      if (fac_length & (fac_length - 1)) {
  ------------------
  |  Branch (358:11): [True: 20.4k, False: 35.6k]
  ------------------
  359|  20.4k|        if ((fac_length != 48) && (fac_length != 96) && (fac_length != 192) &&
  ------------------
  |  Branch (359:13): [True: 20.4k, False: 0]
  |  Branch (359:35): [True: 0, False: 20.4k]
  |  Branch (359:57): [True: 0, False: 0]
  ------------------
  360|      0|            (fac_length != 384) && (fac_length != 768)) {
  ------------------
  |  Branch (360:13): [True: 0, False: 0]
  |  Branch (360:36): [True: 0, False: 0]
  ------------------
  361|      0|          return -1;
  362|      0|        }
  363|  20.4k|      }
  364|  56.0k|    }
  365|       |
  366|  56.0k|    ixheaacd_acelp_mdct(int_x, int_xn1, &preshift, fac_length, ptr_scratch);
  367|       |
  368|  56.0k|    ixheaacd_fix2float(int_xn1, xn1, fac_length, &shiftp, &preshift);
  369|       |
  370|  56.0k|    ixheaacd_vec_cnst_mul((2.0f / (FLOAT32)fac_length), xn1, xn1, fac_length);
  371|       |
  372|  56.0k|    memset(xn1 + fac_length, 0, fac_length * sizeof(FLOAT32));
  373|       |
  374|  56.0k|    ixheaacd_lpc_coeff_wt_apply(lp_flt_coff_a + (ORDER + 1), i_ap);
  ------------------
  |  |   30|  56.0k|#define ORDER 16
  ------------------
  375|  56.0k|    ixheaacd_synthesis_tool_float(i_ap, xn1, xn1, 2 * fac_length,
  376|  56.0k|                                  xn1 + fac_length);
  377|       |
  378|  6.58M|    for (i = 0; i < fac_length; i++) {
  ------------------
  |  Branch (378:17): [True: 6.52M, False: 56.0k]
  ------------------
  379|  6.52M|      temp = st->exc_prev[1 + fac_length + i] * facwindow[fac_length + i] +
  380|  6.52M|             st->exc_prev[fac_length - i] * facwindow[fac_length - 1 - i];
  381|  6.52M|      xn1[i] += temp;
  382|  6.52M|    }
  383|  56.0k|  }
  384|       |
  385|  56.8M|  for (i = 0; i < lg + (2 * fac_length); i++) xn_buf[i] *= gain_tcx;
  ------------------
  |  Branch (385:15): [True: 56.7M, False: 105k]
  ------------------
  386|       |
  387|  24.3M|  for (i = 0; i < (2 * fac_length_prev); i++)
  ------------------
  |  Branch (387:15): [True: 24.2M, False: 105k]
  ------------------
  388|  24.2M|    xn_buf[i + fac_length - fac_length_prev] *= sine_window_prev[i];
  389|       |
  390|   341k|  for (i = 0; i < fac_length - fac_length_prev; i++) xn_buf[i] = 0.0f;
  ------------------
  |  Branch (390:15): [True: 236k, False: 105k]
  ------------------
  391|       |
  392|   105k|  if (st->mode_prev != 0) {
  ------------------
  |  Branch (392:7): [True: 49.5k, False: 56.0k]
  ------------------
  393|  11.2M|    for (i = fac_length - fac_length_prev; i < (fac_length + fac_length_prev);
  ------------------
  |  Branch (393:44): [True: 11.1M, False: 49.5k]
  ------------------
  394|  11.1M|         i++)
  395|  11.1M|      xn_buf[i] += st->exc_prev[1 + i];
  396|  56.0k|  } else {
  397|  13.1M|    for (i = fac_length - fac_length_prev; i < (fac_length + fac_length_prev);
  ------------------
  |  Branch (397:44): [True: 13.0M, False: 56.0k]
  ------------------
  398|  13.0M|         i++)
  399|  13.0M|      xn_buf[i + fac_length] += xn1[i];
  400|  56.0k|  }
  401|       |
  402|   105k|  ixheaacd_mem_cpy(xn_buf + lg - 1, st->exc_prev, 1 + (2 * fac_length));
  403|       |
  404|  24.7M|  for (i = 0; i < (2 * fac_length); i++) {
  ------------------
  |  Branch (404:15): [True: 24.6M, False: 105k]
  ------------------
  405|  24.6M|    xn_buf[i + lg] *= sine_window[(2 * fac_length) - 1 - i];
  406|  24.6M|  }
  407|       |
  408|   105k|  if (st->mode_prev != 0) {
  ------------------
  |  Branch (408:7): [True: 49.5k, False: 56.0k]
  ------------------
  409|  49.5k|    ixheaacd_mem_cpy(xn_buf + fac_length - fac_length_prev,
  410|  49.5k|                     synth - fac_length_prev, fac_length_prev);
  411|       |
  412|  6.66M|    for (i = 0; i < ORDER + fac_length; i++)
  ------------------
  |  |   30|  6.66M|#define ORDER 16
  ------------------
  |  Branch (412:17): [True: 6.61M, False: 49.5k]
  ------------------
  413|  6.61M|      buf[i] = synth[i - ORDER - fac_length] -
  ------------------
  |  |   30|  6.61M|#define ORDER 16
  ------------------
  414|  6.61M|               (PREEMPH_FILT_FAC * synth[i - ORDER - fac_length - 1]);
  ------------------
  |  |   61|  6.61M|#define PREEMPH_FILT_FAC 0.68f
  ------------------
                             (PREEMPH_FILT_FAC * synth[i - ORDER - fac_length - 1]);
  ------------------
  |  |   30|  6.61M|#define ORDER 16
  ------------------
  415|       |
  416|  49.5k|    ptr_a = st->lp_flt_coeff_a_prev;
  417|  49.5k|    TTT = fac_length % LEN_SUBFR;
  ------------------
  |  |  118|  49.5k|#define LEN_SUBFR 64
  ------------------
  418|  49.5k|    if (TTT != 0)
  ------------------
  |  Branch (418:9): [True: 16.5k, False: 33.0k]
  ------------------
  419|  16.5k|      ixheaacd_residual_tool_float(ptr_a, &buf[ORDER], &exc[-fac_length], TTT,
  ------------------
  |  |   30|  16.5k|#define ORDER 16
  ------------------
  420|  16.5k|                                   1);
  421|       |
  422|  49.5k|    loop_count = (fac_length - TTT) / LEN_SUBFR;
  ------------------
  |  |  118|  49.5k|#define LEN_SUBFR 64
  ------------------
  423|  49.5k|    ixheaacd_residual_tool_float(ptr_a, &buf[ORDER + TTT],
  ------------------
  |  |   30|  49.5k|#define ORDER 16
  ------------------
  424|  49.5k|                                 &exc[TTT - fac_length], LEN_SUBFR, loop_count);
  ------------------
  |  |  118|  49.5k|#define LEN_SUBFR 64
  ------------------
  425|  49.5k|  }
  426|       |
  427|   105k|  ixheaacd_mem_cpy(xn, synth, lg);
  428|       |
  429|   105k|  ixheaacd_mem_cpy(synth - ORDER - 1, xn - ORDER - 1, ORDER + 1);
  ------------------
  |  |   30|   105k|#define ORDER 16
  ------------------
                ixheaacd_mem_cpy(synth - ORDER - 1, xn - ORDER - 1, ORDER + 1);
  ------------------
  |  |   30|   105k|#define ORDER 16
  ------------------
                ixheaacd_mem_cpy(synth - ORDER - 1, xn - ORDER - 1, ORDER + 1);
  ------------------
  |  |   30|   105k|#define ORDER 16
  ------------------
  430|   105k|  tmp = xn[-ORDER - 1];
  ------------------
  |  |   30|   105k|#define ORDER 16
  ------------------
  431|   105k|  ixheaacd_preemphsis_tool_float(xn - ORDER, PREEMPH_FILT_FAC, ORDER + lg, tmp);
  ------------------
  |  |   30|   105k|#define ORDER 16
  ------------------
                ixheaacd_preemphsis_tool_float(xn - ORDER, PREEMPH_FILT_FAC, ORDER + lg, tmp);
  ------------------
  |  |   61|   105k|#define PREEMPH_FILT_FAC 0.68f
  ------------------
                ixheaacd_preemphsis_tool_float(xn - ORDER, PREEMPH_FILT_FAC, ORDER + lg, tmp);
  ------------------
  |  |   30|   105k|#define ORDER 16
  ------------------
  432|       |
  433|   105k|  ptr_a = lp_flt_coff_a + (2 * (ORDER + 1));
  ------------------
  |  |   30|   105k|#define ORDER 16
  ------------------
  434|       |
  435|   105k|  ixheaacd_residual_tool_float(ptr_a, xn, exc, lg, 1);
  436|       |
  437|   105k|  ixheaacd_mem_cpy(ptr_a, st->lp_flt_coeff_a_prev, ORDER + 1);
  ------------------
  |  |   30|   105k|#define ORDER 16
  ------------------
  438|   105k|  ixheaacd_mem_cpy(ptr_a, st->lp_flt_coeff_a_prev + ORDER + 1, ORDER + 1);
  ------------------
  |  |   30|   105k|#define ORDER 16
  ------------------
                ixheaacd_mem_cpy(ptr_a, st->lp_flt_coeff_a_prev + ORDER + 1, ORDER + 1);
  ------------------
  |  |   30|   105k|#define ORDER 16
  ------------------
  439|       |
  440|   105k|  return err;
  441|   105k|}
ixheaacd_randomsign:
  443|  12.2M|FLOAT32 ixheaacd_randomsign(UWORD32 *seed) {
  444|  12.2M|  FLOAT32 sign = 0.0f;
  445|  12.2M|  *seed = (UWORD32)(((UWORD64)(*seed) * (UWORD64)69069) + 5);
  446|       |
  447|  12.2M|  if (((*seed) & 0x10000) > 0)
  ------------------
  |  Branch (447:7): [True: 6.21M, False: 6.07M]
  ------------------
  448|  6.21M|    sign = -1.f;
  449|  6.07M|  else
  450|  6.07M|    sign = +1.f;
  451|       |
  452|  12.2M|  return sign;
  453|  12.2M|}
ixheaacd_tcx_fwd_alcnx.c:ixheaacd_low_fq_deemphasis:
  108|   105k|                                       FLOAT32 gains[]) {
  109|   105k|  WORD32 i, j, k, i_max;
  110|   105k|  FLOAT32 max, factor, rm;
  111|       |
  112|   105k|  k = 8;
  113|   105k|  i_max = lg / 4;
  114|       |
  115|   105k|  max = 0.01f;
  116|  1.10M|  for (i = 0; i < i_max; i += k) {
  ------------------
  |  Branch (116:15): [True: 1.00M, False: 105k]
  ------------------
  117|  1.00M|    rm = 0.01f;
  118|  9.00M|    for (j = i; j < i + k; j++) rm += x[j] * x[j];
  ------------------
  |  Branch (118:17): [True: 8.00M, False: 1.00M]
  ------------------
  119|       |
  120|  1.00M|    if (rm > max) max = rm;
  ------------------
  |  Branch (120:9): [True: 240k, False: 759k]
  ------------------
  121|  1.00M|  }
  122|       |
  123|   105k|  factor = 0.1f;
  124|  1.10M|  for (i = 0; i < i_max; i += k) {
  ------------------
  |  Branch (124:15): [True: 1.00M, False: 105k]
  ------------------
  125|  1.00M|    rm = 0.01f;
  126|  9.00M|    for (j = i; j < i + k; j++) rm += x[j] * x[j];
  ------------------
  |  Branch (126:17): [True: 8.00M, False: 1.00M]
  ------------------
  127|       |
  128|  1.00M|    rm = (FLOAT32)sqrt(rm / max);
  129|  1.00M|    if (rm > factor) factor = rm;
  ------------------
  |  Branch (129:9): [True: 233k, False: 766k]
  ------------------
  130|       |
  131|  9.00M|    for (j = i; j < i + k; j++) x[j] *= factor;
  ------------------
  |  Branch (131:17): [True: 8.00M, False: 1.00M]
  ------------------
  132|       |
  133|  1.00M|    gains[i / k] = factor;
  134|  1.00M|  }
  135|       |
  136|   105k|  return;
  137|   105k|}

ixheaacd_lsp_to_lp_conversion:
   84|  1.19M|VOID ixheaacd_lsp_to_lp_conversion(FLOAT32 *lsp, FLOAT32 *lp_flt_coff_a) {
   85|  1.19M|  WORD32 i;
   86|  1.19M|  FLOAT32 *ppoly_f1, *ppoly_f2;
   87|  1.19M|  FLOAT32 *plp_flt_coff_a_bott, *plp_flt_coff_a_top;
   88|  1.19M|  FLOAT32 poly1[ORDER_BY_2 + 2], poly2[ORDER_BY_2 + 2];
   89|       |
   90|  1.19M|  poly1[0] = 0.0f;
   91|  1.19M|  poly2[0] = 0.0f;
   92|       |
   93|  1.19M|  ixheaacd_compute_coeff_poly_f(lsp, &poly1[1], &poly2[1]);
   94|       |
   95|  1.19M|  ppoly_f1 = poly1 + ORDER_BY_2 + 1;
  ------------------
  |  |   31|  1.19M|#define ORDER_BY_2 (ORDER / 2)
  |  |  ------------------
  |  |  |  |   30|  1.19M|#define ORDER 16
  |  |  ------------------
  ------------------
   96|  1.19M|  ppoly_f2 = poly2 + ORDER_BY_2 + 1;
  ------------------
  |  |   31|  1.19M|#define ORDER_BY_2 (ORDER / 2)
  |  |  ------------------
  |  |  |  |   30|  1.19M|#define ORDER 16
  |  |  ------------------
  ------------------
   97|       |
   98|  10.7M|  for (i = 0; i < ORDER_BY_2; i++) {
  ------------------
  |  |   31|  10.7M|#define ORDER_BY_2 (ORDER / 2)
  |  |  ------------------
  |  |  |  |   30|  10.7M|#define ORDER 16
  |  |  ------------------
  ------------------
  |  Branch (98:15): [True: 9.59M, False: 1.19M]
  ------------------
   99|  9.59M|    ppoly_f1[0] += ppoly_f1[-1];
  100|  9.59M|    ppoly_f2[0] -= ppoly_f2[-1];
  101|  9.59M|    ppoly_f1--;
  102|  9.59M|    ppoly_f2--;
  103|  9.59M|  }
  104|       |
  105|  1.19M|  plp_flt_coff_a_bott = lp_flt_coff_a;
  106|  1.19M|  *plp_flt_coff_a_bott++ = 1.0f;
  107|  1.19M|  plp_flt_coff_a_top = lp_flt_coff_a + ORDER;
  ------------------
  |  |   30|  1.19M|#define ORDER 16
  ------------------
  108|  1.19M|  ppoly_f1 = poly1 + 2;
  109|  1.19M|  ppoly_f2 = poly2 + 2;
  110|  10.7M|  for (i = 0; i < ORDER_BY_2; i++) {
  ------------------
  |  |   31|  10.7M|#define ORDER_BY_2 (ORDER / 2)
  |  |  ------------------
  |  |  |  |   30|  10.7M|#define ORDER 16
  |  |  ------------------
  ------------------
  |  Branch (110:15): [True: 9.59M, False: 1.19M]
  ------------------
  111|  9.59M|    *plp_flt_coff_a_bott++ = 0.5f * (*ppoly_f1 + *ppoly_f2);
  112|  9.59M|    *plp_flt_coff_a_top-- = 0.5f * (*ppoly_f1++ - *ppoly_f2++);
  113|  9.59M|  }
  114|       |
  115|  1.19M|  return;
  116|  1.19M|}
ixheaacd_lpc_to_td:
  118|   211k|VOID ixheaacd_lpc_to_td(FLOAT32 *coeff, WORD32 order, FLOAT32 *gains, WORD32 lg) {
  119|   211k|  FLOAT32 data_r[LEN_SUPERFRAME * 2];
  120|   211k|  FLOAT32 data_i[LEN_SUPERFRAME * 2];
  121|   211k|  FLOAT64 avg_fac;
  122|   211k|  WORD32 idata_r[LEN_SUPERFRAME * 2];
  123|   211k|  WORD32 idata_i[LEN_SUPERFRAME * 2];
  124|   211k|  WORD8 qshift;
  125|   211k|  WORD32 preshift = 0;
  126|   211k|  WORD32 itemp;
  127|   211k|  FLOAT32 ftemp = 0;
  128|   211k|  FLOAT32 tmp, qfac;
  129|   211k|  WORD32 i, size_n;
  130|       |
  131|   211k|  size_n = 2 * lg;
  132|   211k|  avg_fac = PI / (FLOAT32)(size_n);
  ------------------
  |  |  153|   211k|#define PI 3.14159265358979323846264338327950288
  ------------------
  133|       |
  134|  3.80M|  for (i = 0; i < order + 1; i++) {
  ------------------
  |  Branch (134:15): [True: 3.59M, False: 211k]
  ------------------
  135|  3.59M|    tmp = (FLOAT32)(((FLOAT32)i) * avg_fac);
  136|  3.59M|    data_r[i] = (FLOAT32)(coeff[i] * cos(tmp));
  137|  3.59M|    data_i[i] = (FLOAT32)(-coeff[i] * sin(tmp));
  138|  3.59M|  }
  139|  21.3M|  for (; i < size_n; i++) {
  ------------------
  |  Branch (139:10): [True: 21.0M, False: 211k]
  ------------------
  140|  21.0M|    data_r[i] = 0.f;
  141|  21.0M|    data_i[i] = 0.f;
  142|  21.0M|  }
  143|       |
  144|  24.8M|  for (i = 0; i < size_n; i++) {
  ------------------
  |  Branch (144:15): [True: 24.6M, False: 211k]
  ------------------
  145|  24.6M|    if (ABS(data_r[i]) > ftemp) ftemp = ABS(data_r[i]);
  ------------------
  |  |   60|  24.6M|#define ABS(A) ((A) < 0 ? (-A) : (A))
  |  |  ------------------
  |  |  |  Branch (60:17): [True: 1.60M, False: 23.0M]
  |  |  ------------------
  ------------------
                  if (ABS(data_r[i]) > ftemp) ftemp = ABS(data_r[i]);
  ------------------
  |  |   60|   418k|#define ABS(A) ((A) < 0 ? (-A) : (A))
  |  |  ------------------
  |  |  |  Branch (60:17): [True: 132k, False: 285k]
  |  |  ------------------
  ------------------
  |  Branch (145:9): [True: 418k, False: 24.2M]
  ------------------
  146|  24.6M|    if (ABS(data_i[i]) > ftemp) ftemp = ABS(data_i[i]);
  ------------------
  |  |   60|  24.6M|#define ABS(A) ((A) < 0 ? (-A) : (A))
  |  |  ------------------
  |  |  |  Branch (60:17): [True: 1.76M, False: 22.9M]
  |  |  ------------------
  ------------------
                  if (ABS(data_i[i]) > ftemp) ftemp = ABS(data_i[i]);
  ------------------
  |  |   60|      0|#define ABS(A) ((A) < 0 ? (-A) : (A))
  |  |  ------------------
  |  |  |  Branch (60:17): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (146:9): [True: 0, False: 24.6M]
  ------------------
  147|  24.6M|  }
  148|       |
  149|   211k|  itemp = (WORD32)ftemp;
  150|   211k|  qshift = ixheaac_norm32(itemp);
  151|       |
  152|  24.8M|  for (i = 0; i < size_n; i++) {
  ------------------
  |  Branch (152:15): [True: 24.6M, False: 211k]
  ------------------
  153|  24.6M|    idata_r[i] = (WORD32)(data_r[i] * ((WORD64)1 << qshift));
  154|  24.6M|    idata_i[i] = (WORD32)(data_i[i] * ((WORD64)1 << qshift));
  155|  24.6M|  }
  156|       |
  157|   211k|  ixheaacd_complex_fft(idata_r, idata_i, size_n, -1, &preshift);
  158|       |
  159|   211k|  qfac = 1.0f / ((FLOAT32)((WORD64)1 << (qshift - preshift)));
  160|       |
  161|  24.8M|  for (i = 0; i < size_n; i++) {
  ------------------
  |  Branch (161:15): [True: 24.6M, False: 211k]
  ------------------
  162|  24.6M|    data_r[i] = (FLOAT32)((FLOAT32)idata_r[i] * qfac);
  163|  24.6M|    data_i[i] = (FLOAT32)((FLOAT32)idata_i[i] * qfac);
  164|  24.6M|  }
  165|       |
  166|  12.5M|  for (i = 0; i < size_n / 2; i++) {
  ------------------
  |  Branch (166:15): [True: 12.3M, False: 211k]
  ------------------
  167|  12.3M|    gains[i] =
  168|  12.3M|        (FLOAT32)(1.0f / (sqrt(data_r[i] * data_r[i] + data_i[i] * data_i[i]) + FLT_EPSILON));
  169|  12.3M|  }
  170|       |
  171|   211k|  return;
  172|   211k|}
ixheaacd_noise_shaping:
  175|   105k|                            FLOAT32 g2[]) {
  176|   105k|  WORD32 i, k;
  177|   105k|  FLOAT32 rr_prev, a = 0, b = 0;
  178|   105k|  FLOAT32 rr[1024];
  179|       |
  180|   105k|  k = lg / M;
  181|       |
  182|   105k|  rr_prev = 0;
  183|       |
  184|   105k|  memcpy(&rr, r, lg * sizeof(FLOAT32));
  185|       |
  186|  32.1M|  for (i = 0; i < lg; i++) {
  ------------------
  |  Branch (186:15): [True: 32.0M, False: 105k]
  ------------------
  187|  32.0M|    if ((i % k) == 0) {
  ------------------
  |  Branch (187:9): [True: 6.17M, False: 25.8M]
  ------------------
  188|  6.17M|      a = 2.0f * g1[i / k] * g2[i / k] / (g1[i / k] + g2[i / k]);
  189|  6.17M|      b = (g2[i / k] - g1[i / k]) / (g1[i / k] + g2[i / k]);
  190|  6.17M|    }
  191|       |
  192|  32.0M|    rr[i] = a * rr[i] + b * rr_prev;
  193|  32.0M|    rr_prev = rr[i];
  194|  32.0M|  }
  195|       |
  196|  16.1M|  for (i = 0; i < lg / 2; i++) {
  ------------------
  |  Branch (196:15): [True: 16.0M, False: 105k]
  ------------------
  197|  16.0M|    r[i] = rr[2 * i];
  198|  16.0M|    r[lg / 2 + i] = rr[lg - 2 * i - 1];
  199|  16.0M|  }
  200|   105k|  return;
  201|   105k|}
ixheaacd_lpc_coef_gen:
  204|   105k|                           WORD32 nb_subfr, WORD32 m) {
  205|   105k|  FLOAT32 lsf[ORDER], *ptr_a;
  206|   105k|  FLOAT32 inc, fnew, fold;
  207|   105k|  WORD32 i;
  208|       |
  209|   105k|  ptr_a = a;
  210|       |
  211|   105k|  inc = 1.0f / (FLOAT32)nb_subfr;
  212|   105k|  fnew = 0.5f - (0.5f * inc);
  213|   105k|  fold = 1.0f - fnew;
  214|       |
  215|  1.79M|  for (i = 0; i < m; i++) {
  ------------------
  |  Branch (215:15): [True: 1.69M, False: 105k]
  ------------------
  216|  1.69M|    lsf[i] = (lsf_old[i] * fold) + (lsf_new[i] * fnew);
  217|  1.69M|  }
  218|   105k|  ixheaacd_lsp_to_lp_conversion(lsf, ptr_a);
  219|   105k|  ptr_a += (m + 1);
  220|   105k|  ixheaacd_lsp_to_lp_conversion(lsf_old, ptr_a);
  221|   105k|  ptr_a += (m + 1);
  222|   105k|  ixheaacd_lsp_to_lp_conversion(lsf_new, ptr_a);
  223|   105k|  ptr_a += (m + 1);
  224|       |
  225|   105k|  return;
  226|   105k|}
ixheaacd_interpolation_lsp_params:
  230|   164k|                                       WORD32 nb_subfr) {
  231|   164k|  FLOAT32 lsp[ORDER];
  232|   164k|  FLOAT32 factor;
  233|   164k|  WORD32 i, k;
  234|   164k|  FLOAT32 x_plus_y, x_minus_y;
  235|       |
  236|   164k|  factor = 1.0f / (FLOAT32)nb_subfr;
  237|       |
  238|   164k|  x_plus_y = 0.5f * factor;
  239|       |
  240|   882k|  for (k = 0; k < nb_subfr; k++) {
  ------------------
  |  Branch (240:15): [True: 717k, False: 164k]
  ------------------
  241|   717k|    x_minus_y = 1.0f - x_plus_y;
  242|  12.1M|    for (i = 0; i < ORDER; i++) {
  ------------------
  |  |   30|  12.1M|#define ORDER 16
  ------------------
  |  Branch (242:17): [True: 11.4M, False: 717k]
  ------------------
  243|  11.4M|      lsp[i] = (lsp_old[i] * x_minus_y) + (lsp_new[i] * x_plus_y);
  244|  11.4M|    }
  245|   717k|    x_plus_y += factor;
  246|       |
  247|   717k|    ixheaacd_lsp_to_lp_conversion(lsp, lp_flt_coff_a);
  248|       |
  249|   717k|    lp_flt_coff_a += (ORDER + 1);
  ------------------
  |  |   30|   717k|#define ORDER 16
  ------------------
  250|   717k|  }
  251|       |
  252|   164k|  ixheaacd_lsp_to_lp_conversion(lsp_new, lp_flt_coff_a);
  253|       |
  254|   164k|  return;
  255|   164k|}
ixheaacd_tcx_fwd_mdct.c:ixheaacd_compute_coeff_poly_f:
   63|  1.19M|                                          FLOAT32 *f2) {
   64|  1.19M|  FLOAT32 b1, b2;
   65|  1.19M|  FLOAT32 *ptr_lsp;
   66|  1.19M|  WORD32 i, j;
   67|       |
   68|  1.19M|  ptr_lsp = lsp;
   69|  1.19M|  f1[0] = f2[0] = 1.0f;
   70|       |
   71|  10.7M|  for (i = 1; i <= ORDER_BY_2; i++) {
  ------------------
  |  |   31|  10.7M|#define ORDER_BY_2 (ORDER / 2)
  |  |  ------------------
  |  |  |  |   30|  10.7M|#define ORDER 16
  |  |  ------------------
  ------------------
  |  Branch (71:15): [True: 9.59M, False: 1.19M]
  ------------------
   72|  9.59M|    b1 = -2.0f * (*ptr_lsp++);
   73|  9.59M|    b2 = -2.0f * (*ptr_lsp++);
   74|  9.59M|    f1[i] = (b1 * f1[i - 1]) + (2.0f * f1[i - 2]);
   75|  9.59M|    f2[i] = (b2 * f2[i - 1]) + (2.0f * f2[i - 2]);
   76|  43.1M|    for (j = i - 1; j > 0; j--) {
  ------------------
  |  Branch (76:21): [True: 33.5M, False: 9.59M]
  ------------------
   77|  33.5M|      f1[j] += (b1 * f1[j - 1]) + f1[j - 2];
   78|  33.5M|      f2[j] += (b2 * f2[j - 1]) + f2[j - 2];
   79|  33.5M|    }
   80|  9.59M|  }
   81|       |
   82|  1.19M|  return;
   83|  1.19M|}

ixheaacd_tns_apply:
  186|   227k|                                ia_tns_frame_info_struct *pstr_tns) {
  187|   227k|  WORD32 f, start, stop, size, inc;
  188|   227k|  WORD32 n_filt, coef_res, order, direction;
  189|   227k|  WORD32 *ptr_spec;
  190|   227k|  WORD32 scale_spec;
  191|   227k|  WORD32 scale_lpc;
  192|   227k|  WORD32 guard_band;
  193|   227k|  WORD32 shift;
  194|   227k|  WORD32 lpc_coeff[TNS_MAX_ORDER + 1];
  195|   227k|  WORD32 par_coeff[TNS_MAX_ORDER + 1];
  196|   227k|  ia_tns_filter_struct *filt;
  197|       |
  198|   227k|  const WORD16 *sfb_top;
  199|       |
  200|   227k|  WORD32 nbins = (pstr_sfb_info->islong) ? 1024 : 128;
  ------------------
  |  Branch (200:18): [True: 145k, False: 81.7k]
  ------------------
  201|   227k|  WORD32 i, j, idx;
  202|       |
  203|   227k|  idx = (pstr_sfb_info->islong) ? 0 : 1;
  ------------------
  |  Branch (203:9): [True: 145k, False: 81.7k]
  ------------------
  204|       |
  205|   227k|  ptr_spec = &usac_data->scratch_buffer[0];
  206|       |
  207|  1.02M|  for (j = 0; j < pstr_tns->n_subblocks; j++) {
  ------------------
  |  Branch (207:15): [True: 799k, False: 227k]
  ------------------
  208|   799k|    sfb_top = pstr_sfb_info->ptr_sfb_tbl;
  209|       |
  210|   233M|    for (i = 0; i < nbins; i++) {
  ------------------
  |  Branch (210:17): [True: 232M, False: 799k]
  ------------------
  211|   232M|      ptr_spec[i] = spec[i];
  212|   232M|    }
  213|       |
  214|   799k|    if (pstr_tns->str_tns_info[j].n_filt) {
  ------------------
  |  Branch (214:9): [True: 99.9k, False: 699k]
  ------------------
  215|  99.9k|      n_filt = pstr_tns->str_tns_info[j].n_filt;
  216|       |
  217|   208k|      for (f = 0; f < n_filt; f++) {
  ------------------
  |  Branch (217:19): [True: 108k, False: 99.9k]
  ------------------
  218|   108k|        WORD32 tmp;
  219|       |
  220|   108k|        coef_res = pstr_tns->str_tns_info[j].coef_res;
  221|   108k|        filt = &pstr_tns->str_tns_info[j].str_filter[f];
  222|   108k|        order = filt->order;
  223|   108k|        direction = filt->direction;
  224|   108k|        start = filt->start_band;
  225|   108k|        stop = filt->stop_band;
  226|       |
  227|   108k|        if (!order) continue;
  ------------------
  |  Branch (227:13): [True: 6.53k, False: 102k]
  ------------------
  228|       |
  229|   102k|        ixheaacd_tns_dec_coef_usac(usac_data, filt, coef_res,
  230|   102k|                                   (WORD32 *)par_coeff);
  231|       |
  232|   102k|        ixheaacd_tns_parcor_lpc_convert_usac(par_coeff, lpc_coeff, &scale_lpc,
  233|   102k|                                             filt->order);
  234|       |
  235|   102k|        tmp = (*usac_data->tns_max_bands_tbl_usac)[usac_data->sampling_rate_idx]
  236|   102k|                                                  [idx];
  237|       |
  238|   102k|        start = ixheaac_min32(start, tmp);
  239|       |
  240|   102k|        start = ixheaac_min32(start, nbands);
  241|   102k|        if (start > pstr_sfb_info->sfb_per_sbk) return -1;
  ------------------
  |  Branch (241:13): [True: 0, False: 102k]
  ------------------
  242|   102k|        start = sfb_offset(start);
  ------------------
  |  |   51|   102k|#define sfb_offset(x) (((x) > 0) ? sfb_top[(x)-1] : 0)
  |  |  ------------------
  |  |  |  Branch (51:24): [True: 89.2k, False: 13.2k]
  |  |  ------------------
  ------------------
  243|       |
  244|   102k|        stop = ixheaac_min32(stop, tmp);
  245|   102k|        stop = ixheaac_min32(stop, nbands);
  246|   102k|        if (stop > pstr_sfb_info->sfb_per_sbk) return -1;
  ------------------
  |  Branch (246:13): [True: 0, False: 102k]
  ------------------
  247|   102k|        stop = sfb_offset(stop);
  ------------------
  |  |   51|   102k|#define sfb_offset(x) (((x) > 0) ? sfb_top[(x)-1] : 0)
  |  |  ------------------
  |  |  |  Branch (51:24): [True: 100k, False: 1.55k]
  |  |  ------------------
  ------------------
  248|       |
  249|   102k|        guard_band = 31 - ixheaac_norm32(filt->order);
  250|       |
  251|   102k|        if ((size = stop - start) <= 0) continue;
  ------------------
  |  Branch (251:13): [True: 63.8k, False: 38.6k]
  ------------------
  252|       |
  253|  38.6k|        if (direction) {
  ------------------
  |  Branch (253:13): [True: 16.9k, False: 21.6k]
  ------------------
  254|  16.9k|          inc = -1;
  255|  16.9k|          shift = stop - 1;
  256|  16.9k|        }
  257|       |
  258|  21.6k|        else {
  259|  21.6k|          inc = 1;
  260|  21.6k|          shift = start;
  261|  21.6k|        }
  262|       |
  263|  38.6k|        {
  264|  38.6k|          WORD32 *ptr_temp = ptr_spec + start;
  265|  38.6k|          scale_spec = (*ixheaacd_calc_max_spectral_line)(ptr_temp, size);
  266|  38.6k|        }
  267|       |
  268|  38.6k|        scale_spec = ((scale_spec - guard_band) - scale_lpc);
  269|       |
  270|  38.6k|        if (scale_spec > 0) {
  ------------------
  |  Branch (270:13): [True: 19.5k, False: 19.1k]
  ------------------
  271|  19.5k|          ixheaacd_tns_ar_filter_usac(&ptr_spec[shift], size, inc, lpc_coeff,
  272|  19.5k|                                      filt->order, scale_lpc,
  273|  19.5k|                                      usac_data->x_ac_dec);
  274|  19.5k|        }
  275|       |
  276|  19.1k|        else {
  277|  19.1k|          WORD32 *ptr_temp = ptr_spec + start;
  278|       |
  279|  19.1k|          scale_spec = -scale_spec;
  280|  19.1k|          scale_spec = ixheaac_min32(scale_spec, 31);
  281|       |
  282|  2.09M|          for (i = size; i != 0; i--) {
  ------------------
  |  Branch (282:26): [True: 2.07M, False: 19.1k]
  ------------------
  283|  2.07M|            *ptr_temp = *ptr_temp >> scale_spec;
  284|  2.07M|            ptr_temp++;
  285|  2.07M|          }
  286|       |
  287|  19.1k|          {
  288|  19.1k|            ixheaacd_tns_ar_filter_usac(&ptr_spec[shift], size, inc, lpc_coeff,
  289|  19.1k|                                        filt->order, scale_lpc,
  290|  19.1k|                                        usac_data->x_ac_dec);
  291|  19.1k|          }
  292|       |
  293|  19.1k|          {
  294|  19.1k|            ptr_temp = ptr_spec + start;
  295|  19.1k|            i = size;
  296|       |
  297|  2.07M|            do {
  298|  2.07M|              *ptr_temp = *ptr_temp << scale_spec;
  299|  2.07M|              ptr_temp++;
  300|  2.07M|              i--;
  301|  2.07M|            } while (i != 0);
  ------------------
  |  Branch (301:22): [True: 2.05M, False: 19.1k]
  ------------------
  302|  19.1k|          }
  303|  19.1k|        }
  304|       |
  305|  3.71M|        for (i = start; i <= stop - 1; i++) {
  ------------------
  |  Branch (305:25): [True: 3.67M, False: 38.6k]
  ------------------
  306|  3.67M|          spec[i] = ptr_spec[i];
  307|  3.67M|        }
  308|  38.6k|      }
  309|  99.9k|    }
  310|       |
  311|   799k|    spec += pstr_sfb_info->bins_per_sbk;
  312|   799k|  }
  313|   227k|  return 0;
  314|   227k|}
ixheaacd_tns.c:ixheaacd_tns_dec_coef_usac:
   55|   102k|                                       WORD32 coef_res, WORD32 *par_coeff) {
   56|   102k|  WORD32 resolution;
   57|   102k|  WORD32 *ptr_par_coeff = par_coeff;
   58|   102k|  const WORD32 *tns_coeff_ptr;
   59|   102k|  WORD32 ixheaacd_drc_offset = 4;
   60|   102k|  WORD16 *ptr_coeff = filter->coef;
   61|   102k|  WORD32 order;
   62|       |
   63|   102k|  resolution = coef_res - 3;
   64|   102k|  tns_coeff_ptr = usac_data->tns_coeff3_32;
   65|   102k|  if (resolution) {
  ------------------
  |  Branch (65:7): [True: 79.9k, False: 22.5k]
  ------------------
   66|  79.9k|    tns_coeff_ptr = usac_data->tns_coeff4_32;
   67|  79.9k|    ixheaacd_drc_offset = ixheaacd_drc_offset << 1;
   68|  79.9k|  }
   69|   102k|  order = filter->order;
   70|       |
   71|   400k|  do {
   72|   400k|    WORD16 temp = *ptr_coeff++;
   73|   400k|    *ptr_par_coeff++ = tns_coeff_ptr[temp + ixheaacd_drc_offset];
   74|   400k|    order--;
   75|   400k|  } while (order != 0);
  ------------------
  |  Branch (75:12): [True: 298k, False: 102k]
  ------------------
   76|   102k|}
ixheaacd_tns.c:ixheaacd_tns_parcor_lpc_convert_usac:
   82|   102k|{
   83|   102k|  WORD i, j, status;
   84|   102k|  WORD32 accu;
   85|   102k|  WORD32 temp_buf1[TNS_MAX_ORDER + 1];
   86|   102k|  WORD32 temp_buf2[TNS_MAX_ORDER + 1];
   87|   102k|  WORD32 accu1, accu2;
   88|       |
   89|   102k|  status = 1;
   90|   102k|  *scale = 1;
   91|       |
   92|   259k|  while (status) {
  ------------------
  |  Branch (92:10): [True: 157k, False: 102k]
  ------------------
   93|   157k|    status = 0;
   94|       |
   95|  5.19M|    for (i = TNS_MAX_ORDER; i >= 0; i--) {
  ------------------
  |  |   24|   157k|#define TNS_MAX_ORDER 31
  ------------------
  |  Branch (95:29): [True: 5.03M, False: 157k]
  ------------------
   96|  5.03M|      temp_buf1[i] = 0;
   97|  5.03M|      temp_buf2[i] = 0;
   98|  5.03M|    }
   99|       |
  100|   157k|    accu1 = (0x40000000 >> (*scale - 1));
  101|       |
  102|  1.03M|    for (i = 0; i <= order; i++) {
  ------------------
  |  Branch (102:17): [True: 874k, False: 157k]
  ------------------
  103|   874k|      accu = accu1;
  104|       |
  105|  6.01M|      for (j = 0; j < order; j++) {
  ------------------
  |  Branch (105:19): [True: 5.14M, False: 874k]
  ------------------
  106|  5.14M|        temp_buf2[j] = (accu1);
  107|       |
  108|  5.14M|        accu1 = ixheaac_add32_sat(
  109|  5.14M|            accu1, ixheaac_mult32_shl_sat(parcor[j], temp_buf1[j]));
  110|  5.14M|        if (ixheaac_abs32_sat(accu1) == 0x7fffffff) status = 1;
  ------------------
  |  Branch (110:13): [True: 356k, False: 4.78M]
  ------------------
  111|  5.14M|      }
  112|       |
  113|  6.01M|      for (j = (order - 1); j >= 0; j--) {
  ------------------
  |  Branch (113:29): [True: 5.14M, False: 874k]
  ------------------
  114|  5.14M|        accu2 = (temp_buf1[j]);
  115|  5.14M|        accu2 = ixheaac_add32_sat(
  116|  5.14M|            accu2, ixheaac_mult32_shl_sat(parcor[j], temp_buf2[j]));
  117|  5.14M|        temp_buf1[j + 1] = (accu2);
  118|       |
  119|  5.14M|        if (ixheaac_abs32_sat(accu2) == 0x7fffffff) status = 1;
  ------------------
  |  Branch (119:13): [True: 356k, False: 4.78M]
  ------------------
  120|  5.14M|      }
  121|       |
  122|   874k|      temp_buf1[0] = (accu);
  123|   874k|      lpc_coeff[i] = (accu1);
  124|   874k|      accu1 = 0;
  125|   874k|    }
  126|       |
  127|   157k|    accu1 = (status - 1);
  128|       |
  129|   157k|    if (accu1 == 0) {
  ------------------
  |  Branch (129:9): [True: 54.8k, False: 102k]
  ------------------
  130|  54.8k|      *scale = *scale + 1;
  131|  54.8k|    }
  132|   157k|  }
  133|   102k|}
ixheaacd_tns.c:ixheaacd_tns_ar_filter_usac:
  138|  38.6k|                                        WORD32 *ptr_filter_state) {
  139|  38.6k|  WORD32 i, j;
  140|  38.6k|  WORD32 y;
  141|  38.6k|  WORD64 acc;
  142|       |
  143|  38.6k|  if ((order & 3) != 0) {
  ------------------
  |  Branch (143:7): [True: 33.4k, False: 5.16k]
  ------------------
  144|  67.4k|    for (i = order + 1; i < ((WORD32)(order & 0xfffffffc) + 4); i++) {
  ------------------
  |  Branch (144:25): [True: 34.0k, False: 33.4k]
  ------------------
  145|  34.0k|      lpc_coeff[i] = 0;
  146|  34.0k|    }
  147|  33.4k|    lpc_coeff[i] = 0;
  148|  33.4k|    order = ((order & 0xfffffffc) + 4);
  149|  33.4k|  }
  150|       |
  151|   332k|  for (i = 0; i < order; i++) {
  ------------------
  |  Branch (151:15): [True: 293k, False: 38.6k]
  ------------------
  152|   293k|    y = *spectrum;
  153|   293k|    acc = 0;
  154|       |
  155|  1.42M|    for (j = i; j > 0; j--) {
  ------------------
  |  Branch (155:17): [True: 1.13M, False: 293k]
  ------------------
  156|  1.13M|      acc = ixheaac_add64_sat(
  157|  1.13M|          acc, ixheaac_mult64(ptr_filter_state[j - 1], lpc_coeff[j]));
  158|  1.13M|      ptr_filter_state[j] = ptr_filter_state[j - 1];
  159|  1.13M|    }
  160|       |
  161|   293k|    y = ixheaac_sub32_sat(y, (WORD32)(acc >> 31));
  162|   293k|    ptr_filter_state[0] = ixheaac_shl32(y, shift_value);
  163|   293k|    *spectrum = y;
  164|   293k|    spectrum += inc;
  165|   293k|  }
  166|       |
  167|  3.42M|  for (i = order; i < size; i++) {
  ------------------
  |  Branch (167:19): [True: 3.38M, False: 38.6k]
  ------------------
  168|  3.38M|    y = *spectrum;
  169|  3.38M|    acc = 0;
  170|  27.0M|    for (j = order; j > 0; j--) {
  ------------------
  |  Branch (170:21): [True: 23.6M, False: 3.38M]
  ------------------
  171|  23.6M|      acc = ixheaac_add64_sat(
  172|  23.6M|          acc, ixheaac_mult64(ptr_filter_state[j - 1], lpc_coeff[j]));
  173|  23.6M|      ;
  174|  23.6M|      ptr_filter_state[j] = ptr_filter_state[j - 1];
  175|  23.6M|    }
  176|  3.38M|    y = ixheaac_sub32_sat(y, (WORD32)(acc >> 31));
  177|  3.38M|    ptr_filter_state[0] = ixheaac_shl32(y, shift_value);
  178|  3.38M|    *spectrum = y;
  179|  3.38M|    spectrum += inc;
  180|  3.38M|  }
  181|  38.6k|}

ixheaacd_usac_ec_init:
  380|  30.1k|VOID ixheaacd_usac_ec_init(ia_ec_state_str *pstr_ec_state, WORD32 core_coder_mode) {
  381|  30.1k|  pstr_ec_state->win_shape = 1;
  382|  30.1k|  pstr_ec_state->win_seq = ONLY_LONG_SEQUENCE;
  ------------------
  |  |  100|  30.1k|#define ONLY_LONG_SEQUENCE 0
  ------------------
  383|  30.1k|  pstr_ec_state->prev_win_group_len = 1;
  384|       |
  385|  30.1k|  pstr_ec_state->conceal_state = FRAME_OKAY;
  ------------------
  |  |   26|  30.1k|#define FRAME_OKAY (0)
  ------------------
  386|       |
  387|  30.1k|  memset(pstr_ec_state->spectral_coeff, 0, sizeof(pstr_ec_state->spectral_coeff));
  388|  30.1k|  memset(pstr_ec_state->q_spec_coeff, 0, sizeof(pstr_ec_state->q_spec_coeff));
  389|       |
  390|  30.1k|  pstr_ec_state->prev_frame_ok[0] = 1;
  391|  30.1k|  pstr_ec_state->prev_frame_ok[1] = 1;
  392|       |
  393|  30.1k|  pstr_ec_state->fade_idx = 0;
  394|       |
  395|  30.1k|  pstr_ec_state->prev_core_mode = core_coder_mode;
  396|  30.1k|}

_ZN5Codec15initXAACDecoderEb:
  112|  14.2k|IA_ERRORCODE Codec::initXAACDecoder(bool isADTS) {
  113|       |  /* First part                                        */
  114|       |  /* Error Handler Init                                */
  115|       |  /* Get Library Name, Library Version and API Version */
  116|       |  /* Initialize API structure + Default config set     */
  117|       |  /* Set config params from user                       */
  118|       |  /* Initialize memory tables                          */
  119|       |  /* Get memory information and allocate memory        */
  120|       |
  121|  14.2k|  mInputBufferSize = 0;
  122|  14.2k|  mInputBuffer = nullptr;
  123|  14.2k|  mOutputBuffer = nullptr;
  124|       |  /* Process struct initing end */
  125|       |
  126|       |  /* ******************************************************************/
  127|       |  /* Initialize API structure and set config params to default        */
  128|       |  /* ******************************************************************/
  129|       |  /* API size */
  130|  14.2k|  uint32_t pui_api_size;
  131|       |  /* Get the API size */
  132|  14.2k|  IA_ERRORCODE err_code =
  133|  14.2k|      ixheaacd_dec_api(nullptr, IA_API_CMD_GET_API_SIZE, 0, &pui_api_size);
  ------------------
  |  |   29|  14.2k|#define IA_API_CMD_GET_API_SIZE 0x0002
  ------------------
  134|       |
  135|       |  /* Allocate memory for API */
  136|  14.2k|  mXheaacCodecHandle = malloc(pui_api_size);
  137|  14.2k|  if (!mXheaacCodecHandle) {
  ------------------
  |  Branch (137:7): [True: 0, False: 14.2k]
  ------------------
  138|      0|    return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
  139|      0|  }
  140|  14.2k|  mMemoryVec.push_back(mXheaacCodecHandle);
  141|       |
  142|       |  /* Set the config params to default values */
  143|  14.2k|  err_code = ixheaacd_dec_api(mXheaacCodecHandle, IA_API_CMD_INIT,
  ------------------
  |  |   30|  14.2k|#define IA_API_CMD_INIT 0x0003
  ------------------
  144|  14.2k|                              IA_CMD_TYPE_INIT_API_PRE_CONFIG_PARAMS, nullptr);
  ------------------
  |  |   85|  14.2k|#define IA_CMD_TYPE_INIT_API_PRE_CONFIG_PARAMS 0x0100
  ------------------
  145|       |
  146|       |  /* Get the API size */
  147|  14.2k|  err_code = ia_drc_dec_api(nullptr, IA_API_CMD_GET_API_SIZE, 0, &pui_api_size);
  ------------------
  |  |   29|  14.2k|#define IA_API_CMD_GET_API_SIZE 0x0002
  ------------------
  148|       |
  149|       |  /* Allocate memory for API */
  150|  14.2k|  mMpegDDrcHandle = malloc(pui_api_size);
  151|  14.2k|  if (!mMpegDDrcHandle) {
  ------------------
  |  Branch (151:7): [True: 0, False: 14.2k]
  ------------------
  152|      0|    return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
  153|      0|  }
  154|  14.2k|  mMemoryVec.push_back(mMpegDDrcHandle);
  155|       |
  156|       |  /* Set the config params to default values */
  157|  14.2k|  err_code = ia_drc_dec_api(mMpegDDrcHandle, IA_API_CMD_INIT,
  ------------------
  |  |   30|  14.2k|#define IA_API_CMD_INIT 0x0003
  ------------------
  158|  14.2k|                            IA_CMD_TYPE_INIT_API_PRE_CONFIG_PARAMS, nullptr);
  ------------------
  |  |   85|  14.2k|#define IA_CMD_TYPE_INIT_API_PRE_CONFIG_PARAMS 0x0100
  ------------------
  159|       |
  160|       |  /* ******************************************************************/
  161|       |  /* Set config parameters                                            */
  162|       |  /* ******************************************************************/
  163|  14.2k|  uint32_t ui_mp4_flag = isADTS ? 0 : 1;
  ------------------
  |  Branch (163:26): [True: 12.5k, False: 1.67k]
  ------------------
  164|  14.2k|  err_code =
  165|  14.2k|      ixheaacd_dec_api(mXheaacCodecHandle, IA_API_CMD_SET_CONFIG_PARAM,
  ------------------
  |  |   32|  14.2k|#define IA_API_CMD_SET_CONFIG_PARAM 0x0004
  ------------------
  166|  14.2k|                       IA_ENHAACPLUS_DEC_CONFIG_PARAM_ISMP4, &ui_mp4_flag);
  ------------------
  |  |   90|  14.2k|#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_ISMP4 IA_XHEAAC_DEC_CONFIG_PARAM_MP4FLAG
  |  |  ------------------
  |  |  |  |   36|  14.2k|#define IA_XHEAAC_DEC_CONFIG_PARAM_MP4FLAG 0x000C
  |  |  ------------------
  ------------------
  167|       |
  168|       |  /* ******************************************************************/
  169|       |  /* Initialize Memory info tables                                    */
  170|       |  /* ******************************************************************/
  171|  14.2k|  uint32_t ui_proc_mem_tabs_size;
  172|  14.2k|  pVOID pv_alloc_ptr;
  173|       |  /* Get memory info tables size */
  174|  14.2k|  err_code = ixheaacd_dec_api(mXheaacCodecHandle, IA_API_CMD_GET_MEMTABS_SIZE,
  ------------------
  |  |   35|  14.2k|#define IA_API_CMD_GET_MEMTABS_SIZE 0x0006
  ------------------
  175|  14.2k|                              0, &ui_proc_mem_tabs_size);
  176|       |
  177|  14.2k|  pv_alloc_ptr = malloc(ui_proc_mem_tabs_size);
  178|  14.2k|  if (!pv_alloc_ptr) {
  ------------------
  |  Branch (178:7): [True: 0, False: 14.2k]
  ------------------
  179|      0|    return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
  180|      0|  }
  181|  14.2k|  mMemoryVec.push_back(pv_alloc_ptr);
  182|       |
  183|       |  /* Set pointer for process memory tables    */
  184|  14.2k|  err_code = ixheaacd_dec_api(mXheaacCodecHandle, IA_API_CMD_SET_MEMTABS_PTR, 0,
  ------------------
  |  |   36|  14.2k|#define IA_API_CMD_SET_MEMTABS_PTR 0x0007
  ------------------
  185|  14.2k|                              pv_alloc_ptr);
  186|       |
  187|       |  /* initialize the API, post config, fill memory tables  */
  188|  14.2k|  err_code = ixheaacd_dec_api(mXheaacCodecHandle, IA_API_CMD_INIT,
  ------------------
  |  |   30|  14.2k|#define IA_API_CMD_INIT 0x0003
  ------------------
  189|  14.2k|                              IA_CMD_TYPE_INIT_API_POST_CONFIG_PARAMS, nullptr);
  ------------------
  |  |   86|  14.2k|#define IA_CMD_TYPE_INIT_API_POST_CONFIG_PARAMS 0x0200
  ------------------
  190|       |
  191|       |  /* ******************************************************************/
  192|       |  /* Allocate Memory with info from library                           */
  193|       |  /* ******************************************************************/
  194|       |  /* There are four different types of memories, that needs to be allocated */
  195|       |  /* persistent,scratch,input and output */
  196|  71.1k|  for (int i = 0; i < 4; i++) {
  ------------------
  |  Branch (196:19): [True: 56.9k, False: 14.2k]
  ------------------
  197|  56.9k|    int ui_size = 0, ui_alignment = 0, ui_type = 0;
  198|       |
  199|       |    /* Get memory size */
  200|  56.9k|    err_code = ixheaacd_dec_api(mXheaacCodecHandle,
  201|  56.9k|                                IA_API_CMD_GET_MEM_INFO_SIZE, i, &ui_size);
  ------------------
  |  |   49|  56.9k|#define IA_API_CMD_GET_MEM_INFO_SIZE 0x0011
  ------------------
  202|       |
  203|       |    /* Get memory alignment */
  204|  56.9k|    err_code =
  205|  56.9k|        ixheaacd_dec_api(mXheaacCodecHandle, IA_API_CMD_GET_MEM_INFO_ALIGNMENT,
  ------------------
  |  |   50|  56.9k|#define IA_API_CMD_GET_MEM_INFO_ALIGNMENT 0x0012
  ------------------
  206|  56.9k|                         i, &ui_alignment);
  207|       |
  208|       |    /* Get memory type */
  209|  56.9k|    err_code = ixheaacd_dec_api(mXheaacCodecHandle,
  210|  56.9k|                                IA_API_CMD_GET_MEM_INFO_TYPE, i, &ui_type);
  ------------------
  |  |   51|  56.9k|#define IA_API_CMD_GET_MEM_INFO_TYPE 0x0013
  ------------------
  211|       |
  212|  56.9k|    pv_alloc_ptr = NULL;
  213|  56.9k|    ui_alignment = (ui_alignment + sizeof(void *) - 1) / sizeof(void *);
  214|  56.9k|    ui_alignment = ui_alignment * sizeof(void *);
  215|  56.9k|    if (0 != posix_memalign(&pv_alloc_ptr, ui_alignment, ui_size)) {
  ------------------
  |  Branch (215:9): [True: 0, False: 56.9k]
  ------------------
  216|      0|      return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
  217|      0|    }
  218|  56.9k|    if (!pv_alloc_ptr) {
  ------------------
  |  Branch (218:9): [True: 0, False: 56.9k]
  ------------------
  219|      0|      return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
  220|      0|    }
  221|  56.9k|    mMemoryVec.push_back(pv_alloc_ptr);
  222|       |
  223|       |    /* Set the buffer pointer */
  224|  56.9k|    err_code = ixheaacd_dec_api(mXheaacCodecHandle, IA_API_CMD_SET_MEM_PTR, i,
  ------------------
  |  |   54|  56.9k|#define IA_API_CMD_SET_MEM_PTR 0x0016
  ------------------
  225|  56.9k|                                pv_alloc_ptr);
  226|       |
  227|  56.9k|    if (ui_type == IA_MEMTYPE_INPUT) {
  ------------------
  |  |   55|  56.9k|#define IA_MEMTYPE_INPUT 0x02
  ------------------
  |  Branch (227:9): [True: 14.2k, False: 42.6k]
  ------------------
  228|  14.2k|      mInputBuffer = (pWORD8)pv_alloc_ptr;
  229|  14.2k|      mInputBufferSize = ui_size;
  230|  14.2k|    }
  231|  56.9k|    if (ui_type == IA_MEMTYPE_OUTPUT) mOutputBuffer = (pWORD8)pv_alloc_ptr;
  ------------------
  |  |   57|  56.9k|#define IA_MEMTYPE_OUTPUT 0x03
  ------------------
  |  Branch (231:9): [True: 14.2k, False: 42.6k]
  ------------------
  232|  56.9k|  }
  233|       |  /* End first part */
  234|       |
  235|  14.2k|  return IA_NO_ERROR;
  ------------------
  |  |   23|  14.2k|#define IA_NO_ERROR 0x00000000
  ------------------
  236|  14.2k|}
_ZN5Codec11initXAACDrcEPKhm:
  249|  14.2k|IA_ERRORCODE Codec::initXAACDrc(const uint8_t* data, size_t size) {
  250|  14.2k|  IA_ERRORCODE err_code = IA_NO_ERROR;
  ------------------
  |  |   23|  14.2k|#define IA_NO_ERROR 0x00000000
  ------------------
  251|  14.2k|  unsigned int ui_drc_val;
  252|       |  //  DRC_PRES_MODE_WRAP_DESIRED_TARGET
  253|  14.2k|  size_t targetLevelOffset =
  254|  14.2k|      std::min((size_t)DRC_TARGET_LEVEL_OFFSET, size - 1);
  255|  14.2k|  int32_t targetRefLevel = data[targetLevelOffset];
  256|       |
  257|  14.2k|  ui_drc_val = (unsigned int)targetRefLevel;
  258|  14.2k|  err_code = ixheaacd_dec_api(mXheaacCodecHandle, IA_API_CMD_SET_CONFIG_PARAM,
  ------------------
  |  |   32|  14.2k|#define IA_API_CMD_SET_CONFIG_PARAM 0x0004
  ------------------
  259|  14.2k|                              IA_ENHAACPLUS_DEC_CONFIG_PARAM_DRC_TARGET_LEVEL,
  ------------------
  |  |  100|  14.2k|        IA_XHEAAC_DEC_CONFIG_PARAM_DRC_TARGET_LEVEL
  |  |  ------------------
  |  |  |  |   44|  14.2k|#define IA_XHEAAC_DEC_CONFIG_PARAM_DRC_TARGET_LEVEL 0x0014
  |  |  ------------------
  ------------------
  260|  14.2k|                              &ui_drc_val);
  261|       |
  262|       |  /* Use ui_drc_val from PROP_DRC_OVERRIDE_REF_LEVEL or
  263|       |   * DRC_DEFAULT_MOBILE_REF_LEVEL
  264|       |   * for IA_ENHAACPLUS_DEC_DRC_TARGET_LOUDNESS too */
  265|  14.2k|  err_code =
  266|  14.2k|      ixheaacd_dec_api(mXheaacCodecHandle, IA_API_CMD_SET_CONFIG_PARAM,
  ------------------
  |  |   32|  14.2k|#define IA_API_CMD_SET_CONFIG_PARAM 0x0004
  ------------------
  267|  14.2k|                       IA_ENHAACPLUS_DEC_DRC_TARGET_LOUDNESS, &ui_drc_val);
  ------------------
  |  |  112|  14.2k|#define IA_ENHAACPLUS_DEC_DRC_TARGET_LOUDNESS IA_XHEAAC_DEC_CONFIG_PARAM_DRC_TARGET_LOUDNESS
  |  |  ------------------
  |  |  |  |   30|  14.2k|#define IA_XHEAAC_DEC_CONFIG_PARAM_DRC_TARGET_LOUDNESS 0x0007
  |  |  ------------------
  ------------------
  268|       |
  269|  14.2k|  size_t attenuationOffset = std::min((size_t)DRC_ATTENUATION_OFFSET, size - 1);
  270|  14.2k|  int32_t attenuationFactor = data[attenuationOffset];
  271|       |
  272|  14.2k|  ui_drc_val = (unsigned int)attenuationFactor;
  273|  14.2k|  err_code =
  274|  14.2k|      ixheaacd_dec_api(mXheaacCodecHandle, IA_API_CMD_SET_CONFIG_PARAM,
  ------------------
  |  |   32|  14.2k|#define IA_API_CMD_SET_CONFIG_PARAM 0x0004
  ------------------
  275|  14.2k|                       IA_ENHAACPLUS_DEC_CONFIG_PARAM_DRC_CUT, &ui_drc_val);
  ------------------
  |  |   97|  14.2k|#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_DRC_CUT IA_XHEAAC_DEC_CONFIG_PARAM_DRC_CUT
  |  |  ------------------
  |  |  |  |   42|  14.2k|#define IA_XHEAAC_DEC_CONFIG_PARAM_DRC_CUT 0x0012
  |  |  ------------------
  ------------------
  276|       |
  277|       |  //  DRC_PRES_MODE_WRAP_DESIRED_BOOST_FACTOR
  278|  14.2k|  size_t boostOffset = std::min((size_t)DRC_BOOST_OFFSET, size - 1);
  279|  14.2k|  int32_t boostFactor = data[boostOffset];
  280|       |
  281|  14.2k|  ui_drc_val = (unsigned int)boostFactor;
  282|  14.2k|  err_code =
  283|  14.2k|      ixheaacd_dec_api(mXheaacCodecHandle, IA_API_CMD_SET_CONFIG_PARAM,
  ------------------
  |  |   32|  14.2k|#define IA_API_CMD_SET_CONFIG_PARAM 0x0004
  ------------------
  284|  14.2k|                       IA_ENHAACPLUS_DEC_CONFIG_PARAM_DRC_BOOST, &ui_drc_val);
  ------------------
  |  |   98|  14.2k|#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_DRC_BOOST IA_XHEAAC_DEC_CONFIG_PARAM_DRC_BOOST
  |  |  ------------------
  |  |  |  |   43|  14.2k|#define IA_XHEAAC_DEC_CONFIG_PARAM_DRC_BOOST 0x0013
  |  |  ------------------
  ------------------
  285|       |
  286|       |  //  DRC_PRES_MODE_WRAP_DESIRED_HEAVY
  287|  14.2k|  size_t compressOffset = std::min((size_t)DRC_COMPRESS_OFFSET, size - 1);
  288|  14.2k|  int32_t compressMode = data[compressOffset];
  289|  14.2k|  ui_drc_val = (unsigned int)compressMode;
  290|       |
  291|  14.2k|  err_code = ixheaacd_dec_api(mXheaacCodecHandle, IA_API_CMD_SET_CONFIG_PARAM,
  ------------------
  |  |   32|  14.2k|#define IA_API_CMD_SET_CONFIG_PARAM 0x0004
  ------------------
  292|  14.2k|                              IA_ENHAACPLUS_DEC_CONFIG_PARAM_DRC_HEAVY_COMP,
  ------------------
  |  |  101|  14.2k|#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_DRC_HEAVY_COMP IA_XHEAAC_DEC_CONFIG_PARAM_DRC_HEAVY_COMP
  |  |  ------------------
  |  |  |  |   45|  14.2k|#define IA_XHEAAC_DEC_CONFIG_PARAM_DRC_HEAVY_COMP 0x0015
  |  |  ------------------
  ------------------
  293|  14.2k|                              &ui_drc_val);
  294|       |
  295|       |  // AAC_UNIDRC_SET_EFFECT
  296|  14.2k|  size_t effectOffset = std::min((size_t)DRC_EFFECT_OFFSET, size - 1);
  297|  14.2k|  int32_t effectType = data[effectOffset];
  298|  14.2k|  ui_drc_val = (unsigned int)effectType;
  299|  14.2k|  err_code = ixheaacd_dec_api(mXheaacCodecHandle, IA_API_CMD_SET_CONFIG_PARAM,
  ------------------
  |  |   32|  14.2k|#define IA_API_CMD_SET_CONFIG_PARAM 0x0004
  ------------------
  300|  14.2k|                              IA_ENHAACPLUS_DEC_DRC_EFFECT_TYPE, &ui_drc_val);
  ------------------
  |  |  111|  14.2k|#define IA_ENHAACPLUS_DEC_DRC_EFFECT_TYPE IA_XHEAAC_DEC_CONFIG_PARAM_DRC_EFFECT_TYPE
  |  |  ------------------
  |  |  |  |   29|  14.2k|#define IA_XHEAAC_DEC_CONFIG_PARAM_DRC_EFFECT_TYPE 0x0006
  |  |  ------------------
  ------------------
  301|       |
  302|  14.2k|#ifdef LOUDNESS_LEVELING_SUPPORT
  303|       |  // DRC_LOUDNESS_LEVELING_FLAG
  304|  14.2k|  size_t flagOffset = std::min((size_t)DRC_LOUDNESS_LEVELING_OFFSET, size - 1);
  305|  14.2k|  uint8_t loudnessFlag = data[flagOffset];
  306|  14.2k|  ui_drc_val = (unsigned int)loudnessFlag;
  307|  14.2k|  err_code = ixheaacd_dec_api(mXheaacCodecHandle, IA_API_CMD_SET_CONFIG_PARAM,
  ------------------
  |  |   32|  14.2k|#define IA_API_CMD_SET_CONFIG_PARAM 0x0004
  ------------------
  308|  14.2k|                              IA_XHEAAC_DEC_CONFIG_PARAM_DRC_LOUDNESS_LEVELING, &ui_drc_val);
  ------------------
  |  |   69|  14.2k|#define IA_XHEAAC_DEC_CONFIG_PARAM_DRC_LOUDNESS_LEVELING 0x0029
  ------------------
  309|  14.2k|#endif
  310|       |
  311|  14.2k|  return IA_NO_ERROR;
  ------------------
  |  |   23|  14.2k|#define IA_NO_ERROR 0x00000000
  ------------------
  312|  14.2k|}
_ZN5Codec17deInitXAACDecoderEv:
  314|  14.2k|IA_ERRORCODE Codec::deInitXAACDecoder() {
  315|       |  /* Error code */
  316|  14.2k|  IA_ERRORCODE err_code = IA_NO_ERROR;
  ------------------
  |  |   23|  14.2k|#define IA_NO_ERROR 0x00000000
  ------------------
  317|       |
  318|  14.2k|  if (mXheaacCodecHandle) {
  ------------------
  |  Branch (318:7): [True: 14.2k, False: 0]
  ------------------
  319|       |    /* Tell that the input is over in this buffer */
  320|  14.2k|    err_code =
  321|  14.2k|        ixheaacd_dec_api(mXheaacCodecHandle, IA_API_CMD_INPUT_OVER, 0, nullptr);
  ------------------
  |  |   45|  14.2k|#define IA_API_CMD_INPUT_OVER 0x000E
  ------------------
  322|  14.2k|  }
  323|       |
  324|       |  /* Irrespective of error returned in IA_API_CMD_INPUT_OVER, free allocated
  325|       |   * memory */
  326|   112k|  for (void* buf : mMemoryVec) {
  ------------------
  |  Branch (326:18): [True: 112k, False: 14.2k]
  ------------------
  327|   112k|    if (buf) free(buf);
  ------------------
  |  Branch (327:9): [True: 112k, False: 0]
  ------------------
  328|   112k|  }
  329|  14.2k|  mMemoryVec.clear();
  330|  14.2k|  mXheaacCodecHandle = nullptr;
  331|       |
  332|  14.2k|  return err_code;
  333|  14.2k|}
_ZN5Codec15deInitMPEGDDDrcEv:
  335|  26.6k|IA_ERRORCODE Codec::deInitMPEGDDDrc() {
  336|  49.6k|  for (void* buf : mDrcMemoryVec) {
  ------------------
  |  Branch (336:18): [True: 49.6k, False: 26.6k]
  ------------------
  337|  49.6k|    if (buf) free(buf);
  ------------------
  |  Branch (337:9): [True: 49.6k, False: 0]
  ------------------
  338|  49.6k|  }
  339|  26.6k|  mDrcMemoryVec.clear();
  340|  26.6k|  return IA_NO_ERROR;
  ------------------
  |  |   23|  26.6k|#define IA_NO_ERROR 0x00000000
  ------------------
  341|  26.6k|}
_ZN5Codec17configXAACDecoderEPhjPi:
  345|  23.0k|                                      int32_t* bytesConsumed) {
  346|  23.0k|  if (mInputBufferSize < inBufferLength) {
  ------------------
  |  Branch (346:7): [True: 1.53k, False: 21.5k]
  ------------------
  347|  1.53k|    inBufferLength = mInputBufferSize;
  348|  1.53k|  }
  349|       |  /* Copy the buffer passed by Android plugin to codec input buffer */
  350|  23.0k|  memcpy(mInputBuffer, inBuffer, inBufferLength);
  351|       |
  352|       |  /* Set number of bytes to be processed */
  353|  23.0k|  IA_ERRORCODE err_code = ixheaacd_dec_api(
  354|  23.0k|      mXheaacCodecHandle, IA_API_CMD_SET_INPUT_BYTES, 0, &inBufferLength);
  ------------------
  |  |   43|  23.0k|#define IA_API_CMD_SET_INPUT_BYTES 0x000C
  ------------------
  355|       |
  356|  23.0k|  if (mIsCodecConfigFlushRequired) {
  ------------------
  |  Branch (356:7): [True: 0, False: 23.0k]
  ------------------
  357|       |    /* If codec is already initialized, then GA header is passed again */
  358|       |    /* Need to call the Flush API instead of INIT_PROCESS */
  359|      0|    mIsCodecInitialized =
  360|      0|        false; /* Codec needs to be Reinitialized after flush */
  361|      0|    err_code = ixheaacd_dec_api(mXheaacCodecHandle, IA_API_CMD_INIT,
  ------------------
  |  |   30|      0|#define IA_API_CMD_INIT 0x0003
  ------------------
  362|      0|                                IA_CMD_TYPE_GA_HDR, nullptr);
  ------------------
  |  |   78|      0|#define IA_CMD_TYPE_GA_HDR 0x0800
  ------------------
  363|       |
  364|  23.0k|  } else {
  365|       |    /* Initialize the process */
  366|  23.0k|    err_code = ixheaacd_dec_api(mXheaacCodecHandle, IA_API_CMD_INIT,
  ------------------
  |  |   30|  23.0k|#define IA_API_CMD_INIT 0x0003
  ------------------
  367|  23.0k|                                IA_CMD_TYPE_INIT_PROCESS, nullptr);
  ------------------
  |  |   87|  23.0k|#define IA_CMD_TYPE_INIT_PROCESS 0x0300
  ------------------
  368|  23.0k|  }
  369|       |
  370|  23.0k|  uint32_t ui_init_done;
  371|       |  /* Checking for end of initialization */
  372|  23.0k|  err_code = ixheaacd_dec_api(mXheaacCodecHandle, IA_API_CMD_INIT,
  ------------------
  |  |   30|  23.0k|#define IA_API_CMD_INIT 0x0003
  ------------------
  373|  23.0k|                              IA_CMD_TYPE_INIT_DONE_QUERY, &ui_init_done);
  ------------------
  |  |   88|  23.0k|#define IA_CMD_TYPE_INIT_DONE_QUERY 0x0400
  ------------------
  374|       |
  375|       |  /* How much buffer is used in input buffers */
  376|  23.0k|  err_code = ixheaacd_dec_api(
  377|  23.0k|      mXheaacCodecHandle, IA_API_CMD_GET_CURIDX_INPUT_BUF, 0, bytesConsumed);
  ------------------
  |  |   42|  23.0k|#define IA_API_CMD_GET_CURIDX_INPUT_BUF 0x000B
  ------------------
  378|       |
  379|  23.0k|  if (ui_init_done) {
  ------------------
  |  Branch (379:7): [True: 12.4k, False: 10.6k]
  ------------------
  380|  12.4k|    err_code = getXAACStreamInfo();
  381|       |
  382|  12.4k|    mIsCodecInitialized = true;
  383|       |
  384|  12.4k|    err_code = configMPEGDDrc();
  385|  12.4k|  }
  386|       |
  387|  23.0k|  return IA_NO_ERROR;
  ------------------
  |  |   23|  23.0k|#define IA_NO_ERROR 0x00000000
  ------------------
  388|  23.0k|}
_ZN5Codec13initMPEGDDDrcEv:
  389|  12.4k|IA_ERRORCODE Codec::initMPEGDDDrc() {
  390|  12.4k|  IA_ERRORCODE err_code = IA_NO_ERROR;
  ------------------
  |  |   23|  12.4k|#define IA_NO_ERROR 0x00000000
  ------------------
  391|       |
  392|  37.2k|  for (int i = 0; i < (WORD32)2; i++) {
  ------------------
  |  Branch (392:19): [True: 24.8k, False: 12.4k]
  ------------------
  393|  24.8k|    WORD32 ui_size, ui_alignment, ui_type;
  394|  24.8k|    pVOID pv_alloc_ptr;
  395|       |
  396|       |    /* Get memory size */
  397|  24.8k|    err_code = ia_drc_dec_api(mMpegDDrcHandle, IA_API_CMD_GET_MEM_INFO_SIZE, i,
  ------------------
  |  |   49|  24.8k|#define IA_API_CMD_GET_MEM_INFO_SIZE 0x0011
  ------------------
  398|  24.8k|                              &ui_size);
  399|       |
  400|       |    /* Get memory alignment */
  401|  24.8k|    err_code = ia_drc_dec_api(
  402|  24.8k|        mMpegDDrcHandle, IA_API_CMD_GET_MEM_INFO_ALIGNMENT, i, &ui_alignment);
  ------------------
  |  |   50|  24.8k|#define IA_API_CMD_GET_MEM_INFO_ALIGNMENT 0x0012
  ------------------
  403|       |
  404|       |    /* Get memory type */
  405|  24.8k|    err_code = ia_drc_dec_api(mMpegDDrcHandle, IA_API_CMD_GET_MEM_INFO_TYPE, i,
  ------------------
  |  |   51|  24.8k|#define IA_API_CMD_GET_MEM_INFO_TYPE 0x0013
  ------------------
  406|  24.8k|                              &ui_type);
  407|       |
  408|  24.8k|    pv_alloc_ptr = malloc(ui_size);
  409|  24.8k|    if (pv_alloc_ptr == nullptr) {
  ------------------
  |  Branch (409:9): [True: 0, False: 24.8k]
  ------------------
  410|      0|      return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
  411|      0|    }
  412|  24.8k|    mDrcMemoryVec.push_back(pv_alloc_ptr);
  413|       |
  414|       |    /* Set the buffer pointer */
  415|  24.8k|    err_code = ia_drc_dec_api(mMpegDDrcHandle, IA_API_CMD_SET_MEM_PTR, i,
  ------------------
  |  |   54|  24.8k|#define IA_API_CMD_SET_MEM_PTR 0x0016
  ------------------
  416|  24.8k|                              pv_alloc_ptr);
  417|  24.8k|  }
  418|       |
  419|  12.4k|  mDrcInBuf = (int8_t*)malloc(IA_DRC_DEC_IN_OUT_BUF_SIZE);
  ------------------
  |  |   60|  12.4k|  (IA_MAX_USAC_CH * IA_MAX_OUT_SAMPLES_PER_FRAME * IA_MAX_OUTPUT_PCM_SIZE)
  |  |  ------------------
  |  |  |  |   56|  12.4k|#define IA_MAX_USAC_CH (2)
  |  |  ------------------
  |  |                 (IA_MAX_USAC_CH * IA_MAX_OUT_SAMPLES_PER_FRAME * IA_MAX_OUTPUT_PCM_SIZE)
  |  |  ------------------
  |  |  |  |   57|  12.4k|#define IA_MAX_OUT_SAMPLES_PER_FRAME (4096)
  |  |  ------------------
  |  |                 (IA_MAX_USAC_CH * IA_MAX_OUT_SAMPLES_PER_FRAME * IA_MAX_OUTPUT_PCM_SIZE)
  |  |  ------------------
  |  |  |  |   55|  12.4k|#define IA_MAX_OUTPUT_PCM_SIZE (3)
  |  |  ------------------
  ------------------
  420|  12.4k|  if (mDrcInBuf == nullptr) {
  ------------------
  |  Branch (420:7): [True: 0, False: 12.4k]
  ------------------
  421|      0|    return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
  422|      0|  }
  423|  12.4k|  mDrcMemoryVec.push_back(mDrcInBuf);
  424|       |
  425|  12.4k|  err_code =
  426|  12.4k|      ia_drc_dec_api(mMpegDDrcHandle, IA_API_CMD_SET_MEM_PTR, 2, mDrcInBuf);
  ------------------
  |  |   54|  12.4k|#define IA_API_CMD_SET_MEM_PTR 0x0016
  ------------------
  427|       |
  428|  12.4k|  mDrcOutBuf = (int8_t*)malloc(IA_DRC_DEC_IN_OUT_BUF_SIZE);
  ------------------
  |  |   60|  12.4k|  (IA_MAX_USAC_CH * IA_MAX_OUT_SAMPLES_PER_FRAME * IA_MAX_OUTPUT_PCM_SIZE)
  |  |  ------------------
  |  |  |  |   56|  12.4k|#define IA_MAX_USAC_CH (2)
  |  |  ------------------
  |  |                 (IA_MAX_USAC_CH * IA_MAX_OUT_SAMPLES_PER_FRAME * IA_MAX_OUTPUT_PCM_SIZE)
  |  |  ------------------
  |  |  |  |   57|  12.4k|#define IA_MAX_OUT_SAMPLES_PER_FRAME (4096)
  |  |  ------------------
  |  |                 (IA_MAX_USAC_CH * IA_MAX_OUT_SAMPLES_PER_FRAME * IA_MAX_OUTPUT_PCM_SIZE)
  |  |  ------------------
  |  |  |  |   55|  12.4k|#define IA_MAX_OUTPUT_PCM_SIZE (3)
  |  |  ------------------
  ------------------
  429|  12.4k|  if (mDrcOutBuf == nullptr) {
  ------------------
  |  Branch (429:7): [True: 0, False: 12.4k]
  ------------------
  430|      0|    return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
  431|      0|  }
  432|  12.4k|  mDrcMemoryVec.push_back(mDrcOutBuf);
  433|       |
  434|  12.4k|  err_code =
  435|  12.4k|      ia_drc_dec_api(mMpegDDrcHandle, IA_API_CMD_SET_MEM_PTR, 3, mDrcOutBuf);
  ------------------
  |  |   54|  12.4k|#define IA_API_CMD_SET_MEM_PTR 0x0016
  ------------------
  436|       |
  437|  12.4k|  return IA_NO_ERROR;
  ------------------
  |  |   23|  12.4k|#define IA_NO_ERROR 0x00000000
  ------------------
  438|  12.4k|}
_ZN5Codec14configMPEGDDrcEv:
  439|  12.4k|int Codec::configMPEGDDrc() {
  440|  12.4k|  IA_ERRORCODE err_code = IA_NO_ERROR;
  ------------------
  |  |   23|  12.4k|#define IA_NO_ERROR 0x00000000
  ------------------
  441|  12.4k|  int i_effect_type;
  442|  12.4k|  int i_loud_norm;
  443|  12.4k|  int i_target_loudness;
  444|  12.4k|  unsigned int i_sbr_mode;
  445|  12.4k|  uint32_t ui_proc_mem_tabs_size = 0;
  446|  12.4k|  pVOID pv_alloc_ptr = NULL;
  447|       |
  448|       |  /* Sampling Frequency */
  449|  12.4k|  err_code = ia_drc_dec_api(mMpegDDrcHandle, IA_API_CMD_SET_CONFIG_PARAM,
  ------------------
  |  |   32|  12.4k|#define IA_API_CMD_SET_CONFIG_PARAM 0x0004
  ------------------
  450|  12.4k|                            IA_DRC_DEC_CONFIG_PARAM_SAMP_FREQ, &mSampFreq);
  ------------------
  |  |   25|  12.4k|#define IA_DRC_DEC_CONFIG_PARAM_SAMP_FREQ 0x0001
  ------------------
  451|       |
  452|       |  /* Total Number of Channels */
  453|  12.4k|  err_code =
  454|  12.4k|      ia_drc_dec_api(mMpegDDrcHandle, IA_API_CMD_SET_CONFIG_PARAM,
  ------------------
  |  |   32|  12.4k|#define IA_API_CMD_SET_CONFIG_PARAM 0x0004
  ------------------
  455|  12.4k|                     IA_DRC_DEC_CONFIG_PARAM_NUM_CHANNELS, &mNumChannels);
  ------------------
  |  |   26|  12.4k|#define IA_DRC_DEC_CONFIG_PARAM_NUM_CHANNELS 0x0002
  ------------------
  456|       |
  457|       |  /* PCM word size  */
  458|  12.4k|  err_code = ia_drc_dec_api(mMpegDDrcHandle, IA_API_CMD_SET_CONFIG_PARAM,
  ------------------
  |  |   32|  12.4k|#define IA_API_CMD_SET_CONFIG_PARAM 0x0004
  ------------------
  459|  12.4k|                            IA_DRC_DEC_CONFIG_PARAM_PCM_WDSZ, &mPcmWdSz);
  ------------------
  |  |   24|  12.4k|#define IA_DRC_DEC_CONFIG_PARAM_PCM_WDSZ 0x0000
  ------------------
  460|       |
  461|       |  /*Set Effect Type*/
  462|  12.4k|  err_code = ixheaacd_dec_api(mXheaacCodecHandle, IA_API_CMD_GET_CONFIG_PARAM,
  ------------------
  |  |   33|  12.4k|#define IA_API_CMD_GET_CONFIG_PARAM 0x0005
  ------------------
  463|  12.4k|                              IA_ENHAACPLUS_DEC_CONFIG_PARAM_DRC_EFFECT_TYPE,
  ------------------
  |  |   82|  12.4k|        IA_XHEAAC_DEC_CONFIG_PARAM_DRC_EFFECT_TYPE
  |  |  ------------------
  |  |  |  |   29|  12.4k|#define IA_XHEAAC_DEC_CONFIG_PARAM_DRC_EFFECT_TYPE 0x0006
  |  |  ------------------
  ------------------
  464|  12.4k|                              &i_effect_type);
  465|       |
  466|  12.4k|  err_code = ia_drc_dec_api(mMpegDDrcHandle, IA_API_CMD_SET_CONFIG_PARAM,
  ------------------
  |  |   32|  12.4k|#define IA_API_CMD_SET_CONFIG_PARAM 0x0004
  ------------------
  467|  12.4k|                            IA_DRC_DEC_CONFIG_DRC_EFFECT_TYPE, &i_effect_type);
  ------------------
  |  |   41|  12.4k|#define IA_DRC_DEC_CONFIG_DRC_EFFECT_TYPE 0x0011
  ------------------
  468|       |
  469|       |  /*Set target loudness */
  470|  12.4k|  err_code = ixheaacd_dec_api(
  471|  12.4k|      mXheaacCodecHandle, IA_API_CMD_GET_CONFIG_PARAM,
  ------------------
  |  |   33|  12.4k|#define IA_API_CMD_GET_CONFIG_PARAM 0x0005
  ------------------
  472|  12.4k|      IA_ENHAACPLUS_DEC_CONFIG_PARAM_DRC_TARGET_LOUDNESS, &i_target_loudness);
  ------------------
  |  |   84|  12.4k|        IA_XHEAAC_DEC_CONFIG_PARAM_DRC_TARGET_LOUDNESS
  |  |  ------------------
  |  |  |  |   30|  12.4k|#define IA_XHEAAC_DEC_CONFIG_PARAM_DRC_TARGET_LOUDNESS 0x0007
  |  |  ------------------
  ------------------
  473|       |
  474|  12.4k|  err_code =
  475|  12.4k|      ia_drc_dec_api(mMpegDDrcHandle, IA_API_CMD_SET_CONFIG_PARAM,
  ------------------
  |  |   32|  12.4k|#define IA_API_CMD_SET_CONFIG_PARAM 0x0004
  ------------------
  476|  12.4k|                     IA_DRC_DEC_CONFIG_DRC_TARGET_LOUDNESS, &i_target_loudness);
  ------------------
  |  |   42|  12.4k|#define IA_DRC_DEC_CONFIG_DRC_TARGET_LOUDNESS 0x0012
  ------------------
  477|       |
  478|       |  /*Set loud_norm_flag*/
  479|  12.4k|  err_code = ixheaacd_dec_api(mXheaacCodecHandle, IA_API_CMD_GET_CONFIG_PARAM,
  ------------------
  |  |   33|  12.4k|#define IA_API_CMD_GET_CONFIG_PARAM 0x0005
  ------------------
  480|  12.4k|                              IA_ENHAACPLUS_DEC_CONFIG_PARAM_DRC_LOUD_NORM,
  ------------------
  |  |   85|  12.4k|#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_DRC_LOUD_NORM IA_XHEAAC_DEC_CONFIG_PARAM_DRC_LOUD_NORM
  |  |  ------------------
  |  |  |  |   31|  12.4k|#define IA_XHEAAC_DEC_CONFIG_PARAM_DRC_LOUD_NORM 0x0008
  |  |  ------------------
  ------------------
  481|  12.4k|                              &i_loud_norm);
  482|       |
  483|  12.4k|  err_code = ia_drc_dec_api(mMpegDDrcHandle, IA_API_CMD_SET_CONFIG_PARAM,
  ------------------
  |  |   32|  12.4k|#define IA_API_CMD_SET_CONFIG_PARAM 0x0004
  ------------------
  484|  12.4k|                            IA_DRC_DEC_CONFIG_DRC_LOUD_NORM, &i_loud_norm);
  ------------------
  |  |   43|  12.4k|#define IA_DRC_DEC_CONFIG_DRC_LOUD_NORM 0x0013
  ------------------
  485|       |
  486|  12.4k|  err_code =
  487|  12.4k|      ixheaacd_dec_api(mXheaacCodecHandle, IA_API_CMD_GET_CONFIG_PARAM,
  ------------------
  |  |   33|  12.4k|#define IA_API_CMD_GET_CONFIG_PARAM 0x0005
  ------------------
  488|  12.4k|                       IA_ENHAACPLUS_DEC_CONFIG_PARAM_SBR_MODE, &i_sbr_mode);
  ------------------
  |  |   80|  12.4k|#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_SBR_MODE IA_XHEAAC_DEC_CONFIG_PARAM_SBR_MODE
  |  |  ------------------
  |  |  |  |   28|  12.4k|#define IA_XHEAAC_DEC_CONFIG_PARAM_SBR_MODE 0x0005
  |  |  ------------------
  ------------------
  489|       |
  490|       |  /* Get memory info tables size */
  491|  12.4k|  err_code = ia_drc_dec_api(mMpegDDrcHandle, IA_API_CMD_GET_MEMTABS_SIZE, 0,
  ------------------
  |  |   35|  12.4k|#define IA_API_CMD_GET_MEMTABS_SIZE 0x0006
  ------------------
  492|  12.4k|                            &ui_proc_mem_tabs_size);
  493|       |
  494|  12.4k|  pv_alloc_ptr = malloc(ui_proc_mem_tabs_size);
  495|  12.4k|  if (pv_alloc_ptr == NULL) {
  ------------------
  |  Branch (495:7): [True: 0, False: 12.4k]
  ------------------
  496|      0|    return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
  497|      0|  }
  498|  12.4k|  memset(pv_alloc_ptr, 0, ui_proc_mem_tabs_size);
  499|  12.4k|  mMemoryVec.push_back(pv_alloc_ptr);
  500|       |
  501|       |  /* Set pointer for process memory tables */
  502|  12.4k|  err_code = ia_drc_dec_api(mMpegDDrcHandle, IA_API_CMD_SET_MEMTABS_PTR, 0,
  ------------------
  |  |   36|  12.4k|#define IA_API_CMD_SET_MEMTABS_PTR 0x0007
  ------------------
  503|  12.4k|                            pv_alloc_ptr);
  504|       |
  505|  12.4k|  err_code = ia_drc_dec_api(mMpegDDrcHandle, IA_API_CMD_INIT,
  ------------------
  |  |   30|  12.4k|#define IA_API_CMD_INIT 0x0003
  ------------------
  506|  12.4k|                            IA_CMD_TYPE_INIT_API_POST_CONFIG_PARAMS, nullptr);
  ------------------
  |  |   86|  12.4k|#define IA_CMD_TYPE_INIT_API_POST_CONFIG_PARAMS 0x0200
  ------------------
  507|       |
  508|       |  /* Free any memory that is allocated for MPEG D Drc so far */
  509|  12.4k|  deInitMPEGDDDrc();
  510|       |
  511|  12.4k|  err_code = initMPEGDDDrc();
  512|  12.4k|  if (err_code != IA_NO_ERROR) {
  ------------------
  |  |   23|  12.4k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (512:7): [True: 0, False: 12.4k]
  ------------------
  513|      0|    deInitMPEGDDDrc();
  514|      0|    return err_code;
  515|      0|  }
  516|       |
  517|       |  /* DRC buffers
  518|       |      buf[0] - contains extension element pay load loudness related
  519|       |      buf[1] - contains extension element pay load*/
  520|  12.4k|  {
  521|  12.4k|    VOID* p_array[2][16];
  522|  12.4k|    WORD32 ii;
  523|  12.4k|    WORD32 buf_sizes[2][16];
  524|  12.4k|    WORD32 num_elements;
  525|  12.4k|    WORD32 num_config_ext;
  526|  12.4k|    WORD32 bit_str_fmt = 1;
  527|       |
  528|  12.4k|    WORD32 uo_num_chan;
  529|       |
  530|  12.4k|    memset(buf_sizes, 0, 32 * sizeof(WORD32));
  531|       |
  532|  12.4k|    err_code = ixheaacd_dec_api(mXheaacCodecHandle, IA_API_CMD_GET_CONFIG_PARAM,
  ------------------
  |  |   33|  12.4k|#define IA_API_CMD_GET_CONFIG_PARAM 0x0005
  ------------------
  533|  12.4k|                                IA_ENHAACPLUS_DEC_CONFIG_EXT_ELE_BUF_SIZES,
  ------------------
  |  |   56|  12.4k|#define IA_ENHAACPLUS_DEC_CONFIG_EXT_ELE_BUF_SIZES 0x001F
  ------------------
  534|  12.4k|                                &buf_sizes[0][0]);
  535|       |
  536|  12.4k|    err_code = ixheaacd_dec_api(mXheaacCodecHandle, IA_API_CMD_GET_CONFIG_PARAM,
  ------------------
  |  |   33|  12.4k|#define IA_API_CMD_GET_CONFIG_PARAM 0x0005
  ------------------
  537|  12.4k|                                IA_ENHAACPLUS_DEC_CONFIG_EXT_ELE_PTR, &p_array);
  ------------------
  |  |   55|  12.4k|#define IA_ENHAACPLUS_DEC_CONFIG_EXT_ELE_PTR 0x001E
  ------------------
  538|       |
  539|  12.4k|    err_code = ia_drc_dec_api(mMpegDDrcHandle, IA_API_CMD_INIT,
  ------------------
  |  |   30|  12.4k|#define IA_API_CMD_INIT 0x0003
  ------------------
  540|  12.4k|                              IA_CMD_TYPE_INIT_SET_BUFF_PTR, nullptr);
  ------------------
  |  |  101|  12.4k|#define IA_CMD_TYPE_INIT_SET_BUFF_PTR 0x020B
  ------------------
  541|       |
  542|  12.4k|    err_code =
  543|  12.4k|        ixheaacd_dec_api(mXheaacCodecHandle, IA_API_CMD_GET_CONFIG_PARAM,
  ------------------
  |  |   33|  12.4k|#define IA_API_CMD_GET_CONFIG_PARAM 0x0005
  ------------------
  544|  12.4k|                         IA_ENHAACPLUS_DEC_CONFIG_NUM_ELE, &num_elements);
  ------------------
  |  |   57|  12.4k|#define IA_ENHAACPLUS_DEC_CONFIG_NUM_ELE 0x0020
  ------------------
  545|       |
  546|  12.4k|    err_code = ixheaacd_dec_api(mXheaacCodecHandle, IA_API_CMD_GET_CONFIG_PARAM,
  ------------------
  |  |   33|  12.4k|#define IA_API_CMD_GET_CONFIG_PARAM 0x0005
  ------------------
  547|  12.4k|                                IA_ENHAACPLUS_DEC_CONFIG_NUM_CONFIG_EXT,
  ------------------
  |  |   58|  12.4k|#define IA_ENHAACPLUS_DEC_CONFIG_NUM_CONFIG_EXT 0x0021
  ------------------
  548|  12.4k|                                &num_config_ext);
  549|       |
  550|  18.9k|    for (ii = 0; ii < num_config_ext; ii++) {
  ------------------
  |  Branch (550:18): [True: 6.50k, False: 12.4k]
  ------------------
  551|       |      /*copy loudness bitstream*/
  552|  6.50k|      if (buf_sizes[0][ii] > 0) {
  ------------------
  |  Branch (552:11): [True: 821, False: 5.68k]
  ------------------
  553|    821|        memcpy(mDrcInBuf, p_array[0][ii], buf_sizes[0][ii]);
  554|       |
  555|       |        /*Set bitstream_split_format */
  556|    821|        err_code =
  557|    821|            ia_drc_dec_api(mMpegDDrcHandle, IA_API_CMD_SET_CONFIG_PARAM,
  ------------------
  |  |   32|    821|#define IA_API_CMD_SET_CONFIG_PARAM 0x0004
  ------------------
  558|    821|                           IA_DRC_DEC_CONFIG_PARAM_BITS_FORMAT, &bit_str_fmt);
  ------------------
  |  |   31|    821|#define IA_DRC_DEC_CONFIG_PARAM_BITS_FORMAT 0x0007
  ------------------
  559|       |
  560|       |        /* Set number of bytes to be processed */
  561|    821|        err_code =
  562|    821|            ia_drc_dec_api(mMpegDDrcHandle, IA_API_CMD_SET_INPUT_BYTES_IL_BS, 0,
  ------------------
  |  |   74|    821|#define IA_API_CMD_SET_INPUT_BYTES_IL_BS 0x0029
  ------------------
  563|    821|                           &buf_sizes[0][ii]);
  564|       |
  565|       |        /* Execute process */
  566|    821|        err_code = ia_drc_dec_api(mMpegDDrcHandle, IA_API_CMD_INIT,
  ------------------
  |  |   30|    821|#define IA_API_CMD_INIT 0x0003
  ------------------
  567|    821|                                  IA_CMD_TYPE_INIT_CPY_IL_BSF_BUFF, nullptr);
  ------------------
  |  |   92|    821|#define IA_CMD_TYPE_INIT_CPY_IL_BSF_BUFF 0x0203
  ------------------
  568|       |
  569|    821|        mDRCFlag = 1;
  570|    821|      }
  571|  6.50k|    }
  572|       |
  573|  24.2k|    for (ii = 0; ii < num_elements; ii++) {
  ------------------
  |  Branch (573:18): [True: 11.8k, False: 12.4k]
  ------------------
  574|       |      /*copy config bitstream*/
  575|  11.8k|      if (buf_sizes[1][ii] > 0) {
  ------------------
  |  Branch (575:11): [True: 1.24k, False: 10.6k]
  ------------------
  576|  1.24k|        memcpy(mDrcInBuf, p_array[1][ii], buf_sizes[1][ii]);
  577|       |        /* Set number of bytes to be processed */
  578|       |
  579|       |        /*Set bitstream_split_format */
  580|  1.24k|        err_code =
  581|  1.24k|            ia_drc_dec_api(mMpegDDrcHandle, IA_API_CMD_SET_CONFIG_PARAM,
  ------------------
  |  |   32|  1.24k|#define IA_API_CMD_SET_CONFIG_PARAM 0x0004
  ------------------
  582|  1.24k|                           IA_DRC_DEC_CONFIG_PARAM_BITS_FORMAT, &bit_str_fmt);
  ------------------
  |  |   31|  1.24k|#define IA_DRC_DEC_CONFIG_PARAM_BITS_FORMAT 0x0007
  ------------------
  583|       |
  584|  1.24k|        err_code =
  585|  1.24k|            ia_drc_dec_api(mMpegDDrcHandle, IA_API_CMD_SET_INPUT_BYTES_IC_BS, 0,
  ------------------
  |  |   72|  1.24k|#define IA_API_CMD_SET_INPUT_BYTES_IC_BS 0x0027
  ------------------
  586|  1.24k|                           &buf_sizes[1][ii]);
  587|       |
  588|       |        /* Execute process */
  589|  1.24k|        err_code = ia_drc_dec_api(mMpegDDrcHandle, IA_API_CMD_INIT,
  ------------------
  |  |   30|  1.24k|#define IA_API_CMD_INIT 0x0003
  ------------------
  590|  1.24k|                                  IA_CMD_TYPE_INIT_CPY_IC_BSF_BUFF, nullptr);
  ------------------
  |  |   91|  1.24k|#define IA_CMD_TYPE_INIT_CPY_IC_BSF_BUFF 0x0202
  ------------------
  591|       |
  592|  1.24k|        mDRCFlag = 1;
  593|  1.24k|      }
  594|  11.8k|    }
  595|       |
  596|  12.4k|    if (mDRCFlag == 1) {
  ------------------
  |  Branch (596:9): [True: 1.54k, False: 10.8k]
  ------------------
  597|  1.54k|      mMpegDDRCPresent = 1;
  598|  10.8k|    } else {
  599|  10.8k|      mMpegDDRCPresent = 0;
  600|  10.8k|    }
  601|       |
  602|       |    /*Read interface buffer config file bitstream*/
  603|  12.4k|    if (mMpegDDRCPresent == 1) {
  ------------------
  |  Branch (603:9): [True: 1.54k, False: 10.8k]
  ------------------
  604|  1.54k|      WORD32 interface_is_present = 1;
  605|       |
  606|  1.54k|      if (i_sbr_mode != 0) {
  ------------------
  |  Branch (606:11): [True: 672, False: 872]
  ------------------
  607|    672|        if (i_sbr_mode == 1) {
  ------------------
  |  Branch (607:13): [True: 635, False: 37]
  ------------------
  608|    635|          mOutputFrameLength = 2048;
  609|    635|        } else if (i_sbr_mode == 3) {
  ------------------
  |  Branch (609:20): [True: 37, False: 0]
  ------------------
  610|     37|          mOutputFrameLength = 4096;
  611|     37|        } else {
  612|      0|          mOutputFrameLength = 1024;
  613|      0|        }
  614|    872|      } else {
  615|    872|        mOutputFrameLength = 4096;
  616|    872|      }
  617|       |
  618|  1.54k|      err_code = ia_drc_dec_api(mMpegDDrcHandle, IA_API_CMD_SET_CONFIG_PARAM,
  ------------------
  |  |   32|  1.54k|#define IA_API_CMD_SET_CONFIG_PARAM 0x0004
  ------------------
  619|  1.54k|                                IA_DRC_DEC_CONFIG_PARAM_FRAME_SIZE,
  ------------------
  |  |   38|  1.54k|#define IA_DRC_DEC_CONFIG_PARAM_FRAME_SIZE 0x000E
  ------------------
  620|  1.54k|                                (WORD32*)&mOutputFrameLength);
  621|       |
  622|  1.54k|      err_code = ia_drc_dec_api(mMpegDDrcHandle, IA_API_CMD_SET_CONFIG_PARAM,
  ------------------
  |  |   32|  1.54k|#define IA_API_CMD_SET_CONFIG_PARAM 0x0004
  ------------------
  623|  1.54k|                                IA_DRC_DEC_CONFIG_PARAM_INT_PRESENT,
  ------------------
  |  |   32|  1.54k|#define IA_DRC_DEC_CONFIG_PARAM_INT_PRESENT 0x0008
  ------------------
  624|  1.54k|                                &interface_is_present);
  625|       |
  626|       |      /* Execute process */
  627|  1.54k|      err_code = ia_drc_dec_api(mMpegDDrcHandle, IA_API_CMD_INIT,
  ------------------
  |  |   30|  1.54k|#define IA_API_CMD_INIT 0x0003
  ------------------
  628|  1.54k|                                IA_CMD_TYPE_INIT_CPY_IN_BSF_BUFF, nullptr);
  ------------------
  |  |   94|  1.54k|#define IA_CMD_TYPE_INIT_CPY_IN_BSF_BUFF 0x0205
  ------------------
  629|       |
  630|  1.54k|      err_code = ia_drc_dec_api(mMpegDDrcHandle, IA_API_CMD_INIT,
  ------------------
  |  |   30|  1.54k|#define IA_API_CMD_INIT 0x0003
  ------------------
  631|  1.54k|                                IA_CMD_TYPE_INIT_PROCESS, nullptr);
  ------------------
  |  |   87|  1.54k|#define IA_CMD_TYPE_INIT_PROCESS 0x0300
  ------------------
  632|       |
  633|  1.54k|      err_code =
  634|  1.54k|          ia_drc_dec_api(mMpegDDrcHandle, IA_API_CMD_GET_CONFIG_PARAM,
  ------------------
  |  |   33|  1.54k|#define IA_API_CMD_GET_CONFIG_PARAM 0x0005
  ------------------
  635|  1.54k|                         IA_DRC_DEC_CONFIG_PARAM_NUM_CHANNELS, &uo_num_chan);
  ------------------
  |  |   26|  1.54k|#define IA_DRC_DEC_CONFIG_PARAM_NUM_CHANNELS 0x0002
  ------------------
  636|  1.54k|    }
  637|  12.4k|  }
  638|       |
  639|  12.4k|  return err_code;
  640|  12.4k|}
_ZN5Codec11initDecoderEPKhmb:
  641|  14.2k|IA_ERRORCODE Codec::initDecoder(const uint8_t* data, size_t size, bool isADTS) {
  642|  14.2k|  IA_ERRORCODE err_code = IA_NO_ERROR;
  ------------------
  |  |   23|  14.2k|#define IA_NO_ERROR 0x00000000
  ------------------
  643|       |
  644|  14.2k|  err_code = initXAACDecoder(isADTS);
  645|  14.2k|  if (err_code != IA_NO_ERROR) {
  ------------------
  |  |   23|  14.2k|#define IA_NO_ERROR 0x00000000
  ------------------
  |  Branch (645:7): [True: 0, False: 14.2k]
  ------------------
  646|       |    /* Call deInit to free any allocated memory */
  647|      0|    deInitXAACDecoder();
  648|      0|    return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
  649|      0|  }
  650|       |
  651|  14.2k|  err_code = initXAACDrc(data, size);
  652|       |
  653|  14.2k|  return IA_NO_ERROR;
  ------------------
  |  |   23|  14.2k|#define IA_NO_ERROR 0x00000000
  ------------------
  654|  14.2k|}
_ZN5Codec16decodeXAACStreamEPhjPiS1_:
  657|   387k|                                     int32_t* outBytes) {
  658|   387k|  if (mInputBufferSize < inBufferLength) {
  ------------------
  |  Branch (658:7): [True: 178k, False: 208k]
  ------------------
  659|   178k|    inBufferLength = mInputBufferSize;
  660|   178k|  }
  661|       |  /* If codec is not initialized, call configXAACDecoder decoder again */
  662|   387k|  if (!mIsCodecInitialized) {
  ------------------
  |  Branch (662:7): [True: 8.80k, False: 378k]
  ------------------
  663|  8.80k|    configXAACDecoder(inBuffer, inBufferLength, bytesConsumed);
  664|  8.80k|  }
  665|       |  /* Copy the buffer passed by Android plugin to codec input buffer */
  666|   387k|  memcpy(mInputBuffer, inBuffer, inBufferLength);
  667|       |
  668|       |  /* Set number of bytes to be processed */
  669|   387k|  IA_ERRORCODE err_code = ixheaacd_dec_api(
  670|   387k|      mXheaacCodecHandle, IA_API_CMD_SET_INPUT_BYTES, 0, &inBufferLength);
  ------------------
  |  |   43|   387k|#define IA_API_CMD_SET_INPUT_BYTES 0x000C
  ------------------
  671|       |
  672|       |  /* Execute process */
  673|   387k|  err_code = ixheaacd_dec_api(mXheaacCodecHandle, IA_API_CMD_EXECUTE,
  ------------------
  |  |   39|   387k|#define IA_API_CMD_EXECUTE 0x0009
  ------------------
  674|   387k|                              IA_CMD_TYPE_DO_EXECUTE, nullptr);
  ------------------
  |  |  104|   387k|#define IA_CMD_TYPE_DO_EXECUTE 0x0100
  ------------------
  675|       |
  676|       |  /* Checking for end of processing */
  677|   387k|  uint32_t ui_exec_done;
  678|   387k|  err_code = ixheaacd_dec_api(mXheaacCodecHandle, IA_API_CMD_EXECUTE,
  ------------------
  |  |   39|   387k|#define IA_API_CMD_EXECUTE 0x0009
  ------------------
  679|   387k|                              IA_CMD_TYPE_DONE_QUERY, &ui_exec_done);
  ------------------
  |  |  105|   387k|#define IA_CMD_TYPE_DONE_QUERY 0x0200
  ------------------
  680|       |
  681|   387k|  if (ui_exec_done != 1) {
  ------------------
  |  Branch (681:7): [True: 387k, False: 0]
  ------------------
  682|   387k|    VOID* p_array;        // ITTIAM:buffer to handle gain payload
  683|   387k|    WORD32 buf_size = 0;  // ITTIAM:gain payload length
  684|   387k|    WORD32 bit_str_fmt = 1;
  685|   387k|    WORD32 gain_stream_flag = 1;
  686|       |
  687|   387k|    err_code =
  688|   387k|        ixheaacd_dec_api(mXheaacCodecHandle, IA_API_CMD_GET_CONFIG_PARAM,
  ------------------
  |  |   33|   387k|#define IA_API_CMD_GET_CONFIG_PARAM 0x0005
  ------------------
  689|   387k|                         IA_ENHAACPLUS_DEC_CONFIG_GAIN_PAYLOAD_LEN, &buf_size);
  ------------------
  |  |   59|   387k|#define IA_ENHAACPLUS_DEC_CONFIG_GAIN_PAYLOAD_LEN 0x0022
  ------------------
  690|       |
  691|   387k|    err_code =
  692|   387k|        ixheaacd_dec_api(mXheaacCodecHandle, IA_API_CMD_GET_CONFIG_PARAM,
  ------------------
  |  |   33|   387k|#define IA_API_CMD_GET_CONFIG_PARAM 0x0005
  ------------------
  693|   387k|                         IA_ENHAACPLUS_DEC_CONFIG_GAIN_PAYLOAD_BUF, &p_array);
  ------------------
  |  |   60|   387k|#define IA_ENHAACPLUS_DEC_CONFIG_GAIN_PAYLOAD_BUF 0x0023
  ------------------
  694|       |
  695|   387k|    if (buf_size > 0) {
  ------------------
  |  Branch (695:9): [True: 1.53k, False: 385k]
  ------------------
  696|       |      /*Set bitstream_split_format */
  697|  1.53k|      err_code =
  698|  1.53k|          ia_drc_dec_api(mMpegDDrcHandle, IA_API_CMD_SET_CONFIG_PARAM,
  ------------------
  |  |   32|  1.53k|#define IA_API_CMD_SET_CONFIG_PARAM 0x0004
  ------------------
  699|  1.53k|                         IA_DRC_DEC_CONFIG_PARAM_BITS_FORMAT, &bit_str_fmt);
  ------------------
  |  |   31|  1.53k|#define IA_DRC_DEC_CONFIG_PARAM_BITS_FORMAT 0x0007
  ------------------
  700|       |
  701|  1.53k|      memcpy(mDrcInBuf, p_array, buf_size);
  702|       |      /* Set number of bytes to be processed */
  703|  1.53k|      err_code = ia_drc_dec_api(mMpegDDrcHandle, IA_API_CMD_SET_INPUT_BYTES_BS,
  ------------------
  |  |   71|  1.53k|#define IA_API_CMD_SET_INPUT_BYTES_BS 0x0026
  ------------------
  704|  1.53k|                                0, &buf_size);
  705|       |
  706|  1.53k|      err_code =
  707|  1.53k|          ia_drc_dec_api(mMpegDDrcHandle, IA_API_CMD_SET_CONFIG_PARAM,
  ------------------
  |  |   32|  1.53k|#define IA_API_CMD_SET_CONFIG_PARAM 0x0004
  ------------------
  708|  1.53k|                         IA_DRC_DEC_CONFIG_GAIN_STREAM_FLAG, &gain_stream_flag);
  ------------------
  |  |   40|  1.53k|#define IA_DRC_DEC_CONFIG_GAIN_STREAM_FLAG 0x0010
  ------------------
  709|       |
  710|       |      /* Execute process */
  711|  1.53k|      err_code = ia_drc_dec_api(mMpegDDrcHandle, IA_API_CMD_INIT,
  ------------------
  |  |   30|  1.53k|#define IA_API_CMD_INIT 0x0003
  ------------------
  712|  1.53k|                                IA_CMD_TYPE_INIT_CPY_BSF_BUFF, nullptr);
  ------------------
  |  |   90|  1.53k|#define IA_CMD_TYPE_INIT_CPY_BSF_BUFF 0x0201
  ------------------
  713|       |
  714|  1.53k|      mMpegDDRCPresent = 1;
  715|  1.53k|    }
  716|   387k|  }
  717|       |
  718|       |  /* How much buffer is used in input buffers */
  719|   387k|  err_code = ixheaacd_dec_api(
  720|   387k|      mXheaacCodecHandle, IA_API_CMD_GET_CURIDX_INPUT_BUF, 0, bytesConsumed);
  ------------------
  |  |   42|   387k|#define IA_API_CMD_GET_CURIDX_INPUT_BUF 0x000B
  ------------------
  721|       |
  722|       |  /* Get the output bytes */
  723|   387k|  err_code = ixheaacd_dec_api(mXheaacCodecHandle, IA_API_CMD_GET_OUTPUT_BYTES,
  ------------------
  |  |   44|   387k|#define IA_API_CMD_GET_OUTPUT_BYTES 0x000D
  ------------------
  724|   387k|                              0, outBytes);
  725|       |
  726|   387k|  if (mMpegDDRCPresent == 1) {
  ------------------
  |  Branch (726:7): [True: 31.0k, False: 356k]
  ------------------
  727|  31.0k|    memcpy(mDrcInBuf, mOutputBuffer, *outBytes);
  728|  31.0k|    err_code = ia_drc_dec_api(mMpegDDrcHandle, IA_API_CMD_SET_INPUT_BYTES, 0,
  ------------------
  |  |   43|  31.0k|#define IA_API_CMD_SET_INPUT_BYTES 0x000C
  ------------------
  729|  31.0k|                              outBytes);
  730|       |
  731|  31.0k|    err_code = ia_drc_dec_api(mMpegDDrcHandle, IA_API_CMD_EXECUTE,
  ------------------
  |  |   39|  31.0k|#define IA_API_CMD_EXECUTE 0x0009
  ------------------
  732|  31.0k|                              IA_CMD_TYPE_DO_EXECUTE, nullptr);
  ------------------
  |  |  104|  31.0k|#define IA_CMD_TYPE_DO_EXECUTE 0x0100
  ------------------
  733|       |
  734|  31.0k|    memcpy(mOutputBuffer, mDrcOutBuf, *outBytes);
  735|  31.0k|  }
  736|   387k|  return IA_NO_ERROR;
  ------------------
  |  |   23|   387k|#define IA_NO_ERROR 0x00000000
  ------------------
  737|   387k|}
_ZN5Codec17getXAACStreamInfoEv:
  739|  12.4k|IA_ERRORCODE Codec::getXAACStreamInfo() {
  740|  12.4k|  IA_ERRORCODE err_code = IA_NO_ERROR;
  ------------------
  |  |   23|  12.4k|#define IA_NO_ERROR 0x00000000
  ------------------
  741|       |
  742|       |  /* Sampling frequency */
  743|  12.4k|  err_code =
  744|  12.4k|      ixheaacd_dec_api(mXheaacCodecHandle, IA_API_CMD_GET_CONFIG_PARAM,
  ------------------
  |  |   33|  12.4k|#define IA_API_CMD_GET_CONFIG_PARAM 0x0005
  ------------------
  745|  12.4k|                       IA_ENHAACPLUS_DEC_CONFIG_PARAM_SAMP_FREQ, &mSampFreq);
  ------------------
  |  |   76|  12.4k|#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_SAMP_FREQ IA_XHEAAC_DEC_CONFIG_PARAM_SAMP_FREQ
  |  |  ------------------
  |  |  |  |   24|  12.4k|#define IA_XHEAAC_DEC_CONFIG_PARAM_SAMP_FREQ 0x0001
  |  |  ------------------
  ------------------
  746|       |
  747|       |  /* Total Number of Channels */
  748|  12.4k|  err_code = ixheaacd_dec_api(mXheaacCodecHandle, IA_API_CMD_GET_CONFIG_PARAM,
  ------------------
  |  |   33|  12.4k|#define IA_API_CMD_GET_CONFIG_PARAM 0x0005
  ------------------
  749|  12.4k|                              IA_ENHAACPLUS_DEC_CONFIG_PARAM_NUM_CHANNELS,
  ------------------
  |  |   77|  12.4k|#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_NUM_CHANNELS IA_XHEAAC_DEC_CONFIG_PARAM_NUM_CHANNELS
  |  |  ------------------
  |  |  |  |   25|  12.4k|#define IA_XHEAAC_DEC_CONFIG_PARAM_NUM_CHANNELS 0x0002
  |  |  ------------------
  ------------------
  750|  12.4k|                              &mNumChannels);
  751|       |
  752|  12.4k|  if (mNumChannels > MAX_CHANNEL_COUNT) {
  ------------------
  |  |   51|  12.4k|#define MAX_CHANNEL_COUNT 8
  ------------------
  |  Branch (752:7): [True: 0, False: 12.4k]
  ------------------
  753|      0|    return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
  754|      0|  }
  755|       |
  756|       |  /* PCM word size */
  757|  12.4k|  err_code =
  758|  12.4k|      ixheaacd_dec_api(mXheaacCodecHandle, IA_API_CMD_GET_CONFIG_PARAM,
  ------------------
  |  |   33|  12.4k|#define IA_API_CMD_GET_CONFIG_PARAM 0x0005
  ------------------
  759|  12.4k|                       IA_ENHAACPLUS_DEC_CONFIG_PARAM_PCM_WDSZ, &mPcmWdSz);
  ------------------
  |  |   75|  12.4k|#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_PCM_WDSZ IA_XHEAAC_DEC_CONFIG_PARAM_PCM_WDSZ
  |  |  ------------------
  |  |  |  |   23|  12.4k|#define IA_XHEAAC_DEC_CONFIG_PARAM_PCM_WDSZ 0x0000
  |  |  ------------------
  ------------------
  760|       |
  761|  12.4k|  if ((mPcmWdSz / 8) != 2) {
  ------------------
  |  Branch (761:7): [True: 0, False: 12.4k]
  ------------------
  762|      0|    return IA_FATAL_ERROR;
  ------------------
  |  |   25|      0|#define IA_FATAL_ERROR 0x80000000
  ------------------
  763|      0|  }
  764|       |
  765|       |  /* channel mask to tell the arrangement of channels in bit stream */
  766|  12.4k|  err_code = ixheaacd_dec_api(mXheaacCodecHandle, IA_API_CMD_GET_CONFIG_PARAM,
  ------------------
  |  |   33|  12.4k|#define IA_API_CMD_GET_CONFIG_PARAM 0x0005
  ------------------
  767|  12.4k|                              IA_ENHAACPLUS_DEC_CONFIG_PARAM_CHANNEL_MASK,
  ------------------
  |  |   78|  12.4k|#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_CHANNEL_MASK IA_XHEAAC_DEC_CONFIG_PARAM_CHANNEL_MASK
  |  |  ------------------
  |  |  |  |   26|  12.4k|#define IA_XHEAAC_DEC_CONFIG_PARAM_CHANNEL_MASK 0x0003
  |  |  ------------------
  ------------------
  768|  12.4k|                              &mChannelMask);
  769|       |
  770|       |  /* Channel mode to tell MONO/STEREO/DUAL-MONO/NONE_OF_THESE */
  771|  12.4k|  uint32_t ui_channel_mode;
  772|  12.4k|  err_code = ixheaacd_dec_api(mXheaacCodecHandle, IA_API_CMD_GET_CONFIG_PARAM,
  ------------------
  |  |   33|  12.4k|#define IA_API_CMD_GET_CONFIG_PARAM 0x0005
  ------------------
  773|  12.4k|                              IA_ENHAACPLUS_DEC_CONFIG_PARAM_CHANNEL_MODE,
  ------------------
  |  |   79|  12.4k|#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_CHANNEL_MODE IA_XHEAAC_DEC_CONFIG_PARAM_CHANNEL_MODE
  |  |  ------------------
  |  |  |  |   27|  12.4k|#define IA_XHEAAC_DEC_CONFIG_PARAM_CHANNEL_MODE 0x0004
  |  |  ------------------
  ------------------
  774|  12.4k|                              &ui_channel_mode);
  775|       |
  776|       |  /* Channel mode to tell SBR PRESENT/NOT_PRESENT */
  777|  12.4k|  uint32_t ui_sbr_mode;
  778|  12.4k|  err_code =
  779|  12.4k|      ixheaacd_dec_api(mXheaacCodecHandle, IA_API_CMD_GET_CONFIG_PARAM,
  ------------------
  |  |   33|  12.4k|#define IA_API_CMD_GET_CONFIG_PARAM 0x0005
  ------------------
  780|  12.4k|                       IA_ENHAACPLUS_DEC_CONFIG_PARAM_SBR_MODE, &ui_sbr_mode);
  ------------------
  |  |   80|  12.4k|#define IA_ENHAACPLUS_DEC_CONFIG_PARAM_SBR_MODE IA_XHEAAC_DEC_CONFIG_PARAM_SBR_MODE
  |  |  ------------------
  |  |  |  |   28|  12.4k|#define IA_XHEAAC_DEC_CONFIG_PARAM_SBR_MODE 0x0005
  |  |  ------------------
  ------------------
  781|       |
  782|       |  /* mOutputFrameLength = 1024 * (1 + SBR_MODE) for AAC */
  783|       |  /* For USAC it could be 1024 * 3 , support to query  */
  784|       |  /* not yet added in codec                            */
  785|  12.4k|  mOutputFrameLength = 1024 * (1 + ui_sbr_mode);
  786|       |
  787|  12.4k|  return IA_NO_ERROR;
  ------------------
  |  |   23|  12.4k|#define IA_NO_ERROR 0x00000000
  ------------------
  788|  12.4k|}
LLVMFuzzerTestOneInput:
  863|  14.2k|extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
  864|  14.2k|  int status;
  865|  14.2k|  int num_proc_iterations = 0;
  866|  14.2k|  if (size < 1) return 0;
  ------------------
  |  Branch (866:7): [True: 0, False: 14.2k]
  ------------------
  867|  14.2k|  Codec* codec = new Codec();
  868|  14.2k|  bool isADTS = false;
  869|  14.2k|  if (size >= 2) {
  ------------------
  |  Branch (869:7): [True: 14.2k, False: 10]
  ------------------
  870|  14.2k|    if ((data[0] == 0xFF) && ((data[1] & 0xF0) == 0xF0)) {
  ------------------
  |  Branch (870:9): [True: 12.5k, False: 1.65k]
  |  Branch (870:30): [True: 12.5k, False: 12]
  ------------------
  871|  12.5k|      isADTS = true;
  872|  12.5k|    }
  873|  14.2k|  }
  874|  14.2k|  status = codec->initDecoder(data, size, isADTS);
  875|  14.2k|  if (0 == status) {
  ------------------
  |  Branch (875:7): [True: 14.2k, False: 0]
  ------------------
  876|  14.2k|    int32_t bytesConsumed = 0;
  877|  14.2k|    status = codec->configXAACDecoder((uint8_t*)data, size, &bytesConsumed);
  878|   401k|    while ((int32_t)size > bytesConsumed) {
  ------------------
  |  Branch (878:12): [True: 387k, False: 14.2k]
  ------------------
  879|   387k|      int32_t numOutBytes;
  880|   387k|      size -= bytesConsumed;
  881|   387k|      data += bytesConsumed;
  882|   387k|      status = codec->decodeXAACStream((uint8_t*)data, size, &bytesConsumed,
  883|   387k|                                       &numOutBytes);
  884|   387k|      num_proc_iterations++;
  885|       |      /* Stop processing after 500 frames */
  886|   387k|      if (num_proc_iterations > 500)
  ------------------
  |  Branch (886:11): [True: 31, False: 387k]
  ------------------
  887|     31|        break;
  888|       |
  889|       |      /* If decoder doesn't consume any bytes, advance by 4 bytes */
  890|   387k|      if (0 == bytesConsumed) bytesConsumed = 4;
  ------------------
  |  Branch (890:11): [True: 1, False: 387k]
  ------------------
  891|   387k|    }
  892|  14.2k|  }
  893|  14.2k|  status = codec->deInitXAACDecoder();
  894|  14.2k|  status = codec->deInitMPEGDDDrc();
  895|  14.2k|  delete codec;
  896|  14.2k|  return 0;
  897|  14.2k|}

